Commit 3e2d274f by Alexander Bazo

Inital commit

parents
{
"parserOptions": {
"sourceType": "module"
},
"rules":
{
"block-scoped-var": "error",
"camelcase": "warn",
"comma-dangle": ["error", "always-multiline"],
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"no-alert": "error",
"no-console": "warn",
"no-else-return": "error",
"no-empty-function": "error",
"no-eval": "error",
"no-eq-null": "error",
"no-extend-native": "warn",
"no-extra-bind": "error",
"no-loop-func": "error",
"no-magic-numbers": ["warn", {"ignore": [0, 1, -1], "ignoreArrayIndexes": true}],
"no-multiple-empty-lines": ["warn", {"max": 1}],
"no-multi-spaces": "warn",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-unused-expressions": "error",
"no-useless-concat": "error",
"no-undef-init": "error",
"no-underscore-dangle": "error",
"no-param-reassign": "error",
"no-self-compare": "error",
"no-void": "error",
"no-with": "error",
"one-var": "error",
"quotes": ["warn", "double"],
"semi": "error",
"strict": "error",
"vars-on-top": "error",
"yoda": "error"
},
"env":
{
"es6": true,
"browser": true
},
"extends": "eslint:recommended"
}
\ No newline at end of file
# dev
node_modules
# test
loadtest
{
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
"js": {
"allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"],
"brace_style": "collapse-preserve-inline",
"break_chained_methods": false,
"e4x": false,
"eol": "\n",
"end_with_newline": false,
"indent_char": " ",
"indent_level": 0,
"indent_size": 2,
"indent_with_tabs": false,
"jslint_happy": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"max_preserve_newlines": 0,
"preserve_newlines": true,
"space_after_anon_function": false,
"space_before_conditional": true,
"space_in_empty_paren": false,
"space_in_paren": false,
"unescape_strings": false,
"wrap_line_length": 80
}
}
\ No newline at end of file
# Star Gazer Server
StarGazer is a multiplayer game using gaze data as an input source. This demo showcases the eye tracking classroom's abilities to utilize gaze based real time collaboration.
## Dependencies
StarGazer is based on the colyseus game server framework. To install all dependencies, run `npm install`.
## Requirements
To play the game using gaze data for input a local [gaze-server](https://lab.las3.de/gitlab/eye-tracking-classroom/gaze-server.cs) must be running at `ws://localhost:8001`.
## Building and Testing
- Run `npm install` to install dependencies and build game to `build/`
- Run `npm start` to run the game server
- See [this repository]() for client code
\ No newline at end of file
/* eslint-env node */
const http = require("http"),
express = require("express"),
cors = require("cors"),
colyseus = require("colyseus"),
monitor = require("@colyseus/monitor").monitor,
socialRoutes = require("@colyseus/social/express").default,
ImageViewerRoom = require("./lib/rooms/ImageViewerRoom.js"),
Logger = require("./lib/utils/Logger.js"),
ServerConfiguration = require("./lib/config/ServerConfig.js");
Logger.disable();
var app = express(),
server = http.createServer(app),
imageServer;
// Logger.enable();
app.use(cors());
app.use(express.json());
imageServer = new colyseus.Server({
server: server,
express: app,
});
imageServer.define(ServerConfiguration.getViewerRoomName(), ImageViewerRoom);
// Must be set after game server is created
app.use(ServerConfiguration.getSocialRoute(), socialRoutes);
app.use(ServerConfiguration.getMonitorRoute(), monitor(imageServer));
// Prrobably shoud be set after game server is created
app.use(ServerConfiguration.getViewerRoute(), express.static(ServerConfiguration.getViewerPath(), {
maxAge: 100,
}));
imageServer.listen(ServerConfiguration.getPort());
Logger.log(`Listening on ws://localhost:${ ServerConfiguration.getPort() }`, "Server");
\ No newline at end of file
/* eslint-env node */
/* eslint-disable no-magic-numbers */
var port,
socialRoute,
monitorRoute,
updateInterval,
viewerRoute,
viewerPath,
viewerRoomName;
class ServerConfig {
reset() {
port = process.env.PORT || 2568;
socialRoute = "/";
monitorRoute = "/colyseus";
updateInterval = 1000/60;
viewerRoute = "/viewer";
viewerPath = "./www";
viewerRoomName = "image_viewer";
}
getPort() {
return port;
}
getSocialRoute() {
return socialRoute;
}
getMonitorRoute() {
return monitorRoute;
}
getUpdateInterval() {
return updateInterval;
}
getViewerRoute() {
return viewerRoute;
}
getViewerPath() {
return viewerPath;
}
getViewerRoomName() {
return viewerRoomName;
}
}
const Config = new ServerConfig();
Config.reset();
module.exports = Config;
\ No newline at end of file
/* eslint-env node */
const schema = require("@colyseus/schema"),
Schema = schema.Schema;
class GazePoint extends Schema {
constructor(screenX, screenY, createdAt, source) {
super();
this.screenX = screenX;
this.screenY = screenY;
this.createdAt = createdAt;
this.source = source;
this.relativeAge = 0;
}
static fromClientData(data) {
return new GazePoint(data.screenX, data.screenY, data.createdAt, data.source);
}
}
schema.defineTypes(GazePoint, {
screenX: "number",
screenY: "number",
createdAt: "number",
relativeAge: "number",
source: "string",
});
module.exports = GazePoint;
\ No newline at end of file
/* eslint-env node */
const schema = require("@colyseus/schema"),
Logger = require("../utils/Logger.js"),
Task = require("./Task"),
Schema = schema.Schema;
var currentCallback;
class ImageViewerState extends Schema {
constructor() {
super();
this.task = null;
}
setTask(task, onFinish) {
this.task = task;
currentCallback = onFinish;
setTimeout(this.onTaskFinished, task.duration);
}
onTaskFinished() {
currentCallback();
}
}
schema.defineTypes(ImageViewerState, {
stateType: "string",
width: "number",
height: "number",
task: Task,
});
module.exports = ImageViewerState;
\ No newline at end of file
/* eslint-env node */
const schema = require("@colyseus/schema"),
Schema = schema.Schema;
var taskCounter = 0;
class Task extends Schema {
constructor(imageUrl, taskDescription, taskSource, duration) {
super();
taskCounter++;
this.imageUrl = imageUrl;
this.taskDescription = taskDescription;
this.taskSource = taskSource;
this.duration = duration;
this.position = taskCounter;
}
}
schema.defineTypes(Task, {
imageUrl: "string",
taskDescription: "string",
taskSource: "string",
duration: "number",
height: "number",
position: "number",
});
module.exports = Task;
\ No newline at end of file
/* eslint-env node */
const TASKS = [{
imageUrl: "images/Brueghel-The_Dutch_Proverbs.jpg",
taskDescription: "Suchen Sie nach bildlichen Darstellungen niederländischer Sprichwörter des 16. Jahrhunderts.",
taskSource: "Pieter Bruegel the Elder, Netherlandish Proverbs (Oil on oak wood, 1599), Gemäldegalerie, Berlin",
duration: 30000,
}],
MAX_GAZE_POINT_AGE = 2000,
GAZE_POINT_UPDATE_DELAY = 250;
const colyseus = require("colyseus"),
Logger = require("../utils/Logger.js"),
ServerConfiguration = require("../config/ServerConfig.js"),
GazePoint = require("../logic/GazePoint.js"),
Task = require("../logic/Task.js"),
ImageViewerState = require("../logic/ImageViewerState.js");
var availableTasks,
currentTask,
currentTaskIndex,
gazePoints,
gazeSubscribers,
lastGazePointUpdate = 0;
class ImageViewerRoom extends colyseus.Room {
onCreate() {
Logger.log("Creating ImageViewer room", "ImageViewer Room");
gazePoints = [];
gazeSubscribers = [];
this.createTasks();
this.setState(new ImageViewerState());
this.setSimulationInterval(this.update.bind(this), ServerConfiguration.getUpdateInterval());
this.setTask();
}
createTasks() {
availableTasks = [];
for (let i = 0; i < TASKS.length; i++) {
availableTasks.push(new Task(TASKS[i].imageUrl, TASKS[i].taskDescription,
TASKS[i].taskSource, TASKS[i].duration));
}
currentTaskIndex = 0;
}
onJoin(client, options) {
Logger.log(`Viewer ${client.sessionId} joined ImageViewer room`,
"ImageViewer Room");
}
onMessage(client, message) {
if (message.type === "gaze") {
message.data.source = client.id;
let point = GazePoint.fromClientData(message.data);
gazePoints.push(point);
Logger.log(`Adding new gaze point (${gazePoints.length} points stored)`, "ImageViewer Room");
}
if (message.type === "subscribeToGazeData") {
Logger.log("Gaze observer subsribed", "ImageViewer Room");
gazeSubscribers.push(client);
}
}
onLeave(client, consented) {
Logger.log(`Viewer ${client.sessionId} left ImageViewer room`,
"ImageViewer Room");
}
onDispose() {
Logger.log("Disposing ImageViewer room", "ImageViewer Room");
}
onTaskFinished() {
Logger.log(`Switching to next task`, "ImageViewer Room");
this.setTask();
}
update() {
let now = Date.now();
this.updateGazePoints(now);
if(now - lastGazePointUpdate < GAZE_POINT_UPDATE_DELAY) {
return;
}
for (let i = 0; i < gazeSubscribers.length; i++) {
let client = gazeSubscribers[i];
Logger.log(`${gazePoints.length} gaze points available`);
if (client && gazePoints.length > 0) {
Logger.log(`Sending ${gazePoints.length} gaze points to subsriber`, "ImageViewer Room");
this.send(client,{
type: "gazelist",
data: gazePoints,
});
}
}
lastGazePointUpdate = now;
}
updateGazePoints(now) {
for (let i = gazePoints.length - 1; i >= 0; i--) {
let age = now - gazePoints[i].createdAt;
if (age > MAX_GAZE_POINT_AGE) {
gazePoints.splice(i, 1);
} else {
gazePoints[i].relativeAge = age / MAX_GAZE_POINT_AGE;
}
}
}
setTask() {
Logger.log("Sending current task to state", "ImageViewrRoom");
currentTaskIndex += 1;
if (currentTaskIndex >= availableTasks.length) {
currentTaskIndex = 0;
}
currentTask = availableTasks[currentTaskIndex];
this.state.setTask(currentTask, this.onTaskFinished.bind(this));
}
}
module.exports = ImageViewerRoom;
\ No newline at end of file
class Logger {
constructor() {
this.enabled = false;
}
enable() {
this.enabled = true;
}
disable() {
this.enabled = false;
}
log(msg, label) {
let time = new Date(),
hours = time.getUTCHours(),
minutes = time.getUTCMinutes(),
seconds = time.getUTCSeconds();
if (hours < 10) {
hours = "0" + hours;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
if (this.enabled === false) {
return;
}
console.log(`[${label}]\t${hours}:${minutes}:${seconds} - ${msg}`);
}
}
module.exports = new Logger();
\ No newline at end of file
{
"name": "my-app",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@colyseus/loadtest": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/@colyseus/loadtest/-/loadtest-0.11.2.tgz",
"integrity": "sha512-/CtdOjcpud08l91ee2/FoxmJKuXDhLnZ6YvVR1Tub+dzF+oNfDze9XAMGkfR/01+Lz2VYqpqnFGxkHgh1GmoVw==",
"dev": true,
"requires": {
"@types/node": "^10.12.18",
"blessed": "^0.1.81",
"colyseus.js": "^0.11.0",
"minimist": "^1.2.0",
"ts-node": "^7.0.1",
"typescript": "^3.2.4",
"ws": "^6.1.4"
},
"dependencies": {
"@types/node": {
"version": "10.14.19",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.19.tgz",
"integrity": "sha512-j6Sqt38ssdMKutXBUuAcmWF8QtHW1Fwz/mz4Y+Wd9mzpBiVFirjpNQf363hG5itkG+yGaD+oiLyb50HxJ36l9Q==",
"dev": true
},
"ws": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"dev": true,
"requires": {
"async-limiter": "~1.0.0"
}
}
}
},
"@colyseus/monitor": {
"version": "0.11.5",
"resolved": "https://registry.npmjs.org/@colyseus/monitor/-/monitor-0.11.5.tgz",
"integrity": "sha512-b9H+Rqxp2YqogPoXC9xYKYeCqqRHX5QNs+BTaYVZqlqqycTJGeNZgy98NaksNWnK3ceAJBci8Vi3PpcvCPYdNw==",
"requires": {
"express": "^4.16.3"
}
},
"@colyseus/schema": {
"version": "0.4.57",
"resolved": "https://registry.npmjs.org/@colyseus/schema/-/schema-0.4.57.tgz",
"integrity": "sha512-gAqlPSwdKoGuB43X4oazd+hL1S+8ZVIJWr+QXfnHyHMFiWX7efFYCgmfv9wuW/TWgLkzpgjJEhQjBkjiG+mEZQ=="
},
"@colyseus/social": {
"version": "0.10.9",
"resolved": "https://registry.npmjs.org/@colyseus/social/-/social-0.10.9.tgz",
"integrity": "sha512-hUSNa6g0TQ+QHpECFIT0Vn0Fj2dT0NJq79OSBoJTgjA2/ueKNv4y2dtiSxh78VyiLbyJSd36WfvTu1+3dmw38A==",
"requires": {
"debug": "^4.1.1",
"httpie": "^1.1.2",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.5.6",
"nanoid": "^2.0.2",
"node-pushnotifications": "^1.1.8",
"oauth": "^0.9.15"
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"@gamestdio/clock": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@gamestdio/clock/-/clock-1.1.9.tgz",
"integrity": "sha1-d+wMAROR+7/ctPMhEkKVNv2GgMs="
},
"@gamestdio/signals": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@gamestdio/signals/-/signals-1.0.0.tgz",
"integrity": "sha512-EPWA3IkJ+xDT1K/xV53m5N4h/g4qzpf4NG6GustZLT1wp3T59YPonGQ9LLl3+YMNwSNj0yawX4wUpOnuQJ96Ug==",
"dev": true
},
"@gamestdio/state-listener": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@gamestdio/state-listener/-/state-listener-3.1.0.tgz",
"integrity": "sha512-FEKarKXEeXvCrzilFw9ANOxKkdtFfHXYqJNCaYEhTV+13x02o7HXDFetJAoQCAT9AVgiHUd3Ylo5mOukAegPoA==",
"dev": true
},
"@gamestdio/timer": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@gamestdio/timer/-/timer-1.3.1.tgz",
"integrity": "sha512-WEucGxBEYBaja/YCCGCAeHkPpkZYkybJ4BfLH0HMJ2+n8RKmpjeYbx0j2TevADkk5mJ7gO48hbE+hcL/y5V45g==",
"requires": {
"@gamestdio/clock": "^1.1.9"
}
},
"@gamestdio/websocket": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@gamestdio/websocket/-/websocket-0.3.2.tgz",
"integrity": "sha512-J3n5SKim+ZoLbe44hRGI/VYAwSMCeIJuBy+FfP6EZaujEpNchPRFcIsVQLWAwpU1bP2Ji63rC+rEUOd1vjUB6Q==",
"dev": true
},
"@types/node": {
"version": "12.7.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.9.tgz",
"integrity": "sha512-P57oKTJ/vYivL2BCfxCC5tQjlS8qW31pbOL6qt99Yrjm95YdHgNZwjrTTjMBh+C2/y6PXIX4oz253+jUzxKKfQ=="
},
"@types/redis": {
"version": "2.8.14",
"resolved": "https://registry.npmjs.org/@types/redis/-/redis-2.8.14.tgz",
"integrity": "sha512-255dzsOLJdXFHBio9/aMHGozNkoiBUgc+g2nlNjbTSp5qcAlmpm4Z6Xs3pKOBLNIKdZbA2BkUxWvYSIwKra0Yw==",
"requires": {
"@types/node": "*"
}
},
"@types/ws": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.3.tgz",
"integrity": "sha512-yBTM0P05Tx9iXGq00BbJPo37ox68R5vaGTXivs6RGh/BQ6QP5zqZDGWdAO6JbRE/iR1l80xeGAwCQS2nMV9S/w==",
"requires": {
"@types/node": "*"
}
},
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"requires": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
}
},
"agent-base": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
"integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
"requires": {
"es6-promisify": "^5.0.0"
}
},
"ajv": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"requires": {
"co": "^4.6.0",
"fast-deep-equal": "^1.0.0",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.3.0"
}
},
"apn": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/apn/-/apn-2.2.0.tgz",
"integrity": "sha512-YIypYzPVJA9wzNBLKZ/mq2l1IZX/2FadPvwmSv4ZeR0VH7xdNITQ6Pucgh0Uw6ZZKC+XwheaJ57DFZAhJ0FvPg==",
"requires": {
"debug": "^3.1.0",
"http2": "https://github.com/node-apn/node-http2/archive/apn-2.1.4.tar.gz",
"jsonwebtoken": "^8.1.0",
"node-forge": "^0.7.1",
"verror": "^1.10.0"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"asn1.js": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.2.0.tgz",
"integrity": "sha512-Q7hnYGGNYbcmGrCPulXfkEw7oW7qjWeM4ZTALmgpuIcZLxyqqKYWxCZg2UBm8bklrnB4m2mGyJPWfoktdORD8A==",
"requires": {
"bn.js": "^4.0.0",
"inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0"
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"async-limiter": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"requires": {
"tweetnacl": "^0.14.3"
}
},
"blessed": {
"version": "0.1.81",
"resolved": "https://registry.npmjs.org/blessed/-/blessed-0.1.81.tgz",
"integrity": "sha1-+WLWh+wsNpVwrnGvhDJW5tDKESk=",
"dev": true
},
"bluebird": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
},
"bn.js": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
},
"body-parser": {
"version": "1.19.0",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
"integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
"requires": {
"bytes": "3.1.0",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.2",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"on-finished": "~2.3.0",
"qs": "6.7.0",
"raw-body": "2.4.0",
"type-is": "~1.6.17"
}
},
"bson": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.1.1.tgz",
"integrity": "sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg=="
},
"buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
},
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
"dev": true
},
"bytes": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
"integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
},
"colyseus": {
"version": "0.11.15",
"resolved": "https://registry.npmjs.org/colyseus/-/colyseus-0.11.15.tgz",
"integrity": "sha512-BbO14ShtDR0jFAQ4i9Vg2kc3M5YR5XXzGxeTJfaX2Q+NULpB7mPeJaVQpZvx5D84NAv94jKt39PDBUBrSITEcQ==",
"requires": {
"@colyseus/schema": "^0.4.0",
"@gamestdio/timer": "^1.3.0",
"@types/redis": "^2.8.12",
"@types/ws": "^6.0.1",
"debug": "^4.0.1",
"fast-json-patch": "^2.0.5",
"fossil-delta": "^1.0.1",
"internal-ip": "^4.3.0",
"mongoose": "^5.6.9",
"nanoid": "^2.0.0",
"nonenumerable": "^1.0.1",
"notepack.io": "^2.2.0",
"redis": "^2.8.0",
"ws": "^7.1.0"
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"colyseus.js": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/colyseus.js/-/colyseus.js-0.11.2.tgz",
"integrity": "sha512-JvTDlPI74NYXlTIEoHSOSSf9QuyI3yrPGTA5sSAxIk+R2YJBskGTp6+Rn/pttf2wO2KRJYPC9Vtqi7IbhkNTew==",
"dev": true,
"requires": {
"@colyseus/schema": "^0.4.0",
"@gamestdio/signals": "^1.0.0",
"@gamestdio/state-listener": "^3.1.0",
"@gamestdio/websocket": "^0.3.2",
"fossil-delta": "^1.0.0",
"httpie": "^2.0.0-next.2",
"notepack.io": "^2.1.3",
"strong-events": "^1.0.5"
},
"dependencies": {
"httpie": {
"version": "2.0.0-next.2",
"resolved": "https://registry.npmjs.org/httpie/-/httpie-2.0.0-next.2.tgz",
"integrity": "sha512-QcYtyrn69p9VDy9SCNCDWAKmSz+wCHII4dc3fnHKA05ePiTeeltLvnnq+FyQPnsOrtpmLPd805FbmcXhtMljtA==",
"dev": true
}
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"content-disposition": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
"integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
"requires": {
"safe-buffer": "5.1.2"
}
},
"content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"cookie": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
"integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
},
"cookie-signature": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"default-gateway": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz",
"integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==",
"requires": {
"execa": "^1.0.0",
"ip-regex": "^2.1.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"destroy": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"diff": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
"dev": true
},
"double-ended-queue": {
"version": "2.1.0-0",
"resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
"integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=",
"optional": true
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"ecdsa-sig-formatter": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
},
"end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"requires": {
"once": "^1.4.0"
}
},
"es6-promise": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="
},
"es6-promisify": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
"integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
"requires": {
"es6-promise": "^4.0.3"
}
},
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
},
"execa": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
"requires": {
"cross-spawn": "^6.0.0",
"get-stream": "^4.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
}
},
"express": {
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
"integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
"requires": {
"accepts": "~1.3.7",
"array-flatten": "1.1.1",
"body-parser": "1.19.0",
"content-disposition": "0.5.3",
"content-type": "~1.0.4",
"cookie": "0.4.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "~1.1.2",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.3",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.5",
"qs": "6.7.0",
"range-parser": "~1.2.1",
"safe-buffer": "5.1.2",
"send": "0.17.1",
"serve-static": "1.14.1",
"setprototypeof": "1.1.1",
"statuses": "~1.5.0",
"type-is": "~1.6.18",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
}
},
"express-jwt": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/express-jwt/-/express-jwt-5.3.1.tgz",
"integrity": "sha512-1C9RNq0wMp/JvsH/qZMlg3SIPvKu14YkZ4YYv7gJQ1Vq+Dv8LH9tLKenS5vMNth45gTlEUGx+ycp9IHIlaHP/g==",
"requires": {
"async": "^1.5.0",
"express-unless": "^0.3.0",
"jsonwebtoken": "^8.1.0",
"lodash.set": "^4.0.0"
}
},
"express-unless": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/express-unless/-/express-unless-0.3.1.tgz",
"integrity": "sha1-JVfBRudb65A+LSR/m1ugFFJpbiA="
},
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"extsprintf": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.0.tgz",
"integrity": "sha1-4mifjzVvrWLMplo6kcXfX5VRaS8="
},
"fast-deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
},
"fast-json-patch": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz",
"integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==",
"requires": {
"fast-deep-equal": "^2.0.1"
},
"dependencies": {
"fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
}
}
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"finalhandler": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
"integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
"requires": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"on-finished": "~2.3.0",
"parseurl": "~1.3.3",
"statuses": "~1.5.0",
"unpipe": "~1.0.0"
}
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
}
},
"forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"fossil-delta": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/fossil-delta/-/fossil-delta-1.0.2.tgz",
"integrity": "sha512-fkgQUnBaJjhDq0DN1ajBlWWRH99NQgwVoReMEr0oXLqYXAx8X9mD5gGaoTYDdVVbLJYsMNrnkJ028Ld0UgWrGA=="
},
"fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"requires": {
"pump": "^3.0.0"
}
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
"requires": {
"ajv": "^5.1.0",
"har-schema": "^2.0.0"
}
},
"http-errors": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
"integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
"setprototypeof": "1.1.1",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
}
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
"http2": {
"version": "https://github.com/node-apn/node-http2/archive/apn-2.1.4.tar.gz",
"integrity": "sha512-ad4u4I88X9AcUgxCRW3RLnbh7xHWQ1f5HbrXa7gEy2x4Xgq+rq+auGx5I+nUDE2YYuqteGIlbxrwQXkIaYTfnQ=="
},
"http_ece": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/http_ece/-/http_ece-1.1.0.tgz",
"integrity": "sha512-bptAfCDdPJxOs5zYSe7Y3lpr772s1G346R4Td5LgRUeCwIGpCGDUTJxRrhTNcAXbx37spge0kWEIH7QAYWNTlA==",
"requires": {
"urlsafe-base64": "~1.0.0"
}
},
"httpie": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/httpie/-/httpie-1.1.2.tgz",
"integrity": "sha512-VQ82oXG95oY1fQw/XecHuvcFBA+lZQ9Vwj1RfLcO8a7HpDd4cc2ukwpJt+TUlFaLUAzZErylxWu6wclJ1rUhUQ=="
},
"https-proxy-agent": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz",
"integrity": "sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg==",
"requires": {
"agent-base": "^4.3.0",
"debug": "^3.1.0"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"internal-ip": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz",
"integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==",
"requires": {
"default-gateway": "^4.2.0",
"ipaddr.js": "^1.9.0"
}
},
"ip-regex": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
"integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk="
},
"ipaddr.js": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsonwebtoken": {
"version": "8.5.1",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
"integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
"requires": {
"jws": "^3.2.2",
"lodash.includes": "^4.3.0",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
"lodash.isnumber": "^3.0.3",
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.once": "^4.0.0",
"ms": "^2.1.1",
"semver": "^5.6.0"
},
"dependencies": {
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
},
"dependencies": {
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
}
}
},
"jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"requires": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"requires": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"kareem": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz",
"integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw=="
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
"integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8="
},
"lodash.isboolean": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
"integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY="
},
"lodash.isinteger": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
"integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M="
},
"lodash.isnumber": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
"integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w="
},
"lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
},
"lodash.isstring": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
"integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
},
"lodash.once": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
},
"lodash.set": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz",
"integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM="
},
"make-error": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
"integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==",
"dev": true
},
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
},
"methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
},
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
},
"mime-db": {
"version": "1.40.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
"integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA=="
},
"mime-types": {
"version": "2.1.24",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
"integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
"requires": {
"mime-db": "1.40.0"
}
},
"minimalistic-assert": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
},
"dependencies": {
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
}
}
},
"mongodb": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.2.tgz",
"integrity": "sha512-fqJt3iywelk4yKu/lfwQg163Bjpo5zDKhXiohycvon4iQHbrfflSAz9AIlRE6496Pm/dQKQK5bMigdVo2s6gBg==",
"requires": {
"bson": "^1.1.1",
"require_optional": "^1.0.1",
"safe-buffer": "^5.1.2"
}
},
"mongoose": {
"version": "5.7.3",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.7.3.tgz",
"integrity": "sha512-CKCCCAhFnJRtmdmver8Ud9/NZ9m7D2H/xLgmrcL6cb9D4nril/idL8lsWWpBsJI81AOCVsktiZJ4X4vfo2S0fw==",
"requires": {
"bson": "~1.1.1",
"kareem": "2.3.1",
"mongodb": "3.3.2",
"mongoose-legacy-pluralize": "1.0.2",
"mpath": "0.6.0",
"mquery": "3.2.2",
"ms": "2.1.2",
"regexp-clone": "1.0.0",
"safe-buffer": "5.1.2",
"sift": "7.0.1",
"sliced": "1.0.1"
},
"dependencies": {
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"mongoose-legacy-pluralize": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz",
"integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ=="
},
"mpath": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.6.0.tgz",
"integrity": "sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw=="
},
"mquery": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz",
"integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==",
"requires": {
"bluebird": "3.5.1",
"debug": "3.1.0",
"regexp-clone": "^1.0.0",
"safe-buffer": "5.1.2",
"sliced": "1.0.1"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
}
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"nanoid": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.2.tgz",
"integrity": "sha512-q0iKJHcLc9rZg/qtJ/ioG5s6/5357bqvkYCpqXJxpcyfK7L5us8+uJllZosqPWou7l6E1lY2Qqoq5ce+AMbFuQ=="
},
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
},
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
},
"node-adm": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/node-adm/-/node-adm-0.9.1.tgz",
"integrity": "sha1-+ManL/rbGn39ZjcQLJUKmpSW6EI="
},
"node-forge": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz",
"integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw=="
},
"node-gcm": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/node-gcm/-/node-gcm-1.0.2.tgz",
"integrity": "sha512-NEVb5jB06I/e9ZfJGWhHsRhJQLk1zO5iZjbQJ7su8j9vhHrpxc7KJHyBxWbv28+4uWFZ0AfTVHoMIyRpEVISUQ==",
"requires": {
"debug": "^3.1.0",
"lodash": "^4.17.10",
"request": "2.87.0"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"node-pushnotifications": {
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/node-pushnotifications/-/node-pushnotifications-1.1.12.tgz",
"integrity": "sha512-HP2xaciO4lVAPgOXZ7uj0QMQD6SMUW/g1rnfY0fQwbF6ohjnv1BDgRe07Uw5zyiX4i/AnAS2+vywMWbOWB8xKQ==",
"requires": {
"apn": "2.2.0",
"node-adm": "0.9.1",
"node-gcm": "1.0.2",
"ramda": "0.26.1",
"web-push": "3.3.5",
"wns": "0.5.4"
}
},
"nonenumerable": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/nonenumerable/-/nonenumerable-1.1.1.tgz",
"integrity": "sha512-ptUD9w9D8WqW6fuJJkZNCImkf+0vdbgUTbRK3i7jsy3olqtH96hYE6Q/S3Tx9NWbcB/ocAjYshXCAUP0lZ9B4Q=="
},
"notepack.io": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/notepack.io/-/notepack.io-2.2.0.tgz",
"integrity": "sha512-9b5w3t5VSH6ZPosoYnyDONnUTF8o0UkBw7JLA6eBlYJWyGT1Q3vQa8Hmuj1/X6RYvHjjygBDgw6fJhe0JEojfw=="
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"requires": {
"path-key": "^2.0.0"
}
},
"oauth": {
"version": "0.9.15",
"resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
"integrity": "sha1-vR/vr2hslrdUda7VGWQS/2DPucE="
},
"oauth-sign": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
"integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
"requires": {
"ee-first": "1.1.1"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
},
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
},
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"proxy-addr": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
"integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
"requires": {
"forwarded": "~0.1.2",
"ipaddr.js": "1.9.0"
}
},
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
},
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
},
"ramda": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.26.1.tgz",
"integrity": "sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ=="
},
"range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
},
"raw-body": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
"integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
"requires": {
"bytes": "3.1.0",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
}
},
"redis": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz",
"integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==",
"optional": true,
"requires": {
"double-ended-queue": "^2.1.0-0",
"redis-commands": "^1.2.0",
"redis-parser": "^2.6.0"
}
},
"redis-commands": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz",
"integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg==",
"optional": true
},
"redis-parser": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz",
"integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=",
"optional": true
},
"regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
"integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
},
"request": {
"version": "2.87.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz",
"integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.6.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.5",
"extend": "~3.0.1",
"forever-agent": "~0.6.1",
"form-data": "~2.3.1",
"har-validator": "~5.0.3",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.17",
"oauth-sign": "~0.8.2",
"performance-now": "^2.1.0",
"qs": "~6.5.1",
"safe-buffer": "^5.1.1",
"tough-cookie": "~2.3.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.1.0"
},
"dependencies": {
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
}
}
},
"require_optional": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz",
"integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==",
"requires": {
"resolve-from": "^2.0.0",
"semver": "^5.1.0"
}
},
"resolve-from": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
},
"send": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
"integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
"requires": {
"debug": "2.6.9",
"depd": "~1.1.2",
"destroy": "~1.0.4",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "0.5.2",
"http-errors": "~1.7.2",
"mime": "1.6.0",
"ms": "2.1.1",
"on-finished": "~2.3.0",
"range-parser": "~1.2.1",
"statuses": "~1.5.0"
},
"dependencies": {
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"serve-static": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
"integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
"requires": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
"send": "0.17.1"
}
},
"setprototypeof": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
},
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
"sift": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz",
"integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g=="
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"sliced": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"source-map-support": {
"version": "0.5.13",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
}
},
"sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
},
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"strong-events": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/strong-events/-/strong-events-1.0.7.tgz",
"integrity": "sha512-zKYPfTtLaZiwDoDiGkNQdurbGhzVS7oE23AmHOnA6rUp4E7FeF7Z6xbHQEqSRqNyaTN+X3rcppfobypf0k3Ltg==",
"dev": true
},
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"tough-cookie": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
"requires": {
"punycode": "^1.4.1"
}
},
"ts-node": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz",
"integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==",
"dev": true,
"requires": {
"arrify": "^1.0.0",
"buffer-from": "^1.1.0",
"diff": "^3.1.0",
"make-error": "^1.1.1",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"source-map-support": "^0.5.6",
"yn": "^2.0.0"
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"requires": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
}
},
"typescript": {
"version": "3.6.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.3.tgz",
"integrity": "sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw==",
"dev": true
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
"urlsafe-base64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/urlsafe-base64/-/urlsafe-base64-1.0.0.tgz",
"integrity": "sha1-I/iQaabGL0bPOh07ABac77kL4MY="
},
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"uuid": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
},
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"web-push": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/web-push/-/web-push-3.3.5.tgz",
"integrity": "sha512-sukVBk0chRCL4n+Xwurl2TlD4/JmezNv4L2nwlTZx4KwMeUPfmD9TdGl6A6taayNgjObYzp0k0gubAcQCp7TMg==",
"requires": {
"asn1.js": "^5.0.0",
"http_ece": "1.1.0",
"https-proxy-agent": "^2.2.1",
"jws": "^3.1.3",
"minimist": "^1.2.0",
"urlsafe-base64": "^1.0.0"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
},
"wns": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/wns/-/wns-0.5.4.tgz",
"integrity": "sha512-WYiJ7khIwUGBD5KAm+YYmwJDDRzFRs4YGAjtbFSoRIdbn9Jcix3p9khJmpvBTXGommaKkvduAn+pc9l4d9yzVQ=="
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.1.2.tgz",
"integrity": "sha512-gftXq3XI81cJCgkUiAVixA0raD9IVmXqsylCrjRygw4+UOOGzPoxnQ6r/CnVL9i+mDncJo94tSkyrtuuQVBmrg==",
"requires": {
"async-limiter": "^1.0.0"
}
},
"yn": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",
"integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=",
"dev": true
}
}
}
{
"name": "my-app",
"version": "1.0.0",
"description": "npm init template for bootstraping an empty Colyseus project",
"main": "index.js",
"scripts": {
"start": "node index.js",
"loadtest": "colyseus-loadtest loadtest/example.js --room my_room --numClients 2",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "UNLICENSED",
"bugs": {
"url": "https://github.com/colyseus/create-colyseus/issues"
},
"homepage": "https://github.com/colyseus/create-colyseus#readme",
"devDependencies": {
"@colyseus/loadtest": "^0.11.0"
},
"dependencies": {
"@colyseus/monitor": "^0.11.0",
"@colyseus/social": "^0.10.2",
"colyseus": "^0.11.0",
"cors": "^2.8.5",
"express": "^4.16.4",
"express-jwt": "^5.3.1"
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Live Gaze Analyser</title>
<link rel="stylesheet" href="resources/css/default.css">
</head>
<body>
<div id="startScreen">
<div id="startTitle">Live Gaze Analyser</div>
<div id="startMenu">
<h1>Options</h1>
<span class="option">
<input type="checkbox" id="useMouseInput" name="useMouseInput">
<label for="useMouseInput">Use mouse input</label>
</span>
<span class="option">
<input type="checkbox" id="isObserver" name="isObserver">
<label for="isObserver">Observer mode</label>
</span>
<span class="option">
<label for="viewerServerUrl">Server</label>
<input type="url" id="viewerServerUrl" name="viewerServerUrl" value="ws://localhost:2568">
</span>
</div>
<div class="startButton">Start</div>
</div>
<div id="stage" class="hidden">
<canvas class="background"></canvas>
<canvas class="gaze"></canvas>
<div id="task">
<div class="task-description"></div>
<div class="task-source"></div>
</div>
</div>
<script type="application/javascript" src="vendors/gazeclient.js"></script>
<script type="application/javascript" src="vendors/colyseus.js"></script>
<script type="module" src="resources/js/index.js"></script>
</body>
</html>
\ No newline at end of file
/* colors: https://lospec.com/palette-list/spf-80 */
@font-face {
font-family: "ShareTech";
src: url("../fonts/ShareTechMono/ShareTechMono-Regular.ttf");
}
.hidden {
display: none;
}
body {
margin: 0;
padding: 0;
font-family: "ShareTech";
background: rgb(0, 0, 0);
}
canvas {
position: fixed;
top: 0;
left: 0;
cursor: none;
}
#task {
position: fixed;
bottom: 0;
left: 0;
width: 98%;
margin: 0;
padding: 1%;
background-color: rgba(30, 30, 30, 0.5);
}
#task .task-description {
width: 100%;
margin: 0;
padding: 0;
text-align: left;
font-size: 2em;
color: #FFF;
}
#task .task-source {
width: 100%;
margin: 0;
padding: 0;
text-align: right;
font-size: 1em;
color: #FFF;
}
#startScreen {
width: 60vw;
height: 100vh;
margin: 0 auto;
background: rgb(0, 0, 0);
}
#startTitle {
width: 60vw;
height: 10vh;
margin: 0 auto;
padding-top: 10vh;
text-align: center;
line-height: 10vh;
font-size: 5vh;
color: #FFF;
text-shadow: 5px 5px 5px #611894;
}
.startButton {
display: block;
width: 20vw;
height: 5vh;
margin: 0 auto;
border-radius: 5px;
border-width: 5px;
border-style: solid;
background-color: #3f0d76;
border-color: #d2ccf3;
text-align: center;
line-height: 5vh;
font-size: 2.5vh;
color: #FFF;
}
.startButton:hover {
cursor: pointer;
background-color: #d2ccf3;
border-color: #3f0d76;
color: #3f0d76;
}
#startMenu {
width: 30vw;
margin: 5vh auto;
color: #FFF;
}
#startMenu h1 {
text-align: center;
padding-bottom: 1vh;
border-style: solid;
border-width: 0 0 1px 0;
text-shadow: 3px 3px 3px #611894;
}
#startMenu .option {
display: block;
margin-top: 2vh;
}
#startMenu input[type="checkbox"] {
display: none;
}
#startMenu input[type="checkbox"]+label::before {
width: 3vh;
height: 3vh;
border-radius: 5px;
border: 0.25vh solid #a2bcc5;
background-color: #fff;
display: block;
content: "";
float: left;
margin-right: 5px;
color: #3f0d76;
}
#startMenu input[type="checkbox"]+label:hover {
cursor: pointer;
}
#startMenu label {
margin-left: 0.5vw;
line-height: 3.5vh;
font-size: 2.5vh;
}
#startMenu input[type="checkbox"]:checked+label::before {
content: "\2A2F";
text-align: center;
line-height: 3vh;
font-size: 3vh;
}
\ No newline at end of file
Copyright (c) 2012, Carrois Type Design, Ralph du Carrois (post@carrois.com www.carrois.com), with Reserved Font Name 'Share'
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
/* eslint-env browser */
/* global Colyseus */
import Logger from "../utils/Logger.js";
import Observable from "../utils/Observable.js";
const DEFAULT_GAME_ROOM = "image_viewer";
class NetClient extends Observable {
constructor(url) {
super();
this.url = url;
}
connect(asObserver) {
this.isObserver = asObserver;
this.client = new Colyseus.Client(this.url);
this.client.joinOrCreate(DEFAULT_GAME_ROOM).then(this.onConnect.bind(this))
.catch(this.onError.bind(this));
}
sendGazeData(gazeData) {
if (this.room === undefined) {
return;
}
this.room.send({
type: "gaze",
data: gazeData,
});
}
onConnect(room) {
Logger.log(`Viewer ${room.sessionId} joined ${room.name}`, "NetClient");
this.room = room;
this.room.onStateChange(this.onUpdate.bind(this));
this.room.onMessage(this.onMessage.bind(this));
this.room.onError(this.onError.bind(this));
this.room.onLeave(this.onLeave.bind(this));
if (this.isObserver === true) {
this.room.send({
type: "subscribeToGazeData",
});
}
this.notifyAll({
type: "connect",
ownID: this.room.sessionId,
});
}
onUpdate(state) {
this.notifyAll({
type: "stateupdate",
state: state,
});
}
onMessage(message) {
Logger.log("Received new message from server", "NetClient");
if (message.type === "gazelist") {
this.notifyAll({
type: "gazeupdate",
gazepoints: message.data,
});
}
}
onError(error) {
Logger.log(error, "NetClient");
}
onLeave() {
Logger.log("Local client left room", "NetClient");
}
}
export default NetClient;
\ No newline at end of file
import GazeDataProvider from "./GazeDataProvider.js";
import Event from "../utils/Event.js";
import GazePoint from "./GazePoint.js";
class FakeGazeDataProvider extends GazeDataProvider {
constructor() {
super();
}
start() {
window.addEventListener("mousemove", this.onMouseDataAvailable.bind(this));
}
onMouseDataAvailable(event) {
let gazeEvent = new Event("dataavailable", new GazePoint(event.screenX,
event.screenY));
this.notifyAll(gazeEvent);
}
}
export default FakeGazeDataProvider;
\ No newline at end of file
/* global GazeClient */
import Observable from "../utils/Observable.js";
import Event from "../utils/Event.js";
import Logger from "../utils/Logger.js";
import GazePoint from "../gaze/GazePoint.js";
class GazeDataProvider extends Observable {
constructor() {
super();
}
start(url) {
this.gclient = new GazeClient();
this.gclient.connect(url);
this.gclient.addEventListener("connectionopened", this.onConnected.bind(this));
this.gclient.addEventListener("dataavailable", this.onGazeDataAvailable.bind(
this));
this.gclient.addEventListener("connectionclosed", this.onDisconnected.bind(this));
}
onConnected(event) {
Logger.log(event);
}
onGazeDataAvailable(event) {
let eyeX = (event.data.leftEyeX + event.data.rightEyeX) / 2,
eyeY = (event.data.leftEyeY + event.data.rightEyeY) / 2,
gazeEvent = new Event("dataavailable", new GazePoint(eyeX, eyeY));
this.notifyAll(gazeEvent);
}
onDisconnected(event) {
Logger.log(event);
}
}
export default GazeDataProvider;
\ No newline at end of file
class GazePoint {
constructor(screenX, screenY) {
this.screenX = screenX;
this.screenY = screenY;
this.createdAt = Date.now();
this.id = this.createdAt;
}
linkTo(node) {
let bb = node.getBoundingClientRect(),
// Difference between height of browser window (including menus and decoration) and actual viewport height
yOffSet = window.outerHeight - window.innerHeight,
elementLeft = window.screenX + bb.left,
elementTop = window.screenY + bb.top + yOffSet,
elementRight = window.screenX + bb.right,
elementBottom = window.screenY + bb.bottom + yOffSet,
coordinates;
if (this.screenX >= elementLeft && this.screenX <= elementRight && this
.screenY >=
elementTop && this.screenY <= elementBottom) {
this.hasLink = true;
this.link = node;
this.targetX = this.screenX - elementLeft;
this.targetY = this.screenY - elementTop;
}
return coordinates;
}
}
export default GazePoint;
\ No newline at end of file
/* eslint-env browser */
import Logger from "./utils/Logger.js";
import ImageViewer from "./viewer/ImageViewer.js";
import NetClient from "./com/NetClient.js";
import FakeGazeDataProvider from "./gaze/FakeGazeDataProvider.js";
import GazeDataProvider from "./gaze/GazeDataProvider.js";
const GAZE_SERVER_URL = "ws://localhost:8001/gaze",
VIEWER_SERVER_URL = "ws://localhost:2568";
var starScreen = document.querySelector("#startScreen"),
stage = document.querySelector("#stage"),
viewerServerUrl = VIEWER_SERVER_URL,
useMouseInput = false,
isObserver = false,
imageViewer;
function init() {
document.querySelector(".startButton").addEventListener("click", initViewer);
}
function loadOptions() {
useMouseInput = document.querySelector("#useMouseInput").checked;
isObserver = document.querySelector("#isObserver").checked;
viewerServerUrl = document.querySelector("#viewerServerUrl").value;
}
function initViewer() {
let netClient, dataProvider;
loadOptions();
netClient = new NetClient(viewerServerUrl);
dataProvider = getDataProvider();
imageViewer = new ImageViewer(dataProvider, netClient, stage, isObserver);
stage.requestFullscreen().then(startViewer);
}
function startViewer() {
starScreen.classList.add("hidden");
stage.classList.remove("hidden");
}
function getDataProvider() {
let provider;
if (useMouseInput === true) {
provider = new FakeGazeDataProvider();
} else {
provider = new GazeDataProvider();
}
provider.start(GAZE_SERVER_URL);
return provider;
}
init();
\ No newline at end of file
class Event {
constructor(type, data) {
this.type = type;
this.data = data;
}
}
export default Event;
\ No newline at end of file
/* eslint-env browser */
/* eslint-disable no-console */
class Logger {
constructor() {
this.enabled = false;
}
enable() {
this.enabled = true;
}
disable() {
this.enabled = false;
}
log(msg, label) {
let time = new Date(),
hours = time.getUTCHours(),
minutes = time.getUTCMinutes(),
seconds = time.getUTCSeconds();
if (hours < 10) {
hours = "0" + hours;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
if (this.enabled === false) {
return;
}
console.log(`[${label}]\t${hours}:${minutes}:${seconds} - ${msg}`);
}
}
let log = new Logger();
export default log;
\ No newline at end of file
class Observable {
constructor() {
this.listeners = {};
}
addEventListener(type, callback) {
if (this.listeners[type] === undefined) {
this.listeners[type] = [];
}
this.listeners[type].push(callback);
}
notifyAll(event) {
let listeners = this.listeners[event.type];
if (listeners) {
for (let i = 0; i < listeners.length; i++) {
listeners[i](event);
}
}
}
}
export default Observable;
\ No newline at end of file
var Time = {
ONE_SECOND_IN_MS: 1000,
};
Object.freeze(Time);
export default Time;
\ No newline at end of file
/* eslint-env browser */
import Renderer from "./Renderer.js";
const FRAME_RATE = 60,
MAX_GAZE_POINT_AGE = 500;
var gazePoints = [],
observedGazePoints = [];
class ImageViewer {
constructor(dataProvider, netClient, stage, isObserver) {
this.observerMode = isObserver;
this.initNetClient(netClient, isObserver);
if(this.observerMode === false) {
this.initDataProvider(dataProvider);
} else {
this.netClient.addEventListener("gazeupdate", this.onGazePointsAvailable);
}
setInterval(this.onTick.bind(this), 1000 / FRAME_RATE);
this.initStage(stage);
}
initNetClient(netClient, isObserver) {
this.netClient = netClient;
this.netClient.addEventListener("stateupdate", this.onStateUpdate.bind(
this));
this.netClient.connect(isObserver);
}
initDataProvider(dataProvider) {
this.dataProvider = dataProvider;
this.dataProvider.addEventListener("dataavailable", this.onInputDataAvailable
.bind(this));
}
initStage(stage) {
this.stage = stage;
this.backgroundCanvas = this.stage.querySelector(".background");
this.gazeCanvas = this.stage.querySelector(".gaze");
this.stage.style.width = this.backgroundCanvas.style.width = this.gazeCanvas
.style.width = `${screen.width}px`;
this.stage.style.height = this.backgroundCanvas.style.height = this.gazeCanvas
.style.height = `${screen.height}px`;
this.backgroundCanvas.width = this.gazeCanvas.width = screen.width;
this.backgroundCanvas.height = this.gazeCanvas.height = screen.height;
this.backgroundContext = this.backgroundCanvas.getContext("2d", { alpha: false });
this.gazeContext = this.gazeCanvas.getContext("2d", { alpha: true });
Renderer.setContext(this.gazeContext);
}
initTask(task) {
this.setTaskImage(task.imageUrl);
this.setTaskData(task.taskDescription, task.taskSource);
}
setTaskImage(imageUrl) {
let that = this,
image = new Image();
image.src = imageUrl;
image.onload = function() {
that.backgroundContext.drawImage(image, 0, 0);
};
}
setTaskData(description, source) {
this.stage.querySelector(".task-description").innerHTML = description;
this.stage.querySelector(".task-source").innerHTML = source;
}
onTick() {
let now = Date.now();
if(this.observerMode === false) {
this.updateGazePoints(now);
Renderer.drawGazePoints(gazePoints);
} else {
Renderer.drawGazePoints(observedGazePoints);
}
}
updateGazePoints(now) {
for (let i = gazePoints.length - 1; i >= 0; i--) {
let age = now - gazePoints[i].createdAt;
if (age > MAX_GAZE_POINT_AGE) {
gazePoints.splice(i, 1);
} else {
gazePoints[i].relativeAge = age / MAX_GAZE_POINT_AGE;
}
}
}
onInputDataAvailable(event) {
gazePoints.push(event.data);
this.netClient.sendGazeData(event.data);
}
onStateUpdate(event) {
this.initTask(event.state.task);
}
onGazePointsAvailable(event) {
observedGazePoints = event.gazepoints;
}
}
export default ImageViewer;
\ No newline at end of file
/* eslint-env browser */
const GAZE_POINT_RADIUS = 15,
GAZE_POINT_COLOR = "#4cd494";
var context;
class Renderer {
static setContext(_context) {
context = _context;
}
static drawGazePoints(gazePoints) {
context.clearRect(0, 0, screen.width, screen.height);
context.fillStyle = GAZE_POINT_COLOR;
for (let i = 0; i < gazePoints.length; i++) {
Renderer.drawSingleGazePoint(gazePoints[i]);
}
}
static drawSingleGazePoint(gazePoint) {
let inversedAge = 1 - gazePoint.relativeAge,
radius = inversedAge * GAZE_POINT_RADIUS;
context.save();
context.globalAlpha = inversedAge;
context.globalAlpha = 1;
context.beginPath();
context.ellipse(gazePoint.screenX, gazePoint.screenY, radius, radius,
Math.PI /
4, 0, 2 * Math.PI);
context.closePath();
context.fill();
context.restore();
}
}
export default Renderer;
\ No newline at end of file
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Colyseus=t():e.Colyseus=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}([function(e,t,n){"use strict";function r(e,t,n,r){var i,o=!1;switch(t){case"number":case"int8":case"uint8":case"int16":case"uint16":case"int32":case"uint32":case"int64":case"uint64":case"float32":case"float64":i="number",isNaN(e)&&console.log('trying to encode "NaN" in '+n.constructor.name+"#"+r);break;case"string":i="string",o=!0;break;case"boolean":return}if(typeof e!==i&&(!o||o&&null!==e)){var s="'"+JSON.stringify(e)+"'"+(e&&e.constructor&&" ("+e.constructor.name+")");throw new d("a '"+i+"' was expected, but "+s+" was provided in "+n.constructor.name+"#"+r)}}function i(e,t,n,r){if(!(e instanceof t))throw new d("a '"+t.name+"' was expected, but '"+e.constructor.name+"' was provided in "+n.constructor.name+"#"+r)}function o(e,t,n,i,o){var s=u[e];return void 0===n?t.push(c.NIL):r(n,e,i,o),!!s&&(s(t,n),!0)}function s(e,t,n){var r=h[e];return r?r(t,n):null}var a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var c=n(10),u=n(31),h=n(32),f=n(1),l=n(2),p=n(11),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(Error),v=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];Object.defineProperties(this,{$changes:{value:new p.ChangeTree,enumerable:!1,writable:!0}});var n=this._descriptors;n&&Object.defineProperties(this,n)}return e.onError=function(e){console.error(e)},Object.defineProperty(e.prototype,"_schema",{get:function(){return this.constructor._schema},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_descriptors",{get:function(){return this.constructor._descriptors},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_indexes",{get:function(){return this.constructor._indexes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_filters",{get:function(){return this.constructor._filters},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$changed",{get:function(){return this.$changes.changed},enumerable:!0,configurable:!0}),e.prototype.decode=function(t,n){void 0===n&&(n={offset:0});var r=[],i=this._schema,o=this._indexes,a={};Object.keys(o).forEach(function(e){var t=o[e];a[t]=e});var u=t.length;t[n.offset]===c.TYPE_ID&&(n.offset+=2);for(var p=this;n.offset<u;){if("break"===function(){var o=t[n.offset++];if(o===c.END_OF_STRUCTURE)return"break";var u=a[o],d=i[u],v=void 0,y=void 0,g=!1;if(d._schema)h.nilCheck(t,n)?(n.offset++,v=null):(v=p["_"+u]||p.createTypeInstance(t,n,d),v.decode(t,n)),g=!0;else if(Array.isArray(d)){d=d[0],y=[];var _=p["_"+u]||new f.ArraySchema;v=_.clone();var b=h.number(t,n),w=Math.min(h.number(t,n),b);g=w>0;var m=!1;v.length>b&&Array.prototype.splice.call(v,b).forEach(function(t,n){if(t&&t.onRemove)try{t.onRemove()}catch(t){e.onError(t)}if(_.onRemove)try{_.onRemove(t,b+n)}catch(t){e.onError(t)}});for(var C=0;C<w;C++){var O=h.number(t,n),S=void 0;h.indexChangeCheck(t,n)&&(h.uint8(t,n),S=h.number(t,n),m=!0);var A=!m&&void 0===v[O]||m&&void 0===S;if(d.prototype instanceof e){var k=void 0;if(k=A?p.createTypeInstance(t,n,d):void 0!==S?_[S]:_[O],k||(k=p.createTypeInstance(t,n,d),A=!0),h.nilCheck(t,n)){if(n.offset++,_.onRemove)try{_.onRemove(k,O)}catch(t){e.onError(t)}continue}k.decode(t,n),v[O]=k}else v[O]=s(d,t,n);if(A){if(_.onAdd)try{_.onAdd(v[O],O)}catch(t){e.onError(t)}}else if(_.onChange)try{_.onChange(v[O],O)}catch(t){e.onError(t)}y.push(v[O])}}else if(d.map){d=d.map;var I=p["_"+u]||new l.MapSchema;v=I.clone();var E=h.number(t,n);g=E>0;for(var m=!1,P=Object.keys(I),C=0;C<E&&(void 0!==t[n.offset]&&t[n.offset]!==c.END_OF_STRUCTURE);C++){var x=void 0;h.indexChangeCheck(t,n)&&(h.uint8(t,n),x=P[h.number(t,n)],m=!0);var M=h.numberCheck(t,n),R="string"!=typeof d,j=M?P[h.number(t,n)]:h.string(t,n),k=void 0,A=!m&&void 0===I[j]||m&&void 0===x&&M;if(k=A&&R?p.createTypeInstance(t,n,d):void 0!==x?I[x]:I[j],h.nilCheck(t,n)){if(n.offset++,k&&k.onRemove)try{k.onRemove()}catch(t){e.onError(t)}if(I.onRemove)try{I.onRemove(k,j)}catch(t){e.onError(t)}delete v[j]}else if(R?(k.decode(t,n),v[j]=k):v[j]=s(d,t,n),A){if(I.onAdd)try{I.onAdd(v[j],j)}catch(t){e.onError(t)}}else if(I.onChange)try{I.onChange(v[j],j)}catch(t){e.onError(t)}}}else v=s(d,t,n),g=!0;g&&p.onChange&&r.push({field:u,value:y||v,previousValue:p["_"+u]}),p["_"+u]=v}())break}if(this.onChange&&r.length>0)try{this.onChange(r)}catch(t){e.onError(t)}return this},e.prototype.encode=function(e,t,n){var r=this;void 0===e&&(e=this),void 0===t&&(t=!1);var s=[],a=function(){r!==e&&s.push(c.END_OF_STRUCTURE)};if(!this.$changes.changed&&!t)return a(),s;for(var h=this._schema,p=this._indexes,d=this._filters,v=t||n?this.$changes.allChanges:this.$changes.changes,y=this,g=0,_=v.length;g<_;g++)!function(a,g){var _=v[a],b=h[_],w=d&&d[_],m=y["_"+_],C=p[_];if(void 0===m)return"continue";var O=[];if(b._schema){if(n&&w&&!w.call(y,n,m,e))return"continue";u.number(O,C),m?(i(m,b,y,_),y.tryEncodeTypeId(O,b,m.constructor),O=O.concat(m.encode(e,t,n))):u.uint8(O,c.NIL)}else if(Array.isArray(b)){u.number(O,C),u.number(O,m.length);var S=(t||n?m.$changes.allChanges:m.$changes.changes).filter(function(e){return void 0!==r["_"+_][e]}).sort(function(e,t){return e-t}),A=S.length;u.number(O,A);var k="string"!=typeof b[0];i(y["_"+_],f.ArraySchema,y,_);for(var I=0;I<A;I++){var E=S[I],P=y["_"+_][E];if(!n||!w||w.call(y,n,P,e))if(k){if(u.number(O,E),!t){var x=m.$changes.getIndexChange(P);void 0!==x&&(u.uint8(O,c.INDEX_CHANGE),u.number(O,x))}i(P,b[0],y,_),y.tryEncodeTypeId(O,b[0],P.constructor),O=O.concat(P.encode(e,t,n))}else if(u.number(O,E),!o(b[0],O,P,y,_)){console.log("cannot encode",h[_]);continue}}t||m.$changes.discard()}else if(b.map){u.number(O,C);var M=t||n?m.$changes.allChanges:m.$changes.changes;u.number(O,M.length);var R=Object.keys(y["_"+_]),k="string"!=typeof b.map;i(y["_"+_],l.MapSchema,y,_);for(var j=0;j<M.length;j++){var T="number"==typeof M[j]&&R[M[j]]||M[j],P=y["_"+_][T],N=void 0;if(!n||!w||w.call(y,n,P,e)){if(t){if(void 0===P)continue}else{var x=m.$changes.getIndexChange(P);P&&void 0!==x&&(u.uint8(O,c.INDEX_CHANGE),u.number(O,y["_"+_]._indexes.get(x))),N=y["_"+_]._indexes.get(T)}void 0!==N?u.number(O,N):u.string(O,T),P&&k?(i(P,b.map,y,_),y.tryEncodeTypeId(O,b.map,P.constructor),O=O.concat(P.encode(e,t,n))):void 0!==P?o(b.map,O,P,y,_):u.uint8(O,c.NIL)}}t||(m.$changes.discard(),n||y["_"+_]._updateIndexes())}else{if(n&&w&&!w.call(y,n,m,e))return"continue";if(u.number(O,C),!o(b,O,m,y,_))return console.log("cannot encode",h[_]),"continue"}s=s.concat(O)}(g);return a(),t||n||this.$changes.discard(),s},e.prototype.encodeFiltered=function(e){return this.encode(this,!1,e)},e.prototype.encodeAll=function(){return this.encode(this,!0)},e.prototype.encodeAllFiltered=function(e){return this.encode(this,!0,e)},e.prototype.clone=function(){var e=new this.constructor,t=this._schema;for(var n in t)e[n]=this[n];return e},e.prototype.triggerAll=function(){if(this.onChange){var t=[],n=this._schema;for(var r in n)void 0!==this[r]&&t.push({field:r,value:this[r],previousValue:void 0});try{this.onChange(t)}catch(t){e.onError(t)}}},e.prototype.toJSON=function(){var e=this._schema,t={};for(var n in e)void 0!==this[n]&&(t[n]="function"==typeof this[n].toJSON?this[n].toJSON():this["_"+n]);return t},e.prototype.tryEncodeTypeId=function(e,t,n){t._typeid!==n._typeid&&(u.uint8(e,c.TYPE_ID),u.uint8(e,n._typeid))},e.prototype.createTypeInstance=function(e,t,n){if(e[t.offset]===c.TYPE_ID){t.offset++;return new(this.constructor._context.get(h.uint8(e,t)))}return new n},e}();t.Schema=v},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,Object.create(t.prototype)),Object.defineProperties(i,{$sorting:{value:void 0,enumerable:!1,writable:!0},$changes:{value:void 0,enumerable:!1,writable:!0},onAdd:{value:void 0,enumerable:!1,writable:!0},onRemove:{value:void 0,enumerable:!1,writable:!0},onChange:{value:void 0,enumerable:!1,writable:!0},triggerAll:{value:function(){if(i.onAdd)for(var e=0;e<i.length;e++)i.onAdd(i[e],e)}},toJSON:{value:function(){for(var e=[],t=0;t<i.length;t++){var n=i[t];e.push("function"==typeof n.toJSON?n.toJSON():n)}return e}},clone:{value:function(){var e=new(t.bind.apply(t,[void 0].concat(i)));return e.onAdd=i.onAdd,e.onRemove=i.onRemove,e.onChange=i.onChange,e}}}),i}return r(t,e),t.prototype.sort=function(t){this.$sorting=!0,e.prototype.sort.call(this,t);for(var n=this.$changes.changes,r=0,i=n;r<i.length;r++){var o=i[r],s=this.$changes.getIndex(this[o]);void 0!==s&&this.$changes.mapIndexChange(this[o],s),this.$changes.mapIndex(this[o],o)}return this.$sorting=!1,this},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Array.prototype.splice.apply(this,arguments),o=this.filter(function(n,r){return r>=e+t-1});return i.map(function(e){e&&e.$changes&&(e.$changes.parent.deleteIndex(e),e.$changes.parent.deleteIndexChange(e),delete e.$changes.parent)}),o.forEach(function(e){e&&e.$changes&&e.$changes.parentField--}),i},t}(Array);t.ArraySchema=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t){var n=this;void 0===t&&(t={});for(var r in t)this[r]=t[r];Object.defineProperties(this,{$changes:{value:void 0,enumerable:!1,writable:!0},onAdd:{value:void 0,enumerable:!1,writable:!0},onRemove:{value:void 0,enumerable:!1,writable:!0},onChange:{value:void 0,enumerable:!1,writable:!0},clone:{value:function(){var t=Object.assign(new e,n);return t.onAdd=n.onAdd,t.onRemove=n.onRemove,t.onChange=n.onChange,t}},triggerAll:{value:function(){if(n.onAdd)for(var e in n)n.onAdd(n[e],e)}},toJSON:{value:function(){var e={};for(var t in n)e[t]="function"==typeof n[t].toJSON?n[t].toJSON():n[t];return e}},_indexes:{value:new Map,enumerable:!1,writable:!0},_updateIndexes:{value:function(){var e=0,t=new Map;for(var r in n)t.set(r,e++);n._indexes=t}}})}return e}();t.MapSchema=r},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(16)),o=r(n(17));t.decode=i.default,t.encode=o.default},function(e,t,n){"use strict";function r(e,t){t.headers=e.headers||{},t.statusMessage=e.statusText,t.statusCode=e.status,t.data=e.response}function i(e,t,n){return new Promise(function(i,o){n=n||{};var s,a,c,u,h=new XMLHttpRequest,f=n.headers||{};h.timeout=n.timeout,h.ontimeout=h.onerror=function(e){e.timeout="timeout"==e.type,o(e)},h.open(e,t),h.onload=function(){for(u=h.getAllResponseHeaders().trim().split(/[\r\n]+/),r(h,h);c=u.shift();)c=c.split(": "),h.headers[c.shift().toLowerCase()]=c.join(": ");if((c=h.headers["content-type"])&&~c.indexOf("application/json"))try{h.data=JSON.parse(h.data,n.reviver)}catch(e){return r(h,e),o(e)}(h.status>=400?o:i)(h)},(a=n.body)&&/Array|Object/.test(a.constructor)&&(f["content-type"]="application/json",a=JSON.stringify(a));for(s in f)h.setRequestHeader(s,f[s]);h.send(a)})}Object.defineProperty(t,"__esModule",{value:!0}),t.send=i,n.d(t,"get",function(){return o}),n.d(t,"post",function(){return s}),n.d(t,"patch",function(){return a}),n.d(t,"del",function(){return c}),n.d(t,"put",function(){return u});var o=i.bind(i,"GET"),s=i.bind(i,"POST"),a=i.bind(i,"PATCH"),c=i.bind(i,"DELETE"),u=i.bind(i,"PUT")},function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(3)),o=n(18),s=n(19),a=n(6),c=n(7),u=function(){function e(e,t){var n=this;this.onJoin=o.createSignal(),this.onStateChange=o.createSignal(),this.onMessage=o.createSignal(),this.onError=o.createSignal(),this.onLeave=o.createSignal(),this.id=null,this.name=e,t?(this.serializer=new(a.getSerializer("schema")),this.rootSchema=t,this.serializer.state=new t):this.serializer=new(a.getSerializer("fossil-delta")),this.onError(function(e){return console.error(e)}),this.onLeave(function(){return n.removeAllListeners()})}return e.prototype.connect=function(e){var t=this;this.connection=new s.Connection(e,!1),this.connection.reconnectEnabled=!1,this.connection.onmessage=this.onMessageCallback.bind(this),this.connection.onclose=function(e){t.onLeave.invoke(e.code)},this.connection.onerror=function(e){console.warn("Room, onError ("+e.code+"): "+e.reason),t.onError.invoke(e.reason)},this.connection.open()},e.prototype.leave=function(e){void 0===e&&(e=!0),this.connection?e?this.connection.send([c.Protocol.LEAVE_ROOM]):this.connection.close():this.onLeave.invoke(4e3)},e.prototype.send=function(e){this.connection.send([c.Protocol.ROOM_DATA,e])},Object.defineProperty(e.prototype,"state",{get:function(){return this.serializer.getState()},enumerable:!0,configurable:!0}),e.prototype.listen=function(e,t,n){return"schema"===this.serializerId?void console.error("'"+this.serializerId+"' serializer doesn't support .listen() method."):(this.serializerId||console.warn("room.Listen() should be called after room.onJoin has been called (DEPRECATION WARNING)"),this.serializer.api.listen(e,t,n))},e.prototype.removeListener=function(e){return this.serializer.api.removeListener(e)},e.prototype.removeAllListeners=function(){this.serializer&&this.serializer.teardown(),this.onJoin.clear(),this.onStateChange.clear(),this.onMessage.clear(),this.onError.clear(),this.onLeave.clear()},e.prototype.onMessageCallback=function(e){if(this.previousCode)this.previousCode===c.Protocol.ROOM_STATE?this.setState(Array.from(new Uint8Array(e.data))):this.previousCode===c.Protocol.ROOM_STATE_PATCH?this.patch(Array.from(new Uint8Array(e.data))):this.previousCode===c.Protocol.ROOM_DATA&&this.onMessage.invoke(i.decode(e.data)),this.previousCode=void 0;else{var t=new DataView(e.data),n=t.getUint8(0);if(n===c.Protocol.JOIN_ROOM){var r=1;this.serializerId=c.utf8Read(t,r),r+=c.utf8Length(this.serializerId);var o=a.getSerializer(this.serializerId);if(!o)throw new Error("missing serializer: "+this.serializerId);if("fossil-delta"===this.serializerId||this.rootSchema||(this.serializer=new o),t.buffer.byteLength>r&&this.serializer.handshake){var s=Array.from(new Uint8Array(t.buffer.slice(r)));this.serializer.handshake(s)}this.onJoin.invoke()}else n===c.Protocol.JOIN_ERROR?this.onError.invoke(c.utf8Read(t,1)):n===c.Protocol.LEAVE_ROOM?this.leave():this.previousCode=n}},e.prototype.setState=function(e){this.serializer.setState(e),this.onStateChange.invoke(this.serializer.getState())},e.prototype.patch=function(e){this.serializer.patch(e),this.onStateChange.invoke(this.serializer.getState())},e}();t.Room=u},function(e,t,n){"use strict";function r(e,t){o[e]=t}function i(e){return o[e]}Object.defineProperty(t,"__esModule",{value:!0});var o={};t.registerSerializer=r,t.getSerializer=i},function(e,t,n){"use strict";function r(e,t){for(var n=e.getUint8(t++),r="",i=0,o=t,s=t+n;o<s;o++){var a=e.getUint8(o);if(0!=(128&a))if(192!=(224&a))if(224!=(240&a)){if(240!=(248&a))throw new Error("Invalid byte "+a.toString(16));i=(7&a)<<18|(63&e.getUint8(++o))<<12|(63&e.getUint8(++o))<<6|(63&e.getUint8(++o))<<0,i>=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i)}else r+=String.fromCharCode((15&a)<<12|(63&e.getUint8(++o))<<6|(63&e.getUint8(++o))<<0);else r+=String.fromCharCode((31&a)<<6|63&e.getUint8(++o));else r+=String.fromCharCode(a)}return r}function i(e){void 0===e&&(e="");for(var t=0,n=0,r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n+1}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.JOIN_ROOM=10]="JOIN_ROOM",e[e.JOIN_ERROR=11]="JOIN_ERROR",e[e.LEAVE_ROOM=12]="LEAVE_ROOM",e[e.ROOM_DATA=13]="ROOM_DATA",e[e.ROOM_STATE=14]="ROOM_STATE",e[e.ROOM_STATE_PATCH=15]="ROOM_STATE_PATCH"}(t.Protocol||(t.Protocol={})),t.utf8Read=r,t.utf8Length=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;c;)try{if(i=1,o&&(s=2&n[0]?o.return:n[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;switch(o=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,o=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(s=c.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){c.label=n[1];break}if(6===n[0]&&c.label<s[1]){c.label=s[1],s=n;break}if(s&&c.label<s[2]){c.label=s[2],c.ops.push(n);break}s[2]&&c.ops.pop(),c.trys.pop();continue}n=t.call(e,c)}catch(e){n=[6,e],o=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,s,a,c={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(4)),a=n(23),c="colyseus-auth-token";!function(e){e.ios="ios",e.android="android"}(t.Platform||(t.Platform={}));var u=function(){function e(e){var t=this;this._id=void 0,this.username=void 0,this.displayName=void 0,this.avatarUrl=void 0,this.isAnonymous=void 0,this.email=void 0,this.lang=void 0,this.location=void 0,this.timezone=void 0,this.metadata=void 0,this.devices=void 0,this.facebookId=void 0,this.twitterId=void 0,this.googleId=void 0,this.gameCenterId=void 0,this.steamId=void 0,this.friendIds=void 0,this.blockedUserIds=void 0,this.createdAt=void 0,this.updatedAt=void 0,this.token=void 0,this.endpoint=e.replace("ws","http"),a.getItem(c,function(e){return t.token=e})}return Object.defineProperty(e.prototype,"hasToken",{get:function(){return!!this.token},enumerable:!0,configurable:!0}),e.prototype.login=function(e){return void 0===e&&(e={}),r(this,void 0,void 0,function(){var t,n,r;return i(this,function(i){switch(i.label){case 0:return t=Object.assign({},e),this.hasToken&&(t.token=this.token),[4,this.request("post","/auth",t)];case 1:n=i.sent(),this.token=n.token,a.setItem(c,this.token);for(r in n)this.hasOwnProperty(r)&&(this[r]=n[r]);return this.registerPingService(),[2,this]}})})},e.prototype.save=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,this.request("put","/auth",{},{username:this.username,displayName:this.displayName,avatarUrl:this.avatarUrl,lang:this.lang,location:this.location,timezone:this.timezone})];case 1:return e.sent(),[2,this]}})})},e.prototype.getFriends=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,this.request("get","/friends/all")];case 1:return[2,e.sent()]}})})},e.prototype.getOnlineFriends=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,this.request("get","/friends/online")];case 1:return[2,e.sent()]}})})},e.prototype.getFriendRequests=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,this.request("get","/friends/requests")];case 1:return[2,e.sent()]}})})},e.prototype.sendFriendRequest=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,this.request("post","/friends/requests",{userId:e})];case 1:return[2,t.sent()]}})})},e.prototype.acceptFriendRequest=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,this.request("put","/friends/requests",{userId:e})];case 1:return[2,t.sent()]}})})},e.prototype.declineFriendRequest=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,this.request("del","/friends/requests",{userId:e})];case 1:return[2,t.sent()]}})})},e.prototype.blockUser=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,this.request("post","/friends/block",{userId:e})];case 1:return[2,t.sent()]}})})},e.prototype.unblockUser=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,this.request("put","/friends/block",{userId:e})];case 1:return[2,t.sent()]}})})},e.prototype.request=function(e,t,n,o,a){return void 0===n&&(n={}),void 0===a&&(a={}),r(this,void 0,void 0,function(){var r,c,u,h;return i(this,function(i){switch(i.label){case 0:a.Accept="application/json",this.hasToken&&(a.Authorization="Bearer "+this.token),r=[];for(c in n)r.push(c+"="+n[c]);return u=r.length>0?"?"+r.join("&"):"",h={headers:a},o&&(h.body=o),[4,s[e](""+this.endpoint+t+u,h)];case 1:return[2,i.sent().data]}})})},e.prototype.logout=function(){this.token=void 0,a.removeItem(c),this.unregisterPingService()},e.prototype.registerPingService=function(e){var t=this;void 0===e&&(e=15e3),this.unregisterPingService(),this.keepOnlineInterval=setInterval(function(){return t.request("get","/auth")},e)},e.prototype.unregisterPingService=function(){clearInterval(this.keepOnlineInterval)},e}();t.Auth=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.Schema=r.Schema;var i=n(2);t.MapSchema=i.MapSchema;var o=n(1);t.ArraySchema=o.ArraySchema;var s=n(33);t.Reflection=s.Reflection,t.ReflectionType=s.ReflectionType,t.ReflectionField=s.ReflectionField;var a=n(12);t.type=a.type,t.filter=a.filter,t.defineTypes=a.defineTypes,t.Context=a.Context},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.END_OF_STRUCTURE=193,t.NIL=192,t.INDEX_CHANGE=212,t.TYPE_ID=213},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(2),s=function(){function e(e,t,n){void 0===e&&(e=null),void 0===n&&(n=!1),this.changed=!1,this.changes=[],this.allChanges=[],this.linkedTrees=[],this.parent=t,this.parentField=e,this.trackAllChanges=n}return e.prototype.link=function(e){this.linkedTrees.push(e)},e.prototype.change=function(e,t){void 0===t&&(t=!1),this.changed=!0,-1===this.changes.indexOf(e)&&this.changes.push(e);var n=this.allChanges.indexOf(e);t||-1!==n?t&&n>=0&&this.allChanges.splice(n,1):this.allChanges.push(e),this.parent&&this.parent.change(this.parentField)},e.prototype.mapIndex=function(e,t){this.indexMap||(this.indexMap=new Map,this.indexChange=new Map),this.indexMap.set(e,t)},e.prototype.getIndex=function(e){return this.indexMap&&this.indexMap.get(e)},e.prototype.deleteIndex=function(e){this.indexMap.delete(e)},e.prototype.mapIndexChange=function(e,t){this.indexChange.set(e,t)},e.prototype.getIndexChange=function(e){return this.indexChange&&this.indexChange.get(e)},e.prototype.deleteIndexChange=function(e){this.indexChange.delete(e)},e.prototype.changeAll=function(e){if(e instanceof r.Schema){var t=e._schema;for(var n in t)(e[n]instanceof r.Schema||e[n]instanceof i.ArraySchema||e[n]instanceof o.MapSchema)&&!e[n].$changes.parent.parent&&(e[n].$changes.parent=this),this.change(n)}else for(var s=Object.keys(e),a=0,c=s;a<c.length;a++){var u=c[a];this.change(u)}},e.prototype.discard=function(){this.changed=!1,this.changes=[],this.indexChange&&this.indexChange.clear()},e}();t.ChangeTree=s},function(e,t,n){"use strict";function r(e,n){return void 0===n&&(n=t.globalContext),function(t,r){var i=t.constructor;i._context=n,n.has(i)||(n.add(i),i._schema=Object.assign({},i._schema||{}),i._indexes=Object.assign({},i._indexes||{}),i._descriptors=Object.assign({},i._descriptors||{})),i._indexes[r]=Object.keys(i._schema).length,i._schema[r]=e;var o=Array.isArray(e),c=!o&&e.map,u="_"+r;i._descriptors[u]={enumerable:!1,configurable:!1,writable:!0},i._descriptors[r]={get:function(){return this[u]},set:function(e){if((o||c)&&(e=new Proxy(e,{get:function(e,t){return e[t]},set:function(e,t,n){if("length"!==t&&0!==t.indexOf("$")){var r=o?Number(t):String(t);if(!e.$sorting){var i=e.$changes.getIndex(n);void 0!==i&&e.$changes.mapIndexChange(n,i),e.$changes.mapIndex(n,r)}n instanceof a.Schema?n.$changes.parent||(n.$changes=new s.ChangeTree(r,e.$changes),n.$changes.changeAll(n)):e[t]=n,e.$changes.change(r)}else e[t];return e[t]=n,!0},deleteProperty:function(e,t){var n=e[t];c&&void 0!==n&&(e.$changes.deleteIndex(n),e.$changes.deleteIndexChange(n),n.$changes&&delete n.$changes.parent,e._indexes.delete(t)),delete e[t];var r=o?Number(t):String(t);return e.$changes.change(r,!0),!0}})),e!==this[u])if(this[u]=e,Array.isArray(i._schema[r])){this.$changes.change(r),e.$changes=new s.ChangeTree(r,this.$changes);for(var t=0;t<e.length;t++)e[t]instanceof a.Schema&&(e[t].$changes=new s.ChangeTree(t,e.$changes),e[t].$changes.changeAll(e[t])),e.$changes.mapIndex(e[t],t),e.$changes.change(t)}else if(i._schema[r].map){e.$changes=new s.ChangeTree(r,this.$changes),this.$changes.change(r);for(var n in e)e[n]instanceof a.Schema&&(e[n].$changes=new s.ChangeTree(n,e.$changes),e[n].$changes.changeAll(e[n])),e.$changes.mapIndex(e[n],n),e.$changes.change(n)}else"function"==typeof i._schema[r]?(this.$changes.change(r),e&&(e.$changes=new s.ChangeTree(r,this.$changes),e.$changes.changeAll(e))):this.$changes.change(r)},enumerable:!0,configurable:!0}}}function i(e){return function(t,n){var r=t.constructor;r._filters||(r._filters={}),r._filters[n]=e}}function o(e,t){for(var n in t)r(t[n])(e.prototype,n);return e}Object.defineProperty(t,"__esModule",{value:!0});var s=n(11),a=n(0),c=function(){function e(){this.types={},this.schemas=new Map}return e.prototype.has=function(e){return this.schemas.has(e)},e.prototype.get=function(e){return this.types[e]},e.prototype.add=function(e){e._typeid=this.schemas.size,this.types[e._typeid]=e,this.schemas.set(e,e._typeid)},e}();t.Context=c,t.globalContext=new c,t.type=r,t.filter=i,t.defineTypes=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(14);var r=n(15);t.Client=r.Client;var i=n(7);t.Protocol=i.Protocol;var o=n(5);t.Room=o.Room;var s=n(8);t.Auth=s.Auth,t.Platform=s.Platform;var a=n(25);t.FossilDeltaSerializer=a.FossilDeltaSerializer;var c=n(30);t.SchemaSerializer=c.SchemaSerializer;var u=n(6);t.registerSerializer=u.registerSerializer;var h=n(9);t.Schema=h.Schema,t.type=h.type,u.registerSerializer("fossil-delta",a.FossilDeltaSerializer),u.registerSerializer("schema",c.SchemaSerializer)},function(e,t){ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return null!==e&&"object"==typeof e&&e.buffer instanceof ArrayBuffer})},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;c;)try{if(i=1,o&&(s=2&n[0]?o.return:n[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;switch(o=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,o=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(s=c.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){c.label=n[1];break}if(6===n[0]&&c.label<s[1]){c.label=s[1],s=n;break}if(s&&c.label<s[2]){c.label=s[2],c.ops.push(n);break}s[2]&&c.ops.pop(),c.trys.pop();continue}n=t.call(e,c)}catch(e){n=[6,e],o=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,s,a,c={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),a=n(5),c=n(8),u=n(24),h=function(e){function t(n,r){var i=e.call(this,n)||this;return i.code=r,Object.setPrototypeOf(i,t.prototype),i}return r(t,e),t}(Error);t.MatchMakeError=h;var f=function(){function e(e){void 0===e&&(e=location.protocol.replace("http","ws")+"//"+location.hostname+(location.port&&":"+location.port)),this.endpoint=e,this.auth=new c.Auth(this.endpoint),this.push=new u.Push(this.endpoint)}return e.prototype.joinOrCreate=function(e,t,n){return void 0===t&&(t={}),i(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.createMatchMakeRequest("joinOrCreate",e,t,n)];case 1:return[2,r.sent()]}})})},e.prototype.create=function(e,t,n){return void 0===t&&(t={}),i(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.createMatchMakeRequest("create",e,t,n)];case 1:return[2,r.sent()]}})})},e.prototype.join=function(e,t,n){return void 0===t&&(t={}),i(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.createMatchMakeRequest("join",e,t,n)];case 1:return[2,r.sent()]}})})},e.prototype.joinById=function(e,t,n){return void 0===t&&(t={}),i(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.createMatchMakeRequest("joinById",e,t,n)];case 1:return[2,r.sent()]}})})},e.prototype.reconnect=function(e,t,n){return i(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.createMatchMakeRequest("joinById",e,{sessionId:t},n)];case 1:return[2,r.sent()]}})})},e.prototype.getAvailableRooms=function(e){return void 0===e&&(e=""),i(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return t=this.endpoint.replace("ws","http")+"/matchmake/"+e,[4,s.get(t,{headers:{Accept:"application/json"}})];case 1:return[2,n.sent().data]}})})},e.prototype.createMatchMakeRequest=function(e,t,n,r){return void 0===n&&(n={}),i(this,void 0,void 0,function(){var i,a,c;return o(this,function(o){switch(o.label){case 0:return i=this.endpoint.replace("ws","http")+"/matchmake/"+e+"/"+t,this.auth.hasToken&&(n.token=this.auth.token),[4,s.post(i,{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})];case 1:if(a=o.sent().data,a.error)throw new h(a.error,a.code);return c=this.createRoom(t,r),c.id=a.room.roomId,c.sessionId=a.sessionId,c.connect(this.buildEndpoint(a.room,{sessionId:c.sessionId})),[2,new Promise(function(e,t){var n=function(e){return t(e)};c.onError.once(n),c.onJoin.once(function(){c.onError.remove(n),e(c)})})]}})})},e.prototype.createRoom=function(e,t){return new a.Room(e,t)},e.prototype.buildEndpoint=function(e,t){void 0===t&&(t={});var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(r+"="+t[r]);return this.endpoint+"/"+e.processId+"/"+e.roomId+"?"+n.join("&")},e}();t.Client=f},function(e,t,n){"use strict";function r(e){if(this._offset=0,e instanceof ArrayBuffer)this._buffer=e,this._view=new DataView(this._buffer);else{if(!ArrayBuffer.isView(e))throw new Error("Invalid argument");this._buffer=e.buffer,this._view=new DataView(this._buffer,e.byteOffset,e.byteLength)}}function i(e,t,n){for(var r="",i=0,o=t,s=t+n;o<s;o++){var a=e.getUint8(o);if(0!=(128&a))if(192!=(224&a))if(224!=(240&a)){if(240!=(248&a))throw new Error("Invalid byte "+a.toString(16));i=(7&a)<<18|(63&e.getUint8(++o))<<12|(63&e.getUint8(++o))<<6|(63&e.getUint8(++o))<<0,i>=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i)}else r+=String.fromCharCode((15&a)<<12|(63&e.getUint8(++o))<<6|(63&e.getUint8(++o))<<0);else r+=String.fromCharCode((31&a)<<6|63&e.getUint8(++o));else r+=String.fromCharCode(a)}return r}function o(e){var t=new r(e),n=t._parse();if(t._offset!==e.byteLength)throw new Error(e.byteLength-t._offset+" trailing bytes");return n}r.prototype._array=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=this._parse();return t},r.prototype._map=function(e){for(var t="",n={},r=0;r<e;r++)t=this._parse(),n[t]=this._parse();return n},r.prototype._str=function(e){var t=i(this._view,this._offset,e);return this._offset+=e,t},r.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},r.prototype._parse=function(){var e,t=this._view.getUint8(this._offset++),n=0,r=0,i=0,o=0;if(t<192)return t<128?t:t<144?this._map(15&t):t<160?this._array(15&t):this._str(31&t);if(t>223)return-1*(255-t+1);switch(t){case 192:return null;case 194:return!1;case 195:return!0;case 196:return n=this._view.getUint8(this._offset),this._offset+=1,this._bin(n);case 197:return n=this._view.getUint16(this._offset),this._offset+=2,this._bin(n);case 198:return n=this._view.getUint32(this._offset),this._offset+=4,this._bin(n);case 199:return n=this._view.getUint8(this._offset),r=this._view.getInt8(this._offset+1),this._offset+=2,[r,this._bin(n)];case 200:return n=this._view.getUint16(this._offset),r=this._view.getInt8(this._offset+2),this._offset+=3,[r,this._bin(n)];case 201:return n=this._view.getUint32(this._offset),r=this._view.getInt8(this._offset+4),this._offset+=5,[r,this._bin(n)];case 202:return e=this._view.getFloat32(this._offset),this._offset+=4,e;case 203:return e=this._view.getFloat64(this._offset),this._offset+=8,e;case 204:return e=this._view.getUint8(this._offset),this._offset+=1,e;case 205:return e=this._view.getUint16(this._offset),this._offset+=2,e;case 206:return e=this._view.getUint32(this._offset),this._offset+=4,e;case 207:return i=this._view.getUint32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,i+o;case 208:return e=this._view.getInt8(this._offset),this._offset+=1,e;case 209:return e=this._view.getInt16(this._offset),this._offset+=2,e;case 210:return e=this._view.getInt32(this._offset),this._offset+=4,e;case 211:return i=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,i+o;case 212:return r=this._view.getInt8(this._offset),this._offset+=1,0===r?void(this._offset+=1):[r,this._bin(1)];case 213:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(2)];case 214:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(4)];case 215:return r=this._view.getInt8(this._offset),this._offset+=1,0===r?(i=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,new Date(i+o)):[r,this._bin(8)];case 216:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(16)];case 217:return n=this._view.getUint8(this._offset),this._offset+=1,this._str(n);case 218:return n=this._view.getUint16(this._offset),this._offset+=2,this._str(n);case 219:return n=this._view.getUint32(this._offset),this._offset+=4,this._str(n);case 220:return n=this._view.getUint16(this._offset),this._offset+=2,this._array(n);case 221:return n=this._view.getUint32(this._offset),this._offset+=4,this._array(n);case 222:return n=this._view.getUint16(this._offset),this._offset+=2,this._map(n);case 223:return n=this._view.getUint32(this._offset),this._offset+=4,this._map(n)}throw new Error("Could not parse")},e.exports=o},function(e,t,n){"use strict";function r(e,t,n){for(var r=0,i=0,o=n.length;i<o;i++)r=n.charCodeAt(i),r<128?e.setUint8(t++,r):r<2048?(e.setUint8(t++,192|r>>6),e.setUint8(t++,128|63&r)):r<55296||r>=57344?(e.setUint8(t++,224|r>>12),e.setUint8(t++,128|r>>6&63),e.setUint8(t++,128|63&r)):(i++,r=65536+((1023&r)<<10|1023&n.charCodeAt(i)),e.setUint8(t++,240|r>>18),e.setUint8(t++,128|r>>12&63),e.setUint8(t++,128|r>>6&63),e.setUint8(t++,128|63&r))}function i(e){for(var t=0,n=0,r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function o(e,t,n){var r=typeof n,s=0,a=0,c=0,u=0,h=0,f=0;if("string"===r){if((h=i(n))<32)e.push(160|h),f=1;else if(h<256)e.push(217,h),f=2;else if(h<65536)e.push(218,h>>8,h),f=3;else{if(!(h<4294967296))throw new Error("String too long");e.push(219,h>>24,h>>16,h>>8,h),f=5}return t.push({_str:n,_length:h,_offset:e.length}),f+h}if("number"===r)return Math.floor(n)===n&&isFinite(n)?n>=0?n<128?(e.push(n),1):n<256?(e.push(204,n),2):n<65536?(e.push(205,n>>8,n),3):n<4294967296?(e.push(206,n>>24,n>>16,n>>8,n),5):(c=n/Math.pow(2,32)>>0,u=n>>>0,e.push(207,c>>24,c>>16,c>>8,c,u>>24,u>>16,u>>8,u),9):n>=-32?(e.push(n),1):n>=-128?(e.push(208,n),2):n>=-32768?(e.push(209,n>>8,n),3):n>=-2147483648?(e.push(210,n>>24,n>>16,n>>8,n),5):(c=Math.floor(n/Math.pow(2,32)),u=n>>>0,e.push(211,c>>24,c>>16,c>>8,c,u>>24,u>>16,u>>8,u),9):(e.push(203),t.push({_float:n,_length:8,_offset:e.length}),9);if("object"===r){if(null===n)return e.push(192),1;if(Array.isArray(n)){if((h=n.length)<16)e.push(144|h),f=1;else if(h<65536)e.push(220,h>>8,h),f=3;else{if(!(h<4294967296))throw new Error("Array too large");e.push(221,h>>24,h>>16,h>>8,h),f=5}for(s=0;s<h;s++)f+=o(e,t,n[s]);return f}if(n instanceof Date){var l=n.getTime();return c=Math.floor(l/Math.pow(2,32)),u=l>>>0,e.push(215,0,c>>24,c>>16,c>>8,c,u>>24,u>>16,u>>8,u),10}if(n instanceof ArrayBuffer){if((h=n.byteLength)<256)e.push(196,h),f=2;else if(h<65536)e.push(197,h>>8,h),f=3;else{if(!(h<4294967296))throw new Error("Buffer too large");e.push(198,h>>24,h>>16,h>>8,h),f=5}return t.push({_bin:n,_length:h,_offset:e.length}),f+h}if("function"==typeof n.toJSON)return o(e,t,n.toJSON());var p=[],d="",v=Object.keys(n);for(s=0,a=v.length;s<a;s++)d=v[s],"function"!=typeof n[d]&&p.push(d);if((h=p.length)<16)e.push(128|h),f=1;else if(h<65536)e.push(222,h>>8,h),f=3;else{if(!(h<4294967296))throw new Error("Object too large");e.push(223,h>>24,h>>16,h>>8,h),f=5}for(s=0;s<h;s++)d=p[s],f+=o(e,t,d),f+=o(e,t,n[d]);return f}if("boolean"===r)return e.push(n?195:194),1;if("undefined"===r)return e.push(212,0,0),3;throw new Error("Could not encode")}function s(e){var t=[],n=[],i=o(t,n,e),s=new ArrayBuffer(i),a=new DataView(s),c=0,u=0,h=-1;n.length>0&&(h=n[0]._offset);for(var f,l=0,p=0,d=0,v=t.length;d<v;d++)if(a.setUint8(u+d,t[d]),d+1===h){if(f=n[c],l=f._length,p=u+h,f._bin)for(var y=new Uint8Array(f._bin),g=0;g<l;g++)a.setUint8(p+g,y[g]);else f._str?r(a,p,f._str):void 0!==f._float&&a.setFloat64(p,f._float);c++,u+=l,n[c]&&(h=n[c]._offset)}return s}e.exports=s},function(e,t,n){"use strict";function r(){function e(e){return t.register(e,null===this)}var t=new i;return e.once=function(e){var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];e.apply(void 0,r),t.remove(n)};t.register(n)},e.remove=function(e){return t.remove(e)},e.invoke=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.invoke.apply(t,e)},e.clear=function(){return t.clear()},e}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.handlers=[]}return e.prototype.register=function(e,t){return void 0===t&&(t=!1),this.handlers.push(e),this},e.prototype.invoke=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.handlers.forEach(function(t){return t.apply(void 0,e)})},e.prototype.remove=function(e){var t=this.handlers.indexOf(e);this.handlers[t]=this.handlers[this.handlers.length-1],this.handlers.pop()},e.prototype.clear=function(){this.handlers=[]},e}();t.EventEmitter=i,t.createSignal=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(20)),a=o(n(3)),c=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t,void 0,{connect:n})||this;return r._enqueuedCalls=[],r}return r(t,e),t.prototype.onOpenCallback=function(t){if(e.prototype.onOpenCallback.call(this),this.binaryType="arraybuffer",this._enqueuedCalls.length>0){for(var n=0,r=this._enqueuedCalls;n<r.length;n++){var i=r[n],o=i[0],s=i[1];this[o].apply(this,s)}this._enqueuedCalls=[]}},t.prototype.send=function(t){if(this.ws.readyState===s.default.OPEN)return e.prototype.send.call(this,a.encode(t));this._enqueuedCalls.push(["send",[t]])},t}(s.default);t.Connection=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(21).createBackoff,s="undefined"!=typeof WebSocket?WebSocket:n(22),a=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r(this,e),this.url=t,this.protocols=n,this.reconnectEnabled=!0,this.listeners={},this.backoff=o(i.backoff||"exponential",i),this.backoff.onReady=this.onBackoffReady.bind(this),(void 0===i.connect||i.connect)&&this.open()}return i(e,[{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isReconnect=e;var t=this.ws&&this.ws.binaryType;this.ws=new s(this.url,this.protocols),this.ws.onclose=this.onCloseCallback.bind(this),this.ws.onerror=this.onErrorCallback.bind(this),this.ws.onmessage=this.onMessageCallback.bind(this),this.ws.onopen=this.onOpenCallback.bind(this),t&&(this.ws.binaryType=t)}},{key:"onBackoffReady",value:function(e,t){this.open(!0)}},{key:"onCloseCallback",value:function(e){!this.isReconnect&&this.listeners.onclose&&this.listeners.onclose.apply(null,arguments),this.reconnectEnabled&&e.code<3e3&&this.backoff.backoff()}},{key:"onErrorCallback",value:function(){this.listeners.onerror&&this.listeners.onerror.apply(null,arguments)}},{key:"onMessageCallback",value:function(){this.listeners.onmessage&&this.listeners.onmessage.apply(null,arguments)}},{key:"onOpenCallback",value:function(){this.listeners.onopen&&this.listeners.onopen.apply(null,arguments),this.isReconnect&&this.listeners.onreconnect&&this.listeners.onreconnect.apply(null,arguments),this.isReconnect=!1}},{key:"close",value:function(e,t){void 0===e&&(e=1e3),this.reconnectEnabled=!1,this.ws.close(e,t)}},{key:"send",value:function(e){this.ws.send(e)}},{key:"bufferedAmount",get:function(){return this.ws.bufferedAmount}},{key:"readyState",get:function(){return this.ws.readyState}},{key:"binaryType",get:function(){return this.ws.binaryType},set:function(e){this.ws.binaryType=e}},{key:"extensions",get:function(){return this.ws.extensions},set:function(e){this.ws.extensions=e}},{key:"protocol",get:function(){return this.ws.protocol},set:function(e){this.ws.protocol=e}},{key:"onclose",set:function(e){this.listeners.onclose=e},get:function(){return this.listeners.onclose}},{key:"onerror",set:function(e){this.listeners.onerror=e},get:function(){return this.listeners.onerror}},{key:"onmessage",set:function(e){this.listeners.onmessage=e},get:function(){return this.listeners.onmessage}},{key:"onopen",set:function(e){this.listeners.onopen=e},get:function(){return this.listeners.onopen}},{key:"onreconnect",set:function(e){this.listeners.onreconnect=e},get:function(){return this.listeners.onreconnect}}]),e}();a.CONNECTING=s.CONNECTING,a.OPEN=s.OPEN,a.CLOSING=s.CLOSING,a.CLOSED=s.CLOSED,t.default=a},function(e,t,n){"use strict";function r(e,t){return new i(o[e],t)}function i(e,t){this.func=e,this.attempts=0,this.delay=void 0!==t.initialDelay?t.initialDelay:100}Object.defineProperty(t,"__esModule",{value:!0}),t.createBackoff=r;var o={exponential:function(e,t){return Math.floor(Math.random()*Math.pow(2,e)*t)},fibonacci:function(e,t){var n=1;if(e>n)for(var r=1,n=2,i=2;i<e;i++){var o=r+n;r=n,n=o}return Math.floor(Math.random()*n*t)}};i.prototype.backoff=function(){setTimeout(this.onReady,this.func(++this.attempts,this.delay))}},function(e,t){},function(e,t,n){"use strict";function r(){return a||(a="undefined"!=typeof cc&&cc.sys&&cc.sys.localStorage?cc.sys.localStorage:"undefined"!=typeof window&&window.localStorage?window.localStorage:{cache:{},setItem:function(e,t){this.cache[e]=t},getItem:function(e){this.cache[e]},removeItem:function(e){delete this.cache[e]}}),a}function i(e,t){r().setItem(e,t)}function o(e){r().removeItem(e)}function s(e,t){var n=r().getItem(e);"undefined"!=typeof Promise&&n instanceof Promise?n.then(function(e){return t(e)}):t(n)}Object.defineProperty(t,"__esModule",{value:!0});var a;t.setItem=i,t.removeItem=o,t.getItem=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;c;)try{if(i=1,o&&(s=2&n[0]?o.return:n[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;switch(o=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,o=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(s=c.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){c.label=n[1];break}if(6===n[0]&&c.label<s[1]){c.label=s[1],s=n;break}if(s&&c.label<s[2]){c.label=s[2],c.ops.push(n);break}s[2]&&c.ops.pop(),c.trys.pop();continue}n=t.call(e,c)}catch(e){n=[6,e],o=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,s,a,c={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.endpoint=e.replace("ws","http")}return e.prototype.register=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return this.check(),[4,this.registerServiceWorker()];case 1:return e.sent(),[4,this.requestNotificationPermission()];case 2:return e.sent(),[2]}})})},e.prototype.registerServiceWorker=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,navigator.serviceWorker.register(this.endpoint+"/push")];case 1:return[2,e.sent()]}})})},e.prototype.requestNotificationPermission=function(){return r(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return[4,window.Notification.requestPermission()];case 1:if("granted"!==(e=t.sent()))throw new Error("Permission not granted for Notification");return[2]}})})},e.prototype.check=function(){if(!("serviceWorker"in navigator))throw new Error("No Service Worker support!");if(!("PushManager"in window))throw new Error("No Push API Support!")},e}();t.Push=o},function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),o=r(n(29)),s=r(n(3)),a=function(){function e(){this.api=new i.StateContainer({})}return e.prototype.getState=function(){return this.api.state},e.prototype.setState=function(e){this.previousState=new Uint8Array(e),this.api.set(s.decode(this.previousState))},e.prototype.patch=function(e){this.previousState=new Uint8Array(o.apply(this.previousState,e)),this.api.set(s.decode(this.previousState))},e.prototype.teardown=function(){this.api.removeAllListeners()},e}();t.FossilDeltaSerializer=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);t.StateContainer=r.StateContainer},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),i=function(){function e(e){this.listeners=[],this.matcherPlaceholders={":id":/^([a-zA-Z0-9\-_]+)$/,":number":/^([0-9]+)$/,":string":/^(\w+)$/,":axis":/^([xyz])$/,":*":/(.*)/},this.state=e,this.reset()}return e.prototype.set=function(e){var t=r.compare(this.state,e);return this.state=e,this.checkPatches(t,this.listeners,this.defaultListener),t},e.prototype.registerPlaceholder=function(e,t){this.matcherPlaceholders[e]=t},e.prototype.listen=function(e,t,n){var i,o=this;"function"==typeof e?(i=[],t=e):i=e.split("/"),t.length>1&&console.warn(".listen() accepts only one parameter.");var s={callback:t,rawRules:i,rules:i.map(function(e){return"string"==typeof e?0===e.indexOf(":")?o.matcherPlaceholders[e]||o.matcherPlaceholders[":*"]:new RegExp("^"+e+"$"):e})};return 0===i.length?this.defaultListener=s:this.listeners.push(s),n&&this.checkPatches(r.compare({},this.state),[s]),s},e.prototype.removeListener=function(e){for(var t=this.listeners.length-1;t>=0;t--)this.listeners[t]===e&&this.listeners.splice(t,1)},e.prototype.removeAllListeners=function(){this.reset()},e.prototype.checkPatches=function(e,t,n){for(var r=0,i=t.length;r<i;r++)for(var o=t[r],s=e.length-1;s>=0;s--){var a=o&&this.getPathVariables(e[s],o);a&&(o.callback({path:a,rawPath:e[s].path,operation:e[s].operation,value:e[s].value}),e[s].matched=!0)}if(n)for(var s=e.length-1;s>=0;s--)e[s].matched||n.callback(e[s])},e.prototype.getPathVariables=function(e,t){if(e.path.length!==t.rules.length)return!1;for(var n={},r=0,i=t.rules.length;r<i;r++){var o=e.path[r].match(t.rules[r]);if(!o||0===o.length||o.length>2)return!1;":"===t.rawRules[r].substr(0,1)&&(n[t.rawRules[r].substr(1)]=o[1])}return n},e.prototype.reset=function(){this.listeners=[]},e}();t.StateContainer=i},function(e,t,n){"use strict";function r(e,t){var n=[];return s(e,t,n,[]),n}function i(e,t){var n=e.slice();return n.push(t),n}function o(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var i in e)e.hasOwnProperty(i)&&r.push(i);return r}function s(e,t,n,r){for(var a=o(t),c=o(e),u=!1,h=c.length-1;h>=0;h--){var f=c[h],l=e[f];if(!t.hasOwnProperty(f)||void 0===t[f]&&void 0!==l&&!1===Array.isArray(t))n.push({operation:"remove",path:i(r,f)}),u=!0;else{var p=t[f];"object"==typeof l&&null!=l&&"object"==typeof p&&null!=p?s(l,p,n,i(r,f)):l!==p&&n.push({operation:"replace",path:i(r,f),value:p,previousValue:l})}}if(u||a.length!=c.length)for(var h=a.length-1;h>=0;h--){var f=a[h];if(!e.hasOwnProperty(f)&&void 0!==t[f]){var p=t[f],d=i(r,f);"object"==typeof p&&null!=p&&s({},p,n,d),n.push({operation:"add",path:d,value:p})}}}Object.defineProperty(t,"__esModule",{value:!0}),t.compare=r},function(e,t){!function(t,n){void 0!==e&&e.exports?e.exports=n():t.fossilDelta=n()}(this,function(){"use strict";function e(){this.a=0,this.b=0,this.i=0,this.z=new Array(s)}function t(e){this.a=e,this.pos=0}function n(){this.a=[]}function r(e){var t,n;for(t=1,n=64;e>=n;t++,n<<=6);return t}function i(e){for(var t=0,n=0,r=0,i=0,o=0,s=e.length;s>=16;)t=t+e[o+0]|0,n=n+e[o+1]|0,r=r+e[o+2]|0,i=i+e[o+3]|0,t=t+e[o+4]|0,n=n+e[o+5]|0,r=r+e[o+6]|0,i=i+e[o+7]|0,t=t+e[o+8]|0,n=n+e[o+9]|0,r=r+e[o+10]|0,i=i+e[o+11]|0,t=t+e[o+12]|0,n=n+e[o+13]|0,r=r+e[o+14]|0,i=i+e[o+15]|0,o+=16,s-=16;for(;s>=4;)t=t+e[o+0]|0,n=n+e[o+1]|0,r=r+e[o+2]|0,i=i+e[o+3]|0,o+=4,s-=4;switch(i=((i+(r<<8)|0)+(n<<16)|0)+(t<<24)|0,s){case 3:i=i+(e[o+2]<<8)|0;case 2:i=i+(e[o+1]<<16)|0;case 1:i=i+(e[o+0]<<24)|0}return i>>>0}var o={},s=16;e.prototype.init=function(e,t){var n,r,i=0,o=0;for(n=0;n<s;n++)r=e[t+n],i=i+r&65535,o=o+(s-n)*r&65535,this.z[n]=r;this.a=65535&i,this.b=65535&o,this.i=0},e.prototype.next=function(e){var t=this.z[this.i];this.z[this.i]=e,this.i=this.i+1&s-1,this.a=this.a-t+e&65535,this.b=this.b-s*t+this.a&65535},e.prototype.value=function(){return(65535&this.a|(65535&this.b)<<16)>>>0};var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~".split("").map(function(e){return e.charCodeAt(0)}),c=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,36,-1,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,-1,-1,-1,63,-1];return t.prototype.haveBytes=function(){return this.pos<this.a.length},t.prototype.getByte=function(){var e=this.a[this.pos];if(++this.pos>this.a.length)throw new RangeError("out of bounds");return e},t.prototype.getChar=function(){return String.fromCharCode(this.getByte())},t.prototype.getInt=function(){for(var e,t=0;this.haveBytes()&&(e=c[127&this.getByte()])>=0;)t=(t<<6)+e;return this.pos--,t>>>0},n.prototype.toArray=function(){return this.a},n.prototype.putByte=function(e){this.a.push(255&e)},n.prototype.putChar=function(e){this.putByte(e.charCodeAt(0))},n.prototype.putInt=function(e){var t,n,r=[];if(0===e)return void this.putChar("0");for(t=0;e>0;t++,e>>>=6)r.push(a[63&e]);for(n=t-1;n>=0;n--)this.putByte(r[n])},n.prototype.putArray=function(e,t,n){for(var r=t;r<n;r++)this.a.push(e[r])},o.create=function(t,o){var a,c=new n,u=o.length,h=t.length,f=-1;if(c.putInt(u),c.putChar("\n"),h<=s)return c.putInt(u),c.putChar(":"),c.putArray(o,0,u),c.putInt(i(o)),c.putChar(";"),c.toArray();var l=Math.ceil(h/s),p=new Array(l),d=new Array(l);for(a=0;a<p.length;a++)p[a]=-1;for(a=0;a<d.length;a++)d[a]=-1;var v,y=new e;for(a=0;a<h-s;a+=s)y.init(t,a),v=y.value()%l,p[a/s]=d[v],d[v]=a/s;for(var g,_,b,w,m,C=0;C+s<u;)for(w=0,m=0,y.init(o,C),a=0,b=0;;){var O=250;for(v=y.value()%l,_=d[v];_>=0&&O-- >0;){var S,A,k,I,E,P,x,M;for(g=_*s,I=0,P=g,x=C+a;P<h&&x<u&&t[P]===o[x];I++,P++,x++);for(I--,E=1;E<g&&E<=a&&t[g-E]===o[C+a-E];E++);E--,A=g-E,S=I+E+1,k=a-E,M=r(a-E)+r(S)+r(A)+3,S>=M&&S>b&&(b=S,w=g-E,m=k),_=p[_]}if(b>0){m>0&&(c.putInt(m),c.putChar(":"),c.putArray(o,C,C+m),C+=m),C+=b,c.putInt(b),c.putChar("@"),c.putInt(w),c.putChar(","),w+b-1>f&&(f=w+b-1),b=0;break}if(C+a+s>=u){c.putInt(u-C),c.putChar(":"),c.putArray(o,C,C+u-C),C=u;break}y.next(o[C+a+s]),a++}return C<u&&(c.putInt(u-C),c.putChar(":"),c.putArray(o,C,C+u-C)),c.putInt(i(o)),c.putChar(";"),c.toArray()},o.outputSize=function(e){var n=new t(e),r=n.getInt();if("\n"!==n.getChar())throw new Error("size integer not terminated by '\\n'");return r},o.apply=function(e,r,o){var s,a=0,c=new t(r),u=e.length,h=r.length;if(s=c.getInt(),"\n"!==c.getChar())throw new Error("size integer not terminated by '\\n'");for(var f=new n;c.haveBytes();){var l,p;switch(l=c.getInt(),c.getChar()){case"@":if(p=c.getInt(),c.haveBytes()&&","!==c.getChar())throw new Error("copy command not terminated by ','");if((a+=l)>s)throw new Error("copy exceeds output file size");if(p+l>u)throw new Error("copy extends past end of input");f.putArray(e,p,p+l);break;case":":if((a+=l)>s)throw new Error("insert command gives an output larger than predicted");if(l>h)throw new Error("insert count exceeds size of delta");f.putArray(c.a,c.pos,c.pos+l),c.pos+=l;break;case";":var d=f.toArray();if((!o||!1!==o.verifyChecksum)&&l!==i(d))throw new Error("bad checksum");if(a!==s)throw new Error("generated size does not match predicted size");return d;default:throw new Error("unknown delta operator")}}throw new Error("unterminated delta")},o})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=function(){function e(){}return e.prototype.setState=function(e){this.state.decode(e)},e.prototype.getState=function(){return this.state},e.prototype.patch=function(e){this.state.decode(e)},e.prototype.teardown=function(){},e.prototype.handshake=function(e){if(this.state){(new r.Reflection).decode(e)}else this.state=r.Reflection.decode(e)},e}();t.SchemaSerializer=i},function(e,t,n){"use strict";function r(e){for(var t=0,n=0,r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function i(e,t,n){for(var r=0,i=0,o=n.length;i<o;i++)r=n.charCodeAt(i),r<128?e[t++]=r:r<2048?(e[t++]=192|r>>6,e[t++]=128|63&r):r<55296||r>=57344?(e[t++]=224|r>>12,e[t++]=128|r>>6&63,e[t++]=128|63&r):(i++,r=65536+((1023&r)<<10|1023&n.charCodeAt(i)),e[t++]=240|r>>18,e[t++]=128|r>>12&63,e[t++]=128|r>>6&63,e[t++]=128|63&r)}function o(e,t){e.push(t)}function s(e,t){e.push(t)}function a(e,t){e.push(t),e.push(t>>8)}function c(e,t){e.push(t),e.push(t>>8)}function u(e,t){e.push(t),e.push(t>>8),e.push(t>>16),e.push(t>>24)}function h(e,t){var n=t>>24,r=t>>16,i=t>>8,o=t;e.push(o),e.push(i),e.push(r),e.push(n)}function f(e,t){var n=Math.floor(t/Math.pow(2,32));h(e,t>>>0),h(e,n)}function l(e,t){var n=t/Math.pow(2,32)>>0;h(e,t>>>0),h(e,n)}function p(e,t){v(e,t)}function d(e,t){y(e,t)}function v(e,t){C[0]=t,u(e,m[0])}function y(e,t){O[0]=t,u(e,m[w?0:1]),u(e,m[w?1:0])}function g(e,t){return s(e,t?1:0)}function _(e,t){t||(t="");var n=r(t),o=0;if(n<32)e.push(160|n),o=1;else if(n<256)e.push(217),s(e,n),o=2;else if(n<65536)e.push(218),c(e,n),o=3;else{if(!(n<4294967296))throw new Error("String too long");e.push(219),h(e,n),o=5}return i(e,e.length,t),o+n}function b(e,t){return isNaN(t)?b(e,0):isFinite(t)?t!==(0|t)?(e.push(203),y(e,t),9):t>=0?t<128?(s(e,t),1):t<256?(e.push(204),s(e,t),2):t<65536?(e.push(205),c(e,t),3):t<4294967296?(e.push(206),h(e,t),5):(e.push(207),l(e,t),9):t>=-32?(e.push(t),1):t>=-128?(e.push(208),o(e,t),2):t>=-32768?(e.push(209),a(e,t),3):t>=-2147483648?(e.push(210),u(e,t),5):(e.push(211),f(e,t),9):b(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}Object.defineProperty(t,"__esModule",{value:!0}),t.utf8Write=i,t.int8=o,t.uint8=s,t.int16=a,t.uint16=c,t.int32=u,t.uint32=h,t.int64=f,t.uint64=l,t.float32=p,t.float64=d;var w=!0,m=new Int32Array(2),C=new Float32Array(m.buffer),O=new Float64Array(m.buffer);t.writeFloat32=v,t.writeFloat64=y,t.boolean=g,t.string=_,t.number=b},function(e,t,n){"use strict";function r(e,t,n){for(var r="",i=0,o=t,s=t+n;o<s;o++){var a=e[o];if(0!=(128&a))if(192!=(224&a))if(224!=(240&a)){if(240!=(248&a))throw new Error("Invalid byte "+a.toString(16));i=(7&a)<<18|(63&e[++o])<<12|(63&e[++o])<<6|(63&e[++o])<<0,i>=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i)}else r+=String.fromCharCode((15&a)<<12|(63&e[++o])<<6|(63&e[++o])<<0);else r+=String.fromCharCode((31&a)<<6|63&e[++o]);else r+=String.fromCharCode(a)}return r}function i(e,t){return o(e,t)<<24>>24}function o(e,t){return e[t.offset++]}function s(e,t){return a(e,t)<<16>>16}function a(e,t){return e[t.offset++]|e[t.offset++]<<8}function c(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function u(e,t){return c(e,t)>>>0}function h(e,t){return d(e,t)}function f(e,t){return v(e,t)}function l(e,t){var n=u(e,t);return c(e,t)*Math.pow(2,32)+n}function p(e,t){var n=u(e,t);return u(e,t)*Math.pow(2,32)+n}function d(e,t){return k[0]=c(e,t),I[0]}function v(e,t){return k[A?0:1]=c(e,t),k[A?1:0]=c(e,t),E[0]}function y(e,t){return o(e,t)>0}function g(e,t){var n,i=e[t.offset++];i<192?n=31&i:217===i?n=o(e,t):218===i?n=a(e,t):219===i&&(n=u(e,t));var s=r(e,t.offset,n);return t.offset+=n,s}function _(e,t){var n=e[t.offset];return n<192&&n>160||217===n||218===n||219===n}function b(e,t){var n=e[t.offset++];return n<128?n:202===n?d(e,t):203===n?v(e,t):204===n?o(e,t):205===n?a(e,t):206===n?u(e,t):207===n?p(e,t):208===n?i(e,t):209===n?s(e,t):210===n?c(e,t):211===n?l(e,t):n>223?-1*(255-n+1):void 0}function w(e,t){var n=e[t.offset];return n<128||n>=202&&n<=211}function m(e,t){return e[t.offset]<160}function C(e,t){return e[t.offset]===S.NIL}function O(e,t){return e[t.offset]===S.INDEX_CHANGE}Object.defineProperty(t,"__esModule",{value:!0});var S=n(10);t.int8=i,t.uint8=o,t.int16=s,t.uint16=a,t.int32=c,t.uint32=u,t.float32=h,t.float64=f,t.int64=l,t.uint64=p;var A=!0,k=new Int32Array(2),I=new Float32Array(k.buffer),E=new Float64Array(k.buffer);t.readFloat32=d,t.readFloat64=v,t.boolean=y,t.string=g,t.stringCheck=_,t.number=b,t.numberCheck=w,t.arrayCheck=m,t.nilCheck=C,t.indexChangeCheck=O},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),s=n(0),a=n(1),c=n(2),u=new o.Context,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),i([o.type("string",u)],t.prototype,"name",void 0),i([o.type("string",u)],t.prototype,"type",void 0),i([o.type("uint8",u)],t.prototype,"referencedType",void 0),t}(s.Schema);t.ReflectionField=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fields=new a.ArraySchema,t}return r(t,e),i([o.type("uint8",u)],t.prototype,"id",void 0),i([o.type([h],u)],t.prototype,"fields",void 0),t}(s.Schema);t.ReflectionType=f;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.types=new a.ArraySchema,t}return r(t,e),t.encode=function(e){var n=e.constructor,r=new t;r.rootType=n._typeid;var i=n._context.types;for(var o in i){var s=new f;s.id=Number(o),function(e,t){for(var n in t){var i=new h;i.name=n;var o=void 0;if("string"==typeof t[n])o=t[n];else{var s="function"==typeof t[n],a=Array.isArray(t[n]),c=!a&&t[n].map,u=void 0;s?(o="ref",u=t[n]):a?(o="array","string"==typeof t[n][0]?o+=":"+t[n][0]:u=t[n][0]):c&&(o="map","string"==typeof t[n].map?o+=":"+t[n].map:u=t[n].map),i.referencedType=u?u._typeid:255}i.type=o,e.fields.push(i)}r.types.push(e)}(s,i[o]._schema)}return r.encodeAll()},t.decode=function(e){var n=new o.Context,i=new t;i.decode(e);var u=i.types.reduce(function(e,t){return e[t.id]=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(s.Schema),e},{});i.types.forEach(function(e,t){e.fields.forEach(function(t){var r=u[e.id];if(void 0!==t.referencedType){var i=u[t.referencedType];i||(i=t.type.split(":")[1]),0===t.type.indexOf("array")?o.type([i],n)(r.prototype,t.name):0===t.type.indexOf("map")?o.type({map:i},n)(r.prototype,t.name):"ref"===t.type&&o.type(i,n)(r.prototype,t.name)}else o.type(t.type,n)(r.prototype,t.name)})});var h=u[i.rootType],f=new h;for(var l in h._schema){var p=h._schema[l];if("string"!=typeof p){var d="function"==typeof p,v=Array.isArray(p),y=!v&&p.map;f[l]=v?new a.ArraySchema:y?new c.MapSchema:d?new p:void 0}}return f},i([o.type([f],u)],t.prototype,"types",void 0),i([o.type("uint8",u)],t.prototype,"rootType",void 0),t}(s.Schema);t.Reflection=l}])});
\ No newline at end of file
// GazeClient Version 1.0 - [https://lab.las3.de/gitlab/eye-tracking-classroom/gaze-client.js]
(function () {
'use strict';
class Observable {
constructor() {
this.listeners = {};
}
addEventListener(type, callback) {
if (this.listeners[type] === undefined) {
this.listeners[type] = [];
}
this.listeners[type].push(callback);
}
notifyAll(event) {
let listeners = this.listeners[event.type];
if (listeners) {
for (let i = 0; i < listeners.length; i++) {
listeners[i](event);
}
}
}
}
class Event {
constructor(type, data) {
this.type = type;
this.data = data;
}
}
class DataEvent extends Event {
constructor(data) {
super("dataavailable", data);
}
}
class ConnectionOpenedEvent extends Event {
constructor() {
super("connectionopened");
}
}
class ConnectionClosedEvent extends Event {
constructor() {
super("connectionclosed");
}
}
class ConnectionErrorEvent extends Event {
constructor() {
super("erroroccurred");
}
}
const DATA_SEPERATOR = ";";
class GazeData {
constructor(leftEyeX, leftEyeY, rightEyeX, rightEyeY, trackerTimeStamp,
systemTimeStamp) {
this.leftEyeX = leftEyeX;
this.leftEyeY = leftEyeY;
this.rightEyeX = rightEyeX;
this.rightEyeY = rightEyeY;
this.trackerTimeStamp = trackerTimeStamp;
this.systemTimeStamp = systemTimeStamp;
}
static fromDataString(dataString) {
let dataValues = dataString.split(DATA_SEPERATOR);
return new GazeData(parseFloat(dataValues[0]), parseFloat(dataValues[1]), parseFloat(dataValues[2]),
parseFloat(dataValues[3]), parseInt(dataValues[4]), parseInt(dataValues[5]));
}
}
class WebSocketClient extends Observable {
constructor() {
super();
}
connect(url) {
this.ws = new WebSocket(url);
this.ws.onopen = onOpen.bind(this);
this.ws.onclose = onClose.bind(this);
this.ws.onerror = onError.bind(this);
this.ws.onmessage = onMessage.bind(this);
}
}
function onOpen() {
let connectionEvent = new ConnectionOpenedEvent();
this.notifyAll(connectionEvent);
}
function onClose() {
let connectionEvent = new ConnectionClosedEvent();
this.notifyAll(connectionEvent);
}
function onError() {
let connectionEvent = new ConnectionErrorEvent();
this.notifyAll(connectionEvent);
}
function onMessage(event) {
let data = GazeData.fromDataString(event.data),
dataEvent = new DataEvent(data);
this.notifyAll(dataEvent);
}
class GazeClient extends Observable {
constructor() {
super();
}
connect(url) {
this.url = url;
this.client = new WebSocketClient();
this.client.addEventListener("connectionopened", this.onConnected.bind(this));
this.client.addEventListener("connectionclosed", this.onDisconnected.bind(this));
this.client.addEventListener("erroroccurred", this.onDisconnected.bind(this));
this.client.addEventListener("dataavailable", this.onDataAvailable
.bind(this));
this.client.connect(url);
}
onConnected(event) {
this.notifyAll(event);
}
onDisconnected(event) {
this.notifyAll(event);
}
onError(event) {
this.notifyAll(event);
}
onDataAvailable(event) {
this.notifyAll(event);
}
}
window.GazeClient = GazeClient;
}());
//# sourceMappingURL=gazeclient.js.map
{"version":3,"file":"gazeclient.js","sources":["../lib/utils/Observable.js","../lib/com/Events.js","../lib/data/GazeData.js","../lib/com/WebSocketClient.js","../lib/index.js"],"sourcesContent":["class Observable {\r\n\r\n constructor() {\r\n this.listeners = {};\r\n }\r\n\r\n addEventListener(type, callback) {\r\n if (this.listeners[type] === undefined) {\r\n this.listeners[type] = [];\r\n }\r\n this.listeners[type].push(callback);\r\n }\r\n\r\n notifyAll(event) {\r\n let listeners = this.listeners[event.type];\r\n if (listeners) {\r\n for (let i = 0; i < listeners.length; i++) {\r\n listeners[i](event);\r\n }\r\n }\r\n }\r\n\r\n}\r\n\r\nexport default Observable;","class Event {\r\n\r\n constructor(type, data) {\r\n this.type = type;\r\n this.data = data;\r\n }\r\n\r\n}\r\n\r\nclass DataEvent extends Event {\r\n constructor(data) {\r\n super(\"dataavailable\", data);\r\n }\r\n}\r\n\r\nclass ConnectionOpenedEvent extends Event {\r\n constructor() {\r\n super(\"connectionopened\");\r\n }\r\n}\r\n\r\nclass ConnectionClosedEvent extends Event {\r\n constructor() {\r\n super(\"connectionclosed\");\r\n }\r\n}\r\n\r\nclass ConnectionErrorEvent extends Event {\r\n constructor() {\r\n super(\"erroroccurred\");\r\n }\r\n}\r\n\r\nexport {DataEvent, ConnectionOpenedEvent, ConnectionClosedEvent, ConnectionErrorEvent};","const DATA_SEPERATOR = \";\";\r\n\r\nclass GazeData {\r\n constructor(leftEyeX, leftEyeY, rightEyeX, rightEyeY, trackerTimeStamp,\r\n systemTimeStamp) {\r\n this.leftEyeX = leftEyeX;\r\n this.leftEyeY = leftEyeY;\r\n this.rightEyeX = rightEyeX;\r\n this.rightEyeY = rightEyeY;\r\n this.trackerTimeStamp = trackerTimeStamp;\r\n this.systemTimeStamp = systemTimeStamp;\r\n }\r\n\r\n static fromDataString(dataString) {\r\n let dataValues = dataString.split(DATA_SEPERATOR);\r\n return new GazeData(parseFloat(dataValues[0]), parseFloat(dataValues[1]), parseFloat(dataValues[2]),\r\n parseFloat(dataValues[3]), parseInt(dataValues[4]), parseInt(dataValues[5]));\r\n }\r\n}\r\n\r\nexport default GazeData;","import Observable from \"../utils/Observable.js\";\r\nimport { ConnectionOpenedEvent, ConnectionClosedEvent, ConnectionErrorEvent,\r\n DataEvent } from \"./Events.js\";\r\nimport GazeData from \"../data/GazeData.js\";\r\n\r\nclass WebSocketClient extends Observable {\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n connect(url) {\r\n this.ws = new WebSocket(url);\r\n this.ws.onopen = onOpen.bind(this);\r\n this.ws.onclose = onClose.bind(this);\r\n this.ws.onerror = onError.bind(this);\r\n this.ws.onmessage = onMessage.bind(this);\r\n }\r\n\r\n}\r\n\r\nfunction onOpen() {\r\n let connectionEvent = new ConnectionOpenedEvent();\r\n this.notifyAll(connectionEvent);\r\n}\r\n\r\nfunction onClose() {\r\n let connectionEvent = new ConnectionClosedEvent();\r\n this.notifyAll(connectionEvent);\r\n}\r\n\r\nfunction onError() {\r\n let connectionEvent = new ConnectionErrorEvent();\r\n this.notifyAll(connectionEvent);\r\n}\r\n\r\nfunction onMessage(event) {\r\n let data = GazeData.fromDataString(event.data),\r\n dataEvent = new DataEvent(data);\r\n this.notifyAll(dataEvent);\r\n}\r\n\r\nexport default WebSocketClient;","import Observable from \"./utils/Observable.js\";\r\nimport WebSocketClient from \"./com/WebSocketClient.js\";\r\n\r\nclass GazeClient extends Observable {\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n connect(url) {\r\n this.url = url;\r\n this.client = new WebSocketClient();\r\n this.client.addEventListener(\"connectionopened\", this.onConnected.bind(this));\r\n this.client.addEventListener(\"connectionclosed\", this.onDisconnected.bind(this));\r\n this.client.addEventListener(\"erroroccurred\", this.onDisconnected.bind(this));\r\n this.client.addEventListener(\"dataavailable\", this.onDataAvailable\r\n .bind(this));\r\n this.client.connect(url);\r\n }\r\n\r\n onConnected(event) {\r\n this.notifyAll(event);\r\n }\r\n\r\n onDisconnected(event) {\r\n this.notifyAll(event);\r\n }\r\n\r\n onError(event) {\r\n this.notifyAll(event);\r\n }\r\n\r\n onDataAvailable(event) {\r\n this.notifyAll(event);\r\n }\r\n\r\n}\r\n\r\nwindow.GazeClient = GazeClient;"],"names":[],"mappings":";;;;EAAA,MAAM,UAAU,CAAC;;EAEjB,EAAE,WAAW,GAAG;EAChB,IAAI,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;EACxB,GAAG;;EAEH,EAAE,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE;EACnC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE;EAC5C,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;EAChC,KAAK;EACL,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;EACxC,GAAG;;EAEH,EAAE,SAAS,CAAC,KAAK,EAAE;EACnB,IAAI,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;EAC/C,IAAI,IAAI,SAAS,EAAE;EACnB,MAAM,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;EACjD,QAAQ,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;EAC5B,OAAO;EACP,KAAK;EACL,GAAG;;EAEH,CAAC;;ECtBD,MAAM,KAAK,CAAC;;EAEZ,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE;EAC1B,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;EACrB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;EACrB,GAAG;;EAEH,CAAC;;EAED,MAAM,SAAS,SAAS,KAAK,CAAC;EAC9B,EAAE,WAAW,CAAC,IAAI,EAAE;EACpB,IAAI,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;EACjC,GAAG;EACH,CAAC;;EAED,MAAM,qBAAqB,SAAS,KAAK,CAAC;EAC1C,EAAE,WAAW,GAAG;EAChB,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;EAC9B,GAAG;EACH,CAAC;;EAED,MAAM,qBAAqB,SAAS,KAAK,CAAC;EAC1C,EAAE,WAAW,GAAG;EAChB,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;EAC9B,GAAG;EACH,CAAC;;EAED,MAAM,oBAAoB,SAAS,KAAK,CAAC;EACzC,EAAE,WAAW,GAAG;EAChB,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;EAC3B,GAAG;EACH,CAAC;;EC/BD,MAAM,cAAc,GAAG,GAAG,CAAC;;EAE3B,MAAM,QAAQ,CAAC;EACf,EAAE,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB;EACxE,IAAI,eAAe,EAAE;EACrB,IAAI,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;EAC7B,IAAI,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;EAC7B,IAAI,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;EAC/B,IAAI,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;EAC/B,IAAI,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;EAC7C,IAAI,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;EAC3C,GAAG;;EAEH,EAAE,OAAO,cAAc,CAAC,UAAU,EAAE;EACpC,IAAI,IAAI,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;EACtD,IAAI,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;EACvG,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;EACnF,GAAG;EACH,CAAC;;ECbD,MAAM,eAAe,SAAS,UAAU,CAAC;;EAEzC,EAAE,WAAW,GAAG;EAChB,IAAI,KAAK,EAAE,CAAC;EACZ,GAAG;;EAEH,EAAE,OAAO,CAAC,GAAG,EAAE;EACf,IAAI,IAAI,CAAC,EAAE,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;EACjC,IAAI,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EACvC,IAAI,IAAI,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EACzC,IAAI,IAAI,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EACzC,IAAI,IAAI,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EAC7C,GAAG;;EAEH,CAAC;;EAED,SAAS,MAAM,GAAG;EAClB,EAAE,IAAI,eAAe,GAAG,IAAI,qBAAqB,EAAE,CAAC;EACpD,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;EAClC,CAAC;;EAED,SAAS,OAAO,GAAG;EACnB,EAAE,IAAI,eAAe,GAAG,IAAI,qBAAqB,EAAE,CAAC;EACpD,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;EAClC,CAAC;;EAED,SAAS,OAAO,GAAG;EACnB,EAAE,IAAI,eAAe,GAAG,IAAI,oBAAoB,EAAE,CAAC;EACnD,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;EAClC,CAAC;;EAED,SAAS,SAAS,CAAC,KAAK,EAAE;EAC1B,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC;EAChD,IAAI,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;EACpC,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;EAC5B,CAAC;;ECrCD,MAAM,UAAU,SAAS,UAAU,CAAC;;EAEpC,EAAE,WAAW,GAAG;EAChB,IAAI,KAAK,EAAE,CAAC;EACZ,GAAG;;EAEH,EAAE,OAAO,CAAC,GAAG,EAAE;EACf,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;EACnB,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;EACxC,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;EAClF,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;EACrF,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;EAClF,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe;EACtE,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;EACnB,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;EAC7B,GAAG;;EAEH,EAAE,WAAW,CAAC,KAAK,EAAE;EACrB,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;EAC1B,GAAG;;EAEH,EAAE,cAAc,CAAC,KAAK,EAAE;EACxB,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;EAC1B,GAAG;;EAEH,EAAE,OAAO,CAAC,KAAK,EAAE;EACjB,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;EAC1B,GAAG;;EAEH,EAAE,eAAe,CAAC,KAAK,EAAE;EACzB,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;EAC1B,GAAG;;EAEH,CAAC;;EAED,MAAM,CAAC,UAAU,GAAG,UAAU;;;;"}
\ No newline at end of file
(function(){"use strict";class Observable{constructor(){this.listeners={}}addEventListener(type,callback){if(this.listeners[type]===undefined){this.listeners[type]=[]}this.listeners[type].push(callback)}notifyAll(event){let listeners=this.listeners[event.type];if(listeners){for(let i=0;i<listeners.length;i++){listeners[i](event)}}}}class Event{constructor(type,data){this.type=type;this.data=data}}class DataEvent extends Event{constructor(data){super("dataavailable",data)}}class ConnectionOpenedEvent extends Event{constructor(){super("connectionopened")}}class ConnectionClosedEvent extends Event{constructor(){super("connectionclosed")}}class ConnectionErrorEvent extends Event{constructor(){super("erroroccurred")}}const DATA_SEPERATOR=";";class GazeData{constructor(leftEyeX,leftEyeY,rightEyeX,rightEyeY,trackerTimeStamp,systemTimeStamp){this.leftEyeX=leftEyeX;this.leftEyeY=leftEyeY;this.rightEyeX=rightEyeX;this.rightEyeY=rightEyeY;this.trackerTimeStamp=trackerTimeStamp;this.systemTimeStamp=systemTimeStamp}static fromDataString(dataString){let dataValues=dataString.split(DATA_SEPERATOR);return new GazeData(parseFloat(dataValues[0]),parseFloat(dataValues[1]),parseFloat(dataValues[2]),parseFloat(dataValues[3]),parseInt(dataValues[4]),parseInt(dataValues[5]))}}class WebSocketClient extends Observable{constructor(){super()}connect(url){this.ws=new WebSocket(url);this.ws.onopen=onOpen.bind(this);this.ws.onclose=onClose.bind(this);this.ws.onerror=onError.bind(this);this.ws.onmessage=onMessage.bind(this)}}function onOpen(){let connectionEvent=new ConnectionOpenedEvent;this.notifyAll(connectionEvent)}function onClose(){let connectionEvent=new ConnectionClosedEvent;this.notifyAll(connectionEvent)}function onError(){let connectionEvent=new ConnectionErrorEvent;this.notifyAll(connectionEvent)}function onMessage(event){let data=GazeData.fromDataString(event.data),dataEvent=new DataEvent(data);this.notifyAll(dataEvent)}class GazeClient extends Observable{constructor(){super()}connect(url){this.url=url;this.client=new WebSocketClient;this.client.addEventListener("connectionopened",this.onConnected.bind(this));this.client.addEventListener("connectionclosed",this.onDisconnected.bind(this));this.client.addEventListener("erroroccurred",this.onDisconnected.bind(this));this.client.addEventListener("dataavailable",this.onDataAvailable.bind(this));this.client.connect(url)}onConnected(event){this.notifyAll(event)}onDisconnected(event){this.notifyAll(event)}onError(event){this.notifyAll(event)}onDataAvailable(event){this.notifyAll(event)}}window.GazeClient=GazeClient})();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment