Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: src/site/samples/geolocation/example/trip_meter.dart.js

Issue 47213005: Added geolocation (new); surfaced appcache and webaudio samples (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/site/samples/geolocation/example/trip_meter.dart.js
diff --git a/src/site/docs/tutorials/fetchdata/examples/portmanteaux_simple/portmanteaux_simple.dart.js b/src/site/samples/geolocation/example/trip_meter.dart.js
similarity index 68%
copy from src/site/docs/tutorials/fetchdata/examples/portmanteaux_simple/portmanteaux_simple.dart.js
copy to src/site/samples/geolocation/example/trip_meter.dart.js
index d619abbe92a51e728ef163db447447ec5f57ddf7..54ce7bf4a7cf4497d4c7b3aa6ca45f1808c09a5c 100644
--- a/src/site/docs/tutorials/fetchdata/examples/portmanteaux_simple/portmanteaux_simple.dart.js
+++ b/src/site/samples/geolocation/example/trip_meter.dart.js
@@ -65,39 +65,36 @@ var $$ = {};
// Native classes
// Method closures
-$$.BoundClosure$2 = [P, {"": "BoundClosure;_self,__js_helper$_target,_receiver,__js_helper$_name",
+$$.BoundClosure$2 = [P, {"": "BoundClosure;_self,_target,_receiver,__js_helper$_name",
call$2: function(p0, p1) {
- return this.__js_helper$_target.call(this._self, p0, p1);
+ return this._target.call(this._self, p0, p1);
},
call$1: function(p0) {
return this.call$2(p0, null);
- }
-}];
-
-$$.BoundClosure$0 = [P, {"": "BoundClosure;_self,__js_helper$_target,_receiver,__js_helper$_name",
- call$0: function() {
- return this.__js_helper$_target.call(this._self);
},
- $is_void_: true
+ $is_args2: true
}];
-$$.BoundClosure$1 = [P, {"": "BoundClosure;_self,__js_helper$_target,_receiver,__js_helper$_name",
- call$1: function(p0) {
- return this.__js_helper$_target.call(this._self, p0);
+$$.BoundClosure$0 = [P, {"": "BoundClosure;_self,_target,_receiver,__js_helper$_name",
+ call$0: function() {
+ return this._target.call(this._self);
}
}];
-$$.Closure$2 = [H, {"": "Closure;call$2,$name"}];
+$$.Closure$2 = [H, {"": "Closure;call$2,$name", $is_args2: true}];
-$$.Closure$0 = [H, {"": "Closure;call$0,$name", $is_void_: true}];
+$$.Closure$0 = [H, {"": "Closure;call$0,$name"}];
$$.Closure$7 = [H, {"": "Closure;call$7,$name"}];
$$.Closure$1 = [H, {"": "Closure;call$1,$name"}];
-$$.Closure$4 = [P, {"": "Closure;call$4,$name"}];
-
-$$.Closure$5 = [P, {"": "Closure;call$5,$name"}];
+$$.Closure$21 = [P, {"": "Closure;call$2,$name",
+ call$1: function(p0) {
+ return this.call$2(p0, null);
+ },
+ $is_args2: true
+}];
(function (reflectionData) {
function map(x){x={x:x};delete x.x;return x}
@@ -184,7 +181,7 @@ $$.Closure$5 = [P, {"": "Closure;call$5,$name"}];
}
})([
["_foreign_helper", "dart:_foreign_helper", , H, {
-JS_CONST: {"": "Object;code"}}],
+JS_CONST: {"": "Object;code>"}}],
["_interceptors", "dart:_interceptors", , J, {
getInterceptor: function(object) {
return void 0;
@@ -261,14 +258,21 @@ PlainJavaScriptObject: {"": "JavaScriptObject;"},
UnknownJavaScriptObject: {"": "JavaScriptObject;"},
JSArray: {"": "List/Interceptor;",
+ add$1: function(receiver, value) {
+ if (!!receiver.fixed$length)
+ H.throwExpression(P.UnsupportedError$("add"));
+ receiver.push(value);
+ },
+ removeLast$0: function(receiver) {
+ if (!!receiver.fixed$length)
+ H.throwExpression(P.UnsupportedError$("removeLast"));
+ if (receiver.length === 0)
+ throw H.wrapException(P.RangeError$value(-1));
+ return receiver.pop();
+ },
forEach$1: function(receiver, f) {
return H.IterableMixinWorkaround_forEach(receiver, f);
},
- map$1: function(receiver, f) {
- var t1 = new H.MappedListIterable(receiver, f);
- H.setRuntimeTypeInfo(t1, [null, null]);
- return t1;
- },
elementAt$1: function(receiver, index) {
if (index < 0 || index >= receiver.length)
throw H.ioore(receiver, index);
@@ -286,32 +290,26 @@ JSArray: {"": "List/Interceptor;",
get$length: function(receiver) {
return receiver.length;
},
- set$length: function(receiver, newLength) {
- if (newLength < 0)
- throw H.wrapException(new P.RangeError("value " + newLength));
- if (!!receiver.fixed$length)
- H.throwExpression(new P.UnsupportedError("set length"));
- receiver.length = newLength;
- },
$index: function(receiver, index) {
if (typeof index !== "number" || Math.floor(index) !== index)
throw H.wrapException(new P.ArgumentError(index));
if (index >= receiver.length || index < 0)
- throw H.wrapException(new P.RangeError("value " + H.S(index)));
+ throw H.wrapException(P.RangeError$value(index));
return receiver[index];
},
$indexSet: function(receiver, index, value) {
if (!!receiver.immutable$list)
- H.throwExpression(new P.UnsupportedError("indexed set"));
+ H.throwExpression(P.UnsupportedError$("indexed set"));
if (typeof index !== "number" || Math.floor(index) !== index)
throw H.wrapException(new P.ArgumentError(index));
if (index >= receiver.length || index < 0)
- throw H.wrapException(new P.RangeError("value " + H.S(index)));
+ throw H.wrapException(P.RangeError$value(index));
receiver[index] = value;
},
$isList: true,
$asList: null,
- $isList: true
+ $isList: true,
+ $isEfficientLength: true
},
JSMutableArray: {"": "JSArray;", $isJSMutableArray: true,
@@ -332,13 +330,12 @@ JSNumber: {"": "num/Interceptor;",
return receiver % b;
},
toInt$0: function(receiver) {
- var truncated;
- if (isNaN(receiver))
- throw H.wrapException(new P.UnsupportedError("NaN"));
- if (receiver == Infinity || receiver == -Infinity)
- throw H.wrapException(new P.UnsupportedError("Infinity"));
- truncated = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver);
- return truncated == -0.0 ? 0 : truncated;
+ var t1;
+ if (isFinite(receiver)) {
+ t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver);
+ return t1 + 0;
+ }
+ throw H.wrapException(P.UnsupportedError$('' + receiver));
},
toString$0: function(receiver) {
if (receiver === 0 && 1 / receiver < 0)
@@ -354,7 +351,7 @@ JSNumber: {"": "num/Interceptor;",
},
$shr: function(receiver, other) {
if (other < 0)
- throw H.wrapException(new P.ArgumentError(other));
+ throw H.wrapException(P.ArgumentError$(other));
if (receiver > 0) {
if (other > 31)
return 0;
@@ -366,7 +363,7 @@ JSNumber: {"": "num/Interceptor;",
},
$lt: function(receiver, other) {
if (typeof other !== "number")
- throw H.wrapException(new P.ArgumentError(other));
+ throw H.wrapException(P.ArgumentError$(other));
return receiver < other;
},
$gt: function(receiver, other) {
@@ -376,7 +373,7 @@ JSNumber: {"": "num/Interceptor;",
},
$ge: function(receiver, other) {
if (typeof other !== "number")
- throw H.wrapException(new P.ArgumentError(other));
+ throw H.wrapException(P.ArgumentError$(other));
return receiver >= other;
},
$isnum: true
@@ -389,24 +386,24 @@ JSDouble: {"": "double/JSNumber;", $isdouble: true, $isnum: true},
JSString: {"": "String/Interceptor;",
codeUnitAt$1: function(receiver, index) {
if (index < 0)
- throw H.wrapException(new P.RangeError("value " + H.S(index)));
+ throw H.wrapException(P.RangeError$value(index));
if (index >= receiver.length)
- throw H.wrapException(new P.RangeError("value " + H.S(index)));
+ throw H.wrapException(P.RangeError$value(index));
return receiver.charCodeAt(index);
},
substring$2: function(receiver, startIndex, endIndex) {
if (endIndex == null)
endIndex = receiver.length;
if (typeof endIndex !== "number")
- H.throwExpression(new P.ArgumentError(endIndex));
+ H.throwExpression(P.ArgumentError$(endIndex));
if (startIndex < 0)
- throw H.wrapException(new P.RangeError("value " + startIndex));
+ throw H.wrapException(P.RangeError$value(startIndex));
if (typeof endIndex !== "number")
throw H.iae(endIndex);
if (startIndex > endIndex)
- throw H.wrapException(new P.RangeError("value " + startIndex));
+ throw H.wrapException(P.RangeError$value(startIndex));
if (endIndex > receiver.length)
- throw H.wrapException(new P.RangeError("value " + H.S(endIndex)));
+ throw H.wrapException(P.RangeError$value(endIndex));
return receiver.substring(startIndex, endIndex);
},
substring$1: function($receiver, startIndex) {
@@ -436,7 +433,7 @@ JSString: {"": "String/Interceptor;",
if (typeof index !== "number" || Math.floor(index) !== index)
throw H.wrapException(new P.ArgumentError(index));
if (index >= receiver.length || index < 0)
- throw H.wrapException(new P.RangeError("value " + H.S(index)));
+ throw H.wrapException(P.RangeError$value(index));
return receiver[index];
},
$isString: true
@@ -477,7 +474,7 @@ IsolateNatives_computeThisScriptD8: function() {
if (stack == null) {
stack = (function() {try { throw new Error() } catch(e) { return e.stack }})();
if (stack == null)
- throw H.wrapException(new P.UnsupportedError("No stack trace"));
+ throw H.wrapException(P.UnsupportedError$("No stack trace"));
}
matches = stack.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "m"));
if (matches != null)
@@ -485,7 +482,7 @@ IsolateNatives_computeThisScriptD8: function() {
matches = stack.match(new RegExp("^[^@]*@(.*):[0-9]*$", "m"));
if (matches != null)
return matches[1];
- throw H.wrapException(new P.UnsupportedError("Cannot extract URI from \"" + stack + "\""));
+ throw H.wrapException(P.UnsupportedError$("Cannot extract URI from \"" + stack + "\""));
},
IsolateNatives__processWorkerMessage: function(sender, e) {
@@ -508,7 +505,7 @@ IsolateNatives__processWorkerMessage: function(sender, e) {
break;
case "message":
if (t1.$index(msg, "port") != null)
- J.send$2$x(t1.$index(msg, "port"), t1.$index(msg, "msg"), t1.$index(msg, "replyTo"));
+ t1.$index(msg, "port").send$2(t1.$index(msg, "msg"), t1.$index(msg, "replyTo"));
$globalState.topEventLoop.run$0();
break;
case "close":
@@ -528,7 +525,7 @@ IsolateNatives__processWorkerMessage: function(sender, e) {
t1.toString;
self.postMessage(t2);
} else
- H.Primitives_printString(J.toString$0(t1.$index(msg, "msg")));
+ P.print(t1.$index(msg, "msg"));
break;
case "error":
throw H.wrapException(t1.$index(msg, "msg"));
@@ -549,7 +546,7 @@ IsolateNatives__log: function(msg) {
} catch (exception) {
H.unwrapException(exception);
trace = new H._StackTrace(exception, null);
- throw H.wrapException(new P._ExceptionImplementation(trace));
+ throw H.wrapException(P.Exception_Exception(trace));
}
},
@@ -560,7 +557,7 @@ IsolateNatives__startIsolate: function(topLevel, replyTo) {
$.lazyPort = H.ReceivePortImpl$();
t1 = P._Isolate_port();
t1.toString;
- J.send$2$x(replyTo, "spawned", new H._NativeJsSendPort(t1, $globalState.currentContext.id));
+ replyTo.send$2("spawned", new H._NativeJsSendPort(t1, $globalState.currentContext.id));
topLevel.call$0();
},
@@ -617,6 +614,9 @@ _Deserializer_isPrimitive: function(x) {
CloseToken: {"": "Object;", $isCloseToken: true},
JsIsolateSink: {"": "EventSink;_isClosed,_port<",
+ add$1: function(_, message) {
+ this._port.send$1(message);
+ },
$eq: function(_, other) {
var t1;
if (other == null)
@@ -691,7 +691,7 @@ _IsolateContext: {"": "Object;id,ports,isolateStatics<",
register$2: function(_, portId, port) {
var t1;
if (this.ports.containsKey$1(portId))
- throw H.wrapException(new P._ExceptionImplementation("Registry: ports must be registered only once."));
+ throw H.wrapException(P.Exception_Exception("Registry: ports must be registered only once."));
t1 = this.ports;
t1.$indexSet(t1, portId, port);
t1 = $globalState.isolates;
@@ -714,7 +714,6 @@ _IsolateContext: {"": "Object;id,ports,isolateStatics<",
this.ports = P.LinkedHashMap_LinkedHashMap(null, null, null, J.JSInt, P.ReceivePort);
this.isolateStatics = new Isolate();
},
- $is_IsolateContext: true,
static: {
_IsolateContext$: function() {
var t1 = new H._IsolateContext(null, null, null);
@@ -733,7 +732,7 @@ _EventLoop: {"": "Object;events,activeTimerCount",
},
checkOpenReceivePortsFromCommandLine$0: function() {
if ($globalState.rootContext != null && $globalState.isolates.containsKey$1($globalState.rootContext.id) && $globalState.fromCommandLine === true && $globalState.rootContext.ports._collection$_length === 0)
- throw H.wrapException(new P._ExceptionImplementation("Program exited with open ReceivePorts."));
+ throw H.wrapException(P.Exception_Exception("Program exited with open ReceivePorts."));
},
runIteration$0: function() {
var $event, t1, t2;
@@ -784,15 +783,13 @@ _EventLoop__runHelper_next: {"": "Closure;this_0",
if (!this.this_0.runIteration$0())
return;
P.Timer_Timer(C.Duration_0, this);
- },
- $is_void_: true
+ }
},
_IsolateEvent: {"": "Object;isolate,fn,message",
process$0: function() {
this.isolate.eval$1(this.fn);
- },
- $is_IsolateEvent: true
+ }
},
_MainManagerStub: {"": "Object;"},
@@ -800,8 +797,7 @@ _MainManagerStub: {"": "Object;"},
IsolateNatives__processWorkerMessage_closure: {"": "Closure;entryPoint_0,replyTo_1",
call$0: function() {
H.IsolateNatives__startIsolate(this.entryPoint_0, this.replyTo_1);
- },
- $is_void_: true
+ }
},
_BaseSendPort: {"": "Object;",
@@ -813,7 +809,7 @@ _BaseSendPort: {"": "Object;",
} else
t1 = false;
if (t1)
- throw H.wrapException(new P._ExceptionImplementation("SendPort.send: Illegal replyTo port type"));
+ throw H.wrapException(P.Exception_Exception("SendPort.send: Illegal replyTo port type"));
},
call$1: function(message) {
var t1, completer, port;
@@ -821,7 +817,7 @@ _BaseSendPort: {"": "Object;",
completer = new P._AsyncCompleter(P._Future$(t1));
H.setRuntimeTypeInfo(completer, [t1]);
port = H.ReceivePortImpl$();
- this.send$2(this, message, new H._NativeJsSendPort(port, $globalState.currentContext.id));
+ this.send$2(message, new H._NativeJsSendPort(port, $globalState.currentContext.id));
port._callback = new H._BaseSendPort_call_closure(completer, port);
return completer.future;
},
@@ -847,13 +843,17 @@ _BaseSendPort_call_closure: {"": "Closure;completer_0,port_1",
H.throwExpression(new P.StateError("Future already completed"));
t1._asyncComplete$1(value);
}
- }
+ },
+ $is_args2: true
},
_NativeJsSendPort: {"": "_BaseSendPort;_receivePort,_isolateId",
- send$2: function(_, message, replyTo) {
+ send$2: function(message, replyTo) {
H._waitForPendingPorts([message, replyTo], new H._NativeJsSendPort_send_closure(this, message, replyTo));
},
+ send$1: function(message) {
+ return this.send$2(message, null);
+ },
$eq: function(_, other) {
var t1;
if (other == null)
@@ -893,8 +893,7 @@ _NativeJsSendPort_send_closure: {"": "Closure;this_1,message_2,replyTo_3",
t3 = $globalState.topEventLoop;
t4 = "receive " + H.S(msg);
t3.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send__closure(t1, t2, shouldSerialize), t4));
- },
- $is_void_: true
+ }
},
_NativeJsSendPort_send__closure: {"": "Closure;box_0,this_4,shouldSerialize_5",
@@ -910,14 +909,16 @@ _NativeJsSendPort_send__closure: {"": "Closure;box_0,this_4,shouldSerialize_5",
t2 = this.box_0;
t1._callback$2(t2.msg_0, t2.reply_1);
}
- },
- $is_void_: true
+ }
},
_WorkerSendPort: {"": "_BaseSendPort;_workerId,_receivePortId,_isolateId",
- send$2: function(_, message, replyTo) {
+ send$2: function(message, replyTo) {
H._waitForPendingPorts([message, replyTo], new H._WorkerSendPort_send_closure(this, message, replyTo));
},
+ send$1: function(message) {
+ return this.send$2(message, null);
+ },
$eq: function(_, other) {
var t1;
if (other == null)
@@ -962,8 +963,7 @@ _WorkerSendPort_send_closure: {"": "Closure;this_0,message_1,replyTo_2",
if (manager != null)
manager.postMessage(workerMessage);
}
- },
- $is_void_: true
+ }
},
ReceivePortImpl: {"": "Object;_id<,_callback<",
@@ -974,7 +974,6 @@ ReceivePortImpl: {"": "Object;_id<,_callback<",
var t1 = $globalState.currentContext;
t1.register$2(t1, this._id, this);
},
- $isReceivePort: true,
static: {
"": "ReceivePortImpl__nextFreeId",
ReceivePortImpl$: function() {
@@ -1250,7 +1249,8 @@ _Copier_visitMap_closure: {"": "Closure;box_0,this_1",
call$2: function(key, val) {
var t1 = this.this_1;
J.$indexSet$ax(this.box_0.copy_0, t1._dispatch$1(key), t1._dispatch$1(val));
- }
+ },
+ $is_args2: true
},
_Serializer: {"": "_MessageTraverser;",
@@ -1282,7 +1282,7 @@ _Serializer: {"": "_MessageTraverser;",
t1 = map.get$keys();
keys = this._serializeList$1(P.List_List$from(t1, true, H.getRuntimeTypeArgument(t1, "IterableBase", 0)));
t1 = map.get$values(map);
- return ["map", id, keys, this._serializeList$1(t1.toList$0(t1))];
+ return ["map", id, keys, this._serializeList$1(P.List_List$from(t1, true, H.getRuntimeTypeArgument(t1, "IterableBase", 0)))];
},
_serializeList$1: function(list) {
var len, result, t1, i, t2;
@@ -1452,28 +1452,13 @@ TimerImpl: {"": "Object;_once,_inEventLoop,_handle",
t1.activeTimerCount = t1.activeTimerCount + 1;
this._handle = $.get$globalThis().setTimeout(H.convertDartClosureToJS(new H.TimerImpl_internalCallback0(this, callback), 0), milliseconds);
} else
- throw H.wrapException(new P.UnsupportedError("Timer greater than 0."));
- },
- TimerImpl$periodic$2: function(milliseconds, callback) {
- var t1;
- if ($.get$globalThis().setTimeout != null) {
- t1 = $globalState.topEventLoop;
- t1.activeTimerCount = t1.activeTimerCount + 1;
- this._handle = $.get$globalThis().setInterval(H.convertDartClosureToJS(new H.TimerImpl$periodic_closure(this, callback), 0), milliseconds);
- } else
- throw H.wrapException(new P.UnsupportedError("Periodic timer."));
+ throw H.wrapException(P.UnsupportedError$("Timer greater than 0."));
},
static: {
TimerImpl$: function(milliseconds, callback) {
var t1 = new H.TimerImpl(true, false, null);
t1.TimerImpl$2(milliseconds, callback);
return t1;
-},
-
-TimerImpl$periodic: function(milliseconds, callback) {
- var t1 = new H.TimerImpl(false, false, null);
- t1.TimerImpl$periodic$2(milliseconds, callback);
- return t1;
}}
},
@@ -1482,8 +1467,7 @@ TimerImpl_internalCallback: {"": "Closure;this_0,callback_1",
call$0: function() {
this.this_0._handle = null;
this.callback_1.call$0();
- },
- $is_void_: true
+ }
},
TimerImpl_internalCallback0: {"": "Closure;this_2,callback_3",
@@ -1492,15 +1476,7 @@ TimerImpl_internalCallback0: {"": "Closure;this_2,callback_3",
var t1 = $globalState.topEventLoop;
t1.activeTimerCount = t1.activeTimerCount - 1;
this.callback_3.call$0();
- },
- $is_void_: true
-},
-
-TimerImpl$periodic_closure: {"": "Closure;this_0,callback_1",
- call$0: function() {
- this.callback_1.call$1(this.this_0);
- },
- $is_void_: true
+ }
}}],
["_js_helper", "dart:_js_helper", , H, {
isJsIndexable: function(object, record) {
@@ -1529,7 +1505,7 @@ S: function(value) {
return "null";
res = J.toString$0(value);
if (typeof res !== "string")
- throw H.wrapException(new P.ArgumentError(value));
+ throw H.wrapException(P.ArgumentError$(value));
return res;
},
@@ -1547,24 +1523,6 @@ Primitives_objectHashCode: function(object) {
return hash;
},
-Primitives_printString: function(string) {
- if (typeof dartPrint == "function") {
- dartPrint(string);
- return;
- }
- if (typeof console == "object" && typeof console.log == "function") {
- console.log(string);
- return;
- }
- if (typeof window == "object")
- return;
- if (typeof print == "function") {
- print(string);
- return;
- }
- throw "Unable to print message: " + String(string);
-},
-
Primitives_objectTypeName: function(object) {
var $name, decompiled, t1;
$name = H.constructorNameFallback(J.getInterceptor(object));
@@ -1612,14 +1570,14 @@ Primitives_stringFromCodePoints: function(codePoints) {
for (t1 = new H.ListIterator(codePoints, codePoints.length, 0, null); t1.moveNext$0();) {
i = t1._current;
if (typeof i !== "number" || Math.floor(i) !== i)
- throw H.wrapException(new P.ArgumentError(i));
+ throw H.wrapException(P.ArgumentError$(i));
if (i <= 65535)
a.push(i);
else if (i <= 1114111) {
- a.push(55296 + (C.JSNumber_methods.$shr(i - 65536, 10) & 1023));
+ a.push(55296 + (C.JSInt_methods.$shr(i - 65536, 10) & 1023));
a.push(56320 + (i & 1023));
} else
- throw H.wrapException(new P.ArgumentError(i));
+ throw H.wrapException(P.ArgumentError$(i));
}
return H.Primitives__fromCharCodeApply(a);
},
@@ -1629,9 +1587,9 @@ Primitives_stringFromCharCodes: function(charCodes) {
for (t1 = new H.ListIterator(charCodes, charCodes.length, 0, null); t1.moveNext$0();) {
i = t1._current;
if (typeof i !== "number" || Math.floor(i) !== i)
- throw H.wrapException(new P.ArgumentError(i));
+ throw H.wrapException(P.ArgumentError$(i));
if (i < 0)
- throw H.wrapException(new P.ArgumentError(i));
+ throw H.wrapException(P.ArgumentError$(i));
if (i > 65535)
return H.Primitives_stringFromCodePoints(charCodes);
}
@@ -1651,7 +1609,7 @@ Primitives_setProperty: function(object, key, value) {
},
iae: function(argument) {
- throw H.wrapException(new P.ArgumentError(argument));
+ throw H.wrapException(P.ArgumentError$(argument));
},
ioore: function(receiver, index) {
@@ -1659,7 +1617,7 @@ ioore: function(receiver, index) {
J.get$length$asx(receiver);
if (typeof index !== "number" || Math.floor(index) !== index)
H.iae(index);
- throw H.wrapException(new P.RangeError("value " + H.S(index)));
+ throw H.wrapException(P.RangeError$value(index));
},
wrapException: function(ex) {
@@ -1811,7 +1769,7 @@ invokeClosure: function(closure, isolate, numberOfArguments, arg1, arg2, arg3, a
else if (t1.$eq(numberOfArguments, 4))
return H._callInIsolate(isolate, new H.invokeClosure_closure3(closure, arg1, arg2, arg3, arg4));
else
- throw H.wrapException(new P._ExceptionImplementation("Unsupported number of arguments for wrapped closure"));
+ throw H.wrapException(P.Exception_Exception("Unsupported number of arguments for wrapped closure"));
},
convertDartClosureToJS: function(closure, arity) {
@@ -1827,7 +1785,7 @@ convertDartClosureToJS: function(closure, arity) {
},
throwCyclicInit: function(staticName) {
- throw H.wrapException(new P.CyclicInitializationError("Cyclic initialization for static " + H.S(staticName)));
+ throw H.wrapException(P.CyclicInitializationError$("Cyclic initialization for static " + H.S(staticName)));
},
setRuntimeTypeInfo: function(target, typeInfo) {
@@ -1895,172 +1853,6 @@ substitute: function(substitution, $arguments) {
return $arguments;
},
-areSubtypes: function(s, t) {
- var len, i;
- if (s == null || t == null)
- return true;
- len = s.length;
- for (i = 0; i < len; ++i)
- if (!H.isSubtype(s[i], t[i]))
- return false;
- return true;
-},
-
-isSupertypeOfNull: function(type) {
- return type == null || type.builtin$cls === "Object" || type.builtin$cls === "Null";
-},
-
-checkSubtypeOfRuntimeType: function(o, t) {
- var rti, type;
- if (o == null)
- return H.isSupertypeOfNull(t);
- if (t == null)
- return true;
- rti = H.getRuntimeTypeInfo(o);
- o = J.getInterceptor(o);
- if (rti != null) {
- type = rti.slice();
- type.splice(0, 0, o);
- } else
- type = o;
- return H.isSubtype(type, t);
-},
-
-isSubtype: function(s, t) {
- var targetSignatureFunction, t1, typeOfS, t2, typeOfT, substitution;
- if (s === t)
- return true;
- if (s == null || t == null)
- return true;
- if ("func" in t) {
- if (!("func" in s)) {
- if ("$is_" + H.S(t.func) in s)
- return true;
- targetSignatureFunction = s.$signature;
- if (targetSignatureFunction == null)
- return false;
- s = targetSignatureFunction.apply(s, null);
- }
- return H.isFunctionSubtype(s, t);
- }
- if (t.builtin$cls === "Function" && "func" in s)
- return true;
- t1 = typeof s === "object" && s !== null && s.constructor === Array;
- typeOfS = t1 ? s[0] : s;
- t2 = typeof t === "object" && t !== null && t.constructor === Array;
- typeOfT = t2 ? t[0] : t;
- if (!("$is" + H.runtimeTypeToString(typeOfT) in typeOfS))
- return false;
- substitution = typeOfT !== typeOfS ? typeOfS["$as" + H.runtimeTypeToString(typeOfT)] : null;
- if (!t1 && substitution == null || !t2)
- return true;
- t1 = t1 ? s.slice(1) : null;
- t2 = t2 ? t.slice(1) : null;
- return H.areSubtypes(H.substitute(substitution, t1), t2);
-},
-
-isAssignable: function(s, t) {
- return H.isSubtype(s, t) || H.isSubtype(t, s);
-},
-
-areAssignable: function(s, t, allowShorter) {
- var sLength, tLength, i, t1, t2;
- if (t == null && s == null)
- return true;
- if (t == null)
- return allowShorter;
- if (s == null)
- return false;
- sLength = s.length;
- tLength = t.length;
- if (allowShorter) {
- if (sLength < tLength)
- return false;
- } else if (sLength !== tLength)
- return false;
- for (i = 0; i < tLength; ++i) {
- t1 = s[i];
- t2 = t[i];
- if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1)))
- return false;
- }
- return true;
-},
-
-areAssignableMaps: function(s, t) {
- if (t == null)
- return true;
- if (s == null)
- return false;
- return function (t, s, isAssignable) {
- for (var $name in t) {
- if (!s.hasOwnProperty($name)) {
- return false;
- }
- var tType = t[$name];
- var sType = s[$name];
- if (!isAssignable.call$2(sType, tType)) {
- return false;
- }
- }
- return true;
- }(t, s, H.isAssignable$closure)
- ;
-},
-
-isFunctionSubtype: function(s, t) {
- var sReturnType, tReturnType, sParameterTypes, tParameterTypes, sOptionalParameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalParametersLen, tOptionalParametersLen, pos, t1, t2, tPos, sPos;
- if (!("func" in s))
- return false;
- if ("void" in s) {
- if (!("void" in t) && "ret" in t)
- return false;
- } else if (!("void" in t)) {
- sReturnType = s.ret;
- tReturnType = t.ret;
- if (!(H.isSubtype(sReturnType, tReturnType) || H.isSubtype(tReturnType, sReturnType)))
- return false;
- }
- sParameterTypes = s.args;
- tParameterTypes = t.args;
- sOptionalParameterTypes = s.opt;
- tOptionalParameterTypes = t.opt;
- sParametersLen = sParameterTypes != null ? sParameterTypes.length : 0;
- tParametersLen = tParameterTypes != null ? tParameterTypes.length : 0;
- sOptionalParametersLen = sOptionalParameterTypes != null ? sOptionalParameterTypes.length : 0;
- tOptionalParametersLen = tOptionalParameterTypes != null ? tOptionalParameterTypes.length : 0;
- if (sParametersLen > tParametersLen)
- return false;
- if (sParametersLen + sOptionalParametersLen < tParametersLen + tOptionalParametersLen)
- return false;
- if (sParametersLen === tParametersLen) {
- if (!H.areAssignable(sParameterTypes, tParameterTypes, false))
- return false;
- if (!H.areAssignable(sOptionalParameterTypes, tOptionalParameterTypes, true))
- return false;
- } else {
- for (pos = 0; pos < sParametersLen; ++pos) {
- t1 = sParameterTypes[pos];
- t2 = tParameterTypes[pos];
- if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1)))
- return false;
- }
- for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos) {
- t1 = sOptionalParameterTypes[sPos];
- t2 = tParameterTypes[tPos];
- if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1)))
- return false;
- }
- for (sPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos) {
- t1 = tOptionalParameterTypes[sPos];
- t2 = tOptionalParameterTypes[tPos];
- if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1)))
- return false;
- }
- }
- return H.areAssignableMaps(s.named, t.named);
-},
-
invokeOn: function($function, receiver, $arguments) {
return $function.apply(receiver, $arguments);
},
@@ -2192,65 +1984,26 @@ defineProperty: function(obj, property, value) {
Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true});
},
-defineNativeMethods: function(tags, interceptorClass) {
- H.defineNativeMethodsCommon(tags, interceptorClass, true);
-},
-
-defineNativeMethodsNonleaf: function(tags, interceptorClass) {
- H.defineNativeMethodsCommon(tags, interceptorClass, false);
-},
-
-defineNativeMethodsExtended: function(tags, interceptorClass, subclassInterceptorClasses) {
- var classes, t1, i;
- if ($.interceptorToTag == null)
- $.interceptorToTag = [];
- classes = subclassInterceptorClasses;
- for (t1 = classes.length, i = 0; i < t1; ++i) {
- $.interceptorToTag.push(classes[i]);
- $.interceptorToTag.push(tags);
- }
- H.defineNativeMethodsCommon(tags, interceptorClass, false);
-},
-
-defineNativeMethodsCommon: function(tags, interceptorClass, isLeaf) {
- var methods, tagsList, i, tag;
- methods = interceptorClass.prototype;
- if ($.interceptorsByTag == null)
- $.interceptorsByTag = {};
- if ($.leafTags == null)
- $.leafTags = {};
- tagsList = tags.split("|");
- for (i = 0; i < tagsList.length; ++i) {
- tag = tagsList[i];
- $.interceptorsByTag[tag] = methods;
- $.leafTags[tag] = isLeaf;
- }
-},
-
-defineNativeMethodsFinish: function() {
-},
-
lookupInterceptor: function(hasOwnPropertyFunction, tag) {
- var map = $.interceptorsByTag;
- if (map == null)
- return;
+ var map = init.interceptorsByTag;
return hasOwnPropertyFunction.call(map, tag) ? map[tag] : null;
},
lookupDispatchRecord: function(obj) {
- var hasOwnPropertyFunction, tag, interceptor, secondTag, t1;
+ var hasOwnPropertyFunction, tag, interceptorClass, secondTag, interceptor;
hasOwnPropertyFunction = Object.prototype.hasOwnProperty;
tag = $.get$getTypeNameOf().call$1(obj);
- interceptor = H.lookupInterceptor(hasOwnPropertyFunction, tag);
- if (interceptor == null) {
+ interceptorClass = H.lookupInterceptor(hasOwnPropertyFunction, tag);
+ if (interceptorClass == null) {
secondTag = H.alternateTag(obj, tag);
if (secondTag != null)
- interceptor = H.lookupInterceptor(hasOwnPropertyFunction, secondTag);
+ interceptorClass = H.lookupInterceptor(hasOwnPropertyFunction, secondTag);
}
- if (interceptor == null)
+ if (interceptorClass == null)
return;
- t1 = $.leafTags;
- if (t1 != null && t1[tag] === true)
+ interceptor = interceptorClass.prototype;
+ init.leafTags;
+ if (init.leafTags[tag] === true)
return H.makeLeafDispatchRecord(interceptor);
else
return J.makeDispatchRecord(interceptor, Object.getPrototypeOf(obj), null, null);
@@ -2260,70 +2013,6 @@ makeLeafDispatchRecord: function(interceptor) {
return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior);
},
-ConstantMap: {"": "Object;",
- toString$0: function(_) {
- return P.Maps_mapToString(this);
- },
- _throwUnmodifiable$0: function() {
- throw H.wrapException(new P.UnsupportedError("Cannot modify unmodifiable Map"));
- },
- $indexSet: function(_, key, val) {
- return this._throwUnmodifiable$0();
- },
- $isMap: true
-},
-
-ConstantStringMap: {"": "ConstantMap;length>,_jsObject,_keys",
- containsKey$1: function(key) {
- if (typeof key !== "string")
- return false;
- if (key === "__proto__")
- return false;
- return this._jsObject.hasOwnProperty(key);
- },
- $index: function(_, key) {
- if (typeof key !== "string")
- return;
- if (!this.containsKey$1(key))
- return;
- return this._jsObject[key];
- },
- forEach$1: function(_, f) {
- J.forEach$1$ax(this._keys, new H.ConstantStringMap_forEach_closure(this, f));
- },
- get$keys: function() {
- var t1 = new H._ConstantMapKeyIterable(this);
- H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "ConstantStringMap", 0)]);
- return t1;
- },
- get$values: function(_) {
- return J.map$1$ax(this._keys, new H.ConstantStringMap_values_closure(this));
- },
- $asConstantMap: null,
- $asMap: null
-},
-
-ConstantStringMap_forEach_closure: {"": "Closure;this_0,f_1",
- call$1: function(key) {
- var t1 = this.this_0;
- return this.f_1.call$2(key, t1.$index(t1, key));
- }
-},
-
-ConstantStringMap_values_closure: {"": "Closure;this_0",
- call$1: function(key) {
- var t1 = this.this_0;
- return t1.$index(t1, key);
- }
-},
-
-_ConstantMapKeyIterable: {"": "IterableBase;__js_helper$_map",
- get$iterator: function(_) {
- return J.get$iterator$ax(this.__js_helper$_map._keys);
- },
- $asIterableBase: null
-},
-
TypeErrorDecoder: {"": "Object;_pattern,_arguments,_argumentsExpr,_expr,_method,_receiver",
matchTypeError$1: function(message) {
var match, result, t1;
@@ -2496,36 +2185,31 @@ _StackTrace: {"": "Object;_exception,_trace",
invokeClosure_closure: {"": "Closure;closure_0",
call$0: function() {
return this.closure_0.call$0();
- },
- $is_void_: true
+ }
},
invokeClosure_closure0: {"": "Closure;closure_1,arg1_2",
call$0: function() {
return this.closure_1.call$1(this.arg1_2);
- },
- $is_void_: true
+ }
},
invokeClosure_closure1: {"": "Closure;closure_3,arg1_4,arg2_5",
call$0: function() {
return this.closure_3.call$2(this.arg1_4, this.arg2_5);
- },
- $is_void_: true
+ }
},
invokeClosure_closure2: {"": "Closure;closure_6,arg1_7,arg2_8,arg3_9",
call$0: function() {
return this.closure_6.call$3(this.arg1_7, this.arg2_8, this.arg3_9);
- },
- $is_void_: true
+ }
},
invokeClosure_closure3: {"": "Closure;closure_10,arg1_11,arg2_12,arg3_13,arg4_14",
call$0: function() {
return this.closure_10.call$4(this.arg1_11, this.arg2_12, this.arg3_13, this.arg4_14);
- },
- $is_void_: true
+ }
},
Closure: {"": "Object;",
@@ -2534,7 +2218,7 @@ Closure: {"": "Object;",
}
},
-BoundClosure: {"": "Closure;_self,__js_helper$_target,_receiver,__js_helper$_name",
+BoundClosure: {"": "Closure;_self,_target,_receiver,__js_helper$_name",
$eq: function(_, other) {
var t1;
if (other == null)
@@ -2544,7 +2228,7 @@ BoundClosure: {"": "Closure;_self,__js_helper$_target,_receiver,__js_helper$_nam
t1 = J.getInterceptor(other);
if (typeof other !== "object" || other === null || !t1.$isBoundClosure)
return false;
- return this._self === other._self && this.__js_helper$_target === other.__js_helper$_target && this._receiver === other._receiver;
+ return this._self === other._self && this._target === other._target && this._receiver === other._receiver;
},
get$hashCode: function(_) {
var t1, receiverHashCode;
@@ -2553,7 +2237,7 @@ BoundClosure: {"": "Closure;_self,__js_helper$_target,_receiver,__js_helper$_nam
receiverHashCode = H.Primitives_objectHashCode(this._self);
else
receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Primitives_objectHashCode(t1);
- return (receiverHashCode ^ H.Primitives_objectHashCode(this.__js_helper$_target)) >>> 0;
+ return (receiverHashCode ^ H.Primitives_objectHashCode(this._target)) >>> 0;
},
$isBoundClosure: true
},
@@ -2635,15 +2319,10 @@ IterableMixinWorkaround_toStringIterable: function(iterable, leftDelimiter, righ
},
IterableMixinWorkaround__rangeCheck: function(list, start, end) {
- var t1;
- if (start < 0 || start > list.length) {
- t1 = list.length;
- throw H.wrapException(new P.RangeError("value " + start + " not in range 0.." + t1));
- }
- if (end < start || end > list.length) {
- t1 = list.length;
- throw H.wrapException(new P.RangeError("value " + end + " not in range " + start + ".." + t1));
- }
+ if (start < 0 || start > list.length)
+ throw H.wrapException(P.RangeError$range(start, 0, list.length));
+ if (end < start || end > list.length)
+ throw H.wrapException(P.RangeError$range(end, start, list.length));
},
IterableMixinWorkaround_setRangeList: function(list, start, end, from, skipCount) {
@@ -2655,54 +2334,30 @@ IterableMixinWorkaround_setRangeList: function(list, start, end, from, skipCount
if (skipCount < 0)
throw H.wrapException(new P.ArgumentError(skipCount));
if (skipCount + $length > from.length)
- throw H.wrapException(new P.StateError("Not enough elements"));
+ throw H.wrapException(P.StateError$("Not enough elements"));
H.Arrays_copy(from, skipCount, list, start, $length);
},
-Symbol_getName: function(symbol) {
- return symbol.get$_name();
+printToConsole: function(line) {
+ if (typeof dartPrint == "function") {
+ dartPrint(line);
+ return;
+ }
+ if (typeof console == "object" && typeof console.log == "function") {
+ console.log(line);
+ return;
+ }
+ if (typeof window == "object")
+ return;
+ if (typeof print == "function") {
+ print(line);
+ return;
+ }
+ throw "Unable to print message: " + String(line);
},
-ListIterable: {"": "IterableBase;",
- get$iterator: function(_) {
- return new H.ListIterator(this, this.get$length(this), 0, null);
- },
- forEach$1: function(_, action) {
- var $length, i;
- $length = this.get$length(this);
- for (i = 0; i < $length; ++i) {
- action.call$1(this.elementAt$1(this, i));
- if ($length !== this.get$length(this))
- throw H.wrapException(new P.ConcurrentModificationError(this));
- }
- },
- map$1: function(_, f) {
- var t1 = new H.MappedListIterable(this, f);
- H.setRuntimeTypeInfo(t1, [null, null]);
- return t1;
- },
- toList$1$growable: function(_, growable) {
- var result, i, t1;
- if (growable) {
- result = P.List_List(null, H.getRuntimeTypeArgument(this, "ListIterable", 0));
- H.setRuntimeTypeInfo(result, [H.getRuntimeTypeArgument(this, "ListIterable", 0)]);
- C.JSArray_methods.set$length(result, this.get$length(this));
- } else {
- result = P.List_List(this.get$length(this), H.getRuntimeTypeArgument(this, "ListIterable", 0));
- H.setRuntimeTypeInfo(result, [H.getRuntimeTypeArgument(this, "ListIterable", 0)]);
- }
- for (i = 0; i < this.get$length(this); ++i) {
- t1 = this.elementAt$1(this, i);
- if (i >= result.length)
- throw H.ioore(result, i);
- result[i] = t1;
- }
- return result;
- },
- toList$0: function($receiver) {
- return this.toList$1$growable($receiver, true);
- },
- $asIterableBase: null
+Symbol_getName: function(symbol) {
+ return symbol.get$_name();
},
ListIterator: {"": "Object;_iterable,_length,_index,_current",
@@ -2715,7 +2370,7 @@ ListIterator: {"": "Object;_iterable,_length,_index,_current",
t2 = J.getInterceptor$asx(t1);
$length = t2.get$length(t1);
if (this._length !== $length)
- throw H.wrapException(new P.ConcurrentModificationError(t1));
+ throw H.wrapException(P.ConcurrentModificationError$(t1));
t3 = this._index;
if (t3 >= $length) {
this._current = null;
@@ -2741,9 +2396,24 @@ MappedIterable: {"": "IterableBase;_iterable,_f",
},
$asIterableBase: function($S, $T) {
return [$T];
+ },
+ static: {
+MappedIterable_MappedIterable: function(iterable, $function, $S, $T) {
+ var t1;
+ if (!!iterable.$isEfficientLength) {
+ t1 = new H.EfficientLengthMappedIterable(iterable, $function);
+ H.setRuntimeTypeInfo(t1, [$S, $T]);
+ return t1;
}
+ t1 = new H.MappedIterable(iterable, $function);
+ H.setRuntimeTypeInfo(t1, [$S, $T]);
+ return t1;
+}}
+
},
+EfficientLengthMappedIterable: {"": "MappedIterable;_iterable,_f", $asMappedIterable: null, $isEfficientLength: true},
+
MappedIterator: {"": "Iterator;_current,_iterator,_f",
_f$1: function(arg0) {
return this._f.call$1(arg0);
@@ -2765,48 +2435,17 @@ MappedIterator: {"": "Iterator;_current,_iterator,_f",
}
},
-MappedListIterable: {"": "ListIterable;_source,_f",
- _f$1: function(arg0) {
- return this._f.call$1(arg0);
- },
- get$length: function(_) {
- return J.get$length$asx(this._source);
+FixedLengthListMixin: {"": "Object;",
+ set$length: function(receiver, newLength) {
+ throw H.wrapException(P.UnsupportedError$("Cannot change the length of a fixed-length list"));
},
- elementAt$1: function(_, index) {
- return this._f$1(J.elementAt$1$ax(this._source, index));
+ add$1: function(receiver, value) {
+ throw H.wrapException(P.UnsupportedError$("Cannot add to a fixed-length list"));
},
- $asListIterable: function($S, $T) {
- return [$T];
+ removeLast$0: function(receiver) {
+ throw H.wrapException(P.UnsupportedError$("Cannot remove from a fixed-length list"));
}
-},
-
-WhereIterable: {"": "IterableBase;_iterable,_f",
- get$iterator: function(_) {
- var t1 = J.get$iterator$ax(this._iterable);
- t1 = new H.WhereIterator(t1, this._f);
- H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "WhereIterable", 0)]);
- return t1;
- },
- $asIterableBase: null
-},
-
-WhereIterator: {"": "Iterator;_iterator,_f",
- _f$1: function(arg0) {
- return this._f.call$1(arg0);
- },
- moveNext$0: function() {
- for (var t1 = this._iterator; t1.moveNext$0();)
- if (this._f$1(t1.get$current()) === true)
- return true;
- return false;
- },
- get$current: function() {
- return this._iterator.get$current();
- },
- $asIterator: null
-},
-
-FixedLengthListMixin: {"": "Object;"}}],
+}}],
["dart.async", "dart:async", , P, {
_attachStackTrace: function(o, st) {
var t1;
@@ -2816,47 +2455,29 @@ _attachStackTrace: function(o, st) {
t1.$indexSet(t1, o, st);
},
-getAttachedStackTrace: function(o) {
- var t1;
- if (o == null || typeof o === "boolean" || typeof o === "number" || typeof o === "string")
- return;
- t1 = $.get$_stackTraceExpando();
- return t1.$index(t1, o);
-},
-
-_asyncRunCallback: function() {
- var callback, t1, exception, milliseconds;
- for (; t1 = $.get$_asyncCallbacks(), t1._head !== t1._tail;) {
- callback = $.get$_asyncCallbacks().removeFirst$0();
- try {
- callback.call$0();
- } catch (exception) {
- H.unwrapException(exception);
- milliseconds = C.Duration_0.get$inMilliseconds();
- H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, P._asyncRunCallback$closure);
- throw exception;
- }
-
- }
- $._callbacksAreEnqueued = false;
+_invokeErrorHandler: function(errorHandler, error, stackTrace) {
+ var t1 = J.getInterceptor(errorHandler);
+ if (!!t1.$is_args2)
+ return errorHandler.call$2(error, stackTrace);
+ else
+ return errorHandler.call$1(error);
},
-_scheduleAsyncCallback: function(callback) {
- $.get$_asyncCallbacks()._add$1(callback);
- if (!$._callbacksAreEnqueued) {
- P._createTimer(C.Duration_0, P._asyncRunCallback$closure);
- $._callbacksAreEnqueued = true;
- }
+_registerErrorHandler: function(errorHandler, zone) {
+ var t1 = J.getInterceptor(errorHandler);
+ zone.toString;
+ if (!!t1.$is_args2)
+ return errorHandler;
+ else
+ return errorHandler;
},
-runAsync: function(callback) {
+getAttachedStackTrace: function(o) {
var t1;
- if (J.$eq($.Zone__current, C._CustomizedZone_WYN)) {
- $.Zone__current.scheduleMicrotask$1(callback);
+ if (o == null || typeof o === "boolean" || typeof o === "number" || typeof o === "string")
return;
- }
- t1 = $.Zone__current;
- t1.scheduleMicrotask$1(t1.bindCallback$2$runGuarded(callback, true));
+ t1 = $.get$_stackTraceExpando();
+ return t1.$index(t1, o);
},
Future_wait: function(futures) {
@@ -2872,7 +2493,8 @@ Future_wait: function(futures) {
t1.remaining_2 = pos + 1;
t4 = future.catchError$1(t2);
t5 = $.Zone__current;
- result = new P._Future(0, t5, null, null, t5.registerUnaryCallback$1(new P.Future_wait_closure(t1, pos)), null, $.Zone__current.registerUnaryCallback$1(null), null);
+ t5.toString;
+ result = new P._Future(0, t5, null, null, new P.Future_wait_closure(t1, pos), null, P._registerErrorHandler(null, t5), null);
result.$builtinTypeInfo = [null];
t4._addListener$1(result);
}
@@ -2887,11 +2509,81 @@ Future_wait: function(futures) {
return t1.completer_0.future;
},
+_asyncRunCallback: function() {
+ var callback, t1, exception, milliseconds;
+ for (; t1 = $.get$_asyncCallbacks(), t1._head !== t1._tail;) {
+ callback = $.get$_asyncCallbacks().removeFirst$0();
+ try {
+ callback.call$0();
+ } catch (exception) {
+ H.unwrapException(exception);
+ milliseconds = C.JSNumber_methods.$tdiv(C.Duration_0._duration, 1000);
+ H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, P._asyncRunCallback$closure);
+ throw exception;
+ }
+
+ }
+ $._callbacksAreEnqueued = false;
+},
+
+_scheduleAsyncCallback: function(callback) {
+ $.get$_asyncCallbacks()._add$1(callback);
+ if (!$._callbacksAreEnqueued) {
+ P._createTimer(C.Duration_0, P._asyncRunCallback$closure);
+ $._callbacksAreEnqueued = true;
+ }
+},
+
+scheduleMicrotask: function(callback) {
+ var t1, t2;
+ t1 = $.Zone__current;
+ if (t1 === C.C__RootZone) {
+ t1.toString;
+ P._scheduleAsyncCallback(callback);
+ return;
+ }
+ t2 = t1.bindCallback$2$runGuarded(callback, true);
+ t1.toString;
+ P._scheduleAsyncCallback(t2);
+},
+
+StreamController_StreamController: function(onCancel, onListen, onPause, onResume, sync, $T) {
+ var t1;
+ if (sync) {
+ t1 = new P._SyncStreamController(onListen, onPause, onResume, onCancel, null, 0, null);
+ H.setRuntimeTypeInfo(t1, [$T]);
+ } else {
+ t1 = new P._AsyncStreamController(onListen, onPause, onResume, onCancel, null, 0, null);
+ H.setRuntimeTypeInfo(t1, [$T]);
+ }
+ return t1;
+},
+
+_runGuarded: function(notificationHandler) {
+ var e, s, exception, t1, t2;
+ if (notificationHandler == null)
+ return;
+ try {
+ notificationHandler.call$0();
+ } catch (exception) {
+ t1 = H.unwrapException(exception);
+ e = t1;
+ s = new H._StackTrace(exception, null);
+ t1 = $.Zone__current;
+ t2 = P._asyncError(e, s);
+ t1.toString;
+ P._rootHandleUncaughtError(t1, null, t1, t2, s);
+ }
+
+},
+
_nullDataHandler: function(value) {
},
-_nullErrorHandler: function(error) {
- $.Zone__current.handleUncaughtError$1(error);
+_nullErrorHandler: function(error, stackTrace) {
+ var t1 = $.Zone__current;
+ t1.toString;
+ P._rootHandleUncaughtError(t1, null, t1, error, stackTrace);
},
_nullDoneHandler: function() {
@@ -2914,7 +2606,7 @@ _runUserCode: function(userCode, onSuccess, onError) {
t1 = H.unwrapException(exception);
e = t1;
s = new H._StackTrace(exception, null);
- onError.call$1(P._asyncError(e, s));
+ onError.call$2(P._asyncError(e, s), s);
}
},
@@ -2924,32 +2616,33 @@ _cancelAndError: function(subscription, future) {
},
Timer_Timer: function(duration, callback) {
- var t1;
- if (J.$eq($.Zone__current, C._CustomizedZone_WYN))
- return $.Zone__current.createTimer$2(duration, callback);
+ var t1, t2;
t1 = $.Zone__current;
- return t1.createTimer$2(duration, t1.bindCallback$2$runGuarded(callback, true));
+ if (t1 === C.C__RootZone) {
+ t1.toString;
+ return P._createTimer(duration, callback);
+ }
+ t2 = t1.bindCallback$2$runGuarded(callback, true);
+ t1.toString;
+ return P._createTimer(duration, t2);
},
_createTimer: function(duration, callback) {
- var milliseconds = duration.get$inMilliseconds();
+ var milliseconds = C.JSNumber_methods.$tdiv(duration._duration, 1000);
return H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback);
},
-_createPeriodicTimer: function(duration, callback) {
- var milliseconds = duration.get$inMilliseconds();
- return H.TimerImpl$periodic(milliseconds < 0 ? 0 : milliseconds, callback);
-},
-
-_rootHandleUncaughtError: function($self, $parent, zone, error) {
- P._scheduleAsyncCallback(new P._rootHandleUncaughtError_closure(error));
+_rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) {
+ P._scheduleAsyncCallback(new P._rootHandleUncaughtError_closure(error, stackTrace));
},
_rootRun: function($self, $parent, zone, f) {
- var old, t1;
- if (J.$eq($.Zone__current, zone))
+ var old, t1, t2;
+ t1 = $.Zone__current;
+ t2 = zone;
+ if (t1 == null ? t2 == null : t1 === t2)
return f.call$0();
- old = $.Zone__current;
+ old = t1;
try {
$.Zone__current = zone;
t1 = f.call$0();
@@ -2960,10 +2653,12 @@ _rootRun: function($self, $parent, zone, f) {
},
_rootRunUnary: function($self, $parent, zone, f, arg) {
- var old, t1;
- if (J.$eq($.Zone__current, zone))
+ var old, t1, t2;
+ t1 = $.Zone__current;
+ t2 = zone;
+ if (t1 == null ? t2 == null : t1 === t2)
return f.call$1(arg);
- old = $.Zone__current;
+ old = t1;
try {
$.Zone__current = zone;
t1 = f.call$1(arg);
@@ -2973,41 +2668,24 @@ _rootRunUnary: function($self, $parent, zone, f, arg) {
}
},
-_rootRegisterCallback: function($self, $parent, zone, f) {
- return f;
-},
-
-_rootRegisterUnaryCallback: function($self, $parent, zone, f) {
- return f;
-},
-
-_rootScheduleMicrotask: function($self, $parent, zone, f) {
- P._scheduleAsyncCallback(f);
-},
-
-_rootCreateTimer: function($self, $parent, zone, duration, callback) {
- return P._createTimer(duration, callback);
-},
-
-_rootCreatePeriodicTimer: function($self, $parent, zone, duration, callback) {
- return P._createPeriodicTimer(duration, callback);
-},
-
-_rootFork: function($self, $parent, zone, specification, zoneValues) {
- var t1, copiedMap;
- if (specification == null)
- specification = C._ZoneSpecification_eLJ;
- else {
- t1 = J.getInterceptor(specification);
- if (typeof specification !== "object" || specification === null || !t1.$is_ZoneSpecification)
- throw H.wrapException(new P.ArgumentError("ZoneSpecifications must be instantiated with the provided constructor."));
+_rootRunBinary: function($self, $parent, zone, f, arg1, arg2) {
+ var old, t1, t2;
+ t1 = $.Zone__current;
+ t2 = zone;
+ if (t1 == null ? t2 == null : t1 === t2)
+ return f.call$2(arg1, arg2);
+ old = t1;
+ try {
+ $.Zone__current = zone;
+ t1 = f.call$2(arg1, arg2);
+ return t1;
+ } finally {
+ $.Zone__current = old;
}
- copiedMap = P.HashMap_HashMap(null, null, null, null, null);
- if (zoneValues != null)
- J.forEach$1$ax(zoneValues, new P._rootFork_closure(copiedMap));
- return new P._CustomizedZone(zone, specification, copiedMap);
},
+_AsyncError: {"": "Object;error>,stackTrace<", $isError: true},
+
Future: {"": "Object;", $isFuture: true},
Future_wait_handleError: {"": "Closure;box_0",
@@ -3047,7 +2725,7 @@ Future_wait_closure: {"": "Closure;box_0,pos_1",
}
},
-_Completer: {"": "Object;"},
+_Completer: {"": "Object;future<"},
_AsyncCompleter: {"": "_Completer;future", $as_Completer: null},
@@ -3070,12 +2748,6 @@ _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener@,_onValueCa
_onValue$1: function(arg0) {
return this.get$_onValue().call$1(arg0);
},
- get$_onError: function() {
- return this._state === 2 ? null : this._onErrorCallback;
- },
- _onError$1: function(arg0) {
- return this.get$_onError().call$1(arg0);
- },
get$_whenCompleteAction: function() {
return this._state === 2 ? null : this._whenCompleteActionCallback;
},
@@ -3090,13 +2762,13 @@ _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener@,_onValueCa
then$1: function(f) {
return this.then$2$onError(f, null);
},
- catchError$2$test: function(f, test) {
- var result = P._Future$_catchError(f, test, null);
+ catchError$2$test: function(onError, test) {
+ var result = P._Future$_catchError(onError, test, null);
this._addListener$1(result);
return result;
},
- catchError$1: function(f) {
- return this.catchError$2$test(f, null);
+ catchError$1: function(onError) {
+ return this.catchError$2$test(onError, null);
},
get$_value: function() {
return this._resultOrListeners;
@@ -3108,14 +2780,15 @@ _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener@,_onValueCa
this._state = 4;
this._resultOrListeners = value;
},
- _setError$1: function(error) {
+ _setError$2: function(error, stackTrace) {
this._state = 8;
- this._resultOrListeners = error;
+ this._resultOrListeners = new P._AsyncError(error, stackTrace);
},
_addListener$1: function(listener) {
- if (this._state >= 4)
- this._zone.scheduleMicrotask$1(new P._Future__addListener_closure(this, listener));
- else {
+ if (this._state >= 4) {
+ this._zone.toString;
+ P._scheduleAsyncCallback(new P._Future__addListener_closure(this, listener));
+ } else {
listener._nextListener = this._resultOrListeners;
this._resultOrListeners = listener;
}
@@ -3146,12 +2819,9 @@ _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener@,_onValueCa
if (stackTrace != null)
P._attachStackTrace(error, stackTrace);
listeners = this._state === 2 ? null : this._removeListeners$0();
- this._setError$1(error);
+ this._setError$2(error, stackTrace);
P._Future__propagateToListeners(this, listeners);
},
- _completeError$1: function(error) {
- return this._completeError$2(error, null);
- },
get$_completeError: function() {
return new P.BoundClosure$2(this, P._Future.prototype._completeError$2, null, "_completeError$2");
},
@@ -3170,15 +2840,17 @@ _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener@,_onValueCa
return;
}
if (this._state !== 0)
- H.throwExpression(new P.StateError("Future already completed"));
+ H.throwExpression(P.StateError$("Future already completed"));
this._state = 1;
- this._zone.scheduleMicrotask$1(new P._Future__asyncComplete_closure(this, value));
+ this._zone.toString;
+ P._scheduleAsyncCallback(new P._Future__asyncComplete_closure(this, value));
},
_asyncCompleteError$2: function(error, stackTrace) {
if (this._state !== 0)
H.throwExpression(new P.StateError("Future already completed"));
this._state = 1;
- this._zone.scheduleMicrotask$1(new P._Future__asyncCompleteError_closure(this, error, stackTrace));
+ this._zone.toString;
+ P._scheduleAsyncCallback(new P._Future__asyncCompleteError_closure(this, error, stackTrace));
},
_async$_Future$immediate$1: function(value, $T) {
this._asyncComplete$1(value);
@@ -3202,7 +2874,8 @@ _Future$immediate: function(value, $T) {
_Future$_then: function(onValueCallback, onErrorCallback, $T) {
var t1 = $.Zone__current;
- t1 = new P._Future(0, t1, null, null, t1.registerUnaryCallback$1(onValueCallback), null, $.Zone__current.registerUnaryCallback$1(onErrorCallback), null);
+ t1.toString;
+ t1 = new P._Future(0, t1, null, null, onValueCallback, null, P._registerErrorHandler(onErrorCallback, t1), null);
H.setRuntimeTypeInfo(t1, [$T]);
return t1;
},
@@ -3210,8 +2883,9 @@ _Future$_then: function(onValueCallback, onErrorCallback, $T) {
_Future$_catchError: function(onErrorCallback, errorTestCallback, $T) {
var t1, t2;
t1 = $.Zone__current;
- t2 = t1.registerUnaryCallback$1(onErrorCallback);
- t2 = new P._Future(0, t1, null, null, null, $.Zone__current.registerUnaryCallback$1(errorTestCallback), t2, null);
+ t2 = P._registerErrorHandler(onErrorCallback, t1);
+ t1.toString;
+ t2 = new P._Future(0, t1, null, null, null, errorTestCallback, t2, null);
H.setRuntimeTypeInfo(t2, [$T]);
return t2;
},
@@ -3244,7 +2918,7 @@ _Future__propagateMultipleListeners: function(source, listeners) {
},
_Future__propagateToListeners: function(source, listeners) {
- var t1, t2, hasError, t3, t4, t5, chainSource, listeners0;
+ var t1, t2, hasError, asyncError, t3, t4, t5, chainSource, listeners0;
t1 = {};
t1.source_4 = source;
for (; true;) {
@@ -3253,7 +2927,13 @@ _Future__propagateToListeners: function(source, listeners) {
return;
hasError = t1.source_4.get$_hasError();
if (hasError && listeners == null) {
- t1.source_4.get$_zone().handleUncaughtError$1(t1.source_4.get$_error());
+ t2 = t1.source_4;
+ asyncError = t2.get$_error();
+ t2 = t2.get$_zone();
+ t3 = J.get$error$x(asyncError);
+ t4 = asyncError.get$stackTrace();
+ t2.toString;
+ P._rootHandleUncaughtError(t2, null, t2, t3, t4);
return;
}
if (listeners == null)
@@ -3262,20 +2942,36 @@ _Future__propagateToListeners: function(source, listeners) {
P._Future__propagateMultipleListeners(t1.source_4, listeners);
return;
}
- if (hasError && !t1.source_4.get$_zone().inSameErrorZone$1(listeners._zone)) {
- t1.source_4.get$_zone().handleUncaughtError$1(t1.source_4.get$_error());
+ if (hasError) {
+ t3 = t1.source_4.get$_zone();
+ t4 = listeners._zone;
+ t3.toString;
+ t4.toString;
+ t3 = t4 == null ? t3 != null : t4 !== t3;
+ } else
+ t3 = false;
+ if (t3) {
+ t2 = t1.source_4;
+ asyncError = t2.get$_error();
+ t2 = t2.get$_zone();
+ t3 = J.get$error$x(asyncError);
+ t4 = asyncError.get$stackTrace();
+ t2.toString;
+ P._rootHandleUncaughtError(t2, null, t2, t3, t4);
return;
}
t3 = $.Zone__current;
t4 = listeners._zone;
if (t3 == null ? t4 != null : t3 !== t4) {
- t4.run$1(new P._Future__propagateToListeners_closure(t1, listeners));
+ t4.toString;
+ P._rootRun(t4, null, t4, new P._Future__propagateToListeners_closure(t1, listeners));
return;
}
t2.listenerHasValue_1 = null;
t2.listenerValueOrError_2 = null;
t2.isPropagationAborted_3 = false;
- t4.run$1(new P._Future__propagateToListeners_closure0(t1, t2, hasError, listeners));
+ t4.toString;
+ P._rootRun(t4, null, t4, new P._Future__propagateToListeners_closure0(t1, t2, hasError, listeners));
if (t2.isPropagationAborted_3)
return;
t3 = t2.listenerHasValue_1 === true;
@@ -3304,9 +3000,11 @@ _Future__propagateToListeners: function(source, listeners) {
listeners._resultOrListeners = t2;
} else {
listeners0 = listeners._removeListeners$0();
- t2 = t2.listenerValueOrError_2;
+ asyncError = t2.listenerValueOrError_2;
+ t2 = J.get$error$x(asyncError);
+ t3 = asyncError.get$stackTrace();
listeners._state = 8;
- listeners._resultOrListeners = t2;
+ listeners._resultOrListeners = new P._AsyncError(t2, t3);
}
t1.source_4 = listeners;
listeners = listeners0;
@@ -3318,8 +3016,7 @@ _Future__propagateToListeners: function(source, listeners) {
_Future__addListener_closure: {"": "Closure;this_0,listener_1",
call$0: function() {
P._Future__propagateToListeners(this.this_0, this.listener_1);
- },
- $is_void_: true
+ }
},
_Future__chainFutures_closure: {"": "Closure;target_0",
@@ -3329,35 +3026,36 @@ _Future__chainFutures_closure: {"": "Closure;target_0",
},
_Future__chainFutures_closure0: {"": "Closure;target_1",
+ call$2: function(error, stackTrace) {
+ this.target_1._completeError$2(error, stackTrace);
+ },
call$1: function(error) {
- this.target_1._completeError$1(error);
- }
+ return this.call$2(error, null);
+ },
+ $is_args2: true
},
_Future__asyncComplete_closure: {"": "Closure;this_0,value_1",
call$0: function() {
this.this_0._complete$1(this.value_1);
- },
- $is_void_: true
+ }
},
_Future__asyncCompleteError_closure: {"": "Closure;this_0,error_1,stackTrace_2",
call$0: function() {
this.this_0._completeError$2(this.error_1, this.stackTrace_2);
- },
- $is_void_: true
+ }
},
_Future__propagateToListeners_closure: {"": "Closure;box_2,listener_3",
call$0: function() {
P._Future__propagateToListeners(this.box_2.source_4, this.listener_3);
- },
- $is_void_: true
+ }
},
_Future__propagateToListeners_closure0: {"": "Closure;box_2,box_1,hasError_4,listener_5",
call$0: function() {
- var t1, value, error, test, matchesTest, e, s, t2, t3, t4, exception;
+ var t1, value, asyncError, test, matchesTest, errorCallback, e, s, t2, t3, t4, exception;
t1 = {};
try {
t2 = this.box_2;
@@ -3374,23 +3072,25 @@ _Future__propagateToListeners_closure0: {"": "Closure;box_2,box_1,hasError_4,lis
t4.listenerHasValue_1 = true;
}
} else {
- error = t2.source_4.get$_error();
+ asyncError = t2.source_4.get$_error();
t2 = this.listener_5;
test = t2._state === 2 ? null : t2._errorTestCallback;
matchesTest = true;
if (test != null)
- matchesTest = test.call$1(error);
+ matchesTest = test.call$1(J.get$error$x(asyncError));
if (matchesTest === true)
t3 = (t2._state === 2 ? null : t2._onErrorCallback) != null;
else
t3 = false;
- t4 = this.box_1;
if (t3) {
- t4.listenerValueOrError_2 = t2._onError$1(error);
- t4.listenerHasValue_1 = true;
+ errorCallback = t2._state === 2 ? null : t2._onErrorCallback;
+ t2 = this.box_1;
+ t2.listenerValueOrError_2 = P._invokeErrorHandler(errorCallback, J.get$error$x(asyncError), asyncError.get$stackTrace());
+ t2.listenerHasValue_1 = true;
} else {
- t4.listenerValueOrError_2 = error;
- t4.listenerHasValue_1 = false;
+ t2 = this.box_1;
+ t2.listenerValueOrError_2 = asyncError;
+ t2.listenerHasValue_1 = false;
}
}
t2 = this.listener_5;
@@ -3408,13 +3108,22 @@ _Future__propagateToListeners_closure0: {"": "Closure;box_2,box_1,hasError_4,lis
t1 = H.unwrapException(exception);
e = t1;
s = new H._StackTrace(exception, null);
- t1 = this.box_1;
- t1.listenerValueOrError_2 = P._asyncError(e, s);
- t1.listenerHasValue_1 = false;
+ if (this.hasError_4) {
+ t1 = J.get$error$x(this.box_2.source_4.get$_error());
+ t2 = e;
+ t2 = t1 == null ? t2 == null : t1 === t2;
+ t1 = t2;
+ } else
+ t1 = false;
+ t2 = this.box_1;
+ if (t1)
+ t2.listenerValueOrError_2 = this.box_2.source_4.get$_error();
+ else
+ t2.listenerValueOrError_2 = new P._AsyncError(P._asyncError(e, s), s);
+ this.box_1.listenerHasValue_1 = false;
}
- },
- $is_void_: true
+ }
},
_Future__propagateToListeners__closure: {"": "Closure;box_2,listener_6",
@@ -3424,25 +3133,24 @@ _Future__propagateToListeners__closure: {"": "Closure;box_2,listener_6",
},
_Future__propagateToListeners__closure0: {"": "Closure;box_0,listener_7",
- call$1: function(error) {
+ call$2: function(error, stackTrace) {
var t1, t2, t3;
t1 = this.box_0;
t2 = t1.completeResult_0;
t3 = J.getInterceptor(t2);
if (typeof t2 !== "object" || t2 === null || !t3.$is_Future) {
t1.completeResult_0 = P._Future$(null);
- t1.completeResult_0._setError$1(error);
+ t1.completeResult_0._setError$2(error, stackTrace);
}
P._Future__propagateToListeners(t1.completeResult_0, this.listener_7);
- }
+ },
+ call$1: function(error) {
+ return this.call$2(error, null);
+ },
+ $is_args2: true
},
Stream: {"": "Object;",
- map$1: function(_, convert) {
- var t1 = new P._MapStream(convert, this);
- H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "Stream", 0), null]);
- return t1;
- },
forEach$1: function(_, action) {
var t1, future;
t1 = {};
@@ -3458,13 +3166,6 @@ Stream: {"": "Object;",
t1.count_0 = 0;
this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1), true, new P.Stream_length_closure0(t1, future), future.get$_completeError());
return future;
- },
- toList$0: function(_) {
- var result, future;
- result = [];
- future = P._Future$([J.JSArray, H.getRuntimeTypeArgument(this, "Stream", 0)]);
- this.listen$4$cancelOnError$onDone$onError(new P.Stream_toList_closure(this, result), true, new P.Stream_toList_closure0(result, future), future.get$_completeError());
- return future;
}
},
@@ -3477,8 +3178,7 @@ Stream_forEach_closure: {"": "Closure;box_0,this_1,action_2,future_3",
Stream_forEach__closure: {"": "Closure;action_4,element_5",
call$0: function() {
return this.action_4.call$1(this.element_5);
- },
- $is_void_: true
+ }
},
Stream_forEach__closure0: {"": "Closure;",
@@ -3489,8 +3189,7 @@ Stream_forEach__closure0: {"": "Closure;",
Stream_forEach_closure0: {"": "Closure;future_6",
call$0: function() {
this.future_6._complete$1(null);
- },
- $is_void_: true
+ }
},
Stream_length_closure: {"": "Closure;box_0",
@@ -3503,41 +3202,214 @@ Stream_length_closure: {"": "Closure;box_0",
Stream_length_closure0: {"": "Closure;box_0,future_1",
call$0: function() {
this.future_1._complete$1(this.box_0.count_0);
- },
- $is_void_: true
+ }
},
-Stream_toList_closure: {"": "Closure;this_0,result_1",
- call$1: function(data) {
- this.result_1.push(data);
+StreamSubscription: {"": "Object;"},
+
+EventSink: {"": "Object;"},
+
+_StreamController: {"": "Object;",
+ get$_pendingEvents: function() {
+ if ((this._state & 8) === 0)
+ return this._varData;
+ return this._varData.get$varData();
+ },
+ _ensurePendingEvents$0: function() {
+ if ((this._state & 8) === 0) {
+ if (this._varData == null)
+ this._varData = new P._StreamImplEvents(null, null, 0);
+ return this._varData;
+ }
+ var t1 = this._varData.get$varData();
+ return t1;
+ },
+ get$_subscription: function() {
+ if ((this._state & 8) !== 0)
+ return this._varData.get$varData();
+ return this._varData;
+ },
+ _badEventState$0: function() {
+ if ((this._state & 4) !== 0)
+ return new P.StateError("Cannot add event after closing");
+ return new P.StateError("Cannot add event while adding a stream");
+ },
+ add$1: function(_, value) {
+ if (this._state >= 4)
+ throw H.wrapException(this._badEventState$0());
+ this._async$_add$1(value);
+ },
+ addError$2: function(error, stackTrace) {
+ if (this._state >= 4)
+ throw H.wrapException(this._badEventState$0());
+ this._addError$2(error, stackTrace);
+ },
+ addError$1: function(error) {
+ return this.addError$2(error, null);
+ },
+ _async$_add$1: function(value) {
+ var t1 = this._state;
+ if ((t1 & 1) !== 0)
+ this._sendData$1(value);
+ else if ((t1 & 3) === 0) {
+ t1 = this._ensurePendingEvents$0();
+ t1.add$1(t1, new P._DelayedData(value, null));
+ }
+ },
+ _addError$2: function(error, stackTrace) {
+ var t1 = this._state;
+ if ((t1 & 1) !== 0)
+ this._sendError$2(error, stackTrace);
+ else if ((t1 & 3) === 0) {
+ t1 = this._ensurePendingEvents$0();
+ t1.add$1(t1, new P._DelayedError(error, stackTrace, null));
+ }
+ },
+ _subscribe$1: function(cancelOnError) {
+ var t1, t2, subscription, pendingEvents;
+ if ((this._state & 3) !== 0)
+ throw H.wrapException(P.StateError$("Stream has already been listened to."));
+ t1 = $.Zone__current;
+ t2 = cancelOnError ? 1 : 0;
+ subscription = new P._ControllerSubscription(this, null, null, null, t1, t2, null);
+ H.setRuntimeTypeInfo(subscription, [null]);
+ pendingEvents = this.get$_pendingEvents();
+ this._state = (this._state | 1) >>> 0;
+ if ((this._state & 8) !== 0)
+ this._varData.set$varData(subscription);
+ else
+ this._varData = subscription;
+ subscription._setPendingEvents$1(pendingEvents);
+ subscription._guardCallback$1(new P._StreamController__subscribe_closure(this));
+ return subscription;
+ },
+ _recordCancel$1: function(subscription) {
+ var t1;
+ if ((this._state & 8) !== 0)
+ this._varData.cancel$0();
+ this._varData = null;
+ this._state = (this._state & 4294967286 | 2) >>> 0;
+ P._runGuarded(this.get$_onCancel());
+ t1 = this._doneFuture;
+ if (t1 != null && t1._state === 0)
+ t1._asyncComplete$1(null);
}
},
-Stream_toList_closure0: {"": "Closure;result_2,future_3",
+_StreamController__subscribe_closure: {"": "Closure;this_0",
call$0: function() {
- this.future_3._complete$1(this.result_2);
+ P._runGuarded(this.this_0.get$_onListen());
+ }
+},
+
+_SyncStreamControllerDispatch: {"": "Object;",
+ _sendData$1: function(data) {
+ this.get$_subscription()._async$_add$1(data);
},
- $is_void_: true
+ _sendError$2: function(error, stackTrace) {
+ this.get$_subscription()._addError$2(error, stackTrace);
+ }
},
-StreamSubscription: {"": "Object;"},
+_AsyncStreamControllerDispatch: {"": "Object;",
+ _sendData$1: function(data) {
+ this.get$_subscription()._addPending$1(new P._DelayedData(data, null));
+ },
+ _sendError$2: function(error, stackTrace) {
+ this.get$_subscription()._addPending$1(new P._DelayedError(error, stackTrace, null));
+ }
+},
-EventSink: {"": "Object;"},
+_AsyncStreamController: {"": "_StreamController__AsyncStreamControllerDispatch;_onListen<,_onPause<,_onResume<,_onCancel<,_varData,_state,_doneFuture"},
+
+_StreamController__AsyncStreamControllerDispatch: {"": "_StreamController+_AsyncStreamControllerDispatch;"},
+
+_SyncStreamController: {"": "_StreamController__SyncStreamControllerDispatch;_onListen<,_onPause<,_onResume<,_onCancel<,_varData,_state,_doneFuture"},
+
+_StreamController__SyncStreamControllerDispatch: {"": "_StreamController+_SyncStreamControllerDispatch;"},
+
+_ControllerStream: {"": "_StreamImpl;_controller",
+ _createSubscription$1: function(cancelOnError) {
+ return this._controller._subscribe$1(cancelOnError);
+ },
+ get$hashCode: function(_) {
+ return (H.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0;
+ },
+ $eq: function(_, other) {
+ var t1;
+ if (other == null)
+ return false;
+ if (this === other)
+ return true;
+ t1 = J.getInterceptor(other);
+ if (typeof other !== "object" || other === null || !t1.$is_ControllerStream)
+ return false;
+ return other._controller === this._controller;
+ },
+ $is_ControllerStream: true,
+ $as_StreamImpl: null
+},
+
+_ControllerSubscription: {"": "_BufferingStreamSubscription;_controller,_onData,_onError,_onDone,_zone,_state,_pending",
+ _onCancel$0: function() {
+ this._controller._recordCancel$1(this);
+ },
+ _onPause$0: function() {
+ var t1, addState;
+ t1 = this._controller;
+ if ((t1._state & 8) !== 0) {
+ addState = t1._varData;
+ addState.pause$0(addState);
+ }
+ P._runGuarded(t1.get$_onPause());
+ },
+ get$_onPause: function() {
+ return new P.BoundClosure$0(this, P._ControllerSubscription.prototype._onPause$0, null, "_onPause$0");
+ },
+ _onResume$0: function() {
+ var t1 = this._controller;
+ if ((t1._state & 8) !== 0)
+ t1._varData.resume$0();
+ P._runGuarded(t1.get$_onResume());
+ },
+ get$_onResume: function() {
+ return new P.BoundClosure$0(this, P._ControllerSubscription.prototype._onResume$0, null, "_onResume$0");
+ },
+ $as_BufferingStreamSubscription: null
+},
_EventSink: {"": "Object;"},
-_BufferingStreamSubscription: {"": "Object;_zone<",
+_BufferingStreamSubscription: {"": "Object;_onData,_onError,_onDone,_zone<,_state,_pending",
+ _setPendingEvents$1: function(pendingEvents) {
+ if (pendingEvents == null)
+ return;
+ this._pending = pendingEvents;
+ if (!pendingEvents.get$isEmpty(pendingEvents)) {
+ this._state = (this._state | 32) >>> 0;
+ this._pending.schedule$1(this);
+ }
+ },
+ onData$1: function(handleData) {
+ $.Zone__current.toString;
+ this._onData = handleData;
+ },
+ onError$1: function(_, handleError) {
+ this._onError = P._registerErrorHandler(handleError, $.Zone__current);
+ },
+ onDone$1: function(handleDone) {
+ if (handleDone == null)
+ handleDone = P._nullDoneHandler$closure;
+ $.Zone__current.toString;
+ this._onDone = handleDone;
+ },
pause$1: function(_, resumeSignal) {
- var t1, t2;
- t1 = this._state;
+ var t1 = this._state;
if ((t1 & 8) !== 0)
return;
this._state = (t1 + 64 | 4) >>> 0;
- if (t1 < 64 && this._pending != null) {
- t2 = this._pending;
- if (t2._state === 1)
- t2._state = 3;
- }
+ if (t1 < 64 && this._pending != null)
+ this._pending.cancelSchedule$0();
if ((t1 & 4) === 0 && (this._state & 16) === 0)
this._guardCallback$1(this.get$_onPause());
},
@@ -3545,20 +3417,27 @@ _BufferingStreamSubscription: {"": "Object;_zone<",
return this.pause$1($receiver, null);
},
resume$0: function() {
- var t1 = this._state;
+ var t1, t2;
+ t1 = this._state;
if ((t1 & 8) !== 0)
return;
if (t1 >= 64) {
this._state = t1 - 64;
t1 = this._state;
- if (t1 < 64)
- if ((t1 & 32) !== 0 && this._pending.lastPendingEvent != null)
+ if (t1 < 64) {
+ if ((t1 & 32) !== 0) {
+ t2 = this._pending;
+ t2 = !t2.get$isEmpty(t2);
+ } else
+ t2 = false;
+ if (t2)
this._pending.schedule$1(this);
else {
this._state = (t1 & 4294967291) >>> 0;
if ((this._state & 16) === 0)
this._guardCallback$1(this.get$_onResume());
}
+ }
}
},
cancel$0: function() {
@@ -3576,18 +3455,15 @@ _BufferingStreamSubscription: {"": "Object;_zone<",
get$_mayResumeInput: function() {
if (this._state < 64) {
var t1 = this._pending;
- t1 = t1 == null || t1.lastPendingEvent == null;
+ t1 = t1 == null || t1.get$isEmpty(t1);
} else
t1 = false;
return t1;
},
_cancel$0: function() {
this._state = (this._state | 8) >>> 0;
- if ((this._state & 32) !== 0) {
- var t1 = this._pending;
- if (t1._state === 1)
- t1._state = 3;
- }
+ if ((this._state & 32) !== 0)
+ this._pending.cancelSchedule$0();
},
_async$_add$1: function(data) {
var t1 = this._state;
@@ -3598,24 +3474,14 @@ _BufferingStreamSubscription: {"": "Object;_zone<",
else
this._addPending$1(new P._DelayedData(data, null));
},
- _addError$1: function(error) {
+ _addError$2: function(error, stackTrace) {
var t1 = this._state;
if ((t1 & 8) !== 0)
return;
if (t1 < 16)
- this._sendError$1(error);
- else
- this._addPending$1(new P._DelayedError(error, null));
- },
- _close$0: function() {
- var t1 = this._state;
- if ((t1 & 8) !== 0)
- return;
- this._state = (t1 | 2) >>> 0;
- if (this._state < 16)
- this._sendDone$0();
+ this._sendError$2(error, stackTrace);
else
- this._addPending$1(C.C__DelayedDone);
+ this._addPending$1(new P._DelayedError(error, stackTrace, null));
},
_onPause$0: function() {
},
@@ -3647,30 +3513,33 @@ _BufferingStreamSubscription: {"": "Object;_zone<",
_sendData$1: function(data) {
var t1 = this._state;
this._state = (t1 | 16) >>> 0;
- this._zone.runUnaryGuarded$2(this._async$_onData, data);
+ this._zone.runUnaryGuarded$2(this._onData, data);
this._state = (this._state & 4294967279) >>> 0;
this._checkState$1((t1 & 4) !== 0);
},
- _sendError$1: function(error) {
- var t1, t2;
+ _sendError$2: function(error, stackTrace) {
+ var t1, t2, t3, t4;
t1 = this._state;
this._state = (t1 | 16) >>> 0;
t2 = this._zone;
- if (!t2.inSameErrorZone$1($.Zone__current))
- $.Zone__current.handleUncaughtError$1(error);
- else
- t2.runUnaryGuarded$2(this._onError, error);
+ t3 = $.Zone__current;
+ t2.toString;
+ t3.toString;
+ if (t3 == null ? t2 != null : t3 !== t2)
+ P._rootHandleUncaughtError(t3, null, t3, error, stackTrace);
+ else {
+ t3 = this._onError;
+ t4 = J.getInterceptor(t3);
+ if (!!t4.$is_args2)
+ t2.runBinaryGuarded$3(t3, error, stackTrace);
+ else
+ t2.runUnaryGuarded$2(t3, error);
+ }
this._state = (this._state & 4294967279) >>> 0;
if ((this._state & 1) !== 0)
this._cancel$0();
this._checkState$1((t1 & 4) !== 0);
},
- _sendDone$0: function() {
- this._state = (this._state | 26) >>> 0;
- this._zone.runGuarded$1(this._onDone);
- this._onCancel$0();
- this._state = (this._state & 4294967279) >>> 0;
- },
_guardCallback$1: function(callback) {
var t1 = this._state;
this._state = (t1 | 16) >>> 0;
@@ -3679,11 +3548,16 @@ _BufferingStreamSubscription: {"": "Object;_zone<",
this._checkState$1((t1 & 4) !== 0);
},
_checkState$1: function(wasInputPaused) {
- var t1, isInputPaused;
+ var t1, t2, isInputPaused;
t1 = this._state;
- if ((t1 & 32) !== 0 && this._pending.lastPendingEvent == null) {
- this._state = (t1 & 4294967263) >>> 0;
- if ((this._state & 4) !== 0 && this.get$_mayResumeInput())
+ if ((t1 & 32) !== 0) {
+ t2 = this._pending;
+ t2 = t2.get$isEmpty(t2);
+ } else
+ t2 = false;
+ if (t2) {
+ this._state = (t1 & 4294967263) >>> 0;
+ if ((this._state & 4) !== 0 && this.get$_mayResumeInput())
this._state = (this._state & 4294967291) >>> 0;
}
for (; true; wasInputPaused = isInputPaused) {
@@ -3707,8 +3581,30 @@ _BufferingStreamSubscription: {"": "Object;_zone<",
if ((t1 & 32) !== 0 && t1 < 64)
this._pending.schedule$1(this);
},
- _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnError) {
- }
+ static: {
+"": "_BufferingStreamSubscription__STATE_CANCEL_ON_ERROR,_BufferingStreamSubscription__STATE_CLOSED,_BufferingStreamSubscription__STATE_INPUT_PAUSED,_BufferingStreamSubscription__STATE_CANCELED,_BufferingStreamSubscription__STATE_IN_CALLBACK,_BufferingStreamSubscription__STATE_HAS_PENDING,_BufferingStreamSubscription__STATE_PAUSE_COUNT,_BufferingStreamSubscription__STATE_PAUSE_COUNT_SHIFT",
+}
+
+},
+
+_StreamImpl: {"": "Stream;",
+ listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
+ var subscription = this._createSubscription$1(true === cancelOnError);
+ subscription.onData$1(onData);
+ subscription.onError$1(subscription, onError);
+ subscription.onDone$1(onDone);
+ return subscription;
+ },
+ listen$2$onError: function(onData, onError) {
+ return this.listen$4$cancelOnError$onDone$onError(onData, null, null, onError);
+ },
+ _createSubscription$1: function(cancelOnError) {
+ var t1, t2;
+ t1 = $.Zone__current;
+ t2 = cancelOnError ? 1 : 0;
+ return new P._BufferingStreamSubscription(null, null, null, t1, t2, null);
+ },
+ $asStream: null
},
_DelayedEvent: {"": "Object;next@"},
@@ -3719,21 +3615,9 @@ _DelayedData: {"": "_DelayedEvent;value,next",
}
},
-_DelayedError: {"": "_DelayedEvent;error,next",
- perform$1: function(dispatch) {
- dispatch._sendError$1(this.error);
- }
-},
-
-_DelayedDone: {"": "Object;",
+_DelayedError: {"": "_DelayedEvent;error>,stackTrace<,next",
perform$1: function(dispatch) {
- dispatch._sendDone$0();
- },
- get$next: function() {
- return;
- },
- set$next: function(_) {
- throw H.wrapException(new P.StateError("No events after a done."));
+ dispatch._sendError$2(this.error, this.stackTrace);
}
},
@@ -3746,8 +3630,12 @@ _PendingEvents: {"": "Object;",
this._state = 1;
return;
}
- P.runAsync(new P._PendingEvents_schedule_closure(this, dispatch));
+ P.scheduleMicrotask(new P._PendingEvents_schedule_closure(this, dispatch));
this._state = 1;
+ },
+ cancelSchedule$0: function() {
+ if (this._state === 1)
+ this._state = 3;
}
},
@@ -3760,11 +3648,13 @@ _PendingEvents_schedule_closure: {"": "Closure;this_0,dispatch_1",
if (oldState === 3)
return;
t1.handleNext$1(this.dispatch_1);
- },
- $is_void_: true
+ }
},
_StreamImplEvents: {"": "_PendingEvents;firstPendingEvent,lastPendingEvent,_state",
+ get$isEmpty: function(_) {
+ return this.lastPendingEvent == null;
+ },
add$1: function(_, $event) {
var t1 = this.lastPendingEvent;
if (t1 == null) {
@@ -3785,366 +3675,117 @@ _StreamImplEvents: {"": "_PendingEvents;firstPendingEvent,lastPendingEvent,_stat
},
_cancelAndError_closure: {"": "Closure;subscription_0,future_1",
- call$1: function(error) {
+ call$2: function(error, stackTrace) {
this.subscription_0.cancel$0();
- this.future_1._completeError$1(error);
- }
-},
-
-_ForwardingStream: {"": "Stream;",
- listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
- return P._ForwardingStreamSubscription$(this, onData, onError, onDone, true === cancelOnError, H.getRuntimeTypeArgument(this, "_ForwardingStream", 0), H.getRuntimeTypeArgument(this, "_ForwardingStream", 1));
- },
- listen$3$onDone$onError: function(onData, onDone, onError) {
- return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
- },
- _handleData$2: function(data, sink) {
- sink._async$_add$1(data);
- },
- $asStream: function($S, $T) {
- return [$T];
- }
-},
-
-_ForwardingStreamSubscription: {"": "_BufferingStreamSubscription;_stream,_subscription,_async$_onData,_onError,_onDone,_zone,_state,_pending",
- _async$_add$1: function(data) {
- if ((this._state & 2) !== 0)
- return;
- P._BufferingStreamSubscription.prototype._async$_add$1.call(this, data);
- },
- _addError$1: function(error) {
- if ((this._state & 2) !== 0)
- return;
- P._BufferingStreamSubscription.prototype._addError$1.call(this, error);
- },
- _onPause$0: function() {
- var t1 = this._subscription;
- if (t1 == null)
- return;
- t1.pause$0(t1);
- },
- get$_onPause: function() {
- return new P.BoundClosure$0(this, P._ForwardingStreamSubscription.prototype._onPause$0, null, "_onPause$0");
- },
- _onResume$0: function() {
- var t1 = this._subscription;
- if (t1 == null)
- return;
- t1.resume$0();
- },
- get$_onResume: function() {
- return new P.BoundClosure$0(this, P._ForwardingStreamSubscription.prototype._onResume$0, null, "_onResume$0");
- },
- _onCancel$0: function() {
- var t1 = this._subscription;
- if (t1 != null) {
- this._subscription = null;
- t1.cancel$0();
- }
- },
- _handleData$1: function(data) {
- this._stream._handleData$2(data, this);
- },
- get$_handleData: function() {
- return new P.BoundClosure$1(this, P._ForwardingStreamSubscription.prototype._handleData$1, null, "_handleData$1");
- },
- _handleError$1: function(error) {
- this._addError$1(error);
- },
- get$_handleError: function() {
- return new P.BoundClosure$1(this, P._ForwardingStreamSubscription.prototype._handleError$1, null, "_handleError$1");
- },
- _handleDone$0: function() {
- this._close$0();
+ this.future_1._completeError$2(error, stackTrace);
},
- get$_handleDone: function() {
- return new P.BoundClosure$0(this, P._ForwardingStreamSubscription.prototype._handleDone$0, null, "_handleDone$0");
- },
- _ForwardingStreamSubscription$5: function(_stream, onData, onError, onDone, cancelOnError, $S, $T) {
- var t1, t2;
- t1 = this.get$_handleData();
- t2 = this.get$_handleError();
- this._subscription = this._stream._async$_source.listen$3$onDone$onError(t1, this.get$_handleDone(), t2);
- },
- $as_BufferingStreamSubscription: function($S, $T) {
- return [$T];
- },
- static: {
-_ForwardingStreamSubscription$: function(_stream, onData, onError, onDone, cancelOnError, $S, $T) {
- var t1, t2, t3, t4, t5;
- t1 = $.Zone__current;
- t2 = t1.registerUnaryCallback$1(onData);
- t3 = $.Zone__current.registerUnaryCallback$1(onError);
- t4 = $.Zone__current.registerCallback$1(onDone);
- t5 = cancelOnError ? 1 : 0;
- t5 = new P._ForwardingStreamSubscription(_stream, null, t2, t3, t4, t1, t5, null);
- H.setRuntimeTypeInfo(t5, [$S, $T]);
- t5._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError);
- t5._ForwardingStreamSubscription$5(_stream, onData, onError, onDone, cancelOnError, $S, $T);
- return t5;
-}}
-
+ $is_args2: true
},
-_MapStream: {"": "_ForwardingStream;_transform,_async$_source",
- _transform$1: function(arg0) {
- return this._transform.call$1(arg0);
- },
- _handleData$2: function(inputEvent, sink) {
- var outputEvent, e, s, exception, t1;
- outputEvent = null;
+_BaseZone: {"": "Object;",
+ runGuarded$1: function(f) {
+ var e, s, t1, exception;
try {
- outputEvent = this._transform$1(inputEvent);
+ t1 = this.run$1(f);
+ return t1;
} catch (exception) {
t1 = H.unwrapException(exception);
e = t1;
s = new H._StackTrace(exception, null);
- sink._addError$1(P._asyncError(e, s));
- return;
+ return this.handleUncaughtError$2(e, s);
}
- sink._async$_add$1(outputEvent);
- },
- $as_ForwardingStream: null
-},
-
-Timer: {"": "Object;"},
-
-ZoneSpecification: {"": "Object;",
- handleUncaughtError$1: function(arg0) {
- return this.get$handleUncaughtError().call$1(arg0);
- },
- run$1: function(arg0) {
- return this.get$run().call$1(arg0);
- },
- registerCallback$1: function(arg0) {
- return this.get$registerCallback().call$1(arg0);
- },
- registerUnaryCallback$1: function(arg0) {
- return this.get$registerUnaryCallback().call$1(arg0);
- },
- scheduleMicrotask$1: function(arg0) {
- return this.get$scheduleMicrotask().call$1(arg0);
- },
- createTimer$2: function(arg0, arg1) {
- return this.get$createTimer().call$2(arg0, arg1);
- }
-},
-
-_ZoneSpecification: {"": "Object;handleUncaughtError,run,runUnary,registerCallback,registerUnaryCallback,scheduleMicrotask,createTimer,createPeriodicTimer,fork",
- handleUncaughtError$1: function(arg0) {
- return this.handleUncaughtError.call$1(arg0);
- },
- run$1: function(arg0) {
- return this.run.call$1(arg0);
- },
- registerCallback$1: function(arg0) {
- return this.registerCallback.call$1(arg0);
- },
- registerUnaryCallback$1: function(arg0) {
- return this.registerUnaryCallback.call$1(arg0);
- },
- scheduleMicrotask$1: function(arg0) {
- return this.scheduleMicrotask.call$1(arg0);
- },
- createTimer$2: function(arg0, arg1) {
- return this.createTimer.call$2(arg0, arg1);
- },
- $is_ZoneSpecification: true
-},
-
-ZoneDelegate: {"": "Object;"},
-
-Zone: {"": "Object;"},
-
-_ZoneDelegate: {"": "Object;_degelationTarget",
- get$_zone: function() {
- return this._degelationTarget;
- },
- handleUncaughtError$2: function(zone, e) {
- var $parent, t1, t2;
- $parent = this._degelationTarget;
- for (; t1 = $parent.get$_specification().handleUncaughtError, t2 = J.getInterceptor$x($parent), t1 == null;)
- $parent = t2.get$parent($parent);
- return t1.call$4($parent, new P._ZoneDelegate(t2.get$parent($parent)), zone, e);
- },
- run$2: function(zone, f) {
- var $parent, t1, t2;
- $parent = this._degelationTarget;
- for (; t1 = $parent.get$_specification().run, t2 = J.getInterceptor$x($parent), t1 == null;)
- $parent = t2.get$parent($parent);
- return t1.call$4($parent, new P._ZoneDelegate(t2.get$parent($parent)), zone, f);
- },
- runUnary$3: function(zone, f, arg) {
- var $parent, t1, t2;
- $parent = this._degelationTarget;
- for (; t1 = $parent.get$_specification().runUnary, t2 = J.getInterceptor$x($parent), t1 == null;)
- $parent = t2.get$parent($parent);
- return t1.call$5($parent, new P._ZoneDelegate(t2.get$parent($parent)), zone, f, arg);
- },
- registerCallback$2: function(zone, f) {
- var $parent, t1, t2;
- $parent = this._degelationTarget;
- for (; t1 = $parent.get$_specification().registerCallback, t2 = J.getInterceptor$x($parent), t1 == null;)
- $parent = t2.get$parent($parent);
- return t1.call$4($parent, new P._ZoneDelegate(t2.get$parent($parent)), zone, f);
- },
- registerUnaryCallback$2: function(zone, f) {
- var $parent, t1, t2;
- $parent = this._degelationTarget;
- for (; t1 = $parent.get$_specification().registerUnaryCallback, t2 = J.getInterceptor$x($parent), t1 == null;)
- $parent = t2.get$parent($parent);
- return t1.call$4($parent, new P._ZoneDelegate(t2.get$parent($parent)), zone, f);
- },
- scheduleMicrotask$2: function(zone, f) {
- var $parent, t1;
- $parent = this._degelationTarget;
- for (; t1 = J.getInterceptor$x($parent), $parent.get$_specification().scheduleMicrotask == null;)
- $parent = t1.get$parent($parent);
- t1 = t1.get$parent($parent);
- $parent.get$_specification().scheduleMicrotask.call$4($parent, new P._ZoneDelegate(t1), zone, f);
- },
- createTimer$3: function(zone, duration, f) {
- var $parent, t1, t2;
- $parent = this._degelationTarget;
- for (; t1 = $parent.get$_specification().createTimer, t2 = J.getInterceptor$x($parent), t1 == null;)
- $parent = t2.get$parent($parent);
- return t1.call$5($parent, new P._ZoneDelegate(t2.get$parent($parent)), zone, duration, f);
- }
-},
-
-_CustomizedZone: {"": "Object;parent>,_specification<,_map",
- get$_errorZone: function() {
- if (this._specification.handleUncaughtError != null)
- return this;
- return this.parent.get$_errorZone();
},
- inSameErrorZone$1: function(otherZone) {
- return this.get$_errorZone() === otherZone.get$_errorZone();
- },
- runGuarded$1: function(f) {
+ runUnaryGuarded$2: function(f, arg) {
var e, s, t1, exception;
try {
- t1 = new P._ZoneDelegate(this).run$2(this, f);
+ t1 = this.runUnary$2(f, arg);
return t1;
} catch (exception) {
t1 = H.unwrapException(exception);
e = t1;
s = new H._StackTrace(exception, null);
- return new P._ZoneDelegate(this).handleUncaughtError$2(this, P._asyncError(e, s));
+ return this.handleUncaughtError$2(e, s);
}
},
- runUnaryGuarded$2: function(f, arg) {
+ runBinaryGuarded$3: function(f, arg1, arg2) {
var e, s, t1, exception;
try {
- t1 = new P._ZoneDelegate(this).runUnary$3(this, f, arg);
+ t1 = this.runBinary$3(f, arg1, arg2);
return t1;
} catch (exception) {
t1 = H.unwrapException(exception);
e = t1;
s = new H._StackTrace(exception, null);
- return new P._ZoneDelegate(this).handleUncaughtError$2(this, P._asyncError(e, s));
+ return this.handleUncaughtError$2(e, s);
}
},
bindCallback$2$runGuarded: function(f, runGuarded) {
- var registered = new P._ZoneDelegate(this).registerCallback$2(this, f);
- if (runGuarded)
- return new P._CustomizedZone_bindCallback_closure(this, registered);
- else
- return new P._CustomizedZone_bindCallback_closure0(this, registered);
- },
- bindUnaryCallback$2$runGuarded: function(f, runGuarded) {
- var registered = new P._ZoneDelegate(this).registerUnaryCallback$2(this, f);
+ var registered = this.registerCallback$1(f);
if (runGuarded)
- return new P._CustomizedZone_bindUnaryCallback_closure(this, registered);
+ return new P._BaseZone_bindCallback_closure(this, registered);
else
- return new P._CustomizedZone_bindUnaryCallback_closure0(this, registered);
- },
- $index: function(_, key) {
- var t1, result;
- t1 = this._map;
- result = t1.$index(t1, key);
- if (result != null || t1.containsKey$1(key))
- return result;
- t1 = this.parent;
- if (t1 != null)
- return J.$index$asx(t1, key);
- return;
- },
- handleUncaughtError$1: function(error) {
- return new P._ZoneDelegate(this).handleUncaughtError$2(this, error);
- },
- run$1: function(f) {
- return new P._ZoneDelegate(this).run$2(this, f);
- },
- registerCallback$1: function(f) {
- return new P._ZoneDelegate(this).registerCallback$2(this, f);
- },
- registerUnaryCallback$1: function(f) {
- return new P._ZoneDelegate(this).registerUnaryCallback$2(this, f);
- },
- scheduleMicrotask$1: function(f) {
- new P._ZoneDelegate(this).scheduleMicrotask$2(this, f);
- },
- createTimer$2: function(duration, f) {
- return new P._ZoneDelegate(this).createTimer$3(this, duration, f);
+ return new P._BaseZone_bindCallback_closure0(this, registered);
}
},
-_CustomizedZone_bindCallback_closure: {"": "Closure;this_0,registered_1",
+_BaseZone_bindCallback_closure: {"": "Closure;this_0,registered_1",
call$0: function() {
return this.this_0.runGuarded$1(this.registered_1);
- },
- $is_void_: true
-},
-
-_CustomizedZone_bindCallback_closure0: {"": "Closure;this_2,registered_3",
- call$0: function() {
- var t1 = this.this_2;
- return new P._ZoneDelegate(t1).run$2(t1, this.registered_3);
- },
- $is_void_: true
-},
-
-_CustomizedZone_bindUnaryCallback_closure: {"": "Closure;this_0,registered_1",
- call$1: function(arg) {
- return this.this_0.runUnaryGuarded$2(this.registered_1, arg);
}
},
-_CustomizedZone_bindUnaryCallback_closure0: {"": "Closure;this_2,registered_3",
- call$1: function(arg) {
- var t1 = this.this_2;
- return new P._ZoneDelegate(t1).runUnary$3(t1, this.registered_3, arg);
+_BaseZone_bindCallback_closure0: {"": "Closure;this_2,registered_3",
+ call$0: function() {
+ return this.this_2.run$1(this.registered_3);
}
},
-_rootHandleUncaughtError_closure: {"": "Closure;error_0",
+_rootHandleUncaughtError_closure: {"": "Closure;error_0,stackTrace_1",
call$0: function() {
var t1, trace;
t1 = this.error_0;
- H.Primitives_printString("Uncaught Error: " + H.S(t1));
- trace = P.getAttachedStackTrace(t1);
+ P.print("Uncaught Error: " + H.S(t1));
+ trace = this.stackTrace_1;
+ if (trace == null)
+ trace = P.getAttachedStackTrace(t1);
P._attachStackTrace(t1, null);
if (trace != null)
- H.Primitives_printString("Stack Trace:\n" + H.S(trace) + "\n");
+ P.print("Stack Trace: \n" + H.S(trace) + "\n");
throw H.wrapException(t1);
- },
- $is_void_: true
+ }
},
-_rootFork_closure: {"": "Closure;copiedMap_0",
- call$2: function(key, value) {
- var t1;
- if (key == null)
- throw H.wrapException(new P.ArgumentError("ZoneValue key must not be null"));
- t1 = this.copiedMap_0;
- t1.$indexSet(t1, key, value);
+_RootZone: {"": "_BaseZone;",
+ $index: function(_, key) {
+ return;
+ },
+ handleUncaughtError$2: function(error, stackTrace) {
+ return P._rootHandleUncaughtError(this, null, this, error, stackTrace);
+ },
+ run$1: function(f) {
+ return P._rootRun(this, null, this, f);
+ },
+ runUnary$2: function(f, arg) {
+ return P._rootRunUnary(this, null, this, f, arg);
+ },
+ runBinary$3: function(f, arg1, arg2) {
+ return P._rootRunBinary(this, null, this, f, arg1, arg2);
+ },
+ registerCallback$1: function(f) {
+ return f;
}
}}],
["dart.collection", "dart:collection", , P, {
+_HashSet__newHashTable: function() {
+ var table = Object.create(null);
+ table["<non-identifier-key>"] = table;
+ delete table["<non-identifier-key>"];
+ return table;
+},
+
_defaultEquals: function(a, b) {
return J.$eq(a, b);
},
@@ -4159,25 +3800,272 @@ HashMap_HashMap: function(equals, hashCode, isValidKey, $K, $V) {
return t1;
},
-LinkedHashMap_LinkedHashMap: function(equals, hashCode, isValidKey, $K, $V) {
- var t1;
- if (hashCode == null) {
- if (equals == null) {
- t1 = new P._LinkedHashMap(0, null, null, null, null, null, 0);
- H.setRuntimeTypeInfo(t1, [$K, $V]);
- return t1;
- }
- hashCode = P._defaultHashCode$closure;
- } else {
- if ((P.identityHashCode$closure == null ? hashCode == null : P.identityHashCode$closure === hashCode) && (P.identical$closure == null ? equals == null : P.identical$closure === equals)) {
- t1 = new P._LinkedIdentityHashMap(0, null, null, null, null, null, 0);
- H.setRuntimeTypeInfo(t1, [$K, $V]);
- return t1;
+_iterableToString: function(iterable) {
+ var LENGTH_LIMIT, MIN_COUNT, MAX_COUNT, OVERHEAD, ELLIPSIS_SIZE, result, $length, count, it, next, penultimateString, ultimateString, penultimate, ultimate, elision, t1, t2, t3, t4;
+ LENGTH_LIMIT = 80;
+ MIN_COUNT = 3;
+ MAX_COUNT = 100;
+ OVERHEAD = 2;
+ ELLIPSIS_SIZE = 3;
+ t1 = $.get$_toStringVisiting();
+ if (t1.contains$1(t1, iterable))
+ return "(...)";
+ t1 = $.get$_toStringVisiting();
+ t1.add$1(t1, iterable);
+ result = [];
+ try {
+ $building$0: {
+ $length = 0;
+ count = 0;
+ it = J.get$iterator$ax(iterable);
+ while (true) {
+ t1 = count;
+ t2 = MIN_COUNT;
+ if (typeof t1 !== "number")
+ throw t1.$lt();
+ if (typeof t2 !== "number")
+ throw H.iae(t2);
+ if (!(t1 < t2)) {
+ t1 = $length;
+ t2 = LENGTH_LIMIT;
+ if (typeof t1 !== "number")
+ throw t1.$lt();
+ if (typeof t2 !== "number")
+ throw H.iae(t2);
+ t2 = t1 < t2;
+ t1 = t2;
+ } else
+ t1 = true;
+ if (!t1)
+ break;
+ if (!it.moveNext$0())
+ break $building$0;
+ next = H.S(it.get$current());
+ J.add$1$ax(result, next);
+ t1 = $length;
+ t2 = J.get$length$asx(next);
+ t3 = OVERHEAD;
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t3 !== "number")
+ throw H.iae(t3);
+ if (typeof t1 !== "number")
+ throw t1.$add();
+ $length = t1 + (t2 + t3);
+ t3 = count;
+ if (typeof t3 !== "number")
+ throw t3.$add();
+ count = t3 + 1;
+ }
+ penultimateString = null;
+ ultimateString = null;
+ penultimate = null;
+ ultimate = null;
+ if (!it.moveNext$0()) {
+ t1 = count;
+ t2 = MIN_COUNT;
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t1 !== "number")
+ throw t1.$le();
+ if (t1 <= t2 + 2)
+ break $building$0;
+ ultimateString = J.removeLast$0$ax(result);
+ penultimateString = J.removeLast$0$ax(result);
+ } else {
+ penultimate = it.get$current();
+ t1 = count;
+ if (typeof t1 !== "number")
+ throw t1.$add();
+ count = t1 + 1;
+ if (!it.moveNext$0()) {
+ t1 = count;
+ t2 = MIN_COUNT;
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t1 !== "number")
+ throw t1.$le();
+ if (t1 <= t2 + 1) {
+ J.add$1$ax(result, H.S(penultimate));
+ break $building$0;
+ }
+ ultimateString = H.S(penultimate);
+ penultimateString = J.removeLast$0$ax(result);
+ t1 = $length;
+ t2 = J.get$length$asx(ultimateString);
+ t3 = OVERHEAD;
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t3 !== "number")
+ throw H.iae(t3);
+ if (typeof t1 !== "number")
+ throw t1.$add();
+ $length = t1 + (t2 + t3);
+ } else {
+ ultimate = it.get$current();
+ t1 = count;
+ if (typeof t1 !== "number")
+ throw t1.$add();
+ count = t1 + 1;
+ for (; it.moveNext$0();) {
+ penultimate = ultimate;
+ ultimate = it.get$current();
+ t1 = count;
+ if (typeof t1 !== "number")
+ throw t1.$add();
+ count = t1 + 1;
+ t1 = count;
+ t2 = MAX_COUNT;
+ if (typeof t1 !== "number")
+ throw t1.$gt();
+ if (typeof t2 !== "number")
+ throw H.iae(t2);
+ if (t1 > t2) {
+ while (true) {
+ t1 = $length;
+ t2 = LENGTH_LIMIT;
+ t3 = ELLIPSIS_SIZE;
+ if (typeof t2 !== "number")
+ throw t2.$sub();
+ if (typeof t3 !== "number")
+ throw H.iae(t3);
+ t4 = OVERHEAD;
+ if (typeof t4 !== "number")
+ throw H.iae(t4);
+ if (typeof t1 !== "number")
+ throw t1.$gt();
+ if (t1 > t2 - t3 - t4) {
+ t1 = count;
+ t2 = MIN_COUNT;
+ if (typeof t1 !== "number")
+ throw t1.$gt();
+ if (typeof t2 !== "number")
+ throw H.iae(t2);
+ t2 = t1 > t2;
+ t1 = t2;
+ } else
+ t1 = false;
+ if (!t1)
+ break;
+ t1 = $length;
+ t2 = J.get$length$asx(J.removeLast$0$ax(result));
+ t3 = OVERHEAD;
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t3 !== "number")
+ throw H.iae(t3);
+ if (typeof t1 !== "number")
+ throw t1.$sub();
+ $length = t1 - (t2 + t3);
+ t3 = count;
+ if (typeof t3 !== "number")
+ throw t3.$sub();
+ count = t3 - 1;
+ }
+ J.add$1$ax(result, "...");
+ break $building$0;
+ }
+ }
+ penultimateString = H.S(penultimate);
+ ultimateString = H.S(ultimate);
+ t1 = $length;
+ t2 = J.get$length$asx(ultimateString);
+ t3 = J.get$length$asx(penultimateString);
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t3 !== "number")
+ throw H.iae(t3);
+ t4 = OVERHEAD;
+ if (typeof t4 !== "number")
+ throw H.iae(t4);
+ if (typeof t1 !== "number")
+ throw t1.$add();
+ $length = t1 + (t2 + t3 + 2 * t4);
+ }
+ }
+ elision = null;
+ t1 = count;
+ t2 = J.get$length$asx(result);
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t1 !== "number")
+ throw t1.$gt();
+ if (t1 > t2 + 2) {
+ elision = "...";
+ t1 = $length;
+ t2 = ELLIPSIS_SIZE;
+ t3 = OVERHEAD;
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t3 !== "number")
+ throw H.iae(t3);
+ if (typeof t1 !== "number")
+ throw t1.$add();
+ $length = t1 + (t2 + t3);
+ }
+ while (true) {
+ t1 = $length;
+ t2 = LENGTH_LIMIT;
+ if (typeof t1 !== "number")
+ throw t1.$gt();
+ if (typeof t2 !== "number")
+ throw H.iae(t2);
+ if (t1 > t2) {
+ t1 = J.get$length$asx(result);
+ t2 = MIN_COUNT;
+ if (typeof t1 !== "number")
+ throw t1.$gt();
+ if (typeof t2 !== "number")
+ throw H.iae(t2);
+ t2 = t1 > t2;
+ t1 = t2;
+ } else
+ t1 = false;
+ if (!t1)
+ break;
+ t1 = $length;
+ t2 = J.get$length$asx(J.removeLast$0$ax(result));
+ t3 = OVERHEAD;
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t3 !== "number")
+ throw H.iae(t3);
+ if (typeof t1 !== "number")
+ throw t1.$sub();
+ $length = t1 - (t2 + t3);
+ if (elision == null) {
+ elision = "...";
+ t1 = $length;
+ t2 = ELLIPSIS_SIZE;
+ t3 = OVERHEAD;
+ if (typeof t2 !== "number")
+ throw t2.$add();
+ if (typeof t3 !== "number")
+ throw H.iae(t3);
+ if (typeof t1 !== "number")
+ throw t1.$add();
+ $length = t1 + (t2 + t3);
+ }
+ }
+ if (elision != null)
+ J.add$1$ax(result, elision);
+ J.add$1$ax(result, penultimateString);
+ J.add$1$ax(result, ultimateString);
}
- if (equals == null)
- equals = P._defaultEquals$closure;
+ } finally {
+ t1 = $.get$_toStringVisiting();
+ t1.remove$1(t1, iterable);
}
- return P._LinkedCustomHashMap$(equals, hashCode, isValidKey, $K, $V);
+ t1 = P.StringBuffer$("(");
+ t1.writeAll$2(result, ", ");
+ t1.write$1(")");
+ return t1._contents;
+},
+
+LinkedHashMap_LinkedHashMap: function(equals, hashCode, isValidKey, $K, $V) {
+ var t1 = new P._LinkedHashMap(0, null, null, null, null, null, 0);
+ H.setRuntimeTypeInfo(t1, [$K, $V]);
+ return t1;
},
Maps_mapToString: function(m) {
@@ -4206,7 +4094,7 @@ Maps_mapToString: function(m) {
return result.get$_contents();
},
-_HashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_collection$_keys",
+_HashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_keys",
get$length: function(_) {
return this._collection$_length;
},
@@ -4216,27 +4104,9 @@ _HashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_collection$_key
return t1;
},
get$values: function(_) {
- var t1, t2;
- t1 = new P.HashMapKeyIterable(this);
+ var t1 = new P.HashMapKeyIterable(this);
H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_HashMap", 0)]);
- t2 = new H.MappedIterable(t1, new P._HashMap_values_closure(this));
- H.setRuntimeTypeInfo(t2, [H.getRuntimeTypeArgument(t1, "IterableBase", 0), null]);
- return t2;
- },
- containsKey$1: function(key) {
- var strings, nums, rest;
- if (typeof key === "string" && key !== "__proto__") {
- strings = this._strings;
- return strings == null ? false : strings[key] != null;
- } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
- nums = this._nums;
- return nums == null ? false : nums[key] != null;
- } else {
- rest = this._rest;
- if (rest == null)
- return false;
- return this._findBucketIndex$2(rest[this._computeHashCode$1(key)], key) >= 0;
- }
+ return H.MappedIterable_MappedIterable(t1, new P._HashMap_values_closure(this), H.getRuntimeTypeArgument(t1, "IterableBase", 0), null);
},
$index: function(_, key) {
var strings, t1, entry, nums, rest, bucket, index;
@@ -4294,7 +4164,7 @@ _HashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_collection$_key
if (bucket == null) {
P._HashMap__setTableEntry(rest, hash, [key, value]);
this._collection$_length = this._collection$_length + 1;
- this._collection$_keys = null;
+ this._keys = null;
} else {
index = this._findBucketIndex$2(bucket, key);
if (index >= 0)
@@ -4302,7 +4172,7 @@ _HashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_collection$_key
else {
bucket.push(key, value);
this._collection$_length = this._collection$_length + 1;
- this._collection$_keys = null;
+ this._keys = null;
}
}
}
@@ -4313,13 +4183,13 @@ _HashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_collection$_key
for ($length = keys.length, i = 0; i < $length; ++i) {
key = keys[i];
action.call$2(key, this.$index(this, key));
- if (keys !== this._collection$_keys)
- throw H.wrapException(new P.ConcurrentModificationError(this));
+ if (keys !== this._keys)
+ throw H.wrapException(P.ConcurrentModificationError$(this));
}
},
_computeKeys$0: function() {
var t1, result, strings, names, entries, index, i, nums, rest, bucket, $length, i0;
- t1 = this._collection$_keys;
+ t1 = this._keys;
if (t1 != null)
return t1;
result = P.List_List(this._collection$_length, null);
@@ -4355,13 +4225,13 @@ _HashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_collection$_key
}
}
}
- this._collection$_keys = result;
+ this._keys = result;
return result;
},
_addHashTableEntry$3: function(table, key, value) {
if (table[key] == null) {
this._collection$_length = this._collection$_length + 1;
- this._collection$_keys = null;
+ this._keys = null;
}
P._HashMap__setTableEntry(table, key, value);
},
@@ -4403,38 +4273,39 @@ _HashMap_values_closure: {"": "Closure;this_0",
}
},
-HashMapKeyIterable: {"": "IterableBase;_collection$_map",
+HashMapKeyIterable: {"": "IterableBase;_map",
get$length: function(_) {
- return this._collection$_map._collection$_length;
+ return this._map._collection$_length;
},
get$iterator: function(_) {
- var t1 = this._collection$_map;
+ var t1 = this._map;
return new P.HashMapKeyIterator(t1, t1._computeKeys$0(), 0, null);
},
forEach$1: function(_, f) {
var t1, keys, $length, i;
- t1 = this._collection$_map;
+ t1 = this._map;
keys = t1._computeKeys$0();
for ($length = keys.length, i = 0; i < $length; ++i) {
f.call$1(keys[i]);
- if (keys !== t1._collection$_keys)
- throw H.wrapException(new P.ConcurrentModificationError(t1));
+ if (keys !== t1._keys)
+ throw H.wrapException(P.ConcurrentModificationError$(t1));
}
},
- $asIterableBase: null
+ $asIterableBase: null,
+ $isEfficientLength: true
},
-HashMapKeyIterator: {"": "Object;_collection$_map,_collection$_keys,_offset,_collection$_current",
+HashMapKeyIterator: {"": "Object;_map,_keys,_offset,_collection$_current",
get$current: function() {
return this._collection$_current;
},
moveNext$0: function() {
var keys, offset, t1;
- keys = this._collection$_keys;
+ keys = this._keys;
offset = this._offset;
- t1 = this._collection$_map;
- if (keys !== t1._collection$_keys)
- throw H.wrapException(new P.ConcurrentModificationError(t1));
+ t1 = this._map;
+ if (keys !== t1._keys)
+ throw H.wrapException(P.ConcurrentModificationError$(t1));
else if (offset >= keys.length) {
this._collection$_current = null;
return false;
@@ -4456,21 +4327,13 @@ _LinkedHashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_first,_la
return t1;
},
get$values: function(_) {
- var t1, t2;
- t1 = new P.LinkedHashMapKeyIterable(this);
+ var t1 = new P.LinkedHashMapKeyIterable(this);
H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_LinkedHashMap", 0)]);
- t2 = new H.MappedIterable(t1, new P._LinkedHashMap_values_closure(this));
- H.setRuntimeTypeInfo(t2, [H.getRuntimeTypeArgument(t1, "IterableBase", 0), null]);
- return t2;
+ return H.MappedIterable_MappedIterable(t1, new P._LinkedHashMap_values_closure(this), H.getRuntimeTypeArgument(t1, "IterableBase", 0), null);
},
containsKey$1: function(key) {
- var strings, nums, rest;
- if (typeof key === "string" && key !== "__proto__") {
- strings = this._strings;
- if (strings == null)
- return false;
- return strings[key] != null;
- } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
+ var nums, rest;
+ if ((key & 0x3ffffff) === key) {
nums = this._nums;
if (nums == null)
return false;
@@ -4568,7 +4431,7 @@ _LinkedHashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_first,_la
for (; cell != null;) {
action.call$2(cell._key, cell._collection$_value);
if (modifications !== this._modifications)
- throw H.wrapException(new P.ConcurrentModificationError(this));
+ throw H.wrapException(P.ConcurrentModificationError$(this));
cell = cell._next;
}
},
@@ -4655,149 +4518,250 @@ _LinkedHashMap_values_closure: {"": "Closure;this_0",
}
},
-_LinkedIdentityHashMap: {"": "_LinkedHashMap;_collection$_length,_strings,_nums,_rest,_first,_last,_modifications",
- _computeHashCode$1: function(key) {
- return H.objectHashCode(key) & 0x3ffffff;
+LinkedHashMapCell: {"": "Object;_key<,_collection$_value@,_next<,_previous<"},
+
+LinkedHashMapKeyIterable: {"": "IterableBase;_map",
+ get$length: function(_) {
+ return this._map._collection$_length;
},
- _findBucketIndex$2: function(bucket, key) {
- var $length, i, t1;
- if (bucket == null)
- return -1;
- $length = bucket.length;
- for (i = 0; i < $length; ++i) {
- t1 = bucket[i].get$_key();
- if (t1 == null ? key == null : t1 === key)
- return i;
+ get$iterator: function(_) {
+ var t1 = this._map;
+ t1 = new P.LinkedHashMapKeyIterator(t1, t1._modifications, null, null);
+ t1._cell = t1._map._first;
+ return t1;
+ },
+ forEach$1: function(_, f) {
+ var t1, cell, modifications;
+ t1 = this._map;
+ cell = t1._first;
+ modifications = t1._modifications;
+ for (; cell != null;) {
+ f.call$1(cell._key);
+ if (modifications !== t1._modifications)
+ throw H.wrapException(P.ConcurrentModificationError$(t1));
+ cell = cell._next;
}
- return -1;
},
- $as_LinkedHashMap: null,
- $asMap: null
+ $asIterableBase: null,
+ $isEfficientLength: true
},
-_LinkedCustomHashMap: {"": "_LinkedHashMap;_equals,_hashCode,_validKey,_collection$_length,_strings,_nums,_rest,_first,_last,_modifications",
- _equals$2: function(arg0, arg1) {
- return this._equals.call$2(arg0, arg1);
- },
- _hashCode$1: function(arg0) {
- return this._hashCode.call$1(arg0);
- },
- _validKey$1: function(arg0) {
- return this._validKey.call$1(arg0);
- },
- $index: function(_, key) {
- if (this._validKey$1(key) !== true)
- return;
- return P._LinkedHashMap.prototype.$index.call(this, this, key);
- },
- containsKey$1: function(key) {
- if (this._validKey$1(key) !== true)
- return false;
- return P._LinkedHashMap.prototype.containsKey$1.call(this, key);
- },
- remove$1: function(_, key) {
- if (this._validKey$1(key) !== true)
- return;
- return P._LinkedHashMap.prototype.remove$1.call(this, this, key);
- },
- _computeHashCode$1: function(key) {
- return this._hashCode$1(key) & 0x3ffffff;
+LinkedHashMapKeyIterator: {"": "Object;_map,_modifications,_cell,_collection$_current",
+ get$current: function() {
+ return this._collection$_current;
},
- _findBucketIndex$2: function(bucket, key) {
- var $length, i;
+ moveNext$0: function() {
+ var t1 = this._map;
+ if (this._modifications !== t1._modifications)
+ throw H.wrapException(P.ConcurrentModificationError$(t1));
+ else {
+ t1 = this._cell;
+ if (t1 == null) {
+ this._collection$_current = null;
+ return false;
+ } else {
+ this._collection$_current = t1._key;
+ this._cell = this._cell._next;
+ return true;
+ }
+ }
+ }
+},
+
+_HashSet: {"": "_HashSetBase;",
+ get$iterator: function(_) {
+ return new P.HashSetIterator(this, this._computeElements$0(), 0, null);
+ },
+ get$length: function(_) {
+ return this._collection$_length;
+ },
+ contains$1: function(_, object) {
+ var strings, nums, rest;
+ if (typeof object === "string" && object !== "__proto__") {
+ strings = this._strings;
+ return strings == null ? false : strings[object] != null;
+ } else if (typeof object === "number" && (object & 0x3ffffff) === object) {
+ nums = this._nums;
+ return nums == null ? false : nums[object] != null;
+ } else {
+ rest = this._rest;
+ if (rest == null)
+ return false;
+ return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], object) >= 0;
+ }
+ },
+ lookup$1: function(object) {
+ var t1, rest, bucket, index;
+ if (!(typeof object === "string" && object !== "__proto__"))
+ t1 = typeof object === "number" && (object & 0x3ffffff) === object;
+ else
+ t1 = true;
+ if (t1)
+ return this.contains$1(this, object) ? object : null;
+ rest = this._rest;
+ if (rest == null)
+ return;
+ bucket = rest[this._computeHashCode$1(object)];
+ index = this._findBucketIndex$2(bucket, object);
+ if (index < 0)
+ return;
+ return J.$index$asx(bucket, index);
+ },
+ add$1: function(_, element) {
+ var rest, hash, bucket;
+ rest = this._rest;
+ if (rest == null) {
+ rest = P._HashSet__newHashTable();
+ this._rest = rest;
+ }
+ hash = this._computeHashCode$1(element);
+ bucket = rest[hash];
+ if (bucket == null)
+ rest[hash] = [element];
+ else {
+ if (this._findBucketIndex$2(bucket, element) >= 0)
+ return false;
+ bucket.push(element);
+ }
+ this._collection$_length = this._collection$_length + 1;
+ this._elements = null;
+ return true;
+ },
+ remove$1: function(_, object) {
+ var rest, bucket, index;
+ rest = this._rest;
+ if (rest == null)
+ return false;
+ bucket = rest[this._computeHashCode$1(object)];
+ index = this._findBucketIndex$2(bucket, object);
+ if (index < 0)
+ return false;
+ this._collection$_length = this._collection$_length - 1;
+ this._elements = null;
+ bucket.splice(index, 1);
+ return true;
+ },
+ _computeElements$0: function() {
+ var t1, result, strings, names, entries, index, i, nums, rest, bucket, $length, i0;
+ t1 = this._elements;
+ if (t1 != null)
+ return t1;
+ result = P.List_List(this._collection$_length, null);
+ strings = this._strings;
+ if (strings != null) {
+ names = Object.getOwnPropertyNames(strings);
+ entries = names.length;
+ for (index = 0, i = 0; i < entries; ++i) {
+ result[index] = names[i];
+ ++index;
+ }
+ } else
+ index = 0;
+ nums = this._nums;
+ if (nums != null) {
+ names = Object.getOwnPropertyNames(nums);
+ entries = names.length;
+ for (i = 0; i < entries; ++i) {
+ result[index] = +names[i];
+ ++index;
+ }
+ }
+ rest = this._rest;
+ if (rest != null) {
+ names = Object.getOwnPropertyNames(rest);
+ entries = names.length;
+ for (i = 0; i < entries; ++i) {
+ bucket = rest[names[i]];
+ $length = bucket.length;
+ for (i0 = 0; i0 < $length; ++i0) {
+ result[index] = bucket[i0];
+ ++index;
+ }
+ }
+ }
+ this._elements = result;
+ return result;
+ },
+ _computeHashCode$1: function(element) {
+ return J.get$hashCode$(element) & 0x3ffffff;
+ },
+ _findBucketIndex$2: function(bucket, element) {
+ var $length, i;
if (bucket == null)
return -1;
$length = bucket.length;
for (i = 0; i < $length; ++i)
- if (this._equals$2(bucket[i].get$_key(), key) === true)
+ if (J.$eq(bucket[i], element))
return i;
return -1;
},
- $as_LinkedHashMap: null,
- $asMap: null,
- static: {
-_LinkedCustomHashMap$: function(_equals, _hashCode, validKey, $K, $V) {
- var t1 = new P._LinkedCustomHashMap_closure($K);
- t1 = new P._LinkedCustomHashMap(_equals, _hashCode, t1, 0, null, null, null, null, null, 0);
- H.setRuntimeTypeInfo(t1, [$K, $V]);
- return t1;
-}}
-
+ $as_HashSetBase: null,
+ $isEfficientLength: true
},
-_LinkedCustomHashMap_closure: {"": "Closure;K_0",
- call$1: function(v) {
- var t1 = H.checkSubtypeOfRuntimeType(v, this.K_0);
- return t1;
- }
-},
-
-LinkedHashMapCell: {"": "Object;_key<,_collection$_value@,_next<,_previous<"},
-
-LinkedHashMapKeyIterable: {"": "IterableBase;_collection$_map",
- get$length: function(_) {
- return this._collection$_map._collection$_length;
- },
- get$iterator: function(_) {
- var t1 = this._collection$_map;
- t1 = new P.LinkedHashMapKeyIterator(t1, t1._modifications, null, null);
- t1._cell = t1._collection$_map._first;
- return t1;
+_IdentityHashSet: {"": "_HashSet;_collection$_length,_strings,_nums,_rest,_elements",
+ _computeHashCode$1: function(key) {
+ return H.objectHashCode(key) & 0x3ffffff;
},
- forEach$1: function(_, f) {
- var t1, cell, modifications;
- t1 = this._collection$_map;
- cell = t1._first;
- modifications = t1._modifications;
- for (; cell != null;) {
- f.call$1(cell._key);
- if (modifications !== t1._modifications)
- throw H.wrapException(new P.ConcurrentModificationError(t1));
- cell = cell._next;
+ _findBucketIndex$2: function(bucket, element) {
+ var $length, i, t1;
+ if (bucket == null)
+ return -1;
+ $length = bucket.length;
+ for (i = 0; i < $length; ++i) {
+ t1 = bucket[i];
+ if (t1 == null ? element == null : t1 === element)
+ return i;
}
+ return -1;
},
- $asIterableBase: null
+ $as_HashSet: null
},
-LinkedHashMapKeyIterator: {"": "Object;_collection$_map,_modifications,_cell,_collection$_current",
+HashSetIterator: {"": "Object;_set,_elements,_offset,_collection$_current",
get$current: function() {
return this._collection$_current;
},
moveNext$0: function() {
- var t1 = this._collection$_map;
- if (this._modifications !== t1._modifications)
- throw H.wrapException(new P.ConcurrentModificationError(t1));
- else {
- t1 = this._cell;
- if (t1 == null) {
- this._collection$_current = null;
- return false;
- } else {
- this._collection$_current = t1._key;
- this._cell = this._cell._next;
- return true;
- }
+ var elements, offset, t1;
+ elements = this._elements;
+ offset = this._offset;
+ t1 = this._set;
+ if (elements !== t1._elements)
+ throw H.wrapException(P.ConcurrentModificationError$(t1));
+ else if (offset >= elements.length) {
+ this._collection$_current = null;
+ return false;
+ } else {
+ this._collection$_current = elements[offset];
+ this._offset = offset + 1;
+ return true;
}
}
},
-IterableBase: {"": "Object;",
- map$1: function(_, f) {
- var t1 = new H.MappedIterable(this, f);
- H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "IterableBase", 0), null]);
- return t1;
+_HashSetBase: {"": "IterableBase;",
+ toString$0: function(_) {
+ return H.IterableMixinWorkaround_toStringIterable(this, "{", "}");
},
+ $asIterableBase: null,
+ $isEfficientLength: true
+},
+
+HashSet: {"": "Object;", $isEfficientLength: true, static: {
+HashSet_HashSet$identity: function($E) {
+ var t1 = new P._IdentityHashSet(0, null, null, null, null);
+ H.setRuntimeTypeInfo(t1, [$E]);
+ return t1;
+}}
+},
+
+IterableBase: {"": "Object;",
forEach$1: function(_, f) {
var t1;
for (t1 = this.get$iterator(this); t1.moveNext$0();)
f.call$1(t1.get$current());
},
- toList$1$growable: function(_, growable) {
- return P.List_List$from(this, growable, H.getRuntimeTypeArgument(this, "IterableBase", 0));
- },
- toList$0: function($receiver) {
- return this.toList$1$growable($receiver, true);
- },
get$length: function(_) {
var it, count;
it = this.get$iterator(this);
@@ -4808,19 +4772,20 @@ IterableBase: {"": "Object;",
elementAt$1: function(_, index) {
var t1, remaining, element;
if (index < 0)
- throw H.wrapException(new P.RangeError("value " + index));
+ throw H.wrapException(P.RangeError$value(index));
for (t1 = this.get$iterator(this), remaining = index; t1.moveNext$0();) {
element = t1.get$current();
if (remaining === 0)
return element;
--remaining;
}
- throw H.wrapException(new P.RangeError("value " + index));
+ throw H.wrapException(P.RangeError$value(index));
+ },
+ toString$0: function(_) {
+ return P._iterableToString(this);
}
},
-ListBase: {"": "Object+ListMixin;", $isList: true, $asList: null},
-
ListMixin: {"": "Object;",
get$iterator: function(receiver) {
return new H.ListIterator(receiver, this.get$length(receiver), 0, null);
@@ -4832,13 +4797,13 @@ ListMixin: {"": "Object;",
var $length, i;
if (typeof receiver !== "string" && (typeof receiver !== "object" || receiver === null || receiver.constructor !== Array && !H.isJsIndexable(receiver, receiver[init.dispatchPropertyName])))
return this.forEach$1$bailout(1, receiver, action);
- $length = receiver.length;
+ $length = C.JS_CONST_ZYJ(receiver);
for (i = 0; i < $length; ++i) {
- if (i >= receiver.length)
+ if (i >= C.JS_CONST_ZYJ(receiver))
throw H.ioore(receiver, i);
action.call$1(receiver[i]);
- if ($length !== receiver.length)
- throw H.wrapException(new P.ConcurrentModificationError(receiver));
+ if ($length !== C.JS_CONST_ZYJ(receiver))
+ throw H.wrapException(P.ConcurrentModificationError$(receiver));
}
},
forEach$1$bailout: function(state0, receiver, action) {
@@ -4847,85 +4812,43 @@ ListMixin: {"": "Object;",
for (i = 0; i < $length; ++i) {
action.call$1(this.$index(receiver, i));
if ($length !== this.get$length(receiver))
- throw H.wrapException(new P.ConcurrentModificationError(receiver));
- }
- },
- where$1: function(receiver, test) {
- var t1 = new H.WhereIterable(receiver, test);
- H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(receiver, "ListMixin", 0)]);
- return t1;
- },
- map$1: function(receiver, f) {
- var t1 = new H.MappedListIterable(receiver, f);
- H.setRuntimeTypeInfo(t1, [null, null]);
- return t1;
- },
- toList$1$growable: function(receiver, growable) {
- var result, t1, t2, i, t3;
- if (typeof receiver !== "string" && (typeof receiver !== "object" || receiver === null || receiver.constructor !== Array && !H.isJsIndexable(receiver, receiver[init.dispatchPropertyName])))
- return this.toList$1$growable$bailout(1, receiver, growable);
- if (growable) {
- result = P.List_List(null, H.getRuntimeTypeArgument(receiver, "ListMixin", 0));
- H.setRuntimeTypeInfo(result, [H.getRuntimeTypeArgument(receiver, "ListMixin", 0)]);
- C.JSArray_methods.set$length(result, receiver.length);
- } else {
- result = P.List_List(receiver.length, H.getRuntimeTypeArgument(receiver, "ListMixin", 0));
- H.setRuntimeTypeInfo(result, [H.getRuntimeTypeArgument(receiver, "ListMixin", 0)]);
- }
- for (t1 = receiver.length, t2 = result.length, i = 0; i < t1; ++i) {
- t3 = receiver[i];
- if (i >= t2)
- throw H.ioore(result, i);
- result[i] = t3;
+ throw H.wrapException(P.ConcurrentModificationError$(receiver));
}
- return result;
},
- toList$1$growable$bailout: function(state0, receiver, growable) {
- var result, i, t1;
- if (growable) {
- result = P.List_List(null, H.getRuntimeTypeArgument(receiver, "ListMixin", 0));
- H.setRuntimeTypeInfo(result, [H.getRuntimeTypeArgument(receiver, "ListMixin", 0)]);
- C.JSArray_methods.set$length(result, this.get$length(receiver));
- } else {
- result = P.List_List(this.get$length(receiver), H.getRuntimeTypeArgument(receiver, "ListMixin", 0));
- H.setRuntimeTypeInfo(result, [H.getRuntimeTypeArgument(receiver, "ListMixin", 0)]);
- }
- for (i = 0; i < this.get$length(receiver); ++i) {
- t1 = this.$index(receiver, i);
- if (i >= result.length)
- throw H.ioore(result, i);
- result[i] = t1;
- }
+ add$1: function(receiver, element) {
+ var t1 = this.get$length(receiver);
+ this.set$length(receiver, t1 + 1);
+ this.$indexSet(receiver, t1, element);
+ },
+ removeLast$0: function(receiver) {
+ var result;
+ if (this.get$length(receiver) === 0)
+ throw H.wrapException(P.StateError$("No elements"));
+ result = this.$index(receiver, this.get$length(receiver) - 1);
+ this.set$length(receiver, this.get$length(receiver) - 1);
return result;
},
- toList$0: function($receiver) {
- return this.toList$1$growable($receiver, true);
- },
toString$0: function(receiver) {
- var result, i, t1;
- for (i = 0; i < $.get$ListMixin__toStringList().length; ++i) {
- t1 = $.get$ListMixin__toStringList();
- if (i >= t1.length)
- throw H.ioore(t1, i);
- if (t1[i] === receiver)
- return "[...]";
- }
+ var result, t1;
+ t1 = $.get$_toStringVisiting();
+ if (t1.contains$1(t1, receiver))
+ return "[...]";
result = P.StringBuffer$("");
try {
- $.get$ListMixin__toStringList().push(receiver);
+ t1 = $.get$_toStringVisiting();
+ t1.add$1(t1, receiver);
result.write$1("[");
result.writeAll$2(receiver, ", ");
result.write$1("]");
} finally {
- t1 = $.get$ListMixin__toStringList();
- if (0 >= t1.length)
- throw H.ioore(t1, 0);
- t1.pop();
+ t1 = $.get$_toStringVisiting();
+ t1.remove$1(t1, receiver);
}
return result.get$_contents();
},
$isList: true,
- $asList: null
+ $asList: null,
+ $isEfficientLength: true
},
Maps_mapToString_closure: {"": "Closure;box_0,result_1",
@@ -4938,7 +4861,8 @@ Maps_mapToString_closure: {"": "Closure;box_0,result_1",
t1.write$1(k);
t1.write$1(": ");
t1.write$1(v);
- }
+ },
+ $is_args2: true
},
ListQueue: {"": "IterableBase;_table,_head,_tail,_modificationCount",
@@ -4954,19 +4878,22 @@ ListQueue: {"": "IterableBase;_table,_head,_tail,_modificationCount",
throw H.ioore(t1, i);
action.call$1(t1[i]);
if (modificationCount !== this._modificationCount)
- H.throwExpression(new P.ConcurrentModificationError(this));
+ H.throwExpression(P.ConcurrentModificationError$(this));
}
},
get$length: function(_) {
return (this._tail - this._head & this._table.length - 1) >>> 0;
},
+ add$1: function(_, element) {
+ this._add$1(element);
+ },
toString$0: function(_) {
return H.IterableMixinWorkaround_toStringIterable(this, "{", "}");
},
removeFirst$0: function() {
var t1, t2, t3, result;
if (this._head === this._tail)
- throw H.wrapException(new P.StateError("No elements"));
+ throw H.wrapException(P.StateError$("No elements"));
this._modificationCount = this._modificationCount + 1;
t1 = this._table;
t2 = this._head;
@@ -4977,6 +4904,18 @@ ListQueue: {"": "IterableBase;_table,_head,_tail,_modificationCount",
this._head = (t2 + 1 & t3 - 1) >>> 0;
return result;
},
+ removeLast$0: function(_) {
+ var t1, t2;
+ if (this._head === this._tail)
+ throw H.wrapException(P.StateError$("No elements"));
+ this._modificationCount = this._modificationCount + 1;
+ this._tail = (this._tail - 1 & this._table.length - 1) >>> 0;
+ t1 = this._table;
+ t2 = this._tail;
+ if (t2 < 0 || t2 >= t1.length)
+ throw H.ioore(t1, t2);
+ return t1[t2];
+ },
_add$1: function(element) {
var t1, t2, t3;
t1 = this._table;
@@ -5011,6 +4950,7 @@ ListQueue: {"": "IterableBase;_table,_head,_tail,_modificationCount",
this._table = t1;
},
$asIterableBase: null,
+ $isEfficientLength: true,
static: {
"": "ListQueue__INITIAL_CAPACITY",
ListQueue$: function(initialCapacity, $E) {
@@ -5030,7 +4970,7 @@ _ListQueueIterator: {"": "Object;_queue,_end,_modificationCount,_position,_colle
var t1, t2, t3;
t1 = this._queue;
if (this._modificationCount !== t1._modificationCount)
- H.throwExpression(new P.ConcurrentModificationError(t1));
+ H.throwExpression(P.ConcurrentModificationError$(t1));
t2 = this._position;
if (t2 === this._end) {
this._collection$_current = null;
@@ -5049,62 +4989,6 @@ _ListQueueIterator$: function(queue) {
}}
}}],
-["dart.convert", "dart:convert", , P, {
-_convertJsonToDart: function(json, reviver) {
- var revive = new P._convertJsonToDart_closure();
- return revive.call$2(null, new P._convertJsonToDart_walk(revive).call$1(json));
-},
-
-_parseJson: function(source, reviver) {
- var parsed, e, t1, exception;
- t1 = source;
- if (typeof t1 !== "string")
- throw H.wrapException(new P.ArgumentError(source));
- parsed = null;
- try {
- parsed = JSON.parse(source);
- } catch (exception) {
- t1 = H.unwrapException(exception);
- e = t1;
- throw H.wrapException(new P.FormatException(String(e)));
- }
-
- return P._convertJsonToDart(parsed, reviver);
-},
-
-_convertJsonToDart_closure: {"": "Closure;",
- call$2: function(key, value) {
- return value;
- }
-},
-
-_convertJsonToDart_walk: {"": "Closure;revive_0",
- call$1: function(e) {
- var list, t1, i, keys, map, key, proto;
- if (e == null || typeof e != "object")
- return e;
- if (Object.getPrototypeOf(e) === Array.prototype) {
- list = e;
- for (t1 = this.revive_0, i = 0; i < list.length; ++i)
- list[i] = t1.call$2(i, this.call$1(list[i]));
- return list;
- }
- keys = Object.keys(e);
- map = H.fillLiteralMap([], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null));
- for (t1 = this.revive_0, i = 0; i < keys.length; ++i) {
- key = keys[i];
- map.$indexSet(map, key, t1.call$2(key, this.call$1(e[key])));
- }
- proto = e.__proto__;
- if (typeof proto !== "undefined" && proto !== Object.prototype)
- map.$indexSet(map, "__proto__", t1.call$2("__proto__", this.call$1(proto)));
- return map;
- }
-},
-
-Converter: {"": "Object;"},
-
-JsonDecoder: {"": "Converter;_reviver"}}],
["dart.core", "dart:core", , P, {
_symbolToString: function(symbol) {
return H.Symbol_getName(symbol);
@@ -5157,6 +5041,10 @@ Error_safeToString: function(object) {
return "Instance of '" + H.Primitives_objectTypeName(object) + "'";
},
+Exception_Exception: function(message) {
+ return new P._ExceptionImplementation(message);
+},
+
identical: function(a, b) {
return a == null ? b == null : a === b;
},
@@ -5169,14 +5057,14 @@ List_List: function($length, $E) {
if ($length == null)
return new Array(0);
if (typeof $length !== "number" || Math.floor($length) !== $length || $length < 0)
- throw H.wrapException(new P.ArgumentError("Length must be a positive integer: " + H.S($length) + "."));
+ throw H.wrapException(P.ArgumentError$("Length must be a positive integer: " + H.S($length) + "."));
return H.Primitives_newFixedList($length);
},
List_List$filled: function($length, fill, $E) {
var result, t1, i;
if ($length < 0)
- throw H.wrapException(new P.ArgumentError("Length must be a positive integer: " + $length + "."));
+ throw H.wrapException(P.ArgumentError$("Length must be a positive integer: " + $length + "."));
result = H.Primitives_newFixedList($length);
if ($length !== 0 && true)
for (t1 = result.length, i = 0; i < t1; ++i)
@@ -5206,13 +5094,19 @@ List_List$from: function(other, growable, $E) {
return fixedList;
},
+print: function(object) {
+ var line = J.toString$0(object);
+ H.printToConsole(line);
+},
+
NoSuchMethodError_toString_closure: {"": "Closure;box_0",
call$2: function(key, value) {
var t1 = this.box_0;
if (t1.i_1 > 0)
t1.sb_0.write$1(", ");
t1.sb_0.write$1(P._symbolToString(key));
- }
+ },
+ $is_args2: true
},
Duration: {"": "Object;_duration",
@@ -5234,9 +5128,6 @@ Duration: {"": "Object;_duration",
throw H.iae(t1);
return C.JSNumber_methods.$ge(this._duration, t1);
},
- get$inMilliseconds: function() {
- return C.JSNumber_methods.$tdiv(this._duration, 1000);
- },
$eq: function(_, other) {
var t1;
if (other == null)
@@ -5294,7 +5185,12 @@ Duration_toString_twoDigits: {"": "Closure;",
}
},
-Error: {"": "Object;", $isError: true},
+Error: {"": "Object;",
+ get$stackTrace: function() {
+ return new H._StackTrace(this.$thrownJsError, null);
+ },
+ $isError: true
+},
NullThrownError: {"": "Error;",
toString$0: function(_) {
@@ -5308,25 +5204,49 @@ ArgumentError: {"": "Error;message",
if (t1 != null)
return "Illegal argument(s): " + H.S(t1);
return "Illegal argument(s)";
- }
+ },
+ static: {
+ArgumentError$: function(message) {
+ return new P.ArgumentError(message);
+}}
+
},
RangeError: {"": "ArgumentError;message",
toString$0: function(_) {
return "RangeError: " + H.S(this.message);
- }
+ },
+ static: {
+RangeError$value: function(value) {
+ return new P.RangeError("value " + H.S(value));
+},
+
+RangeError$range: function(value, start, end) {
+ return new P.RangeError("value " + H.S(value) + " not in range " + start + ".." + H.S(end));
+}}
+
},
UnsupportedError: {"": "Error;message",
toString$0: function(_) {
return "Unsupported operation: " + this.message;
- }
+ },
+ static: {
+UnsupportedError$: function(message) {
+ return new P.UnsupportedError(message);
+}}
+
},
StateError: {"": "Error;message",
toString$0: function(_) {
return "Bad state: " + this.message;
- }
+ },
+ static: {
+StateError$: function(message) {
+ return new P.StateError(message);
+}}
+
},
ConcurrentModificationError: {"": "Error;modifiedObject",
@@ -5335,20 +5255,33 @@ ConcurrentModificationError: {"": "Error;modifiedObject",
if (t1 == null)
return "Concurrent modification during iteration.";
return "Concurrent modification during iteration: " + H.S(P.Error_safeToString(t1)) + ".";
- }
+ },
+ static: {
+ConcurrentModificationError$: function(modifiedObject) {
+ return new P.ConcurrentModificationError(modifiedObject);
+}}
+
},
StackOverflowError: {"": "Object;",
toString$0: function(_) {
return "Stack Overflow";
},
+ get$stackTrace: function() {
+ return;
+ },
$isError: true
},
CyclicInitializationError: {"": "Error;variableName",
toString$0: function(_) {
return "Reading static variable '" + this.variableName + "' during its initialization";
- }
+ },
+ static: {
+CyclicInitializationError$: function(variableName) {
+ return new P.CyclicInitializationError(variableName);
+}}
+
},
_ExceptionImplementation: {"": "Object;message",
@@ -5361,13 +5294,6 @@ _ExceptionImplementation: {"": "Object;message",
$isException: true
},
-FormatException: {"": "Object;message",
- toString$0: function(_) {
- return "FormatException: " + this.message;
- },
- $isException: true
-},
-
Expando: {"": "Object;name",
toString$0: function(_) {
return "Expando:" + this.name;
@@ -5405,473 +5331,274 @@ Function: {"": "Object;"},
Iterator: {"": "Object;"},
-Map: {"": "Object;", $isMap: true},
-
Null: {"": "Object;",
toString$0: function(_) {
return "null";
}
},
-Object: {"": ";",
- $eq: function(_, other) {
- return this === other;
- },
- get$hashCode: function(_) {
- return H.Primitives_objectHashCode(this);
- },
- toString$0: function(_) {
- return H.Primitives_objectToString(this);
- },
- $isObject: true
-},
-
-StackTrace: {"": "Object;"},
-
-StringBuffer: {"": "Object;_contents<",
- get$length: function(_) {
- return this._contents.length;
- },
- write$1: function(obj) {
- if (typeof obj !== "string")
- return this.write$1$bailout(1, obj);
- this._contents = this._contents + obj;
- },
- write$1$bailout: function(state0, obj) {
- var str = typeof obj === "string" ? obj : H.S(obj);
- this._contents = this._contents + str;
- },
- writeAll$2: function(objects, separator) {
- var iterator, str;
- iterator = J.get$iterator$ax(objects);
- if (!iterator.moveNext$0())
- return;
- if (separator.length === 0)
- do {
- str = iterator.get$current();
- str = typeof str === "string" ? str : H.S(str);
- this._contents = this._contents + str;
- } while (iterator.moveNext$0());
- else {
- this.write$1(iterator.get$current());
- for (; iterator.moveNext$0();) {
- this._contents = this._contents + separator;
- str = iterator.get$current();
- str = typeof str === "string" ? str : H.S(str);
- this._contents = this._contents + str;
- }
- }
- },
- toString$0: function(_) {
- return this._contents;
- },
- StringBuffer$1: function($content) {
- this._contents = $content;
- },
- static: {
-StringBuffer$: function($content) {
- var t1 = new P.StringBuffer("");
- t1.StringBuffer$1($content);
- return t1;
-}}
-
-},
-
-Symbol: {"": "Object;", $isSymbol: true}}],
-["dart.dom.html", "dart:html", , W, {
-HttpRequest_getString: function(url, onProgress, withCredentials) {
- return W.HttpRequest_request(url, null, null, onProgress, null, null, null, withCredentials).then$1(new W.HttpRequest_getString_closure());
-},
-
-HttpRequest_request: function(url, method, mimeType, onProgress, requestHeaders, responseType, sendData, withCredentials) {
- var t1, completer, xhr, t2;
- t1 = W.HttpRequest;
- completer = new P._AsyncCompleter(P._Future$(t1));
- H.setRuntimeTypeInfo(completer, [t1]);
- xhr = new XMLHttpRequest();
- C.HttpRequest_methods.open$3$async(xhr, "GET", url, true);
- t1 = new W._EventStream(xhr, C.EventStreamProvider_load._eventType, false);
- H.setRuntimeTypeInfo(t1, [null]);
- t2 = new W._EventStreamSubscription(0, t1._target, t1._eventType, W._EventStreamSubscription__wrapZone(new W.HttpRequest_request_closure(completer, xhr)), t1._useCapture);
- H.setRuntimeTypeInfo(t2, [H.getRuntimeTypeArgument(t1, "_EventStream", 0)]);
- t2._tryResume$0();
- t2 = new W._EventStream(xhr, C.EventStreamProvider_error._eventType, false);
- H.setRuntimeTypeInfo(t2, [null]);
- t1 = new W._EventStreamSubscription(0, t2._target, t2._eventType, W._EventStreamSubscription__wrapZone(new W.HttpRequest_request_closure0(completer)), t2._useCapture);
- H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(t2, "_EventStream", 0)]);
- t1._tryResume$0();
- xhr.send();
- return completer.future;
-},
-
-_convertNativeToDart_Window: function(win) {
- if (win == null)
- return;
- return W._DOMWindowCrossFrame__createSafe(win);
-},
-
-_ChildrenElementList: {"": "ListBase;_element,_childElements",
- get$length: function(_) {
- return this._childElements.length;
- },
- $index: function(_, index) {
- var t1 = this._childElements;
- if (index >>> 0 !== index || index >= t1.length)
- throw H.ioore(t1, index);
- return t1[index];
- },
- $indexSet: function(_, index, value) {
- var t1 = this._childElements;
- if (index >>> 0 !== index || index >= t1.length)
- throw H.ioore(t1, index);
- this._element.replaceChild(value, t1[index]);
- },
- add$1: function(_, value) {
- this._element.appendChild(value);
- return value;
- },
- get$iterator: function(_) {
- var t1 = this.toList$0(this);
- return new H.ListIterator(t1, t1.length, 0, null);
- },
- $asList: function() {
- return [W.Element];
- }
-},
-
-Interceptor_ListMixin: {"": "Interceptor+ListMixin;", $isList: true, $asList: null},
-
-Interceptor_ListMixin_ImmutableListMixin: {"": "Interceptor_ListMixin+ImmutableListMixin;", $asList: null, $isList: true},
-
-HttpRequest_getString_closure: {"": "Closure;",
- call$1: function(xhr) {
- return J.get$responseText$x(xhr);
- }
-},
-
-HttpRequest_request_closure1: {"": "Closure;xhr_0",
- call$2: function(header, value) {
- this.xhr_0.setRequestHeader(header, value);
- }
-},
-
-HttpRequest_request_closure: {"": "Closure;completer_1,xhr_2",
- call$1: function(e) {
- var t1, t2, t3;
- t1 = this.xhr_2;
- t2 = t1.status;
- if (typeof t2 !== "number")
- throw t2.$ge();
- t2 = t2 >= 200 && t2 < 300 || t2 === 0 || t2 === 304;
- t3 = this.completer_1;
- if (t2) {
- t2 = t3.future;
- if (t2._state !== 0)
- H.throwExpression(new P.StateError("Future already completed"));
- t2._asyncComplete$1(t1);
- } else {
- t1 = t3.future;
- if (t1._state !== 0)
- H.throwExpression(new P.StateError("Future already completed"));
- t1._asyncCompleteError$2(e, null);
- }
- }
-},
-
-HttpRequest_request_closure0: {"": "Closure;completer_3",
- call$1: function(e) {
- var t1 = this.completer_3.future;
- if (t1._state !== 0)
- H.throwExpression(new P.StateError("Future already completed"));
- t1._asyncCompleteError$2(e, null);
- }
-},
-
-_ChildNodeListLazy: {"": "ListBase;_this",
- $indexSet: function(_, index, value) {
- var t1, t2;
- t1 = this._this;
- t2 = t1.childNodes;
- if (index >>> 0 !== index || index >= t2.length)
- throw H.ioore(t2, index);
- t1.replaceChild(value, t2[index]);
- },
- get$iterator: function(_) {
- return C.NodeList_methods.get$iterator(this._this.childNodes);
- },
- get$length: function(_) {
- return this._this.childNodes.length;
- },
- $index: function(_, index) {
- var t1 = this._this.childNodes;
- if (index >>> 0 !== index || index >= t1.length)
- throw H.ioore(t1, index);
- return t1[index];
- },
- $asList: function() {
- return [W.Node];
- }
-},
-
-Interceptor_ListMixin0: {"": "Interceptor+ListMixin;", $isList: true, $asList: null},
-
-Interceptor_ListMixin_ImmutableListMixin0: {"": "Interceptor_ListMixin0+ImmutableListMixin;", $asList: null, $isList: true},
-
-_EventStream: {"": "Stream;_target,_eventType,_useCapture",
- listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
- var t1 = new W._EventStreamSubscription(0, this._target, this._eventType, W._EventStreamSubscription__wrapZone(onData), this._useCapture);
- H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_EventStream", 0)]);
- t1._tryResume$0();
- return t1;
+Object: {"": ";",
+ $eq: function(_, other) {
+ return this === other;
},
- listen$3$onDone$onError: function(onData, onDone, onError) {
- return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
+ get$hashCode: function(_) {
+ return H.Primitives_objectHashCode(this);
},
- $asStream: null
+ toString$0: function(_) {
+ return H.Primitives_objectToString(this);
+ }
},
-_ElementEventStreamImpl: {"": "_EventStream;_target,_eventType,_useCapture", $as_EventStream: null},
+StackTrace: {"": "Object;"},
-_EventStreamSubscription: {"": "StreamSubscription;_pauseCount,_target,_eventType,_onData,_useCapture",
- cancel$0: function() {
- if (this._target == null)
- return;
- this._unlisten$0();
- this._target = null;
- this._onData = null;
+StringBuffer: {"": "Object;_contents<",
+ get$length: function(_) {
+ return this._contents.length;
},
- pause$1: function(_, resumeSignal) {
- if (this._target == null)
- return;
- this._pauseCount = this._pauseCount + 1;
- this._unlisten$0();
+ write$1: function(obj) {
+ if (typeof obj !== "string")
+ return this.write$1$bailout(1, obj);
+ this._contents = this._contents + obj;
},
- pause$0: function($receiver) {
- return this.pause$1($receiver, null);
+ write$1$bailout: function(state0, obj) {
+ var str = typeof obj === "string" ? obj : H.S(obj);
+ this._contents = this._contents + str;
},
- resume$0: function() {
- if (this._target == null || this._pauseCount <= 0)
+ writeAll$2: function(objects, separator) {
+ var iterator, str;
+ iterator = J.get$iterator$ax(objects);
+ if (!iterator.moveNext$0())
return;
- this._pauseCount = this._pauseCount - 1;
- this._tryResume$0();
+ if (separator.length === 0)
+ do {
+ str = iterator.get$current();
+ str = typeof str === "string" ? str : H.S(str);
+ this._contents = this._contents + str;
+ } while (iterator.moveNext$0());
+ else {
+ this.write$1(iterator.get$current());
+ for (; iterator.moveNext$0();) {
+ this._contents = this._contents + separator;
+ str = iterator.get$current();
+ str = typeof str === "string" ? str : H.S(str);
+ this._contents = this._contents + str;
+ }
+ }
},
- _tryResume$0: function() {
- var t1 = this._onData;
- if (t1 != null && this._pauseCount <= 0)
- J.$$dom_addEventListener$3$x(this._target, this._eventType, t1, this._useCapture);
+ toString$0: function(_) {
+ return this._contents;
},
- _unlisten$0: function() {
- var t1 = this._onData;
- if (t1 != null)
- J.$$dom_removeEventListener$3$x(this._target, this._eventType, t1, this._useCapture);
+ StringBuffer$1: function($content) {
+ this._contents = $content;
},
- $asStreamSubscription: null,
static: {
-_EventStreamSubscription__wrapZone: function(callback) {
- if (J.$eq($.Zone__current, C._CustomizedZone_WYN))
- return callback;
- return $.Zone__current.bindUnaryCallback$2$runGuarded(callback, true);
+StringBuffer$: function($content) {
+ var t1 = new P.StringBuffer("");
+ t1.StringBuffer$1($content);
+ return t1;
}}
},
-EventStreamProvider: {"": "Object;_eventType"},
+Symbol: {"": "Object;"}}],
+["dart.dom.html", "dart:html", , W, {
+Geolocation_getCurrentPosition_closure: {"": "Closure;this_0,completer_1",
+ call$1: function(position) {
+ var t1, t2;
+ t1 = C.Geolocation_methods._ensurePosition$1(this.this_0, position);
+ t2 = this.completer_1.future;
+ if (t2._state !== 0)
+ H.throwExpression(new P.StateError("Future already completed"));
+ t2._asyncComplete$1(t1);
+ }
+},
-ImmutableListMixin: {"": "Object;",
- get$iterator: function(receiver) {
- return W.FixedSizeListIterator$(receiver);
- },
- $isList: true,
- $asList: null
+Geolocation_getCurrentPosition_closure0: {"": "Closure;completer_2",
+ call$1: function(error) {
+ var t1 = this.completer_2.future;
+ if (t1._state !== 0)
+ H.throwExpression(new P.StateError("Future already completed"));
+ t1._asyncCompleteError$2(error, null);
+ }
},
-FixedSizeListIterator: {"": "Object;_array,_html$_length,_html$_position,_html$_current",
- moveNext$0: function() {
- var nextPosition, t1;
- nextPosition = this._html$_position + 1;
- t1 = this._html$_length;
- if (nextPosition < t1) {
- this._html$_current = J.$index$asx(this._array, nextPosition);
- this._html$_position = nextPosition;
- return true;
- }
- this._html$_current = null;
- this._html$_position = t1;
- return false;
- },
- get$current: function() {
- return this._html$_current;
- },
- static: {
-FixedSizeListIterator$: function(array) {
- return new W.FixedSizeListIterator(array, J.get$length$asx(array), -1, null);
-}}
+Geolocation_watchPosition_closure0: {"": "Closure;box_0,this_1,options_2",
+ call$0: function() {
+ var t1, t2;
+ t1 = this.this_1;
+ t2 = this.box_0;
+ t2.watchId_0 = C.Geolocation_methods._watchPosition$3(t1, new W.Geolocation_watchPosition__closure(t2, t1), new W.Geolocation_watchPosition__closure0(t2), this.options_2);
+ }
+},
+Geolocation_watchPosition__closure: {"": "Closure;box_0,this_3",
+ call$1: function(position) {
+ var t1, t2;
+ t1 = this.box_0.controller_1;
+ t2 = C.Geolocation_methods._ensurePosition$1(this.this_3, position);
+ if (t1._state >= 4)
+ H.throwExpression(t1._badEventState$0());
+ t1._async$_add$1(t2);
+ }
},
-_DOMWindowCrossFrame: {"": "Object;_window",
- get$parent: function(_) {
- return W._DOMWindowCrossFrame__createSafe(this._window.parent);
- },
- static: {
-_DOMWindowCrossFrame__createSafe: function(w) {
- if (w === window)
- return w;
- else
- return new W._DOMWindowCrossFrame(w);
-}}
+Geolocation_watchPosition__closure0: {"": "Closure;box_0",
+ call$1: function(error) {
+ this.box_0.controller_1.addError$1(error);
+ }
+},
+
+Geolocation_watchPosition_closure: {"": "Closure;box_0,this_4",
+ call$0: function() {
+ this.this_4.clearWatch(this.box_0.watchId_0);
+ }
+},
+_GeopositionWrapper: {"": "Object;_ptr",
+ get$coords: function(_) {
+ return this._ptr.coords;
+ },
+ $isGeoposition: true
},
-HtmlElement: {"": "Element;"},
+HtmlElement: {"": "Element;", "%": "HTMLAppletElement|HTMLBRElement|HTMLBaseElement|HTMLBaseFontElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFrameElement|HTMLFrameSetElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement|HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLOptGroupElement|HTMLOptionElement|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement|HTMLTableRowElement|HTMLTableSectionElement|HTMLTemplateElement|HTMLTextAreaElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement;HTMLElement"},
AnchorElement: {"": "HtmlElement;",
toString$0: function(receiver) {
return receiver.toString();
- }
+ },
+ "%": "HTMLAnchorElement"
},
-CharacterData: {"": "Node;length="},
+AreaElement: {"": "HtmlElement;coords=", "%": "HTMLAreaElement"},
+
+CloseEvent: {"": "Event;code=", "%": "CloseEvent"},
+
+Coordinates: {"": "Interceptor;latitude=,longitude=", "%": "Coordinates"},
+
+CssFontFaceLoadEvent: {"": "Event;error=", "%": "CSSFontFaceLoadEvent"},
+
+DomError: {"": "Interceptor;", "%": ";DOMError"},
DomException: {"": "Interceptor;",
toString$0: function(receiver) {
return receiver.toString();
- }
+ },
+ "%": "DOMException"
},
Element: {"": "Node;",
- get$children: function(receiver) {
- return new W._ChildrenElementList(receiver, receiver.children);
- },
toString$0: function(receiver) {
return receiver.localName;
},
- $isElement: true
+ "%": "SVGAElement|SVGAltGlyphDefElement|SVGAltGlyphElement|SVGAltGlyphItemElement|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimationElement|SVGCircleElement|SVGClipPathElement|SVGComponentTransferFunctionElement|SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGFEBlendElement|SVGFEColorMatrixElement|SVGFEComponentTransferElement|SVGFECompositeElement|SVGFEConvolveMatrixElement|SVGFEDiffuseLightingElement|SVGFEDisplacementMapElement|SVGFEDistantLightElement|SVGFEDropShadowElement|SVGFEFloodElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEGaussianBlurElement|SVGFEImageElement|SVGFEMergeElement|SVGFEMergeNodeElement|SVGFEMorphologyElement|SVGFEOffsetElement|SVGFEPointLightElement|SVGFESpecularLightingElement|SVGFESpotLightElement|SVGFETileElement|SVGFETurbulenceElement|SVGFilterElement|SVGFontElement|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement|SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGlyphRefElement|SVGGradientElement|SVGGraphicsElement|SVGHKernElement|SVGImageElement|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMarkerElement|SVGMaskElement|SVGMetadataElement|SVGMissingGlyphElement|SVGPathElement|SVGPatternElement|SVGPolygonElement|SVGPolylineElement|SVGRadialGradientElement|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTextContentElement|SVGTextElement|SVGTextPathElement|SVGTextPositioningElement|SVGTitleElement|SVGUseElement|SVGVKernElement|SVGViewElement;Element"
},
-Event: {"": "Interceptor;"},
+ErrorEvent: {"": "Event;error=", "%": "ErrorEvent"},
-EventTarget: {"": "Interceptor;",
- $$dom_addEventListener$3: function(receiver, type, listener, useCapture) {
- return receiver.addEventListener(type, H.convertDartClosureToJS(listener, 1), useCapture);
- },
- $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) {
- return receiver.removeEventListener(type, H.convertDartClosureToJS(listener, 1), useCapture);
- }
-},
+Event: {"": "Interceptor;", "%": "AudioProcessingEvent|AutocompleteErrorEvent|BeforeLoadEvent|CompositionEvent|CustomEvent|DeviceMotionEvent|DeviceOrientationEvent|DragEvent|FocusEvent|HashChangeEvent|IDBVersionChangeEvent|KeyboardEvent|MIDIConnectionEvent|MIDIMessageEvent|MSPointerEvent|MediaKeyEvent|MediaKeyMessageEvent|MediaKeyNeededEvent|MediaStreamEvent|MediaStreamTrackEvent|MessageEvent|MouseEvent|MouseScrollEvent|MouseWheelEvent|MutationEvent|OfflineAudioCompletionEvent|OverflowEvent|PageTransitionEvent|PointerEvent|PopStateEvent|ProgressEvent|RTCDTMFToneChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|ResourceProgressEvent|SVGZoomEvent|SecurityPolicyViolationEvent|SpeechInputEvent|SpeechRecognitionEvent|SpeechSynthesisEvent|StorageEvent|TextEvent|TouchEvent|TrackEvent|TransitionEvent|UIEvent|WebGLContextEvent|WebKitAnimationEvent|WebKitTransitionEvent|WheelEvent|XMLHttpRequestProgressEvent;Event"},
-FormElement: {"": "HtmlElement;length="},
+EventTarget: {"": "Interceptor;", "%": "MediaStream;EventTarget"},
-HtmlCollection: {"": "Interceptor_ListMixin_ImmutableListMixin;",
- get$length: function(receiver) {
- return receiver.length;
- },
- $index: function(receiver, index) {
- var t1 = receiver.length;
- if (index >>> 0 !== index || index >= t1)
- throw H.wrapException(new P.RangeError("value " + H.S(index) + " not in range 0.." + t1));
- return receiver[index];
+FileError: {"": "DomError;code=", "%": "FileError"},
+
+FormElement: {"": "HtmlElement;length=", "%": "HTMLFormElement"},
+
+Geolocation: {"": "Interceptor;",
+ getCurrentPosition$3$enableHighAccuracy$maximumAge$timeout: function(receiver, enableHighAccuracy, maximumAge, timeout) {
+ var options, completer, e, stacktrace, t1, completer0, exception;
+ options = H.fillLiteralMap([], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null));
+ t1 = W.Geoposition;
+ completer0 = new P._AsyncCompleter(P._Future$(t1));
+ H.setRuntimeTypeInfo(completer0, [t1]);
+ completer = completer0;
+ try {
+ this._getCurrentPosition$3(receiver, new W.Geolocation_getCurrentPosition_closure(receiver, completer), new W.Geolocation_getCurrentPosition_closure0(completer), options);
+ } catch (exception) {
+ t1 = H.unwrapException(exception);
+ e = t1;
+ stacktrace = new H._StackTrace(exception, null);
+ t1 = completer.get$future();
+ if (t1._state !== 0)
+ H.throwExpression(new P.StateError("Future already completed"));
+ t1._asyncCompleteError$2(e, stacktrace);
+ }
+
+ return completer.get$future();
},
- $indexSet: function(receiver, index, value) {
- throw H.wrapException(new P.UnsupportedError("Cannot assign element of immutable List."));
+ getCurrentPosition$0: function($receiver) {
+ return this.getCurrentPosition$3$enableHighAccuracy$maximumAge$timeout($receiver, null, null, null);
},
- elementAt$1: function(receiver, index) {
- if (index < 0 || index >= receiver.length)
- throw H.ioore(receiver, index);
- return receiver[index];
+ watchPosition$3$enableHighAccuracy$maximumAge$timeout: function(receiver, enableHighAccuracy, maximumAge, timeout) {
+ var t1, options;
+ t1 = {};
+ options = H.fillLiteralMap([], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null));
+ t1.watchId_0 = null;
+ t1.controller_1 = null;
+ t1.controller_1 = P.StreamController_StreamController(new W.Geolocation_watchPosition_closure(t1, receiver), new W.Geolocation_watchPosition_closure0(t1, receiver, options), null, null, true, W.Geoposition);
+ t1 = t1.controller_1;
+ t1.toString;
+ t1 = new P._ControllerStream(t1);
+ H.setRuntimeTypeInfo(t1, [null]);
+ return t1;
},
- $asList: function() {
- return [W.Node];
+ watchPosition$0: function($receiver) {
+ return this.watchPosition$3$enableHighAccuracy$maximumAge$timeout($receiver, null, null, null);
},
- $isList: true,
- $isJavaScriptIndexingBehavior: true
-},
+ _ensurePosition$1: function(receiver, domPosition) {
+ var t1, t2, exception;
+ try {
+ t1 = domPosition;
+ t2 = J.getInterceptor(t1);
+ if (typeof t1 === "object" && t1 !== null && !!t2.$isGeoposition)
+ return domPosition;
+ } catch (exception) {
+ H.unwrapException(exception);
+ }
-HttpRequest: {"": "XmlHttpRequestEventTarget;responseText=",
- open$5$async$password$user: function(receiver, method, url, async, password, user) {
- return receiver.open(method, url, async, user, password);
+ return new W._GeopositionWrapper(domPosition);
},
- open$3$async: function($receiver, method, url, async) {
- return $receiver.open(method, url, async);
+ _getCurrentPosition$3: function(receiver, successCallback, errorCallback, options) {
+ return receiver.getCurrentPosition(H.convertDartClosureToJS(successCallback, 1), H.convertDartClosureToJS(errorCallback, 1), options);
},
- $isHttpRequest: true
+ _watchPosition$3: function(receiver, successCallback, errorCallback, options) {
+ return receiver.watchPosition(H.convertDartClosureToJS(successCallback, 1), H.convertDartClosureToJS(errorCallback, 1), options);
+ },
+ "%": "Geolocation"
},
-InputElement: {"": "HtmlElement;", $isElement: true, $isNode: true},
+Geoposition: {"": "Interceptor;coords=", $isGeoposition: true, "%": "Geoposition"},
-MouseEvent: {"": "UIEvent;", $isMouseEvent: true},
+MediaElement: {"": "HtmlElement;error=", "%": "HTMLAudioElement|HTMLMediaElement|HTMLVideoElement"},
-Node: {"": "EventTarget;parent:parentElement=",
- replaceWith$1: function(receiver, otherNode) {
- var $parent, exception;
- try {
- $parent = receiver.parentNode;
- J._replaceChild$2$x($parent, otherNode, receiver);
- } catch (exception) {
- H.unwrapException(exception);
- }
+MediaError: {"": "Interceptor;code=", "%": "MediaError"},
- return receiver;
- },
+MediaKeyError: {"": "Interceptor;code=", "%": "MediaKeyError"},
+
+Node: {"": "EventTarget;",
toString$0: function(receiver) {
var t1 = receiver.nodeValue;
return t1 == null ? J.Interceptor.prototype.toString$0.call(this, receiver) : t1;
},
- _replaceChild$2: function(receiver, newChild, oldChild) {
- return receiver.replaceChild(newChild, oldChild);
- },
- $isNode: true
+ "%": "Document|HTMLDocument;Node"
},
-NodeList: {"": "Interceptor_ListMixin_ImmutableListMixin0;",
- get$length: function(receiver) {
- return receiver.length;
- },
- $index: function(receiver, index) {
- var t1 = receiver.length;
- if (index >>> 0 !== index || index >= t1)
- throw H.wrapException(new P.RangeError("value " + H.S(index) + " not in range 0.." + t1));
- return receiver[index];
- },
- $indexSet: function(receiver, index, value) {
- throw H.wrapException(new P.UnsupportedError("Cannot assign element of immutable List."));
- },
- elementAt$1: function(receiver, index) {
- if (index < 0 || index >= receiver.length)
- throw H.ioore(receiver, index);
- return receiver[index];
- },
- $asList: function() {
- return [W.Node];
- },
- $isList: true,
- $isJavaScriptIndexingBehavior: true
-},
+ObjectElement: {"": "HtmlElement;code=", "%": "HTMLObjectElement"},
-ProgressEvent: {"": "Event;", $isProgressEvent: true},
+PositionError: {"": "Interceptor;code=", "%": "PositionError"},
-SelectElement: {"": "HtmlElement;length="},
+SelectElement: {"": "HtmlElement;length=", "%": "HTMLSelectElement"},
-UIEvent: {"": "Event;"},
+SpeechRecognitionError: {"": "Event;error=", "%": "SpeechRecognitionError"},
Window: {"": "EventTarget;",
- get$parent: function(receiver) {
- return W._convertNativeToDart_Window(receiver.parent);
- },
toString$0: function(receiver) {
return receiver.toString();
- }
-},
-
-XmlHttpRequestEventTarget: {"": "EventTarget;"}}],
-["dart.dom.svg", "dart:svg", , P, {
-SvgElement: {"": "Element;",
- get$children: function(receiver) {
- var t1 = new P.FilteredElementList(receiver, new W._ChildNodeListLazy(receiver));
- H.setRuntimeTypeInfo(t1, [W.Element]);
- return t1;
- }
+ },
+ "%": "DOMWindow|Window"
}}],
+["dart.dom.web_sql", "dart:web_sql", , P, {
+SqlError: {"": "Interceptor;code=", "%": "SQLError"}}],
["dart.isolate", "dart:isolate", , P, {
_Isolate_port: function() {
if ($.lazyPort == null)
@@ -5879,9 +5606,9 @@ _Isolate_port: function() {
return $.lazyPort;
},
-ReceivePort: {"": "Object;", $isReceivePort: true}}],
+ReceivePort: {"": "Object;"}}],
["dart.typed_data", "dart:typed_data", , P, {
-TypedData_ListMixin: {"": "TypedData+ListMixin;", $isList: true, $asList: null},
+TypedData_ListMixin: {"": "TypedData+ListMixin;", $isList: true, $asList: null, $isEfficientLength: true},
TypedData_ListMixin_FixedLengthListMixin: {"": "TypedData_ListMixin+FixedLengthListMixin;", $asList: null},
@@ -5889,10 +5616,11 @@ TypedData: {"": "Interceptor;",
_invalidIndex$2: function(receiver, index, $length) {
var t1 = J.getInterceptor$n(index);
if (t1.$lt(index, 0) || t1.$ge(index, $length))
- throw H.wrapException(new P.RangeError("value " + H.S(index) + " not in range 0.." + $length));
+ throw H.wrapException(P.RangeError$range(index, 0, $length));
else
- throw H.wrapException(new P.ArgumentError("Invalid list index " + H.S(index)));
- }
+ throw H.wrapException(P.ArgumentError$("Invalid list index " + H.S(index)));
+ },
+ "%": ";ArrayBufferView;TypedData_ListMixin|TypedData_ListMixin_FixedLengthListMixin"
},
Uint8List: {"": "TypedData_ListMixin_FixedLengthListMixin;",
@@ -5933,105 +5661,72 @@ Uint8List: {"": "TypedData_ListMixin_FixedLengthListMixin;",
return [J.JSInt];
},
$isList: true,
- $isJavaScriptIndexingBehavior: true
+ $isEfficientLength: true,
+ $isJavaScriptIndexingBehavior: true,
+ "%": ";Uint8Array"
}}],
-["html_common", "dart:html_common", , P, {
-FilteredElementList: {"": "ListBase;_node,_childNodes",
- get$_filtered: function() {
- var t1 = this._childNodes;
- return P.List_List$from(t1.where$1(t1, new P.FilteredElementList__filtered_closure()), true, W.Element);
- },
- forEach$1: function(_, f) {
- H.IterableMixinWorkaround_forEach(this.get$_filtered(), f);
- },
- $indexSet: function(_, index, value) {
- var t1 = this.get$_filtered();
- if (index >>> 0 !== index || index >= t1.length)
- throw H.ioore(t1, index);
- J.replaceWith$1$x(t1[index], value);
- },
- add$1: function(_, value) {
- this._childNodes._this.appendChild(value);
- },
- get$length: function(_) {
- return this.get$_filtered().length;
- },
- $index: function(_, index) {
- var t1 = this.get$_filtered();
- if (index >>> 0 !== index || index >= t1.length)
- throw H.ioore(t1, index);
- return t1[index];
- },
- get$iterator: function(_) {
- var t1 = this.get$_filtered();
- return new H.ListIterator(t1, t1.length, 0, null);
- },
- $asListBase: null,
- $asList: null
+["trip_meter.dart", "trip_meter.dart", , E, {
+calculateDistance: function(lat1, lon1, lat2, lon2) {
+ var t1, t2, t3, t4, a;
+ if (typeof lat2 !== "number")
+ throw lat2.$sub();
+ if (typeof lat1 !== "number")
+ throw H.iae(lat1);
+ if (typeof lon2 !== "number")
+ throw lon2.$sub();
+ if (typeof lon1 !== "number")
+ throw H.iae(lon1);
+ t1 = Math.sin((lat2 - lat1) / 2);
+ t1 = Math.pow(t1, 2);
+ t2 = Math.cos(lat1);
+ t3 = Math.cos(lat2);
+ t4 = Math.sin((lon2 - lon1) / 2);
+ a = t1 + t2 * t3 * Math.pow(t4, 2);
+ t1 = Math.sqrt(a);
+ t2 = Math.sqrt(1 - a);
+ return 6371 * (2 * Math.atan2(t1, t2));
},
-FilteredElementList__filtered_closure: {"": "Closure;",
- call$1: function(n) {
- var t1 = J.getInterceptor(n);
- return typeof n === "object" && n !== null && !!t1.$isElement;
- }
-}}],
-["portmanteaux_simple.dart", "portmanteaux_simple.dart", , O, {
main: function() {
- var t1, t2;
- t1 = document.querySelector("#getWords");
- t1.toString;
- t1 = new W._ElementEventStreamImpl(t1, C.EventStreamProvider_click._eventType, false);
- H.setRuntimeTypeInfo(t1, [null]);
- t2 = new W._EventStreamSubscription(0, t1._target, t1._eventType, W._EventStreamSubscription__wrapZone(O.makeRequest$closure), t1._useCapture);
- H.setRuntimeTypeInfo(t2, [H.getRuntimeTypeArgument(t1, "_EventStream", 0)]);
- t2._tryResume$0();
- $.wordList = document.querySelector("#wordList");
-},
-
-makeRequest: function(e) {
- W.HttpRequest_getString("portmanteaux_simple.json", null, null).then$1(O.processString$closure).catchError$1(O.handleError$closure);
-},
-
-processString: function(jsonString) {
- var portmanteaux, i, t1, t2;
- portmanteaux = P._parseJson(jsonString, new P.JsonDecoder(null)._reviver);
- if (typeof portmanteaux !== "string" && (typeof portmanteaux !== "object" || portmanteaux === null || portmanteaux.constructor !== Array && !H.isJsIndexable(portmanteaux, portmanteaux[init.dispatchPropertyName])))
- return O.processString$bailout(1, portmanteaux);
- for (i = 0; i < portmanteaux.length; ++i) {
- t1 = J.get$children$x($.wordList);
- t2 = document.createElement("li", null);
- if (i >= portmanteaux.length)
- throw H.ioore(portmanteaux, i);
- t2.textContent = portmanteaux[i];
- t1.add$1(t1, t2);
- }
-},
-
-processString$bailout: function(state0, portmanteaux) {
- var t1, i, t2, t3;
- t1 = J.getInterceptor$asx(portmanteaux);
- i = 0;
- while (true) {
- t2 = t1.get$length(portmanteaux);
- if (typeof t2 !== "number")
- throw H.iae(t2);
- if (!(i < t2))
- break;
- t2 = J.get$children$x($.wordList);
- t3 = document.createElement("li", null);
- t3.textContent = t1.$index(portmanteaux, i);
- t2.add$1(t2, t3);
- ++i;
+ var t1 = {};
+ t1.startPosition_0 = null;
+ J.getCurrentPosition$0$x(window.navigator.geolocation).then$2$onError(new E.main_closure(t1), new E.main_closure0());
+ J.watchPosition$0$x(window.navigator.geolocation).listen$2$onError(new E.main_closure1(t1), new E.main_closure2());
+},
+
+main_closure: {"": "Closure;box_0",
+ call$1: function(position) {
+ var t1 = this.box_0;
+ t1.startPosition_0 = position;
+ document.querySelector("#start-lat").textContent = H.S(J.get$latitude$x(J.get$coords$x(t1.startPosition_0)));
+ document.querySelector("#start-lon").textContent = H.S(J.get$longitude$x(J.get$coords$x(t1.startPosition_0)));
}
},
-handleError: function(error) {
- var t1, t2;
- t1 = J.get$children$x($.wordList);
- t2 = document.createElement("li", null);
- t2.textContent = "Request failed.";
- t1.add$1(t1, t2);
+main_closure0: {"": "Closure;",
+ call$1: function(error) {
+ window.alert("Error occurred. Error code: " + H.S(J.get$code$x(error)));
+ return;
+ }
+},
+
+main_closure1: {"": "Closure;box_0",
+ call$1: function(position) {
+ var t1, t2, distance;
+ t1 = J.getInterceptor$x(position);
+ document.querySelector("#current-lat").textContent = H.S(J.get$latitude$x(t1.get$coords(position)));
+ document.querySelector("#current-lon").textContent = H.S(J.get$longitude$x(t1.get$coords(position)));
+ t2 = this.box_0;
+ distance = E.calculateDistance(J.get$latitude$x(J.get$coords$x(t2.startPosition_0)), J.get$longitude$x(J.get$coords$x(t2.startPosition_0)), J.get$latitude$x(t1.get$coords(position)), J.get$longitude$x(t1.get$coords(position)));
+ document.querySelector("#distance").textContent = H.S(distance);
+ }
+},
+
+main_closure2: {"": "Closure;",
+ call$1: function(error) {
+ window.alert("Error occurred. Error code: " + H.S(J.get$code$x(error)));
+ return;
+ }
}},
1],
]);
@@ -6042,7 +5737,6 @@ $$ = null;
init.globalFunctions.IsolateNatives__processWorkerMessage$closure = H.IsolateNatives__processWorkerMessage$closure = new H.Closure$2(H.IsolateNatives__processWorkerMessage, "IsolateNatives__processWorkerMessage$closure");
init.globalFunctions.toStringWrapper$closure = H.toStringWrapper$closure = new H.Closure$0(H.toStringWrapper, "toStringWrapper$closure");
init.globalFunctions.invokeClosure$closure = H.invokeClosure$closure = new H.Closure$7(H.invokeClosure, "invokeClosure$closure");
-init.globalFunctions.isAssignable$closure = H.isAssignable$closure = new H.Closure$2(H.isAssignable, "isAssignable$closure");
init.globalFunctions.typeNameInChrome$closure = H.typeNameInChrome$closure = new H.Closure$1(H.typeNameInChrome, "typeNameInChrome$closure");
init.globalFunctions.typeNameInSafari$closure = H.typeNameInSafari$closure = new H.Closure$1(H.typeNameInSafari, "typeNameInSafari$closure");
init.globalFunctions.typeNameInOpera$closure = H.typeNameInOpera$closure = new H.Closure$1(H.typeNameInOpera, "typeNameInOpera$closure");
@@ -6052,69 +5746,39 @@ init.globalFunctions.constructorNameFallback$closure = H.constructorNameFallback
init.globalFunctions.callDartFunctionWith1Arg$closure = H.callDartFunctionWith1Arg$closure = new H.Closure$2(H.callDartFunctionWith1Arg, "callDartFunctionWith1Arg$closure");
init.globalFunctions._asyncRunCallback$closure = P._asyncRunCallback$closure = new H.Closure$0(P._asyncRunCallback, "_asyncRunCallback$closure");
init.globalFunctions._nullDataHandler$closure = P._nullDataHandler$closure = new H.Closure$1(P._nullDataHandler, "_nullDataHandler$closure");
-init.globalFunctions._nullErrorHandler$closure = P._nullErrorHandler$closure = new H.Closure$1(P._nullErrorHandler, "_nullErrorHandler$closure");
+init.globalFunctions._nullErrorHandler$closure = P._nullErrorHandler$closure = new P.Closure$21(P._nullErrorHandler, "_nullErrorHandler$closure");
init.globalFunctions._nullDoneHandler$closure = P._nullDoneHandler$closure = new H.Closure$0(P._nullDoneHandler, "_nullDoneHandler$closure");
-init.globalFunctions._rootHandleUncaughtError$closure = P._rootHandleUncaughtError$closure = new P.Closure$4(P._rootHandleUncaughtError, "_rootHandleUncaughtError$closure");
-init.globalFunctions._rootRun$closure = P._rootRun$closure = new P.Closure$4(P._rootRun, "_rootRun$closure");
-init.globalFunctions._rootRunUnary$closure = P._rootRunUnary$closure = new P.Closure$5(P._rootRunUnary, "_rootRunUnary$closure");
-init.globalFunctions._rootRegisterCallback$closure = P._rootRegisterCallback$closure = new P.Closure$4(P._rootRegisterCallback, "_rootRegisterCallback$closure");
-init.globalFunctions._rootRegisterUnaryCallback$closure = P._rootRegisterUnaryCallback$closure = new P.Closure$4(P._rootRegisterUnaryCallback, "_rootRegisterUnaryCallback$closure");
-init.globalFunctions._rootScheduleMicrotask$closure = P._rootScheduleMicrotask$closure = new P.Closure$4(P._rootScheduleMicrotask, "_rootScheduleMicrotask$closure");
-init.globalFunctions._rootCreateTimer$closure = P._rootCreateTimer$closure = new P.Closure$5(P._rootCreateTimer, "_rootCreateTimer$closure");
-init.globalFunctions._rootCreatePeriodicTimer$closure = P._rootCreatePeriodicTimer$closure = new P.Closure$5(P._rootCreatePeriodicTimer, "_rootCreatePeriodicTimer$closure");
-init.globalFunctions._rootFork$closure = P._rootFork$closure = new P.Closure$5(P._rootFork, "_rootFork$closure");
init.globalFunctions._defaultEquals$closure = P._defaultEquals$closure = new H.Closure$2(P._defaultEquals, "_defaultEquals$closure");
init.globalFunctions._defaultHashCode$closure = P._defaultHashCode$closure = new H.Closure$1(P._defaultHashCode, "_defaultHashCode$closure");
init.globalFunctions.identical$closure = P.identical$closure = new H.Closure$2(P.identical, "identical$closure");
init.globalFunctions.identityHashCode$closure = P.identityHashCode$closure = new H.Closure$1(P.identityHashCode, "identityHashCode$closure");
-init.globalFunctions.main$closure = O.main$closure = new H.Closure$0(O.main, "main$closure");
-init.globalFunctions.makeRequest$closure = O.makeRequest$closure = new H.Closure$1(O.makeRequest, "makeRequest$closure");
-init.globalFunctions.processString$closure = O.processString$closure = new H.Closure$1(O.processString, "processString$closure");
-init.globalFunctions.handleError$closure = O.handleError$closure = new H.Closure$1(O.handleError, "handleError$closure");
+init.globalFunctions.main$closure = E.main$closure = new H.Closure$0(E.main, "main$closure");
// Runtime type support
J.JSInt.$isint = true;
J.JSInt.$isObject = true;
-W.Node.$isObject = true;
J.JSString.$isString = true;
J.JSString.$isObject = true;
J.JSNumber.$isObject = true;
-P.Duration.$isDuration = true;
P.Duration.$isObject = true;
-W.Element.$isObject = true;
-P.Object.$isObject = true;
-W.MouseEvent.$isEvent = true;
-W.MouseEvent.$isObject = true;
-P.Symbol.$isSymbol = true;
-P.Symbol.$isObject = true;
-W.HttpRequest.$isObject = true;
-W.ProgressEvent.$isEvent = true;
-W.ProgressEvent.$isObject = true;
+W.Geoposition.$isGeoposition = true;
+W.Geoposition.$isObject = true;
P.ReceivePort.$isObject = true;
H._IsolateEvent.$isObject = true;
H._IsolateContext.$isObject = true;
J.JSArray.$isObject = true;
+P.Symbol.$isSymbol = true;
+P.Symbol.$isObject = true;
+P.StackTrace.$isStackTrace = true;
+P.StackTrace.$isObject = true;
P.Future.$isFuture = true;
P.Future.$isObject = true;
-W.Event.$isEvent = true;
-W.Event.$isObject = true;
-P.Zone.$isZone = true;
-P.Zone.$isObject = true;
-P.ZoneDelegate.$isZoneDelegate = true;
-P.ZoneDelegate.$isObject = true;
-P.Timer.$isTimer = true;
-P.Timer.$isObject = true;
-P.ZoneSpecification.$isZoneSpecification = true;
-P.ZoneSpecification.$isObject = true;
-P.Map.$isMap = true;
-P.Map.$isObject = true;
+P.Object.$isObject = true;
P.Function.$isFunction = true;
P.Function.$isObject = true;
J.JSBool.$isbool = true;
J.JSBool.$isObject = true;
-P.Error.$isError = true;
-P.Error.$isObject = true;
-P.StackTrace.$isStackTrace = true;
-P.StackTrace.$isObject = true;
+P.StreamSubscription.$isStreamSubscription = true;
+P.StreamSubscription.$isObject = true;
P._EventSink.$is_EventSink = true;
P._EventSink.$isObject = true;
// getInterceptor methods
@@ -6191,12 +5855,9 @@ J.getInterceptor$x = function(receiver) {
};
C.C_CloseToken = new H.CloseToken();
C.C_UnknownJavaScriptObject = new J.UnknownJavaScriptObject();
-C.C__DelayedDone = new P._DelayedDone();
+C.C__RootZone = new P._RootZone();
C.Duration_0 = new P.Duration(0);
-C.EventStreamProvider_click = new W.EventStreamProvider("click");
-C.EventStreamProvider_error = new W.EventStreamProvider("error");
-C.EventStreamProvider_load = new W.EventStreamProvider("load");
-C.HttpRequest_methods = W.HttpRequest.prototype;
+C.Geolocation_methods = W.Geolocation.prototype;
C.JSArray_methods = J.JSArray.prototype;
C.JSInt_methods = J.JSInt.prototype;
C.JSNumber_methods = J.JSNumber.prototype;
@@ -6213,31 +5874,16 @@ Isolate.makeConstantList = function(list) {
return list;
};
C.List_empty = Isolate.makeConstantList([]);
-C.NodeList_methods = W.NodeList.prototype;
-C._ZoneSpecification_eDx = new P._ZoneSpecification(P._rootHandleUncaughtError$closure, P._rootRun$closure, P._rootRunUnary$closure, P._rootRegisterCallback$closure, P._rootRegisterUnaryCallback$closure, P._rootScheduleMicrotask$closure, P._rootCreateTimer$closure, P._rootCreatePeriodicTimer$closure, P._rootFork$closure);
-C.List_empty0 = H.setRuntimeTypeInfo(Isolate.makeConstantList([]), [P.Symbol]);
-C.Map_empty = H.setRuntimeTypeInfo(new H.ConstantStringMap(0, {}, C.List_empty0), [P.Symbol, null]);
-C._CustomizedZone_WYN = new P._CustomizedZone(null, C._ZoneSpecification_eDx, C.Map_empty);
-C._ZoneSpecification_eLJ = new P._ZoneSpecification(null, null, null, null, null, null, null, null, null);
$.lazyPort = null;
$.ReceivePortImpl__nextFreeId = 1;
$.Primitives_mirrorFunctionCacheName = "$cachedFunction";
$.Primitives_mirrorInvokeCacheName = "$cachedInvocation";
-$.interceptorsByTag = null;
-$.leafTags = null;
-$.interceptorToTag = null;
+$.printToZone = null;
$._callbacksAreEnqueued = false;
-$.Zone__current = C._CustomizedZone_WYN;
+$.Zone__current = C.C__RootZone;
$.Expando__keyCount = 0;
$.Device__isOpera = null;
$.Device__isWebKit = null;
-$.wordList = null;
-J.$$dom_addEventListener$3$x = function(receiver, a0, a1, a2) {
- return J.getInterceptor$x(receiver).$$dom_addEventListener$3(receiver, a0, a1, a2);
-};
-J.$$dom_removeEventListener$3$x = function(receiver, a0, a1, a2) {
- return J.getInterceptor$x(receiver).$$dom_removeEventListener$3(receiver, a0, a1, a2);
-};
J.$eq = function(receiver, a0) {
if (receiver == null)
return a0 == null;
@@ -6261,17 +5907,20 @@ J.$indexSet$ax = function(receiver, a0, a1) {
return receiver[a0] = a1;
return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1);
};
-J._replaceChild$2$x = function(receiver, a0, a1) {
- return J.getInterceptor$x(receiver)._replaceChild$2(receiver, a0, a1);
-};
-J.elementAt$1$ax = function(receiver, a0) {
- return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0);
+J.add$1$ax = function(receiver, a0) {
+ return J.getInterceptor$ax(receiver).add$1(receiver, a0);
};
J.forEach$1$ax = function(receiver, a0) {
return J.getInterceptor$ax(receiver).forEach$1(receiver, a0);
};
-J.get$children$x = function(receiver) {
- return J.getInterceptor$x(receiver).get$children(receiver);
+J.get$code$x = function(receiver) {
+ return J.getInterceptor$x(receiver).get$code(receiver);
+};
+J.get$coords$x = function(receiver) {
+ return J.getInterceptor$x(receiver).get$coords(receiver);
+};
+J.get$error$x = function(receiver) {
+ return J.getInterceptor$x(receiver).get$error(receiver);
};
J.get$hashCode$ = function(receiver) {
return J.getInterceptor(receiver).get$hashCode(receiver);
@@ -6279,25 +5928,27 @@ J.get$hashCode$ = function(receiver) {
J.get$iterator$ax = function(receiver) {
return J.getInterceptor$ax(receiver).get$iterator(receiver);
};
+J.get$latitude$x = function(receiver) {
+ return J.getInterceptor$x(receiver).get$latitude(receiver);
+};
J.get$length$asx = function(receiver) {
return J.getInterceptor$asx(receiver).get$length(receiver);
};
-J.get$responseText$x = function(receiver) {
- return J.getInterceptor$x(receiver).get$responseText(receiver);
+J.get$longitude$x = function(receiver) {
+ return J.getInterceptor$x(receiver).get$longitude(receiver);
};
-J.map$1$ax = function(receiver, a0) {
- return J.getInterceptor$ax(receiver).map$1(receiver, a0);
+J.getCurrentPosition$0$x = function(receiver) {
+ return J.getInterceptor$x(receiver).getCurrentPosition$0(receiver);
};
-J.replaceWith$1$x = function(receiver, a0) {
- return J.getInterceptor$x(receiver).replaceWith$1(receiver, a0);
-};
-J.send$2$x = function(receiver, a0, a1) {
- return J.getInterceptor$x(receiver).send$2(receiver, a0, a1);
+J.removeLast$0$ax = function(receiver) {
+ return J.getInterceptor$ax(receiver).removeLast$0(receiver);
};
J.toString$0 = function(receiver) {
return J.getInterceptor(receiver).toString$0(receiver);
};
-$.mapTypeToInterceptor = [];
+J.watchPosition$0$x = function(receiver) {
+ return J.getInterceptor$x(receiver).watchPosition$0(receiver);
+};
Isolate.$lazy($, "globalThis", "globalThis", "get$globalThis", function() {
return function() { return this; }();
});
@@ -6358,66 +6009,14 @@ Isolate.$lazy($, "_stackTraceExpando", "_stackTraceExpando", "get$_stackTraceExp
Isolate.$lazy($, "_asyncCallbacks", "_asyncCallbacks", "get$_asyncCallbacks", function() {
return P.ListQueue$(null, {func: "void_", void: true});
});
-Isolate.$lazy($, "_toStringList", "ListMixin__toStringList", "get$ListMixin__toStringList", function() {
- return P.List_List(null, null);
+Isolate.$lazy($, "_toStringVisiting", "_toStringVisiting", "get$_toStringVisiting", function() {
+ return P.HashSet_HashSet$identity(null);
});
Isolate.$lazy($, "_toStringList", "Maps__toStringList", "get$Maps__toStringList", function() {
return P.List_List(null, null);
});
// Native classes
-H.defineNativeMethods("DOMError|FileError|MediaError|MediaKeyError|Navigator|NavigatorUserMediaError|PositionError|SQLError|SVGAnimatedNumberList", J.Interceptor);
-
-H.defineNativeMethods("HTMLAppletElement|HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBaseFontElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFrameElement|HTMLFrameSetElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMarqueeElement|HTMLMediaElement|HTMLMenuElement|HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement|HTMLTableRowElement|HTMLTableSectionElement|HTMLTemplateElement|HTMLTextAreaElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement|HTMLVideoElement", W.HtmlElement);
-
-H.defineNativeMethodsNonleaf("HTMLElement", W.HtmlElement);
-
-H.defineNativeMethods("HTMLAnchorElement", W.AnchorElement);
-
-H.defineNativeMethods("CDATASection|CharacterData|Comment|ProcessingInstruction|Text", W.CharacterData);
-
-H.defineNativeMethods("DOMException", W.DomException);
-
-H.defineNativeMethodsNonleaf("Element", W.Element);
-
-H.defineNativeMethods("AudioProcessingEvent|AutocompleteErrorEvent|BeforeLoadEvent|CSSFontFaceLoadEvent|CloseEvent|CustomEvent|DeviceMotionEvent|DeviceOrientationEvent|ErrorEvent|HashChangeEvent|IDBVersionChangeEvent|MIDIConnectionEvent|MIDIMessageEvent|MediaKeyEvent|MediaKeyMessageEvent|MediaKeyNeededEvent|MediaStreamEvent|MediaStreamTrackEvent|MessageEvent|MutationEvent|OfflineAudioCompletionEvent|OverflowEvent|PageTransitionEvent|PopStateEvent|RTCDTMFToneChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|SecurityPolicyViolationEvent|SpeechInputEvent|SpeechRecognitionError|SpeechRecognitionEvent|SpeechSynthesisEvent|StorageEvent|TrackEvent|TransitionEvent|WebGLContextEvent|WebKitAnimationEvent|WebKitTransitionEvent", W.Event);
-
-H.defineNativeMethodsNonleaf("Event", W.Event);
-
-H.defineNativeMethodsNonleaf("EventTarget", W.EventTarget);
-
-H.defineNativeMethods("HTMLFormElement", W.FormElement);
-
-H.defineNativeMethods("HTMLCollection|HTMLFormControlsCollection|HTMLOptionsCollection", W.HtmlCollection);
-
-H.defineNativeMethods("XMLHttpRequest", W.HttpRequest);
-
-H.defineNativeMethods("HTMLInputElement", W.InputElement);
-
-H.defineNativeMethods("DragEvent|MSPointerEvent|MouseEvent|MouseScrollEvent|MouseWheelEvent|PointerEvent|WheelEvent", W.MouseEvent);
-
-H.defineNativeMethods("Attr|Document|DocumentFragment|DocumentType|Entity|HTMLDocument|Notation|SVGDocument|ShadowRoot", W.Node);
-
-H.defineNativeMethodsNonleaf("Node", W.Node);
-
-H.defineNativeMethods("NodeList|RadioNodeList", W.NodeList);
-
-H.defineNativeMethods("ProgressEvent|ResourceProgressEvent|XMLHttpRequestProgressEvent", W.ProgressEvent);
-
-H.defineNativeMethods("HTMLSelectElement", W.SelectElement);
-
-H.defineNativeMethods("CompositionEvent|FocusEvent|KeyboardEvent|SVGZoomEvent|TextEvent|TouchEvent", W.UIEvent);
-
-H.defineNativeMethodsNonleaf("UIEvent", W.UIEvent);
-
-H.defineNativeMethods("DOMWindow|Window", W.Window);
-
-H.defineNativeMethodsNonleaf("XMLHttpRequestEventTarget", W.XmlHttpRequestEventTarget);
-
-H.defineNativeMethods("SVGAElement|SVGAltGlyphDefElement|SVGAltGlyphElement|SVGAltGlyphItemElement|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimationElement|SVGCircleElement|SVGClipPathElement|SVGComponentTransferFunctionElement|SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGFEBlendElement|SVGFEColorMatrixElement|SVGFEComponentTransferElement|SVGFECompositeElement|SVGFEConvolveMatrixElement|SVGFEDiffuseLightingElement|SVGFEDisplacementMapElement|SVGFEDistantLightElement|SVGFEDropShadowElement|SVGFEFloodElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEGaussianBlurElement|SVGFEImageElement|SVGFEMergeElement|SVGFEMergeNodeElement|SVGFEMorphologyElement|SVGFEOffsetElement|SVGFEPointLightElement|SVGFESpecularLightingElement|SVGFESpotLightElement|SVGFETileElement|SVGFETurbulenceElement|SVGFilterElement|SVGFontElement|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement|SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGlyphRefElement|SVGGradientElement|SVGGraphicsElement|SVGHKernElement|SVGImageElement|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMarkerElement|SVGMaskElement|SVGMetadataElement|SVGMissingGlyphElement|SVGPathElement|SVGPatternElement|SVGPolygonElement|SVGPolylineElement|SVGRadialGradientElement|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTextContentElement|SVGTextElement|SVGTextPathElement|SVGTextPositioningElement|SVGTitleElement|SVGUseElement|SVGVKernElement|SVGViewElement", P.SvgElement);
-
-H.defineNativeMethodsExtended("ArrayBufferView", P.TypedData, [P.TypedData_ListMixin, P.TypedData_ListMixin_FixedLengthListMixin]);
-
-H.defineNativeMethodsNonleaf("Uint8Array", P.Uint8List);
+J.Interceptor["%"] = "Navigator|NavigatorUserMediaError|SVGAnimatedNumberList";
init.functionAliases = {};
@@ -6492,9 +6091,9 @@ Z = convertToFastObject(Z);
init.currentScript = currentScript;
if (typeof dartMainRunner === "function") {
- dartMainRunner(function() { H.startRootIsolate(O.main$closure); });
+ dartMainRunner(function() { H.startRootIsolate(E.main$closure); });
} else {
- H.startRootIsolate(O.main$closure);
+ H.startRootIsolate(E.main$closure);
}
});
// END invoke [main].
@@ -6651,6 +6250,8 @@ function init() {
}
constructors = null;
var finishedClasses = {};
+ init.interceptorsByTag = {};
+ init.leafTags = {};
function finishClass(cls) {
var hasOwnProperty = Object.prototype.hasOwnProperty;
if (hasOwnProperty.call(finishedClasses, cls))
@@ -6664,7 +6265,31 @@ function init() {
var superConstructor = allClasses[superclass];
if (!superConstructor)
superConstructor = existingIsolateProperties[superclass];
- prototype = inheritFrom(constructor, superConstructor);
+ var prototype = inheritFrom(constructor, superConstructor);
+ if (hasOwnProperty.call(prototype, "%")) {
+ var nativeSpec = prototype["%"].split(";");
+ if (nativeSpec[0]) {
+ var tags = nativeSpec[0].split("|");
+ for (var i = 0; i < tags.length; i++) {
+ init.interceptorsByTag[tags[i]] = constructor;
+ init.leafTags[tags[i]] = true;
+ }
+ }
+ if (nativeSpec[1]) {
+ tags = nativeSpec[1].split("|");
+ if (nativeSpec[2]) {
+ var subclasses = nativeSpec[2].split("|");
+ for (var i = 0; i < subclasses.length; i++) {
+ var subclass = allClasses[subclasses[i]];
+ subclass.$nativeSuperclassTag = tags[0];
+ }
+ }
+ for (i = 0; i < tags.length; i++) {
+ init.interceptorsByTag[tags[i]] = constructor;
+ init.leafTags[tags[i]] = false;
+ }
+ }
+ }
}
for (var cls in pendingClasses)
finishClass(cls);
@@ -6721,5 +6346,5 @@ function init() {
}
})()
-//# sourceMappingURL=portmanteaux_simple.dart.js.map
-//@ sourceMappingURL=portmanteaux_simple.dart.js.map
+//# sourceMappingURL=trip_meter.dart.js.map
+//@ sourceMappingURL=trip_meter.dart.js.map

Powered by Google App Engine
This is Rietveld 408576698