Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
221
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js
generated
vendored
Normal file
221
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js
generated
vendored
Normal file
@ -0,0 +1,221 @@
|
||||
import { __assign, __extends } from "tslib";
|
||||
import { Subject, AnonymousSubject } from '../../Subject';
|
||||
import { Subscriber } from '../../Subscriber';
|
||||
import { Observable } from '../../Observable';
|
||||
import { Subscription } from '../../Subscription';
|
||||
import { ReplaySubject } from '../../ReplaySubject';
|
||||
var DEFAULT_WEBSOCKET_CONFIG = {
|
||||
url: '',
|
||||
deserializer: function (e) { return JSON.parse(e.data); },
|
||||
serializer: function (value) { return JSON.stringify(value); },
|
||||
};
|
||||
var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }';
|
||||
var WebSocketSubject = (function (_super) {
|
||||
__extends(WebSocketSubject, _super);
|
||||
function WebSocketSubject(urlConfigOrSource, destination) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this._socket = null;
|
||||
if (urlConfigOrSource instanceof Observable) {
|
||||
_this.destination = destination;
|
||||
_this.source = urlConfigOrSource;
|
||||
}
|
||||
else {
|
||||
var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG));
|
||||
_this._output = new Subject();
|
||||
if (typeof urlConfigOrSource === 'string') {
|
||||
config.url = urlConfigOrSource;
|
||||
}
|
||||
else {
|
||||
for (var key in urlConfigOrSource) {
|
||||
if (urlConfigOrSource.hasOwnProperty(key)) {
|
||||
config[key] = urlConfigOrSource[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!config.WebSocketCtor && WebSocket) {
|
||||
config.WebSocketCtor = WebSocket;
|
||||
}
|
||||
else if (!config.WebSocketCtor) {
|
||||
throw new Error('no WebSocket constructor can be found');
|
||||
}
|
||||
_this.destination = new ReplaySubject();
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
WebSocketSubject.prototype.lift = function (operator) {
|
||||
var sock = new WebSocketSubject(this._config, this.destination);
|
||||
sock.operator = operator;
|
||||
sock.source = this;
|
||||
return sock;
|
||||
};
|
||||
WebSocketSubject.prototype._resetState = function () {
|
||||
this._socket = null;
|
||||
if (!this.source) {
|
||||
this.destination = new ReplaySubject();
|
||||
}
|
||||
this._output = new Subject();
|
||||
};
|
||||
WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) {
|
||||
var self = this;
|
||||
return new Observable(function (observer) {
|
||||
try {
|
||||
self.next(subMsg());
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
var subscription = self.subscribe({
|
||||
next: function (x) {
|
||||
try {
|
||||
if (messageFilter(x)) {
|
||||
observer.next(x);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
},
|
||||
error: function (err) { return observer.error(err); },
|
||||
complete: function () { return observer.complete(); },
|
||||
});
|
||||
return function () {
|
||||
try {
|
||||
self.next(unsubMsg());
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
};
|
||||
WebSocketSubject.prototype._connectSocket = function () {
|
||||
var _this = this;
|
||||
var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType;
|
||||
var observer = this._output;
|
||||
var socket = null;
|
||||
try {
|
||||
socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url);
|
||||
this._socket = socket;
|
||||
if (binaryType) {
|
||||
this._socket.binaryType = binaryType;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
observer.error(e);
|
||||
return;
|
||||
}
|
||||
var subscription = new Subscription(function () {
|
||||
_this._socket = null;
|
||||
if (socket && socket.readyState === 1) {
|
||||
socket.close();
|
||||
}
|
||||
});
|
||||
socket.onopen = function (evt) {
|
||||
var _socket = _this._socket;
|
||||
if (!_socket) {
|
||||
socket.close();
|
||||
_this._resetState();
|
||||
return;
|
||||
}
|
||||
var openObserver = _this._config.openObserver;
|
||||
if (openObserver) {
|
||||
openObserver.next(evt);
|
||||
}
|
||||
var queue = _this.destination;
|
||||
_this.destination = Subscriber.create(function (x) {
|
||||
if (socket.readyState === 1) {
|
||||
try {
|
||||
var serializer = _this._config.serializer;
|
||||
socket.send(serializer(x));
|
||||
}
|
||||
catch (e) {
|
||||
_this.destination.error(e);
|
||||
}
|
||||
}
|
||||
}, function (err) {
|
||||
var closingObserver = _this._config.closingObserver;
|
||||
if (closingObserver) {
|
||||
closingObserver.next(undefined);
|
||||
}
|
||||
if (err && err.code) {
|
||||
socket.close(err.code, err.reason);
|
||||
}
|
||||
else {
|
||||
observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT));
|
||||
}
|
||||
_this._resetState();
|
||||
}, function () {
|
||||
var closingObserver = _this._config.closingObserver;
|
||||
if (closingObserver) {
|
||||
closingObserver.next(undefined);
|
||||
}
|
||||
socket.close();
|
||||
_this._resetState();
|
||||
});
|
||||
if (queue && queue instanceof ReplaySubject) {
|
||||
subscription.add(queue.subscribe(_this.destination));
|
||||
}
|
||||
};
|
||||
socket.onerror = function (e) {
|
||||
_this._resetState();
|
||||
observer.error(e);
|
||||
};
|
||||
socket.onclose = function (e) {
|
||||
if (socket === _this._socket) {
|
||||
_this._resetState();
|
||||
}
|
||||
var closeObserver = _this._config.closeObserver;
|
||||
if (closeObserver) {
|
||||
closeObserver.next(e);
|
||||
}
|
||||
if (e.wasClean) {
|
||||
observer.complete();
|
||||
}
|
||||
else {
|
||||
observer.error(e);
|
||||
}
|
||||
};
|
||||
socket.onmessage = function (e) {
|
||||
try {
|
||||
var deserializer = _this._config.deserializer;
|
||||
observer.next(deserializer(e));
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
};
|
||||
};
|
||||
WebSocketSubject.prototype._subscribe = function (subscriber) {
|
||||
var _this = this;
|
||||
var source = this.source;
|
||||
if (source) {
|
||||
return source.subscribe(subscriber);
|
||||
}
|
||||
if (!this._socket) {
|
||||
this._connectSocket();
|
||||
}
|
||||
this._output.subscribe(subscriber);
|
||||
subscriber.add(function () {
|
||||
var _socket = _this._socket;
|
||||
if (_this._output.observers.length === 0) {
|
||||
if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {
|
||||
_socket.close();
|
||||
}
|
||||
_this._resetState();
|
||||
}
|
||||
});
|
||||
return subscriber;
|
||||
};
|
||||
WebSocketSubject.prototype.unsubscribe = function () {
|
||||
var _socket = this._socket;
|
||||
if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {
|
||||
_socket.close();
|
||||
}
|
||||
this._resetState();
|
||||
_super.prototype.unsubscribe.call(this);
|
||||
};
|
||||
return WebSocketSubject;
|
||||
}(AnonymousSubject));
|
||||
export { WebSocketSubject };
|
||||
//# sourceMappingURL=WebSocketSubject.js.map
|
1
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js.map
generated
vendored
Normal file
1
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
34
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js
generated
vendored
Normal file
34
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
import { Observable } from '../../Observable';
|
||||
import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider';
|
||||
import { animationFrameProvider } from '../../scheduler/animationFrameProvider';
|
||||
export function animationFrames(timestampProvider) {
|
||||
return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES;
|
||||
}
|
||||
function animationFramesFactory(timestampProvider) {
|
||||
return new Observable(function (subscriber) {
|
||||
var provider = timestampProvider || performanceTimestampProvider;
|
||||
var start = provider.now();
|
||||
var id = 0;
|
||||
var run = function () {
|
||||
if (!subscriber.closed) {
|
||||
id = animationFrameProvider.requestAnimationFrame(function (timestamp) {
|
||||
id = 0;
|
||||
var now = provider.now();
|
||||
subscriber.next({
|
||||
timestamp: timestampProvider ? now : timestamp,
|
||||
elapsed: now - start,
|
||||
});
|
||||
run();
|
||||
});
|
||||
}
|
||||
};
|
||||
run();
|
||||
return function () {
|
||||
if (id) {
|
||||
animationFrameProvider.cancelAnimationFrame(id);
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
var DEFAULT_ANIMATION_FRAMES = animationFramesFactory();
|
||||
//# sourceMappingURL=animationFrames.js.map
|
1
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js.map
generated
vendored
Normal file
1
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"animationFrames.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAuEhF,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACnE,OAAO,iBAAiB,CAAC,CAAC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAClG,CAAC;AAMD,SAAS,sBAAsB,CAAC,iBAAqC;IACnE,OAAO,IAAI,UAAU,CAAyC,UAAC,UAAU;QAIvE,IAAM,QAAQ,GAAG,iBAAiB,IAAI,4BAA4B,CAAC;QAMnE,IAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAM,GAAG,GAAG;YACV,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,EAAE,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,UAAC,SAAuC;oBACxF,EAAE,GAAG,CAAC,CAAC;oBAQP,IAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;wBAC9C,OAAO,EAAE,GAAG,GAAG,KAAK;qBACrB,CAAC,CAAC;oBACH,GAAG,EAAE,CAAC;gBACR,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC;QAEF,GAAG,EAAE,CAAC;QAEN,OAAO;YACL,IAAI,EAAE,EAAE;gBACN,sBAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;aACjD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAMD,IAAM,wBAAwB,GAAG,sBAAsB,EAAE,CAAC"}
|
54
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js
generated
vendored
Normal file
54
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
import { __assign, __rest } from "tslib";
|
||||
import { createOperatorSubscriber } from '../../operators/OperatorSubscriber';
|
||||
import { Observable } from '../../Observable';
|
||||
import { innerFrom } from '../../observable/innerFrom';
|
||||
export function fromFetch(input, initWithSelector) {
|
||||
if (initWithSelector === void 0) { initWithSelector = {}; }
|
||||
var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]);
|
||||
return new Observable(function (subscriber) {
|
||||
var controller = new AbortController();
|
||||
var signal = controller.signal;
|
||||
var abortable = true;
|
||||
var outerSignal = init.signal;
|
||||
if (outerSignal) {
|
||||
if (outerSignal.aborted) {
|
||||
controller.abort();
|
||||
}
|
||||
else {
|
||||
var outerSignalHandler_1 = function () {
|
||||
if (!signal.aborted) {
|
||||
controller.abort();
|
||||
}
|
||||
};
|
||||
outerSignal.addEventListener('abort', outerSignalHandler_1);
|
||||
subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); });
|
||||
}
|
||||
}
|
||||
var perSubscriberInit = __assign(__assign({}, init), { signal: signal });
|
||||
var handleError = function (err) {
|
||||
abortable = false;
|
||||
subscriber.error(err);
|
||||
};
|
||||
fetch(input, perSubscriberInit)
|
||||
.then(function (response) {
|
||||
if (selector) {
|
||||
innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () {
|
||||
abortable = false;
|
||||
subscriber.complete();
|
||||
}, handleError));
|
||||
}
|
||||
else {
|
||||
abortable = false;
|
||||
subscriber.next(response);
|
||||
subscriber.complete();
|
||||
}
|
||||
})
|
||||
.catch(handleError);
|
||||
return function () {
|
||||
if (abortable) {
|
||||
controller.abort();
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=fetch.js.map
|
1
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js.map
generated
vendored
Normal file
1
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AA4FvD,MAAM,UAAU,SAAS,CACvB,KAAuB,EACvB,gBAEM;IAFN,iCAAA,EAAA,qBAEM;IAEE,IAAA,QAAQ,GAAc,gBAAgB,SAA9B,EAAK,IAAI,UAAK,gBAAgB,EAAxC,YAAqB,CAAF,CAAsB;IAC/C,OAAO,IAAI,UAAU,CAAe,UAAC,UAAU;QAK7C,IAAM,UAAU,GAAG,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AAE,CAAC;aACvB;QACH,CAAC,CAAC;aACD,KAAK,CAAC,WAAW,CAAC,CAAC;QAEtB,OAAO;YACL,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
5
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js
generated
vendored
Normal file
5
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { WebSocketSubject } from './WebSocketSubject';
|
||||
export function webSocket(urlConfigOrSource) {
|
||||
return new WebSocketSubject(urlConfigOrSource);
|
||||
}
|
||||
//# sourceMappingURL=webSocket.js.map
|
1
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js.map
generated
vendored
Normal file
1
VApp/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"webSocket.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;AA+J9E,MAAM,UAAU,SAAS,CAAI,iBAAqD;IAChF,OAAO,IAAI,gBAAgB,CAAI,iBAAiB,CAAC,CAAC;AACpD,CAAC"}
|
Reference in New Issue
Block a user