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OAAO,QAAU","file":"/npm/@hostnet/novnc@1.0.0/dist/novnc.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/@hostnet/novnc@1.0.0/dist/novnc.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2012 Joel Martin\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * See README.md for usage and integration instructions.\n */\n\n/*\n * Logging/debug routines\n */\n\nvar _log_level = 'warn';\n\nvar Debug = function Debug(msg) {};\nvar Info = function Info(msg) {};\nvar Warn = function Warn(msg) {};\nvar Error$1 = function Error$1(msg) {};\n\nfunction init_logging(level) {\n    if (typeof level === 'undefined') {\n        level = _log_level;\n    } else {\n        _log_level = level;\n    }\n\n    Debug = Info = Warn = Error$1 = function Error$1(msg) {};\n    if (typeof window.console !== \"undefined\") {\n        switch (level) {\n            case 'debug':\n                Debug = console.debug.bind(window.console);\n            case 'info':\n                Info = console.info.bind(window.console);\n            case 'warn':\n                Warn = console.warn.bind(window.console);\n            case 'error':\n                Error$1 = console.error.bind(window.console);\n            case 'none':\n                break;\n            default:\n                throw new Error$1(\"invalid logging type '\" + level + \"'\");\n        }\n    }\n}\n\n// Initialize logging level\ninit_logging();\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2012 Joel Martin\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * See README.md for usage and integration instructions.\n */\n\n/*\n * Decode from UTF-8\n */\nfunction decodeUTF8(utf8string) {\n    \"use strict\";\n\n    return decodeURIComponent(escape(utf8string));\n}\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2012 Joel Martin\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * See README.md for usage and integration instructions.\n */\n\n// Touch detection\nvar isTouchDevice = 'ontouchstart' in document.documentElement ||\n// requried for Chrome debugger\ndocument.ontouchstart !== undefined ||\n// required for MS Surface\nnavigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;\nwindow.addEventListener('touchstart', function onFirstTouch() {\n    isTouchDevice = true;\n    window.removeEventListener('touchstart', onFirstTouch, false);\n}, false);\n\nvar _cursor_uris_supported = null;\n\nfunction supportsCursorURIs() {\n    if (_cursor_uris_supported === null) {\n        try {\n            var target = document.createElement('canvas');\n            target.style.cursor = 'url(\"data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==\") 2 2, default';\n\n            if (target.style.cursor) {\n                Info(\"Data URI scheme cursor supported\");\n                _cursor_uris_supported = true;\n            } else {\n                Warn(\"Data URI scheme cursor not supported\");\n                _cursor_uris_supported = false;\n            }\n        } catch (exc) {\n            Error$1(\"Data URI scheme cursor test exception: \" + exc);\n            _cursor_uris_supported = false;\n        }\n    }\n\n    return _cursor_uris_supported;\n}\n\nfunction isMac() {\n    return navigator && !!/mac/i.exec(navigator.platform);\n}\n\nfunction isIE() {\n    return navigator && !!/trident/i.exec(navigator.userAgent);\n}\n\nfunction isEdge() {\n    return navigator && !!/edge/i.exec(navigator.userAgent);\n}\n\nfunction isWindows() {\n    return navigator && !!/win/i.exec(navigator.platform);\n}\n\nfunction isIOS() {\n    return navigator && (!!/ipad/i.exec(navigator.platform) || !!/iphone/i.exec(navigator.platform) || !!/ipod/i.exec(navigator.platform));\n}\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright 2017 Pierre Ossman for Cendio AB\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * See README.md for usage and integration instructions.\n */\n\nvar EventTargetMixin = {\n    _listeners: null,\n\n    addEventListener: function addEventListener(type, callback) {\n        if (!this._listeners) {\n            this._listeners = new Map();\n        }\n        if (!this._listeners.has(type)) {\n            this._listeners.set(type, new Set());\n        }\n        this._listeners.get(type).add(callback);\n    },\n\n    removeEventListener: function removeEventListener(type, callback) {\n        if (!this._listeners || !this._listeners.has(type)) {\n            return;\n        }\n        this._listeners.get(type).delete(callback);\n    },\n\n    dispatchEvent: function dispatchEvent(event) {\n        if (!this._listeners || !this._listeners.has(event.type)) {\n            return true;\n        }\n        this._listeners.get(event.type).forEach(function (callback) {\n            callback.call(this, event);\n        }, this);\n        return !event.defaultPrevented;\n    }\n};\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n// From: http://hg.mozilla.org/mozilla-central/raw-file/ec10630b1a54/js/src/devtools/jint/sunspider/string-base64.js\n\nvar Base64 = {\n    /* Convert data (an array of integers) to a Base64 string. */\n    toBase64Table: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split(''),\n    base64Pad: '=',\n\n    encode: function encode(data) {\n        \"use strict\";\n\n        var result = '';\n        var toBase64Table = this.toBase64Table;\n        var length = data.length;\n        var lengthpad = length % 3;\n        // Convert every three bytes to 4 ascii characters.\n\n        for (var i = 0; i < length - 2; i += 3) {\n            result += toBase64Table[data[i] >> 2];\n            result += toBase64Table[((data[i] & 0x03) << 4) + (data[i + 1] >> 4)];\n            result += toBase64Table[((data[i + 1] & 0x0f) << 2) + (data[i + 2] >> 6)];\n            result += toBase64Table[data[i + 2] & 0x3f];\n        }\n\n        // Convert the remaining 1 or 2 bytes, pad out to 4 characters.\n        var j = 0;\n        if (lengthpad === 2) {\n            j = length - lengthpad;\n            result += toBase64Table[data[j] >> 2];\n            result += toBase64Table[((data[j] & 0x03) << 4) + (data[j + 1] >> 4)];\n            result += toBase64Table[(data[j + 1] & 0x0f) << 2];\n            result += toBase64Table[64];\n        } else if (lengthpad === 1) {\n            j = length - lengthpad;\n            result += toBase64Table[data[j] >> 2];\n            result += toBase64Table[(data[j] & 0x03) << 4];\n            result += toBase64Table[64];\n            result += toBase64Table[64];\n        }\n\n        return result;\n    },\n\n    /* Convert Base64 data to a string */\n    toBinaryTable: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, 0, -1, -1, -1, 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, -1, -1, -1, -1, -1, -1, 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, -1, -1, -1, -1, -1],\n\n    decode: function decode(data, offset) {\n        \"use strict\";\n\n        offset = typeof offset !== 'undefined' ? offset : 0;\n        var toBinaryTable = this.toBinaryTable;\n        var base64Pad = this.base64Pad;\n        var result, result_length;\n        var leftbits = 0; // number of bits decoded, but yet to be appended\n        var leftdata = 0; // bits decoded, but yet to be appended\n        var data_length = data.indexOf('=') - offset;\n\n        if (data_length < 0) {\n            data_length = data.length - offset;\n        }\n\n        /* Every four characters is 3 resulting numbers */\n        result_length = (data_length >> 2) * 3 + Math.floor(data_length % 4 / 1.5);\n        result = new Array(result_length);\n\n        // Convert one by one.\n        for (var idx = 0, i = offset; i < data.length; i++) {\n            var c = toBinaryTable[data.charCodeAt(i) & 0x7f];\n            var padding = data.charAt(i) === base64Pad;\n            // Skip illegal characters and whitespace\n            if (c === -1) {\n                Error$1(\"Illegal character code \" + data.charCodeAt(i) + \" at position \" + i);\n                continue;\n            }\n\n            // Collect data into leftdata, update bitcount\n            leftdata = leftdata << 6 | c;\n            leftbits += 6;\n\n            // If we have 8 or more bits, append 8 bits to the result\n            if (leftbits >= 8) {\n                leftbits -= 8;\n                // Append if not padding.\n                if (!padding) {\n                    result[idx++] = leftdata >> leftbits & 0xff;\n                }\n                leftdata &= (1 << leftbits) - 1;\n            }\n        }\n\n        // If there are any bits left, the base64 string was corrupted\n        if (leftbits) {\n            err = new Error('Corrupted base64 string');\n            err.name = 'Base64-Error';\n            throw err;\n        }\n\n        return result;\n    }\n}; /* End of Base64 namespace */\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2012 Joel Martin\n * Copyright (C) 2015 Samuel Mannehed for Cendio AB\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * See README.md for usage and integration instructions.\n */\n\nfunction Display(target) {\n    this._drawCtx = null;\n    this._c_forceCanvas = false;\n\n    this._renderQ = []; // queue drawing actions for in-oder rendering\n    this._flushing = false;\n\n    // the full frame buffer (logical canvas) size\n    this._fb_width = 0;\n    this._fb_height = 0;\n\n    this._prevDrawStyle = \"\";\n    this._tile = null;\n    this._tile16x16 = null;\n    this._tile_x = 0;\n    this._tile_y = 0;\n\n    Debug(\">> Display.constructor\");\n\n    // The visible canvas\n    this._target = target;\n\n    if (!this._target) {\n        throw new Error(\"Target must be set\");\n    }\n\n    if (typeof this._target === 'string') {\n        throw new Error('target must be a DOM element');\n    }\n\n    if (!this._target.getContext) {\n        throw new Error(\"no getContext method\");\n    }\n\n    this._targetCtx = this._target.getContext('2d');\n\n    // the visible canvas viewport (i.e. what actually gets seen)\n    this._viewportLoc = { 'x': 0, 'y': 0, 'w': this._target.width, 'h': this._target.height };\n\n    // The hidden canvas, where we do the actual rendering\n    this._backbuffer = document.createElement('canvas');\n    this._drawCtx = this._backbuffer.getContext('2d');\n\n    this._damageBounds = { left: 0, top: 0,\n        right: this._backbuffer.width,\n        bottom: this._backbuffer.height };\n\n    Debug(\"User Agent: \" + navigator.userAgent);\n\n    this.clear();\n\n    // Check canvas features\n    if (!('createImageData' in this._drawCtx)) {\n        throw new Error(\"Canvas does not support createImageData\");\n    }\n\n    this._tile16x16 = this._drawCtx.createImageData(16, 16);\n    Debug(\"<< Display.constructor\");\n}\n\nvar SUPPORTS_IMAGEDATA_CONSTRUCTOR = false;\ntry {\n    new ImageData(new Uint8ClampedArray(4), 1, 1);\n    SUPPORTS_IMAGEDATA_CONSTRUCTOR = true;\n} catch (ex) {\n    // ignore failure\n}\n\nDisplay.prototype = {\n    // ===== PROPERTIES =====\n\n    _scale: 1.0,\n    get scale() {\n        return this._scale;\n    },\n    set scale(scale) {\n        this._rescale(scale);\n    },\n\n    _clipViewport: false,\n    get clipViewport() {\n        return this._clipViewport;\n    },\n    set clipViewport(viewport) {\n        this._clipViewport = viewport;\n        // May need to readjust the viewport dimensions\n        var vp = this._viewportLoc;\n        this.viewportChangeSize(vp.w, vp.h);\n        this.viewportChangePos(0, 0);\n    },\n\n    get width() {\n        return this._fb_width;\n    },\n    get height() {\n        return this._fb_height;\n    },\n\n    logo: null,\n\n    // ===== EVENT HANDLERS =====\n\n    onflush: function onflush() {}, // A flush request has finished\n\n    // ===== PUBLIC METHODS =====\n\n    viewportChangePos: function viewportChangePos(deltaX, deltaY) {\n        var vp = this._viewportLoc;\n        deltaX = Math.floor(deltaX);\n        deltaY = Math.floor(deltaY);\n\n        if (!this._clipViewport) {\n            deltaX = -vp.w; // clamped later of out of bounds\n            deltaY = -vp.h;\n        }\n\n        var vx2 = vp.x + vp.w - 1;\n        var vy2 = vp.y + vp.h - 1;\n\n        // Position change\n\n        if (deltaX < 0 && vp.x + deltaX < 0) {\n            deltaX = -vp.x;\n        }\n        if (vx2 + deltaX >= this._fb_width) {\n            deltaX -= vx2 + deltaX - this._fb_width + 1;\n        }\n\n        if (vp.y + deltaY < 0) {\n            deltaY = -vp.y;\n        }\n        if (vy2 + deltaY >= this._fb_height) {\n            deltaY -= vy2 + deltaY - this._fb_height + 1;\n        }\n\n        if (deltaX === 0 && deltaY === 0) {\n            return;\n        }\n        Debug(\"viewportChange deltaX: \" + deltaX + \", deltaY: \" + deltaY);\n\n        vp.x += deltaX;\n        vp.y += deltaY;\n\n        this._damage(vp.x, vp.y, vp.w, vp.h);\n\n        this.flip();\n    },\n\n    viewportChangeSize: function viewportChangeSize(width, height) {\n\n        if (!this._clipViewport || typeof width === \"undefined\" || typeof height === \"undefined\") {\n\n            Debug(\"Setting viewport to full display region\");\n            width = this._fb_width;\n            height = this._fb_height;\n        }\n\n        if (width > this._fb_width) {\n            width = this._fb_width;\n        }\n        if (height > this._fb_height) {\n            height = this._fb_height;\n        }\n\n        var vp = this._viewportLoc;\n        if (vp.w !== width || vp.h !== height) {\n            vp.w = width;\n            vp.h = height;\n\n            var canvas = this._target;\n            canvas.width = width;\n            canvas.height = height;\n\n            // The position might need to be updated if we've grown\n            this.viewportChangePos(0, 0);\n\n            this._damage(vp.x, vp.y, vp.w, vp.h);\n            this.flip();\n\n            // Update the visible size of the target canvas\n            this._rescale(this._scale);\n        }\n    },\n\n    absX: function absX(x) {\n        return x / this._scale + this._viewportLoc.x;\n    },\n\n    absY: function absY(y) {\n        return y / this._scale + this._viewportLoc.y;\n    },\n\n    resize: function resize(width, height) {\n        this._prevDrawStyle = \"\";\n\n        this._fb_width = width;\n        this._fb_height = height;\n\n        var canvas = this._backbuffer;\n        if (canvas.width !== width || canvas.height !== height) {\n\n            // We have to save the canvas data since changing the size will clear it\n            var saveImg = null;\n            if (canvas.width > 0 && canvas.height > 0) {\n                saveImg = this._drawCtx.getImageData(0, 0, canvas.width, canvas.height);\n            }\n\n            if (canvas.width !== width) {\n                canvas.width = width;\n            }\n            if (canvas.height !== height) {\n                canvas.height = height;\n            }\n\n            if (saveImg) {\n                this._drawCtx.putImageData(saveImg, 0, 0);\n            }\n        }\n\n        // Readjust the viewport as it may be incorrectly sized\n        // and positioned\n        var vp = this._viewportLoc;\n        this.viewportChangeSize(vp.w, vp.h);\n        this.viewportChangePos(0, 0);\n    },\n\n    // Track what parts of the visible canvas that need updating\n    _damage: function _damage(x, y, w, h) {\n        if (x < this._damageBounds.left) {\n            this._damageBounds.left = x;\n        }\n        if (y < this._damageBounds.top) {\n            this._damageBounds.top = y;\n        }\n        if (x + w > this._damageBounds.right) {\n            this._damageBounds.right = x + w;\n        }\n        if (y + h > this._damageBounds.bottom) {\n            this._damageBounds.bottom = y + h;\n        }\n    },\n\n    // Update the visible canvas with the contents of the\n    // rendering canvas\n    flip: function flip(from_queue) {\n        if (this._renderQ.length !== 0 && !from_queue) {\n            this._renderQ_push({\n                'type': 'flip'\n            });\n        } else {\n            var x, y, vx, vy, w, h;\n\n            x = this._damageBounds.left;\n            y = this._damageBounds.top;\n            w = this._damageBounds.right - x;\n            h = this._damageBounds.bottom - y;\n\n            vx = x - this._viewportLoc.x;\n            vy = y - this._viewportLoc.y;\n\n            if (vx < 0) {\n                w += vx;\n                x -= vx;\n                vx = 0;\n            }\n            if (vy < 0) {\n                h += vy;\n                y -= vy;\n                vy = 0;\n            }\n\n            if (vx + w > this._viewportLoc.w) {\n                w = this._viewportLoc.w - vx;\n            }\n            if (vy + h > this._viewportLoc.h) {\n                h = this._viewportLoc.h - vy;\n            }\n\n            if (w > 0 && h > 0) {\n                // FIXME: We may need to disable image smoothing here\n                //        as well (see copyImage()), but we haven't\n                //        noticed any problem yet.\n                this._targetCtx.drawImage(this._backbuffer, x, y, w, h, vx, vy, w, h);\n            }\n\n            this._damageBounds.left = this._damageBounds.top = 65535;\n            this._damageBounds.right = this._damageBounds.bottom = 0;\n        }\n    },\n\n    clear: function clear() {\n        if (this._logo) {\n            this.resize(this._logo.width, this._logo.height);\n            this.imageRect(0, 0, this._logo.type, this._logo.data);\n        } else {\n            this.resize(240, 20);\n            this._drawCtx.clearRect(0, 0, this._fb_width, this._fb_height);\n        }\n        this.flip();\n    },\n\n    pending: function pending() {\n        return this._renderQ.length > 0;\n    },\n\n    flush: function flush() {\n        if (this._renderQ.length === 0) {\n            this.onflush();\n        } else {\n            this._flushing = true;\n        }\n    },\n\n    fillRect: function fillRect(x, y, width, height, color, from_queue) {\n        if (this._renderQ.length !== 0 && !from_queue) {\n            this._renderQ_push({\n                'type': 'fill',\n                'x': x,\n                'y': y,\n                'width': width,\n                'height': height,\n                'color': color\n            });\n        } else {\n            this._setFillColor(color);\n            this._drawCtx.fillRect(x, y, width, height);\n            this._damage(x, y, width, height);\n        }\n    },\n\n    copyImage: function copyImage(old_x, old_y, new_x, new_y, w, h, from_queue) {\n        if (this._renderQ.length !== 0 && !from_queue) {\n            this._renderQ_push({\n                'type': 'copy',\n                'old_x': old_x,\n                'old_y': old_y,\n                'x': new_x,\n                'y': new_y,\n                'width': w,\n                'height': h\n            });\n        } else {\n            // Due to this bug among others [1] we need to disable the image-smoothing to\n            // avoid getting a blur effect when copying data.\n            //\n            // 1. https://bugzilla.mozilla.org/show_bug.cgi?id=1194719\n            //\n            // We need to set these every time since all properties are reset\n            // when the the size is changed\n            this._drawCtx.mozImageSmoothingEnabled = false;\n            this._drawCtx.webkitImageSmoothingEnabled = false;\n            this._drawCtx.msImageSmoothingEnabled = false;\n            this._drawCtx.imageSmoothingEnabled = false;\n\n            this._drawCtx.drawImage(this._backbuffer, old_x, old_y, w, h, new_x, new_y, w, h);\n            this._damage(new_x, new_y, w, h);\n        }\n    },\n\n    imageRect: function imageRect(x, y, mime, arr) {\n        var img = new Image();\n        img.src = \"data: \" + mime + \";base64,\" + Base64.encode(arr);\n        this._renderQ_push({\n            'type': 'img',\n            'img': img,\n            'x': x,\n            'y': y\n        });\n    },\n\n    // start updating a tile\n    startTile: function startTile(x, y, width, height, color) {\n        this._tile_x = x;\n        this._tile_y = y;\n        if (width === 16 && height === 16) {\n            this._tile = this._tile16x16;\n        } else {\n            this._tile = this._drawCtx.createImageData(width, height);\n        }\n\n        var red = color[2];\n        var green = color[1];\n        var blue = color[0];\n\n        var data = this._tile.data;\n        for (var i = 0; i < width * height * 4; i += 4) {\n            data[i] = red;\n            data[i + 1] = green;\n            data[i + 2] = blue;\n            data[i + 3] = 255;\n        }\n    },\n\n    // update sub-rectangle of the current tile\n    subTile: function subTile(x, y, w, h, color) {\n        var red = color[2];\n        var green = color[1];\n        var blue = color[0];\n        var xend = x + w;\n        var yend = y + h;\n\n        var data = this._tile.data;\n        var width = this._tile.width;\n        for (var j = y; j < yend; j++) {\n            for (var i = x; i < xend; i++) {\n                var p = (i + j * width) * 4;\n                data[p] = red;\n                data[p + 1] = green;\n                data[p + 2] = blue;\n                data[p + 3] = 255;\n            }\n        }\n    },\n\n    // draw the current tile to the screen\n    finishTile: function finishTile() {\n        this._drawCtx.putImageData(this._tile, this._tile_x, this._tile_y);\n        this._damage(this._tile_x, this._tile_y, this._tile.width, this._tile.height);\n    },\n\n    blitImage: function blitImage(x, y, width, height, arr, offset, from_queue) {\n        if (this._renderQ.length !== 0 && !from_queue) {\n            // NB(directxman12): it's technically more performant here to use preallocated arrays,\n            // but it's a lot of extra work for not a lot of payoff -- if we're using the render queue,\n            // this probably isn't getting called *nearly* as much\n            var new_arr = new Uint8Array(width * height * 4);\n            new_arr.set(new Uint8Array(arr.buffer, 0, new_arr.length));\n            this._renderQ_push({\n                'type': 'blit',\n                'data': new_arr,\n                'x': x,\n                'y': y,\n                'width': width,\n                'height': height\n            });\n        } else {\n            this._bgrxImageData(x, y, width, height, arr, offset);\n        }\n    },\n\n    blitRgbImage: function blitRgbImage(x, y, width, height, arr, offset, from_queue) {\n        if (this._renderQ.length !== 0 && !from_queue) {\n            // NB(directxman12): it's technically more performant here to use preallocated arrays,\n            // but it's a lot of extra work for not a lot of payoff -- if we're using the render queue,\n            // this probably isn't getting called *nearly* as much\n            var new_arr = new Uint8Array(width * height * 3);\n            new_arr.set(new Uint8Array(arr.buffer, 0, new_arr.length));\n            this._renderQ_push({\n                'type': 'blitRgb',\n                'data': new_arr,\n                'x': x,\n                'y': y,\n                'width': width,\n                'height': height\n            });\n        } else {\n            this._rgbImageData(x, y, width, height, arr, offset);\n        }\n    },\n\n    blitRgbxImage: function blitRgbxImage(x, y, width, height, arr, offset, from_queue) {\n        if (this._renderQ.length !== 0 && !from_queue) {\n            // NB(directxman12): it's technically more performant here to use preallocated arrays,\n            // but it's a lot of extra work for not a lot of payoff -- if we're using the render queue,\n            // this probably isn't getting called *nearly* as much\n            var new_arr = new Uint8Array(width * height * 4);\n            new_arr.set(new Uint8Array(arr.buffer, 0, new_arr.length));\n            this._renderQ_push({\n                'type': 'blitRgbx',\n                'data': new_arr,\n                'x': x,\n                'y': y,\n                'width': width,\n                'height': height\n            });\n        } else {\n            this._rgbxImageData(x, y, width, height, arr, offset);\n        }\n    },\n\n    drawImage: function drawImage(img, x, y) {\n        this._drawCtx.drawImage(img, x, y);\n        this._damage(x, y, img.width, img.height);\n    },\n\n    changeCursor: function changeCursor(pixels, mask, hotx, hoty, w, h) {\n        Display.changeCursor(this._target, pixels, mask, hotx, hoty, w, h);\n    },\n\n    defaultCursor: function defaultCursor() {\n        this._target.style.cursor = \"default\";\n    },\n\n    disableLocalCursor: function disableLocalCursor() {\n        this._target.style.cursor = \"none\";\n    },\n\n    autoscale: function autoscale(containerWidth, containerHeight) {\n        var vp = this._viewportLoc;\n        var targetAspectRatio = containerWidth / containerHeight;\n        var fbAspectRatio = vp.w / vp.h;\n\n        var scaleRatio;\n        if (fbAspectRatio >= targetAspectRatio) {\n            scaleRatio = containerWidth / vp.w;\n        } else {\n            scaleRatio = containerHeight / vp.h;\n        }\n\n        this._rescale(scaleRatio);\n    },\n\n    // ===== PRIVATE METHODS =====\n\n    _rescale: function _rescale(factor) {\n        this._scale = factor;\n        var vp = this._viewportLoc;\n\n        // NB(directxman12): If you set the width directly, or set the\n        //                   style width to a number, the canvas is cleared.\n        //                   However, if you set the style width to a string\n        //                   ('NNNpx'), the canvas is scaled without clearing.\n        var width = Math.round(factor * vp.w) + 'px';\n        var height = Math.round(factor * vp.h) + 'px';\n\n        if (this._target.style.width !== width || this._target.style.height !== height) {\n            this._target.style.width = width;\n            this._target.style.height = height;\n        }\n    },\n\n    _setFillColor: function _setFillColor(color) {\n        var newStyle = 'rgb(' + color[2] + ',' + color[1] + ',' + color[0] + ')';\n        if (newStyle !== this._prevDrawStyle) {\n            this._drawCtx.fillStyle = newStyle;\n            this._prevDrawStyle = newStyle;\n        }\n    },\n\n    _rgbImageData: function _rgbImageData(x, y, width, height, arr, offset) {\n        var img = this._drawCtx.createImageData(width, height);\n        var data = img.data;\n        for (var i = 0, j = offset; i < width * height * 4; i += 4, j += 3) {\n            data[i] = arr[j];\n            data[i + 1] = arr[j + 1];\n            data[i + 2] = arr[j + 2];\n            data[i + 3] = 255; // Alpha\n        }\n        this._drawCtx.putImageData(img, x, y);\n        this._damage(x, y, img.width, img.height);\n    },\n\n    _bgrxImageData: function _bgrxImageData(x, y, width, height, arr, offset) {\n        var img = this._drawCtx.createImageData(width, height);\n        var data = img.data;\n        for (var i = 0, j = offset; i < width * height * 4; i += 4, j += 4) {\n            data[i] = arr[j + 2];\n            data[i + 1] = arr[j + 1];\n            data[i + 2] = arr[j];\n            data[i + 3] = 255; // Alpha\n        }\n        this._drawCtx.putImageData(img, x, y);\n        this._damage(x, y, img.width, img.height);\n    },\n\n    _rgbxImageData: function _rgbxImageData(x, y, width, height, arr, offset) {\n        // NB(directxman12): arr must be an Type Array view\n        var img;\n        if (SUPPORTS_IMAGEDATA_CONSTRUCTOR) {\n            img = new ImageData(new Uint8ClampedArray(arr.buffer, arr.byteOffset, width * height * 4), width, height);\n        } else {\n            img = this._drawCtx.createImageData(width, height);\n            img.data.set(new Uint8ClampedArray(arr.buffer, arr.byteOffset, width * height * 4));\n        }\n        this._drawCtx.putImageData(img, x, y);\n        this._damage(x, y, img.width, img.height);\n    },\n\n    _renderQ_push: function _renderQ_push(action) {\n        this._renderQ.push(action);\n        if (this._renderQ.length === 1) {\n            // If this can be rendered immediately it will be, otherwise\n            // the scanner will wait for the relevant event\n            this._scan_renderQ();\n        }\n    },\n\n    _resume_renderQ: function _resume_renderQ() {\n        // \"this\" is the object that is ready, not the\n        // display object\n        this.removeEventListener('load', this._noVNC_display._resume_renderQ);\n        this._noVNC_display._scan_renderQ();\n    },\n\n    _scan_renderQ: function _scan_renderQ() {\n        var ready = true;\n        while (ready && this._renderQ.length > 0) {\n            var a = this._renderQ[0];\n            switch (a.type) {\n                case 'flip':\n                    this.flip(true);\n                    break;\n                case 'copy':\n                    this.copyImage(a.old_x, a.old_y, a.x, a.y, a.width, a.height, true);\n                    break;\n                case 'fill':\n                    this.fillRect(a.x, a.y, a.width, a.height, a.color, true);\n                    break;\n                case 'blit':\n                    this.blitImage(a.x, a.y, a.width, a.height, a.data, 0, true);\n                    break;\n                case 'blitRgb':\n                    this.blitRgbImage(a.x, a.y, a.width, a.height, a.data, 0, true);\n                    break;\n                case 'blitRgbx':\n                    this.blitRgbxImage(a.x, a.y, a.width, a.height, a.data, 0, true);\n                    break;\n                case 'img':\n                    if (a.img.complete) {\n                        this.drawImage(a.img, a.x, a.y);\n                    } else {\n                        a.img._noVNC_display = this;\n                        a.img.addEventListener('load', this._resume_renderQ);\n                        // We need to wait for this image to 'load'\n                        // to keep things in-order\n                        ready = false;\n                    }\n                    break;\n            }\n\n            if (ready) {\n                this._renderQ.shift();\n            }\n        }\n\n        if (this._renderQ.length === 0 && this._flushing) {\n            this._flushing = false;\n            this.onflush();\n        }\n    }\n};\n\n// Class Methods\nDisplay.changeCursor = function (target, pixels, mask, hotx, hoty, w, h) {\n    if (w === 0 || h === 0) {\n        target.style.cursor = 'none';\n        return;\n    }\n\n    var cur = [];\n    var y, x;\n    for (y = 0; y < h; y++) {\n        for (x = 0; x < w; x++) {\n            var idx = y * Math.ceil(w / 8) + Math.floor(x / 8);\n            var alpha = mask[idx] << x % 8 & 0x80 ? 255 : 0;\n            idx = (w * y + x) * 4;\n            cur.push(pixels[idx + 2]); // red\n            cur.push(pixels[idx + 1]); // green\n            cur.push(pixels[idx]); // blue\n            cur.push(alpha); // alpha\n        }\n    }\n\n    var canvas = document.createElement('canvas');\n    var ctx = canvas.getContext('2d');\n\n    canvas.width = w;\n    canvas.height = h;\n\n    var img;\n    if (SUPPORTS_IMAGEDATA_CONSTRUCTOR) {\n        img = new ImageData(new Uint8ClampedArray(cur), w, h);\n    } else {\n        img = ctx.createImageData(w, h);\n        img.data.set(new Uint8ClampedArray(cur));\n    }\n    ctx.clearRect(0, 0, w, h);\n    ctx.putImageData(img, 0, 0);\n\n    var url = canvas.toDataURL();\n    target.style.cursor = 'url(' + url + ')' + hotx + ' ' + hoty + ', default';\n};\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2012 Joel Martin\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * See README.md for usage and integration instructions.\n */\n\n/*\n * Cross-browser event and position routines\n */\n\nfunction getPointerEvent(e) {\n    return e.changedTouches ? e.changedTouches[0] : e.touches ? e.touches[0] : e;\n}\n\nfunction stopEvent(e) {\n    e.stopPropagation();\n    e.preventDefault();\n}\n\n// Emulate Element.setCapture() when not supported\nvar _captureRecursion = false;\nvar _captureElem = null;\nfunction _captureProxy(e) {\n    // Recursion protection as we'll see our own event\n    if (_captureRecursion) return;\n\n    // Clone the event as we cannot dispatch an already dispatched event\n    var newEv = new e.constructor(e.type, e);\n\n    _captureRecursion = true;\n    _captureElem.dispatchEvent(newEv);\n    _captureRecursion = false;\n\n    // Avoid double events\n    e.stopPropagation();\n\n    // Respect the wishes of the redirected event handlers\n    if (newEv.defaultPrevented) {\n        e.preventDefault();\n    }\n\n    // Implicitly release the capture on button release\n    if (e.type === \"mouseup\") {\n        releaseCapture();\n    }\n}\n\n// Follow cursor style of target element\nfunction _captureElemChanged() {\n    var captureElem = document.getElementById(\"noVNC_mouse_capture_elem\");\n    captureElem.style.cursor = window.getComputedStyle(_captureElem).cursor;\n}\nvar _captureObserver = new MutationObserver(_captureElemChanged);\n\nvar _captureIndex = 0;\n\nfunction setCapture(elem) {\n    if (elem.setCapture) {\n\n        elem.setCapture();\n\n        // IE releases capture on 'click' events which might not trigger\n        elem.addEventListener('mouseup', releaseCapture);\n    } else {\n        // Release any existing capture in case this method is\n        // called multiple times without coordination\n        releaseCapture();\n\n        var captureElem = document.getElementById(\"noVNC_mouse_capture_elem\");\n\n        if (captureElem === null) {\n            captureElem = document.createElement(\"div\");\n            captureElem.id = \"noVNC_mouse_capture_elem\";\n            captureElem.style.position = \"fixed\";\n            captureElem.style.top = \"0px\";\n            captureElem.style.left = \"0px\";\n            captureElem.style.width = \"100%\";\n            captureElem.style.height = \"100%\";\n            captureElem.style.zIndex = 10000;\n            captureElem.style.display = \"none\";\n            document.body.appendChild(captureElem);\n\n            // This is to make sure callers don't get confused by having\n            // our blocking element as the target\n            captureElem.addEventListener('contextmenu', _captureProxy);\n\n            captureElem.addEventListener('mousemove', _captureProxy);\n            captureElem.addEventListener('mouseup', _captureProxy);\n        }\n\n        _captureElem = elem;\n        _captureIndex++;\n\n        // Track cursor and get initial cursor\n        _captureObserver.observe(elem, { attributes: true });\n        _captureElemChanged();\n\n        captureElem.style.display = \"\";\n\n        // We listen to events on window in order to keep tracking if it\n        // happens to leave the viewport\n        window.addEventListener('mousemove', _captureProxy);\n        window.addEventListener('mouseup', _captureProxy);\n    }\n}\n\nfunction releaseCapture() {\n    if (document.releaseCapture) {\n\n        document.releaseCapture();\n    } else {\n        if (!_captureElem) {\n            return;\n        }\n\n        // There might be events already queued, so we need to wait for\n        // them to flush. E.g. contextmenu in Microsoft Edge\n        window.setTimeout(function (expected) {\n            // Only clear it if it's the expected grab (i.e. no one\n            // else has initiated a new grab)\n            if (_captureIndex === expected) {\n                _captureElem = null;\n            }\n        }, 0, _captureIndex);\n\n        _captureObserver.disconnect();\n\n        var captureElem = document.getElementById(\"noVNC_mouse_capture_elem\");\n        captureElem.style.display = \"none\";\n\n        window.removeEventListener('mousemove', _captureProxy);\n        window.removeEventListener('mouseup', _captureProxy);\n    }\n}\n\nvar KeyTable = {\n    XK_VoidSymbol: 0xffffff, /* Void symbol */\n\n    XK_BackSpace: 0xff08, /* Back space, back char */\n    XK_Tab: 0xff09,\n    XK_Linefeed: 0xff0a, /* Linefeed, LF */\n    XK_Clear: 0xff0b,\n    XK_Return: 0xff0d, /* Return, enter */\n    XK_Pause: 0xff13, /* Pause, hold */\n    XK_Scroll_Lock: 0xff14,\n    XK_Sys_Req: 0xff15,\n    XK_Escape: 0xff1b,\n    XK_Delete: 0xffff, /* Delete, rubout */\n\n    /* International & multi-key character composition */\n\n    XK_Multi_key: 0xff20, /* Multi-key character compose */\n    XK_Codeinput: 0xff37,\n    XK_SingleCandidate: 0xff3c,\n    XK_MultipleCandidate: 0xff3d,\n    XK_PreviousCandidate: 0xff3e,\n\n    /* Japanese keyboard support */\n\n    XK_Kanji: 0xff21, /* Kanji, Kanji convert */\n    XK_Muhenkan: 0xff22, /* Cancel Conversion */\n    XK_Henkan_Mode: 0xff23, /* Start/Stop Conversion */\n    XK_Henkan: 0xff23, /* Alias for Henkan_Mode */\n    XK_Romaji: 0xff24, /* to Romaji */\n    XK_Hiragana: 0xff25, /* to Hiragana */\n    XK_Katakana: 0xff26, /* to Katakana */\n    XK_Hiragana_Katakana: 0xff27, /* Hiragana/Katakana toggle */\n    XK_Zenkaku: 0xff28, /* to Zenkaku */\n    XK_Hankaku: 0xff29, /* to Hankaku */\n    XK_Zenkaku_Hankaku: 0xff2a, /* Zenkaku/Hankaku toggle */\n    XK_Touroku: 0xff2b, /* Add to Dictionary */\n    XK_Massyo: 0xff2c, /* Delete from Dictionary */\n    XK_Kana_Lock: 0xff2d, /* Kana Lock */\n    XK_Kana_Shift: 0xff2e, /* Kana Shift */\n    XK_Eisu_Shift: 0xff2f, /* Alphanumeric Shift */\n    XK_Eisu_toggle: 0xff30, /* Alphanumeric toggle */\n    XK_Kanji_Bangou: 0xff37, /* Codeinput */\n    XK_Zen_Koho: 0xff3d, /* Multiple/All Candidate(s) */\n    XK_Mae_Koho: 0xff3e, /* Previous Candidate */\n\n    /* Cursor control & motion */\n\n    XK_Home: 0xff50,\n    XK_Left: 0xff51, /* Move left, left arrow */\n    XK_Up: 0xff52, /* Move up, up arrow */\n    XK_Right: 0xff53, /* Move right, right arrow */\n    XK_Down: 0xff54, /* Move down, down arrow */\n    XK_Prior: 0xff55, /* Prior, previous */\n    XK_Page_Up: 0xff55,\n    XK_Next: 0xff56, /* Next */\n    XK_Page_Down: 0xff56,\n    XK_End: 0xff57, /* EOL */\n    XK_Begin: 0xff58, /* BOL */\n\n    /* Misc functions */\n\n    XK_Select: 0xff60, /* Select, mark */\n    XK_Print: 0xff61,\n    XK_Execute: 0xff62, /* Execute, run, do */\n    XK_Insert: 0xff63, /* Insert, insert here */\n    XK_Undo: 0xff65,\n    XK_Redo: 0xff66, /* Redo, again */\n    XK_Menu: 0xff67,\n    XK_Find: 0xff68, /* Find, search */\n    XK_Cancel: 0xff69, /* Cancel, stop, abort, exit */\n    XK_Help: 0xff6a, /* Help */\n    XK_Break: 0xff6b,\n    XK_Mode_switch: 0xff7e, /* Character set switch */\n    XK_script_switch: 0xff7e, /* Alias for mode_switch */\n    XK_Num_Lock: 0xff7f,\n\n    /* Keypad functions, keypad numbers cleverly chosen to map to ASCII */\n\n    XK_KP_Space: 0xff80, /* Space */\n    XK_KP_Tab: 0xff89,\n    XK_KP_Enter: 0xff8d, /* Enter */\n    XK_KP_F1: 0xff91, /* PF1, KP_A, ... */\n    XK_KP_F2: 0xff92,\n    XK_KP_F3: 0xff93,\n    XK_KP_F4: 0xff94,\n    XK_KP_Home: 0xff95,\n    XK_KP_Left: 0xff96,\n    XK_KP_Up: 0xff97,\n    XK_KP_Right: 0xff98,\n    XK_KP_Down: 0xff99,\n    XK_KP_Prior: 0xff9a,\n    XK_KP_Page_Up: 0xff9a,\n    XK_KP_Next: 0xff9b,\n    XK_KP_Page_Down: 0xff9b,\n    XK_KP_End: 0xff9c,\n    XK_KP_Begin: 0xff9d,\n    XK_KP_Insert: 0xff9e,\n    XK_KP_Delete: 0xff9f,\n    XK_KP_Equal: 0xffbd, /* Equals */\n    XK_KP_Multiply: 0xffaa,\n    XK_KP_Add: 0xffab,\n    XK_KP_Separator: 0xffac, /* Separator, often comma */\n    XK_KP_Subtract: 0xffad,\n    XK_KP_Decimal: 0xffae,\n    XK_KP_Divide: 0xffaf,\n\n    XK_KP_0: 0xffb0,\n    XK_KP_1: 0xffb1,\n    XK_KP_2: 0xffb2,\n    XK_KP_3: 0xffb3,\n    XK_KP_4: 0xffb4,\n    XK_KP_5: 0xffb5,\n    XK_KP_6: 0xffb6,\n    XK_KP_7: 0xffb7,\n    XK_KP_8: 0xffb8,\n    XK_KP_9: 0xffb9,\n\n    /*\n     * Auxiliary functions; note the duplicate definitions for left and right\n     * function keys;  Sun keyboards and a few other manufacturers have such\n     * function key groups on the left and/or right sides of the keyboard.\n     * We've not found a keyboard with more than 35 function keys total.\n     */\n\n    XK_F1: 0xffbe,\n    XK_F2: 0xffbf,\n    XK_F3: 0xffc0,\n    XK_F4: 0xffc1,\n    XK_F5: 0xffc2,\n    XK_F6: 0xffc3,\n    XK_F7: 0xffc4,\n    XK_F8: 0xffc5,\n    XK_F9: 0xffc6,\n    XK_F10: 0xffc7,\n    XK_F11: 0xffc8,\n    XK_L1: 0xffc8,\n    XK_F12: 0xffc9,\n    XK_L2: 0xffc9,\n    XK_F13: 0xffca,\n    XK_L3: 0xffca,\n    XK_F14: 0xffcb,\n    XK_L4: 0xffcb,\n    XK_F15: 0xffcc,\n    XK_L5: 0xffcc,\n    XK_F16: 0xffcd,\n    XK_L6: 0xffcd,\n    XK_F17: 0xffce,\n    XK_L7: 0xffce,\n    XK_F18: 0xffcf,\n    XK_L8: 0xffcf,\n    XK_F19: 0xffd0,\n    XK_L9: 0xffd0,\n    XK_F20: 0xffd1,\n    XK_L10: 0xffd1,\n    XK_F21: 0xffd2,\n    XK_R1: 0xffd2,\n    XK_F22: 0xffd3,\n    XK_R2: 0xffd3,\n    XK_F23: 0xffd4,\n    XK_R3: 0xffd4,\n    XK_F24: 0xffd5,\n    XK_R4: 0xffd5,\n    XK_F25: 0xffd6,\n    XK_R5: 0xffd6,\n    XK_F26: 0xffd7,\n    XK_R6: 0xffd7,\n    XK_F27: 0xffd8,\n    XK_R7: 0xffd8,\n    XK_F28: 0xffd9,\n    XK_R8: 0xffd9,\n    XK_F29: 0xffda,\n    XK_R9: 0xffda,\n    XK_F30: 0xffdb,\n    XK_R10: 0xffdb,\n    XK_F31: 0xffdc,\n    XK_R11: 0xffdc,\n    XK_F32: 0xffdd,\n    XK_R12: 0xffdd,\n    XK_F33: 0xffde,\n    XK_R13: 0xffde,\n    XK_F34: 0xffdf,\n    XK_R14: 0xffdf,\n    XK_F35: 0xffe0,\n    XK_R15: 0xffe0,\n\n    /* Modifiers */\n\n    XK_Shift_L: 0xffe1, /* Left shift */\n    XK_Shift_R: 0xffe2, /* Right shift */\n    XK_Control_L: 0xffe3, /* Left control */\n    XK_Control_R: 0xffe4, /* Right control */\n    XK_Caps_Lock: 0xffe5, /* Caps lock */\n    XK_Shift_Lock: 0xffe6, /* Shift lock */\n\n    XK_Meta_L: 0xffe7, /* Left meta */\n    XK_Meta_R: 0xffe8, /* Right meta */\n    XK_Alt_L: 0xffe9, /* Left alt */\n    XK_Alt_R: 0xffea, /* Right alt */\n    XK_Super_L: 0xffeb, /* Left super */\n    XK_Super_R: 0xffec, /* Right super */\n    XK_Hyper_L: 0xffed, /* Left hyper */\n    XK_Hyper_R: 0xffee, /* Right hyper */\n\n    /*\n     * Keyboard (XKB) Extension function and modifier keys\n     * (from Appendix C of \"The X Keyboard Extension: Protocol Specification\")\n     * Byte 3 = 0xfe\n     */\n\n    XK_ISO_Level3_Shift: 0xfe03, /* AltGr */\n    XK_ISO_Next_Group: 0xfe08,\n    XK_ISO_Prev_Group: 0xfe0a,\n    XK_ISO_First_Group: 0xfe0c,\n    XK_ISO_Last_Group: 0xfe0e,\n\n    /*\n     * Latin 1\n     * (ISO/IEC 8859-1: Unicode U+0020..U+00FF)\n     * Byte 3: 0\n     */\n\n    XK_space: 0x0020, /* U+0020 SPACE */\n    XK_exclam: 0x0021, /* U+0021 EXCLAMATION MARK */\n    XK_quotedbl: 0x0022, /* U+0022 QUOTATION MARK */\n    XK_numbersign: 0x0023, /* U+0023 NUMBER SIGN */\n    XK_dollar: 0x0024, /* U+0024 DOLLAR SIGN */\n    XK_percent: 0x0025, /* U+0025 PERCENT SIGN */\n    XK_ampersand: 0x0026, /* U+0026 AMPERSAND */\n    XK_apostrophe: 0x0027, /* U+0027 APOSTROPHE */\n    XK_quoteright: 0x0027, /* deprecated */\n    XK_parenleft: 0x0028, /* U+0028 LEFT PARENTHESIS */\n    XK_parenright: 0x0029, /* U+0029 RIGHT PARENTHESIS */\n    XK_asterisk: 0x002a, /* U+002A ASTERISK */\n    XK_plus: 0x002b, /* U+002B PLUS SIGN */\n    XK_comma: 0x002c, /* U+002C COMMA */\n    XK_minus: 0x002d, /* U+002D HYPHEN-MINUS */\n    XK_period: 0x002e, /* U+002E FULL STOP */\n    XK_slash: 0x002f, /* U+002F SOLIDUS */\n    XK_0: 0x0030, /* U+0030 DIGIT ZERO */\n    XK_1: 0x0031, /* U+0031 DIGIT ONE */\n    XK_2: 0x0032, /* U+0032 DIGIT TWO */\n    XK_3: 0x0033, /* U+0033 DIGIT THREE */\n    XK_4: 0x0034, /* U+0034 DIGIT FOUR */\n    XK_5: 0x0035, /* U+0035 DIGIT FIVE */\n    XK_6: 0x0036, /* U+0036 DIGIT SIX */\n    XK_7: 0x0037, /* U+0037 DIGIT SEVEN */\n    XK_8: 0x0038, /* U+0038 DIGIT EIGHT */\n    XK_9: 0x0039, /* U+0039 DIGIT NINE */\n    XK_colon: 0x003a, /* U+003A COLON */\n    XK_semicolon: 0x003b, /* U+003B SEMICOLON */\n    XK_less: 0x003c, /* U+003C LESS-THAN SIGN */\n    XK_equal: 0x003d, /* U+003D EQUALS SIGN */\n    XK_greater: 0x003e, /* U+003E GREATER-THAN SIGN */\n    XK_question: 0x003f, /* U+003F QUESTION MARK */\n    XK_at: 0x0040, /* U+0040 COMMERCIAL AT */\n    XK_A: 0x0041, /* U+0041 LATIN CAPITAL LETTER A */\n    XK_B: 0x0042, /* U+0042 LATIN CAPITAL LETTER B */\n    XK_C: 0x0043, /* U+0043 LATIN CAPITAL LETTER C */\n    XK_D: 0x0044, /* U+0044 LATIN CAPITAL LETTER D */\n    XK_E: 0x0045, /* U+0045 LATIN CAPITAL LETTER E */\n    XK_F: 0x0046, /* U+0046 LATIN CAPITAL LETTER F */\n    XK_G: 0x0047, /* U+0047 LATIN CAPITAL LETTER G */\n    XK_H: 0x0048, /* U+0048 LATIN CAPITAL LETTER H */\n    XK_I: 0x0049, /* U+0049 LATIN CAPITAL LETTER I */\n    XK_J: 0x004a, /* U+004A LATIN CAPITAL LETTER J */\n    XK_K: 0x004b, /* U+004B LATIN CAPITAL LETTER K */\n    XK_L: 0x004c, /* U+004C LATIN CAPITAL LETTER L */\n    XK_M: 0x004d, /* U+004D LATIN CAPITAL LETTER M */\n    XK_N: 0x004e, /* U+004E LATIN CAPITAL LETTER N */\n    XK_O: 0x004f, /* U+004F LATIN CAPITAL LETTER O */\n    XK_P: 0x0050, /* U+0050 LATIN CAPITAL LETTER P */\n    XK_Q: 0x0051, /* U+0051 LATIN CAPITAL LETTER Q */\n    XK_R: 0x0052, /* U+0052 LATIN CAPITAL LETTER R */\n    XK_S: 0x0053, /* U+0053 LATIN CAPITAL LETTER S */\n    XK_T: 0x0054, /* U+0054 LATIN CAPITAL LETTER T */\n    XK_U: 0x0055, /* U+0055 LATIN CAPITAL LETTER U */\n    XK_V: 0x0056, /* U+0056 LATIN CAPITAL LETTER V */\n    XK_W: 0x0057, /* U+0057 LATIN CAPITAL LETTER W */\n    XK_X: 0x0058, /* U+0058 LATIN CAPITAL LETTER X */\n    XK_Y: 0x0059, /* U+0059 LATIN CAPITAL LETTER Y */\n    XK_Z: 0x005a, /* U+005A LATIN CAPITAL LETTER Z */\n    XK_bracketleft: 0x005b, /* U+005B LEFT SQUARE BRACKET */\n    XK_backslash: 0x005c, /* U+005C REVERSE SOLIDUS */\n    XK_bracketright: 0x005d, /* U+005D RIGHT SQUARE BRACKET */\n    XK_asciicircum: 0x005e, /* U+005E CIRCUMFLEX ACCENT */\n    XK_underscore: 0x005f, /* U+005F LOW LINE */\n    XK_grave: 0x0060, /* U+0060 GRAVE ACCENT */\n    XK_quoteleft: 0x0060, /* deprecated */\n    XK_a: 0x0061, /* U+0061 LATIN SMALL LETTER A */\n    XK_b: 0x0062, /* U+0062 LATIN SMALL LETTER B */\n    XK_c: 0x0063, /* U+0063 LATIN SMALL LETTER C */\n    XK_d: 0x0064, /* U+0064 LATIN SMALL LETTER D */\n    XK_e: 0x0065, /* U+0065 LATIN SMALL LETTER E */\n    XK_f: 0x0066, /* U+0066 LATIN SMALL LETTER F */\n    XK_g: 0x0067, /* U+0067 LATIN SMALL LETTER G */\n    XK_h: 0x0068, /* U+0068 LATIN SMALL LETTER H */\n    XK_i: 0x0069, /* U+0069 LATIN SMALL LETTER I */\n    XK_j: 0x006a, /* U+006A LATIN SMALL LETTER J */\n    XK_k: 0x006b, /* U+006B LATIN SMALL LETTER K */\n    XK_l: 0x006c, /* U+006C LATIN SMALL LETTER L */\n    XK_m: 0x006d, /* U+006D LATIN SMALL LETTER M */\n    XK_n: 0x006e, /* U+006E LATIN SMALL LETTER N */\n    XK_o: 0x006f, /* U+006F LATIN SMALL LETTER O */\n    XK_p: 0x0070, /* U+0070 LATIN SMALL LETTER P */\n    XK_q: 0x0071, /* U+0071 LATIN SMALL LETTER Q */\n    XK_r: 0x0072, /* U+0072 LATIN SMALL LETTER R */\n    XK_s: 0x0073, /* U+0073 LATIN SMALL LETTER S */\n    XK_t: 0x0074, /* U+0074 LATIN SMALL LETTER T */\n    XK_u: 0x0075, /* U+0075 LATIN SMALL LETTER U */\n    XK_v: 0x0076, /* U+0076 LATIN SMALL LETTER V */\n    XK_w: 0x0077, /* U+0077 LATIN SMALL LETTER W */\n    XK_x: 0x0078, /* U+0078 LATIN SMALL LETTER X */\n    XK_y: 0x0079, /* U+0079 LATIN SMALL LETTER Y */\n    XK_z: 0x007a, /* U+007A LATIN SMALL LETTER Z */\n    XK_braceleft: 0x007b, /* U+007B LEFT CURLY BRACKET */\n    XK_bar: 0x007c, /* U+007C VERTICAL LINE */\n    XK_braceright: 0x007d, /* U+007D RIGHT CURLY BRACKET */\n    XK_asciitilde: 0x007e, /* U+007E TILDE */\n\n    XK_nobreakspace: 0x00a0, /* U+00A0 NO-BREAK SPACE */\n    XK_exclamdown: 0x00a1, /* U+00A1 INVERTED EXCLAMATION MARK */\n    XK_cent: 0x00a2, /* U+00A2 CENT SIGN */\n    XK_sterling: 0x00a3, /* U+00A3 POUND SIGN */\n    XK_currency: 0x00a4, /* U+00A4 CURRENCY SIGN */\n    XK_yen: 0x00a5, /* U+00A5 YEN SIGN */\n    XK_brokenbar: 0x00a6, /* U+00A6 BROKEN BAR */\n    XK_section: 0x00a7, /* U+00A7 SECTION SIGN */\n    XK_diaeresis: 0x00a8, /* U+00A8 DIAERESIS */\n    XK_copyright: 0x00a9, /* U+00A9 COPYRIGHT SIGN */\n    XK_ordfeminine: 0x00aa, /* U+00AA FEMININE ORDINAL INDICATOR */\n    XK_guillemotleft: 0x00ab, /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */\n    XK_notsign: 0x00ac, /* U+00AC NOT SIGN */\n    XK_hyphen: 0x00ad, /* U+00AD SOFT HYPHEN */\n    XK_registered: 0x00ae, /* U+00AE REGISTERED SIGN */\n    XK_macron: 0x00af, /* U+00AF MACRON */\n    XK_degree: 0x00b0, /* U+00B0 DEGREE SIGN */\n    XK_plusminus: 0x00b1, /* U+00B1 PLUS-MINUS SIGN */\n    XK_twosuperior: 0x00b2, /* U+00B2 SUPERSCRIPT TWO */\n    XK_threesuperior: 0x00b3, /* U+00B3 SUPERSCRIPT THREE */\n    XK_acute: 0x00b4, /* U+00B4 ACUTE ACCENT */\n    XK_mu: 0x00b5, /* U+00B5 MICRO SIGN */\n    XK_paragraph: 0x00b6, /* U+00B6 PILCROW SIGN */\n    XK_periodcentered: 0x00b7, /* U+00B7 MIDDLE DOT */\n    XK_cedilla: 0x00b8, /* U+00B8 CEDILLA */\n    XK_onesuperior: 0x00b9, /* U+00B9 SUPERSCRIPT ONE */\n    XK_masculine: 0x00ba, /* U+00BA MASCULINE ORDINAL INDICATOR */\n    XK_guillemotright: 0x00bb, /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */\n    XK_onequarter: 0x00bc, /* U+00BC VULGAR FRACTION ONE QUARTER */\n    XK_onehalf: 0x00bd, /* U+00BD VULGAR FRACTION ONE HALF */\n    XK_threequarters: 0x00be, /* U+00BE VULGAR FRACTION THREE QUARTERS */\n    XK_questiondown: 0x00bf, /* U+00BF INVERTED QUESTION MARK */\n    XK_Agrave: 0x00c0, /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */\n    XK_Aacute: 0x00c1, /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */\n    XK_Acircumflex: 0x00c2, /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */\n    XK_Atilde: 0x00c3, /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */\n    XK_Adiaeresis: 0x00c4, /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */\n    XK_Aring: 0x00c5, /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */\n    XK_AE: 0x00c6, /* U+00C6 LATIN CAPITAL LETTER AE */\n    XK_Ccedilla: 0x00c7, /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */\n    XK_Egrave: 0x00c8, /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */\n    XK_Eacute: 0x00c9, /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */\n    XK_Ecircumflex: 0x00ca, /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */\n    XK_Ediaeresis: 0x00cb, /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */\n    XK_Igrave: 0x00cc, /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */\n    XK_Iacute: 0x00cd, /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */\n    XK_Icircumflex: 0x00ce, /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */\n    XK_Idiaeresis: 0x00cf, /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */\n    XK_ETH: 0x00d0, /* U+00D0 LATIN CAPITAL LETTER ETH */\n    XK_Eth: 0x00d0, /* deprecated */\n    XK_Ntilde: 0x00d1, /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */\n    XK_Ograve: 0x00d2, /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */\n    XK_Oacute: 0x00d3, /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */\n    XK_Ocircumflex: 0x00d4, /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */\n    XK_Otilde: 0x00d5, /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */\n    XK_Odiaeresis: 0x00d6, /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */\n    XK_multiply: 0x00d7, /* U+00D7 MULTIPLICATION SIGN */\n    XK_Oslash: 0x00d8, /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */\n    XK_Ooblique: 0x00d8, /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */\n    XK_Ugrave: 0x00d9, /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */\n    XK_Uacute: 0x00da, /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */\n    XK_Ucircumflex: 0x00db, /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */\n    XK_Udiaeresis: 0x00dc, /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */\n    XK_Yacute: 0x00dd, /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */\n    XK_THORN: 0x00de, /* U+00DE LATIN CAPITAL LETTER THORN */\n    XK_Thorn: 0x00de, /* deprecated */\n    XK_ssharp: 0x00df, /* U+00DF LATIN SMALL LETTER SHARP S */\n    XK_agrave: 0x00e0, /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */\n    XK_aacute: 0x00e1, /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */\n    XK_acircumflex: 0x00e2, /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */\n    XK_atilde: 0x00e3, /* U+00E3 LATIN SMALL LETTER A WITH TILDE */\n    XK_adiaeresis: 0x00e4, /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */\n    XK_aring: 0x00e5, /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */\n    XK_ae: 0x00e6, /* U+00E6 LATIN SMALL LETTER AE */\n    XK_ccedilla: 0x00e7, /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */\n    XK_egrave: 0x00e8, /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */\n    XK_eacute: 0x00e9, /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */\n    XK_ecircumflex: 0x00ea, /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */\n    XK_ediaeresis: 0x00eb, /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */\n    XK_igrave: 0x00ec, /* U+00EC LATIN SMALL LETTER I WITH GRAVE */\n    XK_iacute: 0x00ed, /* U+00ED LATIN SMALL LETTER I WITH ACUTE */\n    XK_icircumflex: 0x00ee, /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */\n    XK_idiaeresis: 0x00ef, /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */\n    XK_eth: 0x00f0, /* U+00F0 LATIN SMALL LETTER ETH */\n    XK_ntilde: 0x00f1, /* U+00F1 LATIN SMALL LETTER N WITH TILDE */\n    XK_ograve: 0x00f2, /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */\n    XK_oacute: 0x00f3, /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */\n    XK_ocircumflex: 0x00f4, /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */\n    XK_otilde: 0x00f5, /* U+00F5 LATIN SMALL LETTER O WITH TILDE */\n    XK_odiaeresis: 0x00f6, /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */\n    XK_division: 0x00f7, /* U+00F7 DIVISION SIGN */\n    XK_oslash: 0x00f8, /* U+00F8 LATIN SMALL LETTER O WITH STROKE */\n    XK_ooblique: 0x00f8, /* U+00F8 LATIN SMALL LETTER O WITH STROKE */\n    XK_ugrave: 0x00f9, /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */\n    XK_uacute: 0x00fa, /* U+00FA LATIN SMALL LETTER U WITH ACUTE */\n    XK_ucircumflex: 0x00fb, /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */\n    XK_udiaeresis: 0x00fc, /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */\n    XK_yacute: 0x00fd, /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */\n    XK_thorn: 0x00fe, /* U+00FE LATIN SMALL LETTER THORN */\n    XK_ydiaeresis: 0x00ff, /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */\n\n    /*\n     * Korean\n     * Byte 3 = 0x0e\n     */\n\n    XK_Hangul: 0xff31, /* Hangul start/stop(toggle) */\n    XK_Hangul_Hanja: 0xff34, /* Start Hangul->Hanja Conversion */\n    XK_Hangul_Jeonja: 0xff38, /* Jeonja mode */\n\n    /*\n     * XFree86 vendor specific keysyms.\n     *\n     * The XFree86 keysym range is 0x10080001 - 0x1008FFFF.\n     */\n\n    XF86XK_ModeLock: 0x1008FF01,\n    XF86XK_MonBrightnessUp: 0x1008FF02,\n    XF86XK_MonBrightnessDown: 0x1008FF03,\n    XF86XK_KbdLightOnOff: 0x1008FF04,\n    XF86XK_KbdBrightnessUp: 0x1008FF05,\n    XF86XK_KbdBrightnessDown: 0x1008FF06,\n    XF86XK_Standby: 0x1008FF10,\n    XF86XK_AudioLowerVolume: 0x1008FF11,\n    XF86XK_AudioMute: 0x1008FF12,\n    XF86XK_AudioRaiseVolume: 0x1008FF13,\n    XF86XK_AudioPlay: 0x1008FF14,\n    XF86XK_AudioStop: 0x1008FF15,\n    XF86XK_AudioPrev: 0x1008FF16,\n    XF86XK_AudioNext: 0x1008FF17,\n    XF86XK_HomePage: 0x1008FF18,\n    XF86XK_Mail: 0x1008FF19,\n    XF86XK_Start: 0x1008FF1A,\n    XF86XK_Search: 0x1008FF1B,\n    XF86XK_AudioRecord: 0x1008FF1C,\n    XF86XK_Calculator: 0x1008FF1D,\n    XF86XK_Memo: 0x1008FF1E,\n    XF86XK_ToDoList: 0x1008FF1F,\n    XF86XK_Calendar: 0x1008FF20,\n    XF86XK_PowerDown: 0x1008FF21,\n    XF86XK_ContrastAdjust: 0x1008FF22,\n    XF86XK_RockerUp: 0x1008FF23,\n    XF86XK_RockerDown: 0x1008FF24,\n    XF86XK_RockerEnter: 0x1008FF25,\n    XF86XK_Back: 0x1008FF26,\n    XF86XK_Forward: 0x1008FF27,\n    XF86XK_Stop: 0x1008FF28,\n    XF86XK_Refresh: 0x1008FF29,\n    XF86XK_PowerOff: 0x1008FF2A,\n    XF86XK_WakeUp: 0x1008FF2B,\n    XF86XK_Eject: 0x1008FF2C,\n    XF86XK_ScreenSaver: 0x1008FF2D,\n    XF86XK_WWW: 0x1008FF2E,\n    XF86XK_Sleep: 0x1008FF2F,\n    XF86XK_Favorites: 0x1008FF30,\n    XF86XK_AudioPause: 0x1008FF31,\n    XF86XK_AudioMedia: 0x1008FF32,\n    XF86XK_MyComputer: 0x1008FF33,\n    XF86XK_VendorHome: 0x1008FF34,\n    XF86XK_LightBulb: 0x1008FF35,\n    XF86XK_Shop: 0x1008FF36,\n    XF86XK_History: 0x1008FF37,\n    XF86XK_OpenURL: 0x1008FF38,\n    XF86XK_AddFavorite: 0x1008FF39,\n    XF86XK_HotLinks: 0x1008FF3A,\n    XF86XK_BrightnessAdjust: 0x1008FF3B,\n    XF86XK_Finance: 0x1008FF3C,\n    XF86XK_Community: 0x1008FF3D,\n    XF86XK_AudioRewind: 0x1008FF3E,\n    XF86XK_BackForward: 0x1008FF3F,\n    XF86XK_Launch0: 0x1008FF40,\n    XF86XK_Launch1: 0x1008FF41,\n    XF86XK_Launch2: 0x1008FF42,\n    XF86XK_Launch3: 0x1008FF43,\n    XF86XK_Launch4: 0x1008FF44,\n    XF86XK_Launch5: 0x1008FF45,\n    XF86XK_Launch6: 0x1008FF46,\n    XF86XK_Launch7: 0x1008FF47,\n    XF86XK_Launch8: 0x1008FF48,\n    XF86XK_Launch9: 0x1008FF49,\n    XF86XK_LaunchA: 0x1008FF4A,\n    XF86XK_LaunchB: 0x1008FF4B,\n    XF86XK_LaunchC: 0x1008FF4C,\n    XF86XK_LaunchD: 0x1008FF4D,\n    XF86XK_LaunchE: 0x1008FF4E,\n    XF86XK_LaunchF: 0x1008FF4F,\n    XF86XK_ApplicationLeft: 0x1008FF50,\n    XF86XK_ApplicationRight: 0x1008FF51,\n    XF86XK_Book: 0x1008FF52,\n    XF86XK_CD: 0x1008FF53,\n    XF86XK_Calculater: 0x1008FF54,\n    XF86XK_Clear: 0x1008FF55,\n    XF86XK_Close: 0x1008FF56,\n    XF86XK_Copy: 0x1008FF57,\n    XF86XK_Cut: 0x1008FF58,\n    XF86XK_Display: 0x1008FF59,\n    XF86XK_DOS: 0x1008FF5A,\n    XF86XK_Documents: 0x1008FF5B,\n    XF86XK_Excel: 0x1008FF5C,\n    XF86XK_Explorer: 0x1008FF5D,\n    XF86XK_Game: 0x1008FF5E,\n    XF86XK_Go: 0x1008FF5F,\n    XF86XK_iTouch: 0x1008FF60,\n    XF86XK_LogOff: 0x1008FF61,\n    XF86XK_Market: 0x1008FF62,\n    XF86XK_Meeting: 0x1008FF63,\n    XF86XK_MenuKB: 0x1008FF65,\n    XF86XK_MenuPB: 0x1008FF66,\n    XF86XK_MySites: 0x1008FF67,\n    XF86XK_New: 0x1008FF68,\n    XF86XK_News: 0x1008FF69,\n    XF86XK_OfficeHome: 0x1008FF6A,\n    XF86XK_Open: 0x1008FF6B,\n    XF86XK_Option: 0x1008FF6C,\n    XF86XK_Paste: 0x1008FF6D,\n    XF86XK_Phone: 0x1008FF6E,\n    XF86XK_Q: 0x1008FF70,\n    XF86XK_Reply: 0x1008FF72,\n    XF86XK_Reload: 0x1008FF73,\n    XF86XK_RotateWindows: 0x1008FF74,\n    XF86XK_RotationPB: 0x1008FF75,\n    XF86XK_RotationKB: 0x1008FF76,\n    XF86XK_Save: 0x1008FF77,\n    XF86XK_ScrollUp: 0x1008FF78,\n    XF86XK_ScrollDown: 0x1008FF79,\n    XF86XK_ScrollClick: 0x1008FF7A,\n    XF86XK_Send: 0x1008FF7B,\n    XF86XK_Spell: 0x1008FF7C,\n    XF86XK_SplitScreen: 0x1008FF7D,\n    XF86XK_Support: 0x1008FF7E,\n    XF86XK_TaskPane: 0x1008FF7F,\n    XF86XK_Terminal: 0x1008FF80,\n    XF86XK_Tools: 0x1008FF81,\n    XF86XK_Travel: 0x1008FF82,\n    XF86XK_UserPB: 0x1008FF84,\n    XF86XK_User1KB: 0x1008FF85,\n    XF86XK_User2KB: 0x1008FF86,\n    XF86XK_Video: 0x1008FF87,\n    XF86XK_WheelButton: 0x1008FF88,\n    XF86XK_Word: 0x1008FF89,\n    XF86XK_Xfer: 0x1008FF8A,\n    XF86XK_ZoomIn: 0x1008FF8B,\n    XF86XK_ZoomOut: 0x1008FF8C,\n    XF86XK_Away: 0x1008FF8D,\n    XF86XK_Messenger: 0x1008FF8E,\n    XF86XK_WebCam: 0x1008FF8F,\n    XF86XK_MailForward: 0x1008FF90,\n    XF86XK_Pictures: 0x1008FF91,\n    XF86XK_Music: 0x1008FF92,\n    XF86XK_Battery: 0x1008FF93,\n    XF86XK_Bluetooth: 0x1008FF94,\n    XF86XK_WLAN: 0x1008FF95,\n    XF86XK_UWB: 0x1008FF96,\n    XF86XK_AudioForward: 0x1008FF97,\n    XF86XK_AudioRepeat: 0x1008FF98,\n    XF86XK_AudioRandomPlay: 0x1008FF99,\n    XF86XK_Subtitle: 0x1008FF9A,\n    XF86XK_AudioCycleTrack: 0x1008FF9B,\n    XF86XK_CycleAngle: 0x1008FF9C,\n    XF86XK_FrameBack: 0x1008FF9D,\n    XF86XK_FrameForward: 0x1008FF9E,\n    XF86XK_Time: 0x1008FF9F,\n    XF86XK_Select: 0x1008FFA0,\n    XF86XK_View: 0x1008FFA1,\n    XF86XK_TopMenu: 0x1008FFA2,\n    XF86XK_Red: 0x1008FFA3,\n    XF86XK_Green: 0x1008FFA4,\n    XF86XK_Yellow: 0x1008FFA5,\n    XF86XK_Blue: 0x1008FFA6,\n    XF86XK_Suspend: 0x1008FFA7,\n    XF86XK_Hibernate: 0x1008FFA8,\n    XF86XK_TouchpadToggle: 0x1008FFA9,\n    XF86XK_TouchpadOn: 0x1008FFB0,\n    XF86XK_TouchpadOff: 0x1008FFB1,\n    XF86XK_AudioMicMute: 0x1008FFB2,\n    XF86XK_Switch_VT_1: 0x1008FE01,\n    XF86XK_Switch_VT_2: 0x1008FE02,\n    XF86XK_Switch_VT_3: 0x1008FE03,\n    XF86XK_Switch_VT_4: 0x1008FE04,\n    XF86XK_Switch_VT_5: 0x1008FE05,\n    XF86XK_Switch_VT_6: 0x1008FE06,\n    XF86XK_Switch_VT_7: 0x1008FE07,\n    XF86XK_Switch_VT_8: 0x1008FE08,\n    XF86XK_Switch_VT_9: 0x1008FE09,\n    XF86XK_Switch_VT_10: 0x1008FE0A,\n    XF86XK_Switch_VT_11: 0x1008FE0B,\n    XF86XK_Switch_VT_12: 0x1008FE0C,\n    XF86XK_Ungrab: 0x1008FE20,\n    XF86XK_ClearGrab: 0x1008FE21,\n    XF86XK_Next_VMode: 0x1008FE22,\n    XF86XK_Prev_VMode: 0x1008FE23,\n    XF86XK_LogWindowTree: 0x1008FE24,\n    XF86XK_LogGrabInfo: 0x1008FE25\n};\n\n/*\n * Mapping from Unicode codepoints to X11/RFB keysyms\n *\n * This file was automatically generated from keysymdef.h\n * DO NOT EDIT!\n */\n\n/* Functions at the bottom */\n\nvar codepoints = {\n    0x0100: 0x03c0, // XK_Amacron\n    0x0101: 0x03e0, // XK_amacron\n    0x0102: 0x01c3, // XK_Abreve\n    0x0103: 0x01e3, // XK_abreve\n    0x0104: 0x01a1, // XK_Aogonek\n    0x0105: 0x01b1, // XK_aogonek\n    0x0106: 0x01c6, // XK_Cacute\n    0x0107: 0x01e6, // XK_cacute\n    0x0108: 0x02c6, // XK_Ccircumflex\n    0x0109: 0x02e6, // XK_ccircumflex\n    0x010a: 0x02c5, // XK_Cabovedot\n    0x010b: 0x02e5, // XK_cabovedot\n    0x010c: 0x01c8, // XK_Ccaron\n    0x010d: 0x01e8, // XK_ccaron\n    0x010e: 0x01cf, // XK_Dcaron\n    0x010f: 0x01ef, // XK_dcaron\n    0x0110: 0x01d0, // XK_Dstroke\n    0x0111: 0x01f0, // XK_dstroke\n    0x0112: 0x03aa, // XK_Emacron\n    0x0113: 0x03ba, // XK_emacron\n    0x0116: 0x03cc, // XK_Eabovedot\n    0x0117: 0x03ec, // XK_eabovedot\n    0x0118: 0x01ca, // XK_Eogonek\n    0x0119: 0x01ea, // XK_eogonek\n    0x011a: 0x01cc, // XK_Ecaron\n    0x011b: 0x01ec, // XK_ecaron\n    0x011c: 0x02d8, // XK_Gcircumflex\n    0x011d: 0x02f8, // XK_gcircumflex\n    0x011e: 0x02ab, // XK_Gbreve\n    0x011f: 0x02bb, // XK_gbreve\n    0x0120: 0x02d5, // XK_Gabovedot\n    0x0121: 0x02f5, // XK_gabovedot\n    0x0122: 0x03ab, // XK_Gcedilla\n    0x0123: 0x03bb, // XK_gcedilla\n    0x0124: 0x02a6, // XK_Hcircumflex\n    0x0125: 0x02b6, // XK_hcircumflex\n    0x0126: 0x02a1, // XK_Hstroke\n    0x0127: 0x02b1, // XK_hstroke\n    0x0128: 0x03a5, // XK_Itilde\n    0x0129: 0x03b5, // XK_itilde\n    0x012a: 0x03cf, // XK_Imacron\n    0x012b: 0x03ef, // XK_imacron\n    0x012e: 0x03c7, // XK_Iogonek\n    0x012f: 0x03e7, // XK_iogonek\n    0x0130: 0x02a9, // XK_Iabovedot\n    0x0131: 0x02b9, // XK_idotless\n    0x0134: 0x02ac, // XK_Jcircumflex\n    0x0135: 0x02bc, // XK_jcircumflex\n    0x0136: 0x03d3, // XK_Kcedilla\n    0x0137: 0x03f3, // XK_kcedilla\n    0x0138: 0x03a2, // XK_kra\n    0x0139: 0x01c5, // XK_Lacute\n    0x013a: 0x01e5, // XK_lacute\n    0x013b: 0x03a6, // XK_Lcedilla\n    0x013c: 0x03b6, // XK_lcedilla\n    0x013d: 0x01a5, // XK_Lcaron\n    0x013e: 0x01b5, // XK_lcaron\n    0x0141: 0x01a3, // XK_Lstroke\n    0x0142: 0x01b3, // XK_lstroke\n    0x0143: 0x01d1, // XK_Nacute\n    0x0144: 0x01f1, // XK_nacute\n    0x0145: 0x03d1, // XK_Ncedilla\n    0x0146: 0x03f1, // XK_ncedilla\n    0x0147: 0x01d2, // XK_Ncaron\n    0x0148: 0x01f2, // XK_ncaron\n    0x014a: 0x03bd, // XK_ENG\n    0x014b: 0x03bf, // XK_eng\n    0x014c: 0x03d2, // XK_Omacron\n    0x014d: 0x03f2, // XK_omacron\n    0x0150: 0x01d5, // XK_Odoubleacute\n    0x0151: 0x01f5, // XK_odoubleacute\n    0x0152: 0x13bc, // XK_OE\n    0x0153: 0x13bd, // XK_oe\n    0x0154: 0x01c0, // XK_Racute\n    0x0155: 0x01e0, // XK_racute\n    0x0156: 0x03a3, // XK_Rcedilla\n    0x0157: 0x03b3, // XK_rcedilla\n    0x0158: 0x01d8, // XK_Rcaron\n    0x0159: 0x01f8, // XK_rcaron\n    0x015a: 0x01a6, // XK_Sacute\n    0x015b: 0x01b6, // XK_sacute\n    0x015c: 0x02de, // XK_Scircumflex\n    0x015d: 0x02fe, // XK_scircumflex\n    0x015e: 0x01aa, // XK_Scedilla\n    0x015f: 0x01ba, // XK_scedilla\n    0x0160: 0x01a9, // XK_Scaron\n    0x0161: 0x01b9, // XK_scaron\n    0x0162: 0x01de, // XK_Tcedilla\n    0x0163: 0x01fe, // XK_tcedilla\n    0x0164: 0x01ab, // XK_Tcaron\n    0x0165: 0x01bb, // XK_tcaron\n    0x0166: 0x03ac, // XK_Tslash\n    0x0167: 0x03bc, // XK_tslash\n    0x0168: 0x03dd, // XK_Utilde\n    0x0169: 0x03fd, // XK_utilde\n    0x016a: 0x03de, // XK_Umacron\n    0x016b: 0x03fe, // XK_umacron\n    0x016c: 0x02dd, // XK_Ubreve\n    0x016d: 0x02fd, // XK_ubreve\n    0x016e: 0x01d9, // XK_Uring\n    0x016f: 0x01f9, // XK_uring\n    0x0170: 0x01db, // XK_Udoubleacute\n    0x0171: 0x01fb, // XK_udoubleacute\n    0x0172: 0x03d9, // XK_Uogonek\n    0x0173: 0x03f9, // XK_uogonek\n    0x0178: 0x13be, // XK_Ydiaeresis\n    0x0179: 0x01ac, // XK_Zacute\n    0x017a: 0x01bc, // XK_zacute\n    0x017b: 0x01af, // XK_Zabovedot\n    0x017c: 0x01bf, // XK_zabovedot\n    0x017d: 0x01ae, // XK_Zcaron\n    0x017e: 0x01be, // XK_zcaron\n    0x0192: 0x08f6, // XK_function\n    0x01d2: 0x10001d1, // XK_Ocaron\n    0x02c7: 0x01b7, // XK_caron\n    0x02d8: 0x01a2, // XK_breve\n    0x02d9: 0x01ff, // XK_abovedot\n    0x02db: 0x01b2, // XK_ogonek\n    0x02dd: 0x01bd, // XK_doubleacute\n    0x0385: 0x07ae, // XK_Greek_accentdieresis\n    0x0386: 0x07a1, // XK_Greek_ALPHAaccent\n    0x0388: 0x07a2, // XK_Greek_EPSILONaccent\n    0x0389: 0x07a3, // XK_Greek_ETAaccent\n    0x038a: 0x07a4, // XK_Greek_IOTAaccent\n    0x038c: 0x07a7, // XK_Greek_OMICRONaccent\n    0x038e: 0x07a8, // XK_Greek_UPSILONaccent\n    0x038f: 0x07ab, // XK_Greek_OMEGAaccent\n    0x0390: 0x07b6, // XK_Greek_iotaaccentdieresis\n    0x0391: 0x07c1, // XK_Greek_ALPHA\n    0x0392: 0x07c2, // XK_Greek_BETA\n    0x0393: 0x07c3, // XK_Greek_GAMMA\n    0x0394: 0x07c4, // XK_Greek_DELTA\n    0x0395: 0x07c5, // XK_Greek_EPSILON\n    0x0396: 0x07c6, // XK_Greek_ZETA\n    0x0397: 0x07c7, // XK_Greek_ETA\n    0x0398: 0x07c8, // XK_Greek_THETA\n    0x0399: 0x07c9, // XK_Greek_IOTA\n    0x039a: 0x07ca, // XK_Greek_KAPPA\n    0x039b: 0x07cb, // XK_Greek_LAMDA\n    0x039c: 0x07cc, // XK_Greek_MU\n    0x039d: 0x07cd, // XK_Greek_NU\n    0x039e: 0x07ce, // XK_Greek_XI\n    0x039f: 0x07cf, // XK_Greek_OMICRON\n    0x03a0: 0x07d0, // XK_Greek_PI\n    0x03a1: 0x07d1, // XK_Greek_RHO\n    0x03a3: 0x07d2, // XK_Greek_SIGMA\n    0x03a4: 0x07d4, // XK_Greek_TAU\n    0x03a5: 0x07d5, // XK_Greek_UPSILON\n    0x03a6: 0x07d6, // XK_Greek_PHI\n    0x03a7: 0x07d7, // XK_Greek_CHI\n    0x03a8: 0x07d8, // XK_Greek_PSI\n    0x03a9: 0x07d9, // XK_Greek_OMEGA\n    0x03aa: 0x07a5, // XK_Greek_IOTAdieresis\n    0x03ab: 0x07a9, // XK_Greek_UPSILONdieresis\n    0x03ac: 0x07b1, // XK_Greek_alphaaccent\n    0x03ad: 0x07b2, // XK_Greek_epsilonaccent\n    0x03ae: 0x07b3, // XK_Greek_etaaccent\n    0x03af: 0x07b4, // XK_Greek_iotaaccent\n    0x03b0: 0x07ba, // XK_Greek_upsilonaccentdieresis\n    0x03b1: 0x07e1, // XK_Greek_alpha\n    0x03b2: 0x07e2, // XK_Greek_beta\n    0x03b3: 0x07e3, // XK_Greek_gamma\n    0x03b4: 0x07e4, // XK_Greek_delta\n    0x03b5: 0x07e5, // XK_Greek_epsilon\n    0x03b6: 0x07e6, // XK_Greek_zeta\n    0x03b7: 0x07e7, // XK_Greek_eta\n    0x03b8: 0x07e8, // XK_Greek_theta\n    0x03b9: 0x07e9, // XK_Greek_iota\n    0x03ba: 0x07ea, // XK_Greek_kappa\n    0x03bb: 0x07eb, // XK_Greek_lamda\n    0x03bc: 0x07ec, // XK_Greek_mu\n    0x03bd: 0x07ed, // XK_Greek_nu\n    0x03be: 0x07ee, // XK_Greek_xi\n    0x03bf: 0x07ef, // XK_Greek_omicron\n    0x03c0: 0x07f0, // XK_Greek_pi\n    0x03c1: 0x07f1, // XK_Greek_rho\n    0x03c2: 0x07f3, // XK_Greek_finalsmallsigma\n    0x03c3: 0x07f2, // XK_Greek_sigma\n    0x03c4: 0x07f4, // XK_Greek_tau\n    0x03c5: 0x07f5, // XK_Greek_upsilon\n    0x03c6: 0x07f6, // XK_Greek_phi\n    0x03c7: 0x07f7, // XK_Greek_chi\n    0x03c8: 0x07f8, // XK_Greek_psi\n    0x03c9: 0x07f9, // XK_Greek_omega\n    0x03ca: 0x07b5, // XK_Greek_iotadieresis\n    0x03cb: 0x07b9, // XK_Greek_upsilondieresis\n    0x03cc: 0x07b7, // XK_Greek_omicronaccent\n    0x03cd: 0x07b8, // XK_Greek_upsilonaccent\n    0x03ce: 0x07bb, // XK_Greek_omegaaccent\n    0x0401: 0x06b3, // XK_Cyrillic_IO\n    0x0402: 0x06b1, // XK_Serbian_DJE\n    0x0403: 0x06b2, // XK_Macedonia_GJE\n    0x0404: 0x06b4, // XK_Ukrainian_IE\n    0x0405: 0x06b5, // XK_Macedonia_DSE\n    0x0406: 0x06b6, // XK_Ukrainian_I\n    0x0407: 0x06b7, // XK_Ukrainian_YI\n    0x0408: 0x06b8, // XK_Cyrillic_JE\n    0x0409: 0x06b9, // XK_Cyrillic_LJE\n    0x040a: 0x06ba, // XK_Cyrillic_NJE\n    0x040b: 0x06bb, // XK_Serbian_TSHE\n    0x040c: 0x06bc, // XK_Macedonia_KJE\n    0x040e: 0x06be, // XK_Byelorussian_SHORTU\n    0x040f: 0x06bf, // XK_Cyrillic_DZHE\n    0x0410: 0x06e1, // XK_Cyrillic_A\n    0x0411: 0x06e2, // XK_Cyrillic_BE\n    0x0412: 0x06f7, // XK_Cyrillic_VE\n    0x0413: 0x06e7, // XK_Cyrillic_GHE\n    0x0414: 0x06e4, // XK_Cyrillic_DE\n    0x0415: 0x06e5, // XK_Cyrillic_IE\n    0x0416: 0x06f6, // XK_Cyrillic_ZHE\n    0x0417: 0x06fa, // XK_Cyrillic_ZE\n    0x0418: 0x06e9, // XK_Cyrillic_I\n    0x0419: 0x06ea, // XK_Cyrillic_SHORTI\n    0x041a: 0x06eb, // XK_Cyrillic_KA\n    0x041b: 0x06ec, // XK_Cyrillic_EL\n    0x041c: 0x06ed, // XK_Cyrillic_EM\n    0x041d: 0x06ee, // XK_Cyrillic_EN\n    0x041e: 0x06ef, // XK_Cyrillic_O\n    0x041f: 0x06f0, // XK_Cyrillic_PE\n    0x0420: 0x06f2, // XK_Cyrillic_ER\n    0x0421: 0x06f3, // XK_Cyrillic_ES\n    0x0422: 0x06f4, // XK_Cyrillic_TE\n    0x0423: 0x06f5, // XK_Cyrillic_U\n    0x0424: 0x06e6, // XK_Cyrillic_EF\n    0x0425: 0x06e8, // XK_Cyrillic_HA\n    0x0426: 0x06e3, // XK_Cyrillic_TSE\n    0x0427: 0x06fe, // XK_Cyrillic_CHE\n    0x0428: 0x06fb, // XK_Cyrillic_SHA\n    0x0429: 0x06fd, // XK_Cyrillic_SHCHA\n    0x042a: 0x06ff, // XK_Cyrillic_HARDSIGN\n    0x042b: 0x06f9, // XK_Cyrillic_YERU\n    0x042c: 0x06f8, // XK_Cyrillic_SOFTSIGN\n    0x042d: 0x06fc, // XK_Cyrillic_E\n    0x042e: 0x06e0, // XK_Cyrillic_YU\n    0x042f: 0x06f1, // XK_Cyrillic_YA\n    0x0430: 0x06c1, // XK_Cyrillic_a\n    0x0431: 0x06c2, // XK_Cyrillic_be\n    0x0432: 0x06d7, // XK_Cyrillic_ve\n    0x0433: 0x06c7, // XK_Cyrillic_ghe\n    0x0434: 0x06c4, // XK_Cyrillic_de\n    0x0435: 0x06c5, // XK_Cyrillic_ie\n    0x0436: 0x06d6, // XK_Cyrillic_zhe\n    0x0437: 0x06da, // XK_Cyrillic_ze\n    0x0438: 0x06c9, // XK_Cyrillic_i\n    0x0439: 0x06ca, // XK_Cyrillic_shorti\n    0x043a: 0x06cb, // XK_Cyrillic_ka\n    0x043b: 0x06cc, // XK_Cyrillic_el\n    0x043c: 0x06cd, // XK_Cyrillic_em\n    0x043d: 0x06ce, // XK_Cyrillic_en\n    0x043e: 0x06cf, // XK_Cyrillic_o\n    0x043f: 0x06d0, // XK_Cyrillic_pe\n    0x0440: 0x06d2, // XK_Cyrillic_er\n    0x0441: 0x06d3, // XK_Cyrillic_es\n    0x0442: 0x06d4, // XK_Cyrillic_te\n    0x0443: 0x06d5, // XK_Cyrillic_u\n    0x0444: 0x06c6, // XK_Cyrillic_ef\n    0x0445: 0x06c8, // XK_Cyrillic_ha\n    0x0446: 0x06c3, // XK_Cyrillic_tse\n    0x0447: 0x06de, // XK_Cyrillic_che\n    0x0448: 0x06db, // XK_Cyrillic_sha\n    0x0449: 0x06dd, // XK_Cyrillic_shcha\n    0x044a: 0x06df, // XK_Cyrillic_hardsign\n    0x044b: 0x06d9, // XK_Cyrillic_yeru\n    0x044c: 0x06d8, // XK_Cyrillic_softsign\n    0x044d: 0x06dc, // XK_Cyrillic_e\n    0x044e: 0x06c0, // XK_Cyrillic_yu\n    0x044f: 0x06d1, // XK_Cyrillic_ya\n    0x0451: 0x06a3, // XK_Cyrillic_io\n    0x0452: 0x06a1, // XK_Serbian_dje\n    0x0453: 0x06a2, // XK_Macedonia_gje\n    0x0454: 0x06a4, // XK_Ukrainian_ie\n    0x0455: 0x06a5, // XK_Macedonia_dse\n    0x0456: 0x06a6, // XK_Ukrainian_i\n    0x0457: 0x06a7, // XK_Ukrainian_yi\n    0x0458: 0x06a8, // XK_Cyrillic_je\n    0x0459: 0x06a9, // XK_Cyrillic_lje\n    0x045a: 0x06aa, // XK_Cyrillic_nje\n    0x045b: 0x06ab, // XK_Serbian_tshe\n    0x045c: 0x06ac, // XK_Macedonia_kje\n    0x045e: 0x06ae, // XK_Byelorussian_shortu\n    0x045f: 0x06af, // XK_Cyrillic_dzhe\n    0x0490: 0x06bd, // XK_Ukrainian_GHE_WITH_UPTURN\n    0x0491: 0x06ad, // XK_Ukrainian_ghe_with_upturn\n    0x05d0: 0x0ce0, // XK_hebrew_aleph\n    0x05d1: 0x0ce1, // XK_hebrew_bet\n    0x05d2: 0x0ce2, // XK_hebrew_gimel\n    0x05d3: 0x0ce3, // XK_hebrew_dalet\n    0x05d4: 0x0ce4, // XK_hebrew_he\n    0x05d5: 0x0ce5, // XK_hebrew_waw\n    0x05d6: 0x0ce6, // XK_hebrew_zain\n    0x05d7: 0x0ce7, // XK_hebrew_chet\n    0x05d8: 0x0ce8, // XK_hebrew_tet\n    0x05d9: 0x0ce9, // XK_hebrew_yod\n    0x05da: 0x0cea, // XK_hebrew_finalkaph\n    0x05db: 0x0ceb, // XK_hebrew_kaph\n    0x05dc: 0x0cec, // XK_hebrew_lamed\n    0x05dd: 0x0ced, // XK_hebrew_finalmem\n    0x05de: 0x0cee, // XK_hebrew_mem\n    0x05df: 0x0cef, // XK_hebrew_finalnun\n    0x05e0: 0x0cf0, // XK_hebrew_nun\n    0x05e1: 0x0cf1, // XK_hebrew_samech\n    0x05e2: 0x0cf2, // XK_hebrew_ayin\n    0x05e3: 0x0cf3, // XK_hebrew_finalpe\n    0x05e4: 0x0cf4, // XK_hebrew_pe\n    0x05e5: 0x0cf5, // XK_hebrew_finalzade\n    0x05e6: 0x0cf6, // XK_hebrew_zade\n    0x05e7: 0x0cf7, // XK_hebrew_qoph\n    0x05e8: 0x0cf8, // XK_hebrew_resh\n    0x05e9: 0x0cf9, // XK_hebrew_shin\n    0x05ea: 0x0cfa, // XK_hebrew_taw\n    0x060c: 0x05ac, // XK_Arabic_comma\n    0x061b: 0x05bb, // XK_Arabic_semicolon\n    0x061f: 0x05bf, // XK_Arabic_question_mark\n    0x0621: 0x05c1, // XK_Arabic_hamza\n    0x0622: 0x05c2, // XK_Arabic_maddaonalef\n    0x0623: 0x05c3, // XK_Arabic_hamzaonalef\n    0x0624: 0x05c4, // XK_Arabic_hamzaonwaw\n    0x0625: 0x05c5, // XK_Arabic_hamzaunderalef\n    0x0626: 0x05c6, // XK_Arabic_hamzaonyeh\n    0x0627: 0x05c7, // XK_Arabic_alef\n    0x0628: 0x05c8, // XK_Arabic_beh\n    0x0629: 0x05c9, // XK_Arabic_tehmarbuta\n    0x062a: 0x05ca, // XK_Arabic_teh\n    0x062b: 0x05cb, // XK_Arabic_theh\n    0x062c: 0x05cc, // XK_Arabic_jeem\n    0x062d: 0x05cd, // XK_Arabic_hah\n    0x062e: 0x05ce, // XK_Arabic_khah\n    0x062f: 0x05cf, // XK_Arabic_dal\n    0x0630: 0x05d0, // XK_Arabic_thal\n    0x0631: 0x05d1, // XK_Arabic_ra\n    0x0632: 0x05d2, // XK_Arabic_zain\n    0x0633: 0x05d3, // XK_Arabic_seen\n    0x0634: 0x05d4, // XK_Arabic_sheen\n    0x0635: 0x05d5, // XK_Arabic_sad\n    0x0636: 0x05d6, // XK_Arabic_dad\n    0x0637: 0x05d7, // XK_Arabic_tah\n    0x0638: 0x05d8, // XK_Arabic_zah\n    0x0639: 0x05d9, // XK_Arabic_ain\n    0x063a: 0x05da, // XK_Arabic_ghain\n    0x0640: 0x05e0, // XK_Arabic_tatweel\n    0x0641: 0x05e1, // XK_Arabic_feh\n    0x0642: 0x05e2, // XK_Arabic_qaf\n    0x0643: 0x05e3, // XK_Arabic_kaf\n    0x0644: 0x05e4, // XK_Arabic_lam\n    0x0645: 0x05e5, // XK_Arabic_meem\n    0x0646: 0x05e6, // XK_Arabic_noon\n    0x0647: 0x05e7, // XK_Arabic_ha\n    0x0648: 0x05e8, // XK_Arabic_waw\n    0x0649: 0x05e9, // XK_Arabic_alefmaksura\n    0x064a: 0x05ea, // XK_Arabic_yeh\n    0x064b: 0x05eb, // XK_Arabic_fathatan\n    0x064c: 0x05ec, // XK_Arabic_dammatan\n    0x064d: 0x05ed, // XK_Arabic_kasratan\n    0x064e: 0x05ee, // XK_Arabic_fatha\n    0x064f: 0x05ef, // XK_Arabic_damma\n    0x0650: 0x05f0, // XK_Arabic_kasra\n    0x0651: 0x05f1, // XK_Arabic_shadda\n    0x0652: 0x05f2, // XK_Arabic_sukun\n    0x0e01: 0x0da1, // XK_Thai_kokai\n    0x0e02: 0x0da2, // XK_Thai_khokhai\n    0x0e03: 0x0da3, // XK_Thai_khokhuat\n    0x0e04: 0x0da4, // XK_Thai_khokhwai\n    0x0e05: 0x0da5, // XK_Thai_khokhon\n    0x0e06: 0x0da6, // XK_Thai_khorakhang\n    0x0e07: 0x0da7, // XK_Thai_ngongu\n    0x0e08: 0x0da8, // XK_Thai_chochan\n    0x0e09: 0x0da9, // XK_Thai_choching\n    0x0e0a: 0x0daa, // XK_Thai_chochang\n    0x0e0b: 0x0dab, // XK_Thai_soso\n    0x0e0c: 0x0dac, // XK_Thai_chochoe\n    0x0e0d: 0x0dad, // XK_Thai_yoying\n    0x0e0e: 0x0dae, // XK_Thai_dochada\n    0x0e0f: 0x0daf, // XK_Thai_topatak\n    0x0e10: 0x0db0, // XK_Thai_thothan\n    0x0e11: 0x0db1, // XK_Thai_thonangmontho\n    0x0e12: 0x0db2, // XK_Thai_thophuthao\n    0x0e13: 0x0db3, // XK_Thai_nonen\n    0x0e14: 0x0db4, // XK_Thai_dodek\n    0x0e15: 0x0db5, // XK_Thai_totao\n    0x0e16: 0x0db6, // XK_Thai_thothung\n    0x0e17: 0x0db7, // XK_Thai_thothahan\n    0x0e18: 0x0db8, // XK_Thai_thothong\n    0x0e19: 0x0db9, // XK_Thai_nonu\n    0x0e1a: 0x0dba, // XK_Thai_bobaimai\n    0x0e1b: 0x0dbb, // XK_Thai_popla\n    0x0e1c: 0x0dbc, // XK_Thai_phophung\n    0x0e1d: 0x0dbd, // XK_Thai_fofa\n    0x0e1e: 0x0dbe, // XK_Thai_phophan\n    0x0e1f: 0x0dbf, // XK_Thai_fofan\n    0x0e20: 0x0dc0, // XK_Thai_phosamphao\n    0x0e21: 0x0dc1, // XK_Thai_moma\n    0x0e22: 0x0dc2, // XK_Thai_yoyak\n    0x0e23: 0x0dc3, // XK_Thai_rorua\n    0x0e24: 0x0dc4, // XK_Thai_ru\n    0x0e25: 0x0dc5, // XK_Thai_loling\n    0x0e26: 0x0dc6, // XK_Thai_lu\n    0x0e27: 0x0dc7, // XK_Thai_wowaen\n    0x0e28: 0x0dc8, // XK_Thai_sosala\n    0x0e29: 0x0dc9, // XK_Thai_sorusi\n    0x0e2a: 0x0dca, // XK_Thai_sosua\n    0x0e2b: 0x0dcb, // XK_Thai_hohip\n    0x0e2c: 0x0dcc, // XK_Thai_lochula\n    0x0e2d: 0x0dcd, // XK_Thai_oang\n    0x0e2e: 0x0dce, // XK_Thai_honokhuk\n    0x0e2f: 0x0dcf, // XK_Thai_paiyannoi\n    0x0e30: 0x0dd0, // XK_Thai_saraa\n    0x0e31: 0x0dd1, // XK_Thai_maihanakat\n    0x0e32: 0x0dd2, // XK_Thai_saraaa\n    0x0e33: 0x0dd3, // XK_Thai_saraam\n    0x0e34: 0x0dd4, // XK_Thai_sarai\n    0x0e35: 0x0dd5, // XK_Thai_saraii\n    0x0e36: 0x0dd6, // XK_Thai_saraue\n    0x0e37: 0x0dd7, // XK_Thai_sarauee\n    0x0e38: 0x0dd8, // XK_Thai_sarau\n    0x0e39: 0x0dd9, // XK_Thai_sarauu\n    0x0e3a: 0x0dda, // XK_Thai_phinthu\n    0x0e3f: 0x0ddf, // XK_Thai_baht\n    0x0e40: 0x0de0, // XK_Thai_sarae\n    0x0e41: 0x0de1, // XK_Thai_saraae\n    0x0e42: 0x0de2, // XK_Thai_sarao\n    0x0e43: 0x0de3, // XK_Thai_saraaimaimuan\n    0x0e44: 0x0de4, // XK_Thai_saraaimaimalai\n    0x0e45: 0x0de5, // XK_Thai_lakkhangyao\n    0x0e46: 0x0de6, // XK_Thai_maiyamok\n    0x0e47: 0x0de7, // XK_Thai_maitaikhu\n    0x0e48: 0x0de8, // XK_Thai_maiek\n    0x0e49: 0x0de9, // XK_Thai_maitho\n    0x0e4a: 0x0dea, // XK_Thai_maitri\n    0x0e4b: 0x0deb, // XK_Thai_maichattawa\n    0x0e4c: 0x0dec, // XK_Thai_thanthakhat\n    0x0e4d: 0x0ded, // XK_Thai_nikhahit\n    0x0e50: 0x0df0, // XK_Thai_leksun\n    0x0e51: 0x0df1, // XK_Thai_leknung\n    0x0e52: 0x0df2, // XK_Thai_leksong\n    0x0e53: 0x0df3, // XK_Thai_leksam\n    0x0e54: 0x0df4, // XK_Thai_leksi\n    0x0e55: 0x0df5, // XK_Thai_lekha\n    0x0e56: 0x0df6, // XK_Thai_lekhok\n    0x0e57: 0x0df7, // XK_Thai_lekchet\n    0x0e58: 0x0df8, // XK_Thai_lekpaet\n    0x0e59: 0x0df9, // XK_Thai_lekkao\n    0x2002: 0x0aa2, // XK_enspace\n    0x2003: 0x0aa1, // XK_emspace\n    0x2004: 0x0aa3, // XK_em3space\n    0x2005: 0x0aa4, // XK_em4space\n    0x2007: 0x0aa5, // XK_digitspace\n    0x2008: 0x0aa6, // XK_punctspace\n    0x2009: 0x0aa7, // XK_thinspace\n    0x200a: 0x0aa8, // XK_hairspace\n    0x2012: 0x0abb, // XK_figdash\n    0x2013: 0x0aaa, // XK_endash\n    0x2014: 0x0aa9, // XK_emdash\n    0x2015: 0x07af, // XK_Greek_horizbar\n    0x2017: 0x0cdf, // XK_hebrew_doublelowline\n    0x2018: 0x0ad0, // XK_leftsinglequotemark\n    0x2019: 0x0ad1, // XK_rightsinglequotemark\n    0x201a: 0x0afd, // XK_singlelowquotemark\n    0x201c: 0x0ad2, // XK_leftdoublequotemark\n    0x201d: 0x0ad3, // XK_rightdoublequotemark\n    0x201e: 0x0afe, // XK_doublelowquotemark\n    0x2020: 0x0af1, // XK_dagger\n    0x2021: 0x0af2, // XK_doubledagger\n    0x2022: 0x0ae6, // XK_enfilledcircbullet\n    0x2025: 0x0aaf, // XK_doubbaselinedot\n    0x2026: 0x0aae, // XK_ellipsis\n    0x2030: 0x0ad5, // XK_permille\n    0x2032: 0x0ad6, // XK_minutes\n    0x2033: 0x0ad7, // XK_seconds\n    0x2038: 0x0afc, // XK_caret\n    0x203e: 0x047e, // XK_overline\n    0x20a9: 0x0eff, // XK_Korean_Won\n    0x20ac: 0x20ac, // XK_EuroSign\n    0x2105: 0x0ab8, // XK_careof\n    0x2116: 0x06b0, // XK_numerosign\n    0x2117: 0x0afb, // XK_phonographcopyright\n    0x211e: 0x0ad4, // XK_prescription\n    0x2122: 0x0ac9, // XK_trademark\n    0x2153: 0x0ab0, // XK_onethird\n    0x2154: 0x0ab1, // XK_twothirds\n    0x2155: 0x0ab2, // XK_onefifth\n    0x2156: 0x0ab3, // XK_twofifths\n    0x2157: 0x0ab4, // XK_threefifths\n    0x2158: 0x0ab5, // XK_fourfifths\n    0x2159: 0x0ab6, // XK_onesixth\n    0x215a: 0x0ab7, // XK_fivesixths\n    0x215b: 0x0ac3, // XK_oneeighth\n    0x215c: 0x0ac4, // XK_threeeighths\n    0x215d: 0x0ac5, // XK_fiveeighths\n    0x215e: 0x0ac6, // XK_seveneighths\n    0x2190: 0x08fb, // XK_leftarrow\n    0x2191: 0x08fc, // XK_uparrow\n    0x2192: 0x08fd, // XK_rightarrow\n    0x2193: 0x08fe, // XK_downarrow\n    0x21d2: 0x08ce, // XK_implies\n    0x21d4: 0x08cd, // XK_ifonlyif\n    0x2202: 0x08ef, // XK_partialderivative\n    0x2207: 0x08c5, // XK_nabla\n    0x2218: 0x0bca, // XK_jot\n    0x221a: 0x08d6, // XK_radical\n    0x221d: 0x08c1, // XK_variation\n    0x221e: 0x08c2, // XK_infinity\n    0x2227: 0x08de, // XK_logicaland\n    0x2228: 0x08df, // XK_logicalor\n    0x2229: 0x08dc, // XK_intersection\n    0x222a: 0x08dd, // XK_union\n    0x222b: 0x08bf, // XK_integral\n    0x2234: 0x08c0, // XK_therefore\n    0x223c: 0x08c8, // XK_approximate\n    0x2243: 0x08c9, // XK_similarequal\n    0x2245: 0x1002248, // XK_approxeq\n    0x2260: 0x08bd, // XK_notequal\n    0x2261: 0x08cf, // XK_identical\n    0x2264: 0x08bc, // XK_lessthanequal\n    0x2265: 0x08be, // XK_greaterthanequal\n    0x2282: 0x08da, // XK_includedin\n    0x2283: 0x08db, // XK_includes\n    0x22a2: 0x0bfc, // XK_righttack\n    0x22a3: 0x0bdc, // XK_lefttack\n    0x22a4: 0x0bc2, // XK_downtack\n    0x22a5: 0x0bce, // XK_uptack\n    0x2308: 0x0bd3, // XK_upstile\n    0x230a: 0x0bc4, // XK_downstile\n    0x2315: 0x0afa, // XK_telephonerecorder\n    0x2320: 0x08a4, // XK_topintegral\n    0x2321: 0x08a5, // XK_botintegral\n    0x2395: 0x0bcc, // XK_quad\n    0x239b: 0x08ab, // XK_topleftparens\n    0x239d: 0x08ac, // XK_botleftparens\n    0x239e: 0x08ad, // XK_toprightparens\n    0x23a0: 0x08ae, // XK_botrightparens\n    0x23a1: 0x08a7, // XK_topleftsqbracket\n    0x23a3: 0x08a8, // XK_botleftsqbracket\n    0x23a4: 0x08a9, // XK_toprightsqbracket\n    0x23a6: 0x08aa, // XK_botrightsqbracket\n    0x23a8: 0x08af, // XK_leftmiddlecurlybrace\n    0x23ac: 0x08b0, // XK_rightmiddlecurlybrace\n    0x23b7: 0x08a1, // XK_leftradical\n    0x23ba: 0x09ef, // XK_horizlinescan1\n    0x23bb: 0x09f0, // XK_horizlinescan3\n    0x23bc: 0x09f2, // XK_horizlinescan7\n    0x23bd: 0x09f3, // XK_horizlinescan9\n    0x2409: 0x09e2, // XK_ht\n    0x240a: 0x09e5, // XK_lf\n    0x240b: 0x09e9, // XK_vt\n    0x240c: 0x09e3, // XK_ff\n    0x240d: 0x09e4, // XK_cr\n    0x2423: 0x0aac, // XK_signifblank\n    0x2424: 0x09e8, // XK_nl\n    0x2500: 0x08a3, // XK_horizconnector\n    0x2502: 0x08a6, // XK_vertconnector\n    0x250c: 0x08a2, // XK_topleftradical\n    0x2510: 0x09eb, // XK_uprightcorner\n    0x2514: 0x09ed, // XK_lowleftcorner\n    0x2518: 0x09ea, // XK_lowrightcorner\n    0x251c: 0x09f4, // XK_leftt\n    0x2524: 0x09f5, // XK_rightt\n    0x252c: 0x09f7, // XK_topt\n    0x2534: 0x09f6, // XK_bott\n    0x253c: 0x09ee, // XK_crossinglines\n    0x2592: 0x09e1, // XK_checkerboard\n    0x25aa: 0x0ae7, // XK_enfilledsqbullet\n    0x25ab: 0x0ae1, // XK_enopensquarebullet\n    0x25ac: 0x0adb, // XK_filledrectbullet\n    0x25ad: 0x0ae2, // XK_openrectbullet\n    0x25ae: 0x0adf, // XK_emfilledrect\n    0x25af: 0x0acf, // XK_emopenrectangle\n    0x25b2: 0x0ae8, // XK_filledtribulletup\n    0x25b3: 0x0ae3, // XK_opentribulletup\n    0x25b6: 0x0add, // XK_filledrighttribullet\n    0x25b7: 0x0acd, // XK_rightopentriangle\n    0x25bc: 0x0ae9, // XK_filledtribulletdown\n    0x25bd: 0x0ae4, // XK_opentribulletdown\n    0x25c0: 0x0adc, // XK_filledlefttribullet\n    0x25c1: 0x0acc, // XK_leftopentriangle\n    0x25c6: 0x09e0, // XK_soliddiamond\n    0x25cb: 0x0ace, // XK_emopencircle\n    0x25cf: 0x0ade, // XK_emfilledcircle\n    0x25e6: 0x0ae0, // XK_enopencircbullet\n    0x2606: 0x0ae5, // XK_openstar\n    0x260e: 0x0af9, // XK_telephone\n    0x2613: 0x0aca, // XK_signaturemark\n    0x261c: 0x0aea, // XK_leftpointer\n    0x261e: 0x0aeb, // XK_rightpointer\n    0x2640: 0x0af8, // XK_femalesymbol\n    0x2642: 0x0af7, // XK_malesymbol\n    0x2663: 0x0aec, // XK_club\n    0x2665: 0x0aee, // XK_heart\n    0x2666: 0x0aed, // XK_diamond\n    0x266d: 0x0af6, // XK_musicalflat\n    0x266f: 0x0af5, // XK_musicalsharp\n    0x2713: 0x0af3, // XK_checkmark\n    0x2717: 0x0af4, // XK_ballotcross\n    0x271d: 0x0ad9, // XK_latincross\n    0x2720: 0x0af0, // XK_maltesecross\n    0x27e8: 0x0abc, // XK_leftanglebracket\n    0x27e9: 0x0abe, // XK_rightanglebracket\n    0x3001: 0x04a4, // XK_kana_comma\n    0x3002: 0x04a1, // XK_kana_fullstop\n    0x300c: 0x04a2, // XK_kana_openingbracket\n    0x300d: 0x04a3, // XK_kana_closingbracket\n    0x309b: 0x04de, // XK_voicedsound\n    0x309c: 0x04df, // XK_semivoicedsound\n    0x30a1: 0x04a7, // XK_kana_a\n    0x30a2: 0x04b1, // XK_kana_A\n    0x30a3: 0x04a8, // XK_kana_i\n    0x30a4: 0x04b2, // XK_kana_I\n    0x30a5: 0x04a9, // XK_kana_u\n    0x30a6: 0x04b3, // XK_kana_U\n    0x30a7: 0x04aa, // XK_kana_e\n    0x30a8: 0x04b4, // XK_kana_E\n    0x30a9: 0x04ab, // XK_kana_o\n    0x30aa: 0x04b5, // XK_kana_O\n    0x30ab: 0x04b6, // XK_kana_KA\n    0x30ad: 0x04b7, // XK_kana_KI\n    0x30af: 0x04b8, // XK_kana_KU\n    0x30b1: 0x04b9, // XK_kana_KE\n    0x30b3: 0x04ba, // XK_kana_KO\n    0x30b5: 0x04bb, // XK_kana_SA\n    0x30b7: 0x04bc, // XK_kana_SHI\n    0x30b9: 0x04bd, // XK_kana_SU\n    0x30bb: 0x04be, // XK_kana_SE\n    0x30bd: 0x04bf, // XK_kana_SO\n    0x30bf: 0x04c0, // XK_kana_TA\n    0x30c1: 0x04c1, // XK_kana_CHI\n    0x30c3: 0x04af, // XK_kana_tsu\n    0x30c4: 0x04c2, // XK_kana_TSU\n    0x30c6: 0x04c3, // XK_kana_TE\n    0x30c8: 0x04c4, // XK_kana_TO\n    0x30ca: 0x04c5, // XK_kana_NA\n    0x30cb: 0x04c6, // XK_kana_NI\n    0x30cc: 0x04c7, // XK_kana_NU\n    0x30cd: 0x04c8, // XK_kana_NE\n    0x30ce: 0x04c9, // XK_kana_NO\n    0x30cf: 0x04ca, // XK_kana_HA\n    0x30d2: 0x04cb, // XK_kana_HI\n    0x30d5: 0x04cc, // XK_kana_FU\n    0x30d8: 0x04cd, // XK_kana_HE\n    0x30db: 0x04ce, // XK_kana_HO\n    0x30de: 0x04cf, // XK_kana_MA\n    0x30df: 0x04d0, // XK_kana_MI\n    0x30e0: 0x04d1, // XK_kana_MU\n    0x30e1: 0x04d2, // XK_kana_ME\n    0x30e2: 0x04d3, // XK_kana_MO\n    0x30e3: 0x04ac, // XK_kana_ya\n    0x30e4: 0x04d4, // XK_kana_YA\n    0x30e5: 0x04ad, // XK_kana_yu\n    0x30e6: 0x04d5, // XK_kana_YU\n    0x30e7: 0x04ae, // XK_kana_yo\n    0x30e8: 0x04d6, // XK_kana_YO\n    0x30e9: 0x04d7, // XK_kana_RA\n    0x30ea: 0x04d8, // XK_kana_RI\n    0x30eb: 0x04d9, // XK_kana_RU\n    0x30ec: 0x04da, // XK_kana_RE\n    0x30ed: 0x04db, // XK_kana_RO\n    0x30ef: 0x04dc, // XK_kana_WA\n    0x30f2: 0x04a6, // XK_kana_WO\n    0x30f3: 0x04dd, // XK_kana_N\n    0x30fb: 0x04a5, // XK_kana_conjunctive\n    0x30fc: 0x04b0 // XK_prolongedsound\n};\n\nvar keysyms = {\n    lookup: function lookup(u) {\n        // Latin-1 is one-to-one mapping\n        if (u >= 0x20 && u <= 0xff) {\n            return u;\n        }\n\n        // Lookup table (fairly random)\n        var keysym = codepoints[u];\n        if (keysym !== undefined) {\n            return keysym;\n        }\n\n        // General mapping as final fallback\n        return 0x01000000 | u;\n    }\n};\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2017 Pierre Ossman for Cendio AB\n * Licensed under MPL 2.0 or any later version (see LICENSE.txt)\n */\n\n/*\n * Mapping between Microsoft® Windows® Virtual-Key codes and\n * HTML key codes.\n */\n\nvar vkeys = {\n    0x08: 'Backspace',\n    0x09: 'Tab',\n    0x0a: 'NumpadClear',\n    0x0d: 'Enter',\n    0x10: 'ShiftLeft',\n    0x11: 'ControlLeft',\n    0x12: 'AltLeft',\n    0x13: 'Pause',\n    0x14: 'CapsLock',\n    0x15: 'Lang1',\n    0x19: 'Lang2',\n    0x1b: 'Escape',\n    0x1c: 'Convert',\n    0x1d: 'NonConvert',\n    0x20: 'Space',\n    0x21: 'PageUp',\n    0x22: 'PageDown',\n    0x23: 'End',\n    0x24: 'Home',\n    0x25: 'ArrowLeft',\n    0x26: 'ArrowUp',\n    0x27: 'ArrowRight',\n    0x28: 'ArrowDown',\n    0x29: 'Select',\n    0x2c: 'PrintScreen',\n    0x2d: 'Insert',\n    0x2e: 'Delete',\n    0x2f: 'Help',\n    0x30: 'Digit0',\n    0x31: 'Digit1',\n    0x32: 'Digit2',\n    0x33: 'Digit3',\n    0x34: 'Digit4',\n    0x35: 'Digit5',\n    0x36: 'Digit6',\n    0x37: 'Digit7',\n    0x38: 'Digit8',\n    0x39: 'Digit9',\n    0x5b: 'MetaLeft',\n    0x5c: 'MetaRight',\n    0x5d: 'ContextMenu',\n    0x5f: 'Sleep',\n    0x60: 'Numpad0',\n    0x61: 'Numpad1',\n    0x62: 'Numpad2',\n    0x63: 'Numpad3',\n    0x64: 'Numpad4',\n    0x65: 'Numpad5',\n    0x66: 'Numpad6',\n    0x67: 'Numpad7',\n    0x68: 'Numpad8',\n    0x69: 'Numpad9',\n    0x6a: 'NumpadMultiply',\n    0x6b: 'NumpadAdd',\n    0x6c: 'NumpadDecimal',\n    0x6d: 'NumpadSubtract',\n    0x6e: 'NumpadDecimal', // Duplicate, because buggy on Windows\n    0x6f: 'NumpadDivide',\n    0x70: 'F1',\n    0x71: 'F2',\n    0x72: 'F3',\n    0x73: 'F4',\n    0x74: 'F5',\n    0x75: 'F6',\n    0x76: 'F7',\n    0x77: 'F8',\n    0x78: 'F9',\n    0x79: 'F10',\n    0x7a: 'F11',\n    0x7b: 'F12',\n    0x7c: 'F13',\n    0x7d: 'F14',\n    0x7e: 'F15',\n    0x7f: 'F16',\n    0x80: 'F17',\n    0x81: 'F18',\n    0x82: 'F19',\n    0x83: 'F20',\n    0x84: 'F21',\n    0x85: 'F22',\n    0x86: 'F23',\n    0x87: 'F24',\n    0x90: 'NumLock',\n    0x91: 'ScrollLock',\n    0xa6: 'BrowserBack',\n    0xa7: 'BrowserForward',\n    0xa8: 'BrowserRefresh',\n    0xa9: 'BrowserStop',\n    0xaa: 'BrowserSearch',\n    0xab: 'BrowserFavorites',\n    0xac: 'BrowserHome',\n    0xad: 'AudioVolumeMute',\n    0xae: 'AudioVolumeDown',\n    0xaf: 'AudioVolumeUp',\n    0xb0: 'MediaTrackNext',\n    0xb1: 'MediaTrackPrevious',\n    0xb2: 'MediaStop',\n    0xb3: 'MediaPlayPause',\n    0xb4: 'LaunchMail',\n    0xb5: 'MediaSelect',\n    0xb6: 'LaunchApp1',\n    0xb7: 'LaunchApp2',\n    0xe1: 'AltRight' // Only when it is AltGraph\n};\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2017 Pierre Ossman for Cendio AB\n * Licensed under MPL 2.0 or any later version (see LICENSE.txt)\n */\n\n/*\n * Fallback mapping between HTML key codes (physical keys) and\n * HTML key values. This only works for keys that don't vary\n * between layouts. We also omit those who manage fine by mapping the\n * Unicode representation.\n *\n * See https://www.w3.org/TR/uievents-code/ for possible codes.\n * See https://www.w3.org/TR/uievents-key/ for possible values.\n */\n\nvar fixedkeys = {\n\n    // 3.1.1.1. Writing System Keys\n\n    'Backspace': 'Backspace',\n\n    // 3.1.1.2. Functional Keys\n\n    'AltLeft': 'Alt',\n    'AltRight': 'Alt', // This could also be 'AltGraph'\n    'CapsLock': 'CapsLock',\n    'ContextMenu': 'ContextMenu',\n    'ControlLeft': 'Control',\n    'ControlRight': 'Control',\n    'Enter': 'Enter',\n    'MetaLeft': 'Meta',\n    'MetaRight': 'Meta',\n    'ShiftLeft': 'Shift',\n    'ShiftRight': 'Shift',\n    'Tab': 'Tab',\n    // FIXME: Japanese/Korean keys\n\n    // 3.1.2. Control Pad Section\n\n    'Delete': 'Delete',\n    'End': 'End',\n    'Help': 'Help',\n    'Home': 'Home',\n    'Insert': 'Insert',\n    'PageDown': 'PageDown',\n    'PageUp': 'PageUp',\n\n    // 3.1.3. Arrow Pad Section\n\n    'ArrowDown': 'ArrowDown',\n    'ArrowLeft': 'ArrowLeft',\n    'ArrowRight': 'ArrowRight',\n    'ArrowUp': 'ArrowUp',\n\n    // 3.1.4. Numpad Section\n\n    'NumLock': 'NumLock',\n    'NumpadBackspace': 'Backspace',\n    'NumpadClear': 'Clear',\n\n    // 3.1.5. Function Section\n\n    'Escape': 'Escape',\n    'F1': 'F1',\n    'F2': 'F2',\n    'F3': 'F3',\n    'F4': 'F4',\n    'F5': 'F5',\n    'F6': 'F6',\n    'F7': 'F7',\n    'F8': 'F8',\n    'F9': 'F9',\n    'F10': 'F10',\n    'F11': 'F11',\n    'F12': 'F12',\n    'F13': 'F13',\n    'F14': 'F14',\n    'F15': 'F15',\n    'F16': 'F16',\n    'F17': 'F17',\n    'F18': 'F18',\n    'F19': 'F19',\n    'F20': 'F20',\n    'F21': 'F21',\n    'F22': 'F22',\n    'F23': 'F23',\n    'F24': 'F24',\n    'F25': 'F25',\n    'F26': 'F26',\n    'F27': 'F27',\n    'F28': 'F28',\n    'F29': 'F29',\n    'F30': 'F30',\n    'F31': 'F31',\n    'F32': 'F32',\n    'F33': 'F33',\n    'F34': 'F34',\n    'F35': 'F35',\n    'PrintScreen': 'PrintScreen',\n    'ScrollLock': 'ScrollLock',\n    'Pause': 'Pause',\n\n    // 3.1.6. Media Keys\n\n    'BrowserBack': 'BrowserBack',\n    'BrowserFavorites': 'BrowserFavorites',\n    'BrowserForward': 'BrowserForward',\n    'BrowserHome': 'BrowserHome',\n    'BrowserRefresh': 'BrowserRefresh',\n    'BrowserSearch': 'BrowserSearch',\n    'BrowserStop': 'BrowserStop',\n    'Eject': 'Eject',\n    'LaunchApp1': 'LaunchMyComputer',\n    'LaunchApp2': 'LaunchCalendar',\n    'LaunchMail': 'LaunchMail',\n    'MediaPlayPause': 'MediaPlay',\n    'MediaStop': 'MediaStop',\n    'MediaTrackNext': 'MediaTrackNext',\n    'MediaTrackPrevious': 'MediaTrackPrevious',\n    'Power': 'Power',\n    'Sleep': 'Sleep',\n    'AudioVolumeDown': 'AudioVolumeDown',\n    'AudioVolumeMute': 'AudioVolumeMute',\n    'AudioVolumeUp': 'AudioVolumeUp',\n    'WakeUp': 'WakeUp'\n};\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2017 Pierre Ossman for Cendio AB\n * Licensed under MPL 2.0 or any later version (see LICENSE.txt)\n */\n\n/*\n * Mapping between HTML key values and VNC/X11 keysyms for \"special\"\n * keys that cannot be handled via their Unicode codepoint.\n *\n * See https://www.w3.org/TR/uievents-key/ for possible values.\n */\n\nvar DOMKeyTable = {};\n\nfunction addStandard(key, standard) {\n    if (standard === undefined) throw \"Undefined keysym for key \\\"\" + key + \"\\\"\";\n    if (key in DOMKeyTable) throw \"Duplicate entry for key \\\"\" + key + \"\\\"\";\n    DOMKeyTable[key] = [standard, standard, standard, standard];\n}\n\nfunction addLeftRight(key, left, right) {\n    if (left === undefined) throw \"Undefined keysym for key \\\"\" + key + \"\\\"\";\n    if (right === undefined) throw \"Undefined keysym for key \\\"\" + key + \"\\\"\";\n    if (key in DOMKeyTable) throw \"Duplicate entry for key \\\"\" + key + \"\\\"\";\n    DOMKeyTable[key] = [left, left, right, left];\n}\n\nfunction addNumpad(key, standard, numpad) {\n    if (standard === undefined) throw \"Undefined keysym for key \\\"\" + key + \"\\\"\";\n    if (numpad === undefined) throw \"Undefined keysym for key \\\"\" + key + \"\\\"\";\n    if (key in DOMKeyTable) throw \"Duplicate entry for key \\\"\" + key + \"\\\"\";\n    DOMKeyTable[key] = [standard, standard, standard, numpad];\n}\n\n// 2.2. Modifier Keys\n\naddLeftRight(\"Alt\", KeyTable.XK_Alt_L, KeyTable.XK_Alt_R);\naddStandard(\"AltGraph\", KeyTable.XK_ISO_Level3_Shift);\naddStandard(\"CapsLock\", KeyTable.XK_Caps_Lock);\naddLeftRight(\"Control\", KeyTable.XK_Control_L, KeyTable.XK_Control_R);\n// - Fn\n// - FnLock\naddLeftRight(\"Hyper\", KeyTable.XK_Super_L, KeyTable.XK_Super_R);\naddLeftRight(\"Meta\", KeyTable.XK_Super_L, KeyTable.XK_Super_R);\naddStandard(\"NumLock\", KeyTable.XK_Num_Lock);\naddStandard(\"ScrollLock\", KeyTable.XK_Scroll_Lock);\naddLeftRight(\"Shift\", KeyTable.XK_Shift_L, KeyTable.XK_Shift_R);\naddLeftRight(\"Super\", KeyTable.XK_Super_L, KeyTable.XK_Super_R);\n// - Symbol\n// - SymbolLock\n\n// 2.3. Whitespace Keys\n\naddNumpad(\"Enter\", KeyTable.XK_Return, KeyTable.XK_KP_Enter);\naddStandard(\"Tab\", KeyTable.XK_Tab);\naddNumpad(\" \", KeyTable.XK_space, KeyTable.XK_KP_Space);\n\n// 2.4. Navigation Keys\n\naddNumpad(\"ArrowDown\", KeyTable.XK_Down, KeyTable.XK_KP_Down);\naddNumpad(\"ArrowUp\", KeyTable.XK_Up, KeyTable.XK_KP_Up);\naddNumpad(\"ArrowLeft\", KeyTable.XK_Left, KeyTable.XK_KP_Left);\naddNumpad(\"ArrowRight\", KeyTable.XK_Right, KeyTable.XK_KP_Right);\naddNumpad(\"End\", KeyTable.XK_End, KeyTable.XK_KP_End);\naddNumpad(\"Home\", KeyTable.XK_Home, KeyTable.XK_KP_Home);\naddNumpad(\"PageDown\", KeyTable.XK_Next, KeyTable.XK_KP_Next);\naddNumpad(\"PageUp\", KeyTable.XK_Prior, KeyTable.XK_KP_Prior);\n\n// 2.5. Editing Keys\n\naddStandard(\"Backspace\", KeyTable.XK_BackSpace);\naddStandard(\"Clear\", KeyTable.XK_Clear);\naddStandard(\"Copy\", KeyTable.XF86XK_Copy);\n// - CrSel\naddStandard(\"Cut\", KeyTable.XF86XK_Cut);\naddNumpad(\"Delete\", KeyTable.XK_Delete, KeyTable.XK_KP_Delete);\n// - EraseEof\n// - ExSel\naddNumpad(\"Insert\", KeyTable.XK_Insert, KeyTable.XK_KP_Insert);\naddStandard(\"Paste\", KeyTable.XF86XK_Paste);\naddStandard(\"Redo\", KeyTable.XK_Redo);\naddStandard(\"Undo\", KeyTable.XK_Undo);\n\n// 2.6. UI Keys\n\n// - Accept\n// - Again (could just be XK_Redo)\n// - Attn\naddStandard(\"Cancel\", KeyTable.XK_Cancel);\naddStandard(\"ContextMenu\", KeyTable.XK_Menu);\naddStandard(\"Escape\", KeyTable.XK_Escape);\naddStandard(\"Execute\", KeyTable.XK_Execute);\naddStandard(\"Find\", KeyTable.XK_Find);\naddStandard(\"Help\", KeyTable.XK_Help);\naddStandard(\"Pause\", KeyTable.XK_Pause);\n// - Play\n// - Props\naddStandard(\"Select\", KeyTable.XK_Select);\naddStandard(\"ZoomIn\", KeyTable.XF86XK_ZoomIn);\naddStandard(\"ZoomOut\", KeyTable.XF86XK_ZoomOut);\n\n// 2.7. Device Keys\n\naddStandard(\"BrightnessDown\", KeyTable.XF86XK_MonBrightnessDown);\naddStandard(\"BrightnessUp\", KeyTable.XF86XK_MonBrightnessUp);\naddStandard(\"Eject\", KeyTable.XF86XK_Eject);\naddStandard(\"LogOff\", KeyTable.XF86XK_LogOff);\naddStandard(\"Power\", KeyTable.XF86XK_PowerOff);\naddStandard(\"PowerOff\", KeyTable.XF86XK_PowerDown);\naddStandard(\"PrintScreen\", KeyTable.XK_Print);\naddStandard(\"Hibernate\", KeyTable.XF86XK_Hibernate);\naddStandard(\"Standby\", KeyTable.XF86XK_Standby);\naddStandard(\"WakeUp\", KeyTable.XF86XK_WakeUp);\n\n// 2.8. IME and Composition Keys\n\naddStandard(\"AllCandidates\", KeyTable.XK_MultipleCandidate);\naddStandard(\"Alphanumeric\", KeyTable.XK_Eisu_Shift); // could also be _Eisu_Toggle\naddStandard(\"CodeInput\", KeyTable.XK_Codeinput);\naddStandard(\"Compose\", KeyTable.XK_Multi_key);\naddStandard(\"Convert\", KeyTable.XK_Henkan);\n// - Dead\n// - FinalMode\naddStandard(\"GroupFirst\", KeyTable.XK_ISO_First_Group);\naddStandard(\"GroupLast\", KeyTable.XK_ISO_Last_Group);\naddStandard(\"GroupNext\", KeyTable.XK_ISO_Next_Group);\naddStandard(\"GroupPrevious\", KeyTable.XK_ISO_Prev_Group);\n// - ModeChange (XK_Mode_switch is often used for AltGr)\n// - NextCandidate\naddStandard(\"NonConvert\", KeyTable.XK_Muhenkan);\naddStandard(\"PreviousCandidate\", KeyTable.XK_PreviousCandidate);\n// - Process\naddStandard(\"SingleCandidate\", KeyTable.XK_SingleCandidate);\naddStandard(\"HangulMode\", KeyTable.XK_Hangul);\naddStandard(\"HanjaMode\", KeyTable.XK_Hangul_Hanja);\naddStandard(\"JunjuaMode\", KeyTable.XK_Hangul_Jeonja);\naddStandard(\"Eisu\", KeyTable.XK_Eisu_toggle);\naddStandard(\"Hankaku\", KeyTable.XK_Hankaku);\naddStandard(\"Hiragana\", KeyTable.XK_Hiragana);\naddStandard(\"HiraganaKatakana\", KeyTable.XK_Hiragana_Katakana);\naddStandard(\"KanaMode\", KeyTable.XK_Kana_Shift); // could also be _Kana_Lock\naddStandard(\"KanjiMode\", KeyTable.XK_Kanji);\naddStandard(\"Katakana\", KeyTable.XK_Katakana);\naddStandard(\"Romaji\", KeyTable.XK_Romaji);\naddStandard(\"Zenkaku\", KeyTable.XK_Zenkaku);\naddStandard(\"ZenkakuHanaku\", KeyTable.XK_Zenkaku_Hankaku);\n\n// 2.9. General-Purpose Function Keys\n\naddStandard(\"F1\", KeyTable.XK_F1);\naddStandard(\"F2\", KeyTable.XK_F2);\naddStandard(\"F3\", KeyTable.XK_F3);\naddStandard(\"F4\", KeyTable.XK_F4);\naddStandard(\"F5\", KeyTable.XK_F5);\naddStandard(\"F6\", KeyTable.XK_F6);\naddStandard(\"F7\", KeyTable.XK_F7);\naddStandard(\"F8\", KeyTable.XK_F8);\naddStandard(\"F9\", KeyTable.XK_F9);\naddStandard(\"F10\", KeyTable.XK_F10);\naddStandard(\"F11\", KeyTable.XK_F11);\naddStandard(\"F12\", KeyTable.XK_F12);\naddStandard(\"F13\", KeyTable.XK_F13);\naddStandard(\"F14\", KeyTable.XK_F14);\naddStandard(\"F15\", KeyTable.XK_F15);\naddStandard(\"F16\", KeyTable.XK_F16);\naddStandard(\"F17\", KeyTable.XK_F17);\naddStandard(\"F18\", KeyTable.XK_F18);\naddStandard(\"F19\", KeyTable.XK_F19);\naddStandard(\"F20\", KeyTable.XK_F20);\naddStandard(\"F21\", KeyTable.XK_F21);\naddStandard(\"F22\", KeyTable.XK_F22);\naddStandard(\"F23\", KeyTable.XK_F23);\naddStandard(\"F24\", KeyTable.XK_F24);\naddStandard(\"F25\", KeyTable.XK_F25);\naddStandard(\"F26\", KeyTable.XK_F26);\naddStandard(\"F27\", KeyTable.XK_F27);\naddStandard(\"F28\", KeyTable.XK_F28);\naddStandard(\"F29\", KeyTable.XK_F29);\naddStandard(\"F30\", KeyTable.XK_F30);\naddStandard(\"F31\", KeyTable.XK_F31);\naddStandard(\"F32\", KeyTable.XK_F32);\naddStandard(\"F33\", KeyTable.XK_F33);\naddStandard(\"F34\", KeyTable.XK_F34);\naddStandard(\"F35\", KeyTable.XK_F35);\n// - Soft1...\n\n// 2.10. Multimedia Keys\n\n// - ChannelDown\n// - ChannelUp\naddStandard(\"Close\", KeyTable.XF86XK_Close);\naddStandard(\"MailForward\", KeyTable.XF86XK_MailForward);\naddStandard(\"MailReply\", KeyTable.XF86XK_Reply);\naddStandard(\"MainSend\", KeyTable.XF86XK_Send);\naddStandard(\"MediaFastForward\", KeyTable.XF86XK_AudioForward);\naddStandard(\"MediaPause\", KeyTable.XF86XK_AudioPause);\naddStandard(\"MediaPlay\", KeyTable.XF86XK_AudioPlay);\naddStandard(\"MediaRecord\", KeyTable.XF86XK_AudioRecord);\naddStandard(\"MediaRewind\", KeyTable.XF86XK_AudioRewind);\naddStandard(\"MediaStop\", KeyTable.XF86XK_AudioStop);\naddStandard(\"MediaTrackNext\", KeyTable.XF86XK_AudioNext);\naddStandard(\"MediaTrackPrevious\", KeyTable.XF86XK_AudioPrev);\naddStandard(\"New\", KeyTable.XF86XK_New);\naddStandard(\"Open\", KeyTable.XF86XK_Open);\naddStandard(\"Print\", KeyTable.XK_Print);\naddStandard(\"Save\", KeyTable.XF86XK_Save);\naddStandard(\"SpellCheck\", KeyTable.XF86XK_Spell);\n\n// 2.11. Multimedia Numpad Keys\n\n// - Key11\n// - Key12\n\n// 2.12. Audio Keys\n\n// - AudioBalanceLeft\n// - AudioBalanceRight\n// - AudioBassDown\n// - AudioBassBoostDown\n// - AudioBassBoostToggle\n// - AudioBassBoostUp\n// - AudioBassUp\n// - AudioFaderFront\n// - AudioFaderRear\n// - AudioSurroundModeNext\n// - AudioTrebleDown\n// - AudioTrebleUp\naddStandard(\"AudioVolumeDown\", KeyTable.XF86XK_AudioLowerVolume);\naddStandard(\"AudioVolumeUp\", KeyTable.XF86XK_AudioRaiseVolume);\naddStandard(\"AudioVolumeMute\", KeyTable.XF86XK_AudioMute);\n// - MicrophoneToggle\n// - MicrophoneVolumeDown\n// - MicrophoneVolumeUp\naddStandard(\"MicrophoneVolumeMute\", KeyTable.XF86XK_AudioMicMute);\n\n// 2.13. Speech Keys\n\n// - SpeechCorrectionList\n// - SpeechInputToggle\n\n// 2.14. Application Keys\n\naddStandard(\"LaunchCalculator\", KeyTable.XF86XK_Calculator);\naddStandard(\"LaunchCalendar\", KeyTable.XF86XK_Calendar);\naddStandard(\"LaunchMail\", KeyTable.XF86XK_Mail);\naddStandard(\"LaunchMediaPlayer\", KeyTable.XF86XK_AudioMedia);\naddStandard(\"LaunchMusicPlayer\", KeyTable.XF86XK_Music);\naddStandard(\"LaunchMyComputer\", KeyTable.XF86XK_MyComputer);\naddStandard(\"LaunchPhone\", KeyTable.XF86XK_Phone);\naddStandard(\"LaunchScreenSaver\", KeyTable.XF86XK_ScreenSaver);\naddStandard(\"LaunchSpreadsheet\", KeyTable.XF86XK_Excel);\naddStandard(\"LaunchWebBrowser\", KeyTable.XF86XK_WWW);\naddStandard(\"LaunchWebCam\", KeyTable.XF86XK_WebCam);\naddStandard(\"LaunchWordProcessor\", KeyTable.XF86XK_Word);\n\n// 2.15. Browser Keys\n\naddStandard(\"BrowserBack\", KeyTable.XF86XK_Back);\naddStandard(\"BrowserFavorites\", KeyTable.XF86XK_Favorites);\naddStandard(\"BrowserForward\", KeyTable.XF86XK_Forward);\naddStandard(\"BrowserHome\", KeyTable.XF86XK_HomePage);\naddStandard(\"BrowserRefresh\", KeyTable.XF86XK_Refresh);\naddStandard(\"BrowserSearch\", KeyTable.XF86XK_Search);\naddStandard(\"BrowserStop\", KeyTable.XF86XK_Stop);\n\n// 2.16. Mobile Phone Keys\n\n// - A whole bunch...\n\n// 2.17. TV Keys\n\n// - A whole bunch...\n\n// 2.18. Media Controller Keys\n\n// - A whole bunch...\naddStandard(\"Dimmer\", KeyTable.XF86XK_BrightnessAdjust);\naddStandard(\"MediaAudioTrack\", KeyTable.XF86XK_AudioCycleTrack);\naddStandard(\"RandomToggle\", KeyTable.XF86XK_AudioRandomPlay);\naddStandard(\"SplitScreenToggle\", KeyTable.XF86XK_SplitScreen);\naddStandard(\"Subtitle\", KeyTable.XF86XK_Subtitle);\naddStandard(\"VideoModeNext\", KeyTable.XF86XK_Next_VMode);\n\n// Extra: Numpad\n\naddNumpad(\"=\", KeyTable.XK_equal, KeyTable.XK_KP_Equal);\naddNumpad(\"+\", KeyTable.XK_plus, KeyTable.XK_KP_Add);\naddNumpad(\"-\", KeyTable.XK_minus, KeyTable.XK_KP_Subtract);\naddNumpad(\"*\", KeyTable.XK_asterisk, KeyTable.XK_KP_Multiply);\naddNumpad(\"/\", KeyTable.XK_slash, KeyTable.XK_KP_Divide);\naddNumpad(\".\", KeyTable.XK_period, KeyTable.XK_KP_Decimal);\naddNumpad(\",\", KeyTable.XK_comma, KeyTable.XK_KP_Separator);\naddNumpad(\"0\", KeyTable.XK_0, KeyTable.XK_KP_0);\naddNumpad(\"1\", KeyTable.XK_1, KeyTable.XK_KP_1);\naddNumpad(\"2\", KeyTable.XK_2, KeyTable.XK_KP_2);\naddNumpad(\"3\", KeyTable.XK_3, KeyTable.XK_KP_3);\naddNumpad(\"4\", KeyTable.XK_4, KeyTable.XK_KP_4);\naddNumpad(\"5\", KeyTable.XK_5, KeyTable.XK_KP_5);\naddNumpad(\"6\", KeyTable.XK_6, KeyTable.XK_KP_6);\naddNumpad(\"7\", KeyTable.XK_7, KeyTable.XK_KP_7);\naddNumpad(\"8\", KeyTable.XK_8, KeyTable.XK_KP_8);\naddNumpad(\"9\", KeyTable.XK_9, KeyTable.XK_KP_9);\n\n// Get 'KeyboardEvent.code', handling legacy browsers\nfunction getKeycode(evt) {\n    // Are we getting proper key identifiers?\n    // (unfortunately Firefox and Chrome are crappy here and gives\n    // us an empty string on some platforms, rather than leaving it\n    // undefined)\n    if (evt.code) {\n        // Mozilla isn't fully in sync with the spec yet\n        switch (evt.code) {\n            case 'OSLeft':\n                return 'MetaLeft';\n            case 'OSRight':\n                return 'MetaRight';\n        }\n\n        return evt.code;\n    }\n\n    // The de-facto standard is to use Windows Virtual-Key codes\n    // in the 'keyCode' field for non-printable characters. However\n    // Webkit sets it to the same as charCode in 'keypress' events.\n    if (evt.type !== 'keypress' && evt.keyCode in vkeys) {\n        var code = vkeys[evt.keyCode];\n\n        // macOS has messed up this code for some reason\n        if (isMac() && code === 'ContextMenu') {\n            code = 'MetaRight';\n        }\n\n        // The keyCode doesn't distinguish between left and right\n        // for the standard modifiers\n        if (evt.location === 2) {\n            switch (code) {\n                case 'ShiftLeft':\n                    return 'ShiftRight';\n                case 'ControlLeft':\n                    return 'ControlRight';\n                case 'AltLeft':\n                    return 'AltRight';\n            }\n        }\n\n        // Nor a bunch of the numpad keys\n        if (evt.location === 3) {\n            switch (code) {\n                case 'Delete':\n                    return 'NumpadDecimal';\n                case 'Insert':\n                    return 'Numpad0';\n                case 'End':\n                    return 'Numpad1';\n                case 'ArrowDown':\n                    return 'Numpad2';\n                case 'PageDown':\n                    return 'Numpad3';\n                case 'ArrowLeft':\n                    return 'Numpad4';\n                case 'ArrowRight':\n                    return 'Numpad6';\n                case 'Home':\n                    return 'Numpad7';\n                case 'ArrowUp':\n                    return 'Numpad8';\n                case 'PageUp':\n                    return 'Numpad9';\n                case 'Enter':\n                    return 'NumpadEnter';\n            }\n        }\n\n        return code;\n    }\n\n    return 'Unidentified';\n}\n\n// Get 'KeyboardEvent.key', handling legacy browsers\nfunction getKey(evt) {\n    // Are we getting a proper key value?\n    if (evt.key !== undefined) {\n        // IE and Edge use some ancient version of the spec\n        // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/\n        switch (evt.key) {\n            case 'Spacebar':\n                return ' ';\n            case 'Esc':\n                return 'Escape';\n            case 'Scroll':\n                return 'ScrollLock';\n            case 'Win':\n                return 'Meta';\n            case 'Apps':\n                return 'ContextMenu';\n            case 'Up':\n                return 'ArrowUp';\n            case 'Left':\n                return 'ArrowLeft';\n            case 'Right':\n                return 'ArrowRight';\n            case 'Down':\n                return 'ArrowDown';\n            case 'Del':\n                return 'Delete';\n            case 'Divide':\n                return '/';\n            case 'Multiply':\n                return '*';\n            case 'Subtract':\n                return '-';\n            case 'Add':\n                return '+';\n            case 'Decimal':\n                return evt.char;\n        }\n\n        // Mozilla isn't fully in sync with the spec yet\n        switch (evt.key) {\n            case 'OS':\n                return 'Meta';\n        }\n\n        // iOS leaks some OS names\n        switch (evt.key) {\n            case 'UIKeyInputUpArrow':\n                return 'ArrowUp';\n            case 'UIKeyInputDownArrow':\n                return 'ArrowDown';\n            case 'UIKeyInputLeftArrow':\n                return 'ArrowLeft';\n            case 'UIKeyInputRightArrow':\n                return 'ArrowRight';\n            case 'UIKeyInputEscape':\n                return 'Escape';\n        }\n\n        // IE and Edge have broken handling of AltGraph so we cannot\n        // trust them for printable characters\n        if (evt.key.length !== 1 || !isIE() && !isEdge()) {\n            return evt.key;\n        }\n    }\n\n    // Try to deduce it based on the physical key\n    var code = getKeycode(evt);\n    if (code in fixedkeys) {\n        return fixedkeys[code];\n    }\n\n    // If that failed, then see if we have a printable character\n    if (evt.charCode) {\n        return String.fromCharCode(evt.charCode);\n    }\n\n    // At this point we have nothing left to go on\n    return 'Unidentified';\n}\n\n// Get the most reliable keysym value we can get from a key event\nfunction getKeysym(evt) {\n    var key = getKey(evt);\n\n    if (key === 'Unidentified') {\n        return null;\n    }\n\n    // First look up special keys\n    if (key in DOMKeyTable) {\n        var location = evt.location;\n\n        // Safari screws up location for the right cmd key\n        if (key === 'Meta' && location === 0) {\n            location = 2;\n        }\n\n        if (location === undefined || location > 3) {\n            location = 0;\n        }\n\n        return DOMKeyTable[key][location];\n    }\n\n    // Now we need to look at the Unicode symbol instead\n\n    var codepoint;\n\n    // Special key? (FIXME: Should have been caught earlier)\n    if (key.length !== 1) {\n        return null;\n    }\n\n    codepoint = key.charCodeAt();\n    if (codepoint) {\n        return keysyms.lookup(codepoint);\n    }\n\n    return null;\n}\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2012 Joel Martin\n * Copyright (C) 2013 Samuel Mannehed for Cendio AB\n * Licensed under MPL 2.0 or any later version (see LICENSE.txt)\n */\n\n//\n// Keyboard event handler\n//\n\nfunction Keyboard(target) {\n    this._target = target || null;\n\n    this._keyDownList = {}; // List of depressed keys\n    // (even if they are happy)\n    this._pendingKey = null; // Key waiting for keypress\n\n    // keep these here so we can refer to them later\n    this._eventHandlers = {\n        'keyup': this._handleKeyUp.bind(this),\n        'keydown': this._handleKeyDown.bind(this),\n        'keypress': this._handleKeyPress.bind(this),\n        'blur': this._allKeysUp.bind(this)\n    };\n}\n\nKeyboard.prototype = {\n    // ===== EVENT HANDLERS =====\n\n    onkeyevent: function onkeyevent() {}, // Handler for key press/release\n\n    // ===== PRIVATE METHODS =====\n\n    _sendKeyEvent: function _sendKeyEvent(keysym, code, down) {\n        Debug(\"onkeyevent \" + (down ? \"down\" : \"up\") + \", keysym: \" + keysym, \", code: \" + code);\n\n        // Windows sends CtrlLeft+AltRight when you press\n        // AltGraph, which tends to confuse the hell out of\n        // remote systems. Fake a release of these keys until\n        // there is a way to detect AltGraph properly.\n        var fakeAltGraph = false;\n        if (down && isWindows()) {\n            if (code !== 'ControlLeft' && code !== 'AltRight' && 'ControlLeft' in this._keyDownList && 'AltRight' in this._keyDownList) {\n                fakeAltGraph = true;\n                this.onkeyevent(this._keyDownList['AltRight'], 'AltRight', false);\n                this.onkeyevent(this._keyDownList['ControlLeft'], 'ControlLeft', false);\n            }\n        }\n\n        this.onkeyevent(keysym, code, down);\n\n        if (fakeAltGraph) {\n            this.onkeyevent(this._keyDownList['ControlLeft'], 'ControlLeft', true);\n            this.onkeyevent(this._keyDownList['AltRight'], 'AltRight', true);\n        }\n    },\n\n    _getKeyCode: function _getKeyCode(e) {\n        var code = getKeycode(e);\n        if (code !== 'Unidentified') {\n            return code;\n        }\n\n        // Unstable, but we don't have anything else to go on\n        // (don't use it for 'keypress' events thought since\n        // WebKit sets it to the same as charCode)\n        if (e.keyCode && e.type !== 'keypress') {\n            // 229 is used for composition events\n            if (e.keyCode !== 229) {\n                return 'Platform' + e.keyCode;\n            }\n        }\n\n        // A precursor to the final DOM3 standard. Unfortunately it\n        // is not layout independent, so it is as bad as using keyCode\n        if (e.keyIdentifier) {\n            // Non-character key?\n            if (e.keyIdentifier.substr(0, 2) !== 'U+') {\n                return e.keyIdentifier;\n            }\n\n            var codepoint = parseInt(e.keyIdentifier.substr(2), 16);\n            var char = String.fromCharCode(codepoint);\n            // Some implementations fail to uppercase the symbols\n            char = char.toUpperCase();\n\n            return 'Platform' + char.charCodeAt();\n        }\n\n        return 'Unidentified';\n    },\n\n    _handleKeyDown: function _handleKeyDown(e) {\n        var code = this._getKeyCode(e);\n        var keysym = getKeysym(e);\n\n        // We cannot handle keys we cannot track, but we also need\n        // to deal with virtual keyboards which omit key info\n        // (iOS omits tracking info on keyup events, which forces us to\n        // special treat that platform here)\n        if (code === 'Unidentified' || isIOS()) {\n            if (keysym) {\n                // If it's a virtual keyboard then it should be\n                // sufficient to just send press and release right\n                // after each other\n                this._sendKeyEvent(keysym, code, true);\n                this._sendKeyEvent(keysym, code, false);\n            }\n\n            stopEvent(e);\n            return;\n        }\n\n        // Alt behaves more like AltGraph on macOS, so shuffle the\n        // keys around a bit to make things more sane for the remote\n        // server. This method is used by RealVNC and TigerVNC (and\n        // possibly others).\n        if (isMac()) {\n            switch (keysym) {\n                case KeyTable.XK_Super_L:\n                    keysym = KeyTable.XK_Alt_L;\n                    break;\n                case KeyTable.XK_Super_R:\n                    keysym = KeyTable.XK_Super_L;\n                    break;\n                case KeyTable.XK_Alt_L:\n                    keysym = KeyTable.XK_Mode_switch;\n                    break;\n                case KeyTable.XK_Alt_R:\n                    keysym = KeyTable.XK_ISO_Level3_Shift;\n                    break;\n            }\n        }\n\n        // Is this key already pressed? If so, then we must use the\n        // same keysym or we'll confuse the server\n        if (code in this._keyDownList) {\n            keysym = this._keyDownList[code];\n        }\n\n        // macOS doesn't send proper key events for modifiers, only\n        // state change events. That gets extra confusing for CapsLock\n        // which toggles on each press, but not on release. So pretend\n        // it was a quick press and release of the button.\n        if (isMac() && code === 'CapsLock') {\n            this._sendKeyEvent(KeyTable.XK_Caps_Lock, 'CapsLock', true);\n            this._sendKeyEvent(KeyTable.XK_Caps_Lock, 'CapsLock', false);\n            stopEvent(e);\n            return;\n        }\n\n        // If this is a legacy browser then we'll need to wait for\n        // a keypress event as well\n        // (IE and Edge has a broken KeyboardEvent.key, so we can't\n        // just check for the presence of that field)\n        if (!keysym && (!e.key || isIE() || isEdge())) {\n            this._pendingKey = code;\n            // However we might not get a keypress event if the key\n            // is non-printable, which needs some special fallback\n            // handling\n            setTimeout(this._handleKeyPressTimeout.bind(this), 10, e);\n            return;\n        }\n\n        this._pendingKey = null;\n        stopEvent(e);\n\n        this._keyDownList[code] = keysym;\n\n        this._sendKeyEvent(keysym, code, true);\n    },\n\n    // Legacy event for browsers without code/key\n    _handleKeyPress: function _handleKeyPress(e) {\n        stopEvent(e);\n\n        // Are we expecting a keypress?\n        if (this._pendingKey === null) {\n            return;\n        }\n\n        var code = this._getKeyCode(e);\n        var keysym = getKeysym(e);\n\n        // The key we were waiting for?\n        if (code !== 'Unidentified' && code != this._pendingKey) {\n            return;\n        }\n\n        code = this._pendingKey;\n        this._pendingKey = null;\n\n        if (!keysym) {\n            Info('keypress with no keysym:', e);\n            return;\n        }\n\n        this._keyDownList[code] = keysym;\n\n        this._sendKeyEvent(keysym, code, true);\n    },\n    _handleKeyPressTimeout: function _handleKeyPressTimeout(e) {\n        // Did someone manage to sort out the key already?\n        if (this._pendingKey === null) {\n            return;\n        }\n\n        var code, keysym;\n\n        code = this._pendingKey;\n        this._pendingKey = null;\n\n        // We have no way of knowing the proper keysym with the\n        // information given, but the following are true for most\n        // layouts\n        if (e.keyCode >= 0x30 && e.keyCode <= 0x39) {\n            // Digit\n            keysym = e.keyCode;\n        } else if (e.keyCode >= 0x41 && e.keyCode <= 0x5a) {\n            // Character (A-Z)\n            var char = String.fromCharCode(e.keyCode);\n            // A feeble attempt at the correct case\n            if (e.shiftKey) char = char.toUpperCase();else char = char.toLowerCase();\n            keysym = char.charCodeAt();\n        } else {\n            // Unknown, give up\n            keysym = 0;\n        }\n\n        this._keyDownList[code] = keysym;\n\n        this._sendKeyEvent(keysym, code, true);\n    },\n\n    _handleKeyUp: function _handleKeyUp(e) {\n        stopEvent(e);\n\n        var code = this._getKeyCode(e);\n\n        // See comment in _handleKeyDown()\n        if (isMac() && code === 'CapsLock') {\n            this._sendKeyEvent(KeyTable.XK_Caps_Lock, 'CapsLock', true);\n            this._sendKeyEvent(KeyTable.XK_Caps_Lock, 'CapsLock', false);\n            return;\n        }\n\n        // Do we really think this key is down?\n        if (!(code in this._keyDownList)) {\n            return;\n        }\n\n        this._sendKeyEvent(this._keyDownList[code], code, false);\n\n        delete this._keyDownList[code];\n    },\n\n    _allKeysUp: function _allKeysUp() {\n        Debug(\">> Keyboard.allKeysUp\");\n        for (var code in this._keyDownList) {\n            this._sendKeyEvent(this._keyDownList[code], code, false);\n        }\n        this._keyDownList = {};\n        Debug(\"<< Keyboard.allKeysUp\");\n    },\n\n    // ===== PUBLIC METHODS =====\n\n    grab: function grab() {\n        //Log.Debug(\">> Keyboard.grab\");\n        var c = this._target;\n\n        c.addEventListener('keydown', this._eventHandlers.keydown);\n        c.addEventListener('keyup', this._eventHandlers.keyup);\n        c.addEventListener('keypress', this._eventHandlers.keypress);\n\n        // Release (key up) if window loses focus\n        window.addEventListener('blur', this._eventHandlers.blur);\n\n        //Log.Debug(\"<< Keyboard.grab\");\n    },\n\n    ungrab: function ungrab() {\n        //Log.Debug(\">> Keyboard.ungrab\");\n        var c = this._target;\n\n        c.removeEventListener('keydown', this._eventHandlers.keydown);\n        c.removeEventListener('keyup', this._eventHandlers.keyup);\n        c.removeEventListener('keypress', this._eventHandlers.keypress);\n        window.removeEventListener('blur', this._eventHandlers.blur);\n\n        // Release (key up) all keys that are in a down state\n        this._allKeysUp();\n\n        //Log.Debug(\">> Keyboard.ungrab\");\n    }\n};\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2012 Joel Martin\n * Copyright (C) 2013 Samuel Mannehed for Cendio AB\n * Licensed under MPL 2.0 or any later version (see LICENSE.txt)\n */\n\nvar WHEEL_STEP = 10; // Delta threshold for a mouse wheel step\nvar WHEEL_STEP_TIMEOUT = 50; // ms\nvar WHEEL_LINE_HEIGHT = 19;\n\nfunction Mouse(target) {\n    this._target = target || document;\n\n    this._doubleClickTimer = null;\n    this._lastTouchPos = null;\n\n    this._pos = null;\n    this._wheelStepXTimer = null;\n    this._wheelStepYTimer = null;\n    this._accumulatedWheelDeltaX = 0;\n    this._accumulatedWheelDeltaY = 0;\n\n    this._eventHandlers = {\n        'mousedown': this._handleMouseDown.bind(this),\n        'mouseup': this._handleMouseUp.bind(this),\n        'mousemove': this._handleMouseMove.bind(this),\n        'mousewheel': this._handleMouseWheel.bind(this),\n        'mousedisable': this._handleMouseDisable.bind(this)\n    };\n}\n\nMouse.prototype = {\n    // ===== PROPERTIES =====\n\n    touchButton: 1, // Button mask (1, 2, 4) for touch devices (0 means ignore clicks)\n\n    // ===== EVENT HANDLERS =====\n\n    onmousebutton: function onmousebutton() {}, // Handler for mouse button click/release\n    onmousemove: function onmousemove() {}, // Handler for mouse movement\n\n    // ===== PRIVATE METHODS =====\n\n    _resetDoubleClickTimer: function _resetDoubleClickTimer() {\n        this._doubleClickTimer = null;\n    },\n\n    _handleMouseButton: function _handleMouseButton(e, down) {\n        this._updateMousePosition(e);\n        var pos = this._pos;\n\n        var bmask;\n        if (e.touches || e.changedTouches) {\n            // Touch device\n\n            // When two touches occur within 500 ms of each other and are\n            // close enough together a double click is triggered.\n            if (down == 1) {\n                if (this._doubleClickTimer === null) {\n                    this._lastTouchPos = pos;\n                } else {\n                    clearTimeout(this._doubleClickTimer);\n\n                    // When the distance between the two touches is small enough\n                    // force the position of the latter touch to the position of\n                    // the first.\n\n                    var xs = this._lastTouchPos.x - pos.x;\n                    var ys = this._lastTouchPos.y - pos.y;\n                    var d = Math.sqrt(xs * xs + ys * ys);\n\n                    // The goal is to trigger on a certain physical width, the\n                    // devicePixelRatio brings us a bit closer but is not optimal.\n                    var threshold = 20 * (window.devicePixelRatio || 1);\n                    if (d < threshold) {\n                        pos = this._lastTouchPos;\n                    }\n                }\n                this._doubleClickTimer = setTimeout(this._resetDoubleClickTimer.bind(this), 500);\n            }\n            bmask = this.touchButton;\n            // If bmask is set\n        } else if (e.which) {\n            /* everything except IE */\n            bmask = 1 << e.button;\n        } else {\n            /* IE including 9 */\n            bmask = (e.button & 0x1) + // Left\n            (e.button & 0x2) * 2 + // Right\n            (e.button & 0x4) / 2; // Middle\n        }\n\n        Debug(\"onmousebutton \" + (down ? \"down\" : \"up\") + \", x: \" + pos.x + \", y: \" + pos.y + \", bmask: \" + bmask);\n        this.onmousebutton(pos.x, pos.y, down, bmask);\n\n        stopEvent(e);\n    },\n\n    _handleMouseDown: function _handleMouseDown(e) {\n        // Touch events have implicit capture\n        if (e.type === \"mousedown\") {\n            setCapture(this._target);\n        }\n\n        this._handleMouseButton(e, 1);\n    },\n\n    _handleMouseUp: function _handleMouseUp(e) {\n        this._handleMouseButton(e, 0);\n    },\n\n    // Mouse wheel events are sent in steps over VNC. This means that the VNC\n    // protocol can't handle a wheel event with specific distance or speed.\n    // Therefor, if we get a lot of small mouse wheel events we combine them.\n    _generateWheelStepX: function _generateWheelStepX() {\n\n        if (this._accumulatedWheelDeltaX < 0) {\n            this.onmousebutton(this._pos.x, this._pos.y, 1, 1 << 5);\n            this.onmousebutton(this._pos.x, this._pos.y, 0, 1 << 5);\n        } else if (this._accumulatedWheelDeltaX > 0) {\n            this.onmousebutton(this._pos.x, this._pos.y, 1, 1 << 6);\n            this.onmousebutton(this._pos.x, this._pos.y, 0, 1 << 6);\n        }\n\n        this._accumulatedWheelDeltaX = 0;\n    },\n\n    _generateWheelStepY: function _generateWheelStepY() {\n\n        if (this._accumulatedWheelDeltaY < 0) {\n            this.onmousebutton(this._pos.x, this._pos.y, 1, 1 << 3);\n            this.onmousebutton(this._pos.x, this._pos.y, 0, 1 << 3);\n        } else if (this._accumulatedWheelDeltaY > 0) {\n            this.onmousebutton(this._pos.x, this._pos.y, 1, 1 << 4);\n            this.onmousebutton(this._pos.x, this._pos.y, 0, 1 << 4);\n        }\n\n        this._accumulatedWheelDeltaY = 0;\n    },\n\n    _resetWheelStepTimers: function _resetWheelStepTimers() {\n        window.clearTimeout(this._wheelStepXTimer);\n        window.clearTimeout(this._wheelStepYTimer);\n        this._wheelStepXTimer = null;\n        this._wheelStepYTimer = null;\n    },\n\n    _handleMouseWheel: function _handleMouseWheel(e) {\n        this._resetWheelStepTimers();\n\n        this._updateMousePosition(e);\n\n        var dX = e.deltaX;\n        var dY = e.deltaY;\n\n        // Pixel units unless it's non-zero.\n        // Note that if deltamode is line or page won't matter since we aren't\n        // sending the mouse wheel delta to the server anyway.\n        // The difference between pixel and line can be important however since\n        // we have a threshold that can be smaller than the line height.\n        if (e.deltaMode !== 0) {\n            dX *= WHEEL_LINE_HEIGHT;\n            dY *= WHEEL_LINE_HEIGHT;\n        }\n\n        this._accumulatedWheelDeltaX += dX;\n        this._accumulatedWheelDeltaY += dY;\n\n        // Generate a mouse wheel step event when the accumulated delta\n        // for one of the axes is large enough.\n        // Small delta events that do not pass the threshold get sent\n        // after a timeout.\n        if (Math.abs(this._accumulatedWheelDeltaX) > WHEEL_STEP) {\n            this._generateWheelStepX();\n        } else {\n            this._wheelStepXTimer = window.setTimeout(this._generateWheelStepX.bind(this), WHEEL_STEP_TIMEOUT);\n        }\n        if (Math.abs(this._accumulatedWheelDeltaY) > WHEEL_STEP) {\n            this._generateWheelStepY();\n        } else {\n            this._wheelStepYTimer = window.setTimeout(this._generateWheelStepY.bind(this), WHEEL_STEP_TIMEOUT);\n        }\n\n        stopEvent(e);\n    },\n\n    _handleMouseMove: function _handleMouseMove(e) {\n        this._updateMousePosition(e);\n        this.onmousemove(this._pos.x, this._pos.y);\n        stopEvent(e);\n    },\n\n    _handleMouseDisable: function _handleMouseDisable(e) {\n        /*\n         * Stop propagation if inside canvas area\n         * Note: This is only needed for the 'click' event as it fails\n         *       to fire properly for the target element so we have\n         *       to listen on the document element instead.\n         */\n        if (e.target == this._target) {\n            stopEvent(e);\n        }\n    },\n\n    // Update coordinates relative to target\n    _updateMousePosition: function _updateMousePosition(e) {\n        e = getPointerEvent(e);\n        var bounds = this._target.getBoundingClientRect();\n        var x, y;\n        // Clip to target bounds\n        if (e.clientX < bounds.left) {\n            x = 0;\n        } else if (e.clientX >= bounds.right) {\n            x = bounds.width - 1;\n        } else {\n            x = e.clientX - bounds.left;\n        }\n        if (e.clientY < bounds.top) {\n            y = 0;\n        } else if (e.clientY >= bounds.bottom) {\n            y = bounds.height - 1;\n        } else {\n            y = e.clientY - bounds.top;\n        }\n        this._pos = { x: x, y: y };\n    },\n\n    // ===== PUBLIC METHODS =====\n\n    grab: function grab() {\n        var c = this._target;\n\n        if (isTouchDevice) {\n            c.addEventListener('touchstart', this._eventHandlers.mousedown);\n            c.addEventListener('touchend', this._eventHandlers.mouseup);\n            c.addEventListener('touchmove', this._eventHandlers.mousemove);\n        }\n        c.addEventListener('mousedown', this._eventHandlers.mousedown);\n        c.addEventListener('mouseup', this._eventHandlers.mouseup);\n        c.addEventListener('mousemove', this._eventHandlers.mousemove);\n        c.addEventListener('wheel', this._eventHandlers.mousewheel);\n\n        /* Prevent middle-click pasting (see above for why we bind to document) */\n        document.addEventListener('click', this._eventHandlers.mousedisable);\n\n        /* preventDefault() on mousedown doesn't stop this event for some\n           reason so we have to explicitly block it */\n        c.addEventListener('contextmenu', this._eventHandlers.mousedisable);\n    },\n\n    ungrab: function ungrab() {\n        var c = this._target;\n\n        this._resetWheelStepTimers();\n\n        if (isTouchDevice) {\n            c.removeEventListener('touchstart', this._eventHandlers.mousedown);\n            c.removeEventListener('touchend', this._eventHandlers.mouseup);\n            c.removeEventListener('touchmove', this._eventHandlers.mousemove);\n        }\n        c.removeEventListener('mousedown', this._eventHandlers.mousedown);\n        c.removeEventListener('mouseup', this._eventHandlers.mouseup);\n        c.removeEventListener('mousemove', this._eventHandlers.mousemove);\n        c.removeEventListener('wheel', this._eventHandlers.mousewheel);\n\n        document.removeEventListener('click', this._eventHandlers.mousedisable);\n\n        c.removeEventListener('contextmenu', this._eventHandlers.mousedisable);\n    }\n};\n\n/*\n * Websock: high-performance binary WebSockets\n * Copyright (C) 2012 Joel Martin\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * Websock is similar to the standard WebSocket object but with extra\n * buffer handling.\n *\n * Websock has built-in receive queue buffering; the message event\n * does not contain actual data but is simply a notification that\n * there is new data available. Several rQ* methods are available to\n * read binary data off of the receive queue.\n */\n\nfunction Websock() {\n    \"use strict\";\n\n    this._websocket = null; // WebSocket object\n\n    this._rQi = 0; // Receive queue index\n    this._rQlen = 0; // Next write position in the receive queue\n    this._rQbufferSize = 1024 * 1024 * 4; // Receive queue buffer size (4 MiB)\n    this._rQmax = this._rQbufferSize / 8;\n    // called in init: this._rQ = new Uint8Array(this._rQbufferSize);\n    this._rQ = null; // Receive queue\n\n    this._sQbufferSize = 1024 * 10; // 10 KiB\n    // called in init: this._sQ = new Uint8Array(this._sQbufferSize);\n    this._sQlen = 0;\n    this._sQ = null; // Send queue\n\n    this._eventHandlers = {\n        'message': function message() {},\n        'open': function open() {},\n        'close': function close() {},\n        'error': function error() {}\n    };\n}\n\n// this has performance issues in some versions Chromium, and\n// doesn't gain a tremendous amount of performance increase in Firefox\n// at the moment.  It may be valuable to turn it on in the future.\nvar ENABLE_COPYWITHIN = false;\n\nvar MAX_RQ_GROW_SIZE = 40 * 1024 * 1024; // 40 MiB\n\nvar typedArrayToString = function () {\n    // This is only for PhantomJS, which doesn't like apply-ing\n    // with Typed Arrays\n    try {\n        var arr = new Uint8Array([1, 2, 3]);\n        String.fromCharCode.apply(null, arr);\n        return function (a) {\n            return String.fromCharCode.apply(null, a);\n        };\n    } catch (ex) {\n        return function (a) {\n            return String.fromCharCode.apply(null, Array.prototype.slice.call(a));\n        };\n    }\n}();\n\nWebsock.prototype = {\n    // Getters and Setters\n    get_sQ: function get_sQ() {\n        return this._sQ;\n    },\n\n    get_rQ: function get_rQ() {\n        return this._rQ;\n    },\n\n    get_rQi: function get_rQi() {\n        return this._rQi;\n    },\n\n    set_rQi: function set_rQi(val) {\n        this._rQi = val;\n    },\n\n    // Receive Queue\n    rQlen: function rQlen() {\n        return this._rQlen - this._rQi;\n    },\n\n    rQpeek8: function rQpeek8() {\n        return this._rQ[this._rQi];\n    },\n\n    rQshift8: function rQshift8() {\n        return this._rQ[this._rQi++];\n    },\n\n    rQskip8: function rQskip8() {\n        this._rQi++;\n    },\n\n    rQskipBytes: function rQskipBytes(num) {\n        this._rQi += num;\n    },\n\n    // TODO(directxman12): test performance with these vs a DataView\n    rQshift16: function rQshift16() {\n        return (this._rQ[this._rQi++] << 8) + this._rQ[this._rQi++];\n    },\n\n    rQshift32: function rQshift32() {\n        return (this._rQ[this._rQi++] << 24) + (this._rQ[this._rQi++] << 16) + (this._rQ[this._rQi++] << 8) + this._rQ[this._rQi++];\n    },\n\n    rQshiftStr: function rQshiftStr(len) {\n        if (typeof len === 'undefined') {\n            len = this.rQlen();\n        }\n        var arr = new Uint8Array(this._rQ.buffer, this._rQi, len);\n        this._rQi += len;\n        return typedArrayToString(arr);\n    },\n\n    rQshiftBytes: function rQshiftBytes(len) {\n        if (typeof len === 'undefined') {\n            len = this.rQlen();\n        }\n        this._rQi += len;\n        return new Uint8Array(this._rQ.buffer, this._rQi - len, len);\n    },\n\n    rQshiftTo: function rQshiftTo(target, len) {\n        if (len === undefined) {\n            len = this.rQlen();\n        }\n        // TODO: make this just use set with views when using a ArrayBuffer to store the rQ\n        target.set(new Uint8Array(this._rQ.buffer, this._rQi, len));\n        this._rQi += len;\n    },\n\n    rQwhole: function rQwhole() {\n        return new Uint8Array(this._rQ.buffer, 0, this._rQlen);\n    },\n\n    rQslice: function rQslice(start, end) {\n        if (end) {\n            return new Uint8Array(this._rQ.buffer, this._rQi + start, end - start);\n        } else {\n            return new Uint8Array(this._rQ.buffer, this._rQi + start, this._rQlen - this._rQi - start);\n        }\n    },\n\n    // Check to see if we must wait for 'num' bytes (default to FBU.bytes)\n    // to be available in the receive queue. Return true if we need to\n    // wait (and possibly print a debug message), otherwise false.\n    rQwait: function rQwait(msg, num, goback) {\n        var rQlen = this._rQlen - this._rQi; // Skip rQlen() function call\n        if (rQlen < num) {\n            if (goback) {\n                if (this._rQi < goback) {\n                    throw new Error(\"rQwait cannot backup \" + goback + \" bytes\");\n                }\n                this._rQi -= goback;\n            }\n            return true; // true means need more data\n        }\n        return false;\n    },\n\n    // Send Queue\n\n    flush: function flush() {\n        if (this._sQlen > 0 && this._websocket.readyState === WebSocket.OPEN) {\n            this._websocket.send(this._encode_message());\n            this._sQlen = 0;\n        }\n    },\n\n    send: function send(arr) {\n        this._sQ.set(arr, this._sQlen);\n        this._sQlen += arr.length;\n        this.flush();\n    },\n\n    send_string: function send_string(str) {\n        this.send(str.split('').map(function (chr) {\n            return chr.charCodeAt(0);\n        }));\n    },\n\n    // Event Handlers\n    off: function off(evt) {\n        this._eventHandlers[evt] = function () {};\n    },\n\n    on: function on(evt, handler) {\n        this._eventHandlers[evt] = handler;\n    },\n\n    _allocate_buffers: function _allocate_buffers() {\n        this._rQ = new Uint8Array(this._rQbufferSize);\n        this._sQ = new Uint8Array(this._sQbufferSize);\n    },\n\n    init: function init() {\n        this._allocate_buffers();\n        this._rQi = 0;\n        this._websocket = null;\n    },\n\n    open: function open(uri, protocols) {\n        var ws_schema = uri.match(/^([a-z]+):\\/\\//)[1];\n        this.init();\n\n        this._websocket = new WebSocket(uri, protocols);\n        this._websocket.binaryType = 'arraybuffer';\n\n        this._websocket.onmessage = this._recv_message.bind(this);\n        this._websocket.onopen = function () {\n            Debug('>> WebSock.onopen');\n            if (this._websocket.protocol) {\n                Info(\"Server choose sub-protocol: \" + this._websocket.protocol);\n            }\n\n            this._eventHandlers.open();\n            Debug(\"<< WebSock.onopen\");\n        }.bind(this);\n        this._websocket.onclose = function (e) {\n            Debug(\">> WebSock.onclose\");\n            this._eventHandlers.close(e);\n            Debug(\"<< WebSock.onclose\");\n        }.bind(this);\n        this._websocket.onerror = function (e) {\n            Debug(\">> WebSock.onerror: \" + e);\n            this._eventHandlers.error(e);\n            Debug(\"<< WebSock.onerror: \" + e);\n        }.bind(this);\n    },\n\n    close: function close() {\n        if (this._websocket) {\n            if (this._websocket.readyState === WebSocket.OPEN || this._websocket.readyState === WebSocket.CONNECTING) {\n                Info(\"Closing WebSocket connection\");\n                this._websocket.close();\n            }\n\n            this._websocket.onmessage = function (e) {\n                return;\n            };\n        }\n    },\n\n    // private methods\n    _encode_message: function _encode_message() {\n        // Put in a binary arraybuffer\n        // according to the spec, you can send ArrayBufferViews with the send method\n        return new Uint8Array(this._sQ.buffer, 0, this._sQlen);\n    },\n\n    _expand_compact_rQ: function _expand_compact_rQ(min_fit) {\n        var resizeNeeded = min_fit || this._rQlen - this._rQi > this._rQbufferSize / 2;\n        if (resizeNeeded) {\n            if (!min_fit) {\n                // just double the size if we need to do compaction\n                this._rQbufferSize *= 2;\n            } else {\n                // otherwise, make sure we satisy rQlen - rQi + min_fit < rQbufferSize / 8\n                this._rQbufferSize = (this._rQlen - this._rQi + min_fit) * 8;\n            }\n        }\n\n        // we don't want to grow unboundedly\n        if (this._rQbufferSize > MAX_RQ_GROW_SIZE) {\n            this._rQbufferSize = MAX_RQ_GROW_SIZE;\n            if (this._rQbufferSize - this._rQlen - this._rQi < min_fit) {\n                throw new Exception(\"Receive Queue buffer exceeded \" + MAX_RQ_GROW_SIZE + \" bytes, and the new message could not fit\");\n            }\n        }\n\n        if (resizeNeeded) {\n            var old_rQbuffer = this._rQ.buffer;\n            this._rQmax = this._rQbufferSize / 8;\n            this._rQ = new Uint8Array(this._rQbufferSize);\n            this._rQ.set(new Uint8Array(old_rQbuffer, this._rQi));\n        } else {\n            if (ENABLE_COPYWITHIN) {\n                this._rQ.copyWithin(0, this._rQi);\n            } else {\n                this._rQ.set(new Uint8Array(this._rQ.buffer, this._rQi));\n            }\n        }\n\n        this._rQlen = this._rQlen - this._rQi;\n        this._rQi = 0;\n    },\n\n    _decode_message: function _decode_message(data) {\n        // push arraybuffer values onto the end\n        var u8 = new Uint8Array(data);\n        if (u8.length > this._rQbufferSize - this._rQlen) {\n            this._expand_compact_rQ(u8.length);\n        }\n        this._rQ.set(u8, this._rQlen);\n        this._rQlen += u8.length;\n    },\n\n    _recv_message: function _recv_message(e) {\n        this._decode_message(e.data);\n        if (this.rQlen() > 0) {\n            this._eventHandlers.message();\n            // Compact the receive queue\n            if (this._rQlen == this._rQi) {\n                this._rQlen = 0;\n                this._rQi = 0;\n            } else if (this._rQlen > this._rQmax) {\n                this._expand_compact_rQ();\n            }\n        } else {\n            Debug(\"Ignoring empty message\");\n        }\n    }\n};\n\n/*\n * Ported from Flashlight VNC ActionScript implementation:\n *     http://www.wizhelp.com/flashlight-vnc/\n *\n * Full attribution follows:\n *\n * -------------------------------------------------------------------------\n *\n * This DES class has been extracted from package Acme.Crypto for use in VNC.\n * The unnecessary odd parity code has been removed.\n *\n * These changes are:\n *  Copyright (C) 1999 AT&T Laboratories Cambridge.  All Rights Reserved.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n\n * DesCipher - the DES encryption method\n *\n * The meat of this code is by Dave Zimmerman <dzimm@widget.com>, and is:\n *\n * Copyright (c) 1996 Widget Workshop, Inc. All Rights Reserved.\n *\n * Permission to use, copy, modify, and distribute this software\n * and its documentation for NON-COMMERCIAL or COMMERCIAL purposes and\n * without fee is hereby granted, provided that this copyright notice is kept\n * intact.\n *\n * WIDGET WORKSHOP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY\n * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\n * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WIDGET WORKSHOP SHALL NOT BE LIABLE\n * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR\n * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.\n *\n * THIS SOFTWARE IS NOT DESIGNED OR INTENDED FOR USE OR RESALE AS ON-LINE\n * CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE\n * PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT\n * NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE\n * SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE\n * SOFTWARE COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE\n * PHYSICAL OR ENVIRONMENTAL DAMAGE (\"HIGH RISK ACTIVITIES\").  WIDGET WORKSHOP\n * SPECIFICALLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR\n * HIGH RISK ACTIVITIES.\n *\n *\n * The rest is:\n *\n * Copyright (C) 1996 by Jef Poskanzer <jef@acme.com>.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * Visit the ACME Labs Java page for up-to-date versions of this and other\n * fine Java utilities: http://www.acme.com/java/\n */\n\nfunction DES(passwd) {\n    \"use strict\";\n\n    // Tables, permutations, S-boxes, etc.\n\n    var PC2 = [13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9, 22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1, 40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47, 43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31],\n        totrot = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28],\n        z = 0x0,\n        a,\n        b,\n        c,\n        d,\n        e,\n        f,\n        SP1,\n        SP2,\n        SP3,\n        SP4,\n        SP5,\n        SP6,\n        SP7,\n        SP8,\n        keys = [];\n\n    a = 1 << 16;b = 1 << 24;c = a | b;d = 1 << 2;e = 1 << 10;f = d | e;\n    SP1 = [c | e, z | z, a | z, c | f, c | d, a | f, z | d, a | z, z | e, c | e, c | f, z | e, b | f, c | d, b | z, z | d, z | f, b | e, b | e, a | e, a | e, c | z, c | z, b | f, a | d, b | d, b | d, a | d, z | z, z | f, a | f, b | z, a | z, c | f, z | d, c | z, c | e, b | z, b | z, z | e, c | d, a | z, a | e, b | d, z | e, z | d, b | f, a | f, c | f, a | d, c | z, b | f, b | d, z | f, a | f, c | e, z | f, b | e, b | e, z | z, a | d, a | e, z | z, c | d];\n    a = 1 << 20;b = 1 << 31;c = a | b;d = 1 << 5;e = 1 << 15;f = d | e;\n    SP2 = [c | f, b | e, z | e, a | f, a | z, z | d, c | d, b | f, b | d, c | f, c | e, b | z, b | e, a | z, z | d, c | d, a | e, a | d, b | f, z | z, b | z, z | e, a | f, c | z, a | d, b | d, z | z, a | e, z | f, c | e, c | z, z | f, z | z, a | f, c | d, a | z, b | f, c | z, c | e, z | e, c | z, b | e, z | d, c | f, a | f, z | d, z | e, b | z, z | f, c | e, a | z, b | d, a | d, b | f, b | d, a | d, a | e, z | z, b | e, z | f, b | z, c | d, c | f, a | e];\n    a = 1 << 17;b = 1 << 27;c = a | b;d = 1 << 3;e = 1 << 9;f = d | e;\n    SP3 = [z | f, c | e, z | z, c | d, b | e, z | z, a | f, b | e, a | d, b | d, b | d, a | z, c | f, a | d, c | z, z | f, b | z, z | d, c | e, z | e, a | e, c | z, c | d, a | f, b | f, a | e, a | z, b | f, z | d, c | f, z | e, b | z, c | e, b | z, a | d, z | f, a | z, c | e, b | e, z | z, z | e, a | d, c | f, b | e, b | d, z | e, z | z, c | d, b | f, a | z, b | z, c | f, z | d, a | f, a | e, b | d, c | z, b | f, z | f, c | z, a | f, z | d, c | d, a | e];\n    a = 1 << 13;b = 1 << 23;c = a | b;d = 1 << 0;e = 1 << 7;f = d | e;\n    SP4 = [c | d, a | f, a | f, z | e, c | e, b | f, b | d, a | d, z | z, c | z, c | z, c | f, z | f, z | z, b | e, b | d, z | d, a | z, b | z, c | d, z | e, b | z, a | d, a | e, b | f, z | d, a | e, b | e, a | z, c | e, c | f, z | f, b | e, b | d, c | z, c | f, z | f, z | z, z | z, c | z, a | e, b | e, b | f, z | d, c | d, a | f, a | f, z | e, c | f, z | f, z | d, a | z, b | d, a | d, c | e, b | f, a | d, a | e, b | z, c | d, z | e, b | z, a | z, c | e];\n    a = 1 << 25;b = 1 << 30;c = a | b;d = 1 << 8;e = 1 << 19;f = d | e;\n    SP5 = [z | d, a | f, a | e, c | d, z | e, z | d, b | z, a | e, b | f, z | e, a | d, b | f, c | d, c | e, z | f, b | z, a | z, b | e, b | e, z | z, b | d, c | f, c | f, a | d, c | e, b | d, z | z, c | z, a | f, a | z, c | z, z | f, z | e, c | d, z | d, a | z, b | z, a | e, c | d, b | f, a | d, b | z, c | e, a | f, b | f, z | d, a | z, c | e, c | f, z | f, c | z, c | f, a | e, z | z, b | e, c | z, z | f, a | d, b | d, z | e, z | z, b | e, a | f, b | d];\n    a = 1 << 22;b = 1 << 29;c = a | b;d = 1 << 4;e = 1 << 14;f = d | e;\n    SP6 = [b | d, c | z, z | e, c | f, c | z, z | d, c | f, a | z, b | e, a | f, a | z, b | d, a | d, b | e, b | z, z | f, z | z, a | d, b | f, z | e, a | e, b | f, z | d, c | d, c | d, z | z, a | f, c | e, z | f, a | e, c | e, b | z, b | e, z | d, c | d, a | e, c | f, a | z, z | f, b | d, a | z, b | e, b | z, z | f, b | d, c | f, a | e, c | z, a | f, c | e, z | z, c | d, z | d, z | e, c | z, a | f, z | e, a | d, b | f, z | z, c | e, b | z, a | d, b | f];\n    a = 1 << 21;b = 1 << 26;c = a | b;d = 1 << 1;e = 1 << 11;f = d | e;\n    SP7 = [a | z, c | d, b | f, z | z, z | e, b | f, a | f, c | e, c | f, a | z, z | z, b | d, z | d, b | z, c | d, z | f, b | e, a | f, a | d, b | e, b | d, c | z, c | e, a | d, c | z, z | e, z | f, c | f, a | e, z | d, b | z, a | e, b | z, a | e, a | z, b | f, b | f, c | d, c | d, z | d, a | d, b | z, b | e, a | z, c | e, z | f, a | f, c | e, z | f, b | d, c | f, c | z, a | e, z | z, z | d, c | f, z | z, a | f, c | z, z | e, b | d, b | e, z | e, a | d];\n    a = 1 << 18;b = 1 << 28;c = a | b;d = 1 << 6;e = 1 << 12;f = d | e;\n    SP8 = [b | f, z | e, a | z, c | f, b | z, b | f, z | d, b | z, a | d, c | z, c | f, a | e, c | e, a | f, z | e, z | d, c | z, b | d, b | e, z | f, a | e, a | d, c | d, c | e, z | f, z | z, z | z, c | d, b | d, b | e, a | f, a | z, a | f, a | z, c | e, z | e, z | d, c | d, z | e, a | f, b | e, z | d, b | d, c | z, c | d, b | z, a | z, b | f, z | z, c | f, a | d, b | d, c | z, b | e, b | f, z | z, c | f, a | e, a | e, z | f, z | f, a | d, b | z, c | e];\n\n    // Set the key.\n    function setKeys(keyBlock) {\n        var i,\n            j,\n            l,\n            m,\n            n,\n            o,\n            pc1m = [],\n            pcr = [],\n            kn = [],\n            raw0,\n            raw1,\n            rawi,\n            KnLi;\n\n        for (j = 0, l = 56; j < 56; ++j, l -= 8) {\n            l += l < -5 ? 65 : l < -3 ? 31 : l < -1 ? 63 : l === 27 ? 35 : 0; // PC1\n            m = l & 0x7;\n            pc1m[j] = (keyBlock[l >>> 3] & 1 << m) !== 0 ? 1 : 0;\n        }\n\n        for (i = 0; i < 16; ++i) {\n            m = i << 1;\n            n = m + 1;\n            kn[m] = kn[n] = 0;\n            for (o = 28; o < 59; o += 28) {\n                for (j = o - 28; j < o; ++j) {\n                    l = j + totrot[i];\n                    if (l < o) {\n                        pcr[j] = pc1m[l];\n                    } else {\n                        pcr[j] = pc1m[l - 28];\n                    }\n                }\n            }\n            for (j = 0; j < 24; ++j) {\n                if (pcr[PC2[j]] !== 0) {\n                    kn[m] |= 1 << 23 - j;\n                }\n                if (pcr[PC2[j + 24]] !== 0) {\n                    kn[n] |= 1 << 23 - j;\n                }\n            }\n        }\n\n        // cookey\n        for (i = 0, rawi = 0, KnLi = 0; i < 16; ++i) {\n            raw0 = kn[rawi++];\n            raw1 = kn[rawi++];\n            keys[KnLi] = (raw0 & 0x00fc0000) << 6;\n            keys[KnLi] |= (raw0 & 0x00000fc0) << 10;\n            keys[KnLi] |= (raw1 & 0x00fc0000) >>> 10;\n            keys[KnLi] |= (raw1 & 0x00000fc0) >>> 6;\n            ++KnLi;\n            keys[KnLi] = (raw0 & 0x0003f000) << 12;\n            keys[KnLi] |= (raw0 & 0x0000003f) << 16;\n            keys[KnLi] |= (raw1 & 0x0003f000) >>> 4;\n            keys[KnLi] |= raw1 & 0x0000003f;\n            ++KnLi;\n        }\n    }\n\n    // Encrypt 8 bytes of text\n    function enc8(text) {\n        var i = 0,\n            b = text.slice(),\n            fval,\n            keysi = 0,\n            l,\n            r,\n            x; // left, right, accumulator\n\n        // Squash 8 bytes to 2 ints\n        l = b[i++] << 24 | b[i++] << 16 | b[i++] << 8 | b[i++];\n        r = b[i++] << 24 | b[i++] << 16 | b[i++] << 8 | b[i++];\n\n        x = (l >>> 4 ^ r) & 0x0f0f0f0f;\n        r ^= x;\n        l ^= x << 4;\n        x = (l >>> 16 ^ r) & 0x0000ffff;\n        r ^= x;\n        l ^= x << 16;\n        x = (r >>> 2 ^ l) & 0x33333333;\n        l ^= x;\n        r ^= x << 2;\n        x = (r >>> 8 ^ l) & 0x00ff00ff;\n        l ^= x;\n        r ^= x << 8;\n        r = r << 1 | r >>> 31 & 1;\n        x = (l ^ r) & 0xaaaaaaaa;\n        l ^= x;\n        r ^= x;\n        l = l << 1 | l >>> 31 & 1;\n\n        for (i = 0; i < 8; ++i) {\n            x = r << 28 | r >>> 4;\n            x ^= keys[keysi++];\n            fval = SP7[x & 0x3f];\n            fval |= SP5[x >>> 8 & 0x3f];\n            fval |= SP3[x >>> 16 & 0x3f];\n            fval |= SP1[x >>> 24 & 0x3f];\n            x = r ^ keys[keysi++];\n            fval |= SP8[x & 0x3f];\n            fval |= SP6[x >>> 8 & 0x3f];\n            fval |= SP4[x >>> 16 & 0x3f];\n            fval |= SP2[x >>> 24 & 0x3f];\n            l ^= fval;\n            x = l << 28 | l >>> 4;\n            x ^= keys[keysi++];\n            fval = SP7[x & 0x3f];\n            fval |= SP5[x >>> 8 & 0x3f];\n            fval |= SP3[x >>> 16 & 0x3f];\n            fval |= SP1[x >>> 24 & 0x3f];\n            x = l ^ keys[keysi++];\n            fval |= SP8[x & 0x0000003f];\n            fval |= SP6[x >>> 8 & 0x3f];\n            fval |= SP4[x >>> 16 & 0x3f];\n            fval |= SP2[x >>> 24 & 0x3f];\n            r ^= fval;\n        }\n\n        r = r << 31 | r >>> 1;\n        x = (l ^ r) & 0xaaaaaaaa;\n        l ^= x;\n        r ^= x;\n        l = l << 31 | l >>> 1;\n        x = (l >>> 8 ^ r) & 0x00ff00ff;\n        r ^= x;\n        l ^= x << 8;\n        x = (l >>> 2 ^ r) & 0x33333333;\n        r ^= x;\n        l ^= x << 2;\n        x = (r >>> 16 ^ l) & 0x0000ffff;\n        l ^= x;\n        r ^= x << 16;\n        x = (r >>> 4 ^ l) & 0x0f0f0f0f;\n        l ^= x;\n        r ^= x << 4;\n\n        // Spread ints to bytes\n        x = [r, l];\n        for (i = 0; i < 8; i++) {\n            b[i] = (x[i >>> 2] >>> 8 * (3 - i % 4)) % 256;\n            if (b[i] < 0) {\n                b[i] += 256;\n            } // unsigned\n        }\n        return b;\n    }\n\n    // Encrypt 16 bytes of text using passwd as key\n    function encrypt(t) {\n        return enc8(t.slice(0, 8)).concat(enc8(t.slice(8, 16)));\n    }\n\n    setKeys(passwd); // Setup keys\n    return { 'encrypt': encrypt }; // Public interface\n} // function DES\n\n/*\n * This file is auto-generated from keymaps.csv on 2017-05-31 16:20\n * Database checksum sha256(92fd165507f2a3b8c5b3fa56e425d45788dbcb98cf067a307527d91ce22cab94)\n * To re-generate, run:\n *   keymap-gen --lang=js code-map keymaps.csv html atset1\n*/\nvar XtScancode = {\n    \"Again\": 0xe005, /* html:Again (Again) -> linux:129 (KEY_AGAIN) -> atset1:57349 */\n    \"AltLeft\": 0x38, /* html:AltLeft (AltLeft) -> linux:56 (KEY_LEFTALT) -> atset1:56 */\n    \"AltRight\": 0xe038, /* html:AltRight (AltRight) -> linux:100 (KEY_RIGHTALT) -> atset1:57400 */\n    \"ArrowDown\": 0xe050, /* html:ArrowDown (ArrowDown) -> linux:108 (KEY_DOWN) -> atset1:57424 */\n    \"ArrowLeft\": 0xe04b, /* html:ArrowLeft (ArrowLeft) -> linux:105 (KEY_LEFT) -> atset1:57419 */\n    \"ArrowRight\": 0xe04d, /* html:ArrowRight (ArrowRight) -> linux:106 (KEY_RIGHT) -> atset1:57421 */\n    \"ArrowUp\": 0xe048, /* html:ArrowUp (ArrowUp) -> linux:103 (KEY_UP) -> atset1:57416 */\n    \"AudioVolumeDown\": 0xe02e, /* html:AudioVolumeDown (AudioVolumeDown) -> linux:114 (KEY_VOLUMEDOWN) -> atset1:57390 */\n    \"AudioVolumeMute\": 0xe020, /* html:AudioVolumeMute (AudioVolumeMute) -> linux:113 (KEY_MUTE) -> atset1:57376 */\n    \"AudioVolumeUp\": 0xe030, /* html:AudioVolumeUp (AudioVolumeUp) -> linux:115 (KEY_VOLUMEUP) -> atset1:57392 */\n    \"Backquote\": 0x29, /* html:Backquote (Backquote) -> linux:41 (KEY_GRAVE) -> atset1:41 */\n    \"Backslash\": 0x2b, /* html:Backslash (Backslash) -> linux:43 (KEY_BACKSLASH) -> atset1:43 */\n    \"Backspace\": 0xe, /* html:Backspace (Backspace) -> linux:14 (KEY_BACKSPACE) -> atset1:14 */\n    \"BracketLeft\": 0x1a, /* html:BracketLeft (BracketLeft) -> linux:26 (KEY_LEFTBRACE) -> atset1:26 */\n    \"BracketRight\": 0x1b, /* html:BracketRight (BracketRight) -> linux:27 (KEY_RIGHTBRACE) -> atset1:27 */\n    \"BrowserBack\": 0xe06a, /* html:BrowserBack (BrowserBack) -> linux:158 (KEY_BACK) -> atset1:57450 */\n    \"BrowserFavorites\": 0xe066, /* html:BrowserFavorites (BrowserFavorites) -> linux:156 (KEY_BOOKMARKS) -> atset1:57446 */\n    \"BrowserForward\": 0xe069, /* html:BrowserForward (BrowserForward) -> linux:159 (KEY_FORWARD) -> atset1:57449 */\n    \"BrowserHome\": 0xe032, /* html:BrowserHome (BrowserHome) -> linux:172 (KEY_HOMEPAGE) -> atset1:57394 */\n    \"BrowserRefresh\": 0xe067, /* html:BrowserRefresh (BrowserRefresh) -> linux:173 (KEY_REFRESH) -> atset1:57447 */\n    \"BrowserSearch\": 0xe065, /* html:BrowserSearch (BrowserSearch) -> linux:217 (KEY_SEARCH) -> atset1:57445 */\n    \"BrowserStop\": 0xe068, /* html:BrowserStop (BrowserStop) -> linux:128 (KEY_STOP) -> atset1:57448 */\n    \"CapsLock\": 0x3a, /* html:CapsLock (CapsLock) -> linux:58 (KEY_CAPSLOCK) -> atset1:58 */\n    \"Comma\": 0x33, /* html:Comma (Comma) -> linux:51 (KEY_COMMA) -> atset1:51 */\n    \"ContextMenu\": 0xe05d, /* html:ContextMenu (ContextMenu) -> linux:127 (KEY_COMPOSE) -> atset1:57437 */\n    \"ControlLeft\": 0x1d, /* html:ControlLeft (ControlLeft) -> linux:29 (KEY_LEFTCTRL) -> atset1:29 */\n    \"ControlRight\": 0xe01d, /* html:ControlRight (ControlRight) -> linux:97 (KEY_RIGHTCTRL) -> atset1:57373 */\n    \"Convert\": 0x79, /* html:Convert (Convert) -> linux:92 (KEY_HENKAN) -> atset1:121 */\n    \"Copy\": 0xe078, /* html:Copy (Copy) -> linux:133 (KEY_COPY) -> atset1:57464 */\n    \"Cut\": 0xe03c, /* html:Cut (Cut) -> linux:137 (KEY_CUT) -> atset1:57404 */\n    \"Delete\": 0xe053, /* html:Delete (Delete) -> linux:111 (KEY_DELETE) -> atset1:57427 */\n    \"Digit0\": 0xb, /* html:Digit0 (Digit0) -> linux:11 (KEY_0) -> atset1:11 */\n    \"Digit1\": 0x2, /* html:Digit1 (Digit1) -> linux:2 (KEY_1) -> atset1:2 */\n    \"Digit2\": 0x3, /* html:Digit2 (Digit2) -> linux:3 (KEY_2) -> atset1:3 */\n    \"Digit3\": 0x4, /* html:Digit3 (Digit3) -> linux:4 (KEY_3) -> atset1:4 */\n    \"Digit4\": 0x5, /* html:Digit4 (Digit4) -> linux:5 (KEY_4) -> atset1:5 */\n    \"Digit5\": 0x6, /* html:Digit5 (Digit5) -> linux:6 (KEY_5) -> atset1:6 */\n    \"Digit6\": 0x7, /* html:Digit6 (Digit6) -> linux:7 (KEY_6) -> atset1:7 */\n    \"Digit7\": 0x8, /* html:Digit7 (Digit7) -> linux:8 (KEY_7) -> atset1:8 */\n    \"Digit8\": 0x9, /* html:Digit8 (Digit8) -> linux:9 (KEY_8) -> atset1:9 */\n    \"Digit9\": 0xa, /* html:Digit9 (Digit9) -> linux:10 (KEY_9) -> atset1:10 */\n    \"Eject\": 0xe07d, /* html:Eject (Eject) -> linux:162 (KEY_EJECTCLOSECD) -> atset1:57469 */\n    \"End\": 0xe04f, /* html:End (End) -> linux:107 (KEY_END) -> atset1:57423 */\n    \"Enter\": 0x1c, /* html:Enter (Enter) -> linux:28 (KEY_ENTER) -> atset1:28 */\n    \"Equal\": 0xd, /* html:Equal (Equal) -> linux:13 (KEY_EQUAL) -> atset1:13 */\n    \"Escape\": 0x1, /* html:Escape (Escape) -> linux:1 (KEY_ESC) -> atset1:1 */\n    \"F1\": 0x3b, /* html:F1 (F1) -> linux:59 (KEY_F1) -> atset1:59 */\n    \"F10\": 0x44, /* html:F10 (F10) -> linux:68 (KEY_F10) -> atset1:68 */\n    \"F11\": 0x57, /* html:F11 (F11) -> linux:87 (KEY_F11) -> atset1:87 */\n    \"F12\": 0x58, /* html:F12 (F12) -> linux:88 (KEY_F12) -> atset1:88 */\n    \"F13\": 0x5d, /* html:F13 (F13) -> linux:183 (KEY_F13) -> atset1:93 */\n    \"F14\": 0x5e, /* html:F14 (F14) -> linux:184 (KEY_F14) -> atset1:94 */\n    \"F15\": 0x5f, /* html:F15 (F15) -> linux:185 (KEY_F15) -> atset1:95 */\n    \"F16\": 0x55, /* html:F16 (F16) -> linux:186 (KEY_F16) -> atset1:85 */\n    \"F17\": 0xe003, /* html:F17 (F17) -> linux:187 (KEY_F17) -> atset1:57347 */\n    \"F18\": 0xe077, /* html:F18 (F18) -> linux:188 (KEY_F18) -> atset1:57463 */\n    \"F19\": 0xe004, /* html:F19 (F19) -> linux:189 (KEY_F19) -> atset1:57348 */\n    \"F2\": 0x3c, /* html:F2 (F2) -> linux:60 (KEY_F2) -> atset1:60 */\n    \"F20\": 0x5a, /* html:F20 (F20) -> linux:190 (KEY_F20) -> atset1:90 */\n    \"F21\": 0x74, /* html:F21 (F21) -> linux:191 (KEY_F21) -> atset1:116 */\n    \"F22\": 0xe079, /* html:F22 (F22) -> linux:192 (KEY_F22) -> atset1:57465 */\n    \"F23\": 0x6d, /* html:F23 (F23) -> linux:193 (KEY_F23) -> atset1:109 */\n    \"F24\": 0x6f, /* html:F24 (F24) -> linux:194 (KEY_F24) -> atset1:111 */\n    \"F3\": 0x3d, /* html:F3 (F3) -> linux:61 (KEY_F3) -> atset1:61 */\n    \"F4\": 0x3e, /* html:F4 (F4) -> linux:62 (KEY_F4) -> atset1:62 */\n    \"F5\": 0x3f, /* html:F5 (F5) -> linux:63 (KEY_F5) -> atset1:63 */\n    \"F6\": 0x40, /* html:F6 (F6) -> linux:64 (KEY_F6) -> atset1:64 */\n    \"F7\": 0x41, /* html:F7 (F7) -> linux:65 (KEY_F7) -> atset1:65 */\n    \"F8\": 0x42, /* html:F8 (F8) -> linux:66 (KEY_F8) -> atset1:66 */\n    \"F9\": 0x43, /* html:F9 (F9) -> linux:67 (KEY_F9) -> atset1:67 */\n    \"Find\": 0xe041, /* html:Find (Find) -> linux:136 (KEY_FIND) -> atset1:57409 */\n    \"Help\": 0xe075, /* html:Help (Help) -> linux:138 (KEY_HELP) -> atset1:57461 */\n    \"Hiragana\": 0x77, /* html:Hiragana (Lang4) -> linux:91 (KEY_HIRAGANA) -> atset1:119 */\n    \"Home\": 0xe047, /* html:Home (Home) -> linux:102 (KEY_HOME) -> atset1:57415 */\n    \"Insert\": 0xe052, /* html:Insert (Insert) -> linux:110 (KEY_INSERT) -> atset1:57426 */\n    \"IntlBackslash\": 0x56, /* html:IntlBackslash (IntlBackslash) -> linux:86 (KEY_102ND) -> atset1:86 */\n    \"IntlRo\": 0x73, /* html:IntlRo (IntlRo) -> linux:89 (KEY_RO) -> atset1:115 */\n    \"IntlYen\": 0x7d, /* html:IntlYen (IntlYen) -> linux:124 (KEY_YEN) -> atset1:125 */\n    \"KanaMode\": 0x70, /* html:KanaMode (KanaMode) -> linux:93 (KEY_KATAKANAHIRAGANA) -> atset1:112 */\n    \"Katakana\": 0x78, /* html:Katakana (Lang3) -> linux:90 (KEY_KATAKANA) -> atset1:120 */\n    \"KeyA\": 0x1e, /* html:KeyA (KeyA) -> linux:30 (KEY_A) -> atset1:30 */\n    \"KeyB\": 0x30, /* html:KeyB (KeyB) -> linux:48 (KEY_B) -> atset1:48 */\n    \"KeyC\": 0x2e, /* html:KeyC (KeyC) -> linux:46 (KEY_C) -> atset1:46 */\n    \"KeyD\": 0x20, /* html:KeyD (KeyD) -> linux:32 (KEY_D) -> atset1:32 */\n    \"KeyE\": 0x12, /* html:KeyE (KeyE) -> linux:18 (KEY_E) -> atset1:18 */\n    \"KeyF\": 0x21, /* html:KeyF (KeyF) -> linux:33 (KEY_F) -> atset1:33 */\n    \"KeyG\": 0x22, /* html:KeyG (KeyG) -> linux:34 (KEY_G) -> atset1:34 */\n    \"KeyH\": 0x23, /* html:KeyH (KeyH) -> linux:35 (KEY_H) -> atset1:35 */\n    \"KeyI\": 0x17, /* html:KeyI (KeyI) -> linux:23 (KEY_I) -> atset1:23 */\n    \"KeyJ\": 0x24, /* html:KeyJ (KeyJ) -> linux:36 (KEY_J) -> atset1:36 */\n    \"KeyK\": 0x25, /* html:KeyK (KeyK) -> linux:37 (KEY_K) -> atset1:37 */\n    \"KeyL\": 0x26, /* html:KeyL (KeyL) -> linux:38 (KEY_L) -> atset1:38 */\n    \"KeyM\": 0x32, /* html:KeyM (KeyM) -> linux:50 (KEY_M) -> atset1:50 */\n    \"KeyN\": 0x31, /* html:KeyN (KeyN) -> linux:49 (KEY_N) -> atset1:49 */\n    \"KeyO\": 0x18, /* html:KeyO (KeyO) -> linux:24 (KEY_O) -> atset1:24 */\n    \"KeyP\": 0x19, /* html:KeyP (KeyP) -> linux:25 (KEY_P) -> atset1:25 */\n    \"KeyQ\": 0x10, /* html:KeyQ (KeyQ) -> linux:16 (KEY_Q) -> atset1:16 */\n    \"KeyR\": 0x13, /* html:KeyR (KeyR) -> linux:19 (KEY_R) -> atset1:19 */\n    \"KeyS\": 0x1f, /* html:KeyS (KeyS) -> linux:31 (KEY_S) -> atset1:31 */\n    \"KeyT\": 0x14, /* html:KeyT (KeyT) -> linux:20 (KEY_T) -> atset1:20 */\n    \"KeyU\": 0x16, /* html:KeyU (KeyU) -> linux:22 (KEY_U) -> atset1:22 */\n    \"KeyV\": 0x2f, /* html:KeyV (KeyV) -> linux:47 (KEY_V) -> atset1:47 */\n    \"KeyW\": 0x11, /* html:KeyW (KeyW) -> linux:17 (KEY_W) -> atset1:17 */\n    \"KeyX\": 0x2d, /* html:KeyX (KeyX) -> linux:45 (KEY_X) -> atset1:45 */\n    \"KeyY\": 0x15, /* html:KeyY (KeyY) -> linux:21 (KEY_Y) -> atset1:21 */\n    \"KeyZ\": 0x2c, /* html:KeyZ (KeyZ) -> linux:44 (KEY_Z) -> atset1:44 */\n    \"Lang3\": 0x78, /* html:Lang3 (Lang3) -> linux:90 (KEY_KATAKANA) -> atset1:120 */\n    \"Lang4\": 0x77, /* html:Lang4 (Lang4) -> linux:91 (KEY_HIRAGANA) -> atset1:119 */\n    \"Lang5\": 0x76, /* html:Lang5 (Lang5) -> linux:85 (KEY_ZENKAKUHANKAKU) -> atset1:118 */\n    \"LaunchApp1\": 0xe06b, /* html:LaunchApp1 (LaunchApp1) -> linux:157 (KEY_COMPUTER) -> atset1:57451 */\n    \"LaunchApp2\": 0xe021, /* html:LaunchApp2 (LaunchApp2) -> linux:140 (KEY_CALC) -> atset1:57377 */\n    \"LaunchMail\": 0xe06c, /* html:LaunchMail (LaunchMail) -> linux:155 (KEY_MAIL) -> atset1:57452 */\n    \"MediaPlayPause\": 0xe022, /* html:MediaPlayPause (MediaPlayPause) -> linux:164 (KEY_PLAYPAUSE) -> atset1:57378 */\n    \"MediaSelect\": 0xe06d, /* html:MediaSelect (MediaSelect) -> linux:226 (KEY_MEDIA) -> atset1:57453 */\n    \"MediaStop\": 0xe024, /* html:MediaStop (MediaStop) -> linux:166 (KEY_STOPCD) -> atset1:57380 */\n    \"MediaTrackNext\": 0xe019, /* html:MediaTrackNext (MediaTrackNext) -> linux:163 (KEY_NEXTSONG) -> atset1:57369 */\n    \"MediaTrackPrevious\": 0xe010, /* html:MediaTrackPrevious (MediaTrackPrevious) -> linux:165 (KEY_PREVIOUSSONG) -> atset1:57360 */\n    \"MetaLeft\": 0xe05b, /* html:MetaLeft (MetaLeft) -> linux:125 (KEY_LEFTMETA) -> atset1:57435 */\n    \"MetaRight\": 0xe05c, /* html:MetaRight (MetaRight) -> linux:126 (KEY_RIGHTMETA) -> atset1:57436 */\n    \"Minus\": 0xc, /* html:Minus (Minus) -> linux:12 (KEY_MINUS) -> atset1:12 */\n    \"NonConvert\": 0x7b, /* html:NonConvert (NonConvert) -> linux:94 (KEY_MUHENKAN) -> atset1:123 */\n    \"NumLock\": 0x45, /* html:NumLock (NumLock) -> linux:69 (KEY_NUMLOCK) -> atset1:69 */\n    \"Numpad0\": 0x52, /* html:Numpad0 (Numpad0) -> linux:82 (KEY_KP0) -> atset1:82 */\n    \"Numpad1\": 0x4f, /* html:Numpad1 (Numpad1) -> linux:79 (KEY_KP1) -> atset1:79 */\n    \"Numpad2\": 0x50, /* html:Numpad2 (Numpad2) -> linux:80 (KEY_KP2) -> atset1:80 */\n    \"Numpad3\": 0x51, /* html:Numpad3 (Numpad3) -> linux:81 (KEY_KP3) -> atset1:81 */\n    \"Numpad4\": 0x4b, /* html:Numpad4 (Numpad4) -> linux:75 (KEY_KP4) -> atset1:75 */\n    \"Numpad5\": 0x4c, /* html:Numpad5 (Numpad5) -> linux:76 (KEY_KP5) -> atset1:76 */\n    \"Numpad6\": 0x4d, /* html:Numpad6 (Numpad6) -> linux:77 (KEY_KP6) -> atset1:77 */\n    \"Numpad7\": 0x47, /* html:Numpad7 (Numpad7) -> linux:71 (KEY_KP7) -> atset1:71 */\n    \"Numpad8\": 0x48, /* html:Numpad8 (Numpad8) -> linux:72 (KEY_KP8) -> atset1:72 */\n    \"Numpad9\": 0x49, /* html:Numpad9 (Numpad9) -> linux:73 (KEY_KP9) -> atset1:73 */\n    \"NumpadAdd\": 0x4e, /* html:NumpadAdd (NumpadAdd) -> linux:78 (KEY_KPPLUS) -> atset1:78 */\n    \"NumpadComma\": 0x7e, /* html:NumpadComma (NumpadComma) -> linux:121 (KEY_KPCOMMA) -> atset1:126 */\n    \"NumpadDecimal\": 0x53, /* html:NumpadDecimal (NumpadDecimal) -> linux:83 (KEY_KPDOT) -> atset1:83 */\n    \"NumpadDivide\": 0xe035, /* html:NumpadDivide (NumpadDivide) -> linux:98 (KEY_KPSLASH) -> atset1:57397 */\n    \"NumpadEnter\": 0xe01c, /* html:NumpadEnter (NumpadEnter) -> linux:96 (KEY_KPENTER) -> atset1:57372 */\n    \"NumpadEqual\": 0x59, /* html:NumpadEqual (NumpadEqual) -> linux:117 (KEY_KPEQUAL) -> atset1:89 */\n    \"NumpadMultiply\": 0x37, /* html:NumpadMultiply (NumpadMultiply) -> linux:55 (KEY_KPASTERISK) -> atset1:55 */\n    \"NumpadParenLeft\": 0xe076, /* html:NumpadParenLeft (NumpadParenLeft) -> linux:179 (KEY_KPLEFTPAREN) -> atset1:57462 */\n    \"NumpadParenRight\": 0xe07b, /* html:NumpadParenRight (NumpadParenRight) -> linux:180 (KEY_KPRIGHTPAREN) -> atset1:57467 */\n    \"NumpadSubtract\": 0x4a, /* html:NumpadSubtract (NumpadSubtract) -> linux:74 (KEY_KPMINUS) -> atset1:74 */\n    \"Open\": 0x64, /* html:Open (Open) -> linux:134 (KEY_OPEN) -> atset1:100 */\n    \"PageDown\": 0xe051, /* html:PageDown (PageDown) -> linux:109 (KEY_PAGEDOWN) -> atset1:57425 */\n    \"PageUp\": 0xe049, /* html:PageUp (PageUp) -> linux:104 (KEY_PAGEUP) -> atset1:57417 */\n    \"Paste\": 0x65, /* html:Paste (Paste) -> linux:135 (KEY_PASTE) -> atset1:101 */\n    \"Pause\": 0xe046, /* html:Pause (Pause) -> linux:119 (KEY_PAUSE) -> atset1:57414 */\n    \"Period\": 0x34, /* html:Period (Period) -> linux:52 (KEY_DOT) -> atset1:52 */\n    \"Power\": 0xe05e, /* html:Power (Power) -> linux:116 (KEY_POWER) -> atset1:57438 */\n    \"PrintScreen\": 0x54, /* html:PrintScreen (PrintScreen) -> linux:99 (KEY_SYSRQ) -> atset1:84 */\n    \"Props\": 0xe006, /* html:Props (Props) -> linux:130 (KEY_PROPS) -> atset1:57350 */\n    \"Quote\": 0x28, /* html:Quote (Quote) -> linux:40 (KEY_APOSTROPHE) -> atset1:40 */\n    \"ScrollLock\": 0x46, /* html:ScrollLock (ScrollLock) -> linux:70 (KEY_SCROLLLOCK) -> atset1:70 */\n    \"Semicolon\": 0x27, /* html:Semicolon (Semicolon) -> linux:39 (KEY_SEMICOLON) -> atset1:39 */\n    \"ShiftLeft\": 0x2a, /* html:ShiftLeft (ShiftLeft) -> linux:42 (KEY_LEFTSHIFT) -> atset1:42 */\n    \"ShiftRight\": 0x36, /* html:ShiftRight (ShiftRight) -> linux:54 (KEY_RIGHTSHIFT) -> atset1:54 */\n    \"Slash\": 0x35, /* html:Slash (Slash) -> linux:53 (KEY_SLASH) -> atset1:53 */\n    \"Sleep\": 0xe05f, /* html:Sleep (Sleep) -> linux:142 (KEY_SLEEP) -> atset1:57439 */\n    \"Space\": 0x39, /* html:Space (Space) -> linux:57 (KEY_SPACE) -> atset1:57 */\n    \"Suspend\": 0xe025, /* html:Suspend (Suspend) -> linux:205 (KEY_SUSPEND) -> atset1:57381 */\n    \"Tab\": 0xf, /* html:Tab (Tab) -> linux:15 (KEY_TAB) -> atset1:15 */\n    \"Undo\": 0xe007, /* html:Undo (Undo) -> linux:131 (KEY_UNDO) -> atset1:57351 */\n    \"WakeUp\": 0xe063 /* html:WakeUp (WakeUp) -> linux:143 (KEY_WAKEUP) -> atset1:57443 */\n};\n\n// reduce buffer size, avoiding mem copy\n\n\nfunction arraySet(dest, src, src_offs, len, dest_offs) {\n    if (src.subarray && dest.subarray) {\n        dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n        return;\n    }\n    // Fallback to ordinary array\n    for (var i = 0; i < len; i++) {\n        dest[dest_offs + i] = src[src_offs + i];\n    }\n}\n\n// Join array of chunks to single array.\n\n\nvar Buf8 = Uint8Array;\nvar Buf16 = Uint16Array;\nvar Buf32 = Int32Array;\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It doesn't worth to make additional optimizationa as in original.\n// Small size is preferable.\n\nfunction adler32(adler, buf, len, pos) {\n    var s1 = adler & 0xffff | 0,\n        s2 = adler >>> 16 & 0xffff | 0,\n        n = 0;\n\n    while (len !== 0) {\n        // Set limit ~ twice less than 5552, to keep\n        // s2 in 31-bits, because we force signed ints.\n        // in other case %= will fail.\n        n = len > 2000 ? 2000 : len;\n        len -= n;\n\n        do {\n            s1 = s1 + buf[pos++] | 0;\n            s2 = s2 + s1 | 0;\n        } while (--n);\n\n        s1 %= 65521;\n        s2 %= 65521;\n    }\n\n    return s1 | s2 << 16 | 0;\n}\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n    var c,\n        table = [];\n\n    for (var n = 0; n < 256; n++) {\n        c = n;\n        for (var k = 0; k < 8; k++) {\n            c = c & 1 ? 0xEDB88320 ^ c >>> 1 : c >>> 1;\n        }\n        table[n] = c;\n    }\n\n    return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n// See state defs from inflate.js\nvar BAD$1 = 30; /* got a data error -- remain here until reset */\nvar TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state.mode === LEN\n        strm.avail_in >= 6\n        strm.avail_out >= 258\n        start >= strm.avail_out\n        state.bits < 8\n\n   On return, state.mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm.avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm.avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nfunction inflate_fast(strm, start) {\n    var state;\n    var _in; /* local strm.input */\n    var last; /* have enough input while in < last */\n    var _out; /* local strm.output */\n    var beg; /* inflate()'s initial strm.output */\n    var end; /* while out < end, enough space available */\n    //#ifdef INFLATE_STRICT\n    var dmax; /* maximum distance from zlib header */\n    //#endif\n    var wsize; /* window size or zero if not using window */\n    var whave; /* valid bytes in the window */\n    var wnext; /* window write index */\n    // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n    var s_window; /* allocated sliding window, if wsize != 0 */\n    var hold; /* local strm.hold */\n    var bits; /* local strm.bits */\n    var lcode; /* local strm.lencode */\n    var dcode; /* local strm.distcode */\n    var lmask; /* mask for first level of length codes */\n    var dmask; /* mask for first level of distance codes */\n    var here; /* retrieved table entry */\n    var op; /* code bits, operation, extra bits, or */\n    /*  window position, window bytes to copy */\n    var len; /* match length, unused bytes */\n    var dist; /* match distance */\n    var from; /* where to copy match from */\n    var from_source;\n\n    var input, output; // JS specific, because we have no pointers\n\n    /* copy state to local variables */\n    state = strm.state;\n    //here = state.here;\n    _in = strm.next_in;\n    input = strm.input;\n    last = _in + (strm.avail_in - 5);\n    _out = strm.next_out;\n    output = strm.output;\n    beg = _out - (start - strm.avail_out);\n    end = _out + (strm.avail_out - 257);\n    //#ifdef INFLATE_STRICT\n    dmax = state.dmax;\n    //#endif\n    wsize = state.wsize;\n    whave = state.whave;\n    wnext = state.wnext;\n    s_window = state.window;\n    hold = state.hold;\n    bits = state.bits;\n    lcode = state.lencode;\n    dcode = state.distcode;\n    lmask = (1 << state.lenbits) - 1;\n    dmask = (1 << state.distbits) - 1;\n\n    /* decode literals and length/distances until end-of-block or not enough\n       input data or output space */\n\n    top: do {\n        if (bits < 15) {\n            hold += input[_in++] << bits;\n            bits += 8;\n            hold += input[_in++] << bits;\n            bits += 8;\n        }\n\n        here = lcode[hold & lmask];\n\n        dolen: for (;;) {\n            // Goto emulation\n            op = here >>> 24 /*here.bits*/;\n            hold >>>= op;\n            bits -= op;\n            op = here >>> 16 & 0xff /*here.op*/;\n            if (op === 0) {\n                /* literal */\n                //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n                //        \"inflate:         literal '%c'\\n\" :\n                //        \"inflate:         literal 0x%02x\\n\", here.val));\n                output[_out++] = here & 0xffff /*here.val*/;\n            } else if (op & 16) {\n                /* length base */\n                len = here & 0xffff /*here.val*/;\n                op &= 15; /* number of extra bits */\n                if (op) {\n                    if (bits < op) {\n                        hold += input[_in++] << bits;\n                        bits += 8;\n                    }\n                    len += hold & (1 << op) - 1;\n                    hold >>>= op;\n                    bits -= op;\n                }\n                //Tracevv((stderr, \"inflate:         length %u\\n\", len));\n                if (bits < 15) {\n                    hold += input[_in++] << bits;\n                    bits += 8;\n                    hold += input[_in++] << bits;\n                    bits += 8;\n                }\n                here = dcode[hold & dmask];\n\n                dodist: for (;;) {\n                    // goto emulation\n                    op = here >>> 24 /*here.bits*/;\n                    hold >>>= op;\n                    bits -= op;\n                    op = here >>> 16 & 0xff /*here.op*/;\n\n                    if (op & 16) {\n                        /* distance base */\n                        dist = here & 0xffff /*here.val*/;\n                        op &= 15; /* number of extra bits */\n                        if (bits < op) {\n                            hold += input[_in++] << bits;\n                            bits += 8;\n                            if (bits < op) {\n                                hold += input[_in++] << bits;\n                                bits += 8;\n                            }\n                        }\n                        dist += hold & (1 << op) - 1;\n                        //#ifdef INFLATE_STRICT\n                        if (dist > dmax) {\n                            strm.msg = 'invalid distance too far back';\n                            state.mode = BAD$1;\n                            break top;\n                        }\n                        //#endif\n                        hold >>>= op;\n                        bits -= op;\n                        //Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n                        op = _out - beg; /* max distance in output */\n                        if (dist > op) {\n                            /* see if copy from window */\n                            op = dist - op; /* distance back in window */\n                            if (op > whave) {\n                                if (state.sane) {\n                                    strm.msg = 'invalid distance too far back';\n                                    state.mode = BAD$1;\n                                    break top;\n                                }\n\n                                // (!) This block is disabled in zlib defailts,\n                                // don't enable it for binary compatibility\n                                //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n                                //                if (len <= op - whave) {\n                                //                  do {\n                                //                    output[_out++] = 0;\n                                //                  } while (--len);\n                                //                  continue top;\n                                //                }\n                                //                len -= op - whave;\n                                //                do {\n                                //                  output[_out++] = 0;\n                                //                } while (--op > whave);\n                                //                if (op === 0) {\n                                //                  from = _out - dist;\n                                //                  do {\n                                //                    output[_out++] = output[from++];\n                                //                  } while (--len);\n                                //                  continue top;\n                                //                }\n                                //#endif\n                            }\n                            from = 0; // window index\n                            from_source = s_window;\n                            if (wnext === 0) {\n                                /* very common case */\n                                from += wsize - op;\n                                if (op < len) {\n                                    /* some from window */\n                                    len -= op;\n                                    do {\n                                        output[_out++] = s_window[from++];\n                                    } while (--op);\n                                    from = _out - dist; /* rest from output */\n                                    from_source = output;\n                                }\n                            } else if (wnext < op) {\n                                /* wrap around window */\n                                from += wsize + wnext - op;\n                                op -= wnext;\n                                if (op < len) {\n                                    /* some from end of window */\n                                    len -= op;\n                                    do {\n                                        output[_out++] = s_window[from++];\n                                    } while (--op);\n                                    from = 0;\n                                    if (wnext < len) {\n                                        /* some from start of window */\n                                        op = wnext;\n                                        len -= op;\n                                        do {\n                                            output[_out++] = s_window[from++];\n                                        } while (--op);\n                                        from = _out - dist; /* rest from output */\n                                        from_source = output;\n                                    }\n                                }\n                            } else {\n                                /* contiguous in window */\n                                from += wnext - op;\n                                if (op < len) {\n                                    /* some from window */\n                                    len -= op;\n                                    do {\n                                        output[_out++] = s_window[from++];\n                                    } while (--op);\n                                    from = _out - dist; /* rest from output */\n                                    from_source = output;\n                                }\n                            }\n                            while (len > 2) {\n                                output[_out++] = from_source[from++];\n                                output[_out++] = from_source[from++];\n                                output[_out++] = from_source[from++];\n                                len -= 3;\n                            }\n                            if (len) {\n                                output[_out++] = from_source[from++];\n                                if (len > 1) {\n                                    output[_out++] = from_source[from++];\n                                }\n                            }\n                        } else {\n                            from = _out - dist; /* copy direct from output */\n                            do {\n                                /* minimum length is three */\n                                output[_out++] = output[from++];\n                                output[_out++] = output[from++];\n                                output[_out++] = output[from++];\n                                len -= 3;\n                            } while (len > 2);\n                            if (len) {\n                                output[_out++] = output[from++];\n                                if (len > 1) {\n                                    output[_out++] = output[from++];\n                                }\n                            }\n                        }\n                    } else if ((op & 64) === 0) {\n                        /* 2nd level distance code */\n                        here = dcode[(here & 0xffff) + ( /*here.val*/hold & (1 << op) - 1)];\n                        continue dodist;\n                    } else {\n                        strm.msg = 'invalid distance code';\n                        state.mode = BAD$1;\n                        break top;\n                    }\n\n                    break; // need to emulate goto via \"continue\"\n                }\n            } else if ((op & 64) === 0) {\n                /* 2nd level length code */\n                here = lcode[(here & 0xffff) + ( /*here.val*/hold & (1 << op) - 1)];\n                continue dolen;\n            } else if (op & 32) {\n                /* end-of-block */\n                //Tracevv((stderr, \"inflate:         end of block\\n\"));\n                state.mode = TYPE$1;\n                break top;\n            } else {\n                strm.msg = 'invalid literal/length code';\n                state.mode = BAD$1;\n                break top;\n            }\n\n            break; // need to emulate goto via \"continue\"\n        }\n    } while (_in < last && _out < end);\n\n    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n    len = bits >> 3;\n    _in -= len;\n    bits -= len << 3;\n    hold &= (1 << bits) - 1;\n\n    /* update state and return */\n    strm.next_in = _in;\n    strm.next_out = _out;\n    strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);\n    strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end);\n    state.hold = hold;\n    state.bits = bits;\n    return;\n}\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS$1 = 852;\nvar ENOUGH_DISTS$1 = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES$1 = 0;\nvar LENS$1 = 1;\nvar DISTS$1 = 2;\n\nvar lbase = [/* Length codes 257..285 base */\n3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];\n\nvar lext = [/* Length codes 257..285 extra */\n16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78];\n\nvar dbase = [/* Distance codes 0..29 base */\n1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0];\n\nvar dext = [/* Distance codes 0..29 extra */\n16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];\n\nfunction inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n    var bits = opts.bits;\n    //here = opts.here; /* table entry for duplication */\n\n    var len = 0; /* a code's length in bits */\n    var sym = 0; /* index of code symbols */\n    var min = 0,\n        max = 0; /* minimum and maximum code lengths */\n    var root = 0; /* number of index bits for root table */\n    var curr = 0; /* number of index bits for current table */\n    var drop = 0; /* code bits to drop for sub-table */\n    var left = 0; /* number of prefix codes available */\n    var used = 0; /* code entries in table used */\n    var huff = 0; /* Huffman code */\n    var incr; /* for incrementing code, index */\n    var fill; /* index for replicating entries */\n    var low; /* low bits for current root entry */\n    var mask; /* mask for low root bits */\n    var next; /* next available space in table */\n    var base = null; /* base value table to use */\n    var base_index = 0;\n    //  var shoextra;    /* extra bits table to use */\n    var end; /* use base and extra for symbol > end */\n    var count = new Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */\n    var offs = new Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */\n    var extra = null;\n    var extra_index = 0;\n\n    var here_bits, here_op, here_val;\n\n    /*\n     Process a set of code lengths to create a canonical Huffman code.  The\n     code lengths are lens[0..codes-1].  Each length corresponds to the\n     symbols 0..codes-1.  The Huffman code is generated by first sorting the\n     symbols by length from short to long, and retaining the symbol order\n     for codes with equal lengths.  Then the code starts with all zero bits\n     for the first code of the shortest length, and the codes are integer\n     increments for the same length, and zeros are appended as the length\n     increases.  For the deflate format, these bits are stored backwards\n     from their more natural integer increment ordering, and so when the\n     decoding tables are built in the large loop below, the integer codes\n     are incremented backwards.\n      This routine assumes, but does not check, that all of the entries in\n     lens[] are in the range 0..MAXBITS.  The caller must assure this.\n     1..MAXBITS is interpreted as that code length.  zero means that that\n     symbol does not occur in this code.\n      The codes are sorted by computing a count of codes for each length,\n     creating from that a table of starting indices for each length in the\n     sorted table, and then entering the symbols in order in the sorted\n     table.  The sorted table is work[], with that space being provided by\n     the caller.\n      The length counts are used for other purposes as well, i.e. finding\n     the minimum and maximum length codes, determining if there are any\n     codes at all, checking for a valid set of lengths, and looking ahead\n     at length counts to determine sub-table sizes when building the\n     decoding tables.\n     */\n\n    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n    for (len = 0; len <= MAXBITS; len++) {\n        count[len] = 0;\n    }\n    for (sym = 0; sym < codes; sym++) {\n        count[lens[lens_index + sym]]++;\n    }\n\n    /* bound code lengths, force root to be within code lengths */\n    root = bits;\n    for (max = MAXBITS; max >= 1; max--) {\n        if (count[max] !== 0) {\n            break;\n        }\n    }\n    if (root > max) {\n        root = max;\n    }\n    if (max === 0) {\n        /* no symbols to code at all */\n        //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */\n        //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;\n        //table.val[opts.table_index++] = 0;   //here.val = (var short)0;\n        table[table_index++] = 1 << 24 | 64 << 16 | 0;\n\n        //table.op[opts.table_index] = 64;\n        //table.bits[opts.table_index] = 1;\n        //table.val[opts.table_index++] = 0;\n        table[table_index++] = 1 << 24 | 64 << 16 | 0;\n\n        opts.bits = 1;\n        return 0; /* no symbols, but wait for decoding to report error */\n    }\n    for (min = 1; min < max; min++) {\n        if (count[min] !== 0) {\n            break;\n        }\n    }\n    if (root < min) {\n        root = min;\n    }\n\n    /* check for an over-subscribed or incomplete set of lengths */\n    left = 1;\n    for (len = 1; len <= MAXBITS; len++) {\n        left <<= 1;\n        left -= count[len];\n        if (left < 0) {\n            return -1;\n        } /* over-subscribed */\n    }\n    if (left > 0 && (type === CODES$1 || max !== 1)) {\n        return -1; /* incomplete set */\n    }\n\n    /* generate offsets into symbol table for each length for sorting */\n    offs[1] = 0;\n    for (len = 1; len < MAXBITS; len++) {\n        offs[len + 1] = offs[len] + count[len];\n    }\n\n    /* sort symbols by length, by symbol order within each length */\n    for (sym = 0; sym < codes; sym++) {\n        if (lens[lens_index + sym] !== 0) {\n            work[offs[lens[lens_index + sym]]++] = sym;\n        }\n    }\n\n    /*\n     Create and fill in decoding tables.  In this loop, the table being\n     filled is at next and has curr index bits.  The code being used is huff\n     with length len.  That code is converted to an index by dropping drop\n     bits off of the bottom.  For codes where len is less than drop + curr,\n     those top drop + curr - len bits are incremented through all values to\n     fill the table with replicated entries.\n      root is the number of index bits for the root table.  When len exceeds\n     root, sub-tables are created pointed to by the root entry with an index\n     of the low root bits of huff.  This is saved in low to check for when a\n     new sub-table should be started.  drop is zero when the root table is\n     being filled, and drop is root when sub-tables are being filled.\n      When a new sub-table is needed, it is necessary to look ahead in the\n     code lengths to determine what size sub-table is needed.  The length\n     counts are used for this, and so count[] is decremented as codes are\n     entered in the tables.\n      used keeps track of how many table entries have been allocated from the\n     provided *table space.  It is checked for LENS and DIST tables against\n     the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n     the initial root table size constants.  See the comments in inftrees.h\n     for more information.\n      sym increments through all symbols, and the loop terminates when\n     all codes of length max, i.e. all codes, have been processed.  This\n     routine permits incomplete codes, so another loop after this one fills\n     in the rest of the decoding tables with invalid code markers.\n     */\n\n    /* set up for code type */\n    // poor man optimization - use if-else instead of switch,\n    // to avoid deopts in old v8\n    if (type === CODES$1) {\n        base = extra = work; /* dummy value--not used */\n        end = 19;\n    } else if (type === LENS$1) {\n        base = lbase;\n        base_index -= 257;\n        extra = lext;\n        extra_index -= 257;\n        end = 256;\n    } else {\n        /* DISTS */\n        base = dbase;\n        extra = dext;\n        end = -1;\n    }\n\n    /* initialize opts for loop */\n    huff = 0; /* starting code */\n    sym = 0; /* starting code symbol */\n    len = min; /* starting code length */\n    next = table_index; /* current table to fill in */\n    curr = root; /* current table index bits */\n    drop = 0; /* current bits to drop from code for index */\n    low = -1; /* trigger new sub-table when len > root */\n    used = 1 << root; /* use root table entries */\n    mask = used - 1; /* mask for comparing low */\n\n    /* check available table space */\n    if (type === LENS$1 && used > ENOUGH_LENS$1 || type === DISTS$1 && used > ENOUGH_DISTS$1) {\n        return 1;\n    }\n\n    /* process all codes and make table entries */\n    for (;;) {\n        /* create table entry */\n        here_bits = len - drop;\n        if (work[sym] < end) {\n            here_op = 0;\n            here_val = work[sym];\n        } else if (work[sym] > end) {\n            here_op = extra[extra_index + work[sym]];\n            here_val = base[base_index + work[sym]];\n        } else {\n            here_op = 32 + 64; /* end of block */\n            here_val = 0;\n        }\n\n        /* replicate for those indices with low len bits equal to huff */\n        incr = 1 << len - drop;\n        fill = 1 << curr;\n        min = fill; /* save offset to next table */\n        do {\n            fill -= incr;\n            table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;\n        } while (fill !== 0);\n\n        /* backwards increment the len-bit code huff */\n        incr = 1 << len - 1;\n        while (huff & incr) {\n            incr >>= 1;\n        }\n        if (incr !== 0) {\n            huff &= incr - 1;\n            huff += incr;\n        } else {\n            huff = 0;\n        }\n\n        /* go to next symbol, update count, len */\n        sym++;\n        if (--count[len] === 0) {\n            if (len === max) {\n                break;\n            }\n            len = lens[lens_index + work[sym]];\n        }\n\n        /* create new sub-table if needed */\n        if (len > root && (huff & mask) !== low) {\n            /* if first time, transition to sub-tables */\n            if (drop === 0) {\n                drop = root;\n            }\n\n            /* increment past last table */\n            next += min; /* here min is 1 << curr */\n\n            /* determine length of next table */\n            curr = len - drop;\n            left = 1 << curr;\n            while (curr + drop < max) {\n                left -= count[curr + drop];\n                if (left <= 0) {\n                    break;\n                }\n                curr++;\n                left <<= 1;\n            }\n\n            /* check for enough space */\n            used += 1 << curr;\n            if (type === LENS$1 && used > ENOUGH_LENS$1 || type === DISTS$1 && used > ENOUGH_DISTS$1) {\n                return 1;\n            }\n\n            /* point entry in root table to sub-table */\n            low = huff & mask;\n            /*table.op[low] = curr;\n            table.bits[low] = root;\n            table.val[low] = next - opts.table_index;*/\n            table[low] = root << 24 | curr << 16 | next - table_index | 0;\n        }\n    }\n\n    /* fill in remaining table entry if code is incomplete (guaranteed to have\n     at most one remaining entry, since if the code is incomplete, the\n     maximum code length that was allowed to get this far is one bit) */\n    if (huff !== 0) {\n        //table.op[next + huff] = 64;            /* invalid code marker */\n        //table.bits[next + huff] = len - drop;\n        //table.val[next + huff] = 0;\n        table[next + huff] = len - drop << 24 | 64 << 16 | 0;\n    }\n\n    /* set return parameters */\n    //opts.table_index += used;\n    opts.bits = root;\n    return 0;\n}\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH      = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\n//var Z_FULL_FLUSH    = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\nfunction zswap32(q) {\n    return (q >>> 24 & 0xff) + (q >>> 8 & 0xff00) + ((q & 0xff00) << 8) + ((q & 0xff) << 24);\n}\n\nfunction InflateState() {\n    this.mode = 0; /* current inflate mode */\n    this.last = false; /* true if processing last block */\n    this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n    this.havedict = false; /* true if dictionary provided */\n    this.flags = 0; /* gzip header method and flags (0 if zlib) */\n    this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n    this.check = 0; /* protected copy of check value */\n    this.total = 0; /* protected copy of output count */\n    // TODO: may be {}\n    this.head = null; /* where to save gzip header information */\n\n    /* sliding window */\n    this.wbits = 0; /* log base 2 of requested window size */\n    this.wsize = 0; /* window size or zero if not using window */\n    this.whave = 0; /* valid bytes in the window */\n    this.wnext = 0; /* window write index */\n    this.window = null; /* allocated sliding window, if needed */\n\n    /* bit accumulator */\n    this.hold = 0; /* input bit accumulator */\n    this.bits = 0; /* number of bits in \"in\" */\n\n    /* for string and stored block copying */\n    this.length = 0; /* literal or length of data to copy */\n    this.offset = 0; /* distance back to copy string from */\n\n    /* for table and code decoding */\n    this.extra = 0; /* extra bits needed */\n\n    /* fixed and dynamic code tables */\n    this.lencode = null; /* starting table for length/literal codes */\n    this.distcode = null; /* starting table for distance codes */\n    this.lenbits = 0; /* index bits for lencode */\n    this.distbits = 0; /* index bits for distcode */\n\n    /* dynamic table building */\n    this.ncode = 0; /* number of code length code lengths */\n    this.nlen = 0; /* number of length code lengths */\n    this.ndist = 0; /* number of distance code lengths */\n    this.have = 0; /* number of code lengths in lens[] */\n    this.next = null; /* next available space in codes[] */\n\n    this.lens = new Buf16(320); /* temporary storage for code lengths */\n    this.work = new Buf16(288); /* work area for code table building */\n\n    /*\n     because we don't have pointers in js, we use lencode and distcode directly\n     as buffers so we don't need codes\n    */\n    //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */\n    this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n    this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n    this.sane = 0; /* if false, allow invalid distance too far */\n    this.back = 0; /* bits back of last unprocessed length/lit */\n    this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n    var state;\n\n    if (!strm || !strm.state) {\n        return Z_STREAM_ERROR;\n    }\n    state = strm.state;\n    strm.total_in = strm.total_out = state.total = 0;\n    strm.msg = ''; /*Z_NULL*/\n    if (state.wrap) {\n        /* to support ill-conceived Java test suite */\n        strm.adler = state.wrap & 1;\n    }\n    state.mode = HEAD;\n    state.last = 0;\n    state.havedict = 0;\n    state.dmax = 32768;\n    state.head = null /*Z_NULL*/;\n    state.hold = 0;\n    state.bits = 0;\n    //state.lencode = state.distcode = state.next = state.codes;\n    state.lencode = state.lendyn = new Buf32(ENOUGH_LENS);\n    state.distcode = state.distdyn = new Buf32(ENOUGH_DISTS);\n\n    state.sane = 1;\n    state.back = -1;\n    //Tracev((stderr, \"inflate: reset\\n\"));\n    return Z_OK;\n}\n\nfunction inflateReset(strm) {\n    var state;\n\n    if (!strm || !strm.state) {\n        return Z_STREAM_ERROR;\n    }\n    state = strm.state;\n    state.wsize = 0;\n    state.whave = 0;\n    state.wnext = 0;\n    return inflateResetKeep(strm);\n}\n\nfunction inflateReset2(strm, windowBits) {\n    var wrap;\n    var state;\n\n    /* get the state */\n    if (!strm || !strm.state) {\n        return Z_STREAM_ERROR;\n    }\n    state = strm.state;\n\n    /* extract wrap request from windowBits parameter */\n    if (windowBits < 0) {\n        wrap = 0;\n        windowBits = -windowBits;\n    } else {\n        wrap = (windowBits >> 4) + 1;\n        if (windowBits < 48) {\n            windowBits &= 15;\n        }\n    }\n\n    /* set number of window bits, free window if different */\n    if (windowBits && (windowBits < 8 || windowBits > 15)) {\n        return Z_STREAM_ERROR;\n    }\n    if (state.window !== null && state.wbits !== windowBits) {\n        state.window = null;\n    }\n\n    /* update state and reset the rest of it */\n    state.wrap = wrap;\n    state.wbits = windowBits;\n    return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n    var ret;\n    var state;\n\n    if (!strm) {\n        return Z_STREAM_ERROR;\n    }\n    //strm.msg = Z_NULL;                 /* in case we return an error */\n\n    state = new InflateState();\n\n    //if (state === Z_NULL) return Z_MEM_ERROR;\n    //Tracev((stderr, \"inflate: allocated\\n\"));\n    strm.state = state;\n    state.window = null /*Z_NULL*/;\n    ret = inflateReset2(strm, windowBits);\n    if (ret !== Z_OK) {\n        strm.state = null /*Z_NULL*/;\n    }\n    return ret;\n}\n\nfunction inflateInit(strm) {\n    return inflateInit2(strm, DEF_WBITS);\n}\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter.  This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time.  However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix;\nvar distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n    /* build fixed huffman tables if first call (may not be thread safe) */\n    if (virgin) {\n        var sym;\n\n        lenfix = new Buf32(512);\n        distfix = new Buf32(32);\n\n        /* literal/length table */\n        sym = 0;\n        while (sym < 144) {\n            state.lens[sym++] = 8;\n        }\n        while (sym < 256) {\n            state.lens[sym++] = 9;\n        }\n        while (sym < 280) {\n            state.lens[sym++] = 7;\n        }\n        while (sym < 288) {\n            state.lens[sym++] = 8;\n        }\n\n        inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n        /* distance table */\n        sym = 0;\n        while (sym < 32) {\n            state.lens[sym++] = 5;\n        }\n\n        inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n        /* do this just once */\n        virgin = false;\n    }\n\n    state.lencode = lenfix;\n    state.lenbits = 9;\n    state.distcode = distfix;\n    state.distbits = 5;\n}\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning.  If window does not exist yet, create it.  This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n    var dist;\n    var state = strm.state;\n\n    /* if it hasn't been done already, allocate space for the window */\n    if (state.window === null) {\n        state.wsize = 1 << state.wbits;\n        state.wnext = 0;\n        state.whave = 0;\n\n        state.window = new Buf8(state.wsize);\n    }\n\n    /* copy state->wsize or less output bytes into the circular window */\n    if (copy >= state.wsize) {\n        arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n        state.wnext = 0;\n        state.whave = state.wsize;\n    } else {\n        dist = state.wsize - state.wnext;\n        if (dist > copy) {\n            dist = copy;\n        }\n        //zmemcpy(state->window + state->wnext, end - copy, dist);\n        arraySet(state.window, src, end - copy, dist, state.wnext);\n        copy -= dist;\n        if (copy) {\n            //zmemcpy(state->window, end - copy, copy);\n            arraySet(state.window, src, end - copy, copy, 0);\n            state.wnext = copy;\n            state.whave = state.wsize;\n        } else {\n            state.wnext += dist;\n            if (state.wnext === state.wsize) {\n                state.wnext = 0;\n            }\n            if (state.whave < state.wsize) {\n                state.whave += dist;\n            }\n        }\n    }\n    return 0;\n}\n\nfunction _inflate(strm, flush) {\n    var state;\n    var input, output; // input/output buffers\n    var next; /* next input INDEX */\n    var put; /* next output INDEX */\n    var have, left; /* available input and output */\n    var hold; /* bit buffer */\n    var bits; /* bits in bit buffer */\n    var _in, _out; /* save starting available input and output */\n    var copy; /* number of stored or match bytes to copy */\n    var from; /* where to copy match bytes from */\n    var from_source;\n    var here = 0; /* current decoding table entry */\n    var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n    //var last;                   /* parent table entry */\n    var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n    var len; /* length to copy for repeats, bits to drop */\n    var ret; /* return code */\n    var hbuf = new Buf8(4); /* buffer for gzip header crc calculation */\n    var opts;\n\n    var n; // temporary var for NEED_BITS\n\n    var order = /* permutation of code lengths */\n    [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n    if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) {\n        return Z_STREAM_ERROR;\n    }\n\n    state = strm.state;\n    if (state.mode === TYPE) {\n        state.mode = TYPEDO;\n    } /* skip check */\n\n    //--- LOAD() ---\n    put = strm.next_out;\n    output = strm.output;\n    left = strm.avail_out;\n    next = strm.next_in;\n    input = strm.input;\n    have = strm.avail_in;\n    hold = state.hold;\n    bits = state.bits;\n    //---\n\n    _in = have;\n    _out = left;\n    ret = Z_OK;\n\n    inf_leave: // goto emulation\n    for (;;) {\n        switch (state.mode) {\n            case HEAD:\n                if (state.wrap === 0) {\n                    state.mode = TYPEDO;\n                    break;\n                }\n                //=== NEEDBITS(16);\n                while (bits < 16) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                }\n                //===//\n                if (state.wrap & 2 && hold === 0x8b1f) {\n                    /* gzip header */\n                    state.check = 0 /*crc32(0L, Z_NULL, 0)*/;\n                    //=== CRC2(state.check, hold);\n                    hbuf[0] = hold & 0xff;\n                    hbuf[1] = hold >>> 8 & 0xff;\n                    state.check = makeTable(state.check, hbuf, 2, 0);\n                    //===//\n\n                    //=== INITBITS();\n                    hold = 0;\n                    bits = 0;\n                    //===//\n                    state.mode = FLAGS;\n                    break;\n                }\n                state.flags = 0; /* expect zlib header */\n                if (state.head) {\n                    state.head.done = false;\n                }\n                if (!(state.wrap & 1) || /* check if zlib header allowed */\n                (((hold & 0xff) << /*BITS(8)*/8) + (hold >> 8)) % 31) {\n                    strm.msg = 'incorrect header check';\n                    state.mode = BAD;\n                    break;\n                }\n                if ((hold & 0x0f) !== /*BITS(4)*/Z_DEFLATED) {\n                    strm.msg = 'unknown compression method';\n                    state.mode = BAD;\n                    break;\n                }\n                //--- DROPBITS(4) ---//\n                hold >>>= 4;\n                bits -= 4;\n                //---//\n                len = (hold & 0x0f) + /*BITS(4)*/8;\n                if (state.wbits === 0) {\n                    state.wbits = len;\n                } else if (len > state.wbits) {\n                    strm.msg = 'invalid window size';\n                    state.mode = BAD;\n                    break;\n                }\n                state.dmax = 1 << len;\n                //Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n                strm.adler = state.check = 1 /*adler32(0L, Z_NULL, 0)*/;\n                state.mode = hold & 0x200 ? DICTID : TYPE;\n                //=== INITBITS();\n                hold = 0;\n                bits = 0;\n                //===//\n                break;\n            case FLAGS:\n                //=== NEEDBITS(16); */\n                while (bits < 16) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                }\n                //===//\n                state.flags = hold;\n                if ((state.flags & 0xff) !== Z_DEFLATED) {\n                    strm.msg = 'unknown compression method';\n                    state.mode = BAD;\n                    break;\n                }\n                if (state.flags & 0xe000) {\n                    strm.msg = 'unknown header flags set';\n                    state.mode = BAD;\n                    break;\n                }\n                if (state.head) {\n                    state.head.text = hold >> 8 & 1;\n                }\n                if (state.flags & 0x0200) {\n                    //=== CRC2(state.check, hold);\n                    hbuf[0] = hold & 0xff;\n                    hbuf[1] = hold >>> 8 & 0xff;\n                    state.check = makeTable(state.check, hbuf, 2, 0);\n                    //===//\n                }\n                //=== INITBITS();\n                hold = 0;\n                bits = 0;\n                //===//\n                state.mode = TIME;\n            /* falls through */\n            case TIME:\n                //=== NEEDBITS(32); */\n                while (bits < 32) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                }\n                //===//\n                if (state.head) {\n                    state.head.time = hold;\n                }\n                if (state.flags & 0x0200) {\n                    //=== CRC4(state.check, hold)\n                    hbuf[0] = hold & 0xff;\n                    hbuf[1] = hold >>> 8 & 0xff;\n                    hbuf[2] = hold >>> 16 & 0xff;\n                    hbuf[3] = hold >>> 24 & 0xff;\n                    state.check = makeTable(state.check, hbuf, 4, 0);\n                    //===\n                }\n                //=== INITBITS();\n                hold = 0;\n                bits = 0;\n                //===//\n                state.mode = OS;\n            /* falls through */\n            case OS:\n                //=== NEEDBITS(16); */\n                while (bits < 16) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                }\n                //===//\n                if (state.head) {\n                    state.head.xflags = hold & 0xff;\n                    state.head.os = hold >> 8;\n                }\n                if (state.flags & 0x0200) {\n                    //=== CRC2(state.check, hold);\n                    hbuf[0] = hold & 0xff;\n                    hbuf[1] = hold >>> 8 & 0xff;\n                    state.check = makeTable(state.check, hbuf, 2, 0);\n                    //===//\n                }\n                //=== INITBITS();\n                hold = 0;\n                bits = 0;\n                //===//\n                state.mode = EXLEN;\n            /* falls through */\n            case EXLEN:\n                if (state.flags & 0x0400) {\n                    //=== NEEDBITS(16); */\n                    while (bits < 16) {\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                    }\n                    //===//\n                    state.length = hold;\n                    if (state.head) {\n                        state.head.extra_len = hold;\n                    }\n                    if (state.flags & 0x0200) {\n                        //=== CRC2(state.check, hold);\n                        hbuf[0] = hold & 0xff;\n                        hbuf[1] = hold >>> 8 & 0xff;\n                        state.check = makeTable(state.check, hbuf, 2, 0);\n                        //===//\n                    }\n                    //=== INITBITS();\n                    hold = 0;\n                    bits = 0;\n                    //===//\n                } else if (state.head) {\n                    state.head.extra = null /*Z_NULL*/;\n                }\n                state.mode = EXTRA;\n            /* falls through */\n            case EXTRA:\n                if (state.flags & 0x0400) {\n                    copy = state.length;\n                    if (copy > have) {\n                        copy = have;\n                    }\n                    if (copy) {\n                        if (state.head) {\n                            len = state.head.extra_len - state.length;\n                            if (!state.head.extra) {\n                                // Use untyped array for more conveniend processing later\n                                state.head.extra = new Array(state.head.extra_len);\n                            }\n                            arraySet(state.head.extra, input, next,\n                            // extra field is limited to 65536 bytes\n                            // - no need for additional size check\n                            copy,\n                            /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n                            len);\n                            //zmemcpy(state.head.extra + len, next,\n                            //        len + copy > state.head.extra_max ?\n                            //        state.head.extra_max - len : copy);\n                        }\n                        if (state.flags & 0x0200) {\n                            state.check = makeTable(state.check, input, copy, next);\n                        }\n                        have -= copy;\n                        next += copy;\n                        state.length -= copy;\n                    }\n                    if (state.length) {\n                        break inf_leave;\n                    }\n                }\n                state.length = 0;\n                state.mode = NAME;\n            /* falls through */\n            case NAME:\n                if (state.flags & 0x0800) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    copy = 0;\n                    do {\n                        // TODO: 2 or 1 bytes?\n                        len = input[next + copy++];\n                        /* use constant limit because in js we should not preallocate memory */\n                        if (state.head && len && state.length < 65536 /*state.head.name_max*/) {\n                            state.head.name += String.fromCharCode(len);\n                        }\n                    } while (len && copy < have);\n\n                    if (state.flags & 0x0200) {\n                        state.check = makeTable(state.check, input, copy, next);\n                    }\n                    have -= copy;\n                    next += copy;\n                    if (len) {\n                        break inf_leave;\n                    }\n                } else if (state.head) {\n                    state.head.name = null;\n                }\n                state.length = 0;\n                state.mode = COMMENT;\n            /* falls through */\n            case COMMENT:\n                if (state.flags & 0x1000) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    copy = 0;\n                    do {\n                        len = input[next + copy++];\n                        /* use constant limit because in js we should not preallocate memory */\n                        if (state.head && len && state.length < 65536 /*state.head.comm_max*/) {\n                            state.head.comment += String.fromCharCode(len);\n                        }\n                    } while (len && copy < have);\n                    if (state.flags & 0x0200) {\n                        state.check = makeTable(state.check, input, copy, next);\n                    }\n                    have -= copy;\n                    next += copy;\n                    if (len) {\n                        break inf_leave;\n                    }\n                } else if (state.head) {\n                    state.head.comment = null;\n                }\n                state.mode = HCRC;\n            /* falls through */\n            case HCRC:\n                if (state.flags & 0x0200) {\n                    //=== NEEDBITS(16); */\n                    while (bits < 16) {\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                    }\n                    //===//\n                    if (hold !== (state.check & 0xffff)) {\n                        strm.msg = 'header crc mismatch';\n                        state.mode = BAD;\n                        break;\n                    }\n                    //=== INITBITS();\n                    hold = 0;\n                    bits = 0;\n                    //===//\n                }\n                if (state.head) {\n                    state.head.hcrc = state.flags >> 9 & 1;\n                    state.head.done = true;\n                }\n                strm.adler = state.check = 0;\n                state.mode = TYPE;\n                break;\n            case DICTID:\n                //=== NEEDBITS(32); */\n                while (bits < 32) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                }\n                //===//\n                strm.adler = state.check = zswap32(hold);\n                //=== INITBITS();\n                hold = 0;\n                bits = 0;\n                //===//\n                state.mode = DICT;\n            /* falls through */\n            case DICT:\n                if (state.havedict === 0) {\n                    //--- RESTORE() ---\n                    strm.next_out = put;\n                    strm.avail_out = left;\n                    strm.next_in = next;\n                    strm.avail_in = have;\n                    state.hold = hold;\n                    state.bits = bits;\n                    //---\n                    return Z_NEED_DICT;\n                }\n                strm.adler = state.check = 1 /*adler32(0L, Z_NULL, 0)*/;\n                state.mode = TYPE;\n            /* falls through */\n            case TYPE:\n                if (flush === Z_BLOCK || flush === Z_TREES) {\n                    break inf_leave;\n                }\n            /* falls through */\n            case TYPEDO:\n                if (state.last) {\n                    //--- BYTEBITS() ---//\n                    hold >>>= bits & 7;\n                    bits -= bits & 7;\n                    //---//\n                    state.mode = CHECK;\n                    break;\n                }\n                //=== NEEDBITS(3); */\n                while (bits < 3) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                }\n                //===//\n                state.last = hold & 0x01 /*BITS(1)*/;\n                //--- DROPBITS(1) ---//\n                hold >>>= 1;\n                bits -= 1;\n                //---//\n\n                switch (hold & 0x03) {/*BITS(2)*/case 0:\n                        /* stored block */\n                        //Tracev((stderr, \"inflate:     stored block%s\\n\",\n                        //        state.last ? \" (last)\" : \"\"));\n                        state.mode = STORED;\n                        break;\n                    case 1:\n                        /* fixed block */\n                        fixedtables(state);\n                        //Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n                        //        state.last ? \" (last)\" : \"\"));\n                        state.mode = LEN_; /* decode codes */\n                        if (flush === Z_TREES) {\n                            //--- DROPBITS(2) ---//\n                            hold >>>= 2;\n                            bits -= 2;\n                            //---//\n                            break inf_leave;\n                        }\n                        break;\n                    case 2:\n                        /* dynamic block */\n                        //Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n                        //        state.last ? \" (last)\" : \"\"));\n                        state.mode = TABLE;\n                        break;\n                    case 3:\n                        strm.msg = 'invalid block type';\n                        state.mode = BAD;\n                }\n                //--- DROPBITS(2) ---//\n                hold >>>= 2;\n                bits -= 2;\n                //---//\n                break;\n            case STORED:\n                //--- BYTEBITS() ---// /* go to byte boundary */\n                hold >>>= bits & 7;\n                bits -= bits & 7;\n                //---//\n                //=== NEEDBITS(32); */\n                while (bits < 32) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                }\n                //===//\n                if ((hold & 0xffff) !== (hold >>> 16 ^ 0xffff)) {\n                    strm.msg = 'invalid stored block lengths';\n                    state.mode = BAD;\n                    break;\n                }\n                state.length = hold & 0xffff;\n                //Tracev((stderr, \"inflate:       stored length %u\\n\",\n                //        state.length));\n                //=== INITBITS();\n                hold = 0;\n                bits = 0;\n                //===//\n                state.mode = COPY_;\n                if (flush === Z_TREES) {\n                    break inf_leave;\n                }\n            /* falls through */\n            case COPY_:\n                state.mode = COPY;\n            /* falls through */\n            case COPY:\n                copy = state.length;\n                if (copy) {\n                    if (copy > have) {\n                        copy = have;\n                    }\n                    if (copy > left) {\n                        copy = left;\n                    }\n                    if (copy === 0) {\n                        break inf_leave;\n                    }\n                    //--- zmemcpy(put, next, copy); ---\n                    arraySet(output, input, next, copy, put);\n                    //---//\n                    have -= copy;\n                    next += copy;\n                    left -= copy;\n                    put += copy;\n                    state.length -= copy;\n                    break;\n                }\n                //Tracev((stderr, \"inflate:       stored end\\n\"));\n                state.mode = TYPE;\n                break;\n            case TABLE:\n                //=== NEEDBITS(14); */\n                while (bits < 14) {\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                }\n                //===//\n                state.nlen = (hold & 0x1f) + /*BITS(5)*/257;\n                //--- DROPBITS(5) ---//\n                hold >>>= 5;\n                bits -= 5;\n                //---//\n                state.ndist = (hold & 0x1f) + /*BITS(5)*/1;\n                //--- DROPBITS(5) ---//\n                hold >>>= 5;\n                bits -= 5;\n                //---//\n                state.ncode = (hold & 0x0f) + /*BITS(4)*/4;\n                //--- DROPBITS(4) ---//\n                hold >>>= 4;\n                bits -= 4;\n                //---//\n                //#ifndef PKZIP_BUG_WORKAROUND\n                if (state.nlen > 286 || state.ndist > 30) {\n                    strm.msg = 'too many length or distance symbols';\n                    state.mode = BAD;\n                    break;\n                }\n                //#endif\n                //Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n                state.have = 0;\n                state.mode = LENLENS;\n            /* falls through */\n            case LENLENS:\n                while (state.have < state.ncode) {\n                    //=== NEEDBITS(3);\n                    while (bits < 3) {\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                    }\n                    //===//\n                    state.lens[order[state.have++]] = hold & 0x07; //BITS(3);\n                    //--- DROPBITS(3) ---//\n                    hold >>>= 3;\n                    bits -= 3;\n                    //---//\n                }\n                while (state.have < 19) {\n                    state.lens[order[state.have++]] = 0;\n                }\n                // We have separate tables & no pointers. 2 commented lines below not needed.\n                //state.next = state.codes;\n                //state.lencode = state.next;\n                // Switch to use dynamic table\n                state.lencode = state.lendyn;\n                state.lenbits = 7;\n\n                opts = { bits: state.lenbits };\n                ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n                state.lenbits = opts.bits;\n\n                if (ret) {\n                    strm.msg = 'invalid code lengths set';\n                    state.mode = BAD;\n                    break;\n                }\n                //Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n                state.have = 0;\n                state.mode = CODELENS;\n            /* falls through */\n            case CODELENS:\n                while (state.have < state.nlen + state.ndist) {\n                    for (;;) {\n                        here = state.lencode[hold & (1 << state.lenbits) - 1]; /*BITS(state.lenbits)*/\n                        here_bits = here >>> 24;\n                        here_op = here >>> 16 & 0xff;\n                        here_val = here & 0xffff;\n\n                        if (here_bits <= bits) {\n                            break;\n                        }\n                        //--- PULLBYTE() ---//\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                        //---//\n                    }\n                    if (here_val < 16) {\n                        //--- DROPBITS(here.bits) ---//\n                        hold >>>= here_bits;\n                        bits -= here_bits;\n                        //---//\n                        state.lens[state.have++] = here_val;\n                    } else {\n                        if (here_val === 16) {\n                            //=== NEEDBITS(here.bits + 2);\n                            n = here_bits + 2;\n                            while (bits < n) {\n                                if (have === 0) {\n                                    break inf_leave;\n                                }\n                                have--;\n                                hold += input[next++] << bits;\n                                bits += 8;\n                            }\n                            //===//\n                            //--- DROPBITS(here.bits) ---//\n                            hold >>>= here_bits;\n                            bits -= here_bits;\n                            //---//\n                            if (state.have === 0) {\n                                strm.msg = 'invalid bit length repeat';\n                                state.mode = BAD;\n                                break;\n                            }\n                            len = state.lens[state.have - 1];\n                            copy = 3 + (hold & 0x03); //BITS(2);\n                            //--- DROPBITS(2) ---//\n                            hold >>>= 2;\n                            bits -= 2;\n                            //---//\n                        } else if (here_val === 17) {\n                            //=== NEEDBITS(here.bits + 3);\n                            n = here_bits + 3;\n                            while (bits < n) {\n                                if (have === 0) {\n                                    break inf_leave;\n                                }\n                                have--;\n                                hold += input[next++] << bits;\n                                bits += 8;\n                            }\n                            //===//\n                            //--- DROPBITS(here.bits) ---//\n                            hold >>>= here_bits;\n                            bits -= here_bits;\n                            //---//\n                            len = 0;\n                            copy = 3 + (hold & 0x07); //BITS(3);\n                            //--- DROPBITS(3) ---//\n                            hold >>>= 3;\n                            bits -= 3;\n                            //---//\n                        } else {\n                            //=== NEEDBITS(here.bits + 7);\n                            n = here_bits + 7;\n                            while (bits < n) {\n                                if (have === 0) {\n                                    break inf_leave;\n                                }\n                                have--;\n                                hold += input[next++] << bits;\n                                bits += 8;\n                            }\n                            //===//\n                            //--- DROPBITS(here.bits) ---//\n                            hold >>>= here_bits;\n                            bits -= here_bits;\n                            //---//\n                            len = 0;\n                            copy = 11 + (hold & 0x7f); //BITS(7);\n                            //--- DROPBITS(7) ---//\n                            hold >>>= 7;\n                            bits -= 7;\n                            //---//\n                        }\n                        if (state.have + copy > state.nlen + state.ndist) {\n                            strm.msg = 'invalid bit length repeat';\n                            state.mode = BAD;\n                            break;\n                        }\n                        while (copy--) {\n                            state.lens[state.have++] = len;\n                        }\n                    }\n                }\n\n                /* handle error breaks in while */\n                if (state.mode === BAD) {\n                    break;\n                }\n\n                /* check for end-of-block code (better have one) */\n                if (state.lens[256] === 0) {\n                    strm.msg = 'invalid code -- missing end-of-block';\n                    state.mode = BAD;\n                    break;\n                }\n\n                /* build code tables -- note: do not change the lenbits or distbits\n                   values here (9 and 6) without reading the comments in inftrees.h\n                   concerning the ENOUGH constants, which depend on those values */\n                state.lenbits = 9;\n\n                opts = { bits: state.lenbits };\n                ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n                // We have separate tables & no pointers. 2 commented lines below not needed.\n                // state.next_index = opts.table_index;\n                state.lenbits = opts.bits;\n                // state.lencode = state.next;\n\n                if (ret) {\n                    strm.msg = 'invalid literal/lengths set';\n                    state.mode = BAD;\n                    break;\n                }\n\n                state.distbits = 6;\n                //state.distcode.copy(state.codes);\n                // Switch to use dynamic table\n                state.distcode = state.distdyn;\n                opts = { bits: state.distbits };\n                ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n                // We have separate tables & no pointers. 2 commented lines below not needed.\n                // state.next_index = opts.table_index;\n                state.distbits = opts.bits;\n                // state.distcode = state.next;\n\n                if (ret) {\n                    strm.msg = 'invalid distances set';\n                    state.mode = BAD;\n                    break;\n                }\n                //Tracev((stderr, 'inflate:       codes ok\\n'));\n                state.mode = LEN_;\n                if (flush === Z_TREES) {\n                    break inf_leave;\n                }\n            /* falls through */\n            case LEN_:\n                state.mode = LEN;\n            /* falls through */\n            case LEN:\n                if (have >= 6 && left >= 258) {\n                    //--- RESTORE() ---\n                    strm.next_out = put;\n                    strm.avail_out = left;\n                    strm.next_in = next;\n                    strm.avail_in = have;\n                    state.hold = hold;\n                    state.bits = bits;\n                    //---\n                    inflate_fast(strm, _out);\n                    //--- LOAD() ---\n                    put = strm.next_out;\n                    output = strm.output;\n                    left = strm.avail_out;\n                    next = strm.next_in;\n                    input = strm.input;\n                    have = strm.avail_in;\n                    hold = state.hold;\n                    bits = state.bits;\n                    //---\n\n                    if (state.mode === TYPE) {\n                        state.back = -1;\n                    }\n                    break;\n                }\n                state.back = 0;\n                for (;;) {\n                    here = state.lencode[hold & (1 << state.lenbits) - 1]; /*BITS(state.lenbits)*/\n                    here_bits = here >>> 24;\n                    here_op = here >>> 16 & 0xff;\n                    here_val = here & 0xffff;\n\n                    if (here_bits <= bits) {\n                        break;\n                    }\n                    //--- PULLBYTE() ---//\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                    //---//\n                }\n                if (here_op && (here_op & 0xf0) === 0) {\n                    last_bits = here_bits;\n                    last_op = here_op;\n                    last_val = here_val;\n                    for (;;) {\n                        here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> /*BITS(last.bits + last.op)*/last_bits)];\n                        here_bits = here >>> 24;\n                        here_op = here >>> 16 & 0xff;\n                        here_val = here & 0xffff;\n\n                        if (last_bits + here_bits <= bits) {\n                            break;\n                        }\n                        //--- PULLBYTE() ---//\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                        //---//\n                    }\n                    //--- DROPBITS(last.bits) ---//\n                    hold >>>= last_bits;\n                    bits -= last_bits;\n                    //---//\n                    state.back += last_bits;\n                }\n                //--- DROPBITS(here.bits) ---//\n                hold >>>= here_bits;\n                bits -= here_bits;\n                //---//\n                state.back += here_bits;\n                state.length = here_val;\n                if (here_op === 0) {\n                    //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n                    //        \"inflate:         literal '%c'\\n\" :\n                    //        \"inflate:         literal 0x%02x\\n\", here.val));\n                    state.mode = LIT;\n                    break;\n                }\n                if (here_op & 32) {\n                    //Tracevv((stderr, \"inflate:         end of block\\n\"));\n                    state.back = -1;\n                    state.mode = TYPE;\n                    break;\n                }\n                if (here_op & 64) {\n                    strm.msg = 'invalid literal/length code';\n                    state.mode = BAD;\n                    break;\n                }\n                state.extra = here_op & 15;\n                state.mode = LENEXT;\n            /* falls through */\n            case LENEXT:\n                if (state.extra) {\n                    //=== NEEDBITS(state.extra);\n                    n = state.extra;\n                    while (bits < n) {\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                    }\n                    //===//\n                    state.length += hold & (1 << state.extra) - 1 /*BITS(state.extra)*/;\n                    //--- DROPBITS(state.extra) ---//\n                    hold >>>= state.extra;\n                    bits -= state.extra;\n                    //---//\n                    state.back += state.extra;\n                }\n                //Tracevv((stderr, \"inflate:         length %u\\n\", state.length));\n                state.was = state.length;\n                state.mode = DIST;\n            /* falls through */\n            case DIST:\n                for (;;) {\n                    here = state.distcode[hold & (1 << state.distbits) - 1]; /*BITS(state.distbits)*/\n                    here_bits = here >>> 24;\n                    here_op = here >>> 16 & 0xff;\n                    here_val = here & 0xffff;\n\n                    if (here_bits <= bits) {\n                        break;\n                    }\n                    //--- PULLBYTE() ---//\n                    if (have === 0) {\n                        break inf_leave;\n                    }\n                    have--;\n                    hold += input[next++] << bits;\n                    bits += 8;\n                    //---//\n                }\n                if ((here_op & 0xf0) === 0) {\n                    last_bits = here_bits;\n                    last_op = here_op;\n                    last_val = here_val;\n                    for (;;) {\n                        here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> /*BITS(last.bits + last.op)*/last_bits)];\n                        here_bits = here >>> 24;\n                        here_op = here >>> 16 & 0xff;\n                        here_val = here & 0xffff;\n\n                        if (last_bits + here_bits <= bits) {\n                            break;\n                        }\n                        //--- PULLBYTE() ---//\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                        //---//\n                    }\n                    //--- DROPBITS(last.bits) ---//\n                    hold >>>= last_bits;\n                    bits -= last_bits;\n                    //---//\n                    state.back += last_bits;\n                }\n                //--- DROPBITS(here.bits) ---//\n                hold >>>= here_bits;\n                bits -= here_bits;\n                //---//\n                state.back += here_bits;\n                if (here_op & 64) {\n                    strm.msg = 'invalid distance code';\n                    state.mode = BAD;\n                    break;\n                }\n                state.offset = here_val;\n                state.extra = here_op & 15;\n                state.mode = DISTEXT;\n            /* falls through */\n            case DISTEXT:\n                if (state.extra) {\n                    //=== NEEDBITS(state.extra);\n                    n = state.extra;\n                    while (bits < n) {\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                    }\n                    //===//\n                    state.offset += hold & (1 << state.extra) - 1 /*BITS(state.extra)*/;\n                    //--- DROPBITS(state.extra) ---//\n                    hold >>>= state.extra;\n                    bits -= state.extra;\n                    //---//\n                    state.back += state.extra;\n                }\n                //#ifdef INFLATE_STRICT\n                if (state.offset > state.dmax) {\n                    strm.msg = 'invalid distance too far back';\n                    state.mode = BAD;\n                    break;\n                }\n                //#endif\n                //Tracevv((stderr, \"inflate:         distance %u\\n\", state.offset));\n                state.mode = MATCH;\n            /* falls through */\n            case MATCH:\n                if (left === 0) {\n                    break inf_leave;\n                }\n                copy = _out - left;\n                if (state.offset > copy) {\n                    /* copy from window */\n                    copy = state.offset - copy;\n                    if (copy > state.whave) {\n                        if (state.sane) {\n                            strm.msg = 'invalid distance too far back';\n                            state.mode = BAD;\n                            break;\n                        }\n                        // (!) This block is disabled in zlib defailts,\n                        // don't enable it for binary compatibility\n                        //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n                        //          Trace((stderr, \"inflate.c too far\\n\"));\n                        //          copy -= state.whave;\n                        //          if (copy > state.length) { copy = state.length; }\n                        //          if (copy > left) { copy = left; }\n                        //          left -= copy;\n                        //          state.length -= copy;\n                        //          do {\n                        //            output[put++] = 0;\n                        //          } while (--copy);\n                        //          if (state.length === 0) { state.mode = LEN; }\n                        //          break;\n                        //#endif\n                    }\n                    if (copy > state.wnext) {\n                        copy -= state.wnext;\n                        from = state.wsize - copy;\n                    } else {\n                        from = state.wnext - copy;\n                    }\n                    if (copy > state.length) {\n                        copy = state.length;\n                    }\n                    from_source = state.window;\n                } else {\n                    /* copy from output */\n                    from_source = output;\n                    from = put - state.offset;\n                    copy = state.length;\n                }\n                if (copy > left) {\n                    copy = left;\n                }\n                left -= copy;\n                state.length -= copy;\n                do {\n                    output[put++] = from_source[from++];\n                } while (--copy);\n                if (state.length === 0) {\n                    state.mode = LEN;\n                }\n                break;\n            case LIT:\n                if (left === 0) {\n                    break inf_leave;\n                }\n                output[put++] = state.length;\n                left--;\n                state.mode = LEN;\n                break;\n            case CHECK:\n                if (state.wrap) {\n                    //=== NEEDBITS(32);\n                    while (bits < 32) {\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        // Use '|' insdead of '+' to make sure that result is signed\n                        hold |= input[next++] << bits;\n                        bits += 8;\n                    }\n                    //===//\n                    _out -= left;\n                    strm.total_out += _out;\n                    state.total += _out;\n                    if (_out) {\n                        strm.adler = state.check =\n                        /*UPDATE(state.check, put - _out, _out);*/\n                        state.flags ? makeTable(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out);\n                    }\n                    _out = left;\n                    // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n                    if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n                        strm.msg = 'incorrect data check';\n                        state.mode = BAD;\n                        break;\n                    }\n                    //=== INITBITS();\n                    hold = 0;\n                    bits = 0;\n                    //===//\n                    //Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n                }\n                state.mode = LENGTH;\n            /* falls through */\n            case LENGTH:\n                if (state.wrap && state.flags) {\n                    //=== NEEDBITS(32);\n                    while (bits < 32) {\n                        if (have === 0) {\n                            break inf_leave;\n                        }\n                        have--;\n                        hold += input[next++] << bits;\n                        bits += 8;\n                    }\n                    //===//\n                    if (hold !== (state.total & 0xffffffff)) {\n                        strm.msg = 'incorrect length check';\n                        state.mode = BAD;\n                        break;\n                    }\n                    //=== INITBITS();\n                    hold = 0;\n                    bits = 0;\n                    //===//\n                    //Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n                }\n                state.mode = DONE;\n            /* falls through */\n            case DONE:\n                ret = Z_STREAM_END;\n                break inf_leave;\n            case BAD:\n                ret = Z_DATA_ERROR;\n                break inf_leave;\n            case MEM:\n                return Z_MEM_ERROR;\n            case SYNC:\n            /* falls through */\n            default:\n                return Z_STREAM_ERROR;\n        }\n    }\n\n    // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n    /*\n       Return from inflate(), updating the total counts and the check value.\n       If there was no progress during the inflate() call, return a buffer\n       error.  Call updatewindow() to create and/or update the window state.\n       Note: a memory error from inflate() is non-recoverable.\n     */\n\n    //--- RESTORE() ---\n    strm.next_out = put;\n    strm.avail_out = left;\n    strm.next_in = next;\n    strm.avail_in = have;\n    state.hold = hold;\n    state.bits = bits;\n    //---\n\n    if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {\n        if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n            state.mode = MEM;\n            return Z_MEM_ERROR;\n        }\n    }\n    _in -= strm.avail_in;\n    _out -= strm.avail_out;\n    strm.total_in += _in;\n    strm.total_out += _out;\n    state.total += _out;\n    if (state.wrap && _out) {\n        strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n        state.flags ? makeTable(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out);\n    }\n    strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n    if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) {\n        ret = Z_BUF_ERROR;\n    }\n    return ret;\n}\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n\nfunction ZStream() {\n    /* next input byte */\n    this.input = null; // JS specific, because we have no pointers\n    this.next_in = 0;\n    /* number of bytes available at input */\n    this.avail_in = 0;\n    /* total number of input bytes read so far */\n    this.total_in = 0;\n    /* next output byte should be put there */\n    this.output = null; // JS specific, because we have no pointers\n    this.next_out = 0;\n    /* remaining free space at output */\n    this.avail_out = 0;\n    /* total number of bytes output so far */\n    this.total_out = 0;\n    /* last error message, NULL if no error */\n    this.msg = '' /*Z_NULL*/;\n    /* not visible by applications */\n    this.state = null;\n    /* best guess about the data type: binary or text */\n    this.data_type = 2 /*Z_UNKNOWN*/;\n    /* adler32 value of the uncompressed data */\n    this.adler = 0;\n}\n\nInflate.prototype = {\n    inflate: function inflate(data, flush, expected) {\n        this.strm.input = data;\n        this.strm.avail_in = this.strm.input.length;\n        this.strm.next_in = 0;\n        this.strm.next_out = 0;\n\n        // resize our output buffer if it's too small\n        // (we could just use multiple chunks, but that would cause an extra\n        // allocation each time to flatten the chunks)\n        if (expected > this.chunkSize) {\n            this.chunkSize = expected;\n            this.strm.output = new Uint8Array(this.chunkSize);\n        }\n\n        this.strm.avail_out = this.chunkSize;\n\n        _inflate(this.strm, flush);\n\n        return new Uint8Array(this.strm.output.buffer, 0, this.strm.next_out);\n    },\n\n    reset: function reset() {\n        inflateReset(this.strm);\n    }\n};\n\nfunction Inflate() {\n    this.strm = new ZStream();\n    this.chunkSize = 1024 * 10 * 10;\n    this.strm.output = new Uint8Array(this.chunkSize);\n    this.windowBits = 5;\n\n    inflateInit(this.strm, this.windowBits);\n}\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2017 Pierre Ossman for Cendio AB\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * See README.md for usage and integration instructions.\n */\n\nvar encodings = {\n    encodingRaw: 0,\n    encodingCopyRect: 1,\n    encodingRRE: 2,\n    encodingHextile: 5,\n    encodingTight: 7,\n    encodingTightPNG: -260,\n\n    pseudoEncodingQualityLevel9: -23,\n    pseudoEncodingQualityLevel0: -32,\n    pseudoEncodingDesktopSize: -223,\n    pseudoEncodingLastRect: -224,\n    pseudoEncodingCursor: -239,\n    pseudoEncodingQEMUExtendedKeyEvent: -258,\n    pseudoEncodingExtendedDesktopSize: -308,\n    pseudoEncodingXvp: -309,\n    pseudoEncodingFence: -312,\n    pseudoEncodingContinuousUpdates: -313,\n    pseudoEncodingCompressLevel9: -247,\n    pseudoEncodingCompressLevel0: -256\n};\n\nfunction encodingName(num) {\n    switch (num) {\n        case encodings.encodingRaw:\n            return \"Raw\";\n        case encodings.encodingCopyRect:\n            return \"CopyRect\";\n        case encodings.encodingRRE:\n            return \"RRE\";\n        case encodings.encodingHextile:\n            return \"Hextile\";\n        case encodings.encodingTight:\n            return \"Tight\";\n        case encodings.encodingTightPNG:\n            return \"TightPNG\";\n        default:\n            return \"[unknown encoding \" + num + \"]\";\n    }\n}\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright 2017 Pierre Ossman for noVNC\n * Licensed under MPL 2.0 or any later version (see LICENSE.txt)\n */\n\n/* Polyfills to provide new APIs in old browsers */\n\n/* Object.assign() (taken from MDN) */\nif (typeof Object.assign != 'function') {\n    // Must be writable: true, enumerable: false, configurable: true\n    Object.defineProperty(Object, \"assign\", {\n        value: function assign(target, varArgs) {\n            // .length of function is 2\n            'use strict';\n\n            if (target == null) {\n                // TypeError if undefined or null\n                throw new TypeError('Cannot convert undefined or null to object');\n            }\n\n            var to = Object(target);\n\n            for (var index = 1; index < arguments.length; index++) {\n                var nextSource = arguments[index];\n\n                if (nextSource != null) {\n                    // Skip over if undefined or null\n                    for (var nextKey in nextSource) {\n                        // Avoid bugs when hasOwnProperty is shadowed\n                        if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n                            to[nextKey] = nextSource[nextKey];\n                        }\n                    }\n                }\n            }\n            return to;\n        },\n        writable: true,\n        configurable: true\n    });\n}\n\n/* CustomEvent constructor (taken from MDN) */\n(function () {\n    function CustomEvent(event, params) {\n        params = params || { bubbles: false, cancelable: false, detail: undefined };\n        var evt = document.createEvent('CustomEvent');\n        evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n        return evt;\n    }\n\n    CustomEvent.prototype = window.Event.prototype;\n\n    if (typeof window.CustomEvent !== \"function\") {\n        window.CustomEvent = CustomEvent;\n    }\n})();\n\n/*\n * noVNC: HTML5 VNC client\n * Copyright (C) 2012 Joel Martin\n * Copyright (C) 2017 Samuel Mannehed for Cendio AB\n * Licensed under MPL 2.0 (see LICENSE.txt)\n *\n * See README.md for usage and integration instructions.\n *\n * TIGHT decoder portion:\n * (c) 2012 Michael Tinglof, Joe Balaz, Les Piech (Mercuri.ca)\n */\n\n/*jslint white: false, browser: true */\n/*global window, Util, Display, Keyboard, Mouse, Websock, Websock_native, Base64, DES, KeyTable, Inflator, XtScancode */\n\n// How many seconds to wait for a disconnect to finish\nvar DISCONNECT_TIMEOUT = 3;\n\nfunction RFB(target, url, options) {\n    if (!target) {\n        throw Error(\"Must specify target\");\n    }\n    if (!url) {\n        throw Error(\"Must specify URL\");\n    }\n\n    this._target = target;\n    this._url = url;\n\n    // Connection details\n    options = options || {};\n    this._rfb_credentials = options.credentials || {};\n    this._shared = 'shared' in options ? !!options.shared : true;\n    this._repeaterID = options.repeaterID || '';\n\n    // Internal state\n    this._rfb_connection_state = '';\n    this._rfb_init_state = '';\n    this._rfb_auth_scheme = '';\n    this._rfb_clean_disconnect = true;\n\n    // Server capabilities\n    this._rfb_version = 0;\n    this._rfb_max_version = 3.8;\n    this._rfb_tightvnc = false;\n    this._rfb_xvp_ver = 0;\n\n    this._fb_width = 0;\n    this._fb_height = 0;\n\n    this._fb_name = \"\";\n\n    this._capabilities = { power: false };\n\n    this._supportsFence = false;\n\n    this._supportsContinuousUpdates = false;\n    this._enabledContinuousUpdates = false;\n\n    this._supportsSetDesktopSize = false;\n    this._screen_id = 0;\n    this._screen_flags = 0;\n\n    this._qemuExtKeyEventSupported = false;\n\n    // Internal objects\n    this._sock = null; // Websock object\n    this._display = null; // Display object\n    this._flushing = false; // Display flushing state\n    this._keyboard = null; // Keyboard input handler object\n    this._mouse = null; // Mouse input handler object\n\n    // Timers\n    this._disconnTimer = null; // disconnection timer\n    this._resizeTimeout = null; // resize rate limiting\n\n    // Decoder states and stats\n    this._encHandlers = {};\n    this._encStats = {};\n\n    this._FBU = {\n        rects: 0,\n        subrects: 0, // RRE and HEXTILE\n        lines: 0, // RAW\n        tiles: 0, // HEXTILE\n        bytes: 0,\n        x: 0,\n        y: 0,\n        width: 0,\n        height: 0,\n        encoding: 0,\n        subencoding: -1,\n        background: null,\n        zlibs: [] // TIGHT zlib streams\n    };\n    for (var i = 0; i < 4; i++) {\n        this._FBU.zlibs[i] = new Inflate();\n    }\n\n    this._destBuff = null;\n    this._paletteBuff = new Uint8Array(1024); // 256 * 4 (max palette size * max bytes-per-pixel)\n\n    this._rre_chunk_sz = 100;\n\n    this._timing = {\n        last_fbu: 0,\n        fbu_total: 0,\n        fbu_total_cnt: 0,\n        full_fbu_total: 0,\n        full_fbu_cnt: 0,\n\n        fbu_rt_start: 0,\n        fbu_rt_total: 0,\n        fbu_rt_cnt: 0,\n        pixels: 0\n    };\n\n    // Mouse state\n    this._mouse_buttonMask = 0;\n    this._mouse_arr = [];\n    this._viewportDragging = false;\n    this._viewportDragPos = {};\n    this._viewportHasMoved = false;\n\n    // Bound event handlers\n    this._eventHandlers = {\n        focusCanvas: this._focusCanvas.bind(this),\n        windowResize: this._windowResize.bind(this)\n    };\n\n    // main setup\n    Debug(\">> RFB.constructor\");\n\n    // Create DOM elements\n    this._screen = document.createElement('div');\n    this._screen.style.display = 'flex';\n    this._screen.style.width = '100%';\n    this._screen.style.height = '100%';\n    this._screen.style.overflow = 'auto';\n    this._screen.style.backgroundColor = 'rgb(40, 40, 40)';\n    this._canvas = document.createElement('canvas');\n    this._canvas.style.margin = 'auto';\n    // Some browsers add an outline on focus\n    this._canvas.style.outline = 'none';\n    // IE miscalculates width without this :(\n    this._canvas.style.flexShrink = '0';\n    this._canvas.width = 0;\n    this._canvas.height = 0;\n    this._canvas.tabIndex = -1;\n    this._screen.appendChild(this._canvas);\n\n    // populate encHandlers with bound versions\n    this._encHandlers[encodings.encodingRaw] = RFB.encodingHandlers.RAW.bind(this);\n    this._encHandlers[encodings.encodingCopyRect] = RFB.encodingHandlers.COPYRECT.bind(this);\n    this._encHandlers[encodings.encodingRRE] = RFB.encodingHandlers.RRE.bind(this);\n    this._encHandlers[encodings.encodingHextile] = RFB.encodingHandlers.HEXTILE.bind(this);\n    this._encHandlers[encodings.encodingTight] = RFB.encodingHandlers.TIGHT.bind(this, false);\n    this._encHandlers[encodings.encodingTightPNG] = RFB.encodingHandlers.TIGHT.bind(this, true);\n\n    this._encHandlers[encodings.pseudoEncodingDesktopSize] = RFB.encodingHandlers.DesktopSize.bind(this);\n    this._encHandlers[encodings.pseudoEncodingLastRect] = RFB.encodingHandlers.last_rect.bind(this);\n    this._encHandlers[encodings.pseudoEncodingCursor] = RFB.encodingHandlers.Cursor.bind(this);\n    this._encHandlers[encodings.pseudoEncodingQEMUExtendedKeyEvent] = RFB.encodingHandlers.QEMUExtendedKeyEvent.bind(this);\n    this._encHandlers[encodings.pseudoEncodingExtendedDesktopSize] = RFB.encodingHandlers.ExtendedDesktopSize.bind(this);\n\n    // NB: nothing that needs explicit teardown should be done\n    // before this point, since this can throw an exception\n    try {\n        this._display = new Display(this._canvas);\n    } catch (exc) {\n        Error$1(\"Display exception: \" + exc);\n        throw exc;\n    }\n    this._display.onflush = this._onFlush.bind(this);\n    this._display.clear();\n\n    this._keyboard = new Keyboard(this._canvas);\n    this._keyboard.onkeyevent = this._handleKeyEvent.bind(this);\n\n    this._mouse = new Mouse(this._canvas);\n    this._mouse.onmousebutton = this._handleMouseButton.bind(this);\n    this._mouse.onmousemove = this._handleMouseMove.bind(this);\n\n    this._sock = new Websock();\n    this._sock.on('message', this._handle_message.bind(this));\n    this._sock.on('open', function () {\n        if (this._rfb_connection_state === 'connecting' && this._rfb_init_state === '') {\n            this._rfb_init_state = 'ProtocolVersion';\n            Debug(\"Starting VNC handshake\");\n        } else {\n            this._fail(\"Unexpected server connection while \" + this._rfb_connection_state);\n        }\n    }.bind(this));\n    this._sock.on('close', function (e) {\n        Debug(\"WebSocket on-close event\");\n        var msg = \"\";\n        if (e.code) {\n            msg = \"(code: \" + e.code;\n            if (e.reason) {\n                msg += \", reason: \" + e.reason;\n            }\n            msg += \")\";\n        }\n        switch (this._rfb_connection_state) {\n            case 'connecting':\n                this._fail(\"Connection closed \" + msg);\n                break;\n            case 'connected':\n                // Handle disconnects that were initiated server-side\n                this._updateConnectionState('disconnecting');\n                this._updateConnectionState('disconnected');\n                break;\n            case 'disconnecting':\n                // Normal disconnection path\n                this._updateConnectionState('disconnected');\n                break;\n            case 'disconnected':\n                this._fail(\"Unexpected server disconnect \" + \"when already disconnected \" + msg);\n                break;\n            default:\n                this._fail(\"Unexpected server disconnect before connecting \" + msg);\n                break;\n        }\n        this._sock.off('close');\n    }.bind(this));\n    this._sock.on('error', function (e) {\n        Warn(\"WebSocket on-error event\");\n    });\n\n    // Slight delay of the actual connection so that the caller has\n    // time to set up callbacks\n    setTimeout(this._updateConnectionState.bind(this, 'connecting'));\n\n    Debug(\"<< RFB.constructor\");\n}\n\nRFB.prototype = {\n    // ===== PROPERTIES =====\n\n    dragViewport: false,\n    focusOnClick: true,\n\n    _viewOnly: false,\n    get viewOnly() {\n        return this._viewOnly;\n    },\n    set viewOnly(viewOnly) {\n        this._viewOnly = viewOnly;\n\n        if (this._rfb_connection_state === \"connecting\" || this._rfb_connection_state === \"connected\") {\n            if (viewOnly) {\n                this._keyboard.ungrab();\n                this._mouse.ungrab();\n            } else {\n                this._keyboard.grab();\n                this._mouse.grab();\n            }\n        }\n    },\n\n    get capabilities() {\n        return this._capabilities;\n    },\n\n    get touchButton() {\n        return this._mouse.touchButton;\n    },\n    set touchButton(button) {\n        this._mouse.touchButton = button;\n    },\n\n    _clipViewport: false,\n    get clipViewport() {\n        return this._clipViewport;\n    },\n    set clipViewport(viewport) {\n        this._clipViewport = viewport;\n        this._updateClip();\n    },\n\n    _scaleViewport: false,\n    get scaleViewport() {\n        return this._scaleViewport;\n    },\n    set scaleViewport(scale) {\n        this._scaleViewport = scale;\n        // Scaling trumps clipping, so we may need to adjust\n        // clipping when enabling or disabling scaling\n        if (scale && this._clipViewport) {\n            this._updateClip();\n        }\n        this._updateScale();\n        if (!scale && this._clipViewport) {\n            this._updateClip();\n        }\n    },\n\n    _resizeSession: false,\n    get resizeSession() {\n        return this._resizeSession;\n    },\n    set resizeSession(resize) {\n        this._resizeSession = resize;\n        if (resize) {\n            this._requestRemoteResize();\n        }\n    },\n\n    // ===== PUBLIC METHODS =====\n\n    disconnect: function disconnect() {\n        this._updateConnectionState('disconnecting');\n        this._sock.off('error');\n        this._sock.off('message');\n        this._sock.off('open');\n    },\n\n    sendCredentials: function sendCredentials(creds) {\n        this._rfb_credentials = creds;\n        setTimeout(this._init_msg.bind(this), 0);\n    },\n\n    sendCtrlAltDel: function sendCtrlAltDel() {\n        if (this._rfb_connection_state !== 'connected' || this._viewOnly) {\n            return;\n        }\n        Info(\"Sending Ctrl-Alt-Del\");\n\n        this.sendKey(KeyTable.XK_Control_L, \"ControlLeft\", true);\n        this.sendKey(KeyTable.XK_Alt_L, \"AltLeft\", true);\n        this.sendKey(KeyTable.XK_Delete, \"Delete\", true);\n        this.sendKey(KeyTable.XK_Delete, \"Delete\", false);\n        this.sendKey(KeyTable.XK_Alt_L, \"AltLeft\", false);\n        this.sendKey(KeyTable.XK_Control_L, \"ControlLeft\", false);\n    },\n\n    machineShutdown: function machineShutdown() {\n        this._xvpOp(1, 2);\n    },\n\n    machineReboot: function machineReboot() {\n        this._xvpOp(1, 3);\n    },\n\n    machineReset: function machineReset() {\n        this._xvpOp(1, 4);\n    },\n\n    // Send a key press. If 'down' is not specified then send a down key\n    // followed by an up key.\n    sendKey: function sendKey(keysym, code, down) {\n        if (this._rfb_connection_state !== 'connected' || this._viewOnly) {\n            return;\n        }\n\n        if (down === undefined) {\n            this.sendKey(keysym, code, true);\n            this.sendKey(keysym, code, false);\n            return;\n        }\n\n        var scancode = XtScancode[code];\n\n        if (this._qemuExtKeyEventSupported && scancode) {\n            // 0 is NoSymbol\n            keysym = keysym || 0;\n\n            Info(\"Sending key (\" + (down ? \"down\" : \"up\") + \"): keysym \" + keysym + \", scancode \" + scancode);\n\n            RFB.messages.QEMUExtendedKeyEvent(this._sock, keysym, down, scancode);\n        } else {\n            if (!keysym) {\n                return;\n            }\n            Info(\"Sending keysym (\" + (down ? \"down\" : \"up\") + \"): \" + keysym);\n            RFB.messages.keyEvent(this._sock, keysym, down ? 1 : 0);\n        }\n    },\n\n    focus: function focus() {\n        this._canvas.focus();\n    },\n\n    blur: function blur() {\n        this._canvas.blur();\n    },\n\n    clipboardPasteFrom: function clipboardPasteFrom(text) {\n        if (this._rfb_connection_state !== 'connected' || this._viewOnly) {\n            return;\n        }\n        RFB.messages.clientCutText(this._sock, text);\n    },\n\n    // ===== PRIVATE METHODS =====\n\n    _connect: function _connect() {\n        Debug(\">> RFB.connect\");\n\n        Info(\"connecting to \" + this._url);\n\n        try {\n            // WebSocket.onopen transitions to the RFB init states\n            this._sock.open(this._url, ['binary']);\n        } catch (e) {\n            if (e.name === 'SyntaxError') {\n                this._fail(\"Invalid host or port (\" + e + \")\");\n            } else {\n                this._fail(\"Error when opening socket (\" + e + \")\");\n            }\n        }\n\n        // Make our elements part of the page\n        this._target.appendChild(this._screen);\n\n        // Monitor size changes of the screen\n        // FIXME: Use ResizeObserver, or hidden overflow\n        window.addEventListener('resize', this._eventHandlers.windowResize);\n\n        // Always grab focus on some kind of click event\n        this._canvas.addEventListener(\"mousedown\", this._eventHandlers.focusCanvas);\n        this._canvas.addEventListener(\"touchstart\", this._eventHandlers.focusCanvas);\n\n        Debug(\"<< RFB.connect\");\n    },\n\n    _disconnect: function _disconnect() {\n        Debug(\">> RFB.disconnect\");\n        this._canvas.removeEventListener(\"mousedown\", this._eventHandlers.focusCanvas);\n        this._canvas.removeEventListener(\"touchstart\", this._eventHandlers.focusCanvas);\n        window.removeEventListener('resize', this._eventHandlers.windowResize);\n        this._keyboard.ungrab();\n        this._mouse.ungrab();\n        this._sock.close();\n        this._print_stats();\n        try {\n            this._target.removeChild(this._screen);\n        } catch (e) {\n            if (e.name === 'NotFoundError') {\n                // Some cases where the initial connection fails\n                // can disconnect before the _screen is created\n            } else {\n                throw e;\n            }\n        }\n        clearTimeout(this._resizeTimeout);\n        Debug(\"<< RFB.disconnect\");\n    },\n\n    _print_stats: function _print_stats() {\n        var stats = this._encStats;\n\n        Info(\"Encoding stats for this connection:\");\n        Object.keys(stats).forEach(function (key) {\n            var s = stats[key];\n            if (s[0] + s[1] > 0) {\n                Info(\"    \" + encodingName(key) + \": \" + s[0] + \" rects\");\n            }\n        });\n\n        Info(\"Encoding stats since page load:\");\n        Object.keys(stats).forEach(function (key) {\n            var s = stats[key];\n            Info(\"    \" + encodingName(key) + \": \" + s[1] + \" rects\");\n        });\n    },\n\n    _focusCanvas: function _focusCanvas(event) {\n        // Respect earlier handlers' request to not do side-effects\n        if (event.defaultPrevented) {\n            return;\n        }\n\n        if (!this.focusOnClick) {\n            return;\n        }\n\n        this.focus();\n    },\n\n    _windowResize: function _windowResize(event) {\n        // If the window resized then our screen element might have\n        // as well. Update the viewport dimensions.\n        window.requestAnimationFrame(function () {\n            this._updateClip();\n            this._updateScale();\n        }.bind(this));\n\n        if (this._resizeSession) {\n            // Request changing the resolution of the remote display to\n            // the size of the local browser viewport.\n\n            // In order to not send multiple requests before the browser-resize\n            // is finished we wait 0.5 seconds before sending the request.\n            clearTimeout(this._resizeTimeout);\n            this._resizeTimeout = setTimeout(this._requestRemoteResize.bind(this), 500);\n        }\n    },\n\n    // Update state of clipping in Display object, and make sure the\n    // configured viewport matches the current screen size\n    _updateClip: function _updateClip() {\n        var cur_clip = this._display.clipViewport;\n        var new_clip = this._clipViewport;\n\n        if (this._scaleViewport) {\n            // Disable viewport clipping if we are scaling\n            new_clip = false;\n        }\n\n        if (cur_clip !== new_clip) {\n            this._display.clipViewport = new_clip;\n        }\n\n        if (new_clip) {\n            // When clipping is enabled, the screen is limited to\n            // the size of the container.\n            var size = this._screenSize();\n            this._display.viewportChangeSize(size.w, size.h);\n            this._fixScrollbars();\n        }\n    },\n\n    _updateScale: function _updateScale() {\n        if (!this._scaleViewport) {\n            this._display.scale = 1.0;\n        } else {\n            var size = this._screenSize();\n            this._display.autoscale(size.w, size.h);\n        }\n        this._fixScrollbars();\n    },\n\n    // Requests a change of remote desktop size. This message is an extension\n    // and may only be sent if we have received an ExtendedDesktopSize message\n    _requestRemoteResize: function _requestRemoteResize() {\n        clearTimeout(this._resizeTimeout);\n        this._resizeTimeout = null;\n\n        if (!this._resizeSession || this._viewOnly || !this._supportsSetDesktopSize) {\n            return;\n        }\n\n        var size = this._screenSize();\n        RFB.messages.setDesktopSize(this._sock, size.w, size.h, this._screen_id, this._screen_flags);\n\n        Debug('Requested new desktop size: ' + size.w + 'x' + size.h);\n    },\n\n    // Gets the the size of the available screen\n    _screenSize: function _screenSize() {\n        return { w: this._screen.offsetWidth,\n            h: this._screen.offsetHeight };\n    },\n\n    _fixScrollbars: function _fixScrollbars() {\n        // This is a hack because Chrome screws up the calculation\n        // for when scrollbars are needed. So to fix it we temporarily\n        // toggle them off and on.\n        var orig = this._screen.style.overflow;\n        this._screen.style.overflow = 'hidden';\n        // Force Chrome to recalculate the layout by asking for\n        // an element's dimensions\n        this._screen.getBoundingClientRect();\n        this._screen.style.overflow = orig;\n    },\n\n    /*\n     * Connection states:\n     *   connecting\n     *   connected\n     *   disconnecting\n     *   disconnected - permanent state\n     */\n    _updateConnectionState: function _updateConnectionState(state) {\n        var oldstate = this._rfb_connection_state;\n\n        if (state === oldstate) {\n            Debug(\"Already in state '\" + state + \"', ignoring\");\n            return;\n        }\n\n        // The 'disconnected' state is permanent for each RFB object\n        if (oldstate === 'disconnected') {\n            Error$1(\"Tried changing state of a disconnected RFB object\");\n            return;\n        }\n\n        // Ensure proper transitions before doing anything\n        switch (state) {\n            case 'connected':\n                if (oldstate !== 'connecting') {\n                    Error$1(\"Bad transition to connected state, \" + \"previous connection state: \" + oldstate);\n                    return;\n                }\n                break;\n\n            case 'disconnected':\n                if (oldstate !== 'disconnecting') {\n                    Error$1(\"Bad transition to disconnected state, \" + \"previous connection state: \" + oldstate);\n                    return;\n                }\n                break;\n\n            case 'connecting':\n                if (oldstate !== '') {\n                    Error$1(\"Bad transition to connecting state, \" + \"previous connection state: \" + oldstate);\n                    return;\n                }\n                break;\n\n            case 'disconnecting':\n                if (oldstate !== 'connected' && oldstate !== 'connecting') {\n                    Error$1(\"Bad transition to disconnecting state, \" + \"previous connection state: \" + oldstate);\n                    return;\n                }\n                break;\n\n            default:\n                Error$1(\"Unknown connection state: \" + state);\n                return;\n        }\n\n        // State change actions\n\n        this._rfb_connection_state = state;\n\n        var smsg = \"New state '\" + state + \"', was '\" + oldstate + \"'.\";\n        Debug(smsg);\n\n        if (this._disconnTimer && state !== 'disconnecting') {\n            Debug(\"Clearing disconnect timer\");\n            clearTimeout(this._disconnTimer);\n            this._disconnTimer = null;\n\n            // make sure we don't get a double event\n            this._sock.off('close');\n        }\n\n        switch (state) {\n            case 'connecting':\n                this._connect();\n                break;\n\n            case 'connected':\n                var event = new CustomEvent(\"connect\", { detail: {} });\n                this.dispatchEvent(event);\n                break;\n\n            case 'disconnecting':\n                this._disconnect();\n\n                this._disconnTimer = setTimeout(function () {\n                    Error$1(\"Disconnection timed out.\");\n                    this._updateConnectionState('disconnected');\n                }.bind(this), DISCONNECT_TIMEOUT * 1000);\n                break;\n\n            case 'disconnected':\n                event = new CustomEvent(\"disconnect\", { detail: { clean: this._rfb_clean_disconnect } });\n                this.dispatchEvent(event);\n                break;\n        }\n    },\n\n    /* Print errors and disconnect\n     *\n     * The parameter 'details' is used for information that\n     * should be logged but not sent to the user interface.\n     */\n    _fail: function _fail(details) {\n        switch (this._rfb_connection_state) {\n            case 'disconnecting':\n                Error$1(\"Failed when disconnecting: \" + details);\n                break;\n            case 'connected':\n                Error$1(\"Failed while connected: \" + details);\n                break;\n            case 'connecting':\n                Error$1(\"Failed when connecting: \" + details);\n                break;\n            default:\n                Error$1(\"RFB failure: \" + details);\n                break;\n        }\n        this._rfb_clean_disconnect = false; //This is sent to the UI\n\n        // Transition to disconnected without waiting for socket to close\n        this._updateConnectionState('disconnecting');\n        this._updateConnectionState('disconnected');\n\n        return false;\n    },\n\n    _setCapability: function _setCapability(cap, val) {\n        this._capabilities[cap] = val;\n        var event = new CustomEvent(\"capabilities\", { detail: { capabilities: this._capabilities } });\n        this.dispatchEvent(event);\n    },\n\n    _handle_message: function _handle_message() {\n        if (this._sock.rQlen() === 0) {\n            Warn(\"handle_message called on an empty receive queue\");\n            return;\n        }\n\n        switch (this._rfb_connection_state) {\n            case 'disconnected':\n                Error$1(\"Got data while disconnected\");\n                break;\n            case 'connected':\n                while (true) {\n                    if (this._flushing) {\n                        break;\n                    }\n                    if (!this._normal_msg()) {\n                        break;\n                    }\n                    if (this._sock.rQlen() === 0) {\n                        break;\n                    }\n                }\n                break;\n            default:\n                this._init_msg();\n                break;\n        }\n    },\n\n    _handleKeyEvent: function _handleKeyEvent(keysym, code, down) {\n        this.sendKey(keysym, code, down);\n    },\n\n    _handleMouseButton: function _handleMouseButton(x, y, down, bmask) {\n        if (down) {\n            this._mouse_buttonMask |= bmask;\n        } else {\n            this._mouse_buttonMask &= ~bmask;\n        }\n\n        if (this.dragViewport) {\n            if (down && !this._viewportDragging) {\n                this._viewportDragging = true;\n                this._viewportDragPos = { 'x': x, 'y': y };\n                this._viewportHasMoved = false;\n\n                // Skip sending mouse events\n                return;\n            } else {\n                this._viewportDragging = false;\n\n                // If we actually performed a drag then we are done\n                // here and should not send any mouse events\n                if (this._viewportHasMoved) {\n                    return;\n                }\n\n                // Otherwise we treat this as a mouse click event.\n                // Send the button down event here, as the button up\n                // event is sent at the end of this function.\n                RFB.messages.pointerEvent(this._sock, this._display.absX(x), this._display.absY(y), bmask);\n            }\n        }\n\n        if (this._viewOnly) {\n            return;\n        } // View only, skip mouse events\n\n        if (this._rfb_connection_state !== 'connected') {\n            return;\n        }\n        RFB.messages.pointerEvent(this._sock, this._display.absX(x), this._display.absY(y), this._mouse_buttonMask);\n    },\n\n    _handleMouseMove: function _handleMouseMove(x, y) {\n        if (this._viewportDragging) {\n            var deltaX = this._viewportDragPos.x - x;\n            var deltaY = this._viewportDragPos.y - y;\n\n            // The goal is to trigger on a certain physical width, the\n            // devicePixelRatio brings us a bit closer but is not optimal.\n            var dragThreshold = 10 * (window.devicePixelRatio || 1);\n\n            if (this._viewportHasMoved || Math.abs(deltaX) > dragThreshold || Math.abs(deltaY) > dragThreshold) {\n                this._viewportHasMoved = true;\n\n                this._viewportDragPos = { 'x': x, 'y': y };\n                this._display.viewportChangePos(deltaX, deltaY);\n            }\n\n            // Skip sending mouse events\n            return;\n        }\n\n        if (this._viewOnly) {\n            return;\n        } // View only, skip mouse events\n\n        if (this._rfb_connection_state !== 'connected') {\n            return;\n        }\n        RFB.messages.pointerEvent(this._sock, this._display.absX(x), this._display.absY(y), this._mouse_buttonMask);\n    },\n\n    // Message Handlers\n\n    _negotiate_protocol_version: function _negotiate_protocol_version() {\n        if (this._sock.rQlen() < 12) {\n            return this._fail(\"Received incomplete protocol version.\");\n        }\n\n        var sversion = this._sock.rQshiftStr(12).substr(4, 7);\n        Info(\"Server ProtocolVersion: \" + sversion);\n        var is_repeater = 0;\n        switch (sversion) {\n            case \"000.000\":\n                // UltraVNC repeater\n                is_repeater = 1;\n                break;\n            case \"003.003\":\n            case \"003.006\": // UltraVNC\n            case \"003.889\":\n                // Apple Remote Desktop\n                this._rfb_version = 3.3;\n                break;\n            case \"003.007\":\n                this._rfb_version = 3.7;\n                break;\n            case \"003.008\":\n            case \"004.000\": // Intel AMT KVM\n            case \"004.001\": // RealVNC 4.6\n            case \"005.000\":\n                // RealVNC 5.3\n                this._rfb_version = 3.8;\n                break;\n            default:\n                return this._fail(\"Invalid server version \" + sversion);\n        }\n\n        if (is_repeater) {\n            var repeaterID = \"ID:\" + this._repeaterID;\n            while (repeaterID.length < 250) {\n                repeaterID += \"\\0\";\n            }\n            this._sock.send_string(repeaterID);\n            return true;\n        }\n\n        if (this._rfb_version > this._rfb_max_version) {\n            this._rfb_version = this._rfb_max_version;\n        }\n\n        var cversion = \"00\" + parseInt(this._rfb_version, 10) + \".00\" + this._rfb_version * 10 % 10;\n        this._sock.send_string(\"RFB \" + cversion + \"\\n\");\n        Debug('Sent ProtocolVersion: ' + cversion);\n\n        this._rfb_init_state = 'Security';\n    },\n\n    _negotiate_security: function _negotiate_security() {\n        // Polyfill since IE and PhantomJS doesn't have\n        // TypedArray.includes()\n        function includes(item, array) {\n            for (var i = 0; i < array.length; i++) {\n                if (array[i] === item) {\n                    return true;\n                }\n            }\n            return false;\n        }\n\n        if (this._rfb_version >= 3.7) {\n            // Server sends supported list, client decides\n            var num_types = this._sock.rQshift8();\n            if (this._sock.rQwait(\"security type\", num_types, 1)) {\n                return false;\n            }\n\n            if (num_types === 0) {\n                return this._handle_security_failure(\"no security types\");\n            }\n\n            var types = this._sock.rQshiftBytes(num_types);\n            Debug(\"Server security types: \" + types);\n\n            // Look for each auth in preferred order\n            this._rfb_auth_scheme = 0;\n            if (includes(1, types)) {\n                this._rfb_auth_scheme = 1; // None\n            } else if (includes(22, types)) {\n                this._rfb_auth_scheme = 22; // XVP\n            } else if (includes(16, types)) {\n                this._rfb_auth_scheme = 16; // Tight\n            } else if (includes(2, types)) {\n                this._rfb_auth_scheme = 2; // VNC Auth\n            } else {\n                return this._fail(\"Unsupported security types (types: \" + types + \")\");\n            }\n\n            this._sock.send([this._rfb_auth_scheme]);\n        } else {\n            // Server decides\n            if (this._sock.rQwait(\"security scheme\", 4)) {\n                return false;\n            }\n            this._rfb_auth_scheme = this._sock.rQshift32();\n        }\n\n        this._rfb_init_state = 'Authentication';\n        Debug('Authenticating using scheme: ' + this._rfb_auth_scheme);\n\n        return this._init_msg(); // jump to authentication\n    },\n\n    /*\n     * Get the security failure reason if sent from the server and\n     * send the 'securityfailure' event.\n     *\n     * - The optional parameter context can be used to add some extra\n     *   context to the log output.\n     *\n     * - The optional parameter security_result_status can be used to\n     *   add a custom status code to the event.\n     */\n    _handle_security_failure: function _handle_security_failure(context, security_result_status) {\n\n        if (typeof context === 'undefined') {\n            context = \"\";\n        } else {\n            context = \" on \" + context;\n        }\n\n        if (typeof security_result_status === 'undefined') {\n            security_result_status = 1; // fail\n        }\n\n        if (this._sock.rQwait(\"reason length\", 4)) {\n            return false;\n        }\n        var strlen = this._sock.rQshift32();\n        var reason = \"\";\n\n        if (strlen > 0) {\n            if (this._sock.rQwait(\"reason\", strlen, 8)) {\n                return false;\n            }\n            reason = this._sock.rQshiftStr(strlen);\n        }\n\n        if (reason !== \"\") {\n\n            var event = new CustomEvent(\"securityfailure\", { detail: { status: security_result_status, reason: reason } });\n            this.dispatchEvent(event);\n\n            return this._fail(\"Security negotiation failed\" + context + \" (reason: \" + reason + \")\");\n        } else {\n\n            var _event = new CustomEvent(\"securityfailure\", { detail: { status: security_result_status } });\n            this.dispatchEvent(_event);\n\n            return this._fail(\"Security negotiation failed\" + context);\n        }\n    },\n\n    // authentication\n    _negotiate_xvp_auth: function _negotiate_xvp_auth() {\n        if (!this._rfb_credentials.username || !this._rfb_credentials.password || !this._rfb_credentials.target) {\n            var event = new CustomEvent(\"credentialsrequired\", { detail: { types: [\"username\", \"password\", \"target\"] } });\n            this.dispatchEvent(event);\n            return false;\n        }\n\n        var xvp_auth_str = String.fromCharCode(this._rfb_credentials.username.length) + String.fromCharCode(this._rfb_credentials.target.length) + this._rfb_credentials.username + this._rfb_credentials.target;\n        this._sock.send_string(xvp_auth_str);\n        this._rfb_auth_scheme = 2;\n        return this._negotiate_authentication();\n    },\n\n    _negotiate_std_vnc_auth: function _negotiate_std_vnc_auth() {\n        if (this._sock.rQwait(\"auth challenge\", 16)) {\n            return false;\n        }\n\n        if (!this._rfb_credentials.password) {\n            var event = new CustomEvent(\"credentialsrequired\", { detail: { types: [\"password\"] } });\n            this.dispatchEvent(event);\n            return false;\n        }\n\n        // TODO(directxman12): make genDES not require an Array\n        var challenge = Array.prototype.slice.call(this._sock.rQshiftBytes(16));\n        var response = RFB.genDES(this._rfb_credentials.password, challenge);\n        this._sock.send(response);\n        this._rfb_init_state = \"SecurityResult\";\n        return true;\n    },\n\n    _negotiate_tight_tunnels: function _negotiate_tight_tunnels(numTunnels) {\n        var clientSupportedTunnelTypes = {\n            0: { vendor: 'TGHT', signature: 'NOTUNNEL' }\n        };\n        var serverSupportedTunnelTypes = {};\n        // receive tunnel capabilities\n        for (var i = 0; i < numTunnels; i++) {\n            var cap_code = this._sock.rQshift32();\n            var cap_vendor = this._sock.rQshiftStr(4);\n            var cap_signature = this._sock.rQshiftStr(8);\n            serverSupportedTunnelTypes[cap_code] = { vendor: cap_vendor, signature: cap_signature };\n        }\n\n        // choose the notunnel type\n        if (serverSupportedTunnelTypes[0]) {\n            if (serverSupportedTunnelTypes[0].vendor != clientSupportedTunnelTypes[0].vendor || serverSupportedTunnelTypes[0].signature != clientSupportedTunnelTypes[0].signature) {\n                return this._fail(\"Client's tunnel type had the incorrect \" + \"vendor or signature\");\n            }\n            this._sock.send([0, 0, 0, 0]); // use NOTUNNEL\n            return false; // wait until we receive the sub auth count to continue\n        } else {\n            return this._fail(\"Server wanted tunnels, but doesn't support \" + \"the notunnel type\");\n        }\n    },\n\n    _negotiate_tight_auth: function _negotiate_tight_auth() {\n        if (!this._rfb_tightvnc) {\n            // first pass, do the tunnel negotiation\n            if (this._sock.rQwait(\"num tunnels\", 4)) {\n                return false;\n            }\n            var numTunnels = this._sock.rQshift32();\n            if (numTunnels > 0 && this._sock.rQwait(\"tunnel capabilities\", 16 * numTunnels, 4)) {\n                return false;\n            }\n\n            this._rfb_tightvnc = true;\n\n            if (numTunnels > 0) {\n                this._negotiate_tight_tunnels(numTunnels);\n                return false; // wait until we receive the sub auth to continue\n            }\n        }\n\n        // second pass, do the sub-auth negotiation\n        if (this._sock.rQwait(\"sub auth count\", 4)) {\n            return false;\n        }\n        var subAuthCount = this._sock.rQshift32();\n        if (subAuthCount === 0) {\n            // empty sub-auth list received means 'no auth' subtype selected\n            this._rfb_init_state = 'SecurityResult';\n            return true;\n        }\n\n        if (this._sock.rQwait(\"sub auth capabilities\", 16 * subAuthCount, 4)) {\n            return false;\n        }\n\n        var clientSupportedTypes = {\n            'STDVNOAUTH__': 1,\n            'STDVVNCAUTH_': 2\n        };\n\n        var serverSupportedTypes = [];\n\n        for (var i = 0; i < subAuthCount; i++) {\n            var capNum = this._sock.rQshift32();\n            var capabilities = this._sock.rQshiftStr(12);\n            serverSupportedTypes.push(capabilities);\n        }\n\n        for (var authType in clientSupportedTypes) {\n            if (serverSupportedTypes.indexOf(authType) != -1) {\n                this._sock.send([0, 0, 0, clientSupportedTypes[authType]]);\n\n                switch (authType) {\n                    case 'STDVNOAUTH__':\n                        // no auth\n                        this._rfb_init_state = 'SecurityResult';\n                        return true;\n                    case 'STDVVNCAUTH_':\n                        // VNC auth\n                        this._rfb_auth_scheme = 2;\n                        return this._init_msg();\n                    default:\n                        return this._fail(\"Unsupported tiny auth scheme \" + \"(scheme: \" + authType + \")\");\n                }\n            }\n        }\n\n        return this._fail(\"No supported sub-auth types!\");\n    },\n\n    _negotiate_authentication: function _negotiate_authentication() {\n        switch (this._rfb_auth_scheme) {\n            case 0:\n                // connection failed\n                return this._handle_security_failure(\"authentication scheme\");\n\n            case 1:\n                // no auth\n                if (this._rfb_version >= 3.8) {\n                    this._rfb_init_state = 'SecurityResult';\n                    return true;\n                }\n                this._rfb_init_state = 'ClientInitialisation';\n                return this._init_msg();\n\n            case 22:\n                // XVP auth\n                return this._negotiate_xvp_auth();\n\n            case 2:\n                // VNC authentication\n                return this._negotiate_std_vnc_auth();\n\n            case 16:\n                // TightVNC Security Type\n                return this._negotiate_tight_auth();\n\n            default:\n                return this._fail(\"Unsupported auth scheme (scheme: \" + this._rfb_auth_scheme + \")\");\n        }\n    },\n\n    _handle_security_result: function _handle_security_result() {\n        if (this._sock.rQwait('VNC auth response ', 4)) {\n            return false;\n        }\n\n        var status = this._sock.rQshift32();\n\n        if (status === 0) {\n            // OK\n            this._rfb_init_state = 'ClientInitialisation';\n            Debug('Authentication OK');\n            return this._init_msg();\n        } else {\n            if (this._rfb_version >= 3.8) {\n                return this._handle_security_failure(\"security result\", status);\n            } else {\n                var event = new CustomEvent(\"securityfailure\", { detail: { status: status } });\n                this.dispatchEvent(event);\n\n                return this._fail(\"Security handshake failed\");\n            }\n        }\n    },\n\n    _negotiate_server_init: function _negotiate_server_init() {\n        if (this._sock.rQwait(\"server initialization\", 24)) {\n            return false;\n        }\n\n        /* Screen size */\n        var width = this._sock.rQshift16();\n        var height = this._sock.rQshift16();\n\n        /* PIXEL_FORMAT */\n        var bpp = this._sock.rQshift8();\n        var depth = this._sock.rQshift8();\n        var big_endian = this._sock.rQshift8();\n        var true_color = this._sock.rQshift8();\n\n        var red_max = this._sock.rQshift16();\n        var green_max = this._sock.rQshift16();\n        var blue_max = this._sock.rQshift16();\n        var red_shift = this._sock.rQshift8();\n        var green_shift = this._sock.rQshift8();\n        var blue_shift = this._sock.rQshift8();\n        this._sock.rQskipBytes(3); // padding\n\n        // NB(directxman12): we don't want to call any callbacks or print messages until\n        //                   *after* we're past the point where we could backtrack\n\n        /* Connection name/title */\n        var name_length = this._sock.rQshift32();\n        if (this._sock.rQwait('server init name', name_length, 24)) {\n            return false;\n        }\n        this._fb_name = decodeUTF8(this._sock.rQshiftStr(name_length));\n\n        if (this._rfb_tightvnc) {\n            if (this._sock.rQwait('TightVNC extended server init header', 8, 24 + name_length)) {\n                return false;\n            }\n            // In TightVNC mode, ServerInit message is extended\n            var numServerMessages = this._sock.rQshift16();\n            var numClientMessages = this._sock.rQshift16();\n            var numEncodings = this._sock.rQshift16();\n            this._sock.rQskipBytes(2); // padding\n\n            var totalMessagesLength = (numServerMessages + numClientMessages + numEncodings) * 16;\n            if (this._sock.rQwait('TightVNC extended server init header', totalMessagesLength, 32 + name_length)) {\n                return false;\n            }\n\n            // we don't actually do anything with the capability information that TIGHT sends,\n            // so we just skip the all of this.\n\n            // TIGHT server message capabilities\n            this._sock.rQskipBytes(16 * numServerMessages);\n\n            // TIGHT client message capabilities\n            this._sock.rQskipBytes(16 * numClientMessages);\n\n            // TIGHT encoding capabilities\n            this._sock.rQskipBytes(16 * numEncodings);\n        }\n\n        // NB(directxman12): these are down here so that we don't run them multiple times\n        //                   if we backtrack\n        Info(\"Screen: \" + width + \"x\" + height + \", bpp: \" + bpp + \", depth: \" + depth + \", big_endian: \" + big_endian + \", true_color: \" + true_color + \", red_max: \" + red_max + \", green_max: \" + green_max + \", blue_max: \" + blue_max + \", red_shift: \" + red_shift + \", green_shift: \" + green_shift + \", blue_shift: \" + blue_shift);\n\n        if (big_endian !== 0) {\n            Warn(\"Server native endian is not little endian\");\n        }\n\n        if (red_shift !== 16) {\n            Warn(\"Server native red-shift is not 16\");\n        }\n\n        if (blue_shift !== 0) {\n            Warn(\"Server native blue-shift is not 0\");\n        }\n\n        // we're past the point where we could backtrack, so it's safe to call this\n        var event = new CustomEvent(\"desktopname\", { detail: { name: this._fb_name } });\n        this.dispatchEvent(event);\n\n        this._resize(width, height);\n\n        if (!this._viewOnly) {\n            this._keyboard.grab();\n        }\n        if (!this._viewOnly) {\n            this._mouse.grab();\n        }\n\n        this._fb_depth = 24;\n\n        if (this._fb_name === \"Intel(r) AMT KVM\") {\n            Warn(\"Intel AMT KVM only supports 8/16 bit depths. Using low color mode.\");\n            this._fb_depth = 8;\n        }\n\n        RFB.messages.pixelFormat(this._sock, this._fb_depth, true);\n        this._sendEncodings();\n        RFB.messages.fbUpdateRequest(this._sock, false, 0, 0, this._fb_width, this._fb_height);\n\n        this._timing.fbu_rt_start = new Date().getTime();\n        this._timing.pixels = 0;\n\n        // Cursor will be server side until the server decides to honor\n        // our request and send over the cursor image\n        this._display.disableLocalCursor();\n\n        this._updateConnectionState('connected');\n        return true;\n    },\n\n    _sendEncodings: function _sendEncodings() {\n        var encs = [];\n\n        // In preference order\n        encs.push(encodings.encodingCopyRect);\n        // Only supported with full depth support\n        if (this._fb_depth == 24) {\n            encs.push(encodings.encodingTight);\n            encs.push(encodings.encodingTightPNG);\n            encs.push(encodings.encodingHextile);\n            encs.push(encodings.encodingRRE);\n        }\n        encs.push(encodings.encodingRaw);\n\n        // Psuedo-encoding settings\n        encs.push(encodings.pseudoEncodingQualityLevel0 + 6);\n        encs.push(encodings.pseudoEncodingCompressLevel0 + 2);\n\n        encs.push(encodings.pseudoEncodingDesktopSize);\n        encs.push(encodings.pseudoEncodingLastRect);\n        encs.push(encodings.pseudoEncodingQEMUExtendedKeyEvent);\n        encs.push(encodings.pseudoEncodingExtendedDesktopSize);\n        encs.push(encodings.pseudoEncodingXvp);\n        encs.push(encodings.pseudoEncodingFence);\n        encs.push(encodings.pseudoEncodingContinuousUpdates);\n\n        if (supportsCursorURIs() && !isTouchDevice && this._fb_depth == 24) {\n            encs.push(encodings.pseudoEncodingCursor);\n        }\n\n        RFB.messages.clientEncodings(this._sock, encs);\n    },\n\n    /* RFB protocol initialization states:\n     *   ProtocolVersion\n     *   Security\n     *   Authentication\n     *   SecurityResult\n     *   ClientInitialization - not triggered by server message\n     *   ServerInitialization\n     */\n    _init_msg: function _init_msg() {\n        switch (this._rfb_init_state) {\n            case 'ProtocolVersion':\n                return this._negotiate_protocol_version();\n\n            case 'Security':\n                return this._negotiate_security();\n\n            case 'Authentication':\n                return this._negotiate_authentication();\n\n            case 'SecurityResult':\n                return this._handle_security_result();\n\n            case 'ClientInitialisation':\n                this._sock.send([this._shared ? 1 : 0]); // ClientInitialisation\n                this._rfb_init_state = 'ServerInitialisation';\n                return true;\n\n            case 'ServerInitialisation':\n                return this._negotiate_server_init();\n\n            default:\n                return this._fail(\"Unknown init state (state: \" + this._rfb_init_state + \")\");\n        }\n    },\n\n    _handle_set_colour_map_msg: function _handle_set_colour_map_msg() {\n        Debug(\"SetColorMapEntries\");\n\n        return this._fail(\"Unexpected SetColorMapEntries message\");\n    },\n\n    _handle_server_cut_text: function _handle_server_cut_text() {\n        Debug(\"ServerCutText\");\n\n        if (this._sock.rQwait(\"ServerCutText header\", 7, 1)) {\n            return false;\n        }\n        this._sock.rQskipBytes(3); // Padding\n        var length = this._sock.rQshift32();\n        if (this._sock.rQwait(\"ServerCutText\", length, 8)) {\n            return false;\n        }\n\n        var text = this._sock.rQshiftStr(length);\n\n        if (this._viewOnly) {\n            return true;\n        }\n\n        var event = new CustomEvent(\"clipboard\", { detail: { text: text } });\n        this.dispatchEvent(event);\n\n        return true;\n    },\n\n    _handle_server_fence_msg: function _handle_server_fence_msg() {\n        if (this._sock.rQwait(\"ServerFence header\", 8, 1)) {\n            return false;\n        }\n        this._sock.rQskipBytes(3); // Padding\n        var flags = this._sock.rQshift32();\n        var length = this._sock.rQshift8();\n\n        if (this._sock.rQwait(\"ServerFence payload\", length, 9)) {\n            return false;\n        }\n\n        if (length > 64) {\n            Warn(\"Bad payload length (\" + length + \") in fence response\");\n            length = 64;\n        }\n\n        var payload = this._sock.rQshiftStr(length);\n\n        this._supportsFence = true;\n\n        /*\n         * Fence flags\n         *\n         *  (1<<0)  - BlockBefore\n         *  (1<<1)  - BlockAfter\n         *  (1<<2)  - SyncNext\n         *  (1<<31) - Request\n         */\n\n        if (!(flags & 1 << 31)) {\n            return this._fail(\"Unexpected fence response\");\n        }\n\n        // Filter out unsupported flags\n        // FIXME: support syncNext\n        flags &= 1 << 0 | 1 << 1;\n\n        // BlockBefore and BlockAfter are automatically handled by\n        // the fact that we process each incoming message\n        // synchronuosly.\n        RFB.messages.clientFence(this._sock, flags, payload);\n\n        return true;\n    },\n\n    _handle_xvp_msg: function _handle_xvp_msg() {\n        if (this._sock.rQwait(\"XVP version and message\", 3, 1)) {\n            return false;\n        }\n        this._sock.rQskip8(); // Padding\n        var xvp_ver = this._sock.rQshift8();\n        var xvp_msg = this._sock.rQshift8();\n\n        switch (xvp_msg) {\n            case 0:\n                // XVP_FAIL\n                Error$1(\"XVP Operation Failed\");\n                break;\n            case 1:\n                // XVP_INIT\n                this._rfb_xvp_ver = xvp_ver;\n                Info(\"XVP extensions enabled (version \" + this._rfb_xvp_ver + \")\");\n                this._setCapability(\"power\", true);\n                break;\n            default:\n                this._fail(\"Illegal server XVP message (msg: \" + xvp_msg + \")\");\n                break;\n        }\n\n        return true;\n    },\n\n    _normal_msg: function _normal_msg() {\n        var msg_type;\n\n        if (this._FBU.rects > 0) {\n            msg_type = 0;\n        } else {\n            msg_type = this._sock.rQshift8();\n        }\n\n        switch (msg_type) {\n            case 0:\n                // FramebufferUpdate\n                var ret = this._framebufferUpdate();\n                if (ret && !this._enabledContinuousUpdates) {\n                    RFB.messages.fbUpdateRequest(this._sock, true, 0, 0, this._fb_width, this._fb_height);\n                }\n                return ret;\n\n            case 1:\n                // SetColorMapEntries\n                return this._handle_set_colour_map_msg();\n\n            case 2:\n                // Bell\n                Debug(\"Bell\");\n                var event = new CustomEvent(\"bell\", { detail: {} });\n                this.dispatchEvent(event);\n                return true;\n\n            case 3:\n                // ServerCutText\n                return this._handle_server_cut_text();\n\n            case 150:\n                // EndOfContinuousUpdates\n                var first = !this._supportsContinuousUpdates;\n                this._supportsContinuousUpdates = true;\n                this._enabledContinuousUpdates = false;\n                if (first) {\n                    this._enabledContinuousUpdates = true;\n                    this._updateContinuousUpdates();\n                    Info(\"Enabling continuous updates.\");\n                } else {\n                    // FIXME: We need to send a framebufferupdaterequest here\n                    // if we add support for turning off continuous updates\n                }\n                return true;\n\n            case 248:\n                // ServerFence\n                return this._handle_server_fence_msg();\n\n            case 250:\n                // XVP\n                return this._handle_xvp_msg();\n\n            default:\n                this._fail(\"Unexpected server message (type \" + msg_type + \")\");\n                Debug(\"sock.rQslice(0, 30): \" + this._sock.rQslice(0, 30));\n                return true;\n        }\n    },\n\n    _onFlush: function _onFlush() {\n        this._flushing = false;\n        // Resume processing\n        if (this._sock.rQlen() > 0) {\n            this._handle_message();\n        }\n    },\n\n    _framebufferUpdate: function _framebufferUpdate() {\n        var ret = true;\n        var now;\n\n        if (this._FBU.rects === 0) {\n            if (this._sock.rQwait(\"FBU header\", 3, 1)) {\n                return false;\n            }\n            this._sock.rQskip8(); // Padding\n            this._FBU.rects = this._sock.rQshift16();\n            this._FBU.bytes = 0;\n            this._timing.cur_fbu = 0;\n            if (this._timing.fbu_rt_start > 0) {\n                now = new Date().getTime();\n                Info(\"First FBU latency: \" + (now - this._timing.fbu_rt_start));\n            }\n\n            // Make sure the previous frame is fully rendered first\n            // to avoid building up an excessive queue\n            if (this._display.pending()) {\n                this._flushing = true;\n                this._display.flush();\n                return false;\n            }\n        }\n\n        while (this._FBU.rects > 0) {\n            if (this._rfb_connection_state !== 'connected') {\n                return false;\n            }\n\n            if (this._sock.rQwait(\"FBU\", this._FBU.bytes)) {\n                return false;\n            }\n            if (this._FBU.bytes === 0) {\n                if (this._sock.rQwait(\"rect header\", 12)) {\n                    return false;\n                }\n                /* New FramebufferUpdate */\n\n                var hdr = this._sock.rQshiftBytes(12);\n                this._FBU.x = (hdr[0] << 8) + hdr[1];\n                this._FBU.y = (hdr[2] << 8) + hdr[3];\n                this._FBU.width = (hdr[4] << 8) + hdr[5];\n                this._FBU.height = (hdr[6] << 8) + hdr[7];\n                this._FBU.encoding = parseInt((hdr[8] << 24) + (hdr[9] << 16) + (hdr[10] << 8) + hdr[11], 10);\n\n                if (!this._encHandlers[this._FBU.encoding]) {\n                    this._fail(\"Unsupported encoding (encoding: \" + this._FBU.encoding + \")\");\n                    return false;\n                }\n            }\n\n            this._timing.last_fbu = new Date().getTime();\n\n            ret = this._encHandlers[this._FBU.encoding]();\n\n            now = new Date().getTime();\n            this._timing.cur_fbu += now - this._timing.last_fbu;\n\n            if (ret) {\n                if (!(this._FBU.encoding in this._encStats)) {\n                    this._encStats[this._FBU.encoding] = [0, 0];\n                }\n                this._encStats[this._FBU.encoding][0]++;\n                this._encStats[this._FBU.encoding][1]++;\n                this._timing.pixels += this._FBU.width * this._FBU.height;\n            }\n\n            if (this._timing.pixels >= this._fb_width * this._fb_height) {\n                if (this._FBU.width === this._fb_width && this._FBU.height === this._fb_height || this._timing.fbu_rt_start > 0) {\n                    this._timing.full_fbu_total += this._timing.cur_fbu;\n                    this._timing.full_fbu_cnt++;\n                    Info(\"Timing of full FBU, curr: \" + this._timing.cur_fbu + \", total: \" + this._timing.full_fbu_total + \", cnt: \" + this._timing.full_fbu_cnt + \", avg: \" + this._timing.full_fbu_total / this._timing.full_fbu_cnt);\n                }\n\n                if (this._timing.fbu_rt_start > 0) {\n                    var fbu_rt_diff = now - this._timing.fbu_rt_start;\n                    this._timing.fbu_rt_total += fbu_rt_diff;\n                    this._timing.fbu_rt_cnt++;\n                    Info(\"full FBU round-trip, cur: \" + fbu_rt_diff + \", total: \" + this._timing.fbu_rt_total + \", cnt: \" + this._timing.fbu_rt_cnt + \", avg: \" + this._timing.fbu_rt_total / this._timing.fbu_rt_cnt);\n                    this._timing.fbu_rt_start = 0;\n                }\n            }\n\n            if (!ret) {\n                return ret;\n            } // need more data\n        }\n\n        this._display.flip();\n\n        return true; // We finished this FBU\n    },\n\n    _updateContinuousUpdates: function _updateContinuousUpdates() {\n        if (!this._enabledContinuousUpdates) {\n            return;\n        }\n\n        RFB.messages.enableContinuousUpdates(this._sock, true, 0, 0, this._fb_width, this._fb_height);\n    },\n\n    _resize: function _resize(width, height) {\n        this._fb_width = width;\n        this._fb_height = height;\n\n        this._destBuff = new Uint8Array(this._fb_width * this._fb_height * 4);\n\n        this._display.resize(this._fb_width, this._fb_height);\n\n        // Adjust the visible viewport based on the new dimensions\n        this._updateClip();\n        this._updateScale();\n\n        this._timing.fbu_rt_start = new Date().getTime();\n        this._updateContinuousUpdates();\n    },\n\n    _xvpOp: function _xvpOp(ver, op) {\n        if (this._rfb_xvp_ver < ver) {\n            return;\n        }\n        Info(\"Sending XVP operation \" + op + \" (version \" + ver + \")\");\n        RFB.messages.xvpOp(this._sock, ver, op);\n    }\n};\n\nObject.assign(RFB.prototype, EventTargetMixin);\n\n// Class Methods\nRFB.messages = {\n    keyEvent: function keyEvent(sock, keysym, down) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 4; // msg-type\n        buff[offset + 1] = down;\n\n        buff[offset + 2] = 0;\n        buff[offset + 3] = 0;\n\n        buff[offset + 4] = keysym >> 24;\n        buff[offset + 5] = keysym >> 16;\n        buff[offset + 6] = keysym >> 8;\n        buff[offset + 7] = keysym;\n\n        sock._sQlen += 8;\n        sock.flush();\n    },\n\n    QEMUExtendedKeyEvent: function QEMUExtendedKeyEvent(sock, keysym, down, keycode) {\n        function getRFBkeycode(xt_scancode) {\n            var upperByte = keycode >> 8;\n            var lowerByte = keycode & 0x00ff;\n            if (upperByte === 0xe0 && lowerByte < 0x7f) {\n                lowerByte = lowerByte | 0x80;\n                return lowerByte;\n            }\n            return xt_scancode;\n        }\n\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 255; // msg-type\n        buff[offset + 1] = 0; // sub msg-type\n\n        buff[offset + 2] = down >> 8;\n        buff[offset + 3] = down;\n\n        buff[offset + 4] = keysym >> 24;\n        buff[offset + 5] = keysym >> 16;\n        buff[offset + 6] = keysym >> 8;\n        buff[offset + 7] = keysym;\n\n        var RFBkeycode = getRFBkeycode(keycode);\n\n        buff[offset + 8] = RFBkeycode >> 24;\n        buff[offset + 9] = RFBkeycode >> 16;\n        buff[offset + 10] = RFBkeycode >> 8;\n        buff[offset + 11] = RFBkeycode;\n\n        sock._sQlen += 12;\n        sock.flush();\n    },\n\n    pointerEvent: function pointerEvent(sock, x, y, mask) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 5; // msg-type\n\n        buff[offset + 1] = mask;\n\n        buff[offset + 2] = x >> 8;\n        buff[offset + 3] = x;\n\n        buff[offset + 4] = y >> 8;\n        buff[offset + 5] = y;\n\n        sock._sQlen += 6;\n        sock.flush();\n    },\n\n    // TODO(directxman12): make this unicode compatible?\n    clientCutText: function clientCutText(sock, text) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 6; // msg-type\n\n        buff[offset + 1] = 0; // padding\n        buff[offset + 2] = 0; // padding\n        buff[offset + 3] = 0; // padding\n\n        var n = text.length;\n\n        buff[offset + 4] = n >> 24;\n        buff[offset + 5] = n >> 16;\n        buff[offset + 6] = n >> 8;\n        buff[offset + 7] = n;\n\n        for (var i = 0; i < n; i++) {\n            buff[offset + 8 + i] = text.charCodeAt(i);\n        }\n\n        sock._sQlen += 8 + n;\n        sock.flush();\n    },\n\n    setDesktopSize: function setDesktopSize(sock, width, height, id, flags) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 251; // msg-type\n        buff[offset + 1] = 0; // padding\n        buff[offset + 2] = width >> 8; // width\n        buff[offset + 3] = width;\n        buff[offset + 4] = height >> 8; // height\n        buff[offset + 5] = height;\n\n        buff[offset + 6] = 1; // number-of-screens\n        buff[offset + 7] = 0; // padding\n\n        // screen array\n        buff[offset + 8] = id >> 24; // id\n        buff[offset + 9] = id >> 16;\n        buff[offset + 10] = id >> 8;\n        buff[offset + 11] = id;\n        buff[offset + 12] = 0; // x-position\n        buff[offset + 13] = 0;\n        buff[offset + 14] = 0; // y-position\n        buff[offset + 15] = 0;\n        buff[offset + 16] = width >> 8; // width\n        buff[offset + 17] = width;\n        buff[offset + 18] = height >> 8; // height\n        buff[offset + 19] = height;\n        buff[offset + 20] = flags >> 24; // flags\n        buff[offset + 21] = flags >> 16;\n        buff[offset + 22] = flags >> 8;\n        buff[offset + 23] = flags;\n\n        sock._sQlen += 24;\n        sock.flush();\n    },\n\n    clientFence: function clientFence(sock, flags, payload) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 248; // msg-type\n\n        buff[offset + 1] = 0; // padding\n        buff[offset + 2] = 0; // padding\n        buff[offset + 3] = 0; // padding\n\n        buff[offset + 4] = flags >> 24; // flags\n        buff[offset + 5] = flags >> 16;\n        buff[offset + 6] = flags >> 8;\n        buff[offset + 7] = flags;\n\n        var n = payload.length;\n\n        buff[offset + 8] = n; // length\n\n        for (var i = 0; i < n; i++) {\n            buff[offset + 9 + i] = payload.charCodeAt(i);\n        }\n\n        sock._sQlen += 9 + n;\n        sock.flush();\n    },\n\n    enableContinuousUpdates: function enableContinuousUpdates(sock, enable, x, y, width, height) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 150; // msg-type\n        buff[offset + 1] = enable; // enable-flag\n\n        buff[offset + 2] = x >> 8; // x\n        buff[offset + 3] = x;\n        buff[offset + 4] = y >> 8; // y\n        buff[offset + 5] = y;\n        buff[offset + 6] = width >> 8; // width\n        buff[offset + 7] = width;\n        buff[offset + 8] = height >> 8; // height\n        buff[offset + 9] = height;\n\n        sock._sQlen += 10;\n        sock.flush();\n    },\n\n    pixelFormat: function pixelFormat(sock, depth, true_color) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        var bpp, bits;\n\n        if (depth > 16) {\n            bpp = 32;\n        } else if (depth > 8) {\n            bpp = 16;\n        } else {\n            bpp = 8;\n        }\n\n        bits = Math.floor(depth / 3);\n\n        buff[offset] = 0; // msg-type\n\n        buff[offset + 1] = 0; // padding\n        buff[offset + 2] = 0; // padding\n        buff[offset + 3] = 0; // padding\n\n        buff[offset + 4] = bpp; // bits-per-pixel\n        buff[offset + 5] = depth; // depth\n        buff[offset + 6] = 0; // little-endian\n        buff[offset + 7] = true_color ? 1 : 0; // true-color\n\n        buff[offset + 8] = 0; // red-max\n        buff[offset + 9] = (1 << bits) - 1; // red-max\n\n        buff[offset + 10] = 0; // green-max\n        buff[offset + 11] = (1 << bits) - 1; // green-max\n\n        buff[offset + 12] = 0; // blue-max\n        buff[offset + 13] = (1 << bits) - 1; // blue-max\n\n        buff[offset + 14] = bits * 2; // red-shift\n        buff[offset + 15] = bits * 1; // green-shift\n        buff[offset + 16] = bits * 0; // blue-shift\n\n        buff[offset + 17] = 0; // padding\n        buff[offset + 18] = 0; // padding\n        buff[offset + 19] = 0; // padding\n\n        sock._sQlen += 20;\n        sock.flush();\n    },\n\n    clientEncodings: function clientEncodings(sock, encodings$$1) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 2; // msg-type\n        buff[offset + 1] = 0; // padding\n\n        buff[offset + 2] = encodings$$1.length >> 8;\n        buff[offset + 3] = encodings$$1.length;\n\n        var i,\n            j = offset + 4;\n        for (i = 0; i < encodings$$1.length; i++) {\n            var enc = encodings$$1[i];\n            buff[j] = enc >> 24;\n            buff[j + 1] = enc >> 16;\n            buff[j + 2] = enc >> 8;\n            buff[j + 3] = enc;\n\n            j += 4;\n        }\n\n        sock._sQlen += j - offset;\n        sock.flush();\n    },\n\n    fbUpdateRequest: function fbUpdateRequest(sock, incremental, x, y, w, h) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        if (typeof x === \"undefined\") {\n            x = 0;\n        }\n        if (typeof y === \"undefined\") {\n            y = 0;\n        }\n\n        buff[offset] = 3; // msg-type\n        buff[offset + 1] = incremental ? 1 : 0;\n\n        buff[offset + 2] = x >> 8 & 0xFF;\n        buff[offset + 3] = x & 0xFF;\n\n        buff[offset + 4] = y >> 8 & 0xFF;\n        buff[offset + 5] = y & 0xFF;\n\n        buff[offset + 6] = w >> 8 & 0xFF;\n        buff[offset + 7] = w & 0xFF;\n\n        buff[offset + 8] = h >> 8 & 0xFF;\n        buff[offset + 9] = h & 0xFF;\n\n        sock._sQlen += 10;\n        sock.flush();\n    },\n\n    xvpOp: function xvpOp(sock, ver, op) {\n        var buff = sock._sQ;\n        var offset = sock._sQlen;\n\n        buff[offset] = 250; // msg-type\n        buff[offset + 1] = 0; // padding\n\n        buff[offset + 2] = ver;\n        buff[offset + 3] = op;\n\n        sock._sQlen += 4;\n        sock.flush();\n    }\n};\n\nRFB.genDES = function (password, challenge) {\n    var passwd = [];\n    for (var i = 0; i < password.length; i++) {\n        passwd.push(password.charCodeAt(i));\n    }\n    return new DES(passwd).encrypt(challenge);\n};\n\nRFB.encodingHandlers = {\n    RAW: function RAW() {\n        if (this._FBU.lines === 0) {\n            this._FBU.lines = this._FBU.height;\n        }\n\n        var pixelSize = this._fb_depth == 8 ? 1 : 4;\n        this._FBU.bytes = this._FBU.width * pixelSize; // at least a line\n        if (this._sock.rQwait(\"RAW\", this._FBU.bytes)) {\n            return false;\n        }\n        var cur_y = this._FBU.y + (this._FBU.height - this._FBU.lines);\n        var curr_height = Math.min(this._FBU.lines, Math.floor(this._sock.rQlen() / (this._FBU.width * pixelSize)));\n        var data = this._sock.get_rQ();\n        var index = this._sock.get_rQi();\n        if (this._fb_depth == 8) {\n            var pixels = this._FBU.width * curr_height;\n            var newdata = new Uint8Array(pixels * 4);\n            var i;\n            for (i = 0; i < pixels; i++) {\n                newdata[i * 4 + 0] = (data[index + i] >> 0 & 0x3) * 255 / 3;\n                newdata[i * 4 + 1] = (data[index + i] >> 2 & 0x3) * 255 / 3;\n                newdata[i * 4 + 2] = (data[index + i] >> 4 & 0x3) * 255 / 3;\n                newdata[i * 4 + 4] = 0;\n            }\n            data = newdata;\n            index = 0;\n        }\n        this._display.blitImage(this._FBU.x, cur_y, this._FBU.width, curr_height, data, index);\n        this._sock.rQskipBytes(this._FBU.width * curr_height * pixelSize);\n        this._FBU.lines -= curr_height;\n\n        if (this._FBU.lines > 0) {\n            this._FBU.bytes = this._FBU.width * pixelSize; // At least another line\n        } else {\n            this._FBU.rects--;\n            this._FBU.bytes = 0;\n        }\n\n        return true;\n    },\n\n    COPYRECT: function COPYRECT() {\n        this._FBU.bytes = 4;\n        if (this._sock.rQwait(\"COPYRECT\", 4)) {\n            return false;\n        }\n        this._display.copyImage(this._sock.rQshift16(), this._sock.rQshift16(), this._FBU.x, this._FBU.y, this._FBU.width, this._FBU.height);\n\n        this._FBU.rects--;\n        this._FBU.bytes = 0;\n        return true;\n    },\n\n    RRE: function RRE() {\n        var color;\n        if (this._FBU.subrects === 0) {\n            this._FBU.bytes = 4 + 4;\n            if (this._sock.rQwait(\"RRE\", 4 + 4)) {\n                return false;\n            }\n            this._FBU.subrects = this._sock.rQshift32();\n            color = this._sock.rQshiftBytes(4); // Background\n            this._display.fillRect(this._FBU.x, this._FBU.y, this._FBU.width, this._FBU.height, color);\n        }\n\n        while (this._FBU.subrects > 0 && this._sock.rQlen() >= 4 + 8) {\n            color = this._sock.rQshiftBytes(4);\n            var x = this._sock.rQshift16();\n            var y = this._sock.rQshift16();\n            var width = this._sock.rQshift16();\n            var height = this._sock.rQshift16();\n            this._display.fillRect(this._FBU.x + x, this._FBU.y + y, width, height, color);\n            this._FBU.subrects--;\n        }\n\n        if (this._FBU.subrects > 0) {\n            var chunk = Math.min(this._rre_chunk_sz, this._FBU.subrects);\n            this._FBU.bytes = (4 + 8) * chunk;\n        } else {\n            this._FBU.rects--;\n            this._FBU.bytes = 0;\n        }\n\n        return true;\n    },\n\n    HEXTILE: function HEXTILE() {\n        var rQ = this._sock.get_rQ();\n        var rQi = this._sock.get_rQi();\n\n        if (this._FBU.tiles === 0) {\n            this._FBU.tiles_x = Math.ceil(this._FBU.width / 16);\n            this._FBU.tiles_y = Math.ceil(this._FBU.height / 16);\n            this._FBU.total_tiles = this._FBU.tiles_x * this._FBU.tiles_y;\n            this._FBU.tiles = this._FBU.total_tiles;\n        }\n\n        while (this._FBU.tiles > 0) {\n            this._FBU.bytes = 1;\n            if (this._sock.rQwait(\"HEXTILE subencoding\", this._FBU.bytes)) {\n                return false;\n            }\n            var subencoding = rQ[rQi]; // Peek\n            if (subencoding > 30) {\n                // Raw\n                this._fail(\"Illegal hextile subencoding (subencoding: \" + subencoding + \")\");\n                return false;\n            }\n\n            var subrects = 0;\n            var curr_tile = this._FBU.total_tiles - this._FBU.tiles;\n            var tile_x = curr_tile % this._FBU.tiles_x;\n            var tile_y = Math.floor(curr_tile / this._FBU.tiles_x);\n            var x = this._FBU.x + tile_x * 16;\n            var y = this._FBU.y + tile_y * 16;\n            var w = Math.min(16, this._FBU.x + this._FBU.width - x);\n            var h = Math.min(16, this._FBU.y + this._FBU.height - y);\n\n            // Figure out how much we are expecting\n            if (subencoding & 0x01) {\n                // Raw\n                this._FBU.bytes += w * h * 4;\n            } else {\n                if (subencoding & 0x02) {\n                    // Background\n                    this._FBU.bytes += 4;\n                }\n                if (subencoding & 0x04) {\n                    // Foreground\n                    this._FBU.bytes += 4;\n                }\n                if (subencoding & 0x08) {\n                    // AnySubrects\n                    this._FBU.bytes++; // Since we aren't shifting it off\n                    if (this._sock.rQwait(\"hextile subrects header\", this._FBU.bytes)) {\n                        return false;\n                    }\n                    subrects = rQ[rQi + this._FBU.bytes - 1]; // Peek\n                    if (subencoding & 0x10) {\n                        // SubrectsColoured\n                        this._FBU.bytes += subrects * (4 + 2);\n                    } else {\n                        this._FBU.bytes += subrects * 2;\n                    }\n                }\n            }\n\n            if (this._sock.rQwait(\"hextile\", this._FBU.bytes)) {\n                return false;\n            }\n\n            // We know the encoding and have a whole tile\n            this._FBU.subencoding = rQ[rQi];\n            rQi++;\n            if (this._FBU.subencoding === 0) {\n                if (this._FBU.lastsubencoding & 0x01) {\n                    // Weird: ignore blanks are RAW\n                    Debug(\"     Ignoring blank after RAW\");\n                } else {\n                    this._display.fillRect(x, y, w, h, this._FBU.background);\n                }\n            } else if (this._FBU.subencoding & 0x01) {\n                // Raw\n                this._display.blitImage(x, y, w, h, rQ, rQi);\n                rQi += this._FBU.bytes - 1;\n            } else {\n                if (this._FBU.subencoding & 0x02) {\n                    // Background\n                    this._FBU.background = [rQ[rQi], rQ[rQi + 1], rQ[rQi + 2], rQ[rQi + 3]];\n                    rQi += 4;\n                }\n                if (this._FBU.subencoding & 0x04) {\n                    // Foreground\n                    this._FBU.foreground = [rQ[rQi], rQ[rQi + 1], rQ[rQi + 2], rQ[rQi + 3]];\n                    rQi += 4;\n                }\n\n                this._display.startTile(x, y, w, h, this._FBU.background);\n                if (this._FBU.subencoding & 0x08) {\n                    // AnySubrects\n                    subrects = rQ[rQi];\n                    rQi++;\n\n                    for (var s = 0; s < subrects; s++) {\n                        var color;\n                        if (this._FBU.subencoding & 0x10) {\n                            // SubrectsColoured\n                            color = [rQ[rQi], rQ[rQi + 1], rQ[rQi + 2], rQ[rQi + 3]];\n                            rQi += 4;\n                        } else {\n                            color = this._FBU.foreground;\n                        }\n                        var xy = rQ[rQi];\n                        rQi++;\n                        var sx = xy >> 4;\n                        var sy = xy & 0x0f;\n\n                        var wh = rQ[rQi];\n                        rQi++;\n                        var sw = (wh >> 4) + 1;\n                        var sh = (wh & 0x0f) + 1;\n\n                        this._display.subTile(sx, sy, sw, sh, color);\n                    }\n                }\n                this._display.finishTile();\n            }\n            this._sock.set_rQi(rQi);\n            this._FBU.lastsubencoding = this._FBU.subencoding;\n            this._FBU.bytes = 0;\n            this._FBU.tiles--;\n        }\n\n        if (this._FBU.tiles === 0) {\n            this._FBU.rects--;\n        }\n\n        return true;\n    },\n\n    TIGHT: function TIGHT(isTightPNG) {\n        this._FBU.bytes = 1; // compression-control byte\n        if (this._sock.rQwait(\"TIGHT compression-control\", this._FBU.bytes)) {\n            return false;\n        }\n\n        var checksum = function checksum(data) {\n            var sum = 0;\n            for (var i = 0; i < data.length; i++) {\n                sum += data[i];\n                if (sum > 65536) sum -= 65536;\n            }\n            return sum;\n        };\n\n        var resetStreams = 0;\n        var streamId = -1;\n        var decompress = function (data, expected) {\n            for (var i = 0; i < 4; i++) {\n                if (resetStreams >> i & 1) {\n                    this._FBU.zlibs[i].reset();\n                    Info(\"Reset zlib stream \" + i);\n                }\n            }\n\n            //var uncompressed = this._FBU.zlibs[streamId].uncompress(data, 0);\n            var uncompressed = this._FBU.zlibs[streamId].inflate(data, true, expected);\n            /*if (uncompressed.status !== 0) {\n                Log.Error(\"Invalid data in zlib stream\");\n            }*/\n\n            //return uncompressed.data;\n            return uncompressed;\n        }.bind(this);\n\n        var indexedToRGBX2Color = function (data, palette, width, height) {\n            // Convert indexed (palette based) image data to RGB\n            // TODO: reduce number of calculations inside loop\n            var dest = this._destBuff;\n            var w = Math.floor((width + 7) / 8);\n            var w1 = Math.floor(width / 8);\n\n            /*for (var y = 0; y < height; y++) {\n                var b, x, dp, sp;\n                var yoffset = y * width;\n                var ybitoffset = y * w;\n                var xoffset, targetbyte;\n                for (x = 0; x < w1; x++) {\n                    xoffset = yoffset + x * 8;\n                    targetbyte = data[ybitoffset + x];\n                    for (b = 7; b >= 0; b--) {\n                        dp = (xoffset + 7 - b) * 3;\n                        sp = (targetbyte >> b & 1) * 3;\n                        dest[dp] = palette[sp];\n                        dest[dp + 1] = palette[sp + 1];\n                        dest[dp + 2] = palette[sp + 2];\n                    }\n                }\n                 xoffset = yoffset + x * 8;\n                targetbyte = data[ybitoffset + x];\n                for (b = 7; b >= 8 - width % 8; b--) {\n                    dp = (xoffset + 7 - b) * 3;\n                    sp = (targetbyte >> b & 1) * 3;\n                    dest[dp] = palette[sp];\n                    dest[dp + 1] = palette[sp + 1];\n                    dest[dp + 2] = palette[sp + 2];\n                }\n            }*/\n\n            for (var y = 0; y < height; y++) {\n                var b, x, dp, sp;\n                for (x = 0; x < w1; x++) {\n                    for (b = 7; b >= 0; b--) {\n                        dp = (y * width + x * 8 + 7 - b) * 4;\n                        sp = (data[y * w + x] >> b & 1) * 3;\n                        dest[dp] = palette[sp];\n                        dest[dp + 1] = palette[sp + 1];\n                        dest[dp + 2] = palette[sp + 2];\n                        dest[dp + 3] = 255;\n                    }\n                }\n\n                for (b = 7; b >= 8 - width % 8; b--) {\n                    dp = (y * width + x * 8 + 7 - b) * 4;\n                    sp = (data[y * w + x] >> b & 1) * 3;\n                    dest[dp] = palette[sp];\n                    dest[dp + 1] = palette[sp + 1];\n                    dest[dp + 2] = palette[sp + 2];\n                    dest[dp + 3] = 255;\n                }\n            }\n\n            return dest;\n        }.bind(this);\n\n        var indexedToRGBX = function (data, palette, width, height) {\n            // Convert indexed (palette based) image data to RGB\n            var dest = this._destBuff;\n            var total = width * height * 4;\n            for (var i = 0, j = 0; i < total; i += 4, j++) {\n                var sp = data[j] * 3;\n                dest[i] = palette[sp];\n                dest[i + 1] = palette[sp + 1];\n                dest[i + 2] = palette[sp + 2];\n                dest[i + 3] = 255;\n            }\n\n            return dest;\n        }.bind(this);\n\n        var rQi = this._sock.get_rQi();\n        var rQ = this._sock.rQwhole();\n        var cmode, data;\n        var cl_header, cl_data;\n\n        var handlePalette = function () {\n            var numColors = rQ[rQi + 2] + 1;\n            var paletteSize = numColors * 3;\n            this._FBU.bytes += paletteSize;\n            if (this._sock.rQwait(\"TIGHT palette \" + cmode, this._FBU.bytes)) {\n                return false;\n            }\n\n            var bpp = numColors <= 2 ? 1 : 8;\n            var rowSize = Math.floor((this._FBU.width * bpp + 7) / 8);\n            var raw = false;\n            if (rowSize * this._FBU.height < 12) {\n                raw = true;\n                cl_header = 0;\n                cl_data = rowSize * this._FBU.height;\n                //clength = [0, rowSize * this._FBU.height];\n            } else {\n                // begin inline getTightCLength (returning two-item arrays is bad for performance with GC)\n                var cl_offset = rQi + 3 + paletteSize;\n                cl_header = 1;\n                cl_data = 0;\n                cl_data += rQ[cl_offset] & 0x7f;\n                if (rQ[cl_offset] & 0x80) {\n                    cl_header++;\n                    cl_data += (rQ[cl_offset + 1] & 0x7f) << 7;\n                    if (rQ[cl_offset + 1] & 0x80) {\n                        cl_header++;\n                        cl_data += rQ[cl_offset + 2] << 14;\n                    }\n                }\n                // end inline getTightCLength\n            }\n\n            this._FBU.bytes += cl_header + cl_data;\n            if (this._sock.rQwait(\"TIGHT \" + cmode, this._FBU.bytes)) {\n                return false;\n            }\n\n            // Shift ctl, filter id, num colors, palette entries, and clength off\n            this._sock.rQskipBytes(3);\n            //var palette = this._sock.rQshiftBytes(paletteSize);\n            this._sock.rQshiftTo(this._paletteBuff, paletteSize);\n            this._sock.rQskipBytes(cl_header);\n\n            if (raw) {\n                data = this._sock.rQshiftBytes(cl_data);\n            } else {\n                data = decompress(this._sock.rQshiftBytes(cl_data), rowSize * this._FBU.height);\n            }\n\n            // Convert indexed (palette based) image data to RGB\n            var rgbx;\n            if (numColors == 2) {\n                rgbx = indexedToRGBX2Color(data, this._paletteBuff, this._FBU.width, this._FBU.height);\n                this._display.blitRgbxImage(this._FBU.x, this._FBU.y, this._FBU.width, this._FBU.height, rgbx, 0, false);\n            } else {\n                rgbx = indexedToRGBX(data, this._paletteBuff, this._FBU.width, this._FBU.height);\n                this._display.blitRgbxImage(this._FBU.x, this._FBU.y, this._FBU.width, this._FBU.height, rgbx, 0, false);\n            }\n\n            return true;\n        }.bind(this);\n\n        var handleCopy = function () {\n            var raw = false;\n            var uncompressedSize = this._FBU.width * this._FBU.height * 3;\n            if (uncompressedSize < 12) {\n                raw = true;\n                cl_header = 0;\n                cl_data = uncompressedSize;\n            } else {\n                // begin inline getTightCLength (returning two-item arrays is for peformance with GC)\n                var cl_offset = rQi + 1;\n                cl_header = 1;\n                cl_data = 0;\n                cl_data += rQ[cl_offset] & 0x7f;\n                if (rQ[cl_offset] & 0x80) {\n                    cl_header++;\n                    cl_data += (rQ[cl_offset + 1] & 0x7f) << 7;\n                    if (rQ[cl_offset + 1] & 0x80) {\n                        cl_header++;\n                        cl_data += rQ[cl_offset + 2] << 14;\n                    }\n                }\n                // end inline getTightCLength\n            }\n            this._FBU.bytes = 1 + cl_header + cl_data;\n            if (this._sock.rQwait(\"TIGHT \" + cmode, this._FBU.bytes)) {\n                return false;\n            }\n\n            // Shift ctl, clength off\n            this._sock.rQshiftBytes(1 + cl_header);\n\n            if (raw) {\n                data = this._sock.rQshiftBytes(cl_data);\n            } else {\n                data = decompress(this._sock.rQshiftBytes(cl_data), uncompressedSize);\n            }\n\n            this._display.blitRgbImage(this._FBU.x, this._FBU.y, this._FBU.width, this._FBU.height, data, 0, false);\n\n            return true;\n        }.bind(this);\n\n        var ctl = this._sock.rQpeek8();\n\n        // Keep tight reset bits\n        resetStreams = ctl & 0xF;\n\n        // Figure out filter\n        ctl = ctl >> 4;\n        streamId = ctl & 0x3;\n\n        if (ctl === 0x08) cmode = \"fill\";else if (ctl === 0x09) cmode = \"jpeg\";else if (ctl === 0x0A) cmode = \"png\";else if (ctl & 0x04) cmode = \"filter\";else if (ctl < 0x04) cmode = \"copy\";else return this._fail(\"Illegal tight compression received (ctl: \" + ctl + \")\");\n\n        if (isTightPNG && ctl < 0x08) {\n            return this._fail(\"BasicCompression received in TightPNG rect\");\n        }\n        if (!isTightPNG && ctl === 0x0A) {\n            return this._fail(\"PNG received in standard Tight rect\");\n        }\n\n        switch (cmode) {\n            // fill use depth because TPIXELs drop the padding byte\n            case \"fill\":\n                // TPIXEL\n                this._FBU.bytes += 3;\n                break;\n            case \"jpeg\":\n                // max clength\n                this._FBU.bytes += 3;\n                break;\n            case \"png\":\n                // max clength\n                this._FBU.bytes += 3;\n                break;\n            case \"filter\":\n                // filter id + num colors if palette\n                this._FBU.bytes += 2;\n                break;\n            case \"copy\":\n                break;\n        }\n\n        if (this._sock.rQwait(\"TIGHT \" + cmode, this._FBU.bytes)) {\n            return false;\n        }\n\n        // Determine FBU.bytes\n        switch (cmode) {\n            case \"fill\":\n                // skip ctl byte\n                this._display.fillRect(this._FBU.x, this._FBU.y, this._FBU.width, this._FBU.height, [rQ[rQi + 3], rQ[rQi + 2], rQ[rQi + 1]], false);\n                this._sock.rQskipBytes(4);\n                break;\n            case \"png\":\n            case \"jpeg\":\n                // begin inline getTightCLength (returning two-item arrays is for peformance with GC)\n                var cl_offset = rQi + 1;\n                cl_header = 1;\n                cl_data = 0;\n                cl_data += rQ[cl_offset] & 0x7f;\n                if (rQ[cl_offset] & 0x80) {\n                    cl_header++;\n                    cl_data += (rQ[cl_offset + 1] & 0x7f) << 7;\n                    if (rQ[cl_offset + 1] & 0x80) {\n                        cl_header++;\n                        cl_data += rQ[cl_offset + 2] << 14;\n                    }\n                }\n                // end inline getTightCLength\n                this._FBU.bytes = 1 + cl_header + cl_data; // ctl + clength size + jpeg-data\n                if (this._sock.rQwait(\"TIGHT \" + cmode, this._FBU.bytes)) {\n                    return false;\n                }\n\n                // We have everything, render it\n                this._sock.rQskipBytes(1 + cl_header); // shift off clt + compact length\n                data = this._sock.rQshiftBytes(cl_data);\n                this._display.imageRect(this._FBU.x, this._FBU.y, \"image/\" + cmode, data);\n                break;\n            case \"filter\":\n                var filterId = rQ[rQi + 1];\n                if (filterId === 1) {\n                    if (!handlePalette()) {\n                        return false;\n                    }\n                } else {\n                    // Filter 0, Copy could be valid here, but servers don't send it as an explicit filter\n                    // Filter 2, Gradient is valid but not use if jpeg is enabled\n                    this._fail(\"Unsupported tight subencoding received \" + \"(filter: \" + filterId + \")\");\n                }\n                break;\n            case \"copy\":\n                if (!handleCopy()) {\n                    return false;\n                }\n                break;\n        }\n\n        this._FBU.bytes = 0;\n        this._FBU.rects--;\n\n        return true;\n    },\n\n    last_rect: function last_rect() {\n        this._FBU.rects = 0;\n        return true;\n    },\n\n    ExtendedDesktopSize: function ExtendedDesktopSize() {\n        this._FBU.bytes = 1;\n        if (this._sock.rQwait(\"ExtendedDesktopSize\", this._FBU.bytes)) {\n            return false;\n        }\n\n        var firstUpdate = !this._supportsSetDesktopSize;\n        this._supportsSetDesktopSize = true;\n\n        // Normally we only apply the current resize mode after a\n        // window resize event. However there is no such trigger on the\n        // initial connect. And we don't know if the server supports\n        // resizing until we've gotten here.\n        if (firstUpdate) {\n            this._requestRemoteResize();\n        }\n\n        var number_of_screens = this._sock.rQpeek8();\n\n        this._FBU.bytes = 4 + number_of_screens * 16;\n        if (this._sock.rQwait(\"ExtendedDesktopSize\", this._FBU.bytes)) {\n            return false;\n        }\n\n        this._sock.rQskipBytes(1); // number-of-screens\n        this._sock.rQskipBytes(3); // padding\n\n        for (var i = 0; i < number_of_screens; i += 1) {\n            // Save the id and flags of the first screen\n            if (i === 0) {\n                this._screen_id = this._sock.rQshiftBytes(4); // id\n                this._sock.rQskipBytes(2); // x-position\n                this._sock.rQskipBytes(2); // y-position\n                this._sock.rQskipBytes(2); // width\n                this._sock.rQskipBytes(2); // height\n                this._screen_flags = this._sock.rQshiftBytes(4); // flags\n            } else {\n                this._sock.rQskipBytes(16);\n            }\n        }\n\n        /*\n         * The x-position indicates the reason for the change:\n         *\n         *  0 - server resized on its own\n         *  1 - this client requested the resize\n         *  2 - another client requested the resize\n         */\n\n        // We need to handle errors when we requested the resize.\n        if (this._FBU.x === 1 && this._FBU.y !== 0) {\n            var msg = \"\";\n            // The y-position indicates the status code from the server\n            switch (this._FBU.y) {\n                case 1:\n                    msg = \"Resize is administratively prohibited\";\n                    break;\n                case 2:\n                    msg = \"Out of resources\";\n                    break;\n                case 3:\n                    msg = \"Invalid screen layout\";\n                    break;\n                default:\n                    msg = \"Unknown reason\";\n                    break;\n            }\n            Warn(\"Server did not accept the resize request: \" + msg);\n        } else {\n            this._resize(this._FBU.width, this._FBU.height);\n        }\n\n        this._FBU.bytes = 0;\n        this._FBU.rects -= 1;\n        return true;\n    },\n\n    DesktopSize: function DesktopSize() {\n        this._resize(this._FBU.width, this._FBU.height);\n        this._FBU.bytes = 0;\n        this._FBU.rects -= 1;\n        return true;\n    },\n\n    Cursor: function Cursor() {\n        Debug(\">> set_cursor\");\n        var x = this._FBU.x; // hotspot-x\n        var y = this._FBU.y; // hotspot-y\n        var w = this._FBU.width;\n        var h = this._FBU.height;\n\n        var pixelslength = w * h * 4;\n        var masklength = Math.floor((w + 7) / 8) * h;\n\n        this._FBU.bytes = pixelslength + masklength;\n        if (this._sock.rQwait(\"cursor encoding\", this._FBU.bytes)) {\n            return false;\n        }\n\n        this._display.changeCursor(this._sock.rQshiftBytes(pixelslength), this._sock.rQshiftBytes(masklength), x, y, w, h);\n\n        this._FBU.bytes = 0;\n        this._FBU.rects--;\n\n        Debug(\"<< set_cursor\");\n        return true;\n    },\n\n    QEMUExtendedKeyEvent: function QEMUExtendedKeyEvent() {\n        this._FBU.rects--;\n\n        // Old Safari doesn't support creating keyboard events\n        try {\n            var keyboardEvent = document.createEvent(\"keyboardEvent\");\n            if (keyboardEvent.code !== undefined) {\n                this._qemuExtKeyEventSupported = true;\n            }\n        } catch (err) {}\n    }\n};\n\nmodule.exports = RFB;\n\n"]}