SPB Git forge

spb/admin-ka

Public
41commits 1branches 0releases
172.9 MBsize
maindefault branch
19 days agolast push
JavaScript 65.5% Python 17.8% CSS 13% HTML 3.7%
2.5 KB · 52 lines javascript
Raw Blame History
1"use strict";23Object.defineProperty(exports, "__esModule", {4  value: true5});6exports["default"] = void 0;7function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }8function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }9function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }10function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }11function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }12function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }13/*14 * noVNC: HTML5 VNC client15 * Copyright (C) 2019 The noVNC authors16 * Licensed under MPL 2.0 (see LICENSE.txt)17 *18 * See README.md for usage and integration instructions.19 *20 */21var RREDecoder = exports["default"] = /*#__PURE__*/function () {22  function RREDecoder() {23    _classCallCheck(this, RREDecoder);24    this._subrects = 0;25  }26  return _createClass(RREDecoder, [{27    key: "decodeRect",28    value: function decodeRect(x, y, width, height, sock, display, depth) {29      if (this._subrects === 0) {30        if (sock.rQwait("RRE", 4 + 4)) {31          return false;32        }33        this._subrects = sock.rQshift32();34        var color = sock.rQshiftBytes(4); // Background35        display.fillRect(x, y, width, height, color);36      }37      while (this._subrects > 0) {38        if (sock.rQwait("RRE", 4 + 8)) {39          return false;40        }41        var _color = sock.rQshiftBytes(4);42        var sx = sock.rQshift16();43        var sy = sock.rQshift16();44        var swidth = sock.rQshift16();45        var sheight = sock.rQshift16();46        display.fillRect(x + sx, y + sy, swidth, sheight, _color);47        this._subrects--;48      }49      return true;50    }51  }]);52}();