Add onConnected (#39)
Closes https://github.com/dart-lang/sse/issues/38
Before this change consumers of `package:sse` must assume the connection is established immediately. Add `onConnected` to prevent this assumption and so that UIs can react accordingly.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a03a6c6..bf7899e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 3.8.0
+
+- Add `onConnected` to replace `onOpen`.
+- Fix an issue where failed requests would not add a `done` event to the
+ connection `sink`.
+
## 3.7.0
- Deprecate the client's `onOpen` getter. Messages will now be buffered until
diff --git a/lib/client/sse_client.dart b/lib/client/sse_client.dart
index 4686fa0..22aeb41 100644
--- a/lib/client/sse_client.dart
+++ b/lib/client/sse_client.dart
@@ -22,6 +22,8 @@
final _logger = Logger('SseClient');
+ final _onConnected = Completer();
+
int _lastMessageId = -1;
EventSource _eventSource;
@@ -37,8 +39,11 @@
_eventSource =
EventSource('$serverUrl?sseClientId=$clientId', withCredentials: true);
_serverUrl = '$serverUrl?sseClientId=$clientId';
- _eventSource.onOpen.first.whenComplete(() => _outgoingController.stream
- .listen(_onOutgoingMessage, onDone: _onOutgoingDone));
+ _eventSource.onOpen.first.whenComplete(() {
+ _onConnected.complete();
+ _outgoingController.stream
+ .listen(_onOutgoingMessage, onDone: _onOutgoingDone);
+ });
_eventSource.addEventListener('message', _onIncomingMessage);
_eventSource.addEventListener('control', _onIncomingControlMessage);
@@ -57,11 +62,11 @@
});
}
- @Deprecated(
- 'Outgoing messages are now buffered until a connection is established.'
- 'This should no longer be required and will be removed.')
+ @Deprecated('Use onConnected instead.')
Stream<Event> get onOpen => _eventSource.onOpen;
+ Future<void> get onConnected => _onConnected.future;
+
/// Add messages to this [StreamSink] to send them to the server.
///
/// The message added to the sink has to be JSON encodable. Messages that fail
@@ -77,6 +82,10 @@
void close() {
_eventSource.close();
+ // If the _outgoingController doesn't have a listener that means the
+ // initial connection was never established. Add a listener so close
+ // adds a done event to [sink].
+ if (!_outgoingController.hasListener) _outgoingController.stream.drain();
_incomingController.close();
_outgoingController.close();
}
diff --git a/pubspec.yaml b/pubspec.yaml
index b2b8b3f..8f15aff 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: sse
-version: 3.7.0
+version: 3.8.0
homepage: https://github.com/dart-lang/sse
description: >-
Provides client and server functionality for setting up bi-directional
diff --git a/test/web/index.dart.js b/test/web/index.dart.js
index 1d2b6b6..034c69b 100644
--- a/test/web/index.dart.js
+++ b/test/web/index.dart.js
@@ -1,4 +1,4 @@
-// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.12.0-33.0.dev.
+// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.12.0-223.0.dev.
// The code supports the following hooks:
// dartPrint(message):
// if this function is defined it is called instead of the Dart [print]
@@ -27,6 +27,14 @@
to[key] = from[key];
}
}
+ function mixinProperties(from, to) {
+ var keys = Object.keys(from);
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ if (!to.hasOwnProperty(key))
+ to[key] = from[key];
+ }
+ }
var supportsDirectProtoAccess = function() {
var cls = function() {
};
@@ -58,7 +66,7 @@
for (var j = 0; j < keys.length; j++) {
var key = keys[j];
var f = holder[key];
- if (typeof f == 'function')
+ if (typeof f == "function")
f.name = key;
}
}
@@ -81,7 +89,7 @@
inherit(classes[i], sup);
}
function mixin(cls, mixin) {
- copyProperties(mixin.prototype, cls.prototype);
+ mixinProperties(mixin.prototype, cls.prototype);
cls.prototype.constructor = cls;
}
function lazyOld(holder, name, getterName, initializer) {
@@ -170,7 +178,7 @@
var funs = [];
for (var i = 0; i < funsOrNames.length; i++) {
var fun = funsOrNames[i];
- if (typeof fun == 'string')
+ if (typeof fun == "string")
fun = container[fun];
fun.$callName = callNames[i];
funs.push(fun);
@@ -259,6 +267,8 @@
LateError: function LateError(t0) {
this._message = t0;
},
+ nullFuture_closure: function nullFuture_closure() {
+ },
NotNullableError: function NotNullableError(t0, t1) {
this.__internal$_name = t0;
this.$ti = t1;
@@ -445,7 +455,7 @@
},
TypeErrorDecoder_extractPattern: function(message) {
var match, $arguments, argumentsExpr, expr, method, receiver;
- message = H.quoteStringForRegExp(message.replace(String({}), '$receiver$'));
+ message = H.quoteStringForRegExp(message.replace(String({}), "$receiver$"));
match = message.match(/\\\$[a-zA-Z]+\\\$/g);
if (match == null)
match = H.setRuntimeTypeInfo([], type$.JSArray_String);
@@ -454,11 +464,11 @@
expr = match.indexOf("\\$expr\\$");
method = match.indexOf("\\$method\\$");
receiver = match.indexOf("\\$receiver\\$");
- return new H.TypeErrorDecoder(message.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'), '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver);
+ return new H.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver);
},
TypeErrorDecoder_provokeCallErrorOn: function(expression) {
return function($expr$) {
- var $argumentsExpr$ = '$arguments$';
+ var $argumentsExpr$ = "$arguments$";
try {
$expr$.$method$($argumentsExpr$);
} catch (e) {
@@ -2753,9 +2763,15 @@
$indexSet$ax: function(receiver, a0, a1) {
return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1);
},
+ _removeEventListener$3$x: function(receiver, a0, a1, a2) {
+ return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2);
+ },
addEventListener$3$x: function(receiver, a0, a1, a2) {
return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2);
},
+ forEach$1$ax: function(receiver, a0) {
+ return J.getInterceptor$ax(receiver).forEach$1(receiver, a0);
+ },
startsWith$1$s: function(receiver, a0) {
return J.getInterceptor$s(receiver).startsWith$1(receiver, a0);
},
@@ -2882,17 +2898,6 @@
}($function, 1);
return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic);
},
- _Future__chainForeignFuture: function(source, target) {
- var e, s, exception;
- target._state = 1;
- try {
- source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), type$.Null);
- } catch (exception) {
- e = H.unwrapException(exception);
- s = H.getTraceFromException(exception);
- P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s));
- }
- },
_Future__chainCoreFuture: function(source, target) {
var t1, t2, listeners;
for (t1 = type$._Future_dynamic; t2 = source._state, t2 === 2;)
@@ -2969,17 +2974,26 @@
$.Zone__current = oldZone;
t1 = _box_0.listenerValueOrError;
if (t4._is(t1)) {
+ t5 = _box_0.listener.$ti;
+ t5 = t5._eval$1("Future<2>")._is(t1) || !t5._rest[1]._is(t1);
+ } else
+ t5 = false;
+ if (t5) {
+ t4._as(t1);
result = _box_0.listener.result;
- if (t1._state >= 4) {
- current = t3._as(result._resultOrListeners);
- result._resultOrListeners = null;
- listeners = result._reverseListeners$1(current);
- result._state = t1._state;
- result._resultOrListeners = t1._resultOrListeners;
- _box_1.source = t1;
- continue;
- } else
- P._Future__chainCoreFuture(t1, result);
+ if (t1 instanceof P._Future)
+ if (t1._state >= 4) {
+ current = t3._as(result._resultOrListeners);
+ result._resultOrListeners = null;
+ listeners = result._reverseListeners$1(current);
+ result._state = t1._state;
+ result._resultOrListeners = t1._resultOrListeners;
+ _box_1.source = t1;
+ continue;
+ } else
+ P._Future__chainCoreFuture(t1, result);
+ else
+ result._chainForeignFuture$1(t1);
return;
}
}
@@ -3009,7 +3023,7 @@
t1 = type$.dynamic_Function_Object;
if (t1._is(errorHandler))
return t1._as(errorHandler);
- throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result"));
+ throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a valid result"));
},
_microtaskLoop: function() {
var entry, next;
@@ -3084,6 +3098,10 @@
_runGuarded: function(notificationHandler) {
return;
},
+ _BufferingStreamSubscription__registerDataHandler: function(zone, handleData, $T) {
+ var t1 = handleData == null ? P.async___nullDataHandler$closure() : handleData;
+ return type$.$env_1_1_void._bind$1($T)._eval$1("1(2)")._as(t1);
+ },
_BufferingStreamSubscription__registerErrorHandler: function(zone, handleError) {
if (handleError == null)
handleError = P.async___nullErrorHandler$closure();
@@ -3093,11 +3111,20 @@
return type$.dynamic_Function_Object._as(handleError);
throw H.wrapException(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace."));
},
+ _nullDataHandler: function(value) {
+ },
_nullErrorHandler: function(error, stackTrace) {
P._rootHandleUncaughtError(null, null, $.Zone__current, error, stackTrace);
},
_nullDoneHandler: function() {
},
+ _cancelAndValue: function(subscription, future, value) {
+ var cancelFuture = subscription.cancel$0();
+ if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture())
+ cancelFuture.whenComplete$1(new P._cancelAndValue_closure(future, value));
+ else
+ future._complete$1(value);
+ },
Timer_Timer: function(duration, callback) {
var t1 = $.Zone__current;
if (t1 === C.C__RootZone)
@@ -3236,13 +3263,13 @@
this.$this = t1;
},
_Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) {
- this.target = t0;
+ this.$this = t0;
},
_Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) {
- this.target = t0;
+ this.$this = t0;
},
_Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) {
- this.target = t0;
+ this.$this = t0;
this.e = t1;
this.s = t2;
},
@@ -3289,6 +3316,14 @@
this._box_0 = t0;
this.future = t1;
},
+ Stream_first_closure: function Stream_first_closure(t0) {
+ this.future = t0;
+ },
+ Stream_first_closure0: function Stream_first_closure0(t0, t1, t2) {
+ this.$this = t0;
+ this.subscription = t1;
+ this.future = t2;
+ },
StreamSubscription: function StreamSubscription() {
},
StreamTransformerBase: function StreamTransformerBase() {
@@ -3335,6 +3370,19 @@
},
_BufferingStreamSubscription: function _BufferingStreamSubscription() {
},
+ _BufferingStreamSubscription_asFuture_closure: function _BufferingStreamSubscription_asFuture_closure(t0, t1) {
+ this._box_0 = t0;
+ this.result = t1;
+ },
+ _BufferingStreamSubscription_asFuture_closure0: function _BufferingStreamSubscription_asFuture_closure0(t0, t1) {
+ this.$this = t0;
+ this.result = t1;
+ },
+ _BufferingStreamSubscription_asFuture__closure: function _BufferingStreamSubscription_asFuture__closure(t0, t1, t2) {
+ this.result = t0;
+ this.error = t1;
+ this.stackTrace = t2;
+ },
_BufferingStreamSubscription__sendError_sendError: function _BufferingStreamSubscription__sendError_sendError(t0, t1, t2) {
this.$this = t0;
this.error = t1;
@@ -3374,6 +3422,10 @@
_StreamIterator: function _StreamIterator(t0) {
this.$ti = t0;
},
+ _cancelAndValue_closure: function _cancelAndValue_closure(t0, t1) {
+ this.future = t0;
+ this.value = t1;
+ },
AsyncError: function AsyncError(t0, t1) {
this.error = t0;
this.stackTrace = t1;
@@ -3836,6 +3888,21 @@
StringBuffer: function StringBuffer(t0) {
this._contents = t0;
},
+ _convertDartToNative_Value: function(value) {
+ var array;
+ if (value == null)
+ return value;
+ if (typeof value == "string" || typeof value == "number" || H._isBool(value))
+ return value;
+ if (type$.Map_dynamic_dynamic._is(value))
+ return P.convertDartToNative_Dictionary(value);
+ if (type$.List_dynamic._is(value)) {
+ array = [];
+ J.forEach$1$ax(value, new P._convertDartToNative_Value_closure(array));
+ value = array;
+ }
+ return value;
+ },
convertDartToNative_Dictionary: function(dict) {
var object = {};
dict.forEach$1(0, new P.convertDartToNative_Dictionary_closure(object));
@@ -3847,6 +3914,9 @@
this._box_0 = t0;
this.$this = t1;
},
+ _convertDartToNative_Value_closure: function _convertDartToNative_Value_closure(t0) {
+ this.array = t0;
+ },
convertDartToNative_Dictionary_closure: function convertDartToNative_Dictionary_closure(t0) {
this.object = t0;
},
@@ -3898,10 +3968,10 @@
return t1;
},
_EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) {
- var t1 = W._wrapZone(new W._EventStreamSubscription_closure(onData), type$.Event);
- if (t1 != null && true)
- J.addEventListener$3$x(_target, _eventType, t1, false);
- return new W._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>"));
+ var t1 = onData == null ? null : W._wrapZone(new W._EventStreamSubscription_closure(onData), type$.Event);
+ t1 = new W._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>"));
+ t1._tryResume$0();
+ return t1;
},
_wrapZone: function(callback, $T) {
var t1 = $.Zone__current;
@@ -3975,42 +4045,48 @@
},
_EventStreamSubscription_closure: function _EventStreamSubscription_closure(t0) {
this.onData = t0;
+ },
+ _EventStreamSubscription_onData_closure: function _EventStreamSubscription_onData_closure(t0) {
+ this.handleData = t0;
}
},
- N = {
- Logger_Logger: function($name) {
- return $.Logger__loggers.putIfAbsent$2($name, new N.Logger_Logger_closure($name));
- },
- Logger: function Logger(t0, t1, t2) {
- this.name = t0;
- this.parent = t1;
- this._children = t2;
- },
- Logger_Logger_closure: function Logger_Logger_closure(t0) {
- this.name = t0;
- },
- Level: function Level(t0, t1) {
+ Y = {Level: function Level(t0, t1) {
this.name = t0;
this.value = t1;
- },
- LogRecord: function LogRecord(t0, t1, t2) {
+ }},
+ L = {LogRecord: function LogRecord(t0, t1, t2) {
this.level = t0;
this.message = t1;
this.loggerName = t2;
+ }},
+ F = {
+ Logger_Logger: function($name) {
+ return $.Logger__loggers.putIfAbsent$2($name, new F.Logger_Logger_closure($name));
+ },
+ Logger: function Logger(t0, t1, t2) {
+ var _ = this;
+ _.name = t0;
+ _.parent = t1;
+ _._level = null;
+ _._children = t2;
+ },
+ Logger_Logger_closure: function Logger_Logger_closure(t0) {
+ this.name = t0;
}
},
M = {
SseClient$: function(serverUrl) {
var t1 = type$.legacy_String;
- t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), N.Logger_Logger("SseClient"));
+ t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), F.Logger_Logger("SseClient"), new P._AsyncCompleter(new P._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic));
t1.SseClient$1(serverUrl);
return t1;
},
- SseClient: function SseClient(t0, t1, t2) {
+ SseClient: function SseClient(t0, t1, t2, t3) {
var _ = this;
_._incomingController = t0;
_._outgoingController = t1;
_._logger = t2;
+ _._onConnected = t3;
_._lastMessageId = -1;
_._errorTimer = _._serverUrl = _._eventSource = null;
},
@@ -4020,6 +4096,9 @@
SseClient_closure0: function SseClient_closure0(t0) {
this.$this = t0;
},
+ SseClient_closure1: function SseClient_closure1(t0) {
+ this.$this = t0;
+ },
SseClient__closure: function SseClient__closure(t0, t1) {
this.$this = t0;
this.error = t1;
@@ -4062,7 +4141,7 @@
this.channel = t0;
}
};
- var holders = [C, H, J, P, W, N, M, T, R, E];
+ var holders = [C, H, J, P, W, Y, L, F, M, T, R, E];
hunkHelpers.setFunctionNamesIfNecessary(holders);
var $ = {};
H.JS_CONST.prototype = {};
@@ -4124,6 +4203,16 @@
H.throwExpression(P.UnsupportedError$("add"));
receiver.push(value);
},
+ forEach$1: function(receiver, f) {
+ var end, i;
+ H._arrayInstanceType(receiver)._eval$1("~(1)")._as(f);
+ end = receiver.length;
+ for (i = 0; i < end; ++i) {
+ f.call$1(receiver[i]);
+ if (receiver.length !== end)
+ throw H.wrapException(P.ConcurrentModificationError$(receiver));
+ }
+ },
get$last: function(receiver) {
var t1 = receiver.length;
if (t1 > 0)
@@ -4360,6 +4449,14 @@
return message != null ? "LateInitializationError: " + message : "LateInitializationError";
}
};
+ H.nullFuture_closure.prototype = {
+ call$0: function() {
+ var t1 = new P._Future($.Zone__current, type$._Future_Null);
+ t1._asyncComplete$1(null);
+ return t1;
+ },
+ $signature: 14
+ };
H.NotNullableError.prototype = {
toString$0: function(_) {
return "Null is not a valid value for the parameter '" + this.__internal$_name + "' of type '" + H.createRuntimeType(this.$ti._precomputed1).toString$0(0) + "'";
@@ -4378,8 +4475,7 @@
};
H.ListIterator.prototype = {
get$current: function() {
- var cur = this.__internal$_current;
- return cur;
+ return this.__internal$_current;
},
moveNext$0: function() {
var t3, _this = this,
@@ -4737,13 +4833,13 @@
call$2: function(o, tag) {
return this.getUnknownTag(o, tag);
},
- $signature: 12
+ $signature: 15
};
H.initHooks_closure1.prototype = {
call$1: function(tag) {
return this.prototypeForTag(H._asStringS(tag));
},
- $signature: 13
+ $signature: 16
};
H.NativeTypedData.prototype = {};
H.NativeTypedArray.prototype = {
@@ -4865,7 +4961,7 @@
t2 = this.span;
t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);
},
- $signature: 14
+ $signature: 17
};
P._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = {
call$0: function() {
@@ -4929,7 +5025,8 @@
t1._completeError$2(e, st);
else
t1._asyncCompleteError$2(e, st);
- }
+ },
+ $isCompleter: 1
};
P._awaitOnObject_closure.prototype = {
call$1: function(result) {
@@ -4941,13 +5038,13 @@
call$2: function(error, stackTrace) {
this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace)));
},
- $signature: 15
+ $signature: 18
};
P._wrapJsFunctionForAsync_closure.prototype = {
call$2: function(errorCode, result) {
this.$protected(H._asIntS(errorCode), result);
},
- $signature: 16
+ $signature: 19
};
P._Completer.prototype = {
completeError$2: function(error, stackTrace) {
@@ -4962,7 +5059,8 @@
},
completeError$1: function(error) {
return this.completeError$2(error, null);
- }
+ },
+ $isCompleter: 1
};
P._AsyncCompleter.prototype = {
complete$1: function(_, value) {
@@ -4973,6 +5071,9 @@
if (t2._state !== 0)
throw H.wrapException(P.StateError$("Future already completed"));
t2._asyncComplete$1(t1._eval$1("1/")._as(value));
+ },
+ complete$0: function($receiver) {
+ return this.complete$1($receiver, null);
}
};
P._FutureListener.prototype = {
@@ -5028,11 +5129,6 @@
this._addListener$1(new P._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>")));
return result;
},
- _setValue$1: function(value) {
- this.$ti._precomputed1._as(value);
- this._state = 4;
- this._resultOrListeners = value;
- },
_addListener$1: function(listener) {
var source, _this = this,
t1 = _this._state;
@@ -5096,6 +5192,17 @@
}
return prev;
},
+ _chainForeignFuture$1: function(source) {
+ var e, s, exception, _this = this;
+ _this._state = 1;
+ try {
+ source.then$1$2$onError(new P._Future__chainForeignFuture_closure(_this), new P._Future__chainForeignFuture_closure0(_this), type$.Null);
+ } catch (exception) {
+ e = H.unwrapException(exception);
+ s = H.getTraceFromException(exception);
+ P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(_this, e, s));
+ }
+ },
_complete$1: function(value) {
var listeners, _this = this,
t1 = _this.$ti;
@@ -5104,7 +5211,7 @@
if (t1._is(value))
P._Future__chainCoreFuture(value, _this);
else
- P._Future__chainForeignFuture(value, _this);
+ _this._chainForeignFuture$1(value);
else {
listeners = _this._removeListeners$0();
t1._precomputed1._as(value);
@@ -5157,7 +5264,7 @@
P._Future__chainCoreFuture(value, _this);
return;
}
- P._Future__chainForeignFuture(value, _this);
+ _this._chainForeignFuture$1(value);
},
_asyncCompleteError$2: function(error, stackTrace) {
type$.StackTrace._as(stackTrace);
@@ -5180,21 +5287,28 @@
};
P._Future__chainForeignFuture_closure.prototype = {
call$1: function(value) {
- var t1 = this.target;
+ var error, stackTrace, exception,
+ t1 = this.$this;
t1._state = 0;
- t1._complete$1(value);
+ try {
+ t1._completeWithValue$1(t1.$ti._precomputed1._as(value));
+ } catch (exception) {
+ error = H.unwrapException(exception);
+ stackTrace = H.getTraceFromException(exception);
+ t1._completeError$2(error, stackTrace);
+ }
},
$signature: 5
};
P._Future__chainForeignFuture_closure0.prototype = {
call$2: function(error, stackTrace) {
- this.target._completeError$2(error, type$.StackTrace._as(stackTrace));
+ this.$this._completeError$2(error, type$.StackTrace._as(stackTrace));
},
- $signature: 18
+ $signature: 7
};
P._Future__chainForeignFuture_closure1.prototype = {
call$0: function() {
- this.target._completeError$2(this.e, this.s);
+ this.$this._completeError$2(this.e, this.s);
},
$signature: 0
};
@@ -5261,7 +5375,7 @@
call$1: function(_) {
return this.originalSource;
},
- $signature: 19
+ $signature: 21
};
P._Future__propagateToListeners_handleValueCallback.prototype = {
call$0: function() {
@@ -5317,6 +5431,12 @@
t1.count = 0;
this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1, this), true, new P.Stream_length_closure0(t1, future), future.get$_completeError());
return future;
+ },
+ get$first: function(_) {
+ var future = new P._Future($.Zone__current, H._instanceType(this)._eval$1("_Future<1>")),
+ subscription = this.listen$4$cancelOnError$onDone$onError(null, true, new P.Stream_first_closure(future), future.get$_completeError());
+ subscription.onData$1(new P.Stream_first_closure0(this, subscription, future));
+ return future;
}
};
P.Stream_length_closure.prototype = {
@@ -5334,6 +5454,32 @@
},
$signature: 0
};
+ P.Stream_first_closure.prototype = {
+ call$0: function() {
+ var e, s, t1, exception, error, stackTrace;
+ try {
+ t1 = H.IterableElementError_noElement();
+ throw H.wrapException(t1);
+ } catch (exception) {
+ e = H.unwrapException(exception);
+ s = H.getTraceFromException(exception);
+ error = e;
+ stackTrace = s;
+ if (stackTrace == null)
+ stackTrace = P.AsyncError_defaultStackTrace(error);
+ this.future._completeError$2(error, stackTrace);
+ }
+ },
+ $signature: 0
+ };
+ P.Stream_first_closure0.prototype = {
+ call$1: function(value) {
+ P._cancelAndValue(this.subscription, this.future, H._instanceType(this.$this)._precomputed1._as(value));
+ },
+ $signature: function() {
+ return H._instanceType(this.$this)._eval$1("~(1)");
+ }
+ };
P.StreamSubscription.prototype = {};
P.StreamTransformerBase.prototype = {};
P._StreamController.prototype = {
@@ -5400,7 +5546,7 @@
return _this._ensureDoneFuture$0();
},
_subscribe$4: function(onData, onError, onDone, cancelOnError) {
- var t2, t3, t4, t5, t6, subscription, pendingEvents, addState, _this = this,
+ var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this,
t1 = H._instanceType(_this);
t1._eval$1("~(1)?")._as(onData);
type$.nullable_void_Function._as(onDone);
@@ -5408,11 +5554,11 @@
throw H.wrapException(P.StateError$("Stream has already been listened to."));
t2 = $.Zone__current;
t3 = cancelOnError ? 1 : 0;
- type$.$env_1_1_void._bind$1(t1._precomputed1)._eval$1("1(2)")._as(onData);
- t4 = P._BufferingStreamSubscription__registerErrorHandler(t2, onError);
- t5 = onDone == null ? P.async___nullDoneHandler$closure() : onDone;
- t6 = type$.void_Function;
- subscription = new P._ControllerSubscription(_this, onData, t4, t6._as(t5), t2, t3, t1._eval$1("_ControllerSubscription<1>"));
+ t4 = P._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1);
+ t5 = P._BufferingStreamSubscription__registerErrorHandler(t2, onError);
+ t6 = onDone == null ? P.async___nullDoneHandler$closure() : onDone;
+ t7 = type$.void_Function;
+ subscription = new P._ControllerSubscription(_this, t4, t5, t7._as(t6), t2, t3, t1._eval$1("_ControllerSubscription<1>"));
pendingEvents = _this.get$_pendingEvents();
t3 = _this._state |= 1;
if ((t3 & 8) !== 0) {
@@ -5422,7 +5568,7 @@
} else
_this._varData = subscription;
subscription._setPendingEvents$1(pendingEvents);
- t1 = t6._as(new P._StreamController__subscribe_closure(_this));
+ t1 = t7._as(new P._StreamController__subscribe_closure(_this));
t2 = subscription._state;
subscription._state = t2 | 32;
t1.call$0();
@@ -5540,6 +5686,27 @@
pendingEvents.schedule$1(_this);
}
},
+ onData$1: function(handleData) {
+ var t1 = H._instanceType(this);
+ this.set$_onData(P._BufferingStreamSubscription__registerDataHandler(this._zone, t1._eval$1("~(1)?")._as(handleData), t1._precomputed1));
+ },
+ cancel$0: function() {
+ var t1 = this._state &= 4294967279;
+ if ((t1 & 8) === 0)
+ this._cancel$0();
+ t1 = this._cancelFuture;
+ return t1 == null ? $.$get$Future__nullFuture() : t1;
+ },
+ asFuture$1$1: function(futureValue, $E) {
+ var result, t1 = {};
+ $E._eval$1("0?")._as(futureValue);
+ t1.resultValue = null;
+ t1.resultValue = $E._as(futureValue);
+ result = new P._Future($.Zone__current, $E._eval$1("_Future<0>"));
+ this.set$_onDone(new P._BufferingStreamSubscription_asFuture_closure(t1, result));
+ this._onError = new P._BufferingStreamSubscription_asFuture_closure0(this, result);
+ return result;
+ },
_cancel$0: function() {
var t2, _this = this,
t1 = _this._state |= 8;
@@ -5650,12 +5817,41 @@
if ((t1 & 64) !== 0 && t1 < 128)
_this._pending.schedule$1(_this);
},
+ set$_onData: function(_onData) {
+ this._onData = H._instanceType(this)._eval$1("~(1)")._as(_onData);
+ },
+ set$_onDone: function(_onDone) {
+ this._onDone = type$.void_Function._as(_onDone);
+ },
set$_pending: function(_pending) {
this._pending = H._instanceType(this)._eval$1("_PendingEvents<1>?")._as(_pending);
},
$isStreamSubscription: 1,
$is_EventDispatch: 1
};
+ P._BufferingStreamSubscription_asFuture_closure.prototype = {
+ call$0: function() {
+ this.result._complete$1(this._box_0.resultValue);
+ },
+ $signature: 0
+ };
+ P._BufferingStreamSubscription_asFuture_closure0.prototype = {
+ call$2: function(error, stackTrace) {
+ var cancelFuture = this.$this.cancel$0(),
+ t1 = this.result;
+ if (cancelFuture != $.$get$Future__nullFuture())
+ cancelFuture.whenComplete$1(new P._BufferingStreamSubscription_asFuture__closure(t1, error, stackTrace));
+ else
+ t1._completeError$2(error, stackTrace);
+ },
+ $signature: 7
+ };
+ P._BufferingStreamSubscription_asFuture__closure.prototype = {
+ call$0: function() {
+ this.result._completeError$2(this.error, this.stackTrace);
+ },
+ $signature: 1
+ };
P._BufferingStreamSubscription__sendError_sendError.prototype = {
call$0: function() {
var onError, t3, t4,
@@ -5698,6 +5894,9 @@
listen$1: function(onData) {
return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null);
},
+ listen$2$cancelOnError: function(onData, cancelOnError) {
+ return this.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, null, null);
+ },
listen$2$onDone: function(onData, onDone) {
return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, null);
}
@@ -5778,6 +5977,12 @@
}
};
P._StreamIterator.prototype = {};
+ P._cancelAndValue_closure.prototype = {
+ call$0: function() {
+ return this.future._complete$1(this.value);
+ },
+ $signature: 0
+ };
P.AsyncError.prototype = {
toString$0: function(_) {
return H.S(this.error);
@@ -5909,6 +6114,16 @@
elementAt$1: function(receiver, index) {
return this.$index(receiver, index);
},
+ forEach$1: function(receiver, action) {
+ var $length, i;
+ H.instanceType(receiver)._eval$1("~(ListMixin.E)")._as(action);
+ $length = this.get$length(receiver);
+ for (i = 0; i < $length; ++i) {
+ action.call$1(this.$index(receiver, i));
+ if ($length !== this.get$length(receiver))
+ throw H.wrapException(P.ConcurrentModificationError$(receiver));
+ }
+ },
get$isNotEmpty: function(receiver) {
return this.get$length(receiver) !== 0;
},
@@ -5929,7 +6144,7 @@
t1._contents = t2 + ": ";
t1._contents += H.S(v);
},
- $signature: 7
+ $signature: 8
};
P.MapMixin.prototype = {
forEach$1: function(_, action) {
@@ -6289,7 +6504,7 @@
C.JSArray_methods.$indexSet(t1, t2.i++, key);
C.JSArray_methods.$indexSet(t1, t2.i++, value);
},
- $signature: 7
+ $signature: 8
};
P._JsonStringStringifier.prototype = {
get$_partialResult: function() {
@@ -6357,7 +6572,7 @@
return "0000" + n;
return "00000" + n;
},
- $signature: 8
+ $signature: 9
};
P.Duration_toString_twoDigits.prototype = {
call$1: function(n) {
@@ -6365,7 +6580,7 @@
return "" + n;
return "0" + n;
},
- $signature: 8
+ $signature: 9
};
P.Error.prototype = {
get$stackTrace: function() {
@@ -6605,6 +6820,9 @@
_addEventListener$3: function(receiver, type, listener, options) {
return receiver.addEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), options);
},
+ _removeEventListener$3: function(receiver, type, listener, options) {
+ return receiver.removeEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), false);
+ },
$isEventTarget: 1
};
W.FormElement.prototype = {
@@ -6637,7 +6855,7 @@
else
t3.completeError$1(e);
},
- $signature: 20
+ $signature: 22
};
W.HttpRequestEventTarget.prototype = {};
W.MessageEvent.prototype = {$isMessageEvent: 1};
@@ -6665,12 +6883,62 @@
}
};
W._ElementEventStreamImpl.prototype = {};
- W._EventStreamSubscription.prototype = {};
+ W._EventStreamSubscription.prototype = {
+ cancel$0: function() {
+ var _this = this;
+ if (_this._target == null)
+ return $.$get$nullFuture();
+ _this._unlisten$0();
+ _this._target = null;
+ _this.set$_html$_onData(null);
+ return $.$get$nullFuture();
+ },
+ onData$1: function(handleData) {
+ var t1, _this = this;
+ _this.$ti._eval$1("~(1)?")._as(handleData);
+ if (_this._target == null)
+ throw H.wrapException(P.StateError$("Subscription has been canceled."));
+ _this._unlisten$0();
+ t1 = W._wrapZone(new W._EventStreamSubscription_onData_closure(handleData), type$.Event);
+ _this.set$_html$_onData(t1);
+ _this._tryResume$0();
+ },
+ _tryResume$0: function() {
+ var t2,
+ t1 = this._html$_onData;
+ if (t1 != null && true) {
+ t2 = this._target;
+ t2.toString;
+ J.addEventListener$3$x(t2, this._eventType, t1, false);
+ }
+ },
+ _unlisten$0: function() {
+ var t3,
+ t1 = this._html$_onData,
+ t2 = t1 != null;
+ if (t2) {
+ t3 = this._target;
+ t3.toString;
+ type$.nullable_dynamic_Function_Event._as(t1);
+ if (t2)
+ J._removeEventListener$3$x(t3, this._eventType, t1, false);
+ }
+ },
+ set$_html$_onData: function(_onData) {
+ this._html$_onData = type$.nullable_dynamic_Function_Event._as(_onData);
+ }
+ };
W._EventStreamSubscription_closure.prototype = {
call$1: function(e) {
return this.onData.call$1(type$.Event._as(e));
},
- $signature: 21
+ $signature: 10
+ };
+ W._EventStreamSubscription_onData_closure.prototype = {
+ call$1: function(e) {
+ return this.handleData.call$1(type$.Event._as(e));
+ },
+ $signature: 10
};
P._AcceptStructuredClone.prototype = {
findSlot$1: function(value) {
@@ -6756,13 +7024,19 @@
J.$indexSet$ax(t1, key, t2);
return t2;
},
- $signature: 22
+ $signature: 23
+ };
+ P._convertDartToNative_Value_closure.prototype = {
+ call$1: function(element) {
+ this.array.push(P._convertDartToNative_Value(element));
+ },
+ $signature: 2
};
P.convertDartToNative_Dictionary_closure.prototype = {
call$2: function(key, value) {
- this.object[key] = value;
+ this.object[key] = P._convertDartToNative_Value(value);
},
- $signature: 23
+ $signature: 24
};
P._AcceptStructuredCloneDart2Js.prototype = {
forEachJsField$2: function(object, action) {
@@ -6798,57 +7072,11 @@
return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent);
}
};
- N.Logger.prototype = {
- get$fullName: function() {
- var t1 = this.parent,
- t2 = t1 == null || t1.name === "",
- t3 = this.name;
- return t2 ? t3 : t1.get$fullName() + "." + t3;
- },
- get$level: function() {
- return C.Level_INFO_800;
- },
- log$4: function(logLevel, message, error, stackTrace) {
- var t1 = logLevel.value;
- if (t1 >= this.get$level().value) {
- if (t1 >= 2000) {
- P.StackTrace_current();
- logLevel.toString$0(0);
- }
- t1 = this.get$fullName();
- Date.now();
- $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1;
- $.$get$Logger_root()._publish$1(new N.LogRecord(logLevel, message, t1));
- }
- },
- _publish$1: function(record) {
- }
- };
- N.Logger_Logger_closure.prototype = {
- call$0: function() {
- var dot, $parent, t1,
- thisName = this.name;
- if (C.JSString_methods.startsWith$1(thisName, "."))
- H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'"));
- dot = C.JSString_methods.lastIndexOf$1(thisName, ".");
- if (dot === -1)
- $parent = thisName !== "" ? N.Logger_Logger("") : null;
- else {
- $parent = N.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot));
- thisName = C.JSString_methods.substring$1(thisName, dot + 1);
- }
- t1 = new N.Logger(thisName, $parent, new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_legacy_Logger));
- if ($parent != null)
- $parent._children.$indexSet(0, thisName, t1);
- return t1;
- },
- $signature: 24
- };
- N.Level.prototype = {
+ Y.Level.prototype = {
$eq: function(_, other) {
if (other == null)
return false;
- return other instanceof N.Level && this.value === other.value;
+ return other instanceof Y.Level && this.value === other.value;
},
get$hashCode: function(_) {
return this.value;
@@ -6857,33 +7085,98 @@
return this.name;
}
};
- N.LogRecord.prototype = {
+ L.LogRecord.prototype = {
toString$0: function(_) {
return "[" + this.level.name + "] " + this.loggerName + ": " + this.message;
}
};
+ F.Logger.prototype = {
+ get$fullName: function() {
+ var t1 = this.parent,
+ t2 = t1 == null || t1.name === "",
+ t3 = this.name;
+ return t2 ? t3 : t1.get$fullName() + "." + t3;
+ },
+ get$level: function() {
+ var effectiveLevel, t1;
+ if (this.parent == null)
+ effectiveLevel = this._level;
+ else {
+ t1 = $.$get$Logger_root();
+ effectiveLevel = t1._level;
+ }
+ return effectiveLevel;
+ },
+ log$4: function(logLevel, message, error, stackTrace) {
+ var record, _this = this,
+ t1 = logLevel.value;
+ if (t1 >= _this.get$level().value) {
+ if (t1 >= 2000) {
+ P.StackTrace_current();
+ logLevel.toString$0(0);
+ }
+ t1 = _this.get$fullName();
+ Date.now();
+ $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1;
+ record = new L.LogRecord(logLevel, message, t1);
+ if (_this.parent == null)
+ _this._publish$1(record);
+ else
+ $.$get$Logger_root()._publish$1(record);
+ }
+ },
+ _publish$1: function(record) {
+ }
+ };
+ F.Logger_Logger_closure.prototype = {
+ call$0: function() {
+ var dot, $parent, t1,
+ thisName = this.name;
+ if (C.JSString_methods.startsWith$1(thisName, "."))
+ H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'"));
+ dot = C.JSString_methods.lastIndexOf$1(thisName, ".");
+ if (dot === -1)
+ $parent = thisName !== "" ? F.Logger_Logger("") : null;
+ else {
+ $parent = F.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot));
+ thisName = C.JSString_methods.substring$1(thisName, dot + 1);
+ }
+ t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger));
+ if ($parent == null)
+ t1._level = C.Level_INFO_800;
+ else
+ $parent._children.$indexSet(0, thisName, t1);
+ return t1;
+ },
+ $signature: 25
+ };
M.SseClient.prototype = {
SseClient$1: function(serverUrl) {
- var t1, t2, t3, t4, _this = this,
- clientId = T.generateUuidV4();
- _this._eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic));
+ var t2, t3, t4, _this = this,
+ clientId = T.generateUuidV4(),
+ t1 = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic));
+ _this._eventSource = t1;
_this._serverUrl = serverUrl + "?sseClientId=" + clientId;
- t1 = _this._outgoingController;
- new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$onDone(_this.get$_onOutgoingMessage(), _this.get$_onOutgoingDone());
+ t1 = new W._EventStream(t1, "open", false, type$._EventStream_legacy_Event);
+ t1.get$first(t1).whenComplete$1(new M.SseClient_closure(_this));
C.EventSource_methods.addEventListener$2(_this._eventSource, "message", _this.get$_onIncomingMessage());
C.EventSource_methods.addEventListener$2(_this._eventSource, "control", _this.get$_onIncomingControlMessage());
t1 = _this._eventSource;
t2 = type$.nullable_void_Function_legacy_Event;
- t3 = t2._as(new M.SseClient_closure(_this));
+ t3 = t2._as(new M.SseClient_closure0(_this));
type$.nullable_void_Function._as(null);
t4 = type$.legacy_Event;
W._EventStreamSubscription$(t1, "open", t3, false, t4);
- W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure0(_this)), false, t4);
+ W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure1(_this)), false, t4);
},
close$0: function(_) {
+ var t1;
this._eventSource.close();
+ t1 = this._outgoingController;
+ if ((t1._state & 1) === 0)
+ new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$cancelOnError(null, true).asFuture$1$1(null, type$.dynamic);
this._incomingController.close$0(0);
- this._outgoingController.close$0(0);
+ t1.close$0(0);
},
_onIncomingControlMessage$1: function(message) {
var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true);
@@ -6966,14 +7259,24 @@
}
};
M.SseClient_closure.prototype = {
+ call$0: function() {
+ var t2,
+ t1 = this.$this;
+ t1._onConnected.complete$0(0);
+ t2 = t1._outgoingController;
+ new P._ControllerStream(t2, H._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$2$onDone(t1.get$_onOutgoingMessage(), t1.get$_onOutgoingDone());
+ },
+ $signature: 1
+ };
+ M.SseClient_closure0.prototype = {
call$1: function(_) {
var t1 = this.$this._errorTimer;
if (t1 != null)
t1.cancel$0();
},
- $signature: 10
+ $signature: 12
};
- M.SseClient_closure0.prototype = {
+ M.SseClient_closure1.prototype = {
call$1: function(error) {
var t1 = this.$this,
t2 = t1._errorTimer;
@@ -6981,7 +7284,7 @@
if (t2 !== true)
t1._errorTimer = P.Timer_Timer(C.Duration_5000000, new M.SseClient__closure(t1, error));
},
- $signature: 10
+ $signature: 12
};
M.SseClient__closure.prototype = {
call$0: function() {
@@ -7006,19 +7309,19 @@
call$1: function(bitCount) {
return this.random.nextInt$1(C.JSInt_methods._shlPositive$1(1, bitCount));
},
- $signature: 26
+ $signature: 27
};
T.generateUuidV4__printDigits.prototype = {
call$2: function(value, count) {
return C.JSString_methods.padLeft$2(C.JSInt_methods.toRadixString$1(value, 16), count, "0");
},
- $signature: 11
+ $signature: 13
};
T.generateUuidV4__bitsDigits.prototype = {
call$2: function(bitCount, digitCount) {
return this._printDigits.call$2(this._generateBits.call$1(bitCount), digitCount);
},
- $signature: 11
+ $signature: 13
};
R.StreamChannelMixin.prototype = {};
E.main_closure.prototype = {
@@ -7026,7 +7329,7 @@
type$.legacy_MouseEvent._as(_);
this.channel._outgoingController.close$0(0);
},
- $signature: 27
+ $signature: 28
};
E.main_closure0.prototype = {
call$1: function(s) {
@@ -7058,7 +7361,7 @@
t1.add$1(0, H._instanceType(t1)._precomputed1._as(s));
}
},
- $signature: 28
+ $signature: 29
};
(function aliases() {
var _ = J.Interceptor.prototype;
@@ -7078,32 +7381,33 @@
_static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 3);
_static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 3);
_static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0);
+ _static_1(P, "async___nullDataHandler$closure", "_nullDataHandler", 2);
_static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 6);
_static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0);
- _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 17, 0);
+ _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 20, 0);
_instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 6);
_static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4);
var _;
- _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 9);
- _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 9);
+ _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 11);
+ _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 11);
_instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0);
- _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 25);
+ _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 26);
})();
(function inheritance() {
var _mixin = hunkHelpers.mixin,
_inherit = hunkHelpers.inherit,
_inheritMany = hunkHelpers.inheritMany;
_inherit(P.Object, null);
- _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, H.Closure, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, H._Type, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, N.Logger, N.Level, N.LogRecord, R.StreamChannelMixin]);
+ _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, H.Closure, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, H._Type, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, Y.Level, L.LogRecord, F.Logger, R.StreamChannelMixin]);
_inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]);
_inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);
_inherit(J.JSUnmodifiableArray, J.JSArray);
_inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]);
_inheritMany(P.Error, [H.LateError, H.NotNullableError, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]);
+ _inheritMany(H.Closure, [H.nullFuture_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]);
_inherit(H.EfficientLengthIterable, P.Iterable);
_inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]);
_inherit(H.NullError, P.TypeError);
- _inheritMany(H.Closure, [H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, N.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]);
_inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]);
_inherit(H._AssertionError, P.AssertionError);
_inherit(P.MapBase, P.MapMixin);
@@ -7154,12 +7458,12 @@
mangledNames: {},
getTypeFromName: getGlobalFromName,
metadata: [],
- types: ["~()", "Null()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "~(Event*)", "Null(Event*)", "String*(int*,int*)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "Null(Object,StackTrace)", "_Future<@>(@)", "~(ProgressEvent)", "~(Event)", "@(@,@)", "~(@,@)", "Logger*()", "~(String*)", "int*(int*)", "Null(MouseEvent*)", "Null(String*)"],
+ types: ["~()", "Null()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "Null(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "~(Event)", "~(Event*)", "Null(Event*)", "String*(int*,int*)", "Future<Null>()", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "_Future<@>(@)", "~(ProgressEvent)", "@(@,@)", "~(@,@)", "Logger*()", "~(String*)", "int*(int*)", "Null(MouseEvent*)", "Null(String*)"],
interceptorsByTag: null,
leafTags: null,
arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti"
};
- H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"NotNullableError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncCompleter":{"_Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}'));
+ H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"NotNullableError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}'));
H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"Codec":2,"StreamChannelMixin":1}'));
0;
var type$ = (function rtii() {
@@ -7178,7 +7482,6 @@
JSNull: findType("JSNull"),
JavaScriptFunction: findType("JavaScriptFunction"),
JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"),
- JsLinkedHashMap_of_legacy_String_and_legacy_Logger: findType("JsLinkedHashMap<String*,Logger*>"),
List_dynamic: findType("List<@>"),
Map_dynamic_dynamic: findType("Map<@,@>"),
Null: findType("Null"),
@@ -7188,8 +7491,11 @@
String: findType("String"),
UnknownJavaScriptObject: findType("UnknownJavaScriptObject"),
_AsyncCompleter_HttpRequest: findType("_AsyncCompleter<HttpRequest>"),
+ _AsyncCompleter_dynamic: findType("_AsyncCompleter<@>"),
_ElementEventStreamImpl_legacy_MouseEvent: findType("_ElementEventStreamImpl<MouseEvent*>"),
+ _EventStream_legacy_Event: findType("_EventStream<Event*>"),
_Future_HttpRequest: findType("_Future<HttpRequest>"),
+ _Future_Null: findType("_Future<Null>"),
_Future_dynamic: findType("_Future<@>"),
_Future_int: findType("_Future<int>"),
_Future_void: findType("_Future<~>"),
@@ -7204,6 +7510,7 @@
dynamic_Function_dynamic_dynamic: findType("@(@,@)"),
int: findType("int"),
legacy_Event: findType("Event*"),
+ legacy_Logger: findType("Logger*"),
legacy_MessageEvent: findType("MessageEvent*"),
legacy_MouseEvent: findType("MouseEvent*"),
legacy_Never: findType("0&*"),
@@ -7371,9 +7678,9 @@
C.Duration_5000000 = new P.Duration(5000000);
C.JsonDecoder_null = new P.JsonDecoder(null);
C.JsonEncoder_null = new P.JsonEncoder(null);
- C.Level_INFO_800 = new N.Level("INFO", 800);
- C.Level_SEVERE_1000 = new N.Level("SEVERE", 1000);
- C.Level_WARNING_900 = new N.Level("WARNING", 900);
+ C.Level_INFO_800 = new Y.Level("INFO", 800);
+ C.Level_SEVERE_1000 = new Y.Level("SEVERE", 1000);
+ C.Level_WARNING_900 = new Y.Level("WARNING", 900);
})();
(function staticFields() {
$._JS_INTEROP_INTERCEPTOR_TAG = null;
@@ -7392,8 +7699,8 @@
$._isInCallbackLoop = false;
$.Zone__current = C.C__RootZone;
$._toStringVisiting = H.setRuntimeTypeInfo([], H.findType("JSArray<Object>"));
- $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, H.findType("Logger*"));
$.LogRecord__nextNumber = 0;
+ $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger);
})();
(function lazyInitializers() {
var _lazyFinal = hunkHelpers.lazyFinal,
@@ -7402,6 +7709,9 @@
_lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() {
return H.getIsolateAffinityTag("_$dart_dartClosure");
});
+ _lazyFinal($, "nullFuture", "$get$nullFuture", function() {
+ return C.C__RootZone.run$1$1(new H.nullFuture_closure(), H.findType("Future<Null>"));
+ });
_lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() {
return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({
toString: function() {
@@ -7421,7 +7731,7 @@
});
_lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() {
return H.TypeErrorDecoder_extractPattern(function() {
- var $argumentsExpr$ = '$arguments$';
+ var $argumentsExpr$ = "$arguments$";
try {
null.$method$($argumentsExpr$);
} catch (e) {
@@ -7434,7 +7744,7 @@
});
_lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() {
return H.TypeErrorDecoder_extractPattern(function() {
- var $argumentsExpr$ = '$arguments$';
+ var $argumentsExpr$ = "$arguments$";
try {
(void 0).$method$($argumentsExpr$);
} catch (e) {
@@ -7470,15 +7780,13 @@
return P._AsyncRun__initializeScheduleImmediate();
});
_lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", function() {
- var t1 = new P._Future(C.C__RootZone, H.findType("_Future<Null>"));
- t1._setValue$1(null);
- return t1;
+ return type$._Future_Null._as($.$get$nullFuture());
});
_lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() {
return new Error().stack != void 0;
});
_lazyOld($, "Logger_root", "$get$Logger_root", function() {
- return N.Logger_Logger("");
+ return F.Logger_Logger("");
});
})();
(function nativeSupport() {
@@ -7521,7 +7829,7 @@
callback(null);
return;
}
- if (typeof document.currentScript != 'undefined') {
+ if (typeof document.currentScript != "undefined") {
callback(document.currentScript);
return;
}
@@ -7535,10 +7843,11 @@
scripts[i].addEventListener("load", onLoad, false);
})(function(currentScript) {
init.currentScript = currentScript;
+ var callMain = E.main;
if (typeof dartMainRunner === "function")
- dartMainRunner(E.main, []);
+ dartMainRunner(callMain, []);
else
- E.main([]);
+ callMain([]);
});
})();