From 89fc0d94bde5362fee7b32e1c4ab3430b5400ff5 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Tue, 5 Feb 2019 12:23:34 -0800 Subject: [PATCH 001/115] Initial commit --- pkgs/sse/.gitignore | 3 + pkgs/sse/.travis.yml | 42 + pkgs/sse/AUTHORS | 6 + pkgs/sse/CONTRIBUTING.md | 33 + pkgs/sse/LICENSE | 26 + pkgs/sse/README.md | 2 + pkgs/sse/analysis_options.yaml | 82 + pkgs/sse/lib/client/sse_client.dart | 86 + pkgs/sse/lib/server/sse_handler.dart | 134 + pkgs/sse/pubspec.yaml | 25 + pkgs/sse/test/sse_test.dart | 100 + pkgs/sse/test/web/index.dart | 15 + pkgs/sse/test/web/index.dart.js | 6539 ++++++++++++++++++++++++++ pkgs/sse/test/web/index.html | 13 + pkgs/sse/tool/travis-setup.sh | 20 + pkgs/sse/tool/travis.sh | 40 + 16 files changed, 7166 insertions(+) create mode 100644 pkgs/sse/.gitignore create mode 100644 pkgs/sse/.travis.yml create mode 100644 pkgs/sse/AUTHORS create mode 100644 pkgs/sse/CONTRIBUTING.md create mode 100644 pkgs/sse/LICENSE create mode 100644 pkgs/sse/README.md create mode 100644 pkgs/sse/analysis_options.yaml create mode 100644 pkgs/sse/lib/client/sse_client.dart create mode 100644 pkgs/sse/lib/server/sse_handler.dart create mode 100644 pkgs/sse/pubspec.yaml create mode 100644 pkgs/sse/test/sse_test.dart create mode 100644 pkgs/sse/test/web/index.dart create mode 100644 pkgs/sse/test/web/index.dart.js create mode 100644 pkgs/sse/test/web/index.html create mode 100644 pkgs/sse/tool/travis-setup.sh create mode 100644 pkgs/sse/tool/travis.sh diff --git a/pkgs/sse/.gitignore b/pkgs/sse/.gitignore new file mode 100644 index 000000000..79f51c3d5 --- /dev/null +++ b/pkgs/sse/.gitignore @@ -0,0 +1,3 @@ +.dart_tool +.packages +pubspec.lock diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml new file mode 100644 index 000000000..e3edd12ca --- /dev/null +++ b/pkgs/sse/.travis.yml @@ -0,0 +1,42 @@ +language: dart +# This is necessary to use proper Chrome. Travis's version of chromium is from +# 2014. +sudo: required +dist: trusty +addons: + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + firefox: latest + +dart: + - dev + - stable + +with_content_shell: false + +matrix: + allow_failures: + - dart: dev + +before_install: + - export CHROMEDRIVER_BINARY=/usr/bin/google-chrome + - export CHROMEDRIVER_ARGS=--no-sandbox + - /usr/bin/google-chrome --version + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + +before_script: + - wget http://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip + - unzip chromedriver_linux64.zip + - export PATH=$PATH:$PWD + - ./tool/travis-setup.sh + +script: + - ./tool/travis.sh + +cache: + directories: + - $HOME/.pub-cache diff --git a/pkgs/sse/AUTHORS b/pkgs/sse/AUTHORS new file mode 100644 index 000000000..7c12ae681 --- /dev/null +++ b/pkgs/sse/AUTHORS @@ -0,0 +1,6 @@ +# Below is a list of people and organizations that have contributed +# to the Dart project. Names should be added to the list like so: +# +# Name/Organization + +Google Inc. diff --git a/pkgs/sse/CONTRIBUTING.md b/pkgs/sse/CONTRIBUTING.md new file mode 100644 index 000000000..6f5e0ea67 --- /dev/null +++ b/pkgs/sse/CONTRIBUTING.md @@ -0,0 +1,33 @@ +Want to contribute? Great! First, read this page (including the small print at +the end). + +### Before you contribute +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. + +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews +All submissions, including submissions by project members, require review. + +### File headers +All files in the project must start with the following header. + + // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + +### The small print +Contributions made by corporations are covered by a different agreement than the +one above, the +[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/sse/LICENSE b/pkgs/sse/LICENSE new file mode 100644 index 000000000..f75d7c237 --- /dev/null +++ b/pkgs/sse/LICENSE @@ -0,0 +1,26 @@ +Copyright 2019, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/sse/README.md b/pkgs/sse/README.md new file mode 100644 index 000000000..33ea08f69 --- /dev/null +++ b/pkgs/sse/README.md @@ -0,0 +1,2 @@ +This package provides support for bi-directional communication through +Server Sent Events and corresponding POST requests. diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml new file mode 100644 index 000000000..b59f3bb72 --- /dev/null +++ b/pkgs/sse/analysis_options.yaml @@ -0,0 +1,82 @@ +analyzer: + strong-mode: + implicit-casts: false + errors: + dead_code: error + override_on_non_overriding_method: error + unused_element: error + unused_import: error + unused_local_variable: error +linter: + rules: + - always_declare_return_types + - annotate_overrides + - avoid_empty_else + - avoid_function_literals_in_foreach_calls + - avoid_init_to_null + - avoid_null_checks_in_equality_operators + - avoid_relative_lib_imports + - avoid_renaming_method_parameters + - avoid_return_types_on_setters + - avoid_returning_null + - avoid_types_as_parameter_names + - avoid_unused_constructor_parameters + - await_only_futures + - camel_case_types + - cancel_subscriptions + #- cascade_invocations + - comment_references + - constant_identifier_names + - control_flow_in_finally + - directives_ordering + - empty_catches + - empty_constructor_bodies + - empty_statements + - hash_and_equals + - implementation_imports + - invariant_booleans + - iterable_contains_unrelated_type + - library_names + - library_prefixes + - list_remove_unrelated_type + - literal_only_boolean_expressions + - no_adjacent_strings_in_list + - no_duplicate_case_values + - non_constant_identifier_names + - null_closures + - omit_local_variable_types + - only_throw_errors + - overridden_fields + - package_api_docs + - package_names + - package_prefixed_library_names + - prefer_adjacent_string_concatenation + - prefer_collection_literals + - prefer_conditional_assignment + - prefer_const_constructors + - prefer_contains + - prefer_equal_for_default_values + - prefer_final_fields + #- prefer_final_locals + - prefer_initializing_formals + - prefer_interpolation_to_compose_strings + - prefer_is_empty + - prefer_is_not_empty + - prefer_single_quotes + - prefer_typing_uninitialized_variables + - recursive_getters + - slash_for_doc_comments + - super_goes_last + - test_types_in_equals + - throw_in_finally + - type_init_formals + - unawaited_futures + - unnecessary_brace_in_string_interps + - unnecessary_getters_setters + - unnecessary_lambdas + - unnecessary_null_aware_assignments + - unnecessary_statements + - unnecessary_this + - unrelated_type_equality_checks + - use_rethrow_when_possible + - valid_regexps diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart new file mode 100644 index 000000000..02760fe8a --- /dev/null +++ b/pkgs/sse/lib/client/sse_client.dart @@ -0,0 +1,86 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:html'; + +import 'package:http/browser_client.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:uuid/uuid.dart'; + +/// A client for bi-directional sse communcation. +/// +/// The client can send any JSON-encodable messages to the server by adding +/// them to the [sink] and listen to messages from the server on the [stream]. +class SseClient extends StreamChannelMixin { + final _incomingController = new StreamController(); + + final _outgoingController = new StreamController(); + + final _client = new BrowserClient()..withCredentials = true; + + EventSource _eventSource; + + String _serverUrl; + + /// [serverUrl] is the URL under which the server is listening for + /// incoming bi-directional SSE connections. + SseClient(String serverUrl) { + var clientId = '${Uuid().v1()}'; + _eventSource = new EventSource('$serverUrl?sseClientId=$clientId', + withCredentials: true); + _serverUrl = '$serverUrl?sseClientId=$clientId'; + _outgoingController.stream + .listen(_onOutgoingMessage, onDone: _onOutgoingDone); + _eventSource.addEventListener('message', _onIncomingMessage); + _eventSource.addEventListener('control', _onIncomingControlMessage); + _eventSource.onError.listen(_incomingController.addError); + } + + Stream get onOpen => _eventSource.onOpen; + + /// Add messages to this [StreamSink] to send them to the server. + /// + /// The message added to the sink has to be JSON encodable. + @override + StreamSink get sink => _outgoingController.sink; + + /// [Stream] of messages sent from the server to this client. + /// + /// A message is a decoded JSON object. + @override + Stream get stream => _incomingController.stream; + + void close() { + _eventSource.close(); + _incomingController.close(); + _outgoingController.close(); + _client.close(); + } + + void _onIncomingControlMessage(Event message) { + var data = (message as MessageEvent).data; + if (data == 'close') { + close(); + } else { + throw new UnsupportedError('Illegal Control Message "$data"'); + } + } + + void _onIncomingMessage(Event message) { + var decoded = + jsonDecode((message as MessageEvent).data as String) as String; + _incomingController.add(decoded); + } + + void _onOutgoingDone() { + close(); + } + + void _onOutgoingMessage(dynamic message) async { + var encoded = jsonEncode(message); + try { + await _client.post(_serverUrl, body: encoded); + } catch (_) { + // Ignore any error + } + } +} diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart new file mode 100644 index 000000000..de13554df --- /dev/null +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -0,0 +1,134 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:async/async.dart'; +import 'package:logging/logging.dart'; +import 'package:pedantic/pedantic.dart'; +import 'package:shelf/shelf.dart' as shelf; +import 'package:stream_channel/stream_channel.dart'; + +String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' + 'Content-Type: text/event-stream\r\n' + 'Cache-Control: no-cache\r\n' + 'Connection: keep-alive\r\n' + 'Access-Control-Allow-Credentials: true\r\n' + 'Access-Control-Allow-Origin: $origin\r\n' + '\r\n'; + +/// A bi-directional SSE connection between server and browser. +class SseConnection extends StreamChannelMixin { + final _incomingController = StreamController(); + final _outgoingController = StreamController(); + final _closeCompleter = Completer(); + final Sink _sink; + final String _clientId; + + SseConnection(this._sink, this._clientId) { + _outgoingController.stream.listen((data) { + if (!_closeCompleter.isCompleted) { + _sink.add('data: ${json.encode(data)}\n'); + _sink.add('\n'); + } + }); + } + + Future get onClose => _closeCompleter.future; + + /// + /// The message added to the sink has to be JSON encodable. + @override + StreamSink get sink => _outgoingController.sink; + +// Add messages to this [StreamSink] to send them to the server. + /// [Stream] of messages sent from the server to this client. + /// + /// A message is a decoded JSON object. + @override + Stream get stream => _incomingController.stream; + + void close() { + if (!_closeCompleter.isCompleted) _closeCompleter.complete(); + } +} + +/// [SseHandler] handles requests on a user defined path to create +/// two-way communications of JSON encodable data between server and clients. +/// +/// A server sends messages to a client through an SSE channel, while +/// a client sends message to a server through HTTP POST requests. +class SseHandler { + final _logger = Logger('SseHandler'); + final Uri _uri; + + final Set _connections = Set(); + + final _connectionController = StreamController(); + + SseHandler(this._uri); + + StreamQueue get connections => + StreamQueue(_connectionController.stream); + + shelf.Handler get handler => _handle; + + int get numberOfClients => _connections.length; + + shelf.Response _createSseConnection(shelf.Request req, String path) { + req.hijack((channel) async { + var sink = utf8.encoder.startChunkedConversion(channel.sink); + sink.add(_sseHeaders(req.headers['origin'])); + var clientId = req.url.queryParameters['sseClientId']; + var connection = SseConnection(sink, clientId); + _connections.add(connection); + unawaited(connection.onClose.then((_) { + _connections.remove(connection); + })); + channel.stream.listen((_) { + // SSE is unidirectional. Responses are handled through POST requests. + }, onDone: () { + connection.close(); + }); + _connectionController.add(connection); + }); + return null; + } + + String _getOriginalPath(shelf.Request req) => req.requestedUri.path; + + Future _handle(shelf.Request req) async { + var path = _getOriginalPath(req); + if (_uri.path != path) { + return shelf.Response.notFound(''); + } + + if (req.headers['accept'] == 'text/event-stream' && req.method == 'GET') { + return _createSseConnection(req, path); + } + + if (req.headers['accept'] != 'text/event-stream' && req.method == 'POST') { + return _handleIncomingMessage(req, path); + } + + return shelf.Response.notFound(''); + } + + Future _handleIncomingMessage( + shelf.Request req, String path) async { + try { + var clientId = req.url.queryParameters['sseClientId']; + var message = await req.readAsString(); + var jsonObject = json.decode(message) as String; + for (var connection in _connections) { + if (connection._clientId == clientId) { + connection._incomingController.add(jsonObject); + } + } + } catch (e, st) { + _logger.fine('Failed to handle incoming message. $e $st'); + } + return shelf.Response.ok('', headers: { + 'access-control-allow-credentials': 'true', + 'access-control-allow-origin': req.headers['origin'] + }); + } +} diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml new file mode 100644 index 000000000..13c8db349 --- /dev/null +++ b/pkgs/sse/pubspec.yaml @@ -0,0 +1,25 @@ +name: sse +version: 0.0.1 +author: Dart Team +homepage: https://github.com/dart-lang/sse +description: >- + Provides client and server functionality for setting up bi-directional + communication through Server Sent Events (SSE) and corresponding POST + requests. + +environment: + sdk: ">=2.0.0-dev.64.1 <3.0.0" + +dependencies: + async: ^2.0.8 + http: ^0.12.0+1 + logging: ^0.11.3+2 + pedantic: ^1.4.0 + stream_channel: ^1.6.8 + shelf: ^0.7.4 + uuid: ^1.0.3 + +dev_dependencies: + shelf_static: ^0.2.8 + test: ^1.5.3 + webdriver: ^2.0.0 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart new file mode 100644 index 000000000..b5986650a --- /dev/null +++ b/pkgs/sse/test/sse_test.dart @@ -0,0 +1,100 @@ +@TestOn('vm') +import 'dart:async'; +import 'dart:io'; + +import 'package:shelf/shelf.dart' as shelf; +import 'package:shelf/shelf_io.dart' as io; +import 'package:shelf_static/shelf_static.dart'; +import 'package:sse/server/sse_handler.dart'; +import 'package:test/test.dart'; +import 'package:webdriver/io.dart'; + +void main() { + HttpServer server; + WebDriver webdriver; + SseHandler handler; + + setUp(() async { + handler = SseHandler(Uri.parse('/test')); + + var cascade = new shelf.Cascade() + .add(handler.handler) + .add(_faviconHandler) + .add(createStaticHandler('test/web', + listDirectories: true, defaultDocument: 'index.html')); + + server = await io.serve(cascade.handler, 'localhost', 0); + webdriver = await createDriver(); + }); + + tearDown(() async { + await webdriver.quit(); + await server.close(); + }); + + test('Can round trip messages', () async { + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + connection.sink.add('blah'); + expect(await connection.stream.first, 'blah'); + }); + + test('Multiple clients can connect', () async { + var connections = await handler.connections; + await webdriver.get('http://localhost:${server.port}'); + await connections.next; + await webdriver.get('http://localhost:${server.port}'); + await connections.next; + }); + + test('Routes data correctly', () async { + var connections = await handler.connections; + await webdriver.get('http://localhost:${server.port}'); + var connectionA = await connections.next; + await webdriver.get('http://localhost:${server.port}'); + var connectionB = await connections.next; + + connectionA.sink.add('foo'); + connectionB.sink.add('bar'); + await connectionA.onClose; + expect(await connectionB.stream.first, 'bar'); + }); + + test('Can close from the server', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + connection.close(); + await connection.onClose; + expect(handler.numberOfClients, 0); + }); + + test('Can close from the client-side', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + var closeButton = await webdriver.findElement(const By.tagName('button')); + await closeButton.click(); + + await connection.onClose; + expect(handler.numberOfClients, 0); + }); + + test('Disconnects when navigating away', () async { + await webdriver.get('http://localhost:${server.port}'); + expect(handler.numberOfClients, 1); + + await webdriver.get('chrome://version/'); + expect(handler.numberOfClients, 0); + }); +} + +FutureOr _faviconHandler(shelf.Request request) { + if (request.url.path.endsWith('favicon.ico')) { + return new shelf.Response.ok(''); + } + return new shelf.Response.notFound(''); +} diff --git a/pkgs/sse/test/web/index.dart b/pkgs/sse/test/web/index.dart new file mode 100644 index 000000000..dd949ca4f --- /dev/null +++ b/pkgs/sse/test/web/index.dart @@ -0,0 +1,15 @@ +import 'dart:html'; + +import 'package:sse/client/sse_client.dart'; + +main() { + var channel = SseClient('/test'); + + document.querySelector('button').onClick.listen((_) { + channel.sink.close(); + }); + + channel.stream.listen((s) { + channel.sink.add(s); + }); +} diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js new file mode 100644 index 000000000..fd3064cb3 --- /dev/null +++ b/pkgs/sse/test/web/index.dart.js @@ -0,0 +1,6539 @@ +(function(){var supportsDirectProtoAccess=function(){var z=function(){} +z.prototype={p:{}} +var y=new z() +if(!(y.__proto__&&y.__proto__.p===z.prototype.p))return false +try{if(typeof navigator!="undefined"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Chrome/")>=0)return true +if(typeof version=="function"&&version.length==0){var x=version() +if(/^\d+\.\d+\.\d+\.\d+$/.test(x))return true}}catch(w){}return false}() +function map(a){a=Object.create(null) +a.x=0 +delete a.x +return a}var A=map() +var B=map() +var C=map() +var D=map() +var E=map() +var F=map() +var G=map() +var H=map() +var J=map() +var K=map() +var L=map() +var M=map() +var N=map() +var O=map() +var P=map() +var Q=map() +var R=map() +var S=map() +var T=map() +var U=map() +var V=map() +var W=map() +var X=map() +var Y=map() +var Z=map() +function I(){}init() +function setupProgram(a,b,c){"use strict" +function generateAccessor(b0,b1,b2){var g=b0.split("-") +var f=g[0] +var e=f.length +var d=f.charCodeAt(e-1) +var a0 +if(g.length>1)a0=true +else a0=false +d=d>=60&&d<=64?d-59:d>=123&&d<=126?d-117:d>=37&&d<=43?d-27:0 +if(d){var a1=d&3 +var a2=d>>2 +var a3=f=f.substring(0,e-1) +var a4=f.indexOf(":") +if(a4>0){a3=f.substring(0,a4) +f=f.substring(a4+1)}if(a1){var a5=a1&2?"r":"" +var a6=a1&1?"this":"r" +var a7="return "+a6+"."+f +var a8=b2+".prototype.g"+a3+"=" +var a9="function("+a5+"){"+a7+"}" +if(a0)b1.push(a8+"$reflectable("+a9+");\n") +else b1.push(a8+a9+";\n")}if(a2){var a5=a2&2?"r,v":"v" +var a6=a2&1?"this":"r" +var a7=a6+"."+f+"=v" +var a8=b2+".prototype.s"+a3+"=" +var a9="function("+a5+"){"+a7+"}" +if(a0)b1.push(a8+"$reflectable("+a9+");\n") +else b1.push(a8+a9+";\n")}}return f}function defineClass(a4,a5){var g=[] +var f="function "+a4+"(" +var e="",d="" +for(var a0=0;a00){var a7=a6.split("+") +a6=a7[0] +var a8=a7[1] +finishClass(a8) +var a9=g[a8] +var b0=a9.prototype +var b1=g[c2].prototype +var b2=Object.keys(b0) +for(var b3=0;b3")addStubs(g,a1,d,false,[])}convertToFastObject(g) +g=g.__proto__ +g.$deferredAction()}function mixinDeferredActionHelper(d,e){var g +if(e.hasOwnProperty("$deferredAction"))g=e.$deferredAction +return function foo(){if(!supportsDirectProtoAccess)return +var f=this +while(!f.hasOwnProperty("$deferredAction"))f=f.__proto__ +if(g)f.$deferredAction=g +else{delete f.$deferredAction +convertToFastObject(f)}d.$deferredAction() +f.$deferredAction()}}function processClassData(b2,b3,b4){b3=convertToSlowObject(b3) +var g +var f=Object.keys(b3) +var e=false +var d=supportsDirectProtoAccess&&b2!="b" +for(var a0=0;a00)b3[g].$reflectable=a3}else if(a2===42){b3[g].$D=b3[a1] +var a4=b3.$methodsWithOptionalArguments +if(!a4)b3.$methodsWithOptionalArguments=a4={} +a4[a1]=g}else{var a5=b3[a1] +if(a1!=="^"&&a5!=null&&a5.constructor===Array&&a1!=="<>")if(d)e=true +else addStubs(b3,a5,a1,false,[]) +else g=a1}}if(e)b3.$deferredAction=finishAddStubsHelper +var a6=b3["^"],a7,a8,a9=a6 +var b0=a9.split(";") +a9=b0[1]?b0[1].split(","):[] +a8=b0[0] +a7=a8.split(":") +if(a7.length==2){a8=a7[0] +var b1=a7[1] +if(b1)b3.$S=function(b5){return function(){return init.types[b5]}}(b1)}if(a8)b4.pending[b2]=a8 +b4.combinedConstructorFunction+=defineClass(b2,a9) +b4.constructorsList.push(b2) +b4.collected[b2]=[m,b3] +i.push(b2)}function processStatics(a4,a5){var g=Object.keys(a4) +for(var f=0;f0)a4[a1].$reflectable=a2 +if(d&&d.length)init.typeInformation[a1]=d}else if(a0===42){m[a1].$D=d +var a3=a4.$methodsWithOptionalArguments +if(!a3)a4.$methodsWithOptionalArguments=a3={} +a3[e]=a1}else if(typeof d==="function"){m[a1=e]=d +h.push(e)}else if(d.constructor===Array)addStubs(m,d,e,true,h) +else{a1=e +processClassData(e,d,a5)}}}function addStubs(b6,b7,b8,b9,c0){var g=0,f=g,e=b7[g],d +if(typeof e=="string")d=b7[++g] +else{d=e +e=b8}if(typeof d=="number"){f=d +d=b7[++g]}b6[b8]=b6[e]=d +var a0=[d] +d.$stubName=b8 +c0.push(b8) +for(g++;g>1 +var a5=a3>>1 +var a6=(a3&1)===1 +var a7=a3===3 +var a8=a3===1 +var a9=b7[1] +var b0=a9>>1 +var b1=(a9&1)===1 +var b2=a5+b0 +var b3=b7[2] +if(typeof b3=="number")b7[2]=b3+c +if(b>0){var b4=3 +for(var a1=0;a1=z)throw H.a(P.aH(b,null,null)) +return a.splice(b,1)[0]}, +cK:function(a,b,c){var z +H.n(c,H.i(a,0)) +if(!!a.fixed$length)H.t(P.A("insert")) +z=a.length +if(b>z)throw H.a(P.aH(b,null,null)) +a.splice(b,0,c)}, +bN:function(a,b,c){var z,y,x +H.l(c,"$ip",[H.i(a,0)],"$ap") +if(!!a.fixed$length)H.t(P.A("insertAll")) +P.dJ(b,0,a.length,"index",null) +z=J.q(c) +if(!z.$iI)c=z.b7(c) +y=J.T(c) +this.si(a,a.length+y) +x=b+y +this.az(a,x,a.length,a,b) +this.a9(a,b,x,c)}, +aK:function(a){if(!!a.fixed$length)H.t(P.A("removeLast")) +if(a.length===0)throw H.a(H.aa(a,-1)) +return a.pop()}, +I:function(a,b){var z,y +H.j(b,{func:1,ret:-1,args:[H.i(a,0)]}) +z=a.length +for(y=0;y=a.length)return H.k(a,b) +return a[b]}, +aa:function(a,b,c){if(b<0||b>a.length)throw H.a(P.z(b,0,a.length,"start",null)) +if(ca.length)throw H.a(P.z(c,b,a.length,"end",null)) +if(b===c)return H.o([],[H.i(a,0)]) +return H.o(a.slice(b,c),[H.i(a,0)])}, +gal:function(a){if(a.length>0)return a[0] +throw H.a(H.ch())}, +ga7:function(a){var z=a.length +if(z>0)return a[z-1] +throw H.a(H.ch())}, +az:function(a,b,c,d,e){var z,y,x,w,v,u +z=H.i(a,0) +H.l(d,"$ip",[z],"$ap") +if(!!a.immutable$list)H.t(P.A("setRange")) +P.a8(b,c,a.length,null,null,null) +y=c-b +if(y===0)return +x=J.q(d) +if(!!x.$if){H.l(d,"$if",[z],"$af") +w=e +v=d}else{v=x.a_(d,e).a8(0,!1) +w=0}z=J.a0(v) +if(w+y>z.gi(v))throw H.a(H.dq()) +if(w=0;--u)a[b+u]=z.j(v,w+u) +else for(u=0;u=a.length||b<0)throw H.a(H.aa(a,b)) +return a[b]}, +l:function(a,b,c){H.w(b) +H.n(c,H.i(a,0)) +if(!!a.immutable$list)H.t(P.A("indexed set")) +if(typeof b!=="number"||Math.floor(b)!==b)throw H.a(H.aa(a,b)) +if(b>=a.length||b<0)throw H.a(H.aa(a,b)) +a[b]=c}, +t:function(a,b){var z,y +z=[H.i(a,0)] +H.l(b,"$if",z,"$af") +y=C.c.t(a.length,b.gi(b)) +z=H.o([],z) +this.si(z,y) +this.a9(z,0,a.length,a) +this.a9(z,a.length,y,b) +return z}, +$iaU:1, +$aaU:I.aB, +$iI:1, +$ip:1, +$if:1, +p:{ +hN:function(a,b){if(a<0||a>4294967295)throw H.a(P.z(a,0,4294967295,"length",null)) +return J.dr(new Array(a),b)}, +dr:function(a,b){return J.bD(H.o(a,[b]))}, +bD:function(a){H.bu(a) +a.fixed$length=Array +return a}}}, +m3:{"^":"at;$ti"}, +c3:{"^":"b;a,b,c,0d,$ti", +scg:function(a){this.d=H.n(a,H.i(this,0))}, +gB:function(){return this.d}, +q:function(){var z,y,x +z=this.a +y=z.length +if(this.b!==y)throw H.a(H.c0(z)) +x=this.c +if(x>=y){this.scg(null) +return!1}this.scg(z[x]);++this.c +return!0}, +$iY:1}, +be:{"^":"V;", +f_:function(a){var z +if(a>=-2147483648&&a<=2147483647)return a|0 +if(isFinite(a)){z=a<0?Math.ceil(a):Math.floor(a) +return z+0}throw H.a(P.A(""+a+".toInt()"))}, +eu:function(a){var z,y +if(a>=0){if(a<=2147483647)return a|0}else if(a>=-2147483648){z=a|0 +return a===z?z:z-1}y=Math.floor(a) +if(isFinite(y))return y +throw H.a(P.A(""+a+".floor()"))}, +aq:function(a,b){var z,y,x,w +if(b<2||b>36)throw H.a(P.z(b,2,36,"radix",null)) +z=a.toString(b) +if(C.a.v(z,z.length-1)!==41)return z +y=/^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(z) +if(y==null)H.t(P.A("Unexpected toString result: "+z)) +x=y.length +if(1>=x)return H.k(y,1) +z=y[1] +if(3>=x)return H.k(y,3) +w=+y[3] +x=y[2] +if(x!=null){z+=x +w-=x.length}return z+C.a.U("0",w)}, +h:function(a){if(a===0&&1/a<0)return"-0.0" +else return""+a}, +gA:function(a){return a&0x1FFFFFFF}, +t:function(a,b){H.lP(b) +if(typeof b!=="number")throw H.a(H.O(b)) +return a+b}, +V:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) +return a-b}, +aQ:function(a,b){var z=a%b +if(z===0)return 0 +if(z>0)return z +if(b<0)return z-b +else return z+b}, +by:function(a,b){return(a|0)===a?a/b|0:this.e0(a,b)}, +e0:function(a,b){var z=a/b +if(z>=-2147483648&&z<=2147483647)return z|0 +if(z>0){if(z!==1/0)return Math.floor(z)}else if(z>-1/0)return Math.ceil(z) +throw H.a(P.A("Result of truncating division is "+H.e(z)+": "+H.e(a)+" ~/ "+b))}, +W:function(a,b){var z +if(a>0)z=this.cu(a,b) +else{z=b>31?31:b +z=a>>z>>>0}return z}, +dX:function(a,b){if(b<0)throw H.a(H.O(b)) +return this.cu(a,b)}, +cu:function(a,b){return b>31?0:a>>>b}, +D:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) +return ab}, +aO:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) +return a>=b}, +$ib4:1, +$id1:1}, +ds:{"^":"be;",$ic:1}, +hP:{"^":"be;"}, +bf:{"^":"V;", +v:function(a,b){if(b<0)throw H.a(H.aa(a,b)) +if(b>=a.length)H.t(H.aa(a,b)) +return a.charCodeAt(b)}, +n:function(a,b){if(b>=a.length)throw H.a(H.aa(a,b)) +return a.charCodeAt(b)}, +bD:function(a,b,c){if(c>b.length)throw H.a(P.z(c,0,b.length,null,null)) +return new H.kw(b,a,c)}, +bC:function(a,b){return this.bD(a,b,0)}, +at:function(a,b,c){var z,y +if(c<0||c>b.length)throw H.a(P.z(c,0,b.length,null,null)) +z=a.length +if(c+z>b.length)return +for(y=0;yy)return!1 +return b===this.F(a,y-z)}, +ap:function(a,b,c,d){if(typeof b!=="number"||Math.floor(b)!==b)H.t(H.O(b)) +c=P.a8(b,c,a.length,null,null,null) +return H.f_(a,b,c,d)}, +H:function(a,b,c){var z +if(typeof c!=="number"||Math.floor(c)!==c)H.t(H.O(c)) +if(typeof c!=="number")return c.D() +if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) +z=c+b.length +if(z>a.length)return!1 +return b===a.substring(c,z)}, +N:function(a,b){return this.H(a,b,0)}, +k:function(a,b,c){if(typeof b!=="number"||Math.floor(b)!==b)H.t(H.O(b)) +if(c==null)c=a.length +if(typeof b!=="number")return b.D() +if(b<0)throw H.a(P.aH(b,null,null)) +if(b>c)throw H.a(P.aH(b,null,null)) +if(c>a.length)throw H.a(P.aH(c,null,null)) +return a.substring(b,c)}, +F:function(a,b){return this.k(a,b,null)}, +U:function(a,b){var z,y +if(0>=b)return"" +if(b===1||a.length===0)return a +if(b!==b>>>0)throw H.a(C.L) +for(z=a,y="";!0;){if((b&1)===1)y=z+y +b=b>>>1 +if(b===0)break +z+=z}return y}, +eN:function(a,b,c){var z=b-a.length +if(z<=0)return a +return a+this.U(c,z)}, +eM:function(a,b){return this.eN(a,b," ")}, +am:function(a,b,c){var z +if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) +z=a.indexOf(b,c) +return z}, +bM:function(a,b){return this.am(a,b,0)}, +b4:function(a,b,c){var z,y +if(c==null)c=a.length +else if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) +z=b.length +y=a.length +if(c+z>y)c=y-z +return a.lastIndexOf(b,c)}, +cL:function(a,b){return this.b4(a,b,null)}, +el:function(a,b,c){if(c>a.length)throw H.a(P.z(c,0,a.length,null,null)) +return H.eY(a,b,c)}, +ar:function(a,b){return this.el(a,b,0)}, +h:function(a){return a}, +gA:function(a){var z,y,x +for(z=a.length,y=0,x=0;x>6}y=536870911&y+((67108863&y)<<3) +y^=y>>11 +return 536870911&y+((16383&y)<<15)}, +gi:function(a){return a.length}, +j:function(a,b){if(b>=a.length||!1)throw H.a(H.aa(a,b)) +return a[b]}, +$iaU:1, +$aaU:I.aB, +$icu:1, +$id:1}}],["","",,H,{"^":"", +bX:function(a){var z,y +z=a^48 +if(z<=9)return z +y=a|32 +if(97<=y&&y<=102)return y-87 +return-1}, +ch:function(){return new P.bl("No element")}, +dq:function(){return new P.bl("Too few elements")}, +aE:{"^":"jc;a", +gi:function(a){return this.a.length}, +j:function(a,b){return C.a.v(this.a,b)}, +$aI:function(){return[P.c]}, +$acA:function(){return[P.c]}, +$aa4:function(){return[P.c]}, +$ap:function(){return[P.c]}, +$af:function(){return[P.c]}}, +I:{"^":"p;$ti"}, +aG:{"^":"I;$ti", +gK:function(a){return new H.ak(this,this.gi(this),0,[H.v(this,"aG",0)])}, +gE:function(a){return this.gi(this)===0}, +b3:function(a,b){var z,y,x,w +z=this.gi(this) +if(b.length!==0){if(z===0)return"" +y=H.e(this.X(0,0)) +if(z!==this.gi(this))throw H.a(P.a3(this)) +for(x=y,w=1;wz)return z +return y}, +gdZ:function(){var z,y +z=J.T(this.a) +y=this.b +if(y>z)return z +return y}, +gi:function(a){var z,y,x +z=J.T(this.a) +y=this.b +if(y>=z)return 0 +x=this.c +if(x==null||x>=z)return z-y +if(typeof x!=="number")return x.V() +return x-y}, +X:function(a,b){var z,y +z=this.gdZ()+b +if(b>=0){y=this.gds() +if(typeof y!=="number")return H.E(y) +y=z>=y}else y=!0 +if(y)throw H.a(P.ce(b,this,"index",null,null)) +return J.d9(this.a,z)}, +a_:function(a,b){var z,y +z=this.b+b +y=this.c +if(y!=null&&z>=y)return new H.hl(this.$ti) +return H.ae(this.a,z,y,H.i(this,0))}, +eZ:function(a,b){var z,y,x +if(b<0)H.t(P.z(b,0,null,"count",null)) +z=this.c +y=this.b +x=y+b +if(z==null)return H.ae(this.a,y,x,H.i(this,0)) +else{if(zc)H.t(P.z(b,0,c,"start",null))}return new H.j5(a,b,c,[d])}}}, +ak:{"^":"b;a,b,c,0d,$ti", +sc5:function(a){this.d=H.n(a,H.i(this,0))}, +gB:function(){return this.d}, +q:function(){var z,y,x,w +z=this.a +y=J.a0(z) +x=y.gi(z) +if(this.b!==x)throw H.a(P.a3(z)) +w=this.c +if(w>=x){this.sc5(null) +return!1}this.sc5(y.X(z,w));++this.c +return!0}, +$iY:1}, +dC:{"^":"aG;a,b,$ti", +gi:function(a){return J.T(this.a)}, +X:function(a,b){return this.b.$1(J.d9(this.a,b))}, +$aI:function(a,b){return[b]}, +$aaG:function(a,b){return[b]}, +$ap:function(a,b){return[b]}}, +dV:{"^":"p;a,b,$ti", +gK:function(a){return new H.dW(J.bb(this.a),this.b,this.$ti)}}, +dW:{"^":"Y;a,b,$ti", +q:function(){var z,y +for(z=this.a,y=this.b;z.q();)if(y.$1(z.gB()))return!0 +return!1}, +gB:function(){return this.a.gB()}}, +cv:{"^":"p;a,b,$ti", +a_:function(a,b){return new H.cv(this.a,this.b+b,this.$ti)}, +gK:function(a){return new H.iI(J.bb(this.a),this.b,this.$ti)}, +p:{ +dK:function(a,b,c){H.l(a,"$ip",[c],"$ap") +if(!!J.q(a).$iI)return new H.dm(a,b,[c]) +return new H.cv(a,b,[c])}}}, +dm:{"^":"cv;a,b,$ti", +gi:function(a){var z=J.T(this.a)-this.b +if(z>=0)return z +return 0}, +a_:function(a,b){return new H.dm(this.a,this.b+b,this.$ti)}, +$iI:1}, +iI:{"^":"Y;a,b,$ti", +q:function(){var z,y +for(z=this.a,y=0;y=z.length)return H.k(z,3) +y=H.r(z[3]) +if(b==null){if(y!=null)return parseInt(a,10) +if(z[2]!=null)return parseInt(a,16) +return}if(b<2||b>36)throw H.a(P.z(b,2,36,"radix",null)) +if(b===10&&y!=null)return parseInt(a,10) +if(b<10||y==null){x=b<=10?47+b:86+b +w=z[1] +for(v=w.length,u=0;ux)return}return parseInt(a,b)}, +aX:function(a){return H.io(a)+H.cR(H.aq(a),0,null)}, +io:function(a){var z,y,x,w,v,u,t,s,r +z=J.q(a) +y=z.constructor +if(typeof y=="function"){x=y.name +w=typeof x==="string"?x:null}else w=null +v=w==null +if(v||z===C.Q||!!z.$ibm){u=C.y(a) +if(v)w=u +if(u==="Object"){t=a.constructor +if(typeof t=="function"){s=String(t).match(/^\s*function\s*([\w$]*)\s*\(/) +r=s==null?null:s[1] +if(typeof r==="string"&&/^\w+$/.test(r))w=r}}return w}w=w +return H.aR(w.length>1&&C.a.n(w,0)===36?C.a.F(w,1):w)}, +ip:function(){if(!!self.location)return self.location.href +return}, +dH:function(a){var z,y,x,w,v +z=a.length +if(z<=500)return String.fromCharCode.apply(null,a) +for(y="",x=0;x65535)return H.iy(a)}return H.dH(a)}, +iz:function(a,b,c){var z,y,x,w +if(c<=500&&b===0&&c===a.length)return String.fromCharCode.apply(null,a) +for(z=b,y="";z>>0,56320|z&1023)}}throw H.a(P.z(a,0,1114111,null,null))}, +W:function(a){if(a.date===void 0)a.date=new Date(a.a) +return a.date}, +iw:function(a){return a.b?H.W(a).getUTCFullYear()+0:H.W(a).getFullYear()+0}, +iu:function(a){return a.b?H.W(a).getUTCMonth()+1:H.W(a).getMonth()+1}, +iq:function(a){return a.b?H.W(a).getUTCDate()+0:H.W(a).getDate()+0}, +ir:function(a){return a.b?H.W(a).getUTCHours()+0:H.W(a).getHours()+0}, +it:function(a){return a.b?H.W(a).getUTCMinutes()+0:H.W(a).getMinutes()+0}, +iv:function(a){return a.b?H.W(a).getUTCSeconds()+0:H.W(a).getSeconds()+0}, +is:function(a){return a.b?H.W(a).getUTCMilliseconds()+0:H.W(a).getMilliseconds()+0}, +E:function(a){throw H.a(H.O(a))}, +k:function(a,b){if(a==null)J.T(a) +throw H.a(H.aa(a,b))}, +aa:function(a,b){var z,y +if(typeof b!=="number"||Math.floor(b)!==b)return new P.as(!0,b,"index",null) +z=H.w(J.T(a)) +if(!(b<0)){if(typeof z!=="number")return H.E(z) +y=b>=z}else y=!0 +if(y)return P.ce(b,a,"index",null,z) +return P.aH(b,"index",null)}, +lu:function(a,b,c){if(a<0||a>c)return new P.bi(0,c,!0,a,"start","Invalid value") +if(b!=null)if(bc)return new P.bi(a,c,!0,b,"end","Invalid value") +return new P.as(!0,b,"end",null)}, +O:function(a){return new P.as(!0,a,null,null)}, +a:function(a){var z +if(a==null)a=new P.bH() +z=new Error() +z.dartException=a +if("defineProperty" in Object){Object.defineProperty(z,"message",{get:H.f1}) +z.name=""}else z.toString=H.f1 +return z}, +f1:function(){return J.ar(this.dartException)}, +t:function(a){throw H.a(a)}, +c0:function(a){throw H.a(P.a3(a))}, +P:function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l +z=new H.lV(a) +if(a==null)return +if(a instanceof H.c9)return z.$1(a.a) +if(typeof a!=="object")return a +if("dartException" in a)return z.$1(a.dartException) +else if(!("message" in a))return a +y=a.message +if("number" in a&&typeof a.number=="number"){x=a.number +w=x&65535 +if((C.c.W(x,16)&8191)===10)switch(w){case 438:return z.$1(H.cl(H.e(y)+" (Error "+w+")",null)) +case 445:case 5007:return z.$1(H.dF(H.e(y)+" (Error "+w+")",null))}}if(a instanceof TypeError){v=$.f6() +u=$.f7() +t=$.f8() +s=$.f9() +r=$.fc() +q=$.fd() +p=$.fb() +$.fa() +o=$.ff() +n=$.fe() +m=v.a2(y) +if(m!=null)return z.$1(H.cl(H.r(y),m)) +else{m=u.a2(y) +if(m!=null){m.method="call" +return z.$1(H.cl(H.r(y),m))}else{m=t.a2(y) +if(m==null){m=s.a2(y) +if(m==null){m=r.a2(y) +if(m==null){m=q.a2(y) +if(m==null){m=p.a2(y) +if(m==null){m=s.a2(y) +if(m==null){m=o.a2(y) +if(m==null){m=n.a2(y) +l=m!=null}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0 +if(l)return z.$1(H.dF(H.r(y),m))}}return z.$1(new H.jb(typeof y==="string"?y:""))}if(a instanceof RangeError){if(typeof y==="string"&&y.indexOf("call stack")!==-1)return new P.dL() +y=function(b){try{return String(b)}catch(k){}return null}(a) +return z.$1(new P.as(!1,null,null,typeof y==="string"?y.replace(/^RangeError:\s*/,""):y))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof y==="string"&&y==="too much recursion")return new P.dL() +return a}, +a7:function(a){var z +if(a instanceof H.c9)return a.b +if(a==null)return new H.ee(a) +z=a.$cachedTrace +if(z!=null)return z +return a.$cachedTrace=new H.ee(a)}, +eV:function(a){if(a==null||typeof a!='object')return J.aD(a) +else return H.au(a)}, +lz:function(a,b){var z,y,x,w +z=a.length +for(y=0;y=27 +if(v)return H.h7(y,!w,z,b) +if(y===0){w=$.ab +if(typeof w!=="number")return w.t() +$.ab=w+1 +u="self"+w +w="return function(){var "+u+" = this." +v=$.aT +if(v==null){v=H.by("self") +$.aT=v}return new Function(w+H.e(v)+";return "+u+"."+H.e(z)+"();}")()}t="abcdefghijklmnopqrstuvwxyz".split("").splice(0,y).join(",") +w=$.ab +if(typeof w!=="number")return w.t() +$.ab=w+1 +t+=w +w="return function("+t+"){return this." +v=$.aT +if(v==null){v=H.by("self") +$.aT=v}return new Function(w+H.e(v)+"."+H.e(z)+"("+t+");}")()}, +h8:function(a,b,c,d){var z,y +z=H.c5 +y=H.df +switch(b?-1:a){case 0:throw H.a(H.iH("Intercepted function with no arguments.")) +case 1:return function(e,f,g){return function(){return f(this)[e](g(this))}}(c,z,y) +case 2:return function(e,f,g){return function(h){return f(this)[e](g(this),h)}}(c,z,y) +case 3:return function(e,f,g){return function(h,i){return f(this)[e](g(this),h,i)}}(c,z,y) +case 4:return function(e,f,g){return function(h,i,j){return f(this)[e](g(this),h,i,j)}}(c,z,y) +case 5:return function(e,f,g){return function(h,i,j,k){return f(this)[e](g(this),h,i,j,k)}}(c,z,y) +case 6:return function(e,f,g){return function(h,i,j,k,l){return f(this)[e](g(this),h,i,j,k,l)}}(c,z,y) +default:return function(e,f,g,h){return function(){h=[g(this)] +Array.prototype.push.apply(h,arguments) +return e.apply(f(this),h)}}(d,z,y)}}, +h9:function(a,b){var z,y,x,w,v,u,t,s +z=$.aT +if(z==null){z=H.by("self") +$.aT=z}y=$.de +if(y==null){y=H.by("receiver") +$.de=y}x=b.$stubName +w=b.length +v=a[x] +u=b==null?v==null:b===v +t=!u||w>=28 +if(t)return H.h8(w,!u,x,b) +if(w===1){z="return function(){return this."+H.e(z)+"."+H.e(x)+"(this."+H.e(y)+");" +y=$.ab +if(typeof y!=="number")return y.t() +$.ab=y+1 +return new Function(z+y+"}")()}s="abcdefghijklmnopqrstuvwxyz".split("").splice(0,w-1).join(",") +z="return function("+s+"){return this."+H.e(z)+"."+H.e(x)+"(this."+H.e(y)+", "+s+");" +y=$.ab +if(typeof y!=="number")return y.t() +$.ab=y+1 +return new Function(z+y+"}")()}, +cV:function(a,b,c,d,e,f,g){return H.ha(a,b,H.w(c),d,!!e,!!f,g)}, +r:function(a){if(a==null)return a +if(typeof a==="string")return a +throw H.a(H.a9(a,"String"))}, +lv:function(a){if(a==null)return a +if(typeof a==="number")return a +throw H.a(H.a9(a,"double"))}, +lP:function(a){if(a==null)return a +if(typeof a==="number")return a +throw H.a(H.a9(a,"num"))}, +mX:function(a){if(a==null)return a +if(typeof a==="boolean")return a +throw H.a(H.a9(a,"bool"))}, +w:function(a){if(a==null)return a +if(typeof a==="number"&&Math.floor(a)===a)return a +throw H.a(H.a9(a,"int"))}, +d2:function(a,b){throw H.a(H.a9(a,H.aR(H.r(b).substring(2))))}, +lQ:function(a,b){throw H.a(H.dh(a,H.aR(H.r(b).substring(2))))}, +m:function(a,b){if(a==null)return a +if((typeof a==="object"||typeof a==="function")&&J.q(a)[b])return a +H.d2(a,b)}, +d_:function(a,b){var z +if(a!=null)z=(typeof a==="object"||typeof a==="function")&&J.q(a)[b] +else z=!0 +if(z)return a +H.lQ(a,b)}, +n5:function(a,b){if(a==null)return a +if(typeof a==="string")return a +if(J.q(a)[b])return a +H.d2(a,b)}, +bu:function(a){if(a==null)return a +if(!!J.q(a).$if)return a +throw H.a(H.a9(a,"List"))}, +lJ:function(a,b){var z +if(a==null)return a +z=J.q(a) +if(!!z.$if)return a +if(z[b])return a +H.d2(a,b)}, +cW:function(a){var z +if("$S" in a){z=a.$S +if(typeof z=="number")return init.types[H.w(z)] +else return a.$S()}return}, +aC:function(a,b){var z +if(a==null)return!1 +if(typeof a=="function")return!0 +z=H.cW(J.q(a)) +if(z==null)return!1 +return H.ez(z,null,b,null)}, +j:function(a,b){var z,y +if(a==null)return a +if($.cO)return a +$.cO=!0 +try{if(H.aC(a,b))return a +z=H.b7(b) +y=H.a9(a,z) +throw H.a(y)}finally{$.cO=!1}}, +aO:function(a,b){if(a!=null&&!H.b3(a,b))H.t(H.a9(a,H.b7(b))) +return a}, +eI:function(a){var z,y +z=J.q(a) +if(!!z.$ih){y=H.cW(z) +if(y!=null)return H.b7(y) +return"Closure"}return H.aX(a)}, +lT:function(a){throw H.a(new P.hi(H.r(a)))}, +eP:function(a){return init.getIsolateTag(a)}, +o:function(a,b){a.$ti=b +return a}, +aq:function(a){if(a==null)return +return a.$ti}, +n0:function(a,b,c){return H.aQ(a["$a"+H.e(c)],H.aq(b))}, +b6:function(a,b,c,d){var z +H.r(c) +H.w(d) +z=H.aQ(a["$a"+H.e(c)],H.aq(b)) +return z==null?null:z[d]}, +v:function(a,b,c){var z +H.r(b) +H.w(c) +z=H.aQ(a["$a"+H.e(b)],H.aq(a)) +return z==null?null:z[c]}, +i:function(a,b){var z +H.w(b) +z=H.aq(a) +return z==null?null:z[b]}, +b7:function(a){return H.az(a,null)}, +az:function(a,b){var z,y +H.l(b,"$if",[P.d],"$af") +if(a==null)return"dynamic" +if(a===-1)return"void" +if(typeof a==="object"&&a!==null&&a.constructor===Array)return H.aR(a[0].builtin$cls)+H.cR(a,1,b) +if(typeof a=="function")return H.aR(a.builtin$cls) +if(a===-2)return"dynamic" +if(typeof a==="number"){H.w(a) +if(b==null||a<0||a>=b.length)return"unexpected-generic-index:"+a +z=b.length +y=z-a-1 +if(y<0||y>=z)return H.k(b,y) +return H.e(b[y])}if('func' in a)return H.l1(a,b) +if('futureOr' in a)return"FutureOr<"+H.az("type" in a?a.type:null,b)+">" +return"unknown-reified-type"}, +l1:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h +z=[P.d] +H.l(b,"$if",z,"$af") +if("bounds" in a){y=a.bounds +if(b==null){b=H.o([],z) +x=null}else x=b.length +w=b.length +for(v=y.length,u=v;u>0;--u)C.b.m(b,"T"+(w+u)) +for(t="<",s="",u=0;u "+p}, +cR:function(a,b,c){var z,y,x,w,v,u +H.l(c,"$if",[P.d],"$af") +if(a==null)return"" +z=new P.S("") +for(y=b,x="",w=!0,v="";y"}, +cY:function(a){var z,y,x,w +z=J.q(a) +if(!!z.$ih){y=H.cW(z) +if(y!=null)return y}x=z.constructor +if(a==null)return x +if(typeof a!="object")return x +w=H.aq(a) +if(w!=null){w=w.slice() +w.splice(0,0,x) +x=w}return x}, +aQ:function(a,b){if(a==null)return b +a=a.apply(null,b) +if(a==null)return +if(typeof a==="object"&&a!==null&&a.constructor===Array)return a +if(typeof a=="function")return a.apply(null,b) +return b}, +aN:function(a,b,c,d){var z,y +H.r(b) +H.bu(c) +H.r(d) +if(a==null)return!1 +z=H.aq(a) +y=J.q(a) +if(y[b]==null)return!1 +return H.eL(H.aQ(y[d],z),null,c,null)}, +l:function(a,b,c,d){H.r(b) +H.bu(c) +H.r(d) +if(a==null)return a +if(H.aN(a,b,c,d))return a +throw H.a(H.a9(a,function(e,f){return e.replace(/[^<,> ]+/g,function(g){return f[g]||g})}(H.aR(b.substring(2))+H.cR(c,0,null),init.mangledGlobalNames)))}, +eL:function(a,b,c,d){var z,y +if(c==null)return!0 +if(a==null){z=c.length +for(y=0;ys)return!1 +if(t+r=0 +else{z=J.q(b) +if(!!z.$idu){z=C.a.F(a,c) +return b.b.test(z)}else{z=z.bC(b,C.a.F(a,c)) +return!z.gE(z)}}}, +aP:function(a,b,c){var z,y,x +if(b==="")if(a==="")return c +else{z=a.length +for(y=c,x=0;x>2,x>>1,(x&1)===1,z[2])}}}, +j6:{"^":"b;a,b,c,d,e,f", +a2:function(a){var z,y,x +z=new RegExp(this.a).exec(a) +if(z==null)return +y=Object.create(null) +x=this.b +if(x!==-1)y.arguments=z[x+1] +x=this.c +if(x!==-1)y.argumentsExpr=z[x+1] +x=this.d +if(x!==-1)y.expr=z[x+1] +x=this.e +if(x!==-1)y.method=z[x+1] +x=this.f +if(x!==-1)y.receiver=z[x+1] +return y}, +p:{ +af:function(a){var z,y,x,w,v,u +a=a.replace(String({}),'$receiver$').replace(/[[\]{}()*+?.\\^$|]/g,"\\$&") +z=a.match(/\\\$[a-zA-Z]+\\\$/g) +if(z==null)z=H.o([],[P.d]) +y=z.indexOf("\\$arguments\\$") +x=z.indexOf("\\$argumentsExpr\\$") +w=z.indexOf("\\$expr\\$") +v=z.indexOf("\\$method\\$") +u=z.indexOf("\\$receiver\\$") +return new H.j6(a.replace(new RegExp('\\\\\\$arguments\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$','g'),'((?:x|[^x])*)'),y,x,w,v,u)}, +bN:function(a){return function($expr$){var $argumentsExpr$='$arguments$' +try{$expr$.$method$($argumentsExpr$)}catch(z){return z.message}}(a)}, +dR:function(a){return function($expr$){try{$expr$.$method$}catch(z){return z.message}}(a)}}}, +ig:{"^":"K;a,b", +h:function(a){var z=this.b +if(z==null)return"NoSuchMethodError: "+H.e(this.a) +return"NoSuchMethodError: method not found: '"+z+"' on null"}, +p:{ +dF:function(a,b){return new H.ig(a,b==null?null:b.method)}}}, +hR:{"^":"K;a,b,c", +h:function(a){var z,y +z=this.b +if(z==null)return"NoSuchMethodError: "+H.e(this.a) +y=this.c +if(y==null)return"NoSuchMethodError: method not found: '"+z+"' ("+H.e(this.a)+")" +return"NoSuchMethodError: method not found: '"+z+"' on '"+y+"' ("+H.e(this.a)+")"}, +p:{ +cl:function(a,b){var z,y +z=b==null +y=z?null:b.method +return new H.hR(a,y,z?null:b.receiver)}}}, +jb:{"^":"K;a", +h:function(a){var z=this.a +return z.length===0?"Error":"Error: "+z}}, +c9:{"^":"b;a,b"}, +lV:{"^":"h:3;a", +$1:function(a){if(!!J.q(a).$iK)if(a.$thrownJsError==null)a.$thrownJsError=this.a +return a}}, +ee:{"^":"b;a,0b", +h:function(a){var z,y +z=this.b +if(z!=null)return z +z=this.a +y=z!==null&&typeof z==="object"?z.stack:null +z=y==null?"":y +this.b=z +return z}, +$iD:1}, +h:{"^":"b;", +h:function(a){return"Closure '"+H.aX(this).trim()+"'"}, +gcX:function(){return this}, +$icc:1, +gcX:function(){return this}}, +dQ:{"^":"h;"}, +iS:{"^":"dQ;", +h:function(a){var z=this.$static_name +if(z==null)return"Closure of unknown static method" +return"Closure '"+H.aR(z)+"'"}}, +c4:{"^":"dQ;a,b,c,d", +J:function(a,b){if(b==null)return!1 +if(this===b)return!0 +if(!(b instanceof H.c4))return!1 +return this.a===b.a&&this.b===b.b&&this.c===b.c}, +gA:function(a){var z,y +z=this.c +if(z==null)y=H.au(this.a) +else y=typeof z!=="object"?J.aD(z):H.au(z) +return(y^H.au(this.b))>>>0}, +h:function(a){var z=this.c +if(z==null)z=this.a +return"Closure '"+H.e(this.d)+"' of "+("Instance of '"+H.aX(z)+"'")}, +p:{ +c5:function(a){return a.a}, +df:function(a){return a.c}, +by:function(a){var z,y,x,w,v +z=new H.c4("self","target","receiver","name") +y=J.bD(Object.getOwnPropertyNames(z)) +for(x=y.length,w=0;w", +h:function(a){return this.a}, +p:{ +a9:function(a,b){return new H.j7("TypeError: "+P.bd(a)+": type '"+H.eI(a)+"' is not a subtype of type '"+b+"'")}}}, +h6:{"^":"K;S:a>", +h:function(a){return this.a}, +p:{ +dh:function(a,b){return new H.h6("CastError: "+P.bd(a)+": type '"+H.eI(a)+"' is not a subtype of type '"+b+"'")}}}, +iG:{"^":"K;S:a>", +h:function(a){return"RuntimeError: "+H.e(this.a)}, +p:{ +iH:function(a){return new H.iG(a)}}}, +bO:{"^":"b;a,0b,0c,0d", +gb0:function(){var z=this.b +if(z==null){z=H.b7(this.a) +this.b=z}return z}, +h:function(a){return this.gb0()}, +gA:function(a){var z=this.d +if(z==null){z=C.a.gA(this.gb0()) +this.d=z}return z}, +J:function(a,b){if(b==null)return!1 +return b instanceof H.bO&&this.gb0()===b.gb0()}}, +aj:{"^":"dB;a,0b,0c,0d,0e,0f,r,$ti", +gi:function(a){return this.a}, +gE:function(a){return this.a===0}, +gan:function(){return new H.hZ(this,[H.i(this,0)])}, +ac:function(a){var z,y +if(typeof a==="string"){z=this.b +if(z==null)return!1 +return this.cf(z,a)}else if(typeof a==="number"&&(a&0x3ffffff)===a){y=this.c +if(y==null)return!1 +return this.cf(y,a)}else return this.ey(a)}, +ey:["d6",function(a){var z=this.d +if(z==null)return!1 +return this.aH(this.bo(z,this.aG(a)),a)>=0}], +bB:function(a,b){H.l(b,"$iR",this.$ti,"$aR").I(0,new H.hQ(this))}, +j:function(a,b){var z,y,x,w +if(typeof b==="string"){z=this.b +if(z==null)return +y=this.aU(z,b) +x=y==null?null:y.b +return x}else if(typeof b==="number"&&(b&0x3ffffff)===b){w=this.c +if(w==null)return +y=this.aU(w,b) +x=y==null?null:y.b +return x}else return this.ez(b)}, +ez:["d7",function(a){var z,y,x +z=this.d +if(z==null)return +y=this.bo(z,this.aG(a)) +x=this.aH(y,a) +if(x<0)return +return y[x].b}], +l:function(a,b,c){var z,y +H.n(b,H.i(this,0)) +H.n(c,H.i(this,1)) +if(typeof b==="string"){z=this.b +if(z==null){z=this.bt() +this.b=z}this.c7(z,b,c)}else if(typeof b==="number"&&(b&0x3ffffff)===b){y=this.c +if(y==null){y=this.bt() +this.c=y}this.c7(y,b,c)}else this.eA(b,c)}, +eA:["d8",function(a,b){var z,y,x,w +H.n(a,H.i(this,0)) +H.n(b,H.i(this,1)) +z=this.d +if(z==null){z=this.bt() +this.d=z}y=this.aG(a) +x=this.bo(z,y) +if(x==null)this.bw(z,y,[this.bu(a,b)]) +else{w=this.aH(x,a) +if(w>=0)x[w].b=b +else x.push(this.bu(a,b))}}], +I:function(a,b){var z,y +H.j(b,{func:1,ret:-1,args:[H.i(this,0),H.i(this,1)]}) +z=this.e +y=this.r +for(;z!=null;){b.$2(z.a,z.b) +if(y!==this.r)throw H.a(P.a3(this)) +z=z.c}}, +c7:function(a,b,c){var z +H.n(b,H.i(this,0)) +H.n(c,H.i(this,1)) +z=this.aU(a,b) +if(z==null)this.bw(a,b,this.bu(b,c)) +else z.b=c}, +bu:function(a,b){var z,y +z=new H.hY(H.n(a,H.i(this,0)),H.n(b,H.i(this,1))) +if(this.e==null){this.f=z +this.e=z}else{y=this.f +z.d=y +y.c=z +this.f=z}++this.a +this.r=this.r+1&67108863 +return z}, +aG:function(a){return J.aD(a)&0x3ffffff}, +aH:function(a,b){var z,y +if(a==null)return-1 +z=a.length +for(y=0;y",z) +this.dr(z,"") +return z}, +$idx:1}, +hQ:{"^":"h;a", +$2:function(a,b){var z=this.a +z.l(0,H.n(a,H.i(z,0)),H.n(b,H.i(z,1)))}, +$S:function(){var z=this.a +return{func:1,ret:P.x,args:[H.i(z,0),H.i(z,1)]}}}, +hY:{"^":"b;a,b,0c,0d"}, +hZ:{"^":"I;a,$ti", +gi:function(a){return this.a.a}, +gE:function(a){return this.a.a===0}, +gK:function(a){var z,y +z=this.a +y=new H.i_(z,z.r,this.$ti) +y.c=z.e +return y}}, +i_:{"^":"b;a,b,0c,0d,$ti", +sc6:function(a){this.d=H.n(a,H.i(this,0))}, +gB:function(){return this.d}, +q:function(){var z=this.a +if(this.b!==z.r)throw H.a(P.a3(z)) +else{z=this.c +if(z==null){this.sc6(null) +return!1}else{this.sc6(z.a) +this.c=this.c.c +return!0}}}, +$iY:1}, +lD:{"^":"h:3;a", +$1:function(a){return this.a(a)}}, +lE:{"^":"h:37;a", +$2:function(a,b){return this.a(a,b)}}, +lF:{"^":"h:25;a", +$1:function(a){return this.a(H.r(a))}}, +du:{"^":"b;a,b,0c,0d", +h:function(a){return"RegExp/"+this.a+"/"}, +gdH:function(){var z=this.c +if(z!=null)return z +z=this.b +z=H.ci(this.a,z.multiline,!z.ignoreCase,!0) +this.c=z +return z}, +gdG:function(){var z=this.d +if(z!=null)return z +z=this.b +z=H.ci(this.a+"|()",z.multiline,!z.ignoreCase,!0) +this.d=z +return z}, +bD:function(a,b,c){if(c>b.length)throw H.a(P.z(c,0,b.length,null,null)) +return new H.jz(this,b,c)}, +bC:function(a,b){return this.bD(a,b,0)}, +du:function(a,b){var z,y +z=this.gdH() +z.lastIndex=b +y=z.exec(a) +if(y==null)return +return new H.e9(this,y)}, +dt:function(a,b){var z,y +z=this.gdG() +z.lastIndex=b +y=z.exec(a) +if(y==null)return +if(0>=y.length)return H.k(y,-1) +if(y.pop()!=null)return +return new H.e9(this,y)}, +at:function(a,b,c){if(c<0||c>b.length)throw H.a(P.z(c,0,b.length,null,null)) +return this.dt(b,c)}, +$icu:1, +$iiC:1, +p:{ +ci:function(a,b,c,d){var z,y,x,w +z=b?"m":"" +y=c?"":"i" +x=d?"g":"" +w=function(e,f){try{return new RegExp(e,f)}catch(v){return v}}(a,z+y+x) +if(w instanceof RegExp)return w +throw H.a(P.C("Illegal RegExp pattern ("+String(w)+")",a,null))}}}, +e9:{"^":"b;a,b", +gu:function(){var z=this.b +return z.index+z[0].length}, +j:function(a,b){var z=this.b +if(b>=z.length)return H.k(z,b) +return z[b]}, +$iac:1}, +jz:{"^":"hL;a,b,c", +gK:function(a){return new H.dX(this.a,this.b,this.c)}, +$ap:function(){return[P.ac]}}, +dX:{"^":"b;a,b,c,0d", +gB:function(){return this.d}, +q:function(){var z,y,x,w +z=this.b +if(z==null)return!1 +y=this.c +if(y<=z.length){x=this.a.du(z,y) +if(x!=null){this.d=x +w=x.gu() +this.c=x.b.index===w?w+1:w +return!0}}this.d=null +this.b=null +return!1}, +$iY:1, +$aY:function(){return[P.ac]}}, +dP:{"^":"b;a,b,c", +gu:function(){return this.a+this.c.length}, +j:function(a,b){if(b!==0)H.t(P.aH(b,null,null)) +return this.c}, +$iac:1}, +kw:{"^":"p;a,b,c", +gK:function(a){return new H.kx(this.a,this.b,this.c)}, +$ap:function(){return[P.ac]}}, +kx:{"^":"b;a,b,c,0d", +q:function(){var z,y,x,w,v,u,t +z=this.c +y=this.b +x=y.length +w=this.a +v=w.length +if(z+x>v){this.d=null +return!1}u=w.indexOf(y,z) +if(u<0){this.c=v+1 +this.d=null +return!1}t=u+x +this.d=new H.dP(u,w,y) +this.c=t===this.c?t+1:t +return!0}, +gB:function(){return this.d}, +$iY:1, +$aY:function(){return[P.ac]}}}],["","",,H,{"^":"", +ly:function(a){return J.dr(a?Object.keys(a):[],null)}}],["","",,H,{"^":"", +bU:function(a){var z,y,x +z=J.q(a) +if(!!z.$iaU)return a +y=new Array(z.gi(a)) +y.fixed$length=Array +for(x=0;x>>0!==a||a>=c)throw H.a(H.aa(b,a))}, +ew:function(a,b,c){var z +if(!(a>>>0!==a))z=b>>>0!==b||a>b||b>c +else z=!0 +if(z)throw H.a(H.lu(a,b,c)) +return b}, +m6:{"^":"V;",$ifW:1,"%":"ArrayBuffer"}, +id:{"^":"V;", +dC:function(a,b,c,d){var z=P.z(b,0,c,d,null) +throw H.a(z)}, +c9:function(a,b,c,d){if(b>>>0!==b||b>c)this.dC(a,b,c,d)}, +$idS:1, +"%":"DataView;ArrayBufferView;cs|ea|eb|ic|ec|ed|al"}, +cs:{"^":"id;", +gi:function(a){return a.length}, +dW:function(a,b,c,d,e){var z,y,x +z=a.length +this.c9(a,b,z,"start") +this.c9(a,c,z,"end") +if(b>c)throw H.a(P.z(b,0,c,null,null)) +y=c-b +x=d.length +if(x-e=4){y=b.aW() +b.a=a.a +b.c=a.c +P.aJ(b,y)}else{y=H.m(b.c,"$iaw") +b.a=2 +b.c=a +a.cs(y)}}, +aJ:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m +z={} +z.a=a +for(y=a;!0;){x={} +w=y.a===8 +if(b==null){if(w){v=H.m(y.c,"$ia2") +y=y.b +u=v.a +t=v.b +y.toString +P.b2(null,null,y,u,t)}return}for(;s=b.a,s!=null;b=s){b.a=null +P.aJ(z.a,b)}y=z.a +r=y.c +x.a=w +x.b=r +u=!w +if(u){t=b.c +t=(t&1)!==0||t===8}else t=!0 +if(t){t=b.b +q=t.b +if(w){p=y.b +p.toString +p=p==q +if(!p)q.toString +else p=!0 +p=!p}else p=!1 +if(p){H.m(r,"$ia2") +y=y.b +u=r.a +t=r.b +y.toString +P.b2(null,null,y,u,t) +return}o=$.u +if(o!=q)$.u=q +else o=null +y=b.c +if(y===8)new P.k4(z,x,b,w).$0() +else if(u){if((y&1)!==0)new P.k3(x,b,r).$0()}else if((y&2)!==0)new P.k2(z,x,b).$0() +if(o!=null)$.u=o +y=x.b +if(!!J.q(y).$iX){if(y.a>=4){n=H.m(t.c,"$iaw") +t.c=null +b=t.aX(n) +t.a=y.a +t.c=y.c +z.a=y +continue}else P.bR(y,t) +return}}m=b.b +n=H.m(m.c,"$iaw") +m.c=null +b=m.aX(n) +y=x.a +u=x.b +if(!y){H.n(u,H.i(m,0)) +m.a=4 +m.c=u}else{H.m(u,"$ia2") +m.a=8 +m.c=u}z.a=m +y=m}}}}, +jV:{"^":"h:0;a,b", +$0:function(){P.aJ(this.a,this.b)}}, +k1:{"^":"h:0;a,b", +$0:function(){P.aJ(this.b,this.a.a)}}, +jY:{"^":"h:12;a", +$1:function(a){var z=this.a +z.a=0 +z.aA(a)}}, +jZ:{"^":"h:32;a", +$2:function(a,b){H.m(b,"$iD") +this.a.a3(a,b)}, +$1:function(a){return this.$2(a,null)}}, +k_:{"^":"h:0;a,b,c", +$0:function(){this.a.a3(this.b,this.c)}}, +jX:{"^":"h:0;a,b", +$0:function(){var z,y,x +z=this.a +y=H.n(this.b,H.i(z,0)) +x=z.aW() +z.a=4 +z.c=y +P.aJ(z,x)}}, +k0:{"^":"h:0;a,b", +$0:function(){P.bR(this.b,this.a)}}, +jW:{"^":"h:0;a,b,c", +$0:function(){this.a.a3(this.b,this.c)}}, +k4:{"^":"h:1;a,b,c,d", +$0:function(){var z,y,x,w,v,u,t +z=null +try{w=this.c +z=w.b.b.cR(H.j(w.d,{func:1}),null)}catch(v){y=H.P(v) +x=H.a7(v) +if(this.d){w=H.m(this.a.a.c,"$ia2").a +u=y +u=w==null?u==null:w===u +w=u}else w=!1 +u=this.b +if(w)u.b=H.m(this.a.a.c,"$ia2") +else u.b=new P.a2(y,x) +u.a=!0 +return}if(!!J.q(z).$iX){if(z instanceof P.G&&z.a>=4){if(z.a===8){w=this.b +w.b=H.m(z.c,"$ia2") +w.a=!0}return}t=this.a.a +w=this.b +w.b=z.aw(new P.k5(t),null) +w.a=!1}}}, +k5:{"^":"h:36;a", +$1:function(a){return this.a}}, +k3:{"^":"h:1;a,b,c", +$0:function(){var z,y,x,w,v,u,t +try{x=this.b +w=H.i(x,0) +v=H.n(this.c,w) +u=H.i(x,1) +this.a.b=x.b.b.bX(H.j(x.d,{func:1,ret:{futureOr:1,type:u},args:[w]}),v,{futureOr:1,type:u},w)}catch(t){z=H.P(t) +y=H.a7(t) +x=this.a +x.b=new P.a2(z,y) +x.a=!0}}}, +k2:{"^":"h:1;a,b,c", +$0:function(){var z,y,x,w,v,u,t,s +try{z=H.m(this.a.a.c,"$ia2") +w=this.c +if(w.eG(z)&&w.e!=null){v=this.b +v.b=w.ew(z) +v.a=!1}}catch(u){y=H.P(u) +x=H.a7(u) +w=H.m(this.a.a.c,"$ia2") +v=w.a +t=y +s=this.b +if(v==null?t==null:v===t)s.b=w +else s.b=new P.a2(y,x) +s.a=!0}}}, +dZ:{"^":"b;a,0b"}, +Z:{"^":"b;$ti", +gi:function(a){var z,y +z={} +y=new P.G(0,$.u,[P.c]) +z.a=0 +this.af(new P.iY(z,this),!0,new P.iZ(z,y),y.gcd()) +return y}, +gal:function(a){var z,y +z={} +y=new P.G(0,$.u,[H.v(this,"Z",0)]) +z.a=null +z.a=this.af(new P.iW(z,this,y),!0,new P.iX(y),y.gcd()) +return y}}, +iV:{"^":"h;a,b", +$0:function(){var z=this.a +return new P.e6(new J.c3(z,1,0,[H.i(z,0)]),0,[this.b])}, +$S:function(){return{func:1,ret:[P.e6,this.b]}}}, +iY:{"^":"h;a,b", +$1:function(a){H.n(a,H.v(this.b,"Z",0));++this.a.a}, +$S:function(){return{func:1,ret:P.x,args:[H.v(this.b,"Z",0)]}}}, +iZ:{"^":"h:0;a,b", +$0:function(){this.b.aA(this.a.a)}}, +iW:{"^":"h;a,b,c", +$1:function(a){H.n(a,H.v(this.b,"Z",0)) +P.kU(this.a.a,this.c,a)}, +$S:function(){return{func:1,ret:P.x,args:[H.v(this.b,"Z",0)]}}}, +iX:{"^":"h:0;a", +$0:function(){var z,y,x,w +try{x=H.ch() +throw H.a(x)}catch(w){z=H.P(w) +y=H.a7(w) +$.u.toString +this.a.a3(z,y)}}}, +av:{"^":"b;$ti"}, +cy:{"^":"Z;$ti", +af:function(a,b,c,d){return this.a.af(H.j(a,{func:1,ret:-1,args:[H.v(this,"cy",0)]}),!0,H.j(c,{func:1,ret:-1}),d)}}, +iU:{"^":"b;"}, +ks:{"^":"b;$ti", +gdQ:function(){if((this.b&8)===0)return H.l(this.a,"$iag",this.$ti,"$aag") +var z=this.$ti +return H.l(H.l(this.a,"$ia_",z,"$aa_").gb8(),"$iag",z,"$aag")}, +bl:function(){var z,y +if((this.b&8)===0){z=this.a +if(z==null){z=new P.ax(0,this.$ti) +this.a=z}return H.l(z,"$iax",this.$ti,"$aax")}z=this.$ti +y=H.l(this.a,"$ia_",z,"$aa_") +y.gb8() +return H.l(y.gb8(),"$iax",z,"$aax")}, +gbx:function(){if((this.b&8)!==0){var z=this.$ti +return H.l(H.l(this.a,"$ia_",z,"$aa_").gb8(),"$ibn",z,"$abn")}return H.l(this.a,"$ibn",this.$ti,"$abn")}, +bf:function(){if((this.b&4)!==0)return new P.bl("Cannot add event after closing") +return new P.bl("Cannot add event while adding a stream")}, +ci:function(){var z=this.c +if(z==null){z=(this.b&2)!==0?$.b8():new P.G(0,$.u,[null]) +this.c=z}return z}, +m:function(a,b){var z +H.n(b,H.i(this,0)) +z=this.b +if(z>=4)throw H.a(this.bf()) +if((z&1)!==0)this.aY(b) +else if((z&3)===0)this.bl().m(0,new P.e2(b,this.$ti))}, +a4:function(a){var z=this.b +if((z&4)!==0)return this.ci() +if(z>=4)throw H.a(this.bf()) +z|=4 +this.b=z +if((z&1)!==0)this.aZ() +else if((z&3)===0)this.bl().m(0,C.t) +return this.ci()}, +e_:function(a,b,c,d){var z,y,x,w,v,u,t +z=H.i(this,0) +H.j(a,{func:1,ret:-1,args:[z]}) +H.j(c,{func:1,ret:-1}) +if((this.b&3)!==0)throw H.a(P.ad("Stream has already been listened to.")) +y=$.u +x=d?1:0 +w=this.$ti +v=new P.bn(this,y,x,w) +v.c4(a,b,c,d,z) +u=this.gdQ() +z=this.b|=1 +if((z&8)!==0){t=H.l(this.a,"$ia_",w,"$aa_") +t.sb8(v) +t.eW()}else this.a=v +v.ct(u) +v.dz(new P.ku(this)) +return v}, +dS:function(a){var z,y +y=this.$ti +H.l(a,"$iav",y,"$aav") +z=null +if((this.b&8)!==0)z=H.l(this.a,"$ia_",y,"$aa_").bE() +this.a=null +this.b=this.b&4294967286|2 +y=new P.kt(this) +if(z!=null)z=z.b9(y) +else y.$0() +return z}, +$ime:1, +$imF:1, +$ian:1}, +ku:{"^":"h:0;a", +$0:function(){P.cT(this.a.d)}}, +kt:{"^":"h:1;a", +$0:function(){var z=this.a.c +if(z!=null&&z.a===0)z.c8(null)}}, +jI:{"^":"b;$ti", +aY:function(a){var z=H.i(this,0) +H.n(a,z) +this.gbx().be(new P.e2(a,[z]))}, +aB:function(a,b){this.gbx().be(new P.e3(a,b))}, +aZ:function(){this.gbx().be(C.t)}}, +jH:{"^":"ks+jI;0a,b,0c,d,e,f,r,$ti"}, +cF:{"^":"ef;a,$ti", +bk:function(a,b,c,d){return this.a.e_(H.j(a,{func:1,ret:-1,args:[H.i(this,0)]}),b,H.j(c,{func:1,ret:-1}),d)}, +gA:function(a){return(H.au(this.a)^892482866)>>>0}, +J:function(a,b){if(b==null)return!1 +if(this===b)return!0 +return b instanceof P.cF&&b.a===this.a}}, +bn:{"^":"e_;x,0a,0b,0c,d,e,0f,0r,$ti", +co:function(){return this.x.dS(this)}, +cp:function(){var z,y +z=this.x +y=H.i(z,0) +H.l(this,"$iav",[y],"$aav") +if((z.b&8)!==0)C.R.fg(H.l(z.a,"$ia_",[y],"$aa_")) +P.cT(z.e)}, +cq:function(){var z,y +z=this.x +y=H.i(z,0) +H.l(this,"$iav",[y],"$aav") +if((z.b&8)!==0)H.l(z.a,"$ia_",[y],"$aa_").eW() +P.cT(z.f)}}, +mG:{"^":"b;a,$ti"}, +e_:{"^":"b;0a,0b,0c,d,e,0f,0r,$ti", +sdJ:function(a){this.a=H.j(a,{func:1,ret:-1,args:[H.i(this,0)]})}, +sdK:function(a){this.c=H.j(a,{func:1,ret:-1})}, +saV:function(a){this.r=H.l(a,"$iag",this.$ti,"$aag")}, +c4:function(a,b,c,d,e){var z,y,x,w +z=H.i(this,0) +H.j(a,{func:1,ret:-1,args:[z]}) +y=this.d +y.toString +this.sdJ(H.j(a,{func:1,ret:null,args:[z]})) +x=b==null?P.li():b +if(H.aC(x,{func:1,ret:-1,args:[P.b,P.D]}))this.b=y.bW(x,null,P.b,P.D) +else if(H.aC(x,{func:1,ret:-1,args:[P.b]}))this.b=H.j(x,{func:1,ret:null,args:[P.b]}) +else H.t(P.N("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")) +H.j(c,{func:1,ret:-1}) +w=c==null?P.lh():c +this.sdK(H.j(w,{func:1,ret:-1}))}, +ct:function(a){H.l(a,"$iag",this.$ti,"$aag") +if(a==null)return +this.saV(a) +if(!a.gE(a)){this.e=(this.e|64)>>>0 +this.r.bc(this)}}, +bE:function(){var z=(this.e&4294967279)>>>0 +this.e=z +if((z&8)===0)this.bg() +z=this.f +return z==null?$.b8():z}, +bg:function(){var z,y +z=(this.e|8)>>>0 +this.e=z +if((z&64)!==0){y=this.r +if(y.a===1)y.a=3}if((z&32)===0)this.saV(null) +this.f=this.co()}, +cp:function(){}, +cq:function(){}, +co:function(){return}, +be:function(a){var z,y +z=this.$ti +y=H.l(this.r,"$iax",z,"$aax") +if(y==null){y=new P.ax(0,z) +this.saV(y)}y.m(0,a) +z=this.e +if((z&64)===0){z=(z|64)>>>0 +this.e=z +if(z<128)this.r.bc(this)}}, +aY:function(a){var z,y +z=H.i(this,0) +H.n(a,z) +y=this.e +this.e=(y|32)>>>0 +this.d.bY(this.a,a,z) +this.e=(this.e&4294967263)>>>0 +this.bi((y&4)!==0)}, +aB:function(a,b){var z,y +H.m(b,"$iD") +z=this.e +y=new P.jM(this,a,b) +if((z&1)!==0){this.e=(z|16)>>>0 +this.bg() +z=this.f +if(z!=null&&z!==$.b8())z.b9(y) +else y.$0()}else{y.$0() +this.bi((z&4)!==0)}}, +aZ:function(){var z,y +z=new P.jL(this) +this.bg() +this.e=(this.e|16)>>>0 +y=this.f +if(y!=null&&y!==$.b8())y.b9(z) +else z.$0()}, +dz:function(a){var z +H.j(a,{func:1,ret:-1}) +z=this.e +this.e=(z|32)>>>0 +a.$0() +this.e=(this.e&4294967263)>>>0 +this.bi((z&4)!==0)}, +bi:function(a){var z,y +if((this.e&64)!==0){z=this.r +z=z.gE(z)}else z=!1 +if(z){z=(this.e&4294967231)>>>0 +this.e=z +if((z&4)!==0)if(z<128){z=this.r +z=z==null||z.gE(z)}else z=!1 +else z=!1 +if(z)this.e=(this.e&4294967291)>>>0}for(;!0;a=y){z=this.e +if((z&8)!==0){this.saV(null) +return}y=(z&4)!==0 +if(a===y)break +this.e=(z^32)>>>0 +if(y)this.cp() +else this.cq() +this.e=(this.e&4294967263)>>>0}z=this.e +if((z&64)!==0&&z<128)this.r.bc(this)}, +$iav:1, +$ian:1, +p:{ +e0:function(a,b,c,d,e){var z,y +z=$.u +y=d?1:0 +y=new P.e_(z,y,[e]) +y.c4(a,b,c,d,e) +return y}}}, +jM:{"^":"h:1;a,b,c", +$0:function(){var z,y,x,w,v +z=this.a +y=z.e +if((y&8)!==0&&(y&16)===0)return +z.e=(y|32)>>>0 +x=z.b +y=this.b +w=P.b +v=z.d +if(H.aC(x,{func:1,ret:-1,args:[P.b,P.D]}))v.eY(x,y,this.c,w,P.D) +else v.bY(H.j(z.b,{func:1,ret:-1,args:[P.b]}),y,w) +z.e=(z.e&4294967263)>>>0}}, +jL:{"^":"h:1;a", +$0:function(){var z,y +z=this.a +y=z.e +if((y&16)===0)return +z.e=(y|42)>>>0 +z.d.cS(z.c) +z.e=(z.e&4294967263)>>>0}}, +ef:{"^":"Z;$ti", +af:function(a,b,c,d){return this.bk(H.j(a,{func:1,ret:-1,args:[H.i(this,0)]}),d,H.j(c,{func:1,ret:-1}),!0===b)}, +eE:function(a){return this.af(a,null,null,null)}, +eF:function(a,b){return this.af(a,null,b,null)}, +bk:function(a,b,c,d){var z=H.i(this,0) +return P.e0(H.j(a,{func:1,ret:-1,args:[z]}),b,H.j(c,{func:1,ret:-1}),d,z)}}, +k6:{"^":"ef;a,b,$ti", +bk:function(a,b,c,d){var z=H.i(this,0) +H.j(a,{func:1,ret:-1,args:[z]}) +H.j(c,{func:1,ret:-1}) +if(this.b)throw H.a(P.ad("Stream has already been listened to.")) +this.b=!0 +z=P.e0(a,b,c,d,z) +z.ct(this.a.$0()) +return z}}, +e6:{"^":"ag;b,a,$ti", +scm:function(a){this.b=H.l(a,"$iY",this.$ti,"$aY")}, +gE:function(a){return this.b==null}, +cI:function(a){var z,y,x,w,v +H.l(a,"$ian",this.$ti,"$aan") +w=this.b +if(w==null)throw H.a(P.ad("No events pending.")) +z=null +try{z=w.q() +if(z)a.aY(this.b.gB()) +else{this.scm(null) +a.aZ()}}catch(v){y=H.P(v) +x=H.a7(v) +if(z==null){this.scm(C.r) +a.aB(y,x)}else a.aB(y,x)}}}, +aY:{"^":"b;0aJ:a<,$ti", +saJ:function(a){this.a=H.m(a,"$iaY")}}, +e2:{"^":"aY;b,0a,$ti", +bV:function(a){H.l(a,"$ian",this.$ti,"$aan").aY(this.b)}}, +e3:{"^":"aY;b,c,0a", +bV:function(a){a.aB(this.b,this.c)}, +$aaY:I.aB}, +jP:{"^":"b;", +bV:function(a){a.aZ()}, +gaJ:function(){return}, +saJ:function(a){throw H.a(P.ad("No events after a done."))}, +$iaY:1, +$aaY:I.aB}, +ag:{"^":"b;$ti", +bc:function(a){var z +H.l(a,"$ian",this.$ti,"$aan") +z=this.a +if(z===1)return +if(z>=1){this.a=1 +return}P.c_(new P.km(this,a)) +this.a=1}}, +km:{"^":"h:0;a,b", +$0:function(){var z,y +z=this.a +y=z.a +z.a=0 +if(y===3)return +z.cI(this.b)}}, +ax:{"^":"ag;0b,0c,a,$ti", +gE:function(a){return this.c==null}, +m:function(a,b){var z=this.c +if(z==null){this.c=b +this.b=b}else{z.saJ(b) +this.c=b}}, +cI:function(a){var z,y +H.l(a,"$ian",this.$ti,"$aan") +z=this.b +y=z.gaJ() +this.b=y +if(y==null)this.c=null +z.bV(a)}}, +kv:{"^":"b;0a,b,c,$ti"}, +kV:{"^":"h:1;a,b", +$0:function(){return this.a.aA(this.b)}}, +a2:{"^":"b;a,b", +h:function(a){return H.e(this.a)}, +$iK:1}, +kQ:{"^":"b;",$imz:1}, +l8:{"^":"h:0;a,b", +$0:function(){var z,y,x +z=this.a +y=z.a +if(y==null){x=new P.bH() +z.a=x +z=x}else z=y +y=this.b +if(y==null)throw H.a(z) +x=H.a(z) +x.stack=y.h(0) +throw x}}, +kn:{"^":"kQ;", +cS:function(a){var z,y,x +H.j(a,{func:1,ret:-1}) +try{if(C.d===$.u){a.$0() +return}P.eD(null,null,this,a,-1)}catch(x){z=H.P(x) +y=H.a7(x) +P.b2(null,null,this,z,H.m(y,"$iD"))}}, +bY:function(a,b,c){var z,y,x +H.j(a,{func:1,ret:-1,args:[c]}) +H.n(b,c) +try{if(C.d===$.u){a.$1(b) +return}P.eF(null,null,this,a,b,-1,c)}catch(x){z=H.P(x) +y=H.a7(x) +P.b2(null,null,this,z,H.m(y,"$iD"))}}, +eY:function(a,b,c,d,e){var z,y,x +H.j(a,{func:1,ret:-1,args:[d,e]}) +H.n(b,d) +H.n(c,e) +try{if(C.d===$.u){a.$2(b,c) +return}P.eE(null,null,this,a,b,c,-1,d,e)}catch(x){z=H.P(x) +y=H.a7(x) +P.b2(null,null,this,z,H.m(y,"$iD"))}}, +ec:function(a,b){return new P.kp(this,H.j(a,{func:1,ret:b}),b)}, +cD:function(a){return new P.ko(this,H.j(a,{func:1,ret:-1}))}, +ed:function(a,b){return new P.kq(this,H.j(a,{func:1,ret:-1,args:[b]}),b)}, +j:function(a,b){return}, +cR:function(a,b){H.j(a,{func:1,ret:b}) +if($.u===C.d)return a.$0() +return P.eD(null,null,this,a,b)}, +bX:function(a,b,c,d){H.j(a,{func:1,ret:c,args:[d]}) +H.n(b,d) +if($.u===C.d)return a.$1(b) +return P.eF(null,null,this,a,b,c,d)}, +eX:function(a,b,c,d,e,f){H.j(a,{func:1,ret:d,args:[e,f]}) +H.n(b,e) +H.n(c,f) +if($.u===C.d)return a.$2(b,c) +return P.eE(null,null,this,a,b,c,d,e,f)}, +bW:function(a,b,c,d){return H.j(a,{func:1,ret:b,args:[c,d]})}}, +kp:{"^":"h;a,b,c", +$0:function(){return this.a.cR(this.b,this.c)}, +$S:function(){return{func:1,ret:this.c}}}, +ko:{"^":"h:1;a,b", +$0:function(){return this.a.cS(this.b)}}, +kq:{"^":"h;a,b,c", +$1:function(a){var z=this.c +return this.a.bY(this.b,H.n(a,z),z)}, +$S:function(){return{func:1,ret:-1,args:[this.c]}}}}],["","",,P,{"^":"", +dy:function(a,b,c,d,e){H.j(a,{func:1,ret:P.H,args:[d,d]}) +H.j(b,{func:1,ret:P.c,args:[d]}) +if(b==null){if(a==null)return new H.aj(0,0,[d,e]) +b=P.lk()}else{if(P.ls()===b&&P.lr()===a)return new P.kk(0,0,[d,e]) +if(a==null)a=P.lj()}return P.ke(a,b,c,d,e)}, +bE:function(a,b,c){H.bu(a) +return H.l(H.lz(a,new H.aj(0,0,[b,c])),"$idx",[b,c],"$adx")}, +cm:function(a,b){return new H.aj(0,0,[a,b])}, +i2:function(){return new H.aj(0,0,[null,null])}, +i3:function(a,b,c,d){return new P.kg(0,0,[d])}, +mI:[function(a,b){return J.Q(a,b)},"$2","lj",8,0,43], +mJ:[function(a){return J.aD(a)},"$1","lk",4,0,44], +hM:function(a,b,c){var z,y +if(P.cQ(a)){if(b==="("&&c===")")return"(...)" +return b+"..."+c}z=H.o([],[P.d]) +y=$.ba() +C.b.m(y,a) +try{P.l4(a,z)}finally{if(0>=y.length)return H.k(y,-1) +y.pop()}y=P.bM(b,H.lJ(z,"$ip"),", ")+c +return y.charCodeAt(0)==0?y:y}, +cg:function(a,b,c){var z,y,x +if(P.cQ(a))return b+"..."+c +z=new P.S(b) +y=$.ba() +C.b.m(y,a) +try{x=z +x.a=P.bM(x.a,a,", ")}finally{if(0>=y.length)return H.k(y,-1) +y.pop()}z.a+=c +y=z.a +return y.charCodeAt(0)==0?y:y}, +cQ:function(a){var z,y +for(z=0;y=$.ba(),z=b.length)return H.k(b,-1) +v=b.pop() +if(0>=b.length)return H.k(b,-1) +u=b.pop()}else{t=z.gB();++x +if(!z.q()){if(x<=4){C.b.m(b,H.e(t)) +return}v=H.e(t) +if(0>=b.length)return H.k(b,-1) +u=b.pop() +y+=v.length+2}else{s=z.gB();++x +for(;z.q();t=s,s=r){r=z.gB();++x +if(x>100){while(!0){if(!(y>75&&x>3))break +if(0>=b.length)return H.k(b,-1) +y-=b.pop().length+2;--x}C.b.m(b,"...") +return}}u=H.e(t) +v=H.e(s) +y+=v.length+u.length+4}}if(x>b.length+2){y+=5 +q="..."}else q=null +while(!0){if(!(y>80&&b.length>3))break +if(0>=b.length)return H.k(b,-1) +y-=b.pop().length+2 +if(q==null){y+=5 +q="..."}}if(q!=null)C.b.m(b,q) +C.b.m(b,u) +C.b.m(b,v)}, +i0:function(a,b,c){var z=P.dy(null,null,null,b,c) +a.a.I(0,H.j(new P.i1(z,b,c),{func:1,ret:-1,args:[H.i(a,0),H.i(a,1)]})) +return z}, +cp:function(a){var z,y +z={} +if(P.cQ(a))return"{...}" +y=new P.S("") +try{C.b.m($.ba(),a) +y.a+="{" +z.a=!0 +a.I(0,new P.i5(z,y)) +y.a+="}"}finally{z=$.ba() +if(0>=z.length)return H.k(z,-1) +z.pop()}z=y.a +return z.charCodeAt(0)==0?z:z}, +kk:{"^":"aj;a,0b,0c,0d,0e,0f,r,$ti", +aG:function(a){return H.eV(a)&0x3ffffff}, +aH:function(a,b){var z,y,x +if(a==null)return-1 +z=a.length +for(y=0;y=0)return!1 +x.push(this.cb(a))}return!0}, +eS:function(a,b){var z=this.dT(b) +return z}, +dT:function(a){var z,y,x +z=this.d +if(z==null)return!1 +y=this.dw(z,a) +x=this.ck(y,a) +if(x<0)return!1 +this.e2(y.splice(x,1)[0]) +return!0}, +cn:function(){this.r=this.r+1&67108863}, +cb:function(a){var z,y +z=new P.kh(H.n(a,H.i(this,0))) +if(this.e==null){this.f=z +this.e=z}else{y=this.f +z.c=y +y.b=z +this.f=z}++this.a +this.cn() +return z}, +e2:function(a){var z,y +z=a.c +y=a.b +if(z==null)this.e=y +else z.b=y +if(y==null)this.f=z +else y.c=z;--this.a +this.cn()}, +ce:function(a){return J.aD(a)&0x3ffffff}, +dw:function(a,b){return a[this.ce(b)]}, +ck:function(a,b){var z,y +if(a==null)return-1 +z=a.length +for(y=0;y"]=z +delete z[""] +return z}}}, +kh:{"^":"b;a,0b,0c"}, +ki:{"^":"b;a,b,0c,0d,$ti", +sca:function(a){this.d=H.n(a,H.i(this,0))}, +gB:function(){return this.d}, +q:function(){var z=this.a +if(this.b!==z.r)throw H.a(P.a3(z)) +else{z=this.c +if(z==null){this.sca(null) +return!1}else{this.sca(H.n(z.a,H.i(this,0))) +this.c=this.c.b +return!0}}}, +$iY:1, +p:{ +e8:function(a,b,c){var z=new P.ki(a,b,[c]) +z.c=a.e +return z}}}, +hL:{"^":"p;"}, +i1:{"^":"h:2;a,b,c", +$2:function(a,b){this.a.l(0,H.n(a,this.b),H.n(b,this.c))}}, +i4:{"^":"kl;",$iI:1,$ip:1,$if:1}, +a4:{"^":"b;$ti", +gK:function(a){return new H.ak(a,this.gi(a),0,[H.b6(this,a,"a4",0)])}, +X:function(a,b){return this.j(a,b)}, +gE:function(a){return this.gi(a)===0}, +gbO:function(a){return!this.gE(a)}, +a_:function(a,b){return H.ae(a,b,null,H.b6(this,a,"a4",0))}, +a8:function(a,b){var z,y +z=H.o([],[H.b6(this,a,"a4",0)]) +C.b.si(z,this.gi(a)) +for(y=0;yz.gi(w))throw H.a(H.dq()) +if(x=0;--v)this.l(a,b+v,z.j(w,x+v)) +else for(v=0;v=z.length)return H.k(z,b) +z=z[b]}return z}, +gK:function(a){var z=this.a +if(z.b==null){z=z.gan() +z=z.gK(z)}else{z=z.aS() +z=new J.c3(z,z.length,0,[H.i(z,0)])}return z}, +$aI:function(){return[P.d]}, +$aaG:function(){return[P.d]}, +$ap:function(){return[P.d]}}, +fI:{"^":"bz;a", +gag:function(a){return"us-ascii"}, +bI:function(a){return C.q.Z(a)}, +gad:function(){return C.q}}, +eg:{"^":"U;", +ak:function(a,b,c){var z,y,x,w,v,u +H.r(a) +z=P.a8(b,c,a.length,null,null,null)-b +y=new Uint8Array(z) +for(x=y.length,w=~this.a,v=0;v=x)return H.k(y,v) +y[v]=u}return y}, +Z:function(a){return this.ak(a,0,null)}, +$aU:function(){return[P.d,[P.f,P.c]]}}, +fJ:{"^":"eg;a"}, +fK:{"^":"ai;a", +gad:function(){return this.a}, +eK:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i +c=P.a8(b,c,a.length,null,null,null) +z=$.fh() +for(y=b,x=y,w=null,v=-1,u=-1,t=0;y=z.length)return H.k(z,n) +m=z[n] +if(m>=0){n=C.a.v("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m) +if(n===r)continue +r=n}else{if(m===-1){if(v<0){l=w==null?null:w.a.length +if(l==null)l=0 +v=l+(y-x) +u=y}++t +if(r===61)continue}r=n}if(m!==-2){if(w==null)w=new P.S("") +l=w.a+=C.a.k(a,x,y) +w.a=l+H.J(r) +x=s +continue}}throw H.a(P.C("Invalid base64 data",a,y))}if(w!=null){l=w.a+=C.a.k(a,x,c) +k=l.length +if(v>=0)P.db(a,u,c,v,t,k) +else{j=C.c.aQ(k-1,4)+1 +if(j===1)throw H.a(P.C("Invalid base64 encoding length ",a,c)) +for(;j<4;){l+="=" +w.a=l;++j}}l=w.a +return C.a.ap(a,b,c,l.charCodeAt(0)==0?l:l)}i=c-b +if(v>=0)P.db(a,u,c,v,t,i) +else{j=C.c.aQ(i,4) +if(j===1)throw H.a(P.C("Invalid base64 encoding length ",a,c)) +if(j>1)a=C.a.ap(a,c,c,j===2?"==":"=")}return a}, +$aai:function(){return[[P.f,P.c],P.d]}, +p:{ +db:function(a,b,c,d,e,f){if(C.c.aQ(f,4)!==0)throw H.a(P.C("Invalid base64 padding, padded length must be multiple of four, is "+f,a,c)) +if(d+e!==f)throw H.a(P.C("Invalid base64 padding, '=' not at the end",a,b)) +if(e>2)throw H.a(P.C("Invalid base64 padding, more than two '=' characters",a,b))}}}, +fL:{"^":"U;a", +Z:function(a){var z +H.l(a,"$if",[P.c],"$af") +z=a.length +if(z===0)return"" +return P.aI(new P.jJ(0,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").ep(a,0,z,!0),0,null)}, +$aU:function(){return[[P.f,P.c],P.d]}}, +jJ:{"^":"b;a,b", +ep:function(a,b,c,d){var z,y,x,w +H.l(a,"$if",[P.c],"$af") +z=(this.a&3)+(c-b) +y=C.c.by(z,3) +x=y*4 +if(z-y*3>0)x+=4 +w=new Uint8Array(x) +this.a=P.jK(this.b,a,b,c,!0,w,0,this.a) +if(x>0)return w +return}, +p:{ +jK:function(a,b,c,d,e,f,g,h){var z,y,x,w,v,u,t,s,r,q +H.l(b,"$if",[P.c],"$af") +z=h>>>2 +y=3-(h&3) +for(x=b.length,w=f.length,v=c,u=0;v=x)return H.k(b,v) +t=b[v] +if(typeof t!=="number")return H.E(t) +u=(u|t)>>>0 +z=(z<<8|t)&16777215;--y +if(y===0){s=g+1 +r=C.a.n(a,z>>>18&63) +if(g>=w)return H.k(f,g) +f[g]=r +g=s+1 +r=C.a.n(a,z>>>12&63) +if(s>=w)return H.k(f,s) +f[s]=r +s=g+1 +r=C.a.n(a,z>>>6&63) +if(g>=w)return H.k(f,g) +f[g]=r +g=s+1 +r=C.a.n(a,z&63) +if(s>=w)return H.k(f,s) +f[s]=r +z=0 +y=3}}if(u>=0&&u<=255){if(y<3){s=g+1 +q=s+1 +if(3-y===1){x=C.a.n(a,z>>>2&63) +if(g>=w)return H.k(f,g) +f[g]=x +x=C.a.n(a,z<<4&63) +if(s>=w)return H.k(f,s) +f[s]=x +g=q+1 +if(q>=w)return H.k(f,q) +f[q]=61 +if(g>=w)return H.k(f,g) +f[g]=61}else{x=C.a.n(a,z>>>10&63) +if(g>=w)return H.k(f,g) +f[g]=x +x=C.a.n(a,z>>>4&63) +if(s>=w)return H.k(f,s) +f[s]=x +g=q+1 +x=C.a.n(a,z<<2&63) +if(q>=w)return H.k(f,q) +f[q]=x +if(g>=w)return H.k(f,g) +f[g]=61}return 0}return(z<<2|3-y)>>>0}for(v=c;v=x)return H.k(b,v) +t=b[v] +if(typeof t!=="number")return t.D() +if(t<0||t>255)break;++v}x="Not a byte value at index "+v+": 0x" +if(v>=b.length)return H.k(b,v) +throw H.a(P.aS(b,x+J.fH(b[v],16),null))}}}, +fX:{"^":"di;", +$adi:function(){return[[P.f,P.c]]}}, +fY:{"^":"fX;"}, +jN:{"^":"fY;a,b,c", +sdl:function(a){this.b=H.l(a,"$if",[P.c],"$af")}, +m:[function(a,b){var z,y,x,w,v +H.l(b,"$ip",[P.c],"$ap") +z=this.b +y=this.c +x=J.a0(b) +if(x.gi(b)>z.length-y){z=this.b +w=x.gi(b)+z.length-1 +w|=C.c.W(w,1) +w|=w>>>2 +w|=w>>>4 +w|=w>>>8 +v=new Uint8Array((((w|w>>>16)>>>0)+1)*2) +z=this.b +C.l.a9(v,0,z.length,z) +this.sdl(v)}z=this.b +y=this.c +C.l.a9(z,y,y+x.gi(b),b) +this.c=this.c+x.gi(b)},"$1","gea",5,0,15], +a4:[function(a){this.a.$1(C.l.aa(this.b,0,this.c))},"$0","geh",1,0,1]}, +di:{"^":"b;$ti"}, +ai:{"^":"b;$ti", +bI:function(a){H.n(a,H.v(this,"ai",0)) +return this.gad().Z(a)}}, +U:{"^":"iU;$ti"}, +bz:{"^":"ai;", +$aai:function(){return[P.d,[P.f,P.c]]}}, +dv:{"^":"K;a,b,c", +h:function(a){var z=P.bd(this.a) +return(this.b!=null?"Converting object to an encodable object failed:":"Converting object did not return an encodable object:")+" "+z}, +p:{ +dw:function(a,b,c){return new P.dv(a,b,c)}}}, +hT:{"^":"dv;a,b,c", +h:function(a){return"Cyclic error in JSON stringify"}}, +hS:{"^":"ai;a,b", +em:function(a,b,c){var z=P.eB(b,this.gen().a) +return z}, +eo:function(a,b){var z=this.gad() +z=P.ka(a,z.b,z.a) +return z}, +gad:function(){return C.a_}, +gen:function(){return C.Z}, +$aai:function(){return[P.b,P.d]}}, +hV:{"^":"U;a,b", +Z:function(a){var z,y,x +z=new P.S("") +y=new P.e7(z,[],P.eN()) +y.aN(a) +x=z.a +return x.charCodeAt(0)==0?x:x}, +$aU:function(){return[P.b,P.d]}}, +hU:{"^":"U;a", +Z:function(a){return P.eB(H.r(a),this.a)}, +$aU:function(){return[P.d,P.b]}}, +kb:{"^":"b;", +cW:function(a){var z,y,x,w,v,u,t,s +z=a.length +for(y=J.a6(a),x=this.c,w=0,v=0;v92)continue +if(u<32){if(v>w)x.a+=C.a.k(a,w,v) +w=v+1 +t=x.a+=H.J(92) +switch(u){case 8:x.a=t+H.J(98) +break +case 9:x.a=t+H.J(116) +break +case 10:x.a=t+H.J(110) +break +case 12:x.a=t+H.J(102) +break +case 13:x.a=t+H.J(114) +break +default:t+=H.J(117) +x.a=t +t+=H.J(48) +x.a=t +t+=H.J(48) +x.a=t +s=u>>>4&15 +t+=H.J(s<10?48+s:87+s) +x.a=t +s=u&15 +x.a=t+H.J(s<10?48+s:87+s) +break}}else if(u===34||u===92){if(v>w)x.a+=C.a.k(a,w,v) +w=v+1 +t=x.a+=H.J(92) +x.a=t+H.J(u)}}if(w===0)x.a+=H.e(a) +else if(w=x.length)return H.k(x,-1) +x.pop()}catch(w){y=H.P(w) +x=P.dw(a,y,this.gcr()) +throw H.a(x)}}, +cV:function(a){var z,y +if(typeof a==="number"){if(!isFinite(a))return!1 +this.c.a+=C.m.h(a) +return!0}else if(a===!0){this.c.a+="true" +return!0}else if(a===!1){this.c.a+="false" +return!0}else if(a==null){this.c.a+="null" +return!0}else if(typeof a==="string"){z=this.c +z.a+='"' +this.cW(a) +z.a+='"' +return!0}else{z=J.q(a) +if(!!z.$if){this.bh(a) +this.f3(a) +z=this.a +if(0>=z.length)return H.k(z,-1) +z.pop() +return!0}else if(!!z.$iR){this.bh(a) +y=this.f4(a) +z=this.a +if(0>=z.length)return H.k(z,-1) +z.pop() +return y}else return!1}}, +f3:function(a){var z,y,x +z=this.c +z.a+="[" +y=J.a0(a) +if(y.gbO(a)){this.aN(y.j(a,0)) +for(x=1;x=y)return H.k(x,t) +this.aN(x[t])}w.a+="}" +return!0}}, +kc:{"^":"h:2;a,b", +$2:function(a,b){var z,y +if(typeof a!=="string")this.a.b=!1 +z=this.b +y=this.a +C.b.l(z,y.a++,a) +C.b.l(z,y.a++,b)}}, +e7:{"^":"kb;c,a,b", +gcr:function(){var z=this.c.a +return z.charCodeAt(0)==0?z:z}, +p:{ +ka:function(a,b,c){var z,y,x +z=new P.S("") +y=new P.e7(z,[],P.eN()) +y.aN(a) +x=z.a +return x.charCodeAt(0)==0?x:x}}}, +hW:{"^":"bz;a", +gag:function(a){return"iso-8859-1"}, +bI:function(a){return C.A.Z(a)}, +gad:function(){return C.A}}, +hX:{"^":"eg;a"}, +jl:{"^":"bz;a", +gag:function(a){return"utf-8"}, +gad:function(){return C.N}}, +js:{"^":"U;", +ak:function(a,b,c){var z,y,x +H.r(a) +c=P.a8(b,c,a.length,null,null,null) +z=c-b +if(z===0)return new Uint8Array(0) +y=new Uint8Array(z*3) +x=new P.kP(0,0,y) +if(x.dv(a,b,c)!==c)x.cA(C.a.v(a,c-1),0) +return C.l.aa(y,0,x.b)}, +Z:function(a){return this.ak(a,0,null)}, +$aU:function(){return[P.d,[P.f,P.c]]}}, +kP:{"^":"b;a,b,c", +cA:function(a,b){var z,y,x,w,v +z=this.c +y=this.b +x=y+1 +w=z.length +if((b&64512)===56320){v=65536+((a&1023)<<10)|b&1023 +this.b=x +if(y>=w)return H.k(z,y) +z[y]=240|v>>>18 +y=x+1 +this.b=y +if(x>=w)return H.k(z,x) +z[x]=128|v>>>12&63 +x=y+1 +this.b=x +if(y>=w)return H.k(z,y) +z[y]=128|v>>>6&63 +this.b=x+1 +if(x>=w)return H.k(z,x) +z[x]=128|v&63 +return!0}else{this.b=x +if(y>=w)return H.k(z,y) +z[y]=224|a>>>12 +y=x+1 +this.b=y +if(x>=w)return H.k(z,x) +z[x]=128|a>>>6&63 +this.b=y+1 +if(y>=w)return H.k(z,y) +z[y]=128|a&63 +return!1}}, +dv:function(a,b,c){var z,y,x,w,v,u,t +if(b!==c&&(C.a.v(a,c-1)&64512)===55296)--c +for(z=this.c,y=z.length,x=b;x=y)break +this.b=v+1 +z[v]=w}else if((w&64512)===55296){if(this.b+3>=y)break +u=x+1 +if(this.cA(w,C.a.n(a,u)))x=u}else if(w<=2047){v=this.b +t=v+1 +if(t>=y)break +this.b=t +if(v>=y)return H.k(z,v) +z[v]=192|w>>>6 +this.b=t+1 +z[t]=128|w&63}else{v=this.b +if(v+2>=y)break +t=v+1 +this.b=t +if(v>=y)return H.k(z,v) +z[v]=224|w>>>12 +v=t+1 +this.b=v +if(t>=y)return H.k(z,t) +z[t]=128|w>>>6&63 +this.b=v+1 +if(v>=y)return H.k(z,v) +z[v]=128|w&63}}return x}}, +jm:{"^":"U;a", +ak:function(a,b,c){var z,y,x,w +H.l(a,"$if",[P.c],"$af") +z=P.jn(!1,a,b,c) +if(z!=null)return z +c=P.a8(b,c,J.T(a),null,null,null) +y=new P.S("") +x=new P.kN(!1,y,!0,0,0,0) +x.ak(a,b,c) +if(x.e>0){H.t(P.C("Unfinished UTF-8 octet sequence",a,c)) +y.a+=H.J(65533) +x.d=0 +x.e=0 +x.f=0}w=y.a +return w.charCodeAt(0)==0?w:w}, +Z:function(a){return this.ak(a,0,null)}, +$aU:function(){return[[P.f,P.c],P.d]}, +p:{ +jn:function(a,b,c,d){H.l(b,"$if",[P.c],"$af") +if(b instanceof Uint8Array)return P.jo(!1,b,c,d) +return}, +jo:function(a,b,c,d){var z,y,x +z=$.fg() +if(z==null)return +y=0===c +if(y&&!0)return P.cC(z,b) +x=b.length +d=P.a8(c,d,x,null,null,null) +if(y&&d===x)return P.cC(z,b) +return P.cC(z,b.subarray(c,d))}, +cC:function(a,b){if(P.jq(b))return +return P.jr(a,b)}, +jr:function(a,b){var z,y +try{z=a.decode(b) +return z}catch(y){H.P(y)}return}, +jq:function(a){var z,y +z=a.length-2 +for(y=0;y0){do{if(t===c)break $label0$0 +s=v.j(a,t) +if(typeof s!=="number")return s.c1() +if((s&192)!==128){r=P.C("Bad UTF-8 encoding 0x"+C.c.aq(s,16),a,t) +throw H.a(r)}else{z=(z<<6|s&63)>>>0;--y;++t}}while(y>0) +r=x-1 +if(r<0||r>=4)return H.k(C.B,r) +if(z<=C.B[r]){r=P.C("Overlong encoding of 0x"+C.c.aq(z,16),a,t-x-1) +throw H.a(r)}if(z>1114111){r=P.C("Character outside valid Unicode range: 0x"+C.c.aq(z,16),a,t-x-1) +throw H.a(r)}if(!this.c||z!==65279)u.a+=H.J(z) +this.c=!1}for(r=t0){this.c=!1 +p=t+q +w.$2(t,p) +if(p===c)break}else p=t +o=p+1 +s=v.j(a,p) +if(typeof s!=="number")return s.D() +if(s<0){n=P.C("Negative UTF-8 code unit: -0x"+C.c.aq(-s,16),a,o-1) +throw H.a(n)}else{if((s&224)===192){z=s&31 +y=1 +x=1 +continue $label0$0}if((s&240)===224){z=s&15 +y=2 +x=2 +continue $label0$0}if((s&248)===240&&s<245){z=s&7 +y=3 +x=3 +continue $label0$0}n=P.C("Bad UTF-8 encoding 0x"+C.c.aq(s,16),a,o-1) +throw H.a(n)}}break $label0$0}if(y>0){this.d=z +this.e=y +this.f=x}}}, +kO:{"^":"h:17;a,b,c,d", +$2:function(a,b){this.a.b.a+=P.aI(this.d,a,b)}}}],["","",,P,{"^":"", +n2:[function(a){return H.eV(a)},"$1","ls",4,0,45], +bt:function(a,b,c){var z +H.j(b,{func:1,ret:P.c,args:[P.d]}) +z=H.ix(a,c) +if(z!=null)return z +if(b!=null)return b.$1(a) +throw H.a(P.C(a,null,null))}, +ho:function(a){if(a instanceof H.h)return a.h(0) +return"Instance of '"+H.aX(a)+"'"}, +cn:function(a,b,c,d){var z,y +H.n(b,d) +z=J.hN(a,d) +if(a!==0&&!0)for(y=0;y0||c=z){y=((C.a.n(a,b+4)^58)*3|C.a.n(a,b)^100|C.a.n(a,b+1)^97|C.a.n(a,b+2)^116|C.a.n(a,b+3)^97)>>>0 +if(y===0)return P.dT(b>0||c=14)C.b.l(w,7,c) +v=w[1] +if(typeof v!=="number")return v.aO() +if(v>=b)if(P.eG(a,b,v,20,w)===20)w[7]=v +x=w[2] +if(typeof x!=="number")return x.t() +u=x+1 +t=w[3] +s=w[4] +r=w[5] +q=w[6] +if(typeof q!=="number")return q.D() +if(typeof r!=="number")return H.E(r) +if(qv+3){o=null +p=!1}else{x=t>b +if(x&&t+1===s){o=null +p=!1}else{if(!(rs+2&&C.a.H(a,"/..",r-3) +else n=!0 +if(n){o=null +p=!1}else{if(v===b+4)if(C.a.H(a,"file",b)){if(u<=b){if(!C.a.H(a,"/",s)){m="file:///" +y=3}else{m="file://" +y=2}a=m+C.a.k(a,s,c) +v-=b +z=y-b +r+=z +q+=z +c=a.length +b=0 +u=7 +t=7 +s=7}else if(s===r)if(b===0&&!0){a=C.a.ap(a,s,r,"/");++r;++q;++c}else{a=C.a.k(a,b,s)+"/"+C.a.k(a,r,c) +v-=b +u-=b +t-=b +s-=b +z=1-b +r+=z +q+=z +c=a.length +b=0}o="file"}else if(C.a.H(a,"http",b)){if(x&&t+3===s&&C.a.H(a,"80",t+1))if(b===0&&!0){a=C.a.ap(a,t,s,"") +s-=3 +r-=3 +q-=3 +c-=3}else{a=C.a.k(a,b,t)+C.a.k(a,s,c) +v-=b +u-=b +t-=b +z=3+b +s-=z +r-=z +q-=z +c=a.length +b=0}o="http"}else o=null +else if(v===z&&C.a.H(a,"https",b)){if(x&&t+4===s&&C.a.H(a,"443",t+1))if(b===0&&!0){a=C.a.ap(a,t,s,"") +s-=4 +r-=4 +q-=4 +c-=3}else{a=C.a.k(a,b,t)+C.a.k(a,s,c) +v-=b +u-=b +t-=b +z=4+b +s-=z +r-=z +q-=z +c=a.length +b=0}o="https"}else o=null +p=!0}}}else o=null +if(p){if(b>0||c9)z.$2("invalid character",w)}else{if(u===3)z.$2("IPv4 address should contain exactly 4 parts",w) +s=P.bt(C.a.k(a,v,w),null,null) +if(typeof s!=="number")return s.ay() +if(s>255)z.$2("each part must be in the range 0..255",v) +r=u+1 +if(u>=x)return H.k(y,u) +y[u]=s +v=w+1 +u=r}}if(u!==3)z.$2("IPv4 address should contain exactly 4 parts",c) +s=P.bt(C.a.k(a,v,c),null,null) +if(typeof s!=="number")return s.ay() +if(s>255)z.$2("each part must be in the range 0..255",v) +if(u>=x)return H.k(y,u) +y[u]=s +return y}, +dU:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i +if(c==null)c=a.length +z=new P.ji(a) +y=new P.jj(z,a) +if(a.length<2)z.$1("address is too short") +x=H.o([],[P.c]) +for(w=b,v=w,u=!1,t=!1;w>>0) +C.b.m(x,(p[2]<<8|p[3])>>>0)}if(u){if(x.length>7)z.$1("an address with a wildcard must have less than 7 parts")}else if(x.length!==8)z.$1("an address without a wildcard must contain exactly 8 parts") +o=new Uint8Array(16) +for(q=x.length,n=o.length,m=9-q,w=0,l=0;w=n)return H.k(o,l) +o[l]=0 +i=l+1 +if(i>=n)return H.k(o,i) +o[i]=0 +l+=2}else{i=C.c.W(k,8) +if(l<0||l>=n)return H.k(o,l) +o[l]=i +i=l+1 +if(i>=n)return H.k(o,i) +o[i]=k&255 +l+=2}}return o}, +kX:function(){var z,y,x,w,v +z=P.dz(22,new P.kZ(),!0,P.y) +y=new P.kY(z) +x=new P.l_() +w=new P.l0() +v=H.m(y.$2(0,225),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) +x.$3(v,".",14) +x.$3(v,":",34) +x.$3(v,"/",3) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(14,225),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) +x.$3(v,".",15) +x.$3(v,":",34) +x.$3(v,"/",234) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(15,225),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) +x.$3(v,"%",225) +x.$3(v,":",34) +x.$3(v,"/",9) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(1,225),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) +x.$3(v,":",34) +x.$3(v,"/",10) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(2,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",139) +x.$3(v,"/",131) +x.$3(v,".",146) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(3,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) +x.$3(v,"/",68) +x.$3(v,".",18) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(4,229),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",5) +w.$3(v,"AZ",229) +x.$3(v,":",102) +x.$3(v,"@",68) +x.$3(v,"[",232) +x.$3(v,"/",138) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(5,229),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",5) +w.$3(v,"AZ",229) +x.$3(v,":",102) +x.$3(v,"@",68) +x.$3(v,"/",138) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(6,231),"$iy") +w.$3(v,"19",7) +x.$3(v,"@",68) +x.$3(v,"/",138) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(7,231),"$iy") +w.$3(v,"09",7) +x.$3(v,"@",68) +x.$3(v,"/",138) +x.$3(v,"?",172) +x.$3(v,"#",205) +x.$3(H.m(y.$2(8,8),"$iy"),"]",5) +v=H.m(y.$2(9,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) +x.$3(v,".",16) +x.$3(v,"/",234) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(16,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) +x.$3(v,".",17) +x.$3(v,"/",234) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(17,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) +x.$3(v,"/",9) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(10,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) +x.$3(v,".",18) +x.$3(v,"/",234) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(18,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) +x.$3(v,".",19) +x.$3(v,"/",234) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(19,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) +x.$3(v,"/",234) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(11,235),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) +x.$3(v,"/",10) +x.$3(v,"?",172) +x.$3(v,"#",205) +v=H.m(y.$2(12,236),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",12) +x.$3(v,"?",12) +x.$3(v,"#",205) +v=H.m(y.$2(13,237),"$iy") +x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",13) +x.$3(v,"?",13) +w.$3(H.m(y.$2(20,245),"$iy"),"az",21) +v=H.m(y.$2(21,245),"$iy") +w.$3(v,"az",21) +w.$3(v,"09",21) +x.$3(v,"+-.",21) +return z}, +eG:function(a,b,c,d,e){var z,y,x,w,v +H.l(e,"$if",[P.c],"$af") +z=$.fn() +for(y=b;y=z.length)return H.k(z,d) +x=z[d] +w=C.a.n(a,y)^96 +if(w>95)w=31 +if(w>=x.length)return H.k(x,w) +v=x[w] +d=v&31 +C.b.l(e,v>>>5,y)}return d}, +H:{"^":"b;"}, +"+bool":0, +dl:{"^":"b;a,b", +J:function(a,b){if(b==null)return!1 +return b instanceof P.dl&&this.a===b.a&&this.b===b.b}, +gA:function(a){var z=this.a +return(z^C.c.W(z,30))&1073741823}, +h:function(a){var z,y,x,w,v,u,t +z=P.hj(H.iw(this)) +y=P.bc(H.iu(this)) +x=P.bc(H.iq(this)) +w=P.bc(H.ir(this)) +v=P.bc(H.it(this)) +u=P.bc(H.iv(this)) +t=P.hk(H.is(this)) +if(this.b)return z+"-"+y+"-"+x+" "+w+":"+v+":"+u+"."+t+"Z" +else return z+"-"+y+"-"+x+" "+w+":"+v+":"+u+"."+t}, +p:{ +hj:function(a){var z,y +z=Math.abs(a) +y=a<0?"-":"" +if(z>=1000)return""+a +if(z>=100)return y+"0"+z +if(z>=10)return y+"00"+z +return y+"000"+z}, +hk:function(a){if(a>=100)return""+a +if(a>=10)return"0"+a +return"00"+a}, +bc:function(a){if(a>=10)return""+a +return"0"+a}}}, +b4:{"^":"d1;"}, +"+double":0, +K:{"^":"b;"}, +bH:{"^":"K;", +h:function(a){return"Throw of null."}}, +as:{"^":"K;a,b,c,S:d>", +gbn:function(){return"Invalid argument"+(!this.a?"(s)":"")}, +gbm:function(){return""}, +h:function(a){var z,y,x,w,v,u +z=this.c +y=z!=null?" ("+z+")":"" +z=this.d +x=z==null?"":": "+H.e(z) +w=this.gbn()+y+x +if(!this.a)return w +v=this.gbm() +u=P.bd(this.b) +return w+v+": "+u}, +p:{ +N:function(a){return new P.as(!1,null,null,a)}, +aS:function(a,b,c){return new P.as(!0,a,b,c)}}}, +bi:{"^":"as;e,f,a,b,c,d", +gbn:function(){return"RangeError"}, +gbm:function(){var z,y,x +z=this.e +if(z==null){z=this.f +y=z!=null?": Not less than or equal to "+H.e(z):""}else{x=this.f +if(x==null)y=": Not greater than or equal to "+H.e(z) +else if(x>z)y=": Not in range "+H.e(z)+".."+H.e(x)+", inclusive" +else y=xc)throw H.a(P.z(a,b,c,d,e))}, +a8:function(a,b,c,d,e,f){if(typeof a!=="number")return H.E(a) +if(0>a||a>c)throw H.a(P.z(a,0,c,"start",f)) +if(b!=null){if(a>b||b>c)throw H.a(P.z(b,a,c,"end",f)) +return b}return c}}}, +hK:{"^":"as;e,i:f>,a,b,c,d", +gbn:function(){return"RangeError"}, +gbm:function(){var z,y +z=H.w(this.b) +if(typeof z!=="number")return z.D() +if(z<0)return": index must not be negative" +y=this.f +if(y===0)return": no indices are valid" +return": index should be less than "+H.e(y)}, +p:{ +ce:function(a,b,c,d,e){var z=H.w(e==null?J.T(b):e) +return new P.hK(b,z,!0,a,c,"Index out of range")}}}, +je:{"^":"K;S:a>", +h:function(a){return"Unsupported operation: "+this.a}, +p:{ +A:function(a){return new P.je(a)}}}, +ja:{"^":"K;S:a>", +h:function(a){var z=this.a +return z!=null?"UnimplementedError: "+z:"UnimplementedError"}, +p:{ +cz:function(a){return new P.ja(a)}}}, +bl:{"^":"K;S:a>", +h:function(a){return"Bad state: "+this.a}, +p:{ +ad:function(a){return new P.bl(a)}}}, +hb:{"^":"K;a", +h:function(a){var z=this.a +if(z==null)return"Concurrent modification during iteration." +return"Concurrent modification during iteration: "+P.bd(z)+"."}, +p:{ +a3:function(a){return new P.hb(a)}}}, +ih:{"^":"b;", +h:function(a){return"Out of Memory"}, +$iK:1}, +dL:{"^":"b;", +h:function(a){return"Stack Overflow"}, +$iK:1}, +hi:{"^":"K;a", +h:function(a){var z=this.a +return z==null?"Reading static variable during its initialization":"Reading static variable '"+z+"' during its initialization"}}, +jS:{"^":"b;S:a>", +h:function(a){return"Exception: "+this.a}}, +cb:{"^":"b;S:a>,aR:b>,G:c>", +h:function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k +z=this.a +y=""!==z?"FormatException: "+z:"FormatException" +x=this.c +w=this.b +if(typeof w==="string"){if(x!=null)z=x<0||x>w.length +else z=!1 +if(z)x=null +if(x==null){v=w.length>78?C.a.k(w,0,75)+"...":w +return y+"\n"+v}for(u=1,t=0,s=!1,r=0;r1?y+(" (at line "+u+", character "+(x-t+1)+")\n"):y+(" (at character "+(x+1)+")\n") +p=w.length +for(r=x;r78)if(x-t<75){o=t+75 +n=t +m="" +l="..."}else{if(p-x<75){n=p-75 +o=p +l=""}else{n=x-36 +o=x+36 +l="..."}m="..."}else{o=p +n=t +m="" +l=""}k=C.a.k(w,n,o) +return y+m+k+l+"\n"+C.a.U(" ",x-n+m.length)+"^\n"}else return x!=null?y+(" (at offset "+H.e(x)+")"):y}, +p:{ +C:function(a,b,c){return new P.cb(a,b,c)}}}, +c:{"^":"d1;"}, +"+int":0, +p:{"^":"b;$ti", +a8:function(a,b){return P.co(this,b,H.v(this,"p",0))}, +b7:function(a){return this.a8(a,!0)}, +gi:function(a){var z,y +z=this.gK(this) +for(y=0;z.q();)++y +return y}, +gE:function(a){return!this.gK(this).q()}, +gbO:function(a){return!this.gE(this)}, +a_:function(a,b){return H.dK(this,b,H.v(this,"p",0))}, +X:function(a,b){var z,y,x +if(b<0)H.t(P.z(b,0,null,"index",null)) +for(z=this.gK(this),y=0;z.q();){x=z.gB() +if(b===y)return x;++y}throw H.a(P.ce(b,this,"index",null,y))}, +h:function(a){return P.hM(this,"(",")")}}, +Y:{"^":"b;$ti"}, +f:{"^":"b;$ti",$iI:1,$ip:1}, +"+List":0, +x:{"^":"b;", +gA:function(a){return P.b.prototype.gA.call(this,this)}, +h:function(a){return"null"}}, +"+Null":0, +d1:{"^":"b;"}, +"+num":0, +b:{"^":";", +J:function(a,b){return this===b}, +gA:function(a){return H.au(this)}, +h:function(a){return"Instance of '"+H.aX(this)+"'"}, +toString:function(){return this.h(this)}}, +ac:{"^":"b;"}, +D:{"^":"b;"}, +d:{"^":"b;",$icu:1}, +"+String":0, +S:{"^":"b;a", +gi:function(a){return this.a.length}, +h:function(a){var z=this.a +return z.charCodeAt(0)==0?z:z}, +$img:1, +p:{ +bM:function(a,b,c){var z=J.bb(b) +if(!z.q())return a +if(c.length===0){do a+=H.e(z.gB()) +while(z.q())}else{a+=H.e(z.gB()) +for(;z.q();)a=a+c+H.e(z.gB())}return a}}}, +jh:{"^":"h:18;a", +$2:function(a,b){throw H.a(P.C("Illegal IPv4 address, "+a,this.a,b))}}, +ji:{"^":"h:19;a", +$2:function(a,b){throw H.a(P.C("Illegal IPv6 address, "+a,this.a,b))}, +$1:function(a){return this.$2(a,null)}}, +jj:{"^":"h:20;a,b", +$2:function(a,b){var z +if(b-a>4)this.a.$2("an IPv6 part can only contain a maximum of 4 hex digits",a) +z=P.bt(C.a.k(this.b,a,b),null,16) +if(typeof z!=="number")return z.D() +if(z<0||z>65535)this.a.$2("each part must be in the range of `0x0..0xFFFF`",a) +return z}}, +bp:{"^":"b;O:a<,b,c,d,T:e>,f,r,0x,0y,0z,0Q,0ch", +sdP:function(a){this.x=H.l(a,"$if",[P.d],"$af")}, +gaM:function(){return this.b}, +ga1:function(a){var z=this.c +if(z==null)return"" +if(C.a.N(z,"["))return C.a.k(z,1,z.length-1) +return z}, +gau:function(a){var z=this.d +if(z==null)return P.ei(this.a) +return z}, +gao:function(){var z=this.f +return z==null?"":z}, +gb2:function(){var z=this.r +return z==null?"":z}, +gbT:function(){var z,y,x,w,v +z=this.x +if(z!=null)return z +y=this.e +if(y.length!==0&&C.a.n(y,0)===47)y=C.a.F(y,1) +if(y==="")z=C.n +else{x=P.d +w=H.o(y.split("/"),[x]) +v=H.i(w,0) +z=P.dA(new H.dC(w,H.j(P.lq(),{func:1,ret:null,args:[v]}),[v,null]),x)}this.sdP(z) +return z}, +dF:function(a,b){var z,y,x,w,v,u +for(z=0,y=0;C.a.H(b,"../",y);){y+=3;++z}x=C.a.cL(a,"/") +while(!0){if(!(x>0&&z>0))break +w=C.a.b4(a,"/",x-1) +if(w<0)break +v=x-w +u=v!==2 +if(!u||v===3)if(C.a.v(a,w+1)===46)u=!u||C.a.v(a,w+2)===46 +else u=!1 +else u=!1 +if(u)break;--z +x=w}return C.a.ap(a,x+1,null,C.a.F(b,y-3*z))}, +cQ:function(a){return this.aL(P.bQ(a,0,null))}, +aL:function(a){var z,y,x,w,v,u,t,s,r +if(a.gO().length!==0){z=a.gO() +if(a.gaE()){y=a.gaM() +x=a.ga1(a) +w=a.gaF()?a.gau(a):null}else{y="" +x=null +w=null}v=P.ay(a.gT(a)) +u=a.gas()?a.gao():null}else{z=this.a +if(a.gaE()){y=a.gaM() +x=a.ga1(a) +w=P.cH(a.gaF()?a.gau(a):null,z) +v=P.ay(a.gT(a)) +u=a.gas()?a.gao():null}else{y=this.b +x=this.c +w=this.d +if(a.gT(a)===""){v=this.e +u=a.gas()?a.gao():this.f}else{if(a.gbK())v=P.ay(a.gT(a)) +else{t=this.e +if(t.length===0)if(x==null)v=z.length===0?a.gT(a):P.ay(a.gT(a)) +else v=P.ay("/"+a.gT(a)) +else{s=this.dF(t,a.gT(a)) +r=z.length===0 +if(!r||x!=null||C.a.N(t,"/"))v=P.ay(s) +else v=P.cI(s,!r||x!=null)}}u=a.gas()?a.gao():null}}}return new P.bp(z,y,x,w,v,u,a.gbL()?a.gb2():null)}, +gaE:function(){return this.c!=null}, +gaF:function(){return this.d!=null}, +gas:function(){return this.f!=null}, +gbL:function(){return this.r!=null}, +gbK:function(){return C.a.N(this.e,"/")}, +c_:function(a){var z,y +z=this.a +if(z!==""&&z!=="file")throw H.a(P.A("Cannot extract a file path from a "+H.e(z)+" URI")) +z=this.f +if((z==null?"":z)!=="")throw H.a(P.A("Cannot extract a file path from a URI with a query component")) +z=this.r +if((z==null?"":z)!=="")throw H.a(P.A("Cannot extract a file path from a URI with a fragment component")) +a=$.d6() +if(a)z=P.ev(this) +else{if(this.c!=null&&this.ga1(this)!=="")H.t(P.A("Cannot extract a non-Windows file path from a file URI with an authority")) +y=this.gbT() +P.kH(y,!1) +z=P.bM(C.a.N(this.e,"/")?"/":"",y,"/") +z=z.charCodeAt(0)==0?z:z}return z}, +bZ:function(){return this.c_(null)}, +h:function(a){var z,y,x,w +z=this.y +if(z==null){z=this.a +y=z.length!==0?H.e(z)+":":"" +x=this.c +w=x==null +if(!w||z==="file"){z=y+"//" +y=this.b +if(y.length!==0)z=z+H.e(y)+"@" +if(!w)z+=x +y=this.d +if(y!=null)z=z+":"+H.e(y)}else z=y +z+=this.e +y=this.f +if(y!=null)z=z+"?"+y +y=this.r +if(y!=null)z=z+"#"+y +z=z.charCodeAt(0)==0?z:z +this.y=z}return z}, +J:function(a,b){var z,y +if(b==null)return!1 +if(this===b)return!0 +if(!!J.q(b).$ibP)if(this.a==b.gO())if(this.c!=null===b.gaE())if(this.b==b.gaM())if(this.ga1(this)==b.ga1(b))if(this.gau(this)==b.gau(b))if(this.e===b.gT(b)){z=this.f +y=z==null +if(!y===b.gas()){if(y)z="" +if(z===b.gao()){z=this.r +y=z==null +if(!y===b.gbL()){if(y)z="" +z=z===b.gb2()}else z=!1}else z=!1}else z=!1}else z=!1 +else z=!1 +else z=!1 +else z=!1 +else z=!1 +else z=!1 +else z=!1 +return z}, +gA:function(a){var z=this.z +if(z==null){z=C.a.gA(this.h(0)) +this.z=z}return z}, +$ibP:1, +p:{ +kE:function(a,b,c,d,e,f,g,h,i,j){var z,y,x,w,v,u,t +if(j==null)if(d>b)j=P.eq(a,b,d) +else{if(d===b)P.aZ(a,b,"Invalid empty scheme") +j=""}if(e>b){z=d+3 +y=z?\\\\|]',!0,!1) +y.length +if(H.eY(y,x,0)){z=P.A("Illegal character in path: "+H.e(y)) +throw H.a(z)}}}, +kJ:function(a,b){var z +if(!(65<=a&&a<=90))z=97<=a&&a<=122 +else z=!0 +if(z)return +z=P.A("Illegal drive letter "+P.j1(a)) +throw H.a(z)}, +cH:function(a,b){if(a!=null&&a===P.ei(b))return +return a}, +en:function(a,b,c,d){var z,y +if(a==null)return +if(b===c)return"" +if(C.a.v(a,b)===91){if(typeof c!=="number")return c.V() +z=c-1 +if(C.a.v(a,z)!==93)P.aZ(a,b,"Missing end `]` to match `[` in host") +P.dU(a,b+1,z) +return C.a.k(a,b,c).toLowerCase()}if(typeof c!=="number")return H.E(c) +y=b +for(;y>>4 +if(t>=8)return H.k(C.E,t) +t=(C.E[t]&1<<(v&15))!==0}else t=!1 +if(t){if(w&&65<=v&&90>=v){if(x==null)x=new P.S("") +if(y>>4 +if(t>=8)return H.k(C.i,t) +t=(C.i[t]&1<<(v&15))!==0}else t=!1 +if(t)P.aZ(a,z,"Invalid character") +else{if((v&64512)===55296&&z+1>>4 +if(w>=8)return H.k(C.k,w) +w=(C.k[w]&1<<(x&15))!==0}else w=!1 +if(!w)P.aZ(a,z,"Illegal scheme character") +if(65<=x&&x<=90)y=!0}a=C.a.k(a,b,c) +return P.kG(y?a.toLowerCase():a)}, +kG:function(a){if(a==="http")return"http" +if(a==="file")return"file" +if(a==="https")return"https" +if(a==="package")return"package" +return a}, +er:function(a,b,c){if(a==null)return"" +return P.b_(a,b,c,C.a1,!1)}, +eo:function(a,b,c,d,e,f){var z,y,x +z=e==="file" +y=z||f +x=P.b_(a,b,c,C.F,!0) +if(x.length===0){if(z)return"/"}else if(y&&!C.a.N(x,"/"))x="/"+x +return P.kL(x,e,f)}, +kL:function(a,b,c){var z=b.length===0 +if(z&&!c&&!C.a.N(a,"/"))return P.cI(a,!z||c) +return P.ay(a)}, +ep:function(a,b,c,d){if(a!=null)return P.b_(a,b,c,C.j,!0) +return}, +em:function(a,b,c){if(a==null)return +return P.b_(a,b,c,C.j,!0)}, +eu:function(a,b,c){var z,y,x,w,v,u +z=b+2 +if(z>=a.length)return"%" +y=C.a.v(a,b+1) +x=C.a.v(a,z) +w=H.bX(y) +v=H.bX(x) +if(w<0||v<0)return"%" +u=w*16+v +if(u<127){z=C.c.W(u,4) +if(z>=8)return H.k(C.D,z) +z=(C.D[z]&1<<(u&15))!==0}else z=!1 +if(z)return H.J(c&&65<=u&&90>=u?(u|32)>>>0:u) +if(y>=97||x>=97)return C.a.k(a,b,b+3).toUpperCase() +return}, +ej:function(a){var z,y,x,w,v,u +if(a<128){z=new Array(3) +z.fixed$length=Array +y=H.o(z,[P.c]) +C.b.l(y,0,37) +C.b.l(y,1,C.a.n("0123456789ABCDEF",a>>>4)) +C.b.l(y,2,C.a.n("0123456789ABCDEF",a&15))}else{if(a>2047)if(a>65535){x=240 +w=4}else{x=224 +w=3}else{x=192 +w=2}z=new Array(3*w) +z.fixed$length=Array +y=H.o(z,[P.c]) +for(v=0;--w,w>=0;x=128){u=C.c.dX(a,6*w)&63|x +C.b.l(y,v,37) +C.b.l(y,v+1,C.a.n("0123456789ABCDEF",u>>>4)) +C.b.l(y,v+2,C.a.n("0123456789ABCDEF",u&15)) +v+=3}}return P.aI(y,0,null)}, +b_:function(a,b,c,d,e){var z=P.et(a,b,c,H.l(d,"$if",[P.c],"$af"),e) +return z==null?C.a.k(a,b,c):z}, +et:function(a,b,c,d,e){var z,y,x,w,v,u,t,s,r +H.l(d,"$if",[P.c],"$af") +z=!e +y=b +x=y +w=null +while(!0){if(typeof y!=="number")return y.D() +if(typeof c!=="number")return H.E(c) +if(!(y>>4 +if(u>=8)return H.k(d,u) +u=(d[u]&1<<(v&15))!==0}else u=!1 +if(u)++y +else{if(v===37){t=P.eu(a,y,!1) +if(t==null){y+=3 +break c$0}if("%"===t){t="%25" +s=1}else s=3}else{if(z)if(v<=93){u=v>>>4 +if(u>=8)return H.k(C.i,u) +u=(C.i[u]&1<<(v&15))!==0}else u=!1 +else u=!1 +if(u){P.aZ(a,y,"Invalid character") +t=null +s=null}else{if((v&64512)===55296){u=y+1 +if(u=t)return H.k(z,-1) +z.pop() +if(z.length===0)C.b.m(z,"")}w=!0}else if("."===u)w=!0 +else{C.b.m(z,u) +w=!1}}if(w)C.b.m(z,"") +return C.b.b3(z,"/")}, +cI:function(a,b){var z,y,x,w,v,u +if(!P.es(a))return!b?P.ek(a):a +z=H.o([],[P.d]) +for(y=a.split("/"),x=y.length,w=!1,v=0;v=z.length)return H.k(z,-1) +z.pop() +w=!0}else{C.b.m(z,"..") +w=!1}else if("."===u)w=!0 +else{C.b.m(z,u) +w=!1}}y=z.length +if(y!==0)if(y===1){if(0>=y)return H.k(z,0) +y=z[0].length===0}else y=!1 +else y=!0 +if(y)return"./" +if(w||C.b.ga7(z)==="..")C.b.m(z,"") +if(!b){if(0>=z.length)return H.k(z,0) +C.b.l(z,0,P.ek(z[0]))}return C.b.b3(z,"/")}, +ek:function(a){var z,y,x,w +z=a.length +if(z>=2&&P.el(J.c2(a,0)))for(y=1;y>>4 +if(w>=8)return H.k(C.k,w) +w=(C.k[w]&1<<(x&15))===0}else w=!0 +if(w)break}return a}, +ev:function(a){var z,y,x,w,v +z=a.gbT() +y=z.length +if(y>0&&J.T(z[0])===2&&J.bw(z[0],1)===58){if(0>=y)return H.k(z,0) +P.kJ(J.bw(z[0],0),!1) +P.eh(z,!1,1) +x=!0}else{P.eh(z,!1,0) +x=!1}w=a.gbK()&&!x?"\\":"" +if(a.gaE()){v=a.ga1(a) +if(v.length!==0)w=w+"\\"+H.e(v)+"\\"}w=P.bM(w,z,"\\") +y=x&&y===1?w+"\\":w +return y.charCodeAt(0)==0?y:y}, +kK:function(a,b){var z,y,x +for(z=0,y=0;y<2;++y){x=C.a.n(a,b+y) +if(48<=x&&x<=57)z=z*16+x-48 +else{x|=32 +if(97<=x&&x<=102)z=z*16+x-87 +else throw H.a(P.N("Invalid URL encoding"))}}return z}, +cJ:function(a,b,c,d,e){var z,y,x,w,v,u +y=J.a6(a) +x=b +while(!0){if(!(x127)throw H.a(P.N("Illegal percent encoding in URI")) +if(w===37){if(x+3>a.length)throw H.a(P.N("Truncated URI")) +C.b.m(u,P.kK(a,x+1)) +x+=2}else C.b.m(u,w)}}H.l(u,"$if",[P.c],"$af") +return new P.jm(!1).Z(u)}, +el:function(a){var z=a|32 +return 97<=z&&z<=122}}}, +kF:{"^":"h:9;a,b", +$1:function(a){var z=this.b +if(typeof z!=="number")return z.t() +throw H.a(P.C("Invalid port",this.a,z+1))}}, +kI:{"^":"h:9;a", +$1:function(a){H.r(a) +if(J.fx(a,"/"))if(this.a)throw H.a(P.N("Illegal path character "+a)) +else throw H.a(P.A("Illegal path character "+a))}}, +jf:{"^":"b;a,b,c", +gcU:function(){var z,y,x,w,v +z=this.c +if(z!=null)return z +z=this.b +if(0>=z.length)return H.k(z,0) +y=this.a +z=z[0]+1 +x=C.a.am(y,"?",z) +w=y.length +if(x>=0){v=P.b_(y,x+1,w,C.j,!1) +w=x}else v=null +z=new P.jO(this,"data",null,null,null,P.b_(y,z,w,C.F,!1),v,null) +this.c=z +return z}, +h:function(a){var z,y +z=this.b +if(0>=z.length)return H.k(z,0) +y=this.a +return z[0]===-1?"data:"+y:y}, +p:{ +dT:function(a,b,c){var z,y,x,w,v,u,t,s,r +z=H.o([b-1],[P.c]) +for(y=a.length,x=b,w=-1,v=null;xb)throw H.a(P.C("Invalid MIME type",a,x)) +for(;v!==44;){C.b.m(z,x);++x +for(u=-1;x=0)C.b.m(z,u) +else{t=C.b.ga7(z) +if(v!==44||x!==t+7||!C.a.H(a,"base64",t+1))throw H.a(P.C("Expecting '='",a,x)) +break}}C.b.m(z,x) +s=x+1 +if((z.length&1)===1)a=C.H.eK(a,s,y) +else{r=P.et(a,s,y,C.j,!0) +if(r!=null)a=C.a.ap(a,s,y,r)}return new P.jf(a,z,c)}}}, +kZ:{"^":"h:22;", +$1:function(a){return new Uint8Array(96)}}, +kY:{"^":"h:23;a", +$2:function(a,b){var z=this.a +if(a>=z.length)return H.k(z,a) +z=z[a] +J.fy(z,0,96,b) +return z}}, +l_:{"^":"h;", +$3:function(a,b,c){var z,y,x +for(z=b.length,y=0;y=a.length)return H.k(a,x) +a[x]=c}}}, +l0:{"^":"h;", +$3:function(a,b,c){var z,y,x +for(z=C.a.n(b,0),y=C.a.n(b,1);z<=y;++z){x=(z^96)>>>0 +if(x>=a.length)return H.k(a,x) +a[x]=c}}}, +ao:{"^":"b;a,b,c,d,e,f,r,x,0y", +gaE:function(){return this.c>0}, +gaF:function(){var z,y +if(this.c>0){z=this.d +if(typeof z!=="number")return z.t() +y=this.e +if(typeof y!=="number")return H.E(y) +y=z+1y?C.a.k(this.a,y,z-1):""}, +ga1:function(a){var z=this.c +return z>0?C.a.k(this.a,z,this.d):""}, +gau:function(a){var z +if(this.gaF()){z=this.d +if(typeof z!=="number")return z.t() +return P.bt(C.a.k(this.a,z+1,this.e),null,null)}if(this.gbq())return 80 +if(this.gbr())return 443 +return 0}, +gT:function(a){return C.a.k(this.a,this.e,this.f)}, +gao:function(){var z,y +z=this.f +y=this.r +if(typeof z!=="number")return z.D() +return z=y.length)return this +return new P.ao(C.a.k(y,0,z),this.b,this.c,this.d,this.e,this.f,z,this.x)}, +cQ:function(a){return this.aL(P.bQ(a,0,null))}, +aL:function(a){if(a instanceof P.ao)return this.dY(this,a) +return this.cv().aL(a)}, +dY:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k +z=b.b +if(z>0)return b +y=b.c +if(y>0){x=a.b +if(x<=0)return b +if(a.gbp())w=b.e!=b.f +else if(a.gbq())w=!b.cl("80") +else w=!a.gbr()||!b.cl("443") +if(w){v=x+1 +u=C.a.k(a.a,0,v)+C.a.F(b.a,z+1) +z=b.d +if(typeof z!=="number")return z.t() +t=b.e +if(typeof t!=="number")return t.t() +s=b.f +if(typeof s!=="number")return s.t() +return new P.ao(u,x,y+v,z+v,t+v,s+v,b.r+v,a.x)}else return this.cv().aL(b)}r=b.e +z=b.f +if(r==z){y=b.r +if(typeof z!=="number")return z.D() +if(z0){for(;C.a.H(y,"../",r);){if(typeof r!=="number")return r.t() +r+=3}if(typeof q!=="number")return q.V() +if(typeof r!=="number")return H.E(r) +v=q-r+1 +u=C.a.k(a.a,0,q)+"/"+C.a.F(y,r) +if(typeof z!=="number")return z.t() +return new P.ao(u,a.b,a.c,a.d,q,z+v,b.r+v,a.x)}o=a.a +for(n=q;C.a.H(o,"../",n);){if(typeof n!=="number")return n.t() +n+=3}m=0 +while(!0){if(typeof r!=="number")return r.t() +l=r+3 +if(typeof z!=="number")return H.E(z) +if(!(l<=z&&C.a.H(y,"../",r)))break;++m +r=l}k="" +while(!0){if(typeof p!=="number")return p.ay() +if(typeof n!=="number")return H.E(n) +if(!(p>n))break;--p +if(C.a.v(o,p)===47){if(m===0){k="/" +break}--m +k="/"}}if(p===n&&a.b<=0&&!C.a.H(o,"/",q)){r-=m*3 +k=""}v=p-r+k.length +return new P.ao(C.a.k(o,0,p)+k+C.a.F(y,r),a.b,a.c,a.d,q,z+v,b.r+v,a.x)}, +c_:function(a){var z,y,x +if(this.b>=0&&!this.gbp())throw H.a(P.A("Cannot extract a file path from a "+H.e(this.gO())+" URI")) +z=this.f +y=this.a +if(typeof z!=="number")return z.D() +if(z0?this.ga1(this):null +w=this.gaF()?this.gau(this):null +v=this.a +u=this.f +t=C.a.k(v,this.e,u) +s=this.r +if(typeof u!=="number")return u.D() +u=u=x.length)return H.k(x,v) +u=x[v] +z.a=u +if(u!=null)return u +u=P.i2() +z.a=u +C.b.l(x,v,u) +this.ev(a,new P.jy(z,this)) +return z.a}if(a instanceof Array){t=a +v=this.cH(t) +x=this.b +if(v>=x.length)return H.k(x,v) +u=x[v] +if(u!=null)return u +s=J.a0(t) +r=s.gi(t) +u=this.c?new Array(r):t +C.b.l(x,v,u) +for(x=J.bq(u),q=0;q=z.length)return H.k(z,-1) +z.pop()}z=y.a +return z.charCodeAt(0)==0?z:z}, +bs:function(a){var z +if(a==null||H.b3(a,H.v(this,"B",1))){z=this.b.$1(a) +z=z}else z=!1 +return z}, +$iR:1, +$aR:function(a,b,c){return[b,c]}}, +h_:{"^":"h;a", +$2:function(a,b){var z=this.a +H.n(a,H.v(z,"B",1)) +H.n(b,H.v(z,"B",2)) +z.l(0,a,b) +return b}, +$S:function(){var z,y +z=this.a +y=H.v(z,"B",2) +return{func:1,ret:y,args:[H.v(z,"B",1),y]}}}, +h0:{"^":"h;a,b", +$2:function(a,b){var z=this.a +H.n(a,H.v(z,"B",0)) +H.l(b,"$ibg",[H.v(z,"B",1),H.v(z,"B",2)],"$abg") +return this.b.$2(b.a,b.b)}, +$S:function(){var z=this.a +return{func:1,ret:-1,args:[H.v(z,"B",0),[B.bg,H.v(z,"B",1),H.v(z,"B",2)]]}}}, +h1:{"^":"h;a,b,c", +$2:function(a,b){var z=this.b +H.n(a,H.v(z,"B",1)) +H.n(b,H.v(z,"B",2)) +z=this.a +if(!z.a)this.c.a+=", " +z.a=!1 +this.c.a+=H.e(a)+": "+H.e(b)}, +$S:function(){var z=this.b +return{func:1,ret:P.x,args:[H.v(z,"B",1),H.v(z,"B",2)]}}}, +l3:{"^":"h:13;a", +$1:function(a){return this.a===a}}}],["","",,B,{"^":"",bg:{"^":"b;a,b,$ti"}}],["","",,N,{"^":"",ht:{"^":"ai;", +gad:function(){return C.K}, +$aai:function(){return[[P.f,P.c],P.d]}}}],["","",,R,{"^":"", +kW:function(a,b,c){var z,y,x,w,v,u,t,s,r +H.l(a,"$if",[P.c],"$af") +z=new Uint8Array((c-b)*2) +for(y=z.length,x=a.length,w=b,v=0,u=0;w=x)return H.k(a,w) +t=a[w] +if(typeof t!=="number")return H.E(t) +u=(u|t)>>>0 +s=v+1 +r=(t&240)>>>4 +r=r<10?r+48:r+97-10 +if(v>=y)return H.k(z,v) +z[v]=r +v=s+1 +r=t&15 +r=r<10?r+48:r+97-10 +if(s>=y)return H.k(z,s) +z[s]=r}if(u>=0&&u<=255)return P.aI(z,0,null) +for(w=b;w=x)return H.k(a,w) +t=a[w] +if(typeof t!=="number")return t.aO() +if(t>=0&&t<=255)continue +throw H.a(P.C("Invalid byte "+(t<0?"-":"")+"0x"+C.c.aq(Math.abs(t),16)+".",a,w))}throw H.a("unreachable")}, +hu:{"^":"U;", +Z:function(a){H.l(a,"$if",[P.c],"$af") +return R.kW(a,0,a.length)}, +$aU:function(){return[[P.f,P.c],P.d]}}}],["","",,E,{"^":"",fM:{"^":"b;", +b_:function(a,b,c,d,e){return this.dV(a,b,c,d,e)}, +dV:function(a,b,c,d,e){var z=0,y=P.cS(U.bj),x,w=this,v,u,t +var $async$b_=P.cU(function(f,g){if(f===1)return P.cK(g,y) +while(true)switch(z){case 0:b=P.bQ(b,0,null) +v=P.d +u=new O.iD(C.h,new Uint8Array(0),a,b,!0,!0,5,P.dy(new G.fO(),new G.fP(),null,v,v),!1) +u.see(0,d) +t=U +z=3 +return P.bS(w.ah(0,u),$async$b_) +case 3:x=t.iE(g) +z=1 +break +case 1:return P.cL(x,y)}}) +return P.cM($async$b_,y)}}}],["","",,G,{"^":"",fN:{"^":"b;", +fe:["d3",function(){if(this.x)throw H.a(P.ad("Can't finalize a finalized Request.")) +this.x=!0 +return}], +h:function(a){return this.a+" "+H.e(this.b)}},fO:{"^":"h:27;", +$2:function(a,b){H.r(a) +H.r(b) +return a.toLowerCase()===b.toLowerCase()}},fP:{"^":"h:28;", +$1:function(a){return C.a.gA(H.r(a).toLowerCase())}}}],["","",,T,{"^":"",dc:{"^":"b;", +c3:function(a,b,c,d,e,f,g){var z=this.b +if(typeof z!=="number")return z.D() +if(z<100)throw H.a(P.N("Invalid status code "+z+"."))}}}],["","",,O,{"^":"",fR:{"^":"fM;a,b", +ah:function(a,b){var z=0,y=P.cS(X.bL),x,w=2,v,u=[],t=this,s,r,q,p,o,n +var $async$ah=P.cU(function(c,d){if(c===1){v=d +z=w}while(true)switch(z){case 0:b.d3() +q=[P.f,P.c] +z=3 +return P.bS(new Z.dg(P.dO(H.o([b.z],[q]),q)).cT(),$async$ah) +case 3:p=d +s=new XMLHttpRequest() +q=t.a +q.m(0,s) +o=J.ar(b.b) +n=H.m(s,"$ibC");(n&&C.w).eL(n,b.a,o,!0,null,null) +s.responseType="blob" +s.withCredentials=t.b +b.r.I(0,J.fC(s)) +o=X.bL +r=new P.cE(new P.G(0,$.u,[o]),[o]) +o=[W.am] +n=new W.bo(H.m(s,"$iaF"),"load",!1,o) +n.gal(n).aw(new O.fU(s,r,b),null) +o=new W.bo(H.m(s,"$iaF"),"error",!1,o) +o.gal(o).aw(new O.fV(r,b),null) +J.fE(s,p) +w=4 +z=7 +return P.bS(r.a,$async$ah) +case 7:o=d +x=o +u=[1] +z=5 +break +u.push(6) +z=5 +break +case 4:u=[2] +case 5:w=2 +q.eS(0,s) +z=u.pop() +break +case 6:case 1:return P.cL(x,y) +case 2:return P.cK(v,y)}}) +return P.cM($async$ah,y)}, +a4:function(a){var z +for(z=this.a,z=P.e8(z,z.r,H.i(z,0));z.q();)z.d.abort()}},fU:{"^":"h:4;a,b,c", +$1:function(a){var z,y,x,w,v,u,t +H.m(a,"$iam") +z=this.a +y=W.ex(z.response)==null?W.fQ([],null,null):W.ex(z.response) +x=new FileReader() +w=[W.am] +v=new W.bo(x,"load",!1,w) +u=this.b +t=this.c +v.gal(v).aw(new O.fS(x,u,z,t),null) +w=new W.bo(x,"error",!1,w) +w.gal(w).aw(new O.fT(u,t),null) +C.v.eP(x,H.m(y,"$idd"))}},fS:{"^":"h:4;a,b,c,d", +$1:function(a){var z,y,x,w,v,u,t +H.m(a,"$iam") +z=H.d_(C.v.geV(this.a),"$iy") +y=[P.f,P.c] +y=P.dO(H.o([z],[y]),y) +x=this.c +w=x.status +v=z.length +u=this.d +t=C.w.geU(x) +x=x.statusText +y=new X.bL(B.lU(new Z.dg(y)),u,w,x,v,t,!1,!0) +y.c3(w,v,t,!1,!0,x,u) +this.b.a5(0,y)}},fT:{"^":"h:4;a,b", +$1:function(a){this.a.aj(new E.dj(J.ar(H.m(a,"$iam")),this.b.b),P.dM())}},fV:{"^":"h:4;a,b", +$1:function(a){H.m(a,"$iam") +this.a.aj(new E.dj("XMLHttpRequest error.",this.b.b),P.dM())}}}],["","",,Z,{"^":"",dg:{"^":"cy;a", +cT:function(){var z,y,x,w +z=P.y +y=new P.G(0,$.u,[z]) +x=new P.cE(y,[z]) +w=new P.jN(new Z.fZ(x),new Uint8Array(1024),0) +this.af(w.gea(w),!0,w.geh(w),x.gcE()) +return y}, +$aZ:function(){return[[P.f,P.c]]}, +$acy:function(){return[[P.f,P.c]]}},fZ:{"^":"h:46;a", +$1:function(a){return this.a.a5(0,new Uint8Array(H.bU(H.l(a,"$if",[P.c],"$af"))))}}}],["","",,E,{"^":"",dj:{"^":"b;S:a>,b", +h:function(a){return this.a}}}],["","",,O,{"^":"",iD:{"^":"fN;y,z,a,b,0c,d,e,f,r,x", +gbJ:function(a){if(this.gaT()==null||!this.gaT().c.a.ac("charset"))return this.y +return B.lR(this.gaT().c.a.j(0,"charset"))}, +see:function(a,b){var z,y,x +z=H.l(this.gbJ(this).bI(b),"$if",[P.c],"$af") +this.dq() +this.z=B.f2(z) +y=this.gaT() +if(y==null){z=this.gbJ(this) +x=P.d +this.r.l(0,"content-type",R.cq("text","plain",P.bE(["charset",z.gag(z)],x,x)).h(0))}else if(!y.c.a.ac("charset")){z=this.gbJ(this) +x=P.d +this.r.l(0,"content-type",y.ef(P.bE(["charset",z.gag(z)],x,x)).h(0))}}, +gaT:function(){var z=this.r.j(0,"content-type") +if(z==null)return +return R.i7(z)}, +dq:function(){if(!this.x)return +throw H.a(P.ad("Can't modify a finalized Request."))}}}],["","",,U,{"^":"",bj:{"^":"dc;x,a,b,c,d,e,f,r",p:{ +iE:function(a){H.m(a,"$ibL") +return a.x.cT().aw(new U.iF(a),U.bj)}}},iF:{"^":"h:31;a", +$1:function(a){var z,y,x,w,v,u +H.m(a,"$iy") +z=this.a +y=z.b +x=z.a +w=z.e +z=z.c +v=B.f2(a) +u=a.length +v=new U.bj(v,x,y,z,u,w,!1,!0) +v.c3(y,u,w,!1,!0,z,x) +return v}}}],["","",,X,{"^":"",bL:{"^":"dc;x,a,b,c,d,e,f,r"}}],["","",,B,{"^":"", +lR:function(a){var z=P.hn(a) +if(z!=null)return z +throw H.a(P.C('Unsupported encoding "'+H.e(a)+'".',null,null))}, +f2:function(a){var z +H.l(a,"$if",[P.c],"$af") +z=J.q(a) +if(!!z.$iy)return a +if(!!z.$idS){z=a.buffer +z.toString +return H.dD(z,0,null)}return new Uint8Array(H.bU(a))}, +lU:function(a){H.l(a,"$iZ",[[P.f,P.c]],"$aZ") +return a}}],["","",,Z,{"^":"",h2:{"^":"B;a,b,c,$ti", +$aR:function(a){return[P.d,a]}, +$aB:function(a){return[P.d,P.d,a]}, +p:{ +h3:function(a,b){var z=P.d +z=new Z.h2(new Z.h4(),new Z.h5(),new H.aj(0,0,[z,[B.bg,z,b]]),[b]) +z.bB(0,a) +return z}}},h4:{"^":"h:5;", +$1:function(a){return H.r(a).toLowerCase()}},h5:{"^":"h:33;", +$1:function(a){return a!=null}}}],["","",,R,{"^":"",bG:{"^":"b;a,b,c", +eg:function(a,b,c,d,e){var z,y +z=P.d +H.l(c,"$iR",[z,z],"$aR") +y=P.i0(this.c,z,z) +y.bB(0,c) +return R.cq(this.a,this.b,y)}, +ef:function(a){return this.eg(!1,null,a,null,null)}, +h:function(a){var z,y +z=new P.S("") +y=this.a +z.a=y +y+="/" +z.a=y +z.a=y+this.b +y=this.c +y.a.I(0,H.j(new R.ia(z),{func:1,ret:-1,args:[H.i(y,0),H.i(y,1)]})) +y=z.a +return y.charCodeAt(0)==0?y:y}, +p:{ +i7:function(a){return B.lW("media type",a,new R.i8(a),R.bG)}, +cq:function(a,b,c){var z,y,x,w +z=a.toLowerCase() +y=b.toLowerCase() +x=P.d +w=c==null?P.cm(x,x):Z.h3(c,x) +return new R.bG(z,y,new P.jd(w,[x,x]))}}},i8:{"^":"h:34;a", +$0:function(){var z,y,x,w,v,u,t,s,r,q,p,o +z=this.a +y=new X.j_(null,z,0) +x=$.fr() +y.bb(x) +w=$.fq() +y.aD(w) +v=y.gbP().j(0,0) +y.aD("/") +y.aD(w) +u=y.gbP().j(0,0) +y.bb(x) +t=P.d +s=P.cm(t,t) +while(!0){t=C.a.at(";",z,y.c) +y.d=t +r=y.c +y.e=r +q=t!=null +if(q){t=t.gu() +y.c=t +y.e=t}else t=r +if(!q)break +t=x.at(0,z,t) +y.d=t +y.e=y.c +if(t!=null){t=t.gu() +y.c=t +y.e=t}y.aD(w) +if(y.c!==y.e)y.d=null +p=y.d.j(0,0) +y.aD("=") +t=w.at(0,z,y.c) +y.d=t +r=y.c +y.e=r +q=t!=null +if(q){t=t.gu() +y.c=t +y.e=t +r=t}else t=r +if(q){if(t!==r)y.d=null +o=y.d.j(0,0)}else o=N.lw(y,null) +t=x.at(0,z,y.c) +y.d=t +y.e=y.c +if(t!=null){t=t.gu() +y.c=t +y.e=t}s.l(0,p,o)}y.er() +return R.cq(v,u,s)}},ia:{"^":"h:35;a", +$2:function(a,b){var z,y +H.r(a) +H.r(b) +z=this.a +z.a+="; "+H.e(a)+"=" +y=$.fp().b +if(typeof b!=="string")H.t(H.O(b)) +if(y.test(b)){z.a+='"' +y=$.fi() +b.toString +y=z.a+=H.eZ(b,y,H.j(new R.i9(),{func:1,ret:P.d,args:[P.ac]}),null) +z.a=y+'"'}else z.a+=H.e(b)}},i9:{"^":"h:14;", +$1:function(a){return C.a.t("\\",a.j(0,0))}}}],["","",,N,{"^":"", +lw:function(a,b){var z +a.cG($.fm(),"quoted string") +z=a.gbP().j(0,0) +return H.eZ(J.bx(z,1,z.length-1),$.fl(),H.j(new N.lx(),{func:1,ret:P.d,args:[P.ac]}),null)}, +lx:{"^":"h:14;", +$1:function(a){return a.j(0,1)}}}],["","",,B,{"^":"", +lW:function(a,b,c,d){var z,y,x,w,v +H.j(c,{func:1,ret:d}) +try{x=c.$0() +return x}catch(w){x=H.P(w) +v=J.q(x) +if(!!v.$ibJ){z=x +throw H.a(G.iO("Invalid "+a+": "+z.a,z.b,J.da(z)))}else if(!!v.$icb){y=x +throw H.a(P.C("Invalid "+a+' "'+b+'": '+J.fz(y),J.da(y),J.fA(y)))}else throw w}}}],["","",,D,{"^":"", +eO:function(){var z,y,x,w +z=P.cB() +if(J.Q(z,$.ey))return $.cN +$.ey=z +if($.d4()==$.b9()){y=z.cQ(".").h(0) +$.cN=y +return y}else{x=z.bZ() +w=x.length-1 +y=w===0?x:C.a.k(x,0,w) +$.cN=y +return y}}}],["","",,M,{"^":"", +eC:function(a){if(!!J.q(a).$ibP)return a +throw H.a(P.aS(a,"uri","Value must be a String or a Uri"))}, +eJ:function(a,b){var z,y,x,w,v,u,t,s +z=P.d +H.l(b,"$if",[z],"$af") +for(y=b.length,x=1;x=1;y=w){w=y-1 +if(b[w]!=null)break}v=new P.S("") +u=a+"(" +v.a=u +t=H.ae(b,0,y,H.i(b,0)) +s=H.i(t,0) +z=u+new H.dC(t,H.j(new M.lb(),{func:1,ret:z,args:[s]}),[s,z]).b3(0,", ") +v.a=z +v.a=z+("): part "+(x-1)+" was null, but part "+x+" was not.") +throw H.a(P.N(v.h(0)))}}, +he:{"^":"b;a,b", +e9:function(a,b,c,d,e,f,g,h){var z +M.eJ("absolute",H.o([b,c,d,e,f,g,h],[P.d])) +z=this.a +z=z.P(b)>0&&!z.ae(b) +if(z)return b +z=D.eO() +return this.eB(0,z,b,c,d,e,f,g,h)}, +e8:function(a,b){return this.e9(a,b,null,null,null,null,null,null)}, +eB:function(a,b,c,d,e,f,g,h,i){var z,y +z=H.o([b,c,d,e,f,g,h,i],[P.d]) +M.eJ("join",z) +y=H.i(z,0) +return this.eC(new H.dV(z,H.j(new M.hg(),{func:1,ret:P.H,args:[y]}),[y]))}, +eC:function(a){var z,y,x,w,v,u,t,s,r +H.l(a,"$ip",[P.d],"$ap") +for(z=H.i(a,0),y=H.j(new M.hf(),{func:1,ret:P.H,args:[z]}),x=a.gK(a),z=new H.dW(x,y,[z]),y=this.a,w=!1,v=!1,u="";z.q();){t=x.gB() +if(y.ae(t)&&v){s=X.bh(t,y) +r=u.charCodeAt(0)==0?u:u +u=C.a.k(r,0,y.av(r,!0)) +s.b=u +if(y.aI(u))C.b.l(s.e,0,y.gai()) +u=s.h(0)}else if(y.P(t)>0){v=!y.ae(t) +u=H.e(t)}else{if(!(t.length>0&&y.bF(t[0])))if(w)u+=y.gai() +u+=H.e(t)}w=y.aI(t)}return u.charCodeAt(0)==0?u:u}, +c2:function(a,b){var z,y,x +z=X.bh(b,this.a) +y=z.d +x=H.i(y,0) +z.scN(P.co(new H.dV(y,H.j(new M.hh(),{func:1,ret:P.H,args:[x]}),[x]),!0,x)) +y=z.b +if(y!=null)C.b.cK(z.d,0,y) +return z.d}, +bR:function(a){var z +if(!this.dI(a))return a +z=X.bh(a,this.a) +z.bQ() +return z.h(0)}, +dI:function(a){var z,y,x,w,v,u,t,s,r,q +z=this.a +y=z.P(a) +if(y!==0){if(z===$.bv())for(x=0;x0)return this.bR(a) +if(z.P(a)<=0||z.ae(a))a=this.e8(0,a) +if(z.P(a)<=0&&z.P(b)>0)throw H.a(X.dG('Unable to find a path to "'+a+'" from "'+H.e(b)+'".')) +x=X.bh(b,z) +x.bQ() +w=X.bh(a,z) +w.bQ() +y=x.d +if(y.length>0&&J.Q(y[0],"."))return w.h(0) +y=x.b +v=w.b +if(y!=v)y=y==null||v==null||!z.bU(y,v) +else y=!1 +if(y)return w.h(0) +while(!0){y=x.d +if(y.length>0){v=w.d +y=v.length>0&&z.bU(y[0],v[0])}else y=!1 +if(!y)break +C.b.b5(x.d,0) +C.b.b5(x.e,1) +C.b.b5(w.d,0) +C.b.b5(w.e,1)}y=x.d +if(y.length>0&&J.Q(y[0],".."))throw H.a(X.dG('Unable to find a path to "'+a+'" from "'+H.e(b)+'".')) +y=P.d +C.b.bN(w.d,0,P.cn(x.d.length,"..",!1,y)) +C.b.l(w.e,0,"") +C.b.bN(w.e,1,P.cn(x.d.length,z.gai(),!1,y)) +z=w.d +y=z.length +if(y===0)return"." +if(y>1&&J.Q(C.b.ga7(z),".")){C.b.aK(w.d) +z=w.e +C.b.aK(z) +C.b.aK(z) +C.b.m(z,"")}w.b="" +w.cP() +return w.h(0)}, +eQ:function(a){return this.eR(a,null)}, +cO:function(a){var z,y,x +z=M.eC(a) +if(z.gO()==="file"&&this.a==$.b9())return z.h(0) +else if(z.gO()!=="file"&&z.gO()!==""&&this.a!=$.b9())return z.h(0) +y=this.bR(this.a.bS(M.eC(z))) +x=this.eQ(y) +return this.c2(0,x).length>this.c2(0,y).length?y:x}}, +hg:{"^":"h:11;", +$1:function(a){return H.r(a)!=null}}, +hf:{"^":"h:11;", +$1:function(a){return H.r(a)!==""}}, +hh:{"^":"h:11;", +$1:function(a){return H.r(a).length!==0}}, +lb:{"^":"h:5;", +$1:function(a){H.r(a) +return a==null?"null":'"'+a+'"'}}}],["","",,B,{"^":"",cf:{"^":"j3;", +d_:function(a){var z,y +z=this.P(a) +if(z>0)return J.bx(a,0,z) +if(this.ae(a)){if(0>=a.length)return H.k(a,0) +y=a[0]}else y=null +return y}, +bU:function(a,b){return a==b}}}],["","",,X,{"^":"",ii:{"^":"b;a,b,c,d,e", +scN:function(a){this.d=H.l(a,"$if",[P.d],"$af")}, +sd0:function(a){this.e=H.l(a,"$if",[P.d],"$af")}, +cP:function(){var z,y +while(!0){z=this.d +if(!(z.length!==0&&J.Q(C.b.ga7(z),"")))break +C.b.aK(this.d) +C.b.aK(this.e)}z=this.e +y=z.length +if(y>0)C.b.l(z,y-1,"")}, +eJ:function(a){var z,y,x,w,v,u,t,s,r +z=P.d +y=H.o([],[z]) +for(x=this.d,w=x.length,v=0,u=0;u0)y.pop() +else ++v +else C.b.m(y,t)}if(this.b==null)C.b.bN(y,0,P.cn(v,"..",!1,z)) +if(y.length===0&&this.b==null)C.b.m(y,".") +r=P.dz(y.length,new X.ij(this),!0,z) +z=this.b +C.b.cK(r,0,z!=null&&y.length>0&&this.a.aI(z)?this.a.gai():"") +this.scN(y) +this.sd0(r) +z=this.b +if(z!=null&&this.a===$.bv()){z.toString +this.b=H.aP(z,"/","\\")}this.cP()}, +bQ:function(){return this.eJ(!1)}, +h:function(a){var z,y,x +z=this.b +z=z!=null?z:"" +for(y=0;y=x.length)return H.k(x,y) +x=z+H.e(x[y]) +z=this.d +if(y>=z.length)return H.k(z,y) +z=x+H.e(z[y])}z+=H.e(C.b.ga7(this.e)) +return z.charCodeAt(0)==0?z:z}, +p:{ +bh:function(a,b){var z,y,x,w,v,u,t +z=b.d_(a) +y=b.ae(a) +if(z!=null)a=J.fG(a,z.length) +x=[P.d] +w=H.o([],x) +v=H.o([],x) +x=a.length +if(x!==0&&b.a6(C.a.n(a,0))){if(0>=x)return H.k(a,0) +C.b.m(v,a[0]) +u=1}else{C.b.m(v,"") +u=0}for(t=u;t", +h:function(a){return"PathException: "+this.a}, +p:{ +dG:function(a){return new X.ik(a)}}}}],["","",,O,{"^":"", +j4:function(){var z,y,x,w,v,u,t,s,r,q,p +if(P.cB().gO()!=="file")return $.b9() +z=P.cB() +if(!C.a.b1(z.gT(z),"/"))return $.b9() +y=P.eq(null,0,0) +x=P.er(null,0,0) +w=P.en(null,0,0,!1) +v=P.ep(null,0,0,null) +u=P.em(null,0,0) +t=P.cH(null,y) +s=y==="file" +if(w==null)z=x.length!==0||t!=null||s +else z=!1 +if(z)w="" +z=w==null +r=!z +q=P.eo("a/b",0,3,null,y,r) +p=y.length===0 +if(p&&z&&!C.a.N(q,"/"))q=P.cI(q,!p||r) +else q=P.ay(q) +if(new P.bp(y,x,z&&C.a.N(q,"//")?"":w,t,q,v,u).bZ()==="a\\b")return $.bv() +return $.f5()}, +j3:{"^":"b;", +h:function(a){return this.gag(this)}}}],["","",,E,{"^":"",im:{"^":"cf;ag:a>,ai:b<,c,d,e,f,0r", +bF:function(a){return C.a.ar(a,"/")}, +a6:function(a){return a===47}, +aI:function(a){var z=a.length +return z!==0&&J.bw(a,z-1)!==47}, +av:function(a,b){if(a.length!==0&&J.c2(a,0)===47)return 1 +return 0}, +P:function(a){return this.av(a,!1)}, +ae:function(a){return!1}, +bS:function(a){var z +if(a.gO()===""||a.gO()==="file"){z=a.gT(a) +return P.cJ(z,0,z.length,C.h,!1)}throw H.a(P.N("Uri "+a.h(0)+" must have scheme 'file:'."))}}}],["","",,F,{"^":"",jk:{"^":"cf;ag:a>,ai:b<,c,d,e,f,r", +bF:function(a){return C.a.ar(a,"/")}, +a6:function(a){return a===47}, +aI:function(a){var z=a.length +if(z===0)return!1 +if(J.a6(a).v(a,z-1)!==47)return!0 +return C.a.b1(a,"://")&&this.P(a)===z}, +av:function(a,b){var z,y,x,w,v +z=a.length +if(z===0)return 0 +if(J.a6(a).n(a,0)===47)return 1 +for(y=0;y,ai:b<,c,d,e,f,r", +bF:function(a){return C.a.ar(a,"/")}, +a6:function(a){return a===47||a===92}, +aI:function(a){var z=a.length +if(z===0)return!1 +z=J.bw(a,z-1) +return!(z===47||z===92)}, +av:function(a,b){var z,y,x +z=a.length +if(z===0)return 0 +y=J.a6(a).n(a,0) +if(y===47)return 1 +if(y===92){if(z<2||C.a.n(a,1)!==92)return 1 +x=C.a.am(a,"\\",2) +if(x>0){x=C.a.am(a,"\\",x+1) +if(x>0)return x}return z}if(z<3)return 0 +if(!B.eR(y))return 0 +if(C.a.n(a,1)!==58)return 0 +z=C.a.n(a,2) +if(!(z===47||z===92))return 0 +return 3}, +P:function(a){return this.av(a,!1)}, +ae:function(a){return this.P(a)===1}, +bS:function(a){var z,y +if(a.gO()!==""&&a.gO()!=="file")throw H.a(P.N("Uri "+a.h(0)+" must have scheme 'file:'.")) +z=a.gT(a) +if(a.ga1(a)===""){y=z.length +if(y>=3&&C.a.N(z,"/")&&B.eS(z,1)){P.dJ(0,0,y,"startIndex",null) +z=H.lS(z,"/","",0)}}else z="\\\\"+H.e(a.ga1(a))+z +y=H.aP(z,"/","\\") +return P.cJ(y,0,y.length,C.h,!1)}, +ei:function(a,b){var z +if(a===b)return!0 +if(a===47)return b===92 +if(a===92)return b===47 +if((a^b)!==32)return!1 +z=a|32 +return z>=97&&z<=122}, +bU:function(a,b){var z,y,x +if(a==b)return!0 +z=a.length +if(z!==b.length)return!1 +for(y=J.a6(b),x=0;x=65&&a<=90))z=a>=97&&a<=122 +else z=!0 +return z}, +eS:function(a,b){var z,y +z=a.length +y=b+2 +if(z=y)return H.k(z,u) +t=z[u]!==10}else t=!0 +if(t)v=10}if(v===10)C.b.m(x,w+1)}}, +ax:function(a){var z +if(a<0)throw H.a(P.M("Offset may not be negative, was "+a+".")) +else if(a>this.c.length)throw H.a(P.M("Offset "+a+" must not be greater than the number of characters in the file, "+this.gi(this)+".")) +z=this.b +if(a=C.b.ga7(z))return z.length-1 +if(this.dD(a))return this.d +z=this.dk(a)-1 +this.d=z +return z}, +dD:function(a){var z,y,x,w +z=this.d +if(z==null)return!1 +y=this.b +if(z>>>0!==z||z>=y.length)return H.k(y,z) +if(a=x)return H.k(y,w) +w=a=x)return H.k(y,w) +w=a=y)return H.k(z,v) +if(z[v]>a)x=v +else w=v+1}return x}, +cY:function(a,b){var z +if(a<0)throw H.a(P.M("Offset may not be negative, was "+a+".")) +else if(a>this.c.length)throw H.a(P.M("Offset "+a+" must be not be greater than the number of characters in the file, "+this.gi(this)+".")) +b=this.ax(a) +z=C.b.j(this.b,b) +if(z>a)throw H.a(P.M("Line "+H.e(b)+" comes after offset "+a+".")) +return a-z}, +ba:function(a){return this.cY(a,null)}, +cZ:function(a,b){var z,y,x,w +if(typeof a!=="number")return a.D() +if(a<0)throw H.a(P.M("Line may not be negative, was "+a+".")) +else{z=this.b +y=z.length +if(a>=y)throw H.a(P.M("Line "+a+" must be less than the number of lines in the file, "+this.geD()+"."))}x=z[a] +if(x<=this.c.length){w=a+1 +z=w=z[w]}else z=!0 +if(z)throw H.a(P.M("Line "+a+" doesn't have 0 columns.")) +return x}, +aP:function(a){return this.cZ(a,null)}},hq:{"^":"iK;a,G:b>", +gC:function(){return this.a.a}, +gL:function(){return this.a.ax(this.b)}, +gR:function(){return this.a.ba(this.b)}, +p:{ +ca:function(a,b){if(b<0)H.t(P.M("Offset may not be negative, was "+b+".")) +else if(b>a.c.length)H.t(P.M("Offset "+b+" must not be greater than the number of characters in the file, "+a.gi(a)+".")) +return new Y.hq(a,b)}}},jT:{"^":"cw;a,b,c", +gC:function(){return this.a.a}, +gi:function(a){return this.c-this.b}, +gw:function(a){return Y.ca(this.a,this.b)}, +gu:function(){return Y.ca(this.a,this.c)}, +gM:function(a){return P.aI(C.o.aa(this.a.c,this.b,this.c),0,null)}, +gY:function(){var z,y,x,w +z=this.a +y=this.c +x=z.ax(y) +if(z.ba(y)===0&&x!==0){if(y-this.b===0){if(x===z.b.length-1)z="" +else{w=z.aP(x) +if(typeof x!=="number")return x.t() +z=P.aI(C.o.aa(z.c,w,z.aP(x+1)),0,null)}return z}}else if(x===z.b.length-1)y=z.c.length +else{if(typeof x!=="number")return x.t() +y=z.aP(x+1)}return P.aI(C.o.aa(z.c,z.aP(z.ax(this.b)),y),0,null)}, +J:function(a,b){if(b==null)return!1 +if(!J.q(b).$ihs)return this.da(0,b) +return this.b===b.b&&this.c===b.c&&J.Q(this.a.a,b.a.a)}, +gA:function(a){return Y.cw.prototype.gA.call(this,this)}, +$ihs:1, +$icx:1}}],["","",,U,{"^":"",hv:{"^":"b;a,b,c,d,e", +ex:function(){var z,y,x,w,v,u,t,s,r,q,p +$.ap.toString +this.cz("\u2577") +z=this.e +z.a+="\n" +y=this.a +x=B.bW(y.gY(),y.gM(y),y.gw(y).gR()) +w=y.gY() +if(typeof x!=="number")return x.ay() +if(x>0){v=C.a.k(w,0,x-1).split("\n") +u=y.gw(y).gL() +t=v.length +if(typeof u!=="number")return u.V() +s=u-t +for(u=this.c,r=0;rp+1){if(0>=v.length)return H.k(v,-1) +v.pop()}this.e4(C.b.gal(v)) +if(this.c){this.e5(H.ae(v,1,null,H.i(v,0)).eZ(0,p-1)) +if(p<0||p>=v.length)return H.k(v,p) +this.e6(v[p])}this.e7(H.ae(v,p+1,null,H.i(v,0))) +$.ap.toString +this.cz("\u2575") +z=z.a +return z.charCodeAt(0)==0?z:z}, +e4:function(a){var z,y,x,w,v,u,t,s,r,q +z={} +y=this.a +this.aC(y.gw(y).gL()) +x=y.gw(y).gR() +w=a.length +v=Math.min(x,w) +z.a=v +x=y.gu() +x=x.gG(x) +y=y.gw(y) +u=Math.min(v+x-y.gG(y),w) +z.b=u +t=J.bx(a,0,v) +y=this.c +if(y&&this.dE(t)){z=this.e +z.a+=" " +this.ab(new U.hz(this,a)) +z.a+="\n" +return}x=this.e +x.a+=C.a.U(" ",y?3:1) +this.a0(t) +s=C.a.k(a,v,u) +this.ab(new U.hA(this,s)) +this.a0(C.a.F(a,u)) +x.a+="\n" +r=this.bj(t) +q=this.bj(s) +v+=r*3 +z.a=v +z.b=u+(r+q)*3 +this.cw() +if(y){x.a+=" " +this.ab(new U.hB(z,this))}else{x.a+=C.a.U(" ",v+1) +this.ab(new U.hC(z,this))}x.a+="\n"}, +e5:function(a){var z,y,x,w +H.l(a,"$ip",[P.d],"$ap") +z=this.a +z=z.gw(z).gL() +if(typeof z!=="number")return z.t() +y=z+1 +for(z=new H.ak(a,a.gi(a),0,[H.i(a,0)]),x=this.e;z.q();){w=z.d +this.aC(y) +x.a+=" " +this.ab(new U.hD(this,w)) +x.a+="\n";++y}}, +e6:function(a){var z,y,x,w,v +z={} +y=this.a +this.aC(y.gu().gL()) +y=y.gu().gR() +x=a.length +w=Math.min(y,x) +z.a=w +if(this.c&&w===x){z=this.e +z.a+=" " +this.ab(new U.hE(this,a)) +z.a+="\n" +return}y=this.e +y.a+=" " +v=J.bx(a,0,w) +this.ab(new U.hF(this,v)) +this.a0(C.a.F(a,w)) +y.a+="\n" +z.a=w+this.bj(v)*3 +this.cw() +y.a+=" " +this.ab(new U.hG(z,this)) +y.a+="\n"}, +e7:function(a){var z,y,x,w,v +H.l(a,"$ip",[P.d],"$ap") +z=this.a.gu().gL() +if(typeof z!=="number")return z.t() +y=z+1 +for(z=new H.ak(a,a.gi(a),0,[H.i(a,0)]),x=this.e,w=this.c;z.q();){v=z.d +this.aC(y) +x.a+=C.a.U(" ",w?3:1) +this.a0(v) +x.a+="\n";++y}}, +a0:function(a){var z,y,x +for(a.toString,z=new H.aE(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=this.e;z.q();){x=z.d +if(x===9)y.a+=C.a.U(" ",4) +else y.a+=H.J(x)}}, +bA:function(a,b){this.cc(new U.hH(this,b,a),"\x1b[34m")}, +cz:function(a){return this.bA(a,null)}, +aC:function(a){return this.bA(null,a)}, +cw:function(){return this.bA(null,null)}, +bj:function(a){var z,y +for(z=new H.aE(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=0;z.q();)if(z.d===9)++y +return y}, +dE:function(a){var z,y +for(z=new H.aE(a),z=new H.ak(z,z.gi(z),0,[P.c]);z.q();){y=z.d +if(y!==32&&y!==9)return!1}return!0}, +cc:function(a,b){var z,y +H.j(a,{func:1,ret:-1}) +z=this.b +y=z!=null +if(y){z=b==null?z:b +this.e.a+=z}a.$0() +if(y)this.e.a+="\x1b[0m"}, +ab:function(a){return this.cc(a,null)}, +p:{ +hx:function(a){var z,y,x,w,v,u,t +z=a.gM(a) +if(!C.a.ar(z,"\r\n"))return a +y=a.gu() +x=y.gG(y) +for(y=z.length-1,w=0;w,L:c<,R:d<", +bH:function(a){var z=this.a +if(!J.Q(z,a.gC()))throw H.a(P.N('Source URLs "'+H.e(z)+'" and "'+H.e(a.gC())+"\" don't match.")) +return Math.abs(this.b-a.gG(a))}, +J:function(a,b){if(b==null)return!1 +return!!J.q(b).$ibI&&J.Q(this.a,b.gC())&&this.b===b.gG(b)}, +gA:function(a){return J.aD(this.a)+this.b}, +h:function(a){var z,y +z="<"+new H.bO(H.cY(this)).h(0)+": "+this.b+" " +y=this.a +return z+(H.e(y==null?"unknown source":y)+":"+(this.c+1)+":"+(this.d+1))+">"}, +p:{ +bk:function(a,b,c,d){var z,y +z=c==null +y=z?0:c +if(a<0)H.t(P.M("Offset may not be negative, was "+a+".")) +else if(!z&&c<0)H.t(P.M("Line may not be negative, was "+H.e(c)+".")) +else if(b<0)H.t(P.M("Column may not be negative, was "+b+".")) +return new V.bI(d,a,y,b)}}}}],["","",,D,{"^":"",iK:{"^":"b;", +bH:function(a){if(!J.Q(this.a.a,a.gC()))throw H.a(P.N('Source URLs "'+H.e(this.gC())+'" and "'+H.e(a.gC())+"\" don't match.")) +return Math.abs(this.b-a.gG(a))}, +J:function(a,b){if(b==null)return!1 +return!!J.q(b).$ibI&&J.Q(this.a.a,b.gC())&&this.b===b.gG(b)}, +gA:function(a){return J.aD(this.a.a)+this.b}, +h:function(a){var z,y,x,w,v,u +z=this.b +y="<"+new H.bO(H.cY(this)).h(0)+": "+z+" " +x=this.a +w=x.a +v=H.e(w==null?"unknown source":w)+":" +u=x.ax(z) +if(typeof u!=="number")return u.t() +return y+(v+(u+1)+":"+(x.ba(z)+1))+">"}, +$ibI:1}}],["","",,V,{"^":"",iM:{"^":"cw;w:a>,u:b<,M:c>", +dd:function(a,b,c){var z,y,x +z=this.b +y=this.a +if(!J.Q(z.gC(),y.gC()))throw H.a(P.N('Source URLs "'+H.e(y.gC())+'" and "'+H.e(z.gC())+"\" don't match.")) +else if(z.gG(z)'}, +$iiL:1}}],["","",,X,{"^":"",cx:{"^":"iM;d,a,b,c", +gY:function(){return this.d}, +p:{ +bK:function(a,b,c,d){var z=new X.cx(d,a,b,c) +z.dd(a,b,c) +if(!C.a.ar(d,c))H.t(P.N('The context line "'+d+'" must contain "'+c+'".')) +if(B.bW(d,c,a.gR())==null)H.t(P.N('The span text "'+c+'" must start at column '+(a.gR()+1)+' in a line within "'+d+'".')) +return z}}}}],["","",,B,{"^":"", +lt:function(a,b){var z,y +for(z=new H.aE(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=0;z.q();)if(z.d===b)++y +return y}, +bW:function(a,b,c){var z,y,x +if(b.length===0)for(z=0;!0;){y=C.a.am(a,"\n",z) +if(y===-1)return a.length-z>=c?z:null +if(y-z>=c)return z +z=y+1}y=C.a.bM(a,b) +for(;y!==-1;){x=y===0?0:C.a.b4(a,"\n",y-1)+1 +if(c===y-x)return x +y=C.a.am(a,b,y+1)}return}}],["","",,M,{"^":"",iP:{"^":"iT;a,b,c,0d,0e", +de:function(a){var z,y +z=F.ju().f1() +this.d=W.hp(a+"?sseClientId="+z,P.bE(["withCredentials",!0],P.d,null)) +this.e=a+"?sseClientId="+z +y=this.b +new P.cF(y,[H.i(y,0)]).eF(this.gdO(),this.gdN()) +C.u.cB(this.d,"message",this.gdM()) +C.u.cB(this.d,"control",this.gdL()) +y=W.L +W.cG(this.d,"error",H.j(new M.iR(this),{func:1,ret:-1,args:[y]}),!1,y)}, +a4:function(a){this.d.close() +this.a.a4(0) +this.b.a4(0) +this.c.a4(0)}, +fa:[function(a){var z=new P.cD([],[],!1).bG(H.d_(H.m(a,"$iL"),"$icr").data,!0) +if(J.Q(z,"close"))this.a4(0) +else throw H.a(P.A('Illegal Control Message "'+H.e(z)+'"'))},"$1","gdL",4,0,10], +fb:[function(a){this.a.m(0,H.r(C.z.em(0,H.r(new P.cD([],[],!1).bG(H.d_(H.m(a,"$iL"),"$icr").data,!0)),null)))},"$1","gdM",4,0,10], +fc:[function(){this.a4(0)},"$0","gdN",0,0,1], +bv:[function(a){var z=0,y=P.cS(null),x=1,w,v=[],u=this,t,s,r +var $async$bv=P.cU(function(b,c){if(b===1){w=c +z=x}while(true)switch(z){case 0:t=C.z.eo(a,null) +x=3 +z=6 +return P.bS(u.c.b_("POST",u.e,null,t,null),$async$bv) +case 6:x=1 +z=5 +break +case 3:x=2 +r=w +H.P(r) +z=5 +break +case 2:z=1 +break +case 5:return P.cL(null,y) +case 1:return P.cK(w,y)}}) +return P.cM($async$bv,y)},"$1","gdO",4,0,3], +p:{ +iQ:function(a){var z,y,x +z=P.d +y=P.dN(null,null,null,null,!1,z) +z=P.dN(null,null,null,null,!1,z) +x=new O.fR(P.i3(null,null,null,W.bC),!1) +x.b=!0 +x=new M.iP(y,z,x) +x.de(a) +return x}}},iR:{"^":"h:40;a", +$1:function(a){var z,y,x +z=this.a.a +if(z.b>=4)H.t(z.bf()) +y=a==null?new P.bH():a +$.u.toString +x=z.b +if((x&1)!==0)z.aB(y,null) +else if((x&3)===0)z.bl().m(0,new P.e3(y,null))}}}],["","",,R,{"^":"",iT:{"^":"b;"}}],["","",,E,{"^":"",j0:{"^":"bJ;c,a,b", +gaR:function(a){return G.bJ.prototype.gaR.call(this,this)}}}],["","",,X,{"^":"",j_:{"^":"b;a,b,c,0d,0e", +gbP:function(){if(this.c!==this.e)this.d=null +return this.d}, +bb:function(a){var z,y +z=J.fD(a,this.b,this.c) +this.d=z +this.e=this.c +y=z!=null +if(y){z=z.gu() +this.c=z +this.e=z}return y}, +cG:function(a,b){var z,y +if(this.bb(a))return +if(b==null){z=J.q(a) +if(!!z.$iiC){y=a.a +if(!$.fo())y=H.aP(y,"/","\\/") +b="/"+y+"/"}else{z=z.h(a) +z=H.aP(z,"\\","\\\\") +b='"'+H.aP(z,'"','\\"')+'"'}}this.cF(0,"expected "+b+".",0,this.c)}, +aD:function(a){return this.cG(a,null)}, +er:function(){var z=this.c +if(z===this.b.length)return +this.cF(0,"expected no more input.",0,z)}, +eq:function(a,b,c,d,e){var z,y,x,w,v,u,t +z=this.b +if(e<0)H.t(P.M("position must be greater than or equal to 0.")) +else if(e>z.length)H.t(P.M("position must be less than or equal to the string length.")) +y=e+c>z.length +if(y)H.t(P.M("position plus length must not go beyond the end of the string.")) +y=this.a +x=new H.aE(z) +w=H.o([0],[P.c]) +v=new Uint32Array(H.bU(x.b7(x))) +u=new Y.iJ(y,w,v) +u.dc(x,y) +t=e+c +if(t>v.length)H.t(P.M("End "+t+" must not be greater than the number of characters in the file, "+u.gi(u)+".")) +else if(e<0)H.t(P.M("Start may not be negative, was "+e+".")) +throw H.a(new E.j0(z,b,new Y.jT(u,e,t)))}, +cF:function(a,b,c,d){return this.eq(a,b,c,null,d)}}}],["","",,K,{"^":"",j9:{"^":"b;"}}],["","",,F,{"^":"",jt:{"^":"b;0a,0b,0c,d,e,0f,0r", +sdm:function(a){this.f=H.l(a,"$if",[P.d],"$af")}, +sdA:function(a){this.r=H.l(a,"$iR",[P.d,P.c],"$aR")}, +df:function(){var z,y,x,w,v +z=new Array(256) +z.fixed$length=Array +y=P.d +this.sdm(H.o(z,[y])) +z=P.c +this.sdA(new H.aj(0,0,[y,z])) +for(z=[z],y=[P.f,P.c],x=0;x<256;++x){w=H.o([],z) +C.b.m(w,x) +v=this.f +H.n(w,y);(v&&C.b).l(v,x,C.J.gad().Z(w)) +this.r.l(0,this.f[x],x)}z=U.jv(null) +this.a=z +y=z[0] +if(typeof y!=="number")return y.f6() +this.b=[y|1,z[1],z[2],z[3],z[4],z[5]] +y=z[6] +if(typeof y!=="number")return y.f8() +z=z[7] +if(typeof z!=="number")return H.E(z) +this.c=(y<<8|z)&262143}, +f2:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m +z=new Array(16) +z.fixed$length=Array +c=new H.aj(0,0,[null,null]) +y=c.j(0,"clockSeq")!=null?c.j(0,"clockSeq"):this.c +x=c.j(0,"mSecs")!=null?c.j(0,"mSecs"):Date.now() +w=c.j(0,"nSecs")!=null?c.j(0,"nSecs"):this.e+1 +v=J.br(x) +u=v.V(x,this.d) +t=J.ft(w,this.e) +if(typeof t!=="number")return t.f5() +s=J.d8(u,t/1e4) +u=J.br(s) +if(u.D(s,0)&&c.j(0,"clockSeq")==null){t=J.d8(y,1) +if(typeof t!=="number")return t.c1() +y=t&16383}if((u.D(s,0)||v.ay(x,this.d))&&c.j(0,"nSecs")==null)w=0 +if(J.fs(w,1e4))throw H.a(P.dp("uuid.v1(): Can't create more than 10M uuids/sec")) +H.w(x) +this.d=x +H.w(w) +this.e=w +this.c=y +x+=122192928e5 +r=C.c.aQ((x&268435455)*1e4+w,4294967296) +q=b+1 +C.b.l(z,b,C.c.W(r,24)&255) +p=q+1 +C.b.l(z,q,C.c.W(r,16)&255) +q=p+1 +C.b.l(z,p,C.c.W(r,8)&255) +p=q+1 +C.b.l(z,q,r&255) +o=C.c.by(x,4294967296)*1e4&268435455 +q=p+1 +C.b.l(z,p,o>>>8&255) +p=q+1 +C.b.l(z,q,o&255) +q=p+1 +C.b.l(z,p,o>>>24&15|16) +p=q+1 +C.b.l(z,q,o>>>16&255) +q=p+1 +if(typeof y!=="number")return y.d2() +C.b.l(z,p,(C.m.W(y,8)|128)>>>0) +p=q+1 +C.b.l(z,q,y&255) +n=c.j(0,"node")!=null?c.j(0,"node"):this.b +for(v=J.a0(n),m=0;m<6;++m)C.b.l(z,p+m,v.j(n,m)) +v=this.f +v=H.e((v&&C.b).j(v,H.w(z[0]))) +u=this.f +u=v+H.e((u&&C.b).j(u,H.w(z[1]))) +v=this.f +v=u+H.e((v&&C.b).j(v,H.w(z[2]))) +u=this.f +u=v+H.e((u&&C.b).j(u,H.w(z[3])))+"-" +v=this.f +v=u+H.e((v&&C.b).j(v,H.w(z[4]))) +u=this.f +u=v+H.e((u&&C.b).j(u,H.w(z[5])))+"-" +v=this.f +v=u+H.e((v&&C.b).j(v,H.w(z[6]))) +u=this.f +u=v+H.e((u&&C.b).j(u,H.w(z[7])))+"-" +v=this.f +v=u+H.e((v&&C.b).j(v,H.w(z[8]))) +u=this.f +u=v+H.e((u&&C.b).j(u,H.w(z[9])))+"-" +v=this.f +v=u+H.e((v&&C.b).j(v,H.w(z[10]))) +u=this.f +u=v+H.e((u&&C.b).j(u,H.w(z[11]))) +v=this.f +v=u+H.e((v&&C.b).j(v,H.w(z[12]))) +u=this.f +u=v+H.e((u&&C.b).j(u,H.w(z[13]))) +v=this.f +v=u+H.e((v&&C.b).j(v,H.w(z[14]))) +u=this.f +u=v+H.e((u&&C.b).j(u,H.w(z[15]))) +return u}, +f1:function(){return this.f2(null,0,null)}, +p:{ +ju:function(){var z=new F.jt(0,0) +z.df() +return z}}}}],["","",,U,{"^":"", +jv:function(a){var z,y,x,w +z=new Array(16) +z.fixed$length=Array +y=H.o(z,[P.c]) +for(x=null,w=0;w<16;++w){z=w&3 +if(z===0)x=C.c.f_(C.m.eu(C.O.eI()*4294967296)) +if(typeof x!=="number")return x.d2() +C.b.l(y,w,C.c.W(x,z<<3)&255)}return y}}],["","",,E,{"^":"", +eU:function(){var z,y,x +z=M.iQ("/test") +y=J.fB(C.P.eO(document,"button")) +x=H.i(y,0) +W.cG(y.a,y.b,H.j(new E.lL(z),{func:1,ret:-1,args:[x]}),!1,x) +x=z.a +new P.cF(x,[H.i(x,0)]).eE(new E.lM(z))}, +lL:{"^":"h:41;a", +$1:function(a){H.m(a,"$iaW") +this.a.b.a4(0)}}, +lM:{"^":"h:9;a", +$1:function(a){var z=this.a.b +z.m(0,H.n(H.r(a),H.i(z,0)))}}},1],["","",,D,{"^":""}]] +setupProgram(dart,0,0) +J.q=function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.ds.prototype +return J.hP.prototype}if(typeof a=="string")return J.bf.prototype +if(a==null)return J.dt.prototype +if(typeof a=="boolean")return J.hO.prototype +if(a.constructor==Array)return J.at.prototype +if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +return a}if(a instanceof P.b)return a +return J.bs(a)} +J.lA=function(a){if(typeof a=="number")return J.be.prototype +if(typeof a=="string")return J.bf.prototype +if(a==null)return a +if(a.constructor==Array)return J.at.prototype +if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +return a}if(a instanceof P.b)return a +return J.bs(a)} +J.a0=function(a){if(typeof a=="string")return J.bf.prototype +if(a==null)return a +if(a.constructor==Array)return J.at.prototype +if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +return a}if(a instanceof P.b)return a +return J.bs(a)} +J.bq=function(a){if(a==null)return a +if(a.constructor==Array)return J.at.prototype +if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +return a}if(a instanceof P.b)return a +return J.bs(a)} +J.br=function(a){if(typeof a=="number")return J.be.prototype +if(a==null)return a +if(!(a instanceof P.b))return J.bm.prototype +return a} +J.a6=function(a){if(typeof a=="string")return J.bf.prototype +if(a==null)return a +if(!(a instanceof P.b))return J.bm.prototype +return a} +J.b5=function(a){if(a==null)return a +if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +return a}if(a instanceof P.b)return a +return J.bs(a)} +J.cX=function(a){if(a==null)return a +if(!(a instanceof P.b))return J.bm.prototype +return a} +J.d8=function(a,b){if(typeof a=="number"&&typeof b=="number")return a+b +return J.lA(a).t(a,b)} +J.Q=function(a,b){if(a==null)return b==null +if(typeof a!="object")return b!=null&&a===b +return J.q(a).J(a,b)} +J.fs=function(a,b){if(typeof a=="number"&&typeof b=="number")return a>=b +return J.br(a).aO(a,b)} +J.ft=function(a,b){if(typeof a=="number"&&typeof b=="number")return a-b +return J.br(a).V(a,b)} +J.fu=function(a,b,c){return J.bq(a).l(a,b,c)} +J.c2=function(a,b){return J.a6(a).n(a,b)} +J.fv=function(a,b,c,d){return J.b5(a).dU(a,b,c,d)} +J.fw=function(a,b,c,d){return J.b5(a).cC(a,b,c,d)} +J.bw=function(a,b){return J.a6(a).v(a,b)} +J.fx=function(a,b){return J.a0(a).ar(a,b)} +J.d9=function(a,b){return J.bq(a).X(a,b)} +J.fy=function(a,b,c,d){return J.b5(a).es(a,b,c,d)} +J.aD=function(a){return J.q(a).gA(a)} +J.bb=function(a){return J.bq(a).gK(a)} +J.T=function(a){return J.a0(a).gi(a)} +J.fz=function(a){return J.cX(a).gS(a)} +J.fA=function(a){return J.cX(a).gG(a)} +J.fB=function(a){return J.b5(a).gcM(a)} +J.fC=function(a){return J.b5(a).gd1(a)} +J.da=function(a){return J.cX(a).gaR(a)} +J.fD=function(a,b,c){return J.a6(a).at(a,b,c)} +J.fE=function(a,b){return J.b5(a).ah(a,b)} +J.fF=function(a,b){return J.bq(a).a_(a,b)} +J.fG=function(a,b){return J.a6(a).F(a,b)} +J.bx=function(a,b,c){return J.a6(a).k(a,b,c)} +J.fH=function(a,b){return J.br(a).aq(a,b)} +J.ar=function(a){return J.q(a).h(a)} +I.a1=function(a){a.immutable$list=Array +a.fixed$length=Array +return a} +var $=I.p +C.u=W.dn.prototype +C.v=W.hr.prototype +C.P=W.hI.prototype +C.w=W.bC.prototype +C.Q=J.V.prototype +C.b=J.at.prototype +C.c=J.ds.prototype +C.R=J.dt.prototype +C.m=J.be.prototype +C.a=J.bf.prototype +C.Y=J.aV.prototype +C.o=H.ie.prototype +C.l=H.ct.prototype +C.G=J.il.prototype +C.p=J.bm.prototype +C.e=new P.fI(!1) +C.q=new P.fJ(127) +C.I=new P.fL(!1) +C.H=new P.fK(C.I) +C.r=new H.hm([P.x]) +C.J=new N.ht() +C.K=new R.hu() +C.L=new P.ih() +C.M=new K.j9() +C.N=new P.js() +C.t=new P.jP() +C.O=new P.k7() +C.d=new P.kn() +C.S=function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); +} +C.T=function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; +} +C.x=function(hooks) { return hooks; } + +C.U=function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var ua = navigator.userAgent; + if (ua.indexOf("DumpRenderTree") >= 0) return hooks; + if (ua.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; +} +C.V=function() { + var toStringFunction = Object.prototype.toString; + function getTag(o) { + var s = toStringFunction.call(o); + return s.substring(8, s.length - 1); + } + function getUnknownTag(object, tag) { + if (/^HTML[A-Z].*Element$/.test(tag)) { + var name = toStringFunction.call(object); + if (name == "[object Object]") return null; + return "HTMLElement"; + } + } + function getUnknownTagGenericBrowser(object, tag) { + if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement"; + return getUnknownTag(object, tag); + } + function prototypeForTag(tag) { + if (typeof window == "undefined") return null; + if (typeof window[tag] == "undefined") return null; + var constructor = window[tag]; + if (typeof constructor != "function") return null; + return constructor.prototype; + } + function discriminator(tag) { return null; } + var isBrowser = typeof navigator == "object"; + return { + getTag: getTag, + getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, + prototypeForTag: prototypeForTag, + discriminator: discriminator }; +} +C.W=function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Trident/") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "HTMLDDElement": "HTMLElement", + "HTMLDTElement": "HTMLElement", + "HTMLPhraseElement": "HTMLElement", + "Position": "Geoposition" + }; + function getTagIE(o) { + var tag = getTag(o); + var newTag = quickMap[tag]; + if (newTag) return newTag; + if (tag == "Object") { + if (window.DataView && (o instanceof window.DataView)) return "DataView"; + } + return tag; + } + function prototypeForTagIE(tag) { + var constructor = window[tag]; + if (constructor == null) return null; + return constructor.prototype; + } + hooks.getTag = getTagIE; + hooks.prototypeForTag = prototypeForTagIE; +} +C.X=function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; +} +C.y=function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); +} +C.z=new P.hS(null,null) +C.Z=new P.hU(null) +C.a_=new P.hV(null,null) +C.f=new P.hW(!1) +C.A=new P.hX(255) +C.B=H.o(I.a1([127,2047,65535,1114111]),[P.c]) +C.i=H.o(I.a1([0,0,32776,33792,1,10240,0,0]),[P.c]) +C.j=H.o(I.a1([0,0,65490,45055,65535,34815,65534,18431]),[P.c]) +C.k=H.o(I.a1([0,0,26624,1023,65534,2047,65534,2047]),[P.c]) +C.a0=H.o(I.a1(["/","\\"]),[P.d]) +C.C=H.o(I.a1(["/"]),[P.d]) +C.n=H.o(I.a1([]),[P.d]) +C.a1=H.o(I.a1([0,0,32722,12287,65534,34815,65534,18431]),[P.c]) +C.D=H.o(I.a1([0,0,24576,1023,65534,34815,65534,18431]),[P.c]) +C.E=H.o(I.a1([0,0,32754,11263,65534,34815,65534,18431]),[P.c]) +C.F=H.o(I.a1([0,0,65490,12287,65535,34815,65534,18431]),[P.c]) +C.a2=new H.hd(0,{},C.n,[P.d,P.d]) +C.h=new P.jl(!1) +$.ab=0 +$.aT=null +$.de=null +$.cO=!1 +$.eQ=null +$.eK=null +$.eX=null +$.bV=null +$.bY=null +$.cZ=null +$.aK=null +$.b0=null +$.b1=null +$.cP=!1 +$.u=C.d +$.ey=null +$.cN=null +$.ap=C.M +$=null +init.isHunkLoaded=function(a){return!!$dart_deferred_initializers$[a]} +init.deferredInitialized=new Object(null) +init.isHunkInitialized=function(a){return init.deferredInitialized[a]} +init.initializeLoadedHunk=function(a){var z=$dart_deferred_initializers$[a] +if(z==null)throw"DeferredLoading state error: code with hash '"+a+"' was not loaded" +z($globals$,$) +init.deferredInitialized[a]=true} +init.deferredLibraryParts={} +init.deferredPartUris=[] +init.deferredPartHashes=[];(function(a){for(var z=0;z@,;:"\\\\/[\\]?={} \\t\\x00-\\x1F\\x7F]+',!0,!1)},"mN","fk",function(){return P.F("(?:\\r\\n)?[ \\t]+",!0,!1)},"mQ","fm",function(){return P.F('"(?:[^"\\x00-\\x1F\\x7F]|\\\\.)*"',!0,!1)},"mP","fl",function(){return P.F("\\\\(.)",!0,!1)},"n4","fp",function(){return P.F('[()<>@,;:"\\\\/\\[\\]?={} \\t\\x00-\\x1F\\x7F]',!0,!1)},"n7","fr",function(){return P.F("(?:"+$.fk().a+")*",!0,!1)},"mZ","d7",function(){return new M.he($.d4(),null)},"mi","f5",function(){return new E.im("posix","/",C.C,P.F("/",!0,!1),P.F("[^/]$",!0,!1),P.F("^/",!0,!1))},"mk","bv",function(){return new L.jw("windows","\\",C.a0,P.F("[/\\\\]",!0,!1),P.F("[^/\\\\]$",!0,!1),P.F("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])",!0,!1),P.F("^[/\\\\](?![/\\\\])",!0,!1))},"mj","b9",function(){return new F.jk("url","/",C.C,P.F("/",!0,!1),P.F("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$",!0,!1),P.F("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*",!0,!1),P.F("^/",!0,!1))},"mh","d4",function(){return O.j4()},"mS","fo",function(){return P.F("/",!0,!1).a==="\\/"}]) +I=I.$finishIsolateConstructor(I) +$=new I() +init.metadata=[] +init.types=[{func:1,ret:P.x},{func:1,ret:-1},{func:1,ret:P.x,args:[,,]},{func:1,args:[,]},{func:1,ret:P.x,args:[W.am]},{func:1,ret:P.d,args:[P.d]},{func:1,ret:-1,args:[{func:1,ret:-1}]},{func:1,ret:-1,args:[,]},{func:1,ret:-1,args:[P.b],opt:[P.D]},{func:1,ret:P.x,args:[P.d]},{func:1,args:[W.L]},{func:1,ret:P.H,args:[P.d]},{func:1,ret:P.x,args:[,]},{func:1,ret:P.H,args:[,]},{func:1,ret:P.d,args:[P.ac]},{func:1,ret:-1,args:[P.b]},{func:1,ret:P.x,args:[,P.D]},{func:1,ret:-1,args:[P.c,P.c]},{func:1,ret:-1,args:[P.d,P.c]},{func:1,ret:-1,args:[P.d],opt:[,]},{func:1,ret:P.c,args:[P.c,P.c]},{func:1,ret:P.x,args:[P.c,,]},{func:1,ret:P.y,args:[P.c]},{func:1,ret:P.y,args:[,,]},{func:1,ret:-1,args:[P.d,P.d]},{func:1,args:[P.d]},{func:1,args:[,,]},{func:1,ret:P.H,args:[P.d,P.d]},{func:1,ret:P.c,args:[P.d]},{func:1,ret:-1,opt:[P.b]},{func:1,ret:P.H,args:[P.b,P.b]},{func:1,ret:U.bj,args:[P.y]},{func:1,ret:P.x,args:[,],opt:[P.D]},{func:1,ret:P.H,args:[P.b]},{func:1,ret:R.bG},{func:1,ret:P.x,args:[P.d,P.d]},{func:1,ret:[P.G,,],args:[,]},{func:1,args:[,P.d]},{func:1,ret:P.d,args:[P.c]},{func:1,ret:P.d,args:[P.d],named:{color:null}},{func:1,ret:P.x,args:[W.L]},{func:1,ret:P.x,args:[W.aW]},{func:1,ret:P.x,args:[{func:1,ret:-1}]},{func:1,ret:P.H,args:[,,]},{func:1,ret:P.c,args:[,]},{func:1,ret:P.c,args:[P.b]},{func:1,ret:-1,args:[[P.f,P.c]]}] +function convertToFastObject(a){function MyClass(){}MyClass.prototype=a +new MyClass() +return a}function convertToSlowObject(a){a.__MAGIC_SLOW_PROPERTY=1 +delete a.__MAGIC_SLOW_PROPERTY +return a}A=convertToFastObject(A) +B=convertToFastObject(B) +C=convertToFastObject(C) +D=convertToFastObject(D) +E=convertToFastObject(E) +F=convertToFastObject(F) +G=convertToFastObject(G) +H=convertToFastObject(H) +J=convertToFastObject(J) +K=convertToFastObject(K) +L=convertToFastObject(L) +M=convertToFastObject(M) +N=convertToFastObject(N) +O=convertToFastObject(O) +P=convertToFastObject(P) +Q=convertToFastObject(Q) +R=convertToFastObject(R) +S=convertToFastObject(S) +T=convertToFastObject(T) +U=convertToFastObject(U) +V=convertToFastObject(V) +W=convertToFastObject(W) +X=convertToFastObject(X) +Y=convertToFastObject(Y) +Z=convertToFastObject(Z) +function init(){I.p=Object.create(null) +init.allClasses=map() +init.getTypeFromName=function(a){return init.allClasses[a]} +init.interceptorsByTag=map() +init.leafTags=map() +init.finishedClasses=map() +I.$lazy=function(a,b,c,d,e){if(!init.lazies)init.lazies=Object.create(null) +init.lazies[a]=b +e=e||I.p +var z={} +var y={} +e[a]=z +e[b]=function(){var x=this[a] +if(x==y)H.lT(d||a) +try{if(x===z){this[a]=y +try{x=this[a]=c()}finally{if(x===z)this[a]=null}}return x}finally{this[b]=function(){return this[a]}}}} +I.$finishIsolateConstructor=function(a){var z=a.p +function Isolate(){var y=Object.keys(z) +for(var x=0;x + + + + SSE Broadcast Channel Test + + + + + + + + diff --git a/pkgs/sse/tool/travis-setup.sh b/pkgs/sse/tool/travis-setup.sh new file mode 100644 index 000000000..33c093d17 --- /dev/null +++ b/pkgs/sse/tool/travis-setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Copyright 2019 Google Inc. All Rights Reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Fast fail the script on failures. +set -e + +pub get diff --git a/pkgs/sse/tool/travis.sh b/pkgs/sse/tool/travis.sh new file mode 100644 index 000000000..b9c9c9fd1 --- /dev/null +++ b/pkgs/sse/tool/travis.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Copyright 2019 Google Inc. All Rights Reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +STATUS=0 + +# Analyze package. +dartanalyzer . +ANALYSIS_STATUS=$? +if [[ $ANALYSIS_STATUS -ne 0 ]]; then + STATUS=$ANALYSIS_STATUS +fi + +# Start chromedriver. +chromedriver --port=4444 --url-base=wd/hub & +PIDC=$! + +# Run tests. +pub run test -r expanded -p vm -j 1 +TEST_STATUS=$? +if [[ $TEST_STATUS -ne 0 ]]; then + STATUS=$TEST_STATUS +fi + +# Exit chromedriver and geckodriver. +kill $PIDC + +exit $STATUS From 2360adca5343a4468703b306ec72f50d9b3660de Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Feb 2019 11:06:24 -0800 Subject: [PATCH 002/115] Cleanup --- pkgs/sse/CHANGELOG.md | 8 + pkgs/sse/example/README.md | 1 + pkgs/sse/lib/client/sse_client.dart | 11 +- pkgs/sse/lib/server/sse_handler.dart | 8 +- pkgs/sse/test/sse_test.dart | 4 + pkgs/sse/test/web/index.dart | 6 +- pkgs/sse/test/web/index.dart.js | 6310 +++++++++++++------------- 7 files changed, 3240 insertions(+), 3108 deletions(-) create mode 100644 pkgs/sse/CHANGELOG.md create mode 100644 pkgs/sse/example/README.md diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md new file mode 100644 index 000000000..98eebc5bc --- /dev/null +++ b/pkgs/sse/CHANGELOG.md @@ -0,0 +1,8 @@ +## 0.0.2 + +- Internal cleanup. + + +## 0.0.1 + +- Initial commit. diff --git a/pkgs/sse/example/README.md b/pkgs/sse/example/README.md new file mode 100644 index 000000000..631fdad51 --- /dev/null +++ b/pkgs/sse/example/README.md @@ -0,0 +1 @@ +The test folder provides a very basic usage example. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 02760fe8a..d7e37ca64 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -1,8 +1,13 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + import 'dart:async'; import 'dart:convert'; import 'dart:html'; import 'package:http/browser_client.dart'; +import 'package:logging/logging.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:uuid/uuid.dart'; @@ -17,6 +22,8 @@ class SseClient extends StreamChannelMixin { final _client = new BrowserClient()..withCredentials = true; + final _logger = Logger('SseClient'); + EventSource _eventSource; String _serverUrl; @@ -79,8 +86,8 @@ class SseClient extends StreamChannelMixin { var encoded = jsonEncode(message); try { await _client.post(_serverUrl, body: encoded); - } catch (_) { - // Ignore any error + } catch (e) { + _logger.warning('Unable to encode outgoing message: $e'); } } } diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index de13554df..a683a2f63 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -1,3 +1,7 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + import 'dart:async'; import 'dart:convert'; @@ -26,6 +30,7 @@ class SseConnection extends StreamChannelMixin { SseConnection(this._sink, this._clientId) { _outgoingController.stream.listen((data) { if (!_closeCompleter.isCompleted) { + // JSON encode the message to escape new lines. _sink.add('data: ${json.encode(data)}\n'); _sink.add('\n'); } @@ -34,12 +39,11 @@ class SseConnection extends StreamChannelMixin { Future get onClose => _closeCompleter.future; - /// /// The message added to the sink has to be JSON encodable. @override StreamSink get sink => _outgoingController.sink; -// Add messages to this [StreamSink] to send them to the server. + // Add messages to this [StreamSink] to send them to the server. /// [Stream] of messages sent from the server to this client. /// /// A message is a decoded JSON object. diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index b5986650a..cebde5c1a 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -1,3 +1,7 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + @TestOn('vm') import 'dart:async'; import 'dart:io'; diff --git a/pkgs/sse/test/web/index.dart b/pkgs/sse/test/web/index.dart index dd949ca4f..c58cde909 100644 --- a/pkgs/sse/test/web/index.dart +++ b/pkgs/sse/test/web/index.dart @@ -1,8 +1,12 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + import 'dart:html'; import 'package:sse/client/sse_client.dart'; -main() { +void main() { var channel = SseClient('/test'); document.querySelector('button').onClick.listen((_) { diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index fd3064cb3..f62fd59bc 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -81,14 +81,14 @@ f+=g.join("") return f}var z=supportsDirectProtoAccess?function(d,e){var g=d.prototype g.__proto__=e.prototype g.constructor=d -g["$i"+d.name]=d +g["$is"+d.name]=d return convertToFastObject(g)}:function(){function tmp(){}return function(a1,a2){tmp.prototype=a2.prototype var g=new tmp() convertToSlowObject(g) var f=a1.prototype var e=Object.keys(f) for(var d=0;d=z)throw H.a(P.aH(b,null,null)) +if(b>=z)throw H.a(P.aI(b,null,null)) return a.splice(b,1)[0]}, -cK:function(a,b,c){var z +cO:function(a,b,c){var z H.n(c,H.i(a,0)) -if(!!a.fixed$length)H.t(P.A("insert")) +if(!!a.fixed$length)H.v(P.A("insert")) z=a.length -if(b>z)throw H.a(P.aH(b,null,null)) +if(b>z)throw H.a(P.aI(b,null,null)) a.splice(b,0,c)}, -bN:function(a,b,c){var z,y,x -H.l(c,"$ip",[H.i(a,0)],"$ap") -if(!!a.fixed$length)H.t(P.A("insertAll")) -P.dJ(b,0,a.length,"index",null) -z=J.q(c) -if(!z.$iI)c=z.b7(c) -y=J.T(c) +bQ:function(a,b,c){var z,y,x +H.l(c,"$isq",[H.i(a,0)],"$asq") +if(!!a.fixed$length)H.v(P.A("insertAll")) +P.dT(b,0,a.length,"index",null) +z=J.r(c) +if(!z.$isJ)c=z.b9(c) +y=J.Z(c) this.si(a,a.length+y) x=b+y -this.az(a,x,a.length,a,b) -this.a9(a,b,x,c)}, -aK:function(a){if(!!a.fixed$length)H.t(P.A("removeLast")) +this.aB(a,x,a.length,a,b) +this.ac(a,b,x,c)}, +aM:function(a){if(!!a.fixed$length)H.v(P.A("removeLast")) if(a.length===0)throw H.a(H.aa(a,-1)) return a.pop()}, -I:function(a,b){var z,y +J:function(a,b){var z,y H.j(b,{func:1,ret:-1,args:[H.i(a,0)]}) z=a.length for(y=0;y=a.length)return H.k(a,b) return a[b]}, -aa:function(a,b,c){if(b<0||b>a.length)throw H.a(P.z(b,0,a.length,"start",null)) +ad:function(a,b,c){if(b<0||b>a.length)throw H.a(P.z(b,0,a.length,"start",null)) if(ca.length)throw H.a(P.z(c,b,a.length,"end",null)) if(b===c)return H.o([],[H.i(a,0)]) return H.o(a.slice(b,c),[H.i(a,0)])}, -gal:function(a){if(a.length>0)return a[0] -throw H.a(H.ch())}, -ga7:function(a){var z=a.length +gam:function(a){if(a.length>0)return a[0] +throw H.a(H.co())}, +ga9:function(a){var z=a.length if(z>0)return a[z-1] -throw H.a(H.ch())}, -az:function(a,b,c,d,e){var z,y,x,w,v,u +throw H.a(H.co())}, +aB:function(a,b,c,d,e){var z,y,x,w,v,u z=H.i(a,0) -H.l(d,"$ip",[z],"$ap") -if(!!a.immutable$list)H.t(P.A("setRange")) +H.l(d,"$isq",[z],"$asq") +if(!!a.immutable$list)H.v(P.A("setRange")) P.a8(b,c,a.length,null,null,null) y=c-b if(y===0)return -x=J.q(d) -if(!!x.$if){H.l(d,"$if",[z],"$af") +x=J.r(d) +if(!!x.$ish){H.l(d,"$ish",[z],"$ash") w=e -v=d}else{v=x.a_(d,e).a8(0,!1) -w=0}z=J.a0(v) -if(w+y>z.gi(v))throw H.a(H.dq()) +v=d}else{v=x.a_(d,e).ab(0,!1) +w=0}z=J.Y(v) +if(w+y>z.gi(v))throw H.a(H.dx()) if(w=0;--u)a[b+u]=z.j(v,w+u) else for(u=0;u=a.length||b<0)throw H.a(H.aa(a,b)) return a[b]}, -l:function(a,b,c){H.w(b) +k:function(a,b,c){H.w(b) H.n(c,H.i(a,0)) -if(!!a.immutable$list)H.t(P.A("indexed set")) +if(!!a.immutable$list)H.v(P.A("indexed set")) if(typeof b!=="number"||Math.floor(b)!==b)throw H.a(H.aa(a,b)) if(b>=a.length||b<0)throw H.a(H.aa(a,b)) a[b]=c}, t:function(a,b){var z,y z=[H.i(a,0)] -H.l(b,"$if",z,"$af") +H.l(b,"$ish",z,"$ash") y=C.c.t(a.length,b.gi(b)) z=H.o([],z) this.si(z,y) -this.a9(z,0,a.length,a) -this.a9(z,a.length,y,b) +this.ac(z,0,a.length,a) +this.ac(z,a.length,y,b) return z}, -$iaU:1, -$aaU:I.aB, -$iI:1, -$ip:1, -$if:1, +$isaV:1, +$asaV:I.aB, +$isJ:1, +$isq:1, +$ish:1, p:{ -hN:function(a,b){if(a<0||a>4294967295)throw H.a(P.z(a,0,4294967295,"length",null)) -return J.dr(new Array(a),b)}, -dr:function(a,b){return J.bD(H.o(a,[b]))}, -bD:function(a){H.bu(a) +i2:function(a,b){if(a<0||a>4294967295)throw H.a(P.z(a,0,4294967295,"length",null)) +return J.dy(new Array(a),b)}, +dy:function(a,b){return J.bF(H.o(a,[b]))}, +bF:function(a){H.bx(a) a.fixed$length=Array return a}}}, -m3:{"^":"at;$ti"}, -c3:{"^":"b;a,b,c,0d,$ti", -scg:function(a){this.d=H.n(a,H.i(this,0))}, -gB:function(){return this.d}, +mk:{"^":"at;$ti"}, +c8:{"^":"b;a,b,c,0d,$ti", +scj:function(a){this.d=H.n(a,H.i(this,0))}, +gD:function(){return this.d}, q:function(){var z,y,x z=this.a y=z.length -if(this.b!==y)throw H.a(H.c0(z)) +if(this.b!==y)throw H.a(H.c6(z)) x=this.c -if(x>=y){this.scg(null) -return!1}this.scg(z[x]);++this.c +if(x>=y){this.scj(null) +return!1}this.scj(z[x]);++this.c return!0}, -$iY:1}, -be:{"^":"V;", -f_:function(a){var z +$isa_:1}, +bf:{"^":"W;", +fd:function(a){var z if(a>=-2147483648&&a<=2147483647)return a|0 if(isFinite(a)){z=a<0?Math.ceil(a):Math.floor(a) return z+0}throw H.a(P.A(""+a+".toInt()"))}, -eu:function(a){var z,y +eE:function(a){var z,y if(a>=0){if(a<=2147483647)return a|0}else if(a>=-2147483648){z=a|0 return a===z?z:z-1}y=Math.floor(a) if(isFinite(y))return y throw H.a(P.A(""+a+".floor()"))}, -aq:function(a,b){var z,y,x,w +ar:function(a,b){var z,y,x,w if(b<2||b>36)throw H.a(P.z(b,2,36,"radix",null)) z=a.toString(b) if(C.a.v(z,z.length-1)!==41)return z y=/^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(z) -if(y==null)H.t(P.A("Unexpected toString result: "+z)) +if(y==null)H.v(P.A("Unexpected toString result: "+z)) x=y.length if(1>=x)return H.k(y,1) z=y[1] @@ -465,81 +465,82 @@ w-=x.length}return z+C.a.U("0",w)}, h:function(a){if(a===0&&1/a<0)return"-0.0" else return""+a}, gA:function(a){return a&0x1FFFFFFF}, -t:function(a,b){H.lP(b) +t:function(a,b){H.m7(b) if(typeof b!=="number")throw H.a(H.O(b)) return a+b}, V:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) return a-b}, -aQ:function(a,b){var z=a%b +aS:function(a,b){var z=a%b if(z===0)return 0 if(z>0)return z if(b<0)return z-b else return z+b}, -by:function(a,b){return(a|0)===a?a/b|0:this.e0(a,b)}, -e0:function(a,b){var z=a/b +bB:function(a,b){return(a|0)===a?a/b|0:this.e8(a,b)}, +e8:function(a,b){var z=a/b if(z>=-2147483648&&z<=2147483647)return z|0 if(z>0){if(z!==1/0)return Math.floor(z)}else if(z>-1/0)return Math.ceil(z) -throw H.a(P.A("Result of truncating division is "+H.e(z)+": "+H.e(a)+" ~/ "+b))}, +throw H.a(P.A("Result of truncating division is "+H.d(z)+": "+H.d(a)+" ~/ "+b))}, W:function(a,b){var z -if(a>0)z=this.cu(a,b) +if(a>0)z=this.cw(a,b) else{z=b>31?31:b z=a>>z>>>0}return z}, -dX:function(a,b){if(b<0)throw H.a(H.O(b)) -return this.cu(a,b)}, -cu:function(a,b){return b>31?0:a>>>b}, -D:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) +e3:function(a,b){if(b<0)throw H.a(H.O(b)) +return this.cw(a,b)}, +cw:function(a,b){return b>31?0:a>>>b}, +C:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) return ab}, -aO:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) +aQ:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) return a>=b}, -$ib4:1, -$id1:1}, -ds:{"^":"be;",$ic:1}, -hP:{"^":"be;"}, -bf:{"^":"V;", +$isb7:1, +$isdd:1}, +dz:{"^":"bf;",$isc:1}, +i4:{"^":"bf;"}, +bg:{"^":"W;", v:function(a,b){if(b<0)throw H.a(H.aa(a,b)) -if(b>=a.length)H.t(H.aa(a,b)) +if(b>=a.length)H.v(H.aa(a,b)) return a.charCodeAt(b)}, n:function(a,b){if(b>=a.length)throw H.a(H.aa(a,b)) return a.charCodeAt(b)}, -bD:function(a,b,c){if(c>b.length)throw H.a(P.z(c,0,b.length,null,null)) -return new H.kw(b,a,c)}, -bC:function(a,b){return this.bD(a,b,0)}, -at:function(a,b,c){var z,y +bG:function(a,b,c){if(c>b.length)throw H.a(P.z(c,0,b.length,null,null)) +return new H.kP(b,a,c)}, +bF:function(a,b){return this.bG(a,b,0)}, +aw:function(a,b,c){var z,y if(c<0||c>b.length)throw H.a(P.z(c,0,b.length,null,null)) z=a.length if(c+z>b.length)return for(y=0;yy)return!1 return b===this.F(a,y-z)}, -ap:function(a,b,c,d){if(typeof b!=="number"||Math.floor(b)!==b)H.t(H.O(b)) +aq:function(a,b,c,d){if(typeof b!=="number"||Math.floor(b)!==b)H.v(H.O(b)) c=P.a8(b,c,a.length,null,null,null) -return H.f_(a,b,c,d)}, +return H.fx(a,b,c,d)}, H:function(a,b,c){var z -if(typeof c!=="number"||Math.floor(c)!==c)H.t(H.O(c)) -if(typeof c!=="number")return c.D() +if(typeof c!=="number"||Math.floor(c)!==c)H.v(H.O(c)) +if(typeof c!=="number")return c.C() if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) z=c+b.length if(z>a.length)return!1 return b===a.substring(c,z)}, -N:function(a,b){return this.H(a,b,0)}, -k:function(a,b,c){if(typeof b!=="number"||Math.floor(b)!==b)H.t(H.O(b)) +M:function(a,b){return this.H(a,b,0)}, +l:function(a,b,c){if(typeof b!=="number"||Math.floor(b)!==b)H.v(H.O(b)) if(c==null)c=a.length -if(typeof b!=="number")return b.D() -if(b<0)throw H.a(P.aH(b,null,null)) -if(b>c)throw H.a(P.aH(b,null,null)) -if(c>a.length)throw H.a(P.aH(c,null,null)) +if(typeof b!=="number")return b.C() +if(b<0)throw H.a(P.aI(b,null,null)) +if(b>c)throw H.a(P.aI(b,null,null)) +if(c>a.length)throw H.a(P.aI(c,null,null)) return a.substring(b,c)}, -F:function(a,b){return this.k(a,b,null)}, +F:function(a,b){return this.l(a,b,null)}, U:function(a,b){var z,y +H.w(b) if(0>=b)return"" if(b===1||a.length===0)return a if(b!==b>>>0)throw H.a(C.L) @@ -547,26 +548,27 @@ for(z=a,y="";!0;){if((b&1)===1)y=z+y b=b>>>1 if(b===0)break z+=z}return y}, -eN:function(a,b,c){var z=b-a.length +eZ:function(a,b,c){var z=b-a.length if(z<=0)return a return a+this.U(c,z)}, -eM:function(a,b){return this.eN(a,b," ")}, -am:function(a,b,c){var z +eY:function(a,b){return this.eZ(a,b," ")}, +an:function(a,b,c){var z if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) z=a.indexOf(b,c) return z}, -bM:function(a,b){return this.am(a,b,0)}, -b4:function(a,b,c){var z,y +bP:function(a,b){return this.an(a,b,0)}, +b6:function(a,b,c){var z,y if(c==null)c=a.length else if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) z=b.length y=a.length if(c+z>y)c=y-z return a.lastIndexOf(b,c)}, -cL:function(a,b){return this.b4(a,b,null)}, -el:function(a,b,c){if(c>a.length)throw H.a(P.z(c,0,a.length,null,null)) -return H.eY(a,b,c)}, -ar:function(a,b){return this.el(a,b,0)}, +bR:function(a,b){return this.b6(a,b,null)}, +ew:function(a,b,c){if(c>a.length)throw H.a(P.z(c,0,a.length,null,null)) +return H.fv(a,b,c)}, +au:function(a,b){return this.ew(a,b,0)}, +gB:function(a){return a.length===0}, h:function(a){return a}, gA:function(a){var z,y,x for(z=a.length,y=0,x=0;x=a.length||!1)throw H.a(H.aa(a,b)) return a[b]}, -$iaU:1, -$aaU:I.aB, -$icu:1, -$id:1}}],["","",,H,{"^":"", -bX:function(a){var z,y +$isaV:1, +$asaV:I.aB, +$iscB:1, +$ise:1}}],["","",,H,{"^":"", +c2:function(a){var z,y z=a^48 if(z<=9)return z y=a|32 if(97<=y&&y<=102)return y-87 return-1}, -ch:function(){return new P.bl("No element")}, -dq:function(){return new P.bl("Too few elements")}, -aE:{"^":"jc;a", +bX:function(a){return a}, +co:function(){return new P.bo("No element")}, +dx:function(){return new P.bo("Too few elements")}, +aF:{"^":"jw;a", gi:function(a){return this.a.length}, j:function(a,b){return C.a.v(this.a,b)}, -$aI:function(){return[P.c]}, -$acA:function(){return[P.c]}, -$aa4:function(){return[P.c]}, -$ap:function(){return[P.c]}, -$af:function(){return[P.c]}}, -I:{"^":"p;$ti"}, -aG:{"^":"I;$ti", -gK:function(a){return new H.ak(this,this.gi(this),0,[H.v(this,"aG",0)])}, -gE:function(a){return this.gi(this)===0}, -b3:function(a,b){var z,y,x,w +$asJ:function(){return[P.c]}, +$ascJ:function(){return[P.c]}, +$asa4:function(){return[P.c]}, +$asq:function(){return[P.c]}, +$ash:function(){return[P.c]}}, +J:{"^":"q;$ti"}, +aH:{"^":"J;$ti", +gK:function(a){return new H.ak(this,this.gi(this),0,[H.u(this,"aH",0)])}, +gB:function(a){return this.gi(this)===0}, +b5:function(a,b){var z,y,x,w z=this.gi(this) if(b.length!==0){if(z===0)return"" -y=H.e(this.X(0,0)) +y=H.d(this.X(0,0)) if(z!==this.gi(this))throw H.a(P.a3(this)) -for(x=y,w=1;wz)return z return y}, -gdZ:function(){var z,y -z=J.T(this.a) +ge6:function(){var z,y +z=J.Z(this.a) y=this.b if(y>z)return z return y}, gi:function(a){var z,y,x -z=J.T(this.a) +z=J.Z(this.a) y=this.b if(y>=z)return 0 x=this.c @@ -630,29 +633,29 @@ if(x==null||x>=z)return z-y if(typeof x!=="number")return x.V() return x-y}, X:function(a,b){var z,y -z=this.gdZ()+b -if(b>=0){y=this.gds() -if(typeof y!=="number")return H.E(y) +z=this.ge6()+b +if(b>=0){y=this.gdw() +if(typeof y!=="number")return H.G(y) y=z>=y}else y=!0 -if(y)throw H.a(P.ce(b,this,"index",null,null)) -return J.d9(this.a,z)}, +if(y)throw H.a(P.cl(b,this,"index",null,null)) +return J.dg(this.a,z)}, a_:function(a,b){var z,y z=this.b+b y=this.c -if(y!=null&&z>=y)return new H.hl(this.$ti) -return H.ae(this.a,z,y,H.i(this,0))}, -eZ:function(a,b){var z,y,x -if(b<0)H.t(P.z(b,0,null,"count",null)) +if(y!=null&&z>=y)return new H.hB(this.$ti) +return H.af(this.a,z,y,H.i(this,0))}, +fc:function(a,b){var z,y,x +if(b<0)H.v(P.z(b,0,null,"count",null)) z=this.c y=this.b x=y+b -if(z==null)return H.ae(this.a,y,x,H.i(this,0)) +if(z==null)return H.af(this.a,y,x,H.i(this,0)) else{if(zc)H.t(P.z(b,0,c,"start",null))}return new H.j5(a,b,c,[d])}}}, +af:function(a,b,c,d){if(b<0)H.v(P.z(b,0,null,"start",null)) +if(c!=null){if(c<0)H.v(P.z(c,0,null,"end",null)) +if(b>c)H.v(P.z(b,0,c,"start",null))}return new H.jp(a,b,c,[d])}}}, ak:{"^":"b;a,b,c,0d,$ti", -sc5:function(a){this.d=H.n(a,H.i(this,0))}, -gB:function(){return this.d}, +sc8:function(a){this.d=H.n(a,H.i(this,0))}, +gD:function(){return this.d}, q:function(){var z,y,x,w z=this.a -y=J.a0(z) +y=J.Y(z) x=y.gi(z) if(this.b!==x)throw H.a(P.a3(z)) w=this.c -if(w>=x){this.sc5(null) -return!1}this.sc5(y.X(z,w));++this.c +if(w>=x){this.sc8(null) +return!1}this.sc8(y.X(z,w));++this.c return!0}, -$iY:1}, -dC:{"^":"aG;a,b,$ti", -gi:function(a){return J.T(this.a)}, -X:function(a,b){return this.b.$1(J.d9(this.a,b))}, -$aI:function(a,b){return[b]}, -$aaG:function(a,b){return[b]}, -$ap:function(a,b){return[b]}}, -dV:{"^":"p;a,b,$ti", -gK:function(a){return new H.dW(J.bb(this.a),this.b,this.$ti)}}, -dW:{"^":"Y;a,b,$ti", +$isa_:1}, +dM:{"^":"aH;a,b,$ti", +gi:function(a){return J.Z(this.a)}, +X:function(a,b){return this.b.$1(J.dg(this.a,b))}, +$asJ:function(a,b){return[b]}, +$asaH:function(a,b){return[b]}, +$asq:function(a,b){return[b]}}, +eg:{"^":"q;a,b,$ti", +gK:function(a){return new H.eh(J.bb(this.a),this.b,this.$ti)}}, +eh:{"^":"a_;a,b,$ti", q:function(){var z,y -for(z=this.a,y=this.b;z.q();)if(y.$1(z.gB()))return!0 +for(z=this.a,y=this.b;z.q();)if(y.$1(z.gD()))return!0 return!1}, -gB:function(){return this.a.gB()}}, -cv:{"^":"p;a,b,$ti", -a_:function(a,b){return new H.cv(this.a,this.b+b,this.$ti)}, -gK:function(a){return new H.iI(J.bb(this.a),this.b,this.$ti)}, +gD:function(){return this.a.gD()}}, +cC:{"^":"q;a,b,$ti", +a_:function(a,b){return new H.cC(this.a,this.b+H.bX(b),this.$ti)}, +gK:function(a){return new H.j1(J.bb(this.a),this.b,this.$ti)}, p:{ -dK:function(a,b,c){H.l(a,"$ip",[c],"$ap") -if(!!J.q(a).$iI)return new H.dm(a,b,[c]) -return new H.cv(a,b,[c])}}}, -dm:{"^":"cv;a,b,$ti", -gi:function(a){var z=J.T(this.a)-this.b +dU:function(a,b,c){H.l(a,"$isq",[c],"$asq") +if(!!J.r(a).$isJ)return new H.dt(a,H.bX(b),[c]) +return new H.cC(a,H.bX(b),[c])}}}, +dt:{"^":"cC;a,b,$ti", +gi:function(a){var z=J.Z(this.a)-this.b if(z>=0)return z return 0}, -a_:function(a,b){return new H.dm(this.a,this.b+b,this.$ti)}, -$iI:1}, -iI:{"^":"Y;a,b,$ti", +a_:function(a,b){return new H.dt(this.a,this.b+H.bX(b),this.$ti)}, +$isJ:1}, +j1:{"^":"a_;a,b,$ti", q:function(){var z,y for(z=this.a,y=0;y=z.length)return H.k(z,3) -y=H.r(z[3]) +y=H.p(z[3]) if(b==null){if(y!=null)return parseInt(a,10) if(z[2]!=null)return parseInt(a,16) return}if(b<2||b>36)throw H.a(P.z(b,2,36,"radix",null)) @@ -764,109 +767,109 @@ if(b===10&&y!=null)return parseInt(a,10) if(b<10||y==null){x=b<=10?47+b:86+b w=z[1] for(v=w.length,u=0;ux)return}return parseInt(a,b)}, -aX:function(a){return H.io(a)+H.cR(H.aq(a),0,null)}, -io:function(a){var z,y,x,w,v,u,t,s,r -z=J.q(a) +aY:function(a){return H.iG(a)+H.d1(H.aq(a),0,null)}, +iG:function(a){var z,y,x,w,v,u,t,s,r +z=J.r(a) y=z.constructor if(typeof y=="function"){x=y.name w=typeof x==="string"?x:null}else w=null v=w==null -if(v||z===C.Q||!!z.$ibm){u=C.y(a) +if(v||z===C.Q||!!z.$isbq){u=C.y(a) if(v)w=u if(u==="Object"){t=a.constructor if(typeof t=="function"){s=String(t).match(/^\s*function\s*([\w$]*)\s*\(/) r=s==null?null:s[1] if(typeof r==="string"&&/^\w+$/.test(r))w=r}}return w}w=w -return H.aR(w.length>1&&C.a.n(w,0)===36?C.a.F(w,1):w)}, -ip:function(){if(!!self.location)return self.location.href +return H.aS(w.length>1&&C.a.n(w,0)===36?C.a.F(w,1):w)}, +iH:function(){if(!!self.location)return self.location.href return}, -dH:function(a){var z,y,x,w,v +dR:function(a){var z,y,x,w,v z=a.length if(z<=500)return String.fromCharCode.apply(null,a) for(y="",x=0;x65535)return H.iy(a)}return H.dH(a)}, -iz:function(a,b,c){var z,y,x,w +if(x>65535)return H.iQ(a)}return H.dR(a)}, +iR:function(a,b,c){var z,y,x,w if(c<=500&&b===0&&c===a.length)return String.fromCharCode.apply(null,a) for(z=b,y="";z>>0,56320|z&1023)}}throw H.a(P.z(a,0,1114111,null,null))}, -W:function(a){if(a.date===void 0)a.date=new Date(a.a) +X:function(a){if(a.date===void 0)a.date=new Date(a.a) return a.date}, -iw:function(a){return a.b?H.W(a).getUTCFullYear()+0:H.W(a).getFullYear()+0}, -iu:function(a){return a.b?H.W(a).getUTCMonth()+1:H.W(a).getMonth()+1}, -iq:function(a){return a.b?H.W(a).getUTCDate()+0:H.W(a).getDate()+0}, -ir:function(a){return a.b?H.W(a).getUTCHours()+0:H.W(a).getHours()+0}, -it:function(a){return a.b?H.W(a).getUTCMinutes()+0:H.W(a).getMinutes()+0}, -iv:function(a){return a.b?H.W(a).getUTCSeconds()+0:H.W(a).getSeconds()+0}, -is:function(a){return a.b?H.W(a).getUTCMilliseconds()+0:H.W(a).getMilliseconds()+0}, -E:function(a){throw H.a(H.O(a))}, -k:function(a,b){if(a==null)J.T(a) +iO:function(a){return a.b?H.X(a).getUTCFullYear()+0:H.X(a).getFullYear()+0}, +iM:function(a){return a.b?H.X(a).getUTCMonth()+1:H.X(a).getMonth()+1}, +iI:function(a){return a.b?H.X(a).getUTCDate()+0:H.X(a).getDate()+0}, +iJ:function(a){return a.b?H.X(a).getUTCHours()+0:H.X(a).getHours()+0}, +iL:function(a){return a.b?H.X(a).getUTCMinutes()+0:H.X(a).getMinutes()+0}, +iN:function(a){return a.b?H.X(a).getUTCSeconds()+0:H.X(a).getSeconds()+0}, +iK:function(a){return a.b?H.X(a).getUTCMilliseconds()+0:H.X(a).getMilliseconds()+0}, +G:function(a){throw H.a(H.O(a))}, +k:function(a,b){if(a==null)J.Z(a) throw H.a(H.aa(a,b))}, aa:function(a,b){var z,y if(typeof b!=="number"||Math.floor(b)!==b)return new P.as(!0,b,"index",null) -z=H.w(J.T(a)) -if(!(b<0)){if(typeof z!=="number")return H.E(z) +z=H.w(J.Z(a)) +if(!(b<0)){if(typeof z!=="number")return H.G(z) y=b>=z}else y=!0 -if(y)return P.ce(b,a,"index",null,z) -return P.aH(b,"index",null)}, -lu:function(a,b,c){if(a<0||a>c)return new P.bi(0,c,!0,a,"start","Invalid value") -if(b!=null)if(bc)return new P.bi(a,c,!0,b,"end","Invalid value") +if(y)return P.cl(b,a,"index",null,z) +return P.aI(b,"index",null)}, +lN:function(a,b,c){if(a<0||a>c)return new P.bl(0,c,!0,a,"start","Invalid value") +if(b!=null)if(bc)return new P.bl(a,c,!0,b,"end","Invalid value") return new P.as(!0,b,"end",null)}, O:function(a){return new P.as(!0,a,null,null)}, a:function(a){var z -if(a==null)a=new P.bH() +if(a==null)a=new P.bL() z=new Error() z.dartException=a -if("defineProperty" in Object){Object.defineProperty(z,"message",{get:H.f1}) -z.name=""}else z.toString=H.f1 +if("defineProperty" in Object){Object.defineProperty(z,"message",{get:H.fA}) +z.name=""}else z.toString=H.fA return z}, -f1:function(){return J.ar(this.dartException)}, -t:function(a){throw H.a(a)}, -c0:function(a){throw H.a(P.a3(a))}, +fA:function(){return J.ar(this.dartException)}, +v:function(a){throw H.a(a)}, +c6:function(a){throw H.a(P.a3(a))}, P:function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l -z=new H.lV(a) +z=new H.me(a) if(a==null)return -if(a instanceof H.c9)return z.$1(a.a) +if(a instanceof H.cg)return z.$1(a.a) if(typeof a!=="object")return a if("dartException" in a)return z.$1(a.dartException) else if(!("message" in a))return a y=a.message if("number" in a&&typeof a.number=="number"){x=a.number w=x&65535 -if((C.c.W(x,16)&8191)===10)switch(w){case 438:return z.$1(H.cl(H.e(y)+" (Error "+w+")",null)) -case 445:case 5007:return z.$1(H.dF(H.e(y)+" (Error "+w+")",null))}}if(a instanceof TypeError){v=$.f6() -u=$.f7() -t=$.f8() -s=$.f9() -r=$.fc() -q=$.fd() -p=$.fb() -$.fa() -o=$.ff() -n=$.fe() +if((C.c.W(x,16)&8191)===10)switch(w){case 438:return z.$1(H.ct(H.d(y)+" (Error "+w+")",null)) +case 445:case 5007:return z.$1(H.dP(H.d(y)+" (Error "+w+")",null))}}if(a instanceof TypeError){v=$.$get$e0() +u=$.$get$e1() +t=$.$get$e2() +s=$.$get$e3() +r=$.$get$e7() +q=$.$get$e8() +p=$.$get$e5() +$.$get$e4() +o=$.$get$ea() +n=$.$get$e9() m=v.a2(y) -if(m!=null)return z.$1(H.cl(H.r(y),m)) +if(m!=null)return z.$1(H.ct(H.p(y),m)) else{m=u.a2(y) if(m!=null){m.method="call" -return z.$1(H.cl(H.r(y),m))}else{m=t.a2(y) +return z.$1(H.ct(H.p(y),m))}else{m=t.a2(y) if(m==null){m=s.a2(y) if(m==null){m=r.a2(y) if(m==null){m=q.a2(y) @@ -875,43 +878,43 @@ if(m==null){m=s.a2(y) if(m==null){m=o.a2(y) if(m==null){m=n.a2(y) l=m!=null}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0 -if(l)return z.$1(H.dF(H.r(y),m))}}return z.$1(new H.jb(typeof y==="string"?y:""))}if(a instanceof RangeError){if(typeof y==="string"&&y.indexOf("call stack")!==-1)return new P.dL() +if(l)return z.$1(H.dP(H.p(y),m))}}return z.$1(new H.jv(typeof y==="string"?y:""))}if(a instanceof RangeError){if(typeof y==="string"&&y.indexOf("call stack")!==-1)return new P.dV() y=function(b){try{return String(b)}catch(k){}return null}(a) -return z.$1(new P.as(!1,null,null,typeof y==="string"?y.replace(/^RangeError:\s*/,""):y))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof y==="string"&&y==="too much recursion")return new P.dL() +return z.$1(new P.as(!1,null,null,typeof y==="string"?y.replace(/^RangeError:\s*/,""):y))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof y==="string"&&y==="too much recursion")return new P.dV() return a}, a7:function(a){var z -if(a instanceof H.c9)return a.b -if(a==null)return new H.ee(a) +if(a instanceof H.cg)return a.b +if(a==null)return new H.eB(a) z=a.$cachedTrace if(z!=null)return z -return a.$cachedTrace=new H.ee(a)}, -eV:function(a){if(a==null||typeof a!='object')return J.aD(a) +return a.$cachedTrace=new H.eB(a)}, +fs:function(a){if(a==null||typeof a!='object')return J.aE(a) else return H.au(a)}, -lz:function(a,b){var z,y,x,w +lS:function(a,b){var z,y,x,w z=a.length for(y=0;y=27 -if(v)return H.h7(y,!w,z,b) +if(v)return H.hn(y,!w,z,b) if(y===0){w=$.ab if(typeof w!=="number")return w.t() $.ab=w+1 u="self"+w w="return function(){var "+u+" = this." v=$.aT -if(v==null){v=H.by("self") -$.aT=v}return new Function(w+H.e(v)+";return "+u+"."+H.e(z)+"();}")()}t="abcdefghijklmnopqrstuvwxyz".split("").splice(0,y).join(",") +if(v==null){v=H.bA("self") +$.aT=v}return new Function(w+H.d(v)+";return "+u+"."+H.d(z)+"();}")()}t="abcdefghijklmnopqrstuvwxyz".split("").splice(0,y).join(",") w=$.ab if(typeof w!=="number")return w.t() $.ab=w+1 t+=w w="return function("+t+"){return this." v=$.aT -if(v==null){v=H.by("self") -$.aT=v}return new Function(w+H.e(v)+"."+H.e(z)+"("+t+");}")()}, -h8:function(a,b,c,d){var z,y -z=H.c5 -y=H.df -switch(b?-1:a){case 0:throw H.a(H.iH("Intercepted function with no arguments.")) +if(v==null){v=H.bA("self") +$.aT=v}return new Function(w+H.d(v)+"."+H.d(z)+"("+t+");}")()}, +ho:function(a,b,c,d){var z,y +z=H.ca +y=H.dm +switch(b?-1:a){case 0:throw H.a(H.iZ("Intercepted function with no arguments.")) case 1:return function(e,f,g){return function(){return f(this)[e](g(this))}}(c,z,y) case 2:return function(e,f,g){return function(h){return f(this)[e](g(this),h)}}(c,z,y) case 3:return function(e,f,g){return function(h,i){return f(this)[e](g(this),h,i)}}(c,z,y) @@ -981,131 +984,133 @@ case 6:return function(e,f,g){return function(h,i,j,k,l){return f(this)[e](g(thi default:return function(e,f,g,h){return function(){h=[g(this)] Array.prototype.push.apply(h,arguments) return e.apply(f(this),h)}}(d,z,y)}}, -h9:function(a,b){var z,y,x,w,v,u,t,s +hp:function(a,b){var z,y,x,w,v,u,t,s z=$.aT -if(z==null){z=H.by("self") -$.aT=z}y=$.de -if(y==null){y=H.by("receiver") -$.de=y}x=b.$stubName +if(z==null){z=H.bA("self") +$.aT=z}y=$.dl +if(y==null){y=H.bA("receiver") +$.dl=y}x=b.$stubName w=b.length v=a[x] u=b==null?v==null:b===v t=!u||w>=28 -if(t)return H.h8(w,!u,x,b) -if(w===1){z="return function(){return this."+H.e(z)+"."+H.e(x)+"(this."+H.e(y)+");" +if(t)return H.ho(w,!u,x,b) +if(w===1){z="return function(){return this."+H.d(z)+"."+H.d(x)+"(this."+H.d(y)+");" y=$.ab if(typeof y!=="number")return y.t() $.ab=y+1 return new Function(z+y+"}")()}s="abcdefghijklmnopqrstuvwxyz".split("").splice(0,w-1).join(",") -z="return function("+s+"){return this."+H.e(z)+"."+H.e(x)+"(this."+H.e(y)+", "+s+");" +z="return function("+s+"){return this."+H.d(z)+"."+H.d(x)+"(this."+H.d(y)+", "+s+");" y=$.ab if(typeof y!=="number")return y.t() $.ab=y+1 return new Function(z+y+"}")()}, -cV:function(a,b,c,d,e,f,g){return H.ha(a,b,H.w(c),d,!!e,!!f,g)}, -r:function(a){if(a==null)return a +d5:function(a,b,c,d,e,f,g){return H.hq(a,b,H.w(c),d,!!e,!!f,g)}, +p:function(a){if(a==null)return a if(typeof a==="string")return a throw H.a(H.a9(a,"String"))}, -lv:function(a){if(a==null)return a +fy:function(a){if(typeof a==="string"||a==null)return a +throw H.a(H.cb(a,"String"))}, +lO:function(a){if(a==null)return a if(typeof a==="number")return a throw H.a(H.a9(a,"double"))}, -lP:function(a){if(a==null)return a +m7:function(a){if(a==null)return a if(typeof a==="number")return a throw H.a(H.a9(a,"num"))}, -mX:function(a){if(a==null)return a +fh:function(a){if(a==null)return a if(typeof a==="boolean")return a throw H.a(H.a9(a,"bool"))}, w:function(a){if(a==null)return a if(typeof a==="number"&&Math.floor(a)===a)return a throw H.a(H.a9(a,"int"))}, -d2:function(a,b){throw H.a(H.a9(a,H.aR(H.r(b).substring(2))))}, -lQ:function(a,b){throw H.a(H.dh(a,H.aR(H.r(b).substring(2))))}, +de:function(a,b){throw H.a(H.a9(a,H.aS(H.p(b).substring(3))))}, +m8:function(a,b){throw H.a(H.cb(a,H.aS(H.p(b).substring(3))))}, m:function(a,b){if(a==null)return a -if((typeof a==="object"||typeof a==="function")&&J.q(a)[b])return a -H.d2(a,b)}, -d_:function(a,b){var z -if(a!=null)z=(typeof a==="object"||typeof a==="function")&&J.q(a)[b] +if((typeof a==="object"||typeof a==="function")&&J.r(a)[b])return a +H.de(a,b)}, +db:function(a,b){var z +if(a!=null)z=(typeof a==="object"||typeof a==="function")&&J.r(a)[b] else z=!0 if(z)return a -H.lQ(a,b)}, -n5:function(a,b){if(a==null)return a +H.m8(a,b)}, +mS:function(a,b){if(a==null)return a if(typeof a==="string")return a -if(J.q(a)[b])return a -H.d2(a,b)}, -bu:function(a){if(a==null)return a -if(!!J.q(a).$if)return a +if(J.r(a)[b])return a +H.de(a,b)}, +bx:function(a){if(a==null)return a +if(!!J.r(a).$ish)return a throw H.a(H.a9(a,"List"))}, -lJ:function(a,b){var z +m1:function(a,b){var z if(a==null)return a -z=J.q(a) -if(!!z.$if)return a +z=J.r(a) +if(!!z.$ish)return a if(z[b])return a -H.d2(a,b)}, -cW:function(a){var z +H.de(a,b)}, +d7:function(a){var z if("$S" in a){z=a.$S if(typeof z=="number")return init.types[H.w(z)] else return a.$S()}return}, aC:function(a,b){var z if(a==null)return!1 if(typeof a=="function")return!0 -z=H.cW(J.q(a)) +z=H.d7(J.r(a)) if(z==null)return!1 -return H.ez(z,null,b,null)}, +return H.eZ(z,null,b,null)}, j:function(a,b){var z,y if(a==null)return a -if($.cO)return a -$.cO=!0 +if($.cZ)return a +$.cZ=!0 try{if(H.aC(a,b))return a -z=H.b7(b) +z=H.ba(b) y=H.a9(a,z) -throw H.a(y)}finally{$.cO=!1}}, -aO:function(a,b){if(a!=null&&!H.b3(a,b))H.t(H.a9(a,H.b7(b))) +throw H.a(y)}finally{$.cZ=!1}}, +aP:function(a,b){if(a!=null&&!H.b6(a,b))H.v(H.a9(a,H.ba(b))) return a}, -eI:function(a){var z,y -z=J.q(a) -if(!!z.$ih){y=H.cW(z) -if(y!=null)return H.b7(y) -return"Closure"}return H.aX(a)}, -lT:function(a){throw H.a(new P.hi(H.r(a)))}, -eP:function(a){return init.getIsolateTag(a)}, +fc:function(a){var z,y +z=J.r(a) +if(!!z.$isf){y=H.d7(z) +if(y!=null)return H.ba(y) +return"Closure"}return H.aY(a)}, +mc:function(a){throw H.a(new P.hy(H.p(a)))}, +fk:function(a){return init.getIsolateTag(a)}, o:function(a,b){a.$ti=b return a}, aq:function(a){if(a==null)return return a.$ti}, -n0:function(a,b,c){return H.aQ(a["$a"+H.e(c)],H.aq(b))}, -b6:function(a,b,c,d){var z -H.r(c) +mO:function(a,b,c){return H.aR(a["$as"+H.d(c)],H.aq(b))}, +b9:function(a,b,c,d){var z +H.p(c) H.w(d) -z=H.aQ(a["$a"+H.e(c)],H.aq(b)) +z=H.aR(a["$as"+H.d(c)],H.aq(b)) return z==null?null:z[d]}, -v:function(a,b,c){var z -H.r(b) +u:function(a,b,c){var z +H.p(b) H.w(c) -z=H.aQ(a["$a"+H.e(b)],H.aq(a)) +z=H.aR(a["$as"+H.d(b)],H.aq(a)) return z==null?null:z[c]}, i:function(a,b){var z H.w(b) z=H.aq(a) return z==null?null:z[b]}, -b7:function(a){return H.az(a,null)}, +ba:function(a){return H.az(a,null)}, az:function(a,b){var z,y -H.l(b,"$if",[P.d],"$af") +H.l(b,"$ish",[P.e],"$ash") if(a==null)return"dynamic" if(a===-1)return"void" -if(typeof a==="object"&&a!==null&&a.constructor===Array)return H.aR(a[0].builtin$cls)+H.cR(a,1,b) -if(typeof a=="function")return H.aR(a.builtin$cls) +if(typeof a==="object"&&a!==null&&a.constructor===Array)return H.aS(a[0].builtin$cls)+H.d1(a,1,b) +if(typeof a=="function")return H.aS(a.builtin$cls) if(a===-2)return"dynamic" if(typeof a==="number"){H.w(a) if(b==null||a<0||a>=b.length)return"unexpected-generic-index:"+a z=b.length y=z-a-1 if(y<0||y>=z)return H.k(b,y) -return H.e(b[y])}if('func' in a)return H.l1(a,b) +return H.d(b[y])}if('func' in a)return H.lk(a,b) if('futureOr' in a)return"FutureOr<"+H.az("type" in a?a.type:null,b)+">" return"unknown-reified-type"}, -l1:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h -z=[P.d] -H.l(b,"$if",z,"$af") +lk:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h +z=[P.e] +H.l(b,"$ish",z,"$ash") if("bounds" in a){y=a.bounds if(b==null){b=H.o([],z) x=null}else x=b.length @@ -1127,20 +1132,20 @@ n+=m+"[" for(z=j.length,m="",l=0;l "+p}, -cR:function(a,b,c){var z,y,x,w,v,u -H.l(c,"$if",[P.d],"$af") +d1:function(a,b,c){var z,y,x,w,v,u +H.l(c,"$ish",[P.e],"$ash") if(a==null)return"" -z=new P.S("") +z=new P.U("") for(y=b,x="",w=!0,v="";y"}, -cY:function(a){var z,y,x,w -z=J.q(a) -if(!!z.$ih){y=H.cW(z) +d9:function(a){var z,y,x,w +z=J.r(a) +if(!!z.$isf){y=H.d7(z) if(y!=null)return y}x=z.constructor if(a==null)return x if(typeof a!="object")return x @@ -1148,51 +1153,51 @@ w=H.aq(a) if(w!=null){w=w.slice() w.splice(0,0,x) x=w}return x}, -aQ:function(a,b){if(a==null)return b +aR:function(a,b){if(a==null)return b a=a.apply(null,b) if(a==null)return if(typeof a==="object"&&a!==null&&a.constructor===Array)return a if(typeof a=="function")return a.apply(null,b) return b}, -aN:function(a,b,c,d){var z,y -H.r(b) -H.bu(c) -H.r(d) +aO:function(a,b,c,d){var z,y +H.p(b) +H.bx(c) +H.p(d) if(a==null)return!1 z=H.aq(a) -y=J.q(a) +y=J.r(a) if(y[b]==null)return!1 -return H.eL(H.aQ(y[d],z),null,c,null)}, -l:function(a,b,c,d){H.r(b) -H.bu(c) -H.r(d) +return H.ff(H.aR(y[d],z),null,c,null)}, +l:function(a,b,c,d){H.p(b) +H.bx(c) +H.p(d) if(a==null)return a -if(H.aN(a,b,c,d))return a -throw H.a(H.a9(a,function(e,f){return e.replace(/[^<,> ]+/g,function(g){return f[g]||g})}(H.aR(b.substring(2))+H.cR(c,0,null),init.mangledGlobalNames)))}, -eL:function(a,b,c,d){var z,y +if(H.aO(a,b,c,d))return a +throw H.a(H.a9(a,function(e,f){return e.replace(/[^<,> ]+/g,function(g){return f[g]||g})}(H.aS(b.substring(3))+H.d1(c,0,null),init.mangledGlobalNames)))}, +ff:function(a,b,c,d){var z,y if(c==null)return!0 if(a==null){z=c.length for(y=0;y=0 -else{z=J.q(b) -if(!!z.$idu){z=C.a.F(a,c) -return b.b.test(z)}else{z=z.bC(b,C.a.F(a,c)) -return!z.gE(z)}}}, -aP:function(a,b,c){var z,y,x +else{z=J.r(b) +if(!!z.$isdB){z=C.a.F(a,c) +return b.b.test(z)}else{z=z.bF(b,C.a.F(a,c)) +return!z.gB(z)}}}, +aQ:function(a,b,c){var z,y,x if(b==="")if(a==="")return c else{z=a.length for(y=c,x=0;x>2,x>>1,(x&1)===1,z[2])}}}, -j6:{"^":"b;a,b,c,d,e,f", +return new H.iS(a,z,(y&2)===2,y>>2,x>>1,(x&1)===1,z[2])}}}, +jq:{"^":"b;a,b,c,d,e,f", a2:function(a){var z,y,x z=new RegExp(this.a).exec(a) if(z==null)return @@ -1391,45 +1396,45 @@ x=this.f if(x!==-1)y.receiver=z[x+1] return y}, p:{ -af:function(a){var z,y,x,w,v,u +ag:function(a){var z,y,x,w,v,u a=a.replace(String({}),'$receiver$').replace(/[[\]{}()*+?.\\^$|]/g,"\\$&") z=a.match(/\\\$[a-zA-Z]+\\\$/g) -if(z==null)z=H.o([],[P.d]) +if(z==null)z=H.o([],[P.e]) y=z.indexOf("\\$arguments\\$") x=z.indexOf("\\$argumentsExpr\\$") w=z.indexOf("\\$expr\\$") v=z.indexOf("\\$method\\$") u=z.indexOf("\\$receiver\\$") -return new H.j6(a.replace(new RegExp('\\\\\\$arguments\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$','g'),'((?:x|[^x])*)'),y,x,w,v,u)}, -bN:function(a){return function($expr$){var $argumentsExpr$='$arguments$' +return new H.jq(a.replace(new RegExp('\\\\\\$arguments\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$','g'),'((?:x|[^x])*)'),y,x,w,v,u)}, +bR:function(a){return function($expr$){var $argumentsExpr$='$arguments$' try{$expr$.$method$($argumentsExpr$)}catch(z){return z.message}}(a)}, -dR:function(a){return function($expr$){try{$expr$.$method$}catch(z){return z.message}}(a)}}}, -ig:{"^":"K;a,b", +e6:function(a){return function($expr$){try{$expr$.$method$}catch(z){return z.message}}(a)}}}, +iz:{"^":"L;a,b", h:function(a){var z=this.b -if(z==null)return"NoSuchMethodError: "+H.e(this.a) +if(z==null)return"NoSuchMethodError: "+H.d(this.a) return"NoSuchMethodError: method not found: '"+z+"' on null"}, p:{ -dF:function(a,b){return new H.ig(a,b==null?null:b.method)}}}, -hR:{"^":"K;a,b,c", +dP:function(a,b){return new H.iz(a,b==null?null:b.method)}}}, +i6:{"^":"L;a,b,c", h:function(a){var z,y z=this.b -if(z==null)return"NoSuchMethodError: "+H.e(this.a) +if(z==null)return"NoSuchMethodError: "+H.d(this.a) y=this.c -if(y==null)return"NoSuchMethodError: method not found: '"+z+"' ("+H.e(this.a)+")" -return"NoSuchMethodError: method not found: '"+z+"' on '"+y+"' ("+H.e(this.a)+")"}, +if(y==null)return"NoSuchMethodError: method not found: '"+z+"' ("+H.d(this.a)+")" +return"NoSuchMethodError: method not found: '"+z+"' on '"+y+"' ("+H.d(this.a)+")"}, p:{ -cl:function(a,b){var z,y +ct:function(a,b){var z,y z=b==null y=z?null:b.method -return new H.hR(a,y,z?null:b.receiver)}}}, -jb:{"^":"K;a", +return new H.i6(a,y,z?null:b.receiver)}}}, +jv:{"^":"L;a", h:function(a){var z=this.a return z.length===0?"Error":"Error: "+z}}, -c9:{"^":"b;a,b"}, -lV:{"^":"h:3;a", -$1:function(a){if(!!J.q(a).$iK)if(a.$thrownJsError==null)a.$thrownJsError=this.a +cg:{"^":"b;a,b"}, +me:{"^":"f:8;a", +$1:function(a){if(!!J.r(a).$isL)if(a.$thrownJsError==null)a.$thrownJsError=this.a return a}}, -ee:{"^":"b;a,0b", +eB:{"^":"b;a,0b", h:function(a){var z,y z=this.b if(z!=null)return z @@ -1438,125 +1443,132 @@ y=z!==null&&typeof z==="object"?z.stack:null z=y==null?"":y this.b=z return z}, -$iD:1}, -h:{"^":"b;", -h:function(a){return"Closure '"+H.aX(this).trim()+"'"}, -gcX:function(){return this}, -$icc:1, -gcX:function(){return this}}, -dQ:{"^":"h;"}, -iS:{"^":"dQ;", +$isD:1}, +f:{"^":"b;", +h:function(a){return"Closure '"+H.aY(this).trim()+"'"}, +gd1:function(){return this}, +$iscj:1, +gd1:function(){return this}}, +e_:{"^":"f;"}, +j9:{"^":"e_;", h:function(a){var z=this.$static_name if(z==null)return"Closure of unknown static method" -return"Closure '"+H.aR(z)+"'"}}, -c4:{"^":"dQ;a,b,c,d", -J:function(a,b){if(b==null)return!1 +return"Closure '"+H.aS(z)+"'"}}, +c9:{"^":"e_;a,b,c,d", +I:function(a,b){if(b==null)return!1 if(this===b)return!0 -if(!(b instanceof H.c4))return!1 +if(!(b instanceof H.c9))return!1 return this.a===b.a&&this.b===b.b&&this.c===b.c}, gA:function(a){var z,y z=this.c if(z==null)y=H.au(this.a) -else y=typeof z!=="object"?J.aD(z):H.au(z) +else y=typeof z!=="object"?J.aE(z):H.au(z) return(y^H.au(this.b))>>>0}, h:function(a){var z=this.c if(z==null)z=this.a -return"Closure '"+H.e(this.d)+"' of "+("Instance of '"+H.aX(z)+"'")}, +return"Closure '"+H.d(this.d)+"' of "+("Instance of '"+H.aY(z)+"'")}, p:{ -c5:function(a){return a.a}, -df:function(a){return a.c}, -by:function(a){var z,y,x,w,v -z=new H.c4("self","target","receiver","name") -y=J.bD(Object.getOwnPropertyNames(z)) +ca:function(a){return a.a}, +dm:function(a){return a.c}, +bA:function(a){var z,y,x,w,v +z=new H.c9("self","target","receiver","name") +y=J.bF(Object.getOwnPropertyNames(z)) for(x=y.length,w=0;w", +jr:{"^":"L;P:a>", h:function(a){return this.a}, p:{ -a9:function(a,b){return new H.j7("TypeError: "+P.bd(a)+": type '"+H.eI(a)+"' is not a subtype of type '"+b+"'")}}}, -h6:{"^":"K;S:a>", +a9:function(a,b){return new H.jr("TypeError: "+H.d(P.be(a))+": type '"+H.fc(a)+"' is not a subtype of type '"+b+"'")}}}, +hm:{"^":"L;P:a>", h:function(a){return this.a}, p:{ -dh:function(a,b){return new H.h6("CastError: "+P.bd(a)+": type '"+H.eI(a)+"' is not a subtype of type '"+b+"'")}}}, -iG:{"^":"K;S:a>", -h:function(a){return"RuntimeError: "+H.e(this.a)}, +cb:function(a,b){return new H.hm("CastError: "+H.d(P.be(a))+": type '"+H.fc(a)+"' is not a subtype of type '"+b+"'")}}}, +iY:{"^":"L;P:a>", +h:function(a){return"RuntimeError: "+H.d(this.a)}, p:{ -iH:function(a){return new H.iG(a)}}}, -bO:{"^":"b;a,0b,0c,0d", -gb0:function(){var z=this.b -if(z==null){z=H.b7(this.a) +iZ:function(a){return new H.iY(a)}}}, +bS:{"^":"b;a,0b,0c,0d", +gb2:function(){var z=this.b +if(z==null){z=H.ba(this.a) this.b=z}return z}, -h:function(a){return this.gb0()}, +h:function(a){return this.gb2()}, gA:function(a){var z=this.d -if(z==null){z=C.a.gA(this.gb0()) +if(z==null){z=C.a.gA(this.gb2()) this.d=z}return z}, -J:function(a,b){if(b==null)return!1 -return b instanceof H.bO&&this.gb0()===b.gb0()}}, -aj:{"^":"dB;a,0b,0c,0d,0e,0f,r,$ti", +I:function(a,b){if(b==null)return!1 +return b instanceof H.bS&&this.gb2()===b.gb2()}}, +ac:{"^":"dL;a,0b,0c,0d,0e,0f,r,$ti", gi:function(a){return this.a}, -gE:function(a){return this.a===0}, -gan:function(){return new H.hZ(this,[H.i(this,0)])}, -ac:function(a){var z,y +gB:function(a){return this.a===0}, +gao:function(){return new H.ie(this,[H.i(this,0)])}, +a7:function(a){var z,y if(typeof a==="string"){z=this.b if(z==null)return!1 -return this.cf(z,a)}else if(typeof a==="number"&&(a&0x3ffffff)===a){y=this.c +return this.ci(z,a)}else if(typeof a==="number"&&(a&0x3ffffff)===a){y=this.c if(y==null)return!1 -return this.cf(y,a)}else return this.ey(a)}, -ey:["d6",function(a){var z=this.d +return this.ci(y,a)}else return this.eI(a)}, +eI:["dc",function(a){var z=this.d if(z==null)return!1 -return this.aH(this.bo(z,this.aG(a)),a)>=0}], -bB:function(a,b){H.l(b,"$iR",this.$ti,"$aR").I(0,new H.hQ(this))}, +return this.aJ(this.br(z,this.aI(a)),a)>=0}], +bE:function(a,b){H.l(b,"$isS",this.$ti,"$asS").J(0,new H.i5(this))}, j:function(a,b){var z,y,x,w if(typeof b==="string"){z=this.b if(z==null)return -y=this.aU(z,b) +y=this.aW(z,b) x=y==null?null:y.b return x}else if(typeof b==="number"&&(b&0x3ffffff)===b){w=this.c if(w==null)return -y=this.aU(w,b) +y=this.aW(w,b) x=y==null?null:y.b -return x}else return this.ez(b)}, -ez:["d7",function(a){var z,y,x +return x}else return this.eJ(b)}, +eJ:["dd",function(a){var z,y,x z=this.d if(z==null)return -y=this.bo(z,this.aG(a)) -x=this.aH(y,a) +y=this.br(z,this.aI(a)) +x=this.aJ(y,a) if(x<0)return return y[x].b}], -l:function(a,b,c){var z,y +k:function(a,b,c){var z,y H.n(b,H.i(this,0)) H.n(c,H.i(this,1)) if(typeof b==="string"){z=this.b -if(z==null){z=this.bt() -this.b=z}this.c7(z,b,c)}else if(typeof b==="number"&&(b&0x3ffffff)===b){y=this.c -if(y==null){y=this.bt() -this.c=y}this.c7(y,b,c)}else this.eA(b,c)}, -eA:["d8",function(a,b){var z,y,x,w +if(z==null){z=this.bw() +this.b=z}this.ca(z,b,c)}else if(typeof b==="number"&&(b&0x3ffffff)===b){y=this.c +if(y==null){y=this.bw() +this.c=y}this.ca(y,b,c)}else this.eK(b,c)}, +eK:["de",function(a,b){var z,y,x,w H.n(a,H.i(this,0)) H.n(b,H.i(this,1)) z=this.d -if(z==null){z=this.bt() -this.d=z}y=this.aG(a) -x=this.bo(z,y) -if(x==null)this.bw(z,y,[this.bu(a,b)]) -else{w=this.aH(x,a) +if(z==null){z=this.bw() +this.d=z}y=this.aI(a) +x=this.br(z,y) +if(x==null)this.bz(z,y,[this.bx(a,b)]) +else{w=this.aJ(x,a) if(w>=0)x[w].b=b -else x.push(this.bu(a,b))}}], -I:function(a,b){var z,y +else x.push(this.bx(a,b))}}], +f_:function(a,b){var z +H.n(a,H.i(this,0)) +H.j(b,{func:1,ret:H.i(this,1)}) +if(this.a7(a))return this.j(0,a) +z=b.$0() +this.k(0,a,z) +return z}, +J:function(a,b){var z,y H.j(b,{func:1,ret:-1,args:[H.i(this,0),H.i(this,1)]}) z=this.e y=this.r for(;z!=null;){b.$2(z.a,z.b) if(y!==this.r)throw H.a(P.a3(this)) z=z.c}}, -c7:function(a,b,c){var z +ca:function(a,b,c){var z H.n(b,H.i(this,0)) H.n(c,H.i(this,1)) -z=this.aU(a,b) -if(z==null)this.bw(a,b,this.bu(b,c)) +z=this.aW(a,b) +if(z==null)this.bz(a,b,this.bx(b,c)) else z.b=c}, -bu:function(a,b){var z,y -z=new H.hY(H.n(a,H.i(this,0)),H.n(b,H.i(this,1))) +bx:function(a,b){var z,y +z=new H.id(H.n(a,H.i(this,0)),H.n(b,H.i(this,1))) if(this.e==null){this.f=z this.e=z}else{y=this.f z.d=y @@ -1564,131 +1576,131 @@ y.c=z this.f=z}++this.a this.r=this.r+1&67108863 return z}, -aG:function(a){return J.aD(a)&0x3ffffff}, -aH:function(a,b){var z,y +aI:function(a){return J.aE(a)&0x3ffffff}, +aJ:function(a,b){var z,y if(a==null)return-1 z=a.length -for(y=0;y",z) -this.dr(z,"") +h:function(a){return P.cw(this)}, +aW:function(a,b){return a[b]}, +br:function(a,b){return a[b]}, +bz:function(a,b,c){a[b]=c}, +dv:function(a,b){delete a[b]}, +ci:function(a,b){return this.aW(a,b)!=null}, +bw:function(){var z=Object.create(null) +this.bz(z,"",z) +this.dv(z,"") return z}, -$idx:1}, -hQ:{"^":"h;a", +$isdE:1}, +i5:{"^":"f;a", $2:function(a,b){var z=this.a -z.l(0,H.n(a,H.i(z,0)),H.n(b,H.i(z,1)))}, +z.k(0,H.n(a,H.i(z,0)),H.n(b,H.i(z,1)))}, $S:function(){var z=this.a return{func:1,ret:P.x,args:[H.i(z,0),H.i(z,1)]}}}, -hY:{"^":"b;a,b,0c,0d"}, -hZ:{"^":"I;a,$ti", +id:{"^":"b;a,b,0c,0d"}, +ie:{"^":"J;a,$ti", gi:function(a){return this.a.a}, -gE:function(a){return this.a.a===0}, +gB:function(a){return this.a.a===0}, gK:function(a){var z,y z=this.a -y=new H.i_(z,z.r,this.$ti) +y=new H.ig(z,z.r,this.$ti) y.c=z.e return y}}, -i_:{"^":"b;a,b,0c,0d,$ti", -sc6:function(a){this.d=H.n(a,H.i(this,0))}, -gB:function(){return this.d}, +ig:{"^":"b;a,b,0c,0d,$ti", +sc9:function(a){this.d=H.n(a,H.i(this,0))}, +gD:function(){return this.d}, q:function(){var z=this.a if(this.b!==z.r)throw H.a(P.a3(z)) else{z=this.c -if(z==null){this.sc6(null) -return!1}else{this.sc6(z.a) +if(z==null){this.sc9(null) +return!1}else{this.sc9(z.a) this.c=this.c.c return!0}}}, -$iY:1}, -lD:{"^":"h:3;a", +$isa_:1}, +lW:{"^":"f:8;a", $1:function(a){return this.a(a)}}, -lE:{"^":"h:37;a", +lX:{"^":"f:42;a", $2:function(a,b){return this.a(a,b)}}, -lF:{"^":"h:25;a", -$1:function(a){return this.a(H.r(a))}}, -du:{"^":"b;a,b,0c,0d", +lY:{"^":"f:30;a", +$1:function(a){return this.a(H.p(a))}}, +dB:{"^":"b;a,b,0c,0d", h:function(a){return"RegExp/"+this.a+"/"}, -gdH:function(){var z=this.c +gdM:function(){var z=this.c if(z!=null)return z z=this.b -z=H.ci(this.a,z.multiline,!z.ignoreCase,!0) +z=H.cp(this.a,z.multiline,!z.ignoreCase,!0) this.c=z return z}, -gdG:function(){var z=this.d +gdL:function(){var z=this.d if(z!=null)return z z=this.b -z=H.ci(this.a+"|()",z.multiline,!z.ignoreCase,!0) +z=H.cp(this.a+"|()",z.multiline,!z.ignoreCase,!0) this.d=z return z}, -bD:function(a,b,c){if(c>b.length)throw H.a(P.z(c,0,b.length,null,null)) -return new H.jz(this,b,c)}, -bC:function(a,b){return this.bD(a,b,0)}, -du:function(a,b){var z,y -z=this.gdH() +bG:function(a,b,c){if(c>b.length)throw H.a(P.z(c,0,b.length,null,null)) +return new H.jS(this,b,c)}, +bF:function(a,b){return this.bG(a,b,0)}, +dA:function(a,b){var z,y +z=this.gdM() z.lastIndex=b y=z.exec(a) if(y==null)return -return new H.e9(this,y)}, -dt:function(a,b){var z,y -z=this.gdG() +return new H.ew(this,y)}, +dz:function(a,b){var z,y +z=this.gdL() z.lastIndex=b y=z.exec(a) if(y==null)return if(0>=y.length)return H.k(y,-1) if(y.pop()!=null)return -return new H.e9(this,y)}, -at:function(a,b,c){if(c<0||c>b.length)throw H.a(P.z(c,0,b.length,null,null)) -return this.dt(b,c)}, -$icu:1, -$iiC:1, +return new H.ew(this,y)}, +aw:function(a,b,c){if(c<0||c>b.length)throw H.a(P.z(c,0,b.length,null,null)) +return this.dz(b,c)}, +$iscB:1, +$isiU:1, p:{ -ci:function(a,b,c,d){var z,y,x,w +cp:function(a,b,c,d){var z,y,x,w z=b?"m":"" y=c?"":"i" x=d?"g":"" w=function(e,f){try{return new RegExp(e,f)}catch(v){return v}}(a,z+y+x) if(w instanceof RegExp)return w throw H.a(P.C("Illegal RegExp pattern ("+String(w)+")",a,null))}}}, -e9:{"^":"b;a,b", +ew:{"^":"b;a,b", gu:function(){var z=this.b return z.index+z[0].length}, j:function(a,b){var z=this.b if(b>=z.length)return H.k(z,b) return z[b]}, -$iac:1}, -jz:{"^":"hL;a,b,c", -gK:function(a){return new H.dX(this.a,this.b,this.c)}, -$ap:function(){return[P.ac]}}, -dX:{"^":"b;a,b,c,0d", -gB:function(){return this.d}, +$isad:1}, +jS:{"^":"i0;a,b,c", +gK:function(a){return new H.ei(this.a,this.b,this.c)}, +$asq:function(){return[P.ad]}}, +ei:{"^":"b;a,b,c,0d", +gD:function(){return this.d}, q:function(){var z,y,x,w z=this.b if(z==null)return!1 y=this.c -if(y<=z.length){x=this.a.du(z,y) +if(y<=z.length){x=this.a.dA(z,y) if(x!=null){this.d=x w=x.gu() this.c=x.b.index===w?w+1:w return!0}}this.d=null this.b=null return!1}, -$iY:1, -$aY:function(){return[P.ac]}}, -dP:{"^":"b;a,b,c", +$isa_:1, +$asa_:function(){return[P.ad]}}, +dY:{"^":"b;a,b,c", gu:function(){return this.a+this.c.length}, -j:function(a,b){if(b!==0)H.t(P.aH(b,null,null)) +j:function(a,b){if(b!==0)H.v(P.aI(b,null,null)) return this.c}, -$iac:1}, -kw:{"^":"p;a,b,c", -gK:function(a){return new H.kx(this.a,this.b,this.c)}, -$ap:function(){return[P.ac]}}, -kx:{"^":"b;a,b,c,0d", +$isad:1}, +kP:{"^":"q;a,b,c", +gK:function(a){return new H.kQ(this.a,this.b,this.c)}, +$asq:function(){return[P.ad]}}, +kQ:{"^":"b;a,b,c,0d", q:function(){var z,y,x,w,v,u,t z=this.c y=this.b @@ -1700,449 +1712,451 @@ return!1}u=w.indexOf(y,z) if(u<0){this.c=v+1 this.d=null return!1}t=u+x -this.d=new H.dP(u,w,y) +this.d=new H.dY(u,w,y) this.c=t===this.c?t+1:t return!0}, -gB:function(){return this.d}, -$iY:1, -$aY:function(){return[P.ac]}}}],["","",,H,{"^":"", -ly:function(a){return J.dr(a?Object.keys(a):[],null)}}],["","",,H,{"^":"", -bU:function(a){var z,y,x -z=J.q(a) -if(!!z.$iaU)return a +gD:function(){return this.d}, +$isa_:1, +$asa_:function(){return[P.ad]}}}],["","",,H,{"^":"", +lR:function(a){return J.dy(a?Object.keys(a):[],null)}}],["","",,H,{"^":"", +bZ:function(a){var z,y,x +z=J.r(a) +if(!!z.$isaV)return a y=new Array(z.gi(a)) y.fixed$length=Array -for(x=0;x>>0!==a||a>=c)throw H.a(H.aa(b,a))}, -ew:function(a,b,c){var z +ai:function(a,b,c){if(a>>>0!==a||a>=c)throw H.a(H.aa(b,a))}, +eU:function(a,b,c){var z if(!(a>>>0!==a))z=b>>>0!==b||a>b||b>c else z=!0 -if(z)throw H.a(H.lu(a,b,c)) +if(z)throw H.a(H.lN(a,b,c)) return b}, -m6:{"^":"V;",$ifW:1,"%":"ArrayBuffer"}, -id:{"^":"V;", -dC:function(a,b,c,d){var z=P.z(b,0,c,d,null) +mm:{"^":"W;",$ishb:1,"%":"ArrayBuffer"}, +ix:{"^":"W;", +dG:function(a,b,c,d){var z=P.z(b,0,c,d,null) throw H.a(z)}, -c9:function(a,b,c,d){if(b>>>0!==b||b>c)this.dC(a,b,c,d)}, -$idS:1, -"%":"DataView;ArrayBufferView;cs|ea|eb|ic|ec|ed|al"}, -cs:{"^":"id;", +cc:function(a,b,c,d){if(b>>>0!==b||b>c)this.dG(a,b,c,d)}, +$iseb:1, +"%":"DataView;ArrayBufferView;cz|ex|ey|iw|ez|eA|al"}, +cz:{"^":"ix;", gi:function(a){return a.length}, -dW:function(a,b,c,d,e){var z,y,x +e2:function(a,b,c,d,e){var z,y,x z=a.length -this.c9(a,b,z,"start") -this.c9(a,c,z,"end") +this.cc(a,b,z,"start") +this.cc(a,c,z,"end") if(b>c)throw H.a(P.z(b,0,c,null,null)) y=c-b x=d.length -if(x-e=4){y=b.aW() +P.c5(new P.ki(b,z,y))}}, +bV:function(a,b){var z,y +for(;z=a.a,z===2;)a=H.m(a.c,"$isE") +if(z>=4){y=b.aY() b.a=a.a b.c=a.c -P.aJ(b,y)}else{y=H.m(b.c,"$iaw") +P.aK(b,y)}else{y=H.m(b.c,"$isaw") b.a=2 b.c=a -a.cs(y)}}, -aJ:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m +a.cu(y)}}, +aK:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m z={} z.a=a for(y=a;!0;){x={} w=y.a===8 -if(b==null){if(w){v=H.m(y.c,"$ia2") +if(b==null){if(w){v=H.m(y.c,"$isa2") y=y.b u=v.a t=v.b y.toString -P.b2(null,null,y,u,t)}return}for(;s=b.a,s!=null;b=s){b.a=null -P.aJ(z.a,b)}y=z.a +P.b4(null,null,y,u,t)}return}for(;s=b.a,s!=null;b=s){b.a=null +P.aK(z.a,b)}y=z.a r=y.c x.a=w x.b=r @@ -2153,356 +2167,376 @@ if(t){t=b.b q=t.b if(w){p=y.b p.toString -p=p==q +p=p==null?q==null:p===q if(!p)q.toString else p=!0 p=!p}else p=!1 -if(p){H.m(r,"$ia2") +if(p){H.m(r,"$isa2") y=y.b u=r.a t=r.b y.toString -P.b2(null,null,y,u,t) -return}o=$.u -if(o!=q)$.u=q +P.b4(null,null,y,u,t) +return}o=$.t +if(o==null?q!=null:o!==q)$.t=q else o=null y=b.c -if(y===8)new P.k4(z,x,b,w).$0() -else if(u){if((y&1)!==0)new P.k3(x,b,r).$0()}else if((y&2)!==0)new P.k2(z,x,b).$0() -if(o!=null)$.u=o +if(y===8)new P.kn(z,x,b,w).$0() +else if(u){if((y&1)!==0)new P.km(x,b,r).$0()}else if((y&2)!==0)new P.kl(z,x,b).$0() +if(o!=null)$.t=o y=x.b -if(!!J.q(y).$iX){if(y.a>=4){n=H.m(t.c,"$iaw") +if(!!J.r(y).$isQ){if(y.a>=4){n=H.m(t.c,"$isaw") t.c=null -b=t.aX(n) +b=t.aZ(n) t.a=y.a t.c=y.c z.a=y -continue}else P.bR(y,t) +continue}else P.bV(y,t) return}}m=b.b -n=H.m(m.c,"$iaw") +n=H.m(m.c,"$isaw") m.c=null -b=m.aX(n) +b=m.aZ(n) y=x.a u=x.b if(!y){H.n(u,H.i(m,0)) m.a=4 -m.c=u}else{H.m(u,"$ia2") +m.c=u}else{H.m(u,"$isa2") m.a=8 m.c=u}z.a=m y=m}}}}, -jV:{"^":"h:0;a,b", -$0:function(){P.aJ(this.a,this.b)}}, -k1:{"^":"h:0;a,b", -$0:function(){P.aJ(this.b,this.a.a)}}, -jY:{"^":"h:12;a", +kd:{"^":"f:0;a,b", +$0:function(){P.aK(this.a,this.b)}}, +kk:{"^":"f:0;a,b", +$0:function(){P.aK(this.b,this.a.a)}}, +kg:{"^":"f:11;a", $1:function(a){var z=this.a z.a=0 -z.aA(a)}}, -jZ:{"^":"h:32;a", -$2:function(a,b){H.m(b,"$iD") -this.a.a3(a,b)}, +z.at(a)}}, +kh:{"^":"f:37;a", +$2:function(a,b){this.a.a3(a,H.m(b,"$isD"))}, $1:function(a){return this.$2(a,null)}}, -k_:{"^":"h:0;a,b,c", +ki:{"^":"f:0;a,b,c", $0:function(){this.a.a3(this.b,this.c)}}, -jX:{"^":"h:0;a,b", +kf:{"^":"f:0;a,b", $0:function(){var z,y,x z=this.a y=H.n(this.b,H.i(z,0)) -x=z.aW() +x=z.aY() z.a=4 z.c=y -P.aJ(z,x)}}, -k0:{"^":"h:0;a,b", -$0:function(){P.bR(this.b,this.a)}}, -jW:{"^":"h:0;a,b,c", +P.aK(z,x)}}, +kj:{"^":"f:0;a,b", +$0:function(){P.bV(this.b,this.a)}}, +ke:{"^":"f:0;a,b,c", $0:function(){this.a.a3(this.b,this.c)}}, -k4:{"^":"h:1;a,b,c,d", +kn:{"^":"f:1;a,b,c,d", $0:function(){var z,y,x,w,v,u,t z=null try{w=this.c -z=w.b.b.cR(H.j(w.d,{func:1}),null)}catch(v){y=H.P(v) +z=w.b.b.cV(H.j(w.d,{func:1}),null)}catch(v){y=H.P(v) x=H.a7(v) -if(this.d){w=H.m(this.a.a.c,"$ia2").a +if(this.d){w=H.m(this.a.a.c,"$isa2").a u=y u=w==null?u==null:w===u w=u}else w=!1 u=this.b -if(w)u.b=H.m(this.a.a.c,"$ia2") +if(w)u.b=H.m(this.a.a.c,"$isa2") else u.b=new P.a2(y,x) u.a=!0 -return}if(!!J.q(z).$iX){if(z instanceof P.G&&z.a>=4){if(z.a===8){w=this.b -w.b=H.m(z.c,"$ia2") +return}if(!!J.r(z).$isQ){if(z instanceof P.E&&z.gaD()>=4){if(z.gaD()===8){w=this.b +w.b=H.m(z.ge0(),"$isa2") w.a=!0}return}t=this.a.a w=this.b -w.b=z.aw(new P.k5(t),null) +w.b=z.az(new P.ko(t),null) w.a=!1}}}, -k5:{"^":"h:36;a", +ko:{"^":"f:39;a", $1:function(a){return this.a}}, -k3:{"^":"h:1;a,b,c", +km:{"^":"f:1;a,b,c", $0:function(){var z,y,x,w,v,u,t try{x=this.b w=H.i(x,0) v=H.n(this.c,w) u=H.i(x,1) -this.a.b=x.b.b.bX(H.j(x.d,{func:1,ret:{futureOr:1,type:u},args:[w]}),v,{futureOr:1,type:u},w)}catch(t){z=H.P(t) +this.a.b=x.b.b.c_(H.j(x.d,{func:1,ret:{futureOr:1,type:u},args:[w]}),v,{futureOr:1,type:u},w)}catch(t){z=H.P(t) y=H.a7(t) x=this.a x.b=new P.a2(z,y) x.a=!0}}}, -k2:{"^":"h:1;a,b,c", +kl:{"^":"f:1;a,b,c", $0:function(){var z,y,x,w,v,u,t,s -try{z=H.m(this.a.a.c,"$ia2") +try{z=H.m(this.a.a.c,"$isa2") w=this.c -if(w.eG(z)&&w.e!=null){v=this.b -v.b=w.ew(z) +if(w.eS(z)&&w.e!=null){v=this.b +v.b=w.eG(z) v.a=!1}}catch(u){y=H.P(u) x=H.a7(u) -w=H.m(this.a.a.c,"$ia2") +w=H.m(this.a.a.c,"$isa2") v=w.a t=y s=this.b if(v==null?t==null:v===t)s.b=w else s.b=new P.a2(y,x) s.a=!0}}}, -dZ:{"^":"b;a,0b"}, -Z:{"^":"b;$ti", +ek:{"^":"b;a,0b"}, +T:{"^":"b;$ti", gi:function(a){var z,y z={} -y=new P.G(0,$.u,[P.c]) +y=new P.E(0,$.t,[P.c]) z.a=0 -this.af(new P.iY(z,this),!0,new P.iZ(z,y),y.gcd()) +this.aa(new P.jh(z,this),!0,new P.ji(z,y),y.gbl()) +return y}, +gB:function(a){var z,y +z={} +y=new P.E(0,$.t,[P.F]) +z.a=null +z.a=this.aa(new P.jf(z,this,y),!0,new P.jg(y),y.gbl()) return y}, -gal:function(a){var z,y +gam:function(a){var z,y z={} -y=new P.G(0,$.u,[H.v(this,"Z",0)]) +y=new P.E(0,$.t,[H.u(this,"T",0)]) z.a=null -z.a=this.af(new P.iW(z,this,y),!0,new P.iX(y),y.gcd()) +z.a=this.aa(new P.jd(z,this,y),!0,new P.je(y),y.gbl()) return y}}, -iV:{"^":"h;a,b", +jc:{"^":"f;a,b", $0:function(){var z=this.a -return new P.e6(new J.c3(z,1,0,[H.i(z,0)]),0,[this.b])}, -$S:function(){return{func:1,ret:[P.e6,this.b]}}}, -iY:{"^":"h;a,b", -$1:function(a){H.n(a,H.v(this.b,"Z",0));++this.a.a}, -$S:function(){return{func:1,ret:P.x,args:[H.v(this.b,"Z",0)]}}}, -iZ:{"^":"h:0;a,b", -$0:function(){this.b.aA(this.a.a)}}, -iW:{"^":"h;a,b,c", -$1:function(a){H.n(a,H.v(this.b,"Z",0)) -P.kU(this.a.a,this.c,a)}, -$S:function(){return{func:1,ret:P.x,args:[H.v(this.b,"Z",0)]}}}, -iX:{"^":"h:0;a", -$0:function(){var z,y,x,w -try{x=H.ch() +return new P.et(new J.c8(z,1,0,[H.i(z,0)]),0,[this.b])}, +$S:function(){return{func:1,ret:[P.et,this.b]}}}, +jh:{"^":"f;a,b", +$1:function(a){H.n(a,H.u(this.b,"T",0));++this.a.a}, +$S:function(){return{func:1,ret:P.x,args:[H.u(this.b,"T",0)]}}}, +ji:{"^":"f:0;a,b", +$0:function(){this.b.at(this.a.a)}}, +jf:{"^":"f;a,b,c", +$1:function(a){H.n(a,H.u(this.b,"T",0)) +P.eT(this.a.a,this.c,!1)}, +$S:function(){return{func:1,ret:P.x,args:[H.u(this.b,"T",0)]}}}, +jg:{"^":"f:0;a", +$0:function(){this.a.at(!0)}}, +jd:{"^":"f;a,b,c", +$1:function(a){H.n(a,H.u(this.b,"T",0)) +P.eT(this.a.a,this.c,a)}, +$S:function(){return{func:1,ret:P.x,args:[H.u(this.b,"T",0)]}}}, +je:{"^":"f:0;a", +$0:function(){var z,y,x,w,v +try{x=H.co() throw H.a(x)}catch(w){z=H.P(w) y=H.a7(w) -$.u.toString -this.a.a3(z,y)}}}, +x=$.t +v=H.m(y,"$isD") +x.toString +this.a.a3(z,v)}}}, av:{"^":"b;$ti"}, -cy:{"^":"Z;$ti", -af:function(a,b,c,d){return this.a.af(H.j(a,{func:1,ret:-1,args:[H.v(this,"cy",0)]}),!0,H.j(c,{func:1,ret:-1}),d)}}, -iU:{"^":"b;"}, -ks:{"^":"b;$ti", -gdQ:function(){if((this.b&8)===0)return H.l(this.a,"$iag",this.$ti,"$aag") +cG:{"^":"T;$ti", +aa:function(a,b,c,d){return this.a.aa(H.j(a,{func:1,ret:-1,args:[H.u(this,"cG",0)]}),!0,H.j(c,{func:1,ret:-1}),d)}}, +jb:{"^":"b;"}, +kL:{"^":"b;aD:b<,$ti", +gdV:function(){if((this.b&8)===0)return H.l(this.a,"$isah",this.$ti,"$asah") var z=this.$ti -return H.l(H.l(this.a,"$ia_",z,"$aa_").gb8(),"$iag",z,"$aag")}, -bl:function(){var z,y +return H.l(H.l(this.a,"$isa0",z,"$asa0").gba(),"$isah",z,"$asah")}, +bo:function(){var z,y if((this.b&8)===0){z=this.a if(z==null){z=new P.ax(0,this.$ti) -this.a=z}return H.l(z,"$iax",this.$ti,"$aax")}z=this.$ti -y=H.l(this.a,"$ia_",z,"$aa_") -y.gb8() -return H.l(y.gb8(),"$iax",z,"$aax")}, -gbx:function(){if((this.b&8)!==0){var z=this.$ti -return H.l(H.l(this.a,"$ia_",z,"$aa_").gb8(),"$ibn",z,"$abn")}return H.l(this.a,"$ibn",this.$ti,"$abn")}, -bf:function(){if((this.b&4)!==0)return new P.bl("Cannot add event after closing") -return new P.bl("Cannot add event while adding a stream")}, -ci:function(){var z=this.c -if(z==null){z=(this.b&2)!==0?$.b8():new P.G(0,$.u,[null]) +this.a=z}return H.l(z,"$isax",this.$ti,"$asax")}z=this.$ti +y=H.l(this.a,"$isa0",z,"$asa0") +y.gba() +return H.l(y.gba(),"$isax",z,"$asax")}, +gbA:function(){if((this.b&8)!==0){var z=this.$ti +return H.l(H.l(this.a,"$isa0",z,"$asa0").gba(),"$isbr",z,"$asbr")}return H.l(this.a,"$isbr",this.$ti,"$asbr")}, +bh:function(){if((this.b&4)!==0)return new P.bo("Cannot add event after closing") +return new P.bo("Cannot add event while adding a stream")}, +ck:function(){var z=this.c +if(z==null){z=(this.b&2)!==0?$.$get$aU():new P.E(0,$.t,[null]) this.c=z}return z}, m:function(a,b){var z H.n(b,H.i(this,0)) z=this.b -if(z>=4)throw H.a(this.bf()) -if((z&1)!==0)this.aY(b) -else if((z&3)===0)this.bl().m(0,new P.e2(b,this.$ti))}, -a4:function(a){var z=this.b -if((z&4)!==0)return this.ci() -if(z>=4)throw H.a(this.bf()) +if(z>=4)throw H.a(this.bh()) +if((z&1)!==0)this.b_(b) +else if((z&3)===0)this.bo().m(0,new P.ep(b,this.$ti))}, +ek:[function(a,b){var z=this.b +if(z>=4)throw H.a(this.bh()) +if(a==null)a=new P.bL() +$.t.toString +if((z&1)!==0)this.aC(a,b) +else if((z&3)===0)this.bo().m(0,new P.eq(a,b))},function(a){return this.ek(a,null)},"fs","$2","$1","gej",4,2,3], +a5:function(a){var z=this.b +if((z&4)!==0)return this.ck() +if(z>=4)throw H.a(this.bh()) z|=4 this.b=z -if((z&1)!==0)this.aZ() -else if((z&3)===0)this.bl().m(0,C.t) -return this.ci()}, -e_:function(a,b,c,d){var z,y,x,w,v,u,t +if((z&1)!==0)this.b0() +else if((z&3)===0)this.bo().m(0,C.t) +return this.ck()}, +e7:function(a,b,c,d){var z,y,x,w,v,u,t z=H.i(this,0) H.j(a,{func:1,ret:-1,args:[z]}) H.j(c,{func:1,ret:-1}) -if((this.b&3)!==0)throw H.a(P.ad("Stream has already been listened to.")) -y=$.u +if((this.b&3)!==0)throw H.a(P.ae("Stream has already been listened to.")) +y=$.t x=d?1:0 w=this.$ti -v=new P.bn(this,y,x,w) -v.c4(a,b,c,d,z) -u=this.gdQ() +v=new P.br(this,y,x,w) +v.c7(a,b,c,d,z) +u=this.gdV() z=this.b|=1 -if((z&8)!==0){t=H.l(this.a,"$ia_",w,"$aa_") -t.sb8(v) -t.eW()}else this.a=v -v.ct(u) -v.dz(new P.ku(this)) +if((z&8)!==0){t=H.l(this.a,"$isa0",w,"$asa0") +t.sba(v) +t.f9()}else this.a=v +v.cv(u) +v.dD(new P.kN(this)) return v}, -dS:function(a){var z,y +dY:function(a){var z,y y=this.$ti -H.l(a,"$iav",y,"$aav") +H.l(a,"$isav",y,"$asav") z=null -if((this.b&8)!==0)z=H.l(this.a,"$ia_",y,"$aa_").bE() +if((this.b&8)!==0)z=H.l(this.a,"$isa0",y,"$asa0").bH() this.a=null this.b=this.b&4294967286|2 -y=new P.kt(this) -if(z!=null)z=z.b9(y) +y=new P.kM(this) +if(z!=null)z=z.bb(y) else y.$0() return z}, -$ime:1, -$imF:1, -$ian:1}, -ku:{"^":"h:0;a", -$0:function(){P.cT(this.a.d)}}, -kt:{"^":"h:1;a", +$ismu:1, +$ismE:1, +$isan:1}, +kN:{"^":"f:0;a", +$0:function(){P.d3(this.a.d)}}, +kM:{"^":"f:1;a", $0:function(){var z=this.a.c -if(z!=null&&z.a===0)z.c8(null)}}, -jI:{"^":"b;$ti", -aY:function(a){var z=H.i(this,0) +if(z!=null&&z.a===0)z.cb(null)}}, +k0:{"^":"b;$ti", +b_:function(a){var z=H.i(this,0) H.n(a,z) -this.gbx().be(new P.e2(a,[z]))}, -aB:function(a,b){this.gbx().be(new P.e3(a,b))}, -aZ:function(){this.gbx().be(C.t)}}, -jH:{"^":"ks+jI;0a,b,0c,d,e,f,r,$ti"}, -cF:{"^":"ef;a,$ti", -bk:function(a,b,c,d){return this.a.e_(H.j(a,{func:1,ret:-1,args:[H.i(this,0)]}),b,H.j(c,{func:1,ret:-1}),d)}, +this.gbA().bg(new P.ep(a,[z]))}, +aC:function(a,b){this.gbA().bg(new P.eq(a,b))}, +b0:function(){this.gbA().bg(C.t)}}, +k_:{"^":"kL+k0;0a,b,0c,d,e,f,r,$ti"}, +cP:{"^":"eC;a,$ti", +bn:function(a,b,c,d){return this.a.e7(H.j(a,{func:1,ret:-1,args:[H.i(this,0)]}),b,H.j(c,{func:1,ret:-1}),d)}, gA:function(a){return(H.au(this.a)^892482866)>>>0}, -J:function(a,b){if(b==null)return!1 +I:function(a,b){if(b==null)return!1 if(this===b)return!0 -return b instanceof P.cF&&b.a===this.a}}, -bn:{"^":"e_;x,0a,0b,0c,d,e,0f,0r,$ti", -co:function(){return this.x.dS(this)}, -cp:function(){var z,y +if(!(b instanceof P.cP))return!1 +return b.a===this.a}}, +br:{"^":"em;x,0a,0b,0c,d,e,0f,0r,$ti", +cq:function(){return this.x.dY(this)}, +cr:function(){var z,y z=this.x y=H.i(z,0) -H.l(this,"$iav",[y],"$aav") -if((z.b&8)!==0)C.R.fg(H.l(z.a,"$ia_",[y],"$aa_")) -P.cT(z.e)}, -cq:function(){var z,y +H.l(this,"$isav",[y],"$asav") +if((z.b&8)!==0)C.R.fw(H.l(z.a,"$isa0",[y],"$asa0")) +P.d3(z.e)}, +cs:function(){var z,y z=this.x y=H.i(z,0) -H.l(this,"$iav",[y],"$aav") -if((z.b&8)!==0)H.l(z.a,"$ia_",[y],"$aa_").eW() -P.cT(z.f)}}, -mG:{"^":"b;a,$ti"}, -e_:{"^":"b;0a,0b,0c,d,e,0f,0r,$ti", -sdJ:function(a){this.a=H.j(a,{func:1,ret:-1,args:[H.i(this,0)]})}, -sdK:function(a){this.c=H.j(a,{func:1,ret:-1})}, -saV:function(a){this.r=H.l(a,"$iag",this.$ti,"$aag")}, -c4:function(a,b,c,d,e){var z,y,x,w +H.l(this,"$isav",[y],"$asav") +if((z.b&8)!==0)H.l(z.a,"$isa0",[y],"$asa0").f9() +P.d3(z.f)}}, +mF:{"^":"b;a,$ti"}, +em:{"^":"b;0a,0b,0c,d,aD:e<,0f,0r,$ti", +sdO:function(a){this.a=H.j(a,{func:1,ret:-1,args:[H.i(this,0)]})}, +sdP:function(a){this.c=H.j(a,{func:1,ret:-1})}, +saX:function(a){this.r=H.l(a,"$isah",this.$ti,"$asah")}, +c7:function(a,b,c,d,e){var z,y,x,w z=H.i(this,0) H.j(a,{func:1,ret:-1,args:[z]}) y=this.d y.toString -this.sdJ(H.j(a,{func:1,ret:null,args:[z]})) -x=b==null?P.li():b -if(H.aC(x,{func:1,ret:-1,args:[P.b,P.D]}))this.b=y.bW(x,null,P.b,P.D) +this.sdO(H.j(a,{func:1,ret:null,args:[z]})) +x=b==null?P.lB():b +if(H.aC(x,{func:1,ret:-1,args:[P.b,P.D]}))this.b=y.bZ(x,null,P.b,P.D) else if(H.aC(x,{func:1,ret:-1,args:[P.b]}))this.b=H.j(x,{func:1,ret:null,args:[P.b]}) -else H.t(P.N("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")) +else H.v(P.I("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")) H.j(c,{func:1,ret:-1}) -w=c==null?P.lh():c -this.sdK(H.j(w,{func:1,ret:-1}))}, -ct:function(a){H.l(a,"$iag",this.$ti,"$aag") +w=c==null?P.lA():c +this.sdP(H.j(w,{func:1,ret:-1}))}, +cv:function(a){H.l(a,"$isah",this.$ti,"$asah") if(a==null)return -this.saV(a) -if(!a.gE(a)){this.e=(this.e|64)>>>0 -this.r.bc(this)}}, -bE:function(){var z=(this.e&4294967279)>>>0 +this.saX(a) +if(!a.gB(a)){this.e=(this.e|64)>>>0 +this.r.be(this)}}, +bH:function(){var z=(this.e&4294967279)>>>0 this.e=z -if((z&8)===0)this.bg() +if((z&8)===0)this.bi() z=this.f -return z==null?$.b8():z}, -bg:function(){var z,y +return z==null?$.$get$aU():z}, +bi:function(){var z,y z=(this.e|8)>>>0 this.e=z if((z&64)!==0){y=this.r -if(y.a===1)y.a=3}if((z&32)===0)this.saV(null) -this.f=this.co()}, -cp:function(){}, -cq:function(){}, -co:function(){return}, -be:function(a){var z,y +if(y.a===1)y.a=3}if((z&32)===0)this.saX(null) +this.f=this.cq()}, +cr:function(){}, +cs:function(){}, +cq:function(){return}, +bg:function(a){var z,y z=this.$ti -y=H.l(this.r,"$iax",z,"$aax") +y=H.l(this.r,"$isax",z,"$asax") if(y==null){y=new P.ax(0,z) -this.saV(y)}y.m(0,a) +this.saX(y)}y.m(0,a) z=this.e if((z&64)===0){z=(z|64)>>>0 this.e=z -if(z<128)this.r.bc(this)}}, -aY:function(a){var z,y +if(z<128)this.r.be(this)}}, +b_:function(a){var z,y z=H.i(this,0) H.n(a,z) y=this.e this.e=(y|32)>>>0 -this.d.bY(this.a,a,z) +this.d.c0(this.a,a,z) this.e=(this.e&4294967263)>>>0 -this.bi((y&4)!==0)}, -aB:function(a,b){var z,y -H.m(b,"$iD") +this.bk((y&4)!==0)}, +aC:function(a,b){var z,y +H.m(b,"$isD") z=this.e -y=new P.jM(this,a,b) +y=new P.k4(this,a,b) if((z&1)!==0){this.e=(z|16)>>>0 -this.bg() +this.bi() z=this.f -if(z!=null&&z!==$.b8())z.b9(y) +if(!!J.r(z).$isQ&&z!==$.$get$aU())z.bb(y) else y.$0()}else{y.$0() -this.bi((z&4)!==0)}}, -aZ:function(){var z,y -z=new P.jL(this) -this.bg() +this.bk((z&4)!==0)}}, +b0:function(){var z,y +z=new P.k3(this) +this.bi() this.e=(this.e|16)>>>0 y=this.f -if(y!=null&&y!==$.b8())y.b9(z) +if(!!J.r(y).$isQ&&y!==$.$get$aU())y.bb(z) else z.$0()}, -dz:function(a){var z +dD:function(a){var z H.j(a,{func:1,ret:-1}) z=this.e this.e=(z|32)>>>0 a.$0() this.e=(this.e&4294967263)>>>0 -this.bi((z&4)!==0)}, -bi:function(a){var z,y +this.bk((z&4)!==0)}, +bk:function(a){var z,y if((this.e&64)!==0){z=this.r -z=z.gE(z)}else z=!1 +z=z.gB(z)}else z=!1 if(z){z=(this.e&4294967231)>>>0 this.e=z if((z&4)!==0)if(z<128){z=this.r -z=z==null||z.gE(z)}else z=!1 +z=z==null||z.gB(z)}else z=!1 else z=!1 if(z)this.e=(this.e&4294967291)>>>0}for(;!0;a=y){z=this.e -if((z&8)!==0){this.saV(null) +if((z&8)!==0){this.saX(null) return}y=(z&4)!==0 if(a===y)break this.e=(z^32)>>>0 -if(y)this.cp() -else this.cq() +if(y)this.cr() +else this.cs() this.e=(this.e&4294967263)>>>0}z=this.e -if((z&64)!==0&&z<128)this.r.bc(this)}, -$iav:1, -$ian:1, +if((z&64)!==0&&z<128)this.r.be(this)}, +$isav:1, +$isan:1, p:{ -e0:function(a,b,c,d,e){var z,y -z=$.u +en:function(a,b,c,d,e){var z,y +z=$.t y=d?1:0 -y=new P.e_(z,y,[e]) -y.c4(a,b,c,d,e) +y=new P.em(z,y,[e]) +y.c7(a,b,c,d,e) return y}}}, -jM:{"^":"h:1;a,b,c", +k4:{"^":"f:1;a,b,c", $0:function(){var z,y,x,w,v z=this.a y=z.e @@ -2512,100 +2546,100 @@ x=z.b y=this.b w=P.b v=z.d -if(H.aC(x,{func:1,ret:-1,args:[P.b,P.D]}))v.eY(x,y,this.c,w,P.D) -else v.bY(H.j(z.b,{func:1,ret:-1,args:[P.b]}),y,w) +if(H.aC(x,{func:1,ret:-1,args:[P.b,P.D]}))v.fb(x,y,this.c,w,P.D) +else v.c0(H.j(z.b,{func:1,ret:-1,args:[P.b]}),y,w) z.e=(z.e&4294967263)>>>0}}, -jL:{"^":"h:1;a", +k3:{"^":"f:1;a", $0:function(){var z,y z=this.a y=z.e if((y&16)===0)return z.e=(y|42)>>>0 -z.d.cS(z.c) +z.d.cW(z.c) z.e=(z.e&4294967263)>>>0}}, -ef:{"^":"Z;$ti", -af:function(a,b,c,d){return this.bk(H.j(a,{func:1,ret:-1,args:[H.i(this,0)]}),d,H.j(c,{func:1,ret:-1}),!0===b)}, -eE:function(a){return this.af(a,null,null,null)}, -eF:function(a,b){return this.af(a,null,b,null)}, -bk:function(a,b,c,d){var z=H.i(this,0) -return P.e0(H.j(a,{func:1,ret:-1,args:[z]}),b,H.j(c,{func:1,ret:-1}),d,z)}}, -k6:{"^":"ef;a,b,$ti", -bk:function(a,b,c,d){var z=H.i(this,0) +eC:{"^":"T;$ti", +aa:function(a,b,c,d){return this.bn(H.j(a,{func:1,ret:-1,args:[H.i(this,0)]}),d,H.j(c,{func:1,ret:-1}),!0===b)}, +eP:function(a,b){return this.aa(a,null,b,null)}, +eO:function(a){return this.aa(a,null,null,null)}, +bn:function(a,b,c,d){var z=H.i(this,0) +return P.en(H.j(a,{func:1,ret:-1,args:[z]}),b,H.j(c,{func:1,ret:-1}),d,z)}}, +kp:{"^":"eC;a,b,$ti", +bn:function(a,b,c,d){var z=H.i(this,0) H.j(a,{func:1,ret:-1,args:[z]}) H.j(c,{func:1,ret:-1}) -if(this.b)throw H.a(P.ad("Stream has already been listened to.")) +if(this.b)throw H.a(P.ae("Stream has already been listened to.")) this.b=!0 -z=P.e0(a,b,c,d,z) -z.ct(this.a.$0()) +z=P.en(a,b,c,d,z) +z.cv(this.a.$0()) return z}}, -e6:{"^":"ag;b,a,$ti", -scm:function(a){this.b=H.l(a,"$iY",this.$ti,"$aY")}, -gE:function(a){return this.b==null}, -cI:function(a){var z,y,x,w,v -H.l(a,"$ian",this.$ti,"$aan") +et:{"^":"ah;b,a,$ti", +sco:function(a){this.b=H.l(a,"$isa_",this.$ti,"$asa_")}, +gB:function(a){return this.b==null}, +cM:function(a){var z,y,x,w,v +H.l(a,"$isan",this.$ti,"$asan") w=this.b -if(w==null)throw H.a(P.ad("No events pending.")) +if(w==null)throw H.a(P.ae("No events pending.")) z=null try{z=w.q() -if(z)a.aY(this.b.gB()) -else{this.scm(null) -a.aZ()}}catch(v){y=H.P(v) +if(z)a.b_(this.b.gD()) +else{this.sco(null) +a.b0()}}catch(v){y=H.P(v) x=H.a7(v) -if(z==null){this.scm(C.r) -a.aB(y,x)}else a.aB(y,x)}}}, -aY:{"^":"b;0aJ:a<,$ti", -saJ:function(a){this.a=H.m(a,"$iaY")}}, -e2:{"^":"aY;b,0a,$ti", -bV:function(a){H.l(a,"$ian",this.$ti,"$aan").aY(this.b)}}, -e3:{"^":"aY;b,c,0a", -bV:function(a){a.aB(this.b,this.c)}, -$aaY:I.aB}, -jP:{"^":"b;", -bV:function(a){a.aZ()}, -gaJ:function(){return}, -saJ:function(a){throw H.a(P.ad("No events after a done."))}, -$iaY:1, -$aaY:I.aB}, -ag:{"^":"b;$ti", -bc:function(a){var z -H.l(a,"$ian",this.$ti,"$aan") +if(z==null){this.sco(C.r) +a.aC(y,x)}else a.aC(y,x)}}}, +b_:{"^":"b;0aL:a<,$ti", +saL:function(a){this.a=H.m(a,"$isb_")}}, +ep:{"^":"b_;b,0a,$ti", +bY:function(a){H.l(a,"$isan",this.$ti,"$asan").b_(this.b)}}, +eq:{"^":"b_;b,c,0a", +bY:function(a){a.aC(this.b,this.c)}, +$asb_:I.aB}, +k7:{"^":"b;", +bY:function(a){a.b0()}, +gaL:function(){return}, +saL:function(a){throw H.a(P.ae("No events after a done."))}, +$isb_:1, +$asb_:I.aB}, +ah:{"^":"b;aD:a<,$ti", +be:function(a){var z +H.l(a,"$isan",this.$ti,"$asan") z=this.a if(z===1)return if(z>=1){this.a=1 -return}P.c_(new P.km(this,a)) +return}P.c5(new P.kG(this,a)) this.a=1}}, -km:{"^":"h:0;a,b", +kG:{"^":"f:0;a,b", $0:function(){var z,y z=this.a y=z.a z.a=0 if(y===3)return -z.cI(this.b)}}, -ax:{"^":"ag;0b,0c,a,$ti", -gE:function(a){return this.c==null}, +z.cM(this.b)}}, +ax:{"^":"ah;0b,0c,a,$ti", +gB:function(a){return this.c==null}, m:function(a,b){var z=this.c if(z==null){this.c=b -this.b=b}else{z.saJ(b) +this.b=b}else{z.saL(b) this.c=b}}, -cI:function(a){var z,y -H.l(a,"$ian",this.$ti,"$aan") +cM:function(a){var z,y +H.l(a,"$isan",this.$ti,"$asan") z=this.b -y=z.gaJ() +y=z.gaL() this.b=y if(y==null)this.c=null -z.bV(a)}}, -kv:{"^":"b;0a,b,c,$ti"}, -kV:{"^":"h:1;a,b", -$0:function(){return this.a.aA(this.b)}}, +z.bY(a)}}, +kO:{"^":"b;0a,b,c,$ti"}, +ld:{"^":"f:1;a,b", +$0:function(){return this.a.at(this.b)}}, a2:{"^":"b;a,b", -h:function(a){return H.e(this.a)}, -$iK:1}, -kQ:{"^":"b;",$imz:1}, -l8:{"^":"h:0;a,b", +h:function(a){return H.d(this.a)}, +$isL:1}, +l9:{"^":"b;",$ismA:1}, +lr:{"^":"f:0;a,b", $0:function(){var z,y,x z=this.a y=z.a -if(y==null){x=new P.bH() +if(y==null){x=new P.bL() z.a=x z=x}else z=y y=this.b @@ -2613,112 +2647,112 @@ if(y==null)throw H.a(z) x=H.a(z) x.stack=y.h(0) throw x}}, -kn:{"^":"kQ;", -cS:function(a){var z,y,x +kH:{"^":"l9;", +cW:function(a){var z,y,x H.j(a,{func:1,ret:-1}) -try{if(C.d===$.u){a.$0() -return}P.eD(null,null,this,a,-1)}catch(x){z=H.P(x) +try{if(C.d===$.t){a.$0() +return}P.f5(null,null,this,a,-1)}catch(x){z=H.P(x) y=H.a7(x) -P.b2(null,null,this,z,H.m(y,"$iD"))}}, -bY:function(a,b,c){var z,y,x +P.b4(null,null,this,z,H.m(y,"$isD"))}}, +c0:function(a,b,c){var z,y,x H.j(a,{func:1,ret:-1,args:[c]}) H.n(b,c) -try{if(C.d===$.u){a.$1(b) -return}P.eF(null,null,this,a,b,-1,c)}catch(x){z=H.P(x) +try{if(C.d===$.t){a.$1(b) +return}P.f7(null,null,this,a,b,-1,c)}catch(x){z=H.P(x) y=H.a7(x) -P.b2(null,null,this,z,H.m(y,"$iD"))}}, -eY:function(a,b,c,d,e){var z,y,x +P.b4(null,null,this,z,H.m(y,"$isD"))}}, +fb:function(a,b,c,d,e){var z,y,x H.j(a,{func:1,ret:-1,args:[d,e]}) H.n(b,d) H.n(c,e) -try{if(C.d===$.u){a.$2(b,c) -return}P.eE(null,null,this,a,b,c,-1,d,e)}catch(x){z=H.P(x) +try{if(C.d===$.t){a.$2(b,c) +return}P.f6(null,null,this,a,b,c,-1,d,e)}catch(x){z=H.P(x) y=H.a7(x) -P.b2(null,null,this,z,H.m(y,"$iD"))}}, -ec:function(a,b){return new P.kp(this,H.j(a,{func:1,ret:b}),b)}, -cD:function(a){return new P.ko(this,H.j(a,{func:1,ret:-1}))}, -ed:function(a,b){return new P.kq(this,H.j(a,{func:1,ret:-1,args:[b]}),b)}, +P.b4(null,null,this,z,H.m(y,"$isD"))}}, +em:function(a,b){return new P.kJ(this,H.j(a,{func:1,ret:b}),b)}, +cF:function(a){return new P.kI(this,H.j(a,{func:1,ret:-1}))}, +en:function(a,b){return new P.kK(this,H.j(a,{func:1,ret:-1,args:[b]}),b)}, j:function(a,b){return}, -cR:function(a,b){H.j(a,{func:1,ret:b}) -if($.u===C.d)return a.$0() -return P.eD(null,null,this,a,b)}, -bX:function(a,b,c,d){H.j(a,{func:1,ret:c,args:[d]}) +cV:function(a,b){H.j(a,{func:1,ret:b}) +if($.t===C.d)return a.$0() +return P.f5(null,null,this,a,b)}, +c_:function(a,b,c,d){H.j(a,{func:1,ret:c,args:[d]}) H.n(b,d) -if($.u===C.d)return a.$1(b) -return P.eF(null,null,this,a,b,c,d)}, -eX:function(a,b,c,d,e,f){H.j(a,{func:1,ret:d,args:[e,f]}) +if($.t===C.d)return a.$1(b) +return P.f7(null,null,this,a,b,c,d)}, +fa:function(a,b,c,d,e,f){H.j(a,{func:1,ret:d,args:[e,f]}) H.n(b,e) H.n(c,f) -if($.u===C.d)return a.$2(b,c) -return P.eE(null,null,this,a,b,c,d,e,f)}, -bW:function(a,b,c,d){return H.j(a,{func:1,ret:b,args:[c,d]})}}, -kp:{"^":"h;a,b,c", -$0:function(){return this.a.cR(this.b,this.c)}, +if($.t===C.d)return a.$2(b,c) +return P.f6(null,null,this,a,b,c,d,e,f)}, +bZ:function(a,b,c,d){return H.j(a,{func:1,ret:b,args:[c,d]})}}, +kJ:{"^":"f;a,b,c", +$0:function(){return this.a.cV(this.b,this.c)}, $S:function(){return{func:1,ret:this.c}}}, -ko:{"^":"h:1;a,b", -$0:function(){return this.a.cS(this.b)}}, -kq:{"^":"h;a,b,c", +kI:{"^":"f:1;a,b", +$0:function(){return this.a.cW(this.b)}}, +kK:{"^":"f;a,b,c", $1:function(a){var z=this.c -return this.a.bY(this.b,H.n(a,z),z)}, +return this.a.c0(this.b,H.n(a,z),z)}, $S:function(){return{func:1,ret:-1,args:[this.c]}}}}],["","",,P,{"^":"", -dy:function(a,b,c,d,e){H.j(a,{func:1,ret:P.H,args:[d,d]}) +dF:function(a,b,c,d,e){H.j(a,{func:1,ret:P.F,args:[d,d]}) H.j(b,{func:1,ret:P.c,args:[d]}) -if(b==null){if(a==null)return new H.aj(0,0,[d,e]) -b=P.lk()}else{if(P.ls()===b&&P.lr()===a)return new P.kk(0,0,[d,e]) -if(a==null)a=P.lj()}return P.ke(a,b,c,d,e)}, -bE:function(a,b,c){H.bu(a) -return H.l(H.lz(a,new H.aj(0,0,[b,c])),"$idx",[b,c],"$adx")}, -cm:function(a,b){return new H.aj(0,0,[a,b])}, -i2:function(){return new H.aj(0,0,[null,null])}, -i3:function(a,b,c,d){return new P.kg(0,0,[d])}, -mI:[function(a,b){return J.Q(a,b)},"$2","lj",8,0,43], -mJ:[function(a){return J.aD(a)},"$1","lk",4,0,44], -hM:function(a,b,c){var z,y -if(P.cQ(a)){if(b==="("&&c===")")return"(...)" -return b+"..."+c}z=H.o([],[P.d]) -y=$.ba() +if(b==null){if(a==null)return new H.ac(0,0,[d,e]) +b=P.lD()}else{if(P.lL()===b&&P.lK()===a)return new P.kE(0,0,[d,e]) +if(a==null)a=P.lC()}return P.ky(a,b,c,d,e)}, +bH:function(a,b,c){H.bx(a) +return H.l(H.lS(a,new H.ac(0,0,[b,c])),"$isdE",[b,c],"$asdE")}, +bG:function(a,b){return new H.ac(0,0,[a,b])}, +ij:function(){return new H.ac(0,0,[null,null])}, +ik:function(a,b,c,d){return new P.kA(0,0,[d])}, +mG:[function(a,b){return J.R(a,b)},"$2","lC",8,0,45], +mH:[function(a){return J.aE(a)},"$1","lD",4,0,46], +i1:function(a,b,c){var z,y +if(P.d0(a)){if(b==="("&&c===")")return"(...)" +return b+"..."+c}z=[] +y=$.$get$b5() C.b.m(y,a) -try{P.l4(a,z)}finally{if(0>=y.length)return H.k(y,-1) -y.pop()}y=P.bM(b,H.lJ(z,"$ip"),", ")+c +try{P.ln(a,z)}finally{if(0>=y.length)return H.k(y,-1) +y.pop()}y=P.bQ(b,H.m1(z,"$isq"),", ")+c return y.charCodeAt(0)==0?y:y}, -cg:function(a,b,c){var z,y,x -if(P.cQ(a))return b+"..."+c -z=new P.S(b) -y=$.ba() +cn:function(a,b,c){var z,y,x +if(P.d0(a))return b+"..."+c +z=new P.U(b) +y=$.$get$b5() C.b.m(y,a) try{x=z -x.a=P.bM(x.a,a,", ")}finally{if(0>=y.length)return H.k(y,-1) -y.pop()}z.a+=c -y=z.a +x.a=P.bQ(x.ga4(),a,", ")}finally{if(0>=y.length)return H.k(y,-1) +y.pop()}y=z +y.a=y.ga4()+c +y=z.ga4() return y.charCodeAt(0)==0?y:y}, -cQ:function(a){var z,y -for(z=0;y=$.ba(),z=b.length)return H.k(b,-1) v=b.pop() if(0>=b.length)return H.k(b,-1) -u=b.pop()}else{t=z.gB();++x -if(!z.q()){if(x<=4){C.b.m(b,H.e(t)) -return}v=H.e(t) +u=b.pop()}else{t=z.gD();++x +if(!z.q()){if(x<=4){C.b.m(b,H.d(t)) +return}v=H.d(t) if(0>=b.length)return H.k(b,-1) u=b.pop() -y+=v.length+2}else{s=z.gB();++x -for(;z.q();t=s,s=r){r=z.gB();++x +y+=v.length+2}else{s=z.gD();++x +for(;z.q();t=s,s=r){r=z.gD();++x if(x>100){while(!0){if(!(y>75&&x>3))break if(0>=b.length)return H.k(b,-1) y-=b.pop().length+2;--x}C.b.m(b,"...") -return}}u=H.e(t) -v=H.e(s) +return}}u=H.d(t) +v=H.d(s) y+=v.length+u.length+4}}if(x>b.length+2){y+=5 q="..."}else q=null while(!0){if(!(y>80&&b.length>3))break @@ -2728,292 +2762,294 @@ if(q==null){y+=5 q="..."}}if(q!=null)C.b.m(b,q) C.b.m(b,u) C.b.m(b,v)}, -i0:function(a,b,c){var z=P.dy(null,null,null,b,c) -a.a.I(0,H.j(new P.i1(z,b,c),{func:1,ret:-1,args:[H.i(a,0),H.i(a,1)]})) +ih:function(a,b,c){var z=P.dF(null,null,null,b,c) +a.a.J(0,H.j(new P.ii(z,b,c),{func:1,ret:-1,args:[H.i(a,0),H.i(a,1)]})) return z}, -cp:function(a){var z,y +cw:function(a){var z,y,x z={} -if(P.cQ(a))return"{...}" -y=new P.S("") -try{C.b.m($.ba(),a) -y.a+="{" +if(P.d0(a))return"{...}" +y=new P.U("") +try{C.b.m($.$get$b5(),a) +x=y +x.a=x.ga4()+"{" z.a=!0 -a.I(0,new P.i5(z,y)) -y.a+="}"}finally{z=$.ba() +a.J(0,new P.ip(z,y)) +z=y +z.a=z.ga4()+"}"}finally{z=$.$get$b5() if(0>=z.length)return H.k(z,-1) -z.pop()}z=y.a +z.pop()}z=y.ga4() return z.charCodeAt(0)==0?z:z}, -kk:{"^":"aj;a,0b,0c,0d,0e,0f,r,$ti", -aG:function(a){return H.eV(a)&0x3ffffff}, -aH:function(a,b){var z,y,x +kE:{"^":"ac;a,0b,0c,0d,0e,0f,r,$ti", +aI:function(a){return H.fs(a)&0x3ffffff}, +aJ:function(a,b){var z,y,x if(a==null)return-1 z=a.length for(y=0;y=0)return!1 -x.push(this.cb(a))}return!0}, -eS:function(a,b){var z=this.dT(b) +if(x==null)z[y]=[this.ce(a)] +else{if(this.cm(x,a)>=0)return!1 +x.push(this.ce(a))}return!0}, +f4:function(a,b){var z=this.dZ(b) return z}, -dT:function(a){var z,y,x +dZ:function(a){var z,y,x z=this.d if(z==null)return!1 -y=this.dw(z,a) -x=this.ck(y,a) +y=this.dC(z,a) +x=this.cm(y,a) if(x<0)return!1 -this.e2(y.splice(x,1)[0]) +this.ea(y.splice(x,1)[0]) return!0}, -cn:function(){this.r=this.r+1&67108863}, -cb:function(a){var z,y -z=new P.kh(H.n(a,H.i(this,0))) +cp:function(){this.r=this.r+1&67108863}, +ce:function(a){var z,y +z=new P.kB(H.n(a,H.i(this,0))) if(this.e==null){this.f=z this.e=z}else{y=this.f z.c=y y.b=z this.f=z}++this.a -this.cn() +this.cp() return z}, -e2:function(a){var z,y +ea:function(a){var z,y z=a.c y=a.b if(z==null)this.e=y else z.b=y if(y==null)this.f=z else y.c=z;--this.a -this.cn()}, -ce:function(a){return J.aD(a)&0x3ffffff}, -dw:function(a,b){return a[this.ce(b)]}, -ck:function(a,b){var z,y +this.cp()}, +cg:function(a){return J.aE(a)&0x3ffffff}, +dC:function(a,b){return a[this.cg(b)]}, +cm:function(a,b){var z,y if(a==null)return-1 z=a.length for(y=0;y"]=z delete z[""] return z}}}, -kh:{"^":"b;a,0b,0c"}, -ki:{"^":"b;a,b,0c,0d,$ti", -sca:function(a){this.d=H.n(a,H.i(this,0))}, -gB:function(){return this.d}, +kB:{"^":"b;a,0b,0c"}, +kC:{"^":"b;a,b,0c,0d,$ti", +scd:function(a){this.d=H.n(a,H.i(this,0))}, +gD:function(){return this.d}, q:function(){var z=this.a if(this.b!==z.r)throw H.a(P.a3(z)) else{z=this.c -if(z==null){this.sca(null) -return!1}else{this.sca(H.n(z.a,H.i(this,0))) +if(z==null){this.scd(null) +return!1}else{this.scd(H.n(z.a,H.i(this,0))) this.c=this.c.b return!0}}}, -$iY:1, +$isa_:1, p:{ -e8:function(a,b,c){var z=new P.ki(a,b,[c]) +ev:function(a,b,c){var z=new P.kC(a,b,[c]) z.c=a.e return z}}}, -hL:{"^":"p;"}, -i1:{"^":"h:2;a,b,c", -$2:function(a,b){this.a.l(0,H.n(a,this.b),H.n(b,this.c))}}, -i4:{"^":"kl;",$iI:1,$ip:1,$if:1}, +kq:{"^":"j_;"}, +i0:{"^":"q;"}, +ii:{"^":"f:4;a,b,c", +$2:function(a,b){this.a.k(0,H.n(a,this.b),H.n(b,this.c))}}, +il:{"^":"kF;",$isJ:1,$isq:1,$ish:1}, a4:{"^":"b;$ti", -gK:function(a){return new H.ak(a,this.gi(a),0,[H.b6(this,a,"a4",0)])}, +gK:function(a){return new H.ak(a,this.gi(a),0,[H.b9(this,a,"a4",0)])}, X:function(a,b){return this.j(a,b)}, -gE:function(a){return this.gi(a)===0}, -gbO:function(a){return!this.gE(a)}, -a_:function(a,b){return H.ae(a,b,null,H.b6(this,a,"a4",0))}, -a8:function(a,b){var z,y -z=H.o([],[H.b6(this,a,"a4",0)]) +gB:function(a){return this.gi(a)===0}, +a_:function(a,b){return H.af(a,b,null,H.b9(this,a,"a4",0))}, +ab:function(a,b){var z,y +z=H.o([],[H.b9(this,a,"a4",0)]) C.b.si(z,this.gi(a)) -for(y=0;yz.gi(w))throw H.a(H.dq()) -if(x=0;--v)this.l(a,b+v,z.j(w,x+v)) -else for(v=0;vz.gi(w))throw H.a(H.dx()) +if(x=0;--v)this.k(a,b+v,z.j(w,x+v)) +else for(v=0;v=z.length)return H.k(z,b) z=z[b]}return z}, gK:function(a){var z=this.a -if(z.b==null){z=z.gan() -z=z.gK(z)}else{z=z.aS() -z=new J.c3(z,z.length,0,[H.i(z,0)])}return z}, -$aI:function(){return[P.d]}, -$aaG:function(){return[P.d]}, -$ap:function(){return[P.d]}}, -fI:{"^":"bz;a", -gag:function(a){return"us-ascii"}, -bI:function(a){return C.q.Z(a)}, -gad:function(){return C.q}}, -eg:{"^":"U;", -ak:function(a,b,c){var z,y,x,w,v,u -H.r(a) -z=P.a8(b,c,a.length,null,null,null)-b -y=new Uint8Array(z) -for(x=y.length,w=~this.a,v=0;v=x)return H.k(y,v) -y[v]=u}return y}, -Z:function(a){return this.ak(a,0,null)}, -$aU:function(){return[P.d,[P.f,P.c]]}}, -fJ:{"^":"eg;a"}, -fK:{"^":"ai;a", -gad:function(){return this.a}, -eK:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i +if(z.b==null){z=z.gao() +z=z.gK(z)}else{z=z.aU() +z=new J.c8(z,z.length,0,[H.i(z,0)])}return z}, +$asJ:function(){return[P.e]}, +$asaH:function(){return[P.e]}, +$asq:function(){return[P.e]}}, +fY:{"^":"bB;a", +gah:function(a){return"us-ascii"}, +bL:function(a){return C.q.Z(a)}, +gaf:function(){return C.q}}, +eD:{"^":"V;", +al:function(a,b,c){var z,y,x,w,v,u,t +H.p(a) +z=a.length +P.a8(b,c,z,null,null,null) +y=z-b +x=new Uint8Array(y) +for(w=x.length,v=~this.a,u=0;u=w)return H.k(x,u) +x[u]=t}return x}, +Z:function(a){return this.al(a,0,null)}, +$asV:function(){return[P.e,[P.h,P.c]]}}, +fZ:{"^":"eD;a"}, +h_:{"^":"aj;a", +gaf:function(){return this.a}, +eW:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i c=P.a8(b,c,a.length,null,null,null) -z=$.fh() +z=$.$get$el() for(y=b,x=y,w=null,v=-1,u=-1,t=0;y=0)P.db(a,u,c,v,t,k) -else{j=C.c.aQ(k-1,4)+1 +if(v>=0)P.di(a,u,c,v,t,k) +else{j=C.c.aS(k-1,4)+1 if(j===1)throw H.a(P.C("Invalid base64 encoding length ",a,c)) for(;j<4;){l+="=" w.a=l;++j}}l=w.a -return C.a.ap(a,b,c,l.charCodeAt(0)==0?l:l)}i=c-b -if(v>=0)P.db(a,u,c,v,t,i) -else{j=C.c.aQ(i,4) +return C.a.aq(a,b,c,l.charCodeAt(0)==0?l:l)}i=c-b +if(v>=0)P.di(a,u,c,v,t,i) +else{j=C.c.aS(i,4) if(j===1)throw H.a(P.C("Invalid base64 encoding length ",a,c)) -if(j>1)a=C.a.ap(a,c,c,j===2?"==":"=")}return a}, -$aai:function(){return[[P.f,P.c],P.d]}, +if(j>1)a=C.a.aq(a,c,c,j===2?"==":"=")}return a}, +$asaj:function(){return[[P.h,P.c],P.e]}, p:{ -db:function(a,b,c,d,e,f){if(C.c.aQ(f,4)!==0)throw H.a(P.C("Invalid base64 padding, padded length must be multiple of four, is "+f,a,c)) +di:function(a,b,c,d,e,f){if(C.c.aS(f,4)!==0)throw H.a(P.C("Invalid base64 padding, padded length must be multiple of four, is "+f,a,c)) if(d+e!==f)throw H.a(P.C("Invalid base64 padding, '=' not at the end",a,b)) if(e>2)throw H.a(P.C("Invalid base64 padding, more than two '=' characters",a,b))}}}, -fL:{"^":"U;a", +h0:{"^":"V;a", Z:function(a){var z -H.l(a,"$if",[P.c],"$af") +H.l(a,"$ish",[P.c],"$ash") z=a.length if(z===0)return"" -return P.aI(new P.jJ(0,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").ep(a,0,z,!0),0,null)}, -$aU:function(){return[[P.f,P.c],P.d]}}, -jJ:{"^":"b;a,b", -ep:function(a,b,c,d){var z,y,x,w -H.l(a,"$if",[P.c],"$af") +return P.aJ(new P.k1(0,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").eA(a,0,z,!0),0,null)}, +$asV:function(){return[[P.h,P.c],P.e]}}, +k1:{"^":"b;a,b", +eA:function(a,b,c,d){var z,y,x,w +H.l(a,"$ish",[P.c],"$ash") z=(this.a&3)+(c-b) -y=C.c.by(z,3) +y=C.c.bB(z,3) x=y*4 if(z-y*3>0)x+=4 w=new Uint8Array(x) -this.a=P.jK(this.b,a,b,c,!0,w,0,this.a) +this.a=P.k2(this.b,a,b,c,!0,w,0,this.a) if(x>0)return w return}, p:{ -jK:function(a,b,c,d,e,f,g,h){var z,y,x,w,v,u,t,s,r,q -H.l(b,"$if",[P.c],"$af") +k2:function(a,b,c,d,e,f,g,h){var z,y,x,w,v,u,t,s,r,q +H.l(b,"$ish",[P.c],"$ash") z=h>>>2 y=3-(h&3) for(x=b.length,w=f.length,v=c,u=0;v=x)return H.k(b,v) t=b[v] -if(typeof t!=="number")return H.E(t) +if(typeof t!=="number")return H.G(t) u=(u|t)>>>0 z=(z<<8|t)&16777215;--y if(y===0){s=g+1 @@ -3116,20 +3152,20 @@ f[q]=x if(g>=w)return H.k(f,g) f[g]=61}return 0}return(z<<2|3-y)>>>0}for(v=c;v=x)return H.k(b,v) t=b[v] -if(typeof t!=="number")return t.D() +if(typeof t!=="number")return t.C() if(t<0||t>255)break;++v}x="Not a byte value at index "+v+": 0x" if(v>=b.length)return H.k(b,v) -throw H.a(P.aS(b,x+J.fH(b[v],16),null))}}}, -fX:{"^":"di;", -$adi:function(){return[[P.f,P.c]]}}, -fY:{"^":"fX;"}, -jN:{"^":"fY;a,b,c", -sdl:function(a){this.b=H.l(a,"$if",[P.c],"$af")}, +throw H.a(P.bc(b,x+J.fX(b[v],16),null))}}}, +hc:{"^":"dp;", +$asdp:function(){return[[P.h,P.c]]}}, +hd:{"^":"hc;"}, +k5:{"^":"hd;a,b,c", +sdr:function(a){this.b=H.l(a,"$ish",[P.c],"$ash")}, m:[function(a,b){var z,y,x,w,v -H.l(b,"$ip",[P.c],"$ap") +H.l(b,"$isq",[P.c],"$asq") z=this.b y=this.c -x=J.a0(b) +x=J.Y(b) if(x.gi(b)>z.length-y){z=this.b w=x.gi(b)+z.length-1 w|=C.c.W(w,1) @@ -3138,94 +3174,94 @@ w|=w>>>4 w|=w>>>8 v=new Uint8Array((((w|w>>>16)>>>0)+1)*2) z=this.b -C.l.a9(v,0,z.length,z) -this.sdl(v)}z=this.b +C.l.ac(v,0,z.length,z) +this.sdr(v)}z=this.b y=this.c -C.l.a9(z,y,y+x.gi(b),b) -this.c=this.c+x.gi(b)},"$1","gea",5,0,15], -a4:[function(a){this.a.$1(C.l.aa(this.b,0,this.c))},"$0","geh",1,0,1]}, -di:{"^":"b;$ti"}, -ai:{"^":"b;$ti", -bI:function(a){H.n(a,H.v(this,"ai",0)) -return this.gad().Z(a)}}, -U:{"^":"iU;$ti"}, -bz:{"^":"ai;", -$aai:function(){return[P.d,[P.f,P.c]]}}, -dv:{"^":"K;a,b,c", -h:function(a){var z=P.bd(this.a) -return(this.b!=null?"Converting object to an encodable object failed:":"Converting object did not return an encodable object:")+" "+z}, +C.l.ac(z,y,y+x.gi(b),b) +this.c=this.c+x.gi(b)},"$1","gei",5,0,15], +a5:[function(a){this.a.$1(C.l.ad(this.b,0,this.c))},"$0","ger",1,0,1]}, +dp:{"^":"b;$ti"}, +aj:{"^":"b;$ti", +bL:function(a){H.n(a,H.u(this,"aj",0)) +return this.gaf().Z(a)}}, +V:{"^":"jb;$ti"}, +bB:{"^":"aj;", +$asaj:function(){return[P.e,[P.h,P.c]]}}, +dC:{"^":"L;a,b,c", +h:function(a){var z=P.be(this.a) +return(this.b!=null?"Converting object to an encodable object failed:":"Converting object did not return an encodable object:")+" "+H.d(z)}, p:{ -dw:function(a,b,c){return new P.dv(a,b,c)}}}, -hT:{"^":"dv;a,b,c", +dD:function(a,b,c){return new P.dC(a,b,c)}}}, +i8:{"^":"dC;a,b,c", h:function(a){return"Cyclic error in JSON stringify"}}, -hS:{"^":"ai;a,b", -em:function(a,b,c){var z=P.eB(b,this.gen().a) +i7:{"^":"aj;a,b", +ex:function(a,b,c){var z=P.f1(b,this.gey().a) return z}, -eo:function(a,b){var z=this.gad() -z=P.ka(a,z.b,z.a) +ez:function(a,b){var z=this.gaf() +z=P.ku(a,z.b,z.a) return z}, -gad:function(){return C.a_}, -gen:function(){return C.Z}, -$aai:function(){return[P.b,P.d]}}, -hV:{"^":"U;a,b", +gaf:function(){return C.a_}, +gey:function(){return C.Z}, +$asaj:function(){return[P.b,P.e]}}, +ia:{"^":"V;a,b", Z:function(a){var z,y,x -z=new P.S("") -y=new P.e7(z,[],P.eN()) -y.aN(a) +z=new P.U("") +y=new P.eu(z,[],P.fi()) +y.aP(a) x=z.a return x.charCodeAt(0)==0?x:x}, -$aU:function(){return[P.b,P.d]}}, -hU:{"^":"U;a", -Z:function(a){return P.eB(H.r(a),this.a)}, -$aU:function(){return[P.d,P.b]}}, -kb:{"^":"b;", -cW:function(a){var z,y,x,w,v,u,t,s +$asV:function(){return[P.b,P.e]}}, +i9:{"^":"V;a", +Z:function(a){return P.f1(H.p(a),this.a)}, +$asV:function(){return[P.e,P.b]}}, +kv:{"^":"b;", +d0:function(a){var z,y,x,w,v,u,t,s z=a.length for(y=J.a6(a),x=this.c,w=0,v=0;v92)continue -if(u<32){if(v>w)x.a+=C.a.k(a,w,v) +if(u<32){if(v>w)x.a+=C.a.l(a,w,v) w=v+1 -t=x.a+=H.J(92) -switch(u){case 8:x.a=t+H.J(98) +t=x.a+=H.K(92) +switch(u){case 8:x.a=t+H.K(98) break -case 9:x.a=t+H.J(116) +case 9:x.a=t+H.K(116) break -case 10:x.a=t+H.J(110) +case 10:x.a=t+H.K(110) break -case 12:x.a=t+H.J(102) +case 12:x.a=t+H.K(102) break -case 13:x.a=t+H.J(114) +case 13:x.a=t+H.K(114) break -default:t+=H.J(117) +default:t+=H.K(117) x.a=t -t+=H.J(48) +t+=H.K(48) x.a=t -t+=H.J(48) +t+=H.K(48) x.a=t s=u>>>4&15 -t+=H.J(s<10?48+s:87+s) +t+=H.K(s<10?48+s:87+s) x.a=t s=u&15 -x.a=t+H.J(s<10?48+s:87+s) -break}}else if(u===34||u===92){if(v>w)x.a+=C.a.k(a,w,v) +x.a=t+H.K(s<10?48+s:87+s) +break}}else if(u===34||u===92){if(v>w)x.a+=C.a.l(a,w,v) w=v+1 -t=x.a+=H.J(92) -x.a=t+H.J(u)}}if(w===0)x.a+=H.e(a) -else if(w=x.length)return H.k(x,-1) x.pop()}catch(w){y=H.P(w) -x=P.dw(a,y,this.gcr()) +x=P.dD(a,y,this.gct()) throw H.a(x)}}, -cV:function(a){var z,y +d_:function(a){var z,y if(typeof a==="number"){if(!isFinite(a))return!1 this.c.a+=C.m.h(a) return!0}else if(a===!0){this.c.a+="true" @@ -3233,85 +3269,86 @@ return!0}else if(a===!1){this.c.a+="false" return!0}else if(a==null){this.c.a+="null" return!0}else if(typeof a==="string"){z=this.c z.a+='"' -this.cW(a) +this.d0(a) z.a+='"' -return!0}else{z=J.q(a) -if(!!z.$if){this.bh(a) -this.f3(a) +return!0}else{z=J.r(a) +if(!!z.$ish){this.bj(a) +this.fh(a) z=this.a if(0>=z.length)return H.k(z,-1) z.pop() -return!0}else if(!!z.$iR){this.bh(a) -y=this.f4(a) +return!0}else if(!!z.$isS){this.bj(a) +y=this.fi(a) z=this.a if(0>=z.length)return H.k(z,-1) z.pop() return y}else return!1}}, -f3:function(a){var z,y,x +fh:function(a){var z,y,x z=this.c z.a+="[" -y=J.a0(a) -if(y.gbO(a)){this.aN(y.j(a,0)) +y=J.Y(a) +if(y.gi(a)>0){this.aP(y.j(a,0)) for(x=1;x=y)return H.k(x,t) -this.aN(x[t])}w.a+="}" +this.aP(x[t])}w.a+="}" return!0}}, -kc:{"^":"h:2;a,b", +kw:{"^":"f:4;a,b", $2:function(a,b){var z,y if(typeof a!=="string")this.a.b=!1 z=this.b y=this.a -C.b.l(z,y.a++,a) -C.b.l(z,y.a++,b)}}, -e7:{"^":"kb;c,a,b", -gcr:function(){var z=this.c.a +C.b.k(z,y.a++,a) +C.b.k(z,y.a++,b)}}, +eu:{"^":"kv;c,a,b", +gct:function(){var z=this.c.a return z.charCodeAt(0)==0?z:z}, p:{ -ka:function(a,b,c){var z,y,x -z=new P.S("") -y=new P.e7(z,[],P.eN()) -y.aN(a) +ku:function(a,b,c){var z,y,x +z=new P.U("") +y=new P.eu(z,[],P.fi()) +y.aP(a) x=z.a return x.charCodeAt(0)==0?x:x}}}, -hW:{"^":"bz;a", -gag:function(a){return"iso-8859-1"}, -bI:function(a){return C.A.Z(a)}, -gad:function(){return C.A}}, -hX:{"^":"eg;a"}, -jl:{"^":"bz;a", -gag:function(a){return"utf-8"}, -gad:function(){return C.N}}, -js:{"^":"U;", -ak:function(a,b,c){var z,y,x -H.r(a) -c=P.a8(b,c,a.length,null,null,null) -z=c-b -if(z===0)return new Uint8Array(0) -y=new Uint8Array(z*3) -x=new P.kP(0,0,y) -if(x.dv(a,b,c)!==c)x.cA(C.a.v(a,c-1),0) -return C.l.aa(y,0,x.b)}, -Z:function(a){return this.ak(a,0,null)}, -$aU:function(){return[P.d,[P.f,P.c]]}}, -kP:{"^":"b;a,b,c", -cA:function(a,b){var z,y,x,w,v +ib:{"^":"bB;a", +gah:function(a){return"iso-8859-1"}, +bL:function(a){return C.A.Z(a)}, +gaf:function(){return C.A}}, +ic:{"^":"eD;a"}, +jE:{"^":"bB;a", +gah:function(a){return"utf-8"}, +gaf:function(){return C.N}}, +jL:{"^":"V;", +al:function(a,b,c){var z,y,x,w +H.p(a) +z=a.length +P.a8(b,c,z,null,null,null) +y=z-b +if(y===0)return new Uint8Array(0) +x=new Uint8Array(y*3) +w=new P.l8(0,0,x) +if(w.dB(a,b,z)!==z)w.cC(C.a.v(a,z-1),0) +return C.l.ad(x,0,w.b)}, +Z:function(a){return this.al(a,0,null)}, +$asV:function(){return[P.e,[P.h,P.c]]}}, +l8:{"^":"b;a,b,c", +cC:function(a,b){var z,y,x,w,v z=this.c y=this.b x=y+1 @@ -3342,7 +3379,7 @@ this.b=y+1 if(y>=w)return H.k(z,y) z[y]=128|a&63 return!1}}, -dv:function(a,b,c){var z,y,x,w,v,u,t +dB:function(a,b,c){var z,y,x,w,v,u,t if(b!==c&&(C.a.v(a,c-1)&64512)===55296)--c for(z=this.c,y=z.length,x=b;x=y)break this.b=v+1 z[v]=w}else if((w&64512)===55296){if(this.b+3>=y)break u=x+1 -if(this.cA(w,C.a.n(a,u)))x=u}else if(w<=2047){v=this.b +if(this.cC(w,C.a.n(a,u)))x=u}else if(w<=2047){v=this.b t=v+1 if(t>=y)break this.b=t @@ -3370,179 +3407,189 @@ z[t]=128|w>>>6&63 this.b=v+1 if(v>=y)return H.k(z,v) z[v]=128|w&63}}return x}}, -jm:{"^":"U;a", -ak:function(a,b,c){var z,y,x,w -H.l(a,"$if",[P.c],"$af") -z=P.jn(!1,a,b,c) +jF:{"^":"V;a", +al:function(a,b,c){var z,y,x,w,v +H.l(a,"$ish",[P.c],"$ash") +z=P.jG(!1,a,b,c) if(z!=null)return z -c=P.a8(b,c,J.T(a),null,null,null) -y=new P.S("") -x=new P.kN(!1,y,!0,0,0,0) -x.ak(a,b,c) -if(x.e>0){H.t(P.C("Unfinished UTF-8 octet sequence",a,c)) -y.a+=H.J(65533) -x.d=0 -x.e=0 -x.f=0}w=y.a -return w.charCodeAt(0)==0?w:w}, -Z:function(a){return this.ak(a,0,null)}, -$aU:function(){return[[P.f,P.c],P.d]}, +y=J.Z(a) +P.a8(b,c,y,null,null,null) +x=new P.U("") +w=new P.l5(!1,x,!0,0,0,0) +w.al(a,b,y) +if(w.e>0){H.v(P.C("Unfinished UTF-8 octet sequence",a,y)) +x.a+=H.K(65533) +w.d=0 +w.e=0 +w.f=0}v=x.a +return v.charCodeAt(0)==0?v:v}, +Z:function(a){return this.al(a,0,null)}, +$asV:function(){return[[P.h,P.c],P.e]}, p:{ -jn:function(a,b,c,d){H.l(b,"$if",[P.c],"$af") -if(b instanceof Uint8Array)return P.jo(!1,b,c,d) +jG:function(a,b,c,d){H.l(b,"$ish",[P.c],"$ash") +if(b instanceof Uint8Array)return P.jH(!1,b,c,d) return}, -jo:function(a,b,c,d){var z,y,x -z=$.fg() +jH:function(a,b,c,d){var z,y,x +z=$.$get$ef() if(z==null)return y=0===c -if(y&&!0)return P.cC(z,b) +if(y&&!0)return P.cL(z,b) x=b.length d=P.a8(c,d,x,null,null,null) -if(y&&d===x)return P.cC(z,b) -return P.cC(z,b.subarray(c,d))}, -cC:function(a,b){if(P.jq(b))return -return P.jr(a,b)}, -jr:function(a,b){var z,y +if(y&&d===x)return P.cL(z,b) +return P.cL(z,b.subarray(c,d))}, +cL:function(a,b){if(P.jJ(b))return +return P.jK(a,b)}, +jK:function(a,b){var z,y try{z=a.decode(b) return z}catch(y){H.P(y)}return}, -jq:function(a){var z,y +jJ:function(a){var z,y z=a.length-2 for(y=0;y0){do{if(t===c)break $label0$0 -s=v.j(a,t) -if(typeof s!=="number")return s.c1() -if((s&192)!==128){r=P.C("Bad UTF-8 encoding 0x"+C.c.aq(s,16),a,t) -throw H.a(r)}else{z=(z<<6|s&63)>>>0;--y;++t}}while(y>0) -r=x-1 -if(r<0||r>=4)return H.k(C.B,r) -if(z<=C.B[r]){r=P.C("Overlong encoding of 0x"+C.c.aq(z,16),a,t-x-1) -throw H.a(r)}if(z>1114111){r=P.C("Character outside valid Unicode range: 0x"+C.c.aq(z,16),a,t-x-1) -throw H.a(r)}if(!this.c||z!==65279)u.a+=H.J(z) -this.c=!1}for(r=t0){this.c=!1 -p=t+q -w.$2(t,p) -if(p===c)break}else p=t -o=p+1 -s=v.j(a,p) -if(typeof s!=="number")return s.D() -if(s<0){n=P.C("Negative UTF-8 code unit: -0x"+C.c.aq(-s,16),a,o-1) -throw H.a(n)}else{if((s&224)===192){z=s&31 +w=new P.l7(c) +v=new P.l6(this,b,c,a) +$label0$0:for(u=J.Y(a),t=this.b,s=b;!0;s=n){$label1$1:if(y>0){do{if(s===c)break $label0$0 +r=u.j(a,s) +if(typeof r!=="number")return r.c4() +if((r&192)!==128){q=P.C("Bad UTF-8 encoding 0x"+C.c.ar(r,16),a,s) +throw H.a(q)}else{z=(z<<6|r&63)>>>0;--y;++s}}while(y>0) +q=x-1 +if(q<0||q>=4)return H.k(C.B,q) +if(z<=C.B[q]){q=P.C("Overlong encoding of 0x"+C.c.ar(z,16),a,s-x-1) +throw H.a(q)}if(z>1114111){q=P.C("Character outside valid Unicode range: 0x"+C.c.ar(z,16),a,s-x-1) +throw H.a(q)}if(!this.c||z!==65279)t.a+=H.K(z) +this.c=!1}for(q=s0){this.c=!1 +o=s+p +v.$2(s,o) +if(o===c)break}else o=s +n=o+1 +r=u.j(a,o) +if(typeof r!=="number")return r.C() +if(r<0){m=P.C("Negative UTF-8 code unit: -0x"+C.c.ar(-r,16),a,n-1) +throw H.a(m)}else{if((r&224)===192){z=r&31 y=1 x=1 -continue $label0$0}if((s&240)===224){z=s&15 +continue $label0$0}if((r&240)===224){z=r&15 y=2 x=2 -continue $label0$0}if((s&248)===240&&s<245){z=s&7 +continue $label0$0}if((r&248)===240&&r<245){z=r&7 y=3 x=3 -continue $label0$0}n=P.C("Bad UTF-8 encoding 0x"+C.c.aq(s,16),a,o-1) -throw H.a(n)}}break $label0$0}if(y>0){this.d=z +continue $label0$0}m=P.C("Bad UTF-8 encoding 0x"+C.c.ar(r,16),a,n-1) +throw H.a(m)}}break $label0$0}if(y>0){this.d=z this.e=y this.f=x}}}, -kO:{"^":"h:17;a,b,c,d", -$2:function(a,b){this.a.b.a+=P.aI(this.d,a,b)}}}],["","",,P,{"^":"", -n2:[function(a){return H.eV(a)},"$1","ls",4,0,45], -bt:function(a,b,c){var z -H.j(b,{func:1,ret:P.c,args:[P.d]}) -z=H.ix(a,c) +l7:{"^":"f:17;a", +$2:function(a,b){var z,y,x,w +H.l(a,"$ish",[P.c],"$ash") +z=this.a +for(y=J.Y(a),x=b;x0||c0||c=z){y=((C.a.n(a,b+4)^58)*3|C.a.n(a,b)^100|C.a.n(a,b+1)^97|C.a.n(a,b+2)^116|C.a.n(a,b+3)^97)>>>0 -if(y===0)return P.dT(b>0||c0||c=14)C.b.l(w,7,c) +C.b.k(w,1,x) +C.b.k(w,2,x) +C.b.k(w,7,x) +C.b.k(w,3,b) +C.b.k(w,4,b) +C.b.k(w,5,c) +C.b.k(w,6,c) +if(P.f8(a,b,c,0,w)>=14)C.b.k(w,7,c) v=w[1] -if(typeof v!=="number")return v.aO() -if(v>=b)if(P.eG(a,b,v,20,w)===20)w[7]=v +if(typeof v!=="number")return v.aQ() +if(v>=b)if(P.f8(a,b,v,20,w)===20)w[7]=v x=w[2] if(typeof x!=="number")return x.t() u=x+1 @@ -3550,16 +3597,16 @@ t=w[3] s=w[4] r=w[5] q=w[6] -if(typeof q!=="number")return q.D() -if(typeof r!=="number")return H.E(r) +if(typeof q!=="number")return q.C() +if(typeof r!=="number")return H.G(r) if(qv+3){o=null p=!1}else{x=t>b @@ -3569,7 +3616,7 @@ else n=!0 if(n){o=null p=!1}else{if(v===b+4)if(C.a.H(a,"file",b)){if(u<=b){if(!C.a.H(a,"/",s)){m="file:///" y=3}else{m="file://" -y=2}a=m+C.a.k(a,s,c) +y=2}a=m+C.a.l(a,s,c) v-=b z=y-b r+=z @@ -3578,7 +3625,7 @@ c=a.length b=0 u=7 t=7 -s=7}else if(s===r)if(b===0&&!0){a=C.a.ap(a,s,r,"/");++r;++q;++c}else{a=C.a.k(a,b,s)+"/"+C.a.k(a,r,c) +s=7}else if(s===r)if(b===0&&!0){a=C.a.aq(a,s,r,"/");++r;++q;++c}else{a=C.a.l(a,b,s)+"/"+C.a.l(a,r,c) v-=b u-=b t-=b @@ -3587,11 +3634,11 @@ z=1-b r+=z q+=z c=a.length -b=0}o="file"}else if(C.a.H(a,"http",b)){if(x&&t+3===s&&C.a.H(a,"80",t+1))if(b===0&&!0){a=C.a.ap(a,t,s,"") +b=0}o="file"}else if(C.a.H(a,"http",b)){if(x&&t+3===s&&C.a.H(a,"80",t+1))if(b===0&&!0){a=C.a.aq(a,t,s,"") s-=3 r-=3 q-=3 -c-=3}else{a=C.a.k(a,b,t)+C.a.k(a,s,c) +c-=3}else{a=C.a.l(a,b,t)+C.a.l(a,s,c) v-=b u-=b t-=b @@ -3601,11 +3648,11 @@ r-=z q-=z c=a.length b=0}o="http"}else o=null -else if(v===z&&C.a.H(a,"https",b)){if(x&&t+4===s&&C.a.H(a,"443",t+1))if(b===0&&!0){a=C.a.ap(a,t,s,"") +else if(v===z&&C.a.H(a,"https",b)){if(x&&t+4===s&&C.a.H(a,"443",t+1))if(b===0&&!0){a=C.a.aq(a,t,s,"") s-=4 r-=4 q-=4 -c-=3}else{a=C.a.k(a,b,t)+C.a.k(a,s,c) +c-=3}else{a=C.a.l(a,b,t)+C.a.l(a,s,c) v-=b u-=b t-=b @@ -3616,38 +3663,38 @@ q-=z c=a.length b=0}o="https"}else o=null p=!0}}}else o=null -if(p){if(b>0||c0||c9)z.$2("invalid character",w)}else{if(u===3)z.$2("IPv4 address should contain exactly 4 parts",w) -s=P.bt(C.a.k(a,v,w),null,null) -if(typeof s!=="number")return s.ay() +s=P.bw(C.a.l(a,v,w),null,null) +if(typeof s!=="number")return s.as() if(s>255)z.$2("each part must be in the range 0..255",v) r=u+1 if(u>=x)return H.k(y,u) y[u]=s v=w+1 u=r}}if(u!==3)z.$2("IPv4 address should contain exactly 4 parts",c) -s=P.bt(C.a.k(a,v,c),null,null) -if(typeof s!=="number")return s.ay() +s=P.bw(C.a.l(a,v,c),null,null) +if(typeof s!=="number")return s.as() if(s>255)z.$2("each part must be in the range 0..255",v) if(u>=x)return H.k(y,u) y[u]=s return y}, -dU:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i +ee:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i if(c==null)c=a.length -z=new P.ji(a) -y=new P.jj(z,a) +z=new P.jB(a) +y=new P.jC(z,a) if(a.length<2)z.$1("address is too short") x=H.o([],[P.c]) for(w=b,v=w,u=!1,t=!1;w>>0) C.b.m(x,(p[2]<<8|p[3])>>>0)}if(u){if(x.length>7)z.$1("an address with a wildcard must have less than 7 parts")}else if(x.length!==8)z.$1("an address without a wildcard must contain exactly 8 parts") o=new Uint8Array(16) @@ -3678,51 +3725,51 @@ i=l+1 if(i>=n)return H.k(o,i) o[i]=k&255 l+=2}}return o}, -kX:function(){var z,y,x,w,v -z=P.dz(22,new P.kZ(),!0,P.y) -y=new P.kY(z) -x=new P.l_() -w=new P.l0() -v=H.m(y.$2(0,225),"$iy") +lf:function(){var z,y,x,w,v +z=P.dG(22,new P.lh(),!0,P.y) +y=new P.lg(z) +x=new P.li() +w=new P.lj() +v=H.m(y.$2(0,225),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) x.$3(v,".",14) x.$3(v,":",34) x.$3(v,"/",3) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(14,225),"$iy") +v=H.m(y.$2(14,225),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) x.$3(v,".",15) x.$3(v,":",34) x.$3(v,"/",234) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(15,225),"$iy") +v=H.m(y.$2(15,225),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) x.$3(v,"%",225) x.$3(v,":",34) x.$3(v,"/",9) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(1,225),"$iy") +v=H.m(y.$2(1,225),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) x.$3(v,":",34) x.$3(v,"/",10) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(2,235),"$iy") +v=H.m(y.$2(2,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",139) x.$3(v,"/",131) x.$3(v,".",146) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(3,235),"$iy") +v=H.m(y.$2(3,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) x.$3(v,"/",68) x.$3(v,".",18) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(4,229),"$iy") +v=H.m(y.$2(4,229),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",5) w.$3(v,"AZ",229) x.$3(v,":",102) @@ -3731,7 +3778,7 @@ x.$3(v,"[",232) x.$3(v,"/",138) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(5,229),"$iy") +v=H.m(y.$2(5,229),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",5) w.$3(v,"AZ",229) x.$3(v,":",102) @@ -3739,74 +3786,74 @@ x.$3(v,"@",68) x.$3(v,"/",138) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(6,231),"$iy") +v=H.m(y.$2(6,231),"$isy") w.$3(v,"19",7) x.$3(v,"@",68) x.$3(v,"/",138) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(7,231),"$iy") +v=H.m(y.$2(7,231),"$isy") w.$3(v,"09",7) x.$3(v,"@",68) x.$3(v,"/",138) x.$3(v,"?",172) x.$3(v,"#",205) -x.$3(H.m(y.$2(8,8),"$iy"),"]",5) -v=H.m(y.$2(9,235),"$iy") +x.$3(H.m(y.$2(8,8),"$isy"),"]",5) +v=H.m(y.$2(9,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) x.$3(v,".",16) x.$3(v,"/",234) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(16,235),"$iy") +v=H.m(y.$2(16,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) x.$3(v,".",17) x.$3(v,"/",234) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(17,235),"$iy") +v=H.m(y.$2(17,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) x.$3(v,"/",9) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(10,235),"$iy") +v=H.m(y.$2(10,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) x.$3(v,".",18) x.$3(v,"/",234) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(18,235),"$iy") +v=H.m(y.$2(18,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) x.$3(v,".",19) x.$3(v,"/",234) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(19,235),"$iy") +v=H.m(y.$2(19,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) x.$3(v,"/",234) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(11,235),"$iy") +v=H.m(y.$2(11,235),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) x.$3(v,"/",10) x.$3(v,"?",172) x.$3(v,"#",205) -v=H.m(y.$2(12,236),"$iy") +v=H.m(y.$2(12,236),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",12) x.$3(v,"?",12) x.$3(v,"#",205) -v=H.m(y.$2(13,237),"$iy") +v=H.m(y.$2(13,237),"$isy") x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",13) x.$3(v,"?",13) -w.$3(H.m(y.$2(20,245),"$iy"),"az",21) -v=H.m(y.$2(21,245),"$iy") +w.$3(H.m(y.$2(20,245),"$isy"),"az",21) +v=H.m(y.$2(21,245),"$isy") w.$3(v,"az",21) w.$3(v,"09",21) x.$3(v,"+-.",21) return z}, -eG:function(a,b,c,d,e){var z,y,x,w,v -H.l(e,"$if",[P.c],"$af") -z=$.fn() +f8:function(a,b,c,d,e){var z,y,x,w,v +H.l(e,"$ish",[P.c],"$ash") +z=$.$get$f9() for(y=b;y=z.length)return H.k(z,d) x=z[d] w=C.a.n(a,y)^96 @@ -3814,238 +3861,237 @@ if(w>95)w=31 if(w>=x.length)return H.k(x,w) v=x[w] d=v&31 -C.b.l(e,v>>>5,y)}return d}, -H:{"^":"b;"}, +C.b.k(e,v>>>5,y)}return d}, +F:{"^":"b;"}, "+bool":0, -dl:{"^":"b;a,b", -J:function(a,b){if(b==null)return!1 -return b instanceof P.dl&&this.a===b.a&&this.b===b.b}, +cd:{"^":"b;a,b", +I:function(a,b){if(b==null)return!1 +if(!(b instanceof P.cd))return!1 +return this.a===b.a&&this.b===b.b}, gA:function(a){var z=this.a return(z^C.c.W(z,30))&1073741823}, h:function(a){var z,y,x,w,v,u,t -z=P.hj(H.iw(this)) -y=P.bc(H.iu(this)) -x=P.bc(H.iq(this)) -w=P.bc(H.ir(this)) -v=P.bc(H.it(this)) -u=P.bc(H.iv(this)) -t=P.hk(H.is(this)) +z=P.hz(H.iO(this)) +y=P.bd(H.iM(this)) +x=P.bd(H.iI(this)) +w=P.bd(H.iJ(this)) +v=P.bd(H.iL(this)) +u=P.bd(H.iN(this)) +t=P.hA(H.iK(this)) if(this.b)return z+"-"+y+"-"+x+" "+w+":"+v+":"+u+"."+t+"Z" else return z+"-"+y+"-"+x+" "+w+":"+v+":"+u+"."+t}, p:{ -hj:function(a){var z,y +hz:function(a){var z,y z=Math.abs(a) y=a<0?"-":"" if(z>=1000)return""+a if(z>=100)return y+"0"+z if(z>=10)return y+"00"+z return y+"000"+z}, -hk:function(a){if(a>=100)return""+a +hA:function(a){if(a>=100)return""+a if(a>=10)return"0"+a return"00"+a}, -bc:function(a){if(a>=10)return""+a +bd:function(a){if(a>=10)return""+a return"0"+a}}}, -b4:{"^":"d1;"}, +b7:{"^":"dd;"}, "+double":0, -K:{"^":"b;"}, -bH:{"^":"K;", +L:{"^":"b;"}, +bL:{"^":"L;", h:function(a){return"Throw of null."}}, -as:{"^":"K;a,b,c,S:d>", -gbn:function(){return"Invalid argument"+(!this.a?"(s)":"")}, -gbm:function(){return""}, +as:{"^":"L;a,b,c,P:d>", +gbq:function(){return"Invalid argument"+(!this.a?"(s)":"")}, +gbp:function(){return""}, h:function(a){var z,y,x,w,v,u z=this.c y=z!=null?" ("+z+")":"" z=this.d -x=z==null?"":": "+H.e(z) -w=this.gbn()+y+x +x=z==null?"":": "+H.d(z) +w=this.gbq()+y+x if(!this.a)return w -v=this.gbm() -u=P.bd(this.b) -return w+v+": "+u}, +v=this.gbp() +u=P.be(this.b) +return w+v+": "+H.d(u)}, p:{ -N:function(a){return new P.as(!1,null,null,a)}, -aS:function(a,b,c){return new P.as(!0,a,b,c)}}}, -bi:{"^":"as;e,f,a,b,c,d", -gbn:function(){return"RangeError"}, -gbm:function(){var z,y,x +I:function(a){return new P.as(!1,null,null,a)}, +bc:function(a,b,c){return new P.as(!0,a,b,c)}}}, +bl:{"^":"as;e,f,a,b,c,d", +gbq:function(){return"RangeError"}, +gbp:function(){var z,y,x z=this.e if(z==null){z=this.f -y=z!=null?": Not less than or equal to "+H.e(z):""}else{x=this.f -if(x==null)y=": Not greater than or equal to "+H.e(z) -else if(x>z)y=": Not in range "+H.e(z)+".."+H.e(x)+", inclusive" -else y=xz)y=": Not in range "+H.d(z)+".."+H.d(x)+", inclusive" +else y=xc)throw H.a(P.z(a,b,c,d,e))}, -a8:function(a,b,c,d,e,f){if(typeof a!=="number")return H.E(a) +N:function(a){return new P.bl(null,null,!1,null,null,a)}, +aI:function(a,b,c){return new P.bl(null,null,!0,a,b,"Value not in range")}, +z:function(a,b,c,d,e){return new P.bl(b,c,!0,a,d,"Invalid value")}, +dT:function(a,b,c,d,e){if(ac)throw H.a(P.z(a,b,c,d,e))}, +a8:function(a,b,c,d,e,f){if(typeof a!=="number")return H.G(a) if(0>a||a>c)throw H.a(P.z(a,0,c,"start",f)) if(b!=null){if(a>b||b>c)throw H.a(P.z(b,a,c,"end",f)) return b}return c}}}, -hK:{"^":"as;e,i:f>,a,b,c,d", -gbn:function(){return"RangeError"}, -gbm:function(){var z,y -z=H.w(this.b) -if(typeof z!=="number")return z.D() -if(z<0)return": index must not be negative" -y=this.f -if(y===0)return": no indices are valid" -return": index should be less than "+H.e(y)}, +i_:{"^":"as;e,i:f>,a,b,c,d", +gbq:function(){return"RangeError"}, +gbp:function(){if(J.fF(this.b,0))return": index must not be negative" +var z=this.f +if(z===0)return": no indices are valid" +return": index should be less than "+H.d(z)}, p:{ -ce:function(a,b,c,d,e){var z=H.w(e==null?J.T(b):e) -return new P.hK(b,z,!0,a,c,"Index out of range")}}}, -je:{"^":"K;S:a>", +cl:function(a,b,c,d,e){var z=H.w(e!=null?e:J.Z(b)) +return new P.i_(b,z,!0,a,c,"Index out of range")}}}, +jx:{"^":"L;P:a>", h:function(a){return"Unsupported operation: "+this.a}, p:{ -A:function(a){return new P.je(a)}}}, -ja:{"^":"K;S:a>", +A:function(a){return new P.jx(a)}}}, +ju:{"^":"L;P:a>", h:function(a){var z=this.a return z!=null?"UnimplementedError: "+z:"UnimplementedError"}, p:{ -cz:function(a){return new P.ja(a)}}}, -bl:{"^":"K;S:a>", +cI:function(a){return new P.ju(a)}}}, +bo:{"^":"L;P:a>", h:function(a){return"Bad state: "+this.a}, p:{ -ad:function(a){return new P.bl(a)}}}, -hb:{"^":"K;a", +ae:function(a){return new P.bo(a)}}}, +hr:{"^":"L;a", h:function(a){var z=this.a if(z==null)return"Concurrent modification during iteration." -return"Concurrent modification during iteration: "+P.bd(z)+"."}, +return"Concurrent modification during iteration: "+H.d(P.be(z))+"."}, p:{ -a3:function(a){return new P.hb(a)}}}, -ih:{"^":"b;", +a3:function(a){return new P.hr(a)}}}, +iA:{"^":"b;", h:function(a){return"Out of Memory"}, -$iK:1}, -dL:{"^":"b;", +$isL:1}, +dV:{"^":"b;", h:function(a){return"Stack Overflow"}, -$iK:1}, -hi:{"^":"K;a", +$isL:1}, +hy:{"^":"L;a", h:function(a){var z=this.a return z==null?"Reading static variable during its initialization":"Reading static variable '"+z+"' during its initialization"}}, -jS:{"^":"b;S:a>", +ka:{"^":"b;P:a>", h:function(a){return"Exception: "+this.a}}, -cb:{"^":"b;S:a>,aR:b>,G:c>", -h:function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k +ci:{"^":"b;P:a>,aT:b>,G:c>", +h:function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l z=this.a y=""!==z?"FormatException: "+z:"FormatException" x=this.c w=this.b -if(typeof w==="string"){if(x!=null)z=x<0||x>w.length +if(typeof w!=="string")return x!=null?y+(" (at offset "+H.d(x)+")"):y +if(x!=null)z=x<0||x>w.length else z=!1 if(z)x=null -if(x==null){v=w.length>78?C.a.k(w,0,75)+"...":w -return y+"\n"+v}for(u=1,t=0,s=!1,r=0;r1?y+(" (at line "+u+", character "+(x-t+1)+")\n"):y+(" (at character "+(x+1)+")\n") -p=w.length -for(r=x;r78)if(x-t<75){o=t+75 -n=t -m="" -l="..."}else{if(p-x<75){n=p-75 -o=p -l=""}else{n=x-36 -o=x+36 -l="..."}m="..."}else{o=p -n=t -m="" -l=""}k=C.a.k(w,n,o) -return y+m+k+l+"\n"+C.a.U(" ",x-n+m.length)+"^\n"}else return x!=null?y+(" (at offset "+H.e(x)+")"):y}, +if(x==null){if(w.length>78)w=C.a.l(w,0,75)+"..." +return y+"\n"+w}for(v=1,u=0,t=!1,s=0;s1?y+(" (at line "+v+", character "+(x-u+1)+")\n"):y+(" (at character "+(x+1)+")\n") +q=w.length +for(s=x;s78)if(x-u<75){p=u+75 +o=u +n="" +m="..."}else{if(q-x<75){o=q-75 +p=q +m=""}else{o=x-36 +p=x+36 +m="..."}n="..."}else{p=q +o=u +n="" +m=""}l=C.a.l(w,o,p) +return y+n+l+m+"\n"+C.a.U(" ",x-o+n.length)+"^\n"}, p:{ -C:function(a,b,c){return new P.cb(a,b,c)}}}, -c:{"^":"d1;"}, +C:function(a,b,c){return new P.ci(a,b,c)}}}, +c:{"^":"dd;"}, "+int":0, -p:{"^":"b;$ti", -a8:function(a,b){return P.co(this,b,H.v(this,"p",0))}, -b7:function(a){return this.a8(a,!0)}, +q:{"^":"b;$ti", +ab:function(a,b){return P.cv(this,b,H.u(this,"q",0))}, +b9:function(a){return this.ab(a,!0)}, gi:function(a){var z,y z=this.gK(this) for(y=0;z.q();)++y return y}, -gE:function(a){return!this.gK(this).q()}, -gbO:function(a){return!this.gE(this)}, -a_:function(a,b){return H.dK(this,b,H.v(this,"p",0))}, +gB:function(a){return!this.gK(this).q()}, +a_:function(a,b){return H.dU(this,b,H.u(this,"q",0))}, X:function(a,b){var z,y,x -if(b<0)H.t(P.z(b,0,null,"index",null)) -for(z=this.gK(this),y=0;z.q();){x=z.gB() -if(b===y)return x;++y}throw H.a(P.ce(b,this,"index",null,y))}, -h:function(a){return P.hM(this,"(",")")}}, -Y:{"^":"b;$ti"}, -f:{"^":"b;$ti",$iI:1,$ip:1}, +if(b<0)H.v(P.z(b,0,null,"index",null)) +for(z=this.gK(this),y=0;z.q();){x=z.gD() +if(b===y)return x;++y}throw H.a(P.cl(b,this,"index",null,y))}, +h:function(a){return P.i1(this,"(",")")}}, +a_:{"^":"b;$ti"}, +h:{"^":"b;$ti",$isJ:1,$isq:1}, "+List":0, x:{"^":"b;", gA:function(a){return P.b.prototype.gA.call(this,this)}, h:function(a){return"null"}}, "+Null":0, -d1:{"^":"b;"}, +dd:{"^":"b;"}, "+num":0, b:{"^":";", -J:function(a,b){return this===b}, +I:function(a,b){return this===b}, gA:function(a){return H.au(this)}, -h:function(a){return"Instance of '"+H.aX(this)+"'"}, +h:function(a){return"Instance of '"+H.aY(this)+"'"}, toString:function(){return this.h(this)}}, -ac:{"^":"b;"}, +ad:{"^":"b;"}, D:{"^":"b;"}, -d:{"^":"b;",$icu:1}, +e:{"^":"b;",$iscB:1}, "+String":0, -S:{"^":"b;a", +U:{"^":"b;a4:a<", gi:function(a){return this.a.length}, h:function(a){var z=this.a return z.charCodeAt(0)==0?z:z}, -$img:1, +gB:function(a){return this.a.length===0}, +$ismw:1, p:{ -bM:function(a,b,c){var z=J.bb(b) +bQ:function(a,b,c){var z=J.bb(b) if(!z.q())return a -if(c.length===0){do a+=H.e(z.gB()) -while(z.q())}else{a+=H.e(z.gB()) -for(;z.q();)a=a+c+H.e(z.gB())}return a}}}, -jh:{"^":"h:18;a", +if(c.length===0){do a+=H.d(z.gD()) +while(z.q())}else{a+=H.d(z.gD()) +for(;z.q();)a=a+c+H.d(z.gD())}return a}}}, +jA:{"^":"f:19;a", $2:function(a,b){throw H.a(P.C("Illegal IPv4 address, "+a,this.a,b))}}, -ji:{"^":"h:19;a", +jB:{"^":"f:20;a", $2:function(a,b){throw H.a(P.C("Illegal IPv6 address, "+a,this.a,b))}, $1:function(a){return this.$2(a,null)}}, -jj:{"^":"h:20;a,b", +jC:{"^":"f:21;a,b", $2:function(a,b){var z if(b-a>4)this.a.$2("an IPv6 part can only contain a maximum of 4 hex digits",a) -z=P.bt(C.a.k(this.b,a,b),null,16) -if(typeof z!=="number")return z.D() +z=P.bw(C.a.l(this.b,a,b),null,16) +if(typeof z!=="number")return z.C() if(z<0||z>65535)this.a.$2("each part must be in the range of `0x0..0xFFFF`",a) return z}}, -bp:{"^":"b;O:a<,b,c,d,T:e>,f,r,0x,0y,0z,0Q,0ch", -sdP:function(a){this.x=H.l(a,"$if",[P.d],"$af")}, -gaM:function(){return this.b}, +bt:{"^":"b;O:a<,b,c,d,T:e>,f,r,0x,0y,0z,0Q,0ch", +sdU:function(a){this.x=H.l(a,"$ish",[P.e],"$ash")}, +gaO:function(){return this.b}, ga1:function(a){var z=this.c if(z==null)return"" -if(C.a.N(z,"["))return C.a.k(z,1,z.length-1) +if(C.a.M(z,"["))return C.a.l(z,1,z.length-1) return z}, -gau:function(a){var z=this.d -if(z==null)return P.ei(this.a) +gax:function(a){var z=this.d +if(z==null)return P.eF(this.a) return z}, -gao:function(){var z=this.f +gap:function(){var z=this.f return z==null?"":z}, -gb2:function(){var z=this.r +gb4:function(){var z=this.r return z==null?"":z}, -gbT:function(){var z,y,x,w,v +gbW:function(){var z,y,x,w,v z=this.x if(z!=null)return z y=this.e if(y.length!==0&&C.a.n(y,0)===47)y=C.a.F(y,1) if(y==="")z=C.n -else{x=P.d +else{x=P.e w=H.o(y.split("/"),[x]) v=H.i(w,0) -z=P.dA(new H.dC(w,H.j(P.lq(),{func:1,ret:null,args:[v]}),[v,null]),x)}this.sdP(z) +z=P.dH(new H.dM(w,H.j(P.lJ(),{func:1,ret:null,args:[v]}),[v,null]),x)}this.sdU(z) return z}, -dF:function(a,b){var z,y,x,w,v,u -for(z=0,y=0;C.a.H(b,"../",y);){y+=3;++z}x=C.a.cL(a,"/") +dJ:function(a,b){var z,y,x,w,v,u +for(z=0,y=0;C.a.H(b,"../",y);){y+=3;++z}x=C.a.bR(a,"/") while(!0){if(!(x>0&&z>0))break -w=C.a.b4(a,"/",x-1) +w=C.a.b6(a,"/",x-1) if(w<0)break v=x-w u=v!==2 @@ -4053,64 +4099,64 @@ if(!u||v===3)if(C.a.v(a,w+1)===46)u=!u||C.a.v(a,w+2)===46 else u=!1 else u=!1 if(u)break;--z -x=w}return C.a.ap(a,x+1,null,C.a.F(b,y-3*z))}, -cQ:function(a){return this.aL(P.bQ(a,0,null))}, -aL:function(a){var z,y,x,w,v,u,t,s,r +x=w}return C.a.aq(a,x+1,null,C.a.F(b,y-3*z))}, +cU:function(a){return this.aN(P.bU(a,0,null))}, +aN:function(a){var z,y,x,w,v,u,t,s,r if(a.gO().length!==0){z=a.gO() -if(a.gaE()){y=a.gaM() +if(a.gaG()){y=a.gaO() x=a.ga1(a) -w=a.gaF()?a.gau(a):null}else{y="" +w=a.gaH()?a.gax(a):null}else{y="" x=null w=null}v=P.ay(a.gT(a)) -u=a.gas()?a.gao():null}else{z=this.a -if(a.gaE()){y=a.gaM() +u=a.gav()?a.gap():null}else{z=this.a +if(a.gaG()){y=a.gaO() x=a.ga1(a) -w=P.cH(a.gaF()?a.gau(a):null,z) +w=P.cS(a.gaH()?a.gax(a):null,z) v=P.ay(a.gT(a)) -u=a.gas()?a.gao():null}else{y=this.b +u=a.gav()?a.gap():null}else{y=this.b x=this.c w=this.d if(a.gT(a)===""){v=this.e -u=a.gas()?a.gao():this.f}else{if(a.gbK())v=P.ay(a.gT(a)) +u=a.gav()?a.gap():this.f}else{if(a.gbN())v=P.ay(a.gT(a)) else{t=this.e if(t.length===0)if(x==null)v=z.length===0?a.gT(a):P.ay(a.gT(a)) else v=P.ay("/"+a.gT(a)) -else{s=this.dF(t,a.gT(a)) +else{s=this.dJ(t,a.gT(a)) r=z.length===0 -if(!r||x!=null||C.a.N(t,"/"))v=P.ay(s) -else v=P.cI(s,!r||x!=null)}}u=a.gas()?a.gao():null}}}return new P.bp(z,y,x,w,v,u,a.gbL()?a.gb2():null)}, -gaE:function(){return this.c!=null}, -gaF:function(){return this.d!=null}, -gas:function(){return this.f!=null}, -gbL:function(){return this.r!=null}, -gbK:function(){return C.a.N(this.e,"/")}, -c_:function(a){var z,y +if(!r||x!=null||C.a.M(t,"/"))v=P.ay(s) +else v=P.cT(s,!r||x!=null)}}u=a.gav()?a.gap():null}}}return new P.bt(z,y,x,w,v,u,a.gbO()?a.gb4():null)}, +gaG:function(){return this.c!=null}, +gaH:function(){return this.d!=null}, +gav:function(){return this.f!=null}, +gbO:function(){return this.r!=null}, +gbN:function(){return C.a.M(this.e,"/")}, +c2:function(a){var z,y z=this.a -if(z!==""&&z!=="file")throw H.a(P.A("Cannot extract a file path from a "+H.e(z)+" URI")) +if(z!==""&&z!=="file")throw H.a(P.A("Cannot extract a file path from a "+H.d(z)+" URI")) z=this.f if((z==null?"":z)!=="")throw H.a(P.A("Cannot extract a file path from a URI with a query component")) z=this.r if((z==null?"":z)!=="")throw H.a(P.A("Cannot extract a file path from a URI with a fragment component")) -a=$.d6() -if(a)z=P.ev(this) -else{if(this.c!=null&&this.ga1(this)!=="")H.t(P.A("Cannot extract a non-Windows file path from a file URI with an authority")) -y=this.gbT() -P.kH(y,!1) -z=P.bM(C.a.N(this.e,"/")?"/":"",y,"/") +a=$.$get$cR() +if(a)z=P.eS(this) +else{if(this.c!=null&&this.ga1(this)!=="")H.v(P.A("Cannot extract a non-Windows file path from a file URI with an authority")) +y=this.gbW() +P.l_(y,!1) +z=P.bQ(C.a.M(this.e,"/")?"/":"",y,"/") z=z.charCodeAt(0)==0?z:z}return z}, -bZ:function(){return this.c_(null)}, +c1:function(){return this.c2(null)}, h:function(a){var z,y,x,w z=this.y if(z==null){z=this.a -y=z.length!==0?H.e(z)+":":"" +y=z.length!==0?H.d(z)+":":"" x=this.c w=x==null if(!w||z==="file"){z=y+"//" y=this.b -if(y.length!==0)z=z+H.e(y)+"@" +if(y.length!==0)z=z+H.d(y)+"@" if(!w)z+=x y=this.d -if(y!=null)z=z+":"+H.e(y)}else z=y +if(y!=null)z=z+":"+H.d(y)}else z=y z+=this.e y=this.f if(y!=null)z=z+"?"+y @@ -4118,88 +4164,87 @@ y=this.r if(y!=null)z=z+"#"+y z=z.charCodeAt(0)==0?z:z this.y=z}return z}, -J:function(a,b){var z,y +I:function(a,b){var z,y if(b==null)return!1 if(this===b)return!0 -if(!!J.q(b).$ibP)if(this.a==b.gO())if(this.c!=null===b.gaE())if(this.b==b.gaM())if(this.ga1(this)==b.ga1(b))if(this.gau(this)==b.gau(b))if(this.e===b.gT(b)){z=this.f +if(!!J.r(b).$isbT){if(this.a==b.gO())if(this.c!=null===b.gaG())if(this.b==b.gaO())if(this.ga1(this)==b.ga1(b))if(this.gax(this)==b.gax(b))if(this.e===b.gT(b)){z=this.f y=z==null -if(!y===b.gas()){if(y)z="" -if(z===b.gao()){z=this.r +if(!y===b.gav()){if(y)z="" +if(z===b.gap()){z=this.r y=z==null -if(!y===b.gbL()){if(y)z="" -z=z===b.gb2()}else z=!1}else z=!1}else z=!1}else z=!1 +if(!y===b.gbO()){if(y)z="" +z=z===b.gb4()}else z=!1}else z=!1}else z=!1}else z=!1 else z=!1 else z=!1 else z=!1 else z=!1 else z=!1 -else z=!1 -return z}, +return z}return!1}, gA:function(a){var z=this.z if(z==null){z=C.a.gA(this.h(0)) this.z=z}return z}, -$ibP:1, +$isbT:1, p:{ -kE:function(a,b,c,d,e,f,g,h,i,j){var z,y,x,w,v,u,t -if(j==null)if(d>b)j=P.eq(a,b,d) -else{if(d===b)P.aZ(a,b,"Invalid empty scheme") +kX:function(a,b,c,d,e,f,g,h,i,j){var z,y,x,w,v,u,t +if(j==null)if(d>b)j=P.eN(a,b,d) +else{if(d===b)P.b0(a,b,"Invalid empty scheme") j=""}if(e>b){z=d+3 -y=z?\\\\|]',!0,!1) +b0:function(a,b,c){throw H.a(P.C(c,a,b))}, +l_:function(a,b){C.b.J(H.l(a,"$ish",[P.e],"$ash"),new P.l0(!1))}, +eE:function(a,b,c){var z,y,x +H.l(a,"$ish",[P.e],"$ash") +for(z=H.af(a,c,null,H.i(a,0)),z=new H.ak(z,z.gi(z),0,[H.i(z,0)]);z.q();){y=z.d +x=P.H('["*/:<>?\\\\|]',!0,!1) y.length -if(H.eY(y,x,0)){z=P.A("Illegal character in path: "+H.e(y)) +if(H.fv(y,x,0)){z=P.A("Illegal character in path: "+H.d(y)) throw H.a(z)}}}, -kJ:function(a,b){var z +l1:function(a,b){var z if(!(65<=a&&a<=90))z=97<=a&&a<=122 else z=!0 if(z)return -z=P.A("Illegal drive letter "+P.j1(a)) +z=P.A("Illegal drive letter "+P.jl(a)) throw H.a(z)}, -cH:function(a,b){if(a!=null&&a===P.ei(b))return +cS:function(a,b){if(a!=null&&a===P.eF(b))return return a}, -en:function(a,b,c,d){var z,y +eK:function(a,b,c,d){var z,y if(a==null)return if(b===c)return"" if(C.a.v(a,b)===91){if(typeof c!=="number")return c.V() z=c-1 -if(C.a.v(a,z)!==93)P.aZ(a,b,"Missing end `]` to match `[` in host") -P.dU(a,b+1,z) -return C.a.k(a,b,c).toLowerCase()}if(typeof c!=="number")return H.E(c) +if(C.a.v(a,z)!==93)P.b0(a,b,"Missing end `]` to match `[` in host") +P.ee(a,b+1,z) +return C.a.l(a,b,c).toLowerCase()}if(typeof c!=="number")return H.G(c) y=b -for(;y>>4 if(t>=8)return H.k(C.E,t) t=(C.E[t]&1<<(v&15))!==0}else t=!1 -if(t){if(w&&65<=v&&90>=v){if(x==null)x=new P.S("") -if(y=v){if(x==null)x=new P.U("") +if(y>>4 if(t>=8)return H.k(C.i,t) t=(C.i[t]&1<<(v&15))!==0}else t=!1 -if(t)P.aZ(a,z,"Invalid character") +if(t)P.b0(a,z,"Invalid character") else{if((v&64512)===55296&&z+1>>4 if(w>=8)return H.k(C.k,w) w=(C.k[w]&1<<(x&15))!==0}else w=!1 -if(!w)P.aZ(a,z,"Illegal scheme character") -if(65<=x&&x<=90)y=!0}a=C.a.k(a,b,c) -return P.kG(y?a.toLowerCase():a)}, -kG:function(a){if(a==="http")return"http" +if(!w)P.b0(a,z,"Illegal scheme character") +if(65<=x&&x<=90)y=!0}a=C.a.l(a,b,c) +return P.kZ(y?a.toLowerCase():a)}, +kZ:function(a){if(a==="http")return"http" if(a==="file")return"file" if(a==="https")return"https" if(a==="package")return"package" return a}, -er:function(a,b,c){if(a==null)return"" -return P.b_(a,b,c,C.a1,!1)}, -eo:function(a,b,c,d,e,f){var z,y,x +eO:function(a,b,c){if(a==null)return"" +return P.b1(a,b,c,C.a4,!1)}, +eL:function(a,b,c,d,e,f){var z,y,x z=e==="file" y=z||f -x=P.b_(a,b,c,C.F,!0) -if(x.length===0){if(z)return"/"}else if(y&&!C.a.N(x,"/"))x="/"+x -return P.kL(x,e,f)}, -kL:function(a,b,c){var z=b.length===0 -if(z&&!c&&!C.a.N(a,"/"))return P.cI(a,!z||c) +x=P.b1(a,b,c,C.F,!0) +if(x.length===0){if(z)return"/"}else if(y&&!C.a.M(x,"/"))x="/"+x +return P.l3(x,e,f)}, +l3:function(a,b,c){var z=b.length===0 +if(z&&!c&&!C.a.M(a,"/"))return P.cT(a,!z||c) return P.ay(a)}, -ep:function(a,b,c,d){if(a!=null)return P.b_(a,b,c,C.j,!0) +eM:function(a,b,c,d){if(a!=null)return P.b1(a,b,c,C.j,!0) return}, -em:function(a,b,c){if(a==null)return -return P.b_(a,b,c,C.j,!0)}, -eu:function(a,b,c){var z,y,x,w,v,u +eJ:function(a,b,c){if(a==null)return +return P.b1(a,b,c,C.j,!0)}, +eR:function(a,b,c){var z,y,x,w,v,u z=b+2 if(z>=a.length)return"%" y=C.a.v(a,b+1) x=C.a.v(a,z) -w=H.bX(y) -v=H.bX(x) +w=H.c2(y) +v=H.c2(x) if(w<0||v<0)return"%" u=w*16+v if(u<127){z=C.c.W(u,4) if(z>=8)return H.k(C.D,z) z=(C.D[z]&1<<(u&15))!==0}else z=!1 -if(z)return H.J(c&&65<=u&&90>=u?(u|32)>>>0:u) -if(y>=97||x>=97)return C.a.k(a,b,b+3).toUpperCase() +if(z)return H.K(c&&65<=u&&90>=u?(u|32)>>>0:u) +if(y>=97||x>=97)return C.a.l(a,b,b+3).toUpperCase() return}, -ej:function(a){var z,y,x,w,v,u +eG:function(a){var z,y,x,w,v,u if(a<128){z=new Array(3) z.fixed$length=Array y=H.o(z,[P.c]) -C.b.l(y,0,37) -C.b.l(y,1,C.a.n("0123456789ABCDEF",a>>>4)) -C.b.l(y,2,C.a.n("0123456789ABCDEF",a&15))}else{if(a>2047)if(a>65535){x=240 +C.b.k(y,0,37) +C.b.k(y,1,C.a.n("0123456789ABCDEF",a>>>4)) +C.b.k(y,2,C.a.n("0123456789ABCDEF",a&15))}else{if(a>2047)if(a>65535){x=240 w=4}else{x=224 w=3}else{x=192 w=2}z=new Array(3*w) z.fixed$length=Array y=H.o(z,[P.c]) -for(v=0;--w,w>=0;x=128){u=C.c.dX(a,6*w)&63|x -C.b.l(y,v,37) -C.b.l(y,v+1,C.a.n("0123456789ABCDEF",u>>>4)) -C.b.l(y,v+2,C.a.n("0123456789ABCDEF",u&15)) -v+=3}}return P.aI(y,0,null)}, -b_:function(a,b,c,d,e){var z=P.et(a,b,c,H.l(d,"$if",[P.c],"$af"),e) -return z==null?C.a.k(a,b,c):z}, -et:function(a,b,c,d,e){var z,y,x,w,v,u,t,s,r -H.l(d,"$if",[P.c],"$af") +for(v=0;--w,w>=0;x=128){u=C.c.e3(a,6*w)&63|x +C.b.k(y,v,37) +C.b.k(y,v+1,C.a.n("0123456789ABCDEF",u>>>4)) +C.b.k(y,v+2,C.a.n("0123456789ABCDEF",u&15)) +v+=3}}return P.aJ(y,0,null)}, +b1:function(a,b,c,d,e){var z=P.eQ(a,b,c,H.l(d,"$ish",[P.c],"$ash"),e) +return z==null?C.a.l(a,b,c):z}, +eQ:function(a,b,c,d,e){var z,y,x,w,v,u,t,s,r +H.l(d,"$ish",[P.c],"$ash") z=!e y=b x=y w=null -while(!0){if(typeof y!=="number")return y.D() -if(typeof c!=="number")return H.E(c) +while(!0){if(typeof y!=="number")return y.C() +if(typeof c!=="number")return H.G(c) if(!(y>>4 if(u>=8)return H.k(d,u) u=(d[u]&1<<(v&15))!==0}else u=!1 if(u)++y -else{if(v===37){t=P.eu(a,y,!1) +else{if(v===37){t=P.eR(a,y,!1) if(t==null){y+=3 break c$0}if("%"===t){t="%25" s=1}else s=3}else{if(z)if(v<=93){u=v>>>4 if(u>=8)return H.k(C.i,u) u=(C.i[u]&1<<(v&15))!==0}else u=!1 else u=!1 -if(u){P.aZ(a,y,"Invalid character") +if(u){P.b0(a,y,"Invalid character") t=null s=null}else{if((v&64512)===55296){u=y+1 if(u=t)return H.k(z,-1) z.pop() if(z.length===0)C.b.m(z,"")}w=!0}else if("."===u)w=!0 else{C.b.m(z,u) w=!1}}if(w)C.b.m(z,"") -return C.b.b3(z,"/")}, -cI:function(a,b){var z,y,x,w,v,u -if(!P.es(a))return!b?P.ek(a):a -z=H.o([],[P.d]) +return C.b.b5(z,"/")}, +cT:function(a,b){var z,y,x,w,v,u +if(!P.eP(a))return!b?P.eH(a):a +z=H.o([],[P.e]) for(y=a.split("/"),x=y.length,w=!1,v=0;v=z.length)return H.k(z,-1) +if(".."===u)if(z.length!==0&&C.b.ga9(z)!==".."){if(0>=z.length)return H.k(z,-1) z.pop() w=!0}else{C.b.m(z,"..") w=!1}else if("."===u)w=!0 @@ -4354,36 +4399,36 @@ if(y!==0)if(y===1){if(0>=y)return H.k(z,0) y=z[0].length===0}else y=!1 else y=!0 if(y)return"./" -if(w||C.b.ga7(z)==="..")C.b.m(z,"") +if(w||C.b.ga9(z)==="..")C.b.m(z,"") if(!b){if(0>=z.length)return H.k(z,0) -C.b.l(z,0,P.ek(z[0]))}return C.b.b3(z,"/")}, -ek:function(a){var z,y,x,w +C.b.k(z,0,P.eH(z[0]))}return C.b.b5(z,"/")}, +eH:function(a){var z,y,x,w z=a.length -if(z>=2&&P.el(J.c2(a,0)))for(y=1;y=2&&P.eI(J.c7(a,0)))for(y=1;y>>4 if(w>=8)return H.k(C.k,w) w=(C.k[w]&1<<(x&15))===0}else w=!0 if(w)break}return a}, -ev:function(a){var z,y,x,w,v -z=a.gbT() +eS:function(a){var z,y,x,w,v +z=a.gbW() y=z.length -if(y>0&&J.T(z[0])===2&&J.bw(z[0],1)===58){if(0>=y)return H.k(z,0) -P.kJ(J.bw(z[0],0),!1) -P.eh(z,!1,1) -x=!0}else{P.eh(z,!1,0) -x=!1}w=a.gbK()&&!x?"\\":"" -if(a.gaE()){v=a.ga1(a) -if(v.length!==0)w=w+"\\"+H.e(v)+"\\"}w=P.bM(w,z,"\\") +if(y>0&&J.Z(z[0])===2&&J.by(z[0],1)===58){if(0>=y)return H.k(z,0) +P.l1(J.by(z[0],0),!1) +P.eE(z,!1,1) +x=!0}else{P.eE(z,!1,0) +x=!1}w=a.gbN()&&!x?"\\":"" +if(a.gaG()){v=a.ga1(a) +if(v.length!==0)w=w+"\\"+H.d(v)+"\\"}w=P.bQ(w,z,"\\") y=x&&y===1?w+"\\":w return y.charCodeAt(0)==0?y:y}, -kK:function(a,b){var z,y,x +l2:function(a,b){var z,y,x for(z=0,y=0;y<2;++y){x=C.a.n(a,b+y) if(48<=x&&x<=57)z=z*16+x-48 else{x|=32 if(97<=x&&x<=102)z=z*16+x-87 -else throw H.a(P.N("Invalid URL encoding"))}}return z}, -cJ:function(a,b,c,d,e){var z,y,x,w,v,u +else throw H.a(P.I("Invalid URL encoding"))}}return z}, +cU:function(a,b,c,d,e){var z,y,x,w,v,u y=J.a6(a) x=b while(!0){if(!(x127)throw H.a(P.N("Illegal percent encoding in URI")) -if(w===37){if(x+3>a.length)throw H.a(P.N("Truncated URI")) -C.b.m(u,P.kK(a,x+1)) -x+=2}else C.b.m(u,w)}}H.l(u,"$if",[P.c],"$af") -return new P.jm(!1).Z(u)}, -el:function(a){var z=a|32 +if(w>127)throw H.a(P.I("Illegal percent encoding in URI")) +if(w===37){if(x+3>a.length)throw H.a(P.I("Truncated URI")) +C.b.m(u,P.l2(a,x+1)) +x+=2}else C.b.m(u,w)}}H.l(u,"$ish",[P.c],"$ash") +return new P.jF(!1).Z(u)}, +eI:function(a){var z=a|32 return 97<=z&&z<=122}}}, -kF:{"^":"h:9;a,b", +kY:{"^":"f:9;a,b", $1:function(a){var z=this.b if(typeof z!=="number")return z.t() throw H.a(P.C("Invalid port",this.a,z+1))}}, -kI:{"^":"h:9;a", -$1:function(a){H.r(a) -if(J.fx(a,"/"))if(this.a)throw H.a(P.N("Illegal path character "+a)) +l0:{"^":"f:9;a", +$1:function(a){H.p(a) +if(J.fK(a,"/"))if(this.a)throw H.a(P.I("Illegal path character "+a)) else throw H.a(P.A("Illegal path character "+a))}}, -jf:{"^":"b;a,b,c", -gcU:function(){var z,y,x,w,v +jy:{"^":"b;a,b,c", +gcY:function(){var z,y,x,w,v z=this.c if(z!=null)return z z=this.b if(0>=z.length)return H.k(z,0) y=this.a z=z[0]+1 -x=C.a.am(y,"?",z) +x=C.a.an(y,"?",z) w=y.length -if(x>=0){v=P.b_(y,x+1,w,C.j,!1) +if(x>=0){v=P.b1(y,x+1,w,C.j,!1) w=x}else v=null -z=new P.jO(this,"data",null,null,null,P.b_(y,z,w,C.F,!1),v,null) +z=new P.k6(this,"data",null,null,null,P.b1(y,z,w,C.F,!1),v,null) this.c=z return z}, h:function(a){var z,y @@ -4433,7 +4478,7 @@ if(0>=z.length)return H.k(z,0) y=this.a return z[0]===-1?"data:"+y:y}, p:{ -dT:function(a,b,c){var z,y,x,w,v,u,t,s,r +ed:function(a,b,c){var z,y,x,w,v,u,t,s,r z=H.o([b-1],[P.c]) for(y=a.length,x=b,w=-1,v=null;xb)throw H.a(P.C("Inv for(;v!==44;){C.b.m(z,x);++x for(u=-1;x=0)C.b.m(z,u) -else{t=C.b.ga7(z) +else{t=C.b.ga9(z) if(v!==44||x!==t+7||!C.a.H(a,"base64",t+1))throw H.a(P.C("Expecting '='",a,x)) break}}C.b.m(z,x) s=x+1 -if((z.length&1)===1)a=C.H.eK(a,s,y) -else{r=P.et(a,s,y,C.j,!0) -if(r!=null)a=C.a.ap(a,s,y,r)}return new P.jf(a,z,c)}}}, -kZ:{"^":"h:22;", +if((z.length&1)===1)a=C.H.eW(a,s,y) +else{r=P.eQ(a,s,y,C.j,!0) +if(r!=null)a=C.a.aq(a,s,y,r)}return new P.jy(a,z,c)}}}, +lh:{"^":"f:23;", $1:function(a){return new Uint8Array(96)}}, -kY:{"^":"h:23;a", +lg:{"^":"f:24;a", $2:function(a,b){var z=this.a if(a>=z.length)return H.k(z,a) z=z[a] -J.fy(z,0,96,b) +J.fL(z,0,96,b) return z}}, -l_:{"^":"h;", +li:{"^":"f;", $3:function(a,b,c){var z,y,x for(z=b.length,y=0;y=a.length)return H.k(a,x) a[x]=c}}}, -l0:{"^":"h;", +lj:{"^":"f;", $3:function(a,b,c){var z,y,x for(z=C.a.n(b,0),y=C.a.n(b,1);z<=y;++z){x=(z^96)>>>0 if(x>=a.length)return H.k(a,x) a[x]=c}}}, ao:{"^":"b;a,b,c,d,e,f,r,x,0y", -gaE:function(){return this.c>0}, -gaF:function(){var z,y +gaG:function(){return this.c>0}, +gaH:function(){var z,y if(this.c>0){z=this.d if(typeof z!=="number")return z.t() y=this.e -if(typeof y!=="number")return H.E(y) +if(typeof y!=="number")return H.G(y) y=z+1y?C.a.k(this.a,y,z-1):""}, +return z>y?C.a.l(this.a,y,z-1):""}, ga1:function(a){var z=this.c -return z>0?C.a.k(this.a,z,this.d):""}, -gau:function(a){var z -if(this.gaF()){z=this.d +return z>0?C.a.l(this.a,z,this.d):""}, +gax:function(a){var z +if(this.gaH()){z=this.d if(typeof z!=="number")return z.t() -return P.bt(C.a.k(this.a,z+1,this.e),null,null)}if(this.gbq())return 80 -if(this.gbr())return 443 +return P.bw(C.a.l(this.a,z+1,this.e),null,null)}if(this.gbt())return 80 +if(this.gbu())return 443 return 0}, -gT:function(a){return C.a.k(this.a,this.e,this.f)}, -gao:function(){var z,y +gT:function(a){return C.a.l(this.a,this.e,this.f)}, +gap:function(){var z,y z=this.f y=this.r -if(typeof z!=="number")return z.D() -return z=y.length)return this -return new P.ao(C.a.k(y,0,z),this.b,this.c,this.d,this.e,this.f,z,this.x)}, -cQ:function(a){return this.aL(P.bQ(a,0,null))}, -aL:function(a){if(a instanceof P.ao)return this.dY(this,a) -return this.cv().aL(a)}, -dY:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k +return new P.ao(C.a.l(y,0,z),this.b,this.c,this.d,this.e,this.f,z,this.x)}, +cU:function(a){return this.aN(P.bU(a,0,null))}, +aN:function(a){if(a instanceof P.ao)return this.e4(this,a) +return this.cz().aN(a)}, +e4:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k z=b.b if(z>0)return b y=b.c if(y>0){x=a.b if(x<=0)return b -if(a.gbp())w=b.e!=b.f -else if(a.gbq())w=!b.cl("80") -else w=!a.gbr()||!b.cl("443") +if(a.gbs())w=b.e!=b.f +else if(a.gbt())w=!b.cn("80") +else w=!a.gbu()||!b.cn("443") if(w){v=x+1 -u=C.a.k(a.a,0,v)+C.a.F(b.a,z+1) +u=C.a.l(a.a,0,v)+C.a.F(b.a,z+1) z=b.d if(typeof z!=="number")return z.t() t=b.e if(typeof t!=="number")return t.t() s=b.f if(typeof s!=="number")return s.t() -return new P.ao(u,x,y+v,z+v,t+v,s+v,b.r+v,a.x)}else return this.cv().aL(b)}r=b.e +return new P.ao(u,x,y+v,z+v,t+v,s+v,b.r+v,a.x)}else return this.cz().aN(b)}r=b.e z=b.f if(r==z){y=b.r -if(typeof z!=="number")return z.D() +if(typeof z!=="number")return z.C() if(z0){for(;C.a.H(y,"../",r);){if(typeof r!=="number")return r.t() r+=3}if(typeof q!=="number")return q.V() -if(typeof r!=="number")return H.E(r) +if(typeof r!=="number")return H.G(r) v=q-r+1 -u=C.a.k(a.a,0,q)+"/"+C.a.F(y,r) +u=C.a.l(a.a,0,q)+"/"+C.a.F(y,r) if(typeof z!=="number")return z.t() return new P.ao(u,a.b,a.c,a.d,q,z+v,b.r+v,a.x)}o=a.a for(n=q;C.a.H(o,"../",n);){if(typeof n!=="number")return n.t() n+=3}m=0 while(!0){if(typeof r!=="number")return r.t() l=r+3 -if(typeof z!=="number")return H.E(z) +if(typeof z!=="number")return H.G(z) if(!(l<=z&&C.a.H(y,"../",r)))break;++m r=l}k="" -while(!0){if(typeof p!=="number")return p.ay() -if(typeof n!=="number")return H.E(n) +while(!0){if(typeof p!=="number")return p.as() +if(typeof n!=="number")return H.G(n) if(!(p>n))break;--p if(C.a.v(o,p)===47){if(m===0){k="/" break}--m k="/"}}if(p===n&&a.b<=0&&!C.a.H(o,"/",q)){r-=m*3 k=""}v=p-r+k.length -return new P.ao(C.a.k(o,0,p)+k+C.a.F(y,r),a.b,a.c,a.d,q,z+v,b.r+v,a.x)}, -c_:function(a){var z,y,x -if(this.b>=0&&!this.gbp())throw H.a(P.A("Cannot extract a file path from a "+H.e(this.gO())+" URI")) +return new P.ao(C.a.l(o,0,p)+k+C.a.F(y,r),a.b,a.c,a.d,q,z+v,b.r+v,a.x)}, +c2:function(a){var z,y,x +if(this.b>=0&&!this.gbs())throw H.a(P.A("Cannot extract a file path from a "+H.d(this.gO())+" URI")) z=this.f y=this.a -if(typeof z!=="number")return z.D() +if(typeof z!=="number")return z.C() if(z0?this.ga1(this):null -w=this.gaF()?this.gau(this):null +w=this.gaH()?this.gax(this):null v=this.a u=this.f -t=C.a.k(v,this.e,u) +t=C.a.l(v,this.e,u) s=this.r -if(typeof u!=="number")return u.D() -u=u=x.length)return H.k(x,v) u=x[v] z.a=u if(u!=null)return u -u=P.i2() +u=P.ij() z.a=u -C.b.l(x,v,u) -this.ev(a,new P.jy(z,this)) +C.b.k(x,v,u) +this.eF(a,new P.jR(z,this)) return z.a}if(a instanceof Array){t=a -v=this.cH(t) +v=this.cJ(t) x=this.b if(v>=x.length)return H.k(x,v) u=x[v] if(u!=null)return u -s=J.a0(t) +s=J.Y(t) r=s.gi(t) u=this.c?new Array(r):t -C.b.l(x,v,u) -for(x=J.bq(u),q=0;q=z.length)return H.k(z,-1) -z.pop()}z=y.a +z.pop()}z=y.ga4() return z.charCodeAt(0)==0?z:z}, -bs:function(a){var z -if(a==null||H.b3(a,H.v(this,"B",1))){z=this.b.$1(a) +bv:function(a){var z +if(a==null||H.b6(a,H.u(this,"B",1))){z=this.b.$1(a) z=z}else z=!1 return z}, -$iR:1, -$aR:function(a,b,c){return[b,c]}}, -h_:{"^":"h;a", +$isS:1, +$asS:function(a,b,c){return[b,c]}}, +hf:{"^":"f;a", $2:function(a,b){var z=this.a -H.n(a,H.v(z,"B",1)) -H.n(b,H.v(z,"B",2)) -z.l(0,a,b) +H.n(a,H.u(z,"B",1)) +H.n(b,H.u(z,"B",2)) +z.k(0,a,b) return b}, $S:function(){var z,y z=this.a -y=H.v(z,"B",2) -return{func:1,ret:y,args:[H.v(z,"B",1),y]}}}, -h0:{"^":"h;a,b", +y=H.u(z,"B",2) +return{func:1,ret:y,args:[H.u(z,"B",1),y]}}}, +hg:{"^":"f;a,b", $2:function(a,b){var z=this.a -H.n(a,H.v(z,"B",0)) -H.l(b,"$ibg",[H.v(z,"B",1),H.v(z,"B",2)],"$abg") +H.n(a,H.u(z,"B",0)) +H.l(b,"$isbj",[H.u(z,"B",1),H.u(z,"B",2)],"$asbj") return this.b.$2(b.a,b.b)}, $S:function(){var z=this.a -return{func:1,ret:-1,args:[H.v(z,"B",0),[B.bg,H.v(z,"B",1),H.v(z,"B",2)]]}}}, -h1:{"^":"h;a,b,c", +return{func:1,ret:-1,args:[H.u(z,"B",0),[B.bj,H.u(z,"B",1),H.u(z,"B",2)]]}}}, +hh:{"^":"f;a,b,c", $2:function(a,b){var z=this.b -H.n(a,H.v(z,"B",1)) -H.n(b,H.v(z,"B",2)) +H.n(a,H.u(z,"B",1)) +H.n(b,H.u(z,"B",2)) z=this.a if(!z.a)this.c.a+=", " z.a=!1 -this.c.a+=H.e(a)+": "+H.e(b)}, +this.c.a+=H.d(a)+": "+H.d(b)}, $S:function(){var z=this.b -return{func:1,ret:P.x,args:[H.v(z,"B",1),H.v(z,"B",2)]}}}, -l3:{"^":"h:13;a", -$1:function(a){return this.a===a}}}],["","",,B,{"^":"",bg:{"^":"b;a,b,$ti"}}],["","",,N,{"^":"",ht:{"^":"ai;", -gad:function(){return C.K}, -$aai:function(){return[[P.f,P.c],P.d]}}}],["","",,R,{"^":"", -kW:function(a,b,c){var z,y,x,w,v,u,t,s,r -H.l(a,"$if",[P.c],"$af") +return{func:1,ret:P.x,args:[H.u(z,"B",1),H.u(z,"B",2)]}}}, +lm:{"^":"f:12;a", +$1:function(a){return this.a===a}}}],["","",,B,{"^":"",bj:{"^":"b;a,b,$ti"}}],["","",,N,{"^":"",hJ:{"^":"aj;", +gaf:function(){return C.K}, +$asaj:function(){return[[P.h,P.c],P.e]}}}],["","",,R,{"^":"", +le:function(a,b,c){var z,y,x,w,v,u,t,s,r +H.l(a,"$ish",[P.c],"$ash") z=new Uint8Array((c-b)*2) for(y=z.length,x=a.length,w=b,v=0,u=0;w=x)return H.k(a,w) t=a[w] -if(typeof t!=="number")return H.E(t) +if(typeof t!=="number")return H.G(t) u=(u|t)>>>0 s=v+1 r=(t&240)>>>4 @@ -4910,68 +4960,69 @@ v=s+1 r=t&15 r=r<10?r+48:r+97-10 if(s>=y)return H.k(z,s) -z[s]=r}if(u>=0&&u<=255)return P.aI(z,0,null) +z[s]=r}if(u>=0&&u<=255)return P.aJ(z,0,null) for(w=b;w=x)return H.k(a,w) t=a[w] -if(typeof t!=="number")return t.aO() +if(typeof t!=="number")return t.aQ() if(t>=0&&t<=255)continue -throw H.a(P.C("Invalid byte "+(t<0?"-":"")+"0x"+C.c.aq(Math.abs(t),16)+".",a,w))}throw H.a("unreachable")}, -hu:{"^":"U;", -Z:function(a){H.l(a,"$if",[P.c],"$af") -return R.kW(a,0,a.length)}, -$aU:function(){return[[P.f,P.c],P.d]}}}],["","",,E,{"^":"",fM:{"^":"b;", -b_:function(a,b,c,d,e){return this.dV(a,b,c,d,e)}, -dV:function(a,b,c,d,e){var z=0,y=P.cS(U.bj),x,w=this,v,u,t -var $async$b_=P.cU(function(f,g){if(f===1)return P.cK(g,y) -while(true)switch(z){case 0:b=P.bQ(b,0,null) -v=P.d -u=new O.iD(C.h,new Uint8Array(0),a,b,!0,!0,5,P.dy(new G.fO(),new G.fP(),null,v,v),!1) -u.see(0,d) +throw H.a(P.C("Invalid byte "+(t<0?"-":"")+"0x"+C.c.ar(Math.abs(t),16)+".",a,w))}throw H.a("unreachable")}, +hK:{"^":"V;", +Z:function(a){H.l(a,"$ish",[P.c],"$ash") +return R.le(a,0,a.length)}, +$asV:function(){return[[P.h,P.c],P.e]}}}],["","",,E,{"^":"",h1:{"^":"b;", +b1:function(a,b,c,d,e){return this.e1(a,b,c,d,e)}, +e1:function(a,b,c,d,e){var z=0,y=P.d2(U.bm),x,w=this,v,u,t +var $async$b1=P.d4(function(f,g){if(f===1)return P.cV(g,y) +while(true)switch(z){case 0:b=P.bU(b,0,null) +v=P.e +u=new O.iV(C.h,new Uint8Array(0),a,b,!0,!0,5,P.dF(new G.h3(),new G.h4(),null,v,v),!1) +u.seo(0,d) t=U z=3 -return P.bS(w.ah(0,u),$async$b_) -case 3:x=t.iE(g) +return P.bW(w.ai(0,u),$async$b1) +case 3:x=t.iW(g) z=1 break -case 1:return P.cL(x,y)}}) -return P.cM($async$b_,y)}}}],["","",,G,{"^":"",fN:{"^":"b;", -fe:["d3",function(){if(this.x)throw H.a(P.ad("Can't finalize a finalized Request.")) +case 1:return P.cW(x,y)}}) +return P.cX($async$b1,y)}}}],["","",,G,{"^":"",h2:{"^":"b;", +fu:["d8",function(){if(this.x)throw H.a(P.ae("Can't finalize a finalized Request.")) this.x=!0 return}], -h:function(a){return this.a+" "+H.e(this.b)}},fO:{"^":"h:27;", -$2:function(a,b){H.r(a) -H.r(b) -return a.toLowerCase()===b.toLowerCase()}},fP:{"^":"h:28;", -$1:function(a){return C.a.gA(H.r(a).toLowerCase())}}}],["","",,T,{"^":"",dc:{"^":"b;", -c3:function(a,b,c,d,e,f,g){var z=this.b -if(typeof z!=="number")return z.D() -if(z<100)throw H.a(P.N("Invalid status code "+z+"."))}}}],["","",,O,{"^":"",fR:{"^":"fM;a,b", -ah:function(a,b){var z=0,y=P.cS(X.bL),x,w=2,v,u=[],t=this,s,r,q,p,o,n -var $async$ah=P.cU(function(c,d){if(c===1){v=d -z=w}while(true)switch(z){case 0:b.d3() -q=[P.f,P.c] +h:function(a){return this.a+" "+H.d(this.b)}},h3:{"^":"f:28;", +$2:function(a,b){H.p(a) +H.p(b) +return a.toLowerCase()===b.toLowerCase()}},h4:{"^":"f:29;", +$1:function(a){return C.a.gA(H.p(a).toLowerCase())}}}],["","",,T,{"^":"",dj:{"^":"b;", +c6:function(a,b,c,d,e,f,g){var z=this.b +if(typeof z!=="number")return z.C() +if(z<100)throw H.a(P.I("Invalid status code "+z+"."))}}}],["","",,O,{"^":"",h6:{"^":"h1;a,b", +scZ:function(a,b){this.b=H.fh(b)}, +ai:function(a,b){var z=0,y=P.d2(X.bP),x,w=2,v,u=[],t=this,s,r,q,p,o,n +var $async$ai=P.d4(function(c,d){if(c===1){v=d +z=w}while(true)switch(z){case 0:b.d8() +q=[P.h,P.c] z=3 -return P.bS(new Z.dg(P.dO(H.o([b.z],[q]),q)).cT(),$async$ah) +return P.bW(new Z.dn(P.dX(H.o([b.z],[q]),q)).cX(),$async$ai) case 3:p=d s=new XMLHttpRequest() q=t.a q.m(0,s) o=J.ar(b.b) -n=H.m(s,"$ibC");(n&&C.w).eL(n,b.a,o,!0,null,null) -s.responseType="blob" -s.withCredentials=t.b -b.r.I(0,J.fC(s)) -o=X.bL -r=new P.cE(new P.G(0,$.u,[o]),[o]) +n=H.m(s,"$isbE");(n&&C.w).eX(n,b.a,o,!0,null,null) +J.fT(s,"blob") +J.fU(s,t.b) +b.r.J(0,J.fQ(s)) +o=X.bP +r=new P.cN(new P.E(0,$.t,[o]),[o]) o=[W.am] -n=new W.bo(H.m(s,"$iaF"),"load",!1,o) -n.gal(n).aw(new O.fU(s,r,b),null) -o=new W.bo(H.m(s,"$iaF"),"error",!1,o) -o.gal(o).aw(new O.fV(r,b),null) -J.fE(s,p) +n=new W.bs(H.m(s,"$isaG"),"load",!1,o) +n.gam(n).az(new O.h9(s,r,b),null) +o=new W.bs(H.m(s,"$isaG"),"error",!1,o) +o.gam(o).az(new O.ha(r,b),null) +J.fS(s,p) w=4 z=7 -return P.bS(r.a,$async$ah) +return P.bW(r.gcL(),$async$ai) case 7:o=d x=o u=[1] @@ -4982,148 +5033,150 @@ z=5 break case 4:u=[2] case 5:w=2 -q.eS(0,s) +q.f4(0,s) z=u.pop() break -case 6:case 1:return P.cL(x,y) -case 2:return P.cK(v,y)}}) -return P.cM($async$ah,y)}, -a4:function(a){var z -for(z=this.a,z=P.e8(z,z.r,H.i(z,0));z.q();)z.d.abort()}},fU:{"^":"h:4;a,b,c", +case 6:case 1:return P.cW(x,y) +case 2:return P.cV(v,y)}}) +return P.cX($async$ai,y)}, +a5:function(a){var z +for(z=this.a,z=P.ev(z,z.r,H.i(z,0));z.q();)z.d.abort()}},h9:{"^":"f:5;a,b,c", $1:function(a){var z,y,x,w,v,u,t -H.m(a,"$iam") +H.m(a,"$isam") z=this.a -y=W.ex(z.response)==null?W.fQ([],null,null):W.ex(z.response) +y=W.eV(z.response)==null?W.h5([],null,null):W.eV(z.response) x=new FileReader() w=[W.am] -v=new W.bo(x,"load",!1,w) +v=new W.bs(x,"load",!1,w) u=this.b t=this.c -v.gal(v).aw(new O.fS(x,u,z,t),null) -w=new W.bo(x,"error",!1,w) -w.gal(w).aw(new O.fT(u,t),null) -C.v.eP(x,H.m(y,"$idd"))}},fS:{"^":"h:4;a,b,c,d", +v.gam(v).az(new O.h7(x,u,z,t),null) +w=new W.bs(x,"error",!1,w) +w.gam(w).az(new O.h8(u,t),null) +C.v.f1(x,H.m(y,"$isdk"))}},h7:{"^":"f:5;a,b,c,d", $1:function(a){var z,y,x,w,v,u,t -H.m(a,"$iam") -z=H.d_(C.v.geV(this.a),"$iy") -y=[P.f,P.c] -y=P.dO(H.o([z],[y]),y) +H.m(a,"$isam") +z=H.db(C.v.gf8(this.a),"$isy") +y=[P.h,P.c] +y=P.dX(H.o([z],[y]),y) x=this.c w=x.status v=z.length u=this.d -t=C.w.geU(x) +t=C.w.gf6(x) x=x.statusText -y=new X.bL(B.lU(new Z.dg(y)),u,w,x,v,t,!1,!0) -y.c3(w,v,t,!1,!0,x,u) -this.b.a5(0,y)}},fT:{"^":"h:4;a,b", -$1:function(a){this.a.aj(new E.dj(J.ar(H.m(a,"$iam")),this.b.b),P.dM())}},fV:{"^":"h:4;a,b", -$1:function(a){H.m(a,"$iam") -this.a.aj(new E.dj("XMLHttpRequest error.",this.b.b),P.dM())}}}],["","",,Z,{"^":"",dg:{"^":"cy;a", -cT:function(){var z,y,x,w +y=new X.bP(B.md(new Z.dn(y)),u,w,x,v,t,!1,!0) +y.c6(w,v,t,!1,!0,x,u) +this.b.a6(0,y)}},h8:{"^":"f:5;a,b", +$1:function(a){this.a.ak(new E.dq(J.ar(H.m(a,"$isam")),this.b.b),P.cF())}},ha:{"^":"f:5;a,b", +$1:function(a){H.m(a,"$isam") +this.a.ak(new E.dq("XMLHttpRequest error.",this.b.b),P.cF())}}}],["","",,Z,{"^":"",dn:{"^":"cG;a", +cX:function(){var z,y,x,w z=P.y -y=new P.G(0,$.u,[z]) -x=new P.cE(y,[z]) -w=new P.jN(new Z.fZ(x),new Uint8Array(1024),0) -this.af(w.gea(w),!0,w.geh(w),x.gcE()) +y=new P.E(0,$.t,[z]) +x=new P.cN(y,[z]) +w=new P.k5(new Z.he(x),new Uint8Array(1024),0) +this.aa(w.gei(w),!0,w.ger(w),x.gcG()) return y}, -$aZ:function(){return[[P.f,P.c]]}, -$acy:function(){return[[P.f,P.c]]}},fZ:{"^":"h:46;a", -$1:function(a){return this.a.a5(0,new Uint8Array(H.bU(H.l(a,"$if",[P.c],"$af"))))}}}],["","",,E,{"^":"",dj:{"^":"b;S:a>,b", -h:function(a){return this.a}}}],["","",,O,{"^":"",iD:{"^":"fN;y,z,a,b,0c,d,e,f,r,x", -gbJ:function(a){if(this.gaT()==null||!this.gaT().c.a.ac("charset"))return this.y -return B.lR(this.gaT().c.a.j(0,"charset"))}, -see:function(a,b){var z,y,x -z=H.l(this.gbJ(this).bI(b),"$if",[P.c],"$af") -this.dq() -this.z=B.f2(z) -y=this.gaT() -if(y==null){z=this.gbJ(this) -x=P.d -this.r.l(0,"content-type",R.cq("text","plain",P.bE(["charset",z.gag(z)],x,x)).h(0))}else if(!y.c.a.ac("charset")){z=this.gbJ(this) -x=P.d -this.r.l(0,"content-type",y.ef(P.bE(["charset",z.gag(z)],x,x)).h(0))}}, -gaT:function(){var z=this.r.j(0,"content-type") +$asT:function(){return[[P.h,P.c]]}, +$ascG:function(){return[[P.h,P.c]]}},he:{"^":"f:31;a", +$1:function(a){return this.a.a6(0,new Uint8Array(H.bZ(H.l(a,"$ish",[P.c],"$ash"))))}}}],["","",,E,{"^":"",dq:{"^":"b;P:a>,b", +h:function(a){return this.a}}}],["","",,O,{"^":"",iV:{"^":"h2;y,z,a,b,0c,d,e,f,r,x", +gbM:function(a){if(this.gaV()==null||!this.gaV().c.a.a7("charset"))return this.y +return B.ma(this.gaV().c.a.j(0,"charset"))}, +seo:function(a,b){var z,y,x +z=H.l(this.gbM(this).bL(b),"$ish",[P.c],"$ash") +this.du() +this.z=B.fB(z) +y=this.gaV() +if(y==null){z=this.gbM(this) +x=P.e +this.r.k(0,"content-type",R.cx("text","plain",P.bH(["charset",z.gah(z)],x,x)).h(0))}else if(!y.c.a.a7("charset")){z=this.gbM(this) +x=P.e +this.r.k(0,"content-type",y.ep(P.bH(["charset",z.gah(z)],x,x)).h(0))}}, +gaV:function(){var z=this.r.j(0,"content-type") if(z==null)return -return R.i7(z)}, -dq:function(){if(!this.x)return -throw H.a(P.ad("Can't modify a finalized Request."))}}}],["","",,U,{"^":"",bj:{"^":"dc;x,a,b,c,d,e,f,r",p:{ -iE:function(a){H.m(a,"$ibL") -return a.x.cT().aw(new U.iF(a),U.bj)}}},iF:{"^":"h:31;a", +return R.ir(z)}, +du:function(){if(!this.x)return +throw H.a(P.ae("Can't modify a finalized Request."))}}}],["","",,U,{"^":"",bm:{"^":"dj;x,a,b,c,d,e,f,r",p:{ +iW:function(a){H.m(a,"$isbP") +return a.x.cX().az(new U.iX(a),U.bm)}}},iX:{"^":"f:48;a", $1:function(a){var z,y,x,w,v,u -H.m(a,"$iy") +H.m(a,"$isy") z=this.a y=z.b x=z.a w=z.e z=z.c -v=B.f2(a) +v=B.fB(a) u=a.length -v=new U.bj(v,x,y,z,u,w,!1,!0) -v.c3(y,u,w,!1,!0,z,x) -return v}}}],["","",,X,{"^":"",bL:{"^":"dc;x,a,b,c,d,e,f,r"}}],["","",,B,{"^":"", -lR:function(a){var z=P.hn(a) +v=new U.bm(v,x,y,z,u,w,!1,!0) +v.c6(y,u,w,!1,!0,z,x) +return v}}}],["","",,X,{"^":"",bP:{"^":"dj;x,a,b,c,d,e,f,r"}}],["","",,B,{"^":"", +ma:function(a){var z +H.p(a) +z=P.hD(a) if(z!=null)return z -throw H.a(P.C('Unsupported encoding "'+H.e(a)+'".',null,null))}, -f2:function(a){var z -H.l(a,"$if",[P.c],"$af") -z=J.q(a) -if(!!z.$iy)return a -if(!!z.$idS){z=a.buffer +throw H.a(P.C('Unsupported encoding "'+H.d(a)+'".',null,null))}, +fB:function(a){var z +H.l(a,"$ish",[P.c],"$ash") +z=J.r(a) +if(!!z.$isy)return a +if(!!z.$iseb){z=a.buffer z.toString -return H.dD(z,0,null)}return new Uint8Array(H.bU(a))}, -lU:function(a){H.l(a,"$iZ",[[P.f,P.c]],"$aZ") -return a}}],["","",,Z,{"^":"",h2:{"^":"B;a,b,c,$ti", -$aR:function(a){return[P.d,a]}, -$aB:function(a){return[P.d,P.d,a]}, +return H.dN(z,0,null)}return new Uint8Array(H.bZ(a))}, +md:function(a){H.l(a,"$isT",[[P.h,P.c]],"$asT") +return a}}],["","",,Z,{"^":"",hi:{"^":"B;a,b,c,$ti", +$asS:function(a){return[P.e,a]}, +$asB:function(a){return[P.e,P.e,a]}, p:{ -h3:function(a,b){var z=P.d -z=new Z.h2(new Z.h4(),new Z.h5(),new H.aj(0,0,[z,[B.bg,z,b]]),[b]) -z.bB(0,a) -return z}}},h4:{"^":"h:5;", -$1:function(a){return H.r(a).toLowerCase()}},h5:{"^":"h:33;", -$1:function(a){return a!=null}}}],["","",,R,{"^":"",bG:{"^":"b;a,b,c", -eg:function(a,b,c,d,e){var z,y -z=P.d -H.l(c,"$iR",[z,z],"$aR") -y=P.i0(this.c,z,z) -y.bB(0,c) -return R.cq(this.a,this.b,y)}, -ef:function(a){return this.eg(!1,null,a,null,null)}, +hj:function(a,b){var z=P.e +z=new Z.hi(new Z.hk(),new Z.hl(),new H.ac(0,0,[z,[B.bj,z,b]]),[b]) +z.bE(0,a) +return z}}},hk:{"^":"f:6;", +$1:function(a){return H.p(a).toLowerCase()}},hl:{"^":"f:34;", +$1:function(a){return a!=null}}}],["","",,R,{"^":"",bK:{"^":"b;a,b,c", +eq:function(a,b,c,d,e){var z,y +z=P.e +H.l(c,"$isS",[z,z],"$asS") +y=P.ih(this.c,z,z) +y.bE(0,c) +return R.cx(this.a,this.b,y)}, +ep:function(a){return this.eq(!1,null,a,null,null)}, h:function(a){var z,y -z=new P.S("") +z=new P.U("") y=this.a z.a=y y+="/" z.a=y z.a=y+this.b y=this.c -y.a.I(0,H.j(new R.ia(z),{func:1,ret:-1,args:[H.i(y,0),H.i(y,1)]})) +y.a.J(0,H.j(new R.iu(z),{func:1,ret:-1,args:[H.i(y,0),H.i(y,1)]})) y=z.a return y.charCodeAt(0)==0?y:y}, p:{ -i7:function(a){return B.lW("media type",a,new R.i8(a),R.bG)}, -cq:function(a,b,c){var z,y,x,w +ir:function(a){return B.mf("media type",a,new R.is(a),R.bK)}, +cx:function(a,b,c){var z,y,x,w z=a.toLowerCase() y=b.toLowerCase() -x=P.d -w=c==null?P.cm(x,x):Z.h3(c,x) -return new R.bG(z,y,new P.jd(w,[x,x]))}}},i8:{"^":"h:34;a", +x=P.e +w=c==null?P.bG(x,x):Z.hj(c,x) +return new R.bK(z,y,new P.ec(w,[x,x]))}}},is:{"^":"f:35;a", $0:function(){var z,y,x,w,v,u,t,s,r,q,p,o z=this.a -y=new X.j_(null,z,0) -x=$.fr() -y.bb(x) -w=$.fq() -y.aD(w) -v=y.gbP().j(0,0) -y.aD("/") -y.aD(w) -u=y.gbP().j(0,0) -y.bb(x) -t=P.d -s=P.cm(t,t) -while(!0){t=C.a.at(";",z,y.c) +y=new X.jj(null,z,0) +x=$.$get$fD() +y.bd(x) +w=$.$get$fC() +y.aF(w) +v=y.gbS().j(0,0) +y.aF("/") +y.aF(w) +u=y.gbS().j(0,0) +y.bd(x) +t=P.e +s=P.bG(t,t) +while(!0){t=C.a.aw(";",z,y.c) y.d=t r=y.c y.e=r @@ -5132,16 +5185,16 @@ if(q){t=t.gu() y.c=t y.e=t}else t=r if(!q)break -t=x.at(0,z,t) +t=x.aw(0,z,t) y.d=t y.e=y.c if(t!=null){t=t.gu() y.c=t -y.e=t}y.aD(w) +y.e=t}y.aF(w) if(y.c!==y.e)y.d=null p=y.d.j(0,0) -y.aD("=") -t=w.at(0,z,y.c) +y.aF("=") +t=w.aw(0,z,y.c) y.d=t r=y.c y.e=r @@ -5151,378 +5204,430 @@ y.c=t y.e=t r=t}else t=r if(q){if(t!==r)y.d=null -o=y.d.j(0,0)}else o=N.lw(y,null) -t=x.at(0,z,y.c) +o=y.d.j(0,0)}else o=N.lP(y,null) +t=x.aw(0,z,y.c) y.d=t y.e=y.c if(t!=null){t=t.gu() y.c=t -y.e=t}s.l(0,p,o)}y.er() -return R.cq(v,u,s)}},ia:{"^":"h:35;a", +y.e=t}s.k(0,p,o)}y.eC() +return R.cx(v,u,s)}},iu:{"^":"f:36;a", $2:function(a,b){var z,y -H.r(a) -H.r(b) +H.p(a) +H.p(b) z=this.a -z.a+="; "+H.e(a)+"=" -y=$.fp().b -if(typeof b!=="string")H.t(H.O(b)) +z.a+="; "+H.d(a)+"=" +y=$.$get$fr().b +if(typeof b!=="string")H.v(H.O(b)) if(y.test(b)){z.a+='"' -y=$.fi() +y=$.$get$eX() b.toString -y=z.a+=H.eZ(b,y,H.j(new R.i9(),{func:1,ret:P.d,args:[P.ac]}),null) -z.a=y+'"'}else z.a+=H.e(b)}},i9:{"^":"h:14;", +y=z.a+=H.fw(b,y,H.j(new R.it(),{func:1,ret:P.e,args:[P.ad]}),null) +z.a=y+'"'}else z.a+=H.d(b)}},it:{"^":"f:13;", $1:function(a){return C.a.t("\\",a.j(0,0))}}}],["","",,N,{"^":"", -lw:function(a,b){var z -a.cG($.fm(),"quoted string") -z=a.gbP().j(0,0) -return H.eZ(J.bx(z,1,z.length-1),$.fl(),H.j(new N.lx(),{func:1,ret:P.d,args:[P.ac]}),null)}, -lx:{"^":"h:14;", +lP:function(a,b){var z +a.cI($.$get$f4(),"quoted string") +z=a.gbS().j(0,0) +return H.fw(J.bz(z,1,z.length-1),$.$get$f3(),H.j(new N.lQ(),{func:1,ret:P.e,args:[P.ad]}),null)}, +lQ:{"^":"f:13;", $1:function(a){return a.j(0,1)}}}],["","",,B,{"^":"", -lW:function(a,b,c,d){var z,y,x,w,v +mf:function(a,b,c,d){var z,y,x,w,v H.j(c,{func:1,ret:d}) try{x=c.$0() return x}catch(w){x=H.P(w) -v=J.q(x) -if(!!v.$ibJ){z=x -throw H.a(G.iO("Invalid "+a+": "+z.a,z.b,J.da(z)))}else if(!!v.$icb){y=x -throw H.a(P.C("Invalid "+a+' "'+b+'": '+J.fz(y),J.da(y),J.fA(y)))}else throw w}}}],["","",,D,{"^":"", -eO:function(){var z,y,x,w -z=P.cB() -if(J.Q(z,$.ey))return $.cN -$.ey=z -if($.d4()==$.b9()){y=z.cQ(".").h(0) -$.cN=y -return y}else{x=z.bZ() -w=x.length-1 -y=w===0?x:C.a.k(x,0,w) -$.cN=y +v=J.r(x) +if(!!v.$isbN){z=x +throw H.a(G.j7("Invalid "+a+": "+z.gdK(),z.ge5(),J.dh(z)))}else if(!!v.$isci){y=x +throw H.a(P.C("Invalid "+a+' "'+b+'": '+J.fN(y),J.dh(y),J.fO(y)))}else throw w}}}],["","",,N,{"^":"",bi:{"^":"b;a,b,0c,d,e,0f", +gcK:function(){var z,y,x +z=this.b +y=z==null||z.a==="" +x=this.a +return y?x:z.gcK()+"."+x}, +gcP:function(){if($.fm){var z=this.b +if(z!=null)return z.gcP()}return $.ls}, +eR:function(a,b,c,d,e){var z,y,x,w +z=a.b +if(z>=this.gcP().b){y=$.m9.b +if(z>=y){d=P.cF() +c="autogenerated stack trace for "+a.h(0)+" "+b}e=$.t +z=this.gcK() +y=Date.now() +x=$.dI +$.dI=x+1 +if($.fm)for(w=this;w!=null;)w=w.b +else $.$get$dK().dX(new N.im(a,b,null,z,new P.cd(y,!1),x,c,d,e))}}, +eQ:function(a,b,c,d){return this.eR(a,b,c,d,null)}, +dX:function(a){}, +p:{ +bI:function(a){return $.$get$dJ().f_(a,new N.io(a))}}},io:{"^":"f:38;a", +$0:function(){var z,y,x,w,v,u +z=this.a +if(C.a.M(z,"."))H.v(P.I("name shouldn't start with a '.'")) +y=C.a.bR(z,".") +if(y===-1)x=z!==""?N.bI(""):null +else{x=N.bI(C.a.l(z,0,y)) +z=C.a.F(z,y+1)}w=P.e +v=N.bi +u=new H.ac(0,0,[w,v]) +w=new N.bi(z,x,u,new P.ec(u,[w,v])) +if(x!=null)x.d.k(0,z,w) +return w}},bh:{"^":"b;a,b", +I:function(a,b){if(b==null)return!1 +return b instanceof N.bh&&this.b===b.b}, +C:function(a,b){return C.c.C(this.b,H.m(b,"$isbh").b)}, +gA:function(a){return this.b}, +h:function(a){return this.a}},im:{"^":"b;a,P:b>,c,d,e,f,r,x,y", +h:function(a){return"["+this.a.a+"] "+this.d+": "+H.d(this.b)}}}],["","",,D,{"^":"", +fj:function(){var z,y,x,w,v +z=P.cK() +if(J.R(z,$.eW))return $.cY +$.eW=z +y=$.$get$cH() +x=$.$get$aZ() +if(y==null?x==null:y===x){y=z.cU(".").h(0) +$.cY=y +return y}else{w=z.c1() +v=w.length-1 +y=v===0?w:C.a.l(w,0,v) +$.cY=y return y}}}],["","",,M,{"^":"", -eC:function(a){if(!!J.q(a).$ibP)return a -throw H.a(P.aS(a,"uri","Value must be a String or a Uri"))}, -eJ:function(a,b){var z,y,x,w,v,u,t,s -z=P.d -H.l(b,"$if",[z],"$af") +f2:function(a){if(!!J.r(a).$isbT)return a +throw H.a(P.bc(a,"uri","Value must be a String or a Uri"))}, +fd:function(a,b){var z,y,x,w,v,u,t,s +z=P.e +H.l(b,"$ish",[z],"$ash") for(y=b.length,x=1;x=1;y=w){w=y-1 -if(b[w]!=null)break}v=new P.S("") +if(b[w]!=null)break}v=new P.U("") u=a+"(" v.a=u -t=H.ae(b,0,y,H.i(b,0)) +t=H.af(b,0,y,H.i(b,0)) s=H.i(t,0) -z=u+new H.dC(t,H.j(new M.lb(),{func:1,ret:z,args:[s]}),[s,z]).b3(0,", ") +z=u+new H.dM(t,H.j(new M.lu(),{func:1,ret:z,args:[s]}),[s,z]).b5(0,", ") v.a=z v.a=z+("): part "+(x-1)+" was null, but part "+x+" was not.") -throw H.a(P.N(v.h(0)))}}, -he:{"^":"b;a,b", -e9:function(a,b,c,d,e,f,g,h){var z -M.eJ("absolute",H.o([b,c,d,e,f,g,h],[P.d])) +throw H.a(P.I(v.h(0)))}}, +hu:{"^":"b;a,b", +eh:function(a,b,c,d,e,f,g,h){var z +M.fd("absolute",H.o([b,c,d,e,f,g,h],[P.e])) z=this.a -z=z.P(b)>0&&!z.ae(b) +z=z.R(b)>0&&!z.ag(b) if(z)return b -z=D.eO() -return this.eB(0,z,b,c,d,e,f,g,h)}, -e8:function(a,b){return this.e9(a,b,null,null,null,null,null,null)}, -eB:function(a,b,c,d,e,f,g,h,i){var z,y -z=H.o([b,c,d,e,f,g,h,i],[P.d]) -M.eJ("join",z) +z=D.fj() +return this.eL(0,z,b,c,d,e,f,g,h)}, +eg:function(a,b){return this.eh(a,b,null,null,null,null,null,null)}, +eL:function(a,b,c,d,e,f,g,h,i){var z,y +z=H.o([b,c,d,e,f,g,h,i],[P.e]) +M.fd("join",z) y=H.i(z,0) -return this.eC(new H.dV(z,H.j(new M.hg(),{func:1,ret:P.H,args:[y]}),[y]))}, -eC:function(a){var z,y,x,w,v,u,t,s,r -H.l(a,"$ip",[P.d],"$ap") -for(z=H.i(a,0),y=H.j(new M.hf(),{func:1,ret:P.H,args:[z]}),x=a.gK(a),z=new H.dW(x,y,[z]),y=this.a,w=!1,v=!1,u="";z.q();){t=x.gB() -if(y.ae(t)&&v){s=X.bh(t,y) +return this.eM(new H.eg(z,H.j(new M.hw(),{func:1,ret:P.F,args:[y]}),[y]))}, +eM:function(a){var z,y,x,w,v,u,t,s,r +H.l(a,"$isq",[P.e],"$asq") +for(z=H.i(a,0),y=H.j(new M.hv(),{func:1,ret:P.F,args:[z]}),x=a.gK(a),z=new H.eh(x,y,[z]),y=this.a,w=!1,v=!1,u="";z.q();){t=x.gD() +if(y.ag(t)&&v){s=X.bk(t,y) r=u.charCodeAt(0)==0?u:u -u=C.a.k(r,0,y.av(r,!0)) +u=C.a.l(r,0,y.ay(r,!0)) s.b=u -if(y.aI(u))C.b.l(s.e,0,y.gai()) -u=s.h(0)}else if(y.P(t)>0){v=!y.ae(t) -u=H.e(t)}else{if(!(t.length>0&&y.bF(t[0])))if(w)u+=y.gai() -u+=H.e(t)}w=y.aI(t)}return u.charCodeAt(0)==0?u:u}, -c2:function(a,b){var z,y,x -z=X.bh(b,this.a) +if(y.aK(u))C.b.k(s.e,0,y.gaj()) +u=s.h(0)}else if(y.R(t)>0){v=!y.ag(t) +u=H.d(t)}else{if(!(t.length>0&&y.bI(t[0])))if(w)u+=y.gaj() +u+=H.d(t)}w=y.aK(t)}return u.charCodeAt(0)==0?u:u}, +c5:function(a,b){var z,y,x +z=X.bk(b,this.a) y=z.d x=H.i(y,0) -z.scN(P.co(new H.dV(y,H.j(new M.hh(),{func:1,ret:P.H,args:[x]}),[x]),!0,x)) +z.scR(P.cv(new H.eg(y,H.j(new M.hx(),{func:1,ret:P.F,args:[x]}),[x]),!0,x)) y=z.b -if(y!=null)C.b.cK(z.d,0,y) +if(y!=null)C.b.cO(z.d,0,y) return z.d}, -bR:function(a){var z -if(!this.dI(a))return a -z=X.bh(a,this.a) -z.bQ() +bU:function(a){var z +if(!this.dN(a))return a +z=X.bk(a,this.a) +z.bT() return z.h(0)}, -dI:function(a){var z,y,x,w,v,u,t,s,r,q +dN:function(a){var z,y,x,w,v,u,t,s,r,q z=this.a -y=z.P(a) -if(y!==0){if(z===$.bv())for(x=0;x0)return this.bR(a) -if(z.P(a)<=0||z.ae(a))a=this.e8(0,a) -if(z.P(a)<=0&&z.P(b)>0)throw H.a(X.dG('Unable to find a path to "'+a+'" from "'+H.e(b)+'".')) -x=X.bh(b,z) -x.bQ() -w=X.bh(a,z) -w.bQ() +y=z.R(a) +if(y<=0)return this.bU(a) +b=D.fj() +if(z.R(b)<=0&&z.R(a)>0)return this.bU(a) +if(z.R(a)<=0||z.ag(a))a=this.eg(0,a) +if(z.R(a)<=0&&z.R(b)>0)throw H.a(X.dQ('Unable to find a path to "'+a+'" from "'+H.d(b)+'".')) +x=X.bk(b,z) +x.bT() +w=X.bk(a,z) +w.bT() y=x.d -if(y.length>0&&J.Q(y[0],"."))return w.h(0) +if(y.length>0&&J.R(y[0],"."))return w.h(0) y=x.b v=w.b -if(y!=v)y=y==null||v==null||!z.bU(y,v) +if(y!=v)y=y==null||v==null||!z.bX(y,v) else y=!1 if(y)return w.h(0) while(!0){y=x.d if(y.length>0){v=w.d -y=v.length>0&&z.bU(y[0],v[0])}else y=!1 +y=v.length>0&&z.bX(y[0],v[0])}else y=!1 if(!y)break -C.b.b5(x.d,0) -C.b.b5(x.e,1) -C.b.b5(w.d,0) -C.b.b5(w.e,1)}y=x.d -if(y.length>0&&J.Q(y[0],".."))throw H.a(X.dG('Unable to find a path to "'+a+'" from "'+H.e(b)+'".')) -y=P.d -C.b.bN(w.d,0,P.cn(x.d.length,"..",!1,y)) -C.b.l(w.e,0,"") -C.b.bN(w.e,1,P.cn(x.d.length,z.gai(),!1,y)) +C.b.b7(x.d,0) +C.b.b7(x.e,1) +C.b.b7(w.d,0) +C.b.b7(w.e,1)}y=x.d +if(y.length>0&&J.R(y[0],".."))throw H.a(X.dQ('Unable to find a path to "'+a+'" from "'+H.d(b)+'".')) +y=P.e +C.b.bQ(w.d,0,P.cu(x.d.length,"..",!1,y)) +C.b.k(w.e,0,"") +C.b.bQ(w.e,1,P.cu(x.d.length,z.gaj(),!1,y)) z=w.d y=z.length if(y===0)return"." -if(y>1&&J.Q(C.b.ga7(z),".")){C.b.aK(w.d) +if(y>1&&J.R(C.b.ga9(z),".")){C.b.aM(w.d) z=w.e -C.b.aK(z) -C.b.aK(z) +C.b.aM(z) +C.b.aM(z) C.b.m(z,"")}w.b="" -w.cP() +w.cT() return w.h(0)}, -eQ:function(a){return this.eR(a,null)}, -cO:function(a){var z,y,x -z=M.eC(a) -if(z.gO()==="file"&&this.a==$.b9())return z.h(0) -else if(z.gO()!=="file"&&z.gO()!==""&&this.a!=$.b9())return z.h(0) -y=this.bR(this.a.bS(M.eC(z))) -x=this.eQ(y) -return this.c2(0,x).length>this.c2(0,y).length?y:x}}, -hg:{"^":"h:11;", -$1:function(a){return H.r(a)!=null}}, -hf:{"^":"h:11;", -$1:function(a){return H.r(a)!==""}}, -hh:{"^":"h:11;", -$1:function(a){return H.r(a).length!==0}}, -lb:{"^":"h:5;", -$1:function(a){H.r(a) -return a==null?"null":'"'+a+'"'}}}],["","",,B,{"^":"",cf:{"^":"j3;", -d_:function(a){var z,y -z=this.P(a) -if(z>0)return J.bx(a,0,z) -if(this.ae(a)){if(0>=a.length)return H.k(a,0) +f2:function(a){return this.f3(a,null)}, +cS:function(a){var z,y,x,w,v +z=M.f2(a) +if(z.gO()==="file"){y=this.a +x=$.$get$aZ() +x=y==null?x==null:y===x +y=x}else y=!1 +if(y)return z.h(0) +else{if(z.gO()!=="file")if(z.gO()!==""){y=this.a +x=$.$get$aZ() +x=y==null?x!=null:y!==x +y=x}else y=!1 +else y=!1 +if(y)return z.h(0)}w=this.bU(this.a.bV(M.f2(z))) +v=this.f2(w) +return this.c5(0,v).length>this.c5(0,w).length?w:v}}, +hw:{"^":"f:10;", +$1:function(a){return H.p(a)!=null}}, +hv:{"^":"f:10;", +$1:function(a){return H.p(a)!==""}}, +hx:{"^":"f:10;", +$1:function(a){return H.p(a).length!==0}}, +lu:{"^":"f:6;", +$1:function(a){H.p(a) +return a==null?"null":'"'+a+'"'}}}],["","",,B,{"^":"",cm:{"^":"jn;", +d4:function(a){var z,y +z=this.R(a) +if(z>0)return J.bz(a,0,z) +if(this.ag(a)){if(0>=a.length)return H.k(a,0) y=a[0]}else y=null return y}, -bU:function(a,b){return a==b}}}],["","",,X,{"^":"",ii:{"^":"b;a,b,c,d,e", -scN:function(a){this.d=H.l(a,"$if",[P.d],"$af")}, -sd0:function(a){this.e=H.l(a,"$if",[P.d],"$af")}, -cP:function(){var z,y +bX:function(a,b){return H.p(a)==H.p(b)}}}],["","",,X,{"^":"",iB:{"^":"b;a,b,c,d,e", +scR:function(a){this.d=H.l(a,"$ish",[P.e],"$ash")}, +sd5:function(a){this.e=H.l(a,"$ish",[P.e],"$ash")}, +cT:function(){var z,y while(!0){z=this.d -if(!(z.length!==0&&J.Q(C.b.ga7(z),"")))break -C.b.aK(this.d) -C.b.aK(this.e)}z=this.e +if(!(z.length!==0&&J.R(C.b.ga9(z),"")))break +C.b.aM(this.d) +C.b.aM(this.e)}z=this.e y=z.length -if(y>0)C.b.l(z,y-1,"")}, -eJ:function(a){var z,y,x,w,v,u,t,s,r -z=P.d +if(y>0)C.b.k(z,y-1,"")}, +eV:function(a){var z,y,x,w,v,u,t,s,r +z=P.e y=H.o([],[z]) -for(x=this.d,w=x.length,v=0,u=0;u0)y.pop() +for(x=this.d,w=x.length,v=0,u=0;u0)y.pop() else ++v -else C.b.m(y,t)}if(this.b==null)C.b.bN(y,0,P.cn(v,"..",!1,z)) +else C.b.m(y,t)}if(this.b==null)C.b.bQ(y,0,P.cu(v,"..",!1,z)) if(y.length===0&&this.b==null)C.b.m(y,".") -r=P.dz(y.length,new X.ij(this),!0,z) +r=P.dG(y.length,new X.iC(this),!0,z) z=this.b -C.b.cK(r,0,z!=null&&y.length>0&&this.a.aI(z)?this.a.gai():"") -this.scN(y) -this.sd0(r) +C.b.cO(r,0,z!=null&&y.length>0&&this.a.aK(z)?this.a.gaj():"") +this.scR(y) +this.sd5(r) z=this.b -if(z!=null&&this.a===$.bv()){z.toString -this.b=H.aP(z,"/","\\")}this.cP()}, -bQ:function(){return this.eJ(!1)}, +if(z!=null&&this.a===$.$get$bp()){z.toString +this.b=H.aQ(z,"/","\\")}this.cT()}, +bT:function(){return this.eV(!1)}, h:function(a){var z,y,x z=this.b z=z!=null?z:"" for(y=0;y=x.length)return H.k(x,y) -x=z+H.e(x[y]) +x=z+H.d(x[y]) z=this.d if(y>=z.length)return H.k(z,y) -z=x+H.e(z[y])}z+=H.e(C.b.ga7(this.e)) +z=x+H.d(z[y])}z+=H.d(C.b.ga9(this.e)) return z.charCodeAt(0)==0?z:z}, p:{ -bh:function(a,b){var z,y,x,w,v,u,t -z=b.d_(a) -y=b.ae(a) -if(z!=null)a=J.fG(a,z.length) -x=[P.d] +bk:function(a,b){var z,y,x,w,v,u,t +z=b.d4(a) +y=b.ag(a) +if(z!=null)a=J.fW(a,z.length) +x=[P.e] w=H.o([],x) v=H.o([],x) x=a.length -if(x!==0&&b.a6(C.a.n(a,0))){if(0>=x)return H.k(a,0) +if(x!==0&&b.a8(C.a.n(a,0))){if(0>=x)return H.k(a,0) C.b.m(v,a[0]) u=1}else{C.b.m(v,"") -u=0}for(t=u;t", +C.b.m(v,"")}return new X.iB(b,z,y,w,v)}}},iC:{"^":"f:40;a", +$1:function(a){return this.a.a.gaj()}}}],["","",,X,{"^":"",iD:{"^":"b;P:a>", h:function(a){return"PathException: "+this.a}, p:{ -dG:function(a){return new X.ik(a)}}}}],["","",,O,{"^":"", -j4:function(){var z,y,x,w,v,u,t,s,r,q,p -if(P.cB().gO()!=="file")return $.b9() -z=P.cB() -if(!C.a.b1(z.gT(z),"/"))return $.b9() -y=P.eq(null,0,0) -x=P.er(null,0,0) -w=P.en(null,0,0,!1) -v=P.ep(null,0,0,null) -u=P.em(null,0,0) -t=P.cH(null,y) +dQ:function(a){return new X.iD(a)}}}}],["","",,O,{"^":"", +jo:function(){var z,y,x,w,v,u,t,s,r,q,p +if(P.cK().gO()!=="file")return $.$get$aZ() +z=P.cK() +if(!C.a.b3(z.gT(z),"/"))return $.$get$aZ() +y=P.eN(null,0,0) +x=P.eO(null,0,0) +w=P.eK(null,0,0,!1) +v=P.eM(null,0,0,null) +u=P.eJ(null,0,0) +t=P.cS(null,y) s=y==="file" if(w==null)z=x.length!==0||t!=null||s else z=!1 if(z)w="" z=w==null r=!z -q=P.eo("a/b",0,3,null,y,r) +q=P.eL("a/b",0,3,null,y,r) p=y.length===0 -if(p&&z&&!C.a.N(q,"/"))q=P.cI(q,!p||r) +if(p&&z&&!C.a.M(q,"/"))q=P.cT(q,!p||r) else q=P.ay(q) -if(new P.bp(y,x,z&&C.a.N(q,"//")?"":w,t,q,v,u).bZ()==="a\\b")return $.bv() -return $.f5()}, -j3:{"^":"b;", -h:function(a){return this.gag(this)}}}],["","",,E,{"^":"",im:{"^":"cf;ag:a>,ai:b<,c,d,e,f,0r", -bF:function(a){return C.a.ar(a,"/")}, -a6:function(a){return a===47}, -aI:function(a){var z=a.length -return z!==0&&J.bw(a,z-1)!==47}, -av:function(a,b){if(a.length!==0&&J.c2(a,0)===47)return 1 +if(new P.bt(y,x,z&&C.a.M(q,"//")?"":w,t,q,v,u).c1()==="a\\b")return $.$get$bp() +return $.$get$dZ()}, +jn:{"^":"b;", +h:function(a){return this.gah(this)}}}],["","",,E,{"^":"",iF:{"^":"cm;ah:a>,aj:b<,c,d,e,f,0r", +bI:function(a){return C.a.au(a,"/")}, +a8:function(a){return a===47}, +aK:function(a){var z=a.length +return z!==0&&J.by(a,z-1)!==47}, +ay:function(a,b){if(a.length!==0&&J.c7(a,0)===47)return 1 return 0}, -P:function(a){return this.av(a,!1)}, -ae:function(a){return!1}, -bS:function(a){var z +R:function(a){return this.ay(a,!1)}, +ag:function(a){return!1}, +bV:function(a){var z if(a.gO()===""||a.gO()==="file"){z=a.gT(a) -return P.cJ(z,0,z.length,C.h,!1)}throw H.a(P.N("Uri "+a.h(0)+" must have scheme 'file:'."))}}}],["","",,F,{"^":"",jk:{"^":"cf;ag:a>,ai:b<,c,d,e,f,r", -bF:function(a){return C.a.ar(a,"/")}, -a6:function(a){return a===47}, -aI:function(a){var z=a.length +return P.cU(z,0,z.length,C.h,!1)}throw H.a(P.I("Uri "+a.h(0)+" must have scheme 'file:'."))}}}],["","",,F,{"^":"",jD:{"^":"cm;ah:a>,aj:b<,c,d,e,f,r", +bI:function(a){return C.a.au(a,"/")}, +a8:function(a){return a===47}, +aK:function(a){var z=a.length if(z===0)return!1 if(J.a6(a).v(a,z-1)!==47)return!0 -return C.a.b1(a,"://")&&this.P(a)===z}, -av:function(a,b){var z,y,x,w,v +return C.a.b3(a,"://")&&this.R(a)===z}, +ay:function(a,b){var z,y,x,w,v z=a.length if(z===0)return 0 if(J.a6(a).n(a,0)===47)return 1 for(y=0;y,ai:b<,c,d,e,f,r", -bF:function(a){return C.a.ar(a,"/")}, -a6:function(a){return a===47||a===92}, -aI:function(a){var z=a.length +R:function(a){return this.ay(a,!1)}, +ag:function(a){return a.length!==0&&J.c7(a,0)===47}, +bV:function(a){return J.ar(a)}}}],["","",,L,{"^":"",jP:{"^":"cm;ah:a>,aj:b<,c,d,e,f,r", +bI:function(a){return C.a.au(a,"/")}, +a8:function(a){return a===47||a===92}, +aK:function(a){var z=a.length if(z===0)return!1 -z=J.bw(a,z-1) +z=J.by(a,z-1) return!(z===47||z===92)}, -av:function(a,b){var z,y,x +ay:function(a,b){var z,y,x z=a.length if(z===0)return 0 y=J.a6(a).n(a,0) if(y===47)return 1 if(y===92){if(z<2||C.a.n(a,1)!==92)return 1 -x=C.a.am(a,"\\",2) -if(x>0){x=C.a.am(a,"\\",x+1) +x=C.a.an(a,"\\",2) +if(x>0){x=C.a.an(a,"\\",x+1) if(x>0)return x}return z}if(z<3)return 0 -if(!B.eR(y))return 0 +if(!B.fn(y))return 0 if(C.a.n(a,1)!==58)return 0 z=C.a.n(a,2) if(!(z===47||z===92))return 0 return 3}, -P:function(a){return this.av(a,!1)}, -ae:function(a){return this.P(a)===1}, -bS:function(a){var z,y -if(a.gO()!==""&&a.gO()!=="file")throw H.a(P.N("Uri "+a.h(0)+" must have scheme 'file:'.")) +R:function(a){return this.ay(a,!1)}, +ag:function(a){return this.R(a)===1}, +bV:function(a){var z,y +if(a.gO()!==""&&a.gO()!=="file")throw H.a(P.I("Uri "+a.h(0)+" must have scheme 'file:'.")) z=a.gT(a) if(a.ga1(a)===""){y=z.length -if(y>=3&&C.a.N(z,"/")&&B.eS(z,1)){P.dJ(0,0,y,"startIndex",null) -z=H.lS(z,"/","",0)}}else z="\\\\"+H.e(a.ga1(a))+z -y=H.aP(z,"/","\\") -return P.cJ(y,0,y.length,C.h,!1)}, -ei:function(a,b){var z +if(y>=3&&C.a.M(z,"/")&&B.fo(z,1)){P.dT(0,0,y,"startIndex",null) +z=H.mb(z,"/","",0)}}else z="\\\\"+H.d(a.ga1(a))+z +y=H.aQ(z,"/","\\") +return P.cU(y,0,y.length,C.h,!1)}, +es:function(a,b){var z if(a===b)return!0 if(a===47)return b===92 if(a===92)return b===47 if((a^b)!==32)return!1 z=a|32 return z>=97&&z<=122}, -bU:function(a,b){var z,y,x +bX:function(a,b){var z,y,x +H.p(a) +H.p(b) if(a==b)return!0 z=a.length if(z!==b.length)return!1 -for(y=J.a6(b),x=0;x=65&&a<=90))z=a>=97&&a<=122 else z=!0 return z}, -eS:function(a,b){var z,y +fo:function(a,b){var z,y z=a.length y=b+2 if(z=y)return H.k(z,u) t=z[u]!==10}else t=!0 if(t)v=10}if(v===10)C.b.m(x,w+1)}}, -ax:function(a){var z -if(a<0)throw H.a(P.M("Offset may not be negative, was "+a+".")) -else if(a>this.c.length)throw H.a(P.M("Offset "+a+" must not be greater than the number of characters in the file, "+this.gi(this)+".")) +aA:function(a){var z +if(a<0)throw H.a(P.N("Offset may not be negative, was "+a+".")) +else if(a>this.c.length)throw H.a(P.N("Offset "+a+" must not be greater than the number of characters in the file, "+this.gi(this)+".")) z=this.b -if(a=C.b.ga7(z))return z.length-1 -if(this.dD(a))return this.d -z=this.dk(a)-1 +if(a=C.b.ga9(z))return z.length-1 +if(this.dH(a))return this.d +z=this.dq(a)-1 this.d=z return z}, -dD:function(a){var z,y,x,w +dH:function(a){var z,y,x,w z=this.d if(z==null)return!1 y=this.b @@ -5530,7 +5635,7 @@ if(z>>>0!==z||z>=y.length)return H.k(y,z) if(a=x)return H.k(y,w) w=a=y)return H.k(z,v) if(z[v]>a)x=v else w=v+1}return x}, -cY:function(a,b){var z -if(a<0)throw H.a(P.M("Offset may not be negative, was "+a+".")) -else if(a>this.c.length)throw H.a(P.M("Offset "+a+" must be not be greater than the number of characters in the file, "+this.gi(this)+".")) -b=this.ax(a) +d2:function(a,b){var z +if(a<0)throw H.a(P.N("Offset may not be negative, was "+a+".")) +else if(a>this.c.length)throw H.a(P.N("Offset "+a+" must be not be greater than the number of characters in the file, "+this.gi(this)+".")) +b=this.aA(a) z=C.b.j(this.b,b) -if(z>a)throw H.a(P.M("Line "+H.e(b)+" comes after offset "+a+".")) +if(z>a)throw H.a(P.N("Line "+H.d(b)+" comes after offset "+a+".")) return a-z}, -ba:function(a){return this.cY(a,null)}, -cZ:function(a,b){var z,y,x,w -if(typeof a!=="number")return a.D() -if(a<0)throw H.a(P.M("Line may not be negative, was "+a+".")) +bc:function(a){return this.d2(a,null)}, +d3:function(a,b){var z,y,x,w +if(typeof a!=="number")return a.C() +if(a<0)throw H.a(P.N("Line may not be negative, was "+a+".")) else{z=this.b y=z.length -if(a>=y)throw H.a(P.M("Line "+a+" must be less than the number of lines in the file, "+this.geD()+"."))}x=z[a] +if(a>=y)throw H.a(P.N("Line "+a+" must be less than the number of lines in the file, "+this.geN()+"."))}x=z[a] if(x<=this.c.length){w=a+1 z=w=z[w]}else z=!0 -if(z)throw H.a(P.M("Line "+a+" doesn't have 0 columns.")) +if(z)throw H.a(P.N("Line "+a+" doesn't have 0 columns.")) return x}, -aP:function(a){return this.cZ(a,null)}},hq:{"^":"iK;a,G:b>", -gC:function(){return this.a.a}, -gL:function(){return this.a.ax(this.b)}, -gR:function(){return this.a.ba(this.b)}, +aR:function(a){return this.d3(a,null)}},hG:{"^":"j3;a,G:b>", +gE:function(){return this.a.a}, +gL:function(){return this.a.aA(this.b)}, +gS:function(){return this.a.bc(this.b)}, p:{ -ca:function(a,b){if(b<0)H.t(P.M("Offset may not be negative, was "+b+".")) -else if(b>a.c.length)H.t(P.M("Offset "+b+" must not be greater than the number of characters in the file, "+a.gi(a)+".")) -return new Y.hq(a,b)}}},jT:{"^":"cw;a,b,c", -gC:function(){return this.a.a}, +ch:function(a,b){if(b<0)H.v(P.N("Offset may not be negative, was "+b+".")) +else if(b>a.c.length)H.v(P.N("Offset "+b+" must not be greater than the number of characters in the file, "+a.gi(a)+".")) +return new Y.hG(a,b)}}},kb:{"^":"cD;a,b,c", +gE:function(){return this.a.a}, gi:function(a){return this.c-this.b}, -gw:function(a){return Y.ca(this.a,this.b)}, -gu:function(){return Y.ca(this.a,this.c)}, -gM:function(a){return P.aI(C.o.aa(this.a.c,this.b,this.c),0,null)}, +gw:function(a){return Y.ch(this.a,this.b)}, +gu:function(){return Y.ch(this.a,this.c)}, +gN:function(a){return P.aJ(C.o.ad(this.a.c,this.b,this.c),0,null)}, gY:function(){var z,y,x,w z=this.a y=this.c -x=z.ax(y) -if(z.ba(y)===0&&x!==0){if(y-this.b===0){if(x===z.b.length-1)z="" -else{w=z.aP(x) +x=z.aA(y) +if(z.bc(y)===0&&x!==0){if(y-this.b===0){if(x===z.b.length-1)z="" +else{w=z.aR(x) if(typeof x!=="number")return x.t() -z=P.aI(C.o.aa(z.c,w,z.aP(x+1)),0,null)}return z}}else if(x===z.b.length-1)y=z.c.length +z=P.aJ(C.o.ad(z.c,w,z.aR(x+1)),0,null)}return z}}else if(x===z.b.length-1)y=z.c.length else{if(typeof x!=="number")return x.t() -y=z.aP(x+1)}return P.aI(C.o.aa(z.c,z.aP(z.ax(this.b)),y),0,null)}, -J:function(a,b){if(b==null)return!1 -if(!J.q(b).$ihs)return this.da(0,b) -return this.b===b.b&&this.c===b.c&&J.Q(this.a.a,b.a.a)}, -gA:function(a){return Y.cw.prototype.gA.call(this,this)}, -$ihs:1, -$icx:1}}],["","",,U,{"^":"",hv:{"^":"b;a,b,c,d,e", -ex:function(){var z,y,x,w,v,u,t,s,r,q,p +y=z.aR(x+1)}return P.aJ(C.o.ad(z.c,z.aR(z.aA(this.b)),y),0,null)}, +I:function(a,b){if(b==null)return!1 +if(!J.r(b).$ishI)return this.dg(0,b) +return this.b===b.b&&this.c===b.c&&J.R(this.a.a,b.a.a)}, +gA:function(a){return Y.cD.prototype.gA.call(this,this)}, +$ishI:1, +$iscE:1}}],["","",,U,{"^":"",hL:{"^":"b;a,b,c,d,e", +eH:function(){var z,y,x,w,v,u,t,s,r,q,p $.ap.toString -this.cz("\u2577") +this.cB("\u2577") z=this.e z.a+="\n" y=this.a -x=B.bW(y.gY(),y.gM(y),y.gw(y).gR()) +x=B.c1(y.gY(),y.gN(y),y.gw(y).gS()) w=y.gY() -if(typeof x!=="number")return x.ay() -if(x>0){v=C.a.k(w,0,x-1).split("\n") +if(typeof x!=="number")return x.as() +if(x>0){v=C.a.l(w,0,x-1).split("\n") u=y.gw(y).gL() t=v.length if(typeof u!=="number")return u.V() s=u-t for(u=this.c,r=0;rp+1){if(0>=v.length)return H.k(v,-1) -v.pop()}this.e4(C.b.gal(v)) -if(this.c){this.e5(H.ae(v,1,null,H.i(v,0)).eZ(0,p-1)) +if(J.fM(C.b.ga9(v))&&v.length>p+1){if(0>=v.length)return H.k(v,-1) +v.pop()}this.ec(C.b.gam(v)) +if(this.c){this.ed(H.af(v,1,null,H.i(v,0)).fc(0,p-1)) if(p<0||p>=v.length)return H.k(v,p) -this.e6(v[p])}this.e7(H.ae(v,p+1,null,H.i(v,0))) +this.ee(v[p])}this.ef(H.af(v,p+1,null,H.i(v,0))) $.ap.toString -this.cz("\u2575") +this.cB("\u2575") z=z.a return z.charCodeAt(0)==0?z:z}, -e4:function(a){var z,y,x,w,v,u,t,s,r,q +ec:function(a){var z,y,x,w,v,u,t,s,r,q z={} +H.p(a) y=this.a -this.aC(y.gw(y).gL()) -x=y.gw(y).gR() +this.aE(y.gw(y).gL()) +x=y.gw(y).gS() w=a.length v=Math.min(x,w) z.a=v @@ -5642,646 +5748,637 @@ x=x.gG(x) y=y.gw(y) u=Math.min(v+x-y.gG(y),w) z.b=u -t=J.bx(a,0,v) +t=J.bz(a,0,v) y=this.c -if(y&&this.dE(t)){z=this.e +if(y&&this.dI(t)){z=this.e z.a+=" " -this.ab(new U.hz(this,a)) +this.ae(new U.hP(this,a)) z.a+="\n" return}x=this.e x.a+=C.a.U(" ",y?3:1) this.a0(t) -s=C.a.k(a,v,u) -this.ab(new U.hA(this,s)) +s=C.a.l(a,v,u) +this.ae(new U.hQ(this,s)) this.a0(C.a.F(a,u)) x.a+="\n" -r=this.bj(t) -q=this.bj(s) +r=this.bm(t) +q=this.bm(s) v+=r*3 z.a=v z.b=u+(r+q)*3 -this.cw() +this.cA() if(y){x.a+=" " -this.ab(new U.hB(z,this))}else{x.a+=C.a.U(" ",v+1) -this.ab(new U.hC(z,this))}x.a+="\n"}, -e5:function(a){var z,y,x,w -H.l(a,"$ip",[P.d],"$ap") +this.ae(new U.hR(z,this))}else{x.a+=C.a.U(" ",v+1) +this.ae(new U.hS(z,this))}x.a+="\n"}, +ed:function(a){var z,y,x,w +H.l(a,"$isq",[P.e],"$asq") z=this.a z=z.gw(z).gL() if(typeof z!=="number")return z.t() y=z+1 for(z=new H.ak(a,a.gi(a),0,[H.i(a,0)]),x=this.e;z.q();){w=z.d -this.aC(y) +this.aE(y) x.a+=" " -this.ab(new U.hD(this,w)) +this.ae(new U.hT(this,w)) x.a+="\n";++y}}, -e6:function(a){var z,y,x,w,v +ee:function(a){var z,y,x,w,v z={} +H.p(a) y=this.a -this.aC(y.gu().gL()) -y=y.gu().gR() +this.aE(y.gu().gL()) +y=y.gu().gS() x=a.length w=Math.min(y,x) z.a=w if(this.c&&w===x){z=this.e z.a+=" " -this.ab(new U.hE(this,a)) +this.ae(new U.hU(this,a)) z.a+="\n" return}y=this.e y.a+=" " -v=J.bx(a,0,w) -this.ab(new U.hF(this,v)) +v=J.bz(a,0,w) +this.ae(new U.hV(this,v)) this.a0(C.a.F(a,w)) y.a+="\n" -z.a=w+this.bj(v)*3 -this.cw() +z.a=w+this.bm(v)*3 +this.cA() y.a+=" " -this.ab(new U.hG(z,this)) +this.ae(new U.hW(z,this)) y.a+="\n"}, -e7:function(a){var z,y,x,w,v -H.l(a,"$ip",[P.d],"$ap") +ef:function(a){var z,y,x,w,v +H.l(a,"$isq",[P.e],"$asq") z=this.a.gu().gL() if(typeof z!=="number")return z.t() y=z+1 for(z=new H.ak(a,a.gi(a),0,[H.i(a,0)]),x=this.e,w=this.c;z.q();){v=z.d -this.aC(y) +this.aE(y) x.a+=C.a.U(" ",w?3:1) this.a0(v) x.a+="\n";++y}}, a0:function(a){var z,y,x -for(a.toString,z=new H.aE(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=this.e;z.q();){x=z.d +for(a.toString,z=new H.aF(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=this.e;z.q();){x=z.d if(x===9)y.a+=C.a.U(" ",4) -else y.a+=H.J(x)}}, -bA:function(a,b){this.cc(new U.hH(this,b,a),"\x1b[34m")}, -cz:function(a){return this.bA(a,null)}, -aC:function(a){return this.bA(null,a)}, -cw:function(){return this.bA(null,null)}, -bj:function(a){var z,y -for(z=new H.aE(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=0;z.q();)if(z.d===9)++y +else y.a+=H.K(x)}}, +bD:function(a,b){this.cf(new U.hX(this,b,a),"\x1b[34m")}, +cB:function(a){return this.bD(a,null)}, +aE:function(a){return this.bD(null,a)}, +cA:function(){return this.bD(null,null)}, +bm:function(a){var z,y +for(z=new H.aF(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=0;z.q();)if(z.d===9)++y return y}, -dE:function(a){var z,y -for(z=new H.aE(a),z=new H.ak(z,z.gi(z),0,[P.c]);z.q();){y=z.d +dI:function(a){var z,y +for(z=new H.aF(a),z=new H.ak(z,z.gi(z),0,[P.c]);z.q();){y=z.d if(y!==32&&y!==9)return!1}return!0}, -cc:function(a,b){var z,y +cf:function(a,b){var z,y H.j(a,{func:1,ret:-1}) z=this.b y=z!=null if(y){z=b==null?z:b this.e.a+=z}a.$0() if(y)this.e.a+="\x1b[0m"}, -ab:function(a){return this.cc(a,null)}, +ae:function(a){return this.cf(a,null)}, p:{ -hx:function(a){var z,y,x,w,v,u,t -z=a.gM(a) -if(!C.a.ar(z,"\r\n"))return a +hN:function(a){var z,y,x,w,v,u,t +z=a.gN(a) +if(!C.a.au(z,"\r\n"))return a y=a.gu() x=y.gG(y) for(y=z.length-1,w=0;w,L:c<,R:d<", -bH:function(a){var z=this.a -if(!J.Q(z,a.gC()))throw H.a(P.N('Source URLs "'+H.e(z)+'" and "'+H.e(a.gC())+"\" don't match.")) +z="\u2502"}x.a+=z}}}],["","",,V,{"^":"",bM:{"^":"b;E:a<,G:b>,L:c<,S:d<", +bK:function(a){var z=this.a +if(!J.R(z,a.gE()))throw H.a(P.I('Source URLs "'+H.d(z)+'" and "'+H.d(a.gE())+"\" don't match.")) return Math.abs(this.b-a.gG(a))}, -J:function(a,b){if(b==null)return!1 -return!!J.q(b).$ibI&&J.Q(this.a,b.gC())&&this.b===b.gG(b)}, -gA:function(a){return J.aD(this.a)+this.b}, +I:function(a,b){if(b==null)return!1 +return!!J.r(b).$isbM&&J.R(this.a,b.gE())&&this.b===b.gG(b)}, +gA:function(a){return J.aE(this.a)+this.b}, h:function(a){var z,y -z="<"+new H.bO(H.cY(this)).h(0)+": "+this.b+" " +z="<"+new H.bS(H.d9(this)).h(0)+": "+this.b+" " y=this.a -return z+(H.e(y==null?"unknown source":y)+":"+(this.c+1)+":"+(this.d+1))+">"}, +return z+(H.d(y==null?"unknown source":y)+":"+(this.c+1)+":"+(this.d+1))+">"}, p:{ -bk:function(a,b,c,d){var z,y +bn:function(a,b,c,d){var z,y z=c==null y=z?0:c -if(a<0)H.t(P.M("Offset may not be negative, was "+a+".")) -else if(!z&&c<0)H.t(P.M("Line may not be negative, was "+H.e(c)+".")) -else if(b<0)H.t(P.M("Column may not be negative, was "+b+".")) -return new V.bI(d,a,y,b)}}}}],["","",,D,{"^":"",iK:{"^":"b;", -bH:function(a){if(!J.Q(this.a.a,a.gC()))throw H.a(P.N('Source URLs "'+H.e(this.gC())+'" and "'+H.e(a.gC())+"\" don't match.")) +if(a<0)H.v(P.N("Offset may not be negative, was "+a+".")) +else if(!z&&c<0)H.v(P.N("Line may not be negative, was "+H.d(c)+".")) +else if(b<0)H.v(P.N("Column may not be negative, was "+b+".")) +return new V.bM(d,a,y,b)}}}}],["","",,D,{"^":"",j3:{"^":"b;", +bK:function(a){if(!J.R(this.a.a,a.gE()))throw H.a(P.I('Source URLs "'+H.d(this.gE())+'" and "'+H.d(a.gE())+"\" don't match.")) return Math.abs(this.b-a.gG(a))}, -J:function(a,b){if(b==null)return!1 -return!!J.q(b).$ibI&&J.Q(this.a.a,b.gC())&&this.b===b.gG(b)}, -gA:function(a){return J.aD(this.a.a)+this.b}, +I:function(a,b){if(b==null)return!1 +return!!J.r(b).$isbM&&J.R(this.a.a,b.gE())&&this.b===b.gG(b)}, +gA:function(a){return J.aE(this.a.a)+this.b}, h:function(a){var z,y,x,w,v,u z=this.b -y="<"+new H.bO(H.cY(this)).h(0)+": "+z+" " +y="<"+new H.bS(H.d9(this)).h(0)+": "+z+" " x=this.a w=x.a -v=H.e(w==null?"unknown source":w)+":" -u=x.ax(z) +v=H.d(w==null?"unknown source":w)+":" +u=x.aA(z) if(typeof u!=="number")return u.t() -return y+(v+(u+1)+":"+(x.ba(z)+1))+">"}, -$ibI:1}}],["","",,V,{"^":"",iM:{"^":"cw;w:a>,u:b<,M:c>", -dd:function(a,b,c){var z,y,x +return y+(v+(u+1)+":"+(x.bc(z)+1))+">"}, +$isbM:1}}],["","",,V,{"^":"",j5:{"^":"cD;w:a>,u:b<,N:c>", +di:function(a,b,c){var z,y,x z=this.b y=this.a -if(!J.Q(z.gC(),y.gC()))throw H.a(P.N('Source URLs "'+H.e(y.gC())+'" and "'+H.e(z.gC())+"\" don't match.")) -else if(z.gG(z)'}, -$iiL:1}}],["","",,X,{"^":"",cx:{"^":"iM;d,a,b,c", +h:function(a){return"<"+new H.bS(H.d9(this)).h(0)+": from "+this.gw(this).h(0)+" to "+this.gu().h(0)+' "'+this.gN(this)+'">'}, +$isj4:1}}],["","",,X,{"^":"",cE:{"^":"j5;d,a,b,c", gY:function(){return this.d}, p:{ -bK:function(a,b,c,d){var z=new X.cx(d,a,b,c) -z.dd(a,b,c) -if(!C.a.ar(d,c))H.t(P.N('The context line "'+d+'" must contain "'+c+'".')) -if(B.bW(d,c,a.gR())==null)H.t(P.N('The span text "'+c+'" must start at column '+(a.gR()+1)+' in a line within "'+d+'".')) +bO:function(a,b,c,d){var z=new X.cE(d,a,b,c) +z.di(a,b,c) +if(!C.a.au(d,c))H.v(P.I('The context line "'+d+'" must contain "'+c+'".')) +if(B.c1(d,c,a.gS())==null)H.v(P.I('The span text "'+c+'" must start at column '+(a.gS()+1)+' in a line within "'+d+'".')) return z}}}}],["","",,B,{"^":"", -lt:function(a,b){var z,y -for(z=new H.aE(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=0;z.q();)if(z.d===b)++y +lM:function(a,b){var z,y +for(z=new H.aF(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=0;z.q();)if(z.d===b)++y return y}, -bW:function(a,b,c){var z,y,x -if(b.length===0)for(z=0;!0;){y=C.a.am(a,"\n",z) +c1:function(a,b,c){var z,y,x +if(b.length===0)for(z=0;!0;){y=C.a.an(a,"\n",z) if(y===-1)return a.length-z>=c?z:null if(y-z>=c)return z -z=y+1}y=C.a.bM(a,b) -for(;y!==-1;){x=y===0?0:C.a.b4(a,"\n",y-1)+1 +z=y+1}y=C.a.bP(a,b) +for(;y!==-1;){x=y===0?0:C.a.b6(a,"\n",y-1)+1 if(c===y-x)return x -y=C.a.am(a,b,y+1)}return}}],["","",,M,{"^":"",iP:{"^":"iT;a,b,c,0d,0e", -de:function(a){var z,y -z=F.ju().f1() -this.d=W.hp(a+"?sseClientId="+z,P.bE(["withCredentials",!0],P.d,null)) -this.e=a+"?sseClientId="+z -y=this.b -new P.cF(y,[H.i(y,0)]).eF(this.gdO(),this.gdN()) -C.u.cB(this.d,"message",this.gdM()) -C.u.cB(this.d,"control",this.gdL()) -y=W.L -W.cG(this.d,"error",H.j(new M.iR(this),{func:1,ret:-1,args:[y]}),!1,y)}, -a4:function(a){this.d.close() -this.a.a4(0) -this.b.a4(0) -this.c.a4(0)}, -fa:[function(a){var z=new P.cD([],[],!1).bG(H.d_(H.m(a,"$iL"),"$icr").data,!0) -if(J.Q(z,"close"))this.a4(0) -else throw H.a(P.A('Illegal Control Message "'+H.e(z)+'"'))},"$1","gdL",4,0,10], -fb:[function(a){this.a.m(0,H.r(C.z.em(0,H.r(new P.cD([],[],!1).bG(H.d_(H.m(a,"$iL"),"$icr").data,!0)),null)))},"$1","gdM",4,0,10], -fc:[function(){this.a4(0)},"$0","gdN",0,0,1], -bv:[function(a){var z=0,y=P.cS(null),x=1,w,v=[],u=this,t,s,r -var $async$bv=P.cU(function(b,c){if(b===1){w=c -z=x}while(true)switch(z){case 0:t=C.z.eo(a,null) +y=C.a.an(a,b,y+1)}return}}],["","",,M,{"^":"",j8:{"^":"ja;a,b,c,d,0e,0f", +a5:function(a){this.e.close() +this.a.a5(0) +this.b.a5(0) +this.c.a5(0)}, +fo:[function(a){var z=new P.cM([],[],!1).bJ(H.db(H.m(a,"$isM"),"$iscy").data,!0) +if(J.R(z,"close"))this.a5(0) +else throw H.a(P.A('Illegal Control Message "'+H.d(z)+'"'))},"$1","gdQ",4,0,14], +fp:[function(a){this.a.m(0,H.fy(C.z.ex(0,H.fy(new P.cM([],[],!1).bJ(H.db(H.m(a,"$isM"),"$iscy").data,!0)),null)))},"$1","gdR",4,0,14], +fq:[function(){this.a5(0)},"$0","gdS",0,0,1], +by:[function(a){var z=0,y=P.d2(null),x=1,w,v=[],u=this,t,s,r,q +var $async$by=P.d4(function(b,c){if(b===1){w=c +z=x}while(true)switch(z){case 0:t=C.z.ez(a,null) x=3 z=6 -return P.bS(u.c.b_("POST",u.e,null,t,null),$async$bv) +return P.bW(u.c.b1("POST",u.f,null,t,null),$async$by) case 6:x=1 z=5 break case 3:x=2 -r=w -H.P(r) +q=w +s=H.P(q) +u.d.eQ(C.a2,"Unable to encode outgoing message: "+H.d(s),null,null) z=5 break case 2:z=1 break -case 5:return P.cL(null,y) -case 1:return P.cK(w,y)}}) -return P.cM($async$bv,y)},"$1","gdO",4,0,3], -p:{ -iQ:function(a){var z,y,x -z=P.d -y=P.dN(null,null,null,null,!1,z) -z=P.dN(null,null,null,null,!1,z) -x=new O.fR(P.i3(null,null,null,W.bC),!1) -x.b=!0 -x=new M.iP(y,z,x) -x.de(a) -return x}}},iR:{"^":"h:40;a", -$1:function(a){var z,y,x -z=this.a.a -if(z.b>=4)H.t(z.bf()) -y=a==null?new P.bH():a -$.u.toString -x=z.b -if((x&1)!==0)z.aB(y,null) -else if((x&3)===0)z.bl().m(0,new P.e3(y,null))}}}],["","",,R,{"^":"",iT:{"^":"b;"}}],["","",,E,{"^":"",j0:{"^":"bJ;c,a,b", -gaR:function(a){return G.bJ.prototype.gaR.call(this,this)}}}],["","",,X,{"^":"",j_:{"^":"b;a,b,c,0d,0e", -gbP:function(){if(this.c!==this.e)this.d=null +case 5:return P.cW(null,y) +case 1:return P.cV(w,y)}}) +return P.cX($async$by,y)},"$1","gdT",4,0,2]}}],["","",,R,{"^":"",ja:{"^":"b;"}}],["","",,E,{"^":"",jk:{"^":"bN;c,a,b", +gaT:function(a){return G.bN.prototype.gaT.call(this,this)}}}],["","",,X,{"^":"",jj:{"^":"b;a,b,c,0d,0e", +gbS:function(){if(this.c!==this.e)this.d=null return this.d}, -bb:function(a){var z,y -z=J.fD(a,this.b,this.c) +bd:function(a){var z,y +z=J.fR(a,this.b,this.c) this.d=z this.e=this.c y=z!=null if(y){z=z.gu() this.c=z this.e=z}return y}, -cG:function(a,b){var z,y -if(this.bb(a))return -if(b==null){z=J.q(a) -if(!!z.$iiC){y=a.a -if(!$.fo())y=H.aP(y,"/","\\/") +cI:function(a,b){var z,y +if(this.bd(a))return +if(b==null){z=J.r(a) +if(!!z.$isiU){y=a.a +if(!$.$get$fb())y=H.aQ(y,"/","\\/") b="/"+y+"/"}else{z=z.h(a) -z=H.aP(z,"\\","\\\\") -b='"'+H.aP(z,'"','\\"')+'"'}}this.cF(0,"expected "+b+".",0,this.c)}, -aD:function(a){return this.cG(a,null)}, -er:function(){var z=this.c +z=H.aQ(z,"\\","\\\\") +b='"'+H.aQ(z,'"','\\"')+'"'}}this.cH(0,"expected "+b+".",0,this.c)}, +aF:function(a){return this.cI(a,null)}, +eC:function(){var z=this.c if(z===this.b.length)return -this.cF(0,"expected no more input.",0,z)}, -eq:function(a,b,c,d,e){var z,y,x,w,v,u,t +this.cH(0,"expected no more input.",0,z)}, +eB:function(a,b,c,d,e){var z,y,x,w,v,u,t z=this.b -if(e<0)H.t(P.M("position must be greater than or equal to 0.")) -else if(e>z.length)H.t(P.M("position must be less than or equal to the string length.")) +if(e<0)H.v(P.N("position must be greater than or equal to 0.")) +else if(e>z.length)H.v(P.N("position must be less than or equal to the string length.")) y=e+c>z.length -if(y)H.t(P.M("position plus length must not go beyond the end of the string.")) +if(y)H.v(P.N("position plus length must not go beyond the end of the string.")) y=this.a -x=new H.aE(z) +x=new H.aF(z) w=H.o([0],[P.c]) -v=new Uint32Array(H.bU(x.b7(x))) -u=new Y.iJ(y,w,v) -u.dc(x,y) +v=new Uint32Array(H.bZ(x.b9(x))) +u=new Y.j2(y,w,v) +u.dh(x,y) t=e+c -if(t>v.length)H.t(P.M("End "+t+" must not be greater than the number of characters in the file, "+u.gi(u)+".")) -else if(e<0)H.t(P.M("Start may not be negative, was "+e+".")) -throw H.a(new E.j0(z,b,new Y.jT(u,e,t)))}, -cF:function(a,b,c,d){return this.eq(a,b,c,null,d)}}}],["","",,K,{"^":"",j9:{"^":"b;"}}],["","",,F,{"^":"",jt:{"^":"b;0a,0b,0c,d,e,0f,0r", -sdm:function(a){this.f=H.l(a,"$if",[P.d],"$af")}, -sdA:function(a){this.r=H.l(a,"$iR",[P.d,P.c],"$aR")}, -df:function(){var z,y,x,w,v +if(t>v.length)H.v(P.N("End "+t+" must not be greater than the number of characters in the file, "+u.gi(u)+".")) +else if(e<0)H.v(P.N("Start may not be negative, was "+e+".")) +throw H.a(new E.jk(z,b,new Y.kb(u,e,t)))}, +cH:function(a,b,c,d){return this.eB(a,b,c,null,d)}}}],["","",,K,{"^":"",jt:{"^":"b;"}}],["","",,F,{"^":"",jM:{"^":"b;0a,0b,0c,d,e,0f,0r", +sds:function(a){this.f=H.l(a,"$ish",[P.e],"$ash")}, +sdE:function(a){this.r=H.l(a,"$isS",[P.e,P.c],"$asS")}, +dj:function(){var z,y,x,w,v z=new Array(256) z.fixed$length=Array -y=P.d -this.sdm(H.o(z,[y])) +y=P.e +this.sds(H.o(z,[y])) z=P.c -this.sdA(new H.aj(0,0,[y,z])) -for(z=[z],y=[P.f,P.c],x=0;x<256;++x){w=H.o([],z) +this.sdE(new H.ac(0,0,[y,z])) +for(z=[z],y=[P.h,P.c],x=0;x<256;++x){w=H.o([],z) C.b.m(w,x) v=this.f -H.n(w,y);(v&&C.b).l(v,x,C.J.gad().Z(w)) -this.r.l(0,this.f[x],x)}z=U.jv(null) +H.n(w,y);(v&&C.b).k(v,x,C.J.gaf().Z(w)) +this.r.k(0,this.f[x],x)}z=U.jO(null) this.a=z y=z[0] -if(typeof y!=="number")return y.f6() +if(typeof y!=="number")return y.fk() this.b=[y|1,z[1],z[2],z[3],z[4],z[5]] y=z[6] -if(typeof y!=="number")return y.f8() +if(typeof y!=="number")return y.fm() z=z[7] -if(typeof z!=="number")return H.E(z) +if(typeof z!=="number")return H.G(z) this.c=(y<<8|z)&262143}, -f2:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m +fg:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m z=new Array(16) z.fixed$length=Array -c=new H.aj(0,0,[null,null]) +c=new H.ac(0,0,[null,null]) y=c.j(0,"clockSeq")!=null?c.j(0,"clockSeq"):this.c x=c.j(0,"mSecs")!=null?c.j(0,"mSecs"):Date.now() w=c.j(0,"nSecs")!=null?c.j(0,"nSecs"):this.e+1 -v=J.br(x) +v=J.b8(x) u=v.V(x,this.d) -t=J.ft(w,this.e) -if(typeof t!=="number")return t.f5() -s=J.d8(u,t/1e4) -u=J.br(s) -if(u.D(s,0)&&c.j(0,"clockSeq")==null){t=J.d8(y,1) -if(typeof t!=="number")return t.c1() -y=t&16383}if((u.D(s,0)||v.ay(x,this.d))&&c.j(0,"nSecs")==null)w=0 -if(J.fs(w,1e4))throw H.a(P.dp("uuid.v1(): Can't create more than 10M uuids/sec")) +t=J.fG(w,this.e) +if(typeof t!=="number")return t.fj() +s=J.df(u,t/1e4) +u=J.b8(s) +if(u.C(s,0)&&c.j(0,"clockSeq")==null){t=J.df(y,1) +if(typeof t!=="number")return t.c4() +y=t&16383}if((u.C(s,0)||v.as(x,this.d))&&c.j(0,"nSecs")==null)w=0 +if(J.fE(w,1e4))throw H.a(P.dw("uuid.v1(): Can't create more than 10M uuids/sec")) H.w(x) this.d=x H.w(w) this.e=w this.c=y x+=122192928e5 -r=C.c.aQ((x&268435455)*1e4+w,4294967296) +r=C.c.aS((x&268435455)*1e4+w,4294967296) q=b+1 -C.b.l(z,b,C.c.W(r,24)&255) +C.b.k(z,b,C.c.W(r,24)&255) p=q+1 -C.b.l(z,q,C.c.W(r,16)&255) +C.b.k(z,q,C.c.W(r,16)&255) q=p+1 -C.b.l(z,p,C.c.W(r,8)&255) +C.b.k(z,p,C.c.W(r,8)&255) p=q+1 -C.b.l(z,q,r&255) -o=C.c.by(x,4294967296)*1e4&268435455 +C.b.k(z,q,r&255) +o=C.c.bB(x,4294967296)*1e4&268435455 q=p+1 -C.b.l(z,p,o>>>8&255) +C.b.k(z,p,o>>>8&255) p=q+1 -C.b.l(z,q,o&255) +C.b.k(z,q,o&255) q=p+1 -C.b.l(z,p,o>>>24&15|16) +C.b.k(z,p,o>>>24&15|16) p=q+1 -C.b.l(z,q,o>>>16&255) +C.b.k(z,q,o>>>16&255) q=p+1 -if(typeof y!=="number")return y.d2() -C.b.l(z,p,(C.m.W(y,8)|128)>>>0) +if(typeof y!=="number")return y.d7() +C.b.k(z,p,(C.m.W(y,8)|128)>>>0) p=q+1 -C.b.l(z,q,y&255) +C.b.k(z,q,y&255) n=c.j(0,"node")!=null?c.j(0,"node"):this.b -for(v=J.a0(n),m=0;m<6;++m)C.b.l(z,p+m,v.j(n,m)) +for(v=J.Y(n),m=0;m<6;++m)C.b.k(z,p+m,v.j(n,m)) v=this.f -v=H.e((v&&C.b).j(v,H.w(z[0]))) +v=H.d((v&&C.b).j(v,H.w(z[0]))) u=this.f -u=v+H.e((u&&C.b).j(u,H.w(z[1]))) +u=v+H.d((u&&C.b).j(u,H.w(z[1]))) v=this.f -v=u+H.e((v&&C.b).j(v,H.w(z[2]))) +v=u+H.d((v&&C.b).j(v,H.w(z[2]))) u=this.f -u=v+H.e((u&&C.b).j(u,H.w(z[3])))+"-" +u=v+H.d((u&&C.b).j(u,H.w(z[3])))+"-" v=this.f -v=u+H.e((v&&C.b).j(v,H.w(z[4]))) +v=u+H.d((v&&C.b).j(v,H.w(z[4]))) u=this.f -u=v+H.e((u&&C.b).j(u,H.w(z[5])))+"-" +u=v+H.d((u&&C.b).j(u,H.w(z[5])))+"-" v=this.f -v=u+H.e((v&&C.b).j(v,H.w(z[6]))) +v=u+H.d((v&&C.b).j(v,H.w(z[6]))) u=this.f -u=v+H.e((u&&C.b).j(u,H.w(z[7])))+"-" +u=v+H.d((u&&C.b).j(u,H.w(z[7])))+"-" v=this.f -v=u+H.e((v&&C.b).j(v,H.w(z[8]))) +v=u+H.d((v&&C.b).j(v,H.w(z[8]))) u=this.f -u=v+H.e((u&&C.b).j(u,H.w(z[9])))+"-" +u=v+H.d((u&&C.b).j(u,H.w(z[9])))+"-" v=this.f -v=u+H.e((v&&C.b).j(v,H.w(z[10]))) +v=u+H.d((v&&C.b).j(v,H.w(z[10]))) u=this.f -u=v+H.e((u&&C.b).j(u,H.w(z[11]))) +u=v+H.d((u&&C.b).j(u,H.w(z[11]))) v=this.f -v=u+H.e((v&&C.b).j(v,H.w(z[12]))) +v=u+H.d((v&&C.b).j(v,H.w(z[12]))) u=this.f -u=v+H.e((u&&C.b).j(u,H.w(z[13]))) +u=v+H.d((u&&C.b).j(u,H.w(z[13]))) v=this.f -v=u+H.e((v&&C.b).j(v,H.w(z[14]))) +v=u+H.d((v&&C.b).j(v,H.w(z[14]))) u=this.f -u=v+H.e((u&&C.b).j(u,H.w(z[15]))) +u=v+H.d((u&&C.b).j(u,H.w(z[15]))) return u}, -f1:function(){return this.f2(null,0,null)}, +ff:function(){return this.fg(null,0,null)}, p:{ -ju:function(){var z=new F.jt(0,0) -z.df() +jN:function(){var z=new F.jM(0,0) +z.dj() return z}}}}],["","",,U,{"^":"", -jv:function(a){var z,y,x,w +jO:function(a){var z,y,x,w z=new Array(16) z.fixed$length=Array y=H.o(z,[P.c]) for(x=null,w=0;w<16;++w){z=w&3 -if(z===0)x=C.c.f_(C.m.eu(C.O.eI()*4294967296)) -if(typeof x!=="number")return x.d2() -C.b.l(y,w,C.c.W(x,z<<3)&255)}return y}}],["","",,E,{"^":"", -eU:function(){var z,y,x -z=M.iQ("/test") -y=J.fB(C.P.eO(document,"button")) -x=H.i(y,0) -W.cG(y.a,y.b,H.j(new E.lL(z),{func:1,ret:-1,args:[x]}),!1,x) -x=z.a -new P.cF(x,[H.i(x,0)]).eE(new E.lM(z))}, -lL:{"^":"h:41;a", -$1:function(a){H.m(a,"$iaW") -this.a.b.a4(0)}}, -lM:{"^":"h:9;a", +if(z===0)x=C.c.fd(C.m.eE(C.O.eU()*4294967296)) +if(typeof x!=="number")return x.d7() +C.b.k(y,w,C.c.W(x,z<<3)&255)}return y}}],["","",,E,{"^":"", +fq:function(){var z,y,x,w,v,u +z=P.e +y=P.dW(null,null,null,null,!1,z) +x=P.dW(null,null,null,null,!1,z) +w=new O.h6(P.ik(null,null,null,W.bE),!1) +w.b=!0 +v=new M.j8(y,x,w,N.bI("SseClient")) +u=F.jN().ff() +v.e=W.hF("/test?sseClientId="+u,P.bH(["withCredentials",!0],z,null)) +v.f="/test?sseClientId="+u +new P.cP(x,[H.i(x,0)]).eP(v.gdT(),v.gdS()) +C.u.cD(v.e,"message",v.gdR()) +C.u.cD(v.e,"control",v.gdQ()) +x=W.M +W.cQ(v.e,"error",H.j(y.gej(),{func:1,ret:-1,args:[x]}),!1,x) +x=J.fP(C.P.f0(document,"button")) +z=H.i(x,0) +W.cQ(x.a,x.b,H.j(new E.m3(v),{func:1,ret:-1,args:[z]}),!1,z) +new P.cP(y,[H.i(y,0)]).eO(new E.m4(v))}, +m3:{"^":"f:43;a", +$1:function(a){H.m(a,"$isaX") +this.a.b.a5(0)}}, +m4:{"^":"f:9;a", $1:function(a){var z=this.a.b -z.m(0,H.n(H.r(a),H.i(z,0)))}}},1],["","",,D,{"^":""}]] +z.m(0,H.n(H.p(a),H.i(z,0)))}}},1],["","",,D,{"^":""}]] setupProgram(dart,0,0) -J.q=function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.ds.prototype -return J.hP.prototype}if(typeof a=="string")return J.bf.prototype -if(a==null)return J.dt.prototype -if(typeof a=="boolean")return J.hO.prototype +J.r=function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.dz.prototype +return J.i4.prototype}if(typeof a=="string")return J.bg.prototype +if(a==null)return J.dA.prototype +if(typeof a=="boolean")return J.i3.prototype if(a.constructor==Array)return J.at.prototype -if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype return a}if(a instanceof P.b)return a -return J.bs(a)} -J.lA=function(a){if(typeof a=="number")return J.be.prototype -if(typeof a=="string")return J.bf.prototype +return J.bv(a)} +J.lT=function(a){if(typeof a=="number")return J.bf.prototype +if(typeof a=="string")return J.bg.prototype if(a==null)return a if(a.constructor==Array)return J.at.prototype -if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype return a}if(a instanceof P.b)return a -return J.bs(a)} -J.a0=function(a){if(typeof a=="string")return J.bf.prototype +return J.bv(a)} +J.Y=function(a){if(typeof a=="string")return J.bg.prototype if(a==null)return a if(a.constructor==Array)return J.at.prototype -if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype return a}if(a instanceof P.b)return a -return J.bs(a)} -J.bq=function(a){if(a==null)return a +return J.bv(a)} +J.bu=function(a){if(a==null)return a if(a.constructor==Array)return J.at.prototype -if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype return a}if(a instanceof P.b)return a -return J.bs(a)} -J.br=function(a){if(typeof a=="number")return J.be.prototype +return J.bv(a)} +J.b8=function(a){if(typeof a=="number")return J.bf.prototype if(a==null)return a -if(!(a instanceof P.b))return J.bm.prototype +if(!(a instanceof P.b))return J.bq.prototype return a} -J.a6=function(a){if(typeof a=="string")return J.bf.prototype +J.a6=function(a){if(typeof a=="string")return J.bg.prototype if(a==null)return a -if(!(a instanceof P.b))return J.bm.prototype +if(!(a instanceof P.b))return J.bq.prototype return a} -J.b5=function(a){if(a==null)return a -if(typeof a!="object"){if(typeof a=="function")return J.aV.prototype +J.aD=function(a){if(a==null)return a +if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype return a}if(a instanceof P.b)return a -return J.bs(a)} -J.cX=function(a){if(a==null)return a -if(!(a instanceof P.b))return J.bm.prototype +return J.bv(a)} +J.d8=function(a){if(a==null)return a +if(!(a instanceof P.b))return J.bq.prototype return a} -J.d8=function(a,b){if(typeof a=="number"&&typeof b=="number")return a+b -return J.lA(a).t(a,b)} -J.Q=function(a,b){if(a==null)return b==null +J.df=function(a,b){if(typeof a=="number"&&typeof b=="number")return a+b +return J.lT(a).t(a,b)} +J.R=function(a,b){if(a==null)return b==null if(typeof a!="object")return b!=null&&a===b -return J.q(a).J(a,b)} -J.fs=function(a,b){if(typeof a=="number"&&typeof b=="number")return a>=b -return J.br(a).aO(a,b)} -J.ft=function(a,b){if(typeof a=="number"&&typeof b=="number")return a-b -return J.br(a).V(a,b)} -J.fu=function(a,b,c){return J.bq(a).l(a,b,c)} -J.c2=function(a,b){return J.a6(a).n(a,b)} -J.fv=function(a,b,c,d){return J.b5(a).dU(a,b,c,d)} -J.fw=function(a,b,c,d){return J.b5(a).cC(a,b,c,d)} -J.bw=function(a,b){return J.a6(a).v(a,b)} -J.fx=function(a,b){return J.a0(a).ar(a,b)} -J.d9=function(a,b){return J.bq(a).X(a,b)} -J.fy=function(a,b,c,d){return J.b5(a).es(a,b,c,d)} -J.aD=function(a){return J.q(a).gA(a)} -J.bb=function(a){return J.bq(a).gK(a)} -J.T=function(a){return J.a0(a).gi(a)} -J.fz=function(a){return J.cX(a).gS(a)} -J.fA=function(a){return J.cX(a).gG(a)} -J.fB=function(a){return J.b5(a).gcM(a)} -J.fC=function(a){return J.b5(a).gd1(a)} -J.da=function(a){return J.cX(a).gaR(a)} -J.fD=function(a,b,c){return J.a6(a).at(a,b,c)} -J.fE=function(a,b){return J.b5(a).ah(a,b)} -J.fF=function(a,b){return J.bq(a).a_(a,b)} -J.fG=function(a,b){return J.a6(a).F(a,b)} -J.bx=function(a,b,c){return J.a6(a).k(a,b,c)} -J.fH=function(a,b){return J.br(a).aq(a,b)} -J.ar=function(a){return J.q(a).h(a)} +return J.r(a).I(a,b)} +J.fE=function(a,b){if(typeof a=="number"&&typeof b=="number")return a>=b +return J.b8(a).aQ(a,b)} +J.fF=function(a,b){if(typeof a=="number"&&typeof b=="number")return a@,;:"\\\\/[\\]?={} \\t\\x00-\\x1F\\x7F]+',!0,!1)},"mN","fk",function(){return P.F("(?:\\r\\n)?[ \\t]+",!0,!1)},"mQ","fm",function(){return P.F('"(?:[^"\\x00-\\x1F\\x7F]|\\\\.)*"',!0,!1)},"mP","fl",function(){return P.F("\\\\(.)",!0,!1)},"n4","fp",function(){return P.F('[()<>@,;:"\\\\/\\[\\]?={} \\t\\x00-\\x1F\\x7F]',!0,!1)},"n7","fr",function(){return P.F("(?:"+$.fk().a+")*",!0,!1)},"mZ","d7",function(){return new M.he($.d4(),null)},"mi","f5",function(){return new E.im("posix","/",C.C,P.F("/",!0,!1),P.F("[^/]$",!0,!1),P.F("^/",!0,!1))},"mk","bv",function(){return new L.jw("windows","\\",C.a0,P.F("[/\\\\]",!0,!1),P.F("[^/\\\\]$",!0,!1),P.F("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])",!0,!1),P.F("^[/\\\\](?![/\\\\])",!0,!1))},"mj","b9",function(){return new F.jk("url","/",C.C,P.F("/",!0,!1),P.F("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$",!0,!1),P.F("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*",!0,!1),P.F("^/",!0,!1))},"mh","d4",function(){return O.j4()},"mS","fo",function(){return P.F("/",!0,!1).a==="\\/"}]) +I.$lazy(y,x,w)}})(["ds","$get$ds",function(){return H.fk("_$dart_dartClosure")},"cq","$get$cq",function(){return H.fk("_$dart_js")},"e0","$get$e0",function(){return H.ag(H.bR({ +toString:function(){return"$receiver$"}}))},"e1","$get$e1",function(){return H.ag(H.bR({$method$:null, +toString:function(){return"$receiver$"}}))},"e2","$get$e2",function(){return H.ag(H.bR(null))},"e3","$get$e3",function(){return H.ag(function(){var $argumentsExpr$='$arguments$' +try{null.$method$($argumentsExpr$)}catch(z){return z.message}}())},"e7","$get$e7",function(){return H.ag(H.bR(void 0))},"e8","$get$e8",function(){return H.ag(function(){var $argumentsExpr$='$arguments$' +try{(void 0).$method$($argumentsExpr$)}catch(z){return z.message}}())},"e5","$get$e5",function(){return H.ag(H.e6(null))},"e4","$get$e4",function(){return H.ag(function(){try{null.$method$}catch(z){return z.message}}())},"ea","$get$ea",function(){return H.ag(H.e6(void 0))},"e9","$get$e9",function(){return H.ag(function(){try{(void 0).$method$}catch(z){return z.message}}())},"cO","$get$cO",function(){return P.jV()},"aU","$get$aU",function(){return P.kc(null,C.d,P.x)},"b5","$get$b5",function(){return[]},"ef","$get$ef",function(){return P.jI()},"el","$get$el",function(){return H.iv(H.bZ(H.o([-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-2,-2,-2,-2,-2,62,-2,62,-2,63,52,53,54,55,56,57,58,59,60,61,-2,-2,-2,-1,-2,-2,-2,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-2,-2,-2,-2,63,-2,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-2,-2,-2,-2,-2],[P.c])))},"du","$get$du",function(){return P.bH(["iso_8859-1:1987",C.f,"iso-ir-100",C.f,"iso_8859-1",C.f,"iso-8859-1",C.f,"latin1",C.f,"l1",C.f,"ibm819",C.f,"cp819",C.f,"csisolatin1",C.f,"iso-ir-6",C.e,"ansi_x3.4-1968",C.e,"ansi_x3.4-1986",C.e,"iso_646.irv:1991",C.e,"iso646-us",C.e,"us-ascii",C.e,"us",C.e,"ibm367",C.e,"cp367",C.e,"csascii",C.e,"ascii",C.e,"csutf8",C.h,"utf-8",C.h],P.e,P.bB)},"cR","$get$cR",function(){return typeof process!="undefined"&&Object.prototype.toString.call(process)=="[object process]"&&process.platform=="win32"},"eY","$get$eY",function(){return new Error().stack!=void 0},"f9","$get$f9",function(){return P.lf()},"c_","$get$c_",function(){return[]},"eX","$get$eX",function(){return P.H('["\\x00-\\x1F\\x7F]',!0,!1)},"fC","$get$fC",function(){return P.H('[^()<>@,;:"\\\\/[\\]?={} \\t\\x00-\\x1F\\x7F]+',!0,!1)},"f0","$get$f0",function(){return P.H("(?:\\r\\n)?[ \\t]+",!0,!1)},"f4","$get$f4",function(){return P.H('"(?:[^"\\x00-\\x1F\\x7F]|\\\\.)*"',!0,!1)},"f3","$get$f3",function(){return P.H("\\\\(.)",!0,!1)},"fr","$get$fr",function(){return P.H('[()<>@,;:"\\\\/\\[\\]?={} \\t\\x00-\\x1F\\x7F]',!0,!1)},"fD","$get$fD",function(){return P.H("(?:"+$.$get$f0().a+")*",!0,!1)},"dK","$get$dK",function(){return N.bI("")},"dJ","$get$dJ",function(){return P.bG(P.e,N.bi)},"d6","$get$d6",function(){return new M.hu($.$get$cH(),null)},"dZ","$get$dZ",function(){return new E.iF("posix","/",C.C,P.H("/",!0,!1),P.H("[^/]$",!0,!1),P.H("^/",!0,!1))},"bp","$get$bp",function(){return new L.jP("windows","\\",C.a3,P.H("[/\\\\]",!0,!1),P.H("[^/\\\\]$",!0,!1),P.H("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])",!0,!1),P.H("^[/\\\\](?![/\\\\])",!0,!1))},"aZ","$get$aZ",function(){return new F.jD("url","/",C.C,P.H("/",!0,!1),P.H("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$",!0,!1),P.H("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*",!0,!1),P.H("^/",!0,!1))},"cH","$get$cH",function(){return O.jo()},"fb","$get$fb",function(){return P.H("/",!0,!1).a==="\\/"}]) I=I.$finishIsolateConstructor(I) $=new I() init.metadata=[] -init.types=[{func:1,ret:P.x},{func:1,ret:-1},{func:1,ret:P.x,args:[,,]},{func:1,args:[,]},{func:1,ret:P.x,args:[W.am]},{func:1,ret:P.d,args:[P.d]},{func:1,ret:-1,args:[{func:1,ret:-1}]},{func:1,ret:-1,args:[,]},{func:1,ret:-1,args:[P.b],opt:[P.D]},{func:1,ret:P.x,args:[P.d]},{func:1,args:[W.L]},{func:1,ret:P.H,args:[P.d]},{func:1,ret:P.x,args:[,]},{func:1,ret:P.H,args:[,]},{func:1,ret:P.d,args:[P.ac]},{func:1,ret:-1,args:[P.b]},{func:1,ret:P.x,args:[,P.D]},{func:1,ret:-1,args:[P.c,P.c]},{func:1,ret:-1,args:[P.d,P.c]},{func:1,ret:-1,args:[P.d],opt:[,]},{func:1,ret:P.c,args:[P.c,P.c]},{func:1,ret:P.x,args:[P.c,,]},{func:1,ret:P.y,args:[P.c]},{func:1,ret:P.y,args:[,,]},{func:1,ret:-1,args:[P.d,P.d]},{func:1,args:[P.d]},{func:1,args:[,,]},{func:1,ret:P.H,args:[P.d,P.d]},{func:1,ret:P.c,args:[P.d]},{func:1,ret:-1,opt:[P.b]},{func:1,ret:P.H,args:[P.b,P.b]},{func:1,ret:U.bj,args:[P.y]},{func:1,ret:P.x,args:[,],opt:[P.D]},{func:1,ret:P.H,args:[P.b]},{func:1,ret:R.bG},{func:1,ret:P.x,args:[P.d,P.d]},{func:1,ret:[P.G,,],args:[,]},{func:1,args:[,P.d]},{func:1,ret:P.d,args:[P.c]},{func:1,ret:P.d,args:[P.d],named:{color:null}},{func:1,ret:P.x,args:[W.L]},{func:1,ret:P.x,args:[W.aW]},{func:1,ret:P.x,args:[{func:1,ret:-1}]},{func:1,ret:P.H,args:[,,]},{func:1,ret:P.c,args:[,]},{func:1,ret:P.c,args:[P.b]},{func:1,ret:-1,args:[[P.f,P.c]]}] +init.types=[{func:1,ret:P.x},{func:1,ret:-1},{func:1,ret:-1,args:[,]},{func:1,ret:-1,args:[P.b],opt:[P.D]},{func:1,ret:P.x,args:[,,]},{func:1,ret:P.x,args:[W.am]},{func:1,ret:P.e,args:[P.e]},{func:1,ret:-1,args:[{func:1,ret:-1}]},{func:1,args:[,]},{func:1,ret:P.x,args:[P.e]},{func:1,ret:P.F,args:[P.e]},{func:1,ret:P.x,args:[,]},{func:1,ret:P.F,args:[,]},{func:1,ret:P.e,args:[P.ad]},{func:1,ret:-1,args:[W.M]},{func:1,ret:-1,args:[P.b]},{func:1,ret:P.x,args:[,P.D]},{func:1,ret:P.c,args:[[P.h,P.c],P.c]},{func:1,ret:-1,args:[P.c,P.c]},{func:1,ret:-1,args:[P.e,P.c]},{func:1,ret:-1,args:[P.e],opt:[,]},{func:1,ret:P.c,args:[P.c,P.c]},{func:1,ret:P.x,args:[P.c,,]},{func:1,ret:P.y,args:[P.c]},{func:1,ret:P.y,args:[,,]},{func:1,ret:-1,args:[P.e,P.e]},{func:1,args:[W.M]},{func:1,args:[,,]},{func:1,ret:P.F,args:[P.e,P.e]},{func:1,ret:P.c,args:[P.e]},{func:1,args:[P.e]},{func:1,ret:-1,args:[[P.h,P.c]]},{func:1,ret:P.F,args:[P.b,P.b]},{func:1,ret:-1,opt:[P.b]},{func:1,ret:P.F,args:[P.b]},{func:1,ret:R.bK},{func:1,ret:P.x,args:[P.e,P.e]},{func:1,ret:P.x,args:[,],opt:[,]},{func:1,ret:N.bi},{func:1,ret:[P.E,,],args:[,]},{func:1,ret:P.e,args:[P.c]},{func:1,ret:P.e,args:[P.e],named:{color:null}},{func:1,args:[,P.e]},{func:1,ret:P.x,args:[W.aX]},{func:1,ret:P.x,args:[{func:1,ret:-1}]},{func:1,ret:P.F,args:[,,]},{func:1,ret:P.c,args:[,]},{func:1,ret:P.c,args:[P.b]},{func:1,ret:U.bm,args:[P.y]}] function convertToFastObject(a){function MyClass(){}MyClass.prototype=a new MyClass() return a}function convertToSlowObject(a){a.__MAGIC_SLOW_PROPERTY=1 @@ -6502,7 +6606,7 @@ var z={} var y={} e[a]=z e[b]=function(){var x=this[a] -if(x==y)H.lT(d||a) +if(x==y)H.mc(d||a) try{if(x===z){this[a]=y try{x=this[a]=c()}finally{if(x===z)this[a]=null}}return x}finally{this[b]=function(){return this[a]}}}} I.$finishIsolateConstructor=function(a){var z=a.p @@ -6534,6 +6638,6 @@ return}if(typeof document.currentScript!='undefined'){a(document.currentScript) return}var z=document.scripts function onLoad(b){for(var x=0;x Date: Fri, 15 Feb 2019 12:08:35 -0800 Subject: [PATCH 003/115] make travis.sh executable --- pkgs/sse/tool/travis.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 pkgs/sse/tool/travis.sh diff --git a/pkgs/sse/tool/travis.sh b/pkgs/sse/tool/travis.sh old mode 100644 new mode 100755 From 70ad2965638d68717738b18d7d2753262cb38ead Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Feb 2019 12:29:14 -0800 Subject: [PATCH 004/115] add proper example, update lints --- pkgs/sse/CHANGELOG.md | 2 +- pkgs/sse/example/README.md | 1 - pkgs/sse/example/index.dart | 15 +++++++++++++++ pkgs/sse/example/server.dart | 21 +++++++++++++++++++++ pkgs/sse/lib/client/sse_client.dart | 3 ++- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/sse_test.dart | 4 ++-- pkgs/sse/tool/travis-setup.sh | 0 8 files changed, 42 insertions(+), 6 deletions(-) delete mode 100644 pkgs/sse/example/README.md create mode 100644 pkgs/sse/example/index.dart create mode 100644 pkgs/sse/example/server.dart mode change 100644 => 100755 pkgs/sse/tool/travis-setup.sh diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 98eebc5bc..77c5538b8 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.0.2 +## 1.0.0 - Internal cleanup. diff --git a/pkgs/sse/example/README.md b/pkgs/sse/example/README.md deleted file mode 100644 index 631fdad51..000000000 --- a/pkgs/sse/example/README.md +++ /dev/null @@ -1 +0,0 @@ -The test folder provides a very basic usage example. diff --git a/pkgs/sse/example/index.dart b/pkgs/sse/example/index.dart new file mode 100644 index 000000000..afc1a49cd --- /dev/null +++ b/pkgs/sse/example/index.dart @@ -0,0 +1,15 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:sse/client/sse_client.dart'; + +/// A basic example which should be used in a browser that supports SSE. +void main() { + var channel = SseClient('/sseHandler'); + + channel.stream.listen((s) { + // Listen for messages and send the back. + channel.sink.add(s); + }); +} diff --git a/pkgs/sse/example/server.dart b/pkgs/sse/example/server.dart new file mode 100644 index 000000000..74439c9e1 --- /dev/null +++ b/pkgs/sse/example/server.dart @@ -0,0 +1,21 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:shelf/shelf_io.dart' as io; +import 'package:sse/server/sse_handler.dart'; + +/// A basic server which sets up an SSE handler. +/// +/// When a client connnects it will send a simple message and print the +/// response. +void main() async { + var handler = SseHandler(Uri.parse('/sseHandler')); + await io.serve(handler.handler, 'localhost', 0); + var connections = handler.connections; + while (await connections.hasNext) { + var connection = await connections.next; + connection.sink.add('foo'); + connection.stream.listen(print); + } +} diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index d7e37ca64..65bbbeec7 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -46,7 +46,8 @@ class SseClient extends StreamChannelMixin { /// Add messages to this [StreamSink] to send them to the server. /// - /// The message added to the sink has to be JSON encodable. + /// The message added to the sink has to be JSON encodable. Messages that fail + /// to encode will be logged through a [Logger]. @override StreamSink get sink => _outgoingController.sink; diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 13c8db349..9e0487eb3 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 0.0.1 +version: 1.0.0 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index cebde5c1a..d6e04451b 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -44,7 +44,7 @@ void main() { }); test('Multiple clients can connect', () async { - var connections = await handler.connections; + var connections = handler.connections; await webdriver.get('http://localhost:${server.port}'); await connections.next; await webdriver.get('http://localhost:${server.port}'); @@ -52,7 +52,7 @@ void main() { }); test('Routes data correctly', () async { - var connections = await handler.connections; + var connections = handler.connections; await webdriver.get('http://localhost:${server.port}'); var connectionA = await connections.next; await webdriver.get('http://localhost:${server.port}'); diff --git a/pkgs/sse/tool/travis-setup.sh b/pkgs/sse/tool/travis-setup.sh old mode 100644 new mode 100755 From 6d7ced48c0f7a9f5d12c2d253602cfa17863e196 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Feb 2019 12:32:07 -0800 Subject: [PATCH 005/115] update travis config --- pkgs/sse/.travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index e3edd12ca..21c6fe6a0 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -40,3 +40,8 @@ script: cache: directories: - $HOME/.pub-cache + +# Only building master means that we don't run two builds for each pull request. +branches: + only: + - master From e7170f7980256b7dce856b6cde49c92e4be009b5 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Feb 2019 14:02:27 -0800 Subject: [PATCH 006/115] remove whitespace --- pkgs/sse/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 9e0487eb3..a86543f75 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,10 +1,10 @@ -name: sse +name: sse version: 1.0.0 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional - communication through Server Sent Events (SSE) and corresponding POST + communication through Server Sent Events (SSE) and corresponding POST requests. environment: From 313d2f4db131c5df0cb5a792f66f31e8c6a6eee0 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Feb 2019 14:07:27 -0800 Subject: [PATCH 007/115] fix typo --- pkgs/sse/example/index.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/example/index.dart b/pkgs/sse/example/index.dart index afc1a49cd..0ed75966c 100644 --- a/pkgs/sse/example/index.dart +++ b/pkgs/sse/example/index.dart @@ -9,7 +9,7 @@ void main() { var channel = SseClient('/sseHandler'); channel.stream.listen((s) { - // Listen for messages and send the back. + // Listen for messages and send them back. channel.sink.add(s); }); } From ea29f1912b67c0557a7851e2f7c634816f5ded32 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 18:43:46 -0800 Subject: [PATCH 008/115] Better close logic --- pkgs/sse/CHANGELOG.md | 6 ++++ pkgs/sse/lib/server/sse_handler.dart | 47 ++++++++++++++++++---------- pkgs/sse/pubspec.yaml | 1 - pkgs/sse/test/sse_test.dart | 13 ++++---- 4 files changed, 44 insertions(+), 23 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 77c5538b8..ba13a265f 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.0.0 + +- No longer expose `close` and `onClose` on an `SseConnection`. This is simply + handled by the underlying `stream` / `sink`. +- Fix a bug where resources of the `SseConnection` were not properly closed. + ## 1.0.0 - Internal cleanup. diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index a683a2f63..abec5cf29 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -7,7 +7,6 @@ import 'dart:convert'; import 'package:async/async.dart'; import 'package:logging/logging.dart'; -import 'package:pedantic/pedantic.dart'; import 'package:shelf/shelf.dart' as shelf; import 'package:stream_channel/stream_channel.dart'; @@ -21,24 +20,28 @@ String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' /// A bi-directional SSE connection between server and browser. class SseConnection extends StreamChannelMixin { + // Incoming messages from the Browser client. final _incomingController = StreamController(); + // Outgoing messages to the Browser client. final _outgoingController = StreamController(); - final _closeCompleter = Completer(); + final Sink _sink; final String _clientId; + var _isClosed = false; + SseConnection(this._sink, this._clientId) { _outgoingController.stream.listen((data) { - if (!_closeCompleter.isCompleted) { + if (!_isClosed) { // JSON encode the message to escape new lines. _sink.add('data: ${json.encode(data)}\n'); _sink.add('\n'); } }); + _outgoingController.onCancel = _close; + _incomingController.onCancel = _close; } - Future get onClose => _closeCompleter.future; - /// The message added to the sink has to be JSON encodable. @override StreamSink get sink => _outgoingController.sink; @@ -50,8 +53,13 @@ class SseConnection extends StreamChannelMixin { @override Stream get stream => _incomingController.stream; - void close() { - if (!_closeCompleter.isCompleted) _closeCompleter.complete(); + void _close() { + if (!_isClosed) { + _isClosed = true; + _sink.close(); + if (!_outgoingController.isClosed) _outgoingController.close(); + if (!_incomingController.isClosed) _incomingController.close(); + } } } @@ -64,19 +72,28 @@ class SseHandler { final _logger = Logger('SseHandler'); final Uri _uri; - final Set _connections = Set(); + final _connections = {}; final _connectionController = StreamController(); - SseHandler(this._uri); + StreamQueue _connectionsStream; + SseHandler(this._uri); StreamQueue get connections => - StreamQueue(_connectionController.stream); + _connectionsStream ??= StreamQueue(_connectionController.stream); shelf.Handler get handler => _handle; int get numberOfClients => _connections.length; + void close() { + if (!_connectionController.isClosed) _connectionController.close(); + for (var connection in _connections) { + connection.sink.close(); + _connections.remove(connection); + } + } + shelf.Response _createSseConnection(shelf.Request req, String path) { req.hijack((channel) async { var sink = utf8.encoder.startChunkedConversion(channel.sink); @@ -84,14 +101,12 @@ class SseHandler { var clientId = req.url.queryParameters['sseClientId']; var connection = SseConnection(sink, clientId); _connections.add(connection); - unawaited(connection.onClose.then((_) { + // Remove connection when it is remotely closed. + channel.stream.listen((_) {}, onDone: () { + connection.sink.close(); _connections.remove(connection); - })); - channel.stream.listen((_) { - // SSE is unidirectional. Responses are handled through POST requests. - }, onDone: () { - connection.close(); }); + _connectionController.add(connection); }); return null; diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index a86543f75..e9dfe3df1 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -14,7 +14,6 @@ dependencies: async: ^2.0.8 http: ^0.12.0+1 logging: ^0.11.3+2 - pedantic: ^1.4.0 stream_channel: ^1.6.8 shelf: ^0.7.4 uuid: ^1.0.3 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index d6e04451b..a9db7d907 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -55,12 +55,12 @@ void main() { var connections = handler.connections; await webdriver.get('http://localhost:${server.port}'); var connectionA = await connections.next; + connectionA.sink.add('foo'); + expect(await connectionA.stream.first, 'foo'); + await webdriver.get('http://localhost:${server.port}'); var connectionB = await connections.next; - - connectionA.sink.add('foo'); connectionB.sink.add('bar'); - await connectionA.onClose; expect(await connectionB.stream.first, 'bar'); }); @@ -69,8 +69,8 @@ void main() { await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; expect(handler.numberOfClients, 1); - connection.close(); - await connection.onClose; + await connection.sink.close(); + await pumpEventQueue(); expect(handler.numberOfClients, 0); }); @@ -83,7 +83,8 @@ void main() { var closeButton = await webdriver.findElement(const By.tagName('button')); await closeButton.click(); - await connection.onClose; + // Stream should complete. + await connection.stream.toList(); expect(handler.numberOfClients, 0); }); From 8db90881db162d5b722aec44a5cdf1d5d4af8509 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 18:55:17 -0800 Subject: [PATCH 009/115] add test --- pkgs/sse/lib/server/sse_handler.dart | 10 +++++++--- pkgs/sse/test/sse_test.dart | 26 +++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index abec5cf29..07e9a783f 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -88,7 +88,7 @@ class SseHandler { void close() { if (!_connectionController.isClosed) _connectionController.close(); - for (var connection in _connections) { + for (var connection in _connections.toList()) { connection.sink.close(); _connections.remove(connection); } @@ -101,8 +101,12 @@ class SseHandler { var clientId = req.url.queryParameters['sseClientId']; var connection = SseConnection(sink, clientId); _connections.add(connection); - // Remove connection when it is remotely closed. - channel.stream.listen((_) {}, onDone: () { + // Remove connection when it is remotely closed or the stream is + // cancelled. + channel.stream.listen((_) { + // SSE is unidirectional. Responses are handled through POST requests. + }, onDone: () { + // Trigger closing the connection. connection.sink.close(); _connections.remove(connection); }); diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index a9db7d907..c21345e46 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -83,7 +83,31 @@ void main() { var closeButton = await webdriver.findElement(const By.tagName('button')); await closeButton.click(); - // Stream should complete. + // Should complete since the connection is closed. + await connection.stream.toList(); + expect(handler.numberOfClients, 0); + }); + + test('Cancelling the listener closes the conneciton', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + var sub = connection.stream.listen((_) {}); + await sub.cancel(); + await pumpEventQueue(); + expect(handler.numberOfClients, 0); + }); + + test('Can close the handler which closes the connections', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + handler.close(); + // Should complete since the connection is closed. await connection.stream.toList(); expect(handler.numberOfClients, 0); }); From 978fad5ca1b406fcff259e587d54e38d49d36fd2 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 18:55:43 -0800 Subject: [PATCH 010/115] update pubspec --- pkgs/sse/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index e9dfe3df1..e2a5c985c 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 1.0.0 +version: 2.0.0 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- From f6f9d6462b16821d59c8f86235be8baded8073b3 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 19:03:17 -0800 Subject: [PATCH 011/115] use a map --- pkgs/sse/lib/server/sse_handler.dart | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 07e9a783f..7a5ac0e9f 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -71,14 +71,14 @@ class SseConnection extends StreamChannelMixin { class SseHandler { final _logger = Logger('SseHandler'); final Uri _uri; - - final _connections = {}; - + final _connections = {}; final _connectionController = StreamController(); + var _isClosed = false; StreamQueue _connectionsStream; SseHandler(this._uri); + StreamQueue get connections => _connectionsStream ??= StreamQueue(_connectionController.stream); @@ -87,20 +87,22 @@ class SseHandler { int get numberOfClients => _connections.length; void close() { + _isClosed = true; if (!_connectionController.isClosed) _connectionController.close(); - for (var connection in _connections.toList()) { + for (var connection in _connections.values.toList()) { connection.sink.close(); - _connections.remove(connection); + _connections.remove(connection._clientId); } } shelf.Response _createSseConnection(shelf.Request req, String path) { + if (_isClosed) return null; req.hijack((channel) async { var sink = utf8.encoder.startChunkedConversion(channel.sink); sink.add(_sseHeaders(req.headers['origin'])); var clientId = req.url.queryParameters['sseClientId']; var connection = SseConnection(sink, clientId); - _connections.add(connection); + _connections[clientId] = connection; // Remove connection when it is remotely closed or the stream is // cancelled. channel.stream.listen((_) { @@ -108,7 +110,7 @@ class SseHandler { }, onDone: () { // Trigger closing the connection. connection.sink.close(); - _connections.remove(connection); + _connections.remove(clientId); }); _connectionController.add(connection); @@ -141,11 +143,8 @@ class SseHandler { var clientId = req.url.queryParameters['sseClientId']; var message = await req.readAsString(); var jsonObject = json.decode(message) as String; - for (var connection in _connections) { - if (connection._clientId == clientId) { - connection._incomingController.add(jsonObject); - } - } + var connection = _connections[clientId]; + if (connection != null) connection._incomingController.add(jsonObject); } catch (e, st) { _logger.fine('Failed to handle incoming message. $e $st'); } From 26ad2438c8979fdc9aecd925d5736637b745a107 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 19:09:26 -0800 Subject: [PATCH 012/115] fix typo add test --- pkgs/sse/lib/server/sse_handler.dart | 4 ++-- pkgs/sse/test/sse_test.dart | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 7a5ac0e9f..9c1f57ffc 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -96,7 +96,7 @@ class SseHandler { } shelf.Response _createSseConnection(shelf.Request req, String path) { - if (_isClosed) return null; + if (_isClosed) return shelf.Response.notFound(''); req.hijack((channel) async { var sink = utf8.encoder.startChunkedConversion(channel.sink); sink.add(_sseHeaders(req.headers['origin'])); @@ -115,7 +115,7 @@ class SseHandler { _connectionController.add(connection); }); - return null; + return shelf.Response.notFound(''); } String _getOriginalPath(shelf.Request req) => req.requestedUri.path; diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index c21345e46..63c4b8eb1 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -88,7 +88,7 @@ void main() { expect(handler.numberOfClients, 0); }); - test('Cancelling the listener closes the conneciton', () async { + test('Cancelling the listener closes the connection', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; @@ -112,6 +112,21 @@ void main() { expect(handler.numberOfClients, 0); }); + test('Closing the handler prevents new connections', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + handler.close(); + // Should complete since the connection is closed. + await connection.stream.toList(); + assert(handler.numberOfClients == 0); + + await webdriver.get('http://localhost:${server.port}'); + expect(await handler.connections.hasNext, isFalse); + }); + test('Disconnects when navigating away', () async { await webdriver.get('http://localhost:${server.port}'); expect(handler.numberOfClients, 1); From bf44a343c517a94f612cf6105557be5777c1e582 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 19:13:25 -0800 Subject: [PATCH 013/115] update chromedriver --- pkgs/sse/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index 21c6fe6a0..b69076673 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -29,7 +29,7 @@ before_install: - sh -e /etc/init.d/xvfb start before_script: - - wget http://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip + - wget http://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip - unzip chromedriver_linux64.zip - export PATH=$PATH:$PWD - ./tool/travis-setup.sh From 6eda9468a638265a9d31fd618c462edc5515bdc1 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 19:29:32 -0800 Subject: [PATCH 014/115] even later --- pkgs/sse/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index b69076673..9aa1d3c61 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -29,7 +29,7 @@ before_install: - sh -e /etc/init.d/xvfb start before_script: - - wget http://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip + - wget http://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip - unzip chromedriver_linux64.zip - export PATH=$PATH:$PWD - ./tool/travis-setup.sh From 651ed2e3e0290b8b08e6a953cb3a88364d33498b Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 19:43:05 -0800 Subject: [PATCH 015/115] make local testing better --- pkgs/sse/lib/server/sse_handler.dart | 4 ++-- pkgs/sse/test/sse_test.dart | 15 +++++++++++++++ pkgs/sse/tool/travis.sh | 4 ---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 9c1f57ffc..7a5ac0e9f 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -96,7 +96,7 @@ class SseHandler { } shelf.Response _createSseConnection(shelf.Request req, String path) { - if (_isClosed) return shelf.Response.notFound(''); + if (_isClosed) return null; req.hijack((channel) async { var sink = utf8.encoder.startChunkedConversion(channel.sink); sink.add(_sseHeaders(req.headers['origin'])); @@ -115,7 +115,7 @@ class SseHandler { _connectionController.add(connection); }); - return shelf.Response.notFound(''); + return null; } String _getOriginalPath(shelf.Request req) => req.requestedUri.path; diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 63c4b8eb1..4e1f94328 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -17,6 +17,21 @@ void main() { HttpServer server; WebDriver webdriver; SseHandler handler; + Process chromeDriver; + + setUpAll(() async { + try { + chromeDriver = await Process.start( + 'chromedriver', ['--port=4444', '--url-base=wd/hub']); + } catch (e) { + throw StateError( + 'Could not start ChromeDriver. Is it installed?\nError: $e'); + } + }); + + tearDownAll(() { + chromeDriver.kill(); + }); setUp(() async { handler = SseHandler(Uri.parse('/test')); diff --git a/pkgs/sse/tool/travis.sh b/pkgs/sse/tool/travis.sh index b9c9c9fd1..9ebd3d425 100755 --- a/pkgs/sse/tool/travis.sh +++ b/pkgs/sse/tool/travis.sh @@ -23,10 +23,6 @@ if [[ $ANALYSIS_STATUS -ne 0 ]]; then STATUS=$ANALYSIS_STATUS fi -# Start chromedriver. -chromedriver --port=4444 --url-base=wd/hub & -PIDC=$! - # Run tests. pub run test -r expanded -p vm -j 1 TEST_STATUS=$? From 11224938f60e4ac3063a427669ed0c3b91ff1370 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 19:56:49 -0800 Subject: [PATCH 016/115] maybe this will fix it? --- pkgs/sse/lib/server/sse_handler.dart | 4 ++-- pkgs/sse/test/sse_test.dart | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 7a5ac0e9f..9c1f57ffc 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -96,7 +96,7 @@ class SseHandler { } shelf.Response _createSseConnection(shelf.Request req, String path) { - if (_isClosed) return null; + if (_isClosed) return shelf.Response.notFound(''); req.hijack((channel) async { var sink = utf8.encoder.startChunkedConversion(channel.sink); sink.add(_sseHeaders(req.headers['origin'])); @@ -115,7 +115,7 @@ class SseHandler { _connectionController.add(connection); }); - return null; + return shelf.Response.notFound(''); } String _getOriginalPath(shelf.Request req) => req.requestedUri.path; diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 4e1f94328..9e524243a 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -43,7 +43,11 @@ void main() { listDirectories: true, defaultDocument: 'index.html')); server = await io.serve(cascade.handler, 'localhost', 0); - webdriver = await createDriver(); + webdriver = await createDriver(desired: { + 'chromeOptions': { + 'args': ['--headless'] + } + }); }); tearDown(() async { From f17cdb667658d0180352e78a6a47df2dce2ebfaf Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 8 Mar 2019 20:18:02 -0800 Subject: [PATCH 017/115] remove connections faster --- pkgs/sse/lib/server/sse_handler.dart | 16 +++++++++------- pkgs/sse/pubspec.yaml | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 9c1f57ffc..0c06a142d 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -7,6 +7,7 @@ import 'dart:convert'; import 'package:async/async.dart'; import 'package:logging/logging.dart'; +import 'package:pedantic/pedantic.dart'; import 'package:shelf/shelf.dart' as shelf; import 'package:stream_channel/stream_channel.dart'; @@ -28,11 +29,11 @@ class SseConnection extends StreamChannelMixin { final Sink _sink; final String _clientId; - var _isClosed = false; + final _closedCompleter = Completer(); SseConnection(this._sink, this._clientId) { _outgoingController.stream.listen((data) { - if (!_isClosed) { + if (!_closedCompleter.isCompleted) { // JSON encode the message to escape new lines. _sink.add('data: ${json.encode(data)}\n'); _sink.add('\n'); @@ -54,8 +55,8 @@ class SseConnection extends StreamChannelMixin { Stream get stream => _incomingController.stream; void _close() { - if (!_isClosed) { - _isClosed = true; + if (!_closedCompleter.isCompleted) { + _closedCompleter.complete(); _sink.close(); if (!_outgoingController.isClosed) _outgoingController.close(); if (!_incomingController.isClosed) _incomingController.close(); @@ -103,14 +104,15 @@ class SseHandler { var clientId = req.url.queryParameters['sseClientId']; var connection = SseConnection(sink, clientId); _connections[clientId] = connection; + unawaited(connection._closedCompleter.future.then((_) { + _connections.remove(clientId); + })); // Remove connection when it is remotely closed or the stream is // cancelled. channel.stream.listen((_) { // SSE is unidirectional. Responses are handled through POST requests. }, onDone: () { - // Trigger closing the connection. - connection.sink.close(); - _connections.remove(clientId); + connection._close(); }); _connectionController.add(connection); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index e2a5c985c..054332bf3 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -14,6 +14,7 @@ dependencies: async: ^2.0.8 http: ^0.12.0+1 logging: ^0.11.3+2 + pedantic: ^1.4.0 stream_channel: ^1.6.8 shelf: ^0.7.4 uuid: ^1.0.3 From 4af668317faa58498037f0b2c290a23db46075de Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Mon, 11 Mar 2019 14:14:49 -0700 Subject: [PATCH 018/115] don't expose close --- pkgs/sse/lib/server/sse_handler.dart | 21 +++++---------------- pkgs/sse/test/sse_test.dart | 27 --------------------------- 2 files changed, 5 insertions(+), 43 deletions(-) diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 0c06a142d..969ef9b5b 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -21,17 +21,17 @@ String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' /// A bi-directional SSE connection between server and browser. class SseConnection extends StreamChannelMixin { - // Incoming messages from the Browser client. + /// Incoming messages from the Browser client. final _incomingController = StreamController(); - // Outgoing messages to the Browser client. + + /// Outgoing messages to the Browser client. final _outgoingController = StreamController(); final Sink _sink; - final String _clientId; final _closedCompleter = Completer(); - SseConnection(this._sink, this._clientId) { + SseConnection(this._sink) { _outgoingController.stream.listen((data) { if (!_closedCompleter.isCompleted) { // JSON encode the message to escape new lines. @@ -75,7 +75,6 @@ class SseHandler { final _connections = {}; final _connectionController = StreamController(); - var _isClosed = false; StreamQueue _connectionsStream; SseHandler(this._uri); @@ -87,22 +86,12 @@ class SseHandler { int get numberOfClients => _connections.length; - void close() { - _isClosed = true; - if (!_connectionController.isClosed) _connectionController.close(); - for (var connection in _connections.values.toList()) { - connection.sink.close(); - _connections.remove(connection._clientId); - } - } - shelf.Response _createSseConnection(shelf.Request req, String path) { - if (_isClosed) return shelf.Response.notFound(''); req.hijack((channel) async { var sink = utf8.encoder.startChunkedConversion(channel.sink); sink.add(_sseHeaders(req.headers['origin'])); var clientId = req.url.queryParameters['sseClientId']; - var connection = SseConnection(sink, clientId); + var connection = SseConnection(sink); _connections[clientId] = connection; unawaited(connection._closedCompleter.future.then((_) { _connections.remove(clientId); diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 9e524243a..16a9a0ce8 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -119,33 +119,6 @@ void main() { expect(handler.numberOfClients, 0); }); - test('Can close the handler which closes the connections', () async { - expect(handler.numberOfClients, 0); - await webdriver.get('http://localhost:${server.port}'); - var connection = await handler.connections.next; - expect(handler.numberOfClients, 1); - - handler.close(); - // Should complete since the connection is closed. - await connection.stream.toList(); - expect(handler.numberOfClients, 0); - }); - - test('Closing the handler prevents new connections', () async { - expect(handler.numberOfClients, 0); - await webdriver.get('http://localhost:${server.port}'); - var connection = await handler.connections.next; - expect(handler.numberOfClients, 1); - - handler.close(); - // Should complete since the connection is closed. - await connection.stream.toList(); - assert(handler.numberOfClients == 0); - - await webdriver.get('http://localhost:${server.port}'); - expect(await handler.connections.hasNext, isFalse); - }); - test('Disconnects when navigating away', () async { await webdriver.get('http://localhost:${server.port}'); expect(handler.numberOfClients, 1); From 2198d4440e7c8bd247a75990723bbc993bb96eb9 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Mon, 11 Mar 2019 14:16:45 -0700 Subject: [PATCH 019/115] null aware --- pkgs/sse/lib/server/sse_handler.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 969ef9b5b..a3067f6da 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -134,8 +134,7 @@ class SseHandler { var clientId = req.url.queryParameters['sseClientId']; var message = await req.readAsString(); var jsonObject = json.decode(message) as String; - var connection = _connections[clientId]; - if (connection != null) connection._incomingController.add(jsonObject); + _connections[clientId]?._incomingController?.add(jsonObject); } catch (e, st) { _logger.fine('Failed to handle incoming message. $e $st'); } From c0a5bc406203cb0cc69775b0056c64e9b8190cc5 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Mon, 11 Mar 2019 14:20:01 -0700 Subject: [PATCH 020/115] use stable chrome --- pkgs/sse/.travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index 9aa1d3c61..3b66d0dc0 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -4,6 +4,7 @@ language: dart sudo: required dist: trusty addons: + chrome: stable apt: sources: - google-chrome From ab6adf081108f28e1d8a0653ea9d68a38bba4fb7 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Wed, 20 Mar 2019 10:55:57 -0700 Subject: [PATCH 021/115] update to uuid version 2.0 --- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/lib/client/sse_client.dart | 2 +- pkgs/sse/pubspec.yaml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index ba13a265f..2ed8fb7fa 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.1 + +- Update to `package:uuid` version 2.0. + ## 2.0.0 - No longer expose `close` and `onClose` on an `SseConnection`. This is simply diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 65bbbeec7..8e5db6ffb 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -31,7 +31,7 @@ class SseClient extends StreamChannelMixin { /// [serverUrl] is the URL under which the server is listening for /// incoming bi-directional SSE connections. SseClient(String serverUrl) { - var clientId = '${Uuid().v1()}'; + var clientId = Uuid().v1(); _eventSource = new EventSource('$serverUrl?sseClientId=$clientId', withCredentials: true); _serverUrl = '$serverUrl?sseClientId=$clientId'; diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 054332bf3..c3abb41aa 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 2.0.0 +version: 2.0.1 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- @@ -17,7 +17,7 @@ dependencies: pedantic: ^1.4.0 stream_channel: ^1.6.8 shelf: ^0.7.4 - uuid: ^1.0.3 + uuid: ^2.0.0 dev_dependencies: shelf_static: ^0.2.8 From 85f6bc249f6bf940fcbbfe6dced6de66f234b7c0 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 20 Apr 2019 16:09:54 -0700 Subject: [PATCH 022/115] Enable and fix lints --- pkgs/sse/analysis_options.yaml | 5 ++++- pkgs/sse/lib/client/sse_client.dart | 12 ++++++------ pkgs/sse/test/sse_test.dart | 10 ++++------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index b59f3bb72..0e180e426 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -1,3 +1,4 @@ +include: package:pedantic/analysis_options.yaml analyzer: strong-mode: implicit-casts: false @@ -58,6 +59,7 @@ linter: - prefer_equal_for_default_values - prefer_final_fields #- prefer_final_locals + - prefer_generic_function_type_aliases - prefer_initializing_formals - prefer_interpolation_to_compose_strings - prefer_is_empty @@ -66,14 +68,15 @@ linter: - prefer_typing_uninitialized_variables - recursive_getters - slash_for_doc_comments - - super_goes_last - test_types_in_equals - throw_in_finally - type_init_formals - unawaited_futures - unnecessary_brace_in_string_interps + - unnecessary_const - unnecessary_getters_setters - unnecessary_lambdas + - unnecessary_new - unnecessary_null_aware_assignments - unnecessary_statements - unnecessary_this diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 8e5db6ffb..ab0b0338c 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -16,11 +16,11 @@ import 'package:uuid/uuid.dart'; /// The client can send any JSON-encodable messages to the server by adding /// them to the [sink] and listen to messages from the server on the [stream]. class SseClient extends StreamChannelMixin { - final _incomingController = new StreamController(); + final _incomingController = StreamController(); - final _outgoingController = new StreamController(); + final _outgoingController = StreamController(); - final _client = new BrowserClient()..withCredentials = true; + final _client = BrowserClient()..withCredentials = true; final _logger = Logger('SseClient'); @@ -32,8 +32,8 @@ class SseClient extends StreamChannelMixin { /// incoming bi-directional SSE connections. SseClient(String serverUrl) { var clientId = Uuid().v1(); - _eventSource = new EventSource('$serverUrl?sseClientId=$clientId', - withCredentials: true); + _eventSource = + EventSource('$serverUrl?sseClientId=$clientId', withCredentials: true); _serverUrl = '$serverUrl?sseClientId=$clientId'; _outgoingController.stream .listen(_onOutgoingMessage, onDone: _onOutgoingDone); @@ -69,7 +69,7 @@ class SseClient extends StreamChannelMixin { if (data == 'close') { close(); } else { - throw new UnsupportedError('Illegal Control Message "$data"'); + throw UnsupportedError('Illegal Control Message "$data"'); } } diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 16a9a0ce8..636bab9c0 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -36,10 +36,8 @@ void main() { setUp(() async { handler = SseHandler(Uri.parse('/test')); - var cascade = new shelf.Cascade() - .add(handler.handler) - .add(_faviconHandler) - .add(createStaticHandler('test/web', + var cascade = shelf.Cascade().add(handler.handler).add(_faviconHandler).add( + createStaticHandler('test/web', listDirectories: true, defaultDocument: 'index.html')); server = await io.serve(cascade.handler, 'localhost', 0); @@ -130,7 +128,7 @@ void main() { FutureOr _faviconHandler(shelf.Request request) { if (request.url.path.endsWith('favicon.ico')) { - return new shelf.Response.ok(''); + return shelf.Response.ok(''); } - return new shelf.Response.notFound(''); + return shelf.Response.notFound(''); } From 8041be6d04f69e27c83b7249d3dab5484dc3074e Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 20 Apr 2019 16:11:10 -0700 Subject: [PATCH 023/115] Support the latest pkg:stream_channel --- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 2ed8fb7fa..da6942064 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.2 + +- Support the latest `package:stream_channel`. + ## 2.0.1 - Update to `package:uuid` version 2.0. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index c3abb41aa..67bdd6603 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 2.0.1 +version: 2.0.2-dev author: Dart Team homepage: https://github.com/dart-lang/sse description: >- @@ -15,7 +15,7 @@ dependencies: http: ^0.12.0+1 logging: ^0.11.3+2 pedantic: ^1.4.0 - stream_channel: ^1.6.8 + stream_channel: '>=1.6.8 <3.0.0' shelf: ^0.7.4 uuid: ^2.0.0 From 2daec51511168d16e36777e1af179ceb05e7b731 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 20 Apr 2019 16:12:50 -0700 Subject: [PATCH 024/115] Test on oldest supported SDK, bump SDK to 2.1.0 --- pkgs/sse/.travis.yml | 6 +----- pkgs/sse/CHANGELOG.md | 1 + pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index 3b66d0dc0..36eb96006 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -14,14 +14,10 @@ addons: dart: - dev - - stable + - 2.1.0 with_content_shell: false -matrix: - allow_failures: - - dart: dev - before_install: - export CHROMEDRIVER_BINARY=/usr/bin/google-chrome - export CHROMEDRIVER_ARGS=--no-sandbox diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index da6942064..87bb5ef47 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,6 +1,7 @@ ## 2.0.2 - Support the latest `package:stream_channel`. +- Require Dart SDK `>=2.1.0 <3.0.0`. ## 2.0.1 diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 67bdd6603..7f4b9484a 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -8,7 +8,7 @@ description: >- requests. environment: - sdk: ">=2.0.0-dev.64.1 <3.0.0" + sdk: ">=2.1.0 <3.0.0" dependencies: async: ^2.0.8 From 256cef613fcc9543c406d658d1c56d726fa3a3d7 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 26 Apr 2019 14:06:00 -0700 Subject: [PATCH 025/115] prepare for release --- pkgs/sse/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 7f4b9484a..fd170d7ea 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 2.0.2-dev +version: 2.0.2 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- From b438bbd0c66a218ae72f096a31a742de8431f044 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Tue, 6 Aug 2019 16:59:00 -0700 Subject: [PATCH 026/115] Download the chromedriver version based on the chrome version (dart-lang/sse#9) * Download the chromedriver version based on the chrome version * fix webdriver --- pkgs/sse/.travis.yml | 4 +++- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/sse_test.dart | 12 +++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index 36eb96006..37566416c 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -26,7 +26,9 @@ before_install: - sh -e /etc/init.d/xvfb start before_script: - - wget http://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip + - "export CHROME_LATEST_VERSION=$(/usr/bin/google-chrome --version | cut -d' ' -f3 | cut -d'.' -f1)" + - "export CHROME_DRIVER_VERSION=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_LATEST_VERSION)" + - "wget https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip" - unzip chromedriver_linux64.zip - export PATH=$PATH:$PWD - ./tool/travis-setup.sh diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index fd170d7ea..923326efd 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -22,4 +22,4 @@ dependencies: dev_dependencies: shelf_static: ^0.2.8 test: ^1.5.3 - webdriver: ^2.0.0 + webdriver: ^2.1.0 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 636bab9c0..62fe4c6cb 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -41,11 +41,13 @@ void main() { listDirectories: true, defaultDocument: 'index.html')); server = await io.serve(cascade.handler, 'localhost', 0); - webdriver = await createDriver(desired: { - 'chromeOptions': { - 'args': ['--headless'] - } - }); + var capabilities = Capabilities.chrome + ..addAll({ + Capabilities.chromeOptions: { + 'args': ['--headless'] + } + }); + webdriver = await createDriver(desired: capabilities); }); tearDown(() async { From 13beef788476759ad04108e66972f7a496d08cd5 Mon Sep 17 00:00:00 2001 From: Pi Songkuntham Date: Wed, 28 Aug 2019 16:57:37 -0700 Subject: [PATCH 027/115] Fixed race condition for posting messages. (dart-lang/sse#11) Address dart-lang/sse#10 --- pkgs/sse/lib/client/sse_client.dart | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index ab0b0338c..0ca8092b2 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -40,6 +40,7 @@ class SseClient extends StreamChannelMixin { _eventSource.addEventListener('message', _onIncomingMessage); _eventSource.addEventListener('control', _onIncomingControlMessage); _eventSource.onError.listen(_incomingController.addError); + _startPostingMessages(); } Stream get onOpen => _eventSource.onOpen; @@ -83,12 +84,21 @@ class SseClient extends StreamChannelMixin { close(); } + final _messages = StreamController(); + void _onOutgoingMessage(dynamic message) async { - var encoded = jsonEncode(message); - try { - await _client.post(_serverUrl, body: encoded); - } catch (e) { - _logger.warning('Unable to encode outgoing message: $e'); + _messages.add(message); + } + + void _startPostingMessages() async { + await for (var message in _messages.stream) { + try { + await _client.post(_serverUrl, body: jsonEncode(message)); + } on JsonUnsupportedObjectError catch (e) { + _logger.warning('Unable to encode outgoing message: $e'); + } on ArgumentError catch (e) { + _logger.warning('Invalid argument: $e'); + } } } } From 8c4b2acfc2610a728f703653e6faa07a41c37338 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 4 Sep 2019 15:55:08 -0700 Subject: [PATCH 028/115] prep to publish (dart-lang/sse#12) --- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 87bb5ef47..8246f134f 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.3 + +- Fix an issue where messages could come out of order. + ## 2.0.2 - Support the latest `package:stream_channel`. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 923326efd..649ffc2e7 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 2.0.2 +version: 2.0.3 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- From b6f290dd53f6b91cacd976700b828515e75ea3c4 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 11 Sep 2019 10:33:34 -0700 Subject: [PATCH 029/115] Support Firefox (dart-lang/sse#13) * Support firefox --- pkgs/sse/.travis.yml | 21 ++++----------------- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/lib/server/sse_handler.dart | 19 ++++++++++++------- pkgs/sse/pubspec.yaml | 2 +- 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index 37566416c..e0371f64f 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -1,16 +1,7 @@ language: dart -# This is necessary to use proper Chrome. Travis's version of chromium is from -# 2014. sudo: required -dist: trusty addons: chrome: stable - apt: - sources: - - google-chrome - packages: - - google-chrome-stable - firefox: latest dart: - dev @@ -19,18 +10,14 @@ dart: with_content_shell: false before_install: - - export CHROMEDRIVER_BINARY=/usr/bin/google-chrome - - export CHROMEDRIVER_ARGS=--no-sandbox - - /usr/bin/google-chrome --version - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start - -before_script: + - "export CHROMEDRIVER_BINARY=/usr/bin/google-chrome" + - "export CHROMEDRIVER_ARGS=--no-sandbox" + - "/usr/bin/google-chrome --version" - "export CHROME_LATEST_VERSION=$(/usr/bin/google-chrome --version | cut -d' ' -f3 | cut -d'.' -f1)" - "export CHROME_DRIVER_VERSION=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_LATEST_VERSION)" - "wget https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip" - unzip chromedriver_linux64.zip - - export PATH=$PATH:$PWD + - "export PATH=$PATH:$PWD" - ./tool/travis-setup.sh script: diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 8246f134f..a1921dba1 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.0 + +- Support Firefox. + ## 2.0.3 - Fix an issue where messages could come out of order. diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index a3067f6da..83017ff73 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -12,12 +12,12 @@ import 'package:shelf/shelf.dart' as shelf; import 'package:stream_channel/stream_channel.dart'; String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' - 'Content-Type: text/event-stream\r\n' - 'Cache-Control: no-cache\r\n' - 'Connection: keep-alive\r\n' - 'Access-Control-Allow-Credentials: true\r\n' - 'Access-Control-Allow-Origin: $origin\r\n' - '\r\n'; + 'Content-Type: text/event-stream\n\n' + 'Cache-Control: no-cache\n\n' + 'Connection: keep-alive\n\n' + 'Access-Control-Allow-Credentials: true\n\n' + 'Access-Control-Allow-Origin: $origin\n\n' + '\n\n'; /// A bi-directional SSE connection between server and browser. class SseConnection extends StreamChannelMixin { @@ -140,7 +140,12 @@ class SseHandler { } return shelf.Response.ok('', headers: { 'access-control-allow-credentials': 'true', - 'access-control-allow-origin': req.headers['origin'] + 'access-control-allow-origin': _originFor(req), }); } + + String _originFor(shelf.Request req) => + // Firefox does not set header "origin". + // https://bugzilla.mozilla.org/show_bug.cgi?id=1508661 + req.headers['origin'] ?? req.headers['host']; } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 649ffc2e7..e2631cca3 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 2.0.3 +version: 2.1.0 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- From 3bdc3af4feba323675bf1fbfda34ecf4e9f62afa Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 11 Sep 2019 17:25:33 -0700 Subject: [PATCH 030/115] Use proper header delimiter (dart-lang/sse#14) * Use proper header delimiter. --- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/lib/server/sse_handler.dart | 13 +++++++------ pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index a1921dba1..232aa09c1 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.1 + +- Use proper headers delimiter. + ## 2.1.0 - Support Firefox. diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 83017ff73..1a5ef0681 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -11,13 +11,14 @@ import 'package:pedantic/pedantic.dart'; import 'package:shelf/shelf.dart' as shelf; import 'package:stream_channel/stream_channel.dart'; +// RFC 2616 requires carriage return delimiters. String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' - 'Content-Type: text/event-stream\n\n' - 'Cache-Control: no-cache\n\n' - 'Connection: keep-alive\n\n' - 'Access-Control-Allow-Credentials: true\n\n' - 'Access-Control-Allow-Origin: $origin\n\n' - '\n\n'; + 'Content-Type: text/event-stream\r\n' + 'Cache-Control: no-cache\r\n' + 'Connection: keep-alive\r\n' + 'Access-Control-Allow-Credentials: true\r\n' + 'Access-Control-Allow-Origin: $origin\r\n' + '\r\n\r\n'; /// A bi-directional SSE connection between server and browser. class SseConnection extends StreamChannelMixin { diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index e2631cca3..ae8b8fe4a 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 2.1.0 +version: 2.1.1 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- From 057fb711435d28c1ccc368b734a5bfcf30bfa14f Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Mon, 14 Oct 2019 15:14:55 -0700 Subject: [PATCH 031/115] Remove package:http dependency (dart-lang/sse#15) * Remove http dependency --- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/lib/client/sse_client.dart | 9 ++++----- pkgs/sse/pubspec.yaml | 3 +-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 232aa09c1..86de26f92 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.2 + +- Remove `package:http` dependency. + ## 2.1.1 - Use proper headers delimiter. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 0ca8092b2..8ef0fc481 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -6,7 +6,6 @@ import 'dart:async'; import 'dart:convert'; import 'dart:html'; -import 'package:http/browser_client.dart'; import 'package:logging/logging.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:uuid/uuid.dart'; @@ -20,8 +19,6 @@ class SseClient extends StreamChannelMixin { final _outgoingController = StreamController(); - final _client = BrowserClient()..withCredentials = true; - final _logger = Logger('SseClient'); EventSource _eventSource; @@ -62,7 +59,6 @@ class SseClient extends StreamChannelMixin { _eventSource.close(); _incomingController.close(); _outgoingController.close(); - _client.close(); } void _onIncomingControlMessage(Event message) { @@ -93,7 +89,10 @@ class SseClient extends StreamChannelMixin { void _startPostingMessages() async { await for (var message in _messages.stream) { try { - await _client.post(_serverUrl, body: jsonEncode(message)); + await HttpRequest.request(_serverUrl, + method: 'POST', + sendData: jsonEncode(message), + withCredentials: true); } on JsonUnsupportedObjectError catch (e) { _logger.warning('Unable to encode outgoing message: $e'); } on ArgumentError catch (e) { diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index ae8b8fe4a..826db6add 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 2.1.1 +version: 2.1.2 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- @@ -12,7 +12,6 @@ environment: dependencies: async: ^2.0.8 - http: ^0.12.0+1 logging: ^0.11.3+2 pedantic: ^1.4.0 stream_channel: '>=1.6.8 <3.0.0' From e82e5c727f1497d6021b9c64b3f35d3f22f754b2 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Nov 2019 13:59:01 -0800 Subject: [PATCH 032/115] Add retry logic (dart-lang/sse#17) * Add retry logic --- pkgs/sse/CHANGELOG.md | 7 + pkgs/sse/lib/client/sse_client.dart | 17 +- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/web/index.dart.js | 13993 ++++++++++++++------------ 4 files changed, 7438 insertions(+), 6581 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 86de26f92..f46643e19 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,10 @@ +## 3.0.0 + +- Add retry logic. + +** Possible Breaking Change ** Error messages may now be delayed up to 5 seconds +in the client. + ## 2.1.2 - Remove `package:http` dependency. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 8ef0fc481..764e566a6 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -25,6 +25,8 @@ class SseClient extends StreamChannelMixin { String _serverUrl; + Timer _errorTimer; + /// [serverUrl] is the URL under which the server is listening for /// incoming bi-directional SSE connections. SseClient(String serverUrl) { @@ -36,7 +38,20 @@ class SseClient extends StreamChannelMixin { .listen(_onOutgoingMessage, onDone: _onOutgoingDone); _eventSource.addEventListener('message', _onIncomingMessage); _eventSource.addEventListener('control', _onIncomingControlMessage); - _eventSource.onError.listen(_incomingController.addError); + _eventSource.onOpen.listen((_) { + _errorTimer?.cancel(); + }); + _eventSource.onError.listen((error) { + if (!(_errorTimer?.isActive ?? false)) { + // By default the SSE client uses keep-alive. + // Allow for a retry to connect before giving up. + _errorTimer = Timer(const Duration(seconds: 5), () { + _incomingController.addError(error); + _eventSource.close(); + }); + } + }); + _startPostingMessages(); } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 826db6add..33fc5fb42 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 2.1.2 +version: 3.0.0 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index f62fd59bc..caabae548 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,6422 +1,7180 @@ -(function(){var supportsDirectProtoAccess=function(){var z=function(){} -z.prototype={p:{}} -var y=new z() -if(!(y.__proto__&&y.__proto__.p===z.prototype.p))return false -try{if(typeof navigator!="undefined"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Chrome/")>=0)return true -if(typeof version=="function"&&version.length==0){var x=version() -if(/^\d+\.\d+\.\d+\.\d+$/.test(x))return true}}catch(w){}return false}() -function map(a){a=Object.create(null) -a.x=0 -delete a.x -return a}var A=map() -var B=map() -var C=map() -var D=map() -var E=map() -var F=map() -var G=map() -var H=map() -var J=map() -var K=map() -var L=map() -var M=map() -var N=map() -var O=map() -var P=map() -var Q=map() -var R=map() -var S=map() -var T=map() -var U=map() -var V=map() -var W=map() -var X=map() -var Y=map() -var Z=map() -function I(){}init() -function setupProgram(a,b,c){"use strict" -function generateAccessor(b0,b1,b2){var g=b0.split("-") -var f=g[0] -var e=f.length -var d=f.charCodeAt(e-1) -var a0 -if(g.length>1)a0=true -else a0=false -d=d>=60&&d<=64?d-59:d>=123&&d<=126?d-117:d>=37&&d<=43?d-27:0 -if(d){var a1=d&3 -var a2=d>>2 -var a3=f=f.substring(0,e-1) -var a4=f.indexOf(":") -if(a4>0){a3=f.substring(0,a4) -f=f.substring(a4+1)}if(a1){var a5=a1&2?"r":"" -var a6=a1&1?"this":"r" -var a7="return "+a6+"."+f -var a8=b2+".prototype.g"+a3+"=" -var a9="function("+a5+"){"+a7+"}" -if(a0)b1.push(a8+"$reflectable("+a9+");\n") -else b1.push(a8+a9+";\n")}if(a2){var a5=a2&2?"r,v":"v" -var a6=a2&1?"this":"r" -var a7=a6+"."+f+"=v" -var a8=b2+".prototype.s"+a3+"=" -var a9="function("+a5+"){"+a7+"}" -if(a0)b1.push(a8+"$reflectable("+a9+");\n") -else b1.push(a8+a9+";\n")}}return f}function defineClass(a4,a5){var g=[] -var f="function "+a4+"(" -var e="",d="" -for(var a0=0;a00){var a7=a6.split("+") -a6=a7[0] -var a8=a7[1] -finishClass(a8) -var a9=g[a8] -var b0=a9.prototype -var b1=g[c2].prototype -var b2=Object.keys(b0) -for(var b3=0;b3")addStubs(g,a1,d,false,[])}convertToFastObject(g) -g=g.__proto__ -g.$deferredAction()}function mixinDeferredActionHelper(d,e){var g -if(e.hasOwnProperty("$deferredAction"))g=e.$deferredAction -return function foo(){if(!supportsDirectProtoAccess)return -var f=this -while(!f.hasOwnProperty("$deferredAction"))f=f.__proto__ -if(g)f.$deferredAction=g -else{delete f.$deferredAction -convertToFastObject(f)}d.$deferredAction() -f.$deferredAction()}}function processClassData(b2,b3,b4){b3=convertToSlowObject(b3) -var g -var f=Object.keys(b3) -var e=false -var d=supportsDirectProtoAccess&&b2!="b" -for(var a0=0;a00)b3[g].$reflectable=a3}else if(a2===42){b3[g].$D=b3[a1] -var a4=b3.$methodsWithOptionalArguments -if(!a4)b3.$methodsWithOptionalArguments=a4={} -a4[a1]=g}else{var a5=b3[a1] -if(a1!=="^"&&a5!=null&&a5.constructor===Array&&a1!=="<>")if(d)e=true -else addStubs(b3,a5,a1,false,[]) -else g=a1}}if(e)b3.$deferredAction=finishAddStubsHelper -var a6=b3["^"],a7,a8,a9=a6 -var b0=a9.split(";") -a9=b0[1]?b0[1].split(","):[] -a8=b0[0] -a7=a8.split(":") -if(a7.length==2){a8=a7[0] -var b1=a7[1] -if(b1)b3.$S=function(b5){return function(){return init.types[b5]}}(b1)}if(a8)b4.pending[b2]=a8 -b4.combinedConstructorFunction+=defineClass(b2,a9) -b4.constructorsList.push(b2) -b4.collected[b2]=[m,b3] -i.push(b2)}function processStatics(a4,a5){var g=Object.keys(a4) -for(var f=0;f0)a4[a1].$reflectable=a2 -if(d&&d.length)init.typeInformation[a1]=d}else if(a0===42){m[a1].$D=d -var a3=a4.$methodsWithOptionalArguments -if(!a3)a4.$methodsWithOptionalArguments=a3={} -a3[e]=a1}else if(typeof d==="function"){m[a1=e]=d -h.push(e)}else if(d.constructor===Array)addStubs(m,d,e,true,h) -else{a1=e -processClassData(e,d,a5)}}}function addStubs(b6,b7,b8,b9,c0){var g=0,f=g,e=b7[g],d -if(typeof e=="string")d=b7[++g] -else{d=e -e=b8}if(typeof d=="number"){f=d -d=b7[++g]}b6[b8]=b6[e]=d -var a0=[d] -d.$stubName=b8 -c0.push(b8) -for(g++;g>1 -var a5=a3>>1 -var a6=(a3&1)===1 -var a7=a3===3 -var a8=a3===1 -var a9=b7[1] -var b0=a9>>1 -var b1=(a9&1)===1 -var b2=a5+b0 -var b3=b7[2] -if(typeof b3=="number")b7[2]=b3+c -if(b>0){var b4=3 -for(var a1=0;a1=z)throw H.a(P.aI(b,null,null)) -return a.splice(b,1)[0]}, -cO:function(a,b,c){var z -H.n(c,H.i(a,0)) -if(!!a.fixed$length)H.v(P.A("insert")) -z=a.length -if(b>z)throw H.a(P.aI(b,null,null)) -a.splice(b,0,c)}, -bQ:function(a,b,c){var z,y,x -H.l(c,"$isq",[H.i(a,0)],"$asq") -if(!!a.fixed$length)H.v(P.A("insertAll")) -P.dT(b,0,a.length,"index",null) -z=J.r(c) -if(!z.$isJ)c=z.b9(c) -y=J.Z(c) -this.si(a,a.length+y) -x=b+y -this.aB(a,x,a.length,a,b) -this.ac(a,b,x,c)}, -aM:function(a){if(!!a.fixed$length)H.v(P.A("removeLast")) -if(a.length===0)throw H.a(H.aa(a,-1)) -return a.pop()}, -J:function(a,b){var z,y -H.j(b,{func:1,ret:-1,args:[H.i(a,0)]}) -z=a.length -for(y=0;y=a.length)return H.k(a,b) -return a[b]}, -ad:function(a,b,c){if(b<0||b>a.length)throw H.a(P.z(b,0,a.length,"start",null)) -if(ca.length)throw H.a(P.z(c,b,a.length,"end",null)) -if(b===c)return H.o([],[H.i(a,0)]) -return H.o(a.slice(b,c),[H.i(a,0)])}, -gam:function(a){if(a.length>0)return a[0] -throw H.a(H.co())}, -ga9:function(a){var z=a.length -if(z>0)return a[z-1] -throw H.a(H.co())}, -aB:function(a,b,c,d,e){var z,y,x,w,v,u -z=H.i(a,0) -H.l(d,"$isq",[z],"$asq") -if(!!a.immutable$list)H.v(P.A("setRange")) -P.a8(b,c,a.length,null,null,null) -y=c-b -if(y===0)return -x=J.r(d) -if(!!x.$ish){H.l(d,"$ish",[z],"$ash") -w=e -v=d}else{v=x.a_(d,e).ab(0,!1) -w=0}z=J.Y(v) -if(w+y>z.gi(v))throw H.a(H.dx()) -if(w=0;--u)a[b+u]=z.j(v,w+u) -else for(u=0;u=a.length||b<0)throw H.a(H.aa(a,b)) -return a[b]}, -k:function(a,b,c){H.w(b) -H.n(c,H.i(a,0)) -if(!!a.immutable$list)H.v(P.A("indexed set")) -if(typeof b!=="number"||Math.floor(b)!==b)throw H.a(H.aa(a,b)) -if(b>=a.length||b<0)throw H.a(H.aa(a,b)) -a[b]=c}, -t:function(a,b){var z,y -z=[H.i(a,0)] -H.l(b,"$ish",z,"$ash") -y=C.c.t(a.length,b.gi(b)) -z=H.o([],z) -this.si(z,y) -this.ac(z,0,a.length,a) -this.ac(z,a.length,y,b) -return z}, -$isaV:1, -$asaV:I.aB, -$isJ:1, -$isq:1, -$ish:1, -p:{ -i2:function(a,b){if(a<0||a>4294967295)throw H.a(P.z(a,0,4294967295,"length",null)) -return J.dy(new Array(a),b)}, -dy:function(a,b){return J.bF(H.o(a,[b]))}, -bF:function(a){H.bx(a) -a.fixed$length=Array -return a}}}, -mk:{"^":"at;$ti"}, -c8:{"^":"b;a,b,c,0d,$ti", -scj:function(a){this.d=H.n(a,H.i(this,0))}, -gD:function(){return this.d}, -q:function(){var z,y,x -z=this.a -y=z.length -if(this.b!==y)throw H.a(H.c6(z)) -x=this.c -if(x>=y){this.scj(null) -return!1}this.scj(z[x]);++this.c -return!0}, -$isa_:1}, -bf:{"^":"W;", -fd:function(a){var z -if(a>=-2147483648&&a<=2147483647)return a|0 -if(isFinite(a)){z=a<0?Math.ceil(a):Math.floor(a) -return z+0}throw H.a(P.A(""+a+".toInt()"))}, -eE:function(a){var z,y -if(a>=0){if(a<=2147483647)return a|0}else if(a>=-2147483648){z=a|0 -return a===z?z:z-1}y=Math.floor(a) -if(isFinite(y))return y -throw H.a(P.A(""+a+".floor()"))}, -ar:function(a,b){var z,y,x,w -if(b<2||b>36)throw H.a(P.z(b,2,36,"radix",null)) -z=a.toString(b) -if(C.a.v(z,z.length-1)!==41)return z -y=/^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(z) -if(y==null)H.v(P.A("Unexpected toString result: "+z)) -x=y.length -if(1>=x)return H.k(y,1) -z=y[1] -if(3>=x)return H.k(y,3) -w=+y[3] -x=y[2] -if(x!=null){z+=x -w-=x.length}return z+C.a.U("0",w)}, -h:function(a){if(a===0&&1/a<0)return"-0.0" -else return""+a}, -gA:function(a){return a&0x1FFFFFFF}, -t:function(a,b){H.m7(b) -if(typeof b!=="number")throw H.a(H.O(b)) -return a+b}, -V:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) -return a-b}, -aS:function(a,b){var z=a%b -if(z===0)return 0 -if(z>0)return z -if(b<0)return z-b -else return z+b}, -bB:function(a,b){return(a|0)===a?a/b|0:this.e8(a,b)}, -e8:function(a,b){var z=a/b -if(z>=-2147483648&&z<=2147483647)return z|0 -if(z>0){if(z!==1/0)return Math.floor(z)}else if(z>-1/0)return Math.ceil(z) -throw H.a(P.A("Result of truncating division is "+H.d(z)+": "+H.d(a)+" ~/ "+b))}, -W:function(a,b){var z -if(a>0)z=this.cw(a,b) -else{z=b>31?31:b -z=a>>z>>>0}return z}, -e3:function(a,b){if(b<0)throw H.a(H.O(b)) -return this.cw(a,b)}, -cw:function(a,b){return b>31?0:a>>>b}, -C:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) -return ab}, -aQ:function(a,b){if(typeof b!=="number")throw H.a(H.O(b)) -return a>=b}, -$isb7:1, -$isdd:1}, -dz:{"^":"bf;",$isc:1}, -i4:{"^":"bf;"}, -bg:{"^":"W;", -v:function(a,b){if(b<0)throw H.a(H.aa(a,b)) -if(b>=a.length)H.v(H.aa(a,b)) -return a.charCodeAt(b)}, -n:function(a,b){if(b>=a.length)throw H.a(H.aa(a,b)) -return a.charCodeAt(b)}, -bG:function(a,b,c){if(c>b.length)throw H.a(P.z(c,0,b.length,null,null)) -return new H.kP(b,a,c)}, -bF:function(a,b){return this.bG(a,b,0)}, -aw:function(a,b,c){var z,y -if(c<0||c>b.length)throw H.a(P.z(c,0,b.length,null,null)) -z=a.length -if(c+z>b.length)return -for(y=0;yy)return!1 -return b===this.F(a,y-z)}, -aq:function(a,b,c,d){if(typeof b!=="number"||Math.floor(b)!==b)H.v(H.O(b)) -c=P.a8(b,c,a.length,null,null,null) -return H.fx(a,b,c,d)}, -H:function(a,b,c){var z -if(typeof c!=="number"||Math.floor(c)!==c)H.v(H.O(c)) -if(typeof c!=="number")return c.C() -if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) -z=c+b.length -if(z>a.length)return!1 -return b===a.substring(c,z)}, -M:function(a,b){return this.H(a,b,0)}, -l:function(a,b,c){if(typeof b!=="number"||Math.floor(b)!==b)H.v(H.O(b)) -if(c==null)c=a.length -if(typeof b!=="number")return b.C() -if(b<0)throw H.a(P.aI(b,null,null)) -if(b>c)throw H.a(P.aI(b,null,null)) -if(c>a.length)throw H.a(P.aI(c,null,null)) -return a.substring(b,c)}, -F:function(a,b){return this.l(a,b,null)}, -U:function(a,b){var z,y -H.w(b) -if(0>=b)return"" -if(b===1||a.length===0)return a -if(b!==b>>>0)throw H.a(C.L) -for(z=a,y="";!0;){if((b&1)===1)y=z+y -b=b>>>1 -if(b===0)break -z+=z}return y}, -eZ:function(a,b,c){var z=b-a.length -if(z<=0)return a -return a+this.U(c,z)}, -eY:function(a,b){return this.eZ(a,b," ")}, -an:function(a,b,c){var z -if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) -z=a.indexOf(b,c) -return z}, -bP:function(a,b){return this.an(a,b,0)}, -b6:function(a,b,c){var z,y -if(c==null)c=a.length -else if(c<0||c>a.length)throw H.a(P.z(c,0,a.length,null,null)) -z=b.length -y=a.length -if(c+z>y)c=y-z -return a.lastIndexOf(b,c)}, -bR:function(a,b){return this.b6(a,b,null)}, -ew:function(a,b,c){if(c>a.length)throw H.a(P.z(c,0,a.length,null,null)) -return H.fv(a,b,c)}, -au:function(a,b){return this.ew(a,b,0)}, -gB:function(a){return a.length===0}, -h:function(a){return a}, -gA:function(a){var z,y,x -for(z=a.length,y=0,x=0;x>6}y=536870911&y+((67108863&y)<<3) -y^=y>>11 -return 536870911&y+((16383&y)<<15)}, -gi:function(a){return a.length}, -j:function(a,b){if(b>=a.length||!1)throw H.a(H.aa(a,b)) -return a[b]}, -$isaV:1, -$asaV:I.aB, -$iscB:1, -$ise:1}}],["","",,H,{"^":"", -c2:function(a){var z,y -z=a^48 -if(z<=9)return z -y=a|32 -if(97<=y&&y<=102)return y-87 -return-1}, -bX:function(a){return a}, -co:function(){return new P.bo("No element")}, -dx:function(){return new P.bo("Too few elements")}, -aF:{"^":"jw;a", -gi:function(a){return this.a.length}, -j:function(a,b){return C.a.v(this.a,b)}, -$asJ:function(){return[P.c]}, -$ascJ:function(){return[P.c]}, -$asa4:function(){return[P.c]}, -$asq:function(){return[P.c]}, -$ash:function(){return[P.c]}}, -J:{"^":"q;$ti"}, -aH:{"^":"J;$ti", -gK:function(a){return new H.ak(this,this.gi(this),0,[H.u(this,"aH",0)])}, -gB:function(a){return this.gi(this)===0}, -b5:function(a,b){var z,y,x,w -z=this.gi(this) -if(b.length!==0){if(z===0)return"" -y=H.d(this.X(0,0)) -if(z!==this.gi(this))throw H.a(P.a3(this)) -for(x=y,w=1;wz)return z -return y}, -ge6:function(){var z,y -z=J.Z(this.a) -y=this.b -if(y>z)return z -return y}, -gi:function(a){var z,y,x -z=J.Z(this.a) -y=this.b -if(y>=z)return 0 -x=this.c -if(x==null||x>=z)return z-y -if(typeof x!=="number")return x.V() -return x-y}, -X:function(a,b){var z,y -z=this.ge6()+b -if(b>=0){y=this.gdw() -if(typeof y!=="number")return H.G(y) -y=z>=y}else y=!0 -if(y)throw H.a(P.cl(b,this,"index",null,null)) -return J.dg(this.a,z)}, -a_:function(a,b){var z,y -z=this.b+b -y=this.c -if(y!=null&&z>=y)return new H.hB(this.$ti) -return H.af(this.a,z,y,H.i(this,0))}, -fc:function(a,b){var z,y,x -if(b<0)H.v(P.z(b,0,null,"count",null)) -z=this.c -y=this.b -x=y+b -if(z==null)return H.af(this.a,y,x,H.i(this,0)) -else{if(zc)H.v(P.z(b,0,c,"start",null))}return new H.jp(a,b,c,[d])}}}, -ak:{"^":"b;a,b,c,0d,$ti", -sc8:function(a){this.d=H.n(a,H.i(this,0))}, -gD:function(){return this.d}, -q:function(){var z,y,x,w -z=this.a -y=J.Y(z) -x=y.gi(z) -if(this.b!==x)throw H.a(P.a3(z)) -w=this.c -if(w>=x){this.sc8(null) -return!1}this.sc8(y.X(z,w));++this.c -return!0}, -$isa_:1}, -dM:{"^":"aH;a,b,$ti", -gi:function(a){return J.Z(this.a)}, -X:function(a,b){return this.b.$1(J.dg(this.a,b))}, -$asJ:function(a,b){return[b]}, -$asaH:function(a,b){return[b]}, -$asq:function(a,b){return[b]}}, -eg:{"^":"q;a,b,$ti", -gK:function(a){return new H.eh(J.bb(this.a),this.b,this.$ti)}}, -eh:{"^":"a_;a,b,$ti", -q:function(){var z,y -for(z=this.a,y=this.b;z.q();)if(y.$1(z.gD()))return!0 -return!1}, -gD:function(){return this.a.gD()}}, -cC:{"^":"q;a,b,$ti", -a_:function(a,b){return new H.cC(this.a,this.b+H.bX(b),this.$ti)}, -gK:function(a){return new H.j1(J.bb(this.a),this.b,this.$ti)}, -p:{ -dU:function(a,b,c){H.l(a,"$isq",[c],"$asq") -if(!!J.r(a).$isJ)return new H.dt(a,H.bX(b),[c]) -return new H.cC(a,H.bX(b),[c])}}}, -dt:{"^":"cC;a,b,$ti", -gi:function(a){var z=J.Z(this.a)-this.b -if(z>=0)return z -return 0}, -a_:function(a,b){return new H.dt(this.a,this.b+H.bX(b),this.$ti)}, -$isJ:1}, -j1:{"^":"a_;a,b,$ti", -q:function(){var z,y -for(z=this.a,y=0;y=z.length)return H.k(z,3) -y=H.p(z[3]) -if(b==null){if(y!=null)return parseInt(a,10) -if(z[2]!=null)return parseInt(a,16) -return}if(b<2||b>36)throw H.a(P.z(b,2,36,"radix",null)) -if(b===10&&y!=null)return parseInt(a,10) -if(b<10||y==null){x=b<=10?47+b:86+b -w=z[1] -for(v=w.length,u=0;ux)return}return parseInt(a,b)}, -aY:function(a){return H.iG(a)+H.d1(H.aq(a),0,null)}, -iG:function(a){var z,y,x,w,v,u,t,s,r -z=J.r(a) -y=z.constructor -if(typeof y=="function"){x=y.name -w=typeof x==="string"?x:null}else w=null -v=w==null -if(v||z===C.Q||!!z.$isbq){u=C.y(a) -if(v)w=u -if(u==="Object"){t=a.constructor -if(typeof t=="function"){s=String(t).match(/^\s*function\s*([\w$]*)\s*\(/) -r=s==null?null:s[1] -if(typeof r==="string"&&/^\w+$/.test(r))w=r}}return w}w=w -return H.aS(w.length>1&&C.a.n(w,0)===36?C.a.F(w,1):w)}, -iH:function(){if(!!self.location)return self.location.href -return}, -dR:function(a){var z,y,x,w,v -z=a.length -if(z<=500)return String.fromCharCode.apply(null,a) -for(y="",x=0;x65535)return H.iQ(a)}return H.dR(a)}, -iR:function(a,b,c){var z,y,x,w -if(c<=500&&b===0&&c===a.length)return String.fromCharCode.apply(null,a) -for(z=b,y="";z>>0,56320|z&1023)}}throw H.a(P.z(a,0,1114111,null,null))}, -X:function(a){if(a.date===void 0)a.date=new Date(a.a) -return a.date}, -iO:function(a){return a.b?H.X(a).getUTCFullYear()+0:H.X(a).getFullYear()+0}, -iM:function(a){return a.b?H.X(a).getUTCMonth()+1:H.X(a).getMonth()+1}, -iI:function(a){return a.b?H.X(a).getUTCDate()+0:H.X(a).getDate()+0}, -iJ:function(a){return a.b?H.X(a).getUTCHours()+0:H.X(a).getHours()+0}, -iL:function(a){return a.b?H.X(a).getUTCMinutes()+0:H.X(a).getMinutes()+0}, -iN:function(a){return a.b?H.X(a).getUTCSeconds()+0:H.X(a).getSeconds()+0}, -iK:function(a){return a.b?H.X(a).getUTCMilliseconds()+0:H.X(a).getMilliseconds()+0}, -G:function(a){throw H.a(H.O(a))}, -k:function(a,b){if(a==null)J.Z(a) -throw H.a(H.aa(a,b))}, -aa:function(a,b){var z,y -if(typeof b!=="number"||Math.floor(b)!==b)return new P.as(!0,b,"index",null) -z=H.w(J.Z(a)) -if(!(b<0)){if(typeof z!=="number")return H.G(z) -y=b>=z}else y=!0 -if(y)return P.cl(b,a,"index",null,z) -return P.aI(b,"index",null)}, -lN:function(a,b,c){if(a<0||a>c)return new P.bl(0,c,!0,a,"start","Invalid value") -if(b!=null)if(bc)return new P.bl(a,c,!0,b,"end","Invalid value") -return new P.as(!0,b,"end",null)}, -O:function(a){return new P.as(!0,a,null,null)}, -a:function(a){var z -if(a==null)a=new P.bL() -z=new Error() -z.dartException=a -if("defineProperty" in Object){Object.defineProperty(z,"message",{get:H.fA}) -z.name=""}else z.toString=H.fA -return z}, -fA:function(){return J.ar(this.dartException)}, -v:function(a){throw H.a(a)}, -c6:function(a){throw H.a(P.a3(a))}, -P:function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l -z=new H.me(a) -if(a==null)return -if(a instanceof H.cg)return z.$1(a.a) -if(typeof a!=="object")return a -if("dartException" in a)return z.$1(a.dartException) -else if(!("message" in a))return a -y=a.message -if("number" in a&&typeof a.number=="number"){x=a.number -w=x&65535 -if((C.c.W(x,16)&8191)===10)switch(w){case 438:return z.$1(H.ct(H.d(y)+" (Error "+w+")",null)) -case 445:case 5007:return z.$1(H.dP(H.d(y)+" (Error "+w+")",null))}}if(a instanceof TypeError){v=$.$get$e0() -u=$.$get$e1() -t=$.$get$e2() -s=$.$get$e3() -r=$.$get$e7() -q=$.$get$e8() -p=$.$get$e5() -$.$get$e4() -o=$.$get$ea() -n=$.$get$e9() -m=v.a2(y) -if(m!=null)return z.$1(H.ct(H.p(y),m)) -else{m=u.a2(y) -if(m!=null){m.method="call" -return z.$1(H.ct(H.p(y),m))}else{m=t.a2(y) -if(m==null){m=s.a2(y) -if(m==null){m=r.a2(y) -if(m==null){m=q.a2(y) -if(m==null){m=p.a2(y) -if(m==null){m=s.a2(y) -if(m==null){m=o.a2(y) -if(m==null){m=n.a2(y) -l=m!=null}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0}else l=!0 -if(l)return z.$1(H.dP(H.p(y),m))}}return z.$1(new H.jv(typeof y==="string"?y:""))}if(a instanceof RangeError){if(typeof y==="string"&&y.indexOf("call stack")!==-1)return new P.dV() -y=function(b){try{return String(b)}catch(k){}return null}(a) -return z.$1(new P.as(!1,null,null,typeof y==="string"?y.replace(/^RangeError:\s*/,""):y))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof y==="string"&&y==="too much recursion")return new P.dV() -return a}, -a7:function(a){var z -if(a instanceof H.cg)return a.b -if(a==null)return new H.eB(a) -z=a.$cachedTrace -if(z!=null)return z -return a.$cachedTrace=new H.eB(a)}, -fs:function(a){if(a==null||typeof a!='object')return J.aE(a) -else return H.au(a)}, -lS:function(a,b){var z,y,x,w -z=a.length -for(y=0;y=27 -if(v)return H.hn(y,!w,z,b) -if(y===0){w=$.ab -if(typeof w!=="number")return w.t() -$.ab=w+1 -u="self"+w -w="return function(){var "+u+" = this." -v=$.aT -if(v==null){v=H.bA("self") -$.aT=v}return new Function(w+H.d(v)+";return "+u+"."+H.d(z)+"();}")()}t="abcdefghijklmnopqrstuvwxyz".split("").splice(0,y).join(",") -w=$.ab -if(typeof w!=="number")return w.t() -$.ab=w+1 -t+=w -w="return function("+t+"){return this." -v=$.aT -if(v==null){v=H.bA("self") -$.aT=v}return new Function(w+H.d(v)+"."+H.d(z)+"("+t+");}")()}, -ho:function(a,b,c,d){var z,y -z=H.ca -y=H.dm -switch(b?-1:a){case 0:throw H.a(H.iZ("Intercepted function with no arguments.")) -case 1:return function(e,f,g){return function(){return f(this)[e](g(this))}}(c,z,y) -case 2:return function(e,f,g){return function(h){return f(this)[e](g(this),h)}}(c,z,y) -case 3:return function(e,f,g){return function(h,i){return f(this)[e](g(this),h,i)}}(c,z,y) -case 4:return function(e,f,g){return function(h,i,j){return f(this)[e](g(this),h,i,j)}}(c,z,y) -case 5:return function(e,f,g){return function(h,i,j,k){return f(this)[e](g(this),h,i,j,k)}}(c,z,y) -case 6:return function(e,f,g){return function(h,i,j,k,l){return f(this)[e](g(this),h,i,j,k,l)}}(c,z,y) -default:return function(e,f,g,h){return function(){h=[g(this)] -Array.prototype.push.apply(h,arguments) -return e.apply(f(this),h)}}(d,z,y)}}, -hp:function(a,b){var z,y,x,w,v,u,t,s -z=$.aT -if(z==null){z=H.bA("self") -$.aT=z}y=$.dl -if(y==null){y=H.bA("receiver") -$.dl=y}x=b.$stubName -w=b.length -v=a[x] -u=b==null?v==null:b===v -t=!u||w>=28 -if(t)return H.ho(w,!u,x,b) -if(w===1){z="return function(){return this."+H.d(z)+"."+H.d(x)+"(this."+H.d(y)+");" -y=$.ab -if(typeof y!=="number")return y.t() -$.ab=y+1 -return new Function(z+y+"}")()}s="abcdefghijklmnopqrstuvwxyz".split("").splice(0,w-1).join(",") -z="return function("+s+"){return this."+H.d(z)+"."+H.d(x)+"(this."+H.d(y)+", "+s+");" -y=$.ab -if(typeof y!=="number")return y.t() -$.ab=y+1 -return new Function(z+y+"}")()}, -d5:function(a,b,c,d,e,f,g){return H.hq(a,b,H.w(c),d,!!e,!!f,g)}, -p:function(a){if(a==null)return a -if(typeof a==="string")return a -throw H.a(H.a9(a,"String"))}, -fy:function(a){if(typeof a==="string"||a==null)return a -throw H.a(H.cb(a,"String"))}, -lO:function(a){if(a==null)return a -if(typeof a==="number")return a -throw H.a(H.a9(a,"double"))}, -m7:function(a){if(a==null)return a -if(typeof a==="number")return a -throw H.a(H.a9(a,"num"))}, -fh:function(a){if(a==null)return a -if(typeof a==="boolean")return a -throw H.a(H.a9(a,"bool"))}, -w:function(a){if(a==null)return a -if(typeof a==="number"&&Math.floor(a)===a)return a -throw H.a(H.a9(a,"int"))}, -de:function(a,b){throw H.a(H.a9(a,H.aS(H.p(b).substring(3))))}, -m8:function(a,b){throw H.a(H.cb(a,H.aS(H.p(b).substring(3))))}, -m:function(a,b){if(a==null)return a -if((typeof a==="object"||typeof a==="function")&&J.r(a)[b])return a -H.de(a,b)}, -db:function(a,b){var z -if(a!=null)z=(typeof a==="object"||typeof a==="function")&&J.r(a)[b] -else z=!0 -if(z)return a -H.m8(a,b)}, -mS:function(a,b){if(a==null)return a -if(typeof a==="string")return a -if(J.r(a)[b])return a -H.de(a,b)}, -bx:function(a){if(a==null)return a -if(!!J.r(a).$ish)return a -throw H.a(H.a9(a,"List"))}, -m1:function(a,b){var z -if(a==null)return a -z=J.r(a) -if(!!z.$ish)return a -if(z[b])return a -H.de(a,b)}, -d7:function(a){var z -if("$S" in a){z=a.$S -if(typeof z=="number")return init.types[H.w(z)] -else return a.$S()}return}, -aC:function(a,b){var z -if(a==null)return!1 -if(typeof a=="function")return!0 -z=H.d7(J.r(a)) -if(z==null)return!1 -return H.eZ(z,null,b,null)}, -j:function(a,b){var z,y -if(a==null)return a -if($.cZ)return a -$.cZ=!0 -try{if(H.aC(a,b))return a -z=H.ba(b) -y=H.a9(a,z) -throw H.a(y)}finally{$.cZ=!1}}, -aP:function(a,b){if(a!=null&&!H.b6(a,b))H.v(H.a9(a,H.ba(b))) -return a}, -fc:function(a){var z,y -z=J.r(a) -if(!!z.$isf){y=H.d7(z) -if(y!=null)return H.ba(y) -return"Closure"}return H.aY(a)}, -mc:function(a){throw H.a(new P.hy(H.p(a)))}, -fk:function(a){return init.getIsolateTag(a)}, -o:function(a,b){a.$ti=b -return a}, -aq:function(a){if(a==null)return -return a.$ti}, -mO:function(a,b,c){return H.aR(a["$as"+H.d(c)],H.aq(b))}, -b9:function(a,b,c,d){var z -H.p(c) -H.w(d) -z=H.aR(a["$as"+H.d(c)],H.aq(b)) -return z==null?null:z[d]}, -u:function(a,b,c){var z -H.p(b) -H.w(c) -z=H.aR(a["$as"+H.d(b)],H.aq(a)) -return z==null?null:z[c]}, -i:function(a,b){var z -H.w(b) -z=H.aq(a) -return z==null?null:z[b]}, -ba:function(a){return H.az(a,null)}, -az:function(a,b){var z,y -H.l(b,"$ish",[P.e],"$ash") -if(a==null)return"dynamic" -if(a===-1)return"void" -if(typeof a==="object"&&a!==null&&a.constructor===Array)return H.aS(a[0].builtin$cls)+H.d1(a,1,b) -if(typeof a=="function")return H.aS(a.builtin$cls) -if(a===-2)return"dynamic" -if(typeof a==="number"){H.w(a) -if(b==null||a<0||a>=b.length)return"unexpected-generic-index:"+a -z=b.length -y=z-a-1 -if(y<0||y>=z)return H.k(b,y) -return H.d(b[y])}if('func' in a)return H.lk(a,b) -if('futureOr' in a)return"FutureOr<"+H.az("type" in a?a.type:null,b)+">" -return"unknown-reified-type"}, -lk:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h -z=[P.e] -H.l(b,"$ish",z,"$ash") -if("bounds" in a){y=a.bounds -if(b==null){b=H.o([],z) -x=null}else x=b.length -w=b.length -for(v=y.length,u=v;u>0;--u)C.b.m(b,"T"+(w+u)) -for(t="<",s="",u=0;u "+p}, -d1:function(a,b,c){var z,y,x,w,v,u -H.l(c,"$ish",[P.e],"$ash") -if(a==null)return"" -z=new P.U("") -for(y=b,x="",w=!0,v="";y"}, -d9:function(a){var z,y,x,w -z=J.r(a) -if(!!z.$isf){y=H.d7(z) -if(y!=null)return y}x=z.constructor -if(a==null)return x -if(typeof a!="object")return x -w=H.aq(a) -if(w!=null){w=w.slice() -w.splice(0,0,x) -x=w}return x}, -aR:function(a,b){if(a==null)return b -a=a.apply(null,b) -if(a==null)return -if(typeof a==="object"&&a!==null&&a.constructor===Array)return a -if(typeof a=="function")return a.apply(null,b) -return b}, -aO:function(a,b,c,d){var z,y -H.p(b) -H.bx(c) -H.p(d) -if(a==null)return!1 -z=H.aq(a) -y=J.r(a) -if(y[b]==null)return!1 -return H.ff(H.aR(y[d],z),null,c,null)}, -l:function(a,b,c,d){H.p(b) -H.bx(c) -H.p(d) -if(a==null)return a -if(H.aO(a,b,c,d))return a -throw H.a(H.a9(a,function(e,f){return e.replace(/[^<,> ]+/g,function(g){return f[g]||g})}(H.aS(b.substring(3))+H.d1(c,0,null),init.mangledGlobalNames)))}, -ff:function(a,b,c,d){var z,y -if(c==null)return!0 -if(a==null){z=c.length -for(y=0;ys)return!1 -if(t+r=0 -else{z=J.r(b) -if(!!z.$isdB){z=C.a.F(a,c) -return b.b.test(z)}else{z=z.bF(b,C.a.F(a,c)) -return!z.gB(z)}}}, -aQ:function(a,b,c){var z,y,x -if(b==="")if(a==="")return c -else{z=a.length -for(y=c,x=0;x>2,x>>1,(x&1)===1,z[2])}}}, -jq:{"^":"b;a,b,c,d,e,f", -a2:function(a){var z,y,x -z=new RegExp(this.a).exec(a) -if(z==null)return -y=Object.create(null) -x=this.b -if(x!==-1)y.arguments=z[x+1] -x=this.c -if(x!==-1)y.argumentsExpr=z[x+1] -x=this.d -if(x!==-1)y.expr=z[x+1] -x=this.e -if(x!==-1)y.method=z[x+1] -x=this.f -if(x!==-1)y.receiver=z[x+1] -return y}, -p:{ -ag:function(a){var z,y,x,w,v,u -a=a.replace(String({}),'$receiver$').replace(/[[\]{}()*+?.\\^$|]/g,"\\$&") -z=a.match(/\\\$[a-zA-Z]+\\\$/g) -if(z==null)z=H.o([],[P.e]) -y=z.indexOf("\\$arguments\\$") -x=z.indexOf("\\$argumentsExpr\\$") -w=z.indexOf("\\$expr\\$") -v=z.indexOf("\\$method\\$") -u=z.indexOf("\\$receiver\\$") -return new H.jq(a.replace(new RegExp('\\\\\\$arguments\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$','g'),'((?:x|[^x])*)'),y,x,w,v,u)}, -bR:function(a){return function($expr$){var $argumentsExpr$='$arguments$' -try{$expr$.$method$($argumentsExpr$)}catch(z){return z.message}}(a)}, -e6:function(a){return function($expr$){try{$expr$.$method$}catch(z){return z.message}}(a)}}}, -iz:{"^":"L;a,b", -h:function(a){var z=this.b -if(z==null)return"NoSuchMethodError: "+H.d(this.a) -return"NoSuchMethodError: method not found: '"+z+"' on null"}, -p:{ -dP:function(a,b){return new H.iz(a,b==null?null:b.method)}}}, -i6:{"^":"L;a,b,c", -h:function(a){var z,y -z=this.b -if(z==null)return"NoSuchMethodError: "+H.d(this.a) -y=this.c -if(y==null)return"NoSuchMethodError: method not found: '"+z+"' ("+H.d(this.a)+")" -return"NoSuchMethodError: method not found: '"+z+"' on '"+y+"' ("+H.d(this.a)+")"}, -p:{ -ct:function(a,b){var z,y -z=b==null -y=z?null:b.method -return new H.i6(a,y,z?null:b.receiver)}}}, -jv:{"^":"L;a", -h:function(a){var z=this.a -return z.length===0?"Error":"Error: "+z}}, -cg:{"^":"b;a,b"}, -me:{"^":"f:8;a", -$1:function(a){if(!!J.r(a).$isL)if(a.$thrownJsError==null)a.$thrownJsError=this.a -return a}}, -eB:{"^":"b;a,0b", -h:function(a){var z,y -z=this.b -if(z!=null)return z -z=this.a -y=z!==null&&typeof z==="object"?z.stack:null -z=y==null?"":y -this.b=z -return z}, -$isD:1}, -f:{"^":"b;", -h:function(a){return"Closure '"+H.aY(this).trim()+"'"}, -gd1:function(){return this}, -$iscj:1, -gd1:function(){return this}}, -e_:{"^":"f;"}, -j9:{"^":"e_;", -h:function(a){var z=this.$static_name -if(z==null)return"Closure of unknown static method" -return"Closure '"+H.aS(z)+"'"}}, -c9:{"^":"e_;a,b,c,d", -I:function(a,b){if(b==null)return!1 -if(this===b)return!0 -if(!(b instanceof H.c9))return!1 -return this.a===b.a&&this.b===b.b&&this.c===b.c}, -gA:function(a){var z,y -z=this.c -if(z==null)y=H.au(this.a) -else y=typeof z!=="object"?J.aE(z):H.au(z) -return(y^H.au(this.b))>>>0}, -h:function(a){var z=this.c -if(z==null)z=this.a -return"Closure '"+H.d(this.d)+"' of "+("Instance of '"+H.aY(z)+"'")}, -p:{ -ca:function(a){return a.a}, -dm:function(a){return a.c}, -bA:function(a){var z,y,x,w,v -z=new H.c9("self","target","receiver","name") -y=J.bF(Object.getOwnPropertyNames(z)) -for(x=y.length,w=0;w", -h:function(a){return this.a}, -p:{ -a9:function(a,b){return new H.jr("TypeError: "+H.d(P.be(a))+": type '"+H.fc(a)+"' is not a subtype of type '"+b+"'")}}}, -hm:{"^":"L;P:a>", -h:function(a){return this.a}, -p:{ -cb:function(a,b){return new H.hm("CastError: "+H.d(P.be(a))+": type '"+H.fc(a)+"' is not a subtype of type '"+b+"'")}}}, -iY:{"^":"L;P:a>", -h:function(a){return"RuntimeError: "+H.d(this.a)}, -p:{ -iZ:function(a){return new H.iY(a)}}}, -bS:{"^":"b;a,0b,0c,0d", -gb2:function(){var z=this.b -if(z==null){z=H.ba(this.a) -this.b=z}return z}, -h:function(a){return this.gb2()}, -gA:function(a){var z=this.d -if(z==null){z=C.a.gA(this.gb2()) -this.d=z}return z}, -I:function(a,b){if(b==null)return!1 -return b instanceof H.bS&&this.gb2()===b.gb2()}}, -ac:{"^":"dL;a,0b,0c,0d,0e,0f,r,$ti", -gi:function(a){return this.a}, -gB:function(a){return this.a===0}, -gao:function(){return new H.ie(this,[H.i(this,0)])}, -a7:function(a){var z,y -if(typeof a==="string"){z=this.b -if(z==null)return!1 -return this.ci(z,a)}else if(typeof a==="number"&&(a&0x3ffffff)===a){y=this.c -if(y==null)return!1 -return this.ci(y,a)}else return this.eI(a)}, -eI:["dc",function(a){var z=this.d -if(z==null)return!1 -return this.aJ(this.br(z,this.aI(a)),a)>=0}], -bE:function(a,b){H.l(b,"$isS",this.$ti,"$asS").J(0,new H.i5(this))}, -j:function(a,b){var z,y,x,w -if(typeof b==="string"){z=this.b -if(z==null)return -y=this.aW(z,b) -x=y==null?null:y.b -return x}else if(typeof b==="number"&&(b&0x3ffffff)===b){w=this.c -if(w==null)return -y=this.aW(w,b) -x=y==null?null:y.b -return x}else return this.eJ(b)}, -eJ:["dd",function(a){var z,y,x -z=this.d -if(z==null)return -y=this.br(z,this.aI(a)) -x=this.aJ(y,a) -if(x<0)return -return y[x].b}], -k:function(a,b,c){var z,y -H.n(b,H.i(this,0)) -H.n(c,H.i(this,1)) -if(typeof b==="string"){z=this.b -if(z==null){z=this.bw() -this.b=z}this.ca(z,b,c)}else if(typeof b==="number"&&(b&0x3ffffff)===b){y=this.c -if(y==null){y=this.bw() -this.c=y}this.ca(y,b,c)}else this.eK(b,c)}, -eK:["de",function(a,b){var z,y,x,w -H.n(a,H.i(this,0)) -H.n(b,H.i(this,1)) -z=this.d -if(z==null){z=this.bw() -this.d=z}y=this.aI(a) -x=this.br(z,y) -if(x==null)this.bz(z,y,[this.bx(a,b)]) -else{w=this.aJ(x,a) -if(w>=0)x[w].b=b -else x.push(this.bx(a,b))}}], -f_:function(a,b){var z -H.n(a,H.i(this,0)) -H.j(b,{func:1,ret:H.i(this,1)}) -if(this.a7(a))return this.j(0,a) -z=b.$0() -this.k(0,a,z) -return z}, -J:function(a,b){var z,y -H.j(b,{func:1,ret:-1,args:[H.i(this,0),H.i(this,1)]}) -z=this.e -y=this.r -for(;z!=null;){b.$2(z.a,z.b) -if(y!==this.r)throw H.a(P.a3(this)) -z=z.c}}, -ca:function(a,b,c){var z -H.n(b,H.i(this,0)) -H.n(c,H.i(this,1)) -z=this.aW(a,b) -if(z==null)this.bz(a,b,this.bx(b,c)) -else z.b=c}, -bx:function(a,b){var z,y -z=new H.id(H.n(a,H.i(this,0)),H.n(b,H.i(this,1))) -if(this.e==null){this.f=z -this.e=z}else{y=this.f -z.d=y -y.c=z -this.f=z}++this.a -this.r=this.r+1&67108863 -return z}, -aI:function(a){return J.aE(a)&0x3ffffff}, -aJ:function(a,b){var z,y -if(a==null)return-1 -z=a.length -for(y=0;y",z) -this.dv(z,"") -return z}, -$isdE:1}, -i5:{"^":"f;a", -$2:function(a,b){var z=this.a -z.k(0,H.n(a,H.i(z,0)),H.n(b,H.i(z,1)))}, -$S:function(){var z=this.a -return{func:1,ret:P.x,args:[H.i(z,0),H.i(z,1)]}}}, -id:{"^":"b;a,b,0c,0d"}, -ie:{"^":"J;a,$ti", -gi:function(a){return this.a.a}, -gB:function(a){return this.a.a===0}, -gK:function(a){var z,y -z=this.a -y=new H.ig(z,z.r,this.$ti) -y.c=z.e -return y}}, -ig:{"^":"b;a,b,0c,0d,$ti", -sc9:function(a){this.d=H.n(a,H.i(this,0))}, -gD:function(){return this.d}, -q:function(){var z=this.a -if(this.b!==z.r)throw H.a(P.a3(z)) -else{z=this.c -if(z==null){this.sc9(null) -return!1}else{this.sc9(z.a) -this.c=this.c.c -return!0}}}, -$isa_:1}, -lW:{"^":"f:8;a", -$1:function(a){return this.a(a)}}, -lX:{"^":"f:42;a", -$2:function(a,b){return this.a(a,b)}}, -lY:{"^":"f:30;a", -$1:function(a){return this.a(H.p(a))}}, -dB:{"^":"b;a,b,0c,0d", -h:function(a){return"RegExp/"+this.a+"/"}, -gdM:function(){var z=this.c -if(z!=null)return z -z=this.b -z=H.cp(this.a,z.multiline,!z.ignoreCase,!0) -this.c=z -return z}, -gdL:function(){var z=this.d -if(z!=null)return z -z=this.b -z=H.cp(this.a+"|()",z.multiline,!z.ignoreCase,!0) -this.d=z -return z}, -bG:function(a,b,c){if(c>b.length)throw H.a(P.z(c,0,b.length,null,null)) -return new H.jS(this,b,c)}, -bF:function(a,b){return this.bG(a,b,0)}, -dA:function(a,b){var z,y -z=this.gdM() -z.lastIndex=b -y=z.exec(a) -if(y==null)return -return new H.ew(this,y)}, -dz:function(a,b){var z,y -z=this.gdL() -z.lastIndex=b -y=z.exec(a) -if(y==null)return -if(0>=y.length)return H.k(y,-1) -if(y.pop()!=null)return -return new H.ew(this,y)}, -aw:function(a,b,c){if(c<0||c>b.length)throw H.a(P.z(c,0,b.length,null,null)) -return this.dz(b,c)}, -$iscB:1, -$isiU:1, -p:{ -cp:function(a,b,c,d){var z,y,x,w -z=b?"m":"" -y=c?"":"i" -x=d?"g":"" -w=function(e,f){try{return new RegExp(e,f)}catch(v){return v}}(a,z+y+x) -if(w instanceof RegExp)return w -throw H.a(P.C("Illegal RegExp pattern ("+String(w)+")",a,null))}}}, -ew:{"^":"b;a,b", -gu:function(){var z=this.b -return z.index+z[0].length}, -j:function(a,b){var z=this.b -if(b>=z.length)return H.k(z,b) -return z[b]}, -$isad:1}, -jS:{"^":"i0;a,b,c", -gK:function(a){return new H.ei(this.a,this.b,this.c)}, -$asq:function(){return[P.ad]}}, -ei:{"^":"b;a,b,c,0d", -gD:function(){return this.d}, -q:function(){var z,y,x,w -z=this.b -if(z==null)return!1 -y=this.c -if(y<=z.length){x=this.a.dA(z,y) -if(x!=null){this.d=x -w=x.gu() -this.c=x.b.index===w?w+1:w -return!0}}this.d=null -this.b=null -return!1}, -$isa_:1, -$asa_:function(){return[P.ad]}}, -dY:{"^":"b;a,b,c", -gu:function(){return this.a+this.c.length}, -j:function(a,b){if(b!==0)H.v(P.aI(b,null,null)) -return this.c}, -$isad:1}, -kP:{"^":"q;a,b,c", -gK:function(a){return new H.kQ(this.a,this.b,this.c)}, -$asq:function(){return[P.ad]}}, -kQ:{"^":"b;a,b,c,0d", -q:function(){var z,y,x,w,v,u,t -z=this.c -y=this.b -x=y.length -w=this.a -v=w.length -if(z+x>v){this.d=null -return!1}u=w.indexOf(y,z) -if(u<0){this.c=v+1 -this.d=null -return!1}t=u+x -this.d=new H.dY(u,w,y) -this.c=t===this.c?t+1:t -return!0}, -gD:function(){return this.d}, -$isa_:1, -$asa_:function(){return[P.ad]}}}],["","",,H,{"^":"", -lR:function(a){return J.dy(a?Object.keys(a):[],null)}}],["","",,H,{"^":"", -bZ:function(a){var z,y,x -z=J.r(a) -if(!!z.$isaV)return a -y=new Array(z.gi(a)) -y.fixed$length=Array -for(x=0;x>>0!==a||a>=c)throw H.a(H.aa(b,a))}, -eU:function(a,b,c){var z -if(!(a>>>0!==a))z=b>>>0!==b||a>b||b>c -else z=!0 -if(z)throw H.a(H.lN(a,b,c)) -return b}, -mm:{"^":"W;",$ishb:1,"%":"ArrayBuffer"}, -ix:{"^":"W;", -dG:function(a,b,c,d){var z=P.z(b,0,c,d,null) -throw H.a(z)}, -cc:function(a,b,c,d){if(b>>>0!==b||b>c)this.dG(a,b,c,d)}, -$iseb:1, -"%":"DataView;ArrayBufferView;cz|ex|ey|iw|ez|eA|al"}, -cz:{"^":"ix;", -gi:function(a){return a.length}, -e2:function(a,b,c,d,e){var z,y,x -z=a.length -this.cc(a,b,z,"start") -this.cc(a,c,z,"end") -if(b>c)throw H.a(P.z(b,0,c,null,null)) -y=c-b -x=d.length -if(x-e=4){y=b.aY() -b.a=a.a -b.c=a.c -P.aK(b,y)}else{y=H.m(b.c,"$isaw") -b.a=2 -b.c=a -a.cu(y)}}, -aK:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m -z={} -z.a=a -for(y=a;!0;){x={} -w=y.a===8 -if(b==null){if(w){v=H.m(y.c,"$isa2") -y=y.b -u=v.a -t=v.b -y.toString -P.b4(null,null,y,u,t)}return}for(;s=b.a,s!=null;b=s){b.a=null -P.aK(z.a,b)}y=z.a -r=y.c -x.a=w -x.b=r -u=!w -if(u){t=b.c -t=(t&1)!==0||t===8}else t=!0 -if(t){t=b.b -q=t.b -if(w){p=y.b -p.toString -p=p==null?q==null:p===q -if(!p)q.toString -else p=!0 -p=!p}else p=!1 -if(p){H.m(r,"$isa2") -y=y.b -u=r.a -t=r.b -y.toString -P.b4(null,null,y,u,t) -return}o=$.t -if(o==null?q!=null:o!==q)$.t=q -else o=null -y=b.c -if(y===8)new P.kn(z,x,b,w).$0() -else if(u){if((y&1)!==0)new P.km(x,b,r).$0()}else if((y&2)!==0)new P.kl(z,x,b).$0() -if(o!=null)$.t=o -y=x.b -if(!!J.r(y).$isQ){if(y.a>=4){n=H.m(t.c,"$isaw") -t.c=null -b=t.aZ(n) -t.a=y.a -t.c=y.c -z.a=y -continue}else P.bV(y,t) -return}}m=b.b -n=H.m(m.c,"$isaw") -m.c=null -b=m.aZ(n) -y=x.a -u=x.b -if(!y){H.n(u,H.i(m,0)) -m.a=4 -m.c=u}else{H.m(u,"$isa2") -m.a=8 -m.c=u}z.a=m -y=m}}}}, -kd:{"^":"f:0;a,b", -$0:function(){P.aK(this.a,this.b)}}, -kk:{"^":"f:0;a,b", -$0:function(){P.aK(this.b,this.a.a)}}, -kg:{"^":"f:11;a", -$1:function(a){var z=this.a -z.a=0 -z.at(a)}}, -kh:{"^":"f:37;a", -$2:function(a,b){this.a.a3(a,H.m(b,"$isD"))}, -$1:function(a){return this.$2(a,null)}}, -ki:{"^":"f:0;a,b,c", -$0:function(){this.a.a3(this.b,this.c)}}, -kf:{"^":"f:0;a,b", -$0:function(){var z,y,x -z=this.a -y=H.n(this.b,H.i(z,0)) -x=z.aY() -z.a=4 -z.c=y -P.aK(z,x)}}, -kj:{"^":"f:0;a,b", -$0:function(){P.bV(this.b,this.a)}}, -ke:{"^":"f:0;a,b,c", -$0:function(){this.a.a3(this.b,this.c)}}, -kn:{"^":"f:1;a,b,c,d", -$0:function(){var z,y,x,w,v,u,t -z=null -try{w=this.c -z=w.b.b.cV(H.j(w.d,{func:1}),null)}catch(v){y=H.P(v) -x=H.a7(v) -if(this.d){w=H.m(this.a.a.c,"$isa2").a -u=y -u=w==null?u==null:w===u -w=u}else w=!1 -u=this.b -if(w)u.b=H.m(this.a.a.c,"$isa2") -else u.b=new P.a2(y,x) -u.a=!0 -return}if(!!J.r(z).$isQ){if(z instanceof P.E&&z.gaD()>=4){if(z.gaD()===8){w=this.b -w.b=H.m(z.ge0(),"$isa2") -w.a=!0}return}t=this.a.a -w=this.b -w.b=z.az(new P.ko(t),null) -w.a=!1}}}, -ko:{"^":"f:39;a", -$1:function(a){return this.a}}, -km:{"^":"f:1;a,b,c", -$0:function(){var z,y,x,w,v,u,t -try{x=this.b -w=H.i(x,0) -v=H.n(this.c,w) -u=H.i(x,1) -this.a.b=x.b.b.c_(H.j(x.d,{func:1,ret:{futureOr:1,type:u},args:[w]}),v,{futureOr:1,type:u},w)}catch(t){z=H.P(t) -y=H.a7(t) -x=this.a -x.b=new P.a2(z,y) -x.a=!0}}}, -kl:{"^":"f:1;a,b,c", -$0:function(){var z,y,x,w,v,u,t,s -try{z=H.m(this.a.a.c,"$isa2") -w=this.c -if(w.eS(z)&&w.e!=null){v=this.b -v.b=w.eG(z) -v.a=!1}}catch(u){y=H.P(u) -x=H.a7(u) -w=H.m(this.a.a.c,"$isa2") -v=w.a -t=y -s=this.b -if(v==null?t==null:v===t)s.b=w -else s.b=new P.a2(y,x) -s.a=!0}}}, -ek:{"^":"b;a,0b"}, -T:{"^":"b;$ti", -gi:function(a){var z,y -z={} -y=new P.E(0,$.t,[P.c]) -z.a=0 -this.aa(new P.jh(z,this),!0,new P.ji(z,y),y.gbl()) -return y}, -gB:function(a){var z,y -z={} -y=new P.E(0,$.t,[P.F]) -z.a=null -z.a=this.aa(new P.jf(z,this,y),!0,new P.jg(y),y.gbl()) -return y}, -gam:function(a){var z,y -z={} -y=new P.E(0,$.t,[H.u(this,"T",0)]) -z.a=null -z.a=this.aa(new P.jd(z,this,y),!0,new P.je(y),y.gbl()) -return y}}, -jc:{"^":"f;a,b", -$0:function(){var z=this.a -return new P.et(new J.c8(z,1,0,[H.i(z,0)]),0,[this.b])}, -$S:function(){return{func:1,ret:[P.et,this.b]}}}, -jh:{"^":"f;a,b", -$1:function(a){H.n(a,H.u(this.b,"T",0));++this.a.a}, -$S:function(){return{func:1,ret:P.x,args:[H.u(this.b,"T",0)]}}}, -ji:{"^":"f:0;a,b", -$0:function(){this.b.at(this.a.a)}}, -jf:{"^":"f;a,b,c", -$1:function(a){H.n(a,H.u(this.b,"T",0)) -P.eT(this.a.a,this.c,!1)}, -$S:function(){return{func:1,ret:P.x,args:[H.u(this.b,"T",0)]}}}, -jg:{"^":"f:0;a", -$0:function(){this.a.at(!0)}}, -jd:{"^":"f;a,b,c", -$1:function(a){H.n(a,H.u(this.b,"T",0)) -P.eT(this.a.a,this.c,a)}, -$S:function(){return{func:1,ret:P.x,args:[H.u(this.b,"T",0)]}}}, -je:{"^":"f:0;a", -$0:function(){var z,y,x,w,v -try{x=H.co() -throw H.a(x)}catch(w){z=H.P(w) -y=H.a7(w) -x=$.t -v=H.m(y,"$isD") -x.toString -this.a.a3(z,v)}}}, -av:{"^":"b;$ti"}, -cG:{"^":"T;$ti", -aa:function(a,b,c,d){return this.a.aa(H.j(a,{func:1,ret:-1,args:[H.u(this,"cG",0)]}),!0,H.j(c,{func:1,ret:-1}),d)}}, -jb:{"^":"b;"}, -kL:{"^":"b;aD:b<,$ti", -gdV:function(){if((this.b&8)===0)return H.l(this.a,"$isah",this.$ti,"$asah") -var z=this.$ti -return H.l(H.l(this.a,"$isa0",z,"$asa0").gba(),"$isah",z,"$asah")}, -bo:function(){var z,y -if((this.b&8)===0){z=this.a -if(z==null){z=new P.ax(0,this.$ti) -this.a=z}return H.l(z,"$isax",this.$ti,"$asax")}z=this.$ti -y=H.l(this.a,"$isa0",z,"$asa0") -y.gba() -return H.l(y.gba(),"$isax",z,"$asax")}, -gbA:function(){if((this.b&8)!==0){var z=this.$ti -return H.l(H.l(this.a,"$isa0",z,"$asa0").gba(),"$isbr",z,"$asbr")}return H.l(this.a,"$isbr",this.$ti,"$asbr")}, -bh:function(){if((this.b&4)!==0)return new P.bo("Cannot add event after closing") -return new P.bo("Cannot add event while adding a stream")}, -ck:function(){var z=this.c -if(z==null){z=(this.b&2)!==0?$.$get$aU():new P.E(0,$.t,[null]) -this.c=z}return z}, -m:function(a,b){var z -H.n(b,H.i(this,0)) -z=this.b -if(z>=4)throw H.a(this.bh()) -if((z&1)!==0)this.b_(b) -else if((z&3)===0)this.bo().m(0,new P.ep(b,this.$ti))}, -ek:[function(a,b){var z=this.b -if(z>=4)throw H.a(this.bh()) -if(a==null)a=new P.bL() -$.t.toString -if((z&1)!==0)this.aC(a,b) -else if((z&3)===0)this.bo().m(0,new P.eq(a,b))},function(a){return this.ek(a,null)},"fs","$2","$1","gej",4,2,3], -a5:function(a){var z=this.b -if((z&4)!==0)return this.ck() -if(z>=4)throw H.a(this.bh()) -z|=4 -this.b=z -if((z&1)!==0)this.b0() -else if((z&3)===0)this.bo().m(0,C.t) -return this.ck()}, -e7:function(a,b,c,d){var z,y,x,w,v,u,t -z=H.i(this,0) -H.j(a,{func:1,ret:-1,args:[z]}) -H.j(c,{func:1,ret:-1}) -if((this.b&3)!==0)throw H.a(P.ae("Stream has already been listened to.")) -y=$.t -x=d?1:0 -w=this.$ti -v=new P.br(this,y,x,w) -v.c7(a,b,c,d,z) -u=this.gdV() -z=this.b|=1 -if((z&8)!==0){t=H.l(this.a,"$isa0",w,"$asa0") -t.sba(v) -t.f9()}else this.a=v -v.cv(u) -v.dD(new P.kN(this)) -return v}, -dY:function(a){var z,y -y=this.$ti -H.l(a,"$isav",y,"$asav") -z=null -if((this.b&8)!==0)z=H.l(this.a,"$isa0",y,"$asa0").bH() -this.a=null -this.b=this.b&4294967286|2 -y=new P.kM(this) -if(z!=null)z=z.bb(y) -else y.$0() -return z}, -$ismu:1, -$ismE:1, -$isan:1}, -kN:{"^":"f:0;a", -$0:function(){P.d3(this.a.d)}}, -kM:{"^":"f:1;a", -$0:function(){var z=this.a.c -if(z!=null&&z.a===0)z.cb(null)}}, -k0:{"^":"b;$ti", -b_:function(a){var z=H.i(this,0) -H.n(a,z) -this.gbA().bg(new P.ep(a,[z]))}, -aC:function(a,b){this.gbA().bg(new P.eq(a,b))}, -b0:function(){this.gbA().bg(C.t)}}, -k_:{"^":"kL+k0;0a,b,0c,d,e,f,r,$ti"}, -cP:{"^":"eC;a,$ti", -bn:function(a,b,c,d){return this.a.e7(H.j(a,{func:1,ret:-1,args:[H.i(this,0)]}),b,H.j(c,{func:1,ret:-1}),d)}, -gA:function(a){return(H.au(this.a)^892482866)>>>0}, -I:function(a,b){if(b==null)return!1 -if(this===b)return!0 -if(!(b instanceof P.cP))return!1 -return b.a===this.a}}, -br:{"^":"em;x,0a,0b,0c,d,e,0f,0r,$ti", -cq:function(){return this.x.dY(this)}, -cr:function(){var z,y -z=this.x -y=H.i(z,0) -H.l(this,"$isav",[y],"$asav") -if((z.b&8)!==0)C.R.fw(H.l(z.a,"$isa0",[y],"$asa0")) -P.d3(z.e)}, -cs:function(){var z,y -z=this.x -y=H.i(z,0) -H.l(this,"$isav",[y],"$asav") -if((z.b&8)!==0)H.l(z.a,"$isa0",[y],"$asa0").f9() -P.d3(z.f)}}, -mF:{"^":"b;a,$ti"}, -em:{"^":"b;0a,0b,0c,d,aD:e<,0f,0r,$ti", -sdO:function(a){this.a=H.j(a,{func:1,ret:-1,args:[H.i(this,0)]})}, -sdP:function(a){this.c=H.j(a,{func:1,ret:-1})}, -saX:function(a){this.r=H.l(a,"$isah",this.$ti,"$asah")}, -c7:function(a,b,c,d,e){var z,y,x,w -z=H.i(this,0) -H.j(a,{func:1,ret:-1,args:[z]}) -y=this.d -y.toString -this.sdO(H.j(a,{func:1,ret:null,args:[z]})) -x=b==null?P.lB():b -if(H.aC(x,{func:1,ret:-1,args:[P.b,P.D]}))this.b=y.bZ(x,null,P.b,P.D) -else if(H.aC(x,{func:1,ret:-1,args:[P.b]}))this.b=H.j(x,{func:1,ret:null,args:[P.b]}) -else H.v(P.I("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")) -H.j(c,{func:1,ret:-1}) -w=c==null?P.lA():c -this.sdP(H.j(w,{func:1,ret:-1}))}, -cv:function(a){H.l(a,"$isah",this.$ti,"$asah") -if(a==null)return -this.saX(a) -if(!a.gB(a)){this.e=(this.e|64)>>>0 -this.r.be(this)}}, -bH:function(){var z=(this.e&4294967279)>>>0 -this.e=z -if((z&8)===0)this.bi() -z=this.f -return z==null?$.$get$aU():z}, -bi:function(){var z,y -z=(this.e|8)>>>0 -this.e=z -if((z&64)!==0){y=this.r -if(y.a===1)y.a=3}if((z&32)===0)this.saX(null) -this.f=this.cq()}, -cr:function(){}, -cs:function(){}, -cq:function(){return}, -bg:function(a){var z,y -z=this.$ti -y=H.l(this.r,"$isax",z,"$asax") -if(y==null){y=new P.ax(0,z) -this.saX(y)}y.m(0,a) -z=this.e -if((z&64)===0){z=(z|64)>>>0 -this.e=z -if(z<128)this.r.be(this)}}, -b_:function(a){var z,y -z=H.i(this,0) -H.n(a,z) -y=this.e -this.e=(y|32)>>>0 -this.d.c0(this.a,a,z) -this.e=(this.e&4294967263)>>>0 -this.bk((y&4)!==0)}, -aC:function(a,b){var z,y -H.m(b,"$isD") -z=this.e -y=new P.k4(this,a,b) -if((z&1)!==0){this.e=(z|16)>>>0 -this.bi() -z=this.f -if(!!J.r(z).$isQ&&z!==$.$get$aU())z.bb(y) -else y.$0()}else{y.$0() -this.bk((z&4)!==0)}}, -b0:function(){var z,y -z=new P.k3(this) -this.bi() -this.e=(this.e|16)>>>0 -y=this.f -if(!!J.r(y).$isQ&&y!==$.$get$aU())y.bb(z) -else z.$0()}, -dD:function(a){var z -H.j(a,{func:1,ret:-1}) -z=this.e -this.e=(z|32)>>>0 -a.$0() -this.e=(this.e&4294967263)>>>0 -this.bk((z&4)!==0)}, -bk:function(a){var z,y -if((this.e&64)!==0){z=this.r -z=z.gB(z)}else z=!1 -if(z){z=(this.e&4294967231)>>>0 -this.e=z -if((z&4)!==0)if(z<128){z=this.r -z=z==null||z.gB(z)}else z=!1 -else z=!1 -if(z)this.e=(this.e&4294967291)>>>0}for(;!0;a=y){z=this.e -if((z&8)!==0){this.saX(null) -return}y=(z&4)!==0 -if(a===y)break -this.e=(z^32)>>>0 -if(y)this.cr() -else this.cs() -this.e=(this.e&4294967263)>>>0}z=this.e -if((z&64)!==0&&z<128)this.r.be(this)}, -$isav:1, -$isan:1, -p:{ -en:function(a,b,c,d,e){var z,y -z=$.t -y=d?1:0 -y=new P.em(z,y,[e]) -y.c7(a,b,c,d,e) -return y}}}, -k4:{"^":"f:1;a,b,c", -$0:function(){var z,y,x,w,v -z=this.a -y=z.e -if((y&8)!==0&&(y&16)===0)return -z.e=(y|32)>>>0 -x=z.b -y=this.b -w=P.b -v=z.d -if(H.aC(x,{func:1,ret:-1,args:[P.b,P.D]}))v.fb(x,y,this.c,w,P.D) -else v.c0(H.j(z.b,{func:1,ret:-1,args:[P.b]}),y,w) -z.e=(z.e&4294967263)>>>0}}, -k3:{"^":"f:1;a", -$0:function(){var z,y -z=this.a -y=z.e -if((y&16)===0)return -z.e=(y|42)>>>0 -z.d.cW(z.c) -z.e=(z.e&4294967263)>>>0}}, -eC:{"^":"T;$ti", -aa:function(a,b,c,d){return this.bn(H.j(a,{func:1,ret:-1,args:[H.i(this,0)]}),d,H.j(c,{func:1,ret:-1}),!0===b)}, -eP:function(a,b){return this.aa(a,null,b,null)}, -eO:function(a){return this.aa(a,null,null,null)}, -bn:function(a,b,c,d){var z=H.i(this,0) -return P.en(H.j(a,{func:1,ret:-1,args:[z]}),b,H.j(c,{func:1,ret:-1}),d,z)}}, -kp:{"^":"eC;a,b,$ti", -bn:function(a,b,c,d){var z=H.i(this,0) -H.j(a,{func:1,ret:-1,args:[z]}) -H.j(c,{func:1,ret:-1}) -if(this.b)throw H.a(P.ae("Stream has already been listened to.")) -this.b=!0 -z=P.en(a,b,c,d,z) -z.cv(this.a.$0()) -return z}}, -et:{"^":"ah;b,a,$ti", -sco:function(a){this.b=H.l(a,"$isa_",this.$ti,"$asa_")}, -gB:function(a){return this.b==null}, -cM:function(a){var z,y,x,w,v -H.l(a,"$isan",this.$ti,"$asan") -w=this.b -if(w==null)throw H.a(P.ae("No events pending.")) -z=null -try{z=w.q() -if(z)a.b_(this.b.gD()) -else{this.sco(null) -a.b0()}}catch(v){y=H.P(v) -x=H.a7(v) -if(z==null){this.sco(C.r) -a.aC(y,x)}else a.aC(y,x)}}}, -b_:{"^":"b;0aL:a<,$ti", -saL:function(a){this.a=H.m(a,"$isb_")}}, -ep:{"^":"b_;b,0a,$ti", -bY:function(a){H.l(a,"$isan",this.$ti,"$asan").b_(this.b)}}, -eq:{"^":"b_;b,c,0a", -bY:function(a){a.aC(this.b,this.c)}, -$asb_:I.aB}, -k7:{"^":"b;", -bY:function(a){a.b0()}, -gaL:function(){return}, -saL:function(a){throw H.a(P.ae("No events after a done."))}, -$isb_:1, -$asb_:I.aB}, -ah:{"^":"b;aD:a<,$ti", -be:function(a){var z -H.l(a,"$isan",this.$ti,"$asan") -z=this.a -if(z===1)return -if(z>=1){this.a=1 -return}P.c5(new P.kG(this,a)) -this.a=1}}, -kG:{"^":"f:0;a,b", -$0:function(){var z,y -z=this.a -y=z.a -z.a=0 -if(y===3)return -z.cM(this.b)}}, -ax:{"^":"ah;0b,0c,a,$ti", -gB:function(a){return this.c==null}, -m:function(a,b){var z=this.c -if(z==null){this.c=b -this.b=b}else{z.saL(b) -this.c=b}}, -cM:function(a){var z,y -H.l(a,"$isan",this.$ti,"$asan") -z=this.b -y=z.gaL() -this.b=y -if(y==null)this.c=null -z.bY(a)}}, -kO:{"^":"b;0a,b,c,$ti"}, -ld:{"^":"f:1;a,b", -$0:function(){return this.a.at(this.b)}}, -a2:{"^":"b;a,b", -h:function(a){return H.d(this.a)}, -$isL:1}, -l9:{"^":"b;",$ismA:1}, -lr:{"^":"f:0;a,b", -$0:function(){var z,y,x -z=this.a -y=z.a -if(y==null){x=new P.bL() -z.a=x -z=x}else z=y -y=this.b -if(y==null)throw H.a(z) -x=H.a(z) -x.stack=y.h(0) -throw x}}, -kH:{"^":"l9;", -cW:function(a){var z,y,x -H.j(a,{func:1,ret:-1}) -try{if(C.d===$.t){a.$0() -return}P.f5(null,null,this,a,-1)}catch(x){z=H.P(x) -y=H.a7(x) -P.b4(null,null,this,z,H.m(y,"$isD"))}}, -c0:function(a,b,c){var z,y,x -H.j(a,{func:1,ret:-1,args:[c]}) -H.n(b,c) -try{if(C.d===$.t){a.$1(b) -return}P.f7(null,null,this,a,b,-1,c)}catch(x){z=H.P(x) -y=H.a7(x) -P.b4(null,null,this,z,H.m(y,"$isD"))}}, -fb:function(a,b,c,d,e){var z,y,x -H.j(a,{func:1,ret:-1,args:[d,e]}) -H.n(b,d) -H.n(c,e) -try{if(C.d===$.t){a.$2(b,c) -return}P.f6(null,null,this,a,b,c,-1,d,e)}catch(x){z=H.P(x) -y=H.a7(x) -P.b4(null,null,this,z,H.m(y,"$isD"))}}, -em:function(a,b){return new P.kJ(this,H.j(a,{func:1,ret:b}),b)}, -cF:function(a){return new P.kI(this,H.j(a,{func:1,ret:-1}))}, -en:function(a,b){return new P.kK(this,H.j(a,{func:1,ret:-1,args:[b]}),b)}, -j:function(a,b){return}, -cV:function(a,b){H.j(a,{func:1,ret:b}) -if($.t===C.d)return a.$0() -return P.f5(null,null,this,a,b)}, -c_:function(a,b,c,d){H.j(a,{func:1,ret:c,args:[d]}) -H.n(b,d) -if($.t===C.d)return a.$1(b) -return P.f7(null,null,this,a,b,c,d)}, -fa:function(a,b,c,d,e,f){H.j(a,{func:1,ret:d,args:[e,f]}) -H.n(b,e) -H.n(c,f) -if($.t===C.d)return a.$2(b,c) -return P.f6(null,null,this,a,b,c,d,e,f)}, -bZ:function(a,b,c,d){return H.j(a,{func:1,ret:b,args:[c,d]})}}, -kJ:{"^":"f;a,b,c", -$0:function(){return this.a.cV(this.b,this.c)}, -$S:function(){return{func:1,ret:this.c}}}, -kI:{"^":"f:1;a,b", -$0:function(){return this.a.cW(this.b)}}, -kK:{"^":"f;a,b,c", -$1:function(a){var z=this.c -return this.a.c0(this.b,H.n(a,z),z)}, -$S:function(){return{func:1,ret:-1,args:[this.c]}}}}],["","",,P,{"^":"", -dF:function(a,b,c,d,e){H.j(a,{func:1,ret:P.F,args:[d,d]}) -H.j(b,{func:1,ret:P.c,args:[d]}) -if(b==null){if(a==null)return new H.ac(0,0,[d,e]) -b=P.lD()}else{if(P.lL()===b&&P.lK()===a)return new P.kE(0,0,[d,e]) -if(a==null)a=P.lC()}return P.ky(a,b,c,d,e)}, -bH:function(a,b,c){H.bx(a) -return H.l(H.lS(a,new H.ac(0,0,[b,c])),"$isdE",[b,c],"$asdE")}, -bG:function(a,b){return new H.ac(0,0,[a,b])}, -ij:function(){return new H.ac(0,0,[null,null])}, -ik:function(a,b,c,d){return new P.kA(0,0,[d])}, -mG:[function(a,b){return J.R(a,b)},"$2","lC",8,0,45], -mH:[function(a){return J.aE(a)},"$1","lD",4,0,46], -i1:function(a,b,c){var z,y -if(P.d0(a)){if(b==="("&&c===")")return"(...)" -return b+"..."+c}z=[] -y=$.$get$b5() -C.b.m(y,a) -try{P.ln(a,z)}finally{if(0>=y.length)return H.k(y,-1) -y.pop()}y=P.bQ(b,H.m1(z,"$isq"),", ")+c -return y.charCodeAt(0)==0?y:y}, -cn:function(a,b,c){var z,y,x -if(P.d0(a))return b+"..."+c -z=new P.U(b) -y=$.$get$b5() -C.b.m(y,a) -try{x=z -x.a=P.bQ(x.ga4(),a,", ")}finally{if(0>=y.length)return H.k(y,-1) -y.pop()}y=z -y.a=y.ga4()+c -y=z.ga4() -return y.charCodeAt(0)==0?y:y}, -d0:function(a){var z,y -for(z=0;y=$.$get$b5(),z=b.length)return H.k(b,-1) -v=b.pop() -if(0>=b.length)return H.k(b,-1) -u=b.pop()}else{t=z.gD();++x -if(!z.q()){if(x<=4){C.b.m(b,H.d(t)) -return}v=H.d(t) -if(0>=b.length)return H.k(b,-1) -u=b.pop() -y+=v.length+2}else{s=z.gD();++x -for(;z.q();t=s,s=r){r=z.gD();++x -if(x>100){while(!0){if(!(y>75&&x>3))break -if(0>=b.length)return H.k(b,-1) -y-=b.pop().length+2;--x}C.b.m(b,"...") -return}}u=H.d(t) -v=H.d(s) -y+=v.length+u.length+4}}if(x>b.length+2){y+=5 -q="..."}else q=null -while(!0){if(!(y>80&&b.length>3))break -if(0>=b.length)return H.k(b,-1) -y-=b.pop().length+2 -if(q==null){y+=5 -q="..."}}if(q!=null)C.b.m(b,q) -C.b.m(b,u) -C.b.m(b,v)}, -ih:function(a,b,c){var z=P.dF(null,null,null,b,c) -a.a.J(0,H.j(new P.ii(z,b,c),{func:1,ret:-1,args:[H.i(a,0),H.i(a,1)]})) -return z}, -cw:function(a){var z,y,x -z={} -if(P.d0(a))return"{...}" -y=new P.U("") -try{C.b.m($.$get$b5(),a) -x=y -x.a=x.ga4()+"{" -z.a=!0 -a.J(0,new P.ip(z,y)) -z=y -z.a=z.ga4()+"}"}finally{z=$.$get$b5() -if(0>=z.length)return H.k(z,-1) -z.pop()}z=y.ga4() -return z.charCodeAt(0)==0?z:z}, -kE:{"^":"ac;a,0b,0c,0d,0e,0f,r,$ti", -aI:function(a){return H.fs(a)&0x3ffffff}, -aJ:function(a,b){var z,y,x -if(a==null)return-1 -z=a.length -for(y=0;y=0)return!1 -x.push(this.ce(a))}return!0}, -f4:function(a,b){var z=this.dZ(b) -return z}, -dZ:function(a){var z,y,x -z=this.d -if(z==null)return!1 -y=this.dC(z,a) -x=this.cm(y,a) -if(x<0)return!1 -this.ea(y.splice(x,1)[0]) -return!0}, -cp:function(){this.r=this.r+1&67108863}, -ce:function(a){var z,y -z=new P.kB(H.n(a,H.i(this,0))) -if(this.e==null){this.f=z -this.e=z}else{y=this.f -z.c=y -y.b=z -this.f=z}++this.a -this.cp() -return z}, -ea:function(a){var z,y -z=a.c -y=a.b -if(z==null)this.e=y -else z.b=y -if(y==null)this.f=z -else y.c=z;--this.a -this.cp()}, -cg:function(a){return J.aE(a)&0x3ffffff}, -dC:function(a,b){return a[this.cg(b)]}, -cm:function(a,b){var z,y -if(a==null)return-1 -z=a.length -for(y=0;y"]=z -delete z[""] -return z}}}, -kB:{"^":"b;a,0b,0c"}, -kC:{"^":"b;a,b,0c,0d,$ti", -scd:function(a){this.d=H.n(a,H.i(this,0))}, -gD:function(){return this.d}, -q:function(){var z=this.a -if(this.b!==z.r)throw H.a(P.a3(z)) -else{z=this.c -if(z==null){this.scd(null) -return!1}else{this.scd(H.n(z.a,H.i(this,0))) -this.c=this.c.b -return!0}}}, -$isa_:1, -p:{ -ev:function(a,b,c){var z=new P.kC(a,b,[c]) -z.c=a.e -return z}}}, -kq:{"^":"j_;"}, -i0:{"^":"q;"}, -ii:{"^":"f:4;a,b,c", -$2:function(a,b){this.a.k(0,H.n(a,this.b),H.n(b,this.c))}}, -il:{"^":"kF;",$isJ:1,$isq:1,$ish:1}, -a4:{"^":"b;$ti", -gK:function(a){return new H.ak(a,this.gi(a),0,[H.b9(this,a,"a4",0)])}, -X:function(a,b){return this.j(a,b)}, -gB:function(a){return this.gi(a)===0}, -a_:function(a,b){return H.af(a,b,null,H.b9(this,a,"a4",0))}, -ab:function(a,b){var z,y -z=H.o([],[H.b9(this,a,"a4",0)]) -C.b.si(z,this.gi(a)) -for(y=0;yz.gi(w))throw H.a(H.dx()) -if(x=0;--v)this.k(a,b+v,z.j(w,x+v)) -else for(v=0;v=z.length)return H.k(z,b) -z=z[b]}return z}, -gK:function(a){var z=this.a -if(z.b==null){z=z.gao() -z=z.gK(z)}else{z=z.aU() -z=new J.c8(z,z.length,0,[H.i(z,0)])}return z}, -$asJ:function(){return[P.e]}, -$asaH:function(){return[P.e]}, -$asq:function(){return[P.e]}}, -fY:{"^":"bB;a", -gah:function(a){return"us-ascii"}, -bL:function(a){return C.q.Z(a)}, -gaf:function(){return C.q}}, -eD:{"^":"V;", -al:function(a,b,c){var z,y,x,w,v,u,t -H.p(a) -z=a.length -P.a8(b,c,z,null,null,null) -y=z-b -x=new Uint8Array(y) -for(w=x.length,v=~this.a,u=0;u=w)return H.k(x,u) -x[u]=t}return x}, -Z:function(a){return this.al(a,0,null)}, -$asV:function(){return[P.e,[P.h,P.c]]}}, -fZ:{"^":"eD;a"}, -h_:{"^":"aj;a", -gaf:function(){return this.a}, -eW:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i -c=P.a8(b,c,a.length,null,null,null) -z=$.$get$el() -for(y=b,x=y,w=null,v=-1,u=-1,t=0;y=z.length)return H.k(z,n) -m=z[n] -if(m>=0){n=C.a.v("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m) -if(n===r)continue -r=n}else{if(m===-1){if(v<0){l=w==null?null:w.a.length -if(l==null)l=0 -v=l+(y-x) -u=y}++t -if(r===61)continue}r=n}if(m!==-2){if(w==null)w=new P.U("") -l=w.a+=C.a.l(a,x,y) -w.a=l+H.K(r) -x=s -continue}}throw H.a(P.C("Invalid base64 data",a,y))}if(w!=null){l=w.a+=C.a.l(a,x,c) -k=l.length -if(v>=0)P.di(a,u,c,v,t,k) -else{j=C.c.aS(k-1,4)+1 -if(j===1)throw H.a(P.C("Invalid base64 encoding length ",a,c)) -for(;j<4;){l+="=" -w.a=l;++j}}l=w.a -return C.a.aq(a,b,c,l.charCodeAt(0)==0?l:l)}i=c-b -if(v>=0)P.di(a,u,c,v,t,i) -else{j=C.c.aS(i,4) -if(j===1)throw H.a(P.C("Invalid base64 encoding length ",a,c)) -if(j>1)a=C.a.aq(a,c,c,j===2?"==":"=")}return a}, -$asaj:function(){return[[P.h,P.c],P.e]}, -p:{ -di:function(a,b,c,d,e,f){if(C.c.aS(f,4)!==0)throw H.a(P.C("Invalid base64 padding, padded length must be multiple of four, is "+f,a,c)) -if(d+e!==f)throw H.a(P.C("Invalid base64 padding, '=' not at the end",a,b)) -if(e>2)throw H.a(P.C("Invalid base64 padding, more than two '=' characters",a,b))}}}, -h0:{"^":"V;a", -Z:function(a){var z -H.l(a,"$ish",[P.c],"$ash") -z=a.length -if(z===0)return"" -return P.aJ(new P.k1(0,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").eA(a,0,z,!0),0,null)}, -$asV:function(){return[[P.h,P.c],P.e]}}, -k1:{"^":"b;a,b", -eA:function(a,b,c,d){var z,y,x,w -H.l(a,"$ish",[P.c],"$ash") -z=(this.a&3)+(c-b) -y=C.c.bB(z,3) -x=y*4 -if(z-y*3>0)x+=4 -w=new Uint8Array(x) -this.a=P.k2(this.b,a,b,c,!0,w,0,this.a) -if(x>0)return w -return}, -p:{ -k2:function(a,b,c,d,e,f,g,h){var z,y,x,w,v,u,t,s,r,q -H.l(b,"$ish",[P.c],"$ash") -z=h>>>2 -y=3-(h&3) -for(x=b.length,w=f.length,v=c,u=0;v=x)return H.k(b,v) -t=b[v] -if(typeof t!=="number")return H.G(t) -u=(u|t)>>>0 -z=(z<<8|t)&16777215;--y -if(y===0){s=g+1 -r=C.a.n(a,z>>>18&63) -if(g>=w)return H.k(f,g) -f[g]=r -g=s+1 -r=C.a.n(a,z>>>12&63) -if(s>=w)return H.k(f,s) -f[s]=r -s=g+1 -r=C.a.n(a,z>>>6&63) -if(g>=w)return H.k(f,g) -f[g]=r -g=s+1 -r=C.a.n(a,z&63) -if(s>=w)return H.k(f,s) -f[s]=r -z=0 -y=3}}if(u>=0&&u<=255){if(y<3){s=g+1 -q=s+1 -if(3-y===1){x=C.a.n(a,z>>>2&63) -if(g>=w)return H.k(f,g) -f[g]=x -x=C.a.n(a,z<<4&63) -if(s>=w)return H.k(f,s) -f[s]=x -g=q+1 -if(q>=w)return H.k(f,q) -f[q]=61 -if(g>=w)return H.k(f,g) -f[g]=61}else{x=C.a.n(a,z>>>10&63) -if(g>=w)return H.k(f,g) -f[g]=x -x=C.a.n(a,z>>>4&63) -if(s>=w)return H.k(f,s) -f[s]=x -g=q+1 -x=C.a.n(a,z<<2&63) -if(q>=w)return H.k(f,q) -f[q]=x -if(g>=w)return H.k(f,g) -f[g]=61}return 0}return(z<<2|3-y)>>>0}for(v=c;v=x)return H.k(b,v) -t=b[v] -if(typeof t!=="number")return t.C() -if(t<0||t>255)break;++v}x="Not a byte value at index "+v+": 0x" -if(v>=b.length)return H.k(b,v) -throw H.a(P.bc(b,x+J.fX(b[v],16),null))}}}, -hc:{"^":"dp;", -$asdp:function(){return[[P.h,P.c]]}}, -hd:{"^":"hc;"}, -k5:{"^":"hd;a,b,c", -sdr:function(a){this.b=H.l(a,"$ish",[P.c],"$ash")}, -m:[function(a,b){var z,y,x,w,v -H.l(b,"$isq",[P.c],"$asq") -z=this.b -y=this.c -x=J.Y(b) -if(x.gi(b)>z.length-y){z=this.b -w=x.gi(b)+z.length-1 -w|=C.c.W(w,1) -w|=w>>>2 -w|=w>>>4 -w|=w>>>8 -v=new Uint8Array((((w|w>>>16)>>>0)+1)*2) -z=this.b -C.l.ac(v,0,z.length,z) -this.sdr(v)}z=this.b -y=this.c -C.l.ac(z,y,y+x.gi(b),b) -this.c=this.c+x.gi(b)},"$1","gei",5,0,15], -a5:[function(a){this.a.$1(C.l.ad(this.b,0,this.c))},"$0","ger",1,0,1]}, -dp:{"^":"b;$ti"}, -aj:{"^":"b;$ti", -bL:function(a){H.n(a,H.u(this,"aj",0)) -return this.gaf().Z(a)}}, -V:{"^":"jb;$ti"}, -bB:{"^":"aj;", -$asaj:function(){return[P.e,[P.h,P.c]]}}, -dC:{"^":"L;a,b,c", -h:function(a){var z=P.be(this.a) -return(this.b!=null?"Converting object to an encodable object failed:":"Converting object did not return an encodable object:")+" "+H.d(z)}, -p:{ -dD:function(a,b,c){return new P.dC(a,b,c)}}}, -i8:{"^":"dC;a,b,c", -h:function(a){return"Cyclic error in JSON stringify"}}, -i7:{"^":"aj;a,b", -ex:function(a,b,c){var z=P.f1(b,this.gey().a) -return z}, -ez:function(a,b){var z=this.gaf() -z=P.ku(a,z.b,z.a) -return z}, -gaf:function(){return C.a_}, -gey:function(){return C.Z}, -$asaj:function(){return[P.b,P.e]}}, -ia:{"^":"V;a,b", -Z:function(a){var z,y,x -z=new P.U("") -y=new P.eu(z,[],P.fi()) -y.aP(a) -x=z.a -return x.charCodeAt(0)==0?x:x}, -$asV:function(){return[P.b,P.e]}}, -i9:{"^":"V;a", -Z:function(a){return P.f1(H.p(a),this.a)}, -$asV:function(){return[P.e,P.b]}}, -kv:{"^":"b;", -d0:function(a){var z,y,x,w,v,u,t,s -z=a.length -for(y=J.a6(a),x=this.c,w=0,v=0;v92)continue -if(u<32){if(v>w)x.a+=C.a.l(a,w,v) -w=v+1 -t=x.a+=H.K(92) -switch(u){case 8:x.a=t+H.K(98) -break -case 9:x.a=t+H.K(116) -break -case 10:x.a=t+H.K(110) -break -case 12:x.a=t+H.K(102) -break -case 13:x.a=t+H.K(114) -break -default:t+=H.K(117) -x.a=t -t+=H.K(48) -x.a=t -t+=H.K(48) -x.a=t -s=u>>>4&15 -t+=H.K(s<10?48+s:87+s) -x.a=t -s=u&15 -x.a=t+H.K(s<10?48+s:87+s) -break}}else if(u===34||u===92){if(v>w)x.a+=C.a.l(a,w,v) -w=v+1 -t=x.a+=H.K(92) -x.a=t+H.K(u)}}if(w===0)x.a+=H.d(a) -else if(w=x.length)return H.k(x,-1) -x.pop()}catch(w){y=H.P(w) -x=P.dD(a,y,this.gct()) -throw H.a(x)}}, -d_:function(a){var z,y -if(typeof a==="number"){if(!isFinite(a))return!1 -this.c.a+=C.m.h(a) -return!0}else if(a===!0){this.c.a+="true" -return!0}else if(a===!1){this.c.a+="false" -return!0}else if(a==null){this.c.a+="null" -return!0}else if(typeof a==="string"){z=this.c -z.a+='"' -this.d0(a) -z.a+='"' -return!0}else{z=J.r(a) -if(!!z.$ish){this.bj(a) -this.fh(a) -z=this.a -if(0>=z.length)return H.k(z,-1) -z.pop() -return!0}else if(!!z.$isS){this.bj(a) -y=this.fi(a) -z=this.a -if(0>=z.length)return H.k(z,-1) -z.pop() -return y}else return!1}}, -fh:function(a){var z,y,x -z=this.c -z.a+="[" -y=J.Y(a) -if(y.gi(a)>0){this.aP(y.j(a,0)) -for(x=1;x=y)return H.k(x,t) -this.aP(x[t])}w.a+="}" -return!0}}, -kw:{"^":"f:4;a,b", -$2:function(a,b){var z,y -if(typeof a!=="string")this.a.b=!1 -z=this.b -y=this.a -C.b.k(z,y.a++,a) -C.b.k(z,y.a++,b)}}, -eu:{"^":"kv;c,a,b", -gct:function(){var z=this.c.a -return z.charCodeAt(0)==0?z:z}, -p:{ -ku:function(a,b,c){var z,y,x -z=new P.U("") -y=new P.eu(z,[],P.fi()) -y.aP(a) -x=z.a -return x.charCodeAt(0)==0?x:x}}}, -ib:{"^":"bB;a", -gah:function(a){return"iso-8859-1"}, -bL:function(a){return C.A.Z(a)}, -gaf:function(){return C.A}}, -ic:{"^":"eD;a"}, -jE:{"^":"bB;a", -gah:function(a){return"utf-8"}, -gaf:function(){return C.N}}, -jL:{"^":"V;", -al:function(a,b,c){var z,y,x,w -H.p(a) -z=a.length -P.a8(b,c,z,null,null,null) -y=z-b -if(y===0)return new Uint8Array(0) -x=new Uint8Array(y*3) -w=new P.l8(0,0,x) -if(w.dB(a,b,z)!==z)w.cC(C.a.v(a,z-1),0) -return C.l.ad(x,0,w.b)}, -Z:function(a){return this.al(a,0,null)}, -$asV:function(){return[P.e,[P.h,P.c]]}}, -l8:{"^":"b;a,b,c", -cC:function(a,b){var z,y,x,w,v -z=this.c -y=this.b -x=y+1 -w=z.length -if((b&64512)===56320){v=65536+((a&1023)<<10)|b&1023 -this.b=x -if(y>=w)return H.k(z,y) -z[y]=240|v>>>18 -y=x+1 -this.b=y -if(x>=w)return H.k(z,x) -z[x]=128|v>>>12&63 -x=y+1 -this.b=x -if(y>=w)return H.k(z,y) -z[y]=128|v>>>6&63 -this.b=x+1 -if(x>=w)return H.k(z,x) -z[x]=128|v&63 -return!0}else{this.b=x -if(y>=w)return H.k(z,y) -z[y]=224|a>>>12 -y=x+1 -this.b=y -if(x>=w)return H.k(z,x) -z[x]=128|a>>>6&63 -this.b=y+1 -if(y>=w)return H.k(z,y) -z[y]=128|a&63 -return!1}}, -dB:function(a,b,c){var z,y,x,w,v,u,t -if(b!==c&&(C.a.v(a,c-1)&64512)===55296)--c -for(z=this.c,y=z.length,x=b;x=y)break -this.b=v+1 -z[v]=w}else if((w&64512)===55296){if(this.b+3>=y)break -u=x+1 -if(this.cC(w,C.a.n(a,u)))x=u}else if(w<=2047){v=this.b -t=v+1 -if(t>=y)break -this.b=t -if(v>=y)return H.k(z,v) -z[v]=192|w>>>6 -this.b=t+1 -z[t]=128|w&63}else{v=this.b -if(v+2>=y)break -t=v+1 -this.b=t -if(v>=y)return H.k(z,v) -z[v]=224|w>>>12 -v=t+1 -this.b=v -if(t>=y)return H.k(z,t) -z[t]=128|w>>>6&63 -this.b=v+1 -if(v>=y)return H.k(z,v) -z[v]=128|w&63}}return x}}, -jF:{"^":"V;a", -al:function(a,b,c){var z,y,x,w,v -H.l(a,"$ish",[P.c],"$ash") -z=P.jG(!1,a,b,c) -if(z!=null)return z -y=J.Z(a) -P.a8(b,c,y,null,null,null) -x=new P.U("") -w=new P.l5(!1,x,!0,0,0,0) -w.al(a,b,y) -if(w.e>0){H.v(P.C("Unfinished UTF-8 octet sequence",a,y)) -x.a+=H.K(65533) -w.d=0 -w.e=0 -w.f=0}v=x.a -return v.charCodeAt(0)==0?v:v}, -Z:function(a){return this.al(a,0,null)}, -$asV:function(){return[[P.h,P.c],P.e]}, -p:{ -jG:function(a,b,c,d){H.l(b,"$ish",[P.c],"$ash") -if(b instanceof Uint8Array)return P.jH(!1,b,c,d) -return}, -jH:function(a,b,c,d){var z,y,x -z=$.$get$ef() -if(z==null)return -y=0===c -if(y&&!0)return P.cL(z,b) -x=b.length -d=P.a8(c,d,x,null,null,null) -if(y&&d===x)return P.cL(z,b) -return P.cL(z,b.subarray(c,d))}, -cL:function(a,b){if(P.jJ(b))return -return P.jK(a,b)}, -jK:function(a,b){var z,y -try{z=a.decode(b) -return z}catch(y){H.P(y)}return}, -jJ:function(a){var z,y -z=a.length-2 -for(y=0;y0){do{if(s===c)break $label0$0 -r=u.j(a,s) -if(typeof r!=="number")return r.c4() -if((r&192)!==128){q=P.C("Bad UTF-8 encoding 0x"+C.c.ar(r,16),a,s) -throw H.a(q)}else{z=(z<<6|r&63)>>>0;--y;++s}}while(y>0) -q=x-1 -if(q<0||q>=4)return H.k(C.B,q) -if(z<=C.B[q]){q=P.C("Overlong encoding of 0x"+C.c.ar(z,16),a,s-x-1) -throw H.a(q)}if(z>1114111){q=P.C("Character outside valid Unicode range: 0x"+C.c.ar(z,16),a,s-x-1) -throw H.a(q)}if(!this.c||z!==65279)t.a+=H.K(z) -this.c=!1}for(q=s0){this.c=!1 -o=s+p -v.$2(s,o) -if(o===c)break}else o=s -n=o+1 -r=u.j(a,o) -if(typeof r!=="number")return r.C() -if(r<0){m=P.C("Negative UTF-8 code unit: -0x"+C.c.ar(-r,16),a,n-1) -throw H.a(m)}else{if((r&224)===192){z=r&31 -y=1 -x=1 -continue $label0$0}if((r&240)===224){z=r&15 -y=2 -x=2 -continue $label0$0}if((r&248)===240&&r<245){z=r&7 -y=3 -x=3 -continue $label0$0}m=P.C("Bad UTF-8 encoding 0x"+C.c.ar(r,16),a,n-1) -throw H.a(m)}}break $label0$0}if(y>0){this.d=z -this.e=y -this.f=x}}}, -l7:{"^":"f:17;a", -$2:function(a,b){var z,y,x,w -H.l(a,"$ish",[P.c],"$ash") -z=this.a -for(y=J.Y(a),x=b;x0||c=z){y=((C.a.n(a,b+4)^58)*3|C.a.n(a,b)^100|C.a.n(a,b+1)^97|C.a.n(a,b+2)^116|C.a.n(a,b+3)^97)>>>0 -if(y===0)return P.ed(b>0||c=14)C.b.k(w,7,c) -v=w[1] -if(typeof v!=="number")return v.aQ() -if(v>=b)if(P.f8(a,b,v,20,w)===20)w[7]=v -x=w[2] -if(typeof x!=="number")return x.t() -u=x+1 -t=w[3] -s=w[4] -r=w[5] -q=w[6] -if(typeof q!=="number")return q.C() -if(typeof r!=="number")return H.G(r) -if(qv+3){o=null -p=!1}else{x=t>b -if(x&&t+1===s){o=null -p=!1}else{if(!(rs+2&&C.a.H(a,"/..",r-3) -else n=!0 -if(n){o=null -p=!1}else{if(v===b+4)if(C.a.H(a,"file",b)){if(u<=b){if(!C.a.H(a,"/",s)){m="file:///" -y=3}else{m="file://" -y=2}a=m+C.a.l(a,s,c) -v-=b -z=y-b -r+=z -q+=z -c=a.length -b=0 -u=7 -t=7 -s=7}else if(s===r)if(b===0&&!0){a=C.a.aq(a,s,r,"/");++r;++q;++c}else{a=C.a.l(a,b,s)+"/"+C.a.l(a,r,c) -v-=b -u-=b -t-=b -s-=b -z=1-b -r+=z -q+=z -c=a.length -b=0}o="file"}else if(C.a.H(a,"http",b)){if(x&&t+3===s&&C.a.H(a,"80",t+1))if(b===0&&!0){a=C.a.aq(a,t,s,"") -s-=3 -r-=3 -q-=3 -c-=3}else{a=C.a.l(a,b,t)+C.a.l(a,s,c) -v-=b -u-=b -t-=b -z=3+b -s-=z -r-=z -q-=z -c=a.length -b=0}o="http"}else o=null -else if(v===z&&C.a.H(a,"https",b)){if(x&&t+4===s&&C.a.H(a,"443",t+1))if(b===0&&!0){a=C.a.aq(a,t,s,"") -s-=4 -r-=4 -q-=4 -c-=3}else{a=C.a.l(a,b,t)+C.a.l(a,s,c) -v-=b -u-=b -t-=b -z=4+b -s-=z -r-=z -q-=z -c=a.length -b=0}o="https"}else o=null -p=!0}}}else o=null -if(p){if(b>0||c9)z.$2("invalid character",w)}else{if(u===3)z.$2("IPv4 address should contain exactly 4 parts",w) -s=P.bw(C.a.l(a,v,w),null,null) -if(typeof s!=="number")return s.as() -if(s>255)z.$2("each part must be in the range 0..255",v) -r=u+1 -if(u>=x)return H.k(y,u) -y[u]=s -v=w+1 -u=r}}if(u!==3)z.$2("IPv4 address should contain exactly 4 parts",c) -s=P.bw(C.a.l(a,v,c),null,null) -if(typeof s!=="number")return s.as() -if(s>255)z.$2("each part must be in the range 0..255",v) -if(u>=x)return H.k(y,u) -y[u]=s -return y}, -ee:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i -if(c==null)c=a.length -z=new P.jB(a) -y=new P.jC(z,a) -if(a.length<2)z.$1("address is too short") -x=H.o([],[P.c]) -for(w=b,v=w,u=!1,t=!1;w>>0) -C.b.m(x,(p[2]<<8|p[3])>>>0)}if(u){if(x.length>7)z.$1("an address with a wildcard must have less than 7 parts")}else if(x.length!==8)z.$1("an address without a wildcard must contain exactly 8 parts") -o=new Uint8Array(16) -for(q=x.length,n=o.length,m=9-q,w=0,l=0;w=n)return H.k(o,l) -o[l]=0 -i=l+1 -if(i>=n)return H.k(o,i) -o[i]=0 -l+=2}else{i=C.c.W(k,8) -if(l<0||l>=n)return H.k(o,l) -o[l]=i -i=l+1 -if(i>=n)return H.k(o,i) -o[i]=k&255 -l+=2}}return o}, -lf:function(){var z,y,x,w,v -z=P.dG(22,new P.lh(),!0,P.y) -y=new P.lg(z) -x=new P.li() -w=new P.lj() -v=H.m(y.$2(0,225),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) -x.$3(v,".",14) -x.$3(v,":",34) -x.$3(v,"/",3) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(14,225),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) -x.$3(v,".",15) -x.$3(v,":",34) -x.$3(v,"/",234) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(15,225),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) -x.$3(v,"%",225) -x.$3(v,":",34) -x.$3(v,"/",9) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(1,225),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",1) -x.$3(v,":",34) -x.$3(v,"/",10) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(2,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",139) -x.$3(v,"/",131) -x.$3(v,".",146) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(3,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) -x.$3(v,"/",68) -x.$3(v,".",18) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(4,229),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",5) -w.$3(v,"AZ",229) -x.$3(v,":",102) -x.$3(v,"@",68) -x.$3(v,"[",232) -x.$3(v,"/",138) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(5,229),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",5) -w.$3(v,"AZ",229) -x.$3(v,":",102) -x.$3(v,"@",68) -x.$3(v,"/",138) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(6,231),"$isy") -w.$3(v,"19",7) -x.$3(v,"@",68) -x.$3(v,"/",138) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(7,231),"$isy") -w.$3(v,"09",7) -x.$3(v,"@",68) -x.$3(v,"/",138) -x.$3(v,"?",172) -x.$3(v,"#",205) -x.$3(H.m(y.$2(8,8),"$isy"),"]",5) -v=H.m(y.$2(9,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) -x.$3(v,".",16) -x.$3(v,"/",234) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(16,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) -x.$3(v,".",17) -x.$3(v,"/",234) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(17,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) -x.$3(v,"/",9) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(10,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) -x.$3(v,".",18) -x.$3(v,"/",234) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(18,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) -x.$3(v,".",19) -x.$3(v,"/",234) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(19,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) -x.$3(v,"/",234) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(11,235),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",11) -x.$3(v,"/",10) -x.$3(v,"?",172) -x.$3(v,"#",205) -v=H.m(y.$2(12,236),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",12) -x.$3(v,"?",12) -x.$3(v,"#",205) -v=H.m(y.$2(13,237),"$isy") -x.$3(v,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",13) -x.$3(v,"?",13) -w.$3(H.m(y.$2(20,245),"$isy"),"az",21) -v=H.m(y.$2(21,245),"$isy") -w.$3(v,"az",21) -w.$3(v,"09",21) -x.$3(v,"+-.",21) -return z}, -f8:function(a,b,c,d,e){var z,y,x,w,v -H.l(e,"$ish",[P.c],"$ash") -z=$.$get$f9() -for(y=b;y=z.length)return H.k(z,d) -x=z[d] -w=C.a.n(a,y)^96 -if(w>95)w=31 -if(w>=x.length)return H.k(x,w) -v=x[w] -d=v&31 -C.b.k(e,v>>>5,y)}return d}, -F:{"^":"b;"}, -"+bool":0, -cd:{"^":"b;a,b", -I:function(a,b){if(b==null)return!1 -if(!(b instanceof P.cd))return!1 -return this.a===b.a&&this.b===b.b}, -gA:function(a){var z=this.a -return(z^C.c.W(z,30))&1073741823}, -h:function(a){var z,y,x,w,v,u,t -z=P.hz(H.iO(this)) -y=P.bd(H.iM(this)) -x=P.bd(H.iI(this)) -w=P.bd(H.iJ(this)) -v=P.bd(H.iL(this)) -u=P.bd(H.iN(this)) -t=P.hA(H.iK(this)) -if(this.b)return z+"-"+y+"-"+x+" "+w+":"+v+":"+u+"."+t+"Z" -else return z+"-"+y+"-"+x+" "+w+":"+v+":"+u+"."+t}, -p:{ -hz:function(a){var z,y -z=Math.abs(a) -y=a<0?"-":"" -if(z>=1000)return""+a -if(z>=100)return y+"0"+z -if(z>=10)return y+"00"+z -return y+"000"+z}, -hA:function(a){if(a>=100)return""+a -if(a>=10)return"0"+a -return"00"+a}, -bd:function(a){if(a>=10)return""+a -return"0"+a}}}, -b7:{"^":"dd;"}, -"+double":0, -L:{"^":"b;"}, -bL:{"^":"L;", -h:function(a){return"Throw of null."}}, -as:{"^":"L;a,b,c,P:d>", -gbq:function(){return"Invalid argument"+(!this.a?"(s)":"")}, -gbp:function(){return""}, -h:function(a){var z,y,x,w,v,u -z=this.c -y=z!=null?" ("+z+")":"" -z=this.d -x=z==null?"":": "+H.d(z) -w=this.gbq()+y+x -if(!this.a)return w -v=this.gbp() -u=P.be(this.b) -return w+v+": "+H.d(u)}, -p:{ -I:function(a){return new P.as(!1,null,null,a)}, -bc:function(a,b,c){return new P.as(!0,a,b,c)}}}, -bl:{"^":"as;e,f,a,b,c,d", -gbq:function(){return"RangeError"}, -gbp:function(){var z,y,x -z=this.e -if(z==null){z=this.f -y=z!=null?": Not less than or equal to "+H.d(z):""}else{x=this.f -if(x==null)y=": Not greater than or equal to "+H.d(z) -else if(x>z)y=": Not in range "+H.d(z)+".."+H.d(x)+", inclusive" -else y=xc)throw H.a(P.z(a,b,c,d,e))}, -a8:function(a,b,c,d,e,f){if(typeof a!=="number")return H.G(a) -if(0>a||a>c)throw H.a(P.z(a,0,c,"start",f)) -if(b!=null){if(a>b||b>c)throw H.a(P.z(b,a,c,"end",f)) -return b}return c}}}, -i_:{"^":"as;e,i:f>,a,b,c,d", -gbq:function(){return"RangeError"}, -gbp:function(){if(J.fF(this.b,0))return": index must not be negative" -var z=this.f -if(z===0)return": no indices are valid" -return": index should be less than "+H.d(z)}, -p:{ -cl:function(a,b,c,d,e){var z=H.w(e!=null?e:J.Z(b)) -return new P.i_(b,z,!0,a,c,"Index out of range")}}}, -jx:{"^":"L;P:a>", -h:function(a){return"Unsupported operation: "+this.a}, -p:{ -A:function(a){return new P.jx(a)}}}, -ju:{"^":"L;P:a>", -h:function(a){var z=this.a -return z!=null?"UnimplementedError: "+z:"UnimplementedError"}, -p:{ -cI:function(a){return new P.ju(a)}}}, -bo:{"^":"L;P:a>", -h:function(a){return"Bad state: "+this.a}, -p:{ -ae:function(a){return new P.bo(a)}}}, -hr:{"^":"L;a", -h:function(a){var z=this.a -if(z==null)return"Concurrent modification during iteration." -return"Concurrent modification during iteration: "+H.d(P.be(z))+"."}, -p:{ -a3:function(a){return new P.hr(a)}}}, -iA:{"^":"b;", -h:function(a){return"Out of Memory"}, -$isL:1}, -dV:{"^":"b;", -h:function(a){return"Stack Overflow"}, -$isL:1}, -hy:{"^":"L;a", -h:function(a){var z=this.a -return z==null?"Reading static variable during its initialization":"Reading static variable '"+z+"' during its initialization"}}, -ka:{"^":"b;P:a>", -h:function(a){return"Exception: "+this.a}}, -ci:{"^":"b;P:a>,aT:b>,G:c>", -h:function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l -z=this.a -y=""!==z?"FormatException: "+z:"FormatException" -x=this.c -w=this.b -if(typeof w!=="string")return x!=null?y+(" (at offset "+H.d(x)+")"):y -if(x!=null)z=x<0||x>w.length -else z=!1 -if(z)x=null -if(x==null){if(w.length>78)w=C.a.l(w,0,75)+"..." -return y+"\n"+w}for(v=1,u=0,t=!1,s=0;s1?y+(" (at line "+v+", character "+(x-u+1)+")\n"):y+(" (at character "+(x+1)+")\n") -q=w.length -for(s=x;s78)if(x-u<75){p=u+75 -o=u -n="" -m="..."}else{if(q-x<75){o=q-75 -p=q -m=""}else{o=x-36 -p=x+36 -m="..."}n="..."}else{p=q -o=u -n="" -m=""}l=C.a.l(w,o,p) -return y+n+l+m+"\n"+C.a.U(" ",x-o+n.length)+"^\n"}, -p:{ -C:function(a,b,c){return new P.ci(a,b,c)}}}, -c:{"^":"dd;"}, -"+int":0, -q:{"^":"b;$ti", -ab:function(a,b){return P.cv(this,b,H.u(this,"q",0))}, -b9:function(a){return this.ab(a,!0)}, -gi:function(a){var z,y -z=this.gK(this) -for(y=0;z.q();)++y -return y}, -gB:function(a){return!this.gK(this).q()}, -a_:function(a,b){return H.dU(this,b,H.u(this,"q",0))}, -X:function(a,b){var z,y,x -if(b<0)H.v(P.z(b,0,null,"index",null)) -for(z=this.gK(this),y=0;z.q();){x=z.gD() -if(b===y)return x;++y}throw H.a(P.cl(b,this,"index",null,y))}, -h:function(a){return P.i1(this,"(",")")}}, -a_:{"^":"b;$ti"}, -h:{"^":"b;$ti",$isJ:1,$isq:1}, -"+List":0, -x:{"^":"b;", -gA:function(a){return P.b.prototype.gA.call(this,this)}, -h:function(a){return"null"}}, -"+Null":0, -dd:{"^":"b;"}, -"+num":0, -b:{"^":";", -I:function(a,b){return this===b}, -gA:function(a){return H.au(this)}, -h:function(a){return"Instance of '"+H.aY(this)+"'"}, -toString:function(){return this.h(this)}}, -ad:{"^":"b;"}, -D:{"^":"b;"}, -e:{"^":"b;",$iscB:1}, -"+String":0, -U:{"^":"b;a4:a<", -gi:function(a){return this.a.length}, -h:function(a){var z=this.a -return z.charCodeAt(0)==0?z:z}, -gB:function(a){return this.a.length===0}, -$ismw:1, -p:{ -bQ:function(a,b,c){var z=J.bb(b) -if(!z.q())return a -if(c.length===0){do a+=H.d(z.gD()) -while(z.q())}else{a+=H.d(z.gD()) -for(;z.q();)a=a+c+H.d(z.gD())}return a}}}, -jA:{"^":"f:19;a", -$2:function(a,b){throw H.a(P.C("Illegal IPv4 address, "+a,this.a,b))}}, -jB:{"^":"f:20;a", -$2:function(a,b){throw H.a(P.C("Illegal IPv6 address, "+a,this.a,b))}, -$1:function(a){return this.$2(a,null)}}, -jC:{"^":"f:21;a,b", -$2:function(a,b){var z -if(b-a>4)this.a.$2("an IPv6 part can only contain a maximum of 4 hex digits",a) -z=P.bw(C.a.l(this.b,a,b),null,16) -if(typeof z!=="number")return z.C() -if(z<0||z>65535)this.a.$2("each part must be in the range of `0x0..0xFFFF`",a) -return z}}, -bt:{"^":"b;O:a<,b,c,d,T:e>,f,r,0x,0y,0z,0Q,0ch", -sdU:function(a){this.x=H.l(a,"$ish",[P.e],"$ash")}, -gaO:function(){return this.b}, -ga1:function(a){var z=this.c -if(z==null)return"" -if(C.a.M(z,"["))return C.a.l(z,1,z.length-1) -return z}, -gax:function(a){var z=this.d -if(z==null)return P.eF(this.a) -return z}, -gap:function(){var z=this.f -return z==null?"":z}, -gb4:function(){var z=this.r -return z==null?"":z}, -gbW:function(){var z,y,x,w,v -z=this.x -if(z!=null)return z -y=this.e -if(y.length!==0&&C.a.n(y,0)===47)y=C.a.F(y,1) -if(y==="")z=C.n -else{x=P.e -w=H.o(y.split("/"),[x]) -v=H.i(w,0) -z=P.dH(new H.dM(w,H.j(P.lJ(),{func:1,ret:null,args:[v]}),[v,null]),x)}this.sdU(z) -return z}, -dJ:function(a,b){var z,y,x,w,v,u -for(z=0,y=0;C.a.H(b,"../",y);){y+=3;++z}x=C.a.bR(a,"/") -while(!0){if(!(x>0&&z>0))break -w=C.a.b6(a,"/",x-1) -if(w<0)break -v=x-w -u=v!==2 -if(!u||v===3)if(C.a.v(a,w+1)===46)u=!u||C.a.v(a,w+2)===46 -else u=!1 -else u=!1 -if(u)break;--z -x=w}return C.a.aq(a,x+1,null,C.a.F(b,y-3*z))}, -cU:function(a){return this.aN(P.bU(a,0,null))}, -aN:function(a){var z,y,x,w,v,u,t,s,r -if(a.gO().length!==0){z=a.gO() -if(a.gaG()){y=a.gaO() -x=a.ga1(a) -w=a.gaH()?a.gax(a):null}else{y="" -x=null -w=null}v=P.ay(a.gT(a)) -u=a.gav()?a.gap():null}else{z=this.a -if(a.gaG()){y=a.gaO() -x=a.ga1(a) -w=P.cS(a.gaH()?a.gax(a):null,z) -v=P.ay(a.gT(a)) -u=a.gav()?a.gap():null}else{y=this.b -x=this.c -w=this.d -if(a.gT(a)===""){v=this.e -u=a.gav()?a.gap():this.f}else{if(a.gbN())v=P.ay(a.gT(a)) -else{t=this.e -if(t.length===0)if(x==null)v=z.length===0?a.gT(a):P.ay(a.gT(a)) -else v=P.ay("/"+a.gT(a)) -else{s=this.dJ(t,a.gT(a)) -r=z.length===0 -if(!r||x!=null||C.a.M(t,"/"))v=P.ay(s) -else v=P.cT(s,!r||x!=null)}}u=a.gav()?a.gap():null}}}return new P.bt(z,y,x,w,v,u,a.gbO()?a.gb4():null)}, -gaG:function(){return this.c!=null}, -gaH:function(){return this.d!=null}, -gav:function(){return this.f!=null}, -gbO:function(){return this.r!=null}, -gbN:function(){return C.a.M(this.e,"/")}, -c2:function(a){var z,y -z=this.a -if(z!==""&&z!=="file")throw H.a(P.A("Cannot extract a file path from a "+H.d(z)+" URI")) -z=this.f -if((z==null?"":z)!=="")throw H.a(P.A("Cannot extract a file path from a URI with a query component")) -z=this.r -if((z==null?"":z)!=="")throw H.a(P.A("Cannot extract a file path from a URI with a fragment component")) -a=$.$get$cR() -if(a)z=P.eS(this) -else{if(this.c!=null&&this.ga1(this)!=="")H.v(P.A("Cannot extract a non-Windows file path from a file URI with an authority")) -y=this.gbW() -P.l_(y,!1) -z=P.bQ(C.a.M(this.e,"/")?"/":"",y,"/") -z=z.charCodeAt(0)==0?z:z}return z}, -c1:function(){return this.c2(null)}, -h:function(a){var z,y,x,w -z=this.y -if(z==null){z=this.a -y=z.length!==0?H.d(z)+":":"" -x=this.c -w=x==null -if(!w||z==="file"){z=y+"//" -y=this.b -if(y.length!==0)z=z+H.d(y)+"@" -if(!w)z+=x -y=this.d -if(y!=null)z=z+":"+H.d(y)}else z=y -z+=this.e -y=this.f -if(y!=null)z=z+"?"+y -y=this.r -if(y!=null)z=z+"#"+y -z=z.charCodeAt(0)==0?z:z -this.y=z}return z}, -I:function(a,b){var z,y -if(b==null)return!1 -if(this===b)return!0 -if(!!J.r(b).$isbT){if(this.a==b.gO())if(this.c!=null===b.gaG())if(this.b==b.gaO())if(this.ga1(this)==b.ga1(b))if(this.gax(this)==b.gax(b))if(this.e===b.gT(b)){z=this.f -y=z==null -if(!y===b.gav()){if(y)z="" -if(z===b.gap()){z=this.r -y=z==null -if(!y===b.gbO()){if(y)z="" -z=z===b.gb4()}else z=!1}else z=!1}else z=!1}else z=!1 -else z=!1 -else z=!1 -else z=!1 -else z=!1 -else z=!1 -return z}return!1}, -gA:function(a){var z=this.z -if(z==null){z=C.a.gA(this.h(0)) -this.z=z}return z}, -$isbT:1, -p:{ -kX:function(a,b,c,d,e,f,g,h,i,j){var z,y,x,w,v,u,t -if(j==null)if(d>b)j=P.eN(a,b,d) -else{if(d===b)P.b0(a,b,"Invalid empty scheme") -j=""}if(e>b){z=d+3 -y=z?\\\\|]',!0,!1) -y.length -if(H.fv(y,x,0)){z=P.A("Illegal character in path: "+H.d(y)) -throw H.a(z)}}}, -l1:function(a,b){var z -if(!(65<=a&&a<=90))z=97<=a&&a<=122 -else z=!0 -if(z)return -z=P.A("Illegal drive letter "+P.jl(a)) -throw H.a(z)}, -cS:function(a,b){if(a!=null&&a===P.eF(b))return -return a}, -eK:function(a,b,c,d){var z,y -if(a==null)return -if(b===c)return"" -if(C.a.v(a,b)===91){if(typeof c!=="number")return c.V() -z=c-1 -if(C.a.v(a,z)!==93)P.b0(a,b,"Missing end `]` to match `[` in host") -P.ee(a,b+1,z) -return C.a.l(a,b,c).toLowerCase()}if(typeof c!=="number")return H.G(c) -y=b -for(;y>>4 -if(t>=8)return H.k(C.E,t) -t=(C.E[t]&1<<(v&15))!==0}else t=!1 -if(t){if(w&&65<=v&&90>=v){if(x==null)x=new P.U("") -if(y>>4 -if(t>=8)return H.k(C.i,t) -t=(C.i[t]&1<<(v&15))!==0}else t=!1 -if(t)P.b0(a,z,"Invalid character") -else{if((v&64512)===55296&&z+1>>4 -if(w>=8)return H.k(C.k,w) -w=(C.k[w]&1<<(x&15))!==0}else w=!1 -if(!w)P.b0(a,z,"Illegal scheme character") -if(65<=x&&x<=90)y=!0}a=C.a.l(a,b,c) -return P.kZ(y?a.toLowerCase():a)}, -kZ:function(a){if(a==="http")return"http" -if(a==="file")return"file" -if(a==="https")return"https" -if(a==="package")return"package" -return a}, -eO:function(a,b,c){if(a==null)return"" -return P.b1(a,b,c,C.a4,!1)}, -eL:function(a,b,c,d,e,f){var z,y,x -z=e==="file" -y=z||f -x=P.b1(a,b,c,C.F,!0) -if(x.length===0){if(z)return"/"}else if(y&&!C.a.M(x,"/"))x="/"+x -return P.l3(x,e,f)}, -l3:function(a,b,c){var z=b.length===0 -if(z&&!c&&!C.a.M(a,"/"))return P.cT(a,!z||c) -return P.ay(a)}, -eM:function(a,b,c,d){if(a!=null)return P.b1(a,b,c,C.j,!0) -return}, -eJ:function(a,b,c){if(a==null)return -return P.b1(a,b,c,C.j,!0)}, -eR:function(a,b,c){var z,y,x,w,v,u -z=b+2 -if(z>=a.length)return"%" -y=C.a.v(a,b+1) -x=C.a.v(a,z) -w=H.c2(y) -v=H.c2(x) -if(w<0||v<0)return"%" -u=w*16+v -if(u<127){z=C.c.W(u,4) -if(z>=8)return H.k(C.D,z) -z=(C.D[z]&1<<(u&15))!==0}else z=!1 -if(z)return H.K(c&&65<=u&&90>=u?(u|32)>>>0:u) -if(y>=97||x>=97)return C.a.l(a,b,b+3).toUpperCase() -return}, -eG:function(a){var z,y,x,w,v,u -if(a<128){z=new Array(3) -z.fixed$length=Array -y=H.o(z,[P.c]) -C.b.k(y,0,37) -C.b.k(y,1,C.a.n("0123456789ABCDEF",a>>>4)) -C.b.k(y,2,C.a.n("0123456789ABCDEF",a&15))}else{if(a>2047)if(a>65535){x=240 -w=4}else{x=224 -w=3}else{x=192 -w=2}z=new Array(3*w) -z.fixed$length=Array -y=H.o(z,[P.c]) -for(v=0;--w,w>=0;x=128){u=C.c.e3(a,6*w)&63|x -C.b.k(y,v,37) -C.b.k(y,v+1,C.a.n("0123456789ABCDEF",u>>>4)) -C.b.k(y,v+2,C.a.n("0123456789ABCDEF",u&15)) -v+=3}}return P.aJ(y,0,null)}, -b1:function(a,b,c,d,e){var z=P.eQ(a,b,c,H.l(d,"$ish",[P.c],"$ash"),e) -return z==null?C.a.l(a,b,c):z}, -eQ:function(a,b,c,d,e){var z,y,x,w,v,u,t,s,r -H.l(d,"$ish",[P.c],"$ash") -z=!e -y=b -x=y -w=null -while(!0){if(typeof y!=="number")return y.C() -if(typeof c!=="number")return H.G(c) -if(!(y>>4 -if(u>=8)return H.k(d,u) -u=(d[u]&1<<(v&15))!==0}else u=!1 -if(u)++y -else{if(v===37){t=P.eR(a,y,!1) -if(t==null){y+=3 -break c$0}if("%"===t){t="%25" -s=1}else s=3}else{if(z)if(v<=93){u=v>>>4 -if(u>=8)return H.k(C.i,u) -u=(C.i[u]&1<<(v&15))!==0}else u=!1 -else u=!1 -if(u){P.b0(a,y,"Invalid character") -t=null -s=null}else{if((v&64512)===55296){u=y+1 -if(u=t)return H.k(z,-1) -z.pop() -if(z.length===0)C.b.m(z,"")}w=!0}else if("."===u)w=!0 -else{C.b.m(z,u) -w=!1}}if(w)C.b.m(z,"") -return C.b.b5(z,"/")}, -cT:function(a,b){var z,y,x,w,v,u -if(!P.eP(a))return!b?P.eH(a):a -z=H.o([],[P.e]) -for(y=a.split("/"),x=y.length,w=!1,v=0;v=z.length)return H.k(z,-1) -z.pop() -w=!0}else{C.b.m(z,"..") -w=!1}else if("."===u)w=!0 -else{C.b.m(z,u) -w=!1}}y=z.length -if(y!==0)if(y===1){if(0>=y)return H.k(z,0) -y=z[0].length===0}else y=!1 -else y=!0 -if(y)return"./" -if(w||C.b.ga9(z)==="..")C.b.m(z,"") -if(!b){if(0>=z.length)return H.k(z,0) -C.b.k(z,0,P.eH(z[0]))}return C.b.b5(z,"/")}, -eH:function(a){var z,y,x,w -z=a.length -if(z>=2&&P.eI(J.c7(a,0)))for(y=1;y>>4 -if(w>=8)return H.k(C.k,w) -w=(C.k[w]&1<<(x&15))===0}else w=!0 -if(w)break}return a}, -eS:function(a){var z,y,x,w,v -z=a.gbW() -y=z.length -if(y>0&&J.Z(z[0])===2&&J.by(z[0],1)===58){if(0>=y)return H.k(z,0) -P.l1(J.by(z[0],0),!1) -P.eE(z,!1,1) -x=!0}else{P.eE(z,!1,0) -x=!1}w=a.gbN()&&!x?"\\":"" -if(a.gaG()){v=a.ga1(a) -if(v.length!==0)w=w+"\\"+H.d(v)+"\\"}w=P.bQ(w,z,"\\") -y=x&&y===1?w+"\\":w -return y.charCodeAt(0)==0?y:y}, -l2:function(a,b){var z,y,x -for(z=0,y=0;y<2;++y){x=C.a.n(a,b+y) -if(48<=x&&x<=57)z=z*16+x-48 -else{x|=32 -if(97<=x&&x<=102)z=z*16+x-87 -else throw H.a(P.I("Invalid URL encoding"))}}return z}, -cU:function(a,b,c,d,e){var z,y,x,w,v,u -y=J.a6(a) -x=b -while(!0){if(!(x127)throw H.a(P.I("Illegal percent encoding in URI")) -if(w===37){if(x+3>a.length)throw H.a(P.I("Truncated URI")) -C.b.m(u,P.l2(a,x+1)) -x+=2}else C.b.m(u,w)}}H.l(u,"$ish",[P.c],"$ash") -return new P.jF(!1).Z(u)}, -eI:function(a){var z=a|32 -return 97<=z&&z<=122}}}, -kY:{"^":"f:9;a,b", -$1:function(a){var z=this.b -if(typeof z!=="number")return z.t() -throw H.a(P.C("Invalid port",this.a,z+1))}}, -l0:{"^":"f:9;a", -$1:function(a){H.p(a) -if(J.fK(a,"/"))if(this.a)throw H.a(P.I("Illegal path character "+a)) -else throw H.a(P.A("Illegal path character "+a))}}, -jy:{"^":"b;a,b,c", -gcY:function(){var z,y,x,w,v -z=this.c -if(z!=null)return z -z=this.b -if(0>=z.length)return H.k(z,0) -y=this.a -z=z[0]+1 -x=C.a.an(y,"?",z) -w=y.length -if(x>=0){v=P.b1(y,x+1,w,C.j,!1) -w=x}else v=null -z=new P.k6(this,"data",null,null,null,P.b1(y,z,w,C.F,!1),v,null) -this.c=z -return z}, -h:function(a){var z,y -z=this.b -if(0>=z.length)return H.k(z,0) -y=this.a -return z[0]===-1?"data:"+y:y}, -p:{ -ed:function(a,b,c){var z,y,x,w,v,u,t,s,r -z=H.o([b-1],[P.c]) -for(y=a.length,x=b,w=-1,v=null;xb)throw H.a(P.C("Invalid MIME type",a,x)) -for(;v!==44;){C.b.m(z,x);++x -for(u=-1;x=0)C.b.m(z,u) -else{t=C.b.ga9(z) -if(v!==44||x!==t+7||!C.a.H(a,"base64",t+1))throw H.a(P.C("Expecting '='",a,x)) -break}}C.b.m(z,x) -s=x+1 -if((z.length&1)===1)a=C.H.eW(a,s,y) -else{r=P.eQ(a,s,y,C.j,!0) -if(r!=null)a=C.a.aq(a,s,y,r)}return new P.jy(a,z,c)}}}, -lh:{"^":"f:23;", -$1:function(a){return new Uint8Array(96)}}, -lg:{"^":"f:24;a", -$2:function(a,b){var z=this.a -if(a>=z.length)return H.k(z,a) -z=z[a] -J.fL(z,0,96,b) -return z}}, -li:{"^":"f;", -$3:function(a,b,c){var z,y,x -for(z=b.length,y=0;y=a.length)return H.k(a,x) -a[x]=c}}}, -lj:{"^":"f;", -$3:function(a,b,c){var z,y,x -for(z=C.a.n(b,0),y=C.a.n(b,1);z<=y;++z){x=(z^96)>>>0 -if(x>=a.length)return H.k(a,x) -a[x]=c}}}, -ao:{"^":"b;a,b,c,d,e,f,r,x,0y", -gaG:function(){return this.c>0}, -gaH:function(){var z,y -if(this.c>0){z=this.d -if(typeof z!=="number")return z.t() -y=this.e -if(typeof y!=="number")return H.G(y) -y=z+1y?C.a.l(this.a,y,z-1):""}, -ga1:function(a){var z=this.c -return z>0?C.a.l(this.a,z,this.d):""}, -gax:function(a){var z -if(this.gaH()){z=this.d -if(typeof z!=="number")return z.t() -return P.bw(C.a.l(this.a,z+1,this.e),null,null)}if(this.gbt())return 80 -if(this.gbu())return 443 -return 0}, -gT:function(a){return C.a.l(this.a,this.e,this.f)}, -gap:function(){var z,y -z=this.f -y=this.r -if(typeof z!=="number")return z.C() -return z=y.length)return this -return new P.ao(C.a.l(y,0,z),this.b,this.c,this.d,this.e,this.f,z,this.x)}, -cU:function(a){return this.aN(P.bU(a,0,null))}, -aN:function(a){if(a instanceof P.ao)return this.e4(this,a) -return this.cz().aN(a)}, -e4:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k -z=b.b -if(z>0)return b -y=b.c -if(y>0){x=a.b -if(x<=0)return b -if(a.gbs())w=b.e!=b.f -else if(a.gbt())w=!b.cn("80") -else w=!a.gbu()||!b.cn("443") -if(w){v=x+1 -u=C.a.l(a.a,0,v)+C.a.F(b.a,z+1) -z=b.d -if(typeof z!=="number")return z.t() -t=b.e -if(typeof t!=="number")return t.t() -s=b.f -if(typeof s!=="number")return s.t() -return new P.ao(u,x,y+v,z+v,t+v,s+v,b.r+v,a.x)}else return this.cz().aN(b)}r=b.e -z=b.f -if(r==z){y=b.r -if(typeof z!=="number")return z.C() -if(z0){for(;C.a.H(y,"../",r);){if(typeof r!=="number")return r.t() -r+=3}if(typeof q!=="number")return q.V() -if(typeof r!=="number")return H.G(r) -v=q-r+1 -u=C.a.l(a.a,0,q)+"/"+C.a.F(y,r) -if(typeof z!=="number")return z.t() -return new P.ao(u,a.b,a.c,a.d,q,z+v,b.r+v,a.x)}o=a.a -for(n=q;C.a.H(o,"../",n);){if(typeof n!=="number")return n.t() -n+=3}m=0 -while(!0){if(typeof r!=="number")return r.t() -l=r+3 -if(typeof z!=="number")return H.G(z) -if(!(l<=z&&C.a.H(y,"../",r)))break;++m -r=l}k="" -while(!0){if(typeof p!=="number")return p.as() -if(typeof n!=="number")return H.G(n) -if(!(p>n))break;--p -if(C.a.v(o,p)===47){if(m===0){k="/" -break}--m -k="/"}}if(p===n&&a.b<=0&&!C.a.H(o,"/",q)){r-=m*3 -k=""}v=p-r+k.length -return new P.ao(C.a.l(o,0,p)+k+C.a.F(y,r),a.b,a.c,a.d,q,z+v,b.r+v,a.x)}, -c2:function(a){var z,y,x -if(this.b>=0&&!this.gbs())throw H.a(P.A("Cannot extract a file path from a "+H.d(this.gO())+" URI")) -z=this.f -y=this.a -if(typeof z!=="number")return z.C() -if(z0?this.ga1(this):null -w=this.gaH()?this.gax(this):null -v=this.a -u=this.f -t=C.a.l(v,this.e,u) -s=this.r -if(typeof u!=="number")return u.C() -u=u=x.length)return H.k(x,v) -u=x[v] -z.a=u -if(u!=null)return u -u=P.ij() -z.a=u -C.b.k(x,v,u) -this.eF(a,new P.jR(z,this)) -return z.a}if(a instanceof Array){t=a -v=this.cJ(t) -x=this.b -if(v>=x.length)return H.k(x,v) -u=x[v] -if(u!=null)return u -s=J.Y(t) -r=s.gi(t) -u=this.c?new Array(r):t -C.b.k(x,v,u) -for(x=J.bu(u),q=0;q=z.length)return H.k(z,-1) -z.pop()}z=y.ga4() -return z.charCodeAt(0)==0?z:z}, -bv:function(a){var z -if(a==null||H.b6(a,H.u(this,"B",1))){z=this.b.$1(a) -z=z}else z=!1 -return z}, -$isS:1, -$asS:function(a,b,c){return[b,c]}}, -hf:{"^":"f;a", -$2:function(a,b){var z=this.a -H.n(a,H.u(z,"B",1)) -H.n(b,H.u(z,"B",2)) -z.k(0,a,b) -return b}, -$S:function(){var z,y -z=this.a -y=H.u(z,"B",2) -return{func:1,ret:y,args:[H.u(z,"B",1),y]}}}, -hg:{"^":"f;a,b", -$2:function(a,b){var z=this.a -H.n(a,H.u(z,"B",0)) -H.l(b,"$isbj",[H.u(z,"B",1),H.u(z,"B",2)],"$asbj") -return this.b.$2(b.a,b.b)}, -$S:function(){var z=this.a -return{func:1,ret:-1,args:[H.u(z,"B",0),[B.bj,H.u(z,"B",1),H.u(z,"B",2)]]}}}, -hh:{"^":"f;a,b,c", -$2:function(a,b){var z=this.b -H.n(a,H.u(z,"B",1)) -H.n(b,H.u(z,"B",2)) -z=this.a -if(!z.a)this.c.a+=", " -z.a=!1 -this.c.a+=H.d(a)+": "+H.d(b)}, -$S:function(){var z=this.b -return{func:1,ret:P.x,args:[H.u(z,"B",1),H.u(z,"B",2)]}}}, -lm:{"^":"f:12;a", -$1:function(a){return this.a===a}}}],["","",,B,{"^":"",bj:{"^":"b;a,b,$ti"}}],["","",,N,{"^":"",hJ:{"^":"aj;", -gaf:function(){return C.K}, -$asaj:function(){return[[P.h,P.c],P.e]}}}],["","",,R,{"^":"", -le:function(a,b,c){var z,y,x,w,v,u,t,s,r -H.l(a,"$ish",[P.c],"$ash") -z=new Uint8Array((c-b)*2) -for(y=z.length,x=a.length,w=b,v=0,u=0;w=x)return H.k(a,w) -t=a[w] -if(typeof t!=="number")return H.G(t) -u=(u|t)>>>0 -s=v+1 -r=(t&240)>>>4 -r=r<10?r+48:r+97-10 -if(v>=y)return H.k(z,v) -z[v]=r -v=s+1 -r=t&15 -r=r<10?r+48:r+97-10 -if(s>=y)return H.k(z,s) -z[s]=r}if(u>=0&&u<=255)return P.aJ(z,0,null) -for(w=b;w=x)return H.k(a,w) -t=a[w] -if(typeof t!=="number")return t.aQ() -if(t>=0&&t<=255)continue -throw H.a(P.C("Invalid byte "+(t<0?"-":"")+"0x"+C.c.ar(Math.abs(t),16)+".",a,w))}throw H.a("unreachable")}, -hK:{"^":"V;", -Z:function(a){H.l(a,"$ish",[P.c],"$ash") -return R.le(a,0,a.length)}, -$asV:function(){return[[P.h,P.c],P.e]}}}],["","",,E,{"^":"",h1:{"^":"b;", -b1:function(a,b,c,d,e){return this.e1(a,b,c,d,e)}, -e1:function(a,b,c,d,e){var z=0,y=P.d2(U.bm),x,w=this,v,u,t -var $async$b1=P.d4(function(f,g){if(f===1)return P.cV(g,y) -while(true)switch(z){case 0:b=P.bU(b,0,null) -v=P.e -u=new O.iV(C.h,new Uint8Array(0),a,b,!0,!0,5,P.dF(new G.h3(),new G.h4(),null,v,v),!1) -u.seo(0,d) -t=U -z=3 -return P.bW(w.ai(0,u),$async$b1) -case 3:x=t.iW(g) -z=1 -break -case 1:return P.cW(x,y)}}) -return P.cX($async$b1,y)}}}],["","",,G,{"^":"",h2:{"^":"b;", -fu:["d8",function(){if(this.x)throw H.a(P.ae("Can't finalize a finalized Request.")) -this.x=!0 -return}], -h:function(a){return this.a+" "+H.d(this.b)}},h3:{"^":"f:28;", -$2:function(a,b){H.p(a) -H.p(b) -return a.toLowerCase()===b.toLowerCase()}},h4:{"^":"f:29;", -$1:function(a){return C.a.gA(H.p(a).toLowerCase())}}}],["","",,T,{"^":"",dj:{"^":"b;", -c6:function(a,b,c,d,e,f,g){var z=this.b -if(typeof z!=="number")return z.C() -if(z<100)throw H.a(P.I("Invalid status code "+z+"."))}}}],["","",,O,{"^":"",h6:{"^":"h1;a,b", -scZ:function(a,b){this.b=H.fh(b)}, -ai:function(a,b){var z=0,y=P.d2(X.bP),x,w=2,v,u=[],t=this,s,r,q,p,o,n -var $async$ai=P.d4(function(c,d){if(c===1){v=d -z=w}while(true)switch(z){case 0:b.d8() -q=[P.h,P.c] -z=3 -return P.bW(new Z.dn(P.dX(H.o([b.z],[q]),q)).cX(),$async$ai) -case 3:p=d -s=new XMLHttpRequest() -q=t.a -q.m(0,s) -o=J.ar(b.b) -n=H.m(s,"$isbE");(n&&C.w).eX(n,b.a,o,!0,null,null) -J.fT(s,"blob") -J.fU(s,t.b) -b.r.J(0,J.fQ(s)) -o=X.bP -r=new P.cN(new P.E(0,$.t,[o]),[o]) -o=[W.am] -n=new W.bs(H.m(s,"$isaG"),"load",!1,o) -n.gam(n).az(new O.h9(s,r,b),null) -o=new W.bs(H.m(s,"$isaG"),"error",!1,o) -o.gam(o).az(new O.ha(r,b),null) -J.fS(s,p) -w=4 -z=7 -return P.bW(r.gcL(),$async$ai) -case 7:o=d -x=o -u=[1] -z=5 -break -u.push(6) -z=5 -break -case 4:u=[2] -case 5:w=2 -q.f4(0,s) -z=u.pop() -break -case 6:case 1:return P.cW(x,y) -case 2:return P.cV(v,y)}}) -return P.cX($async$ai,y)}, -a5:function(a){var z -for(z=this.a,z=P.ev(z,z.r,H.i(z,0));z.q();)z.d.abort()}},h9:{"^":"f:5;a,b,c", -$1:function(a){var z,y,x,w,v,u,t -H.m(a,"$isam") -z=this.a -y=W.eV(z.response)==null?W.h5([],null,null):W.eV(z.response) -x=new FileReader() -w=[W.am] -v=new W.bs(x,"load",!1,w) -u=this.b -t=this.c -v.gam(v).az(new O.h7(x,u,z,t),null) -w=new W.bs(x,"error",!1,w) -w.gam(w).az(new O.h8(u,t),null) -C.v.f1(x,H.m(y,"$isdk"))}},h7:{"^":"f:5;a,b,c,d", -$1:function(a){var z,y,x,w,v,u,t -H.m(a,"$isam") -z=H.db(C.v.gf8(this.a),"$isy") -y=[P.h,P.c] -y=P.dX(H.o([z],[y]),y) -x=this.c -w=x.status -v=z.length -u=this.d -t=C.w.gf6(x) -x=x.statusText -y=new X.bP(B.md(new Z.dn(y)),u,w,x,v,t,!1,!0) -y.c6(w,v,t,!1,!0,x,u) -this.b.a6(0,y)}},h8:{"^":"f:5;a,b", -$1:function(a){this.a.ak(new E.dq(J.ar(H.m(a,"$isam")),this.b.b),P.cF())}},ha:{"^":"f:5;a,b", -$1:function(a){H.m(a,"$isam") -this.a.ak(new E.dq("XMLHttpRequest error.",this.b.b),P.cF())}}}],["","",,Z,{"^":"",dn:{"^":"cG;a", -cX:function(){var z,y,x,w -z=P.y -y=new P.E(0,$.t,[z]) -x=new P.cN(y,[z]) -w=new P.k5(new Z.he(x),new Uint8Array(1024),0) -this.aa(w.gei(w),!0,w.ger(w),x.gcG()) -return y}, -$asT:function(){return[[P.h,P.c]]}, -$ascG:function(){return[[P.h,P.c]]}},he:{"^":"f:31;a", -$1:function(a){return this.a.a6(0,new Uint8Array(H.bZ(H.l(a,"$ish",[P.c],"$ash"))))}}}],["","",,E,{"^":"",dq:{"^":"b;P:a>,b", -h:function(a){return this.a}}}],["","",,O,{"^":"",iV:{"^":"h2;y,z,a,b,0c,d,e,f,r,x", -gbM:function(a){if(this.gaV()==null||!this.gaV().c.a.a7("charset"))return this.y -return B.ma(this.gaV().c.a.j(0,"charset"))}, -seo:function(a,b){var z,y,x -z=H.l(this.gbM(this).bL(b),"$ish",[P.c],"$ash") -this.du() -this.z=B.fB(z) -y=this.gaV() -if(y==null){z=this.gbM(this) -x=P.e -this.r.k(0,"content-type",R.cx("text","plain",P.bH(["charset",z.gah(z)],x,x)).h(0))}else if(!y.c.a.a7("charset")){z=this.gbM(this) -x=P.e -this.r.k(0,"content-type",y.ep(P.bH(["charset",z.gah(z)],x,x)).h(0))}}, -gaV:function(){var z=this.r.j(0,"content-type") -if(z==null)return -return R.ir(z)}, -du:function(){if(!this.x)return -throw H.a(P.ae("Can't modify a finalized Request."))}}}],["","",,U,{"^":"",bm:{"^":"dj;x,a,b,c,d,e,f,r",p:{ -iW:function(a){H.m(a,"$isbP") -return a.x.cX().az(new U.iX(a),U.bm)}}},iX:{"^":"f:48;a", -$1:function(a){var z,y,x,w,v,u -H.m(a,"$isy") -z=this.a -y=z.b -x=z.a -w=z.e -z=z.c -v=B.fB(a) -u=a.length -v=new U.bm(v,x,y,z,u,w,!1,!0) -v.c6(y,u,w,!1,!0,z,x) -return v}}}],["","",,X,{"^":"",bP:{"^":"dj;x,a,b,c,d,e,f,r"}}],["","",,B,{"^":"", -ma:function(a){var z -H.p(a) -z=P.hD(a) -if(z!=null)return z -throw H.a(P.C('Unsupported encoding "'+H.d(a)+'".',null,null))}, -fB:function(a){var z -H.l(a,"$ish",[P.c],"$ash") -z=J.r(a) -if(!!z.$isy)return a -if(!!z.$iseb){z=a.buffer -z.toString -return H.dN(z,0,null)}return new Uint8Array(H.bZ(a))}, -md:function(a){H.l(a,"$isT",[[P.h,P.c]],"$asT") -return a}}],["","",,Z,{"^":"",hi:{"^":"B;a,b,c,$ti", -$asS:function(a){return[P.e,a]}, -$asB:function(a){return[P.e,P.e,a]}, -p:{ -hj:function(a,b){var z=P.e -z=new Z.hi(new Z.hk(),new Z.hl(),new H.ac(0,0,[z,[B.bj,z,b]]),[b]) -z.bE(0,a) -return z}}},hk:{"^":"f:6;", -$1:function(a){return H.p(a).toLowerCase()}},hl:{"^":"f:34;", -$1:function(a){return a!=null}}}],["","",,R,{"^":"",bK:{"^":"b;a,b,c", -eq:function(a,b,c,d,e){var z,y -z=P.e -H.l(c,"$isS",[z,z],"$asS") -y=P.ih(this.c,z,z) -y.bE(0,c) -return R.cx(this.a,this.b,y)}, -ep:function(a){return this.eq(!1,null,a,null,null)}, -h:function(a){var z,y -z=new P.U("") -y=this.a -z.a=y -y+="/" -z.a=y -z.a=y+this.b -y=this.c -y.a.J(0,H.j(new R.iu(z),{func:1,ret:-1,args:[H.i(y,0),H.i(y,1)]})) -y=z.a -return y.charCodeAt(0)==0?y:y}, -p:{ -ir:function(a){return B.mf("media type",a,new R.is(a),R.bK)}, -cx:function(a,b,c){var z,y,x,w -z=a.toLowerCase() -y=b.toLowerCase() -x=P.e -w=c==null?P.bG(x,x):Z.hj(c,x) -return new R.bK(z,y,new P.ec(w,[x,x]))}}},is:{"^":"f:35;a", -$0:function(){var z,y,x,w,v,u,t,s,r,q,p,o -z=this.a -y=new X.jj(null,z,0) -x=$.$get$fD() -y.bd(x) -w=$.$get$fC() -y.aF(w) -v=y.gbS().j(0,0) -y.aF("/") -y.aF(w) -u=y.gbS().j(0,0) -y.bd(x) -t=P.e -s=P.bG(t,t) -while(!0){t=C.a.aw(";",z,y.c) -y.d=t -r=y.c -y.e=r -q=t!=null -if(q){t=t.gu() -y.c=t -y.e=t}else t=r -if(!q)break -t=x.aw(0,z,t) -y.d=t -y.e=y.c -if(t!=null){t=t.gu() -y.c=t -y.e=t}y.aF(w) -if(y.c!==y.e)y.d=null -p=y.d.j(0,0) -y.aF("=") -t=w.aw(0,z,y.c) -y.d=t -r=y.c -y.e=r -q=t!=null -if(q){t=t.gu() -y.c=t -y.e=t -r=t}else t=r -if(q){if(t!==r)y.d=null -o=y.d.j(0,0)}else o=N.lP(y,null) -t=x.aw(0,z,y.c) -y.d=t -y.e=y.c -if(t!=null){t=t.gu() -y.c=t -y.e=t}s.k(0,p,o)}y.eC() -return R.cx(v,u,s)}},iu:{"^":"f:36;a", -$2:function(a,b){var z,y -H.p(a) -H.p(b) -z=this.a -z.a+="; "+H.d(a)+"=" -y=$.$get$fr().b -if(typeof b!=="string")H.v(H.O(b)) -if(y.test(b)){z.a+='"' -y=$.$get$eX() -b.toString -y=z.a+=H.fw(b,y,H.j(new R.it(),{func:1,ret:P.e,args:[P.ad]}),null) -z.a=y+'"'}else z.a+=H.d(b)}},it:{"^":"f:13;", -$1:function(a){return C.a.t("\\",a.j(0,0))}}}],["","",,N,{"^":"", -lP:function(a,b){var z -a.cI($.$get$f4(),"quoted string") -z=a.gbS().j(0,0) -return H.fw(J.bz(z,1,z.length-1),$.$get$f3(),H.j(new N.lQ(),{func:1,ret:P.e,args:[P.ad]}),null)}, -lQ:{"^":"f:13;", -$1:function(a){return a.j(0,1)}}}],["","",,B,{"^":"", -mf:function(a,b,c,d){var z,y,x,w,v -H.j(c,{func:1,ret:d}) -try{x=c.$0() -return x}catch(w){x=H.P(w) -v=J.r(x) -if(!!v.$isbN){z=x -throw H.a(G.j7("Invalid "+a+": "+z.gdK(),z.ge5(),J.dh(z)))}else if(!!v.$isci){y=x -throw H.a(P.C("Invalid "+a+' "'+b+'": '+J.fN(y),J.dh(y),J.fO(y)))}else throw w}}}],["","",,N,{"^":"",bi:{"^":"b;a,b,0c,d,e,0f", -gcK:function(){var z,y,x -z=this.b -y=z==null||z.a==="" -x=this.a -return y?x:z.gcK()+"."+x}, -gcP:function(){if($.fm){var z=this.b -if(z!=null)return z.gcP()}return $.ls}, -eR:function(a,b,c,d,e){var z,y,x,w -z=a.b -if(z>=this.gcP().b){y=$.m9.b -if(z>=y){d=P.cF() -c="autogenerated stack trace for "+a.h(0)+" "+b}e=$.t -z=this.gcK() -y=Date.now() -x=$.dI -$.dI=x+1 -if($.fm)for(w=this;w!=null;)w=w.b -else $.$get$dK().dX(new N.im(a,b,null,z,new P.cd(y,!1),x,c,d,e))}}, -eQ:function(a,b,c,d){return this.eR(a,b,c,d,null)}, -dX:function(a){}, -p:{ -bI:function(a){return $.$get$dJ().f_(a,new N.io(a))}}},io:{"^":"f:38;a", -$0:function(){var z,y,x,w,v,u -z=this.a -if(C.a.M(z,"."))H.v(P.I("name shouldn't start with a '.'")) -y=C.a.bR(z,".") -if(y===-1)x=z!==""?N.bI(""):null -else{x=N.bI(C.a.l(z,0,y)) -z=C.a.F(z,y+1)}w=P.e -v=N.bi -u=new H.ac(0,0,[w,v]) -w=new N.bi(z,x,u,new P.ec(u,[w,v])) -if(x!=null)x.d.k(0,z,w) -return w}},bh:{"^":"b;a,b", -I:function(a,b){if(b==null)return!1 -return b instanceof N.bh&&this.b===b.b}, -C:function(a,b){return C.c.C(this.b,H.m(b,"$isbh").b)}, -gA:function(a){return this.b}, -h:function(a){return this.a}},im:{"^":"b;a,P:b>,c,d,e,f,r,x,y", -h:function(a){return"["+this.a.a+"] "+this.d+": "+H.d(this.b)}}}],["","",,D,{"^":"", -fj:function(){var z,y,x,w,v -z=P.cK() -if(J.R(z,$.eW))return $.cY -$.eW=z -y=$.$get$cH() -x=$.$get$aZ() -if(y==null?x==null:y===x){y=z.cU(".").h(0) -$.cY=y -return y}else{w=z.c1() -v=w.length-1 -y=v===0?w:C.a.l(w,0,v) -$.cY=y -return y}}}],["","",,M,{"^":"", -f2:function(a){if(!!J.r(a).$isbT)return a -throw H.a(P.bc(a,"uri","Value must be a String or a Uri"))}, -fd:function(a,b){var z,y,x,w,v,u,t,s -z=P.e -H.l(b,"$ish",[z],"$ash") -for(y=b.length,x=1;x=1;y=w){w=y-1 -if(b[w]!=null)break}v=new P.U("") -u=a+"(" -v.a=u -t=H.af(b,0,y,H.i(b,0)) -s=H.i(t,0) -z=u+new H.dM(t,H.j(new M.lu(),{func:1,ret:z,args:[s]}),[s,z]).b5(0,", ") -v.a=z -v.a=z+("): part "+(x-1)+" was null, but part "+x+" was not.") -throw H.a(P.I(v.h(0)))}}, -hu:{"^":"b;a,b", -eh:function(a,b,c,d,e,f,g,h){var z -M.fd("absolute",H.o([b,c,d,e,f,g,h],[P.e])) -z=this.a -z=z.R(b)>0&&!z.ag(b) -if(z)return b -z=D.fj() -return this.eL(0,z,b,c,d,e,f,g,h)}, -eg:function(a,b){return this.eh(a,b,null,null,null,null,null,null)}, -eL:function(a,b,c,d,e,f,g,h,i){var z,y -z=H.o([b,c,d,e,f,g,h,i],[P.e]) -M.fd("join",z) -y=H.i(z,0) -return this.eM(new H.eg(z,H.j(new M.hw(),{func:1,ret:P.F,args:[y]}),[y]))}, -eM:function(a){var z,y,x,w,v,u,t,s,r -H.l(a,"$isq",[P.e],"$asq") -for(z=H.i(a,0),y=H.j(new M.hv(),{func:1,ret:P.F,args:[z]}),x=a.gK(a),z=new H.eh(x,y,[z]),y=this.a,w=!1,v=!1,u="";z.q();){t=x.gD() -if(y.ag(t)&&v){s=X.bk(t,y) -r=u.charCodeAt(0)==0?u:u -u=C.a.l(r,0,y.ay(r,!0)) -s.b=u -if(y.aK(u))C.b.k(s.e,0,y.gaj()) -u=s.h(0)}else if(y.R(t)>0){v=!y.ag(t) -u=H.d(t)}else{if(!(t.length>0&&y.bI(t[0])))if(w)u+=y.gaj() -u+=H.d(t)}w=y.aK(t)}return u.charCodeAt(0)==0?u:u}, -c5:function(a,b){var z,y,x -z=X.bk(b,this.a) -y=z.d -x=H.i(y,0) -z.scR(P.cv(new H.eg(y,H.j(new M.hx(),{func:1,ret:P.F,args:[x]}),[x]),!0,x)) -y=z.b -if(y!=null)C.b.cO(z.d,0,y) -return z.d}, -bU:function(a){var z -if(!this.dN(a))return a -z=X.bk(a,this.a) -z.bT() -return z.h(0)}, -dN:function(a){var z,y,x,w,v,u,t,s,r,q -z=this.a -y=z.R(a) -if(y!==0){if(z===$.$get$bp())for(x=0;x0)return this.bU(a) -if(z.R(a)<=0||z.ag(a))a=this.eg(0,a) -if(z.R(a)<=0&&z.R(b)>0)throw H.a(X.dQ('Unable to find a path to "'+a+'" from "'+H.d(b)+'".')) -x=X.bk(b,z) -x.bT() -w=X.bk(a,z) -w.bT() -y=x.d -if(y.length>0&&J.R(y[0],"."))return w.h(0) -y=x.b -v=w.b -if(y!=v)y=y==null||v==null||!z.bX(y,v) -else y=!1 -if(y)return w.h(0) -while(!0){y=x.d -if(y.length>0){v=w.d -y=v.length>0&&z.bX(y[0],v[0])}else y=!1 -if(!y)break -C.b.b7(x.d,0) -C.b.b7(x.e,1) -C.b.b7(w.d,0) -C.b.b7(w.e,1)}y=x.d -if(y.length>0&&J.R(y[0],".."))throw H.a(X.dQ('Unable to find a path to "'+a+'" from "'+H.d(b)+'".')) -y=P.e -C.b.bQ(w.d,0,P.cu(x.d.length,"..",!1,y)) -C.b.k(w.e,0,"") -C.b.bQ(w.e,1,P.cu(x.d.length,z.gaj(),!1,y)) -z=w.d -y=z.length -if(y===0)return"." -if(y>1&&J.R(C.b.ga9(z),".")){C.b.aM(w.d) -z=w.e -C.b.aM(z) -C.b.aM(z) -C.b.m(z,"")}w.b="" -w.cT() -return w.h(0)}, -f2:function(a){return this.f3(a,null)}, -cS:function(a){var z,y,x,w,v -z=M.f2(a) -if(z.gO()==="file"){y=this.a -x=$.$get$aZ() -x=y==null?x==null:y===x -y=x}else y=!1 -if(y)return z.h(0) -else{if(z.gO()!=="file")if(z.gO()!==""){y=this.a -x=$.$get$aZ() -x=y==null?x!=null:y!==x -y=x}else y=!1 -else y=!1 -if(y)return z.h(0)}w=this.bU(this.a.bV(M.f2(z))) -v=this.f2(w) -return this.c5(0,v).length>this.c5(0,w).length?w:v}}, -hw:{"^":"f:10;", -$1:function(a){return H.p(a)!=null}}, -hv:{"^":"f:10;", -$1:function(a){return H.p(a)!==""}}, -hx:{"^":"f:10;", -$1:function(a){return H.p(a).length!==0}}, -lu:{"^":"f:6;", -$1:function(a){H.p(a) -return a==null?"null":'"'+a+'"'}}}],["","",,B,{"^":"",cm:{"^":"jn;", -d4:function(a){var z,y -z=this.R(a) -if(z>0)return J.bz(a,0,z) -if(this.ag(a)){if(0>=a.length)return H.k(a,0) -y=a[0]}else y=null -return y}, -bX:function(a,b){return H.p(a)==H.p(b)}}}],["","",,X,{"^":"",iB:{"^":"b;a,b,c,d,e", -scR:function(a){this.d=H.l(a,"$ish",[P.e],"$ash")}, -sd5:function(a){this.e=H.l(a,"$ish",[P.e],"$ash")}, -cT:function(){var z,y -while(!0){z=this.d -if(!(z.length!==0&&J.R(C.b.ga9(z),"")))break -C.b.aM(this.d) -C.b.aM(this.e)}z=this.e -y=z.length -if(y>0)C.b.k(z,y-1,"")}, -eV:function(a){var z,y,x,w,v,u,t,s,r -z=P.e -y=H.o([],[z]) -for(x=this.d,w=x.length,v=0,u=0;u0)y.pop() -else ++v -else C.b.m(y,t)}if(this.b==null)C.b.bQ(y,0,P.cu(v,"..",!1,z)) -if(y.length===0&&this.b==null)C.b.m(y,".") -r=P.dG(y.length,new X.iC(this),!0,z) -z=this.b -C.b.cO(r,0,z!=null&&y.length>0&&this.a.aK(z)?this.a.gaj():"") -this.scR(y) -this.sd5(r) -z=this.b -if(z!=null&&this.a===$.$get$bp()){z.toString -this.b=H.aQ(z,"/","\\")}this.cT()}, -bT:function(){return this.eV(!1)}, -h:function(a){var z,y,x -z=this.b -z=z!=null?z:"" -for(y=0;y=x.length)return H.k(x,y) -x=z+H.d(x[y]) -z=this.d -if(y>=z.length)return H.k(z,y) -z=x+H.d(z[y])}z+=H.d(C.b.ga9(this.e)) -return z.charCodeAt(0)==0?z:z}, -p:{ -bk:function(a,b){var z,y,x,w,v,u,t -z=b.d4(a) -y=b.ag(a) -if(z!=null)a=J.fW(a,z.length) -x=[P.e] -w=H.o([],x) -v=H.o([],x) -x=a.length -if(x!==0&&b.a8(C.a.n(a,0))){if(0>=x)return H.k(a,0) -C.b.m(v,a[0]) -u=1}else{C.b.m(v,"") -u=0}for(t=u;t", -h:function(a){return"PathException: "+this.a}, -p:{ -dQ:function(a){return new X.iD(a)}}}}],["","",,O,{"^":"", -jo:function(){var z,y,x,w,v,u,t,s,r,q,p -if(P.cK().gO()!=="file")return $.$get$aZ() -z=P.cK() -if(!C.a.b3(z.gT(z),"/"))return $.$get$aZ() -y=P.eN(null,0,0) -x=P.eO(null,0,0) -w=P.eK(null,0,0,!1) -v=P.eM(null,0,0,null) -u=P.eJ(null,0,0) -t=P.cS(null,y) -s=y==="file" -if(w==null)z=x.length!==0||t!=null||s -else z=!1 -if(z)w="" -z=w==null -r=!z -q=P.eL("a/b",0,3,null,y,r) -p=y.length===0 -if(p&&z&&!C.a.M(q,"/"))q=P.cT(q,!p||r) -else q=P.ay(q) -if(new P.bt(y,x,z&&C.a.M(q,"//")?"":w,t,q,v,u).c1()==="a\\b")return $.$get$bp() -return $.$get$dZ()}, -jn:{"^":"b;", -h:function(a){return this.gah(this)}}}],["","",,E,{"^":"",iF:{"^":"cm;ah:a>,aj:b<,c,d,e,f,0r", -bI:function(a){return C.a.au(a,"/")}, -a8:function(a){return a===47}, -aK:function(a){var z=a.length -return z!==0&&J.by(a,z-1)!==47}, -ay:function(a,b){if(a.length!==0&&J.c7(a,0)===47)return 1 -return 0}, -R:function(a){return this.ay(a,!1)}, -ag:function(a){return!1}, -bV:function(a){var z -if(a.gO()===""||a.gO()==="file"){z=a.gT(a) -return P.cU(z,0,z.length,C.h,!1)}throw H.a(P.I("Uri "+a.h(0)+" must have scheme 'file:'."))}}}],["","",,F,{"^":"",jD:{"^":"cm;ah:a>,aj:b<,c,d,e,f,r", -bI:function(a){return C.a.au(a,"/")}, -a8:function(a){return a===47}, -aK:function(a){var z=a.length -if(z===0)return!1 -if(J.a6(a).v(a,z-1)!==47)return!0 -return C.a.b3(a,"://")&&this.R(a)===z}, -ay:function(a,b){var z,y,x,w,v -z=a.length -if(z===0)return 0 -if(J.a6(a).n(a,0)===47)return 1 -for(y=0;y,aj:b<,c,d,e,f,r", -bI:function(a){return C.a.au(a,"/")}, -a8:function(a){return a===47||a===92}, -aK:function(a){var z=a.length -if(z===0)return!1 -z=J.by(a,z-1) -return!(z===47||z===92)}, -ay:function(a,b){var z,y,x -z=a.length -if(z===0)return 0 -y=J.a6(a).n(a,0) -if(y===47)return 1 -if(y===92){if(z<2||C.a.n(a,1)!==92)return 1 -x=C.a.an(a,"\\",2) -if(x>0){x=C.a.an(a,"\\",x+1) -if(x>0)return x}return z}if(z<3)return 0 -if(!B.fn(y))return 0 -if(C.a.n(a,1)!==58)return 0 -z=C.a.n(a,2) -if(!(z===47||z===92))return 0 -return 3}, -R:function(a){return this.ay(a,!1)}, -ag:function(a){return this.R(a)===1}, -bV:function(a){var z,y -if(a.gO()!==""&&a.gO()!=="file")throw H.a(P.I("Uri "+a.h(0)+" must have scheme 'file:'.")) -z=a.gT(a) -if(a.ga1(a)===""){y=z.length -if(y>=3&&C.a.M(z,"/")&&B.fo(z,1)){P.dT(0,0,y,"startIndex",null) -z=H.mb(z,"/","",0)}}else z="\\\\"+H.d(a.ga1(a))+z -y=H.aQ(z,"/","\\") -return P.cU(y,0,y.length,C.h,!1)}, -es:function(a,b){var z -if(a===b)return!0 -if(a===47)return b===92 -if(a===92)return b===47 -if((a^b)!==32)return!1 -z=a|32 -return z>=97&&z<=122}, -bX:function(a,b){var z,y,x -H.p(a) -H.p(b) -if(a==b)return!0 -z=a.length -if(z!==b.length)return!1 -for(y=J.a6(b),x=0;x=65&&a<=90))z=a>=97&&a<=122 -else z=!0 -return z}, -fo:function(a,b){var z,y -z=a.length -y=b+2 -if(z=y)return H.k(z,u) -t=z[u]!==10}else t=!0 -if(t)v=10}if(v===10)C.b.m(x,w+1)}}, -aA:function(a){var z -if(a<0)throw H.a(P.N("Offset may not be negative, was "+a+".")) -else if(a>this.c.length)throw H.a(P.N("Offset "+a+" must not be greater than the number of characters in the file, "+this.gi(this)+".")) -z=this.b -if(a=C.b.ga9(z))return z.length-1 -if(this.dH(a))return this.d -z=this.dq(a)-1 -this.d=z -return z}, -dH:function(a){var z,y,x,w -z=this.d -if(z==null)return!1 -y=this.b -if(z>>>0!==z||z>=y.length)return H.k(y,z) -if(a=x)return H.k(y,w) -w=a=x)return H.k(y,w) -w=a=y)return H.k(z,v) -if(z[v]>a)x=v -else w=v+1}return x}, -d2:function(a,b){var z -if(a<0)throw H.a(P.N("Offset may not be negative, was "+a+".")) -else if(a>this.c.length)throw H.a(P.N("Offset "+a+" must be not be greater than the number of characters in the file, "+this.gi(this)+".")) -b=this.aA(a) -z=C.b.j(this.b,b) -if(z>a)throw H.a(P.N("Line "+H.d(b)+" comes after offset "+a+".")) -return a-z}, -bc:function(a){return this.d2(a,null)}, -d3:function(a,b){var z,y,x,w -if(typeof a!=="number")return a.C() -if(a<0)throw H.a(P.N("Line may not be negative, was "+a+".")) -else{z=this.b -y=z.length -if(a>=y)throw H.a(P.N("Line "+a+" must be less than the number of lines in the file, "+this.geN()+"."))}x=z[a] -if(x<=this.c.length){w=a+1 -z=w=z[w]}else z=!0 -if(z)throw H.a(P.N("Line "+a+" doesn't have 0 columns.")) -return x}, -aR:function(a){return this.d3(a,null)}},hG:{"^":"j3;a,G:b>", -gE:function(){return this.a.a}, -gL:function(){return this.a.aA(this.b)}, -gS:function(){return this.a.bc(this.b)}, -p:{ -ch:function(a,b){if(b<0)H.v(P.N("Offset may not be negative, was "+b+".")) -else if(b>a.c.length)H.v(P.N("Offset "+b+" must not be greater than the number of characters in the file, "+a.gi(a)+".")) -return new Y.hG(a,b)}}},kb:{"^":"cD;a,b,c", -gE:function(){return this.a.a}, -gi:function(a){return this.c-this.b}, -gw:function(a){return Y.ch(this.a,this.b)}, -gu:function(){return Y.ch(this.a,this.c)}, -gN:function(a){return P.aJ(C.o.ad(this.a.c,this.b,this.c),0,null)}, -gY:function(){var z,y,x,w -z=this.a -y=this.c -x=z.aA(y) -if(z.bc(y)===0&&x!==0){if(y-this.b===0){if(x===z.b.length-1)z="" -else{w=z.aR(x) -if(typeof x!=="number")return x.t() -z=P.aJ(C.o.ad(z.c,w,z.aR(x+1)),0,null)}return z}}else if(x===z.b.length-1)y=z.c.length -else{if(typeof x!=="number")return x.t() -y=z.aR(x+1)}return P.aJ(C.o.ad(z.c,z.aR(z.aA(this.b)),y),0,null)}, -I:function(a,b){if(b==null)return!1 -if(!J.r(b).$ishI)return this.dg(0,b) -return this.b===b.b&&this.c===b.c&&J.R(this.a.a,b.a.a)}, -gA:function(a){return Y.cD.prototype.gA.call(this,this)}, -$ishI:1, -$iscE:1}}],["","",,U,{"^":"",hL:{"^":"b;a,b,c,d,e", -eH:function(){var z,y,x,w,v,u,t,s,r,q,p -$.ap.toString -this.cB("\u2577") -z=this.e -z.a+="\n" -y=this.a -x=B.c1(y.gY(),y.gN(y),y.gw(y).gS()) -w=y.gY() -if(typeof x!=="number")return x.as() -if(x>0){v=C.a.l(w,0,x-1).split("\n") -u=y.gw(y).gL() -t=v.length -if(typeof u!=="number")return u.V() -s=u-t -for(u=this.c,r=0;rp+1){if(0>=v.length)return H.k(v,-1) -v.pop()}this.ec(C.b.gam(v)) -if(this.c){this.ed(H.af(v,1,null,H.i(v,0)).fc(0,p-1)) -if(p<0||p>=v.length)return H.k(v,p) -this.ee(v[p])}this.ef(H.af(v,p+1,null,H.i(v,0))) -$.ap.toString -this.cB("\u2575") -z=z.a -return z.charCodeAt(0)==0?z:z}, -ec:function(a){var z,y,x,w,v,u,t,s,r,q -z={} -H.p(a) -y=this.a -this.aE(y.gw(y).gL()) -x=y.gw(y).gS() -w=a.length -v=Math.min(x,w) -z.a=v -x=y.gu() -x=x.gG(x) -y=y.gw(y) -u=Math.min(v+x-y.gG(y),w) -z.b=u -t=J.bz(a,0,v) -y=this.c -if(y&&this.dI(t)){z=this.e -z.a+=" " -this.ae(new U.hP(this,a)) -z.a+="\n" -return}x=this.e -x.a+=C.a.U(" ",y?3:1) -this.a0(t) -s=C.a.l(a,v,u) -this.ae(new U.hQ(this,s)) -this.a0(C.a.F(a,u)) -x.a+="\n" -r=this.bm(t) -q=this.bm(s) -v+=r*3 -z.a=v -z.b=u+(r+q)*3 -this.cA() -if(y){x.a+=" " -this.ae(new U.hR(z,this))}else{x.a+=C.a.U(" ",v+1) -this.ae(new U.hS(z,this))}x.a+="\n"}, -ed:function(a){var z,y,x,w -H.l(a,"$isq",[P.e],"$asq") -z=this.a -z=z.gw(z).gL() -if(typeof z!=="number")return z.t() -y=z+1 -for(z=new H.ak(a,a.gi(a),0,[H.i(a,0)]),x=this.e;z.q();){w=z.d -this.aE(y) -x.a+=" " -this.ae(new U.hT(this,w)) -x.a+="\n";++y}}, -ee:function(a){var z,y,x,w,v -z={} -H.p(a) -y=this.a -this.aE(y.gu().gL()) -y=y.gu().gS() -x=a.length -w=Math.min(y,x) -z.a=w -if(this.c&&w===x){z=this.e -z.a+=" " -this.ae(new U.hU(this,a)) -z.a+="\n" -return}y=this.e -y.a+=" " -v=J.bz(a,0,w) -this.ae(new U.hV(this,v)) -this.a0(C.a.F(a,w)) -y.a+="\n" -z.a=w+this.bm(v)*3 -this.cA() -y.a+=" " -this.ae(new U.hW(z,this)) -y.a+="\n"}, -ef:function(a){var z,y,x,w,v -H.l(a,"$isq",[P.e],"$asq") -z=this.a.gu().gL() -if(typeof z!=="number")return z.t() -y=z+1 -for(z=new H.ak(a,a.gi(a),0,[H.i(a,0)]),x=this.e,w=this.c;z.q();){v=z.d -this.aE(y) -x.a+=C.a.U(" ",w?3:1) -this.a0(v) -x.a+="\n";++y}}, -a0:function(a){var z,y,x -for(a.toString,z=new H.aF(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=this.e;z.q();){x=z.d -if(x===9)y.a+=C.a.U(" ",4) -else y.a+=H.K(x)}}, -bD:function(a,b){this.cf(new U.hX(this,b,a),"\x1b[34m")}, -cB:function(a){return this.bD(a,null)}, -aE:function(a){return this.bD(null,a)}, -cA:function(){return this.bD(null,null)}, -bm:function(a){var z,y -for(z=new H.aF(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=0;z.q();)if(z.d===9)++y -return y}, -dI:function(a){var z,y -for(z=new H.aF(a),z=new H.ak(z,z.gi(z),0,[P.c]);z.q();){y=z.d -if(y!==32&&y!==9)return!1}return!0}, -cf:function(a,b){var z,y -H.j(a,{func:1,ret:-1}) -z=this.b -y=z!=null -if(y){z=b==null?z:b -this.e.a+=z}a.$0() -if(y)this.e.a+="\x1b[0m"}, -ae:function(a){return this.cf(a,null)}, -p:{ -hN:function(a){var z,y,x,w,v,u,t -z=a.gN(a) -if(!C.a.au(z,"\r\n"))return a -y=a.gu() -x=y.gG(y) -for(y=z.length-1,w=0;w,L:c<,S:d<", -bK:function(a){var z=this.a -if(!J.R(z,a.gE()))throw H.a(P.I('Source URLs "'+H.d(z)+'" and "'+H.d(a.gE())+"\" don't match.")) -return Math.abs(this.b-a.gG(a))}, -I:function(a,b){if(b==null)return!1 -return!!J.r(b).$isbM&&J.R(this.a,b.gE())&&this.b===b.gG(b)}, -gA:function(a){return J.aE(this.a)+this.b}, -h:function(a){var z,y -z="<"+new H.bS(H.d9(this)).h(0)+": "+this.b+" " -y=this.a -return z+(H.d(y==null?"unknown source":y)+":"+(this.c+1)+":"+(this.d+1))+">"}, -p:{ -bn:function(a,b,c,d){var z,y -z=c==null -y=z?0:c -if(a<0)H.v(P.N("Offset may not be negative, was "+a+".")) -else if(!z&&c<0)H.v(P.N("Line may not be negative, was "+H.d(c)+".")) -else if(b<0)H.v(P.N("Column may not be negative, was "+b+".")) -return new V.bM(d,a,y,b)}}}}],["","",,D,{"^":"",j3:{"^":"b;", -bK:function(a){if(!J.R(this.a.a,a.gE()))throw H.a(P.I('Source URLs "'+H.d(this.gE())+'" and "'+H.d(a.gE())+"\" don't match.")) -return Math.abs(this.b-a.gG(a))}, -I:function(a,b){if(b==null)return!1 -return!!J.r(b).$isbM&&J.R(this.a.a,b.gE())&&this.b===b.gG(b)}, -gA:function(a){return J.aE(this.a.a)+this.b}, -h:function(a){var z,y,x,w,v,u -z=this.b -y="<"+new H.bS(H.d9(this)).h(0)+": "+z+" " -x=this.a -w=x.a -v=H.d(w==null?"unknown source":w)+":" -u=x.aA(z) -if(typeof u!=="number")return u.t() -return y+(v+(u+1)+":"+(x.bc(z)+1))+">"}, -$isbM:1}}],["","",,V,{"^":"",j5:{"^":"cD;w:a>,u:b<,N:c>", -di:function(a,b,c){var z,y,x -z=this.b -y=this.a -if(!J.R(z.gE(),y.gE()))throw H.a(P.I('Source URLs "'+H.d(y.gE())+'" and "'+H.d(z.gE())+"\" don't match.")) -else if(z.gG(z)'}, -$isj4:1}}],["","",,X,{"^":"",cE:{"^":"j5;d,a,b,c", -gY:function(){return this.d}, -p:{ -bO:function(a,b,c,d){var z=new X.cE(d,a,b,c) -z.di(a,b,c) -if(!C.a.au(d,c))H.v(P.I('The context line "'+d+'" must contain "'+c+'".')) -if(B.c1(d,c,a.gS())==null)H.v(P.I('The span text "'+c+'" must start at column '+(a.gS()+1)+' in a line within "'+d+'".')) -return z}}}}],["","",,B,{"^":"", -lM:function(a,b){var z,y -for(z=new H.aF(a),z=new H.ak(z,z.gi(z),0,[P.c]),y=0;z.q();)if(z.d===b)++y -return y}, -c1:function(a,b,c){var z,y,x -if(b.length===0)for(z=0;!0;){y=C.a.an(a,"\n",z) -if(y===-1)return a.length-z>=c?z:null -if(y-z>=c)return z -z=y+1}y=C.a.bP(a,b) -for(;y!==-1;){x=y===0?0:C.a.b6(a,"\n",y-1)+1 -if(c===y-x)return x -y=C.a.an(a,b,y+1)}return}}],["","",,M,{"^":"",j8:{"^":"ja;a,b,c,d,0e,0f", -a5:function(a){this.e.close() -this.a.a5(0) -this.b.a5(0) -this.c.a5(0)}, -fo:[function(a){var z=new P.cM([],[],!1).bJ(H.db(H.m(a,"$isM"),"$iscy").data,!0) -if(J.R(z,"close"))this.a5(0) -else throw H.a(P.A('Illegal Control Message "'+H.d(z)+'"'))},"$1","gdQ",4,0,14], -fp:[function(a){this.a.m(0,H.fy(C.z.ex(0,H.fy(new P.cM([],[],!1).bJ(H.db(H.m(a,"$isM"),"$iscy").data,!0)),null)))},"$1","gdR",4,0,14], -fq:[function(){this.a5(0)},"$0","gdS",0,0,1], -by:[function(a){var z=0,y=P.d2(null),x=1,w,v=[],u=this,t,s,r,q -var $async$by=P.d4(function(b,c){if(b===1){w=c -z=x}while(true)switch(z){case 0:t=C.z.ez(a,null) -x=3 -z=6 -return P.bW(u.c.b1("POST",u.f,null,t,null),$async$by) -case 6:x=1 -z=5 -break -case 3:x=2 -q=w -s=H.P(q) -u.d.eQ(C.a2,"Unable to encode outgoing message: "+H.d(s),null,null) -z=5 -break -case 2:z=1 -break -case 5:return P.cW(null,y) -case 1:return P.cV(w,y)}}) -return P.cX($async$by,y)},"$1","gdT",4,0,2]}}],["","",,R,{"^":"",ja:{"^":"b;"}}],["","",,E,{"^":"",jk:{"^":"bN;c,a,b", -gaT:function(a){return G.bN.prototype.gaT.call(this,this)}}}],["","",,X,{"^":"",jj:{"^":"b;a,b,c,0d,0e", -gbS:function(){if(this.c!==this.e)this.d=null -return this.d}, -bd:function(a){var z,y -z=J.fR(a,this.b,this.c) -this.d=z -this.e=this.c -y=z!=null -if(y){z=z.gu() -this.c=z -this.e=z}return y}, -cI:function(a,b){var z,y -if(this.bd(a))return -if(b==null){z=J.r(a) -if(!!z.$isiU){y=a.a -if(!$.$get$fb())y=H.aQ(y,"/","\\/") -b="/"+y+"/"}else{z=z.h(a) -z=H.aQ(z,"\\","\\\\") -b='"'+H.aQ(z,'"','\\"')+'"'}}this.cH(0,"expected "+b+".",0,this.c)}, -aF:function(a){return this.cI(a,null)}, -eC:function(){var z=this.c -if(z===this.b.length)return -this.cH(0,"expected no more input.",0,z)}, -eB:function(a,b,c,d,e){var z,y,x,w,v,u,t -z=this.b -if(e<0)H.v(P.N("position must be greater than or equal to 0.")) -else if(e>z.length)H.v(P.N("position must be less than or equal to the string length.")) -y=e+c>z.length -if(y)H.v(P.N("position plus length must not go beyond the end of the string.")) -y=this.a -x=new H.aF(z) -w=H.o([0],[P.c]) -v=new Uint32Array(H.bZ(x.b9(x))) -u=new Y.j2(y,w,v) -u.dh(x,y) -t=e+c -if(t>v.length)H.v(P.N("End "+t+" must not be greater than the number of characters in the file, "+u.gi(u)+".")) -else if(e<0)H.v(P.N("Start may not be negative, was "+e+".")) -throw H.a(new E.jk(z,b,new Y.kb(u,e,t)))}, -cH:function(a,b,c,d){return this.eB(a,b,c,null,d)}}}],["","",,K,{"^":"",jt:{"^":"b;"}}],["","",,F,{"^":"",jM:{"^":"b;0a,0b,0c,d,e,0f,0r", -sds:function(a){this.f=H.l(a,"$ish",[P.e],"$ash")}, -sdE:function(a){this.r=H.l(a,"$isS",[P.e,P.c],"$asS")}, -dj:function(){var z,y,x,w,v -z=new Array(256) -z.fixed$length=Array -y=P.e -this.sds(H.o(z,[y])) -z=P.c -this.sdE(new H.ac(0,0,[y,z])) -for(z=[z],y=[P.h,P.c],x=0;x<256;++x){w=H.o([],z) -C.b.m(w,x) -v=this.f -H.n(w,y);(v&&C.b).k(v,x,C.J.gaf().Z(w)) -this.r.k(0,this.f[x],x)}z=U.jO(null) -this.a=z -y=z[0] -if(typeof y!=="number")return y.fk() -this.b=[y|1,z[1],z[2],z[3],z[4],z[5]] -y=z[6] -if(typeof y!=="number")return y.fm() -z=z[7] -if(typeof z!=="number")return H.G(z) -this.c=(y<<8|z)&262143}, -fg:function(a,b,c){var z,y,x,w,v,u,t,s,r,q,p,o,n,m -z=new Array(16) -z.fixed$length=Array -c=new H.ac(0,0,[null,null]) -y=c.j(0,"clockSeq")!=null?c.j(0,"clockSeq"):this.c -x=c.j(0,"mSecs")!=null?c.j(0,"mSecs"):Date.now() -w=c.j(0,"nSecs")!=null?c.j(0,"nSecs"):this.e+1 -v=J.b8(x) -u=v.V(x,this.d) -t=J.fG(w,this.e) -if(typeof t!=="number")return t.fj() -s=J.df(u,t/1e4) -u=J.b8(s) -if(u.C(s,0)&&c.j(0,"clockSeq")==null){t=J.df(y,1) -if(typeof t!=="number")return t.c4() -y=t&16383}if((u.C(s,0)||v.as(x,this.d))&&c.j(0,"nSecs")==null)w=0 -if(J.fE(w,1e4))throw H.a(P.dw("uuid.v1(): Can't create more than 10M uuids/sec")) -H.w(x) -this.d=x -H.w(w) -this.e=w -this.c=y -x+=122192928e5 -r=C.c.aS((x&268435455)*1e4+w,4294967296) -q=b+1 -C.b.k(z,b,C.c.W(r,24)&255) -p=q+1 -C.b.k(z,q,C.c.W(r,16)&255) -q=p+1 -C.b.k(z,p,C.c.W(r,8)&255) -p=q+1 -C.b.k(z,q,r&255) -o=C.c.bB(x,4294967296)*1e4&268435455 -q=p+1 -C.b.k(z,p,o>>>8&255) -p=q+1 -C.b.k(z,q,o&255) -q=p+1 -C.b.k(z,p,o>>>24&15|16) -p=q+1 -C.b.k(z,q,o>>>16&255) -q=p+1 -if(typeof y!=="number")return y.d7() -C.b.k(z,p,(C.m.W(y,8)|128)>>>0) -p=q+1 -C.b.k(z,q,y&255) -n=c.j(0,"node")!=null?c.j(0,"node"):this.b -for(v=J.Y(n),m=0;m<6;++m)C.b.k(z,p+m,v.j(n,m)) -v=this.f -v=H.d((v&&C.b).j(v,H.w(z[0]))) -u=this.f -u=v+H.d((u&&C.b).j(u,H.w(z[1]))) -v=this.f -v=u+H.d((v&&C.b).j(v,H.w(z[2]))) -u=this.f -u=v+H.d((u&&C.b).j(u,H.w(z[3])))+"-" -v=this.f -v=u+H.d((v&&C.b).j(v,H.w(z[4]))) -u=this.f -u=v+H.d((u&&C.b).j(u,H.w(z[5])))+"-" -v=this.f -v=u+H.d((v&&C.b).j(v,H.w(z[6]))) -u=this.f -u=v+H.d((u&&C.b).j(u,H.w(z[7])))+"-" -v=this.f -v=u+H.d((v&&C.b).j(v,H.w(z[8]))) -u=this.f -u=v+H.d((u&&C.b).j(u,H.w(z[9])))+"-" -v=this.f -v=u+H.d((v&&C.b).j(v,H.w(z[10]))) -u=this.f -u=v+H.d((u&&C.b).j(u,H.w(z[11]))) -v=this.f -v=u+H.d((v&&C.b).j(v,H.w(z[12]))) -u=this.f -u=v+H.d((u&&C.b).j(u,H.w(z[13]))) -v=this.f -v=u+H.d((v&&C.b).j(v,H.w(z[14]))) -u=this.f -u=v+H.d((u&&C.b).j(u,H.w(z[15]))) -return u}, -ff:function(){return this.fg(null,0,null)}, -p:{ -jN:function(){var z=new F.jM(0,0) -z.dj() -return z}}}}],["","",,U,{"^":"", -jO:function(a){var z,y,x,w -z=new Array(16) -z.fixed$length=Array -y=H.o(z,[P.c]) -for(x=null,w=0;w<16;++w){z=w&3 -if(z===0)x=C.c.fd(C.m.eE(C.O.eU()*4294967296)) -if(typeof x!=="number")return x.d7() -C.b.k(y,w,C.c.W(x,z<<3)&255)}return y}}],["","",,E,{"^":"", -fq:function(){var z,y,x,w,v,u -z=P.e -y=P.dW(null,null,null,null,!1,z) -x=P.dW(null,null,null,null,!1,z) -w=new O.h6(P.ik(null,null,null,W.bE),!1) -w.b=!0 -v=new M.j8(y,x,w,N.bI("SseClient")) -u=F.jN().ff() -v.e=W.hF("/test?sseClientId="+u,P.bH(["withCredentials",!0],z,null)) -v.f="/test?sseClientId="+u -new P.cP(x,[H.i(x,0)]).eP(v.gdT(),v.gdS()) -C.u.cD(v.e,"message",v.gdR()) -C.u.cD(v.e,"control",v.gdQ()) -x=W.M -W.cQ(v.e,"error",H.j(y.gej(),{func:1,ret:-1,args:[x]}),!1,x) -x=J.fP(C.P.f0(document,"button")) -z=H.i(x,0) -W.cQ(x.a,x.b,H.j(new E.m3(v),{func:1,ret:-1,args:[z]}),!1,z) -new P.cP(y,[H.i(y,0)]).eO(new E.m4(v))}, -m3:{"^":"f:43;a", -$1:function(a){H.m(a,"$isaX") -this.a.b.a5(0)}}, -m4:{"^":"f:9;a", -$1:function(a){var z=this.a.b -z.m(0,H.n(H.p(a),H.i(z,0)))}}},1],["","",,D,{"^":""}]] -setupProgram(dart,0,0) -J.r=function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.dz.prototype -return J.i4.prototype}if(typeof a=="string")return J.bg.prototype -if(a==null)return J.dA.prototype -if(typeof a=="boolean")return J.i3.prototype -if(a.constructor==Array)return J.at.prototype -if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype -return a}if(a instanceof P.b)return a -return J.bv(a)} -J.lT=function(a){if(typeof a=="number")return J.bf.prototype -if(typeof a=="string")return J.bg.prototype -if(a==null)return a -if(a.constructor==Array)return J.at.prototype -if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype -return a}if(a instanceof P.b)return a -return J.bv(a)} -J.Y=function(a){if(typeof a=="string")return J.bg.prototype -if(a==null)return a -if(a.constructor==Array)return J.at.prototype -if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype -return a}if(a instanceof P.b)return a -return J.bv(a)} -J.bu=function(a){if(a==null)return a -if(a.constructor==Array)return J.at.prototype -if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype -return a}if(a instanceof P.b)return a -return J.bv(a)} -J.b8=function(a){if(typeof a=="number")return J.bf.prototype -if(a==null)return a -if(!(a instanceof P.b))return J.bq.prototype -return a} -J.a6=function(a){if(typeof a=="string")return J.bg.prototype -if(a==null)return a -if(!(a instanceof P.b))return J.bq.prototype -return a} -J.aD=function(a){if(a==null)return a -if(typeof a!="object"){if(typeof a=="function")return J.aW.prototype -return a}if(a instanceof P.b)return a -return J.bv(a)} -J.d8=function(a){if(a==null)return a -if(!(a instanceof P.b))return J.bq.prototype -return a} -J.df=function(a,b){if(typeof a=="number"&&typeof b=="number")return a+b -return J.lT(a).t(a,b)} -J.R=function(a,b){if(a==null)return b==null -if(typeof a!="object")return b!=null&&a===b -return J.r(a).I(a,b)} -J.fE=function(a,b){if(typeof a=="number"&&typeof b=="number")return a>=b -return J.b8(a).aQ(a,b)} -J.fF=function(a,b){if(typeof a=="number"&&typeof b=="number")return a= 0) return hooks; - if (ua.indexOf("Chrome") >= 0) { - function confirm(p) { - return typeof window == "object" && window[p] && window[p].name == p; + var supportsDirectProtoAccess = function() { + var cls = function() { + }; + cls.prototype = {p: {}}; + var object = new cls(); + if (!(object.__proto__ && object.__proto__.p === cls.prototype.p)) + return false; + try { + if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) + return true; + if (typeof version == "function" && version.length == 0) { + var v = version(); + if (/^\d+\.\d+\.\d+\.\d+$/.test(v)) + return true; + } + } catch (_) { + } + return false; + }(); + function setFunctionNamesIfNecessary(holders) { + function t() { + } + ; + if (typeof t.name == "string") + return; + for (var i = 0; i < holders.length; i++) { + var holder = holders[i]; + var keys = Object.keys(holder); + for (var j = 0; j < keys.length; j++) { + var key = keys[j]; + var f = holder[key]; + if (typeof f == 'function') + f.name = key; + } + } + } + function inherit(cls, sup) { + cls.prototype.constructor = cls; + cls.prototype["$is" + cls.name] = cls; + if (sup != null) { + if (supportsDirectProtoAccess) { + cls.prototype.__proto__ = sup.prototype; + return; + } + var clsPrototype = Object.create(sup.prototype); + copyProperties(cls.prototype, clsPrototype); + cls.prototype = clsPrototype; + } + } + function inheritMany(sup, classes) { + for (var i = 0; i < classes.length; i++) + inherit(classes[i], sup); + } + function mixin(cls, mixin) { + copyProperties(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function lazy(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + holder[getterName] = function() { + H.throwCyclicInit(name); + }; + var result; + var sentinelInProgress = initializer; + try { + if (holder[name] === uninitializedSentinel) { + result = holder[name] = sentinelInProgress; + result = holder[name] = initializer(); + } else + result = holder[name]; + } finally { + if (result === sentinelInProgress) + holder[name] = null; + holder[getterName] = function() { + return this[name]; + }; + } + return result; + }; + } + function makeConstList(list) { + list.immutable$list = Array; + list.fixed$length = Array; + return list; + } + function convertToFastObject(properties) { + function t() { + } + t.prototype = properties; + new t(); + return properties; + } + function convertAllToFastObject(arrayOfObjects) { + for (var i = 0; i < arrayOfObjects.length; ++i) + convertToFastObject(arrayOfObjects[i]); + } + var functionCounter = 0; + function tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted) { + return isIntercepted ? new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "(receiver) {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, true, name);" + "return new c(this, funcs[0], receiver, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null) : new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, false, name);" + "return new c(this, funcs[0], null, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null); + } + function tearOff(funcs, applyTrampolineIndex, reflectionInfo, isStatic, name, isIntercepted) { + var cache = null; + return isStatic ? function() { + if (cache === null) + cache = H.closureFromTearOff(this, funcs, applyTrampolineIndex, reflectionInfo, true, false, name).prototype; + return cache; + } : tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted); + } + var typesOffset = 0; + function installTearOff(container, getterName, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { + var funs = []; + for (var i = 0; i < funsOrNames.length; i++) { + var fun = funsOrNames[i]; + if (typeof fun == 'string') + fun = container[fun]; + fun.$callName = callNames[i]; + funs.push(fun); + } + var fun = funs[0]; + fun.$requiredArgCount = requiredParameterCount; + fun.$defaultValues = optionalParameterDefaultValues; + var reflectionInfo = funType; + if (typeof reflectionInfo == "number") + reflectionInfo += typesOffset; + var name = funsOrNames[0]; + fun.$stubName = name; + var getterFunction = tearOff(funs, applyIndex || 0, reflectionInfo, isStatic, name, isIntercepted); + container[getterName] = getterFunction; + if (isStatic) + fun.$tearOff = getterFunction; + } + function installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { + return installTearOff(container, getterName, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex); + } + function installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { + return installTearOff(container, getterName, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex); + } + function setOrUpdateInterceptorsByTag(newTags) { + var tags = init.interceptorsByTag; + if (!tags) { + init.interceptorsByTag = newTags; + return; + } + copyProperties(newTags, tags); + } + function setOrUpdateLeafTags(newTags) { + var tags = init.leafTags; + if (!tags) { + init.leafTags = newTags; + return; + } + copyProperties(newTags, tags); + } + function updateTypes(newTypes) { + var types = init.types; + var length = types.length; + types.push.apply(types, newTypes); + return length; + } + function updateHolder(holder, newHolder) { + copyProperties(newHolder, holder); + return holder; + } + var hunkHelpers = function() { + var mkInstance = function(isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { + return function(container, getterName, name, funType) { + return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); + }; + }, + mkStatic = function(requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { + return function(container, getterName, name, funType) { + return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); + }; + }; + return {inherit: inherit, inheritMany: inheritMany, mixin: mixin, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, updateHolder: updateHolder, convertToFastObject: convertToFastObject, setFunctionNamesIfNecessary: setFunctionNamesIfNecessary, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; + }(); + function initializeDeferredHunk(hunk) { + typesOffset = init.types.length; + hunk(hunkHelpers, init, holders, $); + } + function getGlobalFromName(name) { + for (var i = 0; i < holders.length; i++) { + if (holders[i] == C) + continue; + if (holders[i][name]) + return holders[i][name]; + } + } + var C = {}, + H = {JS_CONST: function JS_CONST() { + }, + IterableElementError_tooFew: function() { + return new P.StateError("Too few elements"); + }, + EfficientLengthIterable: function EfficientLengthIterable() { + }, + ListIterable: function ListIterable() { + }, + ListIterator: function ListIterator(t0, t1, t2) { + var _ = this; + _.__internal$_iterable = t0; + _.__internal$_length = t1; + _.__internal$_index = 0; + _.__internal$_current = null; + _.$ti = t2; + }, + FixedLengthListMixin: function FixedLengthListMixin() { + }, + Symbol0: function Symbol0(t0) { + this.__internal$_name = t0; + }, + unminifyOrTag: function(rawClassName) { + var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName); + if (typeof preserved === "string") + return preserved; + return rawClassName; + }, + getType: function(index) { + return init.types[H.intTypeCheck(index)]; + }, + isJsIndexable: function(object, record) { + var result; + if (record != null) { + result = record.x; + if (result != null) + return result; + } + return !!J.getInterceptor$(object).$isJavaScriptIndexingBehavior; + }, + S: function(value) { + var res; + if (typeof value === "string") + return value; + if (typeof value === "number") { + if (value !== 0) + return "" + value; + } else if (true === value) + return "true"; + else if (false === value) + return "false"; + else if (value == null) + return "null"; + res = J.toString$0$(value); + if (typeof res !== "string") + throw H.wrapException(H.argumentErrorValue(value)); + return res; + }, + Primitives_objectHashCode: function(object) { + var hash = object.$identityHash; + if (hash == null) { + hash = Math.random() * 0x3fffffff | 0; + object.$identityHash = hash; + } + return hash; + }, + Primitives_objectTypeName: function(object) { + return H.Primitives__objectClassName(object) + H._joinArguments(H.getRuntimeTypeInfo(object), 0, null); + }, + Primitives__objectClassName: function(object) { + var interceptorConstructorName, $name, t1, dispatchName, objectConstructor, match, decompiledName, + interceptor = J.getInterceptor$(object), + interceptorConstructor = interceptor.constructor; + if (typeof interceptorConstructor == "function") { + interceptorConstructorName = interceptorConstructor.name; + $name = typeof interceptorConstructorName === "string" ? interceptorConstructorName : null; + } else + $name = null; + t1 = $name == null; + if (t1 || interceptor === C.Interceptor_methods || !!interceptor.$isUnknownJavaScriptObject) { + dispatchName = C.C_JS_CONST(object); + if (t1) + $name = dispatchName; + if (dispatchName === "Object") { + objectConstructor = object.constructor; + if (typeof objectConstructor == "function") { + match = String(objectConstructor).match(/^\s*function\s*([\w$]*)\s*\(/); + decompiledName = match == null ? null : match[1]; + if (typeof decompiledName === "string" && /^\w+$/.test(decompiledName)) + $name = decompiledName; + } + } + return $name; + } + $name = $name; + return H.unminifyOrTag($name.length > 1 && C.JSString_methods._codeUnitAt$1($name, 0) === 36 ? C.JSString_methods.substring$1($name, 1) : $name); + }, + Primitives_stringFromNativeUint8List: function(charCodes, start, end) { + var i, result, i0, chunkEnd; + if (end <= 500 && start === 0 && end === charCodes.length) + return String.fromCharCode.apply(null, charCodes); + for (i = start, result = ""; i < end; i = i0) { + i0 = i + 500; + chunkEnd = i0 < end ? i0 : end; + result += String.fromCharCode.apply(null, charCodes.subarray(i, chunkEnd)); + } + return result; + }, + Primitives_stringFromCharCode: function(charCode) { + var bits; + if (charCode <= 65535) + return String.fromCharCode(charCode); + if (charCode <= 1114111) { + bits = charCode - 65536; + return String.fromCharCode((55296 | C.JSInt_methods._shrOtherPositive$1(bits, 10)) >>> 0, 56320 | bits & 1023); + } + throw H.wrapException(P.RangeError$range(charCode, 0, 1114111, null, null)); + }, + Primitives_lazyAsJsDate: function(receiver) { + if (receiver.date === void 0) + receiver.date = new Date(receiver._value); + return receiver.date; + }, + Primitives_getYear: function(receiver) { + return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCFullYear() + 0 : H.Primitives_lazyAsJsDate(receiver).getFullYear() + 0; + }, + Primitives_getMonth: function(receiver) { + return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMonth() + 1 : H.Primitives_lazyAsJsDate(receiver).getMonth() + 1; + }, + Primitives_getDay: function(receiver) { + return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCDate() + 0 : H.Primitives_lazyAsJsDate(receiver).getDate() + 0; + }, + Primitives_getHours: function(receiver) { + return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCHours() + 0 : H.Primitives_lazyAsJsDate(receiver).getHours() + 0; + }, + Primitives_getMinutes: function(receiver) { + return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMinutes() + 0 : H.Primitives_lazyAsJsDate(receiver).getMinutes() + 0; + }, + Primitives_getSeconds: function(receiver) { + return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCSeconds() + 0 : H.Primitives_lazyAsJsDate(receiver).getSeconds() + 0; + }, + Primitives_getMilliseconds: function(receiver) { + return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0 : H.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; + }, + Primitives_functionNoSuchMethod: function($function, positionalArguments, namedArguments) { + var $arguments, namedArgumentList, t1 = {}; + t1.argumentCount = 0; + $arguments = []; + namedArgumentList = []; + t1.argumentCount = positionalArguments.length; + C.JSArray_methods.addAll$1($arguments, positionalArguments); + t1.names = ""; + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + namedArguments.forEach$1(0, new H.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); + "" + t1.argumentCount; + return J.noSuchMethod$1$($function, new H.JSInvocationMirror(C.Symbol_call, 0, $arguments, namedArgumentList, 0)); + }, + Primitives_applyFunction: function($function, positionalArguments, namedArguments) { + var t1, $arguments, argumentCount, jsStub; + if (positionalArguments instanceof Array) + t1 = namedArguments == null || namedArguments.__js_helper$_length === 0; + else + t1 = false; + if (t1) { + $arguments = positionalArguments; + argumentCount = $arguments.length; + if (argumentCount === 0) { + if (!!$function.call$0) + return $function.call$0(); + } else if (argumentCount === 1) { + if (!!$function.call$1) + return $function.call$1($arguments[0]); + } else if (argumentCount === 2) { + if (!!$function.call$2) + return $function.call$2($arguments[0], $arguments[1]); + } else if (argumentCount === 3) { + if (!!$function.call$3) + return $function.call$3($arguments[0], $arguments[1], $arguments[2]); + } else if (argumentCount === 4) { + if (!!$function.call$4) + return $function.call$4($arguments[0], $arguments[1], $arguments[2], $arguments[3]); + } else if (argumentCount === 5) + if (!!$function.call$5) + return $function.call$5($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]); + jsStub = $function["call" + "$" + argumentCount]; + if (jsStub != null) + return jsStub.apply($function, $arguments); + } + return H.Primitives__genericApplyFunction2($function, positionalArguments, namedArguments); + }, + Primitives__genericApplyFunction2: function($function, positionalArguments, namedArguments) { + var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, keys, _i, used, t2; + if (positionalArguments != null) + $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, true, null); + else + $arguments = []; + argumentCount = $arguments.length; + requiredParameterCount = $function.$requiredArgCount; + if (argumentCount < requiredParameterCount) + return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + defaultValuesClosure = $function.$defaultValues; + t1 = defaultValuesClosure == null; + defaultValues = !t1 ? defaultValuesClosure() : null; + interceptor = J.getInterceptor$($function); + jsFunction = interceptor["call*"]; + if (typeof jsFunction === "string") + jsFunction = interceptor[jsFunction]; + if (t1) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if (argumentCount === requiredParameterCount) + return jsFunction.apply($function, $arguments); + return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + if (defaultValues instanceof Array) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if (argumentCount > requiredParameterCount + defaultValues.length) + return H.Primitives_functionNoSuchMethod($function, $arguments, null); + C.JSArray_methods.addAll$1($arguments, defaultValues.slice(argumentCount - requiredParameterCount)); + return jsFunction.apply($function, $arguments); + } else { + if (argumentCount > requiredParameterCount) + return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + keys = Object.keys(defaultValues); + if (namedArguments == null) + for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) + C.JSArray_methods.add$1($arguments, defaultValues[H.stringTypeCheck(keys[_i])]); + else { + for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) { + t2 = H.stringTypeCheck(keys[_i]); + if (namedArguments.containsKey$1(t2)) { + ++used; + C.JSArray_methods.add$1($arguments, namedArguments.$index(0, t2)); + } else + C.JSArray_methods.add$1($arguments, defaultValues[t2]); + } + if (used !== namedArguments.__js_helper$_length) + return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + return jsFunction.apply($function, $arguments); + } + }, + iae: function(argument) { + throw H.wrapException(H.argumentErrorValue(argument)); + }, + ioore: function(receiver, index) { + if (receiver == null) + J.get$length$asx(receiver); + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + }, + diagnoseIndexError: function(indexable, index) { + var $length, t1, _s5_ = "index"; + if (typeof index !== "number" || Math.floor(index) !== index) + return new P.ArgumentError(true, index, _s5_, null); + $length = H.intTypeCheck(J.get$length$asx(indexable)); + if (!(index < 0)) { + if (typeof $length !== "number") + return H.iae($length); + t1 = index >= $length; + } else + t1 = true; + if (t1) + return P.IndexError$(index, indexable, _s5_, null, $length); + return P.RangeError$value(index, _s5_); + }, + argumentErrorValue: function(object) { + return new P.ArgumentError(true, object, null, null); + }, + checkBool: function(value) { + return value; + }, + wrapException: function(ex) { + var wrapper; + if (ex == null) + ex = new P.NullThrownError(); + wrapper = new Error(); + wrapper.dartException = ex; + if ("defineProperty" in Object) { + Object.defineProperty(wrapper, "message", {get: H.toStringWrapper}); + wrapper.name = ""; + } else + wrapper.toString = H.toStringWrapper; + return wrapper; + }, + toStringWrapper: function() { + return J.toString$0$(this.dartException); + }, + throwExpression: function(ex) { + throw H.wrapException(ex); + }, + throwConcurrentModificationError: function(collection) { + throw H.wrapException(P.ConcurrentModificationError$(collection)); + }, + TypeErrorDecoder_extractPattern: function(message) { + var match, $arguments, argumentsExpr, expr, method, receiver; + message = H.quoteStringForRegExp(message.replace(String({}), '$receiver$')); + match = message.match(/\\\$[a-zA-Z]+\\\$/g); + if (match == null) + match = H.setRuntimeTypeInfo([], [P.String]); + $arguments = match.indexOf("\\$arguments\\$"); + argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); + expr = match.indexOf("\\$expr\\$"); + method = match.indexOf("\\$method\\$"); + receiver = match.indexOf("\\$receiver\\$"); + return new H.TypeErrorDecoder(message.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'), '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); + }, + TypeErrorDecoder_provokeCallErrorOn: function(expression) { + return function($expr$) { + var $argumentsExpr$ = '$arguments$'; + try { + $expr$.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }(expression); + }, + TypeErrorDecoder_provokePropertyErrorOn: function(expression) { + return function($expr$) { + try { + $expr$.$method$; + } catch (e) { + return e.message; + } + }(expression); + }, + NullError$: function(_message, match) { + return new H.NullError(_message, match == null ? null : match.method); + }, + JsNoSuchMethodError$: function(_message, match) { + var t1 = match == null, + t2 = t1 ? null : match.method; + return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); + }, + unwrapException: function(ex) { + var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, t2, _null = null, + t1 = new H.unwrapException_saveStackTrace(ex); + if (ex == null) + return; + if (ex instanceof H.ExceptionAndStackTrace) + return t1.call$1(ex.dartException); + if (typeof ex !== "object") + return ex; + if ("dartException" in ex) + return t1.call$1(ex.dartException); + else if (!("message" in ex)) + return ex; + message = ex.message; + if ("number" in ex && typeof ex.number == "number") { + number = ex.number; + ieErrorCode = number & 65535; + if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) + switch (ieErrorCode) { + case 438: + return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); + case 445: + case 5007: + return t1.call$1(H.NullError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); + } + } + if (ex instanceof TypeError) { + nsme = $.$get$TypeErrorDecoder_noSuchMethodPattern(); + notClosure = $.$get$TypeErrorDecoder_notClosurePattern(); + nullCall = $.$get$TypeErrorDecoder_nullCallPattern(); + nullLiteralCall = $.$get$TypeErrorDecoder_nullLiteralCallPattern(); + undefCall = $.$get$TypeErrorDecoder_undefinedCallPattern(); + undefLiteralCall = $.$get$TypeErrorDecoder_undefinedLiteralCallPattern(); + nullProperty = $.$get$TypeErrorDecoder_nullPropertyPattern(); + $.$get$TypeErrorDecoder_nullLiteralPropertyPattern(); + undefProperty = $.$get$TypeErrorDecoder_undefinedPropertyPattern(); + undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); + match = nsme.matchTypeError$1(message); + if (match != null) + return t1.call$1(H.JsNoSuchMethodError$(H.stringTypeCheck(message), match)); + else { + match = notClosure.matchTypeError$1(message); + if (match != null) { + match.method = "call"; + return t1.call$1(H.JsNoSuchMethodError$(H.stringTypeCheck(message), match)); + } else { + match = nullCall.matchTypeError$1(message); + if (match == null) { + match = nullLiteralCall.matchTypeError$1(message); + if (match == null) { + match = undefCall.matchTypeError$1(message); + if (match == null) { + match = undefLiteralCall.matchTypeError$1(message); + if (match == null) { + match = nullProperty.matchTypeError$1(message); + if (match == null) { + match = nullLiteralCall.matchTypeError$1(message); + if (match == null) { + match = undefProperty.matchTypeError$1(message); + if (match == null) { + match = undefLiteralProperty.matchTypeError$1(message); + t2 = match != null; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + if (t2) + return t1.call$1(H.NullError$(H.stringTypeCheck(message), match)); + } + } + return t1.call$1(new H.UnknownJsTypeError(typeof message === "string" ? message : "")); + } + if (ex instanceof RangeError) { + if (typeof message === "string" && message.indexOf("call stack") !== -1) + return new P.StackOverflowError(); + message = function(ex) { + try { + return String(ex); + } catch (e) { + } + return null; + }(ex); + return t1.call$1(new P.ArgumentError(false, _null, _null, typeof message === "string" ? message.replace(/^RangeError:\s*/, "") : message)); + } + if (typeof InternalError == "function" && ex instanceof InternalError) + if (typeof message === "string" && message === "too much recursion") + return new P.StackOverflowError(); + return ex; + }, + getTraceFromException: function(exception) { + var trace; + if (exception instanceof H.ExceptionAndStackTrace) + return exception.stackTrace; + if (exception == null) + return new H._StackTrace(exception); + trace = exception.$cachedTrace; + if (trace != null) + return trace; + return exception.$cachedTrace = new H._StackTrace(exception); + }, + fillLiteralMap: function(keyValuePairs, result) { + var index, index0, index1, + $length = keyValuePairs.length; + for (index = 0; index < $length; index = index1) { + index0 = index + 1; + index1 = index0 + 1; + result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); + } + return result; + }, + invokeClosure: function(closure, numberOfArguments, arg1, arg2, arg3, arg4) { + H.interceptedTypeCheck(closure, "$isFunction"); + switch (H.intTypeCheck(numberOfArguments)) { + case 0: + return closure.call$0(); + case 1: + return closure.call$1(arg1); + case 2: + return closure.call$2(arg1, arg2); + case 3: + return closure.call$3(arg1, arg2, arg3); + case 4: + return closure.call$4(arg1, arg2, arg3, arg4); + } + throw H.wrapException(P.Exception_Exception("Unsupported number of arguments for wrapped closure")); + }, + convertDartClosureToJS: function(closure, arity) { + var $function; + if (closure == null) + return; + $function = closure.$identity; + if (!!$function) + return $function; + $function = function(closure, arity, invoke) { + return function(a1, a2, a3, a4) { + return invoke(closure, arity, a1, a2, a3, a4); + }; + }(closure, arity, H.invokeClosure); + closure.$identity = $function; + return $function; + }, + Closure_fromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, propertyName) { + var $constructor, t1, trampoline, signatureFunction, applyTrampoline, i, stub, stubCallName, _null = null, + $function = functions[0], + callName = $function.$callName, + $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(_null, _null, _null, _null).constructor.prototype); + $prototype.$initialize = $prototype.constructor; + if (isStatic) + $constructor = function static_tear_off() { + this.$initialize(); + }; + else { + t1 = $.Closure_functionCounter; + if (typeof t1 !== "number") + return t1.$add(); + $.Closure_functionCounter = t1 + 1; + t1 = new Function("a,b,c,d" + t1, "this.$initialize(a,b,c,d" + t1 + ")"); + $constructor = t1; + } + $prototype.constructor = $constructor; + $constructor.prototype = $prototype; + if (!isStatic) { + trampoline = H.Closure_forwardCallTo(receiver, $function, isIntercepted); + trampoline.$reflectionInfo = reflectionInfo; + } else { + $prototype.$static_name = propertyName; + trampoline = $function; + } + signatureFunction = H.Closure__computeSignatureFunctionLegacy(reflectionInfo, isStatic, isIntercepted); + $prototype.$signature = signatureFunction; + $prototype[callName] = trampoline; + for (applyTrampoline = trampoline, i = 1; i < functions.length; ++i) { + stub = functions[i]; + stubCallName = stub.$callName; + if (stubCallName != null) { + stub = isStatic ? stub : H.Closure_forwardCallTo(receiver, stub, isIntercepted); + $prototype[stubCallName] = stub; + } + if (i === applyTrampolineIndex) { + stub.$reflectionInfo = reflectionInfo; + applyTrampoline = stub; + } + } + $prototype["call*"] = applyTrampoline; + $prototype.$requiredArgCount = $function.$requiredArgCount; + $prototype.$defaultValues = $function.$defaultValues; + return $constructor; + }, + Closure__computeSignatureFunctionLegacy: function(functionType, isStatic, isIntercepted) { + var getReceiver; + if (typeof functionType == "number") + return function(getType, t) { + return function() { + return getType(t); + }; + }(H.getType, functionType); + if (typeof functionType == "function") + if (isStatic) + return functionType; + else { + getReceiver = isIntercepted ? H.BoundClosure_receiverOf : H.BoundClosure_selfOf; + return function(f, r) { + return function() { + return f.apply({$receiver: r(this)}, arguments); + }; + }(functionType, getReceiver); + } + throw H.wrapException("Error in functionType of tearoff"); + }, + Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) { + var getSelf = H.BoundClosure_selfOf; + switch (isSuperCall ? -1 : arity) { + case 0: + return function(n, S) { + return function() { + return S(this)[n](); + }; + }(stubName, getSelf); + case 1: + return function(n, S) { + return function(a) { + return S(this)[n](a); + }; + }(stubName, getSelf); + case 2: + return function(n, S) { + return function(a, b) { + return S(this)[n](a, b); + }; + }(stubName, getSelf); + case 3: + return function(n, S) { + return function(a, b, c) { + return S(this)[n](a, b, c); + }; + }(stubName, getSelf); + case 4: + return function(n, S) { + return function(a, b, c, d) { + return S(this)[n](a, b, c, d); + }; + }(stubName, getSelf); + case 5: + return function(n, S) { + return function(a, b, c, d, e) { + return S(this)[n](a, b, c, d, e); + }; + }(stubName, getSelf); + default: + return function(f, s) { + return function() { + return f.apply(s(this), arguments); + }; + }($function, getSelf); + } + }, + Closure_forwardCallTo: function(receiver, $function, isIntercepted) { + var stubName, arity, lookedUpFunction, t1, t2, selfName, $arguments; + if (isIntercepted) + return H.Closure_forwardInterceptedCallTo(receiver, $function); + stubName = $function.$stubName; + arity = $function.length; + lookedUpFunction = receiver[stubName]; + t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; + t2 = !t1 || arity >= 27; + if (t2) + return H.Closure_cspForwardCall(arity, !t1, stubName, $function); + if (arity === 0) { + t1 = $.Closure_functionCounter; + if (typeof t1 !== "number") + return t1.$add(); + $.Closure_functionCounter = t1 + 1; + selfName = "self" + t1; + t1 = "return function(){var " + selfName + " = this."; + t2 = $.BoundClosure_selfFieldNameCache; + return new Function(t1 + H.S(t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + ";return " + selfName + "." + H.S(stubName) + "();}")(); + } + $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(","); + t1 = $.Closure_functionCounter; + if (typeof t1 !== "number") + return t1.$add(); + $.Closure_functionCounter = t1 + 1; + $arguments += t1; + t1 = "return function(" + $arguments + "){return this."; + t2 = $.BoundClosure_selfFieldNameCache; + return new Function(t1 + H.S(t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + "." + H.S(stubName) + "(" + $arguments + ");}")(); + }, + Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) { + var getSelf = H.BoundClosure_selfOf, + getReceiver = H.BoundClosure_receiverOf; + switch (isSuperCall ? -1 : arity) { + case 0: + throw H.wrapException(H.RuntimeError$("Intercepted function with no arguments.")); + case 1: + return function(n, s, r) { + return function() { + return s(this)[n](r(this)); + }; + }($name, getSelf, getReceiver); + case 2: + return function(n, s, r) { + return function(a) { + return s(this)[n](r(this), a); + }; + }($name, getSelf, getReceiver); + case 3: + return function(n, s, r) { + return function(a, b) { + return s(this)[n](r(this), a, b); + }; + }($name, getSelf, getReceiver); + case 4: + return function(n, s, r) { + return function(a, b, c) { + return s(this)[n](r(this), a, b, c); + }; + }($name, getSelf, getReceiver); + case 5: + return function(n, s, r) { + return function(a, b, c, d) { + return s(this)[n](r(this), a, b, c, d); + }; + }($name, getSelf, getReceiver); + case 6: + return function(n, s, r) { + return function(a, b, c, d, e) { + return s(this)[n](r(this), a, b, c, d, e); + }; + }($name, getSelf, getReceiver); + default: + return function(f, s, r, a) { + return function() { + a = [r(this)]; + Array.prototype.push.apply(a, arguments); + return f.apply(s(this), a); + }; + }($function, getSelf, getReceiver); + } + }, + Closure_forwardInterceptedCallTo: function(receiver, $function) { + var t2, stubName, arity, lookedUpFunction, t3, t4, $arguments, + t1 = $.BoundClosure_selfFieldNameCache; + if (t1 == null) + t1 = $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self"); + t2 = $.BoundClosure_receiverFieldNameCache; + if (t2 == null) + t2 = $.BoundClosure_receiverFieldNameCache = H.BoundClosure_computeFieldNamed("receiver"); + stubName = $function.$stubName; + arity = $function.length; + lookedUpFunction = receiver[stubName]; + t3 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; + t4 = !t3 || arity >= 28; + if (t4) + return H.Closure_cspForwardInterceptedCall(arity, !t3, stubName, $function); + if (arity === 1) { + t1 = "return function(){return this." + H.S(t1) + "." + H.S(stubName) + "(this." + H.S(t2) + ");"; + t2 = $.Closure_functionCounter; + if (typeof t2 !== "number") + return t2.$add(); + $.Closure_functionCounter = t2 + 1; + return new Function(t1 + t2 + "}")(); + } + $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(","); + t1 = "return function(" + $arguments + "){return this." + H.S(t1) + "." + H.S(stubName) + "(this." + H.S(t2) + ", " + $arguments + ");"; + t2 = $.Closure_functionCounter; + if (typeof t2 !== "number") + return t2.$add(); + $.Closure_functionCounter = t2 + 1; + return new Function(t1 + t2 + "}")(); + }, + closureFromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, $name) { + return H.Closure_fromTearOff(receiver, functions, applyTrampolineIndex, reflectionInfo, !!isStatic, !!isIntercepted, $name); + }, + BoundClosure_selfOf: function(closure) { + return closure._self; + }, + BoundClosure_receiverOf: function(closure) { + return closure._receiver; + }, + BoundClosure_computeFieldNamed: function(fieldName) { + var t1, i, $name, + template = new H.BoundClosure("self", "target", "receiver", "name"), + names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template)); + for (t1 = names.length, i = 0; i < t1; ++i) { + $name = names[i]; + if (template[$name] === fieldName) + return $name; + } + }, + boolConversionCheck: function(value) { + if (value == null) + H.assertThrow("boolean expression must not be null"); + return value; + }, + stringTypeCheck: function(value) { + if (value == null) + return value; + if (typeof value === "string") + return value; + throw H.wrapException(H.TypeErrorImplementation$(value, "String")); + }, + stringTypeCast: function(value) { + if (typeof value === "string" || value == null) + return value; + throw H.wrapException(H.CastErrorImplementation$(value, "String")); + }, + doubleTypeCheck: function(value) { + if (value == null) + return value; + if (typeof value === "number") + return value; + throw H.wrapException(H.TypeErrorImplementation$(value, "double")); + }, + numTypeCheck: function(value) { + if (value == null) + return value; + if (typeof value === "number") + return value; + throw H.wrapException(H.TypeErrorImplementation$(value, "num")); + }, + boolTypeCheck: function(value) { + if (value == null) + return value; + if (typeof value === "boolean") + return value; + throw H.wrapException(H.TypeErrorImplementation$(value, "bool")); + }, + intTypeCheck: function(value) { + if (value == null) + return value; + if (typeof value === "number" && Math.floor(value) === value) + return value; + throw H.wrapException(H.TypeErrorImplementation$(value, "int")); + }, + propertyTypeError: function(value, property) { + throw H.wrapException(H.TypeErrorImplementation$(value, H.unminifyOrTag(H.stringTypeCheck(property).substring(3)))); + }, + propertyTypeCastError: function(value, property) { + throw H.wrapException(H.CastErrorImplementation$(value, H.unminifyOrTag(H.stringTypeCheck(property).substring(3)))); + }, + interceptedTypeCheck: function(value, property) { + if (value == null) + return value; + if ((typeof value === "object" || typeof value === "function") && J.getInterceptor$(value)[property]) + return value; + H.propertyTypeError(value, property); + }, + interceptedTypeCast: function(value, property) { + var t1; + if (value != null) + t1 = (typeof value === "object" || typeof value === "function") && J.getInterceptor$(value)[property]; + else + t1 = true; + if (t1) + return value; + H.propertyTypeCastError(value, property); + }, + listTypeCheck: function(value) { + if (value == null) + return value; + if (!!J.getInterceptor$(value).$isList) + return value; + throw H.wrapException(H.TypeErrorImplementation$(value, "List")); + }, + listSuperNativeTypeCheck: function(value, property) { + var t1; + if (value == null) + return value; + t1 = J.getInterceptor$(value); + if (!!t1.$isList) + return value; + if (t1[property]) + return value; + H.propertyTypeError(value, property); + }, + extractFunctionTypeObjectFromInternal: function(o) { + var signature; + if ("$signature" in o) { + signature = o.$signature; + if (typeof signature == "number") + return init.types[H.intTypeCheck(signature)]; + else + return o.$signature(); + } + return; + }, + functionTypeTest: function(value, functionTypeRti) { + var functionTypeObject; + if (typeof value == "function") + return true; + functionTypeObject = H.extractFunctionTypeObjectFromInternal(J.getInterceptor$(value)); + if (functionTypeObject == null) + return false; + return H._isFunctionSubtype(functionTypeObject, null, functionTypeRti, null); + }, + functionTypeCheck: function(value, functionTypeRti) { + var $self, t1; + if (value == null) + return value; + if ($._inTypeAssertion) + return value; + $._inTypeAssertion = true; + try { + if (H.functionTypeTest(value, functionTypeRti)) + return value; + $self = H.runtimeTypeToString(functionTypeRti); + t1 = H.TypeErrorImplementation$(value, $self); + throw H.wrapException(t1); + } finally { + $._inTypeAssertion = false; + } + }, + futureOrCheck: function(o, futureOrRti) { + if (o != null && !H.checkSubtypeOfRuntimeType(o, futureOrRti)) + H.throwExpression(H.TypeErrorImplementation$(o, H.runtimeTypeToString(futureOrRti))); + return o; + }, + TypeErrorImplementation$: function(value, type) { + return new H.TypeErrorImplementation("TypeError: " + P.Error_safeToString(value) + ": type '" + H.S(H._typeDescription(value)) + "' is not a subtype of type '" + type + "'"); + }, + CastErrorImplementation$: function(value, type) { + return new H.CastErrorImplementation("CastError: " + P.Error_safeToString(value) + ": type '" + H.S(H._typeDescription(value)) + "' is not a subtype of type '" + type + "'"); + }, + _typeDescription: function(value) { + var functionTypeObject, + t1 = J.getInterceptor$(value); + if (!!t1.$isClosure) { + functionTypeObject = H.extractFunctionTypeObjectFromInternal(t1); + if (functionTypeObject != null) + return H.runtimeTypeToString(functionTypeObject); + return "Closure"; + } + return H.Primitives_objectTypeName(value); + }, + assertThrow: function(message) { + throw H.wrapException(new H._AssertionError(message)); + }, + throwCyclicInit: function(staticName) { + throw H.wrapException(new P.CyclicInitializationError(staticName)); + }, + RuntimeError$: function(message) { + return new H.RuntimeError(message); + }, + getIsolateAffinityTag: function($name) { + return init.getIsolateTag($name); + }, + setRuntimeTypeInfo: function(target, rti) { + target.$ti = rti; + return target; + }, + getRuntimeTypeInfo: function(target) { + if (target == null) + return; + return target.$ti; + }, + getRuntimeTypeArguments: function(interceptor, object, substitutionName) { + return H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(object)); + }, + getRuntimeTypeArgumentIntercepted: function(interceptor, target, substitutionName, index) { + var $arguments = H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target)); + return $arguments == null ? null : $arguments[index]; + }, + getRuntimeTypeArgument: function(target, substitutionName, index) { + var $arguments = H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target)); + return $arguments == null ? null : $arguments[index]; + }, + getTypeArgumentByIndex: function(target, index) { + var rti = H.getRuntimeTypeInfo(target); + return rti == null ? null : rti[index]; + }, + runtimeTypeToString: function(rti) { + return H._runtimeTypeToString(rti, null); + }, + _runtimeTypeToString: function(rti, genericContext) { + var t1, t2; + if (rti == null) + return "dynamic"; + if (rti === -1) + return "void"; + if (typeof rti === "object" && rti !== null && rti.constructor === Array) + return H.unminifyOrTag(rti[0].name) + H._joinArguments(rti, 1, genericContext); + if (typeof rti == "function") + return H.unminifyOrTag(rti.name); + if (rti === -2) + return "dynamic"; + if (typeof rti === "number") { + H.intTypeCheck(rti); + if (genericContext == null || rti < 0 || rti >= genericContext.length) + return "unexpected-generic-index:" + rti; + t1 = genericContext.length; + t2 = t1 - rti - 1; + if (t2 < 0 || t2 >= t1) + return H.ioore(genericContext, t2); + return H.S(genericContext[t2]); + } + if ('func' in rti) + return H._functionRtiToString(rti, genericContext); + if ('futureOr' in rti) + return "FutureOr<" + H._runtimeTypeToString("type" in rti ? rti.type : null, genericContext) + ">"; + return "unknown-reified-type"; + }, + _functionRtiToString: function(rti, genericContext) { + var boundsRti, outerContextLength, offset, i, i0, typeParameters, typeSep, t1, t2, boundRti, returnTypeText, $arguments, argumentsText, sep, _i, argument, optionalArguments, namedArguments, t3, _s2_ = ", "; + if ("bounds" in rti) { + boundsRti = rti.bounds; + if (genericContext == null) { + genericContext = H.setRuntimeTypeInfo([], [P.String]); + outerContextLength = null; + } else + outerContextLength = genericContext.length; + offset = genericContext.length; + for (i = boundsRti.length, i0 = i; i0 > 0; --i0) + C.JSArray_methods.add$1(genericContext, "T" + (offset + i0)); + for (typeParameters = "<", typeSep = "", i0 = 0; i0 < i; ++i0, typeSep = _s2_) { + typeParameters += typeSep; + t1 = genericContext.length; + t2 = t1 - i0 - 1; + if (t2 < 0) + return H.ioore(genericContext, t2); + typeParameters = C.JSString_methods.$add(typeParameters, genericContext[t2]); + boundRti = boundsRti[i0]; + if (boundRti != null && boundRti !== P.Object) + typeParameters += " extends " + H._runtimeTypeToString(boundRti, genericContext); + } + typeParameters += ">"; + } else { + typeParameters = ""; + outerContextLength = null; + } + returnTypeText = !!rti.v ? "void" : H._runtimeTypeToString(rti.ret, genericContext); + if ("args" in rti) { + $arguments = rti.args; + for (t1 = $arguments.length, argumentsText = "", sep = "", _i = 0; _i < t1; ++_i, sep = _s2_) { + argument = $arguments[_i]; + argumentsText = argumentsText + sep + H._runtimeTypeToString(argument, genericContext); + } + } else { + argumentsText = ""; + sep = ""; + } + if ("opt" in rti) { + optionalArguments = rti.opt; + argumentsText += sep + "["; + for (t1 = optionalArguments.length, sep = "", _i = 0; _i < t1; ++_i, sep = _s2_) { + argument = optionalArguments[_i]; + argumentsText = argumentsText + sep + H._runtimeTypeToString(argument, genericContext); + } + argumentsText += "]"; + } + if ("named" in rti) { + namedArguments = rti.named; + argumentsText += sep + "{"; + for (t1 = H.extractKeys(namedArguments), t2 = t1.length, sep = "", _i = 0; _i < t2; ++_i, sep = _s2_) { + t3 = H.stringTypeCheck(t1[_i]); + argumentsText = argumentsText + sep + H._runtimeTypeToString(namedArguments[t3], genericContext) + (" " + H.S(t3)); + } + argumentsText += "}"; + } + if (outerContextLength != null) + genericContext.length = outerContextLength; + return typeParameters + "(" + argumentsText + ") => " + returnTypeText; + }, + _joinArguments: function(types, startIndex, genericContext) { + var buffer, index, separator, allDynamic, t1, argument; + if (types == null) + return ""; + buffer = new P.StringBuffer(""); + for (index = startIndex, separator = "", allDynamic = true, t1 = ""; index < types.length; ++index, separator = ", ") { + buffer._contents = t1 + separator; + argument = types[index]; + if (argument != null) + allDynamic = false; + t1 = buffer._contents += H._runtimeTypeToString(argument, genericContext); + } + return "<" + buffer.toString$0(0) + ">"; + }, + substitute: function(substitution, $arguments) { + if (substitution == null) + return $arguments; + substitution = substitution.apply(null, $arguments); + if (substitution == null) + return; + if (typeof substitution === "object" && substitution !== null && substitution.constructor === Array) + return substitution; + if (typeof substitution == "function") + return substitution.apply(null, $arguments); + return $arguments; + }, + checkSubtype: function(object, isField, checks, asField) { + var $arguments, interceptor; + if (object == null) + return false; + $arguments = H.getRuntimeTypeInfo(object); + interceptor = J.getInterceptor$(object); + if (interceptor[isField] == null) + return false; + return H.areSubtypes(H.substitute(interceptor[asField], $arguments), null, checks, null); + }, + subtypeCast: function(object, isField, checks, asField) { + if (object == null) + return object; + if (H.checkSubtype(object, isField, checks, asField)) + return object; + throw H.wrapException(H.CastErrorImplementation$(object, function(str, names) { + return str.replace(/[^<,> ]+/g, function(m) { + return names[m] || m; + }); + }(H.unminifyOrTag(isField.substring(3)) + H._joinArguments(checks, 0, null), init.mangledGlobalNames))); + }, + assertSubtype: function(object, isField, checks, asField) { + if (object == null) + return object; + if (H.checkSubtype(object, isField, checks, asField)) + return object; + throw H.wrapException(H.TypeErrorImplementation$(object, function(str, names) { + return str.replace(/[^<,> ]+/g, function(m) { + return names[m] || m; + }); + }(H.unminifyOrTag(isField.substring(3)) + H._joinArguments(checks, 0, null), init.mangledGlobalNames))); + }, + areSubtypes: function(s, sEnv, t, tEnv) { + var len, i; + if (t == null) + return true; + if (s == null) { + len = t.length; + for (i = 0; i < len; ++i) + if (!H._isSubtype(null, null, t[i], tEnv)) + return false; + return true; + } + len = s.length; + for (i = 0; i < len; ++i) + if (!H._isSubtype(s[i], sEnv, t[i], tEnv)) + return false; + return true; + }, + computeSignature: function(signature, context, contextName) { + return signature.apply(context, H.substitute(J.getInterceptor$(context)["$as" + H.S(contextName)], H.getRuntimeTypeInfo(context))); + }, + isSupertypeOfNullRecursive: function(type) { + var typeArgument; + if (typeof type === "number") + return false; + if ('futureOr' in type) { + typeArgument = "type" in type ? type.type : null; + return type == null || type.name === "Object" || type.name === "Null" || type === -1 || type === -2 || H.isSupertypeOfNullRecursive(typeArgument); + } + return false; + }, + checkSubtypeOfRuntimeType: function(o, t) { + var type, rti; + if (o == null) + return t == null || t.name === "Object" || t.name === "Null" || t === -1 || t === -2 || H.isSupertypeOfNullRecursive(t); + if (t == null || t === -1 || t.name === "Object" || t === -2) + return true; + if (typeof t == "object") { + if ('futureOr' in t) + if (H.checkSubtypeOfRuntimeType(o, "type" in t ? t.type : null)) + return true; + if ('func' in t) + return H.functionTypeTest(o, t); + } + type = J.getInterceptor$(o).constructor; + rti = H.getRuntimeTypeInfo(o); + if (rti != null) { + rti = rti.slice(); + rti.splice(0, 0, type); + type = rti; + } + return H._isSubtype(type, null, t, null); + }, + assertSubtypeOfRuntimeType: function(object, type) { + if (object != null && !H.checkSubtypeOfRuntimeType(object, type)) + throw H.wrapException(H.TypeErrorImplementation$(object, H.runtimeTypeToString(type))); + return object; + }, + _isSubtype: function(s, sEnv, t, tEnv) { + var t1, typeOfS, tTypeArgument, futureSubstitution, futureArguments, t2, typeOfT, typeOfTString, substitution, _null = null; + if (s === t) + return true; + if (t == null || t === -1 || t.name === "Object" || t === -2) + return true; + if (s === -2) + return true; + if (s == null || s === -1 || s.name === "Object" || s === -2) { + if (typeof t === "number") + return false; + if ('futureOr' in t) + return H._isSubtype(s, sEnv, "type" in t ? t.type : _null, tEnv); + return false; + } + if (typeof s === "number") + return H._isSubtype(sEnv[H.intTypeCheck(s)], sEnv, t, tEnv); + if (typeof t === "number") + return false; + if (s.name === "Null") + return true; + t1 = typeof s === "object" && s !== null && s.constructor === Array; + typeOfS = t1 ? s[0] : s; + if ('futureOr' in t) { + tTypeArgument = "type" in t ? t.type : _null; + if ('futureOr' in s) + return H._isSubtype("type" in s ? s.type : _null, sEnv, tTypeArgument, tEnv); + else if (H._isSubtype(s, sEnv, tTypeArgument, tEnv)) + return true; + else { + if (!('$is' + "Future" in typeOfS.prototype)) + return false; + futureSubstitution = typeOfS.prototype["$as" + "Future"]; + futureArguments = H.substitute(futureSubstitution, t1 ? s.slice(1) : _null); + return H._isSubtype(typeof futureArguments === "object" && futureArguments !== null && futureArguments.constructor === Array ? futureArguments[0] : _null, sEnv, tTypeArgument, tEnv); + } + } + if ('func' in t) + return H._isFunctionSubtype(s, sEnv, t, tEnv); + if ('func' in s) + return t.name === "Function"; + t2 = typeof t === "object" && t !== null && t.constructor === Array; + typeOfT = t2 ? t[0] : t; + if (typeOfT !== typeOfS) { + typeOfTString = typeOfT.name; + if (!('$is' + typeOfTString in typeOfS.prototype)) + return false; + substitution = typeOfS.prototype["$as" + typeOfTString]; + } else + substitution = _null; + if (!t2) + return true; + t1 = t1 ? s.slice(1) : _null; + t2 = t.slice(1); + return H.areSubtypes(H.substitute(substitution, t1), sEnv, t2, tEnv); + }, + _isFunctionSubtype: function(s, sEnv, t, tEnv) { + var sBounds, tBounds, sParameterTypes, tParameterTypes, sOptionalParameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalParametersLen, tOptionalParametersLen, pos, tPos, sPos, sNamedParameters, tNamedParameters; + if (!('func' in s)) + return false; + if ("bounds" in s) { + if (!("bounds" in t)) + return false; + sBounds = s.bounds; + tBounds = t.bounds; + if (sBounds.length !== tBounds.length) + return false; + sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv); + tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv); + } else if ("bounds" in t) + return false; + if (!H._isSubtype(s.ret, sEnv, t.ret, tEnv)) + 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; + for (pos = 0; pos < sParametersLen; ++pos) + if (!H._isSubtype(tParameterTypes[pos], tEnv, sParameterTypes[pos], sEnv)) + return false; + for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos) + if (!H._isSubtype(tParameterTypes[tPos], tEnv, sOptionalParameterTypes[sPos], sEnv)) + return false; + for (tPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos) + if (!H._isSubtype(tOptionalParameterTypes[tPos], tEnv, sOptionalParameterTypes[sPos], sEnv)) + return false; + sNamedParameters = s.named; + tNamedParameters = t.named; + if (tNamedParameters == null) + return true; + if (sNamedParameters == null) + return false; + return H.namedParametersSubtypeCheck(sNamedParameters, sEnv, tNamedParameters, tEnv); + }, + namedParametersSubtypeCheck: function(s, sEnv, t, tEnv) { + var t1, i, $name, + names = Object.getOwnPropertyNames(t); + for (t1 = names.length, i = 0; i < t1; ++i) { + $name = names[i]; + if (!Object.hasOwnProperty.call(s, $name)) + return false; + if (!H._isSubtype(t[$name], tEnv, s[$name], sEnv)) + return false; + } + return true; + }, + defineProperty: function(obj, property, value) { + Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); + }, + lookupAndCacheInterceptor: function(obj) { + var interceptor, interceptorClass, mark, t1, + tag = H.stringTypeCheck($.getTagFunction.call$1(obj)), + record = $.dispatchRecordsForInstanceTags[tag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[tag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[tag]; + if (interceptorClass == null) { + tag = H.stringTypeCheck($.alternateTagFunction.call$2(obj, tag)); + if (tag != null) { + record = $.dispatchRecordsForInstanceTags[tag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[tag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[tag]; + } + } + if (interceptorClass == null) + return; + interceptor = interceptorClass.prototype; + mark = tag[0]; + if (mark === "!") { + record = H.makeLeafDispatchRecord(interceptor); + $.dispatchRecordsForInstanceTags[tag] = record; + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + if (mark === "~") { + $.interceptorsForUncacheableTags[tag] = interceptor; + return interceptor; + } + if (mark === "-") { + t1 = H.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } + if (mark === "+") + return H.patchInteriorProto(obj, interceptor); + if (mark === "*") + throw H.wrapException(P.UnimplementedError$(tag)); + if (init.leafTags[tag] === true) { + t1 = H.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } else + return H.patchInteriorProto(obj, interceptor); + }, + patchInteriorProto: function(obj, interceptor) { + var proto = Object.getPrototypeOf(obj); + Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); + return interceptor; + }, + makeLeafDispatchRecord: function(interceptor) { + return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); + }, + makeDefaultDispatchRecord: function(tag, interceptorClass, proto) { + var interceptor = interceptorClass.prototype; + if (init.leafTags[tag] === true) + return H.makeLeafDispatchRecord(interceptor); + else + return J.makeDispatchRecord(interceptor, proto, null, null); + }, + initNativeDispatch: function() { + if (true === $.initNativeDispatchFlag) + return; + $.initNativeDispatchFlag = true; + H.initNativeDispatchContinue(); + }, + initNativeDispatchContinue: function() { + var map, tags, fun, i, tag, proto, record, interceptorClass; + $.dispatchRecordsForInstanceTags = Object.create(null); + $.interceptorsForUncacheableTags = Object.create(null); + H.initHooks(); + map = init.interceptorsByTag; + tags = Object.getOwnPropertyNames(map); + if (typeof window != "undefined") { + window; + fun = function() { + }; + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + proto = $.prototypeForTagFunction.call$1(tag); + if (proto != null) { + record = H.makeDefaultDispatchRecord(tag, map[tag], proto); + if (record != null) { + Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + fun.prototype = proto; + } + } + } + } + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + if (/^[A-Za-z_]/.test(tag)) { + interceptorClass = map[tag]; + map["!" + tag] = interceptorClass; + map["~" + tag] = interceptorClass; + map["-" + tag] = interceptorClass; + map["+" + tag] = interceptorClass; + map["*" + tag] = interceptorClass; + } + } + }, + initHooks: function() { + var transformers, i, transformer, getTag, getUnknownTag, prototypeForTag, + hooks = C.C_JS_CONST0(); + hooks = H.applyHooksTransformer(C.C_JS_CONST1, H.applyHooksTransformer(C.C_JS_CONST2, H.applyHooksTransformer(C.C_JS_CONST3, H.applyHooksTransformer(C.C_JS_CONST3, H.applyHooksTransformer(C.C_JS_CONST4, H.applyHooksTransformer(C.C_JS_CONST5, H.applyHooksTransformer(C.C_JS_CONST6(C.C_JS_CONST), hooks))))))); + if (typeof dartNativeDispatchHooksTransformer != "undefined") { + transformers = dartNativeDispatchHooksTransformer; + if (typeof transformers == "function") + transformers = [transformers]; + if (transformers.constructor == Array) + for (i = 0; i < transformers.length; ++i) { + transformer = transformers[i]; + if (typeof transformer == "function") + hooks = transformer(hooks) || hooks; + } + } + getTag = hooks.getTag; + getUnknownTag = hooks.getUnknownTag; + prototypeForTag = hooks.prototypeForTag; + $.getTagFunction = new H.initHooks_closure(getTag); + $.alternateTagFunction = new H.initHooks_closure0(getUnknownTag); + $.prototypeForTagFunction = new H.initHooks_closure1(prototypeForTag); + }, + applyHooksTransformer: function(transformer, hooks) { + return transformer(hooks) || hooks; + }, + quoteStringForRegExp: function(string) { + if (/[[\]{}()*+?.\\^$|]/.test(string)) + return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); + return string; + }, + ConstantMapView: function ConstantMapView(t0, t1) { + this._collection$_map = t0; + this.$ti = t1; + }, + ConstantMap: function ConstantMap() { + }, + ConstantStringMap: function ConstantStringMap(t0, t1, t2, t3) { + var _ = this; + _.__js_helper$_length = t0; + _._jsObject = t1; + _._keys = t2; + _.$ti = t3; + }, + JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { + var _ = this; + _._memberName = t0; + _._kind = t1; + _._arguments = t2; + _._namedArgumentNames = t3; + _._typeArgumentCount = t4; + }, + Primitives_functionNoSuchMethod_closure: function Primitives_functionNoSuchMethod_closure(t0, t1, t2) { + this._box_0 = t0; + this.namedArgumentList = t1; + this.$arguments = t2; + }, + TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._pattern = t0; + _._arguments = t1; + _._argumentsExpr = t2; + _._expr = t3; + _._method = t4; + _._receiver = t5; + }, + NullError: function NullError(t0, t1) { + this._message = t0; + this._method = t1; + }, + JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) { + this._message = t0; + this._method = t1; + this._receiver = t2; + }, + UnknownJsTypeError: function UnknownJsTypeError(t0) { + this._message = t0; + }, + ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) { + this.dartException = t0; + this.stackTrace = t1; + }, + unwrapException_saveStackTrace: function unwrapException_saveStackTrace(t0) { + this.ex = t0; + }, + _StackTrace: function _StackTrace(t0) { + this._exception = t0; + this._trace = null; + }, + Closure: function Closure() { + }, + TearOffClosure: function TearOffClosure() { + }, + StaticClosure: function StaticClosure() { + }, + BoundClosure: function BoundClosure(t0, t1, t2, t3) { + var _ = this; + _._self = t0; + _.__js_helper$_target = t1; + _._receiver = t2; + _._name = t3; + }, + TypeErrorImplementation: function TypeErrorImplementation(t0) { + this.message = t0; + }, + CastErrorImplementation: function CastErrorImplementation(t0) { + this.message = t0; + }, + RuntimeError: function RuntimeError(t0) { + this.message = t0; + }, + _AssertionError: function _AssertionError(t0) { + this.message = t0; + }, + JsLinkedHashMap: function JsLinkedHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _._last = _._first = _._rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t0; + }, + LinkedHashMapCell: function LinkedHashMapCell(t0, t1) { + this.hashMapCellKey = t0; + this.hashMapCellValue = t1; + this._next = null; + }, + LinkedHashMapKeyIterable: function LinkedHashMapKeyIterable(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + LinkedHashMapKeyIterator: function LinkedHashMapKeyIterator(t0, t1, t2) { + var _ = this; + _._map = t0; + _._modifications = t1; + _.__js_helper$_current = _._cell = null; + _.$ti = t2; + }, + initHooks_closure: function initHooks_closure(t0) { + this.getTag = t0; + }, + initHooks_closure0: function initHooks_closure0(t0) { + this.getUnknownTag = t0; + }, + initHooks_closure1: function initHooks_closure1(t0) { + this.prototypeForTag = t0; + }, + _checkValidIndex: function(index, list, $length) { + if (index >>> 0 !== index || index >= $length) + throw H.wrapException(H.diagnoseIndexError(list, index)); + }, + NativeTypedData: function NativeTypedData() { + }, + NativeTypedArray: function NativeTypedArray() { + }, + NativeTypedArrayOfDouble: function NativeTypedArrayOfDouble() { + }, + NativeTypedArrayOfInt: function NativeTypedArrayOfInt() { + }, + NativeInt16List: function NativeInt16List() { + }, + NativeInt32List: function NativeInt32List() { + }, + NativeInt8List: function NativeInt8List() { + }, + NativeUint16List: function NativeUint16List() { + }, + NativeUint32List: function NativeUint32List() { + }, + NativeUint8ClampedList: function NativeUint8ClampedList() { + }, + NativeUint8List: function NativeUint8List() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + extractKeys: function(victim) { + return J.JSArray_JSArray$markFixed(victim ? Object.keys(victim) : [], null); + }, + unmangleGlobalNameIfPreservedAnyways: function($name) { + return init.mangledGlobalNames[$name]; + } + }, + J = { + makeDispatchRecord: function(interceptor, proto, extension, indexability) { + return {i: interceptor, p: proto, e: extension, x: indexability}; + }, + getNativeInterceptor: function(object) { + var proto, objectProto, $constructor, interceptor, + record = object[init.dispatchPropertyName]; + if (record == null) + if ($.initNativeDispatchFlag == null) { + H.initNativeDispatch(); + record = object[init.dispatchPropertyName]; + } + if (record != null) { + proto = record.p; + if (false === proto) + return record.i; + if (true === proto) + return object; + objectProto = Object.getPrototypeOf(object); + if (proto === objectProto) + return record.i; + if (record.e === objectProto) + throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.S(proto(object, record)))); + } + $constructor = object.constructor; + interceptor = $constructor == null ? null : $constructor[$.$get$JS_INTEROP_INTERCEPTOR_TAG()]; + if (interceptor != null) + return interceptor; + interceptor = H.lookupAndCacheInterceptor(object); + if (interceptor != null) + return interceptor; + if (typeof object == "function") + return C.JavaScriptFunction_methods; + proto = Object.getPrototypeOf(object); + if (proto == null) + return C.PlainJavaScriptObject_methods; + if (proto === Object.prototype) + return C.PlainJavaScriptObject_methods; + if (typeof $constructor == "function") { + Object.defineProperty($constructor, $.$get$JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + return C.UnknownJavaScriptObject_methods; + } + return C.UnknownJavaScriptObject_methods; + }, + JSArray_JSArray$markFixed: function(allocation, $E) { + return J.JSArray_markFixedList(H.setRuntimeTypeInfo(allocation, [$E])); + }, + JSArray_markFixedList: function(list) { + list.fixed$length = Array; + return list; + }, + getInterceptor$: function(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSDouble.prototype; + } + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return J.JSNull.prototype; + if (typeof receiver == "boolean") + return J.JSBool.prototype; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ansx: function(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$asx: function(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ax: function(receiver) { + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$bn: function(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (receiver == null) + return receiver; + if (typeof receiver == "boolean") + return J.JSBool.prototype; + if (!(receiver instanceof P.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$n: function(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof P.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$s: function(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof P.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$x: function(receiver) { + if (receiver == null) + return receiver; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + get$hashCode$: function(receiver) { + return J.getInterceptor$(receiver).get$hashCode(receiver); + }, + get$iterator$ax: function(receiver) { + return J.getInterceptor$ax(receiver).get$iterator(receiver); + }, + get$length$asx: function(receiver) { + return J.getInterceptor$asx(receiver).get$length(receiver); + }, + get$onClick$x: function(receiver) { + return J.getInterceptor$x(receiver).get$onClick(receiver); + }, + $add$ansx: function(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver + a0; + return J.getInterceptor$ansx(receiver).$add(receiver, a0); + }, + $and$bn: function(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return (receiver & a0) >>> 0; + return J.getInterceptor$bn(receiver).$and(receiver, a0); + }, + $div$n: function(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver / a0; + return J.getInterceptor$n(receiver).$div(receiver, a0); + }, + $eq$: function(receiver, a0) { + if (receiver == null) + return a0 == null; + if (typeof receiver != "object") + return a0 != null && receiver === a0; + return J.getInterceptor$(receiver).$eq(receiver, a0); + }, + $ge$n: function(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver >= a0; + return J.getInterceptor$n(receiver).$ge(receiver, a0); + }, + $index$asx: function(receiver, a0) { + if (typeof a0 === "number") + if (receiver.constructor == Array || typeof receiver == "string" || H.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) + if (a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0]; + return J.getInterceptor$asx(receiver).$index(receiver, a0); + }, + $indexSet$ax: function(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); + }, + $or$bn: function(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return (receiver | a0) >>> 0; + return J.getInterceptor$bn(receiver).$or(receiver, a0); + }, + $shl$n: function(receiver, a0) { + return J.getInterceptor$n(receiver).$shl(receiver, a0); + }, + $sub$n: function(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver - a0; + return J.getInterceptor$n(receiver).$sub(receiver, a0); + }, + _removeEventListener$3$x: function(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2); + }, + addEventListener$3$x: function(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); + }, + noSuchMethod$1$: function(receiver, a0) { + return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); + }, + toString$0$: function(receiver) { + return J.getInterceptor$(receiver).toString$0(receiver); + }, + Interceptor: function Interceptor() { + }, + JSBool: function JSBool() { + }, + JSNull: function JSNull() { + }, + JavaScriptObject: function JavaScriptObject() { + }, + PlainJavaScriptObject: function PlainJavaScriptObject() { + }, + UnknownJavaScriptObject: function UnknownJavaScriptObject() { + }, + JavaScriptFunction: function JavaScriptFunction() { + }, + JSArray: function JSArray(t0) { + this.$ti = t0; + }, + JSUnmodifiableArray: function JSUnmodifiableArray(t0) { + this.$ti = t0; + }, + ArrayIterator: function ArrayIterator(t0, t1, t2) { + var _ = this; + _._iterable = t0; + _._length = t1; + _._index = 0; + _._current = null; + _.$ti = t2; + }, + JSNumber: function JSNumber() { + }, + JSInt: function JSInt() { + }, + JSDouble: function JSDouble() { + }, + JSString: function JSString() { + } + }, + P = { + _AsyncRun__initializeScheduleImmediate: function() { + var div, span, t1 = {}; + if (self.scheduleImmediate != null) + return P.async__AsyncRun__scheduleImmediateJsOverride$closure(); + if (self.MutationObserver != null && self.document != null) { + div = self.document.createElement("div"); + span = self.document.createElement("span"); + t1.storedCallback = null; + new self.MutationObserver(H.convertDartClosureToJS(new P._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); + return new P._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); + } else if (self.setImmediate != null) + return P.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); + return P.async__AsyncRun__scheduleImmediateWithTimer$closure(); + }, + _AsyncRun__scheduleImmediateJsOverride: function(callback) { + self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(H.functionTypeCheck(callback, {func: 1, ret: -1})), 0)); + }, + _AsyncRun__scheduleImmediateWithSetImmediate: function(callback) { + self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(H.functionTypeCheck(callback, {func: 1, ret: -1})), 0)); + }, + _AsyncRun__scheduleImmediateWithTimer: function(callback) { + P.Timer__createTimer(C.Duration_0, H.functionTypeCheck(callback, {func: 1, ret: -1})); + }, + Timer__createTimer: function(duration, callback) { + var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000); + return P._TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); + }, + _TimerImpl$: function(milliseconds, callback) { + var t1 = new P._TimerImpl(); + t1._TimerImpl$2(milliseconds, callback); + return t1; + }, + _makeAsyncAwaitCompleter: function($T) { + return new P._AsyncAwaitCompleter(new P._Future($.Zone__current, [$T]), [$T]); + }, + _asyncStartSync: function(bodyFunction, completer) { + bodyFunction.call$2(0, null); + completer.isSync = true; + return completer._future; + }, + _asyncAwait: function(object, bodyFunction) { + P._awaitOnObject(object, bodyFunction); + }, + _asyncReturn: function(object, completer) { + completer.complete$1(0, object); + }, + _asyncRethrow: function(object, completer) { + completer.completeError$2(H.unwrapException(object), H.getTraceFromException(object)); + }, + _awaitOnObject: function(object, bodyFunction) { + var future, _null = null, + thenCallback = new P._awaitOnObject_closure(bodyFunction), + errorCallback = new P._awaitOnObject_closure0(bodyFunction), + t1 = J.getInterceptor$(object); + if (!!t1.$is_Future) + object._thenAwait$1$2(thenCallback, errorCallback, _null); + else if (!!t1.$isFuture) + object.then$1$2$onError(thenCallback, errorCallback, _null); + else { + future = new P._Future($.Zone__current, [null]); + H.assertSubtypeOfRuntimeType(object, null); + future._state = 4; + future._resultOrListeners = object; + future._thenAwait$1$2(thenCallback, _null, _null); + } + }, + _wrapJsFunctionForAsync: function($function) { + var $protected = function(fn, ERROR) { + return function(errorCode, result) { + while (true) + try { + fn(errorCode, result); + break; + } catch (error) { + result = error; + errorCode = ERROR; + } + }; + }($function, 1); + return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), P.Null, P.int, null); + }, + _Future$zoneValue: function(value, _zone, $T) { + var t1 = new P._Future(_zone, [$T]); + H.assertSubtypeOfRuntimeType(value, $T); + t1._state = 4; + t1._resultOrListeners = value; + return t1; + }, + _Future__chainForeignFuture: function(source, target) { + var e, s, exception; + target._state = 1; + try { + source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), P.Null); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s)); + } + }, + _Future__chainCoreFuture: function(source, target) { + var t1, listeners; + for (; t1 = source._state, t1 === 2;) + source = H.interceptedTypeCheck(source._resultOrListeners, "$is_Future"); + if (t1 >= 4) { + listeners = target._removeListeners$0(); + target._state = source._state; + target._resultOrListeners = source._resultOrListeners; + P._Future__propagateToListeners(target, listeners); + } else { + listeners = H.interceptedTypeCheck(target._resultOrListeners, "$is_FutureListener"); + target._state = 2; + target._resultOrListeners = source; + source._prependListeners$1(listeners); + } + }, + _Future__propagateToListeners: function(source, listeners) { + var _box_0, hasError, asyncError, listeners0, sourceResult, t2, t3, zone, t4, oldZone, current, result, _null = null, _box_1 = {}, + t1 = _box_1.source = source; + for (; true;) { + _box_0 = {}; + hasError = t1._state === 8; + if (listeners == null) { + if (hasError) { + asyncError = H.interceptedTypeCheck(t1._resultOrListeners, "$isAsyncError"); + P._rootHandleUncaughtError(_null, _null, t1._zone, asyncError.error, asyncError.stackTrace); + } + return; + } + for (; listeners0 = listeners._nextListener, listeners0 != null; listeners = listeners0) { + listeners._nextListener = null; + P._Future__propagateToListeners(_box_1.source, listeners); + } + t1 = _box_1.source; + sourceResult = t1._resultOrListeners; + _box_0.listenerHasError = hasError; + _box_0.listenerValueOrError = sourceResult; + t2 = !hasError; + if (t2) { + t3 = listeners.state; + t3 = (t3 & 1) !== 0 || (t3 & 15) === 8; + } else + t3 = true; + if (t3) { + t3 = listeners.result; + zone = t3._zone; + if (hasError) { + t4 = t1._zone === zone; + t4 = !(t4 || t4); + } else + t4 = false; + if (t4) { + H.interceptedTypeCheck(sourceResult, "$isAsyncError"); + P._rootHandleUncaughtError(_null, _null, t1._zone, sourceResult.error, sourceResult.stackTrace); + return; + } + oldZone = $.Zone__current; + if (oldZone !== zone) + $.Zone__current = zone; + else + oldZone = _null; + t1 = listeners.state; + if ((t1 & 15) === 8) + new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_1, _box_0, listeners, hasError).call$0(); + else if (t2) { + if ((t1 & 1) !== 0) + new P._Future__propagateToListeners_handleValueCallback(_box_0, listeners, sourceResult).call$0(); + } else if ((t1 & 2) !== 0) + new P._Future__propagateToListeners_handleError(_box_1, _box_0, listeners).call$0(); + if (oldZone != null) + $.Zone__current = oldZone; + t1 = _box_0.listenerValueOrError; + if (!!J.getInterceptor$(t1).$isFuture) { + if (t1._state >= 4) { + current = H.interceptedTypeCheck(t3._resultOrListeners, "$is_FutureListener"); + t3._resultOrListeners = null; + listeners = t3._reverseListeners$1(current); + t3._state = t1._state; + t3._resultOrListeners = t1._resultOrListeners; + _box_1.source = t1; + continue; + } else + P._Future__chainCoreFuture(t1, t3); + return; + } + } + result = listeners.result; + current = H.interceptedTypeCheck(result._resultOrListeners, "$is_FutureListener"); + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + t1 = _box_0.listenerHasError; + t2 = _box_0.listenerValueOrError; + if (!t1) { + H.assertSubtypeOfRuntimeType(t2, H.getTypeArgumentByIndex(result, 0)); + result._state = 4; + result._resultOrListeners = t2; + } else { + H.interceptedTypeCheck(t2, "$isAsyncError"); + result._state = 8; + result._resultOrListeners = t2; + } + _box_1.source = result; + t1 = result; + } + }, + _registerErrorHandler: function(errorHandler, zone) { + if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Object, P.StackTrace]})) + return zone.registerBinaryCallback$3$1(errorHandler, null, P.Object, P.StackTrace); + if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Object]})) + return H.functionTypeCheck(errorHandler, {func: 1, ret: null, args: [P.Object]}); + throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result")); + }, + _microtaskLoop: function() { + var t1, t2; + for (; t1 = $._nextCallback, t1 != null;) { + $._lastPriorityCallback = null; + t2 = t1.next; + $._nextCallback = t2; + if (t2 == null) + $._lastCallback = null; + t1.callback.call$0(); + } + }, + _startMicrotaskLoop: function() { + $._isInCallbackLoop = true; + try { + P._microtaskLoop(); + } finally { + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + if ($._nextCallback != null) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); + } + }, + _scheduleAsyncCallback: function(callback) { + var newEntry = new P._AsyncCallbackEntry(callback); + if ($._nextCallback == null) { + $._nextCallback = $._lastCallback = newEntry; + if (!$._isInCallbackLoop) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); + } else + $._lastCallback = $._lastCallback.next = newEntry; + }, + _schedulePriorityAsyncCallback: function(callback) { + var entry, t2, + t1 = $._nextCallback; + if (t1 == null) { + P._scheduleAsyncCallback(callback); + $._lastPriorityCallback = $._lastCallback; + return; + } + entry = new P._AsyncCallbackEntry(callback); + t2 = $._lastPriorityCallback; + if (t2 == null) { + entry.next = t1; + $._nextCallback = $._lastPriorityCallback = entry; + } else { + entry.next = t2.next; + $._lastPriorityCallback = t2.next = entry; + if (entry.next == null) + $._lastCallback = entry; + } + }, + scheduleMicrotask: function(callback) { + var _null = null, + currentZone = $.Zone__current; + if (C.C__RootZone === currentZone) { + P._rootScheduleMicrotask(_null, _null, C.C__RootZone, callback); + return; + } + P._rootScheduleMicrotask(_null, _null, currentZone, H.functionTypeCheck(currentZone.bindCallbackGuarded$1(callback), {func: 1, ret: -1})); + }, + StreamIterator_StreamIterator: function(stream, $T) { + var t1 = stream == null ? H.throwExpression(P.ArgumentError$notNull("stream")) : stream; + return new P._StreamIterator(t1, [$T]); + }, + StreamController_StreamController: function($T) { + var _null = null; + return new P._AsyncStreamController(_null, _null, _null, _null, [$T]); + }, + _runGuarded: function(notificationHandler) { + return; + }, + _nullErrorHandler: function(error, stackTrace) { + P._rootHandleUncaughtError(null, null, $.Zone__current, error, stackTrace); + }, + _nullDoneHandler: function() { + }, + Timer_Timer: function(duration, callback) { + var t1 = $.Zone__current; + if (t1 === C.C__RootZone) + return P.Timer__createTimer(duration, H.functionTypeCheck(callback, {func: 1, ret: -1})); + return P.Timer__createTimer(duration, H.functionTypeCheck(t1.bindCallbackGuarded$1(callback), {func: 1, ret: -1})); + }, + _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { + var t1 = {}; + t1.error = error; + P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(t1, stackTrace)); + }, + _rootRun: function($self, $parent, zone, f, $R) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$0(); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$0(); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunUnary: function($self, $parent, zone, f, arg, $R, $T) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$1(arg); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$1(arg); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunBinary: function($self, $parent, zone, f, arg1, arg2, $R, T1, T2) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$2(arg1, arg2); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$2(arg1, arg2); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootScheduleMicrotask: function($self, $parent, zone, f) { + var t1; + H.functionTypeCheck(f, {func: 1, ret: -1}); + t1 = C.C__RootZone !== zone; + if (t1) + f = !(!t1 || false) ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, -1); + P._scheduleAsyncCallback(f); + }, + _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { + this._box_0 = t0; + }, + _AsyncRun__initializeScheduleImmediate_closure: function _AsyncRun__initializeScheduleImmediate_closure(t0, t1, t2) { + this._box_0 = t0; + this.div = t1; + this.span = t2; + }, + _AsyncRun__scheduleImmediateJsOverride_internalCallback: function _AsyncRun__scheduleImmediateJsOverride_internalCallback(t0) { + this.callback = t0; + }, + _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) { + this.callback = t0; + }, + _TimerImpl: function _TimerImpl() { + this._handle = null; + }, + _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) { + this.$this = t0; + this.callback = t1; + }, + _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) { + this._future = t0; + this.isSync = false; + this.$ti = t1; + }, + _awaitOnObject_closure: function _awaitOnObject_closure(t0) { + this.bodyFunction = t0; + }, + _awaitOnObject_closure0: function _awaitOnObject_closure0(t0) { + this.bodyFunction = t0; + }, + _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) { + this.$protected = t0; + }, + _Completer: function _Completer() { + }, + _AsyncCompleter: function _AsyncCompleter(t0, t1) { + this.future = t0; + this.$ti = t1; + }, + _FutureListener: function _FutureListener(t0, t1, t2, t3, t4) { + var _ = this; + _._nextListener = null; + _.result = t0; + _.state = t1; + _.callback = t2; + _.errorCallback = t3; + _.$ti = t4; + }, + _Future: function _Future(t0, t1) { + var _ = this; + _._state = 0; + _._zone = t0; + _._resultOrListeners = null; + _.$ti = t1; + }, + _Future__addListener_closure: function _Future__addListener_closure(t0, t1) { + this.$this = t0; + this.listener = t1; + }, + _Future__prependListeners_closure: function _Future__prependListeners_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) { + this.target = t0; + }, + _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) { + this.target = t0; + }, + _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) { + this.target = t0; + this.e = t1; + this.s = t2; + }, + _Future__asyncComplete_closure: function _Future__asyncComplete_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _Future__chainFuture_closure: function _Future__chainFuture_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _Future__asyncCompleteError_closure: function _Future__asyncCompleteError_closure(t0, t1, t2) { + this.$this = t0; + this.error = t1; + this.stackTrace = t2; + }, + _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2, t3) { + var _ = this; + _._box_1 = t0; + _._box_0 = t1; + _.listener = t2; + _.hasError = t3; + }, + _Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0) { + this.originalSource = t0; + }, + _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1, t2) { + this._box_0 = t0; + this.listener = t1; + this.sourceResult = t2; + }, + _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1, t2) { + this._box_1 = t0; + this._box_0 = t1; + this.listener = t2; + }, + _AsyncCallbackEntry: function _AsyncCallbackEntry(t0) { + this.callback = t0; + this.next = null; + }, + Stream: function Stream() { + }, + Stream_length_closure: function Stream_length_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + Stream_length_closure0: function Stream_length_closure0(t0, t1) { + this._box_0 = t0; + this.future = t1; + }, + StreamSubscription: function StreamSubscription() { + }, + StreamTransformerBase: function StreamTransformerBase() { + }, + _StreamController: function _StreamController() { + }, + _StreamController__subscribe_closure: function _StreamController__subscribe_closure(t0) { + this.$this = t0; + }, + _StreamController__recordCancel_complete: function _StreamController__recordCancel_complete(t0) { + this.$this = t0; + }, + _AsyncStreamControllerDispatch: function _AsyncStreamControllerDispatch() { + }, + _AsyncStreamController: function _AsyncStreamController(t0, t1, t2, t3, t4) { + var _ = this; + _._varData = null; + _._state = 0; + _._doneFuture = null; + _.onListen = t0; + _.onPause = t1; + _.onResume = t2; + _.onCancel = t3; + _.$ti = t4; + }, + _ControllerStream: function _ControllerStream(t0, t1) { + this._controller = t0; + this.$ti = t1; + }, + _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3) { + var _ = this; + _._controller = t0; + _._onDone = _._onError = _._onData = null; + _._zone = t1; + _._state = t2; + _._pending = _._cancelFuture = null; + _.$ti = t3; + }, + _StreamSinkWrapper: function _StreamSinkWrapper(t0, t1) { + this._async$_target = t0; + this.$ti = t1; + }, + _BufferingStreamSubscription: function _BufferingStreamSubscription() { + }, + _BufferingStreamSubscription__sendError_sendError: function _BufferingStreamSubscription__sendError_sendError(t0, t1, t2) { + this.$this = t0; + this.error = t1; + this.stackTrace = t2; + }, + _BufferingStreamSubscription__sendDone_sendDone: function _BufferingStreamSubscription__sendDone_sendDone(t0) { + this.$this = t0; + }, + _StreamImpl: function _StreamImpl() { + }, + _DelayedEvent: function _DelayedEvent() { + }, + _DelayedData: function _DelayedData(t0, t1) { + this.value = t0; + this.next = null; + this.$ti = t1; + }, + _DelayedError: function _DelayedError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + this.next = null; + }, + _DelayedDone: function _DelayedDone() { + }, + _PendingEvents: function _PendingEvents() { + }, + _PendingEvents_schedule_closure: function _PendingEvents_schedule_closure(t0, t1) { + this.$this = t0; + this.dispatch = t1; + }, + _StreamImplEvents: function _StreamImplEvents(t0) { + var _ = this; + _.lastPendingEvent = _.firstPendingEvent = null; + _._state = 0; + _.$ti = t0; + }, + _StreamIterator: function _StreamIterator(t0, t1) { + var _ = this; + _._subscription = null; + _._stateData = t0; + _._isPaused = false; + _.$ti = t1; + }, + AsyncError: function AsyncError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + _Zone: function _Zone() { + }, + _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) { + this._box_0 = t0; + this.stackTrace = t1; + }, + _RootZone: function _RootZone() { + }, + _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) { + this.$this = t0; + this.f = t1; + this.R = t2; + }, + _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) { + this.$this = t0; + this.f = t1; + }, + _RootZone_bindUnaryCallbackGuarded_closure: function _RootZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) { + this.$this = t0; + this.f = t1; + this.T = t2; + }, + LinkedHashMap_LinkedHashMap$_literal: function(keyValuePairs, $K, $V) { + return H.assertSubtype(H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap([$K, $V])), "$isLinkedHashMap", [$K, $V], "$asLinkedHashMap"); + }, + LinkedHashMap_LinkedHashMap$_empty: function($K, $V) { + return new H.JsLinkedHashMap([$K, $V]); + }, + LinkedHashMap__makeEmpty: function() { + return new H.JsLinkedHashMap([null, null]); + }, + IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDelimiter) { + var parts, t1; + if (P._isToStringVisiting(iterable)) { + if (leftDelimiter === "(" && rightDelimiter === ")") + return "(...)"; + return leftDelimiter + "..." + rightDelimiter; + } + parts = H.setRuntimeTypeInfo([], [P.String]); + C.JSArray_methods.add$1($._toStringVisiting, iterable); + try { + P._iterablePartsToStrings(iterable, parts); + } finally { + if (0 >= $._toStringVisiting.length) + return H.ioore($._toStringVisiting, -1); + $._toStringVisiting.pop(); + } + t1 = P.StringBuffer__writeAll(leftDelimiter, H.listSuperNativeTypeCheck(parts, "$isIterable"), ", ") + rightDelimiter; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDelimiter) { + var buffer, t1; + if (P._isToStringVisiting(iterable)) + return leftDelimiter + "..." + rightDelimiter; + buffer = new P.StringBuffer(leftDelimiter); + C.JSArray_methods.add$1($._toStringVisiting, iterable); + try { + t1 = buffer; + t1._contents = P.StringBuffer__writeAll(t1._contents, iterable, ", "); + } finally { + if (0 >= $._toStringVisiting.length) + return H.ioore($._toStringVisiting, -1); + $._toStringVisiting.pop(); + } + buffer._contents += rightDelimiter; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _isToStringVisiting: function(o) { + var t1, i; + for (t1 = $._toStringVisiting.length, i = 0; i < t1; ++i) + if (o === $._toStringVisiting[i]) + return true; + return false; + }, + _iterablePartsToStrings: function(iterable, parts) { + var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, + it = iterable.get$iterator(iterable), + $length = 0, count = 0; + while (true) { + if (!($length < 80 || count < 3)) + break; + if (!it.moveNext$0()) + return; + next = H.S(it.get$current()); + C.JSArray_methods.add$1(parts, next); + $length += next.length + 2; + ++count; + } + if (!it.moveNext$0()) { + if (count <= 5) + return; + if (0 >= parts.length) + return H.ioore(parts, -1); + ultimateString = parts.pop(); + if (0 >= parts.length) + return H.ioore(parts, -1); + penultimateString = parts.pop(); + } else { + penultimate = it.get$current(); + ++count; + if (!it.moveNext$0()) { + if (count <= 4) { + C.JSArray_methods.add$1(parts, H.S(penultimate)); + return; + } + ultimateString = H.S(penultimate); + if (0 >= parts.length) + return H.ioore(parts, -1); + penultimateString = parts.pop(); + $length += ultimateString.length + 2; + } else { + ultimate = it.get$current(); + ++count; + for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { + ultimate0 = it.get$current(); + ++count; + if (count > 100) { + while (true) { + if (!($length > 75 && count > 3)) + break; + if (0 >= parts.length) + return H.ioore(parts, -1); + $length -= parts.pop().length + 2; + --count; + } + C.JSArray_methods.add$1(parts, "..."); + return; + } + } + penultimateString = H.S(penultimate); + ultimateString = H.S(ultimate); + $length += ultimateString.length + penultimateString.length + 4; + } + } + if (count > parts.length + 2) { + $length += 5; + elision = "..."; + } else + elision = null; + while (true) { + if (!($length > 80 && parts.length > 3)) + break; + if (0 >= parts.length) + return H.ioore(parts, -1); + $length -= parts.pop().length + 2; + if (elision == null) { + $length += 5; + elision = "..."; + } + } + if (elision != null) + C.JSArray_methods.add$1(parts, elision); + C.JSArray_methods.add$1(parts, penultimateString); + C.JSArray_methods.add$1(parts, ultimateString); + }, + MapBase_mapToString: function(m) { + var result, t1 = {}; + if (P._isToStringVisiting(m)) + return "{...}"; + result = new P.StringBuffer(""); + try { + C.JSArray_methods.add$1($._toStringVisiting, m); + result._contents += "{"; + t1.first = true; + m.forEach$1(0, new P.MapBase_mapToString_closure(t1, result)); + result._contents += "}"; + } finally { + if (0 >= $._toStringVisiting.length) + return H.ioore($._toStringVisiting, -1); + $._toStringVisiting.pop(); + } + t1 = result._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + ListMixin: function ListMixin() { + }, + MapBase: function MapBase() { + }, + MapBase_mapToString_closure: function MapBase_mapToString_closure(t0, t1) { + this._box_0 = t0; + this.result = t1; + }, + MapMixin: function MapMixin() { + }, + _UnmodifiableMapMixin: function _UnmodifiableMapMixin() { + }, + MapView: function MapView() { + }, + UnmodifiableMapView: function UnmodifiableMapView() { + }, + _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() { + }, + _parseJson: function(source, reviver) { + var parsed, e, exception, t1; + if (typeof source !== "string") + throw H.wrapException(H.argumentErrorValue(source)); + parsed = null; + try { + parsed = JSON.parse(source); + } catch (exception) { + e = H.unwrapException(exception); + t1 = P.FormatException$(String(e), null, null); + throw H.wrapException(t1); + } + t1 = P._convertJsonToDartLazy(parsed); + return t1; + }, + _convertJsonToDartLazy: function(object) { + var i; + if (object == null) + return; + if (typeof object != "object") + return object; + if (Object.getPrototypeOf(object) !== Array.prototype) + return new P._JsonMap(object, Object.create(null)); + for (i = 0; i < object.length; ++i) + object[i] = P._convertJsonToDartLazy(object[i]); + return object; + }, + JsonUnsupportedObjectError$: function(unsupportedObject, cause, partialResult) { + return new P.JsonUnsupportedObjectError(unsupportedObject, cause); + }, + _defaultToEncodable: function(object) { + return object.toJson$0(); + }, + _JsonStringStringifier_stringify: function(object, toEncodable, indent) { + var t1, + output = new P.StringBuffer(""), + stringifier = new P._JsonStringStringifier(output, [], P.convert___defaultToEncodable$closure()); + stringifier.writeObject$1(object); + t1 = output._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _JsonMap: function _JsonMap(t0, t1) { + this._original = t0; + this._processed = t1; + this._data = null; + }, + _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) { + this._parent = t0; + }, + Codec: function Codec() { + }, + Converter: function Converter() { + }, + JsonUnsupportedObjectError: function JsonUnsupportedObjectError(t0, t1) { + this.unsupportedObject = t0; + this.cause = t1; + }, + JsonCyclicError: function JsonCyclicError(t0, t1) { + this.unsupportedObject = t0; + this.cause = t1; + }, + JsonCodec: function JsonCodec() { + }, + JsonEncoder: function JsonEncoder(t0) { + this._toEncodable = t0; + }, + JsonDecoder: function JsonDecoder(t0) { + this._reviver = t0; + }, + _JsonStringifier: function _JsonStringifier() { + }, + _JsonStringifier_writeMap_closure: function _JsonStringifier_writeMap_closure(t0, t1) { + this._box_0 = t0; + this.keyValueList = t1; + }, + _JsonStringStringifier: function _JsonStringStringifier(t0, t1, t2) { + this._sink = t0; + this._seen = t1; + this._toEncodable = t2; + }, + _symbolMapToStringMap: function(map) { + var result = new H.JsLinkedHashMap([P.String, null]); + map.forEach$1(0, new P._symbolMapToStringMap_closure(result)); + return result; + }, + Function_apply: function($function, positionalArguments, namedArguments) { + return H.Primitives_applyFunction($function, positionalArguments, namedArguments == null ? null : P._symbolMapToStringMap(namedArguments)); + }, + Error__objectToString: function(object) { + if (object instanceof H.Closure) + return object.toString$0(0); + return "Instance of '" + H.S(H.Primitives_objectTypeName(object)) + "'"; + }, + List_List$from: function(elements, growable, $E) { + var t1, + list = H.setRuntimeTypeInfo([], [$E]); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + C.JSArray_methods.add$1(list, H.assertSubtypeOfRuntimeType(t1.get$current(), $E)); + return list; + }, + String_String$fromCharCodes: function(charCodes) { + var t1 = H.Primitives_stringFromNativeUint8List(charCodes, 0, P.RangeError_checkValidRange(0, null, charCodes.length)); + return t1; + }, + StringBuffer__writeAll: function(string, objects, separator) { + var iterator = J.get$iterator$ax(objects); + if (!iterator.moveNext$0()) + return string; + if (separator.length === 0) { + do + string += H.S(iterator.get$current()); + while (iterator.moveNext$0()); + } else { + string += H.S(iterator.get$current()); + for (; iterator.moveNext$0();) + string = string + separator + H.S(iterator.get$current()); + } + return string; + }, + NoSuchMethodError$: function(receiver, memberName, positionalArguments, namedArguments) { + return new P.NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments); + }, + StackTrace_current: function() { + var stackTrace, exception; + if (H.boolConversionCheck($.$get$_hasErrorStackProperty())) + return H.getTraceFromException(new Error()); + try { + throw H.wrapException(""); + } catch (exception) { + H.unwrapException(exception); + stackTrace = H.getTraceFromException(exception); + return stackTrace; + } + }, + DateTime__fourDigits: function(n) { + var absN = Math.abs(n), + sign = n < 0 ? "-" : ""; + if (absN >= 1000) + return "" + n; + if (absN >= 100) + return sign + "0" + absN; + if (absN >= 10) + return sign + "00" + absN; + return sign + "000" + absN; + }, + DateTime__threeDigits: function(n) { + if (n >= 100) + return "" + n; + if (n >= 10) + return "0" + n; + return "00" + n; + }, + DateTime__twoDigits: function(n) { + if (n >= 10) + return "" + n; + return "0" + n; + }, + Error_safeToString: function(object) { + if (typeof object === "number" || typeof object === "boolean" || null == object) + return J.toString$0$(object); + if (typeof object === "string") + return JSON.stringify(object); + return P.Error__objectToString(object); + }, + ArgumentError$: function(message) { + return new P.ArgumentError(false, null, null, message); + }, + ArgumentError$value: function(value, $name, message) { + return new P.ArgumentError(true, value, $name, message); + }, + ArgumentError$notNull: function($name) { + return new P.ArgumentError(false, null, $name, "Must not be null"); + }, + RangeError$value: function(value, $name) { + return new P.RangeError(null, null, true, value, $name, "Value not in range"); + }, + RangeError$range: function(invalidValue, minValue, maxValue, $name, message) { + return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); + }, + RangeError_checkValidRange: function(start, end, $length) { + if (start > $length) + throw H.wrapException(P.RangeError$range(start, 0, $length, "start", null)); + if (end != null) { + if (start > end || end > $length) + throw H.wrapException(P.RangeError$range(end, start, $length, "end", null)); + return end; + } + return $length; + }, + RangeError_checkNotNegative: function(value, $name) { + if (typeof value !== "number") + return value.$lt(); + if (value < 0) + throw H.wrapException(P.RangeError$range(value, 0, null, $name, null)); + }, + IndexError$: function(invalidValue, indexable, $name, message, $length) { + var t1 = H.intTypeCheck($length == null ? J.get$length$asx(indexable) : $length); + return new P.IndexError(t1, true, invalidValue, $name, "Index out of range"); + }, + UnsupportedError$: function(message) { + return new P.UnsupportedError(message); + }, + UnimplementedError$: function(message) { + return new P.UnimplementedError(message); + }, + StateError$: function(message) { + return new P.StateError(message); + }, + ConcurrentModificationError$: function(modifiedObject) { + return new P.ConcurrentModificationError(modifiedObject); + }, + Exception_Exception: function(message) { + return new P._Exception(message); + }, + FormatException$: function(message, source, offset) { + return new P.FormatException(message, source, offset); + }, + _symbolMapToStringMap_closure: function _symbolMapToStringMap_closure(t0) { + this.result = t0; + }, + NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { + this._box_0 = t0; + this.sb = t1; + }, + bool: function bool() { + }, + DateTime: function DateTime(t0, t1) { + this._value = t0; + this.isUtc = t1; + }, + double: function double() { + }, + Duration: function Duration(t0) { + this._duration = t0; + }, + Duration_toString_sixDigits: function Duration_toString_sixDigits() { + }, + Duration_toString_twoDigits: function Duration_toString_twoDigits() { + }, + Error: function Error() { + }, + AssertionError: function AssertionError() { + }, + NullThrownError: function NullThrownError() { + }, + ArgumentError: function ArgumentError(t0, t1, t2, t3) { + var _ = this; + _._hasValue = t0; + _.invalidValue = t1; + _.name = t2; + _.message = t3; + }, + RangeError: function RangeError(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.start = t0; + _.end = t1; + _._hasValue = t2; + _.invalidValue = t3; + _.name = t4; + _.message = t5; + }, + IndexError: function IndexError(t0, t1, t2, t3, t4) { + var _ = this; + _.length = t0; + _._hasValue = t1; + _.invalidValue = t2; + _.name = t3; + _.message = t4; + }, + NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) { + var _ = this; + _._core$_receiver = t0; + _._core$_memberName = t1; + _._core$_arguments = t2; + _._namedArguments = t3; + }, + UnsupportedError: function UnsupportedError(t0) { + this.message = t0; + }, + UnimplementedError: function UnimplementedError(t0) { + this.message = t0; + }, + StateError: function StateError(t0) { + this.message = t0; + }, + ConcurrentModificationError: function ConcurrentModificationError(t0) { + this.modifiedObject = t0; + }, + OutOfMemoryError: function OutOfMemoryError() { + }, + StackOverflowError: function StackOverflowError() { + }, + CyclicInitializationError: function CyclicInitializationError(t0) { + this.variableName = t0; + }, + _Exception: function _Exception(t0) { + this.message = t0; + }, + FormatException: function FormatException(t0, t1, t2) { + this.message = t0; + this.source = t1; + this.offset = t2; + }, + int: function int() { + }, + Iterable: function Iterable() { + }, + List: function List() { + }, + Null: function Null() { + }, + num: function num() { + }, + Object: function Object() { + }, + StackTrace: function StackTrace() { + }, + String: function String() { + }, + StringBuffer: function StringBuffer(t0) { + this._contents = t0; + }, + Symbol: function Symbol() { + }, + convertDartToNative_Dictionary: function(dict) { + var object = {}; + dict.forEach$1(0, new P.convertDartToNative_Dictionary_closure(object)); + return object; + }, + promiseToFuture: function(promise, $T) { + var t1 = new P._Future($.Zone__current, [$T]), + completer = new P._AsyncCompleter(t1, [$T]); + promise.then(H.convertDartClosureToJS(new P.promiseToFuture_closure(completer, $T), 1), H.convertDartClosureToJS(new P.promiseToFuture_closure0(completer), 1)); + return t1; + }, + _AcceptStructuredClone: function _AcceptStructuredClone() { + }, + _AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + convertDartToNative_Dictionary_closure: function convertDartToNative_Dictionary_closure(t0) { + this.object = t0; + }, + _AcceptStructuredCloneDart2Js: function _AcceptStructuredCloneDart2Js(t0, t1) { + this.values = t0; + this.copies = t1; + this.mustCopy = false; + }, + promiseToFuture_closure: function promiseToFuture_closure(t0, t1) { + this.completer = t0; + this.T = t1; + }, + promiseToFuture_closure0: function promiseToFuture_closure0(t0) { + this.completer = t0; + }, + _JSRandom: function _JSRandom() { + }, + SvgElement: function SvgElement() { + } + }, + W = { + EventSource__factoryEventSource: function(url, eventSourceInitDict) { + var t1 = new EventSource(url, P.convertDartToNative_Dictionary(eventSourceInitDict)); + return t1; + }, + HttpRequest_request: function(url, method, sendData, withCredentials) { + var t3, + t1 = W.HttpRequest, + t2 = new P._Future($.Zone__current, [t1]), + completer = new P._AsyncCompleter(t2, [t1]), + xhr = new XMLHttpRequest(); + C.HttpRequest_methods.open$3$async(xhr, method, url, true); + xhr.withCredentials = true; + t1 = W.ProgressEvent; + t3 = {func: 1, ret: -1, args: [t1]}; + W._EventStreamSubscription$(xhr, "load", H.functionTypeCheck(new W.HttpRequest_request_closure(xhr, completer), t3), false, t1); + W._EventStreamSubscription$(xhr, "error", H.functionTypeCheck(completer.get$completeError(), t3), false, t1); + xhr.send(sendData); + return t2; + }, + _EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) { + var t1 = W._wrapZone(new W._EventStreamSubscription_closure(onData), W.Event); + t1 = new W._EventStreamSubscription(_target, _eventType, t1, false, [$T]); + t1._tryResume$0(); + return t1; + }, + _wrapZone: function(callback, $T) { + var t1 = $.Zone__current; + if (t1 === C.C__RootZone) + return callback; + return t1.bindUnaryCallbackGuarded$1$1(callback, $T); + }, + HtmlElement: function HtmlElement() { + }, + AnchorElement: function AnchorElement() { + }, + AreaElement: function AreaElement() { + }, + DomException: function DomException() { + }, + Element: function Element() { + }, + Event: function Event() { + }, + EventSource: function EventSource() { + }, + EventTarget: function EventTarget() { + }, + FormElement: function FormElement() { + }, + HttpRequest: function HttpRequest() { + }, + HttpRequest_request_closure: function HttpRequest_request_closure(t0, t1) { + this.xhr = t0; + this.completer = t1; + }, + HttpRequestEventTarget: function HttpRequestEventTarget() { + }, + MessageEvent: function MessageEvent() { + }, + MouseEvent: function MouseEvent() { + }, + Node: function Node() { + }, + ProgressEvent: function ProgressEvent() { + }, + SelectElement: function SelectElement() { + }, + UIEvent: function UIEvent() { + }, + _EventStream: function _EventStream(t0, t1, t2, t3) { + var _ = this; + _._target = t0; + _._eventType = t1; + _._useCapture = t2; + _.$ti = t3; + }, + _ElementEventStreamImpl: function _ElementEventStreamImpl(t0, t1, t2, t3) { + var _ = this; + _._target = t0; + _._eventType = t1; + _._useCapture = t2; + _.$ti = t3; + }, + _EventStreamSubscription: function _EventStreamSubscription(t0, t1, t2, t3, t4) { + var _ = this; + _._pauseCount = 0; + _._target = t0; + _._eventType = t1; + _._html$_onData = t2; + _._useCapture = t3; + _.$ti = t4; + }, + _EventStreamSubscription_closure: function _EventStreamSubscription_closure(t0) { + this.onData = t0; + } + }, + N = {HexCodec: function HexCodec() { + }, + Logger_Logger: function($name) { + return $.Logger__loggers.putIfAbsent$2($name, new N.Logger_Logger_closure($name)); + }, + Logger: function Logger(t0, t1, t2) { + this.name = t0; + this.parent = t1; + this._children = t2; + }, + Logger_Logger_closure: function Logger_Logger_closure(t0) { + this.name = t0; + }, + Level: function Level(t0, t1) { + this.name = t0; + this.value = t1; + }, + LogRecord: function LogRecord(t0, t1, t2) { + this.level = t0; + this.message = t1; + this.loggerName = t2; + } + }, + R = { + _convert: function(bytes, start, end) { + var t1, t2, i, bufferIndex, byteOr, byte, bufferIndex0, t3, + buffer = new Uint8Array((end - start) * 2); + for (t1 = buffer.length, t2 = bytes.length, i = start, bufferIndex = 0, byteOr = 0; i < end; ++i) { + if (i >= t2) + return H.ioore(bytes, i); + byte = bytes[i]; + if (typeof byte !== "number") + return H.iae(byte); + byteOr = (byteOr | byte) >>> 0; + bufferIndex0 = bufferIndex + 1; + t3 = (byte & 240) >>> 4; + t3 = t3 < 10 ? t3 + 48 : t3 + 97 - 10; + if (bufferIndex >= t1) + return H.ioore(buffer, bufferIndex); + buffer[bufferIndex] = t3; + bufferIndex = bufferIndex0 + 1; + t3 = byte & 15; + t3 = t3 < 10 ? t3 + 48 : t3 + 97 - 10; + if (bufferIndex0 >= t1) + return H.ioore(buffer, bufferIndex0); + buffer[bufferIndex0] = t3; + } + if (byteOr >= 0 && byteOr <= 255) + return P.String_String$fromCharCodes(buffer); + for (i = start; i < end; ++i) { + if (i >= t2) + return H.ioore(bytes, i); + byte = bytes[i]; + if (typeof byte !== "number") + return byte.$ge(); + if (byte >= 0 && byte <= 255) + continue; + throw H.wrapException(P.FormatException$("Invalid byte " + (byte < 0 ? "-" : "") + "0x" + C.JSInt_methods.toRadixString$1(Math.abs(byte), 16) + ".", bytes, i)); + } + throw H.wrapException("unreachable"); + }, + HexEncoder: function HexEncoder() { + }, + StreamChannelMixin: function StreamChannelMixin() { + } + }, + M = { + SseClient$: function(serverUrl) { + var t1 = P.String; + t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), N.Logger_Logger("SseClient"), P.StreamController_StreamController(null)); + t1.SseClient$1(serverUrl); + return t1; + }, + SseClient: function SseClient(t0, t1, t2, t3) { + var _ = this; + _._incomingController = t0; + _._outgoingController = t1; + _._logger = t2; + _._errorTimer = _._serverUrl = _._eventSource = null; + _._messages = t3; + }, + SseClient_closure: function SseClient_closure(t0) { + this.$this = t0; + }, + SseClient_closure0: function SseClient_closure0(t0) { + this.$this = t0; + }, + SseClient__closure: function SseClient__closure(t0, t1) { + this.$this = t0; + this.error = t1; + } + }, + F = { + Uuid$: function() { + var options, t2, t1 = {}; + t1.options = options; + t1.options = null; + t2 = new F.Uuid(); + t2.Uuid$1$options(t1); + return t2; + }, + Uuid: function Uuid() { + var _ = this; + _._clockSeq = _._nodeId = _._seedBytes = null; + _._lastNSecs = _._lastMSecs = 0; + _._hexToByte = _._byteToHex = null; + } + }, + E = { + main: function() { + var channel = M.SseClient$("/test"), + t1 = J.get$onClick$x(document.querySelector("button")), + t2 = H.getTypeArgumentByIndex(t1, 0); + W._EventStreamSubscription$(t1._target, t1._eventType, H.functionTypeCheck(new E.main_closure(channel), {func: 1, ret: -1, args: [t2]}), false, t2); + t2 = channel._incomingController; + new P._ControllerStream(t2, [H.getTypeArgumentByIndex(t2, 0)]).listen$1(new E.main_closure0(channel)); + }, + main_closure: function main_closure(t0) { + this.channel = t0; + }, + main_closure0: function main_closure0(t0) { + this.channel = t0; + } + }, + U = { + UuidUtil_mathRNG: function() { + var b, rand, i, + t1 = new Array(16); + t1.fixed$length = Array; + b = H.setRuntimeTypeInfo(t1, [P.int]); + for (rand = null, i = 0; i < 16; ++i) { + t1 = i & 3; + if (t1 === 0) + rand = C.JSInt_methods.toInt$0(C.JSNumber_methods.floor$0(C.C__JSRandom.nextDouble$0() * 4294967296)); + if (typeof rand !== "number") + return rand.$shr(); + C.JSArray_methods.$indexSet(b, i, C.JSInt_methods._shrOtherPositive$1(rand, t1 << 3) & 255); + } + return b; + } + }; + var holders = [C, H, J, P, W, N, R, M, F, E, U]; + hunkHelpers.setFunctionNamesIfNecessary(holders); + var $ = {}; + H.JS_CONST.prototype = {}; + J.Interceptor.prototype = { + $eq: function(receiver, other) { + return receiver === other; + }, + get$hashCode: function(receiver) { + return H.Primitives_objectHashCode(receiver); + }, + toString$0: function(receiver) { + return "Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'"; + }, + noSuchMethod$1: function(receiver, invocation) { + H.interceptedTypeCheck(invocation, "$isInvocation"); + throw H.wrapException(P.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); + } + }; + J.JSBool.prototype = { + toString$0: function(receiver) { + return String(receiver); + }, + $and: function(receiver, other) { + return H.checkBool(H.boolTypeCheck(other)) && receiver; + }, + $or: function(receiver, other) { + return H.checkBool(H.boolTypeCheck(other)) || receiver; + }, + get$hashCode: function(receiver) { + return receiver ? 519018 : 218159; + }, + $isbool: 1 + }; + J.JSNull.prototype = { + $eq: function(receiver, other) { + return null == other; + }, + toString$0: function(receiver) { + return "null"; + }, + get$hashCode: function(receiver) { + return 0; + }, + noSuchMethod$1: function(receiver, invocation) { + return this.super$Interceptor$noSuchMethod(receiver, H.interceptedTypeCheck(invocation, "$isInvocation")); + }, + $isNull: 1 + }; + J.JavaScriptObject.prototype = { + get$hashCode: function(receiver) { + return 0; + }, + toString$0: function(receiver) { + return String(receiver); + } + }; + J.PlainJavaScriptObject.prototype = {}; + J.UnknownJavaScriptObject.prototype = {}; + J.JavaScriptFunction.prototype = { + toString$0: function(receiver) { + var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; + if (dartClosure == null) + return this.super$JavaScriptObject$toString(receiver); + return "JavaScript function for " + H.S(J.toString$0$(dartClosure)); + }, + $signature: function() { + return {func: 1, opt: [,,,,,,,,,,,,,,,,]}; + }, + $isFunction: 1 + }; + J.JSArray.prototype = { + add$1: function(receiver, value) { + H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0)); + if (!!receiver.fixed$length) + H.throwExpression(P.UnsupportedError$("add")); + receiver.push(value); + }, + addAll$1: function(receiver, collection) { + var t1, _i; + H.assertSubtype(collection, "$isIterable", [H.getTypeArgumentByIndex(receiver, 0)], "$asIterable"); + if (!!receiver.fixed$length) + H.throwExpression(P.UnsupportedError$("addAll")); + for (t1 = collection.length, _i = 0; _i < collection.length; collection.length === t1 || (0, H.throwConcurrentModificationError)(collection), ++_i) + receiver.push(collection[_i]); + }, + setRange$3: function(receiver, start, end, iterable) { + var $length, i, + t1 = H.getTypeArgumentByIndex(receiver, 0); + H.assertSubtype(iterable, "$isIterable", [t1], "$asIterable"); + if (!!receiver.immutable$list) + H.throwExpression(P.UnsupportedError$("setRange")); + P.RangeError_checkValidRange(start, end, receiver.length); + $length = end - start; + if ($length === 0) + return; + P.RangeError_checkNotNegative(0, "skipCount"); + H.assertSubtype(iterable, "$isList", [t1], "$asList"); + t1 = J.getInterceptor$asx(iterable); + if ($length > t1.get$length(iterable)) + throw H.wrapException(H.IterableElementError_tooFew()); + if (0 < start) + for (i = $length - 1; i >= 0; --i) + receiver[start + i] = t1.$index(iterable, i); + else + for (i = 0; i < $length; ++i) + receiver[start + i] = t1.$index(iterable, i); + }, + get$isNotEmpty: function(receiver) { + return receiver.length !== 0; + }, + toString$0: function(receiver) { + return P.IterableBase_iterableToFullString(receiver, "[", "]"); + }, + get$iterator: function(receiver) { + return new J.ArrayIterator(receiver, receiver.length, [H.getTypeArgumentByIndex(receiver, 0)]); + }, + get$hashCode: function(receiver) { + return H.Primitives_objectHashCode(receiver); + }, + get$length: function(receiver) { + return receiver.length; + }, + set$length: function(receiver, newLength) { + if (!!receiver.fixed$length) + H.throwExpression(P.UnsupportedError$("set length")); + if (newLength < 0) + throw H.wrapException(P.RangeError$range(newLength, 0, null, "newLength", null)); + receiver.length = newLength; + }, + $index: function(receiver, index) { + if (typeof index !== "number" || Math.floor(index) !== index) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + if (index >= receiver.length || index < 0) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $indexSet: function(receiver, index, value) { + H.intTypeCheck(index); + H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0)); + if (!!receiver.immutable$list) + H.throwExpression(P.UnsupportedError$("indexed set")); + if (typeof index !== "number" || Math.floor(index) !== index) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + if (index >= receiver.length || index < 0) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + receiver[index] = value; + }, + $add: function(receiver, other) { + var totalLength, + t1 = [H.getTypeArgumentByIndex(receiver, 0)]; + H.assertSubtype(other, "$isList", t1, "$asList"); + totalLength = C.JSInt_methods.$add(receiver.length, other.get$length(other)); + t1 = H.setRuntimeTypeInfo([], t1); + this.set$length(t1, totalLength); + this.setRange$3(t1, 0, receiver.length, receiver); + this.setRange$3(t1, receiver.length, totalLength, other); + return t1; + }, + $isIterable: 1, + $isList: 1 + }; + J.JSUnmodifiableArray.prototype = {}; + J.ArrayIterator.prototype = { + get$current: function() { + return this._current; + }, + moveNext$0: function() { + var t2, _this = this, + t1 = _this._iterable, + $length = t1.length; + if (_this._length !== $length) + throw H.wrapException(H.throwConcurrentModificationError(t1)); + t2 = _this._index; + if (t2 >= $length) { + _this.set$_current(null); + return false; + } + _this.set$_current(t1[t2]); + ++_this._index; + return true; + }, + set$_current: function(_current) { + this._current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + } + }; + J.JSNumber.prototype = { + toInt$0: function(receiver) { + var t1; + if (receiver >= -2147483648 && receiver <= 2147483647) + return receiver | 0; + if (isFinite(receiver)) { + t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver); + return t1 + 0; + } + throw H.wrapException(P.UnsupportedError$("" + receiver + ".toInt()")); + }, + floor$0: function(receiver) { + var truncated, d; + if (receiver >= 0) { + if (receiver <= 2147483647) + return receiver | 0; + } else if (receiver >= -2147483648) { + truncated = receiver | 0; + return receiver === truncated ? truncated : truncated - 1; + } + d = Math.floor(receiver); + if (isFinite(d)) + return d; + throw H.wrapException(P.UnsupportedError$("" + receiver + ".floor()")); + }, + toRadixString$1: function(receiver, radix) { + var result, match, t1, exponent; + if (radix < 2 || radix > 36) + throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", null)); + result = receiver.toString(radix); + if (C.JSString_methods.codeUnitAt$1(result, result.length - 1) !== 41) + return result; + match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); + if (match == null) + H.throwExpression(P.UnsupportedError$("Unexpected toString result: " + result)); + t1 = match.length; + if (1 >= t1) + return H.ioore(match, 1); + result = match[1]; + if (3 >= t1) + return H.ioore(match, 3); + exponent = +match[3]; + t1 = match[2]; + if (t1 != null) { + result += t1; + exponent -= t1.length; + } + return result + C.JSString_methods.$mul("0", exponent); + }, + toString$0: function(receiver) { + if (receiver === 0 && 1 / receiver < 0) + return "-0.0"; + else + return "" + receiver; + }, + get$hashCode: function(receiver) { + var absolute, floorLog2, factor, scaled, + intValue = receiver | 0; + if (receiver === intValue) + return 536870911 & intValue; + absolute = Math.abs(receiver); + floorLog2 = Math.log(absolute) / 0.6931471805599453 | 0; + factor = Math.pow(2, floorLog2); + scaled = absolute < 1 ? absolute / factor : factor / absolute; + return 536870911 & ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259; + }, + $add: function(receiver, other) { + H.numTypeCheck(other); + return receiver + other; + }, + $sub: function(receiver, other) { + return receiver - other; + }, + $div: function(receiver, other) { + return receiver / other; + }, + $mod: function(receiver, other) { + var result = receiver % other; + if (result === 0) + return 0; + if (result > 0) + return result; + if (other < 0) + return result - other; + else + return result + other; + }, + _tdivFast$1: function(receiver, other) { + return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); + }, + _tdivSlow$1: function(receiver, other) { + var quotient = receiver / other; + if (quotient >= -2147483648 && quotient <= 2147483647) + return quotient | 0; + if (quotient > 0) { + if (quotient !== 1 / 0) + return Math.floor(quotient); + } else if (quotient > -1 / 0) + return Math.ceil(quotient); + throw H.wrapException(P.UnsupportedError$("Result of truncating division is " + H.S(quotient) + ": " + H.S(receiver) + " ~/ " + other)); + }, + $shl: function(receiver, other) { + if (other < 0) + throw H.wrapException(H.argumentErrorValue(other)); + return other > 31 ? 0 : receiver << other >>> 0; + }, + $shr: function(receiver, other) { + var t1; + if (other < 0) + throw H.wrapException(H.argumentErrorValue(other)); + if (receiver > 0) + t1 = this._shrBothPositive$1(receiver, other); + else { + t1 = other > 31 ? 31 : other; + t1 = receiver >> t1 >>> 0; + } + return t1; + }, + _shrOtherPositive$1: function(receiver, other) { + var t1; + if (receiver > 0) + t1 = this._shrBothPositive$1(receiver, other); + else { + t1 = other > 31 ? 31 : other; + t1 = receiver >> t1 >>> 0; + } + return t1; + }, + _shrBothPositive$1: function(receiver, other) { + return other > 31 ? 0 : receiver >>> other; + }, + $and: function(receiver, other) { + return (receiver & other) >>> 0; + }, + $or: function(receiver, other) { + H.numTypeCheck(other); + if (typeof other !== "number") + throw H.wrapException(H.argumentErrorValue(other)); + return (receiver | other) >>> 0; + }, + $lt: function(receiver, other) { + if (typeof other !== "number") + throw H.wrapException(H.argumentErrorValue(other)); + return receiver < other; + }, + $gt: function(receiver, other) { + if (typeof other !== "number") + throw H.wrapException(H.argumentErrorValue(other)); + return receiver > other; + }, + $ge: function(receiver, other) { + if (typeof other !== "number") + throw H.wrapException(H.argumentErrorValue(other)); + return receiver >= other; + }, + $isdouble: 1, + $isnum: 1 + }; + J.JSInt.prototype = {$isint: 1}; + J.JSDouble.prototype = {}; + J.JSString.prototype = { + codeUnitAt$1: function(receiver, index) { + if (index < 0) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + if (index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver.charCodeAt(index); + }, + _codeUnitAt$1: function(receiver, index) { + if (index >= receiver.length) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + return receiver.charCodeAt(index); + }, + $add: function(receiver, other) { + H.stringTypeCheck(other); + if (typeof other !== "string") + throw H.wrapException(P.ArgumentError$value(other, null, null)); + return receiver + other; + }, + startsWith$1: function(receiver, pattern) { + var otherLength = pattern.length; + if (otherLength > receiver.length) + return false; + return pattern === receiver.substring(0, otherLength); + }, + substring$2: function(receiver, startIndex, endIndex) { + if (endIndex == null) + endIndex = receiver.length; + if (startIndex < 0) + throw H.wrapException(P.RangeError$value(startIndex, null)); + if (startIndex > endIndex) + throw H.wrapException(P.RangeError$value(startIndex, null)); + if (endIndex > receiver.length) + throw H.wrapException(P.RangeError$value(endIndex, null)); + return receiver.substring(startIndex, endIndex); + }, + substring$1: function($receiver, startIndex) { + return this.substring$2($receiver, startIndex, null); + }, + $mul: function(receiver, times) { + var s, result; + if (0 >= times) + return ""; + if (times === 1 || receiver.length === 0) + return receiver; + if (times !== times >>> 0) + throw H.wrapException(C.C_OutOfMemoryError); + for (s = receiver, result = ""; true;) { + if ((times & 1) === 1) + result = s + result; + times = times >>> 1; + if (times === 0) + break; + s += s; + } + return result; + }, + lastIndexOf$1: function(receiver, pattern) { + var start = receiver.length, + t1 = pattern.length; + if (start + t1 > start) + start -= t1; + return receiver.lastIndexOf(pattern, start); + }, + toString$0: function(receiver) { + return receiver; + }, + get$hashCode: function(receiver) { + var t1, hash, i; + for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { + hash = 536870911 & hash + receiver.charCodeAt(i); + hash = 536870911 & hash + ((524287 & hash) << 10); + hash ^= hash >> 6; + } + hash = 536870911 & hash + ((67108863 & hash) << 3); + hash ^= hash >> 11; + return 536870911 & hash + ((16383 & hash) << 15); + }, + get$length: function(receiver) { + return receiver.length; + }, + $index: function(receiver, index) { + if (index >= receiver.length || false) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isPattern: 1, + $isString: 1 + }; + H.EfficientLengthIterable.prototype = {}; + H.ListIterable.prototype = { + get$iterator: function(_) { + var _this = this; + return new H.ListIterator(_this, _this.get$length(_this), [H.getRuntimeTypeArgument(_this, "ListIterable", 0)]); + }, + get$isEmpty: function(_) { + return this.get$length(this) === 0; + } + }; + H.ListIterator.prototype = { + get$current: function() { + return this.__internal$_current; + }, + moveNext$0: function() { + var t3, _this = this, + t1 = _this.__internal$_iterable, + t2 = J.getInterceptor$asx(t1), + $length = t2.get$length(t1); + if (_this.__internal$_length !== $length) + throw H.wrapException(P.ConcurrentModificationError$(t1)); + t3 = _this.__internal$_index; + if (t3 >= $length) { + _this.set$__internal$_current(null); + return false; + } + _this.set$__internal$_current(t2.elementAt$1(t1, t3)); + ++_this.__internal$_index; + return true; + }, + set$__internal$_current: function(_current) { + this.__internal$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + } + }; + H.FixedLengthListMixin.prototype = {}; + H.Symbol0.prototype = { + get$hashCode: function(_) { + var hash = this._hashCode; + if (hash != null) + return hash; + hash = 536870911 & 664597 * J.get$hashCode$(this.__internal$_name); + this._hashCode = hash; + return hash; + }, + toString$0: function(_) { + return 'Symbol("' + H.S(this.__internal$_name) + '")'; + }, + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof H.Symbol0 && this.__internal$_name == other.__internal$_name; + }, + $isSymbol: 1 + }; + H.ConstantMapView.prototype = {}; + H.ConstantMap.prototype = { + get$isEmpty: function(_) { + return this.get$length(this) === 0; + }, + toString$0: function(_) { + return P.MapBase_mapToString(this); + }, + $isMap: 1 + }; + H.ConstantStringMap.prototype = { + get$length: function(_) { + return this.__js_helper$_length; + }, + containsKey$1: function(key) { + return false; + }, + $index: function(_, key) { + if (!this.containsKey$1(key)) + return; + return this._fetch$1(key); + }, + _fetch$1: function(key) { + return this._jsObject[H.stringTypeCheck(key)]; + }, + forEach$1: function(_, f) { + var keys, t2, i, key, _this = this, + t1 = H.getTypeArgumentByIndex(_this, 1); + H.functionTypeCheck(f, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(_this, 0), t1]}); + keys = _this._keys; + for (t2 = keys.length, i = 0; i < t2; ++i) { + key = keys[i]; + f.call$2(key, H.assertSubtypeOfRuntimeType(_this._fetch$1(key), t1)); + } + } + }; + H.JSInvocationMirror.prototype = { + get$memberName: function() { + var t1 = this._memberName; + return t1; + }, + get$positionalArguments: function() { + var t1, argumentCount, list, index, _this = this; + if (_this._kind === 1) + return C.List_empty; + t1 = _this._arguments; + argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount; + if (argumentCount === 0) + return C.List_empty; + list = []; + for (index = 0; index < argumentCount; ++index) { + if (index >= t1.length) + return H.ioore(t1, index); + list.push(t1[index]); + } + list.fixed$length = Array; + list.immutable$list = Array; + return list; + }, + get$namedArguments: function() { + var t1, namedArgumentCount, t2, namedArgumentsStartIndex, t3, map, i, t4, t5, _this = this; + if (_this._kind !== 0) + return C.Map_empty; + t1 = _this._namedArgumentNames; + namedArgumentCount = t1.length; + t2 = _this._arguments; + namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount; + if (namedArgumentCount === 0) + return C.Map_empty; + t3 = P.Symbol; + map = new H.JsLinkedHashMap([t3, null]); + for (i = 0; i < namedArgumentCount; ++i) { + if (i >= t1.length) + return H.ioore(t1, i); + t4 = t1[i]; + t5 = namedArgumentsStartIndex + i; + if (t5 < 0 || t5 >= t2.length) + return H.ioore(t2, t5); + map.$indexSet(0, new H.Symbol0(t4), t2[t5]); + } + return new H.ConstantMapView(map, [t3, null]); + }, + $isInvocation: 1 + }; + H.Primitives_functionNoSuchMethod_closure.prototype = { + call$2: function($name, argument) { + var t1; + H.stringTypeCheck($name); + t1 = this._box_0; + t1.names = t1.names + "$" + H.S($name); + C.JSArray_methods.add$1(this.namedArgumentList, $name); + C.JSArray_methods.add$1(this.$arguments, argument); + ++t1.argumentCount; + }, + $signature: 12 + }; + H.TypeErrorDecoder.prototype = { + matchTypeError$1: function(message) { + var result, t1, _this = this, + match = new RegExp(_this._pattern).exec(message); + if (match == null) + return; + result = Object.create(null); + t1 = _this._arguments; + if (t1 !== -1) + result.arguments = match[t1 + 1]; + t1 = _this._argumentsExpr; + if (t1 !== -1) + result.argumentsExpr = match[t1 + 1]; + t1 = _this._expr; + if (t1 !== -1) + result.expr = match[t1 + 1]; + t1 = _this._method; + if (t1 !== -1) + result.method = match[t1 + 1]; + t1 = _this._receiver; + if (t1 !== -1) + result.receiver = match[t1 + 1]; + return result; + } + }; + H.NullError.prototype = { + toString$0: function(_) { + var t1 = this._method; + if (t1 == null) + return "NoSuchMethodError: " + H.S(this._message); + return "NoSuchMethodError: method not found: '" + t1 + "' on null"; + } + }; + H.JsNoSuchMethodError.prototype = { + toString$0: function(_) { + var t2, _this = this, + _s38_ = "NoSuchMethodError: method not found: '", + t1 = _this._method; + if (t1 == null) + return "NoSuchMethodError: " + H.S(_this._message); + t2 = _this._receiver; + if (t2 == null) + return _s38_ + t1 + "' (" + H.S(_this._message) + ")"; + return _s38_ + t1 + "' on '" + t2 + "' (" + H.S(_this._message) + ")"; + } + }; + H.UnknownJsTypeError.prototype = { + toString$0: function(_) { + var t1 = this._message; + return t1.length === 0 ? "Error" : "Error: " + t1; + } + }; + H.ExceptionAndStackTrace.prototype = {}; + H.unwrapException_saveStackTrace.prototype = { + call$1: function(error) { + if (!!J.getInterceptor$(error).$isError) + if (error.$thrownJsError == null) + error.$thrownJsError = this.ex; + return error; + }, + $signature: 4 + }; + H._StackTrace.prototype = { + toString$0: function(_) { + var trace, + t1 = this._trace; + if (t1 != null) + return t1; + t1 = this._exception; + trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; + return this._trace = trace == null ? "" : trace; + }, + $isStackTrace: 1 + }; + H.Closure.prototype = { + toString$0: function(_) { + var $constructor = this.constructor, + $name = $constructor == null ? null : $constructor.name; + return "Closure '" + H.unminifyOrTag($name == null ? "unknown" : $name) + "'"; + }, + $isFunction: 1, + get$$call: function() { + return this; + }, + "call*": "call$1", + $requiredArgCount: 1, + $defaultValues: null + }; + H.TearOffClosure.prototype = {}; + H.StaticClosure.prototype = { + toString$0: function(_) { + var $name = this.$static_name; + if ($name == null) + return "Closure of unknown static method"; + return "Closure '" + H.unminifyOrTag($name) + "'"; + } + }; + H.BoundClosure.prototype = { + $eq: function(_, other) { + var _this = this; + if (other == null) + return false; + if (_this === other) + return true; + if (!(other instanceof H.BoundClosure)) + return false; + return _this._self === other._self && _this.__js_helper$_target === other.__js_helper$_target && _this._receiver === other._receiver; + }, + get$hashCode: function(_) { + var receiverHashCode, + t1 = this._receiver; + if (t1 == null) + 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; + }, + toString$0: function(_) { + var receiver = this._receiver; + if (receiver == null) + receiver = this._self; + return "Closure '" + H.S(this._name) + "' of " + ("Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'"); + } + }; + H.TypeErrorImplementation.prototype = { + toString$0: function(_) { + return this.message; + } + }; + H.CastErrorImplementation.prototype = { + toString$0: function(_) { + return this.message; + } + }; + H.RuntimeError.prototype = { + toString$0: function(_) { + return "RuntimeError: " + H.S(this.message); + } + }; + H._AssertionError.prototype = { + toString$0: function(_) { + return "Assertion failed: " + P.Error_safeToString(this.message); + } + }; + H.JsLinkedHashMap.prototype = { + get$length: function(_) { + return this.__js_helper$_length; + }, + get$isEmpty: function(_) { + return this.__js_helper$_length === 0; + }, + get$keys: function() { + return new H.LinkedHashMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]); + }, + containsKey$1: function(key) { + var strings, t1; + if (typeof key === "string") { + strings = this._strings; + if (strings == null) + return false; + return this._containsTableEntry$2(strings, key); + } else { + t1 = this.internalContainsKey$1(key); + return t1; + } + }, + internalContainsKey$1: function(key) { + var rest = this._rest; + if (rest == null) + return false; + return this.internalFindBucketIndex$2(this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff), key) >= 0; + }, + $index: function(_, key) { + var strings, cell, t1, nums, _this = this; + if (typeof key === "string") { + strings = _this._strings; + if (strings == null) + return; + cell = _this._getTableCell$2(strings, key); + t1 = cell == null ? null : cell.hashMapCellValue; + return t1; + } else if (typeof key === "number" && (key & 0x3ffffff) === key) { + nums = _this._nums; + if (nums == null) + return; + cell = _this._getTableCell$2(nums, key); + t1 = cell == null ? null : cell.hashMapCellValue; + return t1; + } else + return _this.internalGet$1(key); + }, + internalGet$1: function(key) { + var bucket, index, + rest = this._rest; + if (rest == null) + return; + bucket = this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff); + index = this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return; + return bucket[index].hashMapCellValue; + }, + $indexSet: function(_, key, value) { + var strings, nums, rest, hash, bucket, index, _this = this; + H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)); + H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1)); + if (typeof key === "string") { + strings = _this._strings; + _this._addHashTableEntry$3(strings == null ? _this._strings = _this._newHashTable$0() : strings, key, value); + } else if (typeof key === "number" && (key & 0x3ffffff) === key) { + nums = _this._nums; + _this._addHashTableEntry$3(nums == null ? _this._nums = _this._newHashTable$0() : nums, key, value); + } else { + rest = _this._rest; + if (rest == null) + rest = _this._rest = _this._newHashTable$0(); + hash = J.get$hashCode$(key) & 0x3ffffff; + bucket = _this._getTableBucket$2(rest, hash); + if (bucket == null) + _this._setTableEntry$3(rest, hash, [_this._newLinkedCell$2(key, value)]); + else { + index = _this.internalFindBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index].hashMapCellValue = value; + else + bucket.push(_this._newLinkedCell$2(key, value)); + } + } + }, + putIfAbsent$2: function(key, ifAbsent) { + var value, _this = this; + H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)); + H.functionTypeCheck(ifAbsent, {func: 1, ret: H.getTypeArgumentByIndex(_this, 1)}); + if (_this.containsKey$1(key)) + return _this.$index(0, key); + value = ifAbsent.call$0(); + _this.$indexSet(0, key, value); + return value; + }, + forEach$1: function(_, action) { + var cell, modifications, _this = this; + H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(_this, 0), H.getTypeArgumentByIndex(_this, 1)]}); + cell = _this._first; + modifications = _this._modifications; + for (; cell != null;) { + action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); + if (modifications !== _this._modifications) + throw H.wrapException(P.ConcurrentModificationError$(_this)); + cell = cell._next; + } + }, + _addHashTableEntry$3: function(table, key, value) { + var cell, _this = this; + H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)); + H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1)); + cell = _this._getTableCell$2(table, key); + if (cell == null) + _this._setTableEntry$3(table, key, _this._newLinkedCell$2(key, value)); + else + cell.hashMapCellValue = value; + }, + _newLinkedCell$2: function(key, value) { + var _this = this, + cell = new H.LinkedHashMapCell(H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)), H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1))); + if (_this._first == null) + _this._first = _this._last = cell; + else + _this._last = _this._last._next = cell; + ++_this.__js_helper$_length; + _this._modifications = _this._modifications + 1 & 67108863; + return cell; + }, + internalFindBucketIndex$2: function(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i].hashMapCellKey, key)) + return i; + return -1; + }, + toString$0: function(_) { + return P.MapBase_mapToString(this); + }, + _getTableCell$2: function(table, key) { + return table[key]; + }, + _getTableBucket$2: function(table, key) { + return table[key]; + }, + _setTableEntry$3: function(table, key, value) { + table[key] = value; + }, + _deleteTableEntry$2: function(table, key) { + delete table[key]; + }, + _containsTableEntry$2: function(table, key) { + return this._getTableCell$2(table, key) != null; + }, + _newHashTable$0: function() { + var _s20_ = "", + table = Object.create(null); + this._setTableEntry$3(table, _s20_, table); + this._deleteTableEntry$2(table, _s20_); + return table; + }, + $isLinkedHashMap: 1 + }; + H.LinkedHashMapCell.prototype = {}; + H.LinkedHashMapKeyIterable.prototype = { + get$length: function(_) { + return this._map.__js_helper$_length; + }, + get$isEmpty: function(_) { + return this._map.__js_helper$_length === 0; + }, + get$iterator: function(_) { + var t1 = this._map, + t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti); + t2._cell = t1._first; + return t2; + } + }; + H.LinkedHashMapKeyIterator.prototype = { + get$current: function() { + return this.__js_helper$_current; + }, + moveNext$0: function() { + var _this = this, + t1 = _this._map; + if (_this._modifications !== t1._modifications) + throw H.wrapException(P.ConcurrentModificationError$(t1)); + else { + t1 = _this._cell; + if (t1 == null) { + _this.set$__js_helper$_current(null); + return false; + } else { + _this.set$__js_helper$_current(t1.hashMapCellKey); + _this._cell = _this._cell._next; + return true; + } + } + }, + set$__js_helper$_current: function(_current) { + this.__js_helper$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + } + }; + H.initHooks_closure.prototype = { + call$1: function(o) { + return this.getTag(o); + }, + $signature: 4 + }; + H.initHooks_closure0.prototype = { + call$2: function(o, tag) { + return this.getUnknownTag(o, tag); + }, + $signature: 13 + }; + H.initHooks_closure1.prototype = { + call$1: function(tag) { + return this.prototypeForTag(H.stringTypeCheck(tag)); + }, + $signature: 14 + }; + H.NativeTypedData.prototype = {}; + H.NativeTypedArray.prototype = { + get$length: function(receiver) { + return receiver.length; + }, + $isJavaScriptIndexingBehavior: 1, + $asJavaScriptIndexingBehavior: function() { + } + }; + H.NativeTypedArrayOfDouble.prototype = { + $index: function(receiver, index) { + H._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + $indexSet: function(receiver, index, value) { + H.intTypeCheck(index); + H.doubleTypeCheck(value); + H._checkValidIndex(index, receiver, receiver.length); + receiver[index] = value; + }, + $asFixedLengthListMixin: function() { + return [P.double]; + }, + $asListMixin: function() { + return [P.double]; + }, + $isIterable: 1, + $asIterable: function() { + return [P.double]; + }, + $isList: 1, + $asList: function() { + return [P.double]; + } + }; + H.NativeTypedArrayOfInt.prototype = { + $indexSet: function(receiver, index, value) { + H.intTypeCheck(index); + H.intTypeCheck(value); + H._checkValidIndex(index, receiver, receiver.length); + receiver[index] = value; + }, + $asFixedLengthListMixin: function() { + return [P.int]; + }, + $asListMixin: function() { + return [P.int]; + }, + $isIterable: 1, + $asIterable: function() { + return [P.int]; + }, + $isList: 1, + $asList: function() { + return [P.int]; + } + }; + H.NativeInt16List.prototype = { + $index: function(receiver, index) { + H._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + H.NativeInt32List.prototype = { + $index: function(receiver, index) { + H._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + H.NativeInt8List.prototype = { + $index: function(receiver, index) { + H._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + H.NativeUint16List.prototype = { + $index: function(receiver, index) { + H._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + H.NativeUint32List.prototype = { + $index: function(receiver, index) { + H._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + H.NativeUint8ClampedList.prototype = { + get$length: function(receiver) { + return receiver.length; + }, + $index: function(receiver, index) { + H._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + H.NativeUint8List.prototype = { + get$length: function(receiver) { + return receiver.length; + }, + $index: function(receiver, index) { + H._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + } + }; + H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; + H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; + H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + P._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { + call$1: function(_) { + var t1 = this._box_0, + f = t1.storedCallback; + t1.storedCallback = null; + f.call$0(); + }, + $signature: 7 + }; + P._AsyncRun__initializeScheduleImmediate_closure.prototype = { + call$1: function(callback) { + var t1, t2; + this._box_0.storedCallback = H.functionTypeCheck(callback, {func: 1, ret: -1}); + t1 = this.div; + t2 = this.span; + t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); + }, + $signature: 15 + }; + P._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { + call$0: function() { + this.callback.call$0(); + }, + "call*": "call$0", + $requiredArgCount: 0, + $signature: 1 + }; + P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { + call$0: function() { + this.callback.call$0(); + }, + "call*": "call$0", + $requiredArgCount: 0, + $signature: 1 + }; + P._TimerImpl.prototype = { + _TimerImpl$2: function(milliseconds, callback) { + if (self.setTimeout != null) + this._handle = self.setTimeout(H.convertDartClosureToJS(new P._TimerImpl_internalCallback(this, callback), 0), milliseconds); + else + throw H.wrapException(P.UnsupportedError$("`setTimeout()` not found.")); + }, + cancel$0: function() { + if (self.setTimeout != null) { + var t1 = this._handle; + if (t1 == null) + return; + self.clearTimeout(t1); + this._handle = null; + } else + throw H.wrapException(P.UnsupportedError$("Canceling a timer.")); + }, + $isTimer: 1 + }; + P._TimerImpl_internalCallback.prototype = { + call$0: function() { + this.$this._handle = null; + this.callback.call$0(); + }, + "call*": "call$0", + $requiredArgCount: 0, + $signature: 0 + }; + P._AsyncAwaitCompleter.prototype = { + complete$1: function(_, value) { + var t2, t3, _this = this, + t1 = H.getTypeArgumentByIndex(_this, 0); + H.futureOrCheck(value, {futureOr: 1, type: t1}); + t2 = !_this.isSync || H.checkSubtype(value, "$isFuture", _this.$ti, "$asFuture"); + t3 = _this._future; + if (t2) + t3._asyncComplete$1(value); + else + t3._completeWithValue$1(H.assertSubtypeOfRuntimeType(value, t1)); + }, + completeError$2: function(e, st) { + var t1 = this._future; + if (this.isSync) + t1._completeError$2(e, st); + else + t1._asyncCompleteError$2(e, st); + } + }; + P._awaitOnObject_closure.prototype = { + call$1: function(result) { + return this.bodyFunction.call$2(0, result); + }, + $signature: 2 + }; + P._awaitOnObject_closure0.prototype = { + call$2: function(error, stackTrace) { + this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, H.interceptedTypeCheck(stackTrace, "$isStackTrace"))); + }, + "call*": "call$2", + $requiredArgCount: 2, + $signature: 16 + }; + P._wrapJsFunctionForAsync_closure.prototype = { + call$2: function(errorCode, result) { + this.$protected(H.intTypeCheck(errorCode), result); + }, + $signature: 17 + }; + P._Completer.prototype = { + completeError$2: function(error, stackTrace) { + var t1; + if (error == null) + error = new P.NullThrownError(); + t1 = this.future; + if (t1._state !== 0) + throw H.wrapException(P.StateError$("Future already completed")); + t1._asyncCompleteError$2(error, stackTrace); + }, + completeError$1: function(error) { + return this.completeError$2(error, null); + } + }; + P._AsyncCompleter.prototype = { + complete$1: function(_, value) { + var t1; + H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(this, 0)}); + t1 = this.future; + if (t1._state !== 0) + throw H.wrapException(P.StateError$("Future already completed")); + t1._asyncComplete$1(value); + } + }; + P._FutureListener.prototype = { + matchesErrorTest$1: function(asyncError) { + if ((this.state & 15) !== 6) + return true; + return this.result._zone.runUnary$2$2(H.functionTypeCheck(this.callback, {func: 1, ret: P.bool, args: [P.Object]}), asyncError.error, P.bool, P.Object); + }, + handleError$1: function(asyncError) { + var errorCallback = this.errorCallback, + t1 = P.Object, + t2 = {futureOr: 1, type: H.getTypeArgumentByIndex(this, 1)}, + t3 = this.result._zone; + if (H.functionTypeTest(errorCallback, {func: 1, args: [P.Object, P.StackTrace]})) + return H.futureOrCheck(t3.runBinary$3$3(errorCallback, asyncError.error, asyncError.stackTrace, null, t1, P.StackTrace), t2); + else + return H.futureOrCheck(t3.runUnary$2$2(H.functionTypeCheck(errorCallback, {func: 1, args: [P.Object]}), asyncError.error, null, t1), t2); + } + }; + P._Future.prototype = { + then$1$2$onError: function(f, onError, $R) { + var currentZone, result, t2, + t1 = H.getTypeArgumentByIndex(this, 0); + H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $R}, args: [t1]}); + currentZone = $.Zone__current; + if (currentZone !== C.C__RootZone) { + H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $R}, args: [t1]}); + if (onError != null) + onError = P._registerErrorHandler(onError, currentZone); + } + result = new P._Future($.Zone__current, [$R]); + t2 = onError == null ? 1 : 3; + this._addListener$1(new P._FutureListener(result, t2, f, onError, [t1, $R])); + return result; + }, + then$1$1: function(f, $R) { + return this.then$1$2$onError(f, null, $R); + }, + _thenAwait$1$2: function(f, onError, $E) { + var result, + t1 = H.getTypeArgumentByIndex(this, 0); + H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $E}, args: [t1]}); + result = new P._Future($.Zone__current, [$E]); + this._addListener$1(new P._FutureListener(result, (onError == null ? 1 : 3) | 16, f, onError, [t1, $E])); + return result; + }, + whenComplete$1: function(action) { + var t1, result; + H.functionTypeCheck(action, {func: 1}); + t1 = $.Zone__current; + result = new P._Future(t1, this.$ti); + if (t1 !== C.C__RootZone) + action = H.functionTypeCheck(action, {func: 1, ret: null}); + t1 = H.getTypeArgumentByIndex(this, 0); + this._addListener$1(new P._FutureListener(result, 8, action, null, [t1, t1])); + return result; + }, + _addListener$1: function(listener) { + var source, _this = this, + t1 = _this._state; + if (t1 <= 1) { + listener._nextListener = H.interceptedTypeCheck(_this._resultOrListeners, "$is_FutureListener"); + _this._resultOrListeners = listener; + } else { + if (t1 === 2) { + source = H.interceptedTypeCheck(_this._resultOrListeners, "$is_Future"); + t1 = source._state; + if (t1 < 4) { + source._addListener$1(listener); + return; + } + _this._state = t1; + _this._resultOrListeners = source._resultOrListeners; + } + P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__addListener_closure(_this, listener), {func: 1, ret: -1})); + } + }, + _prependListeners$1: function(listeners) { + var t1, existingListeners, cursor, cursor0, source, _this = this, _box_0 = {}; + _box_0.listeners = listeners; + if (listeners == null) + return; + t1 = _this._state; + if (t1 <= 1) { + existingListeners = H.interceptedTypeCheck(_this._resultOrListeners, "$is_FutureListener"); + cursor = _this._resultOrListeners = listeners; + if (existingListeners != null) { + for (; cursor0 = cursor._nextListener, cursor0 != null; cursor = cursor0) + ; + cursor._nextListener = existingListeners; + } + } else { + if (t1 === 2) { + source = H.interceptedTypeCheck(_this._resultOrListeners, "$is_Future"); + t1 = source._state; + if (t1 < 4) { + source._prependListeners$1(listeners); + return; + } + _this._state = t1; + _this._resultOrListeners = source._resultOrListeners; + } + _box_0.listeners = _this._reverseListeners$1(listeners); + P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__prependListeners_closure(_box_0, _this), {func: 1, ret: -1})); + } + }, + _removeListeners$0: function() { + var current = H.interceptedTypeCheck(this._resultOrListeners, "$is_FutureListener"); + this._resultOrListeners = null; + return this._reverseListeners$1(current); + }, + _reverseListeners$1: function(listeners) { + var current, prev, next; + for (current = listeners, prev = null; current != null; prev = current, current = next) { + next = current._nextListener; + current._nextListener = prev; + } + return prev; + }, + _complete$1: function(value) { + var t2, listeners, _this = this, + t1 = H.getTypeArgumentByIndex(_this, 0); + H.futureOrCheck(value, {futureOr: 1, type: t1}); + t2 = _this.$ti; + if (H.checkSubtype(value, "$isFuture", t2, "$asFuture")) + if (H.checkSubtype(value, "$is_Future", t2, null)) + P._Future__chainCoreFuture(value, _this); + else + P._Future__chainForeignFuture(value, _this); + else { + listeners = _this._removeListeners$0(); + H.assertSubtypeOfRuntimeType(value, t1); + _this._state = 4; + _this._resultOrListeners = value; + P._Future__propagateToListeners(_this, listeners); + } + }, + _completeWithValue$1: function(value) { + var listeners, _this = this; + H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 0)); + listeners = _this._removeListeners$0(); + _this._state = 4; + _this._resultOrListeners = value; + P._Future__propagateToListeners(_this, listeners); + }, + _completeError$2: function(error, stackTrace) { + var listeners, _this = this; + H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + listeners = _this._removeListeners$0(); + _this._state = 8; + _this._resultOrListeners = new P.AsyncError(error, stackTrace); + P._Future__propagateToListeners(_this, listeners); + }, + _completeError$1: function(error) { + return this._completeError$2(error, null); + }, + _asyncComplete$1: function(value) { + var _this = this; + H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(_this, 0)}); + if (H.checkSubtype(value, "$isFuture", _this.$ti, "$asFuture")) { + _this._chainFuture$1(value); + return; + } + _this._state = 1; + P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__asyncComplete_closure(_this, value), {func: 1, ret: -1})); + }, + _chainFuture$1: function(value) { + var _this = this, + t1 = _this.$ti; + H.assertSubtype(value, "$isFuture", t1, "$asFuture"); + if (H.checkSubtype(value, "$is_Future", t1, null)) { + if (value._state === 8) { + _this._state = 1; + P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__chainFuture_closure(_this, value), {func: 1, ret: -1})); + } else + P._Future__chainCoreFuture(value, _this); + return; + } + P._Future__chainForeignFuture(value, _this); + }, + _asyncCompleteError$2: function(error, stackTrace) { + H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + this._state = 1; + P._rootScheduleMicrotask(null, null, this._zone, H.functionTypeCheck(new P._Future__asyncCompleteError_closure(this, error, stackTrace), {func: 1, ret: -1})); + }, + $isFuture: 1 + }; + P._Future__addListener_closure.prototype = { + call$0: function() { + P._Future__propagateToListeners(this.$this, this.listener); + }, + $signature: 1 + }; + P._Future__prependListeners_closure.prototype = { + call$0: function() { + P._Future__propagateToListeners(this.$this, this._box_0.listeners); + }, + $signature: 1 + }; + P._Future__chainForeignFuture_closure.prototype = { + call$1: function(value) { + var t1 = this.target; + t1._state = 0; + t1._complete$1(value); + }, + $signature: 7 + }; + P._Future__chainForeignFuture_closure0.prototype = { + call$2: function(error, stackTrace) { + H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + this.target._completeError$2(error, stackTrace); + }, + call$1: function(error) { + return this.call$2(error, null); + }, + "call*": "call$2", + $defaultValues: function() { + return [null]; + }, + $signature: 18 + }; + P._Future__chainForeignFuture_closure1.prototype = { + call$0: function() { + this.target._completeError$2(this.e, this.s); + }, + $signature: 1 + }; + P._Future__asyncComplete_closure.prototype = { + call$0: function() { + var t1 = this.$this; + t1._completeWithValue$1(H.assertSubtypeOfRuntimeType(this.value, H.getTypeArgumentByIndex(t1, 0))); + }, + $signature: 1 + }; + P._Future__chainFuture_closure.prototype = { + call$0: function() { + P._Future__chainCoreFuture(this.value, this.$this); + }, + $signature: 1 + }; + P._Future__asyncCompleteError_closure.prototype = { + call$0: function() { + this.$this._completeError$2(this.error, this.stackTrace); + }, + $signature: 1 + }; + P._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { + call$0: function() { + var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null; + try { + t1 = _this.listener; + completeResult = t1.result._zone.run$1$1(H.functionTypeCheck(t1.callback, {func: 1}), null); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + if (_this.hasError) { + t1 = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError").error; + t2 = e; + t2 = t1 == null ? t2 == null : t1 === t2; + t1 = t2; + } else + t1 = false; + t2 = _this._box_0; + if (t1) + t2.listenerValueOrError = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError"); + else + t2.listenerValueOrError = new P.AsyncError(e, s); + t2.listenerHasError = true; + return; + } + if (!!J.getInterceptor$(completeResult).$isFuture) { + if (completeResult instanceof P._Future && completeResult._state >= 4) { + if (completeResult._state === 8) { + t1 = _this._box_0; + t1.listenerValueOrError = H.interceptedTypeCheck(completeResult._resultOrListeners, "$isAsyncError"); + t1.listenerHasError = true; + } + return; + } + originalSource = _this._box_1.source; + t1 = _this._box_0; + t1.listenerValueOrError = completeResult.then$1$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), null); + t1.listenerHasError = false; + } + }, + $signature: 0 + }; + P._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { + call$1: function(_) { + return this.originalSource; + }, + $signature: 19 + }; + P._Future__propagateToListeners_handleValueCallback.prototype = { + call$0: function() { + var e, s, t1, t2, t3, t4, exception, _this = this; + try { + t1 = _this.listener; + t2 = H.getTypeArgumentByIndex(t1, 0); + t3 = H.assertSubtypeOfRuntimeType(_this.sourceResult, t2); + t4 = H.getTypeArgumentByIndex(t1, 1); + _this._box_0.listenerValueOrError = t1.result._zone.runUnary$2$2(H.functionTypeCheck(t1.callback, {func: 1, ret: {futureOr: 1, type: t4}, args: [t2]}), t3, {futureOr: 1, type: t4}, t2); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + t1 = _this._box_0; + t1.listenerValueOrError = new P.AsyncError(e, s); + t1.listenerHasError = true; + } + }, + $signature: 0 + }; + P._Future__propagateToListeners_handleError.prototype = { + call$0: function() { + var asyncError, e, s, t1, t2, exception, t3, t4, _this = this; + try { + asyncError = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError"); + t1 = _this.listener; + if (H.boolConversionCheck(t1.matchesErrorTest$1(asyncError)) && t1.errorCallback != null) { + t2 = _this._box_0; + t2.listenerValueOrError = t1.handleError$1(asyncError); + t2.listenerHasError = false; + } + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + t1 = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError"); + t2 = t1.error; + t3 = e; + t4 = _this._box_0; + if (t2 == null ? t3 == null : t2 === t3) + t4.listenerValueOrError = t1; + else + t4.listenerValueOrError = new P.AsyncError(e, s); + t4.listenerHasError = true; + } + }, + $signature: 0 + }; + P._AsyncCallbackEntry.prototype = {}; + P.Stream.prototype = { + get$length: function(_) { + var t1 = {}, + future = new P._Future($.Zone__current, [P.int]); + t1.count = 0; + this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1, this), true, new P.Stream_length_closure0(t1, future), future.get$_completeError()); + return future; + } + }; + P.Stream_length_closure.prototype = { + call$1: function(_) { + H.assertSubtypeOfRuntimeType(_, H.getTypeArgumentByIndex(this.$this, 0)); + ++this._box_0.count; + }, + $signature: function() { + return {func: 1, ret: P.Null, args: [H.getTypeArgumentByIndex(this.$this, 0)]}; + } + }; + P.Stream_length_closure0.prototype = { + call$0: function() { + this.future._complete$1(this._box_0.count); + }, + $signature: 1 + }; + P.StreamSubscription.prototype = {}; + P.StreamTransformerBase.prototype = {}; + P._StreamController.prototype = { + get$_pendingEvents: function() { + var t1, _this = this; + if ((_this._state & 8) === 0) + return H.assertSubtype(_this._varData, "$is_PendingEvents", _this.$ti, "$as_PendingEvents"); + t1 = _this.$ti; + return H.assertSubtype(H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").get$varData(), "$is_PendingEvents", t1, "$as_PendingEvents"); + }, + _ensurePendingEvents$0: function() { + var t1, state, _this = this; + if ((_this._state & 8) === 0) { + t1 = _this._varData; + if (t1 == null) + t1 = _this._varData = new P._StreamImplEvents(_this.$ti); + return H.assertSubtype(t1, "$is_StreamImplEvents", _this.$ti, "$as_StreamImplEvents"); + } + t1 = _this.$ti; + state = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState"); + state.get$varData(); + return H.assertSubtype(state.get$varData(), "$is_StreamImplEvents", t1, "$as_StreamImplEvents"); + }, + get$_subscription: function() { + var t1, _this = this; + if ((_this._state & 8) !== 0) { + t1 = _this.$ti; + return H.assertSubtype(H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").get$varData(), "$is_ControllerSubscription", t1, "$as_ControllerSubscription"); + } + return H.assertSubtype(_this._varData, "$is_ControllerSubscription", _this.$ti, "$as_ControllerSubscription"); + }, + _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"); + }, + _ensureDoneFuture$0: function() { + var t1 = this._doneFuture; + if (t1 == null) + t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new P._Future($.Zone__current, [null]); + return t1; + }, + add$1: function(_, value) { + var t1, _this = this; + H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 0)); + t1 = _this._state; + if (t1 >= 4) + throw H.wrapException(_this._badEventState$0()); + if ((t1 & 1) !== 0) + _this._sendData$1(value); + else if ((t1 & 3) === 0) + _this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, _this.$ti)); + }, + close$0: function(_) { + var _this = this, + t1 = _this._state; + if ((t1 & 4) !== 0) + return _this._ensureDoneFuture$0(); + if (t1 >= 4) + throw H.wrapException(_this._badEventState$0()); + t1 = _this._state = t1 | 4; + if ((t1 & 1) !== 0) + _this._sendDone$0(); + else if ((t1 & 3) === 0) + _this._ensurePendingEvents$0().add$1(0, C.C__DelayedDone); + return _this._ensureDoneFuture$0(); + }, + _subscribe$4: function(onData, onError, onDone, cancelOnError) { + var t2, t3, t4, subscription, pendingEvents, addState, _this = this, + t1 = H.getTypeArgumentByIndex(_this, 0); + H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); + H.functionTypeCheck(onDone, {func: 1, ret: -1}); + if ((_this._state & 3) !== 0) + throw H.wrapException(P.StateError$("Stream has already been listened to.")); + t2 = $.Zone__current; + t3 = cancelOnError ? 1 : 0; + t4 = _this.$ti; + subscription = new P._ControllerSubscription(_this, t2, t3, t4); + subscription._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError, t1); + pendingEvents = _this.get$_pendingEvents(); + t1 = _this._state |= 1; + if ((t1 & 8) !== 0) { + addState = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t4, "$as_StreamControllerAddStreamState"); + addState.set$varData(subscription); + addState.resume$0(); + } else + _this._varData = subscription; + subscription._setPendingEvents$1(pendingEvents); + subscription._guardCallback$1(new P._StreamController__subscribe_closure(_this)); + return subscription; + }, + _recordCancel$1: function(subscription) { + var result, _this = this, + t1 = _this.$ti; + H.assertSubtype(subscription, "$isStreamSubscription", t1, "$asStreamSubscription"); + result = null; + if ((_this._state & 8) !== 0) + result = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").cancel$0(); + _this._varData = null; + _this._state = _this._state & 4294967286 | 2; + t1 = new P._StreamController__recordCancel_complete(_this); + if (result != null) + result = result.whenComplete$1(t1); + else + t1.call$0(); + return result; + }, + $isStreamController: 1, + $is_StreamControllerLifecycle: 1, + $is_EventDispatch: 1 + }; + P._StreamController__subscribe_closure.prototype = { + call$0: function() { + P._runGuarded(this.$this.onListen); + }, + $signature: 1 + }; + P._StreamController__recordCancel_complete.prototype = { + call$0: function() { + var t1 = this.$this._doneFuture; + if (t1 != null && t1._state === 0) + t1._asyncComplete$1(null); + }, + $signature: 0 + }; + P._AsyncStreamControllerDispatch.prototype = { + _sendData$1: function(data) { + var t1 = H.getTypeArgumentByIndex(this, 0); + H.assertSubtypeOfRuntimeType(data, t1); + this.get$_subscription()._addPending$1(new P._DelayedData(data, [t1])); + }, + _sendError$2: function(error, stackTrace) { + this.get$_subscription()._addPending$1(new P._DelayedError(error, stackTrace)); + }, + _sendDone$0: function() { + this.get$_subscription()._addPending$1(C.C__DelayedDone); + } + }; + P._AsyncStreamController.prototype = {}; + P._ControllerStream.prototype = { + get$hashCode: function(_) { + return (H.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; + }, + $eq: function(_, other) { + if (other == null) + return false; + if (this === other) + return true; + return other instanceof P._ControllerStream && other._controller === this._controller; + } + }; + P._ControllerSubscription.prototype = { + _onCancel$0: function() { + return this._controller._recordCancel$1(this); + }, + _onPause$0: function() { + var t1 = this._controller, + t2 = H.getTypeArgumentByIndex(t1, 0); + H.assertSubtype(this, "$isStreamSubscription", [t2], "$asStreamSubscription"); + if ((t1._state & 8) !== 0) + C.JSNull_methods.pause$0(H.assertSubtype(t1._varData, "$is_StreamControllerAddStreamState", [t2], "$as_StreamControllerAddStreamState")); + P._runGuarded(t1.onPause); + }, + _onResume$0: function() { + var t1 = this._controller, + t2 = H.getTypeArgumentByIndex(t1, 0); + H.assertSubtype(this, "$isStreamSubscription", [t2], "$asStreamSubscription"); + if ((t1._state & 8) !== 0) + H.assertSubtype(t1._varData, "$is_StreamControllerAddStreamState", [t2], "$as_StreamControllerAddStreamState").resume$0(); + P._runGuarded(t1.onResume); + } + }; + P._StreamSinkWrapper.prototype = {}; + P._BufferingStreamSubscription.prototype = { + _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnError, $T) { + var handleError, handleDone, _this = this, + t1 = H.getTypeArgumentByIndex(_this, 0); + H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); + _this.set$_onData(H.functionTypeCheck(onData, {func: 1, ret: null, args: [t1]})); + handleError = onError == null ? P.async___nullErrorHandler$closure() : onError; + if (H.functionTypeTest(handleError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]})) + _this._onError = _this._zone.registerBinaryCallback$3$1(handleError, null, P.Object, P.StackTrace); + else if (H.functionTypeTest(handleError, {func: 1, ret: -1, args: [P.Object]})) + _this._onError = H.functionTypeCheck(handleError, {func: 1, ret: null, args: [P.Object]}); + else + H.throwExpression(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")); + H.functionTypeCheck(onDone, {func: 1, ret: -1}); + handleDone = onDone == null ? P.async___nullDoneHandler$closure() : onDone; + _this.set$_onDone(H.functionTypeCheck(handleDone, {func: 1, ret: -1})); + }, + _setPendingEvents$1: function(pendingEvents) { + var _this = this; + H.assertSubtype(pendingEvents, "$is_PendingEvents", _this.$ti, "$as_PendingEvents"); + if (pendingEvents == null) + return; + _this.set$_pending(pendingEvents); + if (pendingEvents.lastPendingEvent != null) { + _this._state = (_this._state | 64) >>> 0; + _this._pending.schedule$1(_this); + } + }, + pause$0: function(_) { + var t2, t3, _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + t2 = (t1 + 128 | 4) >>> 0; + _this._state = t2; + if (t1 < 128 && _this._pending != null) { + t3 = _this._pending; + if (t3._state === 1) + t3._state = 3; + } + if ((t1 & 4) === 0 && (t2 & 32) === 0) + _this._guardCallback$1(_this.get$_onPause()); + }, + resume$0: function() { + var _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + if (t1 >= 128) { + t1 = _this._state = t1 - 128; + if (t1 < 128) + if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent != null) + _this._pending.schedule$1(_this); + else { + t1 = (t1 & 4294967291) >>> 0; + _this._state = t1; + if ((t1 & 32) === 0) + _this._guardCallback$1(_this.get$_onResume()); + } + } + }, + cancel$0: function() { + var _this = this, + t1 = (_this._state & 4294967279) >>> 0; + _this._state = t1; + if ((t1 & 8) === 0) + _this._cancel$0(); + t1 = _this._cancelFuture; + return t1 == null ? $.$get$Future__nullFuture() : t1; + }, + _cancel$0: function() { + var t2, _this = this, + t1 = _this._state = (_this._state | 8) >>> 0; + if ((t1 & 64) !== 0) { + t2 = _this._pending; + if (t2._state === 1) + t2._state = 3; + } + if ((t1 & 32) === 0) + _this.set$_pending(null); + _this._cancelFuture = _this._onCancel$0(); + }, + _onPause$0: function() { + }, + _onResume$0: function() { + }, + _onCancel$0: function() { + return; + }, + _addPending$1: function($event) { + var _this = this, + t1 = _this.$ti, + pending = H.assertSubtype(_this._pending, "$is_StreamImplEvents", t1, "$as_StreamImplEvents"); + if (pending == null) { + pending = new P._StreamImplEvents(t1); + _this.set$_pending(pending); + } + pending.add$1(0, $event); + t1 = _this._state; + if ((t1 & 64) === 0) { + t1 = (t1 | 64) >>> 0; + _this._state = t1; + if (t1 < 128) + _this._pending.schedule$1(_this); + } + }, + _sendData$1: function(data) { + var t2, _this = this, + t1 = H.getTypeArgumentByIndex(_this, 0); + H.assertSubtypeOfRuntimeType(data, t1); + t2 = _this._state; + _this._state = (t2 | 32) >>> 0; + _this._zone.runUnaryGuarded$1$2(_this._onData, data, t1); + _this._state = (_this._state & 4294967263) >>> 0; + _this._checkState$1((t2 & 4) !== 0); + }, + _sendError$2: function(error, stackTrace) { + var _this = this, + t1 = _this._state, + t2 = new P._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); + if ((t1 & 1) !== 0) { + _this._state = (t1 | 16) >>> 0; + _this._cancel$0(); + t1 = _this._cancelFuture; + if (t1 != null && t1 !== $.$get$Future__nullFuture()) + t1.whenComplete$1(t2); + else + t2.call$0(); + } else { + t2.call$0(); + _this._checkState$1((t1 & 4) !== 0); } - if (confirm("Window") && confirm("HTMLElement")) return hooks; + }, + _sendDone$0: function() { + var t2, _this = this, + t1 = new P._BufferingStreamSubscription__sendDone_sendDone(_this); + _this._cancel$0(); + _this._state = (_this._state | 16) >>> 0; + t2 = _this._cancelFuture; + if (t2 != null && t2 !== $.$get$Future__nullFuture()) + t2.whenComplete$1(t1); + else + t1.call$0(); + }, + _guardCallback$1: function(callback) { + var t1, _this = this; + H.functionTypeCheck(callback, {func: 1, ret: -1}); + t1 = _this._state; + _this._state = (t1 | 32) >>> 0; + callback.call$0(); + _this._state = (_this._state & 4294967263) >>> 0; + _this._checkState$1((t1 & 4) !== 0); + }, + _checkState$1: function(wasInputPaused) { + var t2, isInputPaused, _this = this, + t1 = _this._state; + if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent == null) { + t1 = _this._state = (t1 & 4294967231) >>> 0; + if ((t1 & 4) !== 0) + if (t1 < 128) { + t2 = _this._pending; + t2 = t2 == null || t2.lastPendingEvent == null; + } else + t2 = false; + else + t2 = false; + if (t2) { + t1 = (t1 & 4294967291) >>> 0; + _this._state = t1; + } + } + for (; true; wasInputPaused = isInputPaused) { + if ((t1 & 8) !== 0) { + _this.set$_pending(null); + return; + } + isInputPaused = (t1 & 4) !== 0; + if (wasInputPaused === isInputPaused) + break; + _this._state = (t1 ^ 32) >>> 0; + if (isInputPaused) + _this._onPause$0(); + else + _this._onResume$0(); + t1 = (_this._state & 4294967263) >>> 0; + _this._state = t1; + } + if ((t1 & 64) !== 0 && t1 < 128) + _this._pending.schedule$1(_this); + }, + set$_onData: function(_onData) { + this._onData = H.functionTypeCheck(_onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}); + }, + set$_onDone: function(_onDone) { + this._onDone = H.functionTypeCheck(_onDone, {func: 1, ret: -1}); + }, + set$_pending: function(_pending) { + this._pending = H.assertSubtype(_pending, "$is_PendingEvents", this.$ti, "$as_PendingEvents"); + }, + $isStreamSubscription: 1, + $is_EventDispatch: 1 + }; + P._BufferingStreamSubscription__sendError_sendError.prototype = { + call$0: function() { + var onError, t3, t4, + t1 = this.$this, + t2 = t1._state; + if ((t2 & 8) !== 0 && (t2 & 16) === 0) + return; + t1._state = (t2 | 32) >>> 0; + onError = t1._onError; + t2 = this.error; + t3 = P.Object; + t4 = t1._zone; + if (H.functionTypeTest(onError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]})) + t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, P.StackTrace); + else + t4.runUnaryGuarded$1$2(H.functionTypeCheck(t1._onError, {func: 1, ret: -1, args: [P.Object]}), t2, t3); + t1._state = (t1._state & 4294967263) >>> 0; + }, + $signature: 0 + }; + P._BufferingStreamSubscription__sendDone_sendDone.prototype = { + call$0: function() { + var t1 = this.$this, + t2 = t1._state; + if ((t2 & 16) === 0) + return; + t1._state = (t2 | 42) >>> 0; + t1._zone.runGuarded$1(t1._onDone); + t1._state = (t1._state & 4294967263) >>> 0; + }, + $signature: 0 + }; + P._StreamImpl.prototype = { + listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { + H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}); + H.functionTypeCheck(onDone, {func: 1, ret: -1}); + return this._controller._subscribe$4(H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}), onError, onDone, true === cancelOnError); + }, + listen$1: function(onData) { + return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); + }, + listen$2$onDone: function(onData, onDone) { + return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, null); } - hooks.getTag = getTagFallback; }; -} -C.V=function() { + P._DelayedEvent.prototype = { + set$next: function(next) { + this.next = H.interceptedTypeCheck(next, "$is_DelayedEvent"); + }, + get$next: function() { + return this.next; + } + }; + P._DelayedData.prototype = { + perform$1: function(dispatch) { + H.assertSubtype(dispatch, "$is_EventDispatch", this.$ti, "$as_EventDispatch")._sendData$1(this.value); + } + }; + P._DelayedError.prototype = { + perform$1: function(dispatch) { + dispatch._sendError$2(this.error, this.stackTrace); + }, + $as_DelayedEvent: function() { + } + }; + P._DelayedDone.prototype = { + perform$1: function(dispatch) { + dispatch._sendDone$0(); + }, + get$next: function() { + return; + }, + set$next: function(_) { + throw H.wrapException(P.StateError$("No events after a done.")); + }, + $is_DelayedEvent: 1, + $as_DelayedEvent: function() { + } + }; + P._PendingEvents.prototype = { + schedule$1: function(dispatch) { + var t1, _this = this; + H.assertSubtype(dispatch, "$is_EventDispatch", _this.$ti, "$as_EventDispatch"); + t1 = _this._state; + if (t1 === 1) + return; + if (t1 >= 1) { + _this._state = 1; + return; + } + P.scheduleMicrotask(new P._PendingEvents_schedule_closure(_this, dispatch)); + _this._state = 1; + } + }; + P._PendingEvents_schedule_closure.prototype = { + call$0: function() { + var t2, $event, t3, + t1 = this.$this, + oldState = t1._state; + t1._state = 0; + if (oldState === 3) + return; + t2 = H.assertSubtype(this.dispatch, "$is_EventDispatch", [H.getTypeArgumentByIndex(t1, 0)], "$as_EventDispatch"); + $event = t1.firstPendingEvent; + t3 = $event.get$next(); + t1.firstPendingEvent = t3; + if (t3 == null) + t1.lastPendingEvent = null; + $event.perform$1(t2); + }, + $signature: 1 + }; + P._StreamImplEvents.prototype = { + add$1: function(_, $event) { + var _this = this, + t1 = _this.lastPendingEvent; + if (t1 == null) + _this.firstPendingEvent = _this.lastPendingEvent = $event; + else { + t1.set$next($event); + _this.lastPendingEvent = $event; + } + } + }; + P._StreamIterator.prototype = { + get$current: function() { + var _this = this; + if (_this._subscription != null && _this._isPaused) + return H.assertSubtypeOfRuntimeType(_this._stateData, H.getTypeArgumentByIndex(_this, 0)); + return; + }, + moveNext$0: function() { + var future, _this = this, + t1 = _this._subscription; + if (t1 != null) { + if (_this._isPaused) { + future = new P._Future($.Zone__current, [P.bool]); + _this._stateData = future; + _this._isPaused = false; + t1.resume$0(); + return future; + } + throw H.wrapException(P.StateError$("Already waiting for next.")); + } + return _this._initializeOrDone$0(); + }, + _initializeOrDone$0: function() { + var _this = this, + stateData = _this._stateData; + if (stateData != null) { + _this._subscription = H.assertSubtype(stateData, "$isStream", _this.$ti, "$asStream").listen$4$cancelOnError$onDone$onError(_this.get$_onData(), true, _this.get$_onDone(), _this.get$_onError()); + return _this._stateData = new P._Future($.Zone__current, [P.bool]); + } + return $.$get$Future__falseFuture(); + }, + cancel$0: function() { + var _this = this, + subscription = H.assertSubtype(_this._subscription, "$isStreamSubscription", _this.$ti, "$asStreamSubscription"), + stateData = _this._stateData; + _this._stateData = null; + if (subscription != null) { + _this._subscription = null; + if (!_this._isPaused) + H.assertSubtype(stateData, "$is_Future", [P.bool], "$as_Future")._asyncComplete$1(false); + return subscription.cancel$0(); + } + return $.$get$Future__nullFuture(); + }, + _onData$1: function(data) { + var moveNextFuture, t1, _this = this; + H.assertSubtypeOfRuntimeType(data, H.getTypeArgumentByIndex(_this, 0)); + moveNextFuture = H.assertSubtype(_this._stateData, "$is_Future", [P.bool], "$as_Future"); + _this._stateData = data; + _this._isPaused = true; + moveNextFuture._complete$1(true); + t1 = _this._subscription; + if (t1 != null && _this._isPaused) + t1.pause$0(0); + }, + _onError$2: function(error, stackTrace) { + var moveNextFuture; + H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + moveNextFuture = H.assertSubtype(this._stateData, "$is_Future", [P.bool], "$as_Future"); + this._stateData = this._subscription = null; + moveNextFuture._completeError$2(error, stackTrace); + }, + _onError$1: function(error) { + return this._onError$2(error, null); + }, + _onDone$0: function() { + var moveNextFuture = H.assertSubtype(this._stateData, "$is_Future", [P.bool], "$as_Future"); + this._stateData = this._subscription = null; + moveNextFuture._complete$1(false); + } + }; + P.AsyncError.prototype = { + toString$0: function(_) { + return H.S(this.error); + }, + $isError: 1 + }; + P._Zone.prototype = {$isZone: 1}; + P._rootHandleUncaughtError_closure.prototype = { + call$0: function() { + var error, + t1 = this._box_0, + t2 = t1.error; + t1 = t2 == null ? t1.error = new P.NullThrownError() : t2; + t2 = this.stackTrace; + if (t2 == null) + throw H.wrapException(t1); + error = H.wrapException(t1); + error.stack = t2.toString$0(0); + throw error; + }, + $signature: 1 + }; + P._RootZone.prototype = { + runGuarded$1: function(f) { + var e, s, exception, _null = null; + H.functionTypeCheck(f, {func: 1, ret: -1}); + try { + if (C.C__RootZone === $.Zone__current) { + f.call$0(); + return; + } + P._rootRun(_null, _null, this, f, -1); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + } + }, + runUnaryGuarded$1$2: function(f, arg, $T) { + var e, s, exception, _null = null; + H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}); + H.assertSubtypeOfRuntimeType(arg, $T); + try { + if (C.C__RootZone === $.Zone__current) { + f.call$1(arg); + return; + } + P._rootRunUnary(_null, _null, this, f, arg, -1, $T); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + } + }, + runBinaryGuarded$2$3: function(f, arg1, arg2, T1, T2) { + var e, s, exception, _null = null; + H.functionTypeCheck(f, {func: 1, ret: -1, args: [T1, T2]}); + H.assertSubtypeOfRuntimeType(arg1, T1); + H.assertSubtypeOfRuntimeType(arg2, T2); + try { + if (C.C__RootZone === $.Zone__current) { + f.call$2(arg1, arg2); + return; + } + P._rootRunBinary(_null, _null, this, f, arg1, arg2, -1, T1, T2); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + } + }, + bindCallback$1$1: function(f, $R) { + return new P._RootZone_bindCallback_closure(this, H.functionTypeCheck(f, {func: 1, ret: $R}), $R); + }, + bindCallbackGuarded$1: function(f) { + return new P._RootZone_bindCallbackGuarded_closure(this, H.functionTypeCheck(f, {func: 1, ret: -1})); + }, + bindUnaryCallbackGuarded$1$1: function(f, $T) { + return new P._RootZone_bindUnaryCallbackGuarded_closure(this, H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}), $T); + }, + $index: function(_, key) { + return; + }, + run$1$1: function(f, $R) { + H.functionTypeCheck(f, {func: 1, ret: $R}); + if ($.Zone__current === C.C__RootZone) + return f.call$0(); + return P._rootRun(null, null, this, f, $R); + }, + runUnary$2$2: function(f, arg, $R, $T) { + H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]}); + H.assertSubtypeOfRuntimeType(arg, $T); + if ($.Zone__current === C.C__RootZone) + return f.call$1(arg); + return P._rootRunUnary(null, null, this, f, arg, $R, $T); + }, + runBinary$3$3: function(f, arg1, arg2, $R, T1, T2) { + H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); + H.assertSubtypeOfRuntimeType(arg1, T1); + H.assertSubtypeOfRuntimeType(arg2, T2); + if ($.Zone__current === C.C__RootZone) + return f.call$2(arg1, arg2); + return P._rootRunBinary(null, null, this, f, arg1, arg2, $R, T1, T2); + }, + registerBinaryCallback$3$1: function(f, $R, T1, T2) { + return H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); + } + }; + P._RootZone_bindCallback_closure.prototype = { + call$0: function() { + return this.$this.run$1$1(this.f, this.R); + }, + $signature: function() { + return {func: 1, ret: this.R}; + } + }; + P._RootZone_bindCallbackGuarded_closure.prototype = { + call$0: function() { + return this.$this.runGuarded$1(this.f); + }, + $signature: 0 + }; + P._RootZone_bindUnaryCallbackGuarded_closure.prototype = { + call$1: function(arg) { + var t1 = this.T; + return this.$this.runUnaryGuarded$1$2(this.f, H.assertSubtypeOfRuntimeType(arg, t1), t1); + }, + $signature: function() { + return {func: 1, ret: -1, args: [this.T]}; + } + }; + P.ListMixin.prototype = { + get$iterator: function(receiver) { + return new H.ListIterator(receiver, this.get$length(receiver), [H.getRuntimeTypeArgumentIntercepted(this, receiver, "ListMixin", 0)]); + }, + elementAt$1: function(receiver, index) { + return this.$index(receiver, index); + }, + get$isNotEmpty: function(receiver) { + return this.get$length(receiver) !== 0; + }, + $add: function(receiver, other) { + var result, _this = this, + t1 = [H.getRuntimeTypeArgumentIntercepted(_this, receiver, "ListMixin", 0)]; + H.assertSubtype(other, "$isList", t1, "$asList"); + result = H.setRuntimeTypeInfo([], t1); + C.JSArray_methods.set$length(result, C.JSInt_methods.$add(_this.get$length(receiver), other.get$length(other))); + C.JSArray_methods.setRange$3(result, 0, _this.get$length(receiver), receiver); + C.JSArray_methods.setRange$3(result, _this.get$length(receiver), result.length, other); + return result; + }, + toString$0: function(receiver) { + return P.IterableBase_iterableToFullString(receiver, "[", "]"); + } + }; + P.MapBase.prototype = {}; + P.MapBase_mapToString_closure.prototype = { + call$2: function(k, v) { + var t2, + t1 = this._box_0; + if (!t1.first) + this.result._contents += ", "; + t1.first = false; + t1 = this.result; + t2 = t1._contents += H.S(k); + t1._contents = t2 + ": "; + t1._contents += H.S(v); + }, + $signature: 5 + }; + P.MapMixin.prototype = { + forEach$1: function(_, action) { + var t1, key, _this = this; + H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getRuntimeTypeArgument(_this, "MapMixin", 0), H.getRuntimeTypeArgument(_this, "MapMixin", 1)]}); + for (t1 = _this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + key = t1.get$current(); + action.call$2(key, _this.$index(0, key)); + } + }, + get$length: function(_) { + var t1 = this.get$keys(); + return t1.get$length(t1); + }, + get$isEmpty: function(_) { + var t1 = this.get$keys(); + return t1.get$isEmpty(t1); + }, + toString$0: function(_) { + return P.MapBase_mapToString(this); + }, + $isMap: 1 + }; + P._UnmodifiableMapMixin.prototype = {}; + P.MapView.prototype = { + $index: function(_, key) { + return this._collection$_map.$index(0, key); + }, + forEach$1: function(_, action) { + this._collection$_map.forEach$1(0, H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentByIndex(this, 1)]})); + }, + get$isEmpty: function(_) { + return this._collection$_map.__js_helper$_length === 0; + }, + get$length: function(_) { + return this._collection$_map.__js_helper$_length; + }, + toString$0: function(_) { + return P.MapBase_mapToString(this._collection$_map); + }, + $isMap: 1 + }; + P.UnmodifiableMapView.prototype = {}; + P._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; + P._JsonMap.prototype = { + $index: function(_, key) { + var result, + t1 = this._processed; + if (t1 == null) + return this._data.$index(0, key); + else if (typeof key !== "string") + return; + else { + result = t1[key]; + return typeof result == "undefined" ? this._process$1(key) : result; + } + }, + get$length: function(_) { + return this._processed == null ? this._data.__js_helper$_length : this._computeKeys$0().length; + }, + get$isEmpty: function(_) { + return this.get$length(this) === 0; + }, + get$keys: function() { + if (this._processed == null) { + var t1 = this._data; + return new H.LinkedHashMapKeyIterable(t1, [H.getTypeArgumentByIndex(t1, 0)]); + } + return new P._JsonMapKeyIterable(this); + }, + forEach$1: function(_, f) { + var keys, i, key, value, _this = this; + H.functionTypeCheck(f, {func: 1, ret: -1, args: [P.String,,]}); + if (_this._processed == null) + return _this._data.forEach$1(0, f); + keys = _this._computeKeys$0(); + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + value = _this._processed[key]; + if (typeof value == "undefined") { + value = P._convertJsonToDartLazy(_this._original[key]); + _this._processed[key] = value; + } + f.call$2(key, value); + if (keys !== _this._data) + throw H.wrapException(P.ConcurrentModificationError$(_this)); + } + }, + _computeKeys$0: function() { + var keys = H.listTypeCheck(this._data); + if (keys == null) + keys = this._data = H.setRuntimeTypeInfo(Object.keys(this._original), [P.String]); + return keys; + }, + _process$1: function(key) { + var result; + if (!Object.prototype.hasOwnProperty.call(this._original, key)) + return; + result = P._convertJsonToDartLazy(this._original[key]); + return this._processed[key] = result; + }, + $asMapMixin: function() { + return [P.String, null]; + }, + $asMap: function() { + return [P.String, null]; + } + }; + P._JsonMapKeyIterable.prototype = { + get$length: function(_) { + var t1 = this._parent; + return t1.get$length(t1); + }, + elementAt$1: function(_, index) { + var t1 = this._parent; + if (t1._processed == null) + t1 = t1.get$keys().elementAt$1(0, index); + else { + t1 = t1._computeKeys$0(); + if (index < 0 || index >= t1.length) + return H.ioore(t1, index); + t1 = t1[index]; + } + return t1; + }, + get$iterator: function(_) { + var t1 = this._parent; + if (t1._processed == null) { + t1 = t1.get$keys(); + t1 = t1.get$iterator(t1); + } else { + t1 = t1._computeKeys$0(); + t1 = new J.ArrayIterator(t1, t1.length, [H.getTypeArgumentByIndex(t1, 0)]); + } + return t1; + }, + $asListIterable: function() { + return [P.String]; + }, + $asIterable: function() { + return [P.String]; + } + }; + P.Codec.prototype = {}; + P.Converter.prototype = {}; + P.JsonUnsupportedObjectError.prototype = { + toString$0: function(_) { + var safeString = P.Error_safeToString(this.unsupportedObject); + return (this.cause != null ? "Converting object to an encodable object failed:" : "Converting object did not return an encodable object:") + " " + safeString; + } + }; + P.JsonCyclicError.prototype = { + toString$0: function(_) { + return "Cyclic error in JSON stringify"; + } + }; + P.JsonCodec.prototype = { + decode$2$reviver: function(_, source, reviver) { + var t1 = P._parseJson(source, this.get$decoder()._reviver); + return t1; + }, + encode$2$toEncodable: function(value, toEncodable) { + var t1 = P._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); + return t1; + }, + get$encoder: function() { + return C.JsonEncoder_null; + }, + get$decoder: function() { + return C.JsonDecoder_null; + }, + $asCodec: function() { + return [P.Object, P.String]; + } + }; + P.JsonEncoder.prototype = { + $asConverter: function() { + return [P.Object, P.String]; + } + }; + P.JsonDecoder.prototype = { + $asConverter: function() { + return [P.String, P.Object]; + } + }; + P._JsonStringifier.prototype = { + writeStringContent$1: function(s) { + var t1, t2, offset, i, charCode, t3, + $length = s.length; + for (t1 = J.getInterceptor$s(s), t2 = this._sink, offset = 0, i = 0; i < $length; ++i) { + charCode = t1._codeUnitAt$1(s, i); + if (charCode > 92) + continue; + if (charCode < 32) { + if (i > offset) + t2._contents += C.JSString_methods.substring$2(s, offset, i); + offset = i + 1; + t2._contents += H.Primitives_stringFromCharCode(92); + switch (charCode) { + case 8: + t2._contents += H.Primitives_stringFromCharCode(98); + break; + case 9: + t2._contents += H.Primitives_stringFromCharCode(116); + break; + case 10: + t2._contents += H.Primitives_stringFromCharCode(110); + break; + case 12: + t2._contents += H.Primitives_stringFromCharCode(102); + break; + case 13: + t2._contents += H.Primitives_stringFromCharCode(114); + break; + default: + t2._contents += H.Primitives_stringFromCharCode(117); + t2._contents += H.Primitives_stringFromCharCode(48); + t2._contents += H.Primitives_stringFromCharCode(48); + t3 = charCode >>> 4 & 15; + t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + t3 = charCode & 15; + t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + break; + } + } else if (charCode === 34 || charCode === 92) { + if (i > offset) + t2._contents += C.JSString_methods.substring$2(s, offset, i); + offset = i + 1; + t2._contents += H.Primitives_stringFromCharCode(92); + t2._contents += H.Primitives_stringFromCharCode(charCode); + } + } + if (offset === 0) + t2._contents += H.S(s); + else if (offset < $length) + t2._contents += t1.substring$2(s, offset, $length); + }, + _checkCycle$1: function(object) { + var t1, t2, i, t3; + for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) { + t3 = t1[i]; + if (object == null ? t3 == null : object === t3) + throw H.wrapException(new P.JsonCyclicError(object, null)); + } + C.JSArray_methods.add$1(t1, object); + }, + writeObject$1: function(object) { + var customJson, e, t1, exception, _this = this; + if (_this.writeJsonValue$1(object)) + return; + _this._checkCycle$1(object); + try { + customJson = _this._toEncodable.call$1(object); + if (!_this.writeJsonValue$1(customJson)) { + t1 = P.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult()); + throw H.wrapException(t1); + } + t1 = _this._seen; + if (0 >= t1.length) + return H.ioore(t1, -1); + t1.pop(); + } catch (exception) { + e = H.unwrapException(exception); + t1 = P.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult()); + throw H.wrapException(t1); + } + }, + writeJsonValue$1: function(object) { + var t1, success, _this = this; + if (typeof object === "number") { + if (!isFinite(object)) + return false; + _this._sink._contents += C.JSNumber_methods.toString$0(object); + return true; + } else if (object === true) { + _this._sink._contents += "true"; + return true; + } else if (object === false) { + _this._sink._contents += "false"; + return true; + } else if (object == null) { + _this._sink._contents += "null"; + return true; + } else if (typeof object === "string") { + t1 = _this._sink; + t1._contents += '"'; + _this.writeStringContent$1(object); + t1._contents += '"'; + return true; + } else { + t1 = J.getInterceptor$(object); + if (!!t1.$isList) { + _this._checkCycle$1(object); + _this.writeList$1(object); + t1 = _this._seen; + if (0 >= t1.length) + return H.ioore(t1, -1); + t1.pop(); + return true; + } else if (!!t1.$isMap) { + _this._checkCycle$1(object); + success = _this.writeMap$1(object); + t1 = _this._seen; + if (0 >= t1.length) + return H.ioore(t1, -1); + t1.pop(); + return success; + } else + return false; + } + }, + writeList$1: function(list) { + var t2, i, + t1 = this._sink; + t1._contents += "["; + t2 = J.getInterceptor$ax(list); + if (t2.get$isNotEmpty(list)) { + this.writeObject$1(t2.$index(list, 0)); + for (i = 1; i < t2.get$length(list); ++i) { + t1._contents += ","; + this.writeObject$1(t2.$index(list, i)); + } + } + t1._contents += "]"; + }, + writeMap$1: function(map) { + var t1, keyValueList, i, t2, separator, t3, _this = this, _box_0 = {}; + if (map.get$isEmpty(map)) { + _this._sink._contents += "{}"; + return true; + } + t1 = map.get$length(map) * 2; + keyValueList = new Array(t1); + keyValueList.fixed$length = Array; + i = _box_0.i = 0; + _box_0.allStringKeys = true; + map.forEach$1(0, new P._JsonStringifier_writeMap_closure(_box_0, keyValueList)); + if (!_box_0.allStringKeys) + return false; + t2 = _this._sink; + t2._contents += "{"; + for (separator = '"'; i < t1; i += 2, separator = ',"') { + t2._contents += separator; + _this.writeStringContent$1(H.stringTypeCheck(keyValueList[i])); + t2._contents += '":'; + t3 = i + 1; + if (t3 >= t1) + return H.ioore(keyValueList, t3); + _this.writeObject$1(keyValueList[t3]); + } + t2._contents += "}"; + return true; + } + }; + P._JsonStringifier_writeMap_closure.prototype = { + call$2: function(key, value) { + var t1, t2; + if (typeof key !== "string") + this._box_0.allStringKeys = false; + t1 = this.keyValueList; + t2 = this._box_0; + C.JSArray_methods.$indexSet(t1, t2.i++, key); + C.JSArray_methods.$indexSet(t1, t2.i++, value); + }, + $signature: 5 + }; + P._JsonStringStringifier.prototype = { + get$_partialResult: function() { + var t1 = this._sink._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + P._symbolMapToStringMap_closure.prototype = { + call$2: function(key, value) { + this.result.$indexSet(0, H.interceptedTypeCheck(key, "$isSymbol").__internal$_name, value); + }, + $signature: 8 + }; + P.NoSuchMethodError_toString_closure.prototype = { + call$2: function(key, value) { + var t1, t2, t3; + H.interceptedTypeCheck(key, "$isSymbol"); + t1 = this.sb; + t2 = this._box_0; + t1._contents += t2.comma; + t3 = t1._contents += H.S(key.__internal$_name); + t1._contents = t3 + ": "; + t1._contents += P.Error_safeToString(value); + t2.comma = ", "; + }, + $signature: 8 + }; + P.bool.prototype = {}; + P.DateTime.prototype = { + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof P.DateTime && this._value === other._value && this.isUtc === other.isUtc; + }, + get$hashCode: function(_) { + var t1 = this._value; + return (t1 ^ C.JSInt_methods._shrOtherPositive$1(t1, 30)) & 1073741823; + }, + toString$0: function(_) { + var _this = this, + y = P.DateTime__fourDigits(H.Primitives_getYear(_this)), + m = P.DateTime__twoDigits(H.Primitives_getMonth(_this)), + d = P.DateTime__twoDigits(H.Primitives_getDay(_this)), + h = P.DateTime__twoDigits(H.Primitives_getHours(_this)), + min = P.DateTime__twoDigits(H.Primitives_getMinutes(_this)), + sec = P.DateTime__twoDigits(H.Primitives_getSeconds(_this)), + ms = P.DateTime__threeDigits(H.Primitives_getMilliseconds(_this)); + if (_this.isUtc) + return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + "Z"; + else + return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms; + } + }; + P.double.prototype = {}; + P.Duration.prototype = { + $add: function(_, other) { + return new P.Duration(C.JSInt_methods.$add(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration)); + }, + $sub: function(_, other) { + return new P.Duration(C.JSInt_methods.$sub(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration)); + }, + $lt: function(_, other) { + return C.JSInt_methods.$lt(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration); + }, + $gt: function(_, other) { + return C.JSInt_methods.$gt(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration); + }, + $ge: function(_, other) { + return C.JSInt_methods.$ge(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration); + }, + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof P.Duration && this._duration === other._duration; + }, + get$hashCode: function(_) { + return C.JSInt_methods.get$hashCode(this._duration); + }, + toString$0: function(_) { + var twoDigitMinutes, twoDigitSeconds, sixDigitUs, + t1 = new P.Duration_toString_twoDigits(), + t2 = this._duration; + if (t2 < 0) + return "-" + new P.Duration(0 - t2).toString$0(0); + twoDigitMinutes = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 60000000) % 60); + twoDigitSeconds = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 1000000) % 60); + sixDigitUs = new P.Duration_toString_sixDigits().call$1(t2 % 1000000); + return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + H.S(twoDigitMinutes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs); + } + }; + P.Duration_toString_sixDigits.prototype = { + call$1: function(n) { + if (n >= 100000) + return "" + n; + if (n >= 10000) + return "0" + n; + if (n >= 1000) + return "00" + n; + if (n >= 100) + return "000" + n; + if (n >= 10) + return "0000" + n; + return "00000" + n; + }, + $signature: 9 + }; + P.Duration_toString_twoDigits.prototype = { + call$1: function(n) { + if (n >= 10) + return "" + n; + return "0" + n; + }, + $signature: 9 + }; + P.Error.prototype = {}; + P.AssertionError.prototype = { + toString$0: function(_) { + return "Assertion failed"; + } + }; + P.NullThrownError.prototype = { + toString$0: function(_) { + return "Throw of null."; + } + }; + P.ArgumentError.prototype = { + get$_errorName: function() { + return "Invalid argument" + (!this._hasValue ? "(s)" : ""); + }, + get$_errorExplanation: function() { + return ""; + }, + toString$0: function(_) { + var message, prefix, explanation, errorValue, _this = this, + t1 = _this.name, + nameString = t1 != null ? " (" + t1 + ")" : ""; + t1 = _this.message; + message = t1 == null ? "" : ": " + t1; + prefix = _this.get$_errorName() + nameString + message; + if (!_this._hasValue) + return prefix; + explanation = _this.get$_errorExplanation(); + errorValue = P.Error_safeToString(_this.invalidValue); + return prefix + explanation + ": " + errorValue; + } + }; + P.RangeError.prototype = { + get$_errorName: function() { + return "RangeError"; + }, + get$_errorExplanation: function() { + var explanation, t2, + t1 = this.start; + if (t1 == null) { + t1 = this.end; + explanation = t1 != null ? ": Not less than or equal to " + H.S(t1) : ""; + } else { + t2 = this.end; + if (t2 == null) + explanation = ": Not greater than or equal to " + H.S(t1); + else if (t2 > t1) + explanation = ": Not in range " + H.S(t1) + ".." + H.S(t2) + ", inclusive"; + else + explanation = t2 < t1 ? ": Valid value range is empty" : ": Only valid value is " + H.S(t1); + } + return explanation; + } + }; + P.IndexError.prototype = { + get$_errorName: function() { + return "RangeError"; + }, + get$_errorExplanation: function() { + var t1, + invalidValue = H.intTypeCheck(this.invalidValue); + if (typeof invalidValue !== "number") + return invalidValue.$lt(); + if (invalidValue < 0) + return ": index must not be negative"; + t1 = this.length; + if (t1 === 0) + return ": no indices are valid"; + return ": index should be less than " + H.S(t1); + }, + get$length: function(receiver) { + return this.length; + } + }; + P.NoSuchMethodError.prototype = { + toString$0: function(_) { + var t1, t2, _i, t3, t4, argument, receiverText, actualParameters, _this = this, _box_0 = {}, + sb = new P.StringBuffer(""); + _box_0.comma = ""; + for (t1 = _this._core$_arguments, t2 = t1.length, _i = 0, t3 = "", t4 = ""; _i < t2; ++_i, t4 = ", ") { + argument = t1[_i]; + sb._contents = t3 + t4; + t3 = sb._contents += P.Error_safeToString(argument); + _box_0.comma = ", "; + } + _this._namedArguments.forEach$1(0, new P.NoSuchMethodError_toString_closure(_box_0, sb)); + receiverText = P.Error_safeToString(_this._core$_receiver); + actualParameters = sb.toString$0(0); + t1 = "NoSuchMethodError: method not found: '" + H.S(_this._core$_memberName.__internal$_name) + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; + return t1; + } + }; + P.UnsupportedError.prototype = { + toString$0: function(_) { + return "Unsupported operation: " + this.message; + } + }; + P.UnimplementedError.prototype = { + toString$0: function(_) { + var t1 = this.message; + return t1 != null ? "UnimplementedError: " + t1 : "UnimplementedError"; + } + }; + P.StateError.prototype = { + toString$0: function(_) { + return "Bad state: " + this.message; + } + }; + P.ConcurrentModificationError.prototype = { + toString$0: function(_) { + var t1 = this.modifiedObject; + if (t1 == null) + return "Concurrent modification during iteration."; + return "Concurrent modification during iteration: " + P.Error_safeToString(t1) + "."; + } + }; + P.OutOfMemoryError.prototype = { + toString$0: function(_) { + return "Out of Memory"; + }, + $isError: 1 + }; + P.StackOverflowError.prototype = { + toString$0: function(_) { + return "Stack Overflow"; + }, + $isError: 1 + }; + P.CyclicInitializationError.prototype = { + toString$0: function(_) { + var t1 = this.variableName; + return t1 == null ? "Reading static variable during its initialization" : "Reading static variable '" + t1 + "' during its initialization"; + } + }; + P._Exception.prototype = { + toString$0: function(_) { + return "Exception: " + this.message; + } + }; + P.FormatException.prototype = { + toString$0: function(_) { + var t1 = this.message, + report = "" !== t1 ? "FormatException: " + t1 : "FormatException", + offset = this.offset; + return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report; + } + }; + P.int.prototype = {}; + P.Iterable.prototype = { + get$length: function(_) { + var count, + it = this.get$iterator(this); + for (count = 0; it.moveNext$0();) + ++count; + return count; + }, + elementAt$1: function(_, index) { + var t1, elementIndex, element; + P.RangeError_checkNotNegative(index, "index"); + for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { + element = t1.get$current(); + if (index === elementIndex) + return element; + ++elementIndex; + } + throw H.wrapException(P.IndexError$(index, this, "index", null, elementIndex)); + }, + toString$0: function(_) { + return P.IterableBase_iterableToShortString(this, "(", ")"); + } + }; + P.List.prototype = {$isIterable: 1}; + P.Null.prototype = { + get$hashCode: function(_) { + return P.Object.prototype.get$hashCode.call(this, this); + }, + toString$0: function(_) { + return "null"; + } + }; + P.num.prototype = {}; + P.Object.prototype = {constructor: P.Object, $isObject: 1, + $eq: function(_, other) { + return this === other; + }, + get$hashCode: function(_) { + return H.Primitives_objectHashCode(this); + }, + toString$0: function(_) { + return "Instance of '" + H.S(H.Primitives_objectTypeName(this)) + "'"; + }, + noSuchMethod$1: function(_, invocation) { + H.interceptedTypeCheck(invocation, "$isInvocation"); + throw H.wrapException(P.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); + }, + toString: function() { + return this.toString$0(this); + } + }; + P.StackTrace.prototype = {}; + P.String.prototype = {$isPattern: 1}; + P.StringBuffer.prototype = { + get$length: function(_) { + return this._contents.length; + }, + toString$0: function(_) { + var t1 = this._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isStringSink: 1 + }; + P.Symbol.prototype = {}; + W.HtmlElement.prototype = {}; + W.AnchorElement.prototype = { + toString$0: function(receiver) { + return String(receiver); + } + }; + W.AreaElement.prototype = { + toString$0: function(receiver) { + return String(receiver); + } + }; + W.DomException.prototype = { + toString$0: function(receiver) { + return String(receiver); + } + }; + W.Element.prototype = { + toString$0: function(receiver) { + return receiver.localName; + }, + get$onClick: function(receiver) { + return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]); + }, + $isElement: 1 + }; + W.Event.prototype = {$isEvent: 1}; + W.EventSource.prototype = {$isEventSource: 1}; + W.EventTarget.prototype = { + addEventListener$3: function(receiver, type, listener, useCapture) { + H.functionTypeCheck(listener, {func: 1, args: [W.Event]}); + if (listener != null) + this._addEventListener$3(receiver, type, listener, useCapture); + }, + addEventListener$2: function($receiver, type, listener) { + return this.addEventListener$3($receiver, type, listener, null); + }, + _addEventListener$3: function(receiver, type, listener, options) { + return receiver.addEventListener(type, H.convertDartClosureToJS(H.functionTypeCheck(listener, {func: 1, args: [W.Event]}), 1), options); + }, + _removeEventListener$3: function(receiver, type, listener, options) { + return receiver.removeEventListener(type, H.convertDartClosureToJS(H.functionTypeCheck(listener, {func: 1, args: [W.Event]}), 1), false); + }, + $isEventTarget: 1 + }; + W.FormElement.prototype = { + get$length: function(receiver) { + return receiver.length; + } + }; + W.HttpRequest.prototype = { + open$3$async: function(receiver, method, url, async) { + return receiver.open(method, url, true); + }, + $isHttpRequest: 1 + }; + W.HttpRequest_request_closure.prototype = { + call$1: function(e) { + var t1, t2, accepted, unknownRedirect, t3; + H.interceptedTypeCheck(e, "$isProgressEvent"); + t1 = this.xhr; + t2 = t1.status; + if (typeof t2 !== "number") + return t2.$ge(); + accepted = t2 >= 200 && t2 < 300; + unknownRedirect = t2 > 307 && t2 < 400; + t2 = accepted || t2 === 0 || t2 === 304 || unknownRedirect; + t3 = this.completer; + if (t2) + t3.complete$1(0, t1); + else + t3.completeError$1(e); + }, + $signature: 21 + }; + W.HttpRequestEventTarget.prototype = {}; + W.MessageEvent.prototype = {$isMessageEvent: 1}; + W.MouseEvent.prototype = {$isMouseEvent: 1}; + W.Node.prototype = { + toString$0: function(receiver) { + var value = receiver.nodeValue; + return value == null ? this.super$Interceptor$toString(receiver) : value; + } + }; + W.ProgressEvent.prototype = {$isProgressEvent: 1}; + W.SelectElement.prototype = { + get$length: function(receiver) { + return receiver.length; + } + }; + W.UIEvent.prototype = {}; + W._EventStream.prototype = { + listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { + var t1 = H.getTypeArgumentByIndex(this, 0); + H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); + H.functionTypeCheck(onDone, {func: 1, ret: -1}); + return W._EventStreamSubscription$(this._target, this._eventType, onData, false, t1); + } + }; + W._ElementEventStreamImpl.prototype = {}; + W._EventStreamSubscription.prototype = { + cancel$0: function() { + var _this = this; + if (_this._target == null) + return; + _this._unlisten$0(); + _this._target = null; + _this.set$_html$_onData(null); + return; + }, + pause$0: function(_) { + if (this._target == null) + return; + ++this._pauseCount; + this._unlisten$0(); + }, + resume$0: function() { + var _this = this; + if (_this._target == null || _this._pauseCount <= 0) + return; + --_this._pauseCount; + _this._tryResume$0(); + }, + _tryResume$0: function() { + var _this = this, + t1 = _this._html$_onData; + if (t1 != null && _this._pauseCount <= 0) + J.addEventListener$3$x(_this._target, _this._eventType, t1, false); + }, + _unlisten$0: function() { + var t3, + t1 = this._html$_onData, + t2 = t1 != null; + if (t2) { + t3 = this._target; + t3.toString; + H.functionTypeCheck(t1, {func: 1, args: [W.Event]}); + if (t2) + J._removeEventListener$3$x(t3, this._eventType, t1, false); + } + }, + set$_html$_onData: function(_onData) { + this._html$_onData = H.functionTypeCheck(_onData, {func: 1, args: [W.Event]}); + } + }; + W._EventStreamSubscription_closure.prototype = { + call$1: function(e) { + return this.onData.call$1(H.interceptedTypeCheck(e, "$isEvent")); + }, + $signature: 22 + }; + P._AcceptStructuredClone.prototype = { + findSlot$1: function(value) { + var i, + t1 = this.values, + $length = t1.length; + for (i = 0; i < $length; ++i) + if (t1[i] === value) + return i; + C.JSArray_methods.add$1(t1, value); + C.JSArray_methods.add$1(this.copies, null); + return $length; + }, + walk$1: function(e) { + var millisSinceEpoch, t1, proto, slot, copy, l, t2, $length, i, _this = this, _box_0 = {}; + if (e == null) + return e; + if (typeof e === "boolean") + return e; + if (typeof e === "number") + return e; + if (typeof e === "string") + return e; + if (e instanceof Date) { + millisSinceEpoch = e.getTime(); + if (Math.abs(millisSinceEpoch) <= 864e13) + t1 = false; + else + t1 = true; + if (t1) + H.throwExpression(P.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch)); + return new P.DateTime(millisSinceEpoch, true); + } + if (e instanceof RegExp) + throw H.wrapException(P.UnimplementedError$("structured clone of RegExp")); + if (typeof Promise != "undefined" && e instanceof Promise) + return P.promiseToFuture(e, null); + proto = Object.getPrototypeOf(e); + if (proto === Object.prototype || proto === null) { + slot = _this.findSlot$1(e); + t1 = _this.copies; + if (slot >= t1.length) + return H.ioore(t1, slot); + copy = _box_0.copy = t1[slot]; + if (copy != null) + return copy; + copy = P.LinkedHashMap__makeEmpty(); + _box_0.copy = copy; + C.JSArray_methods.$indexSet(t1, slot, copy); + _this.forEachJsField$2(e, new P._AcceptStructuredClone_walk_closure(_box_0, _this)); + return _box_0.copy; + } + if (e instanceof Array) { + l = e; + slot = _this.findSlot$1(l); + t1 = _this.copies; + if (slot >= t1.length) + return H.ioore(t1, slot); + copy = t1[slot]; + if (copy != null) + return copy; + t2 = J.getInterceptor$asx(l); + $length = t2.get$length(l); + copy = _this.mustCopy ? new Array($length) : l; + C.JSArray_methods.$indexSet(t1, slot, copy); + for (t1 = J.getInterceptor$ax(copy), i = 0; i < $length; ++i) + t1.$indexSet(copy, i, _this.walk$1(t2.$index(l, i))); + return copy; + } + return e; + }, + convertNativeToDart_AcceptStructuredClone$2$mustCopy: function(object, mustCopy) { + this.mustCopy = true; + return this.walk$1(object); + } + }; + P._AcceptStructuredClone_walk_closure.prototype = { + call$2: function(key, value) { + var t1 = this._box_0.copy, + t2 = this.$this.walk$1(value); + J.$indexSet$ax(t1, key, t2); + return t2; + }, + $signature: 23 + }; + P.convertDartToNative_Dictionary_closure.prototype = { + call$2: function(key, value) { + this.object[key] = value; + }, + $signature: 5 + }; + P._AcceptStructuredCloneDart2Js.prototype = { + forEachJsField$2: function(object, action) { + var t1, t2, _i, key; + H.functionTypeCheck(action, {func: 1, args: [,,]}); + for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) { + key = t1[_i]; + action.call$2(key, object[key]); + } + } + }; + P.promiseToFuture_closure.prototype = { + call$1: function(r) { + return this.completer.complete$1(0, H.futureOrCheck(r, {futureOr: 1, type: this.T})); + }, + $signature: 2 + }; + P.promiseToFuture_closure0.prototype = { + call$1: function(e) { + return this.completer.completeError$1(e); + }, + $signature: 2 + }; + P._JSRandom.prototype = { + nextDouble$0: function() { + return Math.random(); + } + }; + P.SvgElement.prototype = { + get$onClick: function(receiver) { + return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]); + } + }; + N.HexCodec.prototype = { + get$encoder: function() { + return C.C_HexEncoder; + }, + $asCodec: function() { + return [[P.List, P.int], P.String]; + } + }; + R.HexEncoder.prototype = { + convert$1: function(bytes) { + H.assertSubtype(bytes, "$isList", [P.int], "$asList"); + return R._convert(bytes, 0, bytes.length); + }, + $asConverter: function() { + return [[P.List, P.int], P.String]; + } + }; + N.Logger.prototype = { + get$fullName: function() { + var t1 = this.parent, + t2 = t1 == null || t1.name === "", + t3 = this.name; + return t2 ? t3 : t1.get$fullName() + "." + t3; + }, + get$level: function() { + return C.Level_INFO_800; + }, + log$4: function(logLevel, message, error, stackTrace) { + var t1 = logLevel.value; + if (t1 >= this.get$level().value) { + if (t1 >= 2000) { + P.StackTrace_current(); + logLevel.toString$0(0); + } + t1 = this.get$fullName(); + Date.now(); + $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1; + $.$get$Logger_root()._publish$1(new N.LogRecord(logLevel, message, t1)); + } + }, + _publish$1: function(record) { + } + }; + N.Logger_Logger_closure.prototype = { + call$0: function() { + var dot, $parent, t1, + thisName = this.name; + if (C.JSString_methods.startsWith$1(thisName, ".")) + H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'")); + dot = C.JSString_methods.lastIndexOf$1(thisName, "."); + if (dot === -1) + $parent = thisName !== "" ? N.Logger_Logger("") : null; + else { + $parent = N.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); + thisName = C.JSString_methods.substring$1(thisName, dot + 1); + } + t1 = new N.Logger(thisName, $parent, new H.JsLinkedHashMap([P.String, N.Logger])); + if ($parent != null) + $parent._children.$indexSet(0, thisName, t1); + return t1; + }, + $signature: 24 + }; + N.Level.prototype = { + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof N.Level && this.value === other.value; + }, + $gt: function(_, other) { + return C.JSInt_methods.$gt(this.value, H.interceptedTypeCheck(other, "$isLevel").value); + }, + $ge: function(_, other) { + return this.value >= H.interceptedTypeCheck(other, "$isLevel").value; + }, + get$hashCode: function(_) { + return this.value; + }, + toString$0: function(_) { + return this.name; + } + }; + N.LogRecord.prototype = { + toString$0: function(_) { + return "[" + this.level.name + "] " + this.loggerName + ": " + H.S(this.message); + } + }; + M.SseClient.prototype = { + SseClient$1: function(serverUrl) { + var t1, t2, _this = this, + clientId = F.Uuid$().v1$0(); + _this._eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], P.String, null)); + _this._serverUrl = serverUrl + "?sseClientId=" + clientId; + t1 = _this._outgoingController; + new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]).listen$2$onDone(_this.get$_onOutgoingMessage(), _this.get$_onOutgoingDone()); + C.EventSource_methods.addEventListener$2(_this._eventSource, "message", _this.get$_onIncomingMessage()); + C.EventSource_methods.addEventListener$2(_this._eventSource, "control", _this.get$_onIncomingControlMessage()); + t1 = W.Event; + t2 = {func: 1, ret: -1, args: [t1]}; + W._EventStreamSubscription$(_this._eventSource, "open", H.functionTypeCheck(new M.SseClient_closure(_this), t2), false, t1); + W._EventStreamSubscription$(_this._eventSource, "error", H.functionTypeCheck(new M.SseClient_closure0(_this), t2), false, t1); + _this._startPostingMessages$0(); + }, + close$0: function(_) { + this._eventSource.close(); + this._incomingController.close$0(0); + this._outgoingController.close$0(0); + }, + _onIncomingControlMessage$1: function(message) { + var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(H.interceptedTypeCast(H.interceptedTypeCheck(message, "$isEvent"), "$isMessageEvent").data, true); + if (J.$eq$(data, "close")) + this.close$0(0); + else + throw H.wrapException(P.UnsupportedError$('Illegal Control Message "' + H.S(data) + '"')); + }, + _onIncomingMessage$1: function(message) { + this._incomingController.add$1(0, H.stringTypeCast(C.C_JsonCodec.decode$2$reviver(0, H.stringTypeCast(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(H.interceptedTypeCast(H.interceptedTypeCheck(message, "$isEvent"), "$isMessageEvent").data, true)), null))); + }, + _onOutgoingDone$0: function() { + this.close$0(0); + }, + _onOutgoingMessage$1: function(message) { + var $async$goto = 0, + $async$completer = P._makeAsyncAwaitCompleter(null), + $async$self = this; + var $async$_onOutgoingMessage$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return P._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._messages.add$1(0, message); + // implicit return + return P._asyncReturn(null, $async$completer); + } + }); + return P._asyncStartSync($async$_onOutgoingMessage$1, $async$completer); + }, + _startPostingMessages$0: function() { + var $async$goto = 0, + $async$completer = P._makeAsyncAwaitCompleter(null), + $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, message, e, e0, t2, exception, t3, t4, t1, $async$exception, $async$temp1; + var $async$_startPostingMessages$0 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._messages; + t1 = new P._StreamIterator(new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]), [null]); + $async$handler = 2; + t2 = $async$self._logger; + case 5: + // for condition + $async$temp1 = H; + $async$goto = 7; + return P._asyncAwait(t1.moveNext$0(), $async$_startPostingMessages$0); + case 7: + // returning from await. + if (!$async$temp1.boolConversionCheck($async$result)) { + // goto after for + $async$goto = 6; + break; + } + message = t1.get$current(); + $async$handler = 9; + $async$goto = 12; + return P._asyncAwait(W.HttpRequest_request($async$self._serverUrl, "POST", C.C_JsonCodec.encode$2$toEncodable(message, null), true), $async$_startPostingMessages$0); + case 12: + // returning from await. + $async$handler = 2; + // goto after finally + $async$goto = 11; + break; + case 9: + // catch + $async$handler = 8; + $async$exception = $async$currentError; + t3 = H.unwrapException($async$exception); + t4 = J.getInterceptor$(t3); + if (!!t4.$isJsonUnsupportedObjectError) { + e = t3; + t2.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null); + } else if (!!t4.$isArgumentError) { + e0 = t3; + t2.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null); + } else + throw $async$exception; + // goto after finally + $async$goto = 11; + break; + case 8: + // uncaught + // goto uncaught + $async$goto = 2; + break; + case 11: + // after finally + // goto for condition + $async$goto = 5; + break; + case 6: + // after for + $async$next.push(4); + // goto finally + $async$goto = 3; + break; + case 2: + // uncaught + $async$next = [1]; + case 3: + // finally + $async$handler = 1; + $async$goto = 13; + return P._asyncAwait(t1.cancel$0(), $async$_startPostingMessages$0); + case 13: + // returning from await. + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 4: + // after finally + // implicit return + return P._asyncReturn(null, $async$completer); + case 1: + // rethrow + return P._asyncRethrow($async$currentError, $async$completer); + } + }); + return P._asyncStartSync($async$_startPostingMessages$0, $async$completer); + } + }; + M.SseClient_closure.prototype = { + call$1: function(_) { + var t1 = this.$this._errorTimer; + if (t1 != null) + t1.cancel$0(); + }, + $signature: 11 + }; + M.SseClient_closure0.prototype = { + call$1: function(error) { + var t1 = this.$this, + t2 = t1._errorTimer; + t2 = t2 == null ? null : t2._handle != null; + if (t2 !== true) + t1._errorTimer = P.Timer_Timer(C.Duration_5000000, new M.SseClient__closure(t1, error)); + }, + $signature: 11 + }; + M.SseClient__closure.prototype = { + call$0: function() { + var t3, + t1 = this.$this, + t2 = t1._incomingController, + error = this.error; + if (t2._state >= 4) + H.throwExpression(t2._badEventState$0()); + if (error == null) + error = new P.NullThrownError(); + t3 = t2._state; + if ((t3 & 1) !== 0) + t2._sendError$2(error, null); + else if ((t3 & 3) === 0) + t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, null)); + t1._eventSource.close(); + }, + $signature: 1 + }; + R.StreamChannelMixin.prototype = {}; + F.Uuid.prototype = { + Uuid$1$options: function(_box_0) { + var t1, t2, i, hex, t3, v1PositionalArgs, v1NamedArgs, _this = this, + _s19_ = "v1rngPositionalArgs", + _s14_ = "v1rngNamedArgs", + _s18_ = "grngPositionalArgs", + _s13_ = "grngNamedArgs", + options = _box_0.options; + if (!(options != null)) + options = new H.JsLinkedHashMap([P.String, null]); + _box_0.options = options; + t1 = new Array(256); + t1.fixed$length = Array; + t2 = P.String; + _this.set$_byteToHex(H.setRuntimeTypeInfo(t1, [t2])); + t1 = P.int; + _this.set$_hexToByte(new H.JsLinkedHashMap([t2, t1])); + for (t1 = [t1], t2 = [P.List, P.int], i = 0; i < 256; ++i) { + hex = H.setRuntimeTypeInfo([], t1); + C.JSArray_methods.add$1(hex, i); + t3 = _this._byteToHex; + H.assertSubtypeOfRuntimeType(hex, t2); + (t3 && C.JSArray_methods).$indexSet(t3, i, C.C_HexCodec.get$encoder().convert$1(hex)); + _this._hexToByte.$indexSet(0, _this._byteToHex[i], i); + } + v1PositionalArgs = _box_0.options.$index(0, _s19_) != null ? _box_0.options.$index(0, _s19_) : []; + v1NamedArgs = _box_0.options.$index(0, _s14_) != null ? H.subtypeCast(_box_0.options.$index(0, _s14_), "$isMap", [P.Symbol, null], "$asMap") : C.Map_empty; + _this._seedBytes = _box_0.options.$index(0, "v1rng") != null ? P.Function_apply(H.interceptedTypeCheck(_box_0.options.$index(0, "v1rng"), "$isFunction"), H.listTypeCheck(v1PositionalArgs), v1NamedArgs) : U.UuidUtil_mathRNG(); + if (_box_0.options.$index(0, _s18_) != null) + _box_0.options.$index(0, _s18_); + if (_box_0.options.$index(0, _s13_) != null) + H.subtypeCast(_box_0.options.$index(0, _s13_), "$isMap", [P.Symbol, null], "$asMap"); + _this._nodeId = [J.$or$bn(J.$index$asx(_this._seedBytes, 0), 1), J.$index$asx(_this._seedBytes, 1), J.$index$asx(_this._seedBytes, 2), J.$index$asx(_this._seedBytes, 3), J.$index$asx(_this._seedBytes, 4), J.$index$asx(_this._seedBytes, 5)]; + t1 = J.$shl$n(J.$index$asx(_this._seedBytes, 6), 8); + t2 = J.$index$asx(_this._seedBytes, 7); + if (typeof t2 !== "number") + return H.iae(t2); + _this._clockSeq = (t1 | t2) & 262143; + }, + v1$0: function() { + var t2, buf, options, clockSeq, mSecs, nSecs, dt, t3, tl, tmh, node, n, _this = this, + _s8_ = "clockSeq", + _s5_ = "nSecs", + t1 = new Array(16); + t1.fixed$length = Array; + t2 = P.int; + buf = H.setRuntimeTypeInfo(t1, [t2]); + options = new H.JsLinkedHashMap([P.String, null]); + clockSeq = options.$index(0, _s8_) != null ? options.$index(0, _s8_) : _this._clockSeq; + mSecs = options.$index(0, "mSecs") != null ? options.$index(0, "mSecs") : Date.now(); + nSecs = options.$index(0, _s5_) != null ? options.$index(0, _s5_) : _this._lastNSecs + 1; + t1 = J.getInterceptor$n(mSecs); + dt = J.$add$ansx(t1.$sub(mSecs, _this._lastMSecs), J.$div$n(J.$sub$n(nSecs, _this._lastNSecs), 10000)); + t3 = J.getInterceptor$n(dt); + if (t3.$lt(dt, 0) && options.$index(0, _s8_) == null) + clockSeq = J.$and$bn(J.$add$ansx(clockSeq, 1), 16383); + if ((t3.$lt(dt, 0) || t1.$gt(mSecs, _this._lastMSecs)) && options.$index(0, _s5_) == null) + nSecs = 0; + if (J.$ge$n(nSecs, 10000)) + throw H.wrapException(P.Exception_Exception("uuid.v1(): Can't create more than 10M uuids/sec")); + H.intTypeCheck(mSecs); + _this._lastMSecs = mSecs; + H.intTypeCheck(nSecs); + _this._lastNSecs = nSecs; + _this._clockSeq = clockSeq; + mSecs += 122192928e5; + tl = C.JSInt_methods.$mod((mSecs & 268435455) * 10000 + nSecs, 4294967296); + C.JSArray_methods.$indexSet(buf, 0, C.JSInt_methods._shrOtherPositive$1(tl, 24) & 255); + C.JSArray_methods.$indexSet(buf, 1, C.JSInt_methods._shrOtherPositive$1(tl, 16) & 255); + C.JSArray_methods.$indexSet(buf, 2, C.JSInt_methods._shrOtherPositive$1(tl, 8) & 255); + C.JSArray_methods.$indexSet(buf, 3, tl & 255); + tmh = C.JSDouble_methods.floor$0(mSecs / 4294967296 * 10000) & 268435455; + C.JSArray_methods.$indexSet(buf, 4, tmh >>> 8 & 255); + C.JSArray_methods.$indexSet(buf, 5, tmh & 255); + C.JSArray_methods.$indexSet(buf, 6, tmh >>> 24 & 15 | 16); + C.JSArray_methods.$indexSet(buf, 7, tmh >>> 16 & 255); + t1 = J.getInterceptor$n(clockSeq); + C.JSArray_methods.$indexSet(buf, 8, (t1.$shr(clockSeq, 8) | 128) >>> 0); + C.JSArray_methods.$indexSet(buf, 9, H.intTypeCheck(t1.$and(clockSeq, 255))); + node = options.$index(0, "node") != null ? options.$index(0, "node") : _this._nodeId; + for (t1 = J.getInterceptor$asx(node), n = 0; n < 6; ++n) + C.JSArray_methods.$indexSet(buf, 10 + n, H.intTypeCheck(t1.$index(node, n))); + H.assertSubtype(buf, "$isList", [t2], "$asList"); + t1 = _this._byteToHex; + t1 = H.S((t1 && C.JSArray_methods).$index(t1, buf[0])); + t2 = _this._byteToHex; + t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[1])); + t1 = _this._byteToHex; + t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[2])); + t2 = _this._byteToHex; + t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[3])) + "-"; + t1 = _this._byteToHex; + t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[4])); + t2 = _this._byteToHex; + t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[5])) + "-"; + t1 = _this._byteToHex; + t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[6])); + t2 = _this._byteToHex; + t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[7])) + "-"; + t1 = _this._byteToHex; + t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[8])); + t2 = _this._byteToHex; + t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[9])) + "-"; + t1 = _this._byteToHex; + t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[10])); + t2 = _this._byteToHex; + t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[11])); + t1 = _this._byteToHex; + t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[12])); + t2 = _this._byteToHex; + t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[13])); + t1 = _this._byteToHex; + t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[14])); + t2 = _this._byteToHex; + return t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[15])); + }, + set$_byteToHex: function(_byteToHex) { + this._byteToHex = H.assertSubtype(_byteToHex, "$isList", [P.String], "$asList"); + }, + set$_hexToByte: function(_hexToByte) { + this._hexToByte = H.assertSubtype(_hexToByte, "$isMap", [P.String, P.int], "$asMap"); + } + }; + E.main_closure.prototype = { + call$1: function(_) { + H.interceptedTypeCheck(_, "$isMouseEvent"); + this.channel._outgoingController.close$0(0); + }, + $signature: 25 + }; + E.main_closure0.prototype = { + call$1: function(s) { + var t1 = this.channel._outgoingController; + t1.add$1(0, H.assertSubtypeOfRuntimeType(H.stringTypeCheck(s), H.getTypeArgumentByIndex(t1, 0))); + }, + $signature: 26 + }; + (function aliases() { + var _ = J.Interceptor.prototype; + _.super$Interceptor$toString = _.toString$0; + _.super$Interceptor$noSuchMethod = _.noSuchMethod$1; + _ = J.JavaScriptObject.prototype; + _.super$JavaScriptObject$toString = _.toString$0; + })(); + (function installTearOffs() { + var _static_1 = hunkHelpers._static_1, + _static_0 = hunkHelpers._static_0, + _static = hunkHelpers.installStaticTearOff, + _instance = hunkHelpers.installInstanceTearOff, + _instance_0_u = hunkHelpers._instance_0u, + _instance_1_u = hunkHelpers._instance_1u; + _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 6); + _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6); + _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6); + _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); + _static(P, "async___nullErrorHandler$closure", 1, null, ["call$2", "call$1"], ["_nullErrorHandler", function(error) { + return P._nullErrorHandler(error, null); + }], 3, 0); + _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); + _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 3, 0); + _instance(P._Future.prototype, "get$_completeError", 0, 1, function() { + return [null]; + }, ["call$2", "call$1"], ["_completeError$2", "_completeError$1"], 3, 0); + var _; + _instance_0_u(_ = P._ControllerSubscription.prototype, "get$_onPause", "_onPause$0", 0); + _instance_0_u(_, "get$_onResume", "_onResume$0", 0); + _instance_0_u(_ = P._BufferingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0); + _instance_0_u(_, "get$_onResume", "_onResume$0", 0); + _instance_1_u(_ = P._StreamIterator.prototype, "get$_onData", "_onData$1", 20); + _instance(_, "get$_onError", 0, 1, function() { + return [null]; + }, ["call$2", "call$1"], ["_onError$2", "_onError$1"], 3, 0); + _instance_0_u(_, "get$_onDone", "_onDone$0", 0); + _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4); + _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 10); + _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 10); + _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0); + _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 2); + })(); + (function inheritance() { + var _mixin = hunkHelpers.mixin, + _inherit = hunkHelpers.inherit, + _inheritMany = hunkHelpers.inheritMany; + _inherit(P.Object, null); + _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.Symbol0, P.MapView, H.ConstantMap, H.JSInvocationMirror, H.Closure, H.TypeErrorDecoder, P.Error, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P._UnmodifiableMapMixin, P.Codec, P._JsonStringifier, P.bool, P.DateTime, P.num, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.List, P.Null, P.StackTrace, P.String, P.StringBuffer, P.Symbol, P._AcceptStructuredClone, P._JSRandom, N.Logger, N.Level, N.LogRecord, R.StreamChannelMixin, F.Uuid]); + _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]); + _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); + _inherit(J.JSUnmodifiableArray, J.JSArray); + _inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]); + _inherit(H.EfficientLengthIterable, P.Iterable); + _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]); + _inherit(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P.MapView); + _inherit(P.UnmodifiableMapView, P._UnmodifiableMapView_MapView__UnmodifiableMapMixin); + _inherit(H.ConstantMapView, P.UnmodifiableMapView); + _inherit(H.ConstantStringMap, H.ConstantMap); + _inheritMany(H.Closure, [H.Primitives_functionNoSuchMethod_closure, H.unwrapException_saveStackTrace, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncComplete_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P._symbolMapToStringMap_closure, P.NoSuchMethodError_toString_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, N.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, E.main_closure, E.main_closure0]); + _inheritMany(P.Error, [H.NullError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.TypeErrorImplementation, H.CastErrorImplementation, H.RuntimeError, P.AssertionError, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.NoSuchMethodError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); + _inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]); + _inherit(H._AssertionError, P.AssertionError); + _inherit(P.MapBase, P.MapMixin); + _inheritMany(P.MapBase, [H.JsLinkedHashMap, P._JsonMap]); + _inherit(H.NativeTypedArray, H.NativeTypedData); + _inheritMany(H.NativeTypedArray, [H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); + _inherit(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); + _inherit(H.NativeTypedArrayOfDouble, H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inherit(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); + _inherit(H.NativeTypedArrayOfInt, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inheritMany(H.NativeTypedArrayOfInt, [H.NativeInt16List, H.NativeInt32List, H.NativeInt8List, H.NativeUint16List, H.NativeUint32List, H.NativeUint8ClampedList, H.NativeUint8List]); + _inherit(P._AsyncCompleter, P._Completer); + _inherit(P._AsyncStreamController, P._StreamController); + _inheritMany(P.Stream, [P._StreamImpl, W._EventStream]); + _inherit(P._ControllerStream, P._StreamImpl); + _inherit(P._ControllerSubscription, P._BufferingStreamSubscription); + _inheritMany(P._DelayedEvent, [P._DelayedData, P._DelayedError]); + _inherit(P._StreamImplEvents, P._PendingEvents); + _inherit(P._RootZone, P._Zone); + _inherit(P._JsonMapKeyIterable, H.ListIterable); + _inherit(P.Converter, P.StreamTransformerBase); + _inherit(P.JsonCyclicError, P.JsonUnsupportedObjectError); + _inheritMany(P.Codec, [P.JsonCodec, N.HexCodec]); + _inheritMany(P.Converter, [P.JsonEncoder, P.JsonDecoder, R.HexEncoder]); + _inherit(P._JsonStringStringifier, P._JsonStringifier); + _inheritMany(P.num, [P.double, P.int]); + _inheritMany(P.ArgumentError, [P.RangeError, P.IndexError]); + _inheritMany(W.EventTarget, [W.Node, W.EventSource, W.HttpRequestEventTarget]); + _inherit(W.Element, W.Node); + _inheritMany(W.Element, [W.HtmlElement, P.SvgElement]); + _inheritMany(W.HtmlElement, [W.AnchorElement, W.AreaElement, W.FormElement, W.SelectElement]); + _inherit(W.HttpRequest, W.HttpRequestEventTarget); + _inheritMany(W.Event, [W.MessageEvent, W.UIEvent, W.ProgressEvent]); + _inherit(W.MouseEvent, W.UIEvent); + _inherit(W._ElementEventStreamImpl, W._EventStream); + _inherit(W._EventStreamSubscription, P.StreamSubscription); + _inherit(P._AcceptStructuredCloneDart2Js, P._AcceptStructuredClone); + _inherit(M.SseClient, R.StreamChannelMixin); + _mixin(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, P.ListMixin); + _mixin(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin); + _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, P.ListMixin); + _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin); + _mixin(P._AsyncStreamController, P._AsyncStreamControllerDispatch); + _mixin(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P._UnmodifiableMapMixin); + })(); + var init = {mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, mangledNames: {}, getTypeFromName: getGlobalFromName, metadata: [], types: [{func: 1, ret: -1}, {func: 1, ret: P.Null}, {func: 1, ret: -1, args: [,]}, {func: 1, ret: -1, args: [P.Object], opt: [P.StackTrace]}, {func: 1, args: [,]}, {func: 1, ret: P.Null, args: [,,]}, {func: 1, ret: -1, args: [{func: 1, ret: -1}]}, {func: 1, ret: P.Null, args: [,]}, {func: 1, ret: P.Null, args: [P.Symbol,,]}, {func: 1, ret: P.String, args: [P.int]}, {func: 1, ret: -1, args: [W.Event]}, {func: 1, ret: P.Null, args: [W.Event]}, {func: 1, ret: P.Null, args: [P.String,,]}, {func: 1, args: [, P.String]}, {func: 1, args: [P.String]}, {func: 1, ret: P.Null, args: [{func: 1, ret: -1}]}, {func: 1, ret: P.Null, args: [, P.StackTrace]}, {func: 1, ret: P.Null, args: [P.int,,]}, {func: 1, ret: P.Null, args: [,], opt: [P.StackTrace]}, {func: 1, ret: [P._Future,,], args: [,]}, {func: 1, ret: -1, args: [P.Object]}, {func: 1, ret: P.Null, args: [W.ProgressEvent]}, {func: 1, args: [W.Event]}, {func: 1, args: [,,]}, {func: 1, ret: N.Logger}, {func: 1, ret: P.Null, args: [W.MouseEvent]}, {func: 1, ret: P.Null, args: [P.String]}], interceptorsByTag: null, leafTags: null}; + (function constants() { + var makeConstList = hunkHelpers.makeConstList; + C.EventSource_methods = W.EventSource.prototype; + C.HttpRequest_methods = W.HttpRequest.prototype; + C.Interceptor_methods = J.Interceptor.prototype; + C.JSArray_methods = J.JSArray.prototype; + C.JSDouble_methods = J.JSDouble.prototype; + C.JSInt_methods = J.JSInt.prototype; + C.JSNull_methods = J.JSNull.prototype; + C.JSNumber_methods = J.JSNumber.prototype; + C.JSString_methods = J.JSString.prototype; + C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; + C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; + C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; + C.C_HexCodec = new N.HexCodec(); + C.C_HexEncoder = new R.HexEncoder(); + C.C_JS_CONST = function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); +}; + C.C_JS_CONST0 = function() { var toStringFunction = Object.prototype.toString; function getTag(o) { var s = toStringFunction.call(o); @@ -6447,8 +7205,61 @@ C.V=function() { getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, prototypeForTag: prototypeForTag, discriminator: discriminator }; -} -C.W=function(hooks) { +}; + C.C_JS_CONST6 = function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var ua = navigator.userAgent; + if (ua.indexOf("DumpRenderTree") >= 0) return hooks; + if (ua.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; +}; + C.C_JS_CONST1 = function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); +}; + C.C_JS_CONST2 = function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; +}; + C.C_JS_CONST5 = function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; +}; + C.C_JS_CONST4 = function(hooks) { var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; if (userAgent.indexOf("Trident/") == -1) return hooks; var getTag = hooks.getTag; @@ -6476,168 +7287,192 @@ C.W=function(hooks) { } hooks.getTag = getTagIE; hooks.prototypeForTag = prototypeForTagIE; -} -C.X=function(hooks) { - var getTag = hooks.getTag; - var prototypeForTag = hooks.prototypeForTag; - function getTagFixed(o) { - var tag = getTag(o); - if (tag == "Document") { - if (!!o.xmlVersion) return "!Document"; - return "!HTMLDocument"; +}; + C.C_JS_CONST3 = function(hooks) { return hooks; } +; + C.C_JsonCodec = new P.JsonCodec(); + C.C_OutOfMemoryError = new P.OutOfMemoryError(); + C.C__DelayedDone = new P._DelayedDone(); + C.C__JSRandom = new P._JSRandom(); + C.C__RootZone = new P._RootZone(); + C.Duration_0 = new P.Duration(0); + C.Duration_5000000 = new P.Duration(5000000); + C.JsonDecoder_null = new P.JsonDecoder(null); + C.JsonEncoder_null = new P.JsonEncoder(null); + C.Level_INFO_800 = new N.Level("INFO", 800); + C.Level_WARNING_900 = new N.Level("WARNING", 900); + C.List_empty = makeConstList([]); + C.List_empty0 = H.setRuntimeTypeInfo(makeConstList([]), [P.Symbol]); + C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty0, [P.Symbol, null]); + C.Symbol_call = new H.Symbol0("call"); + })(); + (function staticFields() { + $.Closure_functionCounter = 0; + $.BoundClosure_selfFieldNameCache = null; + $.BoundClosure_receiverFieldNameCache = null; + $._inTypeAssertion = false; + $.getTagFunction = null; + $.alternateTagFunction = null; + $.prototypeForTagFunction = null; + $.dispatchRecordsForInstanceTags = null; + $.interceptorsForUncacheableTags = null; + $.initNativeDispatchFlag = null; + $._nextCallback = null; + $._lastCallback = null; + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + $.Zone__current = C.C__RootZone; + $._toStringVisiting = []; + $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(P.String, N.Logger); + $.LogRecord__nextNumber = 0; + })(); + (function lazyInitializers() { + var _lazy = hunkHelpers.lazy; + _lazy($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() { + return H.getIsolateAffinityTag("_$dart_dartClosure"); + }); + _lazy($, "JS_INTEROP_INTERCEPTOR_TAG", "$get$JS_INTEROP_INTERCEPTOR_TAG", function() { + return H.getIsolateAffinityTag("_$dart_js"); + }); + _lazy($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({ + toString: function() { + return "$receiver$"; + } + })); + }); + _lazy($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({$method$: null, + toString: function() { + return "$receiver$"; + } + })); + }); + _lazy($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(null)); + }); + _lazy($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { + return H.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = '$arguments$'; + try { + null.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }()); + }); + _lazy($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(void 0)); + }); + _lazy($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { + return H.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = '$arguments$'; + try { + (void 0).$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }()); + }); + _lazy($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(null)); + }); + _lazy($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() { + return H.TypeErrorDecoder_extractPattern(function() { + try { + null.$method$; + } catch (e) { + return e.message; + } + }()); + }); + _lazy($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(void 0)); + }); + _lazy($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() { + return H.TypeErrorDecoder_extractPattern(function() { + try { + (void 0).$method$; + } catch (e) { + return e.message; + } + }()); + }); + _lazy($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() { + return P._AsyncRun__initializeScheduleImmediate(); + }); + _lazy($, "Future__nullFuture", "$get$Future__nullFuture", function() { + return P._Future$zoneValue(null, C.C__RootZone, P.Null); + }); + _lazy($, "Future__falseFuture", "$get$Future__falseFuture", function() { + return P._Future$zoneValue(false, C.C__RootZone, P.bool); + }); + _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() { + return new Error().stack != void 0; + }); + _lazy($, "Logger_root", "$get$Logger_root", function() { + return N.Logger_Logger(""); + }); + })(); + (function nativeSupport() { + !function() { + var intern = function(s) { + var o = {}; + o[s] = 1; + return Object.keys(hunkHelpers.convertToFastObject(o))[0]; + }; + init.getIsolateTag = function(name) { + return intern("___dart_" + name + init.isolateTag); + }; + var tableProperty = "___dart_isolate_tags_"; + var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.create(null)); + var rootProperty = "_ZxYxX"; + for (var i = 0;; i++) { + var property = intern(rootProperty + "_" + i + "_"); + if (!(property in usedProperties)) { + usedProperties[property] = 1; + init.isolateTag = property; + break; + } + } + init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); + }(); + hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: J.Interceptor, Blob: J.Interceptor, DOMError: J.Interceptor, File: J.Interceptor, MediaError: J.Interceptor, NavigatorUserMediaError: J.Interceptor, OverconstrainedError: J.Interceptor, PositionError: J.Interceptor, SQLError: J.Interceptor, DataView: H.NativeTypedData, ArrayBufferView: H.NativeTypedData, Float32Array: H.NativeTypedArrayOfDouble, Float64Array: H.NativeTypedArrayOfDouble, Int16Array: H.NativeInt16List, Int32Array: H.NativeInt32List, Int8Array: H.NativeInt8List, Uint16Array: H.NativeUint16List, Uint32Array: H.NativeUint32List, Uint8ClampedArray: H.NativeUint8ClampedList, CanvasPixelArray: H.NativeUint8ClampedList, Uint8Array: H.NativeUint8List, HTMLAudioElement: W.HtmlElement, HTMLBRElement: W.HtmlElement, HTMLBaseElement: W.HtmlElement, HTMLBodyElement: W.HtmlElement, HTMLButtonElement: W.HtmlElement, HTMLCanvasElement: W.HtmlElement, HTMLContentElement: W.HtmlElement, HTMLDListElement: W.HtmlElement, HTMLDataElement: W.HtmlElement, HTMLDataListElement: W.HtmlElement, HTMLDetailsElement: W.HtmlElement, HTMLDialogElement: W.HtmlElement, HTMLDivElement: W.HtmlElement, HTMLEmbedElement: W.HtmlElement, HTMLFieldSetElement: W.HtmlElement, HTMLHRElement: W.HtmlElement, HTMLHeadElement: W.HtmlElement, HTMLHeadingElement: W.HtmlElement, HTMLHtmlElement: W.HtmlElement, HTMLIFrameElement: W.HtmlElement, HTMLImageElement: W.HtmlElement, HTMLInputElement: W.HtmlElement, HTMLLIElement: W.HtmlElement, HTMLLabelElement: W.HtmlElement, HTMLLegendElement: W.HtmlElement, HTMLLinkElement: W.HtmlElement, HTMLMapElement: W.HtmlElement, HTMLMediaElement: W.HtmlElement, HTMLMenuElement: W.HtmlElement, HTMLMetaElement: W.HtmlElement, HTMLMeterElement: W.HtmlElement, HTMLModElement: W.HtmlElement, HTMLOListElement: W.HtmlElement, HTMLObjectElement: W.HtmlElement, HTMLOptGroupElement: W.HtmlElement, HTMLOptionElement: W.HtmlElement, HTMLOutputElement: W.HtmlElement, HTMLParagraphElement: W.HtmlElement, HTMLParamElement: W.HtmlElement, HTMLPictureElement: W.HtmlElement, HTMLPreElement: W.HtmlElement, HTMLProgressElement: W.HtmlElement, HTMLQuoteElement: W.HtmlElement, HTMLScriptElement: W.HtmlElement, HTMLShadowElement: W.HtmlElement, HTMLSlotElement: W.HtmlElement, HTMLSourceElement: W.HtmlElement, HTMLSpanElement: W.HtmlElement, HTMLStyleElement: W.HtmlElement, HTMLTableCaptionElement: W.HtmlElement, HTMLTableCellElement: W.HtmlElement, HTMLTableDataCellElement: W.HtmlElement, HTMLTableHeaderCellElement: W.HtmlElement, HTMLTableColElement: W.HtmlElement, HTMLTableElement: W.HtmlElement, HTMLTableRowElement: W.HtmlElement, HTMLTableSectionElement: W.HtmlElement, HTMLTemplateElement: W.HtmlElement, HTMLTextAreaElement: W.HtmlElement, HTMLTimeElement: W.HtmlElement, HTMLTitleElement: W.HtmlElement, HTMLTrackElement: W.HtmlElement, HTMLUListElement: W.HtmlElement, HTMLUnknownElement: W.HtmlElement, HTMLVideoElement: W.HtmlElement, HTMLDirectoryElement: W.HtmlElement, HTMLFontElement: W.HtmlElement, HTMLFrameElement: W.HtmlElement, HTMLFrameSetElement: W.HtmlElement, HTMLMarqueeElement: W.HtmlElement, HTMLElement: W.HtmlElement, HTMLAnchorElement: W.AnchorElement, HTMLAreaElement: W.AreaElement, DOMException: W.DomException, Element: W.Element, AbortPaymentEvent: W.Event, AnimationEvent: W.Event, AnimationPlaybackEvent: W.Event, ApplicationCacheErrorEvent: W.Event, BackgroundFetchClickEvent: W.Event, BackgroundFetchEvent: W.Event, BackgroundFetchFailEvent: W.Event, BackgroundFetchedEvent: W.Event, BeforeInstallPromptEvent: W.Event, BeforeUnloadEvent: W.Event, BlobEvent: W.Event, CanMakePaymentEvent: W.Event, ClipboardEvent: W.Event, CloseEvent: W.Event, CustomEvent: W.Event, DeviceMotionEvent: W.Event, DeviceOrientationEvent: W.Event, ErrorEvent: W.Event, ExtendableEvent: W.Event, ExtendableMessageEvent: W.Event, FetchEvent: W.Event, FontFaceSetLoadEvent: W.Event, ForeignFetchEvent: W.Event, GamepadEvent: W.Event, HashChangeEvent: W.Event, InstallEvent: W.Event, MediaEncryptedEvent: W.Event, MediaKeyMessageEvent: W.Event, MediaQueryListEvent: W.Event, MediaStreamEvent: W.Event, MediaStreamTrackEvent: W.Event, MIDIConnectionEvent: W.Event, MIDIMessageEvent: W.Event, MutationEvent: W.Event, NotificationEvent: W.Event, PageTransitionEvent: W.Event, PaymentRequestEvent: W.Event, PaymentRequestUpdateEvent: W.Event, PopStateEvent: W.Event, PresentationConnectionAvailableEvent: W.Event, PresentationConnectionCloseEvent: W.Event, PromiseRejectionEvent: W.Event, PushEvent: W.Event, RTCDataChannelEvent: W.Event, RTCDTMFToneChangeEvent: W.Event, RTCPeerConnectionIceEvent: W.Event, RTCTrackEvent: W.Event, SecurityPolicyViolationEvent: W.Event, SensorErrorEvent: W.Event, SpeechRecognitionError: W.Event, SpeechRecognitionEvent: W.Event, SpeechSynthesisEvent: W.Event, StorageEvent: W.Event, SyncEvent: W.Event, TrackEvent: W.Event, TransitionEvent: W.Event, WebKitTransitionEvent: W.Event, VRDeviceEvent: W.Event, VRDisplayEvent: W.Event, VRSessionEvent: W.Event, MojoInterfaceRequestEvent: W.Event, USBConnectionEvent: W.Event, IDBVersionChangeEvent: W.Event, AudioProcessingEvent: W.Event, OfflineAudioCompletionEvent: W.Event, WebGLContextEvent: W.Event, Event: W.Event, InputEvent: W.Event, EventSource: W.EventSource, MessagePort: W.EventTarget, EventTarget: W.EventTarget, HTMLFormElement: W.FormElement, XMLHttpRequest: W.HttpRequest, XMLHttpRequestEventTarget: W.HttpRequestEventTarget, MessageEvent: W.MessageEvent, MouseEvent: W.MouseEvent, DragEvent: W.MouseEvent, PointerEvent: W.MouseEvent, WheelEvent: W.MouseEvent, Document: W.Node, HTMLDocument: W.Node, Node: W.Node, ProgressEvent: W.ProgressEvent, ResourceProgressEvent: W.ProgressEvent, HTMLSelectElement: W.SelectElement, CompositionEvent: W.UIEvent, FocusEvent: W.UIEvent, KeyboardEvent: W.UIEvent, TextEvent: W.UIEvent, TouchEvent: W.UIEvent, UIEvent: W.UIEvent, SVGAElement: P.SvgElement, SVGAnimateElement: P.SvgElement, SVGAnimateMotionElement: P.SvgElement, SVGAnimateTransformElement: P.SvgElement, SVGAnimationElement: P.SvgElement, SVGCircleElement: P.SvgElement, SVGClipPathElement: P.SvgElement, SVGDefsElement: P.SvgElement, SVGDescElement: P.SvgElement, SVGDiscardElement: P.SvgElement, SVGEllipseElement: P.SvgElement, SVGFEBlendElement: P.SvgElement, SVGFEColorMatrixElement: P.SvgElement, SVGFEComponentTransferElement: P.SvgElement, SVGFECompositeElement: P.SvgElement, SVGFEConvolveMatrixElement: P.SvgElement, SVGFEDiffuseLightingElement: P.SvgElement, SVGFEDisplacementMapElement: P.SvgElement, SVGFEDistantLightElement: P.SvgElement, SVGFEFloodElement: P.SvgElement, SVGFEFuncAElement: P.SvgElement, SVGFEFuncBElement: P.SvgElement, SVGFEFuncGElement: P.SvgElement, SVGFEFuncRElement: P.SvgElement, SVGFEGaussianBlurElement: P.SvgElement, SVGFEImageElement: P.SvgElement, SVGFEMergeElement: P.SvgElement, SVGFEMergeNodeElement: P.SvgElement, SVGFEMorphologyElement: P.SvgElement, SVGFEOffsetElement: P.SvgElement, SVGFEPointLightElement: P.SvgElement, SVGFESpecularLightingElement: P.SvgElement, SVGFESpotLightElement: P.SvgElement, SVGFETileElement: P.SvgElement, SVGFETurbulenceElement: P.SvgElement, SVGFilterElement: P.SvgElement, SVGForeignObjectElement: P.SvgElement, SVGGElement: P.SvgElement, SVGGeometryElement: P.SvgElement, SVGGraphicsElement: P.SvgElement, SVGImageElement: P.SvgElement, SVGLineElement: P.SvgElement, SVGLinearGradientElement: P.SvgElement, SVGMarkerElement: P.SvgElement, SVGMaskElement: P.SvgElement, SVGMetadataElement: P.SvgElement, SVGPathElement: P.SvgElement, SVGPatternElement: P.SvgElement, SVGPolygonElement: P.SvgElement, SVGPolylineElement: P.SvgElement, SVGRadialGradientElement: P.SvgElement, SVGRectElement: P.SvgElement, SVGScriptElement: P.SvgElement, SVGSetElement: P.SvgElement, SVGStopElement: P.SvgElement, SVGStyleElement: P.SvgElement, SVGElement: P.SvgElement, SVGSVGElement: P.SvgElement, SVGSwitchElement: P.SvgElement, SVGSymbolElement: P.SvgElement, SVGTSpanElement: P.SvgElement, SVGTextContentElement: P.SvgElement, SVGTextElement: P.SvgElement, SVGTextPathElement: P.SvgElement, SVGTextPositioningElement: P.SvgElement, SVGTitleElement: P.SvgElement, SVGUseElement: P.SvgElement, SVGViewElement: P.SvgElement, SVGGradientElement: P.SvgElement, SVGComponentTransferFunctionElement: P.SvgElement, SVGFEDropShadowElement: P.SvgElement, SVGMPathElement: P.SvgElement}); + hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, SQLError: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLIFrameElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, DOMException: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, EventSource: true, MessagePort: true, EventTarget: false, HTMLFormElement: true, XMLHttpRequest: true, XMLHttpRequestEventTarget: false, MessageEvent: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, HTMLDocument: true, Node: false, ProgressEvent: true, ResourceProgressEvent: true, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true}); + H.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; + H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + H.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; + H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + H.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; + })(); + convertAllToFastObject(holders); + convertToFastObject($); + (function(callback) { + if (typeof document === "undefined") { + callback(null); + return; } - return tag; - } - function prototypeForTagFixed(tag) { - if (tag == "Document") return null; - return prototypeForTag(tag); - } - hooks.getTag = getTagFixed; - hooks.prototypeForTag = prototypeForTagFixed; -} -C.y=function getTagFallback(o) { - var s = Object.prototype.toString.call(o); - return s.substring(8, s.length - 1); -} -C.z=new P.i7(null,null) -C.Z=new P.i9(null) -C.a_=new P.ia(null,null) -C.f=new P.ib(!1) -C.A=new P.ic(255) -C.a0=new N.bh("INFO",800) -C.a1=new N.bh("OFF",2000) -C.a2=new N.bh("WARNING",900) -C.B=H.o(I.a1([127,2047,65535,1114111]),[P.c]) -C.i=H.o(I.a1([0,0,32776,33792,1,10240,0,0]),[P.c]) -C.j=H.o(I.a1([0,0,65490,45055,65535,34815,65534,18431]),[P.c]) -C.k=H.o(I.a1([0,0,26624,1023,65534,2047,65534,2047]),[P.c]) -C.a3=H.o(I.a1(["/","\\"]),[P.e]) -C.C=H.o(I.a1(["/"]),[P.e]) -C.n=H.o(I.a1([]),[P.e]) -C.a4=H.o(I.a1([0,0,32722,12287,65534,34815,65534,18431]),[P.c]) -C.D=H.o(I.a1([0,0,24576,1023,65534,34815,65534,18431]),[P.c]) -C.E=H.o(I.a1([0,0,32754,11263,65534,34815,65534,18431]),[P.c]) -C.F=H.o(I.a1([0,0,65490,12287,65535,34815,65534,18431]),[P.c]) -C.a5=new H.ht(0,{},C.n,[P.e,P.e]) -C.h=new P.jE(!1) -$.ab=0 -$.aT=null -$.dl=null -$.cZ=!1 -$.fl=null -$.fe=null -$.fu=null -$.c0=null -$.c3=null -$.da=null -$.aL=null -$.b2=null -$.b3=null -$.d_=!1 -$.t=C.d -$.fm=!1 -$.m9=C.a1 -$.ls=C.a0 -$.dI=0 -$.eW=null -$.cY=null -$.ap=C.M -$=null -init.isHunkLoaded=function(a){return!!$dart_deferred_initializers$[a]} -init.deferredInitialized=new Object(null) -init.isHunkInitialized=function(a){return init.deferredInitialized[a]} -init.initializeLoadedHunk=function(a){var z=$dart_deferred_initializers$[a] -if(z==null)throw"DeferredLoading state error: code with hash '"+a+"' was not loaded" -z($globals$,$) -init.deferredInitialized[a]=true} -init.deferredLibraryParts={} -init.deferredPartUris=[] -init.deferredPartHashes=[];(function(a){for(var z=0;z@,;:"\\\\/[\\]?={} \\t\\x00-\\x1F\\x7F]+',!0,!1)},"f0","$get$f0",function(){return P.H("(?:\\r\\n)?[ \\t]+",!0,!1)},"f4","$get$f4",function(){return P.H('"(?:[^"\\x00-\\x1F\\x7F]|\\\\.)*"',!0,!1)},"f3","$get$f3",function(){return P.H("\\\\(.)",!0,!1)},"fr","$get$fr",function(){return P.H('[()<>@,;:"\\\\/\\[\\]?={} \\t\\x00-\\x1F\\x7F]',!0,!1)},"fD","$get$fD",function(){return P.H("(?:"+$.$get$f0().a+")*",!0,!1)},"dK","$get$dK",function(){return N.bI("")},"dJ","$get$dJ",function(){return P.bG(P.e,N.bi)},"d6","$get$d6",function(){return new M.hu($.$get$cH(),null)},"dZ","$get$dZ",function(){return new E.iF("posix","/",C.C,P.H("/",!0,!1),P.H("[^/]$",!0,!1),P.H("^/",!0,!1))},"bp","$get$bp",function(){return new L.jP("windows","\\",C.a3,P.H("[/\\\\]",!0,!1),P.H("[^/\\\\]$",!0,!1),P.H("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])",!0,!1),P.H("^[/\\\\](?![/\\\\])",!0,!1))},"aZ","$get$aZ",function(){return new F.jD("url","/",C.C,P.H("/",!0,!1),P.H("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$",!0,!1),P.H("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*",!0,!1),P.H("^/",!0,!1))},"cH","$get$cH",function(){return O.jo()},"fb","$get$fb",function(){return P.H("/",!0,!1).a==="\\/"}]) -I=I.$finishIsolateConstructor(I) -$=new I() -init.metadata=[] -init.types=[{func:1,ret:P.x},{func:1,ret:-1},{func:1,ret:-1,args:[,]},{func:1,ret:-1,args:[P.b],opt:[P.D]},{func:1,ret:P.x,args:[,,]},{func:1,ret:P.x,args:[W.am]},{func:1,ret:P.e,args:[P.e]},{func:1,ret:-1,args:[{func:1,ret:-1}]},{func:1,args:[,]},{func:1,ret:P.x,args:[P.e]},{func:1,ret:P.F,args:[P.e]},{func:1,ret:P.x,args:[,]},{func:1,ret:P.F,args:[,]},{func:1,ret:P.e,args:[P.ad]},{func:1,ret:-1,args:[W.M]},{func:1,ret:-1,args:[P.b]},{func:1,ret:P.x,args:[,P.D]},{func:1,ret:P.c,args:[[P.h,P.c],P.c]},{func:1,ret:-1,args:[P.c,P.c]},{func:1,ret:-1,args:[P.e,P.c]},{func:1,ret:-1,args:[P.e],opt:[,]},{func:1,ret:P.c,args:[P.c,P.c]},{func:1,ret:P.x,args:[P.c,,]},{func:1,ret:P.y,args:[P.c]},{func:1,ret:P.y,args:[,,]},{func:1,ret:-1,args:[P.e,P.e]},{func:1,args:[W.M]},{func:1,args:[,,]},{func:1,ret:P.F,args:[P.e,P.e]},{func:1,ret:P.c,args:[P.e]},{func:1,args:[P.e]},{func:1,ret:-1,args:[[P.h,P.c]]},{func:1,ret:P.F,args:[P.b,P.b]},{func:1,ret:-1,opt:[P.b]},{func:1,ret:P.F,args:[P.b]},{func:1,ret:R.bK},{func:1,ret:P.x,args:[P.e,P.e]},{func:1,ret:P.x,args:[,],opt:[,]},{func:1,ret:N.bi},{func:1,ret:[P.E,,],args:[,]},{func:1,ret:P.e,args:[P.c]},{func:1,ret:P.e,args:[P.e],named:{color:null}},{func:1,args:[,P.e]},{func:1,ret:P.x,args:[W.aX]},{func:1,ret:P.x,args:[{func:1,ret:-1}]},{func:1,ret:P.F,args:[,,]},{func:1,ret:P.c,args:[,]},{func:1,ret:P.c,args:[P.b]},{func:1,ret:U.bm,args:[P.y]}] -function convertToFastObject(a){function MyClass(){}MyClass.prototype=a -new MyClass() -return a}function convertToSlowObject(a){a.__MAGIC_SLOW_PROPERTY=1 -delete a.__MAGIC_SLOW_PROPERTY -return a}A=convertToFastObject(A) -B=convertToFastObject(B) -C=convertToFastObject(C) -D=convertToFastObject(D) -E=convertToFastObject(E) -F=convertToFastObject(F) -G=convertToFastObject(G) -H=convertToFastObject(H) -J=convertToFastObject(J) -K=convertToFastObject(K) -L=convertToFastObject(L) -M=convertToFastObject(M) -N=convertToFastObject(N) -O=convertToFastObject(O) -P=convertToFastObject(P) -Q=convertToFastObject(Q) -R=convertToFastObject(R) -S=convertToFastObject(S) -T=convertToFastObject(T) -U=convertToFastObject(U) -V=convertToFastObject(V) -W=convertToFastObject(W) -X=convertToFastObject(X) -Y=convertToFastObject(Y) -Z=convertToFastObject(Z) -function init(){I.p=Object.create(null) -init.allClasses=map() -init.getTypeFromName=function(a){return init.allClasses[a]} -init.interceptorsByTag=map() -init.leafTags=map() -init.finishedClasses=map() -I.$lazy=function(a,b,c,d,e){if(!init.lazies)init.lazies=Object.create(null) -init.lazies[a]=b -e=e||I.p -var z={} -var y={} -e[a]=z -e[b]=function(){var x=this[a] -if(x==y)H.mc(d||a) -try{if(x===z){this[a]=y -try{x=this[a]=c()}finally{if(x===z)this[a]=null}}return x}finally{this[b]=function(){return this[a]}}}} -I.$finishIsolateConstructor=function(a){var z=a.p -function Isolate(){var y=Object.keys(z) -for(var x=0;x Date: Mon, 6 Jan 2020 20:47:51 +0000 Subject: [PATCH 033/115] Support transparent reconnects on the server (dart-lang/sse#19) @grouma this is an attempt to fix dart-lang/sse#18 (may be easier to [view the diff ignoring whitespace](https://github.com/dart-lang/sse/pull/19/files?utf8=%E2%9C%93&diff=unified&w=1) since some code got indenting and makes the diff look much bigger than it is). However there is an exposed method here - `closeSink` that closes the underlying sink (in order to test - we can't close the exposed `sink` because it closes the stream controller that needs to continue to be used). I'm not sure if there's a better way (we can add `@visibleForTesting`, though `meta` isn't currently referenced here). Happy to make changes if this isn't what you had in mind (and I can test it end-to-end through dwds and GitPod to confirm it works prior to merging it). --- pkgs/sse/.travis.yml | 2 +- pkgs/sse/CHANGELOG.md | 7 + pkgs/sse/lib/server/sse_handler.dart | 149 +------------ pkgs/sse/lib/src/server/sse_handler.dart | 221 +++++++++++++++++++ pkgs/sse/pubspec.yaml | 4 +- pkgs/sse/test/sse_test.dart | 264 +++++++++++++++-------- 6 files changed, 405 insertions(+), 242 deletions(-) create mode 100644 pkgs/sse/lib/src/server/sse_handler.dart diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index e0371f64f..d6bce8f49 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -5,7 +5,7 @@ addons: dart: - dev - - 2.1.0 + - 2.2.0 with_content_shell: false diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index f46643e19..022f12028 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,10 @@ +## 3.1.0 + +- Add optional `keepAlive` parameter to the `SseHandler`. If `keepAlive` is + supplied, the connection will remain active for this period after a + disconnect and can be reconnected transparently. If there is no reconnect + within that period, the connection will be closed normally. + ## 3.0.0 - Add retry logic. diff --git a/pkgs/sse/lib/server/sse_handler.dart b/pkgs/sse/lib/server/sse_handler.dart index 1a5ef0681..bfed9350b 100644 --- a/pkgs/sse/lib/server/sse_handler.dart +++ b/pkgs/sse/lib/server/sse_handler.dart @@ -2,151 +2,4 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; -import 'dart:convert'; - -import 'package:async/async.dart'; -import 'package:logging/logging.dart'; -import 'package:pedantic/pedantic.dart'; -import 'package:shelf/shelf.dart' as shelf; -import 'package:stream_channel/stream_channel.dart'; - -// RFC 2616 requires carriage return delimiters. -String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' - 'Content-Type: text/event-stream\r\n' - 'Cache-Control: no-cache\r\n' - 'Connection: keep-alive\r\n' - 'Access-Control-Allow-Credentials: true\r\n' - 'Access-Control-Allow-Origin: $origin\r\n' - '\r\n\r\n'; - -/// A bi-directional SSE connection between server and browser. -class SseConnection extends StreamChannelMixin { - /// Incoming messages from the Browser client. - final _incomingController = StreamController(); - - /// Outgoing messages to the Browser client. - final _outgoingController = StreamController(); - - final Sink _sink; - - final _closedCompleter = Completer(); - - SseConnection(this._sink) { - _outgoingController.stream.listen((data) { - if (!_closedCompleter.isCompleted) { - // JSON encode the message to escape new lines. - _sink.add('data: ${json.encode(data)}\n'); - _sink.add('\n'); - } - }); - _outgoingController.onCancel = _close; - _incomingController.onCancel = _close; - } - - /// The message added to the sink has to be JSON encodable. - @override - StreamSink get sink => _outgoingController.sink; - - // Add messages to this [StreamSink] to send them to the server. - /// [Stream] of messages sent from the server to this client. - /// - /// A message is a decoded JSON object. - @override - Stream get stream => _incomingController.stream; - - void _close() { - if (!_closedCompleter.isCompleted) { - _closedCompleter.complete(); - _sink.close(); - if (!_outgoingController.isClosed) _outgoingController.close(); - if (!_incomingController.isClosed) _incomingController.close(); - } - } -} - -/// [SseHandler] handles requests on a user defined path to create -/// two-way communications of JSON encodable data between server and clients. -/// -/// A server sends messages to a client through an SSE channel, while -/// a client sends message to a server through HTTP POST requests. -class SseHandler { - final _logger = Logger('SseHandler'); - final Uri _uri; - final _connections = {}; - final _connectionController = StreamController(); - - StreamQueue _connectionsStream; - - SseHandler(this._uri); - - StreamQueue get connections => - _connectionsStream ??= StreamQueue(_connectionController.stream); - - shelf.Handler get handler => _handle; - - int get numberOfClients => _connections.length; - - shelf.Response _createSseConnection(shelf.Request req, String path) { - req.hijack((channel) async { - var sink = utf8.encoder.startChunkedConversion(channel.sink); - sink.add(_sseHeaders(req.headers['origin'])); - var clientId = req.url.queryParameters['sseClientId']; - var connection = SseConnection(sink); - _connections[clientId] = connection; - unawaited(connection._closedCompleter.future.then((_) { - _connections.remove(clientId); - })); - // Remove connection when it is remotely closed or the stream is - // cancelled. - channel.stream.listen((_) { - // SSE is unidirectional. Responses are handled through POST requests. - }, onDone: () { - connection._close(); - }); - - _connectionController.add(connection); - }); - return shelf.Response.notFound(''); - } - - String _getOriginalPath(shelf.Request req) => req.requestedUri.path; - - Future _handle(shelf.Request req) async { - var path = _getOriginalPath(req); - if (_uri.path != path) { - return shelf.Response.notFound(''); - } - - if (req.headers['accept'] == 'text/event-stream' && req.method == 'GET') { - return _createSseConnection(req, path); - } - - if (req.headers['accept'] != 'text/event-stream' && req.method == 'POST') { - return _handleIncomingMessage(req, path); - } - - return shelf.Response.notFound(''); - } - - Future _handleIncomingMessage( - shelf.Request req, String path) async { - try { - var clientId = req.url.queryParameters['sseClientId']; - var message = await req.readAsString(); - var jsonObject = json.decode(message) as String; - _connections[clientId]?._incomingController?.add(jsonObject); - } catch (e, st) { - _logger.fine('Failed to handle incoming message. $e $st'); - } - return shelf.Response.ok('', headers: { - 'access-control-allow-credentials': 'true', - 'access-control-allow-origin': _originFor(req), - }); - } - - String _originFor(shelf.Request req) => - // Firefox does not set header "origin". - // https://bugzilla.mozilla.org/show_bug.cgi?id=1508661 - req.headers['origin'] ?? req.headers['host']; -} +export 'package:sse/src/server/sse_handler.dart' show SseConnection, SseHandler; diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart new file mode 100644 index 000000000..e8cd523b9 --- /dev/null +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -0,0 +1,221 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; + +import 'package:async/async.dart'; +import 'package:logging/logging.dart'; +import 'package:pedantic/pedantic.dart'; +import 'package:shelf/shelf.dart' as shelf; +import 'package:stream_channel/stream_channel.dart'; + +// RFC 2616 requires carriage return delimiters. +String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' + 'Content-Type: text/event-stream\r\n' + 'Cache-Control: no-cache\r\n' + 'Connection: keep-alive\r\n' + 'Access-Control-Allow-Credentials: true\r\n' + 'Access-Control-Allow-Origin: $origin\r\n' + '\r\n\r\n'; + +/// A bi-directional SSE connection between server and browser. +class SseConnection extends StreamChannelMixin { + /// Incoming messages from the Browser client. + final _incomingController = StreamController(); + + /// Outgoing messages to the Browser client. + final _outgoingController = StreamController(); + + Sink _sink; + + /// How long to wait after a connection drops before considering it closed. + final Duration _keepAlive; + + /// A timer counting down the KeepAlive period (null if hasn't disconnected). + Timer _keepAliveTimer; + + /// Whether this connection is currently in the KeepAlive timeout period. + bool get isInKeepAlivePeriod => _keepAliveTimer?.isActive ?? false; + + final _closedCompleter = Completer(); + + /// Creates an [SseConnection] for the supplied [_sink]. + /// + /// If [keepAlive] is supplied, the connection will remain active for this + /// period after a disconnect and can be reconnected transparently. If there + /// is no reconnect within that period, the connection will be closed normally. + /// + /// If [keepAlive] is not supplied, the connection will be closed immediately + /// after a disconnect. + SseConnection(this._sink, {Duration keepAlive}) : _keepAlive = keepAlive { + unawaited(_setUpListener()); + _outgoingController.onCancel = _close; + _incomingController.onCancel = _close; + } + + Future _setUpListener() async { + var outgoingStreamQueue = StreamQueue(_outgoingController.stream); + while (await outgoingStreamQueue.hasNext) { + // If we're in a KeepAlive timeout, there's nowhere to send messages so + // wait a short period and check again. + if (isInKeepAlivePeriod) { + await Future.delayed(const Duration(milliseconds: 200)); + continue; + } + + // Peek the data so we don't remove it from the stream if we're unable to + // send it. + final data = await outgoingStreamQueue.peek; + try { + // JSON encode the message to escape new lines. + _sink.add('data: ${json.encode(data)}\n'); + _sink.add('\n'); + await outgoingStreamQueue.next; // Consume from stream if no errors. + } catch (StateError) { + if (_keepAlive == null || _closedCompleter.isCompleted) { + rethrow; + } + // If we got here then the sink may have closed but the stream.onDone + // hasn't fired yet, so pause the subscription and skip calling + // `next` so the message remains in the queue to try again. + _handleDisconnect(); + } + } + } + + /// The message added to the sink has to be JSON encodable. + @override + StreamSink get sink => _outgoingController.sink; + + // Add messages to this [StreamSink] to send them to the server. + /// [Stream] of messages sent from the server to this client. + /// + /// A message is a decoded JSON object. + @override + Stream get stream => _incomingController.stream; + + void _acceptReconnection(Sink sink) { + _keepAliveTimer?.cancel(); + _sink = sink; + } + + void _handleDisconnect() { + if (_keepAlive == null) { + // Close immediately if we're not keeping alive. + _close(); + } else if (!isInKeepAlivePeriod) { + // Otherwise if we didn't already have an active timer, set a timer to + // close after the timeout period. If the connection comes back, this will + // be cancelled and all messages left in the queue tried again. + _keepAliveTimer = Timer(_keepAlive, _close); + } + } + + void _close() { + if (!_closedCompleter.isCompleted) { + _closedCompleter.complete(); + _sink.close(); + if (!_outgoingController.isClosed) _outgoingController.close(); + if (!_incomingController.isClosed) _incomingController.close(); + } + } +} + +/// [SseHandler] handles requests on a user defined path to create +/// two-way communications of JSON encodable data between server and clients. +/// +/// A server sends messages to a client through an SSE channel, while +/// a client sends message to a server through HTTP POST requests. +class SseHandler { + final _logger = Logger('SseHandler'); + final Uri _uri; + final Duration _keepAlive; + final _connections = {}; + final _connectionController = StreamController(); + + StreamQueue _connectionsStream; + + SseHandler(this._uri, {Duration keepAlive}) : _keepAlive = keepAlive; + + StreamQueue get connections => + _connectionsStream ??= StreamQueue(_connectionController.stream); + + shelf.Handler get handler => _handle; + + int get numberOfClients => _connections.length; + + shelf.Response _createSseConnection(shelf.Request req, String path) { + req.hijack((channel) async { + var sink = utf8.encoder.startChunkedConversion(channel.sink); + sink.add(_sseHeaders(req.headers['origin'])); + var clientId = req.url.queryParameters['sseClientId']; + + // Check if we already have a connection for this ID that is in the process + // of timing out (in which case we can reconnect it transparently). + if (_connections[clientId] != null && + _connections[clientId].isInKeepAlivePeriod) { + _connections[clientId]._acceptReconnection(sink); + } else { + var connection = SseConnection(sink, keepAlive: _keepAlive); + _connections[clientId] = connection; + unawaited(connection._closedCompleter.future.then((_) { + _connections.remove(clientId); + })); + // Remove connection when it is remotely closed or the stream is + // cancelled. + channel.stream.listen((_) { + // SSE is unidirectional. Responses are handled through POST requests. + }, onDone: () { + connection._handleDisconnect(); + }); + + _connectionController.add(connection); + } + }); + return shelf.Response.notFound(''); + } + + String _getOriginalPath(shelf.Request req) => req.requestedUri.path; + + Future _handle(shelf.Request req) async { + var path = _getOriginalPath(req); + if (_uri.path != path) { + return shelf.Response.notFound(''); + } + + if (req.headers['accept'] == 'text/event-stream' && req.method == 'GET') { + return _createSseConnection(req, path); + } + + if (req.headers['accept'] != 'text/event-stream' && req.method == 'POST') { + return _handleIncomingMessage(req, path); + } + + return shelf.Response.notFound(''); + } + + Future _handleIncomingMessage( + shelf.Request req, String path) async { + try { + var clientId = req.url.queryParameters['sseClientId']; + var message = await req.readAsString(); + var jsonObject = json.decode(message) as String; + _connections[clientId]?._incomingController?.add(jsonObject); + } catch (e, st) { + _logger.fine('Failed to handle incoming message. $e $st'); + } + return shelf.Response.ok('', headers: { + 'access-control-allow-credentials': 'true', + 'access-control-allow-origin': _originFor(req), + }); + } + + String _originFor(shelf.Request req) => + // Firefox does not set header "origin". + // https://bugzilla.mozilla.org/show_bug.cgi?id=1508661 + req.headers['origin'] ?? req.headers['host']; +} + +void closeSink(SseConnection connection) => connection._sink.close(); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 33fc5fb42..9c164f79e 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.0.0 +version: 3.1.0 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- @@ -8,7 +8,7 @@ description: >- requests. environment: - sdk: ">=2.1.0 <3.0.0" + sdk: ">=2.2.0 <3.0.0" dependencies: async: ^2.0.8 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 62fe4c6cb..0d4040f28 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -10,6 +10,7 @@ import 'package:shelf/shelf.dart' as shelf; import 'package:shelf/shelf_io.dart' as io; import 'package:shelf_static/shelf_static.dart'; import 'package:sse/server/sse_handler.dart'; +import 'package:sse/src/server/sse_handler.dart' show closeSink; import 'package:test/test.dart'; import 'package:webdriver/io.dart'; @@ -33,99 +34,180 @@ void main() { chromeDriver.kill(); }); - setUp(() async { - handler = SseHandler(Uri.parse('/test')); - - var cascade = shelf.Cascade().add(handler.handler).add(_faviconHandler).add( - createStaticHandler('test/web', - listDirectories: true, defaultDocument: 'index.html')); - - server = await io.serve(cascade.handler, 'localhost', 0); - var capabilities = Capabilities.chrome - ..addAll({ - Capabilities.chromeOptions: { - 'args': ['--headless'] - } - }); - webdriver = await createDriver(desired: capabilities); + group('SSE', () { + setUp(() async { + handler = SseHandler(Uri.parse('/test')); + + var cascade = shelf.Cascade() + .add(handler.handler) + .add(_faviconHandler) + .add(createStaticHandler('test/web', + listDirectories: true, defaultDocument: 'index.html')); + + server = await io.serve(cascade.handler, 'localhost', 0); + var capabilities = Capabilities.chrome + ..addAll({ + Capabilities.chromeOptions: { + 'args': ['--headless'] + } + }); + webdriver = await createDriver(desired: capabilities); + }); + + tearDown(() async { + await webdriver.quit(); + await server.close(); + }); + + test('Can round trip messages', () async { + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + connection.sink.add('blah'); + expect(await connection.stream.first, 'blah'); + }); + + test('Multiple clients can connect', () async { + var connections = handler.connections; + await webdriver.get('http://localhost:${server.port}'); + await connections.next; + await webdriver.get('http://localhost:${server.port}'); + await connections.next; + }); + + test('Routes data correctly', () async { + var connections = handler.connections; + await webdriver.get('http://localhost:${server.port}'); + var connectionA = await connections.next; + connectionA.sink.add('foo'); + expect(await connectionA.stream.first, 'foo'); + + await webdriver.get('http://localhost:${server.port}'); + var connectionB = await connections.next; + connectionB.sink.add('bar'); + expect(await connectionB.stream.first, 'bar'); + }); + + test('Can close from the server', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + await connection.sink.close(); + await pumpEventQueue(); + expect(handler.numberOfClients, 0); + }); + + test('Client reconnects after being disconnected', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + await connection.sink.close(); + await pumpEventQueue(); + expect(handler.numberOfClients, 0); + + // Ensure the client reconnects + await handler.connections.next; + }); + + test('Can close from the client-side', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + var closeButton = await webdriver.findElement(const By.tagName('button')); + await closeButton.click(); + + // Should complete since the connection is closed. + await connection.stream.toList(); + expect(handler.numberOfClients, 0); + }); + + test('Cancelling the listener closes the connection', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + var sub = connection.stream.listen((_) {}); + await sub.cancel(); + await pumpEventQueue(); + expect(handler.numberOfClients, 0); + }); + + test('Disconnects when navigating away', () async { + await webdriver.get('http://localhost:${server.port}'); + expect(handler.numberOfClients, 1); + + await webdriver.get('chrome://version/'); + expect(handler.numberOfClients, 0); + }); }); - tearDown(() async { - await webdriver.quit(); - await server.close(); - }); - - test('Can round trip messages', () async { - await webdriver.get('http://localhost:${server.port}'); - var connection = await handler.connections.next; - connection.sink.add('blah'); - expect(await connection.stream.first, 'blah'); - }); - - test('Multiple clients can connect', () async { - var connections = handler.connections; - await webdriver.get('http://localhost:${server.port}'); - await connections.next; - await webdriver.get('http://localhost:${server.port}'); - await connections.next; - }); - - test('Routes data correctly', () async { - var connections = handler.connections; - await webdriver.get('http://localhost:${server.port}'); - var connectionA = await connections.next; - connectionA.sink.add('foo'); - expect(await connectionA.stream.first, 'foo'); - - await webdriver.get('http://localhost:${server.port}'); - var connectionB = await connections.next; - connectionB.sink.add('bar'); - expect(await connectionB.stream.first, 'bar'); - }); - - test('Can close from the server', () async { - expect(handler.numberOfClients, 0); - await webdriver.get('http://localhost:${server.port}'); - var connection = await handler.connections.next; - expect(handler.numberOfClients, 1); - await connection.sink.close(); - await pumpEventQueue(); - expect(handler.numberOfClients, 0); - }); - - test('Can close from the client-side', () async { - expect(handler.numberOfClients, 0); - await webdriver.get('http://localhost:${server.port}'); - var connection = await handler.connections.next; - expect(handler.numberOfClients, 1); - - var closeButton = await webdriver.findElement(const By.tagName('button')); - await closeButton.click(); - - // Should complete since the connection is closed. - await connection.stream.toList(); - expect(handler.numberOfClients, 0); - }); - - test('Cancelling the listener closes the connection', () async { - expect(handler.numberOfClients, 0); - await webdriver.get('http://localhost:${server.port}'); - var connection = await handler.connections.next; - expect(handler.numberOfClients, 1); - - var sub = connection.stream.listen((_) {}); - await sub.cancel(); - await pumpEventQueue(); - expect(handler.numberOfClients, 0); - }); - - test('Disconnects when navigating away', () async { - await webdriver.get('http://localhost:${server.port}'); - expect(handler.numberOfClients, 1); - - await webdriver.get('chrome://version/'); - expect(handler.numberOfClients, 0); - }); + group('SSE with server keep-alive', () { + setUp(() async { + handler = + SseHandler(Uri.parse('/test'), keepAlive: const Duration(seconds: 5)); + + var cascade = shelf.Cascade() + .add(handler.handler) + .add(_faviconHandler) + .add(createStaticHandler('test/web', + listDirectories: true, defaultDocument: 'index.html')); + + server = await io.serve(cascade.handler, 'localhost', 0); + var capabilities = Capabilities.chrome + ..addAll({ + Capabilities.chromeOptions: { + 'args': ['--headless'] + } + }); + webdriver = await createDriver(desired: capabilities); + }); + + tearDown(() async { + await webdriver.quit(); + await server.close(); + }); + + test('Client reconnect use the same connection', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + // Close the underlying connection. + closeSink(connection); + await pumpEventQueue(); + + // Ensure there's still a connection. + expect(handler.numberOfClients, 1); + + // Ensure we can still round-trip data on the original connection. + connection.sink.add('bar'); + expect(await connection.stream.first, 'bar'); + }); + + test('Messages sent during disconnect arrive in-order', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + // Close the underlying connection. + closeSink(connection); + connection.sink.add('one'); + connection.sink.add('two'); + await pumpEventQueue(); + + // Ensure there's still a connection. + expect(handler.numberOfClients, 1); + + // Ensure messages arrive in the same order + expect(await connection.stream.take(2).toList(), equals(['one', 'two'])); + }); + }, timeout: const Timeout(Duration(seconds: 120))); } FutureOr _faviconHandler(shelf.Request request) { From 3ee4321e277fb31420e0217bf0f1599ec6f215ef Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Mon, 6 Jan 2020 15:51:27 -0800 Subject: [PATCH 034/115] Make isInKeepAlivePeriod as private (dart-lang/sse#20) * Make isInKeepAlivePeriod as private * fix doc * fix markdown --- pkgs/sse/CHANGELOG.md | 11 +++++++++-- pkgs/sse/lib/src/server/sse_handler.dart | 8 ++++---- pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 022f12028..d5847334c 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,10 @@ +## 3.1.1 + +- Make `isInKeepAlive` on `SseConnection` private. + +**Note that this is a breaking change but in actuality no one should be + depending on this API.** + ## 3.1.0 - Add optional `keepAlive` parameter to the `SseHandler`. If `keepAlive` is @@ -9,8 +16,8 @@ - Add retry logic. -** Possible Breaking Change ** Error messages may now be delayed up to 5 seconds -in the client. +**Possible Breaking Change Error messages may now be delayed up to 5 seconds + in the client.** ## 2.1.2 diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index e8cd523b9..9c3d91eb0 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -37,7 +37,7 @@ class SseConnection extends StreamChannelMixin { Timer _keepAliveTimer; /// Whether this connection is currently in the KeepAlive timeout period. - bool get isInKeepAlivePeriod => _keepAliveTimer?.isActive ?? false; + bool get _isInKeepAlivePeriod => _keepAliveTimer?.isActive ?? false; final _closedCompleter = Completer(); @@ -60,7 +60,7 @@ class SseConnection extends StreamChannelMixin { while (await outgoingStreamQueue.hasNext) { // If we're in a KeepAlive timeout, there's nowhere to send messages so // wait a short period and check again. - if (isInKeepAlivePeriod) { + if (_isInKeepAlivePeriod) { await Future.delayed(const Duration(milliseconds: 200)); continue; } @@ -105,7 +105,7 @@ class SseConnection extends StreamChannelMixin { if (_keepAlive == null) { // Close immediately if we're not keeping alive. _close(); - } else if (!isInKeepAlivePeriod) { + } else if (!_isInKeepAlivePeriod) { // Otherwise if we didn't already have an active timer, set a timer to // close after the timeout period. If the connection comes back, this will // be cancelled and all messages left in the queue tried again. @@ -155,7 +155,7 @@ class SseHandler { // Check if we already have a connection for this ID that is in the process // of timing out (in which case we can reconnect it transparently). if (_connections[clientId] != null && - _connections[clientId].isInKeepAlivePeriod) { + _connections[clientId]._isInKeepAlivePeriod) { _connections[clientId]._acceptReconnection(sink); } else { var connection = SseConnection(sink, keepAlive: _keepAlive); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 9c164f79e..52d69e5f2 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.1.0 +version: 3.1.1 author: Dart Team homepage: https://github.com/dart-lang/sse description: >- From 1c0d3c25d9ea6fddfddd1b5c033acf19b50fb18e Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Thu, 9 Jan 2020 11:21:55 -0800 Subject: [PATCH 035/115] Remove author field --- pkgs/sse/pubspec.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 52d69e5f2..b2067acb6 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,6 +1,5 @@ name: sse -version: 3.1.1 -author: Dart Team +version: 3.1.2-dev homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional From 5b1628438f273bb9bcb23be302a760cf0b8f64be Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 31 Jan 2020 17:15:12 -0800 Subject: [PATCH 036/115] Proper close on error (dart-lang/sse#21) --- pkgs/sse/CHANGELOG.md | 5 +++++ pkgs/sse/lib/client/sse_client.dart | 2 +- pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index d5847334c..b5fb859d8 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.1.2 + +- Fix an issue where the `SseClient` would not send a `done` event when there + was an error with the SSE connection. + ## 3.1.1 - Make `isInKeepAlive` on `SseConnection` private. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 764e566a6..232a9c9b5 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -47,7 +47,7 @@ class SseClient extends StreamChannelMixin { // Allow for a retry to connect before giving up. _errorTimer = Timer(const Duration(seconds: 5), () { _incomingController.addError(error); - _eventSource.close(); + close(); }); } }); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index b2067acb6..86d3c1317 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.1.2-dev +version: 3.1.2 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional From 64c50223dfa69fde9c558c78e1280b717d4ecd15 Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 26 Feb 2020 18:38:55 +0000 Subject: [PATCH 037/115] Re-expose the keep-alive flag to consumers (dart-lang/sse#22) * Re-expose the kee-alive flag to consumers * Update version to v3.2.0 * Attempt to reduce flakes from quick client reconnects --- pkgs/sse/CHANGELOG.md | 6 ++++++ pkgs/sse/lib/src/server/sse_handler.dart | 8 ++++---- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/sse_test.dart | 16 +++++++++++++--- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index b5fb859d8..a318705c9 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,9 @@ +## 3.2.0 + +- Re-expose `isInKeepAlivePeriod` flag on `SseConnection`. This flag will be + `true` when a connection has been dropped and is in the keep-alive period + waiting for a client to reconnect. + ## 3.1.2 - Fix an issue where the `SseClient` would not send a `done` event when there diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 9c3d91eb0..e8cd523b9 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -37,7 +37,7 @@ class SseConnection extends StreamChannelMixin { Timer _keepAliveTimer; /// Whether this connection is currently in the KeepAlive timeout period. - bool get _isInKeepAlivePeriod => _keepAliveTimer?.isActive ?? false; + bool get isInKeepAlivePeriod => _keepAliveTimer?.isActive ?? false; final _closedCompleter = Completer(); @@ -60,7 +60,7 @@ class SseConnection extends StreamChannelMixin { while (await outgoingStreamQueue.hasNext) { // If we're in a KeepAlive timeout, there's nowhere to send messages so // wait a short period and check again. - if (_isInKeepAlivePeriod) { + if (isInKeepAlivePeriod) { await Future.delayed(const Duration(milliseconds: 200)); continue; } @@ -105,7 +105,7 @@ class SseConnection extends StreamChannelMixin { if (_keepAlive == null) { // Close immediately if we're not keeping alive. _close(); - } else if (!_isInKeepAlivePeriod) { + } else if (!isInKeepAlivePeriod) { // Otherwise if we didn't already have an active timer, set a timer to // close after the timeout period. If the connection comes back, this will // be cancelled and all messages left in the queue tried again. @@ -155,7 +155,7 @@ class SseHandler { // Check if we already have a connection for this ID that is in the process // of timing out (in which case we can reconnect it transparently). if (_connections[clientId] != null && - _connections[clientId]._isInKeepAlivePeriod) { + _connections[clientId].isInKeepAlivePeriod) { _connections[clientId]._acceptReconnection(sink); } else { var connection = SseConnection(sink, keepAlive: _keepAlive); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 86d3c1317..9e8225a8e 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.1.2 +version: 3.2.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 0d4040f28..4f66393bb 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -179,14 +179,24 @@ void main() { // Close the underlying connection. closeSink(connection); - await pumpEventQueue(); - // Ensure there's still a connection. + // The isInKeepAlivePeriod flag may only be set for a short period because + // the client may connect very quickly, so only pump until it changes. + var maxPumps = 50; + while (!connection.isInKeepAlivePeriod && maxPumps-- > 0) { + await pumpEventQueue(times: 1); + } + + // Ensure there's still a connection and it's marked as in the keep-alive + // state. + expect(connection.isInKeepAlivePeriod, isTrue); expect(handler.numberOfClients, 1); - // Ensure we can still round-trip data on the original connection. + // Ensure we can still round-trip data on the original connection and that + // the connection is no longer marked keep-alive once it's reconnected. connection.sink.add('bar'); expect(await connection.stream.first, 'bar'); + expect(connection.isInKeepAlivePeriod, isFalse); }); test('Messages sent during disconnect arrive in-order', () async { From d681e1152e3f6e125994c8f93b4c2e1916c615d1 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Mon, 2 Mar 2020 12:48:22 -0800 Subject: [PATCH 038/115] Fix keepAlive reconnection (dart-lang/sse#23) --- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/lib/src/server/sse_handler.dart | 15 +++++++-------- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/sse_test.dart | 16 +++++++++++++++- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index a318705c9..5135fb40d 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.2.1 + +- Fix an issue where `keepAlive` would only allow a single reconnection. + ## 3.2.0 - Re-expose `isInKeepAlivePeriod` flag on `SseConnection`. This flag will be diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index e8cd523b9..1749f46f3 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -163,16 +163,15 @@ class SseHandler { unawaited(connection._closedCompleter.future.then((_) { _connections.remove(clientId); })); - // Remove connection when it is remotely closed or the stream is - // cancelled. - channel.stream.listen((_) { - // SSE is unidirectional. Responses are handled through POST requests. - }, onDone: () { - connection._handleDisconnect(); - }); - _connectionController.add(connection); } + // Remove connection when it is remotely closed or the stream is + // cancelled. + channel.stream.listen((_) { + // SSE is unidirectional. Responses are handled through POST requests. + }, onDone: () { + _connections[clientId]?._handleDisconnect(); + }); }); return shelf.Response.notFound(''); } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 9e8225a8e..1381d6102 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.2.0 +version: 3.2.1 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 4f66393bb..3a7f76be0 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -6,6 +6,7 @@ import 'dart:async'; import 'dart:io'; +import 'package:async/async.dart'; import 'package:shelf/shelf.dart' as shelf; import 'package:shelf/shelf_io.dart' as io; import 'package:shelf_static/shelf_static.dart'; @@ -195,7 +196,20 @@ void main() { // Ensure we can still round-trip data on the original connection and that // the connection is no longer marked keep-alive once it's reconnected. connection.sink.add('bar'); - expect(await connection.stream.first, 'bar'); + var queue = StreamQueue(connection.stream); + expect(await queue.next, 'bar'); + expect(connection.isInKeepAlivePeriod, isFalse); + + // Now check that we can reconnect multiple times. + closeSink(connection); + maxPumps = 50; + while (!connection.isInKeepAlivePeriod && maxPumps-- > 0) { + await pumpEventQueue(times: 1); + } + expect(connection.isInKeepAlivePeriod, isTrue); + expect(handler.numberOfClients, 1); + connection.sink.add('bar'); + expect(await queue.next, 'bar'); expect(connection.isInKeepAlivePeriod, isFalse); }); From 88752cac1e7860d8d8bb1b4efe179fc91f421108 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Tue, 7 Apr 2020 16:49:01 -0700 Subject: [PATCH 039/115] Fix state error with keep alive (dart-lang/sse#24) --- pkgs/sse/CHANGELOG.md | 5 +++++ pkgs/sse/lib/src/server/sse_handler.dart | 5 +++++ pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 5135fb40d..f3206356f 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.2.2 + +- Fix an issue where `keepAlive` may cause state errors when attempting to + send messages on a closed stream. + ## 3.2.1 - Fix an issue where `keepAlive` would only allow a single reconnection. diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 1749f46f3..ed4cb9e78 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -68,6 +68,11 @@ class SseConnection extends StreamChannelMixin { // Peek the data so we don't remove it from the stream if we're unable to // send it. final data = await outgoingStreamQueue.peek; + + // Ignore outgoing messages since the connection may have closed while + // waiting for the keep alive. + if (_closedCompleter.isCompleted) break; + try { // JSON encode the message to escape new lines. _sink.add('data: ${json.encode(data)}\n'); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 1381d6102..8e3ab447c 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.2.1 +version: 3.2.2 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional From 668b92be65c479a9fabd5ff86535ce7ca750b094 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 8 Apr 2020 17:24:39 -0700 Subject: [PATCH 040/115] Add onClose (dart-lang/sse#25) --- pkgs/sse/CHANGELOG.md | 6 ++++++ pkgs/sse/lib/src/server/sse_handler.dart | 5 +++++ pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index f3206356f..0aa832a35 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,9 @@ +## 3.3.0 + +- Add an `onClose` event to the `SseConnection`. This allows consumers to + listen to this event in lue of `sseConnection.sink.done` as that is not + guaranteed to fire. + ## 3.2.2 - Fix an issue where `keepAlive` may cause state errors when attempting to diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index ed4cb9e78..e3f6cc74e 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -41,6 +41,11 @@ class SseConnection extends StreamChannelMixin { final _closedCompleter = Completer(); + /// Completes when the [SseConnection] closes. + /// + /// This is guaranteed to fire unlike `this.sink.close`; + Future get onClose => _closedCompleter.future; + /// Creates an [SseConnection] for the supplied [_sink]. /// /// If [keepAlive] is supplied, the connection will remain active for this diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 8e3ab447c..194277d2d 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.2.2 +version: 3.3.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional From c882ac6696842aac6a2e0c58d33112addbd34534 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 8 Apr 2020 18:55:25 -0700 Subject: [PATCH 041/115] Ensure sink.done correctly fires (dart-lang/sse#26) --- pkgs/sse/CHANGELOG.md | 5 +++++ pkgs/sse/lib/src/server/sse_handler.dart | 21 ++++++++++++--------- pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 0aa832a35..f7b9027b5 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.4.0 + +- Remove `onClose` from `SseConnection` and ensure the corresponding + `sink.close` correctly fires. + ## 3.3.0 - Add an `onClose` event to the `SseConnection`. This allows consumers to diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index e3f6cc74e..c3c80c807 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -41,10 +41,9 @@ class SseConnection extends StreamChannelMixin { final _closedCompleter = Completer(); - /// Completes when the [SseConnection] closes. - /// - /// This is guaranteed to fire unlike `this.sink.close`; - Future get onClose => _closedCompleter.future; + /// Wraps the `_outgoingController.stream` to buffer events to enable keep + /// alive. + StreamQueue _outgoingStreamQueue; /// Creates an [SseConnection] for the supplied [_sink]. /// @@ -55,14 +54,15 @@ class SseConnection extends StreamChannelMixin { /// If [keepAlive] is not supplied, the connection will be closed immediately /// after a disconnect. SseConnection(this._sink, {Duration keepAlive}) : _keepAlive = keepAlive { + _outgoingStreamQueue = StreamQueue(_outgoingController.stream); unawaited(_setUpListener()); _outgoingController.onCancel = _close; _incomingController.onCancel = _close; } Future _setUpListener() async { - var outgoingStreamQueue = StreamQueue(_outgoingController.stream); - while (await outgoingStreamQueue.hasNext) { + while ( + !_outgoingController.isClosed && await _outgoingStreamQueue.hasNext) { // If we're in a KeepAlive timeout, there's nowhere to send messages so // wait a short period and check again. if (isInKeepAlivePeriod) { @@ -72,7 +72,7 @@ class SseConnection extends StreamChannelMixin { // Peek the data so we don't remove it from the stream if we're unable to // send it. - final data = await outgoingStreamQueue.peek; + final data = await _outgoingStreamQueue.peek; // Ignore outgoing messages since the connection may have closed while // waiting for the keep alive. @@ -82,7 +82,7 @@ class SseConnection extends StreamChannelMixin { // JSON encode the message to escape new lines. _sink.add('data: ${json.encode(data)}\n'); _sink.add('\n'); - await outgoingStreamQueue.next; // Consume from stream if no errors. + await _outgoingStreamQueue.next; // Consume from stream if no errors. } catch (StateError) { if (_keepAlive == null || _closedCompleter.isCompleted) { rethrow; @@ -127,7 +127,10 @@ class SseConnection extends StreamChannelMixin { if (!_closedCompleter.isCompleted) { _closedCompleter.complete(); _sink.close(); - if (!_outgoingController.isClosed) _outgoingController.close(); + if (!_outgoingController.isClosed) { + _outgoingStreamQueue.cancel(immediate: true); + _outgoingController.close(); + } if (!_incomingController.isClosed) _incomingController.close(); } } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 194277d2d..612c41737 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.3.0 +version: 3.4.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional From 51ef2d5dedd62ec33913226721f824bdb4cb355d Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Thu, 23 Apr 2020 19:04:43 +0100 Subject: [PATCH 042/115] Support shutting down the handler ignoring any keepAlive periods (dart-lang/sse#27) * Support shutting down the handler ignoring any keepAlive periods --- pkgs/sse/CHANGELOG.md | 5 +++++ pkgs/sse/lib/src/server/sse_handler.dart | 24 ++++++++++++++++++++---- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/sse_test.dart | 20 ++++++++++++++++++++ 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index f7b9027b5..ddcd721b1 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.5.0 + +- Add new `shutdown` methods on `SseHandler` and `SseConnection` to allow closing + connections immediately, ignoring any keep-alive periods. + ## 3.4.0 - Remove `onClose` from `SseConnection` and ensure the corresponding diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index c3c80c807..923b87fa9 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -115,10 +115,11 @@ class SseConnection extends StreamChannelMixin { if (_keepAlive == null) { // Close immediately if we're not keeping alive. _close(); - } else if (!isInKeepAlivePeriod) { - // Otherwise if we didn't already have an active timer, set a timer to - // close after the timeout period. If the connection comes back, this will - // be cancelled and all messages left in the queue tried again. + } else if (!isInKeepAlivePeriod && !_closedCompleter.isCompleted) { + // Otherwise if we didn't already have an active timer and we've not already + // been completely closed, set a timer to close after the timeout period. + // If the connection comes back, this will be cancelled and all messages left + // in the queue tried again. _keepAliveTimer = Timer(_keepAlive, _close); } } @@ -126,6 +127,9 @@ class SseConnection extends StreamChannelMixin { void _close() { if (!_closedCompleter.isCompleted) { _closedCompleter.complete(); + // Cancel any existing timer in case we were told to explicitly shut down + // to avoid keeping the process alive. + _keepAliveTimer?.cancel(); _sink.close(); if (!_outgoingController.isClosed) { _outgoingStreamQueue.cancel(immediate: true); @@ -134,6 +138,11 @@ class SseConnection extends StreamChannelMixin { if (!_incomingController.isClosed) _incomingController.close(); } } + + /// Immediately close the connection, ignoring any keepAlive period. + void shutdown() { + _close(); + } } /// [SseHandler] handles requests on a user defined path to create @@ -228,6 +237,13 @@ class SseHandler { // Firefox does not set header "origin". // https://bugzilla.mozilla.org/show_bug.cgi?id=1508661 req.headers['origin'] ?? req.headers['host']; + + /// Immediately close all connections, ignoring any keepAlive periods. + void shutdown() { + for (final connection in _connections.values) { + connection.shutdown(); + } + } } void closeSink(SseConnection connection) => connection._sink.close(); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 612c41737..76f3d97dc 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.4.0 +version: 3.5.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 3a7f76be0..e7263f17c 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -231,6 +231,26 @@ void main() { // Ensure messages arrive in the same order expect(await connection.stream.take(2).toList(), equals(['one', 'two'])); }); + + test('Explicit shutdown does not wait for keepAlive', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + await handler.connections.next; + expect(handler.numberOfClients, 1); + + // Close the underlying connection. + handler.shutdown(); + + // Wait for a short period to allow the connection to close, but not + // long enough that the 30second keep-alive may have expired. + var maxPumps = 50; + while (handler.numberOfClients > 0 && maxPumps-- > 0) { + await pumpEventQueue(times: 1); + } + + // Ensure there are not connected clients. + expect(handler.numberOfClients, 0); + }); }, timeout: const Timeout(Duration(seconds: 120))); } From e04ef0916e52a68358767b285897dbc229b8f391 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Tue, 27 Oct 2020 12:28:34 -0700 Subject: [PATCH 043/115] Improve performance (dart-lang/sse#31) --- pkgs/sse/CHANGELOG.md | 10 + pkgs/sse/analysis_options.yaml | 1 - pkgs/sse/lib/client/sse_client.dart | 37 +- pkgs/sse/lib/src/server/sse_handler.dart | 37 +- pkgs/sse/pubspec.yaml | 3 +- pkgs/sse/test/sse_test.dart | 38 +- pkgs/sse/test/web/index.dart | 9 +- pkgs/sse/test/web/index.dart.js | 4783 +++++++++++++--------- 8 files changed, 2924 insertions(+), 1994 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index ddcd721b1..3b8c49bca 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,13 @@ +## 3.6.0 + +- Improve performance by buffering out of order messages in the server instead + of the client. + +** Note ** This is not modelled as a breaking change as the server can handle +messages from older clients. However, clients should be using the latest server +if they require order guarantees. + + ## 3.5.0 - Add new `shutdown` methods on `SseHandler` and `SseConnection` to allow closing diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index 0e180e426..2a0ddfa5f 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -4,7 +4,6 @@ analyzer: implicit-casts: false errors: dead_code: error - override_on_non_overriding_method: error unused_element: error unused_import: error unused_local_variable: error diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 232a9c9b5..1316191b5 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -21,6 +21,8 @@ class SseClient extends StreamChannelMixin { final _logger = Logger('SseClient'); + int _lastMessageId = -1; + EventSource _eventSource; String _serverUrl; @@ -51,8 +53,6 @@ class SseClient extends StreamChannelMixin { }); } }); - - _startPostingMessages(); } Stream get onOpen => _eventSource.onOpen; @@ -95,24 +95,21 @@ class SseClient extends StreamChannelMixin { close(); } - final _messages = StreamController(); - - void _onOutgoingMessage(dynamic message) async { - _messages.add(message); - } - - void _startPostingMessages() async { - await for (var message in _messages.stream) { - try { - await HttpRequest.request(_serverUrl, - method: 'POST', - sendData: jsonEncode(message), - withCredentials: true); - } on JsonUnsupportedObjectError catch (e) { - _logger.warning('Unable to encode outgoing message: $e'); - } on ArgumentError catch (e) { - _logger.warning('Invalid argument: $e'); - } + void _onOutgoingMessage(String message) async { + String encodedMessage; + try { + encodedMessage = jsonEncode(message); + } on JsonUnsupportedObjectError catch (e) { + _logger.warning('Unable to encode outgoing message: $e'); + } on ArgumentError catch (e) { + _logger.warning('Invalid argument: $e'); + } + try { + await HttpRequest.request('$_serverUrl&messageId=${++_lastMessageId}', + method: 'POST', sendData: encodedMessage, withCredentials: true); + } catch (e) { + _logger.severe('Failed to send $message:\n $e'); + close(); } } } diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 923b87fa9..e7646518c 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -6,6 +6,7 @@ import 'dart:async'; import 'dart:convert'; import 'package:async/async.dart'; +import 'package:collection/collection.dart'; import 'package:logging/logging.dart'; import 'package:pedantic/pedantic.dart'; import 'package:shelf/shelf.dart' as shelf; @@ -20,6 +21,12 @@ String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' 'Access-Control-Allow-Origin: $origin\r\n' '\r\n\r\n'; +class _SseMessage { + final int id; + final String message; + _SseMessage(this.id, this.message); +} + /// A bi-directional SSE connection between server and browser. class SseConnection extends StreamChannelMixin { /// Incoming messages from the Browser client. @@ -39,6 +46,13 @@ class SseConnection extends StreamChannelMixin { /// Whether this connection is currently in the KeepAlive timeout period. bool get isInKeepAlivePeriod => _keepAliveTimer?.isActive ?? false; + /// The id of the last processed incoming message. + int _lastProcessedId = -1; + + /// Incoming messages that have yet to be processed. + final _pendingMessages = + HeapPriorityQueue<_SseMessage>((a, b) => a.id.compareTo(b.id)); + final _closedCompleter = Completer(); /// Wraps the `_outgoingController.stream` to buffer events to enable keep @@ -106,6 +120,26 @@ class SseConnection extends StreamChannelMixin { @override Stream get stream => _incomingController.stream; + /// Adds an incoming [message] to the [stream]. + /// + /// This will buffer messages to guarantee order. + void _addIncomingMessage(int id, String message) { + _pendingMessages.add(_SseMessage(id, message)); + while (_pendingMessages.isNotEmpty) { + var pendingMessage = _pendingMessages.first; + // Only process the next incremental message. + if (pendingMessage.id - _lastProcessedId <= 1) { + _incomingController.sink.add(pendingMessage.message); + _lastProcessedId = pendingMessage.id; + _pendingMessages.removeFirst(); + } else { + // A message came out of order. Wait until we receive the previous + // messages to process. + break; + } + } + } + void _acceptReconnection(Sink sink) { _keepAliveTimer?.cancel(); _sink = sink; @@ -221,9 +255,10 @@ class SseHandler { shelf.Request req, String path) async { try { var clientId = req.url.queryParameters['sseClientId']; + var messageId = int.parse(req.url.queryParameters['messageId'] ?? '0'); var message = await req.readAsString(); var jsonObject = json.decode(message) as String; - _connections[clientId]?._incomingController?.add(jsonObject); + _connections[clientId]?._addIncomingMessage(messageId, jsonObject); } catch (e, st) { _logger.fine('Failed to handle incoming message. $e $st'); } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 76f3d97dc..4df0f803c 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.5.0 +version: 3.6.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional @@ -11,6 +11,7 @@ environment: dependencies: async: ^2.0.8 + collection: ^1.0.0 logging: ^0.11.3+2 pedantic: ^1.4.0 stream_channel: '>=1.6.8 <3.0.0' diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index e7263f17c..00349d1a0 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -60,14 +60,30 @@ void main() { await server.close(); }); - test('Can round trip messages', () async { + test('can round trip messages', () async { await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; connection.sink.add('blah'); expect(await connection.stream.first, 'blah'); }); - test('Multiple clients can connect', () async { + test('messages arrive in-order', () async { + expect(handler.numberOfClients, 0); + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + expect(handler.numberOfClients, 1); + + var expected = []; + var count = 100; + for (var i = 0; i < count; i++) { + expected.add(i.toString()); + } + connection.sink.add('send $count'); + + expect(await connection.stream.take(count).toList(), equals(expected)); + }); + + test('multiple clients can connect', () async { var connections = handler.connections; await webdriver.get('http://localhost:${server.port}'); await connections.next; @@ -75,7 +91,7 @@ void main() { await connections.next; }); - test('Routes data correctly', () async { + test('routes data correctly', () async { var connections = handler.connections; await webdriver.get('http://localhost:${server.port}'); var connectionA = await connections.next; @@ -88,7 +104,7 @@ void main() { expect(await connectionB.stream.first, 'bar'); }); - test('Can close from the server', () async { + test('can close from the server', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; @@ -98,7 +114,7 @@ void main() { expect(handler.numberOfClients, 0); }); - test('Client reconnects after being disconnected', () async { + test('client reconnects after being disconnected', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; @@ -111,7 +127,7 @@ void main() { await handler.connections.next; }); - test('Can close from the client-side', () async { + test('can close from the client-side', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; @@ -125,7 +141,7 @@ void main() { expect(handler.numberOfClients, 0); }); - test('Cancelling the listener closes the connection', () async { + test('cancelling the listener closes the connection', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; @@ -137,7 +153,7 @@ void main() { expect(handler.numberOfClients, 0); }); - test('Disconnects when navigating away', () async { + test('disconnects when navigating away', () async { await webdriver.get('http://localhost:${server.port}'); expect(handler.numberOfClients, 1); @@ -172,7 +188,7 @@ void main() { await server.close(); }); - test('Client reconnect use the same connection', () async { + test('client reconnect use the same connection', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; @@ -213,7 +229,7 @@ void main() { expect(connection.isInKeepAlivePeriod, isFalse); }); - test('Messages sent during disconnect arrive in-order', () async { + test('messages sent during disconnect arrive in-order', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); var connection = await handler.connections.next; @@ -232,7 +248,7 @@ void main() { expect(await connection.stream.take(2).toList(), equals(['one', 'two'])); }); - test('Explicit shutdown does not wait for keepAlive', () async { + test('explicit shutdown does not wait for keepAlive', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); await handler.connections.next; diff --git a/pkgs/sse/test/web/index.dart b/pkgs/sse/test/web/index.dart index c58cde909..7d007573d 100644 --- a/pkgs/sse/test/web/index.dart +++ b/pkgs/sse/test/web/index.dart @@ -14,6 +14,13 @@ void main() { }); channel.stream.listen((s) { - channel.sink.add(s); + if (s.startsWith('send ')) { + var count = int.parse(s.split(' ').last); + for (var i = 0; i < count; i++) { + channel.sink.add('$i'); + } + } else { + channel.sink.add(s); + } }); } diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index caabae548..7ad7d5aa9 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.7.0-dev.0.0. +// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.11.0-190.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -19,8 +19,6 @@ // if this function is defined, it will be called at each entry of a // method or constructor. Used only when compiling programs with // --experiment-call-instrumentation. -{ -} (function dartProgram() { function copyProperties(from, to) { var keys = Object.keys(from); @@ -86,7 +84,7 @@ copyProperties(mixin.prototype, cls.prototype); cls.prototype.constructor = cls; } - function lazy(holder, name, getterName, initializer) { + function lazyOld(holder, name, getterName, initializer) { var uninitializedSentinel = holder; holder[name] = uninitializedSentinel; holder[getterName] = function() { @@ -111,6 +109,34 @@ return result; }; } + function lazy(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) + holder[name] = initializer(); + holder[getterName] = function() { + return this[name]; + }; + return holder[name]; + }; + } + function lazyFinal(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) { + var value = initializer(); + if (holder[name] !== uninitializedSentinel) + H.throwLateInitializationError(name); + holder[name] = value; + } + holder[getterName] = function() { + return this[name]; + }; + return holder[name]; + }; + } function makeConstList(list) { list.immutable$list = Array; list.fixed$length = Array; @@ -205,7 +231,7 @@ return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); }; }; - return {inherit: inherit, inheritMany: inheritMany, mixin: mixin, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, updateHolder: updateHolder, convertToFastObject: convertToFastObject, setFunctionNamesIfNecessary: setFunctionNamesIfNecessary, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; + return {inherit: inherit, inheritMany: inheritMany, mixin: mixin, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, lazyOld: lazyOld, updateHolder: updateHolder, convertToFastObject: convertToFastObject, setFunctionNamesIfNecessary: setFunctionNamesIfNecessary, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; }(); function initializeDeferredHunk(hunk) { typesOffset = init.types.length; @@ -222,8 +248,11 @@ var C = {}, H = {JS_CONST: function JS_CONST() { }, - IterableElementError_tooFew: function() { - return new P.StateError("Too few elements"); + IterableElementError_noElement: function() { + return new P.StateError("No element"); + }, + LateInitializationErrorImpl: function LateInitializationErrorImpl(t0) { + this._message = t0; }, EfficientLengthIterable: function EfficientLengthIterable() { }, @@ -239,18 +268,15 @@ }, FixedLengthListMixin: function FixedLengthListMixin() { }, - Symbol0: function Symbol0(t0) { + Symbol: function Symbol(t0) { this.__internal$_name = t0; }, unminifyOrTag: function(rawClassName) { var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName); - if (typeof preserved === "string") + if (preserved != null) return preserved; return rawClassName; }, - getType: function(index) { - return init.types[H.intTypeCheck(index)]; - }, isJsIndexable: function(object, record) { var result; if (record != null) { @@ -258,13 +284,13 @@ if (result != null) return result; } - return !!J.getInterceptor$(object).$isJavaScriptIndexingBehavior; + return type$.JavaScriptIndexingBehavior_dynamic._is(object); }, S: function(value) { var res; - if (typeof value === "string") + if (typeof value == "string") return value; - if (typeof value === "number") { + if (typeof value == "number") { if (value !== 0) return "" + value; } else if (true === value) @@ -274,7 +300,7 @@ else if (value == null) return "null"; res = J.toString$0$(value); - if (typeof res !== "string") + if (typeof res != "string") throw H.wrapException(H.argumentErrorValue(value)); return res; }, @@ -286,36 +312,45 @@ } return hash; }, + Primitives_parseInt: function(source, radix) { + var match, decimalMatch; + if (typeof source != "string") + H.throwExpression(H.argumentErrorValue(source)); + match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); + if (match == null) + return null; + if (3 >= match.length) + return H.ioore(match, 3); + decimalMatch = match[3]; + if (decimalMatch != null) + return parseInt(source, 10); + if (match[2] != null) + return parseInt(source, 16); + return null; + }, Primitives_objectTypeName: function(object) { - return H.Primitives__objectClassName(object) + H._joinArguments(H.getRuntimeTypeInfo(object), 0, null); - }, - Primitives__objectClassName: function(object) { - var interceptorConstructorName, $name, t1, dispatchName, objectConstructor, match, decompiledName, - interceptor = J.getInterceptor$(object), - interceptorConstructor = interceptor.constructor; - if (typeof interceptorConstructor == "function") { - interceptorConstructorName = interceptorConstructor.name; - $name = typeof interceptorConstructorName === "string" ? interceptorConstructorName : null; - } else - $name = null; - t1 = $name == null; - if (t1 || interceptor === C.Interceptor_methods || !!interceptor.$isUnknownJavaScriptObject) { + return H.Primitives__objectTypeNameNewRti(object); + }, + Primitives__objectTypeNameNewRti: function(object) { + var dispatchName, $constructor, constructorName; + if (object instanceof P.Object) + return H._rtiToString(H.instanceType(object), null); + if (J.getInterceptor$(object) === C.Interceptor_methods || type$.UnknownJavaScriptObject._is(object)) { dispatchName = C.C_JS_CONST(object); - if (t1) - $name = dispatchName; - if (dispatchName === "Object") { - objectConstructor = object.constructor; - if (typeof objectConstructor == "function") { - match = String(objectConstructor).match(/^\s*function\s*([\w$]*)\s*\(/); - decompiledName = match == null ? null : match[1]; - if (typeof decompiledName === "string" && /^\w+$/.test(decompiledName)) - $name = decompiledName; - } + if (H.Primitives__saneNativeClassName(dispatchName)) + return dispatchName; + $constructor = object.constructor; + if (typeof $constructor == "function") { + constructorName = $constructor.name; + if (typeof constructorName == "string" && H.Primitives__saneNativeClassName(constructorName)) + return constructorName; } - return $name; } - $name = $name; - return H.unminifyOrTag($name.length > 1 && C.JSString_methods._codeUnitAt$1($name, 0) === 36 ? C.JSString_methods.substring$1($name, 1) : $name); + return H._rtiToString(H.instanceType(object), null); + }, + Primitives__saneNativeClassName: function($name) { + var t1 = $name !== "Object" && $name !== ""; + return t1; }, Primitives_stringFromNativeUint8List: function(charCodes, start, end) { var i, result, i0, chunkEnd; @@ -411,9 +446,9 @@ return H.Primitives__genericApplyFunction2($function, positionalArguments, namedArguments); }, Primitives__genericApplyFunction2: function($function, positionalArguments, namedArguments) { - var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, keys, _i, used, t2; + var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, keys, _i, defaultValue, used, key; if (positionalArguments != null) - $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, true, null); + $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, type$.dynamic); else $arguments = []; argumentCount = $arguments.length; @@ -425,7 +460,7 @@ defaultValues = !t1 ? defaultValuesClosure() : null; interceptor = J.getInterceptor$($function); jsFunction = interceptor["call*"]; - if (typeof jsFunction === "string") + if (typeof jsFunction == "string") jsFunction = interceptor[jsFunction]; if (t1) { if (namedArguments != null && namedArguments.__js_helper$_length !== 0) @@ -446,16 +481,24 @@ return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); keys = Object.keys(defaultValues); if (namedArguments == null) - for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) - C.JSArray_methods.add$1($arguments, defaultValues[H.stringTypeCheck(keys[_i])]); + for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) { + defaultValue = defaultValues[H._asStringS(keys[_i])]; + if (C.C__Required === defaultValue) + return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + C.JSArray_methods.add$1($arguments, defaultValue); + } else { for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) { - t2 = H.stringTypeCheck(keys[_i]); - if (namedArguments.containsKey$1(t2)) { + key = H._asStringS(keys[_i]); + if (namedArguments.containsKey$1(key)) { ++used; - C.JSArray_methods.add$1($arguments, namedArguments.$index(0, t2)); - } else - C.JSArray_methods.add$1($arguments, defaultValues[t2]); + C.JSArray_methods.add$1($arguments, namedArguments.$index(0, key)); + } else { + defaultValue = defaultValues[key]; + if (C.C__Required === defaultValue) + return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + C.JSArray_methods.add$1($arguments, defaultValue); + } } if (used !== namedArguments.__js_helper$_length) return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); @@ -473,9 +516,9 @@ }, diagnoseIndexError: function(indexable, index) { var $length, t1, _s5_ = "index"; - if (typeof index !== "number" || Math.floor(index) !== index) + if (!H._isInt(index)) return new P.ArgumentError(true, index, _s5_, null); - $length = H.intTypeCheck(J.get$length$asx(indexable)); + $length = H._asIntS(J.get$length$asx(indexable)); if (!(index < 0)) { if (typeof $length !== "number") return H.iae($length); @@ -493,16 +536,17 @@ return value; }, wrapException: function(ex) { - var wrapper; + var wrapper, t1; if (ex == null) ex = new P.NullThrownError(); wrapper = new Error(); wrapper.dartException = ex; + t1 = H.toStringWrapper; if ("defineProperty" in Object) { - Object.defineProperty(wrapper, "message", {get: H.toStringWrapper}); + Object.defineProperty(wrapper, "message", {get: t1}); wrapper.name = ""; } else - wrapper.toString = H.toStringWrapper; + wrapper.toString = t1; return wrapper; }, toStringWrapper: function() { @@ -519,7 +563,7 @@ message = H.quoteStringForRegExp(message.replace(String({}), '$receiver$')); match = message.match(/\\\$[a-zA-Z]+\\\$/g); if (match == null) - match = H.setRuntimeTypeInfo([], [P.String]); + match = H.setRuntimeTypeInfo([], type$.JSArray_String); $arguments = match.indexOf("\\$arguments\\$"); argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); expr = match.indexOf("\\$expr\\$"); @@ -555,17 +599,25 @@ return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); }, unwrapException: function(ex) { - var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, t2, _null = null, - t1 = new H.unwrapException_saveStackTrace(ex); if (ex == null) - return; + return new H.NullThrownFromJavaScriptException(ex); if (ex instanceof H.ExceptionAndStackTrace) - return t1.call$1(ex.dartException); + return H.saveStackTrace(ex, ex.dartException); if (typeof ex !== "object") return ex; if ("dartException" in ex) - return t1.call$1(ex.dartException); - else if (!("message" in ex)) + return H.saveStackTrace(ex, ex.dartException); + return H._unwrapNonDartException(ex); + }, + saveStackTrace: function(ex, error) { + if (type$.Error._is(error)) + if (error.$thrownJsError == null) + error.$thrownJsError = ex; + return error; + }, + _unwrapNonDartException: function(ex) { + var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, t1, _null = null; + if (!("message" in ex)) return ex; message = ex.message; if ("number" in ex && typeof ex.number == "number") { @@ -574,10 +626,10 @@ if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) switch (ieErrorCode) { case 438: - return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); + return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); case 445: case 5007: - return t1.call$1(H.NullError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); + return H.saveStackTrace(ex, H.NullError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); } } if (ex instanceof TypeError) { @@ -593,12 +645,12 @@ undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); match = nsme.matchTypeError$1(message); if (match != null) - return t1.call$1(H.JsNoSuchMethodError$(H.stringTypeCheck(message), match)); + return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asStringS(message), match)); else { match = notClosure.matchTypeError$1(message); if (match != null) { match.method = "call"; - return t1.call$1(H.JsNoSuchMethodError$(H.stringTypeCheck(message), match)); + return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asStringS(message), match)); } else { match = nullCall.matchTypeError$1(message); if (match == null) { @@ -615,29 +667,29 @@ match = undefProperty.matchTypeError$1(message); if (match == null) { match = undefLiteralProperty.matchTypeError$1(message); - t2 = match != null; + t1 = match != null; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; - if (t2) - return t1.call$1(H.NullError$(H.stringTypeCheck(message), match)); + t1 = true; + if (t1) + return H.saveStackTrace(ex, H.NullError$(H._asStringS(message), match)); } } - return t1.call$1(new H.UnknownJsTypeError(typeof message === "string" ? message : "")); + return H.saveStackTrace(ex, new H.UnknownJsTypeError(typeof message == "string" ? message : "")); } if (ex instanceof RangeError) { - if (typeof message === "string" && message.indexOf("call stack") !== -1) + if (typeof message == "string" && message.indexOf("call stack") !== -1) return new P.StackOverflowError(); message = function(ex) { try { @@ -646,10 +698,10 @@ } return null; }(ex); - return t1.call$1(new P.ArgumentError(false, _null, _null, typeof message === "string" ? message.replace(/^RangeError:\s*/, "") : message)); + return H.saveStackTrace(ex, new P.ArgumentError(false, _null, _null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message)); } if (typeof InternalError == "function" && ex instanceof InternalError) - if (typeof message === "string" && message === "too much recursion") + if (typeof message == "string" && message === "too much recursion") return new P.StackOverflowError(); return ex; }, @@ -675,8 +727,8 @@ return result; }, invokeClosure: function(closure, numberOfArguments, arg1, arg2, arg3, arg4) { - H.interceptedTypeCheck(closure, "$isFunction"); - switch (H.intTypeCheck(numberOfArguments)) { + type$.Function._as(closure); + switch (H._asIntS(numberOfArguments)) { case 0: return closure.call$0(); case 1: @@ -693,7 +745,7 @@ convertDartClosureToJS: function(closure, arity) { var $function; if (closure == null) - return; + return null; $function = closure.$identity; if (!!$function) return $function; @@ -706,10 +758,10 @@ return $function; }, Closure_fromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, propertyName) { - var $constructor, t1, trampoline, signatureFunction, applyTrampoline, i, stub, stubCallName, _null = null, + var $constructor, t1, trampoline, applyTrampoline, i, stub, stubCallName, $function = functions[0], callName = $function.$callName, - $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(_null, _null, _null, _null).constructor.prototype); + $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(null, null, null, "").constructor.prototype); $prototype.$initialize = $prototype.constructor; if (isStatic) $constructor = function static_tear_off() { @@ -732,8 +784,7 @@ $prototype.$static_name = propertyName; trampoline = $function; } - signatureFunction = H.Closure__computeSignatureFunctionLegacy(reflectionInfo, isStatic, isIntercepted); - $prototype.$signature = signatureFunction; + $prototype.$signature = H.Closure__computeSignatureFunctionNewRti(reflectionInfo, isStatic, isIntercepted); $prototype[callName] = trampoline; for (applyTrampoline = trampoline, i = 1; i < functions.length; ++i) { stub = functions[i]; @@ -752,25 +803,24 @@ $prototype.$defaultValues = $function.$defaultValues; return $constructor; }, - Closure__computeSignatureFunctionLegacy: function(functionType, isStatic, isIntercepted) { - var getReceiver; + Closure__computeSignatureFunctionNewRti: function(functionType, isStatic, isIntercepted) { + var typeEvalMethod; if (typeof functionType == "number") return function(getType, t) { return function() { return getType(t); }; - }(H.getType, functionType); - if (typeof functionType == "function") + }(H.getTypeFromTypesTable, functionType); + if (typeof functionType == "string") { if (isStatic) - return functionType; - else { - getReceiver = isIntercepted ? H.BoundClosure_receiverOf : H.BoundClosure_selfOf; - return function(f, r) { - return function() { - return f.apply({$receiver: r(this)}, arguments); - }; - }(functionType, getReceiver); - } + throw H.wrapException("Cannot compute signature for static tearoff."); + typeEvalMethod = isIntercepted ? H.BoundClosure_evalRecipeIntercepted : H.BoundClosure_evalRecipe; + return function(recipe, evalOnReceiver) { + return function() { + return evalOnReceiver(this, recipe); + }; + }(functionType, typeEvalMethod); + } throw H.wrapException("Error in functionType of tearoff"); }, Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) { @@ -837,9 +887,7 @@ return t1.$add(); $.Closure_functionCounter = t1 + 1; selfName = "self" + t1; - t1 = "return function(){var " + selfName + " = this."; - t2 = $.BoundClosure_selfFieldNameCache; - return new Function(t1 + H.S(t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + ";return " + selfName + "." + H.S(stubName) + "();}")(); + return new Function("return function(){var " + selfName + " = this." + H.S(H.BoundClosure_selfFieldName()) + ";return " + selfName + "." + H.S(stubName) + "();}")(); } $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(","); t1 = $.Closure_functionCounter; @@ -847,16 +895,14 @@ return t1.$add(); $.Closure_functionCounter = t1 + 1; $arguments += t1; - t1 = "return function(" + $arguments + "){return this."; - t2 = $.BoundClosure_selfFieldNameCache; - return new Function(t1 + H.S(t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + "." + H.S(stubName) + "(" + $arguments + ");}")(); + return new Function("return function(" + $arguments + "){return this." + H.S(H.BoundClosure_selfFieldName()) + "." + H.S(stubName) + "(" + $arguments + ");}")(); }, Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) { var getSelf = H.BoundClosure_selfOf, getReceiver = H.BoundClosure_receiverOf; switch (isSuperCall ? -1 : arity) { case 0: - throw H.wrapException(H.RuntimeError$("Intercepted function with no arguments.")); + throw H.wrapException(new H.RuntimeError("Intercepted function with no arguments.")); case 1: return function(n, s, r) { return function() { @@ -904,22 +950,20 @@ } }, Closure_forwardInterceptedCallTo: function(receiver, $function) { - var t2, stubName, arity, lookedUpFunction, t3, t4, $arguments, - t1 = $.BoundClosure_selfFieldNameCache; - if (t1 == null) - t1 = $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self"); - t2 = $.BoundClosure_receiverFieldNameCache; - if (t2 == null) - t2 = $.BoundClosure_receiverFieldNameCache = H.BoundClosure_computeFieldNamed("receiver"); + var stubName, arity, lookedUpFunction, t1, t2, $arguments, + selfField = H.BoundClosure_selfFieldName(), + receiverField = $.BoundClosure_receiverFieldNameCache; + if (receiverField == null) + receiverField = $.BoundClosure_receiverFieldNameCache = H.BoundClosure_computeFieldNamed("receiver"); stubName = $function.$stubName; arity = $function.length; lookedUpFunction = receiver[stubName]; - t3 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; - t4 = !t3 || arity >= 28; - if (t4) - return H.Closure_cspForwardInterceptedCall(arity, !t3, stubName, $function); + t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; + t2 = !t1 || arity >= 28; + if (t2) + return H.Closure_cspForwardInterceptedCall(arity, !t1, stubName, $function); if (arity === 1) { - t1 = "return function(){return this." + H.S(t1) + "." + H.S(stubName) + "(this." + H.S(t2) + ");"; + t1 = "return function(){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + receiverField + ");"; t2 = $.Closure_functionCounter; if (typeof t2 !== "number") return t2.$add(); @@ -927,7 +971,7 @@ return new Function(t1 + t2 + "}")(); } $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(","); - t1 = "return function(" + $arguments + "){return this." + H.S(t1) + "." + H.S(stubName) + "(this." + H.S(t2) + ", " + $arguments + ");"; + t1 = "return function(" + $arguments + "){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + receiverField + ", " + $arguments + ");"; t2 = $.Closure_functionCounter; if (typeof t2 !== "number") return t2.$add(); @@ -937,530 +981,56 @@ closureFromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, $name) { return H.Closure_fromTearOff(receiver, functions, applyTrampolineIndex, reflectionInfo, !!isStatic, !!isIntercepted, $name); }, + BoundClosure_evalRecipe: function(closure, recipe) { + return H._Universe_evalInEnvironment(init.typeUniverse, H.instanceType(closure._self), recipe); + }, + BoundClosure_evalRecipeIntercepted: function(closure, recipe) { + return H._Universe_evalInEnvironment(init.typeUniverse, H.instanceType(closure._receiver), recipe); + }, BoundClosure_selfOf: function(closure) { return closure._self; }, BoundClosure_receiverOf: function(closure) { return closure._receiver; }, + BoundClosure_selfFieldName: function() { + var t1 = $.BoundClosure_selfFieldNameCache; + return t1 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t1; + }, BoundClosure_computeFieldNamed: function(fieldName) { var t1, i, $name, template = new H.BoundClosure("self", "target", "receiver", "name"), - names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template)); + names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template), type$.nullable_Object); for (t1 = names.length, i = 0; i < t1; ++i) { $name = names[i]; if (template[$name] === fieldName) return $name; } + throw H.wrapException(P.ArgumentError$("Field name " + fieldName + " not found.")); }, boolConversionCheck: function(value) { if (value == null) H.assertThrow("boolean expression must not be null"); return value; }, - stringTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "string") - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "String")); - }, - stringTypeCast: function(value) { - if (typeof value === "string" || value == null) - return value; - throw H.wrapException(H.CastErrorImplementation$(value, "String")); - }, - doubleTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "number") - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "double")); - }, - numTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "number") - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "num")); - }, - boolTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "boolean") - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "bool")); - }, - intTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "number" && Math.floor(value) === value) - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "int")); - }, - propertyTypeError: function(value, property) { - throw H.wrapException(H.TypeErrorImplementation$(value, H.unminifyOrTag(H.stringTypeCheck(property).substring(3)))); - }, - propertyTypeCastError: function(value, property) { - throw H.wrapException(H.CastErrorImplementation$(value, H.unminifyOrTag(H.stringTypeCheck(property).substring(3)))); - }, - interceptedTypeCheck: function(value, property) { - if (value == null) - return value; - if ((typeof value === "object" || typeof value === "function") && J.getInterceptor$(value)[property]) - return value; - H.propertyTypeError(value, property); - }, - interceptedTypeCast: function(value, property) { - var t1; - if (value != null) - t1 = (typeof value === "object" || typeof value === "function") && J.getInterceptor$(value)[property]; - else - t1 = true; - if (t1) - return value; - H.propertyTypeCastError(value, property); - }, - listTypeCheck: function(value) { - if (value == null) - return value; - if (!!J.getInterceptor$(value).$isList) - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "List")); - }, - listSuperNativeTypeCheck: function(value, property) { - var t1; - if (value == null) - return value; - t1 = J.getInterceptor$(value); - if (!!t1.$isList) - return value; - if (t1[property]) - return value; - H.propertyTypeError(value, property); - }, - extractFunctionTypeObjectFromInternal: function(o) { - var signature; - if ("$signature" in o) { - signature = o.$signature; - if (typeof signature == "number") - return init.types[H.intTypeCheck(signature)]; - else - return o.$signature(); - } - return; - }, - functionTypeTest: function(value, functionTypeRti) { - var functionTypeObject; - if (typeof value == "function") - return true; - functionTypeObject = H.extractFunctionTypeObjectFromInternal(J.getInterceptor$(value)); - if (functionTypeObject == null) - return false; - return H._isFunctionSubtype(functionTypeObject, null, functionTypeRti, null); - }, - functionTypeCheck: function(value, functionTypeRti) { - var $self, t1; - if (value == null) - return value; - if ($._inTypeAssertion) - return value; - $._inTypeAssertion = true; - try { - if (H.functionTypeTest(value, functionTypeRti)) - return value; - $self = H.runtimeTypeToString(functionTypeRti); - t1 = H.TypeErrorImplementation$(value, $self); - throw H.wrapException(t1); - } finally { - $._inTypeAssertion = false; - } - }, - futureOrCheck: function(o, futureOrRti) { - if (o != null && !H.checkSubtypeOfRuntimeType(o, futureOrRti)) - H.throwExpression(H.TypeErrorImplementation$(o, H.runtimeTypeToString(futureOrRti))); - return o; - }, - TypeErrorImplementation$: function(value, type) { - return new H.TypeErrorImplementation("TypeError: " + P.Error_safeToString(value) + ": type '" + H.S(H._typeDescription(value)) + "' is not a subtype of type '" + type + "'"); - }, - CastErrorImplementation$: function(value, type) { - return new H.CastErrorImplementation("CastError: " + P.Error_safeToString(value) + ": type '" + H.S(H._typeDescription(value)) + "' is not a subtype of type '" + type + "'"); - }, - _typeDescription: function(value) { - var functionTypeObject, - t1 = J.getInterceptor$(value); - if (!!t1.$isClosure) { - functionTypeObject = H.extractFunctionTypeObjectFromInternal(t1); - if (functionTypeObject != null) - return H.runtimeTypeToString(functionTypeObject); - return "Closure"; - } - return H.Primitives_objectTypeName(value); - }, assertThrow: function(message) { throw H.wrapException(new H._AssertionError(message)); }, throwCyclicInit: function(staticName) { throw H.wrapException(new P.CyclicInitializationError(staticName)); }, - RuntimeError$: function(message) { - return new H.RuntimeError(message); - }, getIsolateAffinityTag: function($name) { return init.getIsolateTag($name); }, - setRuntimeTypeInfo: function(target, rti) { - target.$ti = rti; - return target; - }, - getRuntimeTypeInfo: function(target) { - if (target == null) - return; - return target.$ti; - }, - getRuntimeTypeArguments: function(interceptor, object, substitutionName) { - return H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(object)); - }, - getRuntimeTypeArgumentIntercepted: function(interceptor, target, substitutionName, index) { - var $arguments = H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target)); - return $arguments == null ? null : $arguments[index]; - }, - getRuntimeTypeArgument: function(target, substitutionName, index) { - var $arguments = H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target)); - return $arguments == null ? null : $arguments[index]; - }, - getTypeArgumentByIndex: function(target, index) { - var rti = H.getRuntimeTypeInfo(target); - return rti == null ? null : rti[index]; - }, - runtimeTypeToString: function(rti) { - return H._runtimeTypeToString(rti, null); - }, - _runtimeTypeToString: function(rti, genericContext) { - var t1, t2; - if (rti == null) - return "dynamic"; - if (rti === -1) - return "void"; - if (typeof rti === "object" && rti !== null && rti.constructor === Array) - return H.unminifyOrTag(rti[0].name) + H._joinArguments(rti, 1, genericContext); - if (typeof rti == "function") - return H.unminifyOrTag(rti.name); - if (rti === -2) - return "dynamic"; - if (typeof rti === "number") { - H.intTypeCheck(rti); - if (genericContext == null || rti < 0 || rti >= genericContext.length) - return "unexpected-generic-index:" + rti; - t1 = genericContext.length; - t2 = t1 - rti - 1; - if (t2 < 0 || t2 >= t1) - return H.ioore(genericContext, t2); - return H.S(genericContext[t2]); - } - if ('func' in rti) - return H._functionRtiToString(rti, genericContext); - if ('futureOr' in rti) - return "FutureOr<" + H._runtimeTypeToString("type" in rti ? rti.type : null, genericContext) + ">"; - return "unknown-reified-type"; - }, - _functionRtiToString: function(rti, genericContext) { - var boundsRti, outerContextLength, offset, i, i0, typeParameters, typeSep, t1, t2, boundRti, returnTypeText, $arguments, argumentsText, sep, _i, argument, optionalArguments, namedArguments, t3, _s2_ = ", "; - if ("bounds" in rti) { - boundsRti = rti.bounds; - if (genericContext == null) { - genericContext = H.setRuntimeTypeInfo([], [P.String]); - outerContextLength = null; - } else - outerContextLength = genericContext.length; - offset = genericContext.length; - for (i = boundsRti.length, i0 = i; i0 > 0; --i0) - C.JSArray_methods.add$1(genericContext, "T" + (offset + i0)); - for (typeParameters = "<", typeSep = "", i0 = 0; i0 < i; ++i0, typeSep = _s2_) { - typeParameters += typeSep; - t1 = genericContext.length; - t2 = t1 - i0 - 1; - if (t2 < 0) - return H.ioore(genericContext, t2); - typeParameters = C.JSString_methods.$add(typeParameters, genericContext[t2]); - boundRti = boundsRti[i0]; - if (boundRti != null && boundRti !== P.Object) - typeParameters += " extends " + H._runtimeTypeToString(boundRti, genericContext); - } - typeParameters += ">"; - } else { - typeParameters = ""; - outerContextLength = null; - } - returnTypeText = !!rti.v ? "void" : H._runtimeTypeToString(rti.ret, genericContext); - if ("args" in rti) { - $arguments = rti.args; - for (t1 = $arguments.length, argumentsText = "", sep = "", _i = 0; _i < t1; ++_i, sep = _s2_) { - argument = $arguments[_i]; - argumentsText = argumentsText + sep + H._runtimeTypeToString(argument, genericContext); - } - } else { - argumentsText = ""; - sep = ""; - } - if ("opt" in rti) { - optionalArguments = rti.opt; - argumentsText += sep + "["; - for (t1 = optionalArguments.length, sep = "", _i = 0; _i < t1; ++_i, sep = _s2_) { - argument = optionalArguments[_i]; - argumentsText = argumentsText + sep + H._runtimeTypeToString(argument, genericContext); - } - argumentsText += "]"; - } - if ("named" in rti) { - namedArguments = rti.named; - argumentsText += sep + "{"; - for (t1 = H.extractKeys(namedArguments), t2 = t1.length, sep = "", _i = 0; _i < t2; ++_i, sep = _s2_) { - t3 = H.stringTypeCheck(t1[_i]); - argumentsText = argumentsText + sep + H._runtimeTypeToString(namedArguments[t3], genericContext) + (" " + H.S(t3)); - } - argumentsText += "}"; - } - if (outerContextLength != null) - genericContext.length = outerContextLength; - return typeParameters + "(" + argumentsText + ") => " + returnTypeText; - }, - _joinArguments: function(types, startIndex, genericContext) { - var buffer, index, separator, allDynamic, t1, argument; - if (types == null) - return ""; - buffer = new P.StringBuffer(""); - for (index = startIndex, separator = "", allDynamic = true, t1 = ""; index < types.length; ++index, separator = ", ") { - buffer._contents = t1 + separator; - argument = types[index]; - if (argument != null) - allDynamic = false; - t1 = buffer._contents += H._runtimeTypeToString(argument, genericContext); - } - return "<" + buffer.toString$0(0) + ">"; - }, - substitute: function(substitution, $arguments) { - if (substitution == null) - return $arguments; - substitution = substitution.apply(null, $arguments); - if (substitution == null) - return; - if (typeof substitution === "object" && substitution !== null && substitution.constructor === Array) - return substitution; - if (typeof substitution == "function") - return substitution.apply(null, $arguments); - return $arguments; - }, - checkSubtype: function(object, isField, checks, asField) { - var $arguments, interceptor; - if (object == null) - return false; - $arguments = H.getRuntimeTypeInfo(object); - interceptor = J.getInterceptor$(object); - if (interceptor[isField] == null) - return false; - return H.areSubtypes(H.substitute(interceptor[asField], $arguments), null, checks, null); - }, - subtypeCast: function(object, isField, checks, asField) { - if (object == null) - return object; - if (H.checkSubtype(object, isField, checks, asField)) - return object; - throw H.wrapException(H.CastErrorImplementation$(object, function(str, names) { - return str.replace(/[^<,> ]+/g, function(m) { - return names[m] || m; - }); - }(H.unminifyOrTag(isField.substring(3)) + H._joinArguments(checks, 0, null), init.mangledGlobalNames))); - }, - assertSubtype: function(object, isField, checks, asField) { - if (object == null) - return object; - if (H.checkSubtype(object, isField, checks, asField)) - return object; - throw H.wrapException(H.TypeErrorImplementation$(object, function(str, names) { - return str.replace(/[^<,> ]+/g, function(m) { - return names[m] || m; - }); - }(H.unminifyOrTag(isField.substring(3)) + H._joinArguments(checks, 0, null), init.mangledGlobalNames))); - }, - areSubtypes: function(s, sEnv, t, tEnv) { - var len, i; - if (t == null) - return true; - if (s == null) { - len = t.length; - for (i = 0; i < len; ++i) - if (!H._isSubtype(null, null, t[i], tEnv)) - return false; - return true; - } - len = s.length; - for (i = 0; i < len; ++i) - if (!H._isSubtype(s[i], sEnv, t[i], tEnv)) - return false; - return true; - }, - computeSignature: function(signature, context, contextName) { - return signature.apply(context, H.substitute(J.getInterceptor$(context)["$as" + H.S(contextName)], H.getRuntimeTypeInfo(context))); - }, - isSupertypeOfNullRecursive: function(type) { - var typeArgument; - if (typeof type === "number") - return false; - if ('futureOr' in type) { - typeArgument = "type" in type ? type.type : null; - return type == null || type.name === "Object" || type.name === "Null" || type === -1 || type === -2 || H.isSupertypeOfNullRecursive(typeArgument); - } - return false; - }, - checkSubtypeOfRuntimeType: function(o, t) { - var type, rti; - if (o == null) - return t == null || t.name === "Object" || t.name === "Null" || t === -1 || t === -2 || H.isSupertypeOfNullRecursive(t); - if (t == null || t === -1 || t.name === "Object" || t === -2) - return true; - if (typeof t == "object") { - if ('futureOr' in t) - if (H.checkSubtypeOfRuntimeType(o, "type" in t ? t.type : null)) - return true; - if ('func' in t) - return H.functionTypeTest(o, t); - } - type = J.getInterceptor$(o).constructor; - rti = H.getRuntimeTypeInfo(o); - if (rti != null) { - rti = rti.slice(); - rti.splice(0, 0, type); - type = rti; - } - return H._isSubtype(type, null, t, null); - }, - assertSubtypeOfRuntimeType: function(object, type) { - if (object != null && !H.checkSubtypeOfRuntimeType(object, type)) - throw H.wrapException(H.TypeErrorImplementation$(object, H.runtimeTypeToString(type))); - return object; - }, - _isSubtype: function(s, sEnv, t, tEnv) { - var t1, typeOfS, tTypeArgument, futureSubstitution, futureArguments, t2, typeOfT, typeOfTString, substitution, _null = null; - if (s === t) - return true; - if (t == null || t === -1 || t.name === "Object" || t === -2) - return true; - if (s === -2) - return true; - if (s == null || s === -1 || s.name === "Object" || s === -2) { - if (typeof t === "number") - return false; - if ('futureOr' in t) - return H._isSubtype(s, sEnv, "type" in t ? t.type : _null, tEnv); - return false; - } - if (typeof s === "number") - return H._isSubtype(sEnv[H.intTypeCheck(s)], sEnv, t, tEnv); - if (typeof t === "number") - return false; - if (s.name === "Null") - return true; - t1 = typeof s === "object" && s !== null && s.constructor === Array; - typeOfS = t1 ? s[0] : s; - if ('futureOr' in t) { - tTypeArgument = "type" in t ? t.type : _null; - if ('futureOr' in s) - return H._isSubtype("type" in s ? s.type : _null, sEnv, tTypeArgument, tEnv); - else if (H._isSubtype(s, sEnv, tTypeArgument, tEnv)) - return true; - else { - if (!('$is' + "Future" in typeOfS.prototype)) - return false; - futureSubstitution = typeOfS.prototype["$as" + "Future"]; - futureArguments = H.substitute(futureSubstitution, t1 ? s.slice(1) : _null); - return H._isSubtype(typeof futureArguments === "object" && futureArguments !== null && futureArguments.constructor === Array ? futureArguments[0] : _null, sEnv, tTypeArgument, tEnv); - } - } - if ('func' in t) - return H._isFunctionSubtype(s, sEnv, t, tEnv); - if ('func' in s) - return t.name === "Function"; - t2 = typeof t === "object" && t !== null && t.constructor === Array; - typeOfT = t2 ? t[0] : t; - if (typeOfT !== typeOfS) { - typeOfTString = typeOfT.name; - if (!('$is' + typeOfTString in typeOfS.prototype)) - return false; - substitution = typeOfS.prototype["$as" + typeOfTString]; - } else - substitution = _null; - if (!t2) - return true; - t1 = t1 ? s.slice(1) : _null; - t2 = t.slice(1); - return H.areSubtypes(H.substitute(substitution, t1), sEnv, t2, tEnv); - }, - _isFunctionSubtype: function(s, sEnv, t, tEnv) { - var sBounds, tBounds, sParameterTypes, tParameterTypes, sOptionalParameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalParametersLen, tOptionalParametersLen, pos, tPos, sPos, sNamedParameters, tNamedParameters; - if (!('func' in s)) - return false; - if ("bounds" in s) { - if (!("bounds" in t)) - return false; - sBounds = s.bounds; - tBounds = t.bounds; - if (sBounds.length !== tBounds.length) - return false; - sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv); - tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv); - } else if ("bounds" in t) - return false; - if (!H._isSubtype(s.ret, sEnv, t.ret, tEnv)) - 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; - for (pos = 0; pos < sParametersLen; ++pos) - if (!H._isSubtype(tParameterTypes[pos], tEnv, sParameterTypes[pos], sEnv)) - return false; - for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos) - if (!H._isSubtype(tParameterTypes[tPos], tEnv, sOptionalParameterTypes[sPos], sEnv)) - return false; - for (tPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos) - if (!H._isSubtype(tOptionalParameterTypes[tPos], tEnv, sOptionalParameterTypes[sPos], sEnv)) - return false; - sNamedParameters = s.named; - tNamedParameters = t.named; - if (tNamedParameters == null) - return true; - if (sNamedParameters == null) - return false; - return H.namedParametersSubtypeCheck(sNamedParameters, sEnv, tNamedParameters, tEnv); - }, - namedParametersSubtypeCheck: function(s, sEnv, t, tEnv) { - var t1, i, $name, - names = Object.getOwnPropertyNames(t); - for (t1 = names.length, i = 0; i < t1; ++i) { - $name = names[i]; - if (!Object.hasOwnProperty.call(s, $name)) - return false; - if (!H._isSubtype(t[$name], tEnv, s[$name], sEnv)) - return false; - } - return true; + throwLateInitializationError: function($name) { + return H.throwExpression(new H.LateInitializationErrorImpl($name)); }, defineProperty: function(obj, property, value) { Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); }, lookupAndCacheInterceptor: function(obj) { - var interceptor, interceptorClass, mark, t1, - tag = H.stringTypeCheck($.getTagFunction.call$1(obj)), + var interceptor, interceptorClass, altTag, mark, t1, + tag = H._asStringS($.getTagFunction.call$1(obj)), record = $.dispatchRecordsForInstanceTags[tag]; if (record != null) { Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); @@ -1471,21 +1041,22 @@ return interceptor; interceptorClass = init.interceptorsByTag[tag]; if (interceptorClass == null) { - tag = H.stringTypeCheck($.alternateTagFunction.call$2(obj, tag)); - if (tag != null) { - record = $.dispatchRecordsForInstanceTags[tag]; + altTag = H._asStringQ($.alternateTagFunction.call$2(obj, tag)); + if (altTag != null) { + record = $.dispatchRecordsForInstanceTags[altTag]; if (record != null) { Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); return record.i; } - interceptor = $.interceptorsForUncacheableTags[tag]; + interceptor = $.interceptorsForUncacheableTags[altTag]; if (interceptor != null) return interceptor; - interceptorClass = init.interceptorsByTag[tag]; + interceptorClass = init.interceptorsByTag[altTag]; + tag = altTag; } } if (interceptorClass == null) - return; + return null; interceptor = interceptorClass.prototype; mark = tag[0]; if (mark === "!") { @@ -1616,7 +1187,7 @@ JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { var _ = this; _._memberName = t0; - _._kind = t1; + _.__js_helper$_kind = t1; _._arguments = t2; _._namedArgumentNames = t3; _._typeArgumentCount = t4; @@ -1636,24 +1207,24 @@ _._receiver = t5; }, NullError: function NullError(t0, t1) { - this._message = t0; + this.__js_helper$_message = t0; this._method = t1; }, JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) { - this._message = t0; + this.__js_helper$_message = t0; this._method = t1; this._receiver = t2; }, UnknownJsTypeError: function UnknownJsTypeError(t0) { - this._message = t0; + this.__js_helper$_message = t0; + }, + NullThrownFromJavaScriptException: function NullThrownFromJavaScriptException(t0) { + this._irritant = t0; }, ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) { this.dartException = t0; this.stackTrace = t1; }, - unwrapException_saveStackTrace: function unwrapException_saveStackTrace(t0) { - this.ex = t0; - }, _StackTrace: function _StackTrace(t0) { this._exception = t0; this._trace = null; @@ -1671,22 +1242,18 @@ _._receiver = t2; _._name = t3; }, - TypeErrorImplementation: function TypeErrorImplementation(t0) { - this.message = t0; - }, - CastErrorImplementation: function CastErrorImplementation(t0) { - this.message = t0; - }, RuntimeError: function RuntimeError(t0) { this.message = t0; }, _AssertionError: function _AssertionError(t0) { this.message = t0; }, + _Required: function _Required() { + }, JsLinkedHashMap: function JsLinkedHashMap(t0) { var _ = this; _.__js_helper$_length = 0; - _._last = _._first = _._rest = _._nums = _._strings = null; + _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null; _._modifications = 0; _.$ti = t0; }, @@ -1733,24 +1300,1410 @@ }, NativeInt8List: function NativeInt8List() { }, - NativeUint16List: function NativeUint16List() { + NativeUint16List: function NativeUint16List() { + }, + NativeUint32List: function NativeUint32List() { + }, + NativeUint8ClampedList: function NativeUint8ClampedList() { + }, + NativeUint8List: function NativeUint8List() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + Rti__getQuestionFromStar: function(universe, rti) { + var question = rti._precomputed1; + return question == null ? rti._precomputed1 = H._Universe__lookupQuestionRti(universe, rti._primary, true) : question; + }, + Rti__getFutureFromFutureOr: function(universe, rti) { + var future = rti._precomputed1; + return future == null ? rti._precomputed1 = H._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; + }, + Rti__isUnionOfFunctionType: function(rti) { + var kind = rti._kind; + if (kind === 6 || kind === 7 || kind === 8) + return H.Rti__isUnionOfFunctionType(rti._primary); + return kind === 11 || kind === 12; + }, + Rti__getCanonicalRecipe: function(rti) { + return rti._canonicalRecipe; + }, + findType: function(recipe) { + return H._Universe_eval(init.typeUniverse, recipe, false); + }, + _substitute: function(universe, rti, typeArguments, depth) { + var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, + kind = rti._kind; + switch (kind) { + case 5: + case 1: + case 2: + case 3: + case 4: + return rti; + case 6: + baseType = rti._primary; + substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return H._Universe__lookupStarRti(universe, substitutedBaseType, true); + case 7: + baseType = rti._primary; + substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return H._Universe__lookupQuestionRti(universe, substitutedBaseType, true); + case 8: + baseType = rti._primary; + substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return H._Universe__lookupFutureOrRti(universe, substitutedBaseType, true); + case 9: + interfaceTypeArguments = rti._rest; + substitutedInterfaceTypeArguments = H._substituteArray(universe, interfaceTypeArguments, typeArguments, depth); + if (substitutedInterfaceTypeArguments === interfaceTypeArguments) + return rti; + return H._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments); + case 10: + base = rti._primary; + substitutedBase = H._substitute(universe, base, typeArguments, depth); + $arguments = rti._rest; + substitutedArguments = H._substituteArray(universe, $arguments, typeArguments, depth); + if (substitutedBase === base && substitutedArguments === $arguments) + return rti; + return H._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); + case 11: + returnType = rti._primary; + substitutedReturnType = H._substitute(universe, returnType, typeArguments, depth); + functionParameters = rti._rest; + substitutedFunctionParameters = H._substituteFunctionParameters(universe, functionParameters, typeArguments, depth); + if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters) + return rti; + return H._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters); + case 12: + bounds = rti._rest; + depth += bounds.length; + substitutedBounds = H._substituteArray(universe, bounds, typeArguments, depth); + base = rti._primary; + substitutedBase = H._substitute(universe, base, typeArguments, depth); + if (substitutedBounds === bounds && substitutedBase === base) + return rti; + return H._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true); + case 13: + index = rti._primary; + if (index < depth) + return rti; + argument = typeArguments[index - depth]; + if (argument == null) + return rti; + return argument; + default: + throw H.wrapException(P.AssertionError$("Attempted to substitute unexpected RTI kind " + kind)); + } + }, + _substituteArray: function(universe, rtiArray, typeArguments, depth) { + var changed, i, rti, substitutedRti, + $length = rtiArray.length, + result = []; + for (changed = false, i = 0; i < $length; ++i) { + rti = rtiArray[i]; + substitutedRti = H._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result.push(substitutedRti); + } + return changed ? result : rtiArray; + }, + _substituteNamed: function(universe, namedArray, typeArguments, depth) { + var changed, i, t1, t2, rti, substitutedRti, + $length = namedArray.length, + result = []; + for (changed = false, i = 0; i < $length; i += 3) { + t1 = namedArray[i]; + t2 = namedArray[i + 1]; + rti = namedArray[i + 2]; + substitutedRti = H._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result.push(t1); + result.push(t2); + result.push(substitutedRti); + } + return changed ? result : namedArray; + }, + _substituteFunctionParameters: function(universe, functionParameters, typeArguments, depth) { + var result, + requiredPositional = functionParameters._requiredPositional, + substitutedRequiredPositional = H._substituteArray(universe, requiredPositional, typeArguments, depth), + optionalPositional = functionParameters._optionalPositional, + substitutedOptionalPositional = H._substituteArray(universe, optionalPositional, typeArguments, depth), + named = functionParameters._named, + substitutedNamed = H._substituteNamed(universe, named, typeArguments, depth); + if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named) + return functionParameters; + result = new H._FunctionParameters(); + result._requiredPositional = substitutedRequiredPositional; + result._optionalPositional = substitutedOptionalPositional; + result._named = substitutedNamed; + return result; + }, + setRuntimeTypeInfo: function(target, rti) { + target[init.arrayRti] = rti; + return target; + }, + closureFunctionType: function(closure) { + var signature = closure.$signature; + if (signature != null) { + if (typeof signature == "number") + return H.getTypeFromTypesTable(signature); + return closure.$signature(); + } + return null; + }, + instanceOrFunctionType: function(object, testRti) { + var rti; + if (H.Rti__isUnionOfFunctionType(testRti)) + if (object instanceof H.Closure) { + rti = H.closureFunctionType(object); + if (rti != null) + return rti; + } + return H.instanceType(object); + }, + instanceType: function(object) { + var rti; + if (object instanceof P.Object) { + rti = object.$ti; + return rti != null ? rti : H._instanceTypeFromConstructor(object); + } + if (Array.isArray(object)) + return H._arrayInstanceType(object); + return H._instanceTypeFromConstructor(J.getInterceptor$(object)); + }, + _arrayInstanceType: function(object) { + var rti = object[init.arrayRti], + defaultRti = type$.JSArray_dynamic; + if (rti == null) + return defaultRti; + if (rti.constructor !== defaultRti.constructor) + return defaultRti; + return rti; + }, + _instanceType: function(object) { + var rti = object.$ti; + return rti != null ? rti : H._instanceTypeFromConstructor(object); + }, + _instanceTypeFromConstructor: function(instance) { + var $constructor = instance.constructor, + probe = $constructor.$ccache; + if (probe != null) + return probe; + return H._instanceTypeFromConstructorMiss(instance, $constructor); + }, + _instanceTypeFromConstructorMiss: function(instance, $constructor) { + var effectiveConstructor = instance instanceof H.Closure ? instance.__proto__.__proto__.constructor : $constructor, + rti = H._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name); + $constructor.$ccache = rti; + return rti; + }, + getTypeFromTypesTable: function(index) { + var table, type, rti; + H._asIntS(index); + table = init.types; + type = table[index]; + if (typeof type == "string") { + rti = H._Universe_eval(init.typeUniverse, type, false); + table[index] = rti; + return rti; + } + return type; + }, + _installSpecializedIsTest: function(object) { + var unstarred, isFn, testRti = this, + t1 = type$.Object; + if (testRti === t1) + return H._finishIsFn(testRti, object, H._isObject); + if (!H.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + t1 = testRti === t1; + else + t1 = true; + else + t1 = true; + if (t1) + return H._finishIsFn(testRti, object, H._isTop); + t1 = testRti._kind; + unstarred = t1 === 6 ? testRti._primary : testRti; + if (unstarred === type$.int) + isFn = H._isInt; + else if (unstarred === type$.double || unstarred === type$.num) + isFn = H._isNum; + else if (unstarred === type$.String) + isFn = H._isString; + else + isFn = unstarred === type$.bool ? H._isBool : null; + if (isFn != null) + return H._finishIsFn(testRti, object, isFn); + if (unstarred._kind === 9) { + t1 = unstarred._primary; + if (unstarred._rest.every(H.isTopType)) { + testRti._specializedTestResource = "$is" + t1; + return H._finishIsFn(testRti, object, H._isTestViaProperty); + } + } else if (t1 === 7) + return H._finishIsFn(testRti, object, H._generalNullableIsTestImplementation); + return H._finishIsFn(testRti, object, H._generalIsTestImplementation); + }, + _finishIsFn: function(testRti, object, isFn) { + testRti._is = isFn; + return testRti._is(object); + }, + _installSpecializedAsCheck: function(object) { + var t1, asFn, testRti = this; + if (!H.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + t1 = testRti === type$.Object; + else + t1 = true; + else + t1 = true; + if (t1) + asFn = H._asTop; + else if (testRti === type$.Object) + asFn = H._asObject; + else + asFn = H._generalNullableAsCheckImplementation; + testRti._as = asFn; + return testRti._as(object); + }, + _nullIs: function(testRti) { + var t1, + kind = testRti._kind; + if (!H.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + if (!(testRti === type$.legacy_Never)) + if (kind !== 7) + t1 = kind === 8 && H._nullIs(testRti._primary) || testRti === type$.Null || testRti === type$.JSNull; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; + }, + _generalIsTestImplementation: function(object) { + var testRti = this; + if (object == null) + return H._nullIs(testRti); + return H._isSubtype(init.typeUniverse, H.instanceOrFunctionType(object, testRti), null, testRti, null); + }, + _generalNullableIsTestImplementation: function(object) { + if (object == null) + return true; + return this._primary._is(object); + }, + _isTestViaProperty: function(object) { + var tag, testRti = this; + if (object == null) + return H._nullIs(testRti); + tag = testRti._specializedTestResource; + if (object instanceof P.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _generalAsCheckImplementation: function(object) { + var testRti = this; + if (object == null) + return object; + else if (testRti._is(object)) + return object; + H._failedAsCheck(object, testRti); + }, + _generalNullableAsCheckImplementation: function(object) { + var testRti = this; + if (object == null) + return object; + else if (testRti._is(object)) + return object; + H._failedAsCheck(object, testRti); + }, + _failedAsCheck: function(object, testRti) { + throw H.wrapException(H._TypeError$fromMessage(H._Error_compose(object, H.instanceOrFunctionType(object, testRti), H._rtiToString(testRti, null)))); + }, + _Error_compose: function(object, objectRti, checkedTypeDescription) { + var objectDescription = P.Error_safeToString(object), + objectTypeDescription = H._rtiToString(objectRti == null ? H.instanceType(object) : objectRti, null); + return objectDescription + ": type '" + H.S(objectTypeDescription) + "' is not a subtype of type '" + H.S(checkedTypeDescription) + "'"; + }, + _TypeError$fromMessage: function(message) { + return new H._TypeError("TypeError: " + message); + }, + _TypeError__TypeError$forType: function(object, type) { + return new H._TypeError("TypeError: " + H._Error_compose(object, null, type)); + }, + _isObject: function(object) { + return object != null; + }, + _asObject: function(object) { + return object; + }, + _isTop: function(object) { + return true; + }, + _asTop: function(object) { + return object; + }, + _isBool: function(object) { + return true === object || false === object; + }, + _asBool: function(object) { + if (true === object) + return true; + if (false === object) + return false; + throw H.wrapException(H._TypeError__TypeError$forType(object, "bool")); + }, + _asBoolS: function(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "bool")); + }, + _asBoolQ: function(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "bool?")); + }, + _asDouble: function(object) { + if (typeof object == "number") + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "double")); + }, + _asDoubleS: function(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "double")); + }, + _asDoubleQ: function(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "double?")); + }, + _isInt: function(object) { + return typeof object == "number" && Math.floor(object) === object; + }, + _asInt: function(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "int")); + }, + _asIntS: function(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "int")); + }, + _asIntQ: function(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "int?")); + }, + _isNum: function(object) { + return typeof object == "number"; + }, + _asNum: function(object) { + if (typeof object == "number") + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "num")); + }, + _asNumS: function(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "num")); + }, + _asNumQ: function(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "num?")); + }, + _isString: function(object) { + return typeof object == "string"; + }, + _asString: function(object) { + if (typeof object == "string") + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "String")); + }, + _asStringS: function(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "String")); + }, + _asStringQ: function(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "String?")); + }, + _rtiArrayToString: function(array, genericContext) { + var s, sep, i; + for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ") + s += C.JSString_methods.$add(sep, H._rtiToString(array[i], genericContext)); + return s; + }, + _functionRtiToString: function(functionType, genericContext, bounds) { + var boundsLength, outerContextLength, offset, i, t1, t2, t3, typeParametersText, typeSep, t4, t5, boundRti, kind, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", "; + if (bounds != null) { + boundsLength = bounds.length; + if (genericContext == null) { + genericContext = H.setRuntimeTypeInfo([], type$.JSArray_String); + outerContextLength = null; + } else + outerContextLength = genericContext.length; + offset = genericContext.length; + for (i = boundsLength; i > 0; --i) + C.JSArray_methods.add$1(genericContext, "T" + (offset + i)); + for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, t3 = type$.Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { + typeParametersText += typeSep; + t4 = genericContext.length; + t5 = t4 - 1 - i; + if (t5 < 0) + return H.ioore(genericContext, t5); + typeParametersText = C.JSString_methods.$add(typeParametersText, genericContext[t5]); + boundRti = bounds[i]; + kind = boundRti._kind; + if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) + if (!(boundRti === t2)) + t4 = boundRti === t3; + else + t4 = true; + else + t4 = true; + if (!t4) + typeParametersText += C.JSString_methods.$add(" extends ", H._rtiToString(boundRti, genericContext)); + } + typeParametersText += ">"; + } else { + typeParametersText = ""; + outerContextLength = null; + } + t1 = functionType._primary; + parameters = functionType._rest; + requiredPositional = parameters._requiredPositional; + requiredPositionalLength = requiredPositional.length; + optionalPositional = parameters._optionalPositional; + optionalPositionalLength = optionalPositional.length; + named = parameters._named; + namedLength = named.length; + returnTypeText = H._rtiToString(t1, genericContext); + for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_) + argumentsText += C.JSString_methods.$add(sep, H._rtiToString(requiredPositional[i], genericContext)); + if (optionalPositionalLength > 0) { + argumentsText += sep + "["; + for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_) + argumentsText += C.JSString_methods.$add(sep, H._rtiToString(optionalPositional[i], genericContext)); + argumentsText += "]"; + } + if (namedLength > 0) { + argumentsText += sep + "{"; + for (sep = "", i = 0; i < namedLength; i += 3, sep = _s2_) { + argumentsText += sep; + if (named[i + 1]) + argumentsText += "required "; + argumentsText += J.$add$ansx(H._rtiToString(named[i + 2], genericContext), " ") + named[i]; + } + argumentsText += "}"; + } + if (outerContextLength != null) { + genericContext.toString; + genericContext.length = outerContextLength; + } + return typeParametersText + "(" + argumentsText + ") => " + H.S(returnTypeText); + }, + _rtiToString: function(rti, genericContext) { + var s, questionArgument, argumentKind, $name, $arguments, t1, t2, + kind = rti._kind; + if (kind === 5) + return "erased"; + if (kind === 2) + return "dynamic"; + if (kind === 3) + return "void"; + if (kind === 1) + return "Never"; + if (kind === 4) + return "any"; + if (kind === 6) { + s = H._rtiToString(rti._primary, genericContext); + return s; + } + if (kind === 7) { + questionArgument = rti._primary; + s = H._rtiToString(questionArgument, genericContext); + argumentKind = questionArgument._kind; + return J.$add$ansx(argumentKind === 11 || argumentKind === 12 ? C.JSString_methods.$add("(", s) + ")" : s, "?"); + } + if (kind === 8) + return "FutureOr<" + H.S(H._rtiToString(rti._primary, genericContext)) + ">"; + if (kind === 9) { + $name = H._unminifyOrTag(rti._primary); + $arguments = rti._rest; + return $arguments.length !== 0 ? $name + ("<" + H._rtiArrayToString($arguments, genericContext) + ">") : $name; + } + if (kind === 11) + return H._functionRtiToString(rti, genericContext, null); + if (kind === 12) + return H._functionRtiToString(rti._primary, genericContext, rti._rest); + if (kind === 13) { + genericContext.toString; + t1 = rti._primary; + t2 = genericContext.length; + t1 = t2 - 1 - t1; + if (t1 < 0 || t1 >= t2) + return H.ioore(genericContext, t1); + return genericContext[t1]; + } + return "?"; + }, + _unminifyOrTag: function(rawClassName) { + var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName); + if (preserved != null) + return preserved; + return rawClassName; + }, + _Universe_findRule: function(universe, targetType) { + var rule = universe.tR[targetType]; + for (; typeof rule == "string";) + rule = universe.tR[rule]; + return rule; + }, + _Universe_findErasedType: function(universe, cls) { + var $length, erased, $arguments, i, $interface, + metadata = universe.eT, + probe = metadata[cls]; + if (probe == null) + return H._Universe_eval(universe, cls, false); + else if (typeof probe == "number") { + $length = probe; + erased = H._Universe__lookupTerminalRti(universe, 5, "#"); + $arguments = []; + for (i = 0; i < $length; ++i) + $arguments.push(erased); + $interface = H._Universe__lookupInterfaceRti(universe, cls, $arguments); + metadata[cls] = $interface; + return $interface; + } else + return probe; + }, + _Universe_addRules: function(universe, rules) { + return H._Utils_objectAssign(universe.tR, rules); + }, + _Universe_addErasedTypes: function(universe, types) { + return H._Utils_objectAssign(universe.eT, types); + }, + _Universe_eval: function(universe, recipe, normalize) { + var rti, + cache = universe.eC, + probe = cache.get(recipe); + if (probe != null) + return probe; + rti = H._Parser_parse(H._Parser_create(universe, null, recipe, normalize)); + cache.set(recipe, rti); + return rti; + }, + _Universe_evalInEnvironment: function(universe, environment, recipe) { + var probe, rti, + cache = environment._evalCache; + if (cache == null) + cache = environment._evalCache = new Map(); + probe = cache.get(recipe); + if (probe != null) + return probe; + rti = H._Parser_parse(H._Parser_create(universe, environment, recipe, true)); + cache.set(recipe, rti); + return rti; + }, + _Universe_bind: function(universe, environment, argumentsRti) { + var argumentsRecipe, probe, rti, + cache = environment._bindCache; + if (cache == null) + cache = environment._bindCache = new Map(); + argumentsRecipe = argumentsRti._canonicalRecipe; + probe = cache.get(argumentsRecipe); + if (probe != null) + return probe; + rti = H._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]); + cache.set(argumentsRecipe, rti); + return rti; + }, + _Universe__installTypeTests: function(universe, rti) { + rti._as = H._installSpecializedAsCheck; + rti._is = H._installSpecializedIsTest; + return rti; + }, + _Universe__lookupTerminalRti: function(universe, kind, key) { + var rti, t1, + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new H.Rti(null, null); + rti._kind = kind; + rti._canonicalRecipe = key; + t1 = H._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupStarRti: function(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "*", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = H._Universe__createStarRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createStarRti: function(universe, baseType, key, normalize) { + var baseKind, t1, rti; + if (normalize) { + baseKind = baseType._kind; + if (!H.isStrongTopType(baseType)) + t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6; + else + t1 = true; + if (t1) + return baseType; + } + rti = new H.Rti(null, null); + rti._kind = 6; + rti._primary = baseType; + rti._canonicalRecipe = key; + return H._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupQuestionRti: function(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "?", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = H._Universe__createQuestionRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createQuestionRti: function(universe, baseType, key, normalize) { + var baseKind, t1, starArgument, rti; + if (normalize) { + baseKind = baseType._kind; + if (!H.isStrongTopType(baseType)) + if (!(baseType === type$.Null || baseType === type$.JSNull)) + if (baseKind !== 7) + t1 = baseKind === 8 && H.isNullable(baseType._primary); + else + t1 = true; + else + t1 = true; + else + t1 = true; + if (t1) + return baseType; + else if (baseKind === 1 || baseType === type$.legacy_Never) + return type$.Null; + else if (baseKind === 6) { + starArgument = baseType._primary; + if (starArgument._kind === 8 && H.isNullable(starArgument._primary)) + return starArgument; + else + return H.Rti__getQuestionFromStar(universe, baseType); + } + } + rti = new H.Rti(null, null); + rti._kind = 7; + rti._primary = baseType; + rti._canonicalRecipe = key; + return H._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupFutureOrRti: function(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "/", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = H._Universe__createFutureOrRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createFutureOrRti: function(universe, baseType, key, normalize) { + var t1, t2, rti; + if (normalize) { + t1 = baseType._kind; + if (!H.isStrongTopType(baseType)) + if (!(baseType === type$.legacy_Object)) + t2 = baseType === type$.Object; + else + t2 = true; + else + t2 = true; + if (t2 || baseType === type$.Object) + return baseType; + else if (t1 === 1) + return H._Universe__lookupInterfaceRti(universe, "Future", [baseType]); + else if (baseType === type$.Null || baseType === type$.JSNull) + return type$.nullable_Future_Null; + } + rti = new H.Rti(null, null); + rti._kind = 8; + rti._primary = baseType; + rti._canonicalRecipe = key; + return H._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupGenericFunctionParameterRti: function(universe, index) { + var rti, t1, + key = "" + index + "^", + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new H.Rti(null, null); + rti._kind = 13; + rti._primary = index; + rti._canonicalRecipe = key; + t1 = H._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__canonicalRecipeJoin: function($arguments) { + var s, sep, i, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",") + s += sep + $arguments[i]._canonicalRecipe; + return s; + }, + _Universe__canonicalRecipeJoinNamed: function($arguments) { + var s, sep, i, t1, nameSep, s0, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") { + t1 = $arguments[i]; + nameSep = $arguments[i + 1] ? "!" : ":"; + s0 = $arguments[i + 2]._canonicalRecipe; + s += sep + t1 + nameSep + s0; + } + return s; + }, + _Universe__lookupInterfaceRti: function(universe, $name, $arguments) { + var probe, rti, t1, + s = $name; + if ($arguments.length !== 0) + s += "<" + H._Universe__canonicalRecipeJoin($arguments) + ">"; + probe = universe.eC.get(s); + if (probe != null) + return probe; + rti = new H.Rti(null, null); + rti._kind = 9; + rti._primary = $name; + rti._rest = $arguments; + if ($arguments.length > 0) + rti._precomputed1 = $arguments[0]; + rti._canonicalRecipe = s; + t1 = H._Universe__installTypeTests(universe, rti); + universe.eC.set(s, t1); + return t1; + }, + _Universe__lookupBindingRti: function(universe, base, $arguments) { + var newBase, newArguments, key, probe, rti, t1; + if (base._kind === 10) { + newBase = base._primary; + newArguments = base._rest.concat($arguments); + } else { + newArguments = $arguments; + newBase = base; + } + key = newBase._canonicalRecipe + (";<" + H._Universe__canonicalRecipeJoin(newArguments) + ">"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new H.Rti(null, null); + rti._kind = 10; + rti._primary = newBase; + rti._rest = newArguments; + rti._canonicalRecipe = key; + t1 = H._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupFunctionRti: function(universe, returnType, parameters) { + var sep, t1, key, probe, rti, + s = returnType._canonicalRecipe, + requiredPositional = parameters._requiredPositional, + requiredPositionalLength = requiredPositional.length, + optionalPositional = parameters._optionalPositional, + optionalPositionalLength = optionalPositional.length, + named = parameters._named, + namedLength = named.length, + recipe = "(" + H._Universe__canonicalRecipeJoin(requiredPositional); + if (optionalPositionalLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + t1 = H._Universe__canonicalRecipeJoin(optionalPositional); + recipe += sep + "[" + t1 + "]"; + } + if (namedLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + t1 = H._Universe__canonicalRecipeJoinNamed(named); + recipe += sep + "{" + t1 + "}"; + } + key = s + (recipe + ")"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new H.Rti(null, null); + rti._kind = 11; + rti._primary = returnType; + rti._rest = parameters; + rti._canonicalRecipe = key; + t1 = H._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupGenericFunctionRti: function(universe, baseFunctionType, bounds, normalize) { + var t1, + key = baseFunctionType._canonicalRecipe + ("<" + H._Universe__canonicalRecipeJoin(bounds) + ">"), + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = H._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createGenericFunctionRti: function(universe, baseFunctionType, bounds, key, normalize) { + var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti; + if (normalize) { + $length = bounds.length; + typeArguments = new Array($length); + for (count = 0, i = 0; i < $length; ++i) { + bound = bounds[i]; + if (bound._kind === 1) { + typeArguments[i] = bound; + ++count; + } + } + if (count > 0) { + substitutedBase = H._substitute(universe, baseFunctionType, typeArguments, 0); + substitutedBounds = H._substituteArray(universe, bounds, typeArguments, 0); + return H._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds); + } + } + rti = new H.Rti(null, null); + rti._kind = 12; + rti._primary = baseFunctionType; + rti._rest = bounds; + rti._canonicalRecipe = key; + return H._Universe__installTypeTests(universe, rti); + }, + _Parser_create: function(universe, environment, recipe, normalize) { + return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; + }, + _Parser_parse: function(parser) { + var t1, i, ch, universe, array, head, base, u, parameters, optionalPositional, named, item, + source = parser.r, + stack = parser.s; + for (t1 = source.length, i = 0; i < t1;) { + ch = source.charCodeAt(i); + if (ch >= 48 && ch <= 57) + i = H._Parser_handleDigit(i + 1, ch, source, stack); + else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36) + i = H._Parser_handleIdentifier(parser, i, source, stack, false); + else if (ch === 46) + i = H._Parser_handleIdentifier(parser, i, source, stack, true); + else { + ++i; + switch (ch) { + case 44: + break; + case 58: + stack.push(false); + break; + case 33: + stack.push(true); + break; + case 59: + stack.push(H._Parser_toType(parser.u, parser.e, stack.pop())); + break; + case 94: + stack.push(H._Universe__lookupGenericFunctionParameterRti(parser.u, stack.pop())); + break; + case 35: + stack.push(H._Universe__lookupTerminalRti(parser.u, 5, "#")); + break; + case 64: + stack.push(H._Universe__lookupTerminalRti(parser.u, 2, "@")); + break; + case 126: + stack.push(H._Universe__lookupTerminalRti(parser.u, 3, "~")); + break; + case 60: + stack.push(parser.p); + parser.p = stack.length; + break; + case 62: + universe = parser.u; + array = stack.splice(parser.p); + H._Parser_toTypes(parser.u, parser.e, array); + parser.p = stack.pop(); + head = stack.pop(); + if (typeof head == "string") + stack.push(H._Universe__lookupInterfaceRti(universe, head, array)); + else { + base = H._Parser_toType(universe, parser.e, head); + switch (base._kind) { + case 11: + stack.push(H._Universe__lookupGenericFunctionRti(universe, base, array, parser.n)); + break; + default: + stack.push(H._Universe__lookupBindingRti(universe, base, array)); + break; + } + } + break; + case 38: + H._Parser_handleExtendedOperations(parser, stack); + break; + case 42: + u = parser.u; + stack.push(H._Universe__lookupStarRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n)); + break; + case 63: + u = parser.u; + stack.push(H._Universe__lookupQuestionRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n)); + break; + case 47: + u = parser.u; + stack.push(H._Universe__lookupFutureOrRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n)); + break; + case 40: + stack.push(parser.p); + parser.p = stack.length; + break; + case 41: + universe = parser.u; + parameters = new H._FunctionParameters(); + optionalPositional = universe.sEA; + named = universe.sEA; + head = stack.pop(); + if (typeof head == "number") + switch (head) { + case -1: + optionalPositional = stack.pop(); + break; + case -2: + named = stack.pop(); + break; + default: + stack.push(head); + break; + } + else + stack.push(head); + array = stack.splice(parser.p); + H._Parser_toTypes(parser.u, parser.e, array); + parser.p = stack.pop(); + parameters._requiredPositional = array; + parameters._optionalPositional = optionalPositional; + parameters._named = named; + stack.push(H._Universe__lookupFunctionRti(universe, H._Parser_toType(universe, parser.e, stack.pop()), parameters)); + break; + case 91: + stack.push(parser.p); + parser.p = stack.length; + break; + case 93: + array = stack.splice(parser.p); + H._Parser_toTypes(parser.u, parser.e, array); + parser.p = stack.pop(); + stack.push(array); + stack.push(-1); + break; + case 123: + stack.push(parser.p); + parser.p = stack.length; + break; + case 125: + array = stack.splice(parser.p); + H._Parser_toTypesNamed(parser.u, parser.e, array); + parser.p = stack.pop(); + stack.push(array); + stack.push(-2); + break; + default: + throw "Bad character " + ch; + } + } + } + item = stack.pop(); + return H._Parser_toType(parser.u, parser.e, item); + }, + _Parser_handleDigit: function(i, digit, source, stack) { + var t1, ch, + value = digit - 48; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (!(ch >= 48 && ch <= 57)) + break; + value = value * 10 + (ch - 48); + } + stack.push(value); + return i; + }, + _Parser_handleIdentifier: function(parser, start, source, stack, hasPeriod) { + var t1, ch, t2, string, environment, recipe, + i = start + 1; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (ch === 46) { + if (hasPeriod) + break; + hasPeriod = true; + } else { + if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36)) + t2 = ch >= 48 && ch <= 57; + else + t2 = true; + if (!t2) + break; + } + } + string = source.substring(start, i); + if (hasPeriod) { + t1 = parser.u; + environment = parser.e; + if (environment._kind === 10) + environment = environment._primary; + recipe = H._Universe_findRule(t1, environment._primary)[string]; + if (recipe == null) + H.throwExpression('No "' + string + '" in "' + H.Rti__getCanonicalRecipe(environment) + '"'); + stack.push(H._Universe_evalInEnvironment(t1, environment, recipe)); + } else + stack.push(string); + return i; + }, + _Parser_handleExtendedOperations: function(parser, stack) { + var $top = stack.pop(); + if (0 === $top) { + stack.push(H._Universe__lookupTerminalRti(parser.u, 1, "0&")); + return; + } + if (1 === $top) { + stack.push(H._Universe__lookupTerminalRti(parser.u, 4, "1&")); + return; + } + throw H.wrapException(P.AssertionError$("Unexpected extended operation " + H.S($top))); + }, + _Parser_toType: function(universe, environment, item) { + if (typeof item == "string") + return H._Universe__lookupInterfaceRti(universe, item, universe.sEA); + else if (typeof item == "number") + return H._Parser_indexToType(universe, environment, item); + else + return item; + }, + _Parser_toTypes: function(universe, environment, items) { + var i, + $length = items.length; + for (i = 0; i < $length; ++i) + items[i] = H._Parser_toType(universe, environment, items[i]); + }, + _Parser_toTypesNamed: function(universe, environment, items) { + var i, + $length = items.length; + for (i = 2; i < $length; i += 3) + items[i] = H._Parser_toType(universe, environment, items[i]); + }, + _Parser_indexToType: function(universe, environment, index) { + var typeArguments, len, + kind = environment._kind; + if (kind === 10) { + if (index === 0) + return environment._primary; + typeArguments = environment._rest; + len = typeArguments.length; + if (index <= len) + return typeArguments[index - 1]; + index -= len; + environment = environment._primary; + kind = environment._kind; + } else if (index === 0) + return environment; + if (kind !== 9) + throw H.wrapException(P.AssertionError$("Indexed base must be an interface type")); + typeArguments = environment._rest; + if (index <= typeArguments.length) + return typeArguments[index - 1]; + throw H.wrapException(P.AssertionError$("Bad index " + index + " for " + environment.toString$0(0))); + }, + _isSubtype: function(universe, s, sEnv, t, tEnv) { + var t1, sKind, leftTypeVariable, tKind, sBounds, tBounds, sLength, i, sBound, tBound; + if (s === t) + return true; + if (!H.isStrongTopType(t)) + if (!(t === type$.legacy_Object)) + t1 = t === type$.Object; + else + t1 = true; + else + t1 = true; + if (t1) + return true; + sKind = s._kind; + if (sKind === 4) + return true; + if (H.isStrongTopType(s)) + return false; + if (s._kind !== 1) + t1 = s === type$.Null || s === type$.JSNull; + else + t1 = true; + if (t1) + return true; + leftTypeVariable = sKind === 13; + if (leftTypeVariable) + if (H._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv)) + return true; + tKind = t._kind; + if (sKind === 6) + return H._isSubtype(universe, s._primary, sEnv, t, tEnv); + if (tKind === 6) { + t1 = t._primary; + return H._isSubtype(universe, s, sEnv, t1, tEnv); + } + if (sKind === 8) { + if (!H._isSubtype(universe, s._primary, sEnv, t, tEnv)) + return false; + return H._isSubtype(universe, H.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv); + } + if (sKind === 7) { + t1 = H._isSubtype(universe, s._primary, sEnv, t, tEnv); + return t1; + } + if (tKind === 8) { + if (H._isSubtype(universe, s, sEnv, t._primary, tEnv)) + return true; + return H._isSubtype(universe, s, sEnv, H.Rti__getFutureFromFutureOr(universe, t), tEnv); + } + if (tKind === 7) { + t1 = H._isSubtype(universe, s, sEnv, t._primary, tEnv); + return t1; + } + if (leftTypeVariable) + return false; + t1 = sKind !== 11; + if ((!t1 || sKind === 12) && t === type$.Function) + return true; + if (tKind === 12) { + if (s === type$.JavaScriptFunction) + return true; + if (sKind !== 12) + return false; + sBounds = s._rest; + tBounds = t._rest; + sLength = sBounds.length; + if (sLength !== tBounds.length) + return false; + sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv); + tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv); + for (i = 0; i < sLength; ++i) { + sBound = sBounds[i]; + tBound = tBounds[i]; + if (!H._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !H._isSubtype(universe, tBound, tEnv, sBound, sEnv)) + return false; + } + return H._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv); + } + if (tKind === 11) { + if (s === type$.JavaScriptFunction) + return true; + if (t1) + return false; + return H._isFunctionSubtype(universe, s, sEnv, t, tEnv); + } + if (sKind === 9) { + if (tKind !== 9) + return false; + return H._isInterfaceSubtype(universe, s, sEnv, t, tEnv); + } + return false; + }, + _isFunctionSubtype: function(universe, s, sEnv, t, tEnv) { + var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName; + if (!H._isSubtype(universe, s._primary, sEnv, t._primary, tEnv)) + return false; + sParameters = s._rest; + tParameters = t._rest; + sRequiredPositional = sParameters._requiredPositional; + tRequiredPositional = tParameters._requiredPositional; + sRequiredPositionalLength = sRequiredPositional.length; + tRequiredPositionalLength = tRequiredPositional.length; + if (sRequiredPositionalLength > tRequiredPositionalLength) + return false; + requiredPositionalDelta = tRequiredPositionalLength - sRequiredPositionalLength; + sOptionalPositional = sParameters._optionalPositional; + tOptionalPositional = tParameters._optionalPositional; + sOptionalPositionalLength = sOptionalPositional.length; + tOptionalPositionalLength = tOptionalPositional.length; + if (sRequiredPositionalLength + sOptionalPositionalLength < tRequiredPositionalLength + tOptionalPositionalLength) + return false; + for (i = 0; i < sRequiredPositionalLength; ++i) { + t1 = sRequiredPositional[i]; + if (!H._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv)) + return false; + } + for (i = 0; i < requiredPositionalDelta; ++i) { + t1 = sOptionalPositional[i]; + if (!H._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv)) + return false; + } + for (i = 0; i < tOptionalPositionalLength; ++i) { + t1 = sOptionalPositional[requiredPositionalDelta + i]; + if (!H._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv)) + return false; + } + sNamed = sParameters._named; + tNamed = tParameters._named; + sNamedLength = sNamed.length; + tNamedLength = tNamed.length; + for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) { + tName = tNamed[tIndex]; + for (; true;) { + if (sIndex >= sNamedLength) + return false; + sName = sNamed[sIndex]; + sIndex += 3; + if (tName < sName) + return false; + if (sName < tName) + continue; + t1 = sNamed[sIndex - 1]; + if (!H._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv)) + return false; + break; + } + } + return true; + }, + _isInterfaceSubtype: function(universe, s, sEnv, t, tEnv) { + var sArgs, tArgs, $length, i, t1, t2, rule, supertypeArgs, + sName = s._primary, + tName = t._primary; + if (sName === tName) { + sArgs = s._rest; + tArgs = t._rest; + $length = sArgs.length; + for (i = 0; i < $length; ++i) { + t1 = sArgs[i]; + t2 = tArgs[i]; + if (!H._isSubtype(universe, t1, sEnv, t2, tEnv)) + return false; + } + return true; + } + if (t === type$.Object) + return true; + rule = H._Universe_findRule(universe, sName); + if (rule == null) + return false; + supertypeArgs = rule[tName]; + if (supertypeArgs == null) + return false; + $length = supertypeArgs.length; + tArgs = t._rest; + for (i = 0; i < $length; ++i) + if (!H._isSubtype(universe, H._Universe_evalInEnvironment(universe, s, supertypeArgs[i]), sEnv, tArgs[i], tEnv)) + return false; + return true; }, - NativeUint32List: function NativeUint32List() { + isNullable: function(t) { + var t1, + kind = t._kind; + if (!(t === type$.Null || t === type$.JSNull)) + if (!H.isStrongTopType(t)) + if (kind !== 7) + if (!(kind === 6 && H.isNullable(t._primary))) + t1 = kind === 8 && H.isNullable(t._primary); + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; }, - NativeUint8ClampedList: function NativeUint8ClampedList() { + isTopType: function(t) { + var t1; + if (!H.isStrongTopType(t)) + if (!(t === type$.legacy_Object)) + t1 = t === type$.Object; + else + t1 = true; + else + t1 = true; + return t1; }, - NativeUint8List: function NativeUint8List() { + isStrongTopType: function(t) { + var kind = t._kind; + return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object; }, - _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin() { + _Utils_objectAssign: function(o, other) { + var i, key, + keys = Object.keys(other), + $length = keys.length; + for (i = 0; i < $length; ++i) { + key = keys[i]; + o[key] = other[key]; + } }, - _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin() { + Rti: function Rti(t0, t1) { + var _ = this; + _._as = t0; + _._is = t1; + _._cachedRuntimeType = _._specializedTestResource = _._precomputed1 = null; + _._kind = 0; + _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; }, - _NativeTypedArrayOfInt_NativeTypedArray_ListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin() { + _FunctionParameters: function _FunctionParameters() { + this._named = this._optionalPositional = this._requiredPositional = null; }, - _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { + _Error: function _Error() { }, - extractKeys: function(victim) { - return J.JSArray_JSArray$markFixed(victim ? Object.keys(victim) : [], null); + _TypeError: function _TypeError(t0) { + this.__rti$_message = t0; }, unmangleGlobalNameIfPreservedAnyways: function($name) { return init.mangledGlobalNames[$name]; @@ -1781,7 +2734,7 @@ throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.S(proto(object, record)))); } $constructor = object.constructor; - interceptor = $constructor == null ? null : $constructor[$.$get$JS_INTEROP_INTERCEPTOR_TAG()]; + interceptor = $constructor == null ? null : $constructor[J.JS_INTEROP_INTERCEPTOR_TAG()]; if (interceptor != null) return interceptor; interceptor = H.lookupAndCacheInterceptor(object); @@ -1795,15 +2748,21 @@ if (proto === Object.prototype) return C.PlainJavaScriptObject_methods; if (typeof $constructor == "function") { - Object.defineProperty($constructor, $.$get$JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + Object.defineProperty($constructor, J.JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); return C.UnknownJavaScriptObject_methods; } return C.UnknownJavaScriptObject_methods; }, - JSArray_JSArray$markFixed: function(allocation, $E) { - return J.JSArray_markFixedList(H.setRuntimeTypeInfo(allocation, [$E])); + JS_INTEROP_INTERCEPTOR_TAG: function() { + var t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + return t1 == null ? $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js") : t1; + }, + JSArray_JSArray$fixed: function($length, $E) { + if ($length > 4294967295) + throw H.wrapException(P.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_markFixedList(H.setRuntimeTypeInfo(new Array($length), $E._eval$1("JSArray<0>")), $E); }, - JSArray_markFixedList: function(list) { + JSArray_markFixedList: function(list, $T) { list.fixed$length = Array; return list; }, @@ -1981,15 +2940,15 @@ return receiver - a0; return J.getInterceptor$n(receiver).$sub(receiver, a0); }, - _removeEventListener$3$x: function(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2); - }, addEventListener$3$x: function(receiver, a0, a1, a2) { return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); }, noSuchMethod$1$: function(receiver, a0) { return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); }, + startsWith$1$s: function(receiver, a0) { + return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); + }, toString$0$: function(receiver) { return J.getInterceptor$(receiver).toString$0(receiver); }, @@ -2046,13 +3005,13 @@ return P.async__AsyncRun__scheduleImmediateWithTimer$closure(); }, _AsyncRun__scheduleImmediateJsOverride: function(callback) { - self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(H.functionTypeCheck(callback, {func: 1, ret: -1})), 0)); + self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(type$.void_Function._as(callback)), 0)); }, _AsyncRun__scheduleImmediateWithSetImmediate: function(callback) { - self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(H.functionTypeCheck(callback, {func: 1, ret: -1})), 0)); + self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(type$.void_Function._as(callback)), 0)); }, _AsyncRun__scheduleImmediateWithTimer: function(callback) { - P.Timer__createTimer(C.Duration_0, H.functionTypeCheck(callback, {func: 1, ret: -1})); + P.Timer__createTimer(C.Duration_0, type$.void_Function._as(callback)); }, Timer__createTimer: function(duration, callback) { var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000); @@ -2064,7 +3023,7 @@ return t1; }, _makeAsyncAwaitCompleter: function($T) { - return new P._AsyncAwaitCompleter(new P._Future($.Zone__current, [$T]), [$T]); + return new P._AsyncAwaitCompleter(new P._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>")); }, _asyncStartSync: function(bodyFunction, completer) { bodyFunction.call$2(0, null); @@ -2081,20 +3040,21 @@ completer.completeError$2(H.unwrapException(object), H.getTraceFromException(object)); }, _awaitOnObject: function(object, bodyFunction) { - var future, _null = null, + var t1, future, thenCallback = new P._awaitOnObject_closure(bodyFunction), - errorCallback = new P._awaitOnObject_closure0(bodyFunction), - t1 = J.getInterceptor$(object); - if (!!t1.$is_Future) - object._thenAwait$1$2(thenCallback, errorCallback, _null); - else if (!!t1.$isFuture) - object.then$1$2$onError(thenCallback, errorCallback, _null); + errorCallback = new P._awaitOnObject_closure0(bodyFunction); + if (object instanceof P._Future) + object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic); else { - future = new P._Future($.Zone__current, [null]); - H.assertSubtypeOfRuntimeType(object, null); - future._state = 4; - future._resultOrListeners = object; - future._thenAwait$1$2(thenCallback, _null, _null); + t1 = type$.dynamic; + if (type$.Future_dynamic._is(object)) + object.then$1$2$onError(thenCallback, errorCallback, t1); + else { + future = new P._Future($.Zone__current, type$._Future_dynamic); + future._state = 4; + future._resultOrListeners = object; + future._thenAwait$1$2(thenCallback, errorCallback, t1); + } } }, _wrapJsFunctionForAsync: function($function) { @@ -2110,20 +3070,13 @@ } }; }($function, 1); - return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), P.Null, P.int, null); - }, - _Future$zoneValue: function(value, _zone, $T) { - var t1 = new P._Future(_zone, [$T]); - H.assertSubtypeOfRuntimeType(value, $T); - t1._state = 4; - t1._resultOrListeners = value; - return t1; + return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); }, _Future__chainForeignFuture: function(source, target) { var e, s, exception; target._state = 1; try { - source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), P.Null); + source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), type$.Null); } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); @@ -2131,59 +3084,62 @@ } }, _Future__chainCoreFuture: function(source, target) { - var t1, listeners; - for (; t1 = source._state, t1 === 2;) - source = H.interceptedTypeCheck(source._resultOrListeners, "$is_Future"); - if (t1 >= 4) { + var t1, t2, listeners; + for (t1 = type$._Future_dynamic; t2 = source._state, t2 === 2;) + source = t1._as(source._resultOrListeners); + if (t2 >= 4) { listeners = target._removeListeners$0(); target._state = source._state; target._resultOrListeners = source._resultOrListeners; P._Future__propagateToListeners(target, listeners); } else { - listeners = H.interceptedTypeCheck(target._resultOrListeners, "$is_FutureListener"); + listeners = type$.nullable__FutureListener_dynamic_dynamic._as(target._resultOrListeners); target._state = 2; target._resultOrListeners = source; source._prependListeners$1(listeners); } }, _Future__propagateToListeners: function(source, listeners) { - var _box_0, hasError, asyncError, listeners0, sourceResult, t2, t3, zone, t4, oldZone, current, result, _null = null, _box_1 = {}, + var t2, t3, t4, _box_0, hasError, asyncError, nextListener, nextListener0, t5, sourceResult, t6, t7, zone, oldZone, result, current, _null = null, _box_1 = {}, t1 = _box_1.source = source; - for (; true;) { + for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic, t4 = type$.Future_dynamic; true;) { _box_0 = {}; hasError = t1._state === 8; if (listeners == null) { if (hasError) { - asyncError = H.interceptedTypeCheck(t1._resultOrListeners, "$isAsyncError"); + asyncError = t2._as(t1._resultOrListeners); P._rootHandleUncaughtError(_null, _null, t1._zone, asyncError.error, asyncError.stackTrace); } return; } - for (; listeners0 = listeners._nextListener, listeners0 != null; listeners = listeners0) { - listeners._nextListener = null; - P._Future__propagateToListeners(_box_1.source, listeners); + _box_0.listener = listeners; + nextListener = listeners._nextListener; + for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) { + t1._nextListener = null; + P._Future__propagateToListeners(_box_1.source, t1); + _box_0.listener = nextListener; + nextListener0 = nextListener._nextListener; } - t1 = _box_1.source; - sourceResult = t1._resultOrListeners; + t5 = _box_1.source; + sourceResult = t5._resultOrListeners; _box_0.listenerHasError = hasError; _box_0.listenerValueOrError = sourceResult; - t2 = !hasError; - if (t2) { - t3 = listeners.state; - t3 = (t3 & 1) !== 0 || (t3 & 15) === 8; + t6 = !hasError; + if (t6) { + t7 = t1.state; + t7 = (t7 & 1) !== 0 || (t7 & 15) === 8; } else - t3 = true; - if (t3) { - t3 = listeners.result; - zone = t3._zone; + t7 = true; + if (t7) { + zone = t1.result._zone; if (hasError) { - t4 = t1._zone === zone; - t4 = !(t4 || t4); + t7 = t5._zone === zone; + t7 = !(t7 || t7); } else - t4 = false; - if (t4) { - H.interceptedTypeCheck(sourceResult, "$isAsyncError"); - P._rootHandleUncaughtError(_null, _null, t1._zone, sourceResult.error, sourceResult.stackTrace); + t7 = false; + if (t7) { + t2._as(sourceResult); + P._rootHandleUncaughtError(_null, _null, t5._zone, sourceResult.error, sourceResult.stackTrace); return; } oldZone = $.Zone__current; @@ -2191,66 +3147,69 @@ $.Zone__current = zone; else oldZone = _null; - t1 = listeners.state; + t1 = t1.state; if ((t1 & 15) === 8) - new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_1, _box_0, listeners, hasError).call$0(); - else if (t2) { + new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0(); + else if (t6) { if ((t1 & 1) !== 0) - new P._Future__propagateToListeners_handleValueCallback(_box_0, listeners, sourceResult).call$0(); + new P._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0(); } else if ((t1 & 2) !== 0) - new P._Future__propagateToListeners_handleError(_box_1, _box_0, listeners).call$0(); + new P._Future__propagateToListeners_handleError(_box_1, _box_0).call$0(); if (oldZone != null) $.Zone__current = oldZone; t1 = _box_0.listenerValueOrError; - if (!!J.getInterceptor$(t1).$isFuture) { + if (t4._is(t1)) { + result = _box_0.listener.result; if (t1._state >= 4) { - current = H.interceptedTypeCheck(t3._resultOrListeners, "$is_FutureListener"); - t3._resultOrListeners = null; - listeners = t3._reverseListeners$1(current); - t3._state = t1._state; - t3._resultOrListeners = t1._resultOrListeners; + current = t3._as(result._resultOrListeners); + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + result._state = t1._state; + result._resultOrListeners = t1._resultOrListeners; _box_1.source = t1; continue; } else - P._Future__chainCoreFuture(t1, t3); + P._Future__chainCoreFuture(t1, result); return; } } - result = listeners.result; - current = H.interceptedTypeCheck(result._resultOrListeners, "$is_FutureListener"); + result = _box_0.listener.result; + current = t3._as(result._resultOrListeners); result._resultOrListeners = null; listeners = result._reverseListeners$1(current); t1 = _box_0.listenerHasError; - t2 = _box_0.listenerValueOrError; + t5 = _box_0.listenerValueOrError; if (!t1) { - H.assertSubtypeOfRuntimeType(t2, H.getTypeArgumentByIndex(result, 0)); + result.$ti._precomputed1._as(t5); result._state = 4; - result._resultOrListeners = t2; + result._resultOrListeners = t5; } else { - H.interceptedTypeCheck(t2, "$isAsyncError"); + t2._as(t5); result._state = 8; - result._resultOrListeners = t2; + result._resultOrListeners = t5; } _box_1.source = result; t1 = result; } }, _registerErrorHandler: function(errorHandler, zone) { - if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Object, P.StackTrace]})) - return zone.registerBinaryCallback$3$1(errorHandler, null, P.Object, P.StackTrace); - if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Object]})) - return H.functionTypeCheck(errorHandler, {func: 1, ret: null, args: [P.Object]}); + var t1; + if (type$.dynamic_Function_Object_StackTrace._is(errorHandler)) + return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace); + t1 = type$.dynamic_Function_Object; + if (t1._is(errorHandler)) + return t1._as(errorHandler); throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result")); }, _microtaskLoop: function() { - var t1, t2; - for (; t1 = $._nextCallback, t1 != null;) { + var entry, next; + for (entry = $._nextCallback; entry != null; entry = $._nextCallback) { $._lastPriorityCallback = null; - t2 = t1.next; - $._nextCallback = t2; - if (t2 == null) + next = entry.next; + $._nextCallback = next; + if (next == null) $._lastCallback = null; - t1.callback.call$0(); + entry.callback.call$0(); } }, _startMicrotaskLoop: function() { @@ -2265,16 +3224,17 @@ } }, _scheduleAsyncCallback: function(callback) { - var newEntry = new P._AsyncCallbackEntry(callback); - if ($._nextCallback == null) { + var newEntry = new P._AsyncCallbackEntry(callback), + lastCallback = $._lastCallback; + if (lastCallback == null) { $._nextCallback = $._lastCallback = newEntry; if (!$._isInCallbackLoop) $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); } else - $._lastCallback = $._lastCallback.next = newEntry; + $._lastCallback = lastCallback.next = newEntry; }, _schedulePriorityAsyncCallback: function(callback) { - var entry, t2, + var entry, lastPriorityCallback, next, t1 = $._nextCallback; if (t1 == null) { P._scheduleAsyncCallback(callback); @@ -2282,14 +3242,15 @@ return; } entry = new P._AsyncCallbackEntry(callback); - t2 = $._lastPriorityCallback; - if (t2 == null) { + lastPriorityCallback = $._lastPriorityCallback; + if (lastPriorityCallback == null) { entry.next = t1; $._nextCallback = $._lastPriorityCallback = entry; } else { - entry.next = t2.next; - $._lastPriorityCallback = t2.next = entry; - if (entry.next == null) + next = lastPriorityCallback.next; + entry.next = next; + $._lastPriorityCallback = lastPriorityCallback.next = entry; + if (next == null) $._lastCallback = entry; } }, @@ -2300,19 +3261,28 @@ P._rootScheduleMicrotask(_null, _null, C.C__RootZone, callback); return; } - P._rootScheduleMicrotask(_null, _null, currentZone, H.functionTypeCheck(currentZone.bindCallbackGuarded$1(callback), {func: 1, ret: -1})); + P._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(currentZone.bindCallbackGuarded$1(callback))); }, StreamIterator_StreamIterator: function(stream, $T) { - var t1 = stream == null ? H.throwExpression(P.ArgumentError$notNull("stream")) : stream; - return new P._StreamIterator(t1, [$T]); + P.ArgumentError_checkNotNull(stream, "stream", $T._eval$1("Stream<0>")); + return new P._StreamIterator($T._eval$1("_StreamIterator<0>")); }, StreamController_StreamController: function($T) { var _null = null; - return new P._AsyncStreamController(_null, _null, _null, _null, [$T]); + return new P._AsyncStreamController(_null, _null, _null, _null, $T._eval$1("_AsyncStreamController<0>")); }, _runGuarded: function(notificationHandler) { return; }, + _BufferingStreamSubscription__registerErrorHandler: function(zone, handleError) { + if (handleError == null) + handleError = P.async___nullErrorHandler$closure(); + if (type$.void_Function_Object_StackTrace._is(handleError)) + return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.void_Function_Object._is(handleError)) + return type$.dynamic_Function_Object._as(handleError); + throw H.wrapException(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")); + }, _nullErrorHandler: function(error, stackTrace) { P._rootHandleUncaughtError(null, null, $.Zone__current, error, stackTrace); }, @@ -2321,13 +3291,25 @@ Timer_Timer: function(duration, callback) { var t1 = $.Zone__current; if (t1 === C.C__RootZone) - return P.Timer__createTimer(duration, H.functionTypeCheck(callback, {func: 1, ret: -1})); - return P.Timer__createTimer(duration, H.functionTypeCheck(t1.bindCallbackGuarded$1(callback), {func: 1, ret: -1})); + return P.Timer__createTimer(duration, type$.void_Function._as(callback)); + return P.Timer__createTimer(duration, type$.void_Function._as(t1.bindCallbackGuarded$1(callback))); + }, + AsyncError$: function(error, stackTrace) { + var t1 = stackTrace == null ? P.AsyncError_defaultStackTrace(error) : stackTrace; + P.ArgumentError_checkNotNull(error, "error", type$.Object); + return new P.AsyncError(error, t1); + }, + AsyncError_defaultStackTrace: function(error) { + var stackTrace; + if (type$.Error._is(error)) { + stackTrace = error.get$stackTrace(); + if (stackTrace != null) + return stackTrace; + } + return C.C__StringStackTrace; }, _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { - var t1 = {}; - t1.error = error; - P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(t1, stackTrace)); + P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(error, stackTrace)); }, _rootRun: function($self, $parent, zone, f, $R) { var old, @@ -2373,10 +3355,10 @@ }, _rootScheduleMicrotask: function($self, $parent, zone, f) { var t1; - H.functionTypeCheck(f, {func: 1, ret: -1}); + type$.void_Function._as(f); t1 = C.C__RootZone !== zone; if (t1) - f = !(!t1 || false) ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, -1); + f = !(!t1 || false) ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void); P._scheduleAsyncCallback(f); }, _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { @@ -2455,7 +3437,7 @@ this.e = t1; this.s = t2; }, - _Future__asyncComplete_closure: function _Future__asyncComplete_closure(t0, t1) { + _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) { this.$this = t0; this.value = t1; }, @@ -2468,25 +3450,21 @@ this.error = t1; this.stackTrace = t2; }, - _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2, t3) { - var _ = this; - _._box_1 = t0; - _._box_0 = t1; - _.listener = t2; - _.hasError = t3; + _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2) { + this._box_0 = t0; + this._box_1 = t1; + this.hasError = t2; }, _Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0) { this.originalSource = t0; }, - _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1, t2) { + _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1) { this._box_0 = t0; - this.listener = t1; - this.sourceResult = t2; + this.sourceResult = t1; }, - _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1, t2) { + _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1) { this._box_1 = t0; this._box_0 = t1; - this.listener = t2; }, _AsyncCallbackEntry: function _AsyncCallbackEntry(t0) { this.callback = t0; @@ -2531,14 +3509,16 @@ this._controller = t0; this.$ti = t1; }, - _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3) { + _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3, t4, t5, t6) { var _ = this; _._controller = t0; - _._onDone = _._onError = _._onData = null; - _._zone = t1; - _._state = t2; + _._onData = t1; + _._onError = t2; + _._onDone = t3; + _._zone = t4; + _._state = t5; _._pending = _._cancelFuture = null; - _.$ti = t3; + _.$ti = t6; }, _StreamSinkWrapper: function _StreamSinkWrapper(t0, t1) { this._async$_target = t0; @@ -2582,12 +3562,8 @@ _._state = 0; _.$ti = t0; }, - _StreamIterator: function _StreamIterator(t0, t1) { - var _ = this; - _._subscription = null; - _._stateData = t0; - _._isPaused = false; - _.$ti = t1; + _StreamIterator: function _StreamIterator(t0) { + this.$ti = t0; }, AsyncError: function AsyncError(t0, t1) { this.error = t0; @@ -2596,7 +3572,7 @@ _Zone: function _Zone() { }, _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) { - this._box_0 = t0; + this.error = t0; this.stackTrace = t1; }, _RootZone: function _RootZone() { @@ -2616,13 +3592,10 @@ this.T = t2; }, LinkedHashMap_LinkedHashMap$_literal: function(keyValuePairs, $K, $V) { - return H.assertSubtype(H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap([$K, $V])), "$isLinkedHashMap", [$K, $V], "$asLinkedHashMap"); + return $K._eval$1("@<0>")._bind$1($V)._eval$1("LinkedHashMap<1,2>")._as(H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")))); }, LinkedHashMap_LinkedHashMap$_empty: function($K, $V) { - return new H.JsLinkedHashMap([$K, $V]); - }, - LinkedHashMap__makeEmpty: function() { - return new H.JsLinkedHashMap([null, null]); + return new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); }, IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDelimiter) { var parts, t1; @@ -2631,7 +3604,7 @@ return "(...)"; return leftDelimiter + "..." + rightDelimiter; } - parts = H.setRuntimeTypeInfo([], [P.String]); + parts = H.setRuntimeTypeInfo([], type$.JSArray_String); C.JSArray_methods.add$1($._toStringVisiting, iterable); try { P._iterablePartsToStrings(iterable, parts); @@ -2640,7 +3613,7 @@ return H.ioore($._toStringVisiting, -1); $._toStringVisiting.pop(); } - t1 = P.StringBuffer__writeAll(leftDelimiter, H.listSuperNativeTypeCheck(parts, "$isIterable"), ", ") + rightDelimiter; + t1 = P.StringBuffer__writeAll(leftDelimiter, type$.Iterable_dynamic._as(parts), ", ") + rightDelimiter; return t1.charCodeAt(0) == 0 ? t1 : t1; }, IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDelimiter) { @@ -2788,7 +3761,7 @@ }, _parseJson: function(source, reviver) { var parsed, e, exception, t1; - if (typeof source !== "string") + if (typeof source != "string") throw H.wrapException(H.argumentErrorValue(source)); parsed = null; try { @@ -2804,7 +3777,7 @@ _convertJsonToDartLazy: function(object) { var i; if (object == null) - return; + return null; if (typeof object != "object") return object; if (Object.getPrototypeOf(object) !== Array.prototype) @@ -2819,10 +3792,13 @@ _defaultToEncodable: function(object) { return object.toJson$0(); }, + _JsonStringStringifier$: function(_sink, _toEncodable) { + return new P._JsonStringStringifier(_sink, [], P.convert___defaultToEncodable$closure()); + }, _JsonStringStringifier_stringify: function(object, toEncodable, indent) { var t1, output = new P.StringBuffer(""), - stringifier = new P._JsonStringStringifier(output, [], P.convert___defaultToEncodable$closure()); + stringifier = P._JsonStringStringifier$(output, toEncodable); stringifier.writeObject$1(object); t1 = output._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; @@ -2867,23 +3843,37 @@ this._toEncodable = t2; }, _symbolMapToStringMap: function(map) { - var result = new H.JsLinkedHashMap([P.String, null]); + var result = new H.JsLinkedHashMap(type$.JsLinkedHashMap_String_dynamic); map.forEach$1(0, new P._symbolMapToStringMap_closure(result)); return result; }, Function_apply: function($function, positionalArguments, namedArguments) { return H.Primitives_applyFunction($function, positionalArguments, namedArguments == null ? null : P._symbolMapToStringMap(namedArguments)); }, + int_parse: function(source) { + var value = H.Primitives_parseInt(source, null); + if (value != null) + return value; + throw H.wrapException(P.FormatException$(source, null, null)); + }, Error__objectToString: function(object) { if (object instanceof H.Closure) return object.toString$0(0); return "Instance of '" + H.S(H.Primitives_objectTypeName(object)) + "'"; }, - List_List$from: function(elements, growable, $E) { + List_List$filled: function($length, fill, $E) { + var i, + result = J.JSArray_JSArray$fixed($length, $E); + if ($length !== 0 && fill != null) + for (i = 0; i < result.length; ++i) + result[i] = fill; + return result; + }, + List_List$from: function(elements, $E) { var t1, - list = H.setRuntimeTypeInfo([], [$E]); + list = H.setRuntimeTypeInfo([], $E._eval$1("JSArray<0>")); for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) - C.JSArray_methods.add$1(list, H.assertSubtypeOfRuntimeType(t1.get$current(), $E)); + C.JSArray_methods.add$1(list, $E._as(t1.get$current())); return list; }, String_String$fromCharCodes: function(charCodes) { @@ -2944,20 +3934,25 @@ return "0" + n; }, Error_safeToString: function(object) { - if (typeof object === "number" || typeof object === "boolean" || null == object) + if (typeof object == "number" || H._isBool(object) || null == object) return J.toString$0$(object); - if (typeof object === "string") + if (typeof object == "string") return JSON.stringify(object); return P.Error__objectToString(object); }, + AssertionError$: function(message) { + return new P.AssertionError(message); + }, ArgumentError$: function(message) { return new P.ArgumentError(false, null, null, message); }, ArgumentError$value: function(value, $name, message) { return new P.ArgumentError(true, value, $name, message); }, - ArgumentError$notNull: function($name) { - return new P.ArgumentError(false, null, $name, "Must not be null"); + ArgumentError_checkNotNull: function(argument, $name, $T) { + if (argument == null) + throw H.wrapException(new P.ArgumentError(false, null, $name, "Must not be null")); + return argument; }, RangeError$value: function(value, $name) { return new P.RangeError(null, null, true, value, $name, "Value not in range"); @@ -2968,21 +3963,10 @@ RangeError_checkValidRange: function(start, end, $length) { if (start > $length) throw H.wrapException(P.RangeError$range(start, 0, $length, "start", null)); - if (end != null) { - if (start > end || end > $length) - throw H.wrapException(P.RangeError$range(end, start, $length, "end", null)); - return end; - } return $length; }, - RangeError_checkNotNegative: function(value, $name) { - if (typeof value !== "number") - return value.$lt(); - if (value < 0) - throw H.wrapException(P.RangeError$range(value, 0, null, $name, null)); - }, IndexError$: function(invalidValue, indexable, $name, message, $length) { - var t1 = H.intTypeCheck($length == null ? J.get$length$asx(indexable) : $length); + var t1 = H._asIntS($length == null ? J.get$length$asx(indexable) : $length); return new P.IndexError(t1, true, invalidValue, $name, "Index out of range"); }, UnsupportedError$: function(message) { @@ -3010,14 +3994,10 @@ this._box_0 = t0; this.sb = t1; }, - bool: function bool() { - }, DateTime: function DateTime(t0, t1) { this._value = t0; this.isUtc = t1; }, - double: function double() { - }, Duration: function Duration(t0) { this._duration = t0; }, @@ -3027,7 +4007,10 @@ }, Error: function Error() { }, - AssertionError: function AssertionError() { + AssertionError: function AssertionError(t0) { + this.message = t0; + }, + TypeError: function TypeError() { }, NullThrownError: function NullThrownError() { }, @@ -3089,38 +4072,22 @@ this.source = t1; this.offset = t2; }, - int: function int() { - }, Iterable: function Iterable() { }, - List: function List() { - }, Null: function Null() { }, - num: function num() { - }, Object: function Object() { }, - StackTrace: function StackTrace() { - }, - String: function String() { + _StringStackTrace: function _StringStackTrace() { }, StringBuffer: function StringBuffer(t0) { this._contents = t0; }, - Symbol: function Symbol() { - }, convertDartToNative_Dictionary: function(dict) { var object = {}; dict.forEach$1(0, new P.convertDartToNative_Dictionary_closure(object)); return object; }, - promiseToFuture: function(promise, $T) { - var t1 = new P._Future($.Zone__current, [$T]), - completer = new P._AsyncCompleter(t1, [$T]); - promise.then(H.convertDartClosureToJS(new P.promiseToFuture_closure(completer, $T), 1), H.convertDartClosureToJS(new P.promiseToFuture_closure0(completer), 1)); - return t1; - }, _AcceptStructuredClone: function _AcceptStructuredClone() { }, _AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) { @@ -3135,6 +4102,12 @@ this.copies = t1; this.mustCopy = false; }, + promiseToFuture: function(jsPromise, $T) { + var t1 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")), + completer = new P._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>")); + jsPromise.then(H.convertDartClosureToJS(new P.promiseToFuture_closure(completer, $T), 1), H.convertDartClosureToJS(new P.promiseToFuture_closure0(completer), 1)); + return t1; + }, promiseToFuture_closure: function promiseToFuture_closure(t0, t1) { this.completer = t0; this.T = t1; @@ -3153,25 +4126,29 @@ return t1; }, HttpRequest_request: function(url, method, sendData, withCredentials) { - var t3, - t1 = W.HttpRequest, - t2 = new P._Future($.Zone__current, [t1]), - completer = new P._AsyncCompleter(t2, [t1]), + var t2, t3, t4, + t1 = new P._Future($.Zone__current, type$._Future_HttpRequest), + completer = new P._AsyncCompleter(t1, type$._AsyncCompleter_HttpRequest), xhr = new XMLHttpRequest(); C.HttpRequest_methods.open$3$async(xhr, method, url, true); - xhr.withCredentials = true; - t1 = W.ProgressEvent; - t3 = {func: 1, ret: -1, args: [t1]}; - W._EventStreamSubscription$(xhr, "load", H.functionTypeCheck(new W.HttpRequest_request_closure(xhr, completer), t3), false, t1); - W._EventStreamSubscription$(xhr, "error", H.functionTypeCheck(completer.get$completeError(), t3), false, t1); - xhr.send(sendData); - return t2; + C.HttpRequest_methods.set$withCredentials(xhr, true); + t2 = type$.nullable_void_Function_legacy_ProgressEvent; + t3 = t2._as(new W.HttpRequest_request_closure(xhr, completer)); + type$.nullable_void_Function._as(null); + t4 = type$.legacy_ProgressEvent; + W._EventStreamSubscription$(xhr, "load", t3, false, t4); + W._EventStreamSubscription$(xhr, "error", t2._as(completer.get$completeError()), false, t4); + if (sendData != null) + xhr.send(sendData); + else + xhr.send(); + return t1; }, _EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) { - var t1 = W._wrapZone(new W._EventStreamSubscription_closure(onData), W.Event); - t1 = new W._EventStreamSubscription(_target, _eventType, t1, false, [$T]); - t1._tryResume$0(); - return t1; + var t1 = W._wrapZone(new W._EventStreamSubscription_closure(onData), type$.Event); + if (t1 != null && true) + J.addEventListener$3$x(_target, _eventType, t1, false); + return new W._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); }, _wrapZone: function(callback, $T) { var t1 = $.Zone__current; @@ -3217,6 +4194,10 @@ }, UIEvent: function UIEvent() { }, + EventStreamProvider: function EventStreamProvider(t0, t1) { + this._eventType = t0; + this.$ti = t1; + }, _EventStream: function _EventStream(t0, t1, t2, t3) { var _ = this; _._target = t0; @@ -3233,7 +4214,6 @@ }, _EventStreamSubscription: function _EventStreamSubscription(t0, t1, t2, t3, t4) { var _ = this; - _._pauseCount = 0; _._target = t0; _._eventType = t1; _._html$_onData = t2; @@ -3245,28 +4225,7 @@ } }, N = {HexCodec: function HexCodec() { - }, - Logger_Logger: function($name) { - return $.Logger__loggers.putIfAbsent$2($name, new N.Logger_Logger_closure($name)); - }, - Logger: function Logger(t0, t1, t2) { - this.name = t0; - this.parent = t1; - this._children = t2; - }, - Logger_Logger_closure: function Logger_Logger_closure(t0) { - this.name = t0; - }, - Level: function Level(t0, t1) { - this.name = t0; - this.value = t1; - }, - LogRecord: function LogRecord(t0, t1, t2) { - this.level = t0; - this.message = t1; - this.loggerName = t2; - } - }, + }}, R = { _convert: function(bytes, start, end) { var t1, t2, i, bufferIndex, byteOr, byte, bufferIndex0, t3, @@ -3310,20 +4269,44 @@ StreamChannelMixin: function StreamChannelMixin() { } }, + Y = {Level: function Level(t0, t1) { + this.name = t0; + this.value = t1; + }}, + L = {LogRecord: function LogRecord(t0, t1, t2) { + this.level = t0; + this.message = t1; + this.loggerName = t2; + }}, + F = { + Logger_Logger: function($name) { + return $.Logger__loggers.putIfAbsent$2($name, new F.Logger_Logger_closure($name)); + }, + Logger: function Logger(t0, t1, t2) { + var _ = this; + _.name = t0; + _.parent = t1; + _._level = null; + _._children = t2; + }, + Logger_Logger_closure: function Logger_Logger_closure(t0) { + this.name = t0; + } + }, M = { SseClient$: function(serverUrl) { - var t1 = P.String; - t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), N.Logger_Logger("SseClient"), P.StreamController_StreamController(null)); + var t1 = type$.legacy_String; + t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), F.Logger_Logger("SseClient")); t1.SseClient$1(serverUrl); return t1; }, - SseClient: function SseClient(t0, t1, t2, t3) { + SseClient: function SseClient(t0, t1, t2) { var _ = this; _._incomingController = t0; _._outgoingController = t1; _._logger = t2; + _._lastMessageId = -1; _._errorTimer = _._serverUrl = _._eventSource = null; - _._messages = t3; }, SseClient_closure: function SseClient_closure(t0) { this.$this = t0; @@ -3336,12 +4319,12 @@ this.error = t1; } }, - F = { + K = { Uuid$: function() { var options, t2, t1 = {}; t1.options = options; t1.options = null; - t2 = new F.Uuid(); + t2 = new K.Uuid(); t2.Uuid$1$options(t1); return t2; }, @@ -3356,10 +4339,12 @@ main: function() { var channel = M.SseClient$("/test"), t1 = J.get$onClick$x(document.querySelector("button")), - t2 = H.getTypeArgumentByIndex(t1, 0); - W._EventStreamSubscription$(t1._target, t1._eventType, H.functionTypeCheck(new E.main_closure(channel), {func: 1, ret: -1, args: [t2]}), false, t2); + t2 = t1.$ti, + t3 = t2._eval$1("~(1)?")._as(new E.main_closure(channel)); + type$.nullable_void_Function._as(null); + W._EventStreamSubscription$(t1._target, t1._eventType, t3, false, t2._precomputed1); t2 = channel._incomingController; - new P._ControllerStream(t2, [H.getTypeArgumentByIndex(t2, 0)]).listen$1(new E.main_closure0(channel)); + new P._ControllerStream(t2, H._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$1(new E.main_closure0(channel)); }, main_closure: function main_closure(t0) { this.channel = t0; @@ -3368,12 +4353,12 @@ this.channel = t0; } }, - U = { + T = { UuidUtil_mathRNG: function() { var b, rand, i, t1 = new Array(16); t1.fixed$length = Array; - b = H.setRuntimeTypeInfo(t1, [P.int]); + b = H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_int); for (rand = null, i = 0; i < 16; ++i) { t1 = i & 3; if (t1 === 0) @@ -3385,7 +4370,7 @@ return b; } }; - var holders = [C, H, J, P, W, N, R, M, F, E, U]; + var holders = [C, H, J, P, W, N, R, Y, L, F, M, K, E, T]; hunkHelpers.setFunctionNamesIfNecessary(holders); var $ = {}; H.JS_CONST.prototype = {}; @@ -3400,7 +4385,7 @@ return "Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'"; }, noSuchMethod$1: function(receiver, invocation) { - H.interceptedTypeCheck(invocation, "$isInvocation"); + type$.Invocation._as(invocation); throw H.wrapException(P.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); } }; @@ -3409,10 +4394,10 @@ return String(receiver); }, $and: function(receiver, other) { - return H.checkBool(H.boolTypeCheck(other)) && receiver; + return H.checkBool(H._asBoolS(other)) && receiver; }, $or: function(receiver, other) { - return H.checkBool(H.boolTypeCheck(other)) || receiver; + return H.checkBool(H._asBoolS(other)) || receiver; }, get$hashCode: function(receiver) { return receiver ? 519018 : 218159; @@ -3430,7 +4415,7 @@ return 0; }, noSuchMethod$1: function(receiver, invocation) { - return this.super$Interceptor$noSuchMethod(receiver, H.interceptedTypeCheck(invocation, "$isInvocation")); + return this.super$Interceptor$noSuchMethod(receiver, type$.Invocation._as(invocation)); }, $isNull: 1 }; @@ -3451,47 +4436,28 @@ return this.super$JavaScriptObject$toString(receiver); return "JavaScript function for " + H.S(J.toString$0$(dartClosure)); }, - $signature: function() { - return {func: 1, opt: [,,,,,,,,,,,,,,,,]}; - }, $isFunction: 1 }; J.JSArray.prototype = { add$1: function(receiver, value) { - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0)); + H._arrayInstanceType(receiver)._precomputed1._as(value); if (!!receiver.fixed$length) H.throwExpression(P.UnsupportedError$("add")); receiver.push(value); }, addAll$1: function(receiver, collection) { var t1, _i; - H.assertSubtype(collection, "$isIterable", [H.getTypeArgumentByIndex(receiver, 0)], "$asIterable"); + H._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(collection); if (!!receiver.fixed$length) H.throwExpression(P.UnsupportedError$("addAll")); for (t1 = collection.length, _i = 0; _i < collection.length; collection.length === t1 || (0, H.throwConcurrentModificationError)(collection), ++_i) receiver.push(collection[_i]); }, - setRange$3: function(receiver, start, end, iterable) { - var $length, i, - t1 = H.getTypeArgumentByIndex(receiver, 0); - H.assertSubtype(iterable, "$isIterable", [t1], "$asIterable"); - if (!!receiver.immutable$list) - H.throwExpression(P.UnsupportedError$("setRange")); - P.RangeError_checkValidRange(start, end, receiver.length); - $length = end - start; - if ($length === 0) - return; - P.RangeError_checkNotNegative(0, "skipCount"); - H.assertSubtype(iterable, "$isList", [t1], "$asList"); - t1 = J.getInterceptor$asx(iterable); - if ($length > t1.get$length(iterable)) - throw H.wrapException(H.IterableElementError_tooFew()); - if (0 < start) - for (i = $length - 1; i >= 0; --i) - receiver[start + i] = t1.$index(iterable, i); - else - for (i = 0; i < $length; ++i) - receiver[start + i] = t1.$index(iterable, i); + get$last: function(receiver) { + var t1 = receiver.length; + if (t1 > 0) + return receiver[t1 - 1]; + throw H.wrapException(H.IterableElementError_noElement()); }, get$isNotEmpty: function(receiver) { return receiver.length !== 0; @@ -3500,7 +4466,7 @@ return P.IterableBase_iterableToFullString(receiver, "[", "]"); }, get$iterator: function(receiver) { - return new J.ArrayIterator(receiver, receiver.length, [H.getTypeArgumentByIndex(receiver, 0)]); + return new J.ArrayIterator(receiver, receiver.length, H._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>")); }, get$hashCode: function(receiver) { return H.Primitives_objectHashCode(receiver); @@ -3508,40 +4474,33 @@ get$length: function(receiver) { return receiver.length; }, - set$length: function(receiver, newLength) { - if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("set length")); - if (newLength < 0) - throw H.wrapException(P.RangeError$range(newLength, 0, null, "newLength", null)); - receiver.length = newLength; - }, $index: function(receiver, index) { - if (typeof index !== "number" || Math.floor(index) !== index) + if (!H._isInt(index)) throw H.wrapException(H.diagnoseIndexError(receiver, index)); if (index >= receiver.length || index < 0) throw H.wrapException(H.diagnoseIndexError(receiver, index)); return receiver[index]; }, $indexSet: function(receiver, index, value) { - H.intTypeCheck(index); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0)); + H._asIntS(index); + H._arrayInstanceType(receiver)._precomputed1._as(value); if (!!receiver.immutable$list) H.throwExpression(P.UnsupportedError$("indexed set")); - if (typeof index !== "number" || Math.floor(index) !== index) + if (!H._isInt(index)) throw H.wrapException(H.diagnoseIndexError(receiver, index)); if (index >= receiver.length || index < 0) throw H.wrapException(H.diagnoseIndexError(receiver, index)); receiver[index] = value; }, $add: function(receiver, other) { - var totalLength, - t1 = [H.getTypeArgumentByIndex(receiver, 0)]; - H.assertSubtype(other, "$isList", t1, "$asList"); - totalLength = C.JSInt_methods.$add(receiver.length, other.get$length(other)); + var t2, _i, + t1 = H._arrayInstanceType(receiver); + t1._eval$1("List<1>")._as(other); t1 = H.setRuntimeTypeInfo([], t1); - this.set$length(t1, totalLength); - this.setRange$3(t1, 0, receiver.length, receiver); - this.setRange$3(t1, receiver.length, totalLength, other); + for (t2 = receiver.length, _i = 0; _i < receiver.length; receiver.length === t2 || (0, H.throwConcurrentModificationError)(receiver), ++_i) + this.add$1(t1, receiver[_i]); + for (t2 = other.get$iterator(other); t2.moveNext$0();) + this.add$1(t1, t2.get$current()); return t1; }, $isIterable: 1, @@ -3568,7 +4527,7 @@ return true; }, set$_current: function(_current) { - this._current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + this._current = this.$ti._eval$1("1?")._as(_current); } }; J.JSNumber.prototype = { @@ -3638,7 +4597,7 @@ return 536870911 & ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259; }, $add: function(receiver, other) { - H.numTypeCheck(other); + H._asNumS(other); return receiver + other; }, $sub: function(receiver, other) { @@ -3706,23 +4665,19 @@ return (receiver & other) >>> 0; }, $or: function(receiver, other) { - H.numTypeCheck(other); - if (typeof other !== "number") + H._asNumS(other); + if (typeof other != "number") throw H.wrapException(H.argumentErrorValue(other)); return (receiver | other) >>> 0; }, $lt: function(receiver, other) { - if (typeof other !== "number") - throw H.wrapException(H.argumentErrorValue(other)); return receiver < other; }, $gt: function(receiver, other) { - if (typeof other !== "number") - throw H.wrapException(H.argumentErrorValue(other)); return receiver > other; }, $ge: function(receiver, other) { - if (typeof other !== "number") + if (typeof other != "number") throw H.wrapException(H.argumentErrorValue(other)); return receiver >= other; }, @@ -3745,8 +4700,8 @@ return receiver.charCodeAt(index); }, $add: function(receiver, other) { - H.stringTypeCheck(other); - if (typeof other !== "string") + H._asStringS(other); + if (typeof other != "string") throw H.wrapException(P.ArgumentError$value(other, null, null)); return receiver + other; }, @@ -3820,19 +4775,27 @@ $isPattern: 1, $isString: 1 }; + H.LateInitializationErrorImpl.prototype = { + toString$0: function(_) { + var message = this._message; + return message != null ? "LateInitializationError: " + message : "LateInitializationError"; + } + }; H.EfficientLengthIterable.prototype = {}; H.ListIterable.prototype = { get$iterator: function(_) { var _this = this; - return new H.ListIterator(_this, _this.get$length(_this), [H.getRuntimeTypeArgument(_this, "ListIterable", 0)]); + return new H.ListIterator(_this, _this.get$length(_this), H._instanceType(_this)._eval$1("ListIterator")); }, get$isEmpty: function(_) { - return this.get$length(this) === 0; + var t1 = this._parent; + return t1.get$length(t1) === 0; } }; H.ListIterator.prototype = { get$current: function() { - return this.__internal$_current; + var cur = this.__internal$_current; + return cur; }, moveNext$0: function() { var t3, _this = this, @@ -3851,11 +4814,11 @@ return true; }, set$__internal$_current: function(_current) { - this.__internal$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + this.__internal$_current = this.$ti._eval$1("1?")._as(_current); } }; H.FixedLengthListMixin.prototype = {}; - H.Symbol0.prototype = { + H.Symbol.prototype = { get$hashCode: function(_) { var hash = this._hashCode; if (hash != null) @@ -3870,9 +4833,9 @@ $eq: function(_, other) { if (other == null) return false; - return other instanceof H.Symbol0 && this.__internal$_name == other.__internal$_name; + return other instanceof H.Symbol && this.__internal$_name == other.__internal$_name; }, - $isSymbol: 1 + $isSymbol0: 1 }; H.ConstantMapView.prototype = {}; H.ConstantMap.prototype = { @@ -3893,20 +4856,20 @@ }, $index: function(_, key) { if (!this.containsKey$1(key)) - return; + return null; return this._fetch$1(key); }, _fetch$1: function(key) { - return this._jsObject[H.stringTypeCheck(key)]; + return this._jsObject[H._asStringS(key)]; }, forEach$1: function(_, f) { - var keys, t2, i, key, _this = this, - t1 = H.getTypeArgumentByIndex(_this, 1); - H.functionTypeCheck(f, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(_this, 0), t1]}); - keys = _this._keys; - for (t2 = keys.length, i = 0; i < t2; ++i) { + var keys, t2, i, key, + t1 = H._instanceType(this); + t1._eval$1("~(1,2)")._as(f); + keys = this._keys; + for (t2 = keys.length, t1 = t1._rest[1], i = 0; i < t2; ++i) { key = keys[i]; - f.call$2(key, H.assertSubtypeOfRuntimeType(_this._fetch$1(key), t1)); + f.call$2(key, t1._as(this._fetch$1(key))); } } }; @@ -3917,7 +4880,7 @@ }, get$positionalArguments: function() { var t1, argumentCount, list, index, _this = this; - if (_this._kind === 1) + if (_this.__js_helper$_kind === 1) return C.List_empty; t1 = _this._arguments; argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount; @@ -3934,8 +4897,8 @@ return list; }, get$namedArguments: function() { - var t1, namedArgumentCount, t2, namedArgumentsStartIndex, t3, map, i, t4, t5, _this = this; - if (_this._kind !== 0) + var t1, namedArgumentCount, t2, namedArgumentsStartIndex, map, i, t3, t4, _this = this; + if (_this.__js_helper$_kind !== 0) return C.Map_empty; t1 = _this._namedArgumentNames; namedArgumentCount = t1.length; @@ -3943,25 +4906,24 @@ namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount; if (namedArgumentCount === 0) return C.Map_empty; - t3 = P.Symbol; - map = new H.JsLinkedHashMap([t3, null]); + map = new H.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); for (i = 0; i < namedArgumentCount; ++i) { if (i >= t1.length) return H.ioore(t1, i); - t4 = t1[i]; - t5 = namedArgumentsStartIndex + i; - if (t5 < 0 || t5 >= t2.length) - return H.ioore(t2, t5); - map.$indexSet(0, new H.Symbol0(t4), t2[t5]); + t3 = t1[i]; + t4 = namedArgumentsStartIndex + i; + if (t4 < 0 || t4 >= t2.length) + return H.ioore(t2, t4); + map.$indexSet(0, new H.Symbol(t3), t2[t4]); } - return new H.ConstantMapView(map, [t3, null]); + return new H.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); }, $isInvocation: 1 }; H.Primitives_functionNoSuchMethod_closure.prototype = { call$2: function($name, argument) { var t1; - H.stringTypeCheck($name); + H._asStringS($name); t1 = this._box_0; t1.names = t1.names + "$" + H.S($name); C.JSArray_methods.add$1(this.namedArgumentList, $name); @@ -3975,7 +4937,7 @@ var result, t1, _this = this, match = new RegExp(_this._pattern).exec(message); if (match == null) - return; + return null; result = Object.create(null); t1 = _this._arguments; if (t1 !== -1) @@ -3999,7 +4961,7 @@ toString$0: function(_) { var t1 = this._method; if (t1 == null) - return "NoSuchMethodError: " + H.S(this._message); + return "NoSuchMethodError: " + H.S(this.__js_helper$_message); return "NoSuchMethodError: method not found: '" + t1 + "' on null"; } }; @@ -4009,29 +4971,25 @@ _s38_ = "NoSuchMethodError: method not found: '", t1 = _this._method; if (t1 == null) - return "NoSuchMethodError: " + H.S(_this._message); + return "NoSuchMethodError: " + H.S(_this.__js_helper$_message); t2 = _this._receiver; if (t2 == null) - return _s38_ + t1 + "' (" + H.S(_this._message) + ")"; - return _s38_ + t1 + "' on '" + t2 + "' (" + H.S(_this._message) + ")"; + return _s38_ + t1 + "' (" + H.S(_this.__js_helper$_message) + ")"; + return _s38_ + t1 + "' on '" + t2 + "' (" + H.S(_this.__js_helper$_message) + ")"; } }; H.UnknownJsTypeError.prototype = { toString$0: function(_) { - var t1 = this._message; + var t1 = this.__js_helper$_message; return t1.length === 0 ? "Error" : "Error: " + t1; } }; - H.ExceptionAndStackTrace.prototype = {}; - H.unwrapException_saveStackTrace.prototype = { - call$1: function(error) { - if (!!J.getInterceptor$(error).$isError) - if (error.$thrownJsError == null) - error.$thrownJsError = this.ex; - return error; - }, - $signature: 4 + H.NullThrownFromJavaScriptException.prototype = { + toString$0: function(_) { + return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)"; + } }; + H.ExceptionAndStackTrace.prototype = {}; H._StackTrace.prototype = { toString$0: function(_) { var trace, @@ -4094,19 +5052,9 @@ return "Closure '" + H.S(this._name) + "' of " + ("Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'"); } }; - H.TypeErrorImplementation.prototype = { - toString$0: function(_) { - return this.message; - } - }; - H.CastErrorImplementation.prototype = { - toString$0: function(_) { - return this.message; - } - }; H.RuntimeError.prototype = { toString$0: function(_) { - return "RuntimeError: " + H.S(this.message); + return "RuntimeError: " + this.message; } }; H._AssertionError.prototype = { @@ -4114,6 +5062,7 @@ return "Assertion failed: " + P.Error_safeToString(this.message); } }; + H._Required.prototype = {}; H.JsLinkedHashMap.prototype = { get$length: function(_) { return this.__js_helper$_length; @@ -4122,11 +5071,11 @@ return this.__js_helper$_length === 0; }, get$keys: function() { - return new H.LinkedHashMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]); + return new H.LinkedHashMapKeyIterable(this, H._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>")); }, containsKey$1: function(key) { var strings, t1; - if (typeof key === "string") { + if (typeof key == "string") { strings = this._strings; if (strings == null) return false; @@ -4137,55 +5086,56 @@ } }, internalContainsKey$1: function(key) { - var rest = this._rest; + var rest = this.__js_helper$_rest; if (rest == null) return false; return this.internalFindBucketIndex$2(this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff), key) >= 0; }, $index: function(_, key) { - var strings, cell, t1, nums, _this = this; - if (typeof key === "string") { + var strings, cell, t1, nums, _this = this, _null = null; + if (typeof key == "string") { strings = _this._strings; if (strings == null) - return; + return _null; cell = _this._getTableCell$2(strings, key); - t1 = cell == null ? null : cell.hashMapCellValue; + t1 = cell == null ? _null : cell.hashMapCellValue; return t1; - } else if (typeof key === "number" && (key & 0x3ffffff) === key) { + } else if (typeof key == "number" && (key & 0x3ffffff) === key) { nums = _this._nums; if (nums == null) - return; + return _null; cell = _this._getTableCell$2(nums, key); - t1 = cell == null ? null : cell.hashMapCellValue; + t1 = cell == null ? _null : cell.hashMapCellValue; return t1; } else return _this.internalGet$1(key); }, internalGet$1: function(key) { var bucket, index, - rest = this._rest; + rest = this.__js_helper$_rest; if (rest == null) - return; + return null; bucket = this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff); index = this.internalFindBucketIndex$2(bucket, key); if (index < 0) - return; + return null; return bucket[index].hashMapCellValue; }, $indexSet: function(_, key, value) { - var strings, nums, rest, hash, bucket, index, _this = this; - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1)); - if (typeof key === "string") { + var strings, nums, rest, hash, bucket, index, _this = this, + t1 = H._instanceType(_this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); + if (typeof key == "string") { strings = _this._strings; _this._addHashTableEntry$3(strings == null ? _this._strings = _this._newHashTable$0() : strings, key, value); - } else if (typeof key === "number" && (key & 0x3ffffff) === key) { + } else if (typeof key == "number" && (key & 0x3ffffff) === key) { nums = _this._nums; _this._addHashTableEntry$3(nums == null ? _this._nums = _this._newHashTable$0() : nums, key, value); } else { - rest = _this._rest; + rest = _this.__js_helper$_rest; if (rest == null) - rest = _this._rest = _this._newHashTable$0(); + rest = _this.__js_helper$_rest = _this._newHashTable$0(); hash = J.get$hashCode$(key) & 0x3ffffff; bucket = _this._getTableBucket$2(rest, hash); if (bucket == null) @@ -4200,9 +5150,10 @@ } }, putIfAbsent$2: function(key, ifAbsent) { - var value, _this = this; - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)); - H.functionTypeCheck(ifAbsent, {func: 1, ret: H.getTypeArgumentByIndex(_this, 1)}); + var value, _this = this, + t1 = H._instanceType(_this); + t1._precomputed1._as(key); + t1._eval$1("2()")._as(ifAbsent); if (_this.containsKey$1(key)) return _this.$index(0, key); value = ifAbsent.call$0(); @@ -4211,7 +5162,7 @@ }, forEach$1: function(_, action) { var cell, modifications, _this = this; - H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(_this, 0), H.getTypeArgumentByIndex(_this, 1)]}); + H._instanceType(_this)._eval$1("~(1,2)")._as(action); cell = _this._first; modifications = _this._modifications; for (; cell != null;) { @@ -4222,9 +5173,10 @@ } }, _addHashTableEntry$3: function(table, key, value) { - var cell, _this = this; - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1)); + var cell, _this = this, + t1 = H._instanceType(_this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); cell = _this._getTableCell$2(table, key); if (cell == null) _this._setTableEntry$3(table, key, _this._newLinkedCell$2(key, value)); @@ -4233,7 +5185,8 @@ }, _newLinkedCell$2: function(key, value) { var _this = this, - cell = new H.LinkedHashMapCell(H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)), H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1))); + t1 = H._instanceType(_this), + cell = new H.LinkedHashMapCell(t1._precomputed1._as(key), t1._rest[1]._as(value)); if (_this._first == null) _this._first = _this._last = cell; else @@ -4289,7 +5242,7 @@ }, get$iterator: function(_) { var t1 = this._map, - t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti); + t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti._eval$1("LinkedHashMapKeyIterator<1>")); t2._cell = t1._first; return t2; } @@ -4299,24 +5252,22 @@ return this.__js_helper$_current; }, moveNext$0: function() { - var _this = this, + var cell, _this = this, t1 = _this._map; if (_this._modifications !== t1._modifications) throw H.wrapException(P.ConcurrentModificationError$(t1)); - else { - t1 = _this._cell; - if (t1 == null) { - _this.set$__js_helper$_current(null); - return false; - } else { - _this.set$__js_helper$_current(t1.hashMapCellKey); - _this._cell = _this._cell._next; - return true; - } + cell = _this._cell; + if (cell == null) { + _this.set$__js_helper$_current(null); + return false; + } else { + _this.set$__js_helper$_current(cell.hashMapCellKey); + _this._cell = cell._next; + return true; } }, set$__js_helper$_current: function(_current) { - this.__js_helper$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + this.__js_helper$_current = this.$ti._eval$1("1?")._as(_current); } }; H.initHooks_closure.prototype = { @@ -4333,7 +5284,7 @@ }; H.initHooks_closure1.prototype = { call$1: function(tag) { - return this.prototypeForTag(H.stringTypeCheck(tag)); + return this.prototypeForTag(H._asStringS(tag)); }, $signature: 14 }; @@ -4342,9 +5293,7 @@ get$length: function(receiver) { return receiver.length; }, - $isJavaScriptIndexingBehavior: 1, - $asJavaScriptIndexingBehavior: function() { - } + $isJavaScriptIndexingBehavior: 1 }; H.NativeTypedArrayOfDouble.prototype = { $index: function(receiver, index) { @@ -4352,47 +5301,23 @@ return receiver[index]; }, $indexSet: function(receiver, index, value) { - H.intTypeCheck(index); - H.doubleTypeCheck(value); + H._asIntS(index); + H._asDoubleS(value); H._checkValidIndex(index, receiver, receiver.length); receiver[index] = value; }, - $asFixedLengthListMixin: function() { - return [P.double]; - }, - $asListMixin: function() { - return [P.double]; - }, $isIterable: 1, - $asIterable: function() { - return [P.double]; - }, - $isList: 1, - $asList: function() { - return [P.double]; - } + $isList: 1 }; H.NativeTypedArrayOfInt.prototype = { $indexSet: function(receiver, index, value) { - H.intTypeCheck(index); - H.intTypeCheck(value); + H._asIntS(index); + H._asIntS(value); H._checkValidIndex(index, receiver, receiver.length); receiver[index] = value; }, - $asFixedLengthListMixin: function() { - return [P.int]; - }, - $asListMixin: function() { - return [P.int]; - }, $isIterable: 1, - $asIterable: function() { - return [P.int]; - }, - $isList: 1, - $asList: function() { - return [P.int]; - } + $isList: 1 }; H.NativeInt16List.prototype = { $index: function(receiver, index) { @@ -4446,6 +5371,21 @@ H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + H.Rti.prototype = { + _eval$1: function(recipe) { + return H._Universe_evalInEnvironment(init.typeUniverse, this, recipe); + }, + _bind$1: function(typeOrTuple) { + return H._Universe_bind(init.typeUniverse, this, typeOrTuple); + } + }; + H._FunctionParameters.prototype = {}; + H._Error.prototype = { + toString$0: function(_) { + return this.__rti$_message; + } + }; + H._TypeError.prototype = {}; P._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { call$1: function(_) { var t1 = this._box_0, @@ -4453,12 +5393,12 @@ t1.storedCallback = null; f.call$0(); }, - $signature: 7 + $signature: 5 }; P._AsyncRun__initializeScheduleImmediate_closure.prototype = { call$1: function(callback) { var t1, t2; - this._box_0.storedCallback = H.functionTypeCheck(callback, {func: 1, ret: -1}); + this._box_0.storedCallback = type$.void_Function._as(callback); t1 = this.div; t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); @@ -4471,7 +5411,7 @@ }, "call*": "call$0", $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { call$0: function() { @@ -4479,7 +5419,7 @@ }, "call*": "call$0", $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; P._TimerImpl.prototype = { _TimerImpl$2: function(milliseconds, callback) { @@ -4507,22 +5447,28 @@ }, "call*": "call$0", $requiredArgCount: 0, - $signature: 0 + $signature: 1 }; P._AsyncAwaitCompleter.prototype = { complete$1: function(_, value) { - var t2, t3, _this = this, - t1 = H.getTypeArgumentByIndex(_this, 0); - H.futureOrCheck(value, {futureOr: 1, type: t1}); - t2 = !_this.isSync || H.checkSubtype(value, "$isFuture", _this.$ti, "$asFuture"); - t3 = _this._future; - if (t2) - t3._asyncComplete$1(value); - else - t3._completeWithValue$1(H.assertSubtypeOfRuntimeType(value, t1)); + var t2, _this = this, + t1 = _this.$ti; + t1._eval$1("1/?")._as(value); + if (!_this.isSync) + _this._future._asyncComplete$1(value); + else { + t2 = _this._future; + if (t1._eval$1("Future<1>")._is(value)) + t2._chainFuture$1(value); + else + t2._completeWithValue$1(t1._precomputed1._as(value)); + } }, completeError$2: function(e, st) { - var t1 = this._future; + var t1; + if (st == null) + st = P.AsyncError_defaultStackTrace(e); + t1 = this._future; if (this.isSync) t1._completeError$2(e, st); else @@ -4537,7 +5483,7 @@ }; P._awaitOnObject_closure0.prototype = { call$2: function(error, stackTrace) { - this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, H.interceptedTypeCheck(stackTrace, "$isStackTrace"))); + this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, "call*": "call$2", $requiredArgCount: 2, @@ -4545,18 +5491,19 @@ }; P._wrapJsFunctionForAsync_closure.prototype = { call$2: function(errorCode, result) { - this.$protected(H.intTypeCheck(errorCode), result); + this.$protected(H._asIntS(errorCode), result); }, $signature: 17 }; P._Completer.prototype = { completeError$2: function(error, stackTrace) { var t1; - if (error == null) - error = new P.NullThrownError(); + P.ArgumentError_checkNotNull(error, "error", type$.Object); t1 = this.future; if (t1._state !== 0) throw H.wrapException(P.StateError$("Future already completed")); + if (stackTrace == null) + stackTrace = P.AsyncError_defaultStackTrace(error); t1._asyncCompleteError$2(error, stackTrace); }, completeError$1: function(error) { @@ -4565,45 +5512,47 @@ }; P._AsyncCompleter.prototype = { complete$1: function(_, value) { - var t1; - H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(this, 0)}); - t1 = this.future; - if (t1._state !== 0) + var t2, + t1 = this.$ti; + t1._eval$1("1/?")._as(value); + t2 = this.future; + if (t2._state !== 0) throw H.wrapException(P.StateError$("Future already completed")); - t1._asyncComplete$1(value); + t2._asyncComplete$1(t1._eval$1("1/")._as(value)); } }; P._FutureListener.prototype = { matchesErrorTest$1: function(asyncError) { if ((this.state & 15) !== 6) return true; - return this.result._zone.runUnary$2$2(H.functionTypeCheck(this.callback, {func: 1, ret: P.bool, args: [P.Object]}), asyncError.error, P.bool, P.Object); + return this.result._zone.runUnary$2$2(type$.bool_Function_Object._as(this.callback), asyncError.error, type$.bool, type$.Object); }, handleError$1: function(asyncError) { var errorCallback = this.errorCallback, - t1 = P.Object, - t2 = {futureOr: 1, type: H.getTypeArgumentByIndex(this, 1)}, - t3 = this.result._zone; - if (H.functionTypeTest(errorCallback, {func: 1, args: [P.Object, P.StackTrace]})) - return H.futureOrCheck(t3.runBinary$3$3(errorCallback, asyncError.error, asyncError.stackTrace, null, t1, P.StackTrace), t2); + t1 = type$.dynamic, + t2 = type$.Object, + t3 = this.$ti._eval$1("2/"), + t4 = this.result._zone; + if (type$.dynamic_Function_Object_StackTrace._is(errorCallback)) + return t3._as(t4.runBinary$3$3(errorCallback, asyncError.error, asyncError.stackTrace, t1, t2, type$.StackTrace)); else - return H.futureOrCheck(t3.runUnary$2$2(H.functionTypeCheck(errorCallback, {func: 1, args: [P.Object]}), asyncError.error, null, t1), t2); + return t3._as(t4.runUnary$2$2(type$.dynamic_Function_Object._as(errorCallback), asyncError.error, t1, t2)); } }; P._Future.prototype = { then$1$2$onError: function(f, onError, $R) { var currentZone, result, t2, - t1 = H.getTypeArgumentByIndex(this, 0); - H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $R}, args: [t1]}); + t1 = this.$ti; + t1._bind$1($R)._eval$1("1/(2)")._as(f); currentZone = $.Zone__current; if (currentZone !== C.C__RootZone) { - H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $R}, args: [t1]}); + $R._eval$1("@<0/>")._bind$1(t1._precomputed1)._eval$1("1(2)")._as(f); if (onError != null) onError = P._registerErrorHandler(onError, currentZone); } - result = new P._Future($.Zone__current, [$R]); + result = new P._Future(currentZone, $R._eval$1("_Future<0>")); t2 = onError == null ? 1 : 3; - this._addListener$1(new P._FutureListener(result, t2, f, onError, [t1, $R])); + this._addListener$1(new P._FutureListener(result, t2, f, onError, t1._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>"))); return result; }, then$1$1: function(f, $R) { @@ -4611,32 +5560,34 @@ }, _thenAwait$1$2: function(f, onError, $E) { var result, - t1 = H.getTypeArgumentByIndex(this, 0); - H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $E}, args: [t1]}); - result = new P._Future($.Zone__current, [$E]); - this._addListener$1(new P._FutureListener(result, (onError == null ? 1 : 3) | 16, f, onError, [t1, $E])); + t1 = this.$ti; + t1._bind$1($E)._eval$1("1/(2)")._as(f); + result = new P._Future($.Zone__current, $E._eval$1("_Future<0>")); + this._addListener$1(new P._FutureListener(result, 19, f, onError, t1._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>"))); return result; }, whenComplete$1: function(action) { var t1, result; - H.functionTypeCheck(action, {func: 1}); - t1 = $.Zone__current; - result = new P._Future(t1, this.$ti); - if (t1 !== C.C__RootZone) - action = H.functionTypeCheck(action, {func: 1, ret: null}); - t1 = H.getTypeArgumentByIndex(this, 0); - this._addListener$1(new P._FutureListener(result, 8, action, null, [t1, t1])); + type$.dynamic_Function._as(action); + t1 = this.$ti; + result = new P._Future($.Zone__current, t1); + this._addListener$1(new P._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>"))); return result; }, + _setValue$1: function(value) { + this.$ti._precomputed1._as(value); + this._state = 4; + this._resultOrListeners = value; + }, _addListener$1: function(listener) { var source, _this = this, t1 = _this._state; if (t1 <= 1) { - listener._nextListener = H.interceptedTypeCheck(_this._resultOrListeners, "$is_FutureListener"); + listener._nextListener = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners); _this._resultOrListeners = listener; } else { if (t1 === 2) { - source = H.interceptedTypeCheck(_this._resultOrListeners, "$is_Future"); + source = type$._Future_dynamic._as(_this._resultOrListeners); t1 = source._state; if (t1 < 4) { source._addListener$1(listener); @@ -4645,26 +5596,27 @@ _this._state = t1; _this._resultOrListeners = source._resultOrListeners; } - P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__addListener_closure(_this, listener), {func: 1, ret: -1})); + P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__addListener_closure(_this, listener))); } }, _prependListeners$1: function(listeners) { - var t1, existingListeners, cursor, cursor0, source, _this = this, _box_0 = {}; + var t1, existingListeners, next, cursor, next0, source, _this = this, _box_0 = {}; _box_0.listeners = listeners; if (listeners == null) return; t1 = _this._state; if (t1 <= 1) { - existingListeners = H.interceptedTypeCheck(_this._resultOrListeners, "$is_FutureListener"); - cursor = _this._resultOrListeners = listeners; + existingListeners = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners); + _this._resultOrListeners = listeners; if (existingListeners != null) { - for (; cursor0 = cursor._nextListener, cursor0 != null; cursor = cursor0) - ; + next = listeners._nextListener; + for (cursor = listeners; next != null; cursor = next, next = next0) + next0 = next._nextListener; cursor._nextListener = existingListeners; } } else { if (t1 === 2) { - source = H.interceptedTypeCheck(_this._resultOrListeners, "$is_Future"); + source = type$._Future_dynamic._as(_this._resultOrListeners); t1 = source._state; if (t1 < 4) { source._prependListeners$1(listeners); @@ -4674,11 +5626,11 @@ _this._resultOrListeners = source._resultOrListeners; } _box_0.listeners = _this._reverseListeners$1(listeners); - P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__prependListeners_closure(_box_0, _this), {func: 1, ret: -1})); + P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__prependListeners_closure(_box_0, _this))); } }, _removeListeners$0: function() { - var current = H.interceptedTypeCheck(this._resultOrListeners, "$is_FutureListener"); + var current = type$.nullable__FutureListener_dynamic_dynamic._as(this._resultOrListeners); this._resultOrListeners = null; return this._reverseListeners$1(current); }, @@ -4691,18 +5643,17 @@ return prev; }, _complete$1: function(value) { - var t2, listeners, _this = this, - t1 = H.getTypeArgumentByIndex(_this, 0); - H.futureOrCheck(value, {futureOr: 1, type: t1}); - t2 = _this.$ti; - if (H.checkSubtype(value, "$isFuture", t2, "$asFuture")) - if (H.checkSubtype(value, "$is_Future", t2, null)) + var listeners, _this = this, + t1 = _this.$ti; + t1._eval$1("1/")._as(value); + if (t1._eval$1("Future<1>")._is(value)) + if (t1._is(value)) P._Future__chainCoreFuture(value, _this); else P._Future__chainForeignFuture(value, _this); else { listeners = _this._removeListeners$0(); - H.assertSubtypeOfRuntimeType(value, t1); + t1._precomputed1._as(value); _this._state = 4; _this._resultOrListeners = value; P._Future__propagateToListeners(_this, listeners); @@ -4710,41 +5661,44 @@ }, _completeWithValue$1: function(value) { var listeners, _this = this; - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 0)); + _this.$ti._precomputed1._as(value); listeners = _this._removeListeners$0(); _this._state = 4; _this._resultOrListeners = value; P._Future__propagateToListeners(_this, listeners); }, _completeError$2: function(error, stackTrace) { - var listeners, _this = this; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + var listeners, t1, _this = this; + type$.StackTrace._as(stackTrace); listeners = _this._removeListeners$0(); + t1 = P.AsyncError$(error, stackTrace); _this._state = 8; - _this._resultOrListeners = new P.AsyncError(error, stackTrace); + _this._resultOrListeners = t1; P._Future__propagateToListeners(_this, listeners); }, - _completeError$1: function(error) { - return this._completeError$2(error, null); - }, _asyncComplete$1: function(value) { - var _this = this; - H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(_this, 0)}); - if (H.checkSubtype(value, "$isFuture", _this.$ti, "$asFuture")) { - _this._chainFuture$1(value); + var t1 = this.$ti; + t1._eval$1("1/")._as(value); + if (t1._eval$1("Future<1>")._is(value)) { + this._chainFuture$1(value); return; } + this._asyncCompleteWithValue$1(t1._precomputed1._as(value)); + }, + _asyncCompleteWithValue$1: function(value) { + var _this = this; + _this.$ti._precomputed1._as(value); _this._state = 1; - P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__asyncComplete_closure(_this, value), {func: 1, ret: -1})); + P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__asyncCompleteWithValue_closure(_this, value))); }, _chainFuture$1: function(value) { var _this = this, t1 = _this.$ti; - H.assertSubtype(value, "$isFuture", t1, "$asFuture"); - if (H.checkSubtype(value, "$is_Future", t1, null)) { + t1._eval$1("Future<1>")._as(value); + if (t1._is(value)) { if (value._state === 8) { _this._state = 1; - P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__chainFuture_closure(_this, value), {func: 1, ret: -1})); + P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__chainFuture_closure(_this, value))); } else P._Future__chainCoreFuture(value, _this); return; @@ -4752,9 +5706,9 @@ P._Future__chainForeignFuture(value, _this); }, _asyncCompleteError$2: function(error, stackTrace) { - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + type$.StackTrace._as(stackTrace); this._state = 1; - P._rootScheduleMicrotask(null, null, this._zone, H.functionTypeCheck(new P._Future__asyncCompleteError_closure(this, error, stackTrace), {func: 1, ret: -1})); + P._rootScheduleMicrotask(null, null, this._zone, type$.void_Function._as(new P._Future__asyncCompleteError_closure(this, error, stackTrace))); }, $isFuture: 1 }; @@ -4762,13 +5716,13 @@ call$0: function() { P._Future__propagateToListeners(this.$this, this.listener); }, - $signature: 1 + $signature: 0 }; P._Future__prependListeners_closure.prototype = { call$0: function() { P._Future__propagateToListeners(this.$this, this._box_0.listeners); }, - $signature: 1 + $signature: 0 }; P._Future__chainForeignFuture_closure.prototype = { call$1: function(value) { @@ -4776,58 +5730,51 @@ t1._state = 0; t1._complete$1(value); }, - $signature: 7 + $signature: 5 }; P._Future__chainForeignFuture_closure0.prototype = { call$2: function(error, stackTrace) { - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - this.target._completeError$2(error, stackTrace); - }, - call$1: function(error) { - return this.call$2(error, null); + this.target._completeError$2(error, type$.StackTrace._as(stackTrace)); }, "call*": "call$2", - $defaultValues: function() { - return [null]; - }, - $signature: 18 + $requiredArgCount: 2, + $signature: 19 }; P._Future__chainForeignFuture_closure1.prototype = { call$0: function() { this.target._completeError$2(this.e, this.s); }, - $signature: 1 + $signature: 0 }; - P._Future__asyncComplete_closure.prototype = { + P._Future__asyncCompleteWithValue_closure.prototype = { call$0: function() { - var t1 = this.$this; - t1._completeWithValue$1(H.assertSubtypeOfRuntimeType(this.value, H.getTypeArgumentByIndex(t1, 0))); + this.$this._completeWithValue$1(this.value); }, - $signature: 1 + $signature: 0 }; P._Future__chainFuture_closure.prototype = { call$0: function() { P._Future__chainCoreFuture(this.value, this.$this); }, - $signature: 1 + $signature: 0 }; P._Future__asyncCompleteError_closure.prototype = { call$0: function() { this.$this._completeError$2(this.error, this.stackTrace); }, - $signature: 1 + $signature: 0 }; P._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { call$0: function() { var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null; try { - t1 = _this.listener; - completeResult = t1.result._zone.run$1$1(H.functionTypeCheck(t1.callback, {func: 1}), null); + t1 = _this._box_0.listener; + completeResult = t1.result._zone.run$1$1(type$.dynamic_Function._as(t1.callback), type$.dynamic); } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); if (_this.hasError) { - t1 = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError").error; + t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners).error; t2 = e; t2 = t1 == null ? t2 == null : t1 === t2; t1 = t2; @@ -4835,86 +5782,86 @@ t1 = false; t2 = _this._box_0; if (t1) - t2.listenerValueOrError = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError"); + t2.listenerValueOrError = type$.AsyncError._as(_this._box_1.source._resultOrListeners); else - t2.listenerValueOrError = new P.AsyncError(e, s); + t2.listenerValueOrError = P.AsyncError$(e, s); t2.listenerHasError = true; return; } - if (!!J.getInterceptor$(completeResult).$isFuture) { - if (completeResult instanceof P._Future && completeResult._state >= 4) { - if (completeResult._state === 8) { - t1 = _this._box_0; - t1.listenerValueOrError = H.interceptedTypeCheck(completeResult._resultOrListeners, "$isAsyncError"); - t1.listenerHasError = true; - } - return; + if (completeResult instanceof P._Future && completeResult._state >= 4) { + if (completeResult._state === 8) { + t1 = _this._box_0; + t1.listenerValueOrError = type$.AsyncError._as(completeResult._resultOrListeners); + t1.listenerHasError = true; } + return; + } + if (type$.Future_dynamic._is(completeResult)) { originalSource = _this._box_1.source; t1 = _this._box_0; - t1.listenerValueOrError = completeResult.then$1$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), null); + t1.listenerValueOrError = completeResult.then$1$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic); t1.listenerHasError = false; } }, - $signature: 0 + $signature: 1 }; P._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { call$1: function(_) { return this.originalSource; }, - $signature: 19 + $signature: 20 }; P._Future__propagateToListeners_handleValueCallback.prototype = { call$0: function() { - var e, s, t1, t2, t3, t4, exception, _this = this; + var e, s, t1, t2, t3, t4, t5, exception; try { - t1 = _this.listener; - t2 = H.getTypeArgumentByIndex(t1, 0); - t3 = H.assertSubtypeOfRuntimeType(_this.sourceResult, t2); - t4 = H.getTypeArgumentByIndex(t1, 1); - _this._box_0.listenerValueOrError = t1.result._zone.runUnary$2$2(H.functionTypeCheck(t1.callback, {func: 1, ret: {futureOr: 1, type: t4}, args: [t2]}), t3, {futureOr: 1, type: t4}, t2); + t1 = this._box_0; + t2 = t1.listener; + t3 = t2.$ti; + t4 = t3._precomputed1; + t5 = t4._as(this.sourceResult); + t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t3._eval$1("2/(1)")._as(t2.callback), t5, t3._eval$1("2/"), t4); } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - t1 = _this._box_0; - t1.listenerValueOrError = new P.AsyncError(e, s); + t1 = this._box_0; + t1.listenerValueOrError = P.AsyncError$(e, s); t1.listenerHasError = true; } }, - $signature: 0 + $signature: 1 }; P._Future__propagateToListeners_handleError.prototype = { call$0: function() { - var asyncError, e, s, t1, t2, exception, t3, t4, _this = this; + var asyncError, e, s, t1, exception, t2, t3, t4, _this = this; try { - asyncError = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError"); - t1 = _this.listener; - if (H.boolConversionCheck(t1.matchesErrorTest$1(asyncError)) && t1.errorCallback != null) { - t2 = _this._box_0; - t2.listenerValueOrError = t1.handleError$1(asyncError); - t2.listenerHasError = false; + asyncError = type$.AsyncError._as(_this._box_1.source._resultOrListeners); + t1 = _this._box_0; + if (H.boolConversionCheck(t1.listener.matchesErrorTest$1(asyncError)) && t1.listener.errorCallback != null) { + t1.listenerValueOrError = t1.listener.handleError$1(asyncError); + t1.listenerHasError = false; } } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - t1 = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError"); + t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners); t2 = t1.error; t3 = e; t4 = _this._box_0; if (t2 == null ? t3 == null : t2 === t3) t4.listenerValueOrError = t1; else - t4.listenerValueOrError = new P.AsyncError(e, s); + t4.listenerValueOrError = P.AsyncError$(e, s); t4.listenerHasError = true; } }, - $signature: 0 + $signature: 1 }; P._AsyncCallbackEntry.prototype = {}; P.Stream.prototype = { get$length: function(_) { var t1 = {}, - future = new P._Future($.Zone__current, [P.int]); + future = new P._Future($.Zone__current, type$._Future_int); t1.count = 0; this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1, this), true, new P.Stream_length_closure0(t1, future), future.get$_completeError()); return future; @@ -4922,18 +5869,18 @@ }; P.Stream_length_closure.prototype = { call$1: function(_) { - H.assertSubtypeOfRuntimeType(_, H.getTypeArgumentByIndex(this.$this, 0)); + H._instanceType(this.$this)._precomputed1._as(_); ++this._box_0.count; }, $signature: function() { - return {func: 1, ret: P.Null, args: [H.getTypeArgumentByIndex(this.$this, 0)]}; + return H._instanceType(this.$this)._eval$1("Null(1)"); } }; P.Stream_length_closure0.prototype = { call$0: function() { this.future._complete$1(this._box_0.count); }, - $signature: 1 + $signature: 0 }; P.StreamSubscription.prototype = {}; P.StreamTransformerBase.prototype = {}; @@ -4941,30 +5888,27 @@ get$_pendingEvents: function() { var t1, _this = this; if ((_this._state & 8) === 0) - return H.assertSubtype(_this._varData, "$is_PendingEvents", _this.$ti, "$as_PendingEvents"); - t1 = _this.$ti; - return H.assertSubtype(H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").get$varData(), "$is_PendingEvents", t1, "$as_PendingEvents"); + return H._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(_this._varData); + t1 = H._instanceType(_this); + return t1._eval$1("_PendingEvents<1>?")._as(t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData()); }, _ensurePendingEvents$0: function() { - var t1, state, _this = this; + var events, t1, _this = this; if ((_this._state & 8) === 0) { - t1 = _this._varData; - if (t1 == null) - t1 = _this._varData = new P._StreamImplEvents(_this.$ti); - return H.assertSubtype(t1, "$is_StreamImplEvents", _this.$ti, "$as_StreamImplEvents"); + events = _this._varData; + if (events == null) + events = _this._varData = new P._StreamImplEvents(H._instanceType(_this)._eval$1("_StreamImplEvents<1>")); + return H._instanceType(_this)._eval$1("_StreamImplEvents<1>")._as(events); } - t1 = _this.$ti; - state = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState"); - state.get$varData(); - return H.assertSubtype(state.get$varData(), "$is_StreamImplEvents", t1, "$as_StreamImplEvents"); + t1 = H._instanceType(_this); + events = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData(); + return t1._eval$1("_StreamImplEvents<1>")._as(events); }, get$_subscription: function() { - var t1, _this = this; - if ((_this._state & 8) !== 0) { - t1 = _this.$ti; - return H.assertSubtype(H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").get$varData(), "$is_ControllerSubscription", t1, "$as_ControllerSubscription"); - } - return H.assertSubtype(_this._varData, "$is_ControllerSubscription", _this.$ti, "$as_ControllerSubscription"); + var varData = this._varData; + if ((this._state & 8) !== 0) + varData = type$._StreamControllerAddStreamState_nullable_Object._as(varData).get$varData(); + return H._instanceType(this)._eval$1("_ControllerSubscription<1>")._as(varData); }, _badEventState$0: function() { if ((this._state & 4) !== 0) @@ -4974,19 +5918,20 @@ _ensureDoneFuture$0: function() { var t1 = this._doneFuture; if (t1 == null) - t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new P._Future($.Zone__current, [null]); + t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new P._Future($.Zone__current, type$._Future_void); return t1; }, add$1: function(_, value) { - var t1, _this = this; - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 0)); - t1 = _this._state; - if (t1 >= 4) + var t2, _this = this, + t1 = H._instanceType(_this); + t1._precomputed1._as(value); + t2 = _this._state; + if (t2 >= 4) throw H.wrapException(_this._badEventState$0()); - if ((t1 & 1) !== 0) + if ((t2 & 1) !== 0) _this._sendData$1(value); - else if ((t1 & 3) === 0) - _this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, _this.$ti)); + else if ((t2 & 3) === 0) + _this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, t1._eval$1("_DelayedData<1>"))); }, close$0: function(_) { var _this = this, @@ -5003,38 +5948,61 @@ return _this._ensureDoneFuture$0(); }, _subscribe$4: function(onData, onError, onDone, cancelOnError) { - var t2, t3, t4, subscription, pendingEvents, addState, _this = this, - t1 = H.getTypeArgumentByIndex(_this, 0); - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); + var t2, t3, t4, t5, t6, subscription, pendingEvents, addState, _this = this, + t1 = H._instanceType(_this); + t1._eval$1("~(1)?")._as(onData); + type$.nullable_void_Function._as(onDone); if ((_this._state & 3) !== 0) throw H.wrapException(P.StateError$("Stream has already been listened to.")); t2 = $.Zone__current; t3 = cancelOnError ? 1 : 0; - t4 = _this.$ti; - subscription = new P._ControllerSubscription(_this, t2, t3, t4); - subscription._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError, t1); + type$.$env_1_1_void._bind$1(t1._precomputed1)._eval$1("1(2)")._as(onData); + t4 = P._BufferingStreamSubscription__registerErrorHandler(t2, onError); + t5 = onDone == null ? P.async___nullDoneHandler$closure() : onDone; + t6 = type$.void_Function; + subscription = new P._ControllerSubscription(_this, onData, t4, t6._as(t5), t2, t3, t1._eval$1("_ControllerSubscription<1>")); pendingEvents = _this.get$_pendingEvents(); - t1 = _this._state |= 1; - if ((t1 & 8) !== 0) { - addState = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t4, "$as_StreamControllerAddStreamState"); + t3 = _this._state |= 1; + if ((t3 & 8) !== 0) { + addState = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData); addState.set$varData(subscription); addState.resume$0(); } else _this._varData = subscription; subscription._setPendingEvents$1(pendingEvents); - subscription._guardCallback$1(new P._StreamController__subscribe_closure(_this)); + t1 = t6._as(new P._StreamController__subscribe_closure(_this)); + t2 = subscription._state; + subscription._state = t2 | 32; + t1.call$0(); + subscription._state &= 4294967263; + subscription._checkState$1((t2 & 4) !== 0); return subscription; }, _recordCancel$1: function(subscription) { - var result, _this = this, - t1 = _this.$ti; - H.assertSubtype(subscription, "$isStreamSubscription", t1, "$asStreamSubscription"); + var result, onCancel, cancelResult, e, s, exception, result0, _this = this, + t1 = H._instanceType(_this); + t1._eval$1("StreamSubscription<1>")._as(subscription); result = null; if ((_this._state & 8) !== 0) - result = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").cancel$0(); + result = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).cancel$0(); _this._varData = null; _this._state = _this._state & 4294967286 | 2; + onCancel = _this.onCancel; + if (onCancel != null) + if (result == null) + try { + cancelResult = onCancel.call$0(); + if (type$.Future_void._is(cancelResult)) + result = cancelResult; + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + result0 = new P._Future($.Zone__current, type$._Future_void); + result0._asyncCompleteError$2(e, s); + result = result0; + } + else + result = result.whenComplete$1(onCancel); t1 = new P._StreamController__recordCancel_complete(_this); if (result != null) result = result.whenComplete$1(t1); @@ -5050,21 +6018,21 @@ call$0: function() { P._runGuarded(this.$this.onListen); }, - $signature: 1 + $signature: 0 }; P._StreamController__recordCancel_complete.prototype = { call$0: function() { - var t1 = this.$this._doneFuture; - if (t1 != null && t1._state === 0) - t1._asyncComplete$1(null); + var doneFuture = this.$this._doneFuture; + if (doneFuture != null && doneFuture._state === 0) + doneFuture._asyncComplete$1(null); }, - $signature: 0 + $signature: 1 }; P._AsyncStreamControllerDispatch.prototype = { _sendData$1: function(data) { - var t1 = H.getTypeArgumentByIndex(this, 0); - H.assertSubtypeOfRuntimeType(data, t1); - this.get$_subscription()._addPending$1(new P._DelayedData(data, [t1])); + var t1 = this.$ti; + t1._precomputed1._as(data); + this.get$_subscription()._addPending$1(new P._DelayedData(data, t1._eval$1("_DelayedData<1>"))); }, _sendError$2: function(error, stackTrace) { this.get$_subscription()._addPending$1(new P._DelayedError(error, stackTrace)); @@ -5092,95 +6060,37 @@ }, _onPause$0: function() { var t1 = this._controller, - t2 = H.getTypeArgumentByIndex(t1, 0); - H.assertSubtype(this, "$isStreamSubscription", [t2], "$asStreamSubscription"); + t2 = H._instanceType(t1); + t2._eval$1("StreamSubscription<1>")._as(this); if ((t1._state & 8) !== 0) - C.JSNull_methods.pause$0(H.assertSubtype(t1._varData, "$is_StreamControllerAddStreamState", [t2], "$as_StreamControllerAddStreamState")); + t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).pause$0(0); P._runGuarded(t1.onPause); }, _onResume$0: function() { var t1 = this._controller, - t2 = H.getTypeArgumentByIndex(t1, 0); - H.assertSubtype(this, "$isStreamSubscription", [t2], "$asStreamSubscription"); + t2 = H._instanceType(t1); + t2._eval$1("StreamSubscription<1>")._as(this); if ((t1._state & 8) !== 0) - H.assertSubtype(t1._varData, "$is_StreamControllerAddStreamState", [t2], "$as_StreamControllerAddStreamState").resume$0(); + t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).resume$0(); P._runGuarded(t1.onResume); } }; P._StreamSinkWrapper.prototype = {}; P._BufferingStreamSubscription.prototype = { - _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnError, $T) { - var handleError, handleDone, _this = this, - t1 = H.getTypeArgumentByIndex(_this, 0); - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); - _this.set$_onData(H.functionTypeCheck(onData, {func: 1, ret: null, args: [t1]})); - handleError = onError == null ? P.async___nullErrorHandler$closure() : onError; - if (H.functionTypeTest(handleError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]})) - _this._onError = _this._zone.registerBinaryCallback$3$1(handleError, null, P.Object, P.StackTrace); - else if (H.functionTypeTest(handleError, {func: 1, ret: -1, args: [P.Object]})) - _this._onError = H.functionTypeCheck(handleError, {func: 1, ret: null, args: [P.Object]}); - else - H.throwExpression(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); - handleDone = onDone == null ? P.async___nullDoneHandler$closure() : onDone; - _this.set$_onDone(H.functionTypeCheck(handleDone, {func: 1, ret: -1})); - }, _setPendingEvents$1: function(pendingEvents) { var _this = this; - H.assertSubtype(pendingEvents, "$is_PendingEvents", _this.$ti, "$as_PendingEvents"); + H._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(pendingEvents); if (pendingEvents == null) return; _this.set$_pending(pendingEvents); if (pendingEvents.lastPendingEvent != null) { - _this._state = (_this._state | 64) >>> 0; - _this._pending.schedule$1(_this); - } - }, - pause$0: function(_) { - var t2, t3, _this = this, - t1 = _this._state; - if ((t1 & 8) !== 0) - return; - t2 = (t1 + 128 | 4) >>> 0; - _this._state = t2; - if (t1 < 128 && _this._pending != null) { - t3 = _this._pending; - if (t3._state === 1) - t3._state = 3; - } - if ((t1 & 4) === 0 && (t2 & 32) === 0) - _this._guardCallback$1(_this.get$_onPause()); - }, - resume$0: function() { - var _this = this, - t1 = _this._state; - if ((t1 & 8) !== 0) - return; - if (t1 >= 128) { - t1 = _this._state = t1 - 128; - if (t1 < 128) - if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent != null) - _this._pending.schedule$1(_this); - else { - t1 = (t1 & 4294967291) >>> 0; - _this._state = t1; - if ((t1 & 32) === 0) - _this._guardCallback$1(_this.get$_onResume()); - } + _this._state |= 64; + pendingEvents.schedule$1(_this); } }, - cancel$0: function() { - var _this = this, - t1 = (_this._state & 4294967279) >>> 0; - _this._state = t1; - if ((t1 & 8) === 0) - _this._cancel$0(); - t1 = _this._cancelFuture; - return t1 == null ? $.$get$Future__nullFuture() : t1; - }, _cancel$0: function() { var t2, _this = this, - t1 = _this._state = (_this._state | 8) >>> 0; + t1 = _this._state |= 8; if ((t1 & 64) !== 0) { t2 = _this._pending; if (t2._state === 1) @@ -5195,45 +6105,44 @@ _onResume$0: function() { }, _onCancel$0: function() { - return; + return null; }, _addPending$1: function($event) { var _this = this, - t1 = _this.$ti, - pending = H.assertSubtype(_this._pending, "$is_StreamImplEvents", t1, "$as_StreamImplEvents"); - if (pending == null) { - pending = new P._StreamImplEvents(t1); - _this.set$_pending(pending); - } + t1 = H._instanceType(_this), + pending = t1._eval$1("_StreamImplEvents<1>?")._as(_this._pending); + if (pending == null) + pending = new P._StreamImplEvents(t1._eval$1("_StreamImplEvents<1>")); + _this.set$_pending(pending); pending.add$1(0, $event); t1 = _this._state; if ((t1 & 64) === 0) { - t1 = (t1 | 64) >>> 0; + t1 |= 64; _this._state = t1; if (t1 < 128) - _this._pending.schedule$1(_this); + pending.schedule$1(_this); } }, _sendData$1: function(data) { var t2, _this = this, - t1 = H.getTypeArgumentByIndex(_this, 0); - H.assertSubtypeOfRuntimeType(data, t1); + t1 = H._instanceType(_this)._precomputed1; + t1._as(data); t2 = _this._state; - _this._state = (t2 | 32) >>> 0; + _this._state = t2 | 32; _this._zone.runUnaryGuarded$1$2(_this._onData, data, t1); - _this._state = (_this._state & 4294967263) >>> 0; + _this._state &= 4294967263; _this._checkState$1((t2 & 4) !== 0); }, _sendError$2: function(error, stackTrace) { - var _this = this, + var cancelFuture, _this = this, t1 = _this._state, t2 = new P._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); if ((t1 & 1) !== 0) { - _this._state = (t1 | 16) >>> 0; + _this._state = t1 | 16; _this._cancel$0(); - t1 = _this._cancelFuture; - if (t1 != null && t1 !== $.$get$Future__nullFuture()) - t1.whenComplete$1(t2); + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t2); else t2.call$0(); } else { @@ -5242,40 +6151,32 @@ } }, _sendDone$0: function() { - var t2, _this = this, + var cancelFuture, _this = this, t1 = new P._BufferingStreamSubscription__sendDone_sendDone(_this); _this._cancel$0(); - _this._state = (_this._state | 16) >>> 0; - t2 = _this._cancelFuture; - if (t2 != null && t2 !== $.$get$Future__nullFuture()) - t2.whenComplete$1(t1); + _this._state |= 16; + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t1); else t1.call$0(); }, - _guardCallback$1: function(callback) { - var t1, _this = this; - H.functionTypeCheck(callback, {func: 1, ret: -1}); - t1 = _this._state; - _this._state = (t1 | 32) >>> 0; - callback.call$0(); - _this._state = (_this._state & 4294967263) >>> 0; - _this._checkState$1((t1 & 4) !== 0); - }, _checkState$1: function(wasInputPaused) { var t2, isInputPaused, _this = this, t1 = _this._state; if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent == null) { - t1 = _this._state = (t1 & 4294967231) >>> 0; + t1 = _this._state = t1 & 4294967231; if ((t1 & 4) !== 0) if (t1 < 128) { t2 = _this._pending; - t2 = t2 == null || t2.lastPendingEvent == null; + t2 = t2 == null ? null : t2.lastPendingEvent == null; + t2 = t2 !== false; } else t2 = false; else t2 = false; if (t2) { - t1 = (t1 & 4294967291) >>> 0; + t1 &= 4294967291; _this._state = t1; } } @@ -5287,25 +6188,18 @@ isInputPaused = (t1 & 4) !== 0; if (wasInputPaused === isInputPaused) break; - _this._state = (t1 ^ 32) >>> 0; + _this._state = t1 ^ 32; if (isInputPaused) _this._onPause$0(); else _this._onResume$0(); - t1 = (_this._state & 4294967263) >>> 0; - _this._state = t1; + t1 = _this._state &= 4294967263; } if ((t1 & 64) !== 0 && t1 < 128) _this._pending.schedule$1(_this); }, - set$_onData: function(_onData) { - this._onData = H.functionTypeCheck(_onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}); - }, - set$_onDone: function(_onDone) { - this._onDone = H.functionTypeCheck(_onDone, {func: 1, ret: -1}); - }, set$_pending: function(_pending) { - this._pending = H.assertSubtype(_pending, "$is_PendingEvents", this.$ti, "$as_PendingEvents"); + this._pending = H._instanceType(this)._eval$1("_PendingEvents<1>?")._as(_pending); }, $isStreamSubscription: 1, $is_EventDispatch: 1 @@ -5317,18 +6211,18 @@ t2 = t1._state; if ((t2 & 8) !== 0 && (t2 & 16) === 0) return; - t1._state = (t2 | 32) >>> 0; + t1._state = t2 | 32; onError = t1._onError; t2 = this.error; - t3 = P.Object; + t3 = type$.Object; t4 = t1._zone; - if (H.functionTypeTest(onError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]})) - t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, P.StackTrace); + if (type$.void_Function_Object_StackTrace._is(onError)) + t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace); else - t4.runUnaryGuarded$1$2(H.functionTypeCheck(t1._onError, {func: 1, ret: -1, args: [P.Object]}), t2, t3); - t1._state = (t1._state & 4294967263) >>> 0; + t4.runUnaryGuarded$1$2(type$.void_Function_Object._as(onError), t2, t3); + t1._state &= 4294967263; }, - $signature: 0 + $signature: 1 }; P._BufferingStreamSubscription__sendDone_sendDone.prototype = { call$0: function() { @@ -5336,17 +6230,18 @@ t2 = t1._state; if ((t2 & 16) === 0) return; - t1._state = (t2 | 42) >>> 0; + t1._state = t2 | 42; t1._zone.runGuarded$1(t1._onDone); - t1._state = (t1._state & 4294967263) >>> 0; + t1._state &= 4294967263; }, - $signature: 0 + $signature: 1 }; P._StreamImpl.prototype = { listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); - return this._controller._subscribe$4(H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}), onError, onDone, true === cancelOnError); + var t1 = this.$ti; + t1._eval$1("~(1)?")._as(onData); + type$.nullable_void_Function._as(onDone); + return this._controller._subscribe$4(t1._eval$1("~(1)?")._as(onData), onError, onDone, cancelOnError === true); }, listen$1: function(onData) { return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); @@ -5357,7 +6252,7 @@ }; P._DelayedEvent.prototype = { set$next: function(next) { - this.next = H.interceptedTypeCheck(next, "$is_DelayedEvent"); + this.next = type$.nullable__DelayedEvent_dynamic._as(next); }, get$next: function() { return this.next; @@ -5365,14 +6260,12 @@ }; P._DelayedData.prototype = { perform$1: function(dispatch) { - H.assertSubtype(dispatch, "$is_EventDispatch", this.$ti, "$as_EventDispatch")._sendData$1(this.value); + this.$ti._eval$1("_EventDispatch<1>")._as(dispatch)._sendData$1(this.value); } }; P._DelayedError.prototype = { perform$1: function(dispatch) { dispatch._sendError$2(this.error, this.stackTrace); - }, - $as_DelayedEvent: function() { } }; P._DelayedDone.prototype = { @@ -5380,19 +6273,17 @@ dispatch._sendDone$0(); }, get$next: function() { - return; + return null; }, set$next: function(_) { throw H.wrapException(P.StateError$("No events after a done.")); }, - $is_DelayedEvent: 1, - $as_DelayedEvent: function() { - } + $is_DelayedEvent: 1 }; P._PendingEvents.prototype = { schedule$1: function(dispatch) { var t1, _this = this; - H.assertSubtype(dispatch, "$is_EventDispatch", _this.$ti, "$as_EventDispatch"); + _this.$ti._eval$1("_EventDispatch<1>")._as(dispatch); t1 = _this._state; if (t1 === 1) return; @@ -5406,211 +6297,137 @@ }; P._PendingEvents_schedule_closure.prototype = { call$0: function() { - var t2, $event, t3, + var t2, $event, nextEvent, t1 = this.$this, oldState = t1._state; t1._state = 0; if (oldState === 3) return; - t2 = H.assertSubtype(this.dispatch, "$is_EventDispatch", [H.getTypeArgumentByIndex(t1, 0)], "$as_EventDispatch"); + t2 = t1.$ti._eval$1("_EventDispatch<1>")._as(this.dispatch); $event = t1.firstPendingEvent; - t3 = $event.get$next(); - t1.firstPendingEvent = t3; - if (t3 == null) + nextEvent = $event.get$next(); + t1.firstPendingEvent = nextEvent; + if (nextEvent == null) t1.lastPendingEvent = null; $event.perform$1(t2); }, - $signature: 1 + $signature: 0 }; P._StreamImplEvents.prototype = { add$1: function(_, $event) { var _this = this, - t1 = _this.lastPendingEvent; - if (t1 == null) + lastEvent = _this.lastPendingEvent; + if (lastEvent == null) _this.firstPendingEvent = _this.lastPendingEvent = $event; else { - t1.set$next($event); + lastEvent.set$next($event); _this.lastPendingEvent = $event; } } }; - P._StreamIterator.prototype = { - get$current: function() { - var _this = this; - if (_this._subscription != null && _this._isPaused) - return H.assertSubtypeOfRuntimeType(_this._stateData, H.getTypeArgumentByIndex(_this, 0)); - return; - }, - moveNext$0: function() { - var future, _this = this, - t1 = _this._subscription; - if (t1 != null) { - if (_this._isPaused) { - future = new P._Future($.Zone__current, [P.bool]); - _this._stateData = future; - _this._isPaused = false; - t1.resume$0(); - return future; - } - throw H.wrapException(P.StateError$("Already waiting for next.")); - } - return _this._initializeOrDone$0(); - }, - _initializeOrDone$0: function() { - var _this = this, - stateData = _this._stateData; - if (stateData != null) { - _this._subscription = H.assertSubtype(stateData, "$isStream", _this.$ti, "$asStream").listen$4$cancelOnError$onDone$onError(_this.get$_onData(), true, _this.get$_onDone(), _this.get$_onError()); - return _this._stateData = new P._Future($.Zone__current, [P.bool]); - } - return $.$get$Future__falseFuture(); - }, - cancel$0: function() { - var _this = this, - subscription = H.assertSubtype(_this._subscription, "$isStreamSubscription", _this.$ti, "$asStreamSubscription"), - stateData = _this._stateData; - _this._stateData = null; - if (subscription != null) { - _this._subscription = null; - if (!_this._isPaused) - H.assertSubtype(stateData, "$is_Future", [P.bool], "$as_Future")._asyncComplete$1(false); - return subscription.cancel$0(); - } - return $.$get$Future__nullFuture(); - }, - _onData$1: function(data) { - var moveNextFuture, t1, _this = this; - H.assertSubtypeOfRuntimeType(data, H.getTypeArgumentByIndex(_this, 0)); - moveNextFuture = H.assertSubtype(_this._stateData, "$is_Future", [P.bool], "$as_Future"); - _this._stateData = data; - _this._isPaused = true; - moveNextFuture._complete$1(true); - t1 = _this._subscription; - if (t1 != null && _this._isPaused) - t1.pause$0(0); - }, - _onError$2: function(error, stackTrace) { - var moveNextFuture; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - moveNextFuture = H.assertSubtype(this._stateData, "$is_Future", [P.bool], "$as_Future"); - this._stateData = this._subscription = null; - moveNextFuture._completeError$2(error, stackTrace); - }, - _onError$1: function(error) { - return this._onError$2(error, null); - }, - _onDone$0: function() { - var moveNextFuture = H.assertSubtype(this._stateData, "$is_Future", [P.bool], "$as_Future"); - this._stateData = this._subscription = null; - moveNextFuture._complete$1(false); - } - }; + P._StreamIterator.prototype = {}; P.AsyncError.prototype = { toString$0: function(_) { return H.S(this.error); }, - $isError: 1 + $isError: 1, + get$stackTrace: function() { + return this.stackTrace; + } }; P._Zone.prototype = {$isZone: 1}; P._rootHandleUncaughtError_closure.prototype = { call$0: function() { - var error, - t1 = this._box_0, - t2 = t1.error; - t1 = t2 == null ? t1.error = new P.NullThrownError() : t2; - t2 = this.stackTrace; - if (t2 == null) - throw H.wrapException(t1); - error = H.wrapException(t1); - error.stack = t2.toString$0(0); + var error = H.wrapException(this.error); + error.stack = J.toString$0$(this.stackTrace); throw error; }, - $signature: 1 + $signature: 0 }; P._RootZone.prototype = { runGuarded$1: function(f) { var e, s, exception, _null = null; - H.functionTypeCheck(f, {func: 1, ret: -1}); + type$.void_Function._as(f); try { if (C.C__RootZone === $.Zone__current) { f.call$0(); return; } - P._rootRun(_null, _null, this, f, -1); + P._rootRun(_null, _null, this, f, type$.void); } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s)); } }, runUnaryGuarded$1$2: function(f, arg, $T) { var e, s, exception, _null = null; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}); - H.assertSubtypeOfRuntimeType(arg, $T); + $T._eval$1("~(0)")._as(f); + $T._as(arg); try { if (C.C__RootZone === $.Zone__current) { f.call$1(arg); return; } - P._rootRunUnary(_null, _null, this, f, arg, -1, $T); + P._rootRunUnary(_null, _null, this, f, arg, type$.void, $T); } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s)); } }, runBinaryGuarded$2$3: function(f, arg1, arg2, T1, T2) { var e, s, exception, _null = null; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [T1, T2]}); - H.assertSubtypeOfRuntimeType(arg1, T1); - H.assertSubtypeOfRuntimeType(arg2, T2); + T1._eval$1("@<0>")._bind$1(T2)._eval$1("~(1,2)")._as(f); + T1._as(arg1); + T2._as(arg2); try { if (C.C__RootZone === $.Zone__current) { f.call$2(arg1, arg2); return; } - P._rootRunBinary(_null, _null, this, f, arg1, arg2, -1, T1, T2); + P._rootRunBinary(_null, _null, this, f, arg1, arg2, type$.void, T1, T2); } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s)); } }, bindCallback$1$1: function(f, $R) { - return new P._RootZone_bindCallback_closure(this, H.functionTypeCheck(f, {func: 1, ret: $R}), $R); + return new P._RootZone_bindCallback_closure(this, $R._eval$1("0()")._as(f), $R); }, bindCallbackGuarded$1: function(f) { - return new P._RootZone_bindCallbackGuarded_closure(this, H.functionTypeCheck(f, {func: 1, ret: -1})); + return new P._RootZone_bindCallbackGuarded_closure(this, type$.void_Function._as(f)); }, bindUnaryCallbackGuarded$1$1: function(f, $T) { - return new P._RootZone_bindUnaryCallbackGuarded_closure(this, H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}), $T); + return new P._RootZone_bindUnaryCallbackGuarded_closure(this, $T._eval$1("~(0)")._as(f), $T); }, $index: function(_, key) { - return; + return null; }, run$1$1: function(f, $R) { - H.functionTypeCheck(f, {func: 1, ret: $R}); + $R._eval$1("0()")._as(f); if ($.Zone__current === C.C__RootZone) return f.call$0(); return P._rootRun(null, null, this, f, $R); }, runUnary$2$2: function(f, arg, $R, $T) { - H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]}); - H.assertSubtypeOfRuntimeType(arg, $T); + $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f); + $T._as(arg); if ($.Zone__current === C.C__RootZone) return f.call$1(arg); return P._rootRunUnary(null, null, this, f, arg, $R, $T); }, runBinary$3$3: function(f, arg1, arg2, $R, T1, T2) { - H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); - H.assertSubtypeOfRuntimeType(arg1, T1); - H.assertSubtypeOfRuntimeType(arg2, T2); + $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); + T1._as(arg1); + T2._as(arg2); if ($.Zone__current === C.C__RootZone) return f.call$2(arg1, arg2); return P._rootRunBinary(null, null, this, f, arg1, arg2, $R, T1, T2); }, registerBinaryCallback$3$1: function(f, $R, T1, T2) { - return H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); + return $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); } }; P._RootZone_bindCallback_closure.prototype = { @@ -5618,27 +6435,27 @@ return this.$this.run$1$1(this.f, this.R); }, $signature: function() { - return {func: 1, ret: this.R}; + return this.R._eval$1("0()"); } }; P._RootZone_bindCallbackGuarded_closure.prototype = { call$0: function() { return this.$this.runGuarded$1(this.f); }, - $signature: 0 + $signature: 1 }; P._RootZone_bindUnaryCallbackGuarded_closure.prototype = { call$1: function(arg) { var t1 = this.T; - return this.$this.runUnaryGuarded$1$2(this.f, H.assertSubtypeOfRuntimeType(arg, t1), t1); + return this.$this.runUnaryGuarded$1$2(this.f, t1._as(arg), t1); }, $signature: function() { - return {func: 1, ret: -1, args: [this.T]}; + return this.T._eval$1("~(0)"); } }; P.ListMixin.prototype = { get$iterator: function(receiver) { - return new H.ListIterator(receiver, this.get$length(receiver), [H.getRuntimeTypeArgumentIntercepted(this, receiver, "ListMixin", 0)]); + return new H.ListIterator(receiver, this.get$length(receiver), H.instanceType(receiver)._eval$1("ListIterator")); }, elementAt$1: function(receiver, index) { return this.$index(receiver, index); @@ -5647,14 +6464,17 @@ return this.get$length(receiver) !== 0; }, $add: function(receiver, other) { - var result, _this = this, - t1 = [H.getRuntimeTypeArgumentIntercepted(_this, receiver, "ListMixin", 0)]; - H.assertSubtype(other, "$isList", t1, "$asList"); - result = H.setRuntimeTypeInfo([], t1); - C.JSArray_methods.set$length(result, C.JSInt_methods.$add(_this.get$length(receiver), other.get$length(other))); - C.JSArray_methods.setRange$3(result, 0, _this.get$length(receiver), receiver); - C.JSArray_methods.setRange$3(result, _this.get$length(receiver), result.length, other); - return result; + var t2, cur, + t1 = H.instanceType(receiver); + t1._eval$1("List")._as(other); + t2 = H.setRuntimeTypeInfo([], t1._eval$1("JSArray")); + for (t1 = new H.ListIterator(receiver, this.get$length(receiver), t1._eval$1("ListIterator")); t1.moveNext$0();) { + cur = t1.__internal$_current; + C.JSArray_methods.add$1(t2, cur); + } + for (t1 = other.get$iterator(other); t1.moveNext$0();) + C.JSArray_methods.add$1(t2, t1.get$current()); + return t2; }, toString$0: function(receiver) { return P.IterableBase_iterableToFullString(receiver, "[", "]"); @@ -5673,15 +6493,15 @@ t1._contents = t2 + ": "; t1._contents += H.S(v); }, - $signature: 5 + $signature: 7 }; P.MapMixin.prototype = { forEach$1: function(_, action) { - var t1, key, _this = this; - H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getRuntimeTypeArgument(_this, "MapMixin", 0), H.getRuntimeTypeArgument(_this, "MapMixin", 1)]}); - for (t1 = _this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + var t1, key; + H._instanceType(this)._eval$1("~(MapMixin.K,MapMixin.V)")._as(action); + for (t1 = this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) { key = t1.get$current(); - action.call$2(key, _this.$index(0, key)); + action.call$2(key, this.$index(0, key)); } }, get$length: function(_) { @@ -5703,7 +6523,7 @@ return this._collection$_map.$index(0, key); }, forEach$1: function(_, action) { - this._collection$_map.forEach$1(0, H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentByIndex(this, 1)]})); + this._collection$_map.forEach$1(0, H._instanceType(this)._eval$1("~(1,2)")._as(action)); }, get$isEmpty: function(_) { return this._collection$_map.__js_helper$_length === 0; @@ -5724,8 +6544,8 @@ t1 = this._processed; if (t1 == null) return this._data.$index(0, key); - else if (typeof key !== "string") - return; + else if (typeof key != "string") + return null; else { result = t1[key]; return typeof result == "undefined" ? this._process$1(key) : result; @@ -5740,13 +6560,13 @@ get$keys: function() { if (this._processed == null) { var t1 = this._data; - return new H.LinkedHashMapKeyIterable(t1, [H.getTypeArgumentByIndex(t1, 0)]); + return new H.LinkedHashMapKeyIterable(t1, H._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); } return new P._JsonMapKeyIterable(this); }, forEach$1: function(_, f) { var keys, i, key, value, _this = this; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [P.String,,]}); + type$.void_Function_String_dynamic._as(f); if (_this._processed == null) return _this._data.forEach$1(0, f); keys = _this._computeKeys$0(); @@ -5763,23 +6583,17 @@ } }, _computeKeys$0: function() { - var keys = H.listTypeCheck(this._data); + var keys = type$.nullable_List_dynamic._as(this._data); if (keys == null) - keys = this._data = H.setRuntimeTypeInfo(Object.keys(this._original), [P.String]); + keys = this._data = H.setRuntimeTypeInfo(Object.keys(this._original), type$.JSArray_String); return keys; }, _process$1: function(key) { var result; if (!Object.prototype.hasOwnProperty.call(this._original, key)) - return; + return null; result = P._convertJsonToDartLazy(this._original[key]); return this._processed[key] = result; - }, - $asMapMixin: function() { - return [P.String, null]; - }, - $asMap: function() { - return [P.String, null]; } }; P._JsonMapKeyIterable.prototype = { @@ -5793,7 +6607,7 @@ t1 = t1.get$keys().elementAt$1(0, index); else { t1 = t1._computeKeys$0(); - if (index < 0 || index >= t1.length) + if (index >= t1.length) return H.ioore(t1, index); t1 = t1[index]; } @@ -5806,15 +6620,9 @@ t1 = t1.get$iterator(t1); } else { t1 = t1._computeKeys$0(); - t1 = new J.ArrayIterator(t1, t1.length, [H.getTypeArgumentByIndex(t1, 0)]); + t1 = new J.ArrayIterator(t1, t1.length, H._arrayInstanceType(t1)._eval$1("ArrayIterator<1>")); } return t1; - }, - $asListIterable: function() { - return [P.String]; - }, - $asIterable: function() { - return [P.String]; } }; P.Codec.prototype = {}; @@ -5832,11 +6640,15 @@ }; P.JsonCodec.prototype = { decode$2$reviver: function(_, source, reviver) { - var t1 = P._parseJson(source, this.get$decoder()._reviver); + var t1; + type$.nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object._as(reviver); + t1 = P._parseJson(source, this.get$decoder()._reviver); return t1; }, encode$2$toEncodable: function(value, toEncodable) { - var t1 = P._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); + var t1; + type$.nullable_nullable_Object_Function_dynamic._as(toEncodable); + t1 = P._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); return t1; }, get$encoder: function() { @@ -5844,29 +6656,49 @@ }, get$decoder: function() { return C.JsonDecoder_null; - }, - $asCodec: function() { - return [P.Object, P.String]; - } - }; - P.JsonEncoder.prototype = { - $asConverter: function() { - return [P.Object, P.String]; - } - }; - P.JsonDecoder.prototype = { - $asConverter: function() { - return [P.String, P.Object]; } }; + P.JsonEncoder.prototype = {}; + P.JsonDecoder.prototype = {}; P._JsonStringifier.prototype = { writeStringContent$1: function(s) { - var t1, t2, offset, i, charCode, t3, + var t1, t2, offset, i, charCode, t3, t4, $length = s.length; for (t1 = J.getInterceptor$s(s), t2 = this._sink, offset = 0, i = 0; i < $length; ++i) { charCode = t1._codeUnitAt$1(s, i); - if (charCode > 92) + if (charCode > 92) { + if (charCode >= 55296) { + t3 = charCode & 64512; + if (t3 === 55296) { + t4 = i + 1; + t4 = !(t4 < $length && (C.JSString_methods._codeUnitAt$1(s, t4) & 64512) === 56320); + } else + t4 = false; + if (!t4) + if (t3 === 56320) { + t3 = i - 1; + t3 = !(t3 >= 0 && (C.JSString_methods.codeUnitAt$1(s, t3) & 64512) === 55296); + } else + t3 = false; + else + t3 = true; + if (t3) { + if (i > offset) + t2._contents += C.JSString_methods.substring$2(s, offset, i); + offset = i + 1; + t2._contents += H.Primitives_stringFromCharCode(92); + t2._contents += H.Primitives_stringFromCharCode(117); + t2._contents += H.Primitives_stringFromCharCode(100); + t3 = charCode >>> 8 & 15; + t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + t3 = charCode >>> 4 & 15; + t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + t3 = charCode & 15; + t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + } + } continue; + } if (charCode < 32) { if (i > offset) t2._contents += C.JSString_methods.substring$2(s, offset, i); @@ -5943,7 +6775,7 @@ }, writeJsonValue$1: function(object) { var t1, success, _this = this; - if (typeof object === "number") { + if (typeof object == "number") { if (!isFinite(object)) return false; _this._sink._contents += C.JSNumber_methods.toString$0(object); @@ -5957,33 +6789,30 @@ } else if (object == null) { _this._sink._contents += "null"; return true; - } else if (typeof object === "string") { + } else if (typeof object == "string") { t1 = _this._sink; t1._contents += '"'; _this.writeStringContent$1(object); t1._contents += '"'; return true; - } else { - t1 = J.getInterceptor$(object); - if (!!t1.$isList) { - _this._checkCycle$1(object); - _this.writeList$1(object); - t1 = _this._seen; - if (0 >= t1.length) - return H.ioore(t1, -1); - t1.pop(); - return true; - } else if (!!t1.$isMap) { - _this._checkCycle$1(object); - success = _this.writeMap$1(object); - t1 = _this._seen; - if (0 >= t1.length) - return H.ioore(t1, -1); - t1.pop(); - return success; - } else - return false; - } + } else if (type$.List_dynamic._is(object)) { + _this._checkCycle$1(object); + _this.writeList$1(object); + t1 = _this._seen; + if (0 >= t1.length) + return H.ioore(t1, -1); + t1.pop(); + return true; + } else if (type$.Map_dynamic_dynamic._is(object)) { + _this._checkCycle$1(object); + success = _this.writeMap$1(object); + t1 = _this._seen; + if (0 >= t1.length) + return H.ioore(t1, -1); + t1.pop(); + return success; + } else + return false; }, writeList$1: function(list) { var t2, i, @@ -6000,45 +6829,43 @@ t1._contents += "]"; }, writeMap$1: function(map) { - var t1, keyValueList, i, t2, separator, t3, _this = this, _box_0 = {}; + var keyValueList, i, t1, separator, t2, _this = this, _box_0 = {}; if (map.get$isEmpty(map)) { _this._sink._contents += "{}"; return true; } - t1 = map.get$length(map) * 2; - keyValueList = new Array(t1); - keyValueList.fixed$length = Array; + keyValueList = P.List_List$filled(map.get$length(map) * 2, null, type$.nullable_Object); i = _box_0.i = 0; _box_0.allStringKeys = true; map.forEach$1(0, new P._JsonStringifier_writeMap_closure(_box_0, keyValueList)); if (!_box_0.allStringKeys) return false; - t2 = _this._sink; - t2._contents += "{"; - for (separator = '"'; i < t1; i += 2, separator = ',"') { - t2._contents += separator; - _this.writeStringContent$1(H.stringTypeCheck(keyValueList[i])); - t2._contents += '":'; - t3 = i + 1; - if (t3 >= t1) - return H.ioore(keyValueList, t3); - _this.writeObject$1(keyValueList[t3]); - } - t2._contents += "}"; + t1 = _this._sink; + t1._contents += "{"; + for (separator = '"'; i < keyValueList.length; i += 2, separator = ',"') { + t1._contents += separator; + _this.writeStringContent$1(H._asStringS(keyValueList[i])); + t1._contents += '":'; + t2 = i + 1; + if (t2 >= keyValueList.length) + return H.ioore(keyValueList, t2); + _this.writeObject$1(keyValueList[t2]); + } + t1._contents += "}"; return true; } }; P._JsonStringifier_writeMap_closure.prototype = { call$2: function(key, value) { var t1, t2; - if (typeof key !== "string") + if (typeof key != "string") this._box_0.allStringKeys = false; t1 = this.keyValueList; t2 = this._box_0; C.JSArray_methods.$indexSet(t1, t2.i++, key); C.JSArray_methods.$indexSet(t1, t2.i++, value); }, - $signature: 5 + $signature: 7 }; P._JsonStringStringifier.prototype = { get$_partialResult: function() { @@ -6048,14 +6875,14 @@ }; P._symbolMapToStringMap_closure.prototype = { call$2: function(key, value) { - this.result.$indexSet(0, H.interceptedTypeCheck(key, "$isSymbol").__internal$_name, value); + this.result.$indexSet(0, type$.Symbol._as(key).__internal$_name, value); }, $signature: 8 }; P.NoSuchMethodError_toString_closure.prototype = { call$2: function(key, value) { var t1, t2, t3; - H.interceptedTypeCheck(key, "$isSymbol"); + type$.Symbol._as(key); t1 = this.sb; t2 = this._box_0; t1._contents += t2.comma; @@ -6066,7 +6893,6 @@ }, $signature: 8 }; - P.bool.prototype = {}; P.DateTime.prototype = { $eq: function(_, other) { if (other == null) @@ -6092,22 +6918,21 @@ return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms; } }; - P.double.prototype = {}; P.Duration.prototype = { $add: function(_, other) { - return new P.Duration(C.JSInt_methods.$add(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration)); + return new P.Duration(C.JSInt_methods.$add(this._duration, type$.Duration._as(other).get$_duration())); }, $sub: function(_, other) { - return new P.Duration(C.JSInt_methods.$sub(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration)); + return new P.Duration(C.JSInt_methods.$sub(this._duration, type$.Duration._as(other).get$_duration())); }, $lt: function(_, other) { - return C.JSInt_methods.$lt(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration); + return C.JSInt_methods.$lt(this._duration, type$.Duration._as(other).get$_duration()); }, $gt: function(_, other) { - return C.JSInt_methods.$gt(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration); + return C.JSInt_methods.$gt(this._duration, type$.Duration._as(other).get$_duration()); }, $ge: function(_, other) { - return C.JSInt_methods.$ge(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration); + return C.JSInt_methods.$ge(this._duration, type$.Duration._as(other).get$_duration()); }, $eq: function(_, other) { if (other == null) @@ -6153,12 +6978,20 @@ }, $signature: 9 }; - P.Error.prototype = {}; + P.Error.prototype = { + get$stackTrace: function() { + return H.getTraceFromException(this.$thrownJsError); + } + }; P.AssertionError.prototype = { toString$0: function(_) { + var t1 = this.message; + if (t1 != null) + return "Assertion failed: " + P.Error_safeToString(t1); return "Assertion failed"; } }; + P.TypeError.prototype = {}; P.NullThrownError.prototype = { toString$0: function(_) { return "Throw of null."; @@ -6172,12 +7005,12 @@ return ""; }, toString$0: function(_) { - var message, prefix, explanation, errorValue, _this = this, - t1 = _this.name, - nameString = t1 != null ? " (" + t1 + ")" : ""; - t1 = _this.message; - message = t1 == null ? "" : ": " + t1; - prefix = _this.get$_errorName() + nameString + message; + var explanation, errorValue, _this = this, + $name = _this.name, + nameString = $name == null ? "" : " (" + $name + ")", + message = _this.message, + messageString = message == null ? "" : ": " + message, + prefix = _this.get$_errorName() + nameString + messageString; if (!_this._hasValue) return prefix; explanation = _this.get$_errorExplanation(); @@ -6190,20 +7023,17 @@ return "RangeError"; }, get$_errorExplanation: function() { - var explanation, t2, - t1 = this.start; - if (t1 == null) { - t1 = this.end; - explanation = t1 != null ? ": Not less than or equal to " + H.S(t1) : ""; - } else { - t2 = this.end; - if (t2 == null) - explanation = ": Not greater than or equal to " + H.S(t1); - else if (t2 > t1) - explanation = ": Not in range " + H.S(t1) + ".." + H.S(t2) + ", inclusive"; - else - explanation = t2 < t1 ? ": Valid value range is empty" : ": Only valid value is " + H.S(t1); - } + var explanation, + start = this.start, + end = this.end; + if (start == null) + explanation = end != null ? ": Not less than or equal to " + H.S(end) : ""; + else if (end == null) + explanation = ": Not greater than or equal to " + H.S(start); + else if (end > start) + explanation = ": Not in inclusive range " + H.S(start) + ".." + H.S(end); + else + explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + H.S(start); return explanation; } }; @@ -6213,7 +7043,7 @@ }, get$_errorExplanation: function() { var t1, - invalidValue = H.intTypeCheck(this.invalidValue); + invalidValue = H._asIntS(this.invalidValue); if (typeof invalidValue !== "number") return invalidValue.$lt(); if (invalidValue < 0) @@ -6229,13 +7059,14 @@ }; P.NoSuchMethodError.prototype = { toString$0: function(_) { - var t1, t2, _i, t3, t4, argument, receiverText, actualParameters, _this = this, _box_0 = {}, + var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {}, sb = new P.StringBuffer(""); _box_0.comma = ""; - for (t1 = _this._core$_arguments, t2 = t1.length, _i = 0, t3 = "", t4 = ""; _i < t2; ++_i, t4 = ", ") { - argument = t1[_i]; - sb._contents = t3 + t4; - t3 = sb._contents += P.Error_safeToString(argument); + $arguments = _this._core$_arguments; + for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { + argument = $arguments[_i]; + sb._contents = t2 + t3; + t2 = sb._contents += P.Error_safeToString(argument); _box_0.comma = ", "; } _this._namedArguments.forEach$1(0, new P.NoSuchMethodError_toString_closure(_box_0, sb)); @@ -6252,8 +7083,8 @@ }; P.UnimplementedError.prototype = { toString$0: function(_) { - var t1 = this.message; - return t1 != null ? "UnimplementedError: " + t1 : "UnimplementedError"; + var message = this.message; + return message != null ? "UnimplementedError: " + message : "UnimplementedError"; } }; P.StateError.prototype = { @@ -6273,18 +7104,24 @@ toString$0: function(_) { return "Out of Memory"; }, + get$stackTrace: function() { + return null; + }, $isError: 1 }; P.StackOverflowError.prototype = { toString$0: function(_) { return "Stack Overflow"; }, + get$stackTrace: function() { + return null; + }, $isError: 1 }; P.CyclicInitializationError.prototype = { toString$0: function(_) { - var t1 = this.variableName; - return t1 == null ? "Reading static variable during its initialization" : "Reading static variable '" + t1 + "' during its initialization"; + var variableName = this.variableName; + return variableName == null ? "Reading static variable during its initialization" : "Reading static variable '" + variableName + "' during its initialization"; } }; P._Exception.prototype = { @@ -6294,13 +7131,12 @@ }; P.FormatException.prototype = { toString$0: function(_) { - var t1 = this.message, - report = "" !== t1 ? "FormatException: " + t1 : "FormatException", + var message = this.message, + report = message != null && "" !== message ? "FormatException: " + H.S(message) : "FormatException", offset = this.offset; return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report; } }; - P.int.prototype = {}; P.Iterable.prototype = { get$length: function(_) { var count, @@ -6311,7 +7147,6 @@ }, elementAt$1: function(_, index) { var t1, elementIndex, element; - P.RangeError_checkNotNegative(index, "index"); for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { element = t1.get$current(); if (index === elementIndex) @@ -6324,16 +7159,14 @@ return P.IterableBase_iterableToShortString(this, "(", ")"); } }; - P.List.prototype = {$isIterable: 1}; P.Null.prototype = { get$hashCode: function(_) { - return P.Object.prototype.get$hashCode.call(this, this); + return P.Object.prototype.get$hashCode.call(C.JSNull_methods, this); }, toString$0: function(_) { return "null"; } }; - P.num.prototype = {}; P.Object.prototype = {constructor: P.Object, $isObject: 1, $eq: function(_, other) { return this === other; @@ -6345,15 +7178,19 @@ return "Instance of '" + H.S(H.Primitives_objectTypeName(this)) + "'"; }, noSuchMethod$1: function(_, invocation) { - H.interceptedTypeCheck(invocation, "$isInvocation"); + type$.Invocation._as(invocation); throw H.wrapException(P.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); }, toString: function() { return this.toString$0(this); } }; - P.StackTrace.prototype = {}; - P.String.prototype = {$isPattern: 1}; + P._StringStackTrace.prototype = { + toString$0: function(_) { + return ""; + }, + $isStackTrace: 1 + }; P.StringBuffer.prototype = { get$length: function(_) { return this._contents.length; @@ -6364,7 +7201,6 @@ }, $isStringSink: 1 }; - P.Symbol.prototype = {}; W.HtmlElement.prototype = {}; W.AnchorElement.prototype = { toString$0: function(receiver) { @@ -6386,7 +7222,7 @@ return receiver.localName; }, get$onClick: function(receiver) { - return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]); + return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent); }, $isElement: 1 }; @@ -6394,7 +7230,7 @@ W.EventSource.prototype = {$isEventSource: 1}; W.EventTarget.prototype = { addEventListener$3: function(receiver, type, listener, useCapture) { - H.functionTypeCheck(listener, {func: 1, args: [W.Event]}); + type$.nullable_dynamic_Function_Event._as(listener); if (listener != null) this._addEventListener$3(receiver, type, listener, useCapture); }, @@ -6402,10 +7238,7 @@ return this.addEventListener$3($receiver, type, listener, null); }, _addEventListener$3: function(receiver, type, listener, options) { - return receiver.addEventListener(type, H.convertDartClosureToJS(H.functionTypeCheck(listener, {func: 1, args: [W.Event]}), 1), options); - }, - _removeEventListener$3: function(receiver, type, listener, options) { - return receiver.removeEventListener(type, H.convertDartClosureToJS(H.functionTypeCheck(listener, {func: 1, args: [W.Event]}), 1), false); + return receiver.addEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), options); }, $isEventTarget: 1 }; @@ -6418,16 +7251,18 @@ open$3$async: function(receiver, method, url, async) { return receiver.open(method, url, true); }, + set$withCredentials: function(receiver, value) { + receiver.withCredentials = true; + }, $isHttpRequest: 1 }; W.HttpRequest_request_closure.prototype = { call$1: function(e) { var t1, t2, accepted, unknownRedirect, t3; - H.interceptedTypeCheck(e, "$isProgressEvent"); + type$.ProgressEvent._as(e); t1 = this.xhr; t2 = t1.status; - if (typeof t2 !== "number") - return t2.$ge(); + t2.toString; accepted = t2 >= 200 && t2 < 300; unknownRedirect = t2 > 307 && t2 < 400; t2 = accepted || t2 === 0 || t2 === 304 || unknownRedirect; @@ -6455,63 +7290,20 @@ } }; W.UIEvent.prototype = {}; + W.EventStreamProvider.prototype = {}; W._EventStream.prototype = { listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { - var t1 = H.getTypeArgumentByIndex(this, 0); - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); - return W._EventStreamSubscription$(this._target, this._eventType, onData, false, t1); + var t1 = H._instanceType(this); + t1._eval$1("~(1)?")._as(onData); + type$.nullable_void_Function._as(onDone); + return W._EventStreamSubscription$(this._target, this._eventType, onData, false, t1._precomputed1); } }; W._ElementEventStreamImpl.prototype = {}; - W._EventStreamSubscription.prototype = { - cancel$0: function() { - var _this = this; - if (_this._target == null) - return; - _this._unlisten$0(); - _this._target = null; - _this.set$_html$_onData(null); - return; - }, - pause$0: function(_) { - if (this._target == null) - return; - ++this._pauseCount; - this._unlisten$0(); - }, - resume$0: function() { - var _this = this; - if (_this._target == null || _this._pauseCount <= 0) - return; - --_this._pauseCount; - _this._tryResume$0(); - }, - _tryResume$0: function() { - var _this = this, - t1 = _this._html$_onData; - if (t1 != null && _this._pauseCount <= 0) - J.addEventListener$3$x(_this._target, _this._eventType, t1, false); - }, - _unlisten$0: function() { - var t3, - t1 = this._html$_onData, - t2 = t1 != null; - if (t2) { - t3 = this._target; - t3.toString; - H.functionTypeCheck(t1, {func: 1, args: [W.Event]}); - if (t2) - J._removeEventListener$3$x(t3, this._eventType, t1, false); - } - }, - set$_html$_onData: function(_onData) { - this._html$_onData = H.functionTypeCheck(_onData, {func: 1, args: [W.Event]}); - } - }; + W._EventStreamSubscription.prototype = {}; W._EventStreamSubscription_closure.prototype = { call$1: function(e) { - return this.onData.call$1(H.interceptedTypeCheck(e, "$isEvent")); + return this.onData.call$1(type$.Event._as(e)); }, $signature: 22 }; @@ -6528,14 +7320,14 @@ return $length; }, walk$1: function(e) { - var millisSinceEpoch, t1, proto, slot, copy, l, t2, $length, i, _this = this, _box_0 = {}; + var millisSinceEpoch, t1, proto, slot, copy, t2, l, $length, i, _this = this, _box_0 = {}; if (e == null) return e; - if (typeof e === "boolean") + if (H._isBool(e)) return e; - if (typeof e === "number") + if (typeof e == "number") return e; - if (typeof e === "string") + if (typeof e == "string") return e; if (e instanceof Date) { millisSinceEpoch = e.getTime(); @@ -6545,12 +7337,13 @@ t1 = true; if (t1) H.throwExpression(P.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch)); + P.ArgumentError_checkNotNull(true, "isUtc", type$.bool); return new P.DateTime(millisSinceEpoch, true); } if (e instanceof RegExp) throw H.wrapException(P.UnimplementedError$("structured clone of RegExp")); if (typeof Promise != "undefined" && e instanceof Promise) - return P.promiseToFuture(e, null); + return P.promiseToFuture(e, type$.dynamic); proto = Object.getPrototypeOf(e); if (proto === Object.prototype || proto === null) { slot = _this.findSlot$1(e); @@ -6560,7 +7353,8 @@ copy = _box_0.copy = t1[slot]; if (copy != null) return copy; - copy = P.LinkedHashMap__makeEmpty(); + t2 = type$.dynamic; + copy = P.LinkedHashMap_LinkedHashMap$_empty(t2, t2); _box_0.copy = copy; C.JSArray_methods.$indexSet(t1, slot, copy); _this.forEachJsField$2(e, new P._AcceptStructuredClone_walk_closure(_box_0, _this)); @@ -6603,12 +7397,12 @@ call$2: function(key, value) { this.object[key] = value; }, - $signature: 5 + $signature: 24 }; P._AcceptStructuredCloneDart2Js.prototype = { forEachJsField$2: function(object, action) { var t1, t2, _i, key; - H.functionTypeCheck(action, {func: 1, args: [,,]}); + type$.dynamic_Function_dynamic_dynamic._as(action); for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) { key = t1[_i]; action.call$2(key, object[key]); @@ -6617,7 +7411,7 @@ }; P.promiseToFuture_closure.prototype = { call$1: function(r) { - return this.completer.complete$1(0, H.futureOrCheck(r, {futureOr: 1, type: this.T})); + return this.completer.complete$1(0, this.T._eval$1("0/?")._as(r)); }, $signature: 2 }; @@ -6634,27 +7428,46 @@ }; P.SvgElement.prototype = { get$onClick: function(receiver) { - return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]); + return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent); } }; N.HexCodec.prototype = { get$encoder: function() { return C.C_HexEncoder; - }, - $asCodec: function() { - return [[P.List, P.int], P.String]; } }; R.HexEncoder.prototype = { convert$1: function(bytes) { - H.assertSubtype(bytes, "$isList", [P.int], "$asList"); + type$.legacy_List_legacy_int._as(bytes); return R._convert(bytes, 0, bytes.length); + } + }; + Y.Level.prototype = { + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof Y.Level && this.value === other.value; + }, + $gt: function(_, other) { + type$.legacy_Level._as(other); + return C.JSInt_methods.$gt(this.value, other.get$value(other)); + }, + $ge: function(_, other) { + return this.value >= type$.legacy_Level._as(other).value; + }, + get$hashCode: function(_) { + return this.value; }, - $asConverter: function() { - return [[P.List, P.int], P.String]; + toString$0: function(_) { + return this.name; } }; - N.Logger.prototype = { + L.LogRecord.prototype = { + toString$0: function(_) { + return "[" + this.level.name + "] " + this.loggerName + ": " + this.message; + } + }; + F.Logger.prototype = { get$fullName: function() { var t1 = this.parent, t2 = t1 == null || t1.name === "", @@ -6662,25 +7475,37 @@ return t2 ? t3 : t1.get$fullName() + "." + t3; }, get$level: function() { - return C.Level_INFO_800; + var effectiveLevel, t1; + if (this.parent == null) + effectiveLevel = this._level; + else { + t1 = $.$get$Logger_root(); + effectiveLevel = t1._level; + } + return effectiveLevel; }, log$4: function(logLevel, message, error, stackTrace) { - var t1 = logLevel.value; - if (t1 >= this.get$level().value) { + var record, _this = this, + t1 = logLevel.value; + if (t1 >= _this.get$level().value) { if (t1 >= 2000) { P.StackTrace_current(); logLevel.toString$0(0); } - t1 = this.get$fullName(); + t1 = _this.get$fullName(); Date.now(); $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1; - $.$get$Logger_root()._publish$1(new N.LogRecord(logLevel, message, t1)); + record = new L.LogRecord(logLevel, message, t1); + if (_this.parent == null) + _this._publish$1(record); + else + $.$get$Logger_root()._publish$1(record); } }, _publish$1: function(record) { } }; - N.Logger_Logger_closure.prototype = { + F.Logger_Logger_closure.prototype = { call$0: function() { var dot, $parent, t1, thisName = this.name; @@ -6688,57 +7513,37 @@ H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'")); dot = C.JSString_methods.lastIndexOf$1(thisName, "."); if (dot === -1) - $parent = thisName !== "" ? N.Logger_Logger("") : null; + $parent = thisName !== "" ? F.Logger_Logger("") : null; else { - $parent = N.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); + $parent = F.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); thisName = C.JSString_methods.substring$1(thisName, dot + 1); } - t1 = new N.Logger(thisName, $parent, new H.JsLinkedHashMap([P.String, N.Logger])); - if ($parent != null) + t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger)); + if ($parent == null) + t1._level = C.Level_INFO_800; + else $parent._children.$indexSet(0, thisName, t1); return t1; }, - $signature: 24 - }; - N.Level.prototype = { - $eq: function(_, other) { - if (other == null) - return false; - return other instanceof N.Level && this.value === other.value; - }, - $gt: function(_, other) { - return C.JSInt_methods.$gt(this.value, H.interceptedTypeCheck(other, "$isLevel").value); - }, - $ge: function(_, other) { - return this.value >= H.interceptedTypeCheck(other, "$isLevel").value; - }, - get$hashCode: function(_) { - return this.value; - }, - toString$0: function(_) { - return this.name; - } - }; - N.LogRecord.prototype = { - toString$0: function(_) { - return "[" + this.level.name + "] " + this.loggerName + ": " + H.S(this.message); - } + $signature: 25 }; M.SseClient.prototype = { SseClient$1: function(serverUrl) { - var t1, t2, _this = this, - clientId = F.Uuid$().v1$0(); - _this._eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], P.String, null)); + var t1, t2, t3, t4, _this = this, + clientId = K.Uuid$().v1$0(); + _this._eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); _this._serverUrl = serverUrl + "?sseClientId=" + clientId; t1 = _this._outgoingController; - new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]).listen$2$onDone(_this.get$_onOutgoingMessage(), _this.get$_onOutgoingDone()); + new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$onDone(_this.get$_onOutgoingMessage(), _this.get$_onOutgoingDone()); C.EventSource_methods.addEventListener$2(_this._eventSource, "message", _this.get$_onIncomingMessage()); C.EventSource_methods.addEventListener$2(_this._eventSource, "control", _this.get$_onIncomingControlMessage()); - t1 = W.Event; - t2 = {func: 1, ret: -1, args: [t1]}; - W._EventStreamSubscription$(_this._eventSource, "open", H.functionTypeCheck(new M.SseClient_closure(_this), t2), false, t1); - W._EventStreamSubscription$(_this._eventSource, "error", H.functionTypeCheck(new M.SseClient_closure0(_this), t2), false, t1); - _this._startPostingMessages$0(); + t1 = _this._eventSource; + t2 = type$.nullable_void_Function_legacy_Event; + t3 = t2._as(new M.SseClient_closure(_this)); + type$.nullable_void_Function._as(null); + t4 = type$.legacy_Event; + W._EventStreamSubscription$(t1, "open", t3, false, t4); + W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure0(_this)), false, t4); }, close$0: function(_) { this._eventSource.close(); @@ -6746,41 +7551,26 @@ this._outgoingController.close$0(0); }, _onIncomingControlMessage$1: function(message) { - var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(H.interceptedTypeCast(H.interceptedTypeCheck(message, "$isEvent"), "$isMessageEvent").data, true); + var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true); if (J.$eq$(data, "close")) this.close$0(0); else throw H.wrapException(P.UnsupportedError$('Illegal Control Message "' + H.S(data) + '"')); }, _onIncomingMessage$1: function(message) { - this._incomingController.add$1(0, H.stringTypeCast(C.C_JsonCodec.decode$2$reviver(0, H.stringTypeCast(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(H.interceptedTypeCast(H.interceptedTypeCheck(message, "$isEvent"), "$isMessageEvent").data, true)), null))); + this._incomingController.add$1(0, H._asStringS(C.C_JsonCodec.decode$2$reviver(0, H._asStringS(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true)), null))); }, _onOutgoingDone$0: function() { this.close$0(0); }, _onOutgoingMessage$1: function(message) { - var $async$goto = 0, - $async$completer = P._makeAsyncAwaitCompleter(null), - $async$self = this; - var $async$_onOutgoingMessage$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return P._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$self._messages.add$1(0, message); - // implicit return - return P._asyncReturn(null, $async$completer); - } - }); - return P._asyncStartSync($async$_onOutgoingMessage$1, $async$completer); + return this._onOutgoingMessage$body$SseClient(H._asStringS(message)); }, - _startPostingMessages$0: function() { + _onOutgoingMessage$body$SseClient: function(message) { var $async$goto = 0, - $async$completer = P._makeAsyncAwaitCompleter(null), - $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, message, e, e0, t2, exception, t3, t4, t1, $async$exception, $async$temp1; - var $async$_startPostingMessages$0 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + $async$completer = P._makeAsyncAwaitCompleter(type$.dynamic), + $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, e, e0, e1, exception, t1, encodedMessage, $async$exception; + var $async$_onOutgoingMessage$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) { $async$currentError = $async$result; $async$goto = $async$handler; @@ -6789,79 +7579,46 @@ switch ($async$goto) { case 0: // Function start - t1 = $async$self._messages; - t1 = new P._StreamIterator(new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]), [null]); - $async$handler = 2; - t2 = $async$self._logger; - case 5: - // for condition - $async$temp1 = H; - $async$goto = 7; - return P._asyncAwait(t1.moveNext$0(), $async$_startPostingMessages$0); - case 7: - // returning from await. - if (!$async$temp1.boolConversionCheck($async$result)) { - // goto after for - $async$goto = 6; - break; + encodedMessage = null; + try { + encodedMessage = C.C_JsonCodec.encode$2$toEncodable(message, null); + } catch (exception) { + t1 = H.unwrapException(exception); + if (t1 instanceof P.JsonUnsupportedObjectError) { + e = t1; + $async$self._logger.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null); + } else if (t1 instanceof P.ArgumentError) { + e0 = t1; + $async$self._logger.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null); + } else + throw exception; } - message = t1.get$current(); - $async$handler = 9; - $async$goto = 12; - return P._asyncAwait(W.HttpRequest_request($async$self._serverUrl, "POST", C.C_JsonCodec.encode$2$toEncodable(message, null), true), $async$_startPostingMessages$0); - case 12: + $async$handler = 3; + $async$goto = 6; + return P._asyncAwait(W.HttpRequest_request($async$self._serverUrl + "&messageId=" + ++$async$self._lastMessageId, "POST", encodedMessage, true), $async$_onOutgoingMessage$1); + case 6: // returning from await. - $async$handler = 2; + $async$handler = 1; // goto after finally - $async$goto = 11; + $async$goto = 5; break; - case 9: + case 3: // catch - $async$handler = 8; + $async$handler = 2; $async$exception = $async$currentError; - t3 = H.unwrapException($async$exception); - t4 = J.getInterceptor$(t3); - if (!!t4.$isJsonUnsupportedObjectError) { - e = t3; - t2.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null); - } else if (!!t4.$isArgumentError) { - e0 = t3; - t2.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null); - } else - throw $async$exception; + e1 = H.unwrapException($async$exception); + t1 = "Failed to send " + H.S(message) + ":\n " + H.S(e1); + $async$self._logger.log$4(C.Level_SEVERE_1000, t1, null, null); + $async$self.close$0(0); // goto after finally - $async$goto = 11; - break; - case 8: - // uncaught - // goto uncaught - $async$goto = 2; - break; - case 11: - // after finally - // goto for condition $async$goto = 5; break; - case 6: - // after for - $async$next.push(4); - // goto finally - $async$goto = 3; - break; case 2: // uncaught - $async$next = [1]; - case 3: - // finally - $async$handler = 1; - $async$goto = 13; - return P._asyncAwait(t1.cancel$0(), $async$_startPostingMessages$0); - case 13: - // returning from await. - // goto the next finally handler - $async$goto = $async$next.pop(); + // goto rethrow + $async$goto = 1; break; - case 4: + case 5: // after finally // implicit return return P._asyncReturn(null, $async$completer); @@ -6870,7 +7627,7 @@ return P._asyncRethrow($async$currentError, $async$completer); } }); - return P._asyncStartSync($async$_startPostingMessages$0, $async$completer); + return P._asyncStartSync($async$_onOutgoingMessage$1, $async$completer); } }; M.SseClient_closure.prototype = { @@ -6893,25 +7650,25 @@ }; M.SseClient__closure.prototype = { call$0: function() { - var t3, + var stackTrace, t3, t1 = this.$this, t2 = t1._incomingController, error = this.error; + P.ArgumentError_checkNotNull(error, "error", type$.Object); if (t2._state >= 4) H.throwExpression(t2._badEventState$0()); - if (error == null) - error = new P.NullThrownError(); + stackTrace = P.AsyncError_defaultStackTrace(error); t3 = t2._state; if ((t3 & 1) !== 0) - t2._sendError$2(error, null); + t2._sendError$2(error, stackTrace); else if ((t3 & 3) === 0) - t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, null)); - t1._eventSource.close(); + t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, stackTrace)); + t1.close$0(0); }, - $signature: 1 + $signature: 0 }; R.StreamChannelMixin.prototype = {}; - F.Uuid.prototype = { + K.Uuid.prototype = { Uuid$1$options: function(_box_0) { var t1, t2, i, hex, t3, v1PositionalArgs, v1NamedArgs, _this = this, _s19_ = "v1rngPositionalArgs", @@ -6920,29 +7677,27 @@ _s13_ = "grngNamedArgs", options = _box_0.options; if (!(options != null)) - options = new H.JsLinkedHashMap([P.String, null]); + options = new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_dynamic); _box_0.options = options; t1 = new Array(256); t1.fixed$length = Array; - t2 = P.String; - _this.set$_byteToHex(H.setRuntimeTypeInfo(t1, [t2])); - t1 = P.int; - _this.set$_hexToByte(new H.JsLinkedHashMap([t2, t1])); - for (t1 = [t1], t2 = [P.List, P.int], i = 0; i < 256; ++i) { + _this.set$_byteToHex(H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_String)); + _this.set$_hexToByte(new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_legacy_int)); + for (t1 = type$.JSArray_legacy_int, t2 = type$.HexCodec._eval$1("Codec.S"), i = 0; i < 256; ++i) { hex = H.setRuntimeTypeInfo([], t1); C.JSArray_methods.add$1(hex, i); t3 = _this._byteToHex; - H.assertSubtypeOfRuntimeType(hex, t2); + t2._as(hex); (t3 && C.JSArray_methods).$indexSet(t3, i, C.C_HexCodec.get$encoder().convert$1(hex)); _this._hexToByte.$indexSet(0, _this._byteToHex[i], i); } v1PositionalArgs = _box_0.options.$index(0, _s19_) != null ? _box_0.options.$index(0, _s19_) : []; - v1NamedArgs = _box_0.options.$index(0, _s14_) != null ? H.subtypeCast(_box_0.options.$index(0, _s14_), "$isMap", [P.Symbol, null], "$asMap") : C.Map_empty; - _this._seedBytes = _box_0.options.$index(0, "v1rng") != null ? P.Function_apply(H.interceptedTypeCheck(_box_0.options.$index(0, "v1rng"), "$isFunction"), H.listTypeCheck(v1PositionalArgs), v1NamedArgs) : U.UuidUtil_mathRNG(); + v1NamedArgs = _box_0.options.$index(0, _s14_) != null ? type$.legacy_Map_of_legacy_Symbol_and_dynamic._as(_box_0.options.$index(0, _s14_)) : C.Map_empty; + _this._seedBytes = _box_0.options.$index(0, "v1rng") != null ? P.Function_apply(type$.Function._as(_box_0.options.$index(0, "v1rng")), type$.nullable_List_dynamic._as(v1PositionalArgs), v1NamedArgs) : T.UuidUtil_mathRNG(); if (_box_0.options.$index(0, _s18_) != null) _box_0.options.$index(0, _s18_); if (_box_0.options.$index(0, _s13_) != null) - H.subtypeCast(_box_0.options.$index(0, _s13_), "$isMap", [P.Symbol, null], "$asMap"); + type$.legacy_Map_of_legacy_Symbol_and_dynamic._as(_box_0.options.$index(0, _s13_)); _this._nodeId = [J.$or$bn(J.$index$asx(_this._seedBytes, 0), 1), J.$index$asx(_this._seedBytes, 1), J.$index$asx(_this._seedBytes, 2), J.$index$asx(_this._seedBytes, 3), J.$index$asx(_this._seedBytes, 4), J.$index$asx(_this._seedBytes, 5)]; t1 = J.$shl$n(J.$index$asx(_this._seedBytes, 6), 8); t2 = J.$index$asx(_this._seedBytes, 7); @@ -6951,29 +7706,28 @@ _this._clockSeq = (t1 | t2) & 262143; }, v1$0: function() { - var t2, buf, options, clockSeq, mSecs, nSecs, dt, t3, tl, tmh, node, n, _this = this, + var buf, options, clockSeq, mSecs, nSecs, dt, t2, tl, tmh, node, n, _this = this, _s8_ = "clockSeq", _s5_ = "nSecs", t1 = new Array(16); t1.fixed$length = Array; - t2 = P.int; - buf = H.setRuntimeTypeInfo(t1, [t2]); - options = new H.JsLinkedHashMap([P.String, null]); + buf = H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_int); + options = new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_dynamic); clockSeq = options.$index(0, _s8_) != null ? options.$index(0, _s8_) : _this._clockSeq; mSecs = options.$index(0, "mSecs") != null ? options.$index(0, "mSecs") : Date.now(); nSecs = options.$index(0, _s5_) != null ? options.$index(0, _s5_) : _this._lastNSecs + 1; t1 = J.getInterceptor$n(mSecs); dt = J.$add$ansx(t1.$sub(mSecs, _this._lastMSecs), J.$div$n(J.$sub$n(nSecs, _this._lastNSecs), 10000)); - t3 = J.getInterceptor$n(dt); - if (t3.$lt(dt, 0) && options.$index(0, _s8_) == null) + t2 = J.getInterceptor$n(dt); + if (t2.$lt(dt, 0) && options.$index(0, _s8_) == null) clockSeq = J.$and$bn(J.$add$ansx(clockSeq, 1), 16383); - if ((t3.$lt(dt, 0) || t1.$gt(mSecs, _this._lastMSecs)) && options.$index(0, _s5_) == null) + if ((t2.$lt(dt, 0) || t1.$gt(mSecs, _this._lastMSecs)) && options.$index(0, _s5_) == null) nSecs = 0; if (J.$ge$n(nSecs, 10000)) throw H.wrapException(P.Exception_Exception("uuid.v1(): Can't create more than 10M uuids/sec")); - H.intTypeCheck(mSecs); + H._asIntS(mSecs); _this._lastMSecs = mSecs; - H.intTypeCheck(nSecs); + H._asIntS(nSecs); _this._lastNSecs = nSecs; _this._clockSeq = clockSeq; mSecs += 122192928e5; @@ -6989,11 +7743,11 @@ C.JSArray_methods.$indexSet(buf, 7, tmh >>> 16 & 255); t1 = J.getInterceptor$n(clockSeq); C.JSArray_methods.$indexSet(buf, 8, (t1.$shr(clockSeq, 8) | 128) >>> 0); - C.JSArray_methods.$indexSet(buf, 9, H.intTypeCheck(t1.$and(clockSeq, 255))); + C.JSArray_methods.$indexSet(buf, 9, H._asIntS(t1.$and(clockSeq, 255))); node = options.$index(0, "node") != null ? options.$index(0, "node") : _this._nodeId; for (t1 = J.getInterceptor$asx(node), n = 0; n < 6; ++n) - C.JSArray_methods.$indexSet(buf, 10 + n, H.intTypeCheck(t1.$index(node, n))); - H.assertSubtype(buf, "$isList", [t2], "$asList"); + C.JSArray_methods.$indexSet(buf, 10 + n, H._asIntS(t1.$index(node, n))); + type$.legacy_List_legacy_int._as(buf); t1 = _this._byteToHex; t1 = H.S((t1 && C.JSArray_methods).$index(t1, buf[0])); t2 = _this._byteToHex; @@ -7028,25 +7782,50 @@ return t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[15])); }, set$_byteToHex: function(_byteToHex) { - this._byteToHex = H.assertSubtype(_byteToHex, "$isList", [P.String], "$asList"); + this._byteToHex = type$.legacy_List_legacy_String._as(_byteToHex); }, set$_hexToByte: function(_hexToByte) { - this._hexToByte = H.assertSubtype(_hexToByte, "$isMap", [P.String, P.int], "$asMap"); + this._hexToByte = type$.legacy_Map_of_legacy_String_and_legacy_int._as(_hexToByte); } }; E.main_closure.prototype = { call$1: function(_) { - H.interceptedTypeCheck(_, "$isMouseEvent"); + type$.legacy_MouseEvent._as(_); this.channel._outgoingController.close$0(0); }, - $signature: 25 + $signature: 27 }; E.main_closure0.prototype = { call$1: function(s) { - var t1 = this.channel._outgoingController; - t1.add$1(0, H.assertSubtypeOfRuntimeType(H.stringTypeCheck(s), H.getTypeArgumentByIndex(t1, 0))); + var count, t1, t2, t3, i, t4, t5, lastEvent; + H._asStringS(s); + if (J.startsWith$1$s(s, "send ")) { + count = P.int_parse(C.JSArray_methods.get$last(s.split(" "))); + for (t1 = this.channel._outgoingController, t2 = H._instanceType(t1), t3 = t2._precomputed1, t2 = t2._eval$1("_DelayedData<1>"), i = 0; i < count; ++i) { + t4 = t3._as("" + i); + if (t1._state >= 4) + H.throwExpression(t1._badEventState$0()); + t5 = t1._state; + if ((t5 & 1) !== 0) + t1._sendData$1(t4); + else if ((t5 & 3) === 0) { + t5 = t1._ensurePendingEvents$0(); + t4 = new P._DelayedData(t4, t2); + lastEvent = t5.lastPendingEvent; + if (lastEvent == null) + t5.firstPendingEvent = t5.lastPendingEvent = t4; + else { + lastEvent.set$next(t4); + t5.lastPendingEvent = t4; + } + } + } + } else { + t1 = this.channel._outgoingController; + t1.add$1(0, H._instanceType(t1)._precomputed1._as(s)); + } }, - $signature: 26 + $signature: 28 }; (function aliases() { var _ = J.Interceptor.prototype; @@ -7058,56 +7837,45 @@ (function installTearOffs() { var _static_1 = hunkHelpers._static_1, _static_0 = hunkHelpers._static_0, - _static = hunkHelpers.installStaticTearOff, + _static_2 = hunkHelpers._static_2, _instance = hunkHelpers.installInstanceTearOff, - _instance_0_u = hunkHelpers._instance_0u, - _instance_1_u = hunkHelpers._instance_1u; - _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 6); - _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6); - _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6); - _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); - _static(P, "async___nullErrorHandler$closure", 1, null, ["call$2", "call$1"], ["_nullErrorHandler", function(error) { - return P._nullErrorHandler(error, null); - }], 3, 0); - _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); - _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 3, 0); - _instance(P._Future.prototype, "get$_completeError", 0, 1, function() { - return [null]; - }, ["call$2", "call$1"], ["_completeError$2", "_completeError$1"], 3, 0); - var _; - _instance_0_u(_ = P._ControllerSubscription.prototype, "get$_onPause", "_onPause$0", 0); - _instance_0_u(_, "get$_onResume", "_onResume$0", 0); - _instance_0_u(_ = P._BufferingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0); - _instance_0_u(_, "get$_onResume", "_onResume$0", 0); - _instance_1_u(_ = P._StreamIterator.prototype, "get$_onData", "_onData$1", 20); - _instance(_, "get$_onError", 0, 1, function() { - return [null]; - }, ["call$2", "call$1"], ["_onError$2", "_onError$1"], 3, 0); - _instance_0_u(_, "get$_onDone", "_onDone$0", 0); + _instance_2_u = hunkHelpers._instance_2u, + _instance_1_u = hunkHelpers._instance_1u, + _instance_0_u = hunkHelpers._instance_0u; + _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 3); + _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 3); + _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 3); + _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 1); + _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 6); + _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 1); + _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 18, 0); + _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 6); _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4); + var _; _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 10); _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 10); - _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0); - _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 2); + _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 1); + _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 26); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(P.Object, null); - _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.Symbol0, P.MapView, H.ConstantMap, H.JSInvocationMirror, H.Closure, H.TypeErrorDecoder, P.Error, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P._UnmodifiableMapMixin, P.Codec, P._JsonStringifier, P.bool, P.DateTime, P.num, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.List, P.Null, P.StackTrace, P.String, P.StringBuffer, P.Symbol, P._AcceptStructuredClone, P._JSRandom, N.Logger, N.Level, N.LogRecord, R.StreamChannelMixin, F.Uuid]); + _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.Symbol, P.MapView, H.ConstantMap, H.JSInvocationMirror, H.Closure, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, H._Required, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P._UnmodifiableMapMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, Y.Level, L.LogRecord, F.Logger, R.StreamChannelMixin, K.Uuid]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]); _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); _inherit(J.JSUnmodifiableArray, J.JSArray); _inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]); + _inheritMany(P.Error, [H.LateInitializationErrorImpl, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.NoSuchMethodError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); _inherit(H.EfficientLengthIterable, P.Iterable); _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]); _inherit(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P.MapView); _inherit(P.UnmodifiableMapView, P._UnmodifiableMapView_MapView__UnmodifiableMapMixin); _inherit(H.ConstantMapView, P.UnmodifiableMapView); _inherit(H.ConstantStringMap, H.ConstantMap); - _inheritMany(H.Closure, [H.Primitives_functionNoSuchMethod_closure, H.unwrapException_saveStackTrace, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncComplete_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P._symbolMapToStringMap_closure, P.NoSuchMethodError_toString_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, N.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, E.main_closure, E.main_closure0]); - _inheritMany(P.Error, [H.NullError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.TypeErrorImplementation, H.CastErrorImplementation, H.RuntimeError, P.AssertionError, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.NoSuchMethodError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); + _inheritMany(H.Closure, [H.Primitives_functionNoSuchMethod_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P._symbolMapToStringMap_closure, P.NoSuchMethodError_toString_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, E.main_closure, E.main_closure0]); + _inherit(H.NullError, P.TypeError); _inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]); _inherit(H._AssertionError, P.AssertionError); _inherit(P.MapBase, P.MapMixin); @@ -7119,6 +7887,7 @@ _inherit(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); _inherit(H.NativeTypedArrayOfInt, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); _inheritMany(H.NativeTypedArrayOfInt, [H.NativeInt16List, H.NativeInt32List, H.NativeInt8List, H.NativeUint16List, H.NativeUint32List, H.NativeUint8ClampedList, H.NativeUint8List]); + _inherit(H._TypeError, H._Error); _inherit(P._AsyncCompleter, P._Completer); _inherit(P._AsyncStreamController, P._StreamController); _inheritMany(P.Stream, [P._StreamImpl, W._EventStream]); @@ -7133,7 +7902,6 @@ _inheritMany(P.Codec, [P.JsonCodec, N.HexCodec]); _inheritMany(P.Converter, [P.JsonEncoder, P.JsonDecoder, R.HexEncoder]); _inherit(P._JsonStringStringifier, P._JsonStringifier); - _inheritMany(P.num, [P.double, P.int]); _inheritMany(P.ArgumentError, [P.RangeError, P.IndexError]); _inheritMany(W.EventTarget, [W.Node, W.EventSource, W.HttpRequestEventTarget]); _inherit(W.Element, W.Node); @@ -7153,7 +7921,103 @@ _mixin(P._AsyncStreamController, P._AsyncStreamControllerDispatch); _mixin(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P._UnmodifiableMapMixin); })(); - var init = {mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, mangledNames: {}, getTypeFromName: getGlobalFromName, metadata: [], types: [{func: 1, ret: -1}, {func: 1, ret: P.Null}, {func: 1, ret: -1, args: [,]}, {func: 1, ret: -1, args: [P.Object], opt: [P.StackTrace]}, {func: 1, args: [,]}, {func: 1, ret: P.Null, args: [,,]}, {func: 1, ret: -1, args: [{func: 1, ret: -1}]}, {func: 1, ret: P.Null, args: [,]}, {func: 1, ret: P.Null, args: [P.Symbol,,]}, {func: 1, ret: P.String, args: [P.int]}, {func: 1, ret: -1, args: [W.Event]}, {func: 1, ret: P.Null, args: [W.Event]}, {func: 1, ret: P.Null, args: [P.String,,]}, {func: 1, args: [, P.String]}, {func: 1, args: [P.String]}, {func: 1, ret: P.Null, args: [{func: 1, ret: -1}]}, {func: 1, ret: P.Null, args: [, P.StackTrace]}, {func: 1, ret: P.Null, args: [P.int,,]}, {func: 1, ret: P.Null, args: [,], opt: [P.StackTrace]}, {func: 1, ret: [P._Future,,], args: [,]}, {func: 1, ret: -1, args: [P.Object]}, {func: 1, ret: P.Null, args: [W.ProgressEvent]}, {func: 1, args: [W.Event]}, {func: 1, args: [,,]}, {func: 1, ret: N.Logger}, {func: 1, ret: P.Null, args: [W.MouseEvent]}, {func: 1, ret: P.Null, args: [P.String]}], interceptorsByTag: null, leafTags: null}; + var init = { + typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, + mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, + mangledNames: {}, + getTypeFromName: getGlobalFromName, + metadata: [], + types: ["Null()", "~()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "Null(Object?,Object?)", "Null(Symbol0,@)", "String(int)", "~(Event*)", "Null(Event*)", "Null(String,@)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "Null(int,@)", "~(Object[StackTrace?])", "Null(Object,StackTrace)", "_Future<@>(@)", "Null(ProgressEvent)", "@(Event)", "@(@,@)", "Null(@,@)", "Logger*()", "~(String*)", "Null(MouseEvent*)", "Null(String*)"], + interceptorsByTag: null, + leafTags: null, + arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti" + }; + H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateInitializationErrorImpl":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"JSInvocationMirror":{"Invocation":[]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncCompleter":{"_Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"List":{"Iterable":["1"]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]},"HexCodec":{"Codec":["List*","String*"],"Codec.S":"List*"},"HexEncoder":{"Converter":["List*","String*"]}}')); + H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"StreamChannelMixin":1}')); + 0; + var type$ = (function rtii() { + var findType = H.findType; + return { + $env_1_1_void: findType("@<~>"), + AsyncError: findType("AsyncError"), + ConstantMapView_Symbol_dynamic: findType("ConstantMapView"), + Duration: findType("Duration"), + Error: findType("Error"), + Event: findType("Event"), + Function: findType("Function"), + Future_dynamic: findType("Future<@>"), + Future_void: findType("Future<~>"), + HexCodec: findType("HexCodec"), + Invocation: findType("Invocation"), + Iterable_dynamic: findType("Iterable<@>"), + JSArray_String: findType("JSArray"), + JSArray_dynamic: findType("JSArray<@>"), + JSArray_legacy_String: findType("JSArray"), + JSArray_legacy_int: findType("JSArray"), + JSNull: findType("JSNull"), + JavaScriptFunction: findType("JavaScriptFunction"), + JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), + JsLinkedHashMap_String_dynamic: findType("JsLinkedHashMap"), + JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), + JsLinkedHashMap_of_legacy_String_and_dynamic: findType("JsLinkedHashMap"), + JsLinkedHashMap_of_legacy_String_and_legacy_int: findType("JsLinkedHashMap"), + List_dynamic: findType("List<@>"), + Map_dynamic_dynamic: findType("Map<@,@>"), + Null: findType("Null"), + Object: findType("Object"), + ProgressEvent: findType("ProgressEvent"), + StackTrace: findType("StackTrace"), + String: findType("String"), + Symbol: findType("Symbol0"), + UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), + _AsyncCompleter_HttpRequest: findType("_AsyncCompleter"), + _ElementEventStreamImpl_legacy_MouseEvent: findType("_ElementEventStreamImpl"), + _Future_HttpRequest: findType("_Future"), + _Future_dynamic: findType("_Future<@>"), + _Future_int: findType("_Future"), + _Future_void: findType("_Future<~>"), + _StreamControllerAddStreamState_nullable_Object: findType("_StreamControllerAddStreamState"), + bool: findType("bool"), + bool_Function_Object: findType("bool(Object)"), + double: findType("double"), + dynamic: findType("@"), + dynamic_Function: findType("@()"), + dynamic_Function_Object: findType("@(Object)"), + dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"), + dynamic_Function_dynamic_dynamic: findType("@(@,@)"), + int: findType("int"), + legacy_Event: findType("Event*"), + legacy_Level: findType("Level*"), + legacy_List_legacy_String: findType("List*"), + legacy_List_legacy_int: findType("List*"), + legacy_Logger: findType("Logger*"), + legacy_Map_of_legacy_String_and_legacy_int: findType("Map*"), + legacy_Map_of_legacy_Symbol_and_dynamic: findType("Map*"), + legacy_MessageEvent: findType("MessageEvent*"), + legacy_MouseEvent: findType("MouseEvent*"), + legacy_Never: findType("0&*"), + legacy_Object: findType("Object*"), + legacy_ProgressEvent: findType("ProgressEvent*"), + legacy_String: findType("String*"), + nullable_Future_Null: findType("Future?"), + nullable_List_dynamic: findType("List<@>?"), + nullable_Object: findType("Object?"), + nullable__DelayedEvent_dynamic: findType("_DelayedEvent<@>?"), + nullable__FutureListener_dynamic_dynamic: findType("_FutureListener<@,@>?"), + nullable_dynamic_Function_Event: findType("@(Event)?"), + nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object: findType("Object?(Object?,Object?)?"), + nullable_nullable_Object_Function_dynamic: findType("Object?(@)?"), + nullable_void_Function: findType("~()?"), + nullable_void_Function_legacy_Event: findType("~(Event*)?"), + nullable_void_Function_legacy_ProgressEvent: findType("~(ProgressEvent*)?"), + num: findType("num"), + void: findType("~"), + void_Function: findType("~()"), + void_Function_Object: findType("~(Object)"), + void_Function_Object_StackTrace: findType("~(Object,StackTrace)"), + void_Function_String_dynamic: findType("~(String,@)") + }; + })(); (function constants() { var makeConstList = hunkHelpers.makeConstList; C.EventSource_methods = W.EventSource.prototype; @@ -7294,23 +8158,26 @@ C.C_OutOfMemoryError = new P.OutOfMemoryError(); C.C__DelayedDone = new P._DelayedDone(); C.C__JSRandom = new P._JSRandom(); + C.C__Required = new H._Required(); C.C__RootZone = new P._RootZone(); + C.C__StringStackTrace = new P._StringStackTrace(); C.Duration_0 = new P.Duration(0); C.Duration_5000000 = new P.Duration(5000000); C.JsonDecoder_null = new P.JsonDecoder(null); C.JsonEncoder_null = new P.JsonEncoder(null); - C.Level_INFO_800 = new N.Level("INFO", 800); - C.Level_WARNING_900 = new N.Level("WARNING", 900); - C.List_empty = makeConstList([]); - C.List_empty0 = H.setRuntimeTypeInfo(makeConstList([]), [P.Symbol]); - C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty0, [P.Symbol, null]); - C.Symbol_call = new H.Symbol0("call"); + C.Level_INFO_800 = new Y.Level("INFO", 800); + C.Level_SEVERE_1000 = new Y.Level("SEVERE", 1000); + C.Level_WARNING_900 = new Y.Level("WARNING", 900); + C.List_empty = H.setRuntimeTypeInfo(makeConstList([]), type$.JSArray_dynamic); + C.List_empty0 = H.setRuntimeTypeInfo(makeConstList([]), H.findType("JSArray")); + C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty0, H.findType("ConstantStringMap")); + C.Symbol_call = new H.Symbol("call"); })(); (function staticFields() { + $._JS_INTEROP_INTERCEPTOR_TAG = null; $.Closure_functionCounter = 0; $.BoundClosure_selfFieldNameCache = null; $.BoundClosure_receiverFieldNameCache = null; - $._inTypeAssertion = false; $.getTagFunction = null; $.alternateTagFunction = null; $.prototypeForTagFunction = null; @@ -7322,36 +8189,35 @@ $._lastPriorityCallback = null; $._isInCallbackLoop = false; $.Zone__current = C.C__RootZone; - $._toStringVisiting = []; - $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(P.String, N.Logger); + $._toStringVisiting = H.setRuntimeTypeInfo([], H.findType("JSArray")); $.LogRecord__nextNumber = 0; + $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger); })(); (function lazyInitializers() { - var _lazy = hunkHelpers.lazy; - _lazy($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() { + var _lazyFinal = hunkHelpers.lazyFinal, + _lazy = hunkHelpers.lazy, + _lazyOld = hunkHelpers.lazyOld; + _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() { return H.getIsolateAffinityTag("_$dart_dartClosure"); }); - _lazy($, "JS_INTEROP_INTERCEPTOR_TAG", "$get$JS_INTEROP_INTERCEPTOR_TAG", function() { - return H.getIsolateAffinityTag("_$dart_js"); - }); - _lazy($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { + _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({ toString: function() { return "$receiver$"; } })); }); - _lazy($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() { + _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({$method$: null, toString: function() { return "$receiver$"; } })); }); - _lazy($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() { + _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(null)); }); - _lazy($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { + _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { var $argumentsExpr$ = '$arguments$'; try { @@ -7361,10 +8227,10 @@ } }()); }); - _lazy($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() { + _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(void 0)); }); - _lazy($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { var $argumentsExpr$ = '$arguments$'; try { @@ -7374,10 +8240,10 @@ } }()); }); - _lazy($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() { + _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(null)); }); - _lazy($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() { + _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { try { null.$method$; @@ -7386,10 +8252,10 @@ } }()); }); - _lazy($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() { + _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(void 0)); }); - _lazy($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() { + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { try { (void 0).$method$; @@ -7398,20 +8264,19 @@ } }()); }); - _lazy($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() { + _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() { return P._AsyncRun__initializeScheduleImmediate(); }); - _lazy($, "Future__nullFuture", "$get$Future__nullFuture", function() { - return P._Future$zoneValue(null, C.C__RootZone, P.Null); - }); - _lazy($, "Future__falseFuture", "$get$Future__falseFuture", function() { - return P._Future$zoneValue(false, C.C__RootZone, P.bool); + _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", function() { + var t1 = new P._Future(C.C__RootZone, H.findType("_Future")); + t1._setValue$1(null); + return t1; }); _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() { return new Error().stack != void 0; }); - _lazy($, "Logger_root", "$get$Logger_root", function() { - return N.Logger_Logger(""); + _lazyOld($, "Logger_root", "$get$Logger_root", function() { + return F.Logger_Logger(""); }); })(); (function nativeSupport() { @@ -7437,8 +8302,8 @@ } init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); }(); - hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: J.Interceptor, Blob: J.Interceptor, DOMError: J.Interceptor, File: J.Interceptor, MediaError: J.Interceptor, NavigatorUserMediaError: J.Interceptor, OverconstrainedError: J.Interceptor, PositionError: J.Interceptor, SQLError: J.Interceptor, DataView: H.NativeTypedData, ArrayBufferView: H.NativeTypedData, Float32Array: H.NativeTypedArrayOfDouble, Float64Array: H.NativeTypedArrayOfDouble, Int16Array: H.NativeInt16List, Int32Array: H.NativeInt32List, Int8Array: H.NativeInt8List, Uint16Array: H.NativeUint16List, Uint32Array: H.NativeUint32List, Uint8ClampedArray: H.NativeUint8ClampedList, CanvasPixelArray: H.NativeUint8ClampedList, Uint8Array: H.NativeUint8List, HTMLAudioElement: W.HtmlElement, HTMLBRElement: W.HtmlElement, HTMLBaseElement: W.HtmlElement, HTMLBodyElement: W.HtmlElement, HTMLButtonElement: W.HtmlElement, HTMLCanvasElement: W.HtmlElement, HTMLContentElement: W.HtmlElement, HTMLDListElement: W.HtmlElement, HTMLDataElement: W.HtmlElement, HTMLDataListElement: W.HtmlElement, HTMLDetailsElement: W.HtmlElement, HTMLDialogElement: W.HtmlElement, HTMLDivElement: W.HtmlElement, HTMLEmbedElement: W.HtmlElement, HTMLFieldSetElement: W.HtmlElement, HTMLHRElement: W.HtmlElement, HTMLHeadElement: W.HtmlElement, HTMLHeadingElement: W.HtmlElement, HTMLHtmlElement: W.HtmlElement, HTMLIFrameElement: W.HtmlElement, HTMLImageElement: W.HtmlElement, HTMLInputElement: W.HtmlElement, HTMLLIElement: W.HtmlElement, HTMLLabelElement: W.HtmlElement, HTMLLegendElement: W.HtmlElement, HTMLLinkElement: W.HtmlElement, HTMLMapElement: W.HtmlElement, HTMLMediaElement: W.HtmlElement, HTMLMenuElement: W.HtmlElement, HTMLMetaElement: W.HtmlElement, HTMLMeterElement: W.HtmlElement, HTMLModElement: W.HtmlElement, HTMLOListElement: W.HtmlElement, HTMLObjectElement: W.HtmlElement, HTMLOptGroupElement: W.HtmlElement, HTMLOptionElement: W.HtmlElement, HTMLOutputElement: W.HtmlElement, HTMLParagraphElement: W.HtmlElement, HTMLParamElement: W.HtmlElement, HTMLPictureElement: W.HtmlElement, HTMLPreElement: W.HtmlElement, HTMLProgressElement: W.HtmlElement, HTMLQuoteElement: W.HtmlElement, HTMLScriptElement: W.HtmlElement, HTMLShadowElement: W.HtmlElement, HTMLSlotElement: W.HtmlElement, HTMLSourceElement: W.HtmlElement, HTMLSpanElement: W.HtmlElement, HTMLStyleElement: W.HtmlElement, HTMLTableCaptionElement: W.HtmlElement, HTMLTableCellElement: W.HtmlElement, HTMLTableDataCellElement: W.HtmlElement, HTMLTableHeaderCellElement: W.HtmlElement, HTMLTableColElement: W.HtmlElement, HTMLTableElement: W.HtmlElement, HTMLTableRowElement: W.HtmlElement, HTMLTableSectionElement: W.HtmlElement, HTMLTemplateElement: W.HtmlElement, HTMLTextAreaElement: W.HtmlElement, HTMLTimeElement: W.HtmlElement, HTMLTitleElement: W.HtmlElement, HTMLTrackElement: W.HtmlElement, HTMLUListElement: W.HtmlElement, HTMLUnknownElement: W.HtmlElement, HTMLVideoElement: W.HtmlElement, HTMLDirectoryElement: W.HtmlElement, HTMLFontElement: W.HtmlElement, HTMLFrameElement: W.HtmlElement, HTMLFrameSetElement: W.HtmlElement, HTMLMarqueeElement: W.HtmlElement, HTMLElement: W.HtmlElement, HTMLAnchorElement: W.AnchorElement, HTMLAreaElement: W.AreaElement, DOMException: W.DomException, Element: W.Element, AbortPaymentEvent: W.Event, AnimationEvent: W.Event, AnimationPlaybackEvent: W.Event, ApplicationCacheErrorEvent: W.Event, BackgroundFetchClickEvent: W.Event, BackgroundFetchEvent: W.Event, BackgroundFetchFailEvent: W.Event, BackgroundFetchedEvent: W.Event, BeforeInstallPromptEvent: W.Event, BeforeUnloadEvent: W.Event, BlobEvent: W.Event, CanMakePaymentEvent: W.Event, ClipboardEvent: W.Event, CloseEvent: W.Event, CustomEvent: W.Event, DeviceMotionEvent: W.Event, DeviceOrientationEvent: W.Event, ErrorEvent: W.Event, ExtendableEvent: W.Event, ExtendableMessageEvent: W.Event, FetchEvent: W.Event, FontFaceSetLoadEvent: W.Event, ForeignFetchEvent: W.Event, GamepadEvent: W.Event, HashChangeEvent: W.Event, InstallEvent: W.Event, MediaEncryptedEvent: W.Event, MediaKeyMessageEvent: W.Event, MediaQueryListEvent: W.Event, MediaStreamEvent: W.Event, MediaStreamTrackEvent: W.Event, MIDIConnectionEvent: W.Event, MIDIMessageEvent: W.Event, MutationEvent: W.Event, NotificationEvent: W.Event, PageTransitionEvent: W.Event, PaymentRequestEvent: W.Event, PaymentRequestUpdateEvent: W.Event, PopStateEvent: W.Event, PresentationConnectionAvailableEvent: W.Event, PresentationConnectionCloseEvent: W.Event, PromiseRejectionEvent: W.Event, PushEvent: W.Event, RTCDataChannelEvent: W.Event, RTCDTMFToneChangeEvent: W.Event, RTCPeerConnectionIceEvent: W.Event, RTCTrackEvent: W.Event, SecurityPolicyViolationEvent: W.Event, SensorErrorEvent: W.Event, SpeechRecognitionError: W.Event, SpeechRecognitionEvent: W.Event, SpeechSynthesisEvent: W.Event, StorageEvent: W.Event, SyncEvent: W.Event, TrackEvent: W.Event, TransitionEvent: W.Event, WebKitTransitionEvent: W.Event, VRDeviceEvent: W.Event, VRDisplayEvent: W.Event, VRSessionEvent: W.Event, MojoInterfaceRequestEvent: W.Event, USBConnectionEvent: W.Event, IDBVersionChangeEvent: W.Event, AudioProcessingEvent: W.Event, OfflineAudioCompletionEvent: W.Event, WebGLContextEvent: W.Event, Event: W.Event, InputEvent: W.Event, EventSource: W.EventSource, MessagePort: W.EventTarget, EventTarget: W.EventTarget, HTMLFormElement: W.FormElement, XMLHttpRequest: W.HttpRequest, XMLHttpRequestEventTarget: W.HttpRequestEventTarget, MessageEvent: W.MessageEvent, MouseEvent: W.MouseEvent, DragEvent: W.MouseEvent, PointerEvent: W.MouseEvent, WheelEvent: W.MouseEvent, Document: W.Node, HTMLDocument: W.Node, Node: W.Node, ProgressEvent: W.ProgressEvent, ResourceProgressEvent: W.ProgressEvent, HTMLSelectElement: W.SelectElement, CompositionEvent: W.UIEvent, FocusEvent: W.UIEvent, KeyboardEvent: W.UIEvent, TextEvent: W.UIEvent, TouchEvent: W.UIEvent, UIEvent: W.UIEvent, SVGAElement: P.SvgElement, SVGAnimateElement: P.SvgElement, SVGAnimateMotionElement: P.SvgElement, SVGAnimateTransformElement: P.SvgElement, SVGAnimationElement: P.SvgElement, SVGCircleElement: P.SvgElement, SVGClipPathElement: P.SvgElement, SVGDefsElement: P.SvgElement, SVGDescElement: P.SvgElement, SVGDiscardElement: P.SvgElement, SVGEllipseElement: P.SvgElement, SVGFEBlendElement: P.SvgElement, SVGFEColorMatrixElement: P.SvgElement, SVGFEComponentTransferElement: P.SvgElement, SVGFECompositeElement: P.SvgElement, SVGFEConvolveMatrixElement: P.SvgElement, SVGFEDiffuseLightingElement: P.SvgElement, SVGFEDisplacementMapElement: P.SvgElement, SVGFEDistantLightElement: P.SvgElement, SVGFEFloodElement: P.SvgElement, SVGFEFuncAElement: P.SvgElement, SVGFEFuncBElement: P.SvgElement, SVGFEFuncGElement: P.SvgElement, SVGFEFuncRElement: P.SvgElement, SVGFEGaussianBlurElement: P.SvgElement, SVGFEImageElement: P.SvgElement, SVGFEMergeElement: P.SvgElement, SVGFEMergeNodeElement: P.SvgElement, SVGFEMorphologyElement: P.SvgElement, SVGFEOffsetElement: P.SvgElement, SVGFEPointLightElement: P.SvgElement, SVGFESpecularLightingElement: P.SvgElement, SVGFESpotLightElement: P.SvgElement, SVGFETileElement: P.SvgElement, SVGFETurbulenceElement: P.SvgElement, SVGFilterElement: P.SvgElement, SVGForeignObjectElement: P.SvgElement, SVGGElement: P.SvgElement, SVGGeometryElement: P.SvgElement, SVGGraphicsElement: P.SvgElement, SVGImageElement: P.SvgElement, SVGLineElement: P.SvgElement, SVGLinearGradientElement: P.SvgElement, SVGMarkerElement: P.SvgElement, SVGMaskElement: P.SvgElement, SVGMetadataElement: P.SvgElement, SVGPathElement: P.SvgElement, SVGPatternElement: P.SvgElement, SVGPolygonElement: P.SvgElement, SVGPolylineElement: P.SvgElement, SVGRadialGradientElement: P.SvgElement, SVGRectElement: P.SvgElement, SVGScriptElement: P.SvgElement, SVGSetElement: P.SvgElement, SVGStopElement: P.SvgElement, SVGStyleElement: P.SvgElement, SVGElement: P.SvgElement, SVGSVGElement: P.SvgElement, SVGSwitchElement: P.SvgElement, SVGSymbolElement: P.SvgElement, SVGTSpanElement: P.SvgElement, SVGTextContentElement: P.SvgElement, SVGTextElement: P.SvgElement, SVGTextPathElement: P.SvgElement, SVGTextPositioningElement: P.SvgElement, SVGTitleElement: P.SvgElement, SVGUseElement: P.SvgElement, SVGViewElement: P.SvgElement, SVGGradientElement: P.SvgElement, SVGComponentTransferFunctionElement: P.SvgElement, SVGFEDropShadowElement: P.SvgElement, SVGMPathElement: P.SvgElement}); - hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, SQLError: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLIFrameElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, DOMException: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, EventSource: true, MessagePort: true, EventTarget: false, HTMLFormElement: true, XMLHttpRequest: true, XMLHttpRequestEventTarget: false, MessageEvent: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, HTMLDocument: true, Node: false, ProgressEvent: true, ResourceProgressEvent: true, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true}); + hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: J.Interceptor, Blob: J.Interceptor, DOMError: J.Interceptor, File: J.Interceptor, MediaError: J.Interceptor, NavigatorUserMediaError: J.Interceptor, OverconstrainedError: J.Interceptor, PositionError: J.Interceptor, SQLError: J.Interceptor, DataView: H.NativeTypedData, ArrayBufferView: H.NativeTypedData, Float32Array: H.NativeTypedArrayOfDouble, Float64Array: H.NativeTypedArrayOfDouble, Int16Array: H.NativeInt16List, Int32Array: H.NativeInt32List, Int8Array: H.NativeInt8List, Uint16Array: H.NativeUint16List, Uint32Array: H.NativeUint32List, Uint8ClampedArray: H.NativeUint8ClampedList, CanvasPixelArray: H.NativeUint8ClampedList, Uint8Array: H.NativeUint8List, HTMLAudioElement: W.HtmlElement, HTMLBRElement: W.HtmlElement, HTMLBaseElement: W.HtmlElement, HTMLBodyElement: W.HtmlElement, HTMLButtonElement: W.HtmlElement, HTMLCanvasElement: W.HtmlElement, HTMLContentElement: W.HtmlElement, HTMLDListElement: W.HtmlElement, HTMLDataElement: W.HtmlElement, HTMLDataListElement: W.HtmlElement, HTMLDetailsElement: W.HtmlElement, HTMLDialogElement: W.HtmlElement, HTMLDivElement: W.HtmlElement, HTMLEmbedElement: W.HtmlElement, HTMLFieldSetElement: W.HtmlElement, HTMLHRElement: W.HtmlElement, HTMLHeadElement: W.HtmlElement, HTMLHeadingElement: W.HtmlElement, HTMLHtmlElement: W.HtmlElement, HTMLIFrameElement: W.HtmlElement, HTMLImageElement: W.HtmlElement, HTMLInputElement: W.HtmlElement, HTMLLIElement: W.HtmlElement, HTMLLabelElement: W.HtmlElement, HTMLLegendElement: W.HtmlElement, HTMLLinkElement: W.HtmlElement, HTMLMapElement: W.HtmlElement, HTMLMediaElement: W.HtmlElement, HTMLMenuElement: W.HtmlElement, HTMLMetaElement: W.HtmlElement, HTMLMeterElement: W.HtmlElement, HTMLModElement: W.HtmlElement, HTMLOListElement: W.HtmlElement, HTMLObjectElement: W.HtmlElement, HTMLOptGroupElement: W.HtmlElement, HTMLOptionElement: W.HtmlElement, HTMLOutputElement: W.HtmlElement, HTMLParagraphElement: W.HtmlElement, HTMLParamElement: W.HtmlElement, HTMLPictureElement: W.HtmlElement, HTMLPreElement: W.HtmlElement, HTMLProgressElement: W.HtmlElement, HTMLQuoteElement: W.HtmlElement, HTMLScriptElement: W.HtmlElement, HTMLShadowElement: W.HtmlElement, HTMLSlotElement: W.HtmlElement, HTMLSourceElement: W.HtmlElement, HTMLSpanElement: W.HtmlElement, HTMLStyleElement: W.HtmlElement, HTMLTableCaptionElement: W.HtmlElement, HTMLTableCellElement: W.HtmlElement, HTMLTableDataCellElement: W.HtmlElement, HTMLTableHeaderCellElement: W.HtmlElement, HTMLTableColElement: W.HtmlElement, HTMLTableElement: W.HtmlElement, HTMLTableRowElement: W.HtmlElement, HTMLTableSectionElement: W.HtmlElement, HTMLTemplateElement: W.HtmlElement, HTMLTextAreaElement: W.HtmlElement, HTMLTimeElement: W.HtmlElement, HTMLTitleElement: W.HtmlElement, HTMLTrackElement: W.HtmlElement, HTMLUListElement: W.HtmlElement, HTMLUnknownElement: W.HtmlElement, HTMLVideoElement: W.HtmlElement, HTMLDirectoryElement: W.HtmlElement, HTMLFontElement: W.HtmlElement, HTMLFrameElement: W.HtmlElement, HTMLFrameSetElement: W.HtmlElement, HTMLMarqueeElement: W.HtmlElement, HTMLElement: W.HtmlElement, HTMLAnchorElement: W.AnchorElement, HTMLAreaElement: W.AreaElement, DOMException: W.DomException, Element: W.Element, AbortPaymentEvent: W.Event, AnimationEvent: W.Event, AnimationPlaybackEvent: W.Event, ApplicationCacheErrorEvent: W.Event, BackgroundFetchClickEvent: W.Event, BackgroundFetchEvent: W.Event, BackgroundFetchFailEvent: W.Event, BackgroundFetchedEvent: W.Event, BeforeInstallPromptEvent: W.Event, BeforeUnloadEvent: W.Event, BlobEvent: W.Event, CanMakePaymentEvent: W.Event, ClipboardEvent: W.Event, CloseEvent: W.Event, CustomEvent: W.Event, DeviceMotionEvent: W.Event, DeviceOrientationEvent: W.Event, ErrorEvent: W.Event, ExtendableEvent: W.Event, ExtendableMessageEvent: W.Event, FetchEvent: W.Event, FontFaceSetLoadEvent: W.Event, ForeignFetchEvent: W.Event, GamepadEvent: W.Event, HashChangeEvent: W.Event, InstallEvent: W.Event, MediaEncryptedEvent: W.Event, MediaKeyMessageEvent: W.Event, MediaQueryListEvent: W.Event, MediaStreamEvent: W.Event, MediaStreamTrackEvent: W.Event, MIDIConnectionEvent: W.Event, MIDIMessageEvent: W.Event, MutationEvent: W.Event, NotificationEvent: W.Event, PageTransitionEvent: W.Event, PaymentRequestEvent: W.Event, PaymentRequestUpdateEvent: W.Event, PopStateEvent: W.Event, PresentationConnectionAvailableEvent: W.Event, PresentationConnectionCloseEvent: W.Event, PromiseRejectionEvent: W.Event, PushEvent: W.Event, RTCDataChannelEvent: W.Event, RTCDTMFToneChangeEvent: W.Event, RTCPeerConnectionIceEvent: W.Event, RTCTrackEvent: W.Event, SecurityPolicyViolationEvent: W.Event, SensorErrorEvent: W.Event, SpeechRecognitionError: W.Event, SpeechRecognitionEvent: W.Event, SpeechSynthesisEvent: W.Event, StorageEvent: W.Event, SyncEvent: W.Event, TrackEvent: W.Event, TransitionEvent: W.Event, WebKitTransitionEvent: W.Event, VRDeviceEvent: W.Event, VRDisplayEvent: W.Event, VRSessionEvent: W.Event, MojoInterfaceRequestEvent: W.Event, USBConnectionEvent: W.Event, IDBVersionChangeEvent: W.Event, AudioProcessingEvent: W.Event, OfflineAudioCompletionEvent: W.Event, WebGLContextEvent: W.Event, Event: W.Event, InputEvent: W.Event, SubmitEvent: W.Event, EventSource: W.EventSource, MessagePort: W.EventTarget, EventTarget: W.EventTarget, HTMLFormElement: W.FormElement, XMLHttpRequest: W.HttpRequest, XMLHttpRequestEventTarget: W.HttpRequestEventTarget, MessageEvent: W.MessageEvent, MouseEvent: W.MouseEvent, DragEvent: W.MouseEvent, PointerEvent: W.MouseEvent, WheelEvent: W.MouseEvent, Document: W.Node, HTMLDocument: W.Node, Node: W.Node, ProgressEvent: W.ProgressEvent, ResourceProgressEvent: W.ProgressEvent, HTMLSelectElement: W.SelectElement, CompositionEvent: W.UIEvent, FocusEvent: W.UIEvent, KeyboardEvent: W.UIEvent, TextEvent: W.UIEvent, TouchEvent: W.UIEvent, UIEvent: W.UIEvent, SVGAElement: P.SvgElement, SVGAnimateElement: P.SvgElement, SVGAnimateMotionElement: P.SvgElement, SVGAnimateTransformElement: P.SvgElement, SVGAnimationElement: P.SvgElement, SVGCircleElement: P.SvgElement, SVGClipPathElement: P.SvgElement, SVGDefsElement: P.SvgElement, SVGDescElement: P.SvgElement, SVGDiscardElement: P.SvgElement, SVGEllipseElement: P.SvgElement, SVGFEBlendElement: P.SvgElement, SVGFEColorMatrixElement: P.SvgElement, SVGFEComponentTransferElement: P.SvgElement, SVGFECompositeElement: P.SvgElement, SVGFEConvolveMatrixElement: P.SvgElement, SVGFEDiffuseLightingElement: P.SvgElement, SVGFEDisplacementMapElement: P.SvgElement, SVGFEDistantLightElement: P.SvgElement, SVGFEFloodElement: P.SvgElement, SVGFEFuncAElement: P.SvgElement, SVGFEFuncBElement: P.SvgElement, SVGFEFuncGElement: P.SvgElement, SVGFEFuncRElement: P.SvgElement, SVGFEGaussianBlurElement: P.SvgElement, SVGFEImageElement: P.SvgElement, SVGFEMergeElement: P.SvgElement, SVGFEMergeNodeElement: P.SvgElement, SVGFEMorphologyElement: P.SvgElement, SVGFEOffsetElement: P.SvgElement, SVGFEPointLightElement: P.SvgElement, SVGFESpecularLightingElement: P.SvgElement, SVGFESpotLightElement: P.SvgElement, SVGFETileElement: P.SvgElement, SVGFETurbulenceElement: P.SvgElement, SVGFilterElement: P.SvgElement, SVGForeignObjectElement: P.SvgElement, SVGGElement: P.SvgElement, SVGGeometryElement: P.SvgElement, SVGGraphicsElement: P.SvgElement, SVGImageElement: P.SvgElement, SVGLineElement: P.SvgElement, SVGLinearGradientElement: P.SvgElement, SVGMarkerElement: P.SvgElement, SVGMaskElement: P.SvgElement, SVGMetadataElement: P.SvgElement, SVGPathElement: P.SvgElement, SVGPatternElement: P.SvgElement, SVGPolygonElement: P.SvgElement, SVGPolylineElement: P.SvgElement, SVGRadialGradientElement: P.SvgElement, SVGRectElement: P.SvgElement, SVGScriptElement: P.SvgElement, SVGSetElement: P.SvgElement, SVGStopElement: P.SvgElement, SVGStyleElement: P.SvgElement, SVGElement: P.SvgElement, SVGSVGElement: P.SvgElement, SVGSwitchElement: P.SvgElement, SVGSymbolElement: P.SvgElement, SVGTSpanElement: P.SvgElement, SVGTextContentElement: P.SvgElement, SVGTextElement: P.SvgElement, SVGTextPathElement: P.SvgElement, SVGTextPositioningElement: P.SvgElement, SVGTitleElement: P.SvgElement, SVGUseElement: P.SvgElement, SVGViewElement: P.SvgElement, SVGGradientElement: P.SvgElement, SVGComponentTransferFunctionElement: P.SvgElement, SVGFEDropShadowElement: P.SvgElement, SVGMPathElement: P.SvgElement}); + hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, SQLError: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLIFrameElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, DOMException: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, SubmitEvent: false, EventSource: true, MessagePort: true, EventTarget: false, HTMLFormElement: true, XMLHttpRequest: true, XMLHttpRequestEventTarget: false, MessageEvent: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, HTMLDocument: true, Node: false, ProgressEvent: true, ResourceProgressEvent: true, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true}); H.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; From c50d084e0c8e9bed35066d0e740cb2a4b3f5fec3 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 16 Nov 2020 13:57:12 -0800 Subject: [PATCH 044/115] Drop dependency on package:uuid (dart-lang/sse#32) Switch to a v4 UUID. We were not depending on the specific UUID version used and the random approach has a simpler implementation. Copy a small implementation of UUID generation from https://github.com/dart-lang/usage/blob/16fbfd90c58f16e016a295a880bc722d2547d2c9/lib/uuid/uuid.dart Refactor to a top level method since it is only used once from this package. --- pkgs/sse/CHANGELOG.md | 2 + pkgs/sse/lib/client/sse_client.dart | 5 +- pkgs/sse/lib/src/util/uuid.dart | 32 + pkgs/sse/pubspec.yaml | 3 +- pkgs/sse/test/web/index.dart.js | 1306 ++++++--------------------- 5 files changed, 292 insertions(+), 1056 deletions(-) create mode 100644 pkgs/sse/lib/src/util/uuid.dart diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 3b8c49bca..58371520b 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,5 @@ +## 3.6.1-dev + ## 3.6.0 - Improve performance by buffering out of order messages in the server instead diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 1316191b5..11327fd83 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -8,7 +8,8 @@ import 'dart:html'; import 'package:logging/logging.dart'; import 'package:stream_channel/stream_channel.dart'; -import 'package:uuid/uuid.dart'; + +import '../src/util/uuid.dart'; /// A client for bi-directional sse communcation. /// @@ -32,7 +33,7 @@ class SseClient extends StreamChannelMixin { /// [serverUrl] is the URL under which the server is listening for /// incoming bi-directional SSE connections. SseClient(String serverUrl) { - var clientId = Uuid().v1(); + var clientId = generateUuidV4(); _eventSource = EventSource('$serverUrl?sseClientId=$clientId', withCredentials: true); _serverUrl = '$serverUrl?sseClientId=$clientId'; diff --git a/pkgs/sse/lib/src/util/uuid.dart b/pkgs/sse/lib/src/util/uuid.dart new file mode 100644 index 000000000..e33e7e8e2 --- /dev/null +++ b/pkgs/sse/lib/src/util/uuid.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:math' show Random; + +/// Returns a unique ID in the format: +/// +/// f47ac10b-58cc-4372-a567-0e02b2c3d479 +/// +/// The generated uuids are 128 bit numbers encoded in a specific string format. +/// For more information, see +/// [en.wikipedia.org/wiki/Universally_unique_identifier](http://en.wikipedia.org/wiki/Universally_unique_identifier). +String generateUuidV4() { + final random = Random(); + + int _generateBits(int bitCount) => random.nextInt(1 << bitCount); + + String _printDigits(int value, int count) => + value.toRadixString(16).padLeft(count, '0'); + String _bitsDigits(int bitCount, int digitCount) => + _printDigits(_generateBits(bitCount), digitCount); + + // Generate xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx / 8-4-4-4-12. + var special = 8 + random.nextInt(4); + + return '${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}-' + '${_bitsDigits(16, 4)}-' + '4${_bitsDigits(12, 3)}-' + '${_printDigits(special, 1)}${_bitsDigits(12, 3)}-' + '${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}'; +} diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 4df0f803c..29b8c00a3 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.6.0 +version: 3.6.1-dev homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional @@ -16,7 +16,6 @@ dependencies: pedantic: ^1.4.0 stream_channel: '>=1.6.8 <3.0.0' shelf: ^0.7.4 - uuid: ^2.0.0 dev_dependencies: shelf_static: ^0.2.8 diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index 7ad7d5aa9..1d2b6b63b 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.11.0-190.0.dev. +// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.12.0-33.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -248,12 +248,21 @@ var C = {}, H = {JS_CONST: function JS_CONST() { }, + checkNotNullable: function(value, $name, $T) { + if (value == null) + throw H.wrapException(new H.NotNullableError($name, $T._eval$1("NotNullableError<0>"))); + return value; + }, IterableElementError_noElement: function() { return new P.StateError("No element"); }, - LateInitializationErrorImpl: function LateInitializationErrorImpl(t0) { + LateError: function LateError(t0) { this._message = t0; }, + NotNullableError: function NotNullableError(t0, t1) { + this.__internal$_name = t0; + this.$ti = t1; + }, EfficientLengthIterable: function EfficientLengthIterable() { }, ListIterable: function ListIterable() { @@ -268,9 +277,6 @@ }, FixedLengthListMixin: function FixedLengthListMixin() { }, - Symbol: function Symbol(t0) { - this.__internal$_name = t0; - }, unminifyOrTag: function(rawClassName) { var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName); if (preserved != null) @@ -352,24 +358,13 @@ var t1 = $name !== "Object" && $name !== ""; return t1; }, - Primitives_stringFromNativeUint8List: function(charCodes, start, end) { - var i, result, i0, chunkEnd; - if (end <= 500 && start === 0 && end === charCodes.length) - return String.fromCharCode.apply(null, charCodes); - for (i = start, result = ""; i < end; i = i0) { - i0 = i + 500; - chunkEnd = i0 < end ? i0 : end; - result += String.fromCharCode.apply(null, charCodes.subarray(i, chunkEnd)); - } - return result; - }, Primitives_stringFromCharCode: function(charCode) { var bits; if (charCode <= 65535) return String.fromCharCode(charCode); if (charCode <= 1114111) { bits = charCode - 65536; - return String.fromCharCode((55296 | C.JSInt_methods._shrOtherPositive$1(bits, 10)) >>> 0, 56320 | bits & 1023); + return String.fromCharCode((C.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); } throw H.wrapException(P.RangeError$range(charCode, 0, 1114111, null, null)); }, @@ -399,113 +394,6 @@ Primitives_getMilliseconds: function(receiver) { return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0 : H.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; }, - Primitives_functionNoSuchMethod: function($function, positionalArguments, namedArguments) { - var $arguments, namedArgumentList, t1 = {}; - t1.argumentCount = 0; - $arguments = []; - namedArgumentList = []; - t1.argumentCount = positionalArguments.length; - C.JSArray_methods.addAll$1($arguments, positionalArguments); - t1.names = ""; - if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - namedArguments.forEach$1(0, new H.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); - "" + t1.argumentCount; - return J.noSuchMethod$1$($function, new H.JSInvocationMirror(C.Symbol_call, 0, $arguments, namedArgumentList, 0)); - }, - Primitives_applyFunction: function($function, positionalArguments, namedArguments) { - var t1, $arguments, argumentCount, jsStub; - if (positionalArguments instanceof Array) - t1 = namedArguments == null || namedArguments.__js_helper$_length === 0; - else - t1 = false; - if (t1) { - $arguments = positionalArguments; - argumentCount = $arguments.length; - if (argumentCount === 0) { - if (!!$function.call$0) - return $function.call$0(); - } else if (argumentCount === 1) { - if (!!$function.call$1) - return $function.call$1($arguments[0]); - } else if (argumentCount === 2) { - if (!!$function.call$2) - return $function.call$2($arguments[0], $arguments[1]); - } else if (argumentCount === 3) { - if (!!$function.call$3) - return $function.call$3($arguments[0], $arguments[1], $arguments[2]); - } else if (argumentCount === 4) { - if (!!$function.call$4) - return $function.call$4($arguments[0], $arguments[1], $arguments[2], $arguments[3]); - } else if (argumentCount === 5) - if (!!$function.call$5) - return $function.call$5($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]); - jsStub = $function["call" + "$" + argumentCount]; - if (jsStub != null) - return jsStub.apply($function, $arguments); - } - return H.Primitives__genericApplyFunction2($function, positionalArguments, namedArguments); - }, - Primitives__genericApplyFunction2: function($function, positionalArguments, namedArguments) { - var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, keys, _i, defaultValue, used, key; - if (positionalArguments != null) - $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, type$.dynamic); - else - $arguments = []; - argumentCount = $arguments.length; - requiredParameterCount = $function.$requiredArgCount; - if (argumentCount < requiredParameterCount) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - defaultValuesClosure = $function.$defaultValues; - t1 = defaultValuesClosure == null; - defaultValues = !t1 ? defaultValuesClosure() : null; - interceptor = J.getInterceptor$($function); - jsFunction = interceptor["call*"]; - if (typeof jsFunction == "string") - jsFunction = interceptor[jsFunction]; - if (t1) { - if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - if (argumentCount === requiredParameterCount) - return jsFunction.apply($function, $arguments); - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - } - if (defaultValues instanceof Array) { - if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - if (argumentCount > requiredParameterCount + defaultValues.length) - return H.Primitives_functionNoSuchMethod($function, $arguments, null); - C.JSArray_methods.addAll$1($arguments, defaultValues.slice(argumentCount - requiredParameterCount)); - return jsFunction.apply($function, $arguments); - } else { - if (argumentCount > requiredParameterCount) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - keys = Object.keys(defaultValues); - if (namedArguments == null) - for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) { - defaultValue = defaultValues[H._asStringS(keys[_i])]; - if (C.C__Required === defaultValue) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - C.JSArray_methods.add$1($arguments, defaultValue); - } - else { - for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) { - key = H._asStringS(keys[_i]); - if (namedArguments.containsKey$1(key)) { - ++used; - C.JSArray_methods.add$1($arguments, namedArguments.$index(0, key)); - } else { - defaultValue = defaultValues[key]; - if (C.C__Required === defaultValue) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - C.JSArray_methods.add$1($arguments, defaultValue); - } - } - if (used !== namedArguments.__js_helper$_length) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - } - return jsFunction.apply($function, $arguments); - } - }, iae: function(argument) { throw H.wrapException(H.argumentErrorValue(argument)); }, @@ -532,9 +420,6 @@ argumentErrorValue: function(object) { return new P.ArgumentError(true, object, null, null); }, - checkBool: function(value) { - return value; - }, wrapException: function(ex) { var wrapper, t1; if (ex == null) @@ -740,7 +625,7 @@ case 4: return closure.call$4(arg1, arg2, arg3, arg4); } - throw H.wrapException(P.Exception_Exception("Unsupported number of arguments for wrapped closure")); + throw H.wrapException(new P._Exception("Unsupported number of arguments for wrapped closure")); }, convertDartClosureToJS: function(closure, arity) { var $function; @@ -1023,7 +908,7 @@ return init.getIsolateTag($name); }, throwLateInitializationError: function($name) { - return H.throwExpression(new H.LateInitializationErrorImpl($name)); + return H.throwExpression(new H.LateError($name)); }, defineProperty: function(obj, property, value) { Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); @@ -1171,32 +1056,6 @@ return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); return string; }, - ConstantMapView: function ConstantMapView(t0, t1) { - this._collection$_map = t0; - this.$ti = t1; - }, - ConstantMap: function ConstantMap() { - }, - ConstantStringMap: function ConstantStringMap(t0, t1, t2, t3) { - var _ = this; - _.__js_helper$_length = t0; - _._jsObject = t1; - _._keys = t2; - _.$ti = t3; - }, - JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { - var _ = this; - _._memberName = t0; - _.__js_helper$_kind = t1; - _._arguments = t2; - _._namedArgumentNames = t3; - _._typeArgumentCount = t4; - }, - Primitives_functionNoSuchMethod_closure: function Primitives_functionNoSuchMethod_closure(t0, t1, t2) { - this._box_0 = t0; - this.namedArgumentList = t1; - this.$arguments = t2; - }, TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) { var _ = this; _._pattern = t0; @@ -1248,8 +1107,6 @@ _AssertionError: function _AssertionError(t0) { this.message = t0; }, - _Required: function _Required() { - }, JsLinkedHashMap: function JsLinkedHashMap(t0) { var _ = this; _.__js_helper$_length = 0; @@ -1524,6 +1381,19 @@ } return type; }, + createRuntimeType: function(rti) { + var recipe, starErasedRecipe, starErasedRti, + type = rti._cachedRuntimeType; + if (type != null) + return type; + recipe = rti._canonicalRecipe; + starErasedRecipe = recipe.replace(/\*/g, ""); + if (starErasedRecipe === recipe) + return rti._cachedRuntimeType = new H._Type(rti); + starErasedRti = H._Universe_eval(init.typeUniverse, starErasedRecipe, true); + type = starErasedRti._cachedRuntimeType; + return rti._cachedRuntimeType = type == null ? starErasedRti._cachedRuntimeType = new H._Type(starErasedRti) : type; + }, _installSpecializedIsTest: function(object) { var unstarred, isFn, testRti = this, t1 = type$.Object; @@ -2700,6 +2570,9 @@ _FunctionParameters: function _FunctionParameters() { this._named = this._optionalPositional = this._requiredPositional = null; }, + _Type: function _Type(t0) { + this._rti = t0; + }, _Error: function _Error() { }, _TypeError: function _TypeError(t0) { @@ -2757,11 +2630,6 @@ var t1 = $._JS_INTEROP_INTERCEPTOR_TAG; return t1 == null ? $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js") : t1; }, - JSArray_JSArray$fixed: function($length, $E) { - if ($length > 4294967295) - throw H.wrapException(P.RangeError$range($length, 0, 4294967295, "length", null)); - return J.JSArray_markFixedList(H.setRuntimeTypeInfo(new Array($length), $E._eval$1("JSArray<0>")), $E); - }, JSArray_markFixedList: function(list, $T) { list.fixed$length = Array; return list; @@ -2837,26 +2705,6 @@ return receiver; return J.getNativeInterceptor(receiver); }, - getInterceptor$bn: function(receiver) { - if (typeof receiver == "number") - return J.JSNumber.prototype; - if (receiver == null) - return receiver; - if (typeof receiver == "boolean") - return J.JSBool.prototype; - if (!(receiver instanceof P.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - getInterceptor$n: function(receiver) { - if (typeof receiver == "number") - return J.JSNumber.prototype; - if (receiver == null) - return receiver; - if (!(receiver instanceof P.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, getInterceptor$s: function(receiver) { if (typeof receiver == "string") return J.JSString.prototype; @@ -2895,16 +2743,6 @@ return receiver + a0; return J.getInterceptor$ansx(receiver).$add(receiver, a0); }, - $and$bn: function(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return (receiver & a0) >>> 0; - return J.getInterceptor$bn(receiver).$and(receiver, a0); - }, - $div$n: function(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return receiver / a0; - return J.getInterceptor$n(receiver).$div(receiver, a0); - }, $eq$: function(receiver, a0) { if (receiver == null) return a0 == null; @@ -2912,40 +2750,12 @@ return a0 != null && receiver === a0; return J.getInterceptor$(receiver).$eq(receiver, a0); }, - $ge$n: function(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return receiver >= a0; - return J.getInterceptor$n(receiver).$ge(receiver, a0); - }, - $index$asx: function(receiver, a0) { - if (typeof a0 === "number") - if (receiver.constructor == Array || typeof receiver == "string" || H.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) - if (a0 >>> 0 === a0 && a0 < receiver.length) - return receiver[a0]; - return J.getInterceptor$asx(receiver).$index(receiver, a0); - }, $indexSet$ax: function(receiver, a0, a1) { return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); }, - $or$bn: function(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return (receiver | a0) >>> 0; - return J.getInterceptor$bn(receiver).$or(receiver, a0); - }, - $shl$n: function(receiver, a0) { - return J.getInterceptor$n(receiver).$shl(receiver, a0); - }, - $sub$n: function(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return receiver - a0; - return J.getInterceptor$n(receiver).$sub(receiver, a0); - }, addEventListener$3$x: function(receiver, a0, a1, a2) { return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); }, - noSuchMethod$1$: function(receiver, a0) { - return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); - }, startsWith$1$s: function(receiver, a0) { return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); }, @@ -3264,7 +3074,7 @@ P._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(currentZone.bindCallbackGuarded$1(callback))); }, StreamIterator_StreamIterator: function(stream, $T) { - P.ArgumentError_checkNotNull(stream, "stream", $T._eval$1("Stream<0>")); + H.checkNotNullable(stream, "stream", type$.Object); return new P._StreamIterator($T._eval$1("_StreamIterator<0>")); }, StreamController_StreamController: function($T) { @@ -3295,9 +3105,8 @@ return P.Timer__createTimer(duration, type$.void_Function._as(t1.bindCallbackGuarded$1(callback))); }, AsyncError$: function(error, stackTrace) { - var t1 = stackTrace == null ? P.AsyncError_defaultStackTrace(error) : stackTrace; - P.ArgumentError_checkNotNull(error, "error", type$.Object); - return new P.AsyncError(error, t1); + var t1 = H.checkNotNullable(error, "error", type$.Object); + return new P.AsyncError(t1, stackTrace == null ? P.AsyncError_defaultStackTrace(error) : stackTrace); }, AsyncError_defaultStackTrace: function(error) { var stackTrace; @@ -3751,14 +3560,6 @@ }, MapMixin: function MapMixin() { }, - _UnmodifiableMapMixin: function _UnmodifiableMapMixin() { - }, - MapView: function MapView() { - }, - UnmodifiableMapView: function UnmodifiableMapView() { - }, - _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() { - }, _parseJson: function(source, reviver) { var parsed, e, exception, t1; if (typeof source != "string") @@ -3768,7 +3569,7 @@ parsed = JSON.parse(source); } catch (exception) { e = H.unwrapException(exception); - t1 = P.FormatException$(String(e), null, null); + t1 = P.FormatException$(String(e)); throw H.wrapException(t1); } t1 = P._convertJsonToDartLazy(parsed); @@ -3842,19 +3643,11 @@ this._seen = t1; this._toEncodable = t2; }, - _symbolMapToStringMap: function(map) { - var result = new H.JsLinkedHashMap(type$.JsLinkedHashMap_String_dynamic); - map.forEach$1(0, new P._symbolMapToStringMap_closure(result)); - return result; - }, - Function_apply: function($function, positionalArguments, namedArguments) { - return H.Primitives_applyFunction($function, positionalArguments, namedArguments == null ? null : P._symbolMapToStringMap(namedArguments)); - }, int_parse: function(source) { var value = H.Primitives_parseInt(source, null); if (value != null) return value; - throw H.wrapException(P.FormatException$(source, null, null)); + throw H.wrapException(P.FormatException$(source)); }, Error__objectToString: function(object) { if (object instanceof H.Closure) @@ -3862,24 +3655,12 @@ return "Instance of '" + H.S(H.Primitives_objectTypeName(object)) + "'"; }, List_List$filled: function($length, fill, $E) { - var i, - result = J.JSArray_JSArray$fixed($length, $E); - if ($length !== 0 && fill != null) - for (i = 0; i < result.length; ++i) - result[i] = fill; + var result; + if ($length > 4294967295) + H.throwExpression(P.RangeError$range($length, 0, 4294967295, "length", null)); + result = J.JSArray_markFixedList(H.setRuntimeTypeInfo(new Array($length), $E._eval$1("JSArray<0>")), $E); return result; }, - List_List$from: function(elements, $E) { - var t1, - list = H.setRuntimeTypeInfo([], $E._eval$1("JSArray<0>")); - for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) - C.JSArray_methods.add$1(list, $E._as(t1.get$current())); - return list; - }, - String_String$fromCharCodes: function(charCodes) { - var t1 = H.Primitives_stringFromNativeUint8List(charCodes, 0, P.RangeError_checkValidRange(0, null, charCodes.length)); - return t1; - }, StringBuffer__writeAll: function(string, objects, separator) { var iterator = J.get$iterator$ax(objects); if (!iterator.moveNext$0()) @@ -3895,9 +3676,6 @@ } return string; }, - NoSuchMethodError$: function(receiver, memberName, positionalArguments, namedArguments) { - return new P.NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments); - }, StackTrace_current: function() { var stackTrace, exception; if (H.boolConversionCheck($.$get$_hasErrorStackProperty())) @@ -3949,10 +3727,9 @@ ArgumentError$value: function(value, $name, message) { return new P.ArgumentError(true, value, $name, message); }, - ArgumentError_checkNotNull: function(argument, $name, $T) { - if (argument == null) - throw H.wrapException(new P.ArgumentError(false, null, $name, "Must not be null")); - return argument; + RangeError$: function(message) { + var _null = null; + return new P.RangeError(_null, _null, false, _null, _null, message); }, RangeError$value: function(value, $name) { return new P.RangeError(null, null, true, value, $name, "Value not in range"); @@ -3960,11 +3737,6 @@ RangeError$range: function(invalidValue, minValue, maxValue, $name, message) { return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); }, - RangeError_checkValidRange: function(start, end, $length) { - if (start > $length) - throw H.wrapException(P.RangeError$range(start, 0, $length, "start", null)); - return $length; - }, IndexError$: function(invalidValue, indexable, $name, message, $length) { var t1 = H._asIntS($length == null ? J.get$length$asx(indexable) : $length); return new P.IndexError(t1, true, invalidValue, $name, "Index out of range"); @@ -3981,18 +3753,8 @@ ConcurrentModificationError$: function(modifiedObject) { return new P.ConcurrentModificationError(modifiedObject); }, - Exception_Exception: function(message) { - return new P._Exception(message); - }, - FormatException$: function(message, source, offset) { - return new P.FormatException(message, source, offset); - }, - _symbolMapToStringMap_closure: function _symbolMapToStringMap_closure(t0) { - this.result = t0; - }, - NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { - this._box_0 = t0; - this.sb = t1; + FormatException$: function(message) { + return new P.FormatException(message); }, DateTime: function DateTime(t0, t1) { this._value = t0; @@ -4038,13 +3800,6 @@ _.name = t3; _.message = t4; }, - NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) { - var _ = this; - _._core$_receiver = t0; - _._core$_memberName = t1; - _._core$_arguments = t2; - _._namedArguments = t3; - }, UnsupportedError: function UnsupportedError(t0) { this.message = t0; }, @@ -4067,10 +3822,8 @@ _Exception: function _Exception(t0) { this.message = t0; }, - FormatException: function FormatException(t0, t1, t2) { + FormatException: function FormatException(t0) { this.message = t0; - this.source = t1; - this.offset = t2; }, Iterable: function Iterable() { }, @@ -4224,79 +3977,32 @@ this.onData = t0; } }, - N = {HexCodec: function HexCodec() { - }}, - R = { - _convert: function(bytes, start, end) { - var t1, t2, i, bufferIndex, byteOr, byte, bufferIndex0, t3, - buffer = new Uint8Array((end - start) * 2); - for (t1 = buffer.length, t2 = bytes.length, i = start, bufferIndex = 0, byteOr = 0; i < end; ++i) { - if (i >= t2) - return H.ioore(bytes, i); - byte = bytes[i]; - if (typeof byte !== "number") - return H.iae(byte); - byteOr = (byteOr | byte) >>> 0; - bufferIndex0 = bufferIndex + 1; - t3 = (byte & 240) >>> 4; - t3 = t3 < 10 ? t3 + 48 : t3 + 97 - 10; - if (bufferIndex >= t1) - return H.ioore(buffer, bufferIndex); - buffer[bufferIndex] = t3; - bufferIndex = bufferIndex0 + 1; - t3 = byte & 15; - t3 = t3 < 10 ? t3 + 48 : t3 + 97 - 10; - if (bufferIndex0 >= t1) - return H.ioore(buffer, bufferIndex0); - buffer[bufferIndex0] = t3; - } - if (byteOr >= 0 && byteOr <= 255) - return P.String_String$fromCharCodes(buffer); - for (i = start; i < end; ++i) { - if (i >= t2) - return H.ioore(bytes, i); - byte = bytes[i]; - if (typeof byte !== "number") - return byte.$ge(); - if (byte >= 0 && byte <= 255) - continue; - throw H.wrapException(P.FormatException$("Invalid byte " + (byte < 0 ? "-" : "") + "0x" + C.JSInt_methods.toRadixString$1(Math.abs(byte), 16) + ".", bytes, i)); - } - throw H.wrapException("unreachable"); + N = { + Logger_Logger: function($name) { + return $.Logger__loggers.putIfAbsent$2($name, new N.Logger_Logger_closure($name)); }, - HexEncoder: function HexEncoder() { + Logger: function Logger(t0, t1, t2) { + this.name = t0; + this.parent = t1; + this._children = t2; }, - StreamChannelMixin: function StreamChannelMixin() { - } - }, - Y = {Level: function Level(t0, t1) { + Logger_Logger_closure: function Logger_Logger_closure(t0) { + this.name = t0; + }, + Level: function Level(t0, t1) { this.name = t0; this.value = t1; - }}, - L = {LogRecord: function LogRecord(t0, t1, t2) { + }, + LogRecord: function LogRecord(t0, t1, t2) { this.level = t0; this.message = t1; this.loggerName = t2; - }}, - F = { - Logger_Logger: function($name) { - return $.Logger__loggers.putIfAbsent$2($name, new F.Logger_Logger_closure($name)); - }, - Logger: function Logger(t0, t1, t2) { - var _ = this; - _.name = t0; - _.parent = t1; - _._level = null; - _._children = t2; - }, - Logger_Logger_closure: function Logger_Logger_closure(t0) { - this.name = t0; } }, M = { SseClient$: function(serverUrl) { var t1 = type$.legacy_String; - t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), F.Logger_Logger("SseClient")); + t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), N.Logger_Logger("SseClient")); t1.SseClient$1(serverUrl); return t1; }, @@ -4319,22 +4025,25 @@ this.error = t1; } }, - K = { - Uuid$: function() { - var options, t2, t1 = {}; - t1.options = options; - t1.options = null; - t2 = new K.Uuid(); - t2.Uuid$1$options(t1); - return t2; + T = { + generateUuidV4: function() { + var t1 = new T.generateUuidV4__printDigits(), + t2 = new T.generateUuidV4__bitsDigits(t1, new T.generateUuidV4__generateBits(C.C__JSRandom)), + t3 = C.C__JSRandom.nextInt$1(4); + return H.S(t2.call$2(16, 4)) + H.S(t2.call$2(16, 4)) + "-" + H.S(t2.call$2(16, 4)) + "-4" + H.S(t2.call$2(12, 3)) + "-" + H.S(t1.call$2(8 + t3, 1)) + H.S(t2.call$2(12, 3)) + "-" + H.S(t2.call$2(16, 4)) + H.S(t2.call$2(16, 4)) + H.S(t2.call$2(16, 4)); }, - Uuid: function Uuid() { - var _ = this; - _._clockSeq = _._nodeId = _._seedBytes = null; - _._lastNSecs = _._lastMSecs = 0; - _._hexToByte = _._byteToHex = null; + generateUuidV4__generateBits: function generateUuidV4__generateBits(t0) { + this.random = t0; + }, + generateUuidV4__printDigits: function generateUuidV4__printDigits() { + }, + generateUuidV4__bitsDigits: function generateUuidV4__bitsDigits(t0, t1) { + this._printDigits = t0; + this._generateBits = t1; } }, + R = {StreamChannelMixin: function StreamChannelMixin() { + }}, E = { main: function() { var channel = M.SseClient$("/test"), @@ -4352,25 +4061,8 @@ main_closure0: function main_closure0(t0) { this.channel = t0; } - }, - T = { - UuidUtil_mathRNG: function() { - var b, rand, i, - t1 = new Array(16); - t1.fixed$length = Array; - b = H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_int); - for (rand = null, i = 0; i < 16; ++i) { - t1 = i & 3; - if (t1 === 0) - rand = C.JSInt_methods.toInt$0(C.JSNumber_methods.floor$0(C.C__JSRandom.nextDouble$0() * 4294967296)); - if (typeof rand !== "number") - return rand.$shr(); - C.JSArray_methods.$indexSet(b, i, C.JSInt_methods._shrOtherPositive$1(rand, t1 << 3) & 255); - } - return b; - } }; - var holders = [C, H, J, P, W, N, R, Y, L, F, M, K, E, T]; + var holders = [C, H, J, P, W, N, M, T, R, E]; hunkHelpers.setFunctionNamesIfNecessary(holders); var $ = {}; H.JS_CONST.prototype = {}; @@ -4383,22 +4075,12 @@ }, toString$0: function(receiver) { return "Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'"; - }, - noSuchMethod$1: function(receiver, invocation) { - type$.Invocation._as(invocation); - throw H.wrapException(P.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); } }; J.JSBool.prototype = { toString$0: function(receiver) { return String(receiver); }, - $and: function(receiver, other) { - return H.checkBool(H._asBoolS(other)) && receiver; - }, - $or: function(receiver, other) { - return H.checkBool(H._asBoolS(other)) || receiver; - }, get$hashCode: function(receiver) { return receiver ? 519018 : 218159; }, @@ -4414,9 +4096,6 @@ get$hashCode: function(receiver) { return 0; }, - noSuchMethod$1: function(receiver, invocation) { - return this.super$Interceptor$noSuchMethod(receiver, type$.Invocation._as(invocation)); - }, $isNull: 1 }; J.JavaScriptObject.prototype = { @@ -4445,14 +4124,6 @@ H.throwExpression(P.UnsupportedError$("add")); receiver.push(value); }, - addAll$1: function(receiver, collection) { - var t1, _i; - H._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(collection); - if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("addAll")); - for (t1 = collection.length, _i = 0; _i < collection.length; collection.length === t1 || (0, H.throwConcurrentModificationError)(collection), ++_i) - receiver.push(collection[_i]); - }, get$last: function(receiver) { var t1 = receiver.length; if (t1 > 0) @@ -4475,8 +4146,6 @@ return receiver.length; }, $index: function(receiver, index) { - if (!H._isInt(index)) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); if (index >= receiver.length || index < 0) throw H.wrapException(H.diagnoseIndexError(receiver, index)); return receiver[index]; @@ -4492,17 +4161,6 @@ throw H.wrapException(H.diagnoseIndexError(receiver, index)); receiver[index] = value; }, - $add: function(receiver, other) { - var t2, _i, - t1 = H._arrayInstanceType(receiver); - t1._eval$1("List<1>")._as(other); - t1 = H.setRuntimeTypeInfo([], t1); - for (t2 = receiver.length, _i = 0; _i < receiver.length; receiver.length === t2 || (0, H.throwConcurrentModificationError)(receiver), ++_i) - this.add$1(t1, receiver[_i]); - for (t2 = other.get$iterator(other); t2.moveNext$0();) - this.add$1(t1, t2.get$current()); - return t1; - }, $isIterable: 1, $isList: 1 }; @@ -4531,30 +4189,6 @@ } }; J.JSNumber.prototype = { - toInt$0: function(receiver) { - var t1; - if (receiver >= -2147483648 && receiver <= 2147483647) - return receiver | 0; - if (isFinite(receiver)) { - t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver); - return t1 + 0; - } - throw H.wrapException(P.UnsupportedError$("" + receiver + ".toInt()")); - }, - floor$0: function(receiver) { - var truncated, d; - if (receiver >= 0) { - if (receiver <= 2147483647) - return receiver | 0; - } else if (receiver >= -2147483648) { - truncated = receiver | 0; - return receiver === truncated ? truncated : truncated - 1; - } - d = Math.floor(receiver); - if (isFinite(d)) - return d; - throw H.wrapException(P.UnsupportedError$("" + receiver + ".floor()")); - }, toRadixString$1: function(receiver, radix) { var result, match, t1, exponent; if (radix < 2 || radix > 36) @@ -4589,33 +4223,12 @@ var absolute, floorLog2, factor, scaled, intValue = receiver | 0; if (receiver === intValue) - return 536870911 & intValue; + return intValue & 536870911; absolute = Math.abs(receiver); floorLog2 = Math.log(absolute) / 0.6931471805599453 | 0; factor = Math.pow(2, floorLog2); scaled = absolute < 1 ? absolute / factor : factor / absolute; - return 536870911 & ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259; - }, - $add: function(receiver, other) { - H._asNumS(other); - return receiver + other; - }, - $sub: function(receiver, other) { - return receiver - other; - }, - $div: function(receiver, other) { - return receiver / other; - }, - $mod: function(receiver, other) { - var result = receiver % other; - if (result === 0) - return 0; - if (result > 0) - return result; - if (other < 0) - return result - other; - else - return result + other; + return ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259 & 536870911; }, _tdivFast$1: function(receiver, other) { return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); @@ -4631,23 +4244,9 @@ return Math.ceil(quotient); throw H.wrapException(P.UnsupportedError$("Result of truncating division is " + H.S(quotient) + ": " + H.S(receiver) + " ~/ " + other)); }, - $shl: function(receiver, other) { - if (other < 0) - throw H.wrapException(H.argumentErrorValue(other)); + _shlPositive$1: function(receiver, other) { return other > 31 ? 0 : receiver << other >>> 0; }, - $shr: function(receiver, other) { - var t1; - if (other < 0) - throw H.wrapException(H.argumentErrorValue(other)); - if (receiver > 0) - t1 = this._shrBothPositive$1(receiver, other); - else { - t1 = other > 31 ? 31 : other; - t1 = receiver >> t1 >>> 0; - } - return t1; - }, _shrOtherPositive$1: function(receiver, other) { var t1; if (receiver > 0) @@ -4661,26 +4260,6 @@ _shrBothPositive$1: function(receiver, other) { return other > 31 ? 0 : receiver >>> other; }, - $and: function(receiver, other) { - return (receiver & other) >>> 0; - }, - $or: function(receiver, other) { - H._asNumS(other); - if (typeof other != "number") - throw H.wrapException(H.argumentErrorValue(other)); - return (receiver | other) >>> 0; - }, - $lt: function(receiver, other) { - return receiver < other; - }, - $gt: function(receiver, other) { - return receiver > other; - }, - $ge: function(receiver, other) { - if (typeof other != "number") - throw H.wrapException(H.argumentErrorValue(other)); - return receiver >= other; - }, $isdouble: 1, $isnum: 1 }; @@ -4700,7 +4279,6 @@ return receiver.charCodeAt(index); }, $add: function(receiver, other) { - H._asStringS(other); if (typeof other != "string") throw H.wrapException(P.ArgumentError$value(other, null, null)); return receiver + other; @@ -4743,6 +4321,12 @@ } return result; }, + padLeft$2: function(receiver, width, padding) { + var delta = width - receiver.length; + if (delta <= 0) + return receiver; + return this.$mul(padding, delta) + receiver; + }, lastIndexOf$1: function(receiver, pattern) { var start = receiver.length, t1 = pattern.length; @@ -4756,31 +4340,31 @@ get$hashCode: function(receiver) { var t1, hash, i; for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { - hash = 536870911 & hash + receiver.charCodeAt(i); - hash = 536870911 & hash + ((524287 & hash) << 10); + hash = hash + receiver.charCodeAt(i) & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; hash ^= hash >> 6; } - hash = 536870911 & hash + ((67108863 & hash) << 3); + hash = hash + ((hash & 67108863) << 3) & 536870911; hash ^= hash >> 11; - return 536870911 & hash + ((16383 & hash) << 15); + return hash + ((hash & 16383) << 15) & 536870911; }, get$length: function(receiver) { return receiver.length; }, - $index: function(receiver, index) { - if (index >= receiver.length || false) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); - return receiver[index]; - }, $isPattern: 1, $isString: 1 }; - H.LateInitializationErrorImpl.prototype = { + H.LateError.prototype = { toString$0: function(_) { var message = this._message; return message != null ? "LateInitializationError: " + message : "LateInitializationError"; } }; + H.NotNullableError.prototype = { + toString$0: function(_) { + return "Null is not a valid value for the parameter '" + this.__internal$_name + "' of type '" + H.createRuntimeType(this.$ti._precomputed1).toString$0(0) + "'"; + } + }; H.EfficientLengthIterable.prototype = {}; H.ListIterable.prototype = { get$iterator: function(_) { @@ -4818,120 +4402,6 @@ } }; H.FixedLengthListMixin.prototype = {}; - H.Symbol.prototype = { - get$hashCode: function(_) { - var hash = this._hashCode; - if (hash != null) - return hash; - hash = 536870911 & 664597 * J.get$hashCode$(this.__internal$_name); - this._hashCode = hash; - return hash; - }, - toString$0: function(_) { - return 'Symbol("' + H.S(this.__internal$_name) + '")'; - }, - $eq: function(_, other) { - if (other == null) - return false; - return other instanceof H.Symbol && this.__internal$_name == other.__internal$_name; - }, - $isSymbol0: 1 - }; - H.ConstantMapView.prototype = {}; - H.ConstantMap.prototype = { - get$isEmpty: function(_) { - return this.get$length(this) === 0; - }, - toString$0: function(_) { - return P.MapBase_mapToString(this); - }, - $isMap: 1 - }; - H.ConstantStringMap.prototype = { - get$length: function(_) { - return this.__js_helper$_length; - }, - containsKey$1: function(key) { - return false; - }, - $index: function(_, key) { - if (!this.containsKey$1(key)) - return null; - return this._fetch$1(key); - }, - _fetch$1: function(key) { - return this._jsObject[H._asStringS(key)]; - }, - forEach$1: function(_, f) { - var keys, t2, i, key, - t1 = H._instanceType(this); - t1._eval$1("~(1,2)")._as(f); - keys = this._keys; - for (t2 = keys.length, t1 = t1._rest[1], i = 0; i < t2; ++i) { - key = keys[i]; - f.call$2(key, t1._as(this._fetch$1(key))); - } - } - }; - H.JSInvocationMirror.prototype = { - get$memberName: function() { - var t1 = this._memberName; - return t1; - }, - get$positionalArguments: function() { - var t1, argumentCount, list, index, _this = this; - if (_this.__js_helper$_kind === 1) - return C.List_empty; - t1 = _this._arguments; - argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount; - if (argumentCount === 0) - return C.List_empty; - list = []; - for (index = 0; index < argumentCount; ++index) { - if (index >= t1.length) - return H.ioore(t1, index); - list.push(t1[index]); - } - list.fixed$length = Array; - list.immutable$list = Array; - return list; - }, - get$namedArguments: function() { - var t1, namedArgumentCount, t2, namedArgumentsStartIndex, map, i, t3, t4, _this = this; - if (_this.__js_helper$_kind !== 0) - return C.Map_empty; - t1 = _this._namedArgumentNames; - namedArgumentCount = t1.length; - t2 = _this._arguments; - namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount; - if (namedArgumentCount === 0) - return C.Map_empty; - map = new H.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); - for (i = 0; i < namedArgumentCount; ++i) { - if (i >= t1.length) - return H.ioore(t1, i); - t3 = t1[i]; - t4 = namedArgumentsStartIndex + i; - if (t4 < 0 || t4 >= t2.length) - return H.ioore(t2, t4); - map.$indexSet(0, new H.Symbol(t3), t2[t4]); - } - return new H.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); - }, - $isInvocation: 1 - }; - H.Primitives_functionNoSuchMethod_closure.prototype = { - call$2: function($name, argument) { - var t1; - H._asStringS($name); - t1 = this._box_0; - t1.names = t1.names + "$" + H.S($name); - C.JSArray_methods.add$1(this.namedArgumentList, $name); - C.JSArray_methods.add$1(this.$arguments, argument); - ++t1.argumentCount; - }, - $signature: 12 - }; H.TypeErrorDecoder.prototype = { matchTypeError$1: function(message) { var result, t1, _this = this, @@ -5062,7 +4532,6 @@ return "Assertion failed: " + P.Error_safeToString(this.message); } }; - H._Required.prototype = {}; H.JsLinkedHashMap.prototype = { get$length: function(_) { return this.__js_helper$_length; @@ -5074,22 +4543,10 @@ return new H.LinkedHashMapKeyIterable(this, H._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>")); }, containsKey$1: function(key) { - var strings, t1; - if (typeof key == "string") { - strings = this._strings; - if (strings == null) - return false; - return this._containsTableEntry$2(strings, key); - } else { - t1 = this.internalContainsKey$1(key); - return t1; - } - }, - internalContainsKey$1: function(key) { - var rest = this.__js_helper$_rest; - if (rest == null) + var strings = this._strings; + if (strings == null) return false; - return this.internalFindBucketIndex$2(this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff), key) >= 0; + return this._containsTableEntry$2(strings, key); }, $index: function(_, key) { var strings, cell, t1, nums, _this = this, _null = null; @@ -5280,13 +4737,13 @@ call$2: function(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 13 + $signature: 12 }; H.initHooks_closure1.prototype = { call$1: function(tag) { return this.prototypeForTag(H._asStringS(tag)); }, - $signature: 14 + $signature: 13 }; H.NativeTypedData.prototype = {}; H.NativeTypedArray.prototype = { @@ -5380,6 +4837,11 @@ } }; H._FunctionParameters.prototype = {}; + H._Type.prototype = { + toString$0: function(_) { + return H._rtiToString(this._rti, null); + } + }; H._Error.prototype = { toString$0: function(_) { return this.__rti$_message; @@ -5403,23 +4865,19 @@ t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 15 + $signature: 14 }; P._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { call$0: function() { this.callback.call$0(); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 + $signature: 1 }; P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { call$0: function() { this.callback.call$0(); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 + $signature: 1 }; P._TimerImpl.prototype = { _TimerImpl$2: function(milliseconds, callback) { @@ -5445,9 +4903,7 @@ this.$this._handle = null; this.callback.call$0(); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; P._AsyncAwaitCompleter.prototype = { complete$1: function(_, value) { @@ -5485,20 +4941,18 @@ call$2: function(error, stackTrace) { this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - "call*": "call$2", - $requiredArgCount: 2, - $signature: 16 + $signature: 15 }; P._wrapJsFunctionForAsync_closure.prototype = { call$2: function(errorCode, result) { this.$protected(H._asIntS(errorCode), result); }, - $signature: 17 + $signature: 16 }; P._Completer.prototype = { completeError$2: function(error, stackTrace) { var t1; - P.ArgumentError_checkNotNull(error, "error", type$.Object); + H.checkNotNullable(error, "error", type$.Object); t1 = this.future; if (t1._state !== 0) throw H.wrapException(P.StateError$("Future already completed")); @@ -5736,9 +5190,7 @@ call$2: function(error, stackTrace) { this.target._completeError$2(error, type$.StackTrace._as(stackTrace)); }, - "call*": "call$2", - $requiredArgCount: 2, - $signature: 19 + $signature: 18 }; P._Future__chainForeignFuture_closure1.prototype = { call$0: function() { @@ -5803,13 +5255,13 @@ t1.listenerHasError = false; } }, - $signature: 1 + $signature: 0 }; P._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { call$1: function(_) { return this.originalSource; }, - $signature: 20 + $signature: 19 }; P._Future__propagateToListeners_handleValueCallback.prototype = { call$0: function() { @@ -5829,7 +5281,7 @@ t1.listenerHasError = true; } }, - $signature: 1 + $signature: 0 }; P._Future__propagateToListeners_handleError.prototype = { call$0: function() { @@ -5855,7 +5307,7 @@ t4.listenerHasError = true; } }, - $signature: 1 + $signature: 0 }; P._AsyncCallbackEntry.prototype = {}; P.Stream.prototype = { @@ -5873,7 +5325,7 @@ ++this._box_0.count; }, $signature: function() { - return H._instanceType(this.$this)._eval$1("Null(1)"); + return H._instanceType(this.$this)._eval$1("~(1)"); } }; P.Stream_length_closure0.prototype = { @@ -6026,7 +5478,7 @@ if (doneFuture != null && doneFuture._state === 0) doneFuture._asyncComplete$1(null); }, - $signature: 1 + $signature: 0 }; P._AsyncStreamControllerDispatch.prototype = { _sendData$1: function(data) { @@ -6222,7 +5674,7 @@ t4.runUnaryGuarded$1$2(type$.void_Function_Object._as(onError), t2, t3); t1._state &= 4294967263; }, - $signature: 1 + $signature: 0 }; P._BufferingStreamSubscription__sendDone_sendDone.prototype = { call$0: function() { @@ -6234,7 +5686,7 @@ t1._zone.runGuarded$1(t1._onDone); t1._state &= 4294967263; }, - $signature: 1 + $signature: 0 }; P._StreamImpl.prototype = { listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { @@ -6402,9 +5854,6 @@ bindUnaryCallbackGuarded$1$1: function(f, $T) { return new P._RootZone_bindUnaryCallbackGuarded_closure(this, $T._eval$1("~(0)")._as(f), $T); }, - $index: function(_, key) { - return null; - }, run$1$1: function(f, $R) { $R._eval$1("0()")._as(f); if ($.Zone__current === C.C__RootZone) @@ -6442,7 +5891,7 @@ call$0: function() { return this.$this.runGuarded$1(this.f); }, - $signature: 1 + $signature: 0 }; P._RootZone_bindUnaryCallbackGuarded_closure.prototype = { call$1: function(arg) { @@ -6463,19 +5912,6 @@ get$isNotEmpty: function(receiver) { return this.get$length(receiver) !== 0; }, - $add: function(receiver, other) { - var t2, cur, - t1 = H.instanceType(receiver); - t1._eval$1("List")._as(other); - t2 = H.setRuntimeTypeInfo([], t1._eval$1("JSArray")); - for (t1 = new H.ListIterator(receiver, this.get$length(receiver), t1._eval$1("ListIterator")); t1.moveNext$0();) { - cur = t1.__internal$_current; - C.JSArray_methods.add$1(t2, cur); - } - for (t1 = other.get$iterator(other); t1.moveNext$0();) - C.JSArray_methods.add$1(t2, t1.get$current()); - return t2; - }, toString$0: function(receiver) { return P.IterableBase_iterableToFullString(receiver, "[", "]"); } @@ -6517,27 +5953,6 @@ }, $isMap: 1 }; - P._UnmodifiableMapMixin.prototype = {}; - P.MapView.prototype = { - $index: function(_, key) { - return this._collection$_map.$index(0, key); - }, - forEach$1: function(_, action) { - this._collection$_map.forEach$1(0, H._instanceType(this)._eval$1("~(1,2)")._as(action)); - }, - get$isEmpty: function(_) { - return this._collection$_map.__js_helper$_length === 0; - }, - get$length: function(_) { - return this._collection$_map.__js_helper$_length; - }, - toString$0: function(_) { - return P.MapBase_mapToString(this._collection$_map); - }, - $isMap: 1 - }; - P.UnmodifiableMapView.prototype = {}; - P._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; P._JsonMap.prototype = { $index: function(_, key) { var result, @@ -6686,15 +6101,19 @@ if (i > offset) t2._contents += C.JSString_methods.substring$2(s, offset, i); offset = i + 1; - t2._contents += H.Primitives_stringFromCharCode(92); - t2._contents += H.Primitives_stringFromCharCode(117); - t2._contents += H.Primitives_stringFromCharCode(100); - t3 = charCode >>> 8 & 15; - t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); - t3 = charCode >>> 4 & 15; - t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); - t3 = charCode & 15; - t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + t3 = t2._contents += H.Primitives_stringFromCharCode(92); + t3 += H.Primitives_stringFromCharCode(117); + t2._contents = t3; + t3 += H.Primitives_stringFromCharCode(100); + t2._contents = t3; + t4 = charCode >>> 8 & 15; + t3 += H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); + t2._contents = t3; + t4 = charCode >>> 4 & 15; + t3 += H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); + t2._contents = t3; + t4 = charCode & 15; + t2._contents = t3 + H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); } } continue; @@ -6703,39 +6122,43 @@ if (i > offset) t2._contents += C.JSString_methods.substring$2(s, offset, i); offset = i + 1; - t2._contents += H.Primitives_stringFromCharCode(92); + t3 = t2._contents += H.Primitives_stringFromCharCode(92); switch (charCode) { case 8: - t2._contents += H.Primitives_stringFromCharCode(98); + t2._contents = t3 + H.Primitives_stringFromCharCode(98); break; case 9: - t2._contents += H.Primitives_stringFromCharCode(116); + t2._contents = t3 + H.Primitives_stringFromCharCode(116); break; case 10: - t2._contents += H.Primitives_stringFromCharCode(110); + t2._contents = t3 + H.Primitives_stringFromCharCode(110); break; case 12: - t2._contents += H.Primitives_stringFromCharCode(102); + t2._contents = t3 + H.Primitives_stringFromCharCode(102); break; case 13: - t2._contents += H.Primitives_stringFromCharCode(114); + t2._contents = t3 + H.Primitives_stringFromCharCode(114); break; default: - t2._contents += H.Primitives_stringFromCharCode(117); - t2._contents += H.Primitives_stringFromCharCode(48); - t2._contents += H.Primitives_stringFromCharCode(48); - t3 = charCode >>> 4 & 15; - t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); - t3 = charCode & 15; - t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + t3 += H.Primitives_stringFromCharCode(117); + t2._contents = t3; + t3 += H.Primitives_stringFromCharCode(48); + t2._contents = t3; + t3 += H.Primitives_stringFromCharCode(48); + t2._contents = t3; + t4 = charCode >>> 4 & 15; + t3 += H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); + t2._contents = t3; + t4 = charCode & 15; + t2._contents = t3 + H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); break; } } else if (charCode === 34 || charCode === 92) { if (i > offset) t2._contents += C.JSString_methods.substring$2(s, offset, i); offset = i + 1; - t2._contents += H.Primitives_stringFromCharCode(92); - t2._contents += H.Primitives_stringFromCharCode(charCode); + t3 = t2._contents += H.Primitives_stringFromCharCode(92); + t2._contents = t3 + H.Primitives_stringFromCharCode(charCode); } } if (offset === 0) @@ -6829,29 +6252,30 @@ t1._contents += "]"; }, writeMap$1: function(map) { - var keyValueList, i, t1, separator, t2, _this = this, _box_0 = {}; + var t1, keyValueList, i, t2, separator, t3, _this = this, _box_0 = {}; if (map.get$isEmpty(map)) { _this._sink._contents += "{}"; return true; } - keyValueList = P.List_List$filled(map.get$length(map) * 2, null, type$.nullable_Object); + t1 = map.get$length(map) * 2; + keyValueList = P.List_List$filled(t1, null, type$.nullable_Object); i = _box_0.i = 0; _box_0.allStringKeys = true; map.forEach$1(0, new P._JsonStringifier_writeMap_closure(_box_0, keyValueList)); if (!_box_0.allStringKeys) return false; - t1 = _this._sink; - t1._contents += "{"; - for (separator = '"'; i < keyValueList.length; i += 2, separator = ',"') { - t1._contents += separator; + t2 = _this._sink; + t2._contents += "{"; + for (separator = '"'; i < t1; i += 2, separator = ',"') { + t2._contents += separator; _this.writeStringContent$1(H._asStringS(keyValueList[i])); - t1._contents += '":'; - t2 = i + 1; - if (t2 >= keyValueList.length) - return H.ioore(keyValueList, t2); - _this.writeObject$1(keyValueList[t2]); + t2._contents += '":'; + t3 = i + 1; + if (t3 >= t1) + return H.ioore(keyValueList, t3); + _this.writeObject$1(keyValueList[t3]); } - t1._contents += "}"; + t2._contents += "}"; return true; } }; @@ -6873,26 +6297,6 @@ return t1.charCodeAt(0) == 0 ? t1 : t1; } }; - P._symbolMapToStringMap_closure.prototype = { - call$2: function(key, value) { - this.result.$indexSet(0, type$.Symbol._as(key).__internal$_name, value); - }, - $signature: 8 - }; - P.NoSuchMethodError_toString_closure.prototype = { - call$2: function(key, value) { - var t1, t2, t3; - type$.Symbol._as(key); - t1 = this.sb; - t2 = this._box_0; - t1._contents += t2.comma; - t3 = t1._contents += H.S(key.__internal$_name); - t1._contents = t3 + ": "; - t1._contents += P.Error_safeToString(value); - t2.comma = ", "; - }, - $signature: 8 - }; P.DateTime.prototype = { $eq: function(_, other) { if (other == null) @@ -6919,21 +6323,6 @@ } }; P.Duration.prototype = { - $add: function(_, other) { - return new P.Duration(C.JSInt_methods.$add(this._duration, type$.Duration._as(other).get$_duration())); - }, - $sub: function(_, other) { - return new P.Duration(C.JSInt_methods.$sub(this._duration, type$.Duration._as(other).get$_duration())); - }, - $lt: function(_, other) { - return C.JSInt_methods.$lt(this._duration, type$.Duration._as(other).get$_duration()); - }, - $gt: function(_, other) { - return C.JSInt_methods.$gt(this._duration, type$.Duration._as(other).get$_duration()); - }, - $ge: function(_, other) { - return C.JSInt_methods.$ge(this._duration, type$.Duration._as(other).get$_duration()); - }, $eq: function(_, other) { if (other == null) return false; @@ -6968,7 +6357,7 @@ return "0000" + n; return "00000" + n; }, - $signature: 9 + $signature: 8 }; P.Duration_toString_twoDigits.prototype = { call$1: function(n) { @@ -6976,7 +6365,7 @@ return "" + n; return "0" + n; }, - $signature: 9 + $signature: 8 }; P.Error.prototype = { get$stackTrace: function() { @@ -7057,25 +6446,6 @@ return this.length; } }; - P.NoSuchMethodError.prototype = { - toString$0: function(_) { - var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {}, - sb = new P.StringBuffer(""); - _box_0.comma = ""; - $arguments = _this._core$_arguments; - for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { - argument = $arguments[_i]; - sb._contents = t2 + t3; - t2 = sb._contents += P.Error_safeToString(argument); - _box_0.comma = ", "; - } - _this._namedArguments.forEach$1(0, new P.NoSuchMethodError_toString_closure(_box_0, sb)); - receiverText = P.Error_safeToString(_this._core$_receiver); - actualParameters = sb.toString$0(0); - t1 = "NoSuchMethodError: method not found: '" + H.S(_this._core$_memberName.__internal$_name) + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; - return t1; - } - }; P.UnsupportedError.prototype = { toString$0: function(_) { return "Unsupported operation: " + this.message; @@ -7132,9 +6502,8 @@ P.FormatException.prototype = { toString$0: function(_) { var message = this.message, - report = message != null && "" !== message ? "FormatException: " + H.S(message) : "FormatException", - offset = this.offset; - return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report; + report = message != null && "" !== message ? "FormatException: " + H.S(message) : "FormatException"; + return report; } }; P.Iterable.prototype = { @@ -7177,10 +6546,6 @@ toString$0: function(_) { return "Instance of '" + H.S(H.Primitives_objectTypeName(this)) + "'"; }, - noSuchMethod$1: function(_, invocation) { - type$.Invocation._as(invocation); - throw H.wrapException(P.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); - }, toString: function() { return this.toString$0(this); } @@ -7272,7 +6637,7 @@ else t3.completeError$1(e); }, - $signature: 21 + $signature: 20 }; W.HttpRequestEventTarget.prototype = {}; W.MessageEvent.prototype = {$isMessageEvent: 1}; @@ -7305,7 +6670,7 @@ call$1: function(e) { return this.onData.call$1(type$.Event._as(e)); }, - $signature: 22 + $signature: 21 }; P._AcceptStructuredClone.prototype = { findSlot$1: function(value) { @@ -7337,7 +6702,7 @@ t1 = true; if (t1) H.throwExpression(P.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch)); - P.ArgumentError_checkNotNull(true, "isUtc", type$.bool); + H.checkNotNullable(true, "isUtc", type$.bool); return new P.DateTime(millisSinceEpoch, true); } if (e instanceof RegExp) @@ -7391,13 +6756,13 @@ J.$indexSet$ax(t1, key, t2); return t2; }, - $signature: 23 + $signature: 22 }; P.convertDartToNative_Dictionary_closure.prototype = { call$2: function(key, value) { this.object[key] = value; }, - $signature: 24 + $signature: 23 }; P._AcceptStructuredCloneDart2Js.prototype = { forEachJsField$2: function(object, action) { @@ -7422,8 +6787,10 @@ $signature: 2 }; P._JSRandom.prototype = { - nextDouble$0: function() { - return Math.random(); + nextInt$1: function(max) { + if (max <= 0 || max > 4294967296) + throw H.wrapException(P.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); + return Math.random() * max >>> 0; } }; P.SvgElement.prototype = { @@ -7431,43 +6798,7 @@ return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent); } }; - N.HexCodec.prototype = { - get$encoder: function() { - return C.C_HexEncoder; - } - }; - R.HexEncoder.prototype = { - convert$1: function(bytes) { - type$.legacy_List_legacy_int._as(bytes); - return R._convert(bytes, 0, bytes.length); - } - }; - Y.Level.prototype = { - $eq: function(_, other) { - if (other == null) - return false; - return other instanceof Y.Level && this.value === other.value; - }, - $gt: function(_, other) { - type$.legacy_Level._as(other); - return C.JSInt_methods.$gt(this.value, other.get$value(other)); - }, - $ge: function(_, other) { - return this.value >= type$.legacy_Level._as(other).value; - }, - get$hashCode: function(_) { - return this.value; - }, - toString$0: function(_) { - return this.name; - } - }; - L.LogRecord.prototype = { - toString$0: function(_) { - return "[" + this.level.name + "] " + this.loggerName + ": " + this.message; - } - }; - F.Logger.prototype = { + N.Logger.prototype = { get$fullName: function() { var t1 = this.parent, t2 = t1 == null || t1.name === "", @@ -7475,37 +6806,25 @@ return t2 ? t3 : t1.get$fullName() + "." + t3; }, get$level: function() { - var effectiveLevel, t1; - if (this.parent == null) - effectiveLevel = this._level; - else { - t1 = $.$get$Logger_root(); - effectiveLevel = t1._level; - } - return effectiveLevel; + return C.Level_INFO_800; }, log$4: function(logLevel, message, error, stackTrace) { - var record, _this = this, - t1 = logLevel.value; - if (t1 >= _this.get$level().value) { + var t1 = logLevel.value; + if (t1 >= this.get$level().value) { if (t1 >= 2000) { P.StackTrace_current(); logLevel.toString$0(0); } - t1 = _this.get$fullName(); + t1 = this.get$fullName(); Date.now(); $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1; - record = new L.LogRecord(logLevel, message, t1); - if (_this.parent == null) - _this._publish$1(record); - else - $.$get$Logger_root()._publish$1(record); + $.$get$Logger_root()._publish$1(new N.LogRecord(logLevel, message, t1)); } }, _publish$1: function(record) { } }; - F.Logger_Logger_closure.prototype = { + N.Logger_Logger_closure.prototype = { call$0: function() { var dot, $parent, t1, thisName = this.name; @@ -7513,24 +6832,40 @@ H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'")); dot = C.JSString_methods.lastIndexOf$1(thisName, "."); if (dot === -1) - $parent = thisName !== "" ? F.Logger_Logger("") : null; + $parent = thisName !== "" ? N.Logger_Logger("") : null; else { - $parent = F.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); + $parent = N.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); thisName = C.JSString_methods.substring$1(thisName, dot + 1); } - t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger)); - if ($parent == null) - t1._level = C.Level_INFO_800; - else + t1 = new N.Logger(thisName, $parent, new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_legacy_Logger)); + if ($parent != null) $parent._children.$indexSet(0, thisName, t1); return t1; }, - $signature: 25 + $signature: 24 + }; + N.Level.prototype = { + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof N.Level && this.value === other.value; + }, + get$hashCode: function(_) { + return this.value; + }, + toString$0: function(_) { + return this.name; + } + }; + N.LogRecord.prototype = { + toString$0: function(_) { + return "[" + this.level.name + "] " + this.loggerName + ": " + this.message; + } }; M.SseClient.prototype = { SseClient$1: function(serverUrl) { var t1, t2, t3, t4, _this = this, - clientId = K.Uuid$().v1$0(); + clientId = T.generateUuidV4(); _this._eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); _this._serverUrl = serverUrl + "?sseClientId=" + clientId; t1 = _this._outgoingController; @@ -7636,7 +6971,7 @@ if (t1 != null) t1.cancel$0(); }, - $signature: 11 + $signature: 10 }; M.SseClient_closure0.prototype = { call$1: function(error) { @@ -7646,7 +6981,7 @@ if (t2 !== true) t1._errorTimer = P.Timer_Timer(C.Duration_5000000, new M.SseClient__closure(t1, error)); }, - $signature: 11 + $signature: 10 }; M.SseClient__closure.prototype = { call$0: function() { @@ -7654,7 +6989,7 @@ t1 = this.$this, t2 = t1._incomingController, error = this.error; - P.ArgumentError_checkNotNull(error, "error", type$.Object); + H.checkNotNullable(error, "error", type$.Object); if (t2._state >= 4) H.throwExpression(t2._badEventState$0()); stackTrace = P.AsyncError_defaultStackTrace(error); @@ -7665,129 +7000,27 @@ t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, stackTrace)); t1.close$0(0); }, - $signature: 0 + $signature: 1 }; - R.StreamChannelMixin.prototype = {}; - K.Uuid.prototype = { - Uuid$1$options: function(_box_0) { - var t1, t2, i, hex, t3, v1PositionalArgs, v1NamedArgs, _this = this, - _s19_ = "v1rngPositionalArgs", - _s14_ = "v1rngNamedArgs", - _s18_ = "grngPositionalArgs", - _s13_ = "grngNamedArgs", - options = _box_0.options; - if (!(options != null)) - options = new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_dynamic); - _box_0.options = options; - t1 = new Array(256); - t1.fixed$length = Array; - _this.set$_byteToHex(H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_String)); - _this.set$_hexToByte(new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_legacy_int)); - for (t1 = type$.JSArray_legacy_int, t2 = type$.HexCodec._eval$1("Codec.S"), i = 0; i < 256; ++i) { - hex = H.setRuntimeTypeInfo([], t1); - C.JSArray_methods.add$1(hex, i); - t3 = _this._byteToHex; - t2._as(hex); - (t3 && C.JSArray_methods).$indexSet(t3, i, C.C_HexCodec.get$encoder().convert$1(hex)); - _this._hexToByte.$indexSet(0, _this._byteToHex[i], i); - } - v1PositionalArgs = _box_0.options.$index(0, _s19_) != null ? _box_0.options.$index(0, _s19_) : []; - v1NamedArgs = _box_0.options.$index(0, _s14_) != null ? type$.legacy_Map_of_legacy_Symbol_and_dynamic._as(_box_0.options.$index(0, _s14_)) : C.Map_empty; - _this._seedBytes = _box_0.options.$index(0, "v1rng") != null ? P.Function_apply(type$.Function._as(_box_0.options.$index(0, "v1rng")), type$.nullable_List_dynamic._as(v1PositionalArgs), v1NamedArgs) : T.UuidUtil_mathRNG(); - if (_box_0.options.$index(0, _s18_) != null) - _box_0.options.$index(0, _s18_); - if (_box_0.options.$index(0, _s13_) != null) - type$.legacy_Map_of_legacy_Symbol_and_dynamic._as(_box_0.options.$index(0, _s13_)); - _this._nodeId = [J.$or$bn(J.$index$asx(_this._seedBytes, 0), 1), J.$index$asx(_this._seedBytes, 1), J.$index$asx(_this._seedBytes, 2), J.$index$asx(_this._seedBytes, 3), J.$index$asx(_this._seedBytes, 4), J.$index$asx(_this._seedBytes, 5)]; - t1 = J.$shl$n(J.$index$asx(_this._seedBytes, 6), 8); - t2 = J.$index$asx(_this._seedBytes, 7); - if (typeof t2 !== "number") - return H.iae(t2); - _this._clockSeq = (t1 | t2) & 262143; - }, - v1$0: function() { - var buf, options, clockSeq, mSecs, nSecs, dt, t2, tl, tmh, node, n, _this = this, - _s8_ = "clockSeq", - _s5_ = "nSecs", - t1 = new Array(16); - t1.fixed$length = Array; - buf = H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_int); - options = new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_dynamic); - clockSeq = options.$index(0, _s8_) != null ? options.$index(0, _s8_) : _this._clockSeq; - mSecs = options.$index(0, "mSecs") != null ? options.$index(0, "mSecs") : Date.now(); - nSecs = options.$index(0, _s5_) != null ? options.$index(0, _s5_) : _this._lastNSecs + 1; - t1 = J.getInterceptor$n(mSecs); - dt = J.$add$ansx(t1.$sub(mSecs, _this._lastMSecs), J.$div$n(J.$sub$n(nSecs, _this._lastNSecs), 10000)); - t2 = J.getInterceptor$n(dt); - if (t2.$lt(dt, 0) && options.$index(0, _s8_) == null) - clockSeq = J.$and$bn(J.$add$ansx(clockSeq, 1), 16383); - if ((t2.$lt(dt, 0) || t1.$gt(mSecs, _this._lastMSecs)) && options.$index(0, _s5_) == null) - nSecs = 0; - if (J.$ge$n(nSecs, 10000)) - throw H.wrapException(P.Exception_Exception("uuid.v1(): Can't create more than 10M uuids/sec")); - H._asIntS(mSecs); - _this._lastMSecs = mSecs; - H._asIntS(nSecs); - _this._lastNSecs = nSecs; - _this._clockSeq = clockSeq; - mSecs += 122192928e5; - tl = C.JSInt_methods.$mod((mSecs & 268435455) * 10000 + nSecs, 4294967296); - C.JSArray_methods.$indexSet(buf, 0, C.JSInt_methods._shrOtherPositive$1(tl, 24) & 255); - C.JSArray_methods.$indexSet(buf, 1, C.JSInt_methods._shrOtherPositive$1(tl, 16) & 255); - C.JSArray_methods.$indexSet(buf, 2, C.JSInt_methods._shrOtherPositive$1(tl, 8) & 255); - C.JSArray_methods.$indexSet(buf, 3, tl & 255); - tmh = C.JSDouble_methods.floor$0(mSecs / 4294967296 * 10000) & 268435455; - C.JSArray_methods.$indexSet(buf, 4, tmh >>> 8 & 255); - C.JSArray_methods.$indexSet(buf, 5, tmh & 255); - C.JSArray_methods.$indexSet(buf, 6, tmh >>> 24 & 15 | 16); - C.JSArray_methods.$indexSet(buf, 7, tmh >>> 16 & 255); - t1 = J.getInterceptor$n(clockSeq); - C.JSArray_methods.$indexSet(buf, 8, (t1.$shr(clockSeq, 8) | 128) >>> 0); - C.JSArray_methods.$indexSet(buf, 9, H._asIntS(t1.$and(clockSeq, 255))); - node = options.$index(0, "node") != null ? options.$index(0, "node") : _this._nodeId; - for (t1 = J.getInterceptor$asx(node), n = 0; n < 6; ++n) - C.JSArray_methods.$indexSet(buf, 10 + n, H._asIntS(t1.$index(node, n))); - type$.legacy_List_legacy_int._as(buf); - t1 = _this._byteToHex; - t1 = H.S((t1 && C.JSArray_methods).$index(t1, buf[0])); - t2 = _this._byteToHex; - t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[1])); - t1 = _this._byteToHex; - t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[2])); - t2 = _this._byteToHex; - t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[3])) + "-"; - t1 = _this._byteToHex; - t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[4])); - t2 = _this._byteToHex; - t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[5])) + "-"; - t1 = _this._byteToHex; - t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[6])); - t2 = _this._byteToHex; - t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[7])) + "-"; - t1 = _this._byteToHex; - t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[8])); - t2 = _this._byteToHex; - t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[9])) + "-"; - t1 = _this._byteToHex; - t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[10])); - t2 = _this._byteToHex; - t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[11])); - t1 = _this._byteToHex; - t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[12])); - t2 = _this._byteToHex; - t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[13])); - t1 = _this._byteToHex; - t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[14])); - t2 = _this._byteToHex; - return t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[15])); - }, - set$_byteToHex: function(_byteToHex) { - this._byteToHex = type$.legacy_List_legacy_String._as(_byteToHex); - }, - set$_hexToByte: function(_hexToByte) { - this._hexToByte = type$.legacy_Map_of_legacy_String_and_legacy_int._as(_hexToByte); - } + T.generateUuidV4__generateBits.prototype = { + call$1: function(bitCount) { + return this.random.nextInt$1(C.JSInt_methods._shlPositive$1(1, bitCount)); + }, + $signature: 26 }; + T.generateUuidV4__printDigits.prototype = { + call$2: function(value, count) { + return C.JSString_methods.padLeft$2(C.JSInt_methods.toRadixString$1(value, 16), count, "0"); + }, + $signature: 11 + }; + T.generateUuidV4__bitsDigits.prototype = { + call$2: function(bitCount, digitCount) { + return this._printDigits.call$2(this._generateBits.call$1(bitCount), digitCount); + }, + $signature: 11 + }; + R.StreamChannelMixin.prototype = {}; E.main_closure.prototype = { call$1: function(_) { type$.legacy_MouseEvent._as(_); @@ -7830,7 +7063,6 @@ (function aliases() { var _ = J.Interceptor.prototype; _.super$Interceptor$toString = _.toString$0; - _.super$Interceptor$noSuchMethod = _.noSuchMethod$1; _ = J.JavaScriptObject.prototype; _.super$JavaScriptObject$toString = _.toString$0; })(); @@ -7845,37 +7077,33 @@ _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 3); _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 3); _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 3); - _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 1); + _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 6); - _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 1); - _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 18, 0); + _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); + _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 17, 0); _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 6); _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4); var _; - _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 10); - _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 10); - _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 1); - _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 26); + _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 9); + _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 9); + _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0); + _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 25); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(P.Object, null); - _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.Symbol, P.MapView, H.ConstantMap, H.JSInvocationMirror, H.Closure, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, H._Required, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P._UnmodifiableMapMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, Y.Level, L.LogRecord, F.Logger, R.StreamChannelMixin, K.Uuid]); + _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, H.Closure, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, H._Type, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, N.Logger, N.Level, N.LogRecord, R.StreamChannelMixin]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]); _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); _inherit(J.JSUnmodifiableArray, J.JSArray); _inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]); - _inheritMany(P.Error, [H.LateInitializationErrorImpl, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.NoSuchMethodError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); + _inheritMany(P.Error, [H.LateError, H.NotNullableError, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); _inherit(H.EfficientLengthIterable, P.Iterable); _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]); - _inherit(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P.MapView); - _inherit(P.UnmodifiableMapView, P._UnmodifiableMapView_MapView__UnmodifiableMapMixin); - _inherit(H.ConstantMapView, P.UnmodifiableMapView); - _inherit(H.ConstantStringMap, H.ConstantMap); - _inheritMany(H.Closure, [H.Primitives_functionNoSuchMethod_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P._symbolMapToStringMap_closure, P.NoSuchMethodError_toString_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, E.main_closure, E.main_closure0]); _inherit(H.NullError, P.TypeError); + _inheritMany(H.Closure, [H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, N.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); _inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]); _inherit(H._AssertionError, P.AssertionError); _inherit(P.MapBase, P.MapMixin); @@ -7899,8 +7127,8 @@ _inherit(P._JsonMapKeyIterable, H.ListIterable); _inherit(P.Converter, P.StreamTransformerBase); _inherit(P.JsonCyclicError, P.JsonUnsupportedObjectError); - _inheritMany(P.Codec, [P.JsonCodec, N.HexCodec]); - _inheritMany(P.Converter, [P.JsonEncoder, P.JsonDecoder, R.HexEncoder]); + _inherit(P.JsonCodec, P.Codec); + _inheritMany(P.Converter, [P.JsonEncoder, P.JsonDecoder]); _inherit(P._JsonStringStringifier, P._JsonStringifier); _inheritMany(P.ArgumentError, [P.RangeError, P.IndexError]); _inheritMany(W.EventTarget, [W.Node, W.EventSource, W.HttpRequestEventTarget]); @@ -7919,7 +7147,6 @@ _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, P.ListMixin); _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin); _mixin(P._AsyncStreamController, P._AsyncStreamControllerDispatch); - _mixin(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P._UnmodifiableMapMixin); })(); var init = { typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, @@ -7927,40 +7154,31 @@ mangledNames: {}, getTypeFromName: getGlobalFromName, metadata: [], - types: ["Null()", "~()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "Null(Object?,Object?)", "Null(Symbol0,@)", "String(int)", "~(Event*)", "Null(Event*)", "Null(String,@)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "Null(int,@)", "~(Object[StackTrace?])", "Null(Object,StackTrace)", "_Future<@>(@)", "Null(ProgressEvent)", "@(Event)", "@(@,@)", "Null(@,@)", "Logger*()", "~(String*)", "Null(MouseEvent*)", "Null(String*)"], + types: ["~()", "Null()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "~(Event*)", "Null(Event*)", "String*(int*,int*)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "Null(Object,StackTrace)", "_Future<@>(@)", "~(ProgressEvent)", "~(Event)", "@(@,@)", "~(@,@)", "Logger*()", "~(String*)", "int*(int*)", "Null(MouseEvent*)", "Null(String*)"], interceptorsByTag: null, leafTags: null, arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti" }; - H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateInitializationErrorImpl":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"JSInvocationMirror":{"Invocation":[]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncCompleter":{"_Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"List":{"Iterable":["1"]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]},"HexCodec":{"Codec":["List*","String*"],"Codec.S":"List*"},"HexEncoder":{"Converter":["List*","String*"]}}')); - H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"StreamChannelMixin":1}')); + H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"NotNullableError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncCompleter":{"_Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}')); + H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"Codec":2,"StreamChannelMixin":1}')); 0; var type$ = (function rtii() { var findType = H.findType; return { $env_1_1_void: findType("@<~>"), AsyncError: findType("AsyncError"), - ConstantMapView_Symbol_dynamic: findType("ConstantMapView"), - Duration: findType("Duration"), Error: findType("Error"), Event: findType("Event"), Function: findType("Function"), Future_dynamic: findType("Future<@>"), Future_void: findType("Future<~>"), - HexCodec: findType("HexCodec"), - Invocation: findType("Invocation"), Iterable_dynamic: findType("Iterable<@>"), JSArray_String: findType("JSArray"), JSArray_dynamic: findType("JSArray<@>"), - JSArray_legacy_String: findType("JSArray"), - JSArray_legacy_int: findType("JSArray"), JSNull: findType("JSNull"), JavaScriptFunction: findType("JavaScriptFunction"), JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), - JsLinkedHashMap_String_dynamic: findType("JsLinkedHashMap"), - JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), - JsLinkedHashMap_of_legacy_String_and_dynamic: findType("JsLinkedHashMap"), - JsLinkedHashMap_of_legacy_String_and_legacy_int: findType("JsLinkedHashMap"), + JsLinkedHashMap_of_legacy_String_and_legacy_Logger: findType("JsLinkedHashMap"), List_dynamic: findType("List<@>"), Map_dynamic_dynamic: findType("Map<@,@>"), Null: findType("Null"), @@ -7968,7 +7186,6 @@ ProgressEvent: findType("ProgressEvent"), StackTrace: findType("StackTrace"), String: findType("String"), - Symbol: findType("Symbol0"), UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), _AsyncCompleter_HttpRequest: findType("_AsyncCompleter"), _ElementEventStreamImpl_legacy_MouseEvent: findType("_ElementEventStreamImpl"), @@ -7987,12 +7204,6 @@ dynamic_Function_dynamic_dynamic: findType("@(@,@)"), int: findType("int"), legacy_Event: findType("Event*"), - legacy_Level: findType("Level*"), - legacy_List_legacy_String: findType("List*"), - legacy_List_legacy_int: findType("List*"), - legacy_Logger: findType("Logger*"), - legacy_Map_of_legacy_String_and_legacy_int: findType("Map*"), - legacy_Map_of_legacy_Symbol_and_dynamic: findType("Map*"), legacy_MessageEvent: findType("MessageEvent*"), legacy_MouseEvent: findType("MouseEvent*"), legacy_Never: findType("0&*"), @@ -8019,12 +7230,10 @@ }; })(); (function constants() { - var makeConstList = hunkHelpers.makeConstList; C.EventSource_methods = W.EventSource.prototype; C.HttpRequest_methods = W.HttpRequest.prototype; C.Interceptor_methods = J.Interceptor.prototype; C.JSArray_methods = J.JSArray.prototype; - C.JSDouble_methods = J.JSDouble.prototype; C.JSInt_methods = J.JSInt.prototype; C.JSNull_methods = J.JSNull.prototype; C.JSNumber_methods = J.JSNumber.prototype; @@ -8032,8 +7241,6 @@ C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; - C.C_HexCodec = new N.HexCodec(); - C.C_HexEncoder = new R.HexEncoder(); C.C_JS_CONST = function getTagFallback(o) { var s = Object.prototype.toString.call(o); return s.substring(8, s.length - 1); @@ -8158,20 +7365,15 @@ C.C_OutOfMemoryError = new P.OutOfMemoryError(); C.C__DelayedDone = new P._DelayedDone(); C.C__JSRandom = new P._JSRandom(); - C.C__Required = new H._Required(); C.C__RootZone = new P._RootZone(); C.C__StringStackTrace = new P._StringStackTrace(); C.Duration_0 = new P.Duration(0); C.Duration_5000000 = new P.Duration(5000000); C.JsonDecoder_null = new P.JsonDecoder(null); C.JsonEncoder_null = new P.JsonEncoder(null); - C.Level_INFO_800 = new Y.Level("INFO", 800); - C.Level_SEVERE_1000 = new Y.Level("SEVERE", 1000); - C.Level_WARNING_900 = new Y.Level("WARNING", 900); - C.List_empty = H.setRuntimeTypeInfo(makeConstList([]), type$.JSArray_dynamic); - C.List_empty0 = H.setRuntimeTypeInfo(makeConstList([]), H.findType("JSArray")); - C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty0, H.findType("ConstantStringMap")); - C.Symbol_call = new H.Symbol("call"); + C.Level_INFO_800 = new N.Level("INFO", 800); + C.Level_SEVERE_1000 = new N.Level("SEVERE", 1000); + C.Level_WARNING_900 = new N.Level("WARNING", 900); })(); (function staticFields() { $._JS_INTEROP_INTERCEPTOR_TAG = null; @@ -8190,8 +7392,8 @@ $._isInCallbackLoop = false; $.Zone__current = C.C__RootZone; $._toStringVisiting = H.setRuntimeTypeInfo([], H.findType("JSArray")); + $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, H.findType("Logger*")); $.LogRecord__nextNumber = 0; - $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger); })(); (function lazyInitializers() { var _lazyFinal = hunkHelpers.lazyFinal, @@ -8276,7 +7478,7 @@ return new Error().stack != void 0; }); _lazyOld($, "Logger_root", "$get$Logger_root", function() { - return F.Logger_Logger(""); + return N.Logger_Logger(""); }); })(); (function nativeSupport() { From 9648a35fbf9b213ab31a5b57aff65be8191708f9 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 22 Jan 2021 15:21:44 -0800 Subject: [PATCH 045/115] Prep to publish (dart-lang/sse#35) * Prep to publish * reduce flakes --- pkgs/sse/CHANGELOG.md | 4 +++- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/sse_test.dart | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 58371520b..80694bbae 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,4 +1,6 @@ -## 3.6.1-dev +## 3.6.1 + +- Drop dependency on `package:uuid`. ## 3.6.0 diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 29b8c00a3..63c362de7 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.6.1-dev +version: 3.6.1 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 00349d1a0..cbd8e6d9e 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -199,7 +199,7 @@ void main() { // The isInKeepAlivePeriod flag may only be set for a short period because // the client may connect very quickly, so only pump until it changes. - var maxPumps = 50; + var maxPumps = 100; while (!connection.isInKeepAlivePeriod && maxPumps-- > 0) { await pumpEventQueue(times: 1); } @@ -218,7 +218,7 @@ void main() { // Now check that we can reconnect multiple times. closeSink(connection); - maxPumps = 50; + maxPumps = 100; while (!connection.isInKeepAlivePeriod && maxPumps-- > 0) { await pumpEventQueue(times: 1); } From 8ddfc2083f7f0b244240c74f95157213dc65d483 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 5 Feb 2021 18:38:59 +0000 Subject: [PATCH 046/115] Update documentation (dart-lang/sse#37) * Update documentation * more documentation --- pkgs/sse/lib/src/server/sse_handler.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index e7646518c..0f450bb10 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -193,6 +193,16 @@ class SseHandler { StreamQueue _connectionsStream; + /// [_uri] is the URL under which the server is listening for + /// incoming bi-directional SSE connections. + /// + /// If [keepAlive] is supplied, connections will remain active for this + /// period after a disconnect and can be reconnected transparently. If there + /// is no reconnect within that period, the connection will be closed + /// normally. + /// + /// If [keepAlive] is not supplied, connections will be closed immediately + /// after a disconnect. SseHandler(this._uri, {Duration keepAlive}) : _keepAlive = keepAlive; StreamQueue get connections => From b5a33191922052fa276f6c98147493c2dd5a2991 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 5 Feb 2021 18:43:34 +0000 Subject: [PATCH 047/115] Deprecate onConnect (dart-lang/sse#36) * Replace onOpen with onConnect * buffer messages * actually buffer --- pkgs/sse/CHANGELOG.md | 5 +++++ pkgs/sse/lib/client/sse_client.dart | 8 ++++++-- pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 80694bbae..a03a6c691 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.7.0 + +- Deprecate the client's `onOpen` getter. Messages will now be buffered until + a connection is established. + ## 3.6.1 - Drop dependency on `package:uuid`. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 11327fd83..4686fa031 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -37,10 +37,11 @@ class SseClient extends StreamChannelMixin { _eventSource = EventSource('$serverUrl?sseClientId=$clientId', withCredentials: true); _serverUrl = '$serverUrl?sseClientId=$clientId'; - _outgoingController.stream - .listen(_onOutgoingMessage, onDone: _onOutgoingDone); + _eventSource.onOpen.first.whenComplete(() => _outgoingController.stream + .listen(_onOutgoingMessage, onDone: _onOutgoingDone)); _eventSource.addEventListener('message', _onIncomingMessage); _eventSource.addEventListener('control', _onIncomingControlMessage); + _eventSource.onOpen.listen((_) { _errorTimer?.cancel(); }); @@ -56,6 +57,9 @@ class SseClient extends StreamChannelMixin { }); } + @Deprecated( + 'Outgoing messages are now buffered until a connection is established.' + 'This should no longer be required and will be removed.') Stream get onOpen => _eventSource.onOpen; /// Add messages to this [StreamSink] to send them to the server. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 63c362de7..b2b8b3f89 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.6.1 +version: 3.7.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional From bd1ecfe2fb3376eeb003fa92e9626fa276af1b59 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Mon, 8 Feb 2021 10:02:32 -0800 Subject: [PATCH 048/115] Add onConnected (dart-lang/sse#39) Closes https://github.com/dart-lang/sse/issues/38 Before this change consumers of `package:sse` must assume the connection is established immediately. Add `onConnected` to prevent this assumption and so that UIs can react accordingly. --- pkgs/sse/CHANGELOG.md | 6 + pkgs/sse/lib/client/sse_client.dart | 19 +- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/web/index.dart.js | 629 +++++++++++++++++++++------- 4 files changed, 490 insertions(+), 166 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index a03a6c691..bf7899e63 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,9 @@ +## 3.8.0 + +- Add `onConnected` to replace `onOpen`. +- Fix an issue where failed requests would not add a `done` event to the + connection `sink`. + ## 3.7.0 - Deprecate the client's `onOpen` getter. Messages will now be buffered until diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 4686fa031..22aeb412c 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -22,6 +22,8 @@ class SseClient extends StreamChannelMixin { final _logger = Logger('SseClient'); + final _onConnected = Completer(); + int _lastMessageId = -1; EventSource _eventSource; @@ -37,8 +39,11 @@ class SseClient extends StreamChannelMixin { _eventSource = EventSource('$serverUrl?sseClientId=$clientId', withCredentials: true); _serverUrl = '$serverUrl?sseClientId=$clientId'; - _eventSource.onOpen.first.whenComplete(() => _outgoingController.stream - .listen(_onOutgoingMessage, onDone: _onOutgoingDone)); + _eventSource.onOpen.first.whenComplete(() { + _onConnected.complete(); + _outgoingController.stream + .listen(_onOutgoingMessage, onDone: _onOutgoingDone); + }); _eventSource.addEventListener('message', _onIncomingMessage); _eventSource.addEventListener('control', _onIncomingControlMessage); @@ -57,11 +62,11 @@ class SseClient extends StreamChannelMixin { }); } - @Deprecated( - 'Outgoing messages are now buffered until a connection is established.' - 'This should no longer be required and will be removed.') + @Deprecated('Use onConnected instead.') Stream get onOpen => _eventSource.onOpen; + Future get onConnected => _onConnected.future; + /// Add messages to this [StreamSink] to send them to the server. /// /// The message added to the sink has to be JSON encodable. Messages that fail @@ -77,6 +82,10 @@ class SseClient extends StreamChannelMixin { void close() { _eventSource.close(); + // If the _outgoingController doesn't have a listener that means the + // initial connection was never established. Add a listener so close + // adds a done event to [sink]. + if (!_outgoingController.hasListener) _outgoingController.stream.drain(); _incomingController.close(); _outgoingController.close(); } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index b2b8b3f89..8f15aff6e 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.7.0 +version: 3.8.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index 1d2b6b63b..034c69b77 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.12.0-33.0.dev. +// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.12.0-223.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -27,6 +27,14 @@ to[key] = from[key]; } } + function mixinProperties(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!to.hasOwnProperty(key)) + to[key] = from[key]; + } + } var supportsDirectProtoAccess = function() { var cls = function() { }; @@ -58,7 +66,7 @@ for (var j = 0; j < keys.length; j++) { var key = keys[j]; var f = holder[key]; - if (typeof f == 'function') + if (typeof f == "function") f.name = key; } } @@ -81,7 +89,7 @@ inherit(classes[i], sup); } function mixin(cls, mixin) { - copyProperties(mixin.prototype, cls.prototype); + mixinProperties(mixin.prototype, cls.prototype); cls.prototype.constructor = cls; } function lazyOld(holder, name, getterName, initializer) { @@ -170,7 +178,7 @@ var funs = []; for (var i = 0; i < funsOrNames.length; i++) { var fun = funsOrNames[i]; - if (typeof fun == 'string') + if (typeof fun == "string") fun = container[fun]; fun.$callName = callNames[i]; funs.push(fun); @@ -259,6 +267,8 @@ LateError: function LateError(t0) { this._message = t0; }, + nullFuture_closure: function nullFuture_closure() { + }, NotNullableError: function NotNullableError(t0, t1) { this.__internal$_name = t0; this.$ti = t1; @@ -445,7 +455,7 @@ }, TypeErrorDecoder_extractPattern: function(message) { var match, $arguments, argumentsExpr, expr, method, receiver; - message = H.quoteStringForRegExp(message.replace(String({}), '$receiver$')); + message = H.quoteStringForRegExp(message.replace(String({}), "$receiver$")); match = message.match(/\\\$[a-zA-Z]+\\\$/g); if (match == null) match = H.setRuntimeTypeInfo([], type$.JSArray_String); @@ -454,11 +464,11 @@ expr = match.indexOf("\\$expr\\$"); method = match.indexOf("\\$method\\$"); receiver = match.indexOf("\\$receiver\\$"); - return new H.TypeErrorDecoder(message.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'), '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); + return new H.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); }, TypeErrorDecoder_provokeCallErrorOn: function(expression) { return function($expr$) { - var $argumentsExpr$ = '$arguments$'; + var $argumentsExpr$ = "$arguments$"; try { $expr$.$method$($argumentsExpr$); } catch (e) { @@ -2753,9 +2763,15 @@ $indexSet$ax: function(receiver, a0, a1) { return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); }, + _removeEventListener$3$x: function(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2); + }, addEventListener$3$x: function(receiver, a0, a1, a2) { return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); }, + forEach$1$ax: function(receiver, a0) { + return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); + }, startsWith$1$s: function(receiver, a0) { return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); }, @@ -2882,17 +2898,6 @@ }($function, 1); return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); }, - _Future__chainForeignFuture: function(source, target) { - var e, s, exception; - target._state = 1; - try { - source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), type$.Null); - } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s)); - } - }, _Future__chainCoreFuture: function(source, target) { var t1, t2, listeners; for (t1 = type$._Future_dynamic; t2 = source._state, t2 === 2;) @@ -2969,17 +2974,26 @@ $.Zone__current = oldZone; t1 = _box_0.listenerValueOrError; if (t4._is(t1)) { + t5 = _box_0.listener.$ti; + t5 = t5._eval$1("Future<2>")._is(t1) || !t5._rest[1]._is(t1); + } else + t5 = false; + if (t5) { + t4._as(t1); result = _box_0.listener.result; - if (t1._state >= 4) { - current = t3._as(result._resultOrListeners); - result._resultOrListeners = null; - listeners = result._reverseListeners$1(current); - result._state = t1._state; - result._resultOrListeners = t1._resultOrListeners; - _box_1.source = t1; - continue; - } else - P._Future__chainCoreFuture(t1, result); + if (t1 instanceof P._Future) + if (t1._state >= 4) { + current = t3._as(result._resultOrListeners); + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + result._state = t1._state; + result._resultOrListeners = t1._resultOrListeners; + _box_1.source = t1; + continue; + } else + P._Future__chainCoreFuture(t1, result); + else + result._chainForeignFuture$1(t1); return; } } @@ -3009,7 +3023,7 @@ t1 = type$.dynamic_Function_Object; if (t1._is(errorHandler)) return t1._as(errorHandler); - throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result")); + throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a valid result")); }, _microtaskLoop: function() { var entry, next; @@ -3084,6 +3098,10 @@ _runGuarded: function(notificationHandler) { return; }, + _BufferingStreamSubscription__registerDataHandler: function(zone, handleData, $T) { + var t1 = handleData == null ? P.async___nullDataHandler$closure() : handleData; + return type$.$env_1_1_void._bind$1($T)._eval$1("1(2)")._as(t1); + }, _BufferingStreamSubscription__registerErrorHandler: function(zone, handleError) { if (handleError == null) handleError = P.async___nullErrorHandler$closure(); @@ -3093,11 +3111,20 @@ return type$.dynamic_Function_Object._as(handleError); throw H.wrapException(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")); }, + _nullDataHandler: function(value) { + }, _nullErrorHandler: function(error, stackTrace) { P._rootHandleUncaughtError(null, null, $.Zone__current, error, stackTrace); }, _nullDoneHandler: function() { }, + _cancelAndValue: function(subscription, future, value) { + var cancelFuture = subscription.cancel$0(); + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(new P._cancelAndValue_closure(future, value)); + else + future._complete$1(value); + }, Timer_Timer: function(duration, callback) { var t1 = $.Zone__current; if (t1 === C.C__RootZone) @@ -3236,13 +3263,13 @@ this.$this = t1; }, _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) { - this.target = t0; + this.$this = t0; }, _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) { - this.target = t0; + this.$this = t0; }, _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) { - this.target = t0; + this.$this = t0; this.e = t1; this.s = t2; }, @@ -3289,6 +3316,14 @@ this._box_0 = t0; this.future = t1; }, + Stream_first_closure: function Stream_first_closure(t0) { + this.future = t0; + }, + Stream_first_closure0: function Stream_first_closure0(t0, t1, t2) { + this.$this = t0; + this.subscription = t1; + this.future = t2; + }, StreamSubscription: function StreamSubscription() { }, StreamTransformerBase: function StreamTransformerBase() { @@ -3335,6 +3370,19 @@ }, _BufferingStreamSubscription: function _BufferingStreamSubscription() { }, + _BufferingStreamSubscription_asFuture_closure: function _BufferingStreamSubscription_asFuture_closure(t0, t1) { + this._box_0 = t0; + this.result = t1; + }, + _BufferingStreamSubscription_asFuture_closure0: function _BufferingStreamSubscription_asFuture_closure0(t0, t1) { + this.$this = t0; + this.result = t1; + }, + _BufferingStreamSubscription_asFuture__closure: function _BufferingStreamSubscription_asFuture__closure(t0, t1, t2) { + this.result = t0; + this.error = t1; + this.stackTrace = t2; + }, _BufferingStreamSubscription__sendError_sendError: function _BufferingStreamSubscription__sendError_sendError(t0, t1, t2) { this.$this = t0; this.error = t1; @@ -3374,6 +3422,10 @@ _StreamIterator: function _StreamIterator(t0) { this.$ti = t0; }, + _cancelAndValue_closure: function _cancelAndValue_closure(t0, t1) { + this.future = t0; + this.value = t1; + }, AsyncError: function AsyncError(t0, t1) { this.error = t0; this.stackTrace = t1; @@ -3836,6 +3888,21 @@ StringBuffer: function StringBuffer(t0) { this._contents = t0; }, + _convertDartToNative_Value: function(value) { + var array; + if (value == null) + return value; + if (typeof value == "string" || typeof value == "number" || H._isBool(value)) + return value; + if (type$.Map_dynamic_dynamic._is(value)) + return P.convertDartToNative_Dictionary(value); + if (type$.List_dynamic._is(value)) { + array = []; + J.forEach$1$ax(value, new P._convertDartToNative_Value_closure(array)); + value = array; + } + return value; + }, convertDartToNative_Dictionary: function(dict) { var object = {}; dict.forEach$1(0, new P.convertDartToNative_Dictionary_closure(object)); @@ -3847,6 +3914,9 @@ this._box_0 = t0; this.$this = t1; }, + _convertDartToNative_Value_closure: function _convertDartToNative_Value_closure(t0) { + this.array = t0; + }, convertDartToNative_Dictionary_closure: function convertDartToNative_Dictionary_closure(t0) { this.object = t0; }, @@ -3898,10 +3968,10 @@ return t1; }, _EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) { - var t1 = W._wrapZone(new W._EventStreamSubscription_closure(onData), type$.Event); - if (t1 != null && true) - J.addEventListener$3$x(_target, _eventType, t1, false); - return new W._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); + var t1 = onData == null ? null : W._wrapZone(new W._EventStreamSubscription_closure(onData), type$.Event); + t1 = new W._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); + t1._tryResume$0(); + return t1; }, _wrapZone: function(callback, $T) { var t1 = $.Zone__current; @@ -3975,42 +4045,48 @@ }, _EventStreamSubscription_closure: function _EventStreamSubscription_closure(t0) { this.onData = t0; + }, + _EventStreamSubscription_onData_closure: function _EventStreamSubscription_onData_closure(t0) { + this.handleData = t0; } }, - N = { + Y = {Level: function Level(t0, t1) { + this.name = t0; + this.value = t1; + }}, + L = {LogRecord: function LogRecord(t0, t1, t2) { + this.level = t0; + this.message = t1; + this.loggerName = t2; + }}, + F = { Logger_Logger: function($name) { - return $.Logger__loggers.putIfAbsent$2($name, new N.Logger_Logger_closure($name)); + return $.Logger__loggers.putIfAbsent$2($name, new F.Logger_Logger_closure($name)); }, Logger: function Logger(t0, t1, t2) { - this.name = t0; - this.parent = t1; - this._children = t2; + var _ = this; + _.name = t0; + _.parent = t1; + _._level = null; + _._children = t2; }, Logger_Logger_closure: function Logger_Logger_closure(t0) { this.name = t0; - }, - Level: function Level(t0, t1) { - this.name = t0; - this.value = t1; - }, - LogRecord: function LogRecord(t0, t1, t2) { - this.level = t0; - this.message = t1; - this.loggerName = t2; } }, M = { SseClient$: function(serverUrl) { var t1 = type$.legacy_String; - t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), N.Logger_Logger("SseClient")); + t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), F.Logger_Logger("SseClient"), new P._AsyncCompleter(new P._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic)); t1.SseClient$1(serverUrl); return t1; }, - SseClient: function SseClient(t0, t1, t2) { + SseClient: function SseClient(t0, t1, t2, t3) { var _ = this; _._incomingController = t0; _._outgoingController = t1; _._logger = t2; + _._onConnected = t3; _._lastMessageId = -1; _._errorTimer = _._serverUrl = _._eventSource = null; }, @@ -4020,6 +4096,9 @@ SseClient_closure0: function SseClient_closure0(t0) { this.$this = t0; }, + SseClient_closure1: function SseClient_closure1(t0) { + this.$this = t0; + }, SseClient__closure: function SseClient__closure(t0, t1) { this.$this = t0; this.error = t1; @@ -4062,7 +4141,7 @@ this.channel = t0; } }; - var holders = [C, H, J, P, W, N, M, T, R, E]; + var holders = [C, H, J, P, W, Y, L, F, M, T, R, E]; hunkHelpers.setFunctionNamesIfNecessary(holders); var $ = {}; H.JS_CONST.prototype = {}; @@ -4124,6 +4203,16 @@ H.throwExpression(P.UnsupportedError$("add")); receiver.push(value); }, + forEach$1: function(receiver, f) { + var end, i; + H._arrayInstanceType(receiver)._eval$1("~(1)")._as(f); + end = receiver.length; + for (i = 0; i < end; ++i) { + f.call$1(receiver[i]); + if (receiver.length !== end) + throw H.wrapException(P.ConcurrentModificationError$(receiver)); + } + }, get$last: function(receiver) { var t1 = receiver.length; if (t1 > 0) @@ -4360,6 +4449,14 @@ return message != null ? "LateInitializationError: " + message : "LateInitializationError"; } }; + H.nullFuture_closure.prototype = { + call$0: function() { + var t1 = new P._Future($.Zone__current, type$._Future_Null); + t1._asyncComplete$1(null); + return t1; + }, + $signature: 14 + }; H.NotNullableError.prototype = { toString$0: function(_) { return "Null is not a valid value for the parameter '" + this.__internal$_name + "' of type '" + H.createRuntimeType(this.$ti._precomputed1).toString$0(0) + "'"; @@ -4378,8 +4475,7 @@ }; H.ListIterator.prototype = { get$current: function() { - var cur = this.__internal$_current; - return cur; + return this.__internal$_current; }, moveNext$0: function() { var t3, _this = this, @@ -4737,13 +4833,13 @@ call$2: function(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 12 + $signature: 15 }; H.initHooks_closure1.prototype = { call$1: function(tag) { return this.prototypeForTag(H._asStringS(tag)); }, - $signature: 13 + $signature: 16 }; H.NativeTypedData.prototype = {}; H.NativeTypedArray.prototype = { @@ -4865,7 +4961,7 @@ t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 14 + $signature: 17 }; P._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { call$0: function() { @@ -4929,7 +5025,8 @@ t1._completeError$2(e, st); else t1._asyncCompleteError$2(e, st); - } + }, + $isCompleter: 1 }; P._awaitOnObject_closure.prototype = { call$1: function(result) { @@ -4941,13 +5038,13 @@ call$2: function(error, stackTrace) { this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - $signature: 15 + $signature: 18 }; P._wrapJsFunctionForAsync_closure.prototype = { call$2: function(errorCode, result) { this.$protected(H._asIntS(errorCode), result); }, - $signature: 16 + $signature: 19 }; P._Completer.prototype = { completeError$2: function(error, stackTrace) { @@ -4962,7 +5059,8 @@ }, completeError$1: function(error) { return this.completeError$2(error, null); - } + }, + $isCompleter: 1 }; P._AsyncCompleter.prototype = { complete$1: function(_, value) { @@ -4973,6 +5071,9 @@ if (t2._state !== 0) throw H.wrapException(P.StateError$("Future already completed")); t2._asyncComplete$1(t1._eval$1("1/")._as(value)); + }, + complete$0: function($receiver) { + return this.complete$1($receiver, null); } }; P._FutureListener.prototype = { @@ -5028,11 +5129,6 @@ this._addListener$1(new P._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>"))); return result; }, - _setValue$1: function(value) { - this.$ti._precomputed1._as(value); - this._state = 4; - this._resultOrListeners = value; - }, _addListener$1: function(listener) { var source, _this = this, t1 = _this._state; @@ -5096,6 +5192,17 @@ } return prev; }, + _chainForeignFuture$1: function(source) { + var e, s, exception, _this = this; + _this._state = 1; + try { + source.then$1$2$onError(new P._Future__chainForeignFuture_closure(_this), new P._Future__chainForeignFuture_closure0(_this), type$.Null); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(_this, e, s)); + } + }, _complete$1: function(value) { var listeners, _this = this, t1 = _this.$ti; @@ -5104,7 +5211,7 @@ if (t1._is(value)) P._Future__chainCoreFuture(value, _this); else - P._Future__chainForeignFuture(value, _this); + _this._chainForeignFuture$1(value); else { listeners = _this._removeListeners$0(); t1._precomputed1._as(value); @@ -5157,7 +5264,7 @@ P._Future__chainCoreFuture(value, _this); return; } - P._Future__chainForeignFuture(value, _this); + _this._chainForeignFuture$1(value); }, _asyncCompleteError$2: function(error, stackTrace) { type$.StackTrace._as(stackTrace); @@ -5180,21 +5287,28 @@ }; P._Future__chainForeignFuture_closure.prototype = { call$1: function(value) { - var t1 = this.target; + var error, stackTrace, exception, + t1 = this.$this; t1._state = 0; - t1._complete$1(value); + try { + t1._completeWithValue$1(t1.$ti._precomputed1._as(value)); + } catch (exception) { + error = H.unwrapException(exception); + stackTrace = H.getTraceFromException(exception); + t1._completeError$2(error, stackTrace); + } }, $signature: 5 }; P._Future__chainForeignFuture_closure0.prototype = { call$2: function(error, stackTrace) { - this.target._completeError$2(error, type$.StackTrace._as(stackTrace)); + this.$this._completeError$2(error, type$.StackTrace._as(stackTrace)); }, - $signature: 18 + $signature: 7 }; P._Future__chainForeignFuture_closure1.prototype = { call$0: function() { - this.target._completeError$2(this.e, this.s); + this.$this._completeError$2(this.e, this.s); }, $signature: 0 }; @@ -5261,7 +5375,7 @@ call$1: function(_) { return this.originalSource; }, - $signature: 19 + $signature: 21 }; P._Future__propagateToListeners_handleValueCallback.prototype = { call$0: function() { @@ -5317,6 +5431,12 @@ t1.count = 0; this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1, this), true, new P.Stream_length_closure0(t1, future), future.get$_completeError()); return future; + }, + get$first: function(_) { + var future = new P._Future($.Zone__current, H._instanceType(this)._eval$1("_Future<1>")), + subscription = this.listen$4$cancelOnError$onDone$onError(null, true, new P.Stream_first_closure(future), future.get$_completeError()); + subscription.onData$1(new P.Stream_first_closure0(this, subscription, future)); + return future; } }; P.Stream_length_closure.prototype = { @@ -5334,6 +5454,32 @@ }, $signature: 0 }; + P.Stream_first_closure.prototype = { + call$0: function() { + var e, s, t1, exception, error, stackTrace; + try { + t1 = H.IterableElementError_noElement(); + throw H.wrapException(t1); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + error = e; + stackTrace = s; + if (stackTrace == null) + stackTrace = P.AsyncError_defaultStackTrace(error); + this.future._completeError$2(error, stackTrace); + } + }, + $signature: 0 + }; + P.Stream_first_closure0.prototype = { + call$1: function(value) { + P._cancelAndValue(this.subscription, this.future, H._instanceType(this.$this)._precomputed1._as(value)); + }, + $signature: function() { + return H._instanceType(this.$this)._eval$1("~(1)"); + } + }; P.StreamSubscription.prototype = {}; P.StreamTransformerBase.prototype = {}; P._StreamController.prototype = { @@ -5400,7 +5546,7 @@ return _this._ensureDoneFuture$0(); }, _subscribe$4: function(onData, onError, onDone, cancelOnError) { - var t2, t3, t4, t5, t6, subscription, pendingEvents, addState, _this = this, + var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this, t1 = H._instanceType(_this); t1._eval$1("~(1)?")._as(onData); type$.nullable_void_Function._as(onDone); @@ -5408,11 +5554,11 @@ throw H.wrapException(P.StateError$("Stream has already been listened to.")); t2 = $.Zone__current; t3 = cancelOnError ? 1 : 0; - type$.$env_1_1_void._bind$1(t1._precomputed1)._eval$1("1(2)")._as(onData); - t4 = P._BufferingStreamSubscription__registerErrorHandler(t2, onError); - t5 = onDone == null ? P.async___nullDoneHandler$closure() : onDone; - t6 = type$.void_Function; - subscription = new P._ControllerSubscription(_this, onData, t4, t6._as(t5), t2, t3, t1._eval$1("_ControllerSubscription<1>")); + t4 = P._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1); + t5 = P._BufferingStreamSubscription__registerErrorHandler(t2, onError); + t6 = onDone == null ? P.async___nullDoneHandler$closure() : onDone; + t7 = type$.void_Function; + subscription = new P._ControllerSubscription(_this, t4, t5, t7._as(t6), t2, t3, t1._eval$1("_ControllerSubscription<1>")); pendingEvents = _this.get$_pendingEvents(); t3 = _this._state |= 1; if ((t3 & 8) !== 0) { @@ -5422,7 +5568,7 @@ } else _this._varData = subscription; subscription._setPendingEvents$1(pendingEvents); - t1 = t6._as(new P._StreamController__subscribe_closure(_this)); + t1 = t7._as(new P._StreamController__subscribe_closure(_this)); t2 = subscription._state; subscription._state = t2 | 32; t1.call$0(); @@ -5540,6 +5686,27 @@ pendingEvents.schedule$1(_this); } }, + onData$1: function(handleData) { + var t1 = H._instanceType(this); + this.set$_onData(P._BufferingStreamSubscription__registerDataHandler(this._zone, t1._eval$1("~(1)?")._as(handleData), t1._precomputed1)); + }, + cancel$0: function() { + var t1 = this._state &= 4294967279; + if ((t1 & 8) === 0) + this._cancel$0(); + t1 = this._cancelFuture; + return t1 == null ? $.$get$Future__nullFuture() : t1; + }, + asFuture$1$1: function(futureValue, $E) { + var result, t1 = {}; + $E._eval$1("0?")._as(futureValue); + t1.resultValue = null; + t1.resultValue = $E._as(futureValue); + result = new P._Future($.Zone__current, $E._eval$1("_Future<0>")); + this.set$_onDone(new P._BufferingStreamSubscription_asFuture_closure(t1, result)); + this._onError = new P._BufferingStreamSubscription_asFuture_closure0(this, result); + return result; + }, _cancel$0: function() { var t2, _this = this, t1 = _this._state |= 8; @@ -5650,12 +5817,41 @@ if ((t1 & 64) !== 0 && t1 < 128) _this._pending.schedule$1(_this); }, + set$_onData: function(_onData) { + this._onData = H._instanceType(this)._eval$1("~(1)")._as(_onData); + }, + set$_onDone: function(_onDone) { + this._onDone = type$.void_Function._as(_onDone); + }, set$_pending: function(_pending) { this._pending = H._instanceType(this)._eval$1("_PendingEvents<1>?")._as(_pending); }, $isStreamSubscription: 1, $is_EventDispatch: 1 }; + P._BufferingStreamSubscription_asFuture_closure.prototype = { + call$0: function() { + this.result._complete$1(this._box_0.resultValue); + }, + $signature: 0 + }; + P._BufferingStreamSubscription_asFuture_closure0.prototype = { + call$2: function(error, stackTrace) { + var cancelFuture = this.$this.cancel$0(), + t1 = this.result; + if (cancelFuture != $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(new P._BufferingStreamSubscription_asFuture__closure(t1, error, stackTrace)); + else + t1._completeError$2(error, stackTrace); + }, + $signature: 7 + }; + P._BufferingStreamSubscription_asFuture__closure.prototype = { + call$0: function() { + this.result._completeError$2(this.error, this.stackTrace); + }, + $signature: 1 + }; P._BufferingStreamSubscription__sendError_sendError.prototype = { call$0: function() { var onError, t3, t4, @@ -5698,6 +5894,9 @@ listen$1: function(onData) { return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); }, + listen$2$cancelOnError: function(onData, cancelOnError) { + return this.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, null, null); + }, listen$2$onDone: function(onData, onDone) { return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, null); } @@ -5778,6 +5977,12 @@ } }; P._StreamIterator.prototype = {}; + P._cancelAndValue_closure.prototype = { + call$0: function() { + return this.future._complete$1(this.value); + }, + $signature: 0 + }; P.AsyncError.prototype = { toString$0: function(_) { return H.S(this.error); @@ -5909,6 +6114,16 @@ elementAt$1: function(receiver, index) { return this.$index(receiver, index); }, + forEach$1: function(receiver, action) { + var $length, i; + H.instanceType(receiver)._eval$1("~(ListMixin.E)")._as(action); + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + action.call$1(this.$index(receiver, i)); + if ($length !== this.get$length(receiver)) + throw H.wrapException(P.ConcurrentModificationError$(receiver)); + } + }, get$isNotEmpty: function(receiver) { return this.get$length(receiver) !== 0; }, @@ -5929,7 +6144,7 @@ t1._contents = t2 + ": "; t1._contents += H.S(v); }, - $signature: 7 + $signature: 8 }; P.MapMixin.prototype = { forEach$1: function(_, action) { @@ -6289,7 +6504,7 @@ C.JSArray_methods.$indexSet(t1, t2.i++, key); C.JSArray_methods.$indexSet(t1, t2.i++, value); }, - $signature: 7 + $signature: 8 }; P._JsonStringStringifier.prototype = { get$_partialResult: function() { @@ -6357,7 +6572,7 @@ return "0000" + n; return "00000" + n; }, - $signature: 8 + $signature: 9 }; P.Duration_toString_twoDigits.prototype = { call$1: function(n) { @@ -6365,7 +6580,7 @@ return "" + n; return "0" + n; }, - $signature: 8 + $signature: 9 }; P.Error.prototype = { get$stackTrace: function() { @@ -6605,6 +6820,9 @@ _addEventListener$3: function(receiver, type, listener, options) { return receiver.addEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), options); }, + _removeEventListener$3: function(receiver, type, listener, options) { + return receiver.removeEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), false); + }, $isEventTarget: 1 }; W.FormElement.prototype = { @@ -6637,7 +6855,7 @@ else t3.completeError$1(e); }, - $signature: 20 + $signature: 22 }; W.HttpRequestEventTarget.prototype = {}; W.MessageEvent.prototype = {$isMessageEvent: 1}; @@ -6665,12 +6883,62 @@ } }; W._ElementEventStreamImpl.prototype = {}; - W._EventStreamSubscription.prototype = {}; + W._EventStreamSubscription.prototype = { + cancel$0: function() { + var _this = this; + if (_this._target == null) + return $.$get$nullFuture(); + _this._unlisten$0(); + _this._target = null; + _this.set$_html$_onData(null); + return $.$get$nullFuture(); + }, + onData$1: function(handleData) { + var t1, _this = this; + _this.$ti._eval$1("~(1)?")._as(handleData); + if (_this._target == null) + throw H.wrapException(P.StateError$("Subscription has been canceled.")); + _this._unlisten$0(); + t1 = W._wrapZone(new W._EventStreamSubscription_onData_closure(handleData), type$.Event); + _this.set$_html$_onData(t1); + _this._tryResume$0(); + }, + _tryResume$0: function() { + var t2, + t1 = this._html$_onData; + if (t1 != null && true) { + t2 = this._target; + t2.toString; + J.addEventListener$3$x(t2, this._eventType, t1, false); + } + }, + _unlisten$0: function() { + var t3, + t1 = this._html$_onData, + t2 = t1 != null; + if (t2) { + t3 = this._target; + t3.toString; + type$.nullable_dynamic_Function_Event._as(t1); + if (t2) + J._removeEventListener$3$x(t3, this._eventType, t1, false); + } + }, + set$_html$_onData: function(_onData) { + this._html$_onData = type$.nullable_dynamic_Function_Event._as(_onData); + } + }; W._EventStreamSubscription_closure.prototype = { call$1: function(e) { return this.onData.call$1(type$.Event._as(e)); }, - $signature: 21 + $signature: 10 + }; + W._EventStreamSubscription_onData_closure.prototype = { + call$1: function(e) { + return this.handleData.call$1(type$.Event._as(e)); + }, + $signature: 10 }; P._AcceptStructuredClone.prototype = { findSlot$1: function(value) { @@ -6756,13 +7024,19 @@ J.$indexSet$ax(t1, key, t2); return t2; }, - $signature: 22 + $signature: 23 + }; + P._convertDartToNative_Value_closure.prototype = { + call$1: function(element) { + this.array.push(P._convertDartToNative_Value(element)); + }, + $signature: 2 }; P.convertDartToNative_Dictionary_closure.prototype = { call$2: function(key, value) { - this.object[key] = value; + this.object[key] = P._convertDartToNative_Value(value); }, - $signature: 23 + $signature: 24 }; P._AcceptStructuredCloneDart2Js.prototype = { forEachJsField$2: function(object, action) { @@ -6798,7 +7072,25 @@ return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent); } }; - N.Logger.prototype = { + Y.Level.prototype = { + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof Y.Level && this.value === other.value; + }, + get$hashCode: function(_) { + return this.value; + }, + toString$0: function(_) { + return this.name; + } + }; + L.LogRecord.prototype = { + toString$0: function(_) { + return "[" + this.level.name + "] " + this.loggerName + ": " + this.message; + } + }; + F.Logger.prototype = { get$fullName: function() { var t1 = this.parent, t2 = t1 == null || t1.name === "", @@ -6806,25 +7098,37 @@ return t2 ? t3 : t1.get$fullName() + "." + t3; }, get$level: function() { - return C.Level_INFO_800; + var effectiveLevel, t1; + if (this.parent == null) + effectiveLevel = this._level; + else { + t1 = $.$get$Logger_root(); + effectiveLevel = t1._level; + } + return effectiveLevel; }, log$4: function(logLevel, message, error, stackTrace) { - var t1 = logLevel.value; - if (t1 >= this.get$level().value) { + var record, _this = this, + t1 = logLevel.value; + if (t1 >= _this.get$level().value) { if (t1 >= 2000) { P.StackTrace_current(); logLevel.toString$0(0); } - t1 = this.get$fullName(); + t1 = _this.get$fullName(); Date.now(); $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1; - $.$get$Logger_root()._publish$1(new N.LogRecord(logLevel, message, t1)); + record = new L.LogRecord(logLevel, message, t1); + if (_this.parent == null) + _this._publish$1(record); + else + $.$get$Logger_root()._publish$1(record); } }, _publish$1: function(record) { } }; - N.Logger_Logger_closure.prototype = { + F.Logger_Logger_closure.prototype = { call$0: function() { var dot, $parent, t1, thisName = this.name; @@ -6832,58 +7136,47 @@ H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'")); dot = C.JSString_methods.lastIndexOf$1(thisName, "."); if (dot === -1) - $parent = thisName !== "" ? N.Logger_Logger("") : null; + $parent = thisName !== "" ? F.Logger_Logger("") : null; else { - $parent = N.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); + $parent = F.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); thisName = C.JSString_methods.substring$1(thisName, dot + 1); } - t1 = new N.Logger(thisName, $parent, new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_legacy_Logger)); - if ($parent != null) + t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger)); + if ($parent == null) + t1._level = C.Level_INFO_800; + else $parent._children.$indexSet(0, thisName, t1); return t1; }, - $signature: 24 - }; - N.Level.prototype = { - $eq: function(_, other) { - if (other == null) - return false; - return other instanceof N.Level && this.value === other.value; - }, - get$hashCode: function(_) { - return this.value; - }, - toString$0: function(_) { - return this.name; - } - }; - N.LogRecord.prototype = { - toString$0: function(_) { - return "[" + this.level.name + "] " + this.loggerName + ": " + this.message; - } + $signature: 25 }; M.SseClient.prototype = { SseClient$1: function(serverUrl) { - var t1, t2, t3, t4, _this = this, - clientId = T.generateUuidV4(); - _this._eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); + var t2, t3, t4, _this = this, + clientId = T.generateUuidV4(), + t1 = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); + _this._eventSource = t1; _this._serverUrl = serverUrl + "?sseClientId=" + clientId; - t1 = _this._outgoingController; - new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$onDone(_this.get$_onOutgoingMessage(), _this.get$_onOutgoingDone()); + t1 = new W._EventStream(t1, "open", false, type$._EventStream_legacy_Event); + t1.get$first(t1).whenComplete$1(new M.SseClient_closure(_this)); C.EventSource_methods.addEventListener$2(_this._eventSource, "message", _this.get$_onIncomingMessage()); C.EventSource_methods.addEventListener$2(_this._eventSource, "control", _this.get$_onIncomingControlMessage()); t1 = _this._eventSource; t2 = type$.nullable_void_Function_legacy_Event; - t3 = t2._as(new M.SseClient_closure(_this)); + t3 = t2._as(new M.SseClient_closure0(_this)); type$.nullable_void_Function._as(null); t4 = type$.legacy_Event; W._EventStreamSubscription$(t1, "open", t3, false, t4); - W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure0(_this)), false, t4); + W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure1(_this)), false, t4); }, close$0: function(_) { + var t1; this._eventSource.close(); + t1 = this._outgoingController; + if ((t1._state & 1) === 0) + new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$cancelOnError(null, true).asFuture$1$1(null, type$.dynamic); this._incomingController.close$0(0); - this._outgoingController.close$0(0); + t1.close$0(0); }, _onIncomingControlMessage$1: function(message) { var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true); @@ -6966,14 +7259,24 @@ } }; M.SseClient_closure.prototype = { + call$0: function() { + var t2, + t1 = this.$this; + t1._onConnected.complete$0(0); + t2 = t1._outgoingController; + new P._ControllerStream(t2, H._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$2$onDone(t1.get$_onOutgoingMessage(), t1.get$_onOutgoingDone()); + }, + $signature: 1 + }; + M.SseClient_closure0.prototype = { call$1: function(_) { var t1 = this.$this._errorTimer; if (t1 != null) t1.cancel$0(); }, - $signature: 10 + $signature: 12 }; - M.SseClient_closure0.prototype = { + M.SseClient_closure1.prototype = { call$1: function(error) { var t1 = this.$this, t2 = t1._errorTimer; @@ -6981,7 +7284,7 @@ if (t2 !== true) t1._errorTimer = P.Timer_Timer(C.Duration_5000000, new M.SseClient__closure(t1, error)); }, - $signature: 10 + $signature: 12 }; M.SseClient__closure.prototype = { call$0: function() { @@ -7006,19 +7309,19 @@ call$1: function(bitCount) { return this.random.nextInt$1(C.JSInt_methods._shlPositive$1(1, bitCount)); }, - $signature: 26 + $signature: 27 }; T.generateUuidV4__printDigits.prototype = { call$2: function(value, count) { return C.JSString_methods.padLeft$2(C.JSInt_methods.toRadixString$1(value, 16), count, "0"); }, - $signature: 11 + $signature: 13 }; T.generateUuidV4__bitsDigits.prototype = { call$2: function(bitCount, digitCount) { return this._printDigits.call$2(this._generateBits.call$1(bitCount), digitCount); }, - $signature: 11 + $signature: 13 }; R.StreamChannelMixin.prototype = {}; E.main_closure.prototype = { @@ -7026,7 +7329,7 @@ type$.legacy_MouseEvent._as(_); this.channel._outgoingController.close$0(0); }, - $signature: 27 + $signature: 28 }; E.main_closure0.prototype = { call$1: function(s) { @@ -7058,7 +7361,7 @@ t1.add$1(0, H._instanceType(t1)._precomputed1._as(s)); } }, - $signature: 28 + $signature: 29 }; (function aliases() { var _ = J.Interceptor.prototype; @@ -7078,32 +7381,33 @@ _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 3); _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 3); _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); + _static_1(P, "async___nullDataHandler$closure", "_nullDataHandler", 2); _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 6); _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); - _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 17, 0); + _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 20, 0); _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 6); _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4); var _; - _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 9); - _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 9); + _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 11); + _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 11); _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0); - _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 25); + _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 26); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(P.Object, null); - _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, H.Closure, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, H._Type, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, N.Logger, N.Level, N.LogRecord, R.StreamChannelMixin]); + _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, H.Closure, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, H._Type, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, Y.Level, L.LogRecord, F.Logger, R.StreamChannelMixin]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]); _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); _inherit(J.JSUnmodifiableArray, J.JSArray); _inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]); _inheritMany(P.Error, [H.LateError, H.NotNullableError, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); + _inheritMany(H.Closure, [H.nullFuture_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); _inherit(H.EfficientLengthIterable, P.Iterable); _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]); _inherit(H.NullError, P.TypeError); - _inheritMany(H.Closure, [H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, N.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); _inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]); _inherit(H._AssertionError, P.AssertionError); _inherit(P.MapBase, P.MapMixin); @@ -7154,12 +7458,12 @@ mangledNames: {}, getTypeFromName: getGlobalFromName, metadata: [], - types: ["~()", "Null()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "~(Event*)", "Null(Event*)", "String*(int*,int*)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "Null(Object,StackTrace)", "_Future<@>(@)", "~(ProgressEvent)", "~(Event)", "@(@,@)", "~(@,@)", "Logger*()", "~(String*)", "int*(int*)", "Null(MouseEvent*)", "Null(String*)"], + types: ["~()", "Null()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "Null(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "~(Event)", "~(Event*)", "Null(Event*)", "String*(int*,int*)", "Future()", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "_Future<@>(@)", "~(ProgressEvent)", "@(@,@)", "~(@,@)", "Logger*()", "~(String*)", "int*(int*)", "Null(MouseEvent*)", "Null(String*)"], interceptorsByTag: null, leafTags: null, arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti" }; - H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"NotNullableError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncCompleter":{"_Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}')); + H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"NotNullableError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}')); H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"Codec":2,"StreamChannelMixin":1}')); 0; var type$ = (function rtii() { @@ -7178,7 +7482,6 @@ JSNull: findType("JSNull"), JavaScriptFunction: findType("JavaScriptFunction"), JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), - JsLinkedHashMap_of_legacy_String_and_legacy_Logger: findType("JsLinkedHashMap"), List_dynamic: findType("List<@>"), Map_dynamic_dynamic: findType("Map<@,@>"), Null: findType("Null"), @@ -7188,8 +7491,11 @@ String: findType("String"), UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), _AsyncCompleter_HttpRequest: findType("_AsyncCompleter"), + _AsyncCompleter_dynamic: findType("_AsyncCompleter<@>"), _ElementEventStreamImpl_legacy_MouseEvent: findType("_ElementEventStreamImpl"), + _EventStream_legacy_Event: findType("_EventStream"), _Future_HttpRequest: findType("_Future"), + _Future_Null: findType("_Future"), _Future_dynamic: findType("_Future<@>"), _Future_int: findType("_Future"), _Future_void: findType("_Future<~>"), @@ -7204,6 +7510,7 @@ dynamic_Function_dynamic_dynamic: findType("@(@,@)"), int: findType("int"), legacy_Event: findType("Event*"), + legacy_Logger: findType("Logger*"), legacy_MessageEvent: findType("MessageEvent*"), legacy_MouseEvent: findType("MouseEvent*"), legacy_Never: findType("0&*"), @@ -7371,9 +7678,9 @@ C.Duration_5000000 = new P.Duration(5000000); C.JsonDecoder_null = new P.JsonDecoder(null); C.JsonEncoder_null = new P.JsonEncoder(null); - C.Level_INFO_800 = new N.Level("INFO", 800); - C.Level_SEVERE_1000 = new N.Level("SEVERE", 1000); - C.Level_WARNING_900 = new N.Level("WARNING", 900); + C.Level_INFO_800 = new Y.Level("INFO", 800); + C.Level_SEVERE_1000 = new Y.Level("SEVERE", 1000); + C.Level_WARNING_900 = new Y.Level("WARNING", 900); })(); (function staticFields() { $._JS_INTEROP_INTERCEPTOR_TAG = null; @@ -7392,8 +7699,8 @@ $._isInCallbackLoop = false; $.Zone__current = C.C__RootZone; $._toStringVisiting = H.setRuntimeTypeInfo([], H.findType("JSArray")); - $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, H.findType("Logger*")); $.LogRecord__nextNumber = 0; + $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger); })(); (function lazyInitializers() { var _lazyFinal = hunkHelpers.lazyFinal, @@ -7402,6 +7709,9 @@ _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() { return H.getIsolateAffinityTag("_$dart_dartClosure"); }); + _lazyFinal($, "nullFuture", "$get$nullFuture", function() { + return C.C__RootZone.run$1$1(new H.nullFuture_closure(), H.findType("Future")); + }); _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({ toString: function() { @@ -7421,7 +7731,7 @@ }); _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = '$arguments$'; + var $argumentsExpr$ = "$arguments$"; try { null.$method$($argumentsExpr$); } catch (e) { @@ -7434,7 +7744,7 @@ }); _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = '$arguments$'; + var $argumentsExpr$ = "$arguments$"; try { (void 0).$method$($argumentsExpr$); } catch (e) { @@ -7470,15 +7780,13 @@ return P._AsyncRun__initializeScheduleImmediate(); }); _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", function() { - var t1 = new P._Future(C.C__RootZone, H.findType("_Future")); - t1._setValue$1(null); - return t1; + return type$._Future_Null._as($.$get$nullFuture()); }); _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() { return new Error().stack != void 0; }); _lazyOld($, "Logger_root", "$get$Logger_root", function() { - return N.Logger_Logger(""); + return F.Logger_Logger(""); }); })(); (function nativeSupport() { @@ -7521,7 +7829,7 @@ callback(null); return; } - if (typeof document.currentScript != 'undefined') { + if (typeof document.currentScript != "undefined") { callback(document.currentScript); return; } @@ -7535,10 +7843,11 @@ scripts[i].addEventListener("load", onLoad, false); })(function(currentScript) { init.currentScript = currentScript; + var callMain = E.main; if (typeof dartMainRunner === "function") - dartMainRunner(E.main, []); + dartMainRunner(callMain, []); else - E.main([]); + callMain([]); }); })(); From 2b9ddda2ae27e0f84893299f7e494c1b90719da8 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Mon, 8 Feb 2021 18:11:05 -0800 Subject: [PATCH 049/115] Prevent onDone error (dart-lang/sse#40) --- pkgs/sse/CHANGELOG.md | 5 +++++ pkgs/sse/lib/client/sse_client.dart | 5 ++--- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/web/index.dart.js | 13 +++++++------ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index bf7899e63..0ed01c94f 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.8.1 + +- Fix an issue where closing the `SseConnection` stream would result in + an error. + ## 3.8.0 - Add `onConnected` to replace `onOpen`. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 22aeb412c..2958bed4f 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -82,10 +82,9 @@ class SseClient extends StreamChannelMixin { void close() { _eventSource.close(); - // If the _outgoingController doesn't have a listener that means the - // initial connection was never established. Add a listener so close + // If the initial connection was never established. Add a listener so close // adds a done event to [sink]. - if (!_outgoingController.hasListener) _outgoingController.stream.drain(); + if (!_onConnected.isCompleted) _outgoingController.stream.drain(); _incomingController.close(); _outgoingController.close(); } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 8f15aff6e..9a44e4c57 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.8.0 +version: 3.8.1 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index 034c69b77..614df0702 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -7170,13 +7170,14 @@ W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure1(_this)), false, t4); }, close$0: function(_) { - var t1; - this._eventSource.close(); - t1 = this._outgoingController; - if ((t1._state & 1) === 0) + var t1, _this = this; + _this._eventSource.close(); + if (_this._onConnected.future._state === 0) { + t1 = _this._outgoingController; new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$cancelOnError(null, true).asFuture$1$1(null, type$.dynamic); - this._incomingController.close$0(0); - t1.close$0(0); + } + _this._incomingController.close$0(0); + _this._outgoingController.close$0(0); }, _onIncomingControlMessage$1: function(message) { var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true); From 5737af143769e8777ad9e0fd47e964b678fba1ef Mon Sep 17 00:00:00 2001 From: Leon Senft Date: Thu, 11 Feb 2021 15:44:15 -0800 Subject: [PATCH 050/115] Complete `onConnected` with error if connection fails to open (dart-lang/sse#42) * Complete `onConnected` with error if connection fails to open This prevents `onConnected` from hanging indefinitely if the `SseClient` immediately fails to open. Fixes https://github.com/dart-lang/sse/issues/41. * Recompile the test app * Add changelog entry and update version --- pkgs/sse/CHANGELOG.md | 5 + pkgs/sse/lib/client/sse_client.dart | 5 + pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/web/index.dart.js | 138 ++++++++++++---------------- 4 files changed, 70 insertions(+), 80 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 0ed01c94f..4b921c206 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.8.2 + +- Complete `onConnected` with an error if the `SseClient` receives an error + before the connection is successfully opened. + ## 3.8.1 - Fix an issue where closing the `SseConnection` stream would result in diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 2958bed4f..00def1004 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -57,6 +57,11 @@ class SseClient extends StreamChannelMixin { _errorTimer = Timer(const Duration(seconds: 5), () { _incomingController.addError(error); close(); + if (!_onConnected.isCompleted) { + // This call must happen after the call to close() which checks + // whether the completer was completed earlier. + _onConnected.completeError(error); + } }); } }); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 9a44e4c57..a99fd0237 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.8.1 +version: 3.8.2 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index 614df0702..5f962b981 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.12.0-223.0.dev. +// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.12.0-133.2.beta. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -27,14 +27,6 @@ to[key] = from[key]; } } - function mixinProperties(from, to) { - var keys = Object.keys(from); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!to.hasOwnProperty(key)) - to[key] = from[key]; - } - } var supportsDirectProtoAccess = function() { var cls = function() { }; @@ -66,7 +58,7 @@ for (var j = 0; j < keys.length; j++) { var key = keys[j]; var f = holder[key]; - if (typeof f == "function") + if (typeof f == 'function') f.name = key; } } @@ -89,7 +81,7 @@ inherit(classes[i], sup); } function mixin(cls, mixin) { - mixinProperties(mixin.prototype, cls.prototype); + copyProperties(mixin.prototype, cls.prototype); cls.prototype.constructor = cls; } function lazyOld(holder, name, getterName, initializer) { @@ -178,7 +170,7 @@ var funs = []; for (var i = 0; i < funsOrNames.length; i++) { var fun = funsOrNames[i]; - if (typeof fun == "string") + if (typeof fun == 'string') fun = container[fun]; fun.$callName = callNames[i]; funs.push(fun); @@ -267,7 +259,7 @@ LateError: function LateError(t0) { this._message = t0; }, - nullFuture_closure: function nullFuture_closure() { + closure: function closure() { }, NotNullableError: function NotNullableError(t0, t1) { this.__internal$_name = t0; @@ -455,7 +447,7 @@ }, TypeErrorDecoder_extractPattern: function(message) { var match, $arguments, argumentsExpr, expr, method, receiver; - message = H.quoteStringForRegExp(message.replace(String({}), "$receiver$")); + message = H.quoteStringForRegExp(message.replace(String({}), '$receiver$')); match = message.match(/\\\$[a-zA-Z]+\\\$/g); if (match == null) match = H.setRuntimeTypeInfo([], type$.JSArray_String); @@ -464,11 +456,11 @@ expr = match.indexOf("\\$expr\\$"); method = match.indexOf("\\$method\\$"); receiver = match.indexOf("\\$receiver\\$"); - return new H.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); + return new H.TypeErrorDecoder(message.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'), '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); }, TypeErrorDecoder_provokeCallErrorOn: function(expression) { return function($expr$) { - var $argumentsExpr$ = "$arguments$"; + var $argumentsExpr$ = '$arguments$'; try { $expr$.$method$($argumentsExpr$); } catch (e) { @@ -2898,6 +2890,22 @@ }($function, 1); return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); }, + Future_Future$value: function(value, $T) { + var t1 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")); + t1._asyncComplete$1(value); + return t1; + }, + _Future__chainForeignFuture: function(source, target) { + var e, s, exception; + target._state = 1; + try { + source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), type$.Null); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s)); + } + }, _Future__chainCoreFuture: function(source, target) { var t1, t2, listeners; for (t1 = type$._Future_dynamic; t2 = source._state, t2 === 2;) @@ -2974,26 +2982,17 @@ $.Zone__current = oldZone; t1 = _box_0.listenerValueOrError; if (t4._is(t1)) { - t5 = _box_0.listener.$ti; - t5 = t5._eval$1("Future<2>")._is(t1) || !t5._rest[1]._is(t1); - } else - t5 = false; - if (t5) { - t4._as(t1); result = _box_0.listener.result; - if (t1 instanceof P._Future) - if (t1._state >= 4) { - current = t3._as(result._resultOrListeners); - result._resultOrListeners = null; - listeners = result._reverseListeners$1(current); - result._state = t1._state; - result._resultOrListeners = t1._resultOrListeners; - _box_1.source = t1; - continue; - } else - P._Future__chainCoreFuture(t1, result); - else - result._chainForeignFuture$1(t1); + if (t1._state >= 4) { + current = t3._as(result._resultOrListeners); + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + result._state = t1._state; + result._resultOrListeners = t1._resultOrListeners; + _box_1.source = t1; + continue; + } else + P._Future__chainCoreFuture(t1, result); return; } } @@ -3023,7 +3022,7 @@ t1 = type$.dynamic_Function_Object; if (t1._is(errorHandler)) return t1._as(errorHandler); - throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a valid result")); + throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result")); }, _microtaskLoop: function() { var entry, next; @@ -3263,13 +3262,13 @@ this.$this = t1; }, _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) { - this.$this = t0; + this.target = t0; }, _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) { - this.$this = t0; + this.target = t0; }, _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) { - this.$this = t0; + this.target = t0; this.e = t1; this.s = t2; }, @@ -4449,11 +4448,9 @@ return message != null ? "LateInitializationError: " + message : "LateInitializationError"; } }; - H.nullFuture_closure.prototype = { + H.closure.prototype = { call$0: function() { - var t1 = new P._Future($.Zone__current, type$._Future_Null); - t1._asyncComplete$1(null); - return t1; + return P.Future_Future$value(null, type$.Null); }, $signature: 14 }; @@ -5192,17 +5189,6 @@ } return prev; }, - _chainForeignFuture$1: function(source) { - var e, s, exception, _this = this; - _this._state = 1; - try { - source.then$1$2$onError(new P._Future__chainForeignFuture_closure(_this), new P._Future__chainForeignFuture_closure0(_this), type$.Null); - } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(_this, e, s)); - } - }, _complete$1: function(value) { var listeners, _this = this, t1 = _this.$ti; @@ -5211,7 +5197,7 @@ if (t1._is(value)) P._Future__chainCoreFuture(value, _this); else - _this._chainForeignFuture$1(value); + P._Future__chainForeignFuture(value, _this); else { listeners = _this._removeListeners$0(); t1._precomputed1._as(value); @@ -5264,7 +5250,7 @@ P._Future__chainCoreFuture(value, _this); return; } - _this._chainForeignFuture$1(value); + P._Future__chainForeignFuture(value, _this); }, _asyncCompleteError$2: function(error, stackTrace) { type$.StackTrace._as(stackTrace); @@ -5287,28 +5273,21 @@ }; P._Future__chainForeignFuture_closure.prototype = { call$1: function(value) { - var error, stackTrace, exception, - t1 = this.$this; + var t1 = this.target; t1._state = 0; - try { - t1._completeWithValue$1(t1.$ti._precomputed1._as(value)); - } catch (exception) { - error = H.unwrapException(exception); - stackTrace = H.getTraceFromException(exception); - t1._completeError$2(error, stackTrace); - } + t1._complete$1(value); }, $signature: 5 }; P._Future__chainForeignFuture_closure0.prototype = { call$2: function(error, stackTrace) { - this.$this._completeError$2(error, type$.StackTrace._as(stackTrace)); + this.target._completeError$2(error, type$.StackTrace._as(stackTrace)); }, $signature: 7 }; P._Future__chainForeignFuture_closure1.prototype = { call$0: function() { - this.$this._completeError$2(this.e, this.s); + this.target._completeError$2(this.e, this.s); }, $signature: 0 }; @@ -6887,11 +6866,11 @@ cancel$0: function() { var _this = this; if (_this._target == null) - return $.$get$nullFuture(); + return null; _this._unlisten$0(); _this._target = null; _this.set$_html$_onData(null); - return $.$get$nullFuture(); + return null; }, onData$1: function(handleData) { var t1, _this = this; @@ -7303,6 +7282,9 @@ else if ((t3 & 3) === 0) t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, stackTrace)); t1.close$0(0); + t1 = t1._onConnected; + if (t1.future._state === 0) + t1.completeError$1(error); }, $signature: 1 }; @@ -7405,7 +7387,7 @@ _inherit(J.JSUnmodifiableArray, J.JSArray); _inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]); _inheritMany(P.Error, [H.LateError, H.NotNullableError, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); - _inheritMany(H.Closure, [H.nullFuture_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); + _inheritMany(H.Closure, [H.closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); _inherit(H.EfficientLengthIterable, P.Iterable); _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]); _inherit(H.NullError, P.TypeError); @@ -7496,7 +7478,6 @@ _ElementEventStreamImpl_legacy_MouseEvent: findType("_ElementEventStreamImpl"), _EventStream_legacy_Event: findType("_EventStream"), _Future_HttpRequest: findType("_Future"), - _Future_Null: findType("_Future"), _Future_dynamic: findType("_Future<@>"), _Future_int: findType("_Future"), _Future_void: findType("_Future<~>"), @@ -7711,7 +7692,7 @@ return H.getIsolateAffinityTag("_$dart_dartClosure"); }); _lazyFinal($, "nullFuture", "$get$nullFuture", function() { - return C.C__RootZone.run$1$1(new H.nullFuture_closure(), H.findType("Future")); + return C.C__RootZone.run$1$1(new H.closure(), H.findType("Future")); }); _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({ @@ -7732,7 +7713,7 @@ }); _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = "$arguments$"; + var $argumentsExpr$ = '$arguments$'; try { null.$method$($argumentsExpr$); } catch (e) { @@ -7745,7 +7726,7 @@ }); _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = "$arguments$"; + var $argumentsExpr$ = '$arguments$'; try { (void 0).$method$($argumentsExpr$); } catch (e) { @@ -7781,7 +7762,7 @@ return P._AsyncRun__initializeScheduleImmediate(); }); _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", function() { - return type$._Future_Null._as($.$get$nullFuture()); + return H.findType("_Future")._as($.$get$nullFuture()); }); _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() { return new Error().stack != void 0; @@ -7830,7 +7811,7 @@ callback(null); return; } - if (typeof document.currentScript != "undefined") { + if (typeof document.currentScript != 'undefined') { callback(document.currentScript); return; } @@ -7844,11 +7825,10 @@ scripts[i].addEventListener("load", onLoad, false); })(function(currentScript) { init.currentScript = currentScript; - var callMain = E.main; if (typeof dartMainRunner === "function") - dartMainRunner(callMain, []); + dartMainRunner(E.main, []); else - callMain([]); + E.main([]); }); })(); From 64e56f739e1cf22c0c633c09b5c1b53b5e5bae41 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Fri, 26 Feb 2021 10:52:21 -0800 Subject: [PATCH 051/115] update to the latest shelf and remove dead code (dart-lang/sse#43) * update to the latest shelf and remove dead code * remove stable tests * catch only StateErrors --- pkgs/sse/.travis.yml | 1 - pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/lib/src/server/sse_handler.dart | 3 +-- pkgs/sse/pubspec.yaml | 12 ++++++++---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml index d6bce8f49..8a0591514 100644 --- a/pkgs/sse/.travis.yml +++ b/pkgs/sse/.travis.yml @@ -5,7 +5,6 @@ addons: dart: - dev - - 2.2.0 with_content_shell: false diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 4b921c206..5a733a0dc 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.8.3-dev + +- Require the latest shelf and remove dead code. + ## 3.8.2 - Complete `onConnected` with an error if the `SseClient` receives an error diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 0f450bb10..8dec99e80 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -97,7 +97,7 @@ class SseConnection extends StreamChannelMixin { _sink.add('data: ${json.encode(data)}\n'); _sink.add('\n'); await _outgoingStreamQueue.next; // Consume from stream if no errors. - } catch (StateError) { + } on StateError catch (_) { if (_keepAlive == null || _closedCompleter.isCompleted) { rethrow; } @@ -239,7 +239,6 @@ class SseHandler { _connections[clientId]?._handleDisconnect(); }); }); - return shelf.Response.notFound(''); } String _getOriginalPath(shelf.Request req) => req.requestedUri.path; diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index a99fd0237..2197e6079 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.8.2 +version: 3.8.3-dev homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional @@ -12,12 +12,16 @@ environment: dependencies: async: ^2.0.8 collection: ^1.0.0 - logging: ^0.11.3+2 + logging: '>=0.11.3+2 <2.0.0' pedantic: ^1.4.0 stream_channel: '>=1.6.8 <3.0.0' - shelf: ^0.7.4 + shelf: ^1.1.0 dev_dependencies: - shelf_static: ^0.2.8 + shelf_static: '>=0.2.8 <2.0.0' test: ^1.5.3 webdriver: ^2.1.0 + +dependency_overrides: + shelf: + git: https://github.com/dart-lang/shelf.git From a751de9593600c1c6451725fd01ed1916857f408 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 17 Mar 2021 12:48:51 -0700 Subject: [PATCH 052/115] prep to publish (dart-lang/sse#45) --- pkgs/sse/CHANGELOG.md | 2 +- pkgs/sse/pubspec.yaml | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 5a733a0dc..50de15eb7 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,4 +1,4 @@ -## 3.8.3-dev +## 3.8.3 - Require the latest shelf and remove dead code. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 2197e6079..0c67e5cc4 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.8.3-dev +version: 3.8.3 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional @@ -20,8 +20,4 @@ dependencies: dev_dependencies: shelf_static: '>=0.2.8 <2.0.0' test: ^1.5.3 - webdriver: ^2.1.0 - -dependency_overrides: - shelf: - git: https://github.com/dart-lang/shelf.git + webdriver: ^3.0.0 From ebdb7ac1ab243645b3a3ea82ea952d274fb9f770 Mon Sep 17 00:00:00 2001 From: Franklin Yow <58489007+franklinyow@users.noreply.github.com> Date: Tue, 6 Apr 2021 15:17:15 -0700 Subject: [PATCH 053/115] Update LICENSE (dart-lang/sse#46) Changes to comply with internal review --- pkgs/sse/LICENSE | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/LICENSE b/pkgs/sse/LICENSE index f75d7c237..a0d5f5431 100644 --- a/pkgs/sse/LICENSE +++ b/pkgs/sse/LICENSE @@ -1,4 +1,5 @@ -Copyright 2019, the Dart project authors. All rights reserved. +Copyright 2019, the Dart project authors. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -9,7 +10,7 @@ met: copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. From ac239790ebbf645e05b4c518f7e0a34c866844b3 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Tue, 11 May 2021 09:56:19 -0700 Subject: [PATCH 054/115] Migrate to null safety (dart-lang/sse#50) * Support null safety * update api * review cleanup --- pkgs/sse/CHANGELOG.md | 4 + pkgs/sse/lib/client/sse_client.dart | 12 +- pkgs/sse/lib/src/server/sse_handler.dart | 32 +- pkgs/sse/pubspec.yaml | 4 +- pkgs/sse/test/sse_test.dart | 8 +- pkgs/sse/test/web/index.dart | 2 +- pkgs/sse/test/web/index.dart.js | 1123 +++++++++++----------- 7 files changed, 575 insertions(+), 610 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 50de15eb7..932dc54f0 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.0.0 + +- Support null safety. + ## 3.8.3 - Require the latest shelf and remove dead code. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 00def1004..0f1da876d 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -15,7 +15,7 @@ import '../src/util/uuid.dart'; /// /// The client can send any JSON-encodable messages to the server by adding /// them to the [sink] and listen to messages from the server on the [stream]. -class SseClient extends StreamChannelMixin { +class SseClient extends StreamChannelMixin { final _incomingController = StreamController(); final _outgoingController = StreamController(); @@ -26,11 +26,11 @@ class SseClient extends StreamChannelMixin { int _lastMessageId = -1; - EventSource _eventSource; + late EventSource _eventSource; - String _serverUrl; + late String _serverUrl; - Timer _errorTimer; + Timer? _errorTimer; /// [serverUrl] is the URL under which the server is listening for /// incoming bi-directional SSE connections. @@ -113,8 +113,8 @@ class SseClient extends StreamChannelMixin { close(); } - void _onOutgoingMessage(String message) async { - String encodedMessage; + void _onOutgoingMessage(String? message) async { + String? encodedMessage; try { encodedMessage = jsonEncode(message); } on JsonUnsupportedObjectError catch (e) { diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 8dec99e80..d8a867e7e 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -13,12 +13,12 @@ import 'package:shelf/shelf.dart' as shelf; import 'package:stream_channel/stream_channel.dart'; // RFC 2616 requires carriage return delimiters. -String _sseHeaders(String origin) => 'HTTP/1.1 200 OK\r\n' +String _sseHeaders(String? origin) => 'HTTP/1.1 200 OK\r\n' 'Content-Type: text/event-stream\r\n' 'Cache-Control: no-cache\r\n' 'Connection: keep-alive\r\n' - 'Access-Control-Allow-Credentials: true\r\n' - 'Access-Control-Allow-Origin: $origin\r\n' + 'Access-Control-Allow-Credentials: true\r\n' + "${origin != null ? 'Access-Control-Allow-Origin: $origin\r\n' : ''}" '\r\n\r\n'; class _SseMessage { @@ -28,7 +28,7 @@ class _SseMessage { } /// A bi-directional SSE connection between server and browser. -class SseConnection extends StreamChannelMixin { +class SseConnection extends StreamChannelMixin { /// Incoming messages from the Browser client. final _incomingController = StreamController(); @@ -38,10 +38,10 @@ class SseConnection extends StreamChannelMixin { Sink _sink; /// How long to wait after a connection drops before considering it closed. - final Duration _keepAlive; + final Duration? _keepAlive; /// A timer counting down the KeepAlive period (null if hasn't disconnected). - Timer _keepAliveTimer; + Timer? _keepAliveTimer; /// Whether this connection is currently in the KeepAlive timeout period. bool get isInKeepAlivePeriod => _keepAliveTimer?.isActive ?? false; @@ -57,7 +57,7 @@ class SseConnection extends StreamChannelMixin { /// Wraps the `_outgoingController.stream` to buffer events to enable keep /// alive. - StreamQueue _outgoingStreamQueue; + late StreamQueue _outgoingStreamQueue; /// Creates an [SseConnection] for the supplied [_sink]. /// @@ -67,7 +67,7 @@ class SseConnection extends StreamChannelMixin { /// /// If [keepAlive] is not supplied, the connection will be closed immediately /// after a disconnect. - SseConnection(this._sink, {Duration keepAlive}) : _keepAlive = keepAlive { + SseConnection(this._sink, {Duration? keepAlive}) : _keepAlive = keepAlive { _outgoingStreamQueue = StreamQueue(_outgoingController.stream); unawaited(_setUpListener()); _outgoingController.onCancel = _close; @@ -154,7 +154,7 @@ class SseConnection extends StreamChannelMixin { // been completely closed, set a timer to close after the timeout period. // If the connection comes back, this will be cancelled and all messages left // in the queue tried again. - _keepAliveTimer = Timer(_keepAlive, _close); + _keepAliveTimer = Timer(_keepAlive!, _close); } } @@ -187,11 +187,11 @@ class SseConnection extends StreamChannelMixin { class SseHandler { final _logger = Logger('SseHandler'); final Uri _uri; - final Duration _keepAlive; - final _connections = {}; + final Duration? _keepAlive; + final _connections = {}; final _connectionController = StreamController(); - StreamQueue _connectionsStream; + StreamQueue? _connectionsStream; /// [_uri] is the URL under which the server is listening for /// incoming bi-directional SSE connections. @@ -203,7 +203,7 @@ class SseHandler { /// /// If [keepAlive] is not supplied, connections will be closed immediately /// after a disconnect. - SseHandler(this._uri, {Duration keepAlive}) : _keepAlive = keepAlive; + SseHandler(this._uri, {Duration? keepAlive}) : _keepAlive = keepAlive; StreamQueue get connections => _connectionsStream ??= StreamQueue(_connectionController.stream); @@ -221,8 +221,8 @@ class SseHandler { // Check if we already have a connection for this ID that is in the process // of timing out (in which case we can reconnect it transparently). if (_connections[clientId] != null && - _connections[clientId].isInKeepAlivePeriod) { - _connections[clientId]._acceptReconnection(sink); + _connections[clientId]!.isInKeepAlivePeriod) { + _connections[clientId]!._acceptReconnection(sink); } else { var connection = SseConnection(sink, keepAlive: _keepAlive); _connections[clientId] = connection; @@ -280,7 +280,7 @@ class SseHandler { String _originFor(shelf.Request req) => // Firefox does not set header "origin". // https://bugzilla.mozilla.org/show_bug.cgi?id=1508661 - req.headers['origin'] ?? req.headers['host']; + req.headers['origin'] ?? req.headers['host']!; /// Immediately close all connections, ignoring any keepAlive periods. void shutdown() { diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 0c67e5cc4..6f637fe31 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 3.8.3 +version: 4.0.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional @@ -7,7 +7,7 @@ description: >- requests. environment: - sdk: ">=2.2.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' dependencies: async: ^2.0.8 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index cbd8e6d9e..ad84d7e88 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -16,10 +16,10 @@ import 'package:test/test.dart'; import 'package:webdriver/io.dart'; void main() { - HttpServer server; - WebDriver webdriver; - SseHandler handler; - Process chromeDriver; + late HttpServer server; + late WebDriver webdriver; + late SseHandler handler; + late Process chromeDriver; setUpAll(() async { try { diff --git a/pkgs/sse/test/web/index.dart b/pkgs/sse/test/web/index.dart index 7d007573d..e149372aa 100644 --- a/pkgs/sse/test/web/index.dart +++ b/pkgs/sse/test/web/index.dart @@ -9,7 +9,7 @@ import 'package:sse/client/sse_client.dart'; void main() { var channel = SseClient('/test'); - document.querySelector('button').onClick.listen((_) { + document.querySelector('button')!.onClick.listen((_) { channel.sink.close(); }); diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index 5f962b981..741866a07 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.12.0-133.2.beta. +// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.13.0-203.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -27,6 +27,14 @@ to[key] = from[key]; } } + function mixinProperties(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!to.hasOwnProperty(key)) + to[key] = from[key]; + } + } var supportsDirectProtoAccess = function() { var cls = function() { }; @@ -58,7 +66,7 @@ for (var j = 0; j < keys.length; j++) { var key = keys[j]; var f = holder[key]; - if (typeof f == 'function') + if (typeof f == "function") f.name = key; } } @@ -81,7 +89,7 @@ inherit(classes[i], sup); } function mixin(cls, mixin) { - copyProperties(mixin.prototype, cls.prototype); + mixinProperties(mixin.prototype, cls.prototype); cls.prototype.constructor = cls; } function lazyOld(holder, name, getterName, initializer) { @@ -170,7 +178,7 @@ var funs = []; for (var i = 0; i < funsOrNames.length; i++) { var fun = funsOrNames[i]; - if (typeof fun == 'string') + if (typeof fun == "string") fun = container[fun]; fun.$callName = callNames[i]; funs.push(fun); @@ -248,9 +256,10 @@ var C = {}, H = {JS_CONST: function JS_CONST() { }, + LateError$fieldNI: function(fieldName) { + return new H.LateError("Field '" + fieldName + "' has not been initialized."); + }, checkNotNullable: function(value, $name, $T) { - if (value == null) - throw H.wrapException(new H.NotNullableError($name, $T._eval$1("NotNullableError<0>"))); return value; }, IterableElementError_noElement: function() { @@ -259,11 +268,7 @@ LateError: function LateError(t0) { this._message = t0; }, - closure: function closure() { - }, - NotNullableError: function NotNullableError(t0, t1) { - this.__internal$_name = t0; - this.$ti = t1; + nullFuture_closure: function nullFuture_closure() { }, EfficientLengthIterable: function EfficientLengthIterable() { }, @@ -308,8 +313,6 @@ else if (value == null) return "null"; res = J.toString$0$(value); - if (typeof res != "string") - throw H.wrapException(H.argumentErrorValue(value)); return res; }, Primitives_objectHashCode: function(object) { @@ -321,10 +324,8 @@ return hash; }, Primitives_parseInt: function(source, radix) { - var match, decimalMatch; - if (typeof source != "string") - H.throwExpression(H.argumentErrorValue(source)); - match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); + var decimalMatch, + match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); if (match == null) return null; if (3 >= match.length) @@ -340,26 +341,27 @@ return H.Primitives__objectTypeNameNewRti(object); }, Primitives__objectTypeNameNewRti: function(object) { - var dispatchName, $constructor, constructorName; + var dispatchName, t1, $constructor, constructorName; if (object instanceof P.Object) return H._rtiToString(H.instanceType(object), null); if (J.getInterceptor$(object) === C.Interceptor_methods || type$.UnknownJavaScriptObject._is(object)) { dispatchName = C.C_JS_CONST(object); - if (H.Primitives__saneNativeClassName(dispatchName)) + t1 = dispatchName !== "Object" && dispatchName !== ""; + if (t1) return dispatchName; $constructor = object.constructor; if (typeof $constructor == "function") { constructorName = $constructor.name; - if (typeof constructorName == "string" && H.Primitives__saneNativeClassName(constructorName)) + if (typeof constructorName == "string") + t1 = constructorName !== "Object" && constructorName !== ""; + else + t1 = false; + if (t1) return constructorName; } } return H._rtiToString(H.instanceType(object), null); }, - Primitives__saneNativeClassName: function($name) { - var t1 = $name !== "Object" && $name !== ""; - return t1; - }, Primitives_stringFromCharCode: function(charCode) { var bits; if (charCode <= 65535) @@ -396,32 +398,20 @@ Primitives_getMilliseconds: function(receiver) { return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0 : H.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; }, - iae: function(argument) { - throw H.wrapException(H.argumentErrorValue(argument)); - }, ioore: function(receiver, index) { if (receiver == null) J.get$length$asx(receiver); throw H.wrapException(H.diagnoseIndexError(receiver, index)); }, diagnoseIndexError: function(indexable, index) { - var $length, t1, _s5_ = "index"; + var $length, _s5_ = "index"; if (!H._isInt(index)) return new P.ArgumentError(true, index, _s5_, null); - $length = H._asIntS(J.get$length$asx(indexable)); - if (!(index < 0)) { - if (typeof $length !== "number") - return H.iae($length); - t1 = index >= $length; - } else - t1 = true; - if (t1) + $length = H._asInt(J.get$length$asx(indexable)); + if (index < 0 || index >= $length) return P.IndexError$(index, indexable, _s5_, null, $length); return P.RangeError$value(index, _s5_); }, - argumentErrorValue: function(object) { - return new P.ArgumentError(true, object, null, null); - }, wrapException: function(ex) { var wrapper, t1; if (ex == null) @@ -447,7 +437,7 @@ }, TypeErrorDecoder_extractPattern: function(message) { var match, $arguments, argumentsExpr, expr, method, receiver; - message = H.quoteStringForRegExp(message.replace(String({}), '$receiver$')); + message = H.quoteStringForRegExp(message.replace(String({}), "$receiver$")); match = message.match(/\\\$[a-zA-Z]+\\\$/g); if (match == null) match = H.setRuntimeTypeInfo([], type$.JSArray_String); @@ -456,11 +446,11 @@ expr = match.indexOf("\\$expr\\$"); method = match.indexOf("\\$method\\$"); receiver = match.indexOf("\\$receiver\\$"); - return new H.TypeErrorDecoder(message.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'), '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); + return new H.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); }, TypeErrorDecoder_provokeCallErrorOn: function(expression) { return function($expr$) { - var $argumentsExpr$ = '$arguments$'; + var $argumentsExpr$ = "$arguments$"; try { $expr$.$method$($argumentsExpr$); } catch (e) { @@ -477,9 +467,6 @@ } }(expression); }, - NullError$: function(_message, match) { - return new H.NullError(_message, match == null ? null : match.method); - }, JsNoSuchMethodError$: function(_message, match) { var t1 = match == null, t2 = t1 ? null : match.method; @@ -489,7 +476,7 @@ if (ex == null) return new H.NullThrownFromJavaScriptException(ex); if (ex instanceof H.ExceptionAndStackTrace) - return H.saveStackTrace(ex, ex.dartException); + return H.saveStackTrace(ex, type$.Object._as(ex.dartException)); if (typeof ex !== "object") return ex; if ("dartException" in ex) @@ -503,7 +490,7 @@ return error; }, _unwrapNonDartException: function(ex) { - var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, t1, _null = null; + var message, number, ieErrorCode, t1, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, _null = null; if (!("message" in ex)) return ex; message = ex.message; @@ -516,7 +503,8 @@ return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); case 445: case 5007: - return H.saveStackTrace(ex, H.NullError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); + t1 = H.S(message) + " (Error " + ieErrorCode + ")"; + return H.saveStackTrace(ex, new H.NullError(t1, _null)); } } if (ex instanceof TypeError) { @@ -532,12 +520,12 @@ undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); match = nsme.matchTypeError$1(message); if (match != null) - return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asStringS(message), match)); + return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asString(message), match)); else { match = notClosure.matchTypeError$1(message); if (match != null) { match.method = "call"; - return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asStringS(message), match)); + return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asString(message), match)); } else { match = nullCall.matchTypeError$1(message); if (match == null) { @@ -569,8 +557,10 @@ t1 = true; } else t1 = true; - if (t1) - return H.saveStackTrace(ex, H.NullError$(H._asStringS(message), match)); + if (t1) { + H._asString(message); + return H.saveStackTrace(ex, new H.NullError(message, match == null ? _null : match.method)); + } } } return H.saveStackTrace(ex, new H.UnknownJsTypeError(typeof message == "string" ? message : "")); @@ -615,7 +605,7 @@ }, invokeClosure: function(closure, numberOfArguments, arg1, arg2, arg3, arg4) { type$.Function._as(closure); - switch (H._asIntS(numberOfArguments)) { + switch (H._asInt(numberOfArguments)) { case 0: return closure.call$0(); case 1: @@ -671,6 +661,7 @@ $prototype.$static_name = propertyName; trampoline = $function; } + type$.Object._as(reflectionInfo); $prototype.$signature = H.Closure__computeSignatureFunctionNewRti(reflectionInfo, isStatic, isIntercepted); $prototype[callName] = trampoline; for (applyTrampoline = trampoline, i = 1; i < functions.length; ++i) { @@ -774,7 +765,9 @@ return t1.$add(); $.Closure_functionCounter = t1 + 1; selfName = "self" + t1; - return new Function("return function(){var " + selfName + " = this." + H.S(H.BoundClosure_selfFieldName()) + ";return " + selfName + "." + H.S(stubName) + "();}")(); + t1 = "return function(){var " + selfName + " = this."; + t2 = $.BoundClosure_selfFieldNameCache; + return new Function(t1 + (t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + ";return " + selfName + "." + H.S(stubName) + "();}")(); } $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(","); t1 = $.Closure_functionCounter; @@ -782,7 +775,9 @@ return t1.$add(); $.Closure_functionCounter = t1 + 1; $arguments += t1; - return new Function("return function(" + $arguments + "){return this." + H.S(H.BoundClosure_selfFieldName()) + "." + H.S(stubName) + "(" + $arguments + ");}")(); + t1 = "return function(" + $arguments + "){return this."; + t2 = $.BoundClosure_selfFieldNameCache; + return new Function(t1 + (t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + "." + H.S(stubName) + "(" + $arguments + ");}")(); }, Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) { var getSelf = H.BoundClosure_selfOf, @@ -837,9 +832,11 @@ } }, Closure_forwardInterceptedCallTo: function(receiver, $function) { - var stubName, arity, lookedUpFunction, t1, t2, $arguments, - selfField = H.BoundClosure_selfFieldName(), - receiverField = $.BoundClosure_receiverFieldNameCache; + var receiverField, stubName, arity, lookedUpFunction, t1, t2, $arguments, + selfField = $.BoundClosure_selfFieldNameCache; + if (selfField == null) + selfField = $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self"); + receiverField = $.BoundClosure_receiverFieldNameCache; if (receiverField == null) receiverField = $.BoundClosure_receiverFieldNameCache = H.BoundClosure_computeFieldNamed("receiver"); stubName = $function.$stubName; @@ -850,7 +847,7 @@ if (t2) return H.Closure_cspForwardInterceptedCall(arity, !t1, stubName, $function); if (arity === 1) { - t1 = "return function(){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + receiverField + ");"; + t1 = "return function(){return this." + selfField + "." + H.S(stubName) + "(this." + receiverField + ");"; t2 = $.Closure_functionCounter; if (typeof t2 !== "number") return t2.$add(); @@ -858,7 +855,7 @@ return new Function(t1 + t2 + "}")(); } $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(","); - t1 = "return function(" + $arguments + "){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + receiverField + ", " + $arguments + ");"; + t1 = "return function(" + $arguments + "){return this." + selfField + "." + H.S(stubName) + "(this." + receiverField + ", " + $arguments + ");"; t2 = $.Closure_functionCounter; if (typeof t2 !== "number") return t2.$add(); @@ -880,10 +877,6 @@ BoundClosure_receiverOf: function(closure) { return closure._receiver; }, - BoundClosure_selfFieldName: function() { - var t1 = $.BoundClosure_selfFieldNameCache; - return t1 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t1; - }, BoundClosure_computeFieldNamed: function(fieldName) { var t1, i, $name, template = new H.BoundClosure("self", "target", "receiver", "name"), @@ -917,7 +910,7 @@ }, lookupAndCacheInterceptor: function(obj) { var interceptor, interceptorClass, altTag, mark, t1, - tag = H._asStringS($.getTagFunction.call$1(obj)), + tag = H._asString($.getTagFunction.call$1(obj)), record = $.dispatchRecordsForInstanceTags[tag]; if (record != null) { Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); @@ -1373,7 +1366,7 @@ }, getTypeFromTypesTable: function(index) { var table, type, rti; - H._asIntS(index); + H._asInt(index); table = init.types; type = table[index]; if (typeof type == "string") { @@ -1383,27 +1376,13 @@ } return type; }, - createRuntimeType: function(rti) { - var recipe, starErasedRecipe, starErasedRti, - type = rti._cachedRuntimeType; - if (type != null) - return type; - recipe = rti._canonicalRecipe; - starErasedRecipe = recipe.replace(/\*/g, ""); - if (starErasedRecipe === recipe) - return rti._cachedRuntimeType = new H._Type(rti); - starErasedRti = H._Universe_eval(init.typeUniverse, starErasedRecipe, true); - type = starErasedRti._cachedRuntimeType; - return rti._cachedRuntimeType = type == null ? starErasedRti._cachedRuntimeType = new H._Type(starErasedRti) : type; - }, _installSpecializedIsTest: function(object) { - var unstarred, isFn, testRti = this, - t1 = type$.Object; - if (testRti === t1) + var t1, unstarred, isFn, testRti = this; + if (testRti === type$.Object) return H._finishIsFn(testRti, object, H._isObject); if (!H.isStrongTopType(testRti)) if (!(testRti === type$.legacy_Object)) - t1 = testRti === t1; + t1 = false; else t1 = true; else @@ -1437,10 +1416,11 @@ return testRti._is(object); }, _installSpecializedAsCheck: function(object) { - var t1, asFn, testRti = this; + var t1, testRti = this, + asFn = H._generalAsCheckImplementation; if (!H.isStrongTopType(testRti)) if (!(testRti === type$.legacy_Object)) - t1 = testRti === type$.Object; + t1 = false; else t1 = true; else @@ -1449,8 +1429,11 @@ asFn = H._asTop; else if (testRti === type$.Object) asFn = H._asObject; - else - asFn = H._generalNullableAsCheckImplementation; + else { + t1 = H.isNullable(testRti); + if (t1) + asFn = H._generalNullableAsCheckImplementation; + } testRti._as = asFn; return testRti._as(object); }, @@ -1493,10 +1476,12 @@ return !!J.getInterceptor$(object)[tag]; }, _generalAsCheckImplementation: function(object) { - var testRti = this; - if (object == null) - return object; - else if (testRti._is(object)) + var t1, testRti = this; + if (object == null) { + t1 = H.isNullable(testRti); + if (t1) + return object; + } else if (testRti._is(object)) return object; H._failedAsCheck(object, testRti); }, @@ -1514,7 +1499,7 @@ _Error_compose: function(object, objectRti, checkedTypeDescription) { var objectDescription = P.Error_safeToString(object), objectTypeDescription = H._rtiToString(objectRti == null ? H.instanceType(object) : objectRti, null); - return objectDescription + ": type '" + H.S(objectTypeDescription) + "' is not a subtype of type '" + H.S(checkedTypeDescription) + "'"; + return objectDescription + ": type '" + objectTypeDescription + "' is not a subtype of type '" + checkedTypeDescription + "'"; }, _TypeError$fromMessage: function(message) { return new H._TypeError("TypeError: " + message); @@ -1526,7 +1511,9 @@ return object != null; }, _asObject: function(object) { - return object; + if (object != null) + return object; + throw H.wrapException(H._TypeError__TypeError$forType(object, "Object")); }, _isTop: function(object) { return true; @@ -1650,11 +1637,11 @@ _rtiArrayToString: function(array, genericContext) { var s, sep, i; for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ") - s += C.JSString_methods.$add(sep, H._rtiToString(array[i], genericContext)); + s += sep + H._rtiToString(array[i], genericContext); return s; }, _functionRtiToString: function(functionType, genericContext, bounds) { - var boundsLength, outerContextLength, offset, i, t1, t2, t3, typeParametersText, typeSep, t4, t5, boundRti, kind, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", "; + var boundsLength, outerContextLength, offset, i, t1, t2, typeParametersText, typeSep, t3, t4, boundRti, kind, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", "; if (bounds != null) { boundsLength = bounds.length; if (genericContext == null) { @@ -1665,24 +1652,24 @@ offset = genericContext.length; for (i = boundsLength; i > 0; --i) C.JSArray_methods.add$1(genericContext, "T" + (offset + i)); - for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, t3 = type$.Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { + for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { typeParametersText += typeSep; - t4 = genericContext.length; - t5 = t4 - 1 - i; - if (t5 < 0) - return H.ioore(genericContext, t5); - typeParametersText = C.JSString_methods.$add(typeParametersText, genericContext[t5]); + t3 = genericContext.length; + t4 = t3 - 1 - i; + if (t4 < 0) + return H.ioore(genericContext, t4); + typeParametersText = C.JSString_methods.$add(typeParametersText, genericContext[t4]); boundRti = bounds[i]; kind = boundRti._kind; if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) if (!(boundRti === t2)) - t4 = boundRti === t3; + t3 = false; else - t4 = true; + t3 = true; else - t4 = true; - if (!t4) - typeParametersText += C.JSString_methods.$add(" extends ", H._rtiToString(boundRti, genericContext)); + t3 = true; + if (!t3) + typeParametersText += " extends " + H._rtiToString(boundRti, genericContext); } typeParametersText += ">"; } else { @@ -1699,11 +1686,11 @@ namedLength = named.length; returnTypeText = H._rtiToString(t1, genericContext); for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_) - argumentsText += C.JSString_methods.$add(sep, H._rtiToString(requiredPositional[i], genericContext)); + argumentsText += sep + H._rtiToString(requiredPositional[i], genericContext); if (optionalPositionalLength > 0) { argumentsText += sep + "["; for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_) - argumentsText += C.JSString_methods.$add(sep, H._rtiToString(optionalPositional[i], genericContext)); + argumentsText += sep + H._rtiToString(optionalPositional[i], genericContext); argumentsText += "]"; } if (namedLength > 0) { @@ -1712,7 +1699,7 @@ argumentsText += sep; if (named[i + 1]) argumentsText += "required "; - argumentsText += J.$add$ansx(H._rtiToString(named[i + 2], genericContext), " ") + named[i]; + argumentsText += H._rtiToString(named[i + 2], genericContext) + " " + named[i]; } argumentsText += "}"; } @@ -1720,7 +1707,7 @@ genericContext.toString; genericContext.length = outerContextLength; } - return typeParametersText + "(" + argumentsText + ") => " + H.S(returnTypeText); + return typeParametersText + "(" + argumentsText + ") => " + returnTypeText; }, _rtiToString: function(rti, genericContext) { var s, questionArgument, argumentKind, $name, $arguments, t1, t2, @@ -1743,10 +1730,10 @@ questionArgument = rti._primary; s = H._rtiToString(questionArgument, genericContext); argumentKind = questionArgument._kind; - return J.$add$ansx(argumentKind === 11 || argumentKind === 12 ? C.JSString_methods.$add("(", s) + ")" : s, "?"); + return (argumentKind === 11 || argumentKind === 12 ? "(" + s + ")" : s) + "?"; } if (kind === 8) - return "FutureOr<" + H.S(H._rtiToString(rti._primary, genericContext)) + ">"; + return "FutureOr<" + H._rtiToString(rti._primary, genericContext) + ">"; if (kind === 9) { $name = H._unminifyOrTag(rti._primary); $arguments = rti._rest; @@ -1757,7 +1744,6 @@ if (kind === 12) return H._functionRtiToString(rti._primary, genericContext, rti._rest); if (kind === 13) { - genericContext.toString; t1 = rti._primary; t2 = genericContext.length; t1 = t2 - 1 - t1; @@ -1781,8 +1767,8 @@ }, _Universe_findErasedType: function(universe, cls) { var $length, erased, $arguments, i, $interface, - metadata = universe.eT, - probe = metadata[cls]; + t1 = universe.eT, + probe = t1[cls]; if (probe == null) return H._Universe_eval(universe, cls, false); else if (typeof probe == "number") { @@ -1792,7 +1778,7 @@ for (i = 0; i < $length; ++i) $arguments.push(erased); $interface = H._Universe__lookupInterfaceRti(universe, cls, $arguments); - metadata[cls] = $interface; + t1[cls] = $interface; return $interface; } else return probe; @@ -1805,12 +1791,12 @@ }, _Universe_eval: function(universe, recipe, normalize) { var rti, - cache = universe.eC, - probe = cache.get(recipe); + t1 = universe.eC, + probe = t1.get(recipe); if (probe != null) return probe; rti = H._Parser_parse(H._Parser_create(universe, null, recipe, normalize)); - cache.set(recipe, rti); + t1.set(recipe, rti); return rti; }, _Universe_evalInEnvironment: function(universe, environment, recipe) { @@ -1940,7 +1926,7 @@ t1 = baseType._kind; if (!H.isStrongTopType(baseType)) if (!(baseType === type$.legacy_Object)) - t2 = baseType === type$.Object; + t2 = false; else t2 = true; else @@ -2103,142 +2089,142 @@ return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; }, _Parser_parse: function(parser) { - var t1, i, ch, universe, array, head, base, u, parameters, optionalPositional, named, item, + var t2, i, ch, t3, array, head, base, parameters, optionalPositional, named, item, source = parser.r, - stack = parser.s; - for (t1 = source.length, i = 0; i < t1;) { + t1 = parser.s; + for (t2 = source.length, i = 0; i < t2;) { ch = source.charCodeAt(i); if (ch >= 48 && ch <= 57) - i = H._Parser_handleDigit(i + 1, ch, source, stack); + i = H._Parser_handleDigit(i + 1, ch, source, t1); else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36) - i = H._Parser_handleIdentifier(parser, i, source, stack, false); + i = H._Parser_handleIdentifier(parser, i, source, t1, false); else if (ch === 46) - i = H._Parser_handleIdentifier(parser, i, source, stack, true); + i = H._Parser_handleIdentifier(parser, i, source, t1, true); else { ++i; switch (ch) { case 44: break; case 58: - stack.push(false); + t1.push(false); break; case 33: - stack.push(true); + t1.push(true); break; case 59: - stack.push(H._Parser_toType(parser.u, parser.e, stack.pop())); + t1.push(H._Parser_toType(parser.u, parser.e, t1.pop())); break; case 94: - stack.push(H._Universe__lookupGenericFunctionParameterRti(parser.u, stack.pop())); + t1.push(H._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); break; case 35: - stack.push(H._Universe__lookupTerminalRti(parser.u, 5, "#")); + t1.push(H._Universe__lookupTerminalRti(parser.u, 5, "#")); break; case 64: - stack.push(H._Universe__lookupTerminalRti(parser.u, 2, "@")); + t1.push(H._Universe__lookupTerminalRti(parser.u, 2, "@")); break; case 126: - stack.push(H._Universe__lookupTerminalRti(parser.u, 3, "~")); + t1.push(H._Universe__lookupTerminalRti(parser.u, 3, "~")); break; case 60: - stack.push(parser.p); - parser.p = stack.length; + t1.push(parser.p); + parser.p = t1.length; break; case 62: - universe = parser.u; - array = stack.splice(parser.p); + t3 = parser.u; + array = t1.splice(parser.p); H._Parser_toTypes(parser.u, parser.e, array); - parser.p = stack.pop(); - head = stack.pop(); + parser.p = t1.pop(); + head = t1.pop(); if (typeof head == "string") - stack.push(H._Universe__lookupInterfaceRti(universe, head, array)); + t1.push(H._Universe__lookupInterfaceRti(t3, head, array)); else { - base = H._Parser_toType(universe, parser.e, head); + base = H._Parser_toType(t3, parser.e, head); switch (base._kind) { case 11: - stack.push(H._Universe__lookupGenericFunctionRti(universe, base, array, parser.n)); + t1.push(H._Universe__lookupGenericFunctionRti(t3, base, array, parser.n)); break; default: - stack.push(H._Universe__lookupBindingRti(universe, base, array)); + t1.push(H._Universe__lookupBindingRti(t3, base, array)); break; } } break; case 38: - H._Parser_handleExtendedOperations(parser, stack); + H._Parser_handleExtendedOperations(parser, t1); break; case 42: - u = parser.u; - stack.push(H._Universe__lookupStarRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n)); + t3 = parser.u; + t1.push(H._Universe__lookupStarRti(t3, H._Parser_toType(t3, parser.e, t1.pop()), parser.n)); break; case 63: - u = parser.u; - stack.push(H._Universe__lookupQuestionRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n)); + t3 = parser.u; + t1.push(H._Universe__lookupQuestionRti(t3, H._Parser_toType(t3, parser.e, t1.pop()), parser.n)); break; case 47: - u = parser.u; - stack.push(H._Universe__lookupFutureOrRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n)); + t3 = parser.u; + t1.push(H._Universe__lookupFutureOrRti(t3, H._Parser_toType(t3, parser.e, t1.pop()), parser.n)); break; case 40: - stack.push(parser.p); - parser.p = stack.length; + t1.push(parser.p); + parser.p = t1.length; break; case 41: - universe = parser.u; + t3 = parser.u; parameters = new H._FunctionParameters(); - optionalPositional = universe.sEA; - named = universe.sEA; - head = stack.pop(); + optionalPositional = t3.sEA; + named = t3.sEA; + head = t1.pop(); if (typeof head == "number") switch (head) { case -1: - optionalPositional = stack.pop(); + optionalPositional = t1.pop(); break; case -2: - named = stack.pop(); + named = t1.pop(); break; default: - stack.push(head); + t1.push(head); break; } else - stack.push(head); - array = stack.splice(parser.p); + t1.push(head); + array = t1.splice(parser.p); H._Parser_toTypes(parser.u, parser.e, array); - parser.p = stack.pop(); + parser.p = t1.pop(); parameters._requiredPositional = array; parameters._optionalPositional = optionalPositional; parameters._named = named; - stack.push(H._Universe__lookupFunctionRti(universe, H._Parser_toType(universe, parser.e, stack.pop()), parameters)); + t1.push(H._Universe__lookupFunctionRti(t3, H._Parser_toType(t3, parser.e, t1.pop()), parameters)); break; case 91: - stack.push(parser.p); - parser.p = stack.length; + t1.push(parser.p); + parser.p = t1.length; break; case 93: - array = stack.splice(parser.p); + array = t1.splice(parser.p); H._Parser_toTypes(parser.u, parser.e, array); - parser.p = stack.pop(); - stack.push(array); - stack.push(-1); + parser.p = t1.pop(); + t1.push(array); + t1.push(-1); break; case 123: - stack.push(parser.p); - parser.p = stack.length; + t1.push(parser.p); + parser.p = t1.length; break; case 125: - array = stack.splice(parser.p); + array = t1.splice(parser.p); H._Parser_toTypesNamed(parser.u, parser.e, array); - parser.p = stack.pop(); - stack.push(array); - stack.push(-2); + parser.p = t1.pop(); + t1.push(array); + t1.push(-2); break; default: throw "Bad character " + ch; } } } - item = stack.pop(); + item = t1.pop(); return H._Parser_toType(parser.u, parser.e, item); }, _Parser_handleDigit: function(i, digit, source, stack) { @@ -2345,7 +2331,7 @@ return true; if (!H.isStrongTopType(t)) if (!(t === type$.legacy_Object)) - t1 = t === type$.Object; + t1 = false; else t1 = true; else @@ -2358,7 +2344,7 @@ if (H.isStrongTopType(s)) return false; if (s._kind !== 1) - t1 = s === type$.Null || s === type$.JSNull; + t1 = false; else t1 = true; if (t1) @@ -2368,10 +2354,23 @@ if (H._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv)) return true; tKind = t._kind; + t1 = s === type$.Null || s === type$.JSNull; + if (t1) { + if (tKind === 8) + return H._isSubtype(universe, s, sEnv, t._primary, tEnv); + return t === type$.Null || t === type$.JSNull || tKind === 7 || tKind === 6; + } + if (t === type$.Object) { + if (sKind === 8) + return H._isSubtype(universe, s._primary, sEnv, t, tEnv); + if (sKind === 6) + return H._isSubtype(universe, s._primary, sEnv, t, tEnv); + return sKind !== 7; + } if (sKind === 6) return H._isSubtype(universe, s._primary, sEnv, t, tEnv); if (tKind === 6) { - t1 = t._primary; + t1 = H.Rti__getQuestionFromStar(universe, t); return H._isSubtype(universe, s, sEnv, t1, tEnv); } if (sKind === 8) { @@ -2380,8 +2379,8 @@ return H._isSubtype(universe, H.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv); } if (sKind === 7) { - t1 = H._isSubtype(universe, s._primary, sEnv, t, tEnv); - return t1; + t1 = H._isSubtype(universe, type$.Null, sEnv, t, tEnv); + return t1 && H._isSubtype(universe, s._primary, sEnv, t, tEnv); } if (tKind === 8) { if (H._isSubtype(universe, s, sEnv, t._primary, tEnv)) @@ -2389,8 +2388,8 @@ return H._isSubtype(universe, s, sEnv, H.Rti__getFutureFromFutureOr(universe, t), tEnv); } if (tKind === 7) { - t1 = H._isSubtype(universe, s, sEnv, t._primary, tEnv); - return t1; + t1 = H._isSubtype(universe, s, sEnv, type$.Null, tEnv); + return t1 || H._isSubtype(universe, s, sEnv, t._primary, tEnv); } if (leftTypeVariable) return false; @@ -2432,7 +2431,7 @@ return false; }, _isFunctionSubtype: function(universe, s, sEnv, t, tEnv) { - var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName; + var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired; if (!H._isSubtype(universe, s._primary, sEnv, t._primary, tEnv)) return false; sParameters = s._rest; @@ -2478,14 +2477,26 @@ sIndex += 3; if (tName < sName) return false; - if (sName < tName) + sIsRequired = sNamed[sIndex - 2]; + if (sName < tName) { + if (sIsRequired) + return false; continue; + } + t1 = tNamed[tIndex + 1]; + if (sIsRequired && !t1) + return false; t1 = sNamed[sIndex - 1]; if (!H._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv)) return false; break; } } + for (; sIndex < sNamedLength;) { + if (sNamed[sIndex + 1]) + return false; + sIndex += 3; + } return true; }, _isInterfaceSubtype: function(universe, s, sEnv, t, tEnv) { @@ -2541,7 +2552,7 @@ var t1; if (!H.isStrongTopType(t)) if (!(t === type$.legacy_Object)) - t1 = t === type$.Object; + t1 = false; else t1 = true; else @@ -2572,9 +2583,6 @@ _FunctionParameters: function _FunctionParameters() { this._named = this._optionalPositional = this._requiredPositional = null; }, - _Type: function _Type(t0) { - this._rti = t0; - }, _Error: function _Error() { }, _TypeError: function _TypeError(t0) { @@ -2589,7 +2597,7 @@ return {i: interceptor, p: proto, e: extension, x: indexability}; }, getNativeInterceptor: function(object) { - var proto, objectProto, $constructor, interceptor, + var proto, objectProto, $constructor, interceptor, t1, record = object[init.dispatchPropertyName]; if (record == null) if ($.initNativeDispatchFlag == null) { @@ -2609,7 +2617,14 @@ throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.S(proto(object, record)))); } $constructor = object.constructor; - interceptor = $constructor == null ? null : $constructor[J.JS_INTEROP_INTERCEPTOR_TAG()]; + if ($constructor == null) + interceptor = null; + else { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + interceptor = $constructor[t1]; + } if (interceptor != null) return interceptor; interceptor = H.lookupAndCacheInterceptor(object); @@ -2623,15 +2638,14 @@ if (proto === Object.prototype) return C.PlainJavaScriptObject_methods; if (typeof $constructor == "function") { - Object.defineProperty($constructor, J.JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + Object.defineProperty($constructor, t1, {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); return C.UnknownJavaScriptObject_methods; } return C.UnknownJavaScriptObject_methods; }, - JS_INTEROP_INTERCEPTOR_TAG: function() { - var t1 = $._JS_INTEROP_INTERCEPTOR_TAG; - return t1 == null ? $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js") : t1; - }, JSArray_markFixedList: function(list, $T) { list.fixed$length = Array; return list; @@ -2640,7 +2654,7 @@ if (typeof receiver == "number") { if (Math.floor(receiver) == receiver) return J.JSInt.prototype; - return J.JSDouble.prototype; + return J.JSNumNotInt.prototype; } if (typeof receiver == "string") return J.JSString.prototype; @@ -2659,24 +2673,6 @@ return receiver; return J.getNativeInterceptor(receiver); }, - getInterceptor$ansx: function(receiver) { - if (typeof receiver == "number") - return J.JSNumber.prototype; - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (receiver.constructor == Array) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, getInterceptor$asx: function(receiver) { if (typeof receiver == "string") return J.JSString.prototype; @@ -2707,15 +2703,6 @@ return receiver; return J.getNativeInterceptor(receiver); }, - getInterceptor$s: function(receiver) { - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (!(receiver instanceof P.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, getInterceptor$x: function(receiver) { if (receiver == null) return receiver; @@ -2740,11 +2727,6 @@ get$onClick$x: function(receiver) { return J.getInterceptor$x(receiver).get$onClick(receiver); }, - $add$ansx: function(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return receiver + a0; - return J.getInterceptor$ansx(receiver).$add(receiver, a0); - }, $eq$: function(receiver, a0) { if (receiver == null) return a0 == null; @@ -2764,9 +2746,6 @@ forEach$1$ax: function(receiver, a0) { return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); }, - startsWith$1$s: function(receiver, a0) { - return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); - }, toString$0$: function(receiver) { return J.getInterceptor$(receiver).toString$0(receiver); }, @@ -2802,7 +2781,7 @@ }, JSInt: function JSInt() { }, - JSDouble: function JSDouble() { + JSNumNotInt: function JSNumNotInt() { }, JSString: function JSString() { } @@ -2890,21 +2869,18 @@ }($function, 1); return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); }, - Future_Future$value: function(value, $T) { - var t1 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")); - t1._asyncComplete$1(value); - return t1; + AsyncError$: function(error, stackTrace) { + var t1 = H.checkNotNullable(error, "error", type$.Object); + return new P.AsyncError(t1, stackTrace == null ? P.AsyncError_defaultStackTrace(error) : stackTrace); }, - _Future__chainForeignFuture: function(source, target) { - var e, s, exception; - target._state = 1; - try { - source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), type$.Null); - } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s)); + AsyncError_defaultStackTrace: function(error) { + var stackTrace; + if (type$.Error._is(error)) { + stackTrace = error.get$stackTrace(); + if (stackTrace != null) + return stackTrace; } + return C.C__StringStackTrace; }, _Future__chainCoreFuture: function(source, target) { var t1, t2, listeners; @@ -2982,6 +2958,12 @@ $.Zone__current = oldZone; t1 = _box_0.listenerValueOrError; if (t4._is(t1)) { + t5 = _box_0.listener.$ti; + t5 = t5._eval$1("Future<2>")._is(t1) || !t5._rest[1]._is(t1); + } else + t5 = false; + if (t5) { + t4._as(t1); result = _box_0.listener.result; if (t1._state >= 4) { current = t3._as(result._resultOrListeners); @@ -3022,7 +3004,7 @@ t1 = type$.dynamic_Function_Object; if (t1._is(errorHandler)) return t1._as(errorHandler); - throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result")); + throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a valid result")); }, _microtaskLoop: function() { var entry, next; @@ -3118,8 +3100,9 @@ _nullDoneHandler: function() { }, _cancelAndValue: function(subscription, future, value) { - var cancelFuture = subscription.cancel$0(); - if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + var cancelFuture = subscription.cancel$0(), + t1 = $.$get$Future__nullFuture(); + if (cancelFuture !== t1) cancelFuture.whenComplete$1(new P._cancelAndValue_closure(future, value)); else future._complete$1(value); @@ -3130,19 +3113,6 @@ return P.Timer__createTimer(duration, type$.void_Function._as(callback)); return P.Timer__createTimer(duration, type$.void_Function._as(t1.bindCallbackGuarded$1(callback))); }, - AsyncError$: function(error, stackTrace) { - var t1 = H.checkNotNullable(error, "error", type$.Object); - return new P.AsyncError(t1, stackTrace == null ? P.AsyncError_defaultStackTrace(error) : stackTrace); - }, - AsyncError_defaultStackTrace: function(error) { - var stackTrace; - if (type$.Error._is(error)) { - stackTrace = error.get$stackTrace(); - if (stackTrace != null) - return stackTrace; - } - return C.C__StringStackTrace; - }, _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(error, stackTrace)); }, @@ -3189,11 +3159,9 @@ } }, _rootScheduleMicrotask: function($self, $parent, zone, f) { - var t1; type$.void_Function._as(f); - t1 = C.C__RootZone !== zone; - if (t1) - f = !(!t1 || false) ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void); + if (C.C__RootZone !== zone) + f = zone.bindCallbackGuarded$1(f); P._scheduleAsyncCallback(f); }, _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { @@ -3231,6 +3199,10 @@ _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) { this.$protected = t0; }, + AsyncError: function AsyncError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, _Completer: function _Completer() { }, _AsyncCompleter: function _AsyncCompleter(t0, t1) { @@ -3262,13 +3234,13 @@ this.$this = t1; }, _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) { - this.target = t0; + this.$this = t0; }, _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) { - this.target = t0; + this.$this = t0; }, _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) { - this.target = t0; + this.$this = t0; this.e = t1; this.s = t2; }, @@ -3425,10 +3397,6 @@ this.future = t0; this.value = t1; }, - AsyncError: function AsyncError(t0, t1) { - this.error = t0; - this.stackTrace = t1; - }, _Zone: function _Zone() { }, _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) { @@ -3437,11 +3405,6 @@ }, _RootZone: function _RootZone() { }, - _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) { - this.$this = t0; - this.f = t1; - this.R = t2; - }, _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) { this.$this = t0; this.f = t1; @@ -3612,10 +3575,7 @@ MapMixin: function MapMixin() { }, _parseJson: function(source, reviver) { - var parsed, e, exception, t1; - if (typeof source != "string") - throw H.wrapException(H.argumentErrorValue(source)); - parsed = null; + var e, exception, t1, parsed = null; try { parsed = JSON.parse(source); } catch (exception) { @@ -3703,7 +3663,7 @@ Error__objectToString: function(object) { if (object instanceof H.Closure) return object.toString$0(0); - return "Instance of '" + H.S(H.Primitives_objectTypeName(object)) + "'"; + return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; }, List_List$filled: function($length, fill, $E) { var result; @@ -3789,8 +3749,7 @@ return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); }, IndexError$: function(invalidValue, indexable, $name, message, $length) { - var t1 = H._asIntS($length == null ? J.get$length$asx(indexable) : $length); - return new P.IndexError(t1, true, invalidValue, $name, "Index out of range"); + return new P.IndexError($length, true, invalidValue, $name, "Index out of range"); }, UnsupportedError$: function(message) { return new P.UnsupportedError(message); @@ -3930,6 +3889,9 @@ jsPromise.then(H.convertDartClosureToJS(new P.promiseToFuture_closure(completer, $T), 1), H.convertDartClosureToJS(new P.promiseToFuture_closure0(completer), 1)); return t1; }, + NullRejectionException: function NullRejectionException(t0) { + this.isUndefined = t0; + }, promiseToFuture_closure: function promiseToFuture_closure(t0, t1) { this.completer = t0; this.T = t1; @@ -3954,10 +3916,10 @@ xhr = new XMLHttpRequest(); C.HttpRequest_methods.open$3$async(xhr, method, url, true); C.HttpRequest_methods.set$withCredentials(xhr, true); - t2 = type$.nullable_void_Function_legacy_ProgressEvent; + t2 = type$.nullable_void_Function_ProgressEvent; t3 = t2._as(new W.HttpRequest_request_closure(xhr, completer)); type$.nullable_void_Function._as(null); - t4 = type$.legacy_ProgressEvent; + t4 = type$.ProgressEvent; W._EventStreamSubscription$(xhr, "load", t3, false, t4); W._EventStreamSubscription$(xhr, "error", t2._as(completer.get$completeError()), false, t4); if (sendData != null) @@ -4075,7 +4037,7 @@ }, M = { SseClient$: function(serverUrl) { - var t1 = type$.legacy_String; + var t1 = type$.String; t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), F.Logger_Logger("SseClient"), new P._AsyncCompleter(new P._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic)); t1.SseClient$1(serverUrl); return t1; @@ -4087,7 +4049,7 @@ _._logger = t2; _._onConnected = t3; _._lastMessageId = -1; - _._errorTimer = _._serverUrl = _._eventSource = null; + _._errorTimer = _.__SseClient__serverUrl = _.__SseClient__eventSource = null; }, SseClient_closure: function SseClient_closure(t0) { this.$this = t0; @@ -4124,10 +4086,13 @@ }}, E = { main: function() { - var channel = M.SseClient$("/test"), - t1 = J.get$onClick$x(document.querySelector("button")), - t2 = t1.$ti, - t3 = t2._eval$1("~(1)?")._as(new E.main_closure(channel)); + var t2, t3, + channel = M.SseClient$("/test"), + t1 = document.querySelector("button"); + t1.toString; + t1 = J.get$onClick$x(t1); + t2 = t1.$ti; + t3 = t2._eval$1("~(1)?")._as(new E.main_closure(channel)); type$.nullable_void_Function._as(null); W._EventStreamSubscription$(t1._target, t1._eventType, t3, false, t2._precomputed1); t2 = channel._incomingController; @@ -4152,7 +4117,7 @@ return H.Primitives_objectHashCode(receiver); }, toString$0: function(receiver) { - return "Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'"; + return "Instance of '" + H.Primitives_objectTypeName(receiver) + "'"; } }; J.JSBool.prototype = { @@ -4191,7 +4156,7 @@ var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; if (dartClosure == null) return this.super$JavaScriptObject$toString(receiver); - return "JavaScript function for " + H.S(J.toString$0$(dartClosure)); + return "JavaScript function for " + J.toString$0$(dartClosure); }, $isFunction: 1 }; @@ -4239,12 +4204,10 @@ return receiver[index]; }, $indexSet: function(receiver, index, value) { - H._asIntS(index); + H._asInt(index); H._arrayInstanceType(receiver)._precomputed1._as(value); if (!!receiver.immutable$list) H.throwExpression(P.UnsupportedError$("indexed set")); - if (!H._isInt(index)) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); if (index >= receiver.length || index < 0) throw H.wrapException(H.diagnoseIndexError(receiver, index)); receiver[index] = value; @@ -4255,7 +4218,7 @@ J.JSUnmodifiableArray.prototype = {}; J.ArrayIterator.prototype = { get$current: function() { - return this._current; + return this.$ti._precomputed1._as(this._current); }, moveNext$0: function() { var t2, _this = this, @@ -4352,7 +4315,7 @@ $isnum: 1 }; J.JSInt.prototype = {$isint: 1}; - J.JSDouble.prototype = {}; + J.JSNumNotInt.prototype = {}; J.JSString.prototype = { codeUnitAt$1: function(receiver, index) { if (index < 0) @@ -4367,8 +4330,6 @@ return receiver.charCodeAt(index); }, $add: function(receiver, other) { - if (typeof other != "string") - throw H.wrapException(P.ArgumentError$value(other, null, null)); return receiver + other; }, startsWith$1: function(receiver, pattern) { @@ -4444,20 +4405,17 @@ }; H.LateError.prototype = { toString$0: function(_) { - var message = this._message; - return message != null ? "LateInitializationError: " + message : "LateInitializationError"; + var t1 = "LateInitializationError: " + this._message; + return t1; } }; - H.closure.prototype = { + H.nullFuture_closure.prototype = { call$0: function() { - return P.Future_Future$value(null, type$.Null); + var t1 = new P._Future($.Zone__current, type$._Future_Null); + t1._asyncComplete$1(null); + return t1; }, - $signature: 14 - }; - H.NotNullableError.prototype = { - toString$0: function(_) { - return "Null is not a valid value for the parameter '" + this.__internal$_name + "' of type '" + H.createRuntimeType(this.$ti._precomputed1).toString$0(0) + "'"; - } + $signature: 12 }; H.EfficientLengthIterable.prototype = {}; H.ListIterable.prototype = { @@ -4472,7 +4430,7 @@ }; H.ListIterator.prototype = { get$current: function() { - return this.__internal$_current; + return this.$ti._precomputed1._as(this.__internal$_current); }, moveNext$0: function() { var t3, _this = this, @@ -4524,7 +4482,7 @@ toString$0: function(_) { var t1 = this._method; if (t1 == null) - return "NoSuchMethodError: " + H.S(this.__js_helper$_message); + return "NoSuchMethodError: " + this.__js_helper$_message; return "NoSuchMethodError: method not found: '" + t1 + "' on null"; } }; @@ -4534,11 +4492,11 @@ _s38_ = "NoSuchMethodError: method not found: '", t1 = _this._method; if (t1 == null) - return "NoSuchMethodError: " + H.S(_this.__js_helper$_message); + return "NoSuchMethodError: " + _this.__js_helper$_message; t2 = _this._receiver; if (t2 == null) - return _s38_ + t1 + "' (" + H.S(_this.__js_helper$_message) + ")"; - return _s38_ + t1 + "' on '" + t2 + "' (" + H.S(_this.__js_helper$_message) + ")"; + return _s38_ + t1 + "' (" + _this.__js_helper$_message + ")"; + return _s38_ + t1 + "' on '" + t2 + "' (" + _this.__js_helper$_message + ")"; } }; H.UnknownJsTypeError.prototype = { @@ -4612,7 +4570,7 @@ var receiver = this._receiver; if (receiver == null) receiver = this._self; - return "Closure '" + H.S(this._name) + "' of " + ("Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'"); + return "Closure '" + H.S(this._name) + "' of " + ("Instance of '" + H.Primitives_objectTypeName(type$.Object._as(receiver)) + "'"); } }; H.RuntimeError.prototype = { @@ -4705,7 +4663,7 @@ t1._precomputed1._as(key); t1._eval$1("2()")._as(ifAbsent); if (_this.containsKey$1(key)) - return _this.$index(0, key); + return t1._rest[1]._as(_this.$index(0, key)); value = ifAbsent.call$0(); _this.$indexSet(0, key, value); return value; @@ -4799,7 +4757,7 @@ }; H.LinkedHashMapKeyIterator.prototype = { get$current: function() { - return this.__js_helper$_current; + return this.$ti._precomputed1._as(this.__js_helper$_current); }, moveNext$0: function() { var cell, _this = this, @@ -4824,19 +4782,19 @@ call$1: function(o) { return this.getTag(o); }, - $signature: 4 + $signature: 5 }; H.initHooks_closure0.prototype = { call$2: function(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 15 + $signature: 13 }; H.initHooks_closure1.prototype = { call$1: function(tag) { - return this.prototypeForTag(H._asStringS(tag)); + return this.prototypeForTag(H._asString(tag)); }, - $signature: 16 + $signature: 14 }; H.NativeTypedData.prototype = {}; H.NativeTypedArray.prototype = { @@ -4851,8 +4809,8 @@ return receiver[index]; }, $indexSet: function(receiver, index, value) { - H._asIntS(index); - H._asDoubleS(value); + H._asInt(index); + H._asDouble(value); H._checkValidIndex(index, receiver, receiver.length); receiver[index] = value; }, @@ -4861,8 +4819,8 @@ }; H.NativeTypedArrayOfInt.prototype = { $indexSet: function(receiver, index, value) { - H._asIntS(index); - H._asIntS(value); + H._asInt(index); + H._asInt(value); H._checkValidIndex(index, receiver, receiver.length); receiver[index] = value; }, @@ -4930,11 +4888,6 @@ } }; H._FunctionParameters.prototype = {}; - H._Type.prototype = { - toString$0: function(_) { - return H._rtiToString(this._rti, null); - } - }; H._Error.prototype = { toString$0: function(_) { return this.__rti$_message; @@ -4948,7 +4901,7 @@ t1.storedCallback = null; f.call$0(); }, - $signature: 5 + $signature: 6 }; P._AsyncRun__initializeScheduleImmediate_closure.prototype = { call$1: function(callback) { @@ -4958,19 +4911,19 @@ t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 17 + $signature: 15 }; P._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { call$0: function() { this.callback.call$0(); }, - $signature: 1 + $signature: 3 }; P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { call$0: function() { this.callback.call$0(); }, - $signature: 1 + $signature: 3 }; P._TimerImpl.prototype = { _TimerImpl$2: function(milliseconds, callback) { @@ -5003,6 +4956,8 @@ var t2, _this = this, t1 = _this.$ti; t1._eval$1("1/?")._as(value); + if (value == null) + value = t1._precomputed1._as(value); if (!_this.isSync) _this._future._asyncComplete$1(value); else { @@ -5014,10 +4969,7 @@ } }, completeError$2: function(e, st) { - var t1; - if (st == null) - st = P.AsyncError_defaultStackTrace(e); - t1 = this._future; + var t1 = this._future; if (this.isSync) t1._completeError$2(e, st); else @@ -5035,13 +4987,22 @@ call$2: function(error, stackTrace) { this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - $signature: 18 + $signature: 16 }; P._wrapJsFunctionForAsync_closure.prototype = { call$2: function(errorCode, result) { - this.$protected(H._asIntS(errorCode), result); + this.$protected(H._asInt(errorCode), result); }, - $signature: 19 + $signature: 17 + }; + P.AsyncError.prototype = { + toString$0: function(_) { + return H.S(this.error); + }, + $isError: 1, + get$stackTrace: function() { + return this.stackTrace; + } }; P._Completer.prototype = { completeError$2: function(error, stackTrace) { @@ -5083,12 +5044,13 @@ var errorCallback = this.errorCallback, t1 = type$.dynamic, t2 = type$.Object, - t3 = this.$ti._eval$1("2/"), - t4 = this.result._zone; + t3 = asyncError.error, + t4 = this.$ti._eval$1("2/"), + t5 = this.result._zone; if (type$.dynamic_Function_Object_StackTrace._is(errorCallback)) - return t3._as(t4.runBinary$3$3(errorCallback, asyncError.error, asyncError.stackTrace, t1, t2, type$.StackTrace)); + return t4._as(t5.runBinary$3$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type$.StackTrace)); else - return t3._as(t4.runUnary$2$2(type$.dynamic_Function_Object._as(errorCallback), asyncError.error, t1, t2)); + return t4._as(t5.runUnary$2$2(type$.dynamic_Function_Object._as(errorCallback), t3, t1, t2)); } }; P._Future.prototype = { @@ -5189,6 +5151,17 @@ } return prev; }, + _chainForeignFuture$1: function(source) { + var e, s, exception, _this = this; + _this._state = 1; + try { + source.then$1$2$onError(new P._Future__chainForeignFuture_closure(_this), new P._Future__chainForeignFuture_closure0(_this), type$.Null); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(_this, e, s)); + } + }, _complete$1: function(value) { var listeners, _this = this, t1 = _this.$ti; @@ -5197,7 +5170,7 @@ if (t1._is(value)) P._Future__chainCoreFuture(value, _this); else - P._Future__chainForeignFuture(value, _this); + _this._chainForeignFuture$1(value); else { listeners = _this._removeListeners$0(); t1._precomputed1._as(value); @@ -5216,6 +5189,7 @@ }, _completeError$2: function(error, stackTrace) { var listeners, t1, _this = this; + type$.Object._as(error); type$.StackTrace._as(stackTrace); listeners = _this._removeListeners$0(); t1 = P.AsyncError$(error, stackTrace); @@ -5250,7 +5224,7 @@ P._Future__chainCoreFuture(value, _this); return; } - P._Future__chainForeignFuture(value, _this); + _this._chainForeignFuture$1(value); }, _asyncCompleteError$2: function(error, stackTrace) { type$.StackTrace._as(stackTrace); @@ -5273,21 +5247,28 @@ }; P._Future__chainForeignFuture_closure.prototype = { call$1: function(value) { - var t1 = this.target; + var error, stackTrace, exception, + t1 = this.$this; t1._state = 0; - t1._complete$1(value); + try { + t1._completeWithValue$1(t1.$ti._precomputed1._as(value)); + } catch (exception) { + error = H.unwrapException(exception); + stackTrace = H.getTraceFromException(exception); + t1._completeError$2(error, stackTrace); + } }, - $signature: 5 + $signature: 6 }; P._Future__chainForeignFuture_closure0.prototype = { call$2: function(error, stackTrace) { - this.target._completeError$2(error, type$.StackTrace._as(stackTrace)); + this.$this._completeError$2(type$.Object._as(error), type$.StackTrace._as(stackTrace)); }, - $signature: 7 + $signature: 8 }; P._Future__chainForeignFuture_closure1.prototype = { call$0: function() { - this.target._completeError$2(this.e, this.s); + this.$this._completeError$2(this.e, this.s); }, $signature: 0 }; @@ -5318,13 +5299,7 @@ } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - if (_this.hasError) { - t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners).error; - t2 = e; - t2 = t1 == null ? t2 == null : t1 === t2; - t1 = t2; - } else - t1 = false; + t1 = _this.hasError && type$.AsyncError._as(_this._box_1.source._resultOrListeners).error === e; t2 = _this._box_0; if (t1) t2.listenerValueOrError = type$.AsyncError._as(_this._box_1.source._resultOrListeners); @@ -5354,7 +5329,7 @@ call$1: function(_) { return this.originalSource; }, - $signature: 21 + $signature: 19 }; P._Future__propagateToListeners_handleValueCallback.prototype = { call$0: function() { @@ -5378,11 +5353,11 @@ }; P._Future__propagateToListeners_handleError.prototype = { call$0: function() { - var asyncError, e, s, t1, exception, t2, t3, t4, _this = this; + var asyncError, e, s, t1, exception, t2, _this = this; try { asyncError = type$.AsyncError._as(_this._box_1.source._resultOrListeners); t1 = _this._box_0; - if (H.boolConversionCheck(t1.listener.matchesErrorTest$1(asyncError)) && t1.listener.errorCallback != null) { + if (t1.listener.matchesErrorTest$1(asyncError) && t1.listener.errorCallback != null) { t1.listenerValueOrError = t1.listener.handleError$1(asyncError); t1.listenerHasError = false; } @@ -5390,14 +5365,12 @@ e = H.unwrapException(exception); s = H.getTraceFromException(exception); t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners); - t2 = t1.error; - t3 = e; - t4 = _this._box_0; - if (t2 == null ? t3 == null : t2 === t3) - t4.listenerValueOrError = t1; + t2 = _this._box_0; + if (t1.error === e) + t2.listenerValueOrError = t1; else - t4.listenerValueOrError = P.AsyncError$(e, s); - t4.listenerHasError = true; + t2.listenerValueOrError = P.AsyncError$(e, s); + t2.listenerHasError = true; } }, $signature: 0 @@ -5435,18 +5408,18 @@ }; P.Stream_first_closure.prototype = { call$0: function() { - var e, s, t1, exception, error, stackTrace; + var e, s, t1, exception, stackTrace; try { t1 = H.IterableElementError_noElement(); throw H.wrapException(t1); } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - error = e; + t1 = e; stackTrace = s; if (stackTrace == null) - stackTrace = P.AsyncError_defaultStackTrace(error); - this.future._completeError$2(error, stackTrace); + stackTrace = P.AsyncError_defaultStackTrace(t1); + this.future._completeError$2(t1, stackTrace); } }, $signature: 0 @@ -5680,6 +5653,8 @@ var result, t1 = {}; $E._eval$1("0?")._as(futureValue); t1.resultValue = null; + if (!$E._is(null)) + throw H.wrapException(new P.ArgumentError(false, null, "futureValue", "Must not be null")); t1.resultValue = $E._as(futureValue); result = new P._Future($.Zone__current, $E._eval$1("_Future<0>")); this.set$_onDone(new P._BufferingStreamSubscription_asFuture_closure(t1, result)); @@ -5818,18 +5793,18 @@ call$2: function(error, stackTrace) { var cancelFuture = this.$this.cancel$0(), t1 = this.result; - if (cancelFuture != $.$get$Future__nullFuture()) + if (cancelFuture !== $.$get$Future__nullFuture()) cancelFuture.whenComplete$1(new P._BufferingStreamSubscription_asFuture__closure(t1, error, stackTrace)); else t1._completeError$2(error, stackTrace); }, - $signature: 7 + $signature: 8 }; P._BufferingStreamSubscription_asFuture__closure.prototype = { call$0: function() { this.result._completeError$2(this.error, this.stackTrace); }, - $signature: 1 + $signature: 3 }; P._BufferingStreamSubscription__sendError_sendError.prototype = { call$0: function() { @@ -5962,20 +5937,11 @@ }, $signature: 0 }; - P.AsyncError.prototype = { - toString$0: function(_) { - return H.S(this.error); - }, - $isError: 1, - get$stackTrace: function() { - return this.stackTrace; - } - }; P._Zone.prototype = {$isZone: 1}; P._rootHandleUncaughtError_closure.prototype = { call$0: function() { - var error = H.wrapException(this.error); - error.stack = J.toString$0$(this.stackTrace); + var error = type$.Object._as(H.wrapException(this.error)); + error.stack = this.stackTrace.toString$0(0); throw error; }, $signature: 0 @@ -5993,7 +5959,7 @@ } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s)); + P._rootHandleUncaughtError(_null, _null, this, type$.Object._as(e), type$.StackTrace._as(s)); } }, runUnaryGuarded$1$2: function(f, arg, $T) { @@ -6009,7 +5975,7 @@ } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s)); + P._rootHandleUncaughtError(_null, _null, this, type$.Object._as(e), type$.StackTrace._as(s)); } }, runBinaryGuarded$2$3: function(f, arg1, arg2, T1, T2) { @@ -6026,12 +5992,9 @@ } catch (exception) { e = H.unwrapException(exception); s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s)); + P._rootHandleUncaughtError(_null, _null, this, type$.Object._as(e), type$.StackTrace._as(s)); } }, - bindCallback$1$1: function(f, $R) { - return new P._RootZone_bindCallback_closure(this, $R._eval$1("0()")._as(f), $R); - }, bindCallbackGuarded$1: function(f) { return new P._RootZone_bindCallbackGuarded_closure(this, type$.void_Function._as(f)); }, @@ -6063,14 +6026,6 @@ return $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); } }; - P._RootZone_bindCallback_closure.prototype = { - call$0: function() { - return this.$this.run$1$1(this.f, this.R); - }, - $signature: function() { - return this.R._eval$1("0()"); - } - }; P._RootZone_bindCallbackGuarded_closure.prototype = { call$0: function() { return this.$this.runGuarded$1(this.f); @@ -6123,15 +6078,16 @@ t1._contents = t2 + ": "; t1._contents += H.S(v); }, - $signature: 8 + $signature: 9 }; P.MapMixin.prototype = { forEach$1: function(_, action) { - var t1, key; - H._instanceType(this)._eval$1("~(MapMixin.K,MapMixin.V)")._as(action); - for (t1 = this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - key = t1.get$current(); - action.call$2(key, this.$index(0, key)); + var t2, key, + t1 = H._instanceType(this); + t1._eval$1("~(MapMixin.K,MapMixin.V)")._as(action); + for (t2 = this.get$keys(), t2 = t2.get$iterator(t2), t1 = t1._eval$1("MapMixin.V"); t2.moveNext$0();) { + key = t2.get$current(); + action.call$2(key, t1._as(this.$index(0, key))); } }, get$length: function(_) { @@ -6271,94 +6227,94 @@ P.JsonDecoder.prototype = {}; P._JsonStringifier.prototype = { writeStringContent$1: function(s) { - var t1, t2, offset, i, charCode, t3, t4, + var t1, offset, i, charCode, t2, t3, $length = s.length; - for (t1 = J.getInterceptor$s(s), t2 = this._sink, offset = 0, i = 0; i < $length; ++i) { - charCode = t1._codeUnitAt$1(s, i); + for (t1 = this._sink, offset = 0, i = 0; i < $length; ++i) { + charCode = C.JSString_methods._codeUnitAt$1(s, i); if (charCode > 92) { if (charCode >= 55296) { - t3 = charCode & 64512; - if (t3 === 55296) { - t4 = i + 1; - t4 = !(t4 < $length && (C.JSString_methods._codeUnitAt$1(s, t4) & 64512) === 56320); + t2 = charCode & 64512; + if (t2 === 55296) { + t3 = i + 1; + t3 = !(t3 < $length && (C.JSString_methods._codeUnitAt$1(s, t3) & 64512) === 56320); } else - t4 = false; - if (!t4) - if (t3 === 56320) { - t3 = i - 1; - t3 = !(t3 >= 0 && (C.JSString_methods.codeUnitAt$1(s, t3) & 64512) === 55296); + t3 = false; + if (!t3) + if (t2 === 56320) { + t2 = i - 1; + t2 = !(t2 >= 0 && (C.JSString_methods.codeUnitAt$1(s, t2) & 64512) === 55296); } else - t3 = false; + t2 = false; else - t3 = true; - if (t3) { + t2 = true; + if (t2) { if (i > offset) - t2._contents += C.JSString_methods.substring$2(s, offset, i); + t1._contents += C.JSString_methods.substring$2(s, offset, i); offset = i + 1; - t3 = t2._contents += H.Primitives_stringFromCharCode(92); - t3 += H.Primitives_stringFromCharCode(117); - t2._contents = t3; - t3 += H.Primitives_stringFromCharCode(100); - t2._contents = t3; - t4 = charCode >>> 8 & 15; - t3 += H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); - t2._contents = t3; - t4 = charCode >>> 4 & 15; - t3 += H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); - t2._contents = t3; - t4 = charCode & 15; - t2._contents = t3 + H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); + t2 = t1._contents += H.Primitives_stringFromCharCode(92); + t2 += H.Primitives_stringFromCharCode(117); + t1._contents = t2; + t2 += H.Primitives_stringFromCharCode(100); + t1._contents = t2; + t3 = charCode >>> 8 & 15; + t2 += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + t1._contents = t2; + t3 = charCode >>> 4 & 15; + t2 += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + t1._contents = t2; + t3 = charCode & 15; + t1._contents = t2 + H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); } } continue; } if (charCode < 32) { if (i > offset) - t2._contents += C.JSString_methods.substring$2(s, offset, i); + t1._contents += C.JSString_methods.substring$2(s, offset, i); offset = i + 1; - t3 = t2._contents += H.Primitives_stringFromCharCode(92); + t2 = t1._contents += H.Primitives_stringFromCharCode(92); switch (charCode) { case 8: - t2._contents = t3 + H.Primitives_stringFromCharCode(98); + t1._contents = t2 + H.Primitives_stringFromCharCode(98); break; case 9: - t2._contents = t3 + H.Primitives_stringFromCharCode(116); + t1._contents = t2 + H.Primitives_stringFromCharCode(116); break; case 10: - t2._contents = t3 + H.Primitives_stringFromCharCode(110); + t1._contents = t2 + H.Primitives_stringFromCharCode(110); break; case 12: - t2._contents = t3 + H.Primitives_stringFromCharCode(102); + t1._contents = t2 + H.Primitives_stringFromCharCode(102); break; case 13: - t2._contents = t3 + H.Primitives_stringFromCharCode(114); + t1._contents = t2 + H.Primitives_stringFromCharCode(114); break; default: - t3 += H.Primitives_stringFromCharCode(117); - t2._contents = t3; - t3 += H.Primitives_stringFromCharCode(48); - t2._contents = t3; - t3 += H.Primitives_stringFromCharCode(48); - t2._contents = t3; - t4 = charCode >>> 4 & 15; - t3 += H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); - t2._contents = t3; - t4 = charCode & 15; - t2._contents = t3 + H.Primitives_stringFromCharCode(t4 < 10 ? 48 + t4 : 87 + t4); + t2 += H.Primitives_stringFromCharCode(117); + t1._contents = t2; + t2 += H.Primitives_stringFromCharCode(48); + t1._contents = t2; + t2 += H.Primitives_stringFromCharCode(48); + t1._contents = t2; + t3 = charCode >>> 4 & 15; + t2 += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + t1._contents = t2; + t3 = charCode & 15; + t1._contents = t2 + H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); break; } } else if (charCode === 34 || charCode === 92) { if (i > offset) - t2._contents += C.JSString_methods.substring$2(s, offset, i); + t1._contents += C.JSString_methods.substring$2(s, offset, i); offset = i + 1; - t3 = t2._contents += H.Primitives_stringFromCharCode(92); - t2._contents = t3 + H.Primitives_stringFromCharCode(charCode); + t2 = t1._contents += H.Primitives_stringFromCharCode(92); + t1._contents = t2 + H.Primitives_stringFromCharCode(charCode); } } if (offset === 0) - t2._contents += H.S(s); + t1._contents += s; else if (offset < $length) - t2._contents += t1.substring$2(s, offset, $length); + t1._contents += C.JSString_methods.substring$2(s, offset, $length); }, _checkCycle$1: function(object) { var t1, t2, i, t3; @@ -6435,7 +6391,7 @@ var t2, i, t1 = this._sink; t1._contents += "["; - t2 = J.getInterceptor$ax(list); + t2 = J.getInterceptor$asx(list); if (t2.get$isNotEmpty(list)) { this.writeObject$1(t2.$index(list, 0)); for (i = 1; i < t2.get$length(list); ++i) { @@ -6462,7 +6418,7 @@ t2._contents += "{"; for (separator = '"'; i < t1; i += 2, separator = ',"') { t2._contents += separator; - _this.writeStringContent$1(H._asStringS(keyValueList[i])); + _this.writeStringContent$1(H._asString(keyValueList[i])); t2._contents += '":'; t3 = i + 1; if (t3 >= t1) @@ -6483,7 +6439,7 @@ C.JSArray_methods.$indexSet(t1, t2.i++, key); C.JSArray_methods.$indexSet(t1, t2.i++, value); }, - $signature: 8 + $signature: 9 }; P._JsonStringStringifier.prototype = { get$_partialResult: function() { @@ -6534,7 +6490,7 @@ twoDigitMinutes = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 60000000) % 60); twoDigitSeconds = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 1000000) % 60); sixDigitUs = new P.Duration_toString_sixDigits().call$1(t2 % 1000000); - return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + H.S(twoDigitMinutes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs); + return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + twoDigitMinutes + ":" + twoDigitSeconds + "." + sixDigitUs; } }; P.Duration_toString_sixDigits.prototype = { @@ -6551,7 +6507,7 @@ return "0000" + n; return "00000" + n; }, - $signature: 9 + $signature: 10 }; P.Duration_toString_twoDigits.prototype = { call$1: function(n) { @@ -6559,7 +6515,7 @@ return "" + n; return "0" + n; }, - $signature: 9 + $signature: 10 }; P.Error.prototype = { get$stackTrace: function() { @@ -6625,16 +6581,12 @@ return "RangeError"; }, get$_errorExplanation: function() { - var t1, - invalidValue = H._asIntS(this.invalidValue); - if (typeof invalidValue !== "number") - return invalidValue.$lt(); - if (invalidValue < 0) + if (H._asInt(this.invalidValue) < 0) return ": index must not be negative"; - t1 = this.length; + var t1 = this.length; if (t1 === 0) return ": no indices are valid"; - return ": index should be less than " + H.S(t1); + return ": index should be less than " + t1; }, get$length: function(receiver) { return this.length; @@ -6647,8 +6599,8 @@ }; P.UnimplementedError.prototype = { toString$0: function(_) { - var message = this.message; - return message != null ? "UnimplementedError: " + message : "UnimplementedError"; + var t1 = "UnimplementedError: " + this.message; + return t1; } }; P.StateError.prototype = { @@ -6684,8 +6636,8 @@ }; P.CyclicInitializationError.prototype = { toString$0: function(_) { - var variableName = this.variableName; - return variableName == null ? "Reading static variable during its initialization" : "Reading static variable '" + variableName + "' during its initialization"; + var t1 = "Reading static variable '" + this.variableName + "' during its initialization"; + return t1; } }; P._Exception.prototype = { @@ -6696,7 +6648,7 @@ P.FormatException.prototype = { toString$0: function(_) { var message = this.message, - report = message != null && "" !== message ? "FormatException: " + H.S(message) : "FormatException"; + report = "" !== message ? "FormatException: " + message : "FormatException"; return report; } }; @@ -6724,7 +6676,7 @@ }; P.Null.prototype = { get$hashCode: function(_) { - return P.Object.prototype.get$hashCode.call(C.JSNull_methods, this); + return P.Object.prototype.get$hashCode.call(this, this); }, toString$0: function(_) { return "null"; @@ -6738,7 +6690,7 @@ return H.Primitives_objectHashCode(this); }, toString$0: function(_) { - return "Instance of '" + H.S(H.Primitives_objectTypeName(this)) + "'"; + return "Instance of '" + H.Primitives_objectTypeName(this) + "'"; }, toString: function() { return this.toString$0(this); @@ -6781,7 +6733,7 @@ return receiver.localName; }, get$onClick: function(receiver) { - return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent); + return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); }, $isElement: 1 }; @@ -6834,7 +6786,7 @@ else t3.completeError$1(e); }, - $signature: 22 + $signature: 20 }; W.HttpRequestEventTarget.prototype = {}; W.MessageEvent.prototype = {$isMessageEvent: 1}; @@ -6866,11 +6818,11 @@ cancel$0: function() { var _this = this; if (_this._target == null) - return null; + return $.$get$nullFuture(); _this._unlisten$0(); _this._target = null; _this.set$_html$_onData(null); - return null; + return $.$get$nullFuture(); }, onData$1: function(handleData) { var t1, _this = this; @@ -6892,15 +6844,12 @@ } }, _unlisten$0: function() { - var t3, - t1 = this._html$_onData, - t2 = t1 != null; - if (t2) { - t3 = this._target; - t3.toString; - type$.nullable_dynamic_Function_Event._as(t1); - if (t2) - J._removeEventListener$3$x(t3, this._eventType, t1, false); + var t2, + t1 = this._html$_onData; + if (t1 != null) { + t2 = this._target; + t2.toString; + J._removeEventListener$3$x(t2, this._eventType, type$.nullable_dynamic_Function_Event._as(t1), false); } }, set$_html$_onData: function(_onData) { @@ -6911,13 +6860,13 @@ call$1: function(e) { return this.onData.call$1(type$.Event._as(e)); }, - $signature: 10 + $signature: 1 }; W._EventStreamSubscription_onData_closure.prototype = { call$1: function(e) { return this.handleData.call$1(type$.Event._as(e)); }, - $signature: 10 + $signature: 1 }; P._AcceptStructuredClone.prototype = { findSlot$1: function(value) { @@ -7003,7 +6952,7 @@ J.$indexSet$ax(t1, key, t2); return t2; }, - $signature: 23 + $signature: 21 }; P._convertDartToNative_Value_closure.prototype = { call$1: function(element) { @@ -7015,7 +6964,7 @@ call$2: function(key, value) { this.object[key] = P._convertDartToNative_Value(value); }, - $signature: 24 + $signature: 22 }; P._AcceptStructuredCloneDart2Js.prototype = { forEachJsField$2: function(object, action) { @@ -7027,6 +6976,11 @@ } } }; + P.NullRejectionException.prototype = { + toString$0: function(_) { + return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; + } + }; P.promiseToFuture_closure.prototype = { call$1: function(r) { return this.completer.complete$1(0, this.T._eval$1("0/?")._as(r)); @@ -7035,6 +6989,8 @@ }; P.promiseToFuture_closure0.prototype = { call$1: function(e) { + if (e == null) + return this.completer.completeError$1(new P.NullRejectionException(e === undefined)); return this.completer.completeError$1(e); }, $signature: 2 @@ -7048,7 +7004,7 @@ }; P.SvgElement.prototype = { get$onClick: function(receiver) { - return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent); + return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); } }; Y.Level.prototype = { @@ -7072,17 +7028,21 @@ F.Logger.prototype = { get$fullName: function() { var t1 = this.parent, - t2 = t1 == null || t1.name === "", + t2 = t1 == null ? null : t1.name.length !== 0, t3 = this.name; - return t2 ? t3 : t1.get$fullName() + "." + t3; + return t2 === true ? t1.get$fullName() + "." + t3 : t3; }, get$level: function() { - var effectiveLevel, t1; - if (this.parent == null) - effectiveLevel = this._level; - else { + var t1, effectiveLevel; + if (this.parent == null) { + t1 = this._level; + t1.toString; + effectiveLevel = t1; + } else { t1 = $.$get$Logger_root(); - effectiveLevel = t1._level; + t1 = t1._level; + t1.toString; + effectiveLevel = t1; } return effectiveLevel; }, @@ -7105,6 +7065,7 @@ } }, _publish$1: function(record) { + return null; } }; F.Logger_Logger_closure.prototype = { @@ -7120,37 +7081,40 @@ $parent = F.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); thisName = C.JSString_methods.substring$1(thisName, dot + 1); } - t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger)); + t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Logger)); if ($parent == null) t1._level = C.Level_INFO_800; else $parent._children.$indexSet(0, thisName, t1); return t1; }, - $signature: 25 + $signature: 23 }; M.SseClient.prototype = { + get$_eventSource: function() { + var t1 = this.__SseClient__eventSource; + return t1 == null ? H.throwExpression(H.LateError$fieldNI("_eventSource")) : t1; + }, SseClient$1: function(serverUrl) { - var t2, t3, t4, _this = this, - clientId = T.generateUuidV4(), - t1 = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); - _this._eventSource = t1; - _this._serverUrl = serverUrl + "?sseClientId=" + clientId; - t1 = new W._EventStream(t1, "open", false, type$._EventStream_legacy_Event); + var t1, t2, t3, t4, _this = this, + clientId = T.generateUuidV4(); + _this.__SseClient__eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); + _this.__SseClient__serverUrl = serverUrl + "?sseClientId=" + clientId; + t1 = new W._EventStream(_this.get$_eventSource(), "open", false, type$._EventStream_Event); t1.get$first(t1).whenComplete$1(new M.SseClient_closure(_this)); - C.EventSource_methods.addEventListener$2(_this._eventSource, "message", _this.get$_onIncomingMessage()); - C.EventSource_methods.addEventListener$2(_this._eventSource, "control", _this.get$_onIncomingControlMessage()); - t1 = _this._eventSource; - t2 = type$.nullable_void_Function_legacy_Event; + C.EventSource_methods.addEventListener$2(_this.get$_eventSource(), "message", _this.get$_onIncomingMessage()); + C.EventSource_methods.addEventListener$2(_this.get$_eventSource(), "control", _this.get$_onIncomingControlMessage()); + t1 = _this.get$_eventSource(); + t2 = type$.nullable_void_Function_Event; t3 = t2._as(new M.SseClient_closure0(_this)); type$.nullable_void_Function._as(null); - t4 = type$.legacy_Event; + t4 = type$.Event; W._EventStreamSubscription$(t1, "open", t3, false, t4); - W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure1(_this)), false, t4); + W._EventStreamSubscription$(_this.get$_eventSource(), "error", t2._as(new M.SseClient_closure1(_this)), false, t4); }, close$0: function(_) { var t1, _this = this; - _this._eventSource.close(); + _this.get$_eventSource().close(); if (_this._onConnected.future._state === 0) { t1 = _this._outgoingController; new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$cancelOnError(null, true).asFuture$1$1(null, type$.dynamic); @@ -7159,20 +7123,20 @@ _this._outgoingController.close$0(0); }, _onIncomingControlMessage$1: function(message) { - var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true); + var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.MessageEvent._as(type$.Event._as(message)).data, true); if (J.$eq$(data, "close")) this.close$0(0); else throw H.wrapException(P.UnsupportedError$('Illegal Control Message "' + H.S(data) + '"')); }, _onIncomingMessage$1: function(message) { - this._incomingController.add$1(0, H._asStringS(C.C_JsonCodec.decode$2$reviver(0, H._asStringS(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true)), null))); + this._incomingController.add$1(0, H._asString(C.C_JsonCodec.decode$2$reviver(0, H._asString(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.MessageEvent._as(type$.Event._as(message)).data, true)), null))); }, _onOutgoingDone$0: function() { this.close$0(0); }, _onOutgoingMessage$1: function(message) { - return this._onOutgoingMessage$body$SseClient(H._asStringS(message)); + return this._onOutgoingMessage$body$SseClient(H._asStringQ(message)); }, _onOutgoingMessage$body$SseClient: function(message) { var $async$goto = 0, @@ -7202,8 +7166,9 @@ throw exception; } $async$handler = 3; + t1 = $async$self.__SseClient__serverUrl; $async$goto = 6; - return P._asyncAwait(W.HttpRequest_request($async$self._serverUrl + "&messageId=" + ++$async$self._lastMessageId, "POST", encodedMessage, true), $async$_onOutgoingMessage$1); + return P._asyncAwait(W.HttpRequest_request((t1 == null ? H.throwExpression(H.LateError$fieldNI("_serverUrl")) : t1) + "&messageId=" + ++$async$self._lastMessageId, "POST", encodedMessage, true), $async$_onOutgoingMessage$1); case 6: // returning from await. $async$handler = 1; @@ -7215,8 +7180,7 @@ $async$handler = 2; $async$exception = $async$currentError; e1 = H.unwrapException($async$exception); - t1 = "Failed to send " + H.S(message) + ":\n " + H.S(e1); - $async$self._logger.log$4(C.Level_SEVERE_1000, t1, null, null); + $async$self._logger.log$4(C.Level_SEVERE_1000, "Failed to send " + H.S(message) + ":\n " + H.S(e1), null, null); $async$self.close$0(0); // goto after finally $async$goto = 5; @@ -7246,7 +7210,7 @@ t2 = t1._outgoingController; new P._ControllerStream(t2, H._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$2$onDone(t1.get$_onOutgoingMessage(), t1.get$_onOutgoingDone()); }, - $signature: 1 + $signature: 3 }; M.SseClient_closure0.prototype = { call$1: function(_) { @@ -7254,7 +7218,7 @@ if (t1 != null) t1.cancel$0(); }, - $signature: 12 + $signature: 1 }; M.SseClient_closure1.prototype = { call$1: function(error) { @@ -7264,7 +7228,7 @@ if (t2 !== true) t1._errorTimer = P.Timer_Timer(C.Duration_5000000, new M.SseClient__closure(t1, error)); }, - $signature: 12 + $signature: 1 }; M.SseClient__closure.prototype = { call$0: function() { @@ -7286,45 +7250,45 @@ if (t1.future._state === 0) t1.completeError$1(error); }, - $signature: 1 + $signature: 0 }; T.generateUuidV4__generateBits.prototype = { call$1: function(bitCount) { return this.random.nextInt$1(C.JSInt_methods._shlPositive$1(1, bitCount)); }, - $signature: 27 + $signature: 25 }; T.generateUuidV4__printDigits.prototype = { call$2: function(value, count) { return C.JSString_methods.padLeft$2(C.JSInt_methods.toRadixString$1(value, 16), count, "0"); }, - $signature: 13 + $signature: 11 }; T.generateUuidV4__bitsDigits.prototype = { call$2: function(bitCount, digitCount) { return this._printDigits.call$2(this._generateBits.call$1(bitCount), digitCount); }, - $signature: 13 + $signature: 11 }; R.StreamChannelMixin.prototype = {}; E.main_closure.prototype = { call$1: function(_) { - type$.legacy_MouseEvent._as(_); + type$.MouseEvent._as(_); this.channel._outgoingController.close$0(0); }, - $signature: 28 + $signature: 26 }; E.main_closure0.prototype = { call$1: function(s) { var count, t1, t2, t3, i, t4, t5, lastEvent; - H._asStringS(s); - if (J.startsWith$1$s(s, "send ")) { + H._asString(s); + if (C.JSString_methods.startsWith$1(s, "send ")) { count = P.int_parse(C.JSArray_methods.get$last(s.split(" "))); for (t1 = this.channel._outgoingController, t2 = H._instanceType(t1), t3 = t2._precomputed1, t2 = t2._eval$1("_DelayedData<1>"), i = 0; i < count; ++i) { t4 = t3._as("" + i); - if (t1._state >= 4) - H.throwExpression(t1._badEventState$0()); t5 = t1._state; + if (t5 >= 4) + H.throwExpression(t1._badEventState$0()); if ((t5 & 1) !== 0) t1._sendData$1(t4); else if ((t5 & 3) === 0) { @@ -7344,7 +7308,7 @@ t1.add$1(0, H._instanceType(t1)._precomputed1._as(s)); } }, - $signature: 29 + $signature: 27 }; (function aliases() { var _ = J.Interceptor.prototype; @@ -7360,34 +7324,34 @@ _instance_2_u = hunkHelpers._instance_2u, _instance_1_u = hunkHelpers._instance_1u, _instance_0_u = hunkHelpers._instance_0u; - _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 3); - _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 3); - _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 3); + _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 4); + _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 4); + _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 4); _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); _static_1(P, "async___nullDataHandler$closure", "_nullDataHandler", 2); - _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 6); + _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 7); _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); - _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 20, 0); - _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 6); - _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4); + _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 18, 0); + _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 7); + _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 5); var _; - _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 11); - _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 11); + _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 1); + _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 1); _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0); - _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 26); + _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 24); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(P.Object, null); - _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, H.Closure, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, H._Type, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, Y.Level, L.LogRecord, F.Logger, R.StreamChannelMixin]); + _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, H.Closure, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, P._TimerImpl, P._AsyncAwaitCompleter, P.AsyncError, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P._Zone, P.ListMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P.NullRejectionException, P._JSRandom, Y.Level, L.LogRecord, F.Logger, R.StreamChannelMixin]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]); _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); _inherit(J.JSUnmodifiableArray, J.JSArray); - _inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]); - _inheritMany(P.Error, [H.LateError, H.NotNullableError, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); - _inheritMany(H.Closure, [H.closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); + _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); + _inheritMany(P.Error, [H.LateError, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); + _inheritMany(H.Closure, [H.nullFuture_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); _inherit(H.EfficientLengthIterable, P.Iterable); _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]); _inherit(H.NullError, P.TypeError); @@ -7441,12 +7405,12 @@ mangledNames: {}, getTypeFromName: getGlobalFromName, metadata: [], - types: ["~()", "Null()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "Null(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "~(Event)", "~(Event*)", "Null(Event*)", "String*(int*,int*)", "Future()", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "_Future<@>(@)", "~(ProgressEvent)", "@(@,@)", "~(@,@)", "Logger*()", "~(String*)", "int*(int*)", "Null(MouseEvent*)", "Null(String*)"], + types: ["~()", "~(Event)", "~(@)", "Null()", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "Null(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "String(int,int)", "Future()", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "_Future<@>(@)", "~(ProgressEvent)", "@(@,@)", "~(@,@)", "Logger()", "~(String?)", "int(int)", "~(MouseEvent)", "~(String)"], interceptorsByTag: null, leafTags: null, arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti" }; - H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"NotNullableError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}')); + H._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","JavaScriptFunction":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSNumNotInt":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MouseEvent":{"Event":[]},"ProgressEvent":{"Event":[]},"UIEvent":{"Event":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"MessageEvent":{"Event":[]},"Node":{"EventTarget":[]},"SelectElement":{"Element":[],"EventTarget":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}')); H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"Codec":2,"StreamChannelMixin":1}')); 0; var type$ = (function rtii() { @@ -7466,7 +7430,10 @@ JavaScriptFunction: findType("JavaScriptFunction"), JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), List_dynamic: findType("List<@>"), + Logger: findType("Logger"), Map_dynamic_dynamic: findType("Map<@,@>"), + MessageEvent: findType("MessageEvent"), + MouseEvent: findType("MouseEvent"), Null: findType("Null"), Object: findType("Object"), ProgressEvent: findType("ProgressEvent"), @@ -7475,9 +7442,10 @@ UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), _AsyncCompleter_HttpRequest: findType("_AsyncCompleter"), _AsyncCompleter_dynamic: findType("_AsyncCompleter<@>"), - _ElementEventStreamImpl_legacy_MouseEvent: findType("_ElementEventStreamImpl"), - _EventStream_legacy_Event: findType("_EventStream"), + _ElementEventStreamImpl_MouseEvent: findType("_ElementEventStreamImpl"), + _EventStream_Event: findType("_EventStream"), _Future_HttpRequest: findType("_Future"), + _Future_Null: findType("_Future"), _Future_dynamic: findType("_Future<@>"), _Future_int: findType("_Future"), _Future_void: findType("_Future<~>"), @@ -7491,14 +7459,8 @@ dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"), dynamic_Function_dynamic_dynamic: findType("@(@,@)"), int: findType("int"), - legacy_Event: findType("Event*"), - legacy_Logger: findType("Logger*"), - legacy_MessageEvent: findType("MessageEvent*"), - legacy_MouseEvent: findType("MouseEvent*"), legacy_Never: findType("0&*"), legacy_Object: findType("Object*"), - legacy_ProgressEvent: findType("ProgressEvent*"), - legacy_String: findType("String*"), nullable_Future_Null: findType("Future?"), nullable_List_dynamic: findType("List<@>?"), nullable_Object: findType("Object?"), @@ -7508,8 +7470,8 @@ nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object: findType("Object?(Object?,Object?)?"), nullable_nullable_Object_Function_dynamic: findType("Object?(@)?"), nullable_void_Function: findType("~()?"), - nullable_void_Function_legacy_Event: findType("~(Event*)?"), - nullable_void_Function_legacy_ProgressEvent: findType("~(ProgressEvent*)?"), + nullable_void_Function_Event: findType("~(Event)?"), + nullable_void_Function_ProgressEvent: findType("~(ProgressEvent)?"), num: findType("num"), void: findType("~"), void_Function: findType("~()"), @@ -7524,7 +7486,6 @@ C.Interceptor_methods = J.Interceptor.prototype; C.JSArray_methods = J.JSArray.prototype; C.JSInt_methods = J.JSInt.prototype; - C.JSNull_methods = J.JSNull.prototype; C.JSNumber_methods = J.JSNumber.prototype; C.JSString_methods = J.JSString.prototype; C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; @@ -7682,17 +7643,16 @@ $.Zone__current = C.C__RootZone; $._toStringVisiting = H.setRuntimeTypeInfo([], H.findType("JSArray")); $.LogRecord__nextNumber = 0; - $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger); + $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Logger); })(); (function lazyInitializers() { var _lazyFinal = hunkHelpers.lazyFinal, - _lazy = hunkHelpers.lazy, - _lazyOld = hunkHelpers.lazyOld; + _lazy = hunkHelpers.lazy; _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() { return H.getIsolateAffinityTag("_$dart_dartClosure"); }); _lazyFinal($, "nullFuture", "$get$nullFuture", function() { - return C.C__RootZone.run$1$1(new H.closure(), H.findType("Future")); + return C.C__RootZone.run$1$1(new H.nullFuture_closure(), H.findType("Future")); }); _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({ @@ -7713,7 +7673,7 @@ }); _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = '$arguments$'; + var $argumentsExpr$ = "$arguments$"; try { null.$method$($argumentsExpr$); } catch (e) { @@ -7726,7 +7686,7 @@ }); _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = '$arguments$'; + var $argumentsExpr$ = "$arguments$"; try { (void 0).$method$($argumentsExpr$); } catch (e) { @@ -7762,12 +7722,12 @@ return P._AsyncRun__initializeScheduleImmediate(); }); _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", function() { - return H.findType("_Future")._as($.$get$nullFuture()); + return type$._Future_Null._as($.$get$nullFuture()); }); _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() { return new Error().stack != void 0; }); - _lazyOld($, "Logger_root", "$get$Logger_root", function() { + _lazyFinal($, "Logger_root", "$get$Logger_root", function() { return F.Logger_Logger(""); }); })(); @@ -7811,7 +7771,7 @@ callback(null); return; } - if (typeof document.currentScript != 'undefined') { + if (typeof document.currentScript != "undefined") { callback(document.currentScript); return; } @@ -7825,10 +7785,11 @@ scripts[i].addEventListener("load", onLoad, false); })(function(currentScript) { init.currentScript = currentScript; + var callMain = E.main; if (typeof dartMainRunner === "function") - dartMainRunner(E.main, []); + dartMainRunner(callMain, []); else - E.main([]); + callMain([]); }); })(); From de3ebfc7d0671dbd4ac416da073d06fe1a5a3de2 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 4 Jun 2021 17:02:41 -0700 Subject: [PATCH 055/115] Buffer concurrent requests (dart-lang/sse#51) * Buffer concurrent requests * comment --- pkgs/sse/CHANGELOG.md | 5 + pkgs/sse/lib/client/sse_client.dart | 39 +- pkgs/sse/pubspec.yaml | 3 +- pkgs/sse/test/sse_test.dart | 10 + pkgs/sse/test/web/index.dart.js | 1003 +++++++++++++++++++++------ 5 files changed, 833 insertions(+), 227 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 932dc54f0..cd0dd524e 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.1.0 + +- Limit the number of concurrent requests to prevent Chrome from automatically + dropping them on the floor. + ## 4.0.0 - Support null safety. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 0f1da876d..33353460a 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -7,10 +7,19 @@ import 'dart:convert'; import 'dart:html'; import 'package:logging/logging.dart'; +import 'package:pool/pool.dart'; import 'package:stream_channel/stream_channel.dart'; import '../src/util/uuid.dart'; +/// Limit for the number of concurrent outgoing requests. +/// +/// Chrome drops outgoing requests on the floor after some threshold. To prevent +/// these errors we buffer outgoing requests with a pool. +/// +/// Note Chrome's limit is 6000. So this gives us plenty of headroom. +final _requestPool = Pool(1000); + /// A client for bi-directional sse communcation. /// /// The client can send any JSON-encodable messages to the server by adding @@ -115,19 +124,21 @@ class SseClient extends StreamChannelMixin { void _onOutgoingMessage(String? message) async { String? encodedMessage; - try { - encodedMessage = jsonEncode(message); - } on JsonUnsupportedObjectError catch (e) { - _logger.warning('Unable to encode outgoing message: $e'); - } on ArgumentError catch (e) { - _logger.warning('Invalid argument: $e'); - } - try { - await HttpRequest.request('$_serverUrl&messageId=${++_lastMessageId}', - method: 'POST', sendData: encodedMessage, withCredentials: true); - } catch (e) { - _logger.severe('Failed to send $message:\n $e'); - close(); - } + await _requestPool.withResource(() async { + try { + encodedMessage = jsonEncode(message); + } on JsonUnsupportedObjectError catch (e) { + _logger.warning('Unable to encode outgoing message: $e'); + } on ArgumentError catch (e) { + _logger.warning('Invalid argument: $e'); + } + try { + await HttpRequest.request('$_serverUrl&messageId=${++_lastMessageId}', + method: 'POST', sendData: encodedMessage, withCredentials: true); + } catch (e) { + _logger.severe('Failed to send $message:\n $e'); + close(); + } + }); } } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 6f637fe31..1c2b35159 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.0.0 +version: 4.1.0 homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional @@ -13,6 +13,7 @@ dependencies: async: ^2.0.8 collection: ^1.0.0 logging: '>=0.11.3+2 <2.0.0' + pool: ^1.5.0 pedantic: ^1.4.0 stream_channel: '>=1.6.8 <3.0.0' shelf: ^1.1.0 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index ad84d7e88..5fc898cb8 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -67,6 +67,16 @@ void main() { expect(await connection.stream.first, 'blah'); }); + test('can send a significant number of requests', () async { + await webdriver.get('http://localhost:${server.port}'); + var connection = await handler.connections.next; + var limit = 7000; + for (var i = 0; i < limit; i++) { + connection.sink.add('$i'); + } + await connection.stream.take(limit).toList(); + }); + test('messages arrive in-order', () async { expect(handler.numberOfClients, 0); await webdriver.get('http://localhost:${server.port}'); diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index 741866a07..d3554dad1 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.13.0-203.0.dev. +// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.13.0. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -265,6 +265,9 @@ IterableElementError_noElement: function() { return new P.StateError("No element"); }, + IterableElementError_tooFew: function() { + return new P.StateError("Too few elements"); + }, LateError: function LateError(t0) { this._message = t0; }, @@ -324,18 +327,32 @@ return hash; }, Primitives_parseInt: function(source, radix) { - var decimalMatch, + var decimalMatch, maxCharCode, digitsPart, t1, i, _null = null, match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); if (match == null) - return null; + return _null; if (3 >= match.length) return H.ioore(match, 3); decimalMatch = match[3]; - if (decimalMatch != null) + if (radix == null) { + if (decimalMatch != null) + return parseInt(source, 10); + if (match[2] != null) + return parseInt(source, 16); + return _null; + } + if (radix < 2 || radix > 36) + throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", _null)); + if (radix === 10 && decimalMatch != null) return parseInt(source, 10); - if (match[2] != null) - return parseInt(source, 16); - return null; + if (radix < 10 || decimalMatch == null) { + maxCharCode = radix <= 10 ? 47 + radix : 86 + radix; + digitsPart = match[1]; + for (t1 = digitsPart.length, i = 0; i < t1; ++i) + if ((C.JSString_methods._codeUnitAt$1(digitsPart, i) | 32) > maxCharCode) + return _null; + } + return parseInt(source, radix); }, Primitives_objectTypeName: function(object) { return H.Primitives__objectTypeNameNewRti(object); @@ -364,11 +381,13 @@ }, Primitives_stringFromCharCode: function(charCode) { var bits; - if (charCode <= 65535) - return String.fromCharCode(charCode); - if (charCode <= 1114111) { - bits = charCode - 65536; - return String.fromCharCode((C.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); + if (0 <= charCode) { + if (charCode <= 65535) + return String.fromCharCode(charCode); + if (charCode <= 1114111) { + bits = charCode - 65536; + return String.fromCharCode((C.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); + } } throw H.wrapException(P.RangeError$range(charCode, 0, 1114111, null, null)); }, @@ -1134,6 +1153,10 @@ initHooks_closure1: function initHooks_closure1(t0) { this.prototypeForTag = t0; }, + StringMatch: function StringMatch(t0, t1) { + this.start = t0; + this.pattern = t1; + }, _checkValidIndex: function(index, list, $length) { if (index >>> 0 !== index || index >= $length) throw H.wrapException(H.diagnoseIndexError(list, index)); @@ -2646,6 +2669,19 @@ } return C.UnknownJavaScriptObject_methods; }, + JSArray_JSArray$fixed: function($length, $E) { + if ($length < 0 || $length > 4294967295) + throw H.wrapException(P.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); + }, + JSArray_JSArray$growable: function($length, $E) { + if ($length < 0) + throw H.wrapException(P.ArgumentError$("Length must be a non-negative integer: " + $length)); + return H.setRuntimeTypeInfo(new Array($length), $E._eval$1("JSArray<0>")); + }, + JSArray_JSArray$markFixed: function(allocation, $E) { + return J.JSArray_markFixedList(H.setRuntimeTypeInfo(allocation, $E._eval$1("JSArray<0>")), $E); + }, JSArray_markFixedList: function(list, $T) { list.fixed$length = Array; return list; @@ -2703,6 +2739,15 @@ return receiver; return J.getNativeInterceptor(receiver); }, + getInterceptor$s: function(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof P.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, getInterceptor$x: function(receiver) { if (receiver == null) return receiver; @@ -2715,6 +2760,16 @@ return receiver; return J.getNativeInterceptor(receiver); }, + getInterceptor$z: function(receiver) { + if (receiver == null) + return receiver; + if (!(receiver instanceof P.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + get$error$z: function(receiver) { + return J.getInterceptor$z(receiver).get$error(receiver); + }, get$hashCode$: function(receiver) { return J.getInterceptor$(receiver).get$hashCode(receiver); }, @@ -2743,9 +2798,15 @@ addEventListener$3$x: function(receiver, a0, a1, a2) { return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); }, + complete$1$z: function(receiver, a0) { + return J.getInterceptor$z(receiver).complete$1(receiver, a0); + }, forEach$1$ax: function(receiver, a0) { return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); }, + matchAsPrefix$2$s: function(receiver, a0, a1) { + return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); + }, toString$0$: function(receiver) { return J.getInterceptor$(receiver).toString$0(receiver); }, @@ -2880,7 +2941,43 @@ if (stackTrace != null) return stackTrace; } - return C.C__StringStackTrace; + return C._StringStackTrace_3uE; + }, + Future_Future$sync: function(computation, $T) { + var result, error, stackTrace, future, replacement, t1, t2, exception; + try { + result = computation.call$0(); + if ($T._eval$1("Future<0>")._is(result)) + return result; + else { + t1 = $T._as(result); + t2 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")); + t2._state = 4; + t2._resultOrListeners = t1; + return t2; + } + } catch (exception) { + error = H.unwrapException(exception); + stackTrace = H.getTraceFromException(exception); + future = new P._Future($.Zone__current, $T._eval$1("_Future<0>")); + type$.Object._as(error); + type$.nullable_StackTrace._as(stackTrace); + replacement = null; + if (replacement != null) + future._asyncCompleteError$2(J.get$error$z(replacement), replacement.get$stackTrace()); + else + future._asyncCompleteError$2(error, stackTrace); + return future; + } + }, + Future_Future$value: function(value, $T) { + var t1 = value == null ? $T._as(value) : value, + t2 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")); + t2._asyncComplete$1(t1); + return t2; + }, + Completer_Completer: function($T) { + return new P._AsyncCompleter(new P._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncCompleter<0>")); }, _Future__chainCoreFuture: function(source, target) { var t1, t2, listeners; @@ -3095,6 +3192,8 @@ _nullDataHandler: function(value) { }, _nullErrorHandler: function(error, stackTrace) { + type$.Object._as(error); + type$.StackTrace._as(stackTrace); P._rootHandleUncaughtError(null, null, $.Zone__current, error, stackTrace); }, _nullDoneHandler: function() { @@ -3209,6 +3308,10 @@ this.future = t0; this.$ti = t1; }, + _SyncCompleter: function _SyncCompleter(t0, t1) { + this.future = t0; + this.$ti = t1; + }, _FutureListener: function _FutureListener(t0, t1, t2, t3, t4) { var _ = this; _._nextListener = null; @@ -3564,6 +3667,12 @@ t1 = result._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, + ListQueue$: function($E) { + return new P.ListQueue(P.List_List$filled(P.ListQueue__calculateCapacity(null), null, false, $E._eval$1("0?")), $E._eval$1("ListQueue<0>")); + }, + ListQueue__calculateCapacity: function(initialCapacity) { + return 8; + }, ListMixin: function ListMixin() { }, MapBase: function MapBase() { @@ -3574,13 +3683,28 @@ }, MapMixin: function MapMixin() { }, + ListQueue: function ListQueue(t0, t1) { + var _ = this; + _._table = t0; + _._modificationCount = _._tail = _._head = 0; + _.$ti = t1; + }, + _ListQueueIterator: function _ListQueueIterator(t0, t1, t2, t3, t4) { + var _ = this; + _._queue = t0; + _._end = t1; + _._modificationCount = t2; + _._position = t3; + _._collection$_current = null; + _.$ti = t4; + }, _parseJson: function(source, reviver) { var e, exception, t1, parsed = null; try { parsed = JSON.parse(source); } catch (exception) { e = H.unwrapException(exception); - t1 = P.FormatException$(String(e)); + t1 = P.FormatException$(String(e), null, null); throw H.wrapException(t1); } t1 = P._convertJsonToDartLazy(parsed); @@ -3654,22 +3778,23 @@ this._seen = t1; this._toEncodable = t2; }, - int_parse: function(source) { - var value = H.Primitives_parseInt(source, null); + int_parse: function(source, radix) { + var value = H.Primitives_parseInt(source, radix); if (value != null) return value; - throw H.wrapException(P.FormatException$(source)); + throw H.wrapException(P.FormatException$(source, null, null)); }, Error__objectToString: function(object) { if (object instanceof H.Closure) return object.toString$0(0); return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; }, - List_List$filled: function($length, fill, $E) { - var result; - if ($length > 4294967295) - H.throwExpression(P.RangeError$range($length, 0, 4294967295, "length", null)); - result = J.JSArray_markFixedList(H.setRuntimeTypeInfo(new Array($length), $E._eval$1("JSArray<0>")), $E); + List_List$filled: function($length, fill, growable, $E) { + var i, + result = growable ? J.JSArray_JSArray$growable($length, $E) : J.JSArray_JSArray$fixed($length, $E); + if ($length !== 0 && fill != null) + for (i = 0; i < result.length; ++i) + result[i] = fill; return result; }, StringBuffer__writeAll: function(string, objects, separator) { @@ -3738,6 +3863,9 @@ ArgumentError$value: function(value, $name, message) { return new P.ArgumentError(true, value, $name, message); }, + ArgumentError$notNull: function($name) { + return new P.ArgumentError(false, null, $name, "Must not be null"); + }, RangeError$: function(message) { var _null = null; return new P.RangeError(_null, _null, false, _null, _null, message); @@ -3748,8 +3876,24 @@ RangeError$range: function(invalidValue, minValue, maxValue, $name, message) { return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); }, + RangeError_checkValidRange: function(start, end, $length) { + if (0 > start || start > $length) + throw H.wrapException(P.RangeError$range(start, 0, $length, "start", null)); + if (end != null) { + if (start > end || end > $length) + throw H.wrapException(P.RangeError$range(end, start, $length, "end", null)); + return end; + } + return $length; + }, + RangeError_checkNotNegative: function(value, $name) { + if (value < 0) + throw H.wrapException(P.RangeError$range(value, 0, null, $name, null)); + return value; + }, IndexError$: function(invalidValue, indexable, $name, message, $length) { - return new P.IndexError($length, true, invalidValue, $name, "Index out of range"); + var t1 = H._asInt($length == null ? J.get$length$asx(indexable) : $length); + return new P.IndexError(t1, true, invalidValue, $name, "Index out of range"); }, UnsupportedError$: function(message) { return new P.UnsupportedError(message); @@ -3763,8 +3907,8 @@ ConcurrentModificationError$: function(modifiedObject) { return new P.ConcurrentModificationError(modifiedObject); }, - FormatException$: function(message) { - return new P.FormatException(message); + FormatException$: function(message, source, offset) { + return new P.FormatException(message, source, offset); }, DateTime: function DateTime(t0, t1) { this._value = t0; @@ -3832,8 +3976,10 @@ _Exception: function _Exception(t0) { this.message = t0; }, - FormatException: function FormatException(t0) { + FormatException: function FormatException(t0, t1, t2) { this.message = t0; + this.source = t1; + this.offset = t2; }, Iterable: function Iterable() { }, @@ -3841,7 +3987,8 @@ }, Object: function Object() { }, - _StringStackTrace: function _StringStackTrace() { + _StringStackTrace: function _StringStackTrace(t0) { + this._stackTrace = t0; }, StringBuffer: function StringBuffer(t0) { this._contents = t0; @@ -4011,6 +4158,10 @@ this.handleData = t0; } }, + S = {AsyncMemoizer: function AsyncMemoizer(t0, t1) { + this._completer = t0; + this.$ti = t1; + }}, Y = {Level: function Level(t0, t1) { this.name = t0; this.value = t1; @@ -4035,6 +4186,23 @@ this.name = t0; } }, + O = {Pool: function Pool(t0, t1, t2, t3, t4) { + var _ = this; + _._requestedResources = t0; + _._onReleaseCallbacks = t1; + _._onReleaseCompleters = t2; + _._maxAllocatedResources = t3; + _._allocatedResources = 0; + _._timer = null; + _._closeMemo = t4; + }, Pool__runOnRelease_closure: function Pool__runOnRelease_closure(t0) { + this.$this = t0; + }, Pool__runOnRelease_closure0: function Pool__runOnRelease_closure0(t0) { + this.$this = t0; + }, PoolResource: function PoolResource(t0) { + this._pool = t0; + this._released = false; + }}, M = { SseClient$: function(serverUrl) { var t1 = type$.String; @@ -4063,6 +4231,11 @@ SseClient__closure: function SseClient__closure(t0, t1) { this.$this = t0; this.error = t1; + }, + SseClient__onOutgoingMessage_closure: function SseClient__onOutgoingMessage_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.message = t2; } }, T = { @@ -4105,7 +4278,7 @@ this.channel = t0; } }; - var holders = [C, H, J, P, W, Y, L, F, M, T, R, E]; + var holders = [C, H, J, P, W, S, Y, L, F, O, M, T, R, E]; hunkHelpers.setFunctionNamesIfNecessary(holders); var $ = {}; H.JS_CONST.prototype = {}; @@ -4183,6 +4356,27 @@ return receiver[t1 - 1]; throw H.wrapException(H.IterableElementError_noElement()); }, + setRange$4: function(receiver, start, end, iterable, skipCount) { + var $length, otherList, t1, i; + H._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(iterable); + if (!!receiver.immutable$list) + H.throwExpression(P.UnsupportedError$("setRange")); + P.RangeError_checkValidRange(start, end, receiver.length); + $length = end - start; + if ($length === 0) + return; + P.RangeError_checkNotNegative(skipCount, "skipCount"); + otherList = iterable; + t1 = J.getInterceptor$asx(otherList); + if (skipCount + $length > t1.get$length(otherList)) + throw H.wrapException(H.IterableElementError_tooFew()); + if (skipCount < start) + for (i = $length - 1; i >= 0; --i) + receiver[start + i] = t1.$index(otherList, skipCount + i); + else + for (i = 0; i < $length; ++i) + receiver[start + i] = t1.$index(otherList, skipCount + i); + }, get$isNotEmpty: function(receiver) { return receiver.length !== 0; }, @@ -4329,14 +4523,36 @@ throw H.wrapException(H.diagnoseIndexError(receiver, index)); return receiver.charCodeAt(index); }, + matchAsPrefix$2: function(receiver, string, start) { + var t1, i, _null = null; + if (start < 0 || start > string.length) + throw H.wrapException(P.RangeError$range(start, 0, string.length, _null, _null)); + t1 = receiver.length; + if (start + t1 > string.length) + return _null; + for (i = 0; i < t1; ++i) + if (this.codeUnitAt$1(string, start + i) !== this._codeUnitAt$1(receiver, i)) + return _null; + return new H.StringMatch(start, receiver); + }, $add: function(receiver, other) { return receiver + other; }, - startsWith$1: function(receiver, pattern) { - var otherLength = pattern.length; - if (otherLength > receiver.length) - return false; - return pattern === receiver.substring(0, otherLength); + startsWith$2: function(receiver, pattern, index) { + var endIndex; + type$.Pattern._as(pattern); + if (index < 0 || index > receiver.length) + throw H.wrapException(P.RangeError$range(index, 0, receiver.length, null, null)); + if (typeof pattern == "string") { + endIndex = index + pattern.length; + if (endIndex > receiver.length) + return false; + return pattern === receiver.substring(index, endIndex); + } + return J.matchAsPrefix$2$s(pattern, receiver, index) != null; + }, + startsWith$1: function($receiver, pattern) { + return this.startsWith$2($receiver, pattern, 0); }, substring$2: function(receiver, startIndex, endIndex) { if (endIndex == null) @@ -4376,13 +4592,21 @@ return receiver; return this.$mul(padding, delta) + receiver; }, - lastIndexOf$1: function(receiver, pattern) { - var start = receiver.length, - t1 = pattern.length; - if (start + t1 > start) - start -= t1; + lastIndexOf$2: function(receiver, pattern, start) { + var t1, t2; + if (start == null) + start = receiver.length; + else if (start < 0 || start > receiver.length) + throw H.wrapException(P.RangeError$range(start, 0, receiver.length, null, null)); + t1 = pattern.length; + t2 = receiver.length; + if (start + t1 > t2) + start = t2 - t1; return receiver.lastIndexOf(pattern, start); }, + lastIndexOf$1: function($receiver, pattern) { + return this.lastIndexOf$2($receiver, pattern, null); + }, toString$0: function(receiver) { return receiver; }, @@ -4411,11 +4635,9 @@ }; H.nullFuture_closure.prototype = { call$0: function() { - var t1 = new P._Future($.Zone__current, type$._Future_Null); - t1._asyncComplete$1(null); - return t1; + return P.Future_Future$value(null, type$.Null); }, - $signature: 12 + $signature: 7 }; H.EfficientLengthIterable.prototype = {}; H.ListIterable.prototype = { @@ -4424,8 +4646,7 @@ return new H.ListIterator(_this, _this.get$length(_this), H._instanceType(_this)._eval$1("ListIterator")); }, get$isEmpty: function(_) { - var t1 = this._parent; - return t1.get$length(t1) === 0; + return this.get$length(this) === 0; } }; H.ListIterator.prototype = { @@ -4782,7 +5003,7 @@ call$1: function(o) { return this.getTag(o); }, - $signature: 5 + $signature: 8 }; H.initHooks_closure0.prototype = { call$2: function(o, tag) { @@ -4796,6 +5017,7 @@ }, $signature: 14 }; + H.StringMatch.prototype = {}; H.NativeTypedData.prototype = {}; H.NativeTypedArray.prototype = { get$length: function(receiver) { @@ -4901,7 +5123,7 @@ t1.storedCallback = null; f.call$0(); }, - $signature: 6 + $signature: 4 }; P._AsyncRun__initializeScheduleImmediate_closure.prototype = { call$1: function(callback) { @@ -5006,14 +5228,12 @@ }; P._Completer.prototype = { completeError$2: function(error, stackTrace) { - var t1; H.checkNotNullable(error, "error", type$.Object); - t1 = this.future; - if (t1._state !== 0) + if (this.future._state !== 0) throw H.wrapException(P.StateError$("Future already completed")); if (stackTrace == null) stackTrace = P.AsyncError_defaultStackTrace(error); - t1._asyncCompleteError$2(error, stackTrace); + this._completeError$2(error, stackTrace); }, completeError$1: function(error) { return this.completeError$2(error, null); @@ -5032,6 +5252,23 @@ }, complete$0: function($receiver) { return this.complete$1($receiver, null); + }, + _completeError$2: function(error, stackTrace) { + this.future._asyncCompleteError$2(error, stackTrace); + } + }; + P._SyncCompleter.prototype = { + complete$1: function(_, value) { + var t2, + t1 = this.$ti; + t1._eval$1("1/?")._as(value); + t2 = this.future; + if (t2._state !== 0) + throw H.wrapException(P.StateError$("Future already completed")); + t2._complete$1(t1._eval$1("1/")._as(value)); + }, + _completeError$2: function(error, stackTrace) { + this.future._completeError$2(error, stackTrace); } }; P._FutureListener.prototype = { @@ -5258,13 +5495,13 @@ t1._completeError$2(error, stackTrace); } }, - $signature: 6 + $signature: 4 }; P._Future__chainForeignFuture_closure0.prototype = { call$2: function(error, stackTrace) { this.$this._completeError$2(type$.Object._as(error), type$.StackTrace._as(stackTrace)); }, - $signature: 8 + $signature: 5 }; P._Future__chainForeignFuture_closure1.prototype = { call$0: function() { @@ -5654,7 +5891,7 @@ $E._eval$1("0?")._as(futureValue); t1.resultValue = null; if (!$E._is(null)) - throw H.wrapException(new P.ArgumentError(false, null, "futureValue", "Must not be null")); + throw H.wrapException(P.ArgumentError$notNull("futureValue")); t1.resultValue = $E._as(futureValue); result = new P._Future($.Zone__current, $E._eval$1("_Future<0>")); this.set$_onDone(new P._BufferingStreamSubscription_asFuture_closure(t1, result)); @@ -5798,7 +6035,7 @@ else t1._completeError$2(error, stackTrace); }, - $signature: 8 + $signature: 5 }; P._BufferingStreamSubscription_asFuture__closure.prototype = { call$0: function() { @@ -6078,7 +6315,7 @@ t1._contents = t2 + ": "; t1._contents += H.S(v); }, - $signature: 9 + $signature: 10 }; P.MapMixin.prototype = { forEach$1: function(_, action) { @@ -6103,6 +6340,98 @@ }, $isMap: 1 }; + P.ListQueue.prototype = { + get$iterator: function(_) { + var _this = this; + return new P._ListQueueIterator(_this, _this._tail, _this._modificationCount, _this._head, _this.$ti._eval$1("_ListQueueIterator<1>")); + }, + get$isEmpty: function(_) { + return this._head === this._tail; + }, + get$length: function(_) { + return (this._tail - this._head & this._table.length - 1) >>> 0; + }, + elementAt$1: function(_, index) { + var t1, t2, t3, _this = this, + $length = _this.get$length(_this); + if (0 > index || index >= $length) + H.throwExpression(P.IndexError$(index, _this, "index", null, $length)); + t1 = _this._table; + t2 = t1.length; + t3 = (_this._head + index & t2 - 1) >>> 0; + if (t3 < 0 || t3 >= t2) + return H.ioore(t1, t3); + return _this.$ti._precomputed1._as(t1[t3]); + }, + toString$0: function(_) { + return P.IterableBase_iterableToFullString(this, "{", "}"); + }, + removeFirst$0: function() { + var t2, result, _this = this, + t1 = _this._head; + if (t1 === _this._tail) + throw H.wrapException(H.IterableElementError_noElement()); + ++_this._modificationCount; + t2 = _this._table; + if (t1 >= t2.length) + return H.ioore(t2, t1); + result = _this.$ti._precomputed1._as(t2[t1]); + C.JSArray_methods.$indexSet(t2, t1, null); + _this._head = (_this._head + 1 & _this._table.length - 1) >>> 0; + return result; + }, + _add$1: function(element) { + var t2, t3, newTable, split, _this = this, + t1 = _this.$ti; + t1._precomputed1._as(element); + C.JSArray_methods.$indexSet(_this._table, _this._tail, element); + t2 = _this._tail; + t3 = _this._table.length; + t2 = (t2 + 1 & t3 - 1) >>> 0; + _this._tail = t2; + if (_this._head === t2) { + newTable = P.List_List$filled(t3 * 2, null, false, t1._eval$1("1?")); + t1 = _this._table; + t2 = _this._head; + split = t1.length - t2; + C.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); + C.JSArray_methods.setRange$4(newTable, split, split + _this._head, _this._table, 0); + _this._head = 0; + _this._tail = _this._table.length; + _this.set$_table(newTable); + } + ++_this._modificationCount; + }, + set$_table: function(_table) { + this._table = this.$ti._eval$1("List<1?>")._as(_table); + }, + $isQueue: 1 + }; + P._ListQueueIterator.prototype = { + get$current: function() { + return this.$ti._precomputed1._as(this._collection$_current); + }, + moveNext$0: function() { + var t2, t3, _this = this, + t1 = _this._queue; + if (_this._modificationCount !== t1._modificationCount) + H.throwExpression(P.ConcurrentModificationError$(t1)); + t2 = _this._position; + if (t2 === _this._end) { + _this.set$_collection$_current(null); + return false; + } + t3 = t1._table; + if (t2 >= t3.length) + return H.ioore(t3, t2); + _this.set$_collection$_current(t3[t2]); + _this._position = (_this._position + 1 & t1._table.length - 1) >>> 0; + return true; + }, + set$_collection$_current: function(_current) { + this._collection$_current = this.$ti._eval$1("1?")._as(_current); + } + }; P._JsonMap.prototype = { $index: function(_, key) { var result, @@ -6172,7 +6501,7 @@ t1 = t1.get$keys().elementAt$1(0, index); else { t1 = t1._computeKeys$0(); - if (index >= t1.length) + if (index < 0 || index >= t1.length) return H.ioore(t1, index); t1 = t1[index]; } @@ -6227,94 +6556,86 @@ P.JsonDecoder.prototype = {}; P._JsonStringifier.prototype = { writeStringContent$1: function(s) { - var t1, offset, i, charCode, t2, t3, + var offset, i, charCode, t1, t2, _this = this, $length = s.length; - for (t1 = this._sink, offset = 0, i = 0; i < $length; ++i) { + for (offset = 0, i = 0; i < $length; ++i) { charCode = C.JSString_methods._codeUnitAt$1(s, i); if (charCode > 92) { if (charCode >= 55296) { - t2 = charCode & 64512; - if (t2 === 55296) { - t3 = i + 1; - t3 = !(t3 < $length && (C.JSString_methods._codeUnitAt$1(s, t3) & 64512) === 56320); + t1 = charCode & 64512; + if (t1 === 55296) { + t2 = i + 1; + t2 = !(t2 < $length && (C.JSString_methods._codeUnitAt$1(s, t2) & 64512) === 56320); } else - t3 = false; - if (!t3) - if (t2 === 56320) { - t2 = i - 1; - t2 = !(t2 >= 0 && (C.JSString_methods.codeUnitAt$1(s, t2) & 64512) === 55296); + t2 = false; + if (!t2) + if (t1 === 56320) { + t1 = i - 1; + t1 = !(t1 >= 0 && (C.JSString_methods.codeUnitAt$1(s, t1) & 64512) === 55296); } else - t2 = false; + t1 = false; else - t2 = true; - if (t2) { + t1 = true; + if (t1) { if (i > offset) - t1._contents += C.JSString_methods.substring$2(s, offset, i); + _this.writeStringSlice$3(s, offset, i); offset = i + 1; - t2 = t1._contents += H.Primitives_stringFromCharCode(92); - t2 += H.Primitives_stringFromCharCode(117); - t1._contents = t2; - t2 += H.Primitives_stringFromCharCode(100); - t1._contents = t2; - t3 = charCode >>> 8 & 15; - t2 += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); - t1._contents = t2; - t3 = charCode >>> 4 & 15; - t2 += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); - t1._contents = t2; - t3 = charCode & 15; - t1._contents = t2 + H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + _this.writeCharCode$1(92); + _this.writeCharCode$1(117); + _this.writeCharCode$1(100); + t1 = charCode >>> 8 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); } } continue; } if (charCode < 32) { if (i > offset) - t1._contents += C.JSString_methods.substring$2(s, offset, i); + _this.writeStringSlice$3(s, offset, i); offset = i + 1; - t2 = t1._contents += H.Primitives_stringFromCharCode(92); + _this.writeCharCode$1(92); switch (charCode) { case 8: - t1._contents = t2 + H.Primitives_stringFromCharCode(98); + _this.writeCharCode$1(98); break; case 9: - t1._contents = t2 + H.Primitives_stringFromCharCode(116); + _this.writeCharCode$1(116); break; case 10: - t1._contents = t2 + H.Primitives_stringFromCharCode(110); + _this.writeCharCode$1(110); break; case 12: - t1._contents = t2 + H.Primitives_stringFromCharCode(102); + _this.writeCharCode$1(102); break; case 13: - t1._contents = t2 + H.Primitives_stringFromCharCode(114); + _this.writeCharCode$1(114); break; default: - t2 += H.Primitives_stringFromCharCode(117); - t1._contents = t2; - t2 += H.Primitives_stringFromCharCode(48); - t1._contents = t2; - t2 += H.Primitives_stringFromCharCode(48); - t1._contents = t2; - t3 = charCode >>> 4 & 15; - t2 += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); - t1._contents = t2; - t3 = charCode & 15; - t1._contents = t2 + H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3); + _this.writeCharCode$1(117); + _this.writeCharCode$1(48); + _this.writeCharCode$1(48); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); break; } } else if (charCode === 34 || charCode === 92) { if (i > offset) - t1._contents += C.JSString_methods.substring$2(s, offset, i); + _this.writeStringSlice$3(s, offset, i); offset = i + 1; - t2 = t1._contents += H.Primitives_stringFromCharCode(92); - t1._contents = t2 + H.Primitives_stringFromCharCode(charCode); + _this.writeCharCode$1(92); + _this.writeCharCode$1(charCode); } } if (offset === 0) - t1._contents += s; + _this.writeString$1(s); else if (offset < $length) - t1._contents += C.JSString_methods.substring$2(s, offset, $length); + _this.writeStringSlice$3(s, offset, $length); }, _checkCycle$1: function(object) { var t1, t2, i, t3; @@ -6351,22 +6672,21 @@ if (typeof object == "number") { if (!isFinite(object)) return false; - _this._sink._contents += C.JSNumber_methods.toString$0(object); + _this.writeNumber$1(object); return true; } else if (object === true) { - _this._sink._contents += "true"; + _this.writeString$1("true"); return true; } else if (object === false) { - _this._sink._contents += "false"; + _this.writeString$1("false"); return true; } else if (object == null) { - _this._sink._contents += "null"; + _this.writeString$1("null"); return true; } else if (typeof object == "string") { - t1 = _this._sink; - t1._contents += '"'; + _this.writeString$1('"'); _this.writeStringContent$1(object); - t1._contents += '"'; + _this.writeString$1('"'); return true; } else if (type$.List_dynamic._is(object)) { _this._checkCycle$1(object); @@ -6388,44 +6708,42 @@ return false; }, writeList$1: function(list) { - var t2, i, - t1 = this._sink; - t1._contents += "["; - t2 = J.getInterceptor$asx(list); - if (t2.get$isNotEmpty(list)) { - this.writeObject$1(t2.$index(list, 0)); - for (i = 1; i < t2.get$length(list); ++i) { - t1._contents += ","; - this.writeObject$1(t2.$index(list, i)); + var t1, i, _this = this; + _this.writeString$1("["); + t1 = J.getInterceptor$asx(list); + if (t1.get$isNotEmpty(list)) { + _this.writeObject$1(t1.$index(list, 0)); + for (i = 1; i < t1.get$length(list); ++i) { + _this.writeString$1(","); + _this.writeObject$1(t1.$index(list, i)); } } - t1._contents += "]"; + _this.writeString$1("]"); }, writeMap$1: function(map) { - var t1, keyValueList, i, t2, separator, t3, _this = this, _box_0 = {}; + var t1, keyValueList, i, separator, t2, _this = this, _box_0 = {}; if (map.get$isEmpty(map)) { - _this._sink._contents += "{}"; + _this.writeString$1("{}"); return true; } t1 = map.get$length(map) * 2; - keyValueList = P.List_List$filled(t1, null, type$.nullable_Object); + keyValueList = P.List_List$filled(t1, null, false, type$.nullable_Object); i = _box_0.i = 0; _box_0.allStringKeys = true; map.forEach$1(0, new P._JsonStringifier_writeMap_closure(_box_0, keyValueList)); if (!_box_0.allStringKeys) return false; - t2 = _this._sink; - t2._contents += "{"; + _this.writeString$1("{"); for (separator = '"'; i < t1; i += 2, separator = ',"') { - t2._contents += separator; + _this.writeString$1(separator); _this.writeStringContent$1(H._asString(keyValueList[i])); - t2._contents += '":'; - t3 = i + 1; - if (t3 >= t1) - return H.ioore(keyValueList, t3); - _this.writeObject$1(keyValueList[t3]); + _this.writeString$1('":'); + t2 = i + 1; + if (t2 >= t1) + return H.ioore(keyValueList, t2); + _this.writeObject$1(keyValueList[t2]); } - t2._contents += "}"; + _this.writeString$1("}"); return true; } }; @@ -6439,12 +6757,24 @@ C.JSArray_methods.$indexSet(t1, t2.i++, key); C.JSArray_methods.$indexSet(t1, t2.i++, value); }, - $signature: 9 + $signature: 10 }; P._JsonStringStringifier.prototype = { get$_partialResult: function() { var t1 = this._sink._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + writeNumber$1: function(number) { + this._sink._contents += C.JSNumber_methods.toString$0(number); + }, + writeString$1: function(string) { + this._sink._contents += string; + }, + writeStringSlice$3: function(string, start, end) { + this._sink._contents += C.JSString_methods.substring$2(string, start, end); + }, + writeCharCode$1: function(charCode) { + this._sink._contents += H.Primitives_stringFromCharCode(charCode); } }; P.DateTime.prototype = { @@ -6507,7 +6837,7 @@ return "0000" + n; return "00000" + n; }, - $signature: 10 + $signature: 11 }; P.Duration_toString_twoDigits.prototype = { call$1: function(n) { @@ -6515,7 +6845,7 @@ return "" + n; return "0" + n; }, - $signature: 10 + $signature: 11 }; P.Error.prototype = { get$stackTrace: function() { @@ -6548,7 +6878,7 @@ $name = _this.name, nameString = $name == null ? "" : " (" + $name + ")", message = _this.message, - messageString = message == null ? "" : ": " + message, + messageString = message == null ? "" : ": " + H.S(message), prefix = _this.get$_errorName() + nameString + messageString; if (!_this._hasValue) return prefix; @@ -6647,9 +6977,73 @@ }; P.FormatException.prototype = { toString$0: function(_) { - var message = this.message, - report = "" !== message ? "FormatException: " + message : "FormatException"; - return report; + var t1, lineNum, lineStart, previousCharWasCR, i, char, lineEnd, end, start, prefix, postfix, slice, + message = this.message, + report = "" !== message ? "FormatException: " + message : "FormatException", + offset = this.offset, + source = this.source; + if (typeof source == "string") { + if (offset != null) + t1 = offset < 0 || offset > source.length; + else + t1 = false; + if (t1) + offset = null; + if (offset == null) { + if (source.length > 78) + source = C.JSString_methods.substring$2(source, 0, 75) + "..."; + return report + "\n" + source; + } + for (lineNum = 1, lineStart = 0, previousCharWasCR = false, i = 0; i < offset; ++i) { + char = C.JSString_methods._codeUnitAt$1(source, i); + if (char === 10) { + if (lineStart !== i || !previousCharWasCR) + ++lineNum; + lineStart = i + 1; + previousCharWasCR = false; + } else if (char === 13) { + ++lineNum; + lineStart = i + 1; + previousCharWasCR = true; + } + } + report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " + (offset - lineStart + 1) + ")\n") : report + (" (at character " + (offset + 1) + ")\n"); + lineEnd = source.length; + for (i = offset; i < lineEnd; ++i) { + char = C.JSString_methods.codeUnitAt$1(source, i); + if (char === 10 || char === 13) { + lineEnd = i; + break; + } + } + if (lineEnd - lineStart > 78) + if (offset - lineStart < 75) { + end = lineStart + 75; + start = lineStart; + prefix = ""; + postfix = "..."; + } else { + if (lineEnd - offset < 75) { + start = lineEnd - 75; + end = lineEnd; + postfix = ""; + } else { + start = offset - 36; + end = offset + 36; + postfix = "..."; + } + prefix = "..."; + } + else { + end = lineEnd; + start = lineStart; + prefix = ""; + postfix = ""; + } + slice = C.JSString_methods.substring$2(source, start, end); + return report + prefix + slice + postfix + "\n" + C.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; + } else + return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report; } }; P.Iterable.prototype = { @@ -6662,6 +7056,7 @@ }, elementAt$1: function(_, index) { var t1, elementIndex, element; + P.RangeError_checkNotNegative(index, "index"); for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { element = t1.get$current(); if (index === elementIndex) @@ -6676,7 +7071,7 @@ }; P.Null.prototype = { get$hashCode: function(_) { - return P.Object.prototype.get$hashCode.call(this, this); + return P.Object.prototype.get$hashCode.call(C.JSNull_methods, this); }, toString$0: function(_) { return "null"; @@ -6698,7 +7093,7 @@ }; P._StringStackTrace.prototype = { toString$0: function(_) { - return ""; + return this._stackTrace; }, $isStackTrace: 1 }; @@ -7007,6 +7402,7 @@ return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); } }; + S.AsyncMemoizer.prototype = {}; Y.Level.prototype = { $eq: function(_, other) { if (other == null) @@ -7090,6 +7486,146 @@ }, $signature: 23 }; + O.Pool.prototype = { + request$0: function(_) { + var t1, t2, _this = this; + if (_this._closeMemo._completer.future._state !== 0) + throw H.wrapException(P.StateError$("request() may not be called on a closed Pool.")); + t1 = _this._allocatedResources; + if (t1 < _this._maxAllocatedResources) { + _this._allocatedResources = t1 + 1; + return P.Future_Future$value(new O.PoolResource(_this), type$.PoolResource); + } else { + t1 = _this._onReleaseCallbacks; + if (!t1.get$isEmpty(t1)) + return _this._runOnRelease$1(t1.removeFirst$0()); + else { + t1 = new P._Future($.Zone__current, type$._Future_PoolResource); + t2 = _this._requestedResources; + t2._add$1(t2.$ti._precomputed1._as(new P._AsyncCompleter(t1, type$._AsyncCompleter_PoolResource))); + _this._resetTimer$0(); + return t1; + } + } + }, + withResource$1$1: function(callback, $T) { + return this.withResource$body$Pool($T._eval$1("0/()")._as(callback), $T, $T); + }, + withResource$body$Pool: function(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = P._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, resource, t1, t2; + var $async$withResource$1$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._closeMemo._completer.future._state !== 0) + throw H.wrapException(P.StateError$("withResource() may not be called on a closed Pool.")); + $async$goto = 3; + return P._asyncAwait($async$self.request$0(0), $async$withResource$1$1); + case 3: + // returning from await. + resource = $async$result; + $async$handler = 4; + $async$goto = 7; + return P._asyncAwait(callback.call$0(), $async$withResource$1$1); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 4: + // uncaught + $async$next = [2]; + case 5: + // finally + $async$handler = 2; + t1 = resource; + if (t1._released) + H.throwExpression(P.StateError$("A PoolResource may only be released once.")); + t1._released = true; + t1 = t1._pool; + t1._resetTimer$0(); + t2 = t1._requestedResources; + if (!t2.get$isEmpty(t2)) + t2.removeFirst$0().complete$1(0, new O.PoolResource(t1)); + else { + t2 = --t1._allocatedResources; + if (t1._closeMemo._completer.future._state !== 0 && t2 === 0) + null.close$0(0); + } + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 6: + // after finally + case 1: + // return + return P._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return P._asyncRethrow($async$currentError, $async$completer); + } + }); + return P._asyncStartSync($async$withResource$1$1, $async$completer); + }, + _runOnRelease$1: function(onRelease) { + var t2, t3, + t1 = P.Future_Future$sync(type$.dynamic_Function._as(onRelease), type$.dynamic).then$1$1(new O.Pool__runOnRelease_closure(this), type$.Null), + onError = new O.Pool__runOnRelease_closure0(this); + type$.nullable_bool_Function_Object._as(null); + t2 = t1.$ti; + t3 = $.Zone__current; + if (t3 !== C.C__RootZone) + onError = P._registerErrorHandler(onError, t3); + t1._addListener$1(new P._FutureListener(new P._Future(t3, t2), 2, null, onError, t2._eval$1("@<1>")._bind$1(t2._precomputed1)._eval$1("_FutureListener<1,2>"))); + t1 = new P._Future($.Zone__current, type$._Future_PoolResource); + t2 = this._onReleaseCompleters; + t2._add$1(t2.$ti._precomputed1._as(new P._SyncCompleter(t1, type$._SyncCompleter_PoolResource))); + return t1; + }, + _resetTimer$0: function() { + var t2, + t1 = this._timer; + if (t1 == null) + return; + t2 = this._requestedResources; + if (t2._head === t2._tail) + t1._restartable_timer$_timer.cancel$0(); + else { + t1._restartable_timer$_timer.cancel$0(); + t1._restartable_timer$_timer = P.Timer_Timer(t1._restartable_timer$_duration, t1._callback); + } + } + }; + O.Pool__runOnRelease_closure.prototype = { + call$1: function(value) { + var t1 = this.$this; + J.complete$1$z(t1._onReleaseCompleters.removeFirst$0(), new O.PoolResource(t1)); + }, + $signature: 4 + }; + O.Pool__runOnRelease_closure0.prototype = { + call$2: function(error, stackTrace) { + type$.Object._as(error); + type$.StackTrace._as(stackTrace); + this.$this._onReleaseCompleters.removeFirst$0().completeError$2(error, stackTrace); + }, + $signature: 5 + }; + O.PoolResource.prototype = {}; M.SseClient.prototype = { get$_eventSource: function() { var t1 = this.__SseClient__eventSource; @@ -7141,62 +7677,22 @@ _onOutgoingMessage$body$SseClient: function(message) { var $async$goto = 0, $async$completer = P._makeAsyncAwaitCompleter(type$.dynamic), - $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, e, e0, e1, exception, t1, encodedMessage, $async$exception; + $async$self = this, t1; var $async$_onOutgoingMessage$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } + if ($async$errorCode === 1) + return P._asyncRethrow($async$result, $async$completer); while (true) switch ($async$goto) { case 0: // Function start - encodedMessage = null; - try { - encodedMessage = C.C_JsonCodec.encode$2$toEncodable(message, null); - } catch (exception) { - t1 = H.unwrapException(exception); - if (t1 instanceof P.JsonUnsupportedObjectError) { - e = t1; - $async$self._logger.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null); - } else if (t1 instanceof P.ArgumentError) { - e0 = t1; - $async$self._logger.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null); - } else - throw exception; - } - $async$handler = 3; - t1 = $async$self.__SseClient__serverUrl; - $async$goto = 6; - return P._asyncAwait(W.HttpRequest_request((t1 == null ? H.throwExpression(H.LateError$fieldNI("_serverUrl")) : t1) + "&messageId=" + ++$async$self._lastMessageId, "POST", encodedMessage, true), $async$_onOutgoingMessage$1); - case 6: - // returning from await. - $async$handler = 1; - // goto after finally - $async$goto = 5; - break; - case 3: - // catch - $async$handler = 2; - $async$exception = $async$currentError; - e1 = H.unwrapException($async$exception); - $async$self._logger.log$4(C.Level_SEVERE_1000, "Failed to send " + H.S(message) + ":\n " + H.S(e1), null, null); - $async$self.close$0(0); - // goto after finally - $async$goto = 5; - break; + t1 = {}; + t1.encodedMessage = null; + $async$goto = 2; + return P._asyncAwait($.$get$_requestPool().withResource$1$1(new M.SseClient__onOutgoingMessage_closure(t1, $async$self, message), type$.Null), $async$_onOutgoingMessage$1); case 2: - // uncaught - // goto rethrow - $async$goto = 1; - break; - case 5: - // after finally + // returning from await. // implicit return return P._asyncReturn(null, $async$completer); - case 1: - // rethrow - return P._asyncRethrow($async$currentError, $async$completer); } }); return P._asyncStartSync($async$_onOutgoingMessage$1, $async$completer); @@ -7252,6 +7748,73 @@ }, $signature: 0 }; + M.SseClient__onOutgoingMessage_closure.prototype = { + call$0: function() { + var $async$goto = 0, + $async$completer = P._makeAsyncAwaitCompleter(type$.Null), + $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, e, e0, e1, exception, t1, t2, $async$exception; + var $async$call$0 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + try { + $async$self._box_0.encodedMessage = C.C_JsonCodec.encode$2$toEncodable($async$self.message, null); + } catch (exception) { + t1 = H.unwrapException(exception); + if (t1 instanceof P.JsonUnsupportedObjectError) { + e = t1; + $async$self.$this._logger.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null); + } else if (t1 instanceof P.ArgumentError) { + e0 = t1; + $async$self.$this._logger.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null); + } else + throw exception; + } + $async$handler = 3; + t1 = $async$self.$this; + t2 = t1.__SseClient__serverUrl; + $async$goto = 6; + return P._asyncAwait(W.HttpRequest_request((t2 == null ? H.throwExpression(H.LateError$fieldNI("_serverUrl")) : t2) + "&messageId=" + ++t1._lastMessageId, "POST", $async$self._box_0.encodedMessage, true), $async$call$0); + case 6: + // returning from await. + $async$handler = 1; + // goto after finally + $async$goto = 5; + break; + case 3: + // catch + $async$handler = 2; + $async$exception = $async$currentError; + e1 = H.unwrapException($async$exception); + t1 = $async$self.$this; + t1._logger.log$4(C.Level_SEVERE_1000, "Failed to send " + H.S($async$self.message) + ":\n " + H.S(e1), null, null); + t1.close$0(0); + // goto after finally + $async$goto = 5; + break; + case 2: + // uncaught + // goto rethrow + $async$goto = 1; + break; + case 5: + // after finally + // implicit return + return P._asyncReturn(null, $async$completer); + case 1: + // rethrow + return P._asyncRethrow($async$currentError, $async$completer); + } + }); + return P._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 7 + }; T.generateUuidV4__generateBits.prototype = { call$1: function(bitCount) { return this.random.nextInt$1(C.JSInt_methods._shlPositive$1(1, bitCount)); @@ -7262,13 +7825,13 @@ call$2: function(value, count) { return C.JSString_methods.padLeft$2(C.JSInt_methods.toRadixString$1(value, 16), count, "0"); }, - $signature: 11 + $signature: 12 }; T.generateUuidV4__bitsDigits.prototype = { call$2: function(bitCount, digitCount) { return this._printDigits.call$2(this._generateBits.call$1(bitCount), digitCount); }, - $signature: 11 + $signature: 12 }; R.StreamChannelMixin.prototype = {}; E.main_closure.prototype = { @@ -7283,7 +7846,7 @@ var count, t1, t2, t3, i, t4, t5, lastEvent; H._asString(s); if (C.JSString_methods.startsWith$1(s, "send ")) { - count = P.int_parse(C.JSArray_methods.get$last(s.split(" "))); + count = P.int_parse(C.JSArray_methods.get$last(s.split(" ")), null); for (t1 = this.channel._outgoingController, t2 = H._instanceType(t1), t3 = t2._precomputed1, t2 = t2._eval$1("_DelayedData<1>"), i = 0; i < count; ++i) { t4 = t3._as("" + i); t5 = t1._state; @@ -7324,16 +7887,16 @@ _instance_2_u = hunkHelpers._instance_2u, _instance_1_u = hunkHelpers._instance_1u, _instance_0_u = hunkHelpers._instance_0u; - _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 4); - _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 4); - _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 4); + _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 6); + _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6); + _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6); _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); _static_1(P, "async___nullDataHandler$closure", "_nullDataHandler", 2); - _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 7); + _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 9); _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 18, 0); - _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 7); - _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 5); + _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 9); + _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 8); var _; _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 1); _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 1); @@ -7345,13 +7908,13 @@ _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(P.Object, null); - _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, H.Closure, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, P._TimerImpl, P._AsyncAwaitCompleter, P.AsyncError, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P._Zone, P.ListMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P.NullRejectionException, P._JSRandom, Y.Level, L.LogRecord, F.Logger, R.StreamChannelMixin]); + _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, H.Closure, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.StringMatch, H.Rti, H._FunctionParameters, P._TimerImpl, P._AsyncAwaitCompleter, P.AsyncError, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P._Zone, P.ListMixin, P._ListQueueIterator, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P.NullRejectionException, P._JSRandom, S.AsyncMemoizer, Y.Level, L.LogRecord, F.Logger, O.Pool, O.PoolResource, R.StreamChannelMixin]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]); _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); _inherit(J.JSUnmodifiableArray, J.JSArray); _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); _inheritMany(P.Error, [H.LateError, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); - _inheritMany(H.Closure, [H.nullFuture_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); + _inheritMany(H.Closure, [H.nullFuture_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, O.Pool__runOnRelease_closure, O.Pool__runOnRelease_closure0, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, M.SseClient__onOutgoingMessage_closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); _inherit(H.EfficientLengthIterable, P.Iterable); _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]); _inherit(H.NullError, P.TypeError); @@ -7367,7 +7930,7 @@ _inherit(H.NativeTypedArrayOfInt, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); _inheritMany(H.NativeTypedArrayOfInt, [H.NativeInt16List, H.NativeInt32List, H.NativeInt8List, H.NativeUint16List, H.NativeUint32List, H.NativeUint8ClampedList, H.NativeUint8List]); _inherit(H._TypeError, H._Error); - _inherit(P._AsyncCompleter, P._Completer); + _inheritMany(P._Completer, [P._AsyncCompleter, P._SyncCompleter]); _inherit(P._AsyncStreamController, P._StreamController); _inheritMany(P.Stream, [P._StreamImpl, W._EventStream]); _inherit(P._ControllerStream, P._StreamImpl); @@ -7375,7 +7938,7 @@ _inheritMany(P._DelayedEvent, [P._DelayedData, P._DelayedError]); _inherit(P._StreamImplEvents, P._PendingEvents); _inherit(P._RootZone, P._Zone); - _inherit(P._JsonMapKeyIterable, H.ListIterable); + _inheritMany(H.ListIterable, [P.ListQueue, P._JsonMapKeyIterable]); _inherit(P.Converter, P.StreamTransformerBase); _inherit(P.JsonCyclicError, P.JsonUnsupportedObjectError); _inherit(P.JsonCodec, P.Codec); @@ -7405,13 +7968,13 @@ mangledNames: {}, getTypeFromName: getGlobalFromName, metadata: [], - types: ["~()", "~(Event)", "~(@)", "Null()", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "Null(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "String(int,int)", "Future()", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "_Future<@>(@)", "~(ProgressEvent)", "@(@,@)", "~(@,@)", "Logger()", "~(String?)", "int(int)", "~(MouseEvent)", "~(String)"], + types: ["~()", "~(Event)", "~(@)", "Null()", "Null(@)", "Null(Object,StackTrace)", "~(~())", "Future()", "@(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "String(int,int)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "_Future<@>(@)", "~(ProgressEvent)", "@(@,@)", "~(@,@)", "Logger()", "~(String?)", "int(int)", "~(MouseEvent)", "~(String)"], interceptorsByTag: null, leafTags: null, arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti" }; - H._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","JavaScriptFunction":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSNumNotInt":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MouseEvent":{"Event":[]},"ProgressEvent":{"Event":[]},"UIEvent":{"Event":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"MessageEvent":{"Event":[]},"Node":{"EventTarget":[]},"SelectElement":{"Element":[],"EventTarget":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}')); - H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"Codec":2,"StreamChannelMixin":1}')); + H._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","JavaScriptFunction":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSNumNotInt":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"ListQueue":{"ListIterable":["1"],"Queue":["1"],"Iterable":["1"],"ListIterable.E":"1"},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MouseEvent":{"Event":[]},"ProgressEvent":{"Event":[]},"UIEvent":{"Event":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"MessageEvent":{"Event":[]},"Node":{"EventTarget":[]},"SelectElement":{"Element":[],"EventTarget":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}')); + H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"StreamChannelMixin":1}')); 0; var type$ = (function rtii() { var findType = H.findType; @@ -7436,20 +7999,24 @@ MouseEvent: findType("MouseEvent"), Null: findType("Null"), Object: findType("Object"), + Pattern: findType("Pattern"), + PoolResource: findType("PoolResource"), ProgressEvent: findType("ProgressEvent"), StackTrace: findType("StackTrace"), String: findType("String"), UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), _AsyncCompleter_HttpRequest: findType("_AsyncCompleter"), + _AsyncCompleter_PoolResource: findType("_AsyncCompleter"), _AsyncCompleter_dynamic: findType("_AsyncCompleter<@>"), _ElementEventStreamImpl_MouseEvent: findType("_ElementEventStreamImpl"), _EventStream_Event: findType("_EventStream"), _Future_HttpRequest: findType("_Future"), - _Future_Null: findType("_Future"), + _Future_PoolResource: findType("_Future"), _Future_dynamic: findType("_Future<@>"), _Future_int: findType("_Future"), _Future_void: findType("_Future<~>"), _StreamControllerAddStreamState_nullable_Object: findType("_StreamControllerAddStreamState"), + _SyncCompleter_PoolResource: findType("_SyncCompleter"), bool: findType("bool"), bool_Function_Object: findType("bool(Object)"), double: findType("double"), @@ -7464,8 +8031,10 @@ nullable_Future_Null: findType("Future?"), nullable_List_dynamic: findType("List<@>?"), nullable_Object: findType("Object?"), + nullable_StackTrace: findType("StackTrace?"), nullable__DelayedEvent_dynamic: findType("_DelayedEvent<@>?"), nullable__FutureListener_dynamic_dynamic: findType("_FutureListener<@,@>?"), + nullable_bool_Function_Object: findType("bool(Object)?"), nullable_dynamic_Function_Event: findType("@(Event)?"), nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object: findType("Object?(Object?,Object?)?"), nullable_nullable_Object_Function_dynamic: findType("Object?(@)?"), @@ -7486,6 +8055,7 @@ C.Interceptor_methods = J.Interceptor.prototype; C.JSArray_methods = J.JSArray.prototype; C.JSInt_methods = J.JSInt.prototype; + C.JSNull_methods = J.JSNull.prototype; C.JSNumber_methods = J.JSNumber.prototype; C.JSString_methods = J.JSString.prototype; C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; @@ -7616,7 +8186,6 @@ C.C__DelayedDone = new P._DelayedDone(); C.C__JSRandom = new P._JSRandom(); C.C__RootZone = new P._RootZone(); - C.C__StringStackTrace = new P._StringStackTrace(); C.Duration_0 = new P.Duration(0); C.Duration_5000000 = new P.Duration(5000000); C.JsonDecoder_null = new P.JsonDecoder(null); @@ -7624,6 +8193,7 @@ C.Level_INFO_800 = new Y.Level("INFO", 800); C.Level_SEVERE_1000 = new Y.Level("SEVERE", 1000); C.Level_WARNING_900 = new Y.Level("WARNING", 900); + C._StringStackTrace_3uE = new P._StringStackTrace(""); })(); (function staticFields() { $._JS_INTEROP_INTERCEPTOR_TAG = null; @@ -7722,7 +8292,7 @@ return P._AsyncRun__initializeScheduleImmediate(); }); _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", function() { - return type$._Future_Null._as($.$get$nullFuture()); + return H.findType("_Future")._as($.$get$nullFuture()); }); _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() { return new Error().stack != void 0; @@ -7730,6 +8300,15 @@ _lazyFinal($, "Logger_root", "$get$Logger_root", function() { return F.Logger_Logger(""); }); + _lazyFinal($, "_requestPool", "$get$_requestPool", function() { + var t4, + t1 = H.findType("Completer"), + t2 = P.ListQueue$(t1), + t3 = P.ListQueue$(type$.void_Function); + t1 = P.ListQueue$(t1); + t4 = P.Completer_Completer(type$.dynamic); + return new O.Pool(t2, t3, t1, 1000, new S.AsyncMemoizer(t4, H.findType("AsyncMemoizer<@>"))); + }); })(); (function nativeSupport() { !function() { From cce1b4934cc2faecb900be11486b484c49f64ac8 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 7 Jun 2021 10:58:02 -0700 Subject: [PATCH 056/115] Use drain over toList when values are ignored (dart-lang/sse#52) --- pkgs/sse/test/sse_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 5fc898cb8..578b0b75e 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -74,7 +74,7 @@ void main() { for (var i = 0; i < limit; i++) { connection.sink.add('$i'); } - await connection.stream.take(limit).toList(); + await connection.stream.take(limit).drain(); }); test('messages arrive in-order', () async { @@ -147,7 +147,7 @@ void main() { await closeButton.click(); // Should complete since the connection is closed. - await connection.stream.toList(); + await connection.stream.drain(); expect(handler.numberOfClients, 0); }); From becabeb75582e6f0d9c9bab67cb1e51d7c1bb433 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 31 Aug 2021 15:38:37 -0700 Subject: [PATCH 057/115] Move from travis to github actions (dart-lang/sse#55) Closes dart-lang/sse#54 Fix formatting in one file. Remove test expectations around keep alive periods. Testing communication through the same connection that had been closed is sufficient for the intent of the test. --- pkgs/sse/.github/workflows/test-package.yml | 62 +++++++++++++++++++++ pkgs/sse/.travis.yml | 32 ----------- pkgs/sse/CHANGELOG.md | 2 + pkgs/sse/lib/src/server/sse_handler.dart | 4 +- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/sse_test.dart | 22 +------- pkgs/sse/tool/travis-setup.sh | 20 ------- pkgs/sse/tool/travis.sh | 36 ------------ 8 files changed, 68 insertions(+), 112 deletions(-) create mode 100644 pkgs/sse/.github/workflows/test-package.yml delete mode 100644 pkgs/sse/.travis.yml delete mode 100755 pkgs/sse/tool/travis-setup.sh delete mode 100755 pkgs/sse/tool/travis.sh diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml new file mode 100644 index 000000000..fe6c6c16b --- /dev/null +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -0,0 +1,62 @@ +name: Dart CI + +on: + # Run on PRs and pushes to the default branch. + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + # Check code formatting and static analysis on a single OS (linux) + # against Dart dev. + analyze: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v1 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: dart pub get + - name: Check formatting + run: dart format --output=none --set-exit-if-changed . + if: always() && steps.install.outcome == 'success' + - name: Analyze code + run: dart analyze --fatal-infos + if: always() && steps.install.outcome == 'success' + + # Run tests on a matrix consisting of two dimensions: + # 1. OS: ubuntu-latest, (macos-latest, windows-latest) + # 2. release channel: dev + test: + needs: analyze + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # Add macos-latest and/or windows-latest if relevant for this package. + os: [ubuntu-latest] + sdk: [2.12.0, dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v1 + with: + sdk: ${{ matrix.sdk }} + - uses: nanasess/setup-chromedriver@3d375deb1534f1c32b9f1a9e463bb6cd30a40593 + - id: install + name: Install dependencies + run: dart pub get + - name: Run VM tests + run: dart test --platform vm --test-randomize-ordering-seed=random -j 1 + if: always() && steps.install.outcome == 'success' diff --git a/pkgs/sse/.travis.yml b/pkgs/sse/.travis.yml deleted file mode 100644 index 8a0591514..000000000 --- a/pkgs/sse/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: dart -sudo: required -addons: - chrome: stable - -dart: - - dev - -with_content_shell: false - -before_install: - - "export CHROMEDRIVER_BINARY=/usr/bin/google-chrome" - - "export CHROMEDRIVER_ARGS=--no-sandbox" - - "/usr/bin/google-chrome --version" - - "export CHROME_LATEST_VERSION=$(/usr/bin/google-chrome --version | cut -d' ' -f3 | cut -d'.' -f1)" - - "export CHROME_DRIVER_VERSION=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_LATEST_VERSION)" - - "wget https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip" - - unzip chromedriver_linux64.zip - - "export PATH=$PATH:$PWD" - - ./tool/travis-setup.sh - -script: - - ./tool/travis.sh - -cache: - directories: - - $HOME/.pub-cache - -# Only building master means that we don't run two builds for each pull request. -branches: - only: - - master diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index cd0dd524e..56bae6870 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,5 @@ +## 4.1.1-dev + ## 4.1.0 - Limit the number of concurrent requests to prevent Chrome from automatically diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index d8a867e7e..8a5db5c8c 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -17,8 +17,8 @@ String _sseHeaders(String? origin) => 'HTTP/1.1 200 OK\r\n' 'Content-Type: text/event-stream\r\n' 'Cache-Control: no-cache\r\n' 'Connection: keep-alive\r\n' - 'Access-Control-Allow-Credentials: true\r\n' - "${origin != null ? 'Access-Control-Allow-Origin: $origin\r\n' : ''}" + 'Access-Control-Allow-Credentials: true\r\n' + "${origin != null ? 'Access-Control-Allow-Origin: $origin\r\n' : ''}" '\r\n\r\n'; class _SseMessage { diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 1c2b35159..6f65957c9 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.0 +version: 4.1.1-dev homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 578b0b75e..8b4023c26 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -206,37 +206,17 @@ void main() { // Close the underlying connection. closeSink(connection); - - // The isInKeepAlivePeriod flag may only be set for a short period because - // the client may connect very quickly, so only pump until it changes. - var maxPumps = 100; - while (!connection.isInKeepAlivePeriod && maxPumps-- > 0) { - await pumpEventQueue(times: 1); - } - - // Ensure there's still a connection and it's marked as in the keep-alive - // state. - expect(connection.isInKeepAlivePeriod, isTrue); - expect(handler.numberOfClients, 1); - // Ensure we can still round-trip data on the original connection and that // the connection is no longer marked keep-alive once it's reconnected. connection.sink.add('bar'); var queue = StreamQueue(connection.stream); expect(await queue.next, 'bar'); - expect(connection.isInKeepAlivePeriod, isFalse); // Now check that we can reconnect multiple times. closeSink(connection); - maxPumps = 100; - while (!connection.isInKeepAlivePeriod && maxPumps-- > 0) { - await pumpEventQueue(times: 1); - } - expect(connection.isInKeepAlivePeriod, isTrue); - expect(handler.numberOfClients, 1); connection.sink.add('bar'); expect(await queue.next, 'bar'); - expect(connection.isInKeepAlivePeriod, isFalse); + expect(handler.numberOfClients, 1); }); test('messages sent during disconnect arrive in-order', () async { diff --git a/pkgs/sse/tool/travis-setup.sh b/pkgs/sse/tool/travis-setup.sh deleted file mode 100755 index 33c093d17..000000000 --- a/pkgs/sse/tool/travis-setup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# Copyright 2019 Google Inc. All Rights Reserved. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Fast fail the script on failures. -set -e - -pub get diff --git a/pkgs/sse/tool/travis.sh b/pkgs/sse/tool/travis.sh deleted file mode 100755 index 9ebd3d425..000000000 --- a/pkgs/sse/tool/travis.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Copyright 2019 Google Inc. All Rights Reserved. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -STATUS=0 - -# Analyze package. -dartanalyzer . -ANALYSIS_STATUS=$? -if [[ $ANALYSIS_STATUS -ne 0 ]]; then - STATUS=$ANALYSIS_STATUS -fi - -# Run tests. -pub run test -r expanded -p vm -j 1 -TEST_STATUS=$? -if [[ $TEST_STATUS -ne 0 ]]; then - STATUS=$TEST_STATUS -fi - -# Exit chromedriver and geckodriver. -kill $PIDC - -exit $STATUS From 15b1f52a00d83813fd6c637d01409babca564d20 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Wed, 1 Sep 2021 11:42:23 -0700 Subject: [PATCH 058/115] Clarify package intent (dart-lang/sse#57) * Clarify package intent * Update README.md Co-authored-by: Nate Bosch Co-authored-by: Nate Bosch --- pkgs/sse/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/sse/README.md b/pkgs/sse/README.md index 33ea08f69..44a14e33c 100644 --- a/pkgs/sse/README.md +++ b/pkgs/sse/README.md @@ -1,2 +1,10 @@ This package provides support for bi-directional communication through Server Sent Events and corresponding POST requests. + +This package is not intended to be a general purpose SSE package, but instead +is a bidirectional protocol for use when Websockets are unavailable. +That is, both the client and the server expose a `sink` and `stream` on which to send +and receive messages respectively. + +Both the server and client have implicit assumptions on each other and therefore a +client from this package must be paired with a server from this package. From 5b74b26cd6f01ca16ace1f887ea0877b6aebeb2b Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Thu, 16 Sep 2021 16:35:41 -0700 Subject: [PATCH 059/115] keepAlive for SocketExceptions (dart-lang/sse#58) --- pkgs/sse/CHANGELOG.md | 2 ++ pkgs/sse/lib/src/server/sse_handler.dart | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 56bae6870..379eaf699 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,5 +1,7 @@ ## 4.1.1-dev +- Apply `keepAlive` logic to `SocketException`s. + ## 4.1.0 - Limit the number of concurrent requests to prevent Chrome from automatically diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 8a5db5c8c..72cc91900 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -4,6 +4,7 @@ import 'dart:async'; import 'dart:convert'; +import 'dart:io'; import 'package:async/async.dart'; import 'package:collection/collection.dart'; @@ -97,14 +98,16 @@ class SseConnection extends StreamChannelMixin { _sink.add('data: ${json.encode(data)}\n'); _sink.add('\n'); await _outgoingStreamQueue.next; // Consume from stream if no errors. - } on StateError catch (_) { - if (_keepAlive == null || _closedCompleter.isCompleted) { + } catch (e) { + if ((e is StateError || e is SocketException) && + (_keepAlive != null && !_closedCompleter.isCompleted)) { + // If we got here then the sink may have closed but the stream.onDone + // hasn't fired yet, so pause the subscription and skip calling + // `next` so the message remains in the queue to try again. + _handleDisconnect(); + } else { rethrow; } - // If we got here then the sink may have closed but the stream.onDone - // hasn't fired yet, so pause the subscription and skip calling - // `next` so the message remains in the queue to try again. - _handleDisconnect(); } } } From d15226e53ba2061c0f002d982996d124ed955a03 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 20 Apr 2022 14:53:45 -0700 Subject: [PATCH 060/115] Switch to using package:lints (dart-lang/sse#59) Update the min SDK to 2.15.0 for `unawaited`. --- pkgs/sse/.github/workflows/test-package.yml | 2 +- pkgs/sse/CHANGELOG.md | 2 ++ pkgs/sse/analysis_options.yaml | 4 +++- pkgs/sse/lib/src/server/sse_handler.dart | 1 - pkgs/sse/pubspec.yaml | 6 +++--- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index fe6c6c16b..ac76c8c46 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.12.0, dev] + sdk: [2.15.0, dev] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v1 diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 379eaf699..de9226efa 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,6 +1,8 @@ ## 4.1.1-dev - Apply `keepAlive` logic to `SocketException`s. +- Switch from using `package:pedantic` to `package:lints` +- Rev the minimum required SDK to 2.15. ## 4.1.0 diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index 2a0ddfa5f..f7675061d 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -1,4 +1,5 @@ -include: package:pedantic/analysis_options.yaml +include: package:lints/recommended.yaml + analyzer: strong-mode: implicit-casts: false @@ -7,6 +8,7 @@ analyzer: unused_element: error unused_import: error unused_local_variable: error + linter: rules: - always_declare_return_types diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 72cc91900..13ce67079 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -9,7 +9,6 @@ import 'dart:io'; import 'package:async/async.dart'; import 'package:collection/collection.dart'; import 'package:logging/logging.dart'; -import 'package:pedantic/pedantic.dart'; import 'package:shelf/shelf.dart' as shelf; import 'package:stream_channel/stream_channel.dart'; diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 6f65957c9..4beae605e 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -7,18 +7,18 @@ description: >- requests. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.15.0 <3.0.0' dependencies: async: ^2.0.8 collection: ^1.0.0 logging: '>=0.11.3+2 <2.0.0' pool: ^1.5.0 - pedantic: ^1.4.0 - stream_channel: '>=1.6.8 <3.0.0' shelf: ^1.1.0 + stream_channel: '>=1.6.8 <3.0.0' dev_dependencies: + lints: ^1.0.0 shelf_static: '>=0.2.8 <2.0.0' test: ^1.5.3 webdriver: ^3.0.0 From 6afa1393fe2b26539f20dc4586b33ec1527b03cb Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Tue, 3 May 2022 15:16:24 -0700 Subject: [PATCH 061/115] populate the pubspec repository field (dart-lang/sse#60) --- pkgs/sse/CHANGELOG.md | 1 + pkgs/sse/README.md | 4 ++++ pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index de9226efa..c1fd1a233 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -3,6 +3,7 @@ - Apply `keepAlive` logic to `SocketException`s. - Switch from using `package:pedantic` to `package:lints` - Rev the minimum required SDK to 2.15. +- Populate the pubspec `repository` field. ## 4.1.0 diff --git a/pkgs/sse/README.md b/pkgs/sse/README.md index 44a14e33c..f5c1f8013 100644 --- a/pkgs/sse/README.md +++ b/pkgs/sse/README.md @@ -1,3 +1,7 @@ +[![Dart CI](https://github.com/dart-lang/sse/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/sse/actions/workflows/test-package.yml) +[![pub package](https://img.shields.io/pub/v/sse.svg)](https://pub.dev/packages/sse) +[![package publisher](https://img.shields.io/pub/publisher/sse.svg)](https://pub.dev/packages/sse/publisher) + This package provides support for bi-directional communication through Server Sent Events and corresponding POST requests. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 4beae605e..2bd724b5e 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,10 +1,10 @@ name: sse version: 4.1.1-dev -homepage: https://github.com/dart-lang/sse description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST requests. +repository: https://github.com/dart-lang/sse environment: sdk: '>=2.15.0 <3.0.0' From 316b55d46fc71f22269f50342417e0543457dd52 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 25 Jul 2022 13:27:58 -0700 Subject: [PATCH 062/115] Remove deprecated experimental invariant_booleans lint rule (dart-lang/sse#61) --- pkgs/sse/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index f7675061d..1f65ccfa3 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -36,7 +36,6 @@ linter: - empty_statements - hash_and_equals - implementation_imports - - invariant_booleans - iterable_contains_unrelated_type - library_names - library_prefixes From b93f86e1e95b1ab43faace06622d9566d19601dc Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 14 Oct 2022 20:00:11 +0000 Subject: [PATCH 063/115] update ci; prep for publishing (dart-lang/sse#64) --- pkgs/sse/.github/dependabot.yaml | 8 ++++++++ pkgs/sse/.github/workflows/test-package.yml | 8 ++++---- pkgs/sse/CHANGELOG.md | 2 +- pkgs/sse/pubspec.yaml | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 pkgs/sse/.github/dependabot.yaml diff --git a/pkgs/sse/.github/dependabot.yaml b/pkgs/sse/.github/dependabot.yaml new file mode 100644 index 000000000..214481934 --- /dev/null +++ b/pkgs/sse/.github/dependabot.yaml @@ -0,0 +1,8 @@ +# Dependabot configuration file. +version: 2 + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index ac76c8c46..fbf4b6a20 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,8 +22,8 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - id: install @@ -49,8 +49,8 @@ jobs: os: [ubuntu-latest] sdk: [2.15.0, dev] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@3d375deb1534f1c32b9f1a9e463bb6cd30a40593 diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index c1fd1a233..763f390c6 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,4 +1,4 @@ -## 4.1.1-dev +## 4.1.1 - Apply `keepAlive` logic to `SocketException`s. - Switch from using `package:pedantic` to `package:lints` diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 2bd724b5e..263f33632 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.1-dev +version: 4.1.1 description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST From 1f13de4c44da8dc466e0f87697a5a332bf5fcd43 Mon Sep 17 00:00:00 2001 From: "Elliott Brooks (she/her)" <21270878+elliette@users.noreply.github.com> Date: Wed, 23 Nov 2022 13:19:45 -0800 Subject: [PATCH 064/115] Use Fetch API in SSE Client (dart-lang/sse#66) --- pkgs/sse/CHANGELOG.md | 4 ++ pkgs/sse/lib/client/sse_client.dart | 62 +++++++++++++++++++++++------ pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 55 insertions(+), 13 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 763f390c6..26bfc3351 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.1.2-dev + +- Send `fetch` requests instead of `XHR` requests. + ## 4.1.1 - Apply `keepAlive` logic to `SocketException`s. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 33353460a..15f85ede4 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -6,6 +6,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:html'; +import 'package:js/js.dart'; import 'package:logging/logging.dart'; import 'package:pool/pool.dart'; import 'package:stream_channel/stream_channel.dart'; @@ -64,13 +65,7 @@ class SseClient extends StreamChannelMixin { // By default the SSE client uses keep-alive. // Allow for a retry to connect before giving up. _errorTimer = Timer(const Duration(seconds: 5), () { - _incomingController.addError(error); - close(); - if (!_onConnected.isCompleted) { - // This call must happen after the call to close() which checks - // whether the completer was completed earlier. - _onConnected.completeError(error); - } + _closeWithError(error); }); } }); @@ -103,6 +98,16 @@ class SseClient extends StreamChannelMixin { _outgoingController.close(); } + void _closeWithError(Object error) { + _incomingController.addError(error); + close(); + if (!_onConnected.isCompleted) { + // This call must happen after the call to close() which checks + // whether the completer was completed earlier. + _onConnected.completeError(error); + } + } + void _onIncomingControlMessage(Event message) { var data = (message as MessageEvent).data; if (data == 'close') { @@ -133,12 +138,45 @@ class SseClient extends StreamChannelMixin { _logger.warning('Invalid argument: $e'); } try { - await HttpRequest.request('$_serverUrl&messageId=${++_lastMessageId}', - method: 'POST', sendData: encodedMessage, withCredentials: true); - } catch (e) { - _logger.severe('Failed to send $message:\n $e'); - close(); + final url = '$_serverUrl&messageId=${++_lastMessageId}'; + await _fetch( + url, + _FetchOptions( + method: 'POST', + body: encodedMessage, + credentialsOptions: + _CredentialsOptions(credentials: 'include'))); + } catch (error) { + final augmentedError = 'SSE client failed to send $message:\n $error'; + _logger.severe(augmentedError); + _closeWithError(augmentedError); } }); } } + +// Custom implementation of Fetch API until Dart supports GET vs. POST, +// credentials, etc. See https://github.com/dart-lang/http/issues/595. +@JS('fetch') +external Object _nativeJsFetch(String resourceUrl, _FetchOptions options); + +Future _fetch(String resourceUrl, _FetchOptions options) => + promiseToFuture(_nativeJsFetch(resourceUrl, options)); + +@JS() +@anonymous +class _FetchOptions { + external factory _FetchOptions({ + required String method, // e.g., 'GET', 'POST' + required _CredentialsOptions credentialsOptions, + required String? body, + }); +} + +@JS() +@anonymous +class _CredentialsOptions { + external factory _CredentialsOptions({ + required String credentials, // e.g., 'omit', 'same-origin', 'include' + }); +} diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 263f33632..3de73be9e 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.1 +version: 4.1.2-dev description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST From adc15179985e82bc6560c147b4844e301175609b Mon Sep 17 00:00:00 2001 From: "Elliott Brooks (she/her)" <21270878+elliette@users.noreply.github.com> Date: Wed, 23 Nov 2022 15:23:56 -0800 Subject: [PATCH 065/115] Add optional `debugKey` parameter to SSE client (dart-lang/sse#67) --- pkgs/sse/CHANGELOG.md | 1 + pkgs/sse/lib/client/sse_client.dart | 25 ++++++++++++++---------- pkgs/sse/lib/src/server/sse_handler.dart | 5 +++-- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 26bfc3351..9a961731e 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,6 +1,7 @@ ## 4.1.2-dev - Send `fetch` requests instead of `XHR` requests. +- Add an optional `debugKey` parameter to `SseClient` to include in logging. ## 4.1.1 diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 15f85ede4..abaea2e23 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -26,6 +26,8 @@ final _requestPool = Pool(1000); /// The client can send any JSON-encodable messages to the server by adding /// them to the [sink] and listen to messages from the server on the [stream]. class SseClient extends StreamChannelMixin { + final String _clientId; + final _incomingController = StreamController(); final _outgoingController = StreamController(); @@ -43,12 +45,14 @@ class SseClient extends StreamChannelMixin { Timer? _errorTimer; /// [serverUrl] is the URL under which the server is listening for - /// incoming bi-directional SSE connections. - SseClient(String serverUrl) { - var clientId = generateUuidV4(); - _eventSource = - EventSource('$serverUrl?sseClientId=$clientId', withCredentials: true); - _serverUrl = '$serverUrl?sseClientId=$clientId'; + /// incoming bi-directional SSE connections. [debugKey] is an optional key + /// that can be used to identify the SSE connection. + SseClient(String serverUrl, {String? debugKey}) + : _clientId = debugKey == null + ? generateUuidV4() + : '$debugKey-${generateUuidV4()}' { + _serverUrl = '$serverUrl?sseClientId=$_clientId'; + _eventSource = EventSource(_serverUrl, withCredentials: true); _eventSource.onOpen.first.whenComplete(() { _onConnected.complete(); _outgoingController.stream @@ -113,7 +117,7 @@ class SseClient extends StreamChannelMixin { if (data == 'close') { close(); } else { - throw UnsupportedError('Illegal Control Message "$data"'); + throw UnsupportedError('[$_clientId] Illegal Control Message "$data"'); } } @@ -133,9 +137,9 @@ class SseClient extends StreamChannelMixin { try { encodedMessage = jsonEncode(message); } on JsonUnsupportedObjectError catch (e) { - _logger.warning('Unable to encode outgoing message: $e'); + _logger.warning('[$_clientId] Unable to encode outgoing message: $e'); } on ArgumentError catch (e) { - _logger.warning('Invalid argument: $e'); + _logger.warning('[$_clientId] Invalid argument: $e'); } try { final url = '$_serverUrl&messageId=${++_lastMessageId}'; @@ -147,7 +151,8 @@ class SseClient extends StreamChannelMixin { credentialsOptions: _CredentialsOptions(credentials: 'include'))); } catch (error) { - final augmentedError = 'SSE client failed to send $message:\n $error'; + final augmentedError = + '[$_clientId] SSE client failed to send $message:\n $error'; _logger.severe(augmentedError); _closeWithError(augmentedError); } diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 13ce67079..88bb851be 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -264,14 +264,15 @@ class SseHandler { Future _handleIncomingMessage( shelf.Request req, String path) async { + String? clientId; try { - var clientId = req.url.queryParameters['sseClientId']; + clientId = req.url.queryParameters['sseClientId']; var messageId = int.parse(req.url.queryParameters['messageId'] ?? '0'); var message = await req.readAsString(); var jsonObject = json.decode(message) as String; _connections[clientId]?._addIncomingMessage(messageId, jsonObject); } catch (e, st) { - _logger.fine('Failed to handle incoming message. $e $st'); + _logger.fine('[$clientId] Failed to handle incoming message. $e $st'); } return shelf.Response.ok('', headers: { 'access-control-allow-credentials': 'true', From 4151abed01175f5e41e2bfc5732173a7152ddc0f Mon Sep 17 00:00:00 2001 From: "Elliott Brooks (she/her)" <21270878+elliette@users.noreply.github.com> Date: Wed, 23 Nov 2022 17:05:18 -0800 Subject: [PATCH 066/115] Format markdown files (dart-lang/sse#68) --- pkgs/sse/CHANGELOG.md | 42 +++++++++++++++++++--------------------- pkgs/sse/CONTRIBUTING.md | 12 +++++++++--- pkgs/sse/README.md | 16 +++++++-------- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 9a961731e..16378c571 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -30,8 +30,8 @@ ## 3.8.1 -- Fix an issue where closing the `SseConnection` stream would result in - an error. +- Fix an issue where closing the `SseConnection` stream would result in an + error. ## 3.8.0 @@ -41,8 +41,8 @@ ## 3.7.0 -- Deprecate the client's `onOpen` getter. Messages will now be buffered until - a connection is established. +- Deprecate the client's `onOpen` getter. Messages will now be buffered until a + connection is established. ## 3.6.1 @@ -53,15 +53,14 @@ - Improve performance by buffering out of order messages in the server instead of the client. -** Note ** This is not modelled as a breaking change as the server can handle -messages from older clients. However, clients should be using the latest server -if they require order guarantees. - +\*\* Note \*\* This is not modelled as a breaking change as the server can +handle messages from older clients. However, clients should be using the latest +server if they require order guarantees. ## 3.5.0 -- Add new `shutdown` methods on `SseHandler` and `SseConnection` to allow closing - connections immediately, ignoring any keep-alive periods. +- Add new `shutdown` methods on `SseHandler` and `SseConnection` to allow + closing connections immediately, ignoring any keep-alive periods. ## 3.4.0 @@ -70,14 +69,14 @@ if they require order guarantees. ## 3.3.0 -- Add an `onClose` event to the `SseConnection`. This allows consumers to - listen to this event in lue of `sseConnection.sink.done` as that is not - guaranteed to fire. +- Add an `onClose` event to the `SseConnection`. This allows consumers to listen + to this event in lue of `sseConnection.sink.done` as that is not guaranteed to + fire. ## 3.2.2 -- Fix an issue where `keepAlive` may cause state errors when attempting to - send messages on a closed stream. +- Fix an issue where `keepAlive` may cause state errors when attempting to send + messages on a closed stream. ## 3.2.1 @@ -99,21 +98,21 @@ if they require order guarantees. - Make `isInKeepAlive` on `SseConnection` private. **Note that this is a breaking change but in actuality no one should be - depending on this API.** +depending on this API.** ## 3.1.0 - Add optional `keepAlive` parameter to the `SseHandler`. If `keepAlive` is - supplied, the connection will remain active for this period after a - disconnect and can be reconnected transparently. If there is no reconnect - within that period, the connection will be closed normally. + supplied, the connection will remain active for this period after a disconnect + and can be reconnected transparently. If there is no reconnect within that + period, the connection will be closed normally. ## 3.0.0 - Add retry logic. -**Possible Breaking Change Error messages may now be delayed up to 5 seconds - in the client.** +**Possible Breaking Change Error messages may now be delayed up to 5 seconds in +the client.** ## 2.1.2 @@ -150,7 +149,6 @@ if they require order guarantees. - Internal cleanup. - ## 0.0.1 - Initial commit. diff --git a/pkgs/sse/CONTRIBUTING.md b/pkgs/sse/CONTRIBUTING.md index 6f5e0ea67..069477c9e 100644 --- a/pkgs/sse/CONTRIBUTING.md +++ b/pkgs/sse/CONTRIBUTING.md @@ -2,6 +2,7 @@ Want to contribute? Great! First, read this page (including the small print at the end). ### Before you contribute + Before we can use your code, you must sign the [Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) (CLA), which you can do online. The CLA is necessary mainly because you own the @@ -18,16 +19,21 @@ possibly guide you. Coordinating up front makes it much easier to avoid frustration later on. ### Code reviews + All submissions, including submissions by project members, require review. ### File headers + All files in the project must start with the following header. - // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file - // for details. All rights reserved. Use of this source code is governed by a - // BSD-style license that can be found in the LICENSE file. +``` +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +``` ### The small print + Contributions made by corporations are covered by a different agreement than the one above, the [Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/sse/README.md b/pkgs/sse/README.md index f5c1f8013..367219cbe 100644 --- a/pkgs/sse/README.md +++ b/pkgs/sse/README.md @@ -2,13 +2,13 @@ [![pub package](https://img.shields.io/pub/v/sse.svg)](https://pub.dev/packages/sse) [![package publisher](https://img.shields.io/pub/publisher/sse.svg)](https://pub.dev/packages/sse/publisher) -This package provides support for bi-directional communication through -Server Sent Events and corresponding POST requests. +This package provides support for bi-directional communication through Server +Sent Events and corresponding POST requests. -This package is not intended to be a general purpose SSE package, but instead -is a bidirectional protocol for use when Websockets are unavailable. -That is, both the client and the server expose a `sink` and `stream` on which to send -and receive messages respectively. +This package is not intended to be a general purpose SSE package, but instead is +a bidirectional protocol for use when Websockets are unavailable. That is, both +the client and the server expose a `sink` and `stream` on which to send and +receive messages respectively. -Both the server and client have implicit assumptions on each other and therefore a -client from this package must be paired with a server from this package. +Both the server and client have implicit assumptions on each other and therefore +a client from this package must be paired with a server from this package. From ce179a23327fef5dc3ed282ccd0b967280c82b2b Mon Sep 17 00:00:00 2001 From: "Elliott Brooks (she/her)" <21270878+elliette@users.noreply.github.com> Date: Tue, 29 Nov 2022 12:57:32 -0800 Subject: [PATCH 067/115] Fix Fetch credentials (dart-lang/sse#69) --- pkgs/sse/lib/client/sse_client.dart | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index abaea2e23..c6027b738 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -146,10 +146,7 @@ class SseClient extends StreamChannelMixin { await _fetch( url, _FetchOptions( - method: 'POST', - body: encodedMessage, - credentialsOptions: - _CredentialsOptions(credentials: 'include'))); + method: 'POST', body: encodedMessage, credentials: 'include')); } catch (error) { final augmentedError = '[$_clientId] SSE client failed to send $message:\n $error'; @@ -173,15 +170,7 @@ Future _fetch(String resourceUrl, _FetchOptions options) => class _FetchOptions { external factory _FetchOptions({ required String method, // e.g., 'GET', 'POST' - required _CredentialsOptions credentialsOptions, - required String? body, - }); -} - -@JS() -@anonymous -class _CredentialsOptions { - external factory _CredentialsOptions({ required String credentials, // e.g., 'omit', 'same-origin', 'include' + required String? body, }); } From 483988152dc9155edea42f63eeb2d58d484cf8dc Mon Sep 17 00:00:00 2001 From: "Elliott Brooks (she/her)" <21270878+elliette@users.noreply.github.com> Date: Tue, 13 Dec 2022 10:33:41 -0800 Subject: [PATCH 068/115] Update `package:sse` to `4.1.2`(dart-lang/sse#70) --- pkgs/sse/CHANGELOG.md | 2 +- pkgs/sse/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 16378c571..de98c8644 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,4 +1,4 @@ -## 4.1.2-dev +## 4.1.2 - Send `fetch` requests instead of `XHR` requests. - Add an optional `debugKey` parameter to `SseClient` to include in logging. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 3de73be9e..17955dec0 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.2-dev +version: 4.1.2 description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST From a0e1f38234d69ee7429e9a73c59a5423fb530ded Mon Sep 17 00:00:00 2001 From: "Elliott Brooks (she/her)" <21270878+elliette@users.noreply.github.com> Date: Wed, 14 Dec 2022 13:03:50 -0800 Subject: [PATCH 069/115] Add `package:js` to dependencies (dart-lang/sse#71) --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- pkgs/sse/CHANGELOG.md | 2 ++ pkgs/sse/pubspec.yaml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index fbf4b6a20..288eff2a6 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [dev] + sdk: [stable, dev] steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.15.0, dev] + sdk: [stable, dev] steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index de98c8644..55269a5ed 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -2,6 +2,8 @@ - Send `fetch` requests instead of `XHR` requests. - Add an optional `debugKey` parameter to `SseClient` to include in logging. +- Add a dependency on `package:js`. +- Update the minimum Dart SDK version to `2.16.0`. ## 4.1.1 diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 17955dec0..b11d77919 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -7,11 +7,12 @@ description: >- repository: https://github.com/dart-lang/sse environment: - sdk: '>=2.15.0 <3.0.0' + sdk: '>=2.16.0 <3.0.0' dependencies: async: ^2.0.8 collection: ^1.0.0 + js: ^0.6.4 logging: '>=0.11.3+2 <2.0.0' pool: ^1.5.0 shelf: ^1.1.0 From 8c8e7d39703b5393ec0db59b93832e4e6d78e142 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Dec 2022 12:13:46 -0800 Subject: [PATCH 070/115] Bump nanasess/setup-chromedriver from 1.0.5 to 1.1.0 (dart-lang/sse#65) Bumps [nanasess/setup-chromedriver](https://github.com/nanasess/setup-chromedriver) from 1.0.5 to 1.1.0. - [Release notes](https://github.com/nanasess/setup-chromedriver/releases) - [Commits](https://github.com/nanasess/setup-chromedriver/compare/3d375deb1534f1c32b9f1a9e463bb6cd30a40593...7cbd35794f8ab317f778c3172fb86c1e9b2853f7) --- updated-dependencies: - dependency-name: nanasess/setup-chromedriver dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 288eff2a6..978ab99eb 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -53,7 +53,7 @@ jobs: - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - - uses: nanasess/setup-chromedriver@3d375deb1534f1c32b9f1a9e463bb6cd30a40593 + - uses: nanasess/setup-chromedriver@7cbd35794f8ab317f778c3172fb86c1e9b2853f7 - id: install name: Install dependencies run: dart pub get From 82cc71d80b679b8c0e5017cfb3541b732cb05302 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 13:06:41 -0800 Subject: [PATCH 071/115] Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/sse#73) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8...755da8c3cf115ac066823e79a1e1788f8940201b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 978ab99eb..9222d218a 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [stable, dev] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [stable, dev] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From 2435e2ed4600d6db38f451dce6cd440524df7ffc Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 9 Jan 2023 19:24:17 -0800 Subject: [PATCH 072/115] Migrate from no-implicit-casts to strict-casts (dart-lang/sse#74) --- pkgs/sse/analysis_options.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index 1f65ccfa3..f370a9d5e 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -1,8 +1,8 @@ include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-casts: false + language: + strict-casts: true errors: dead_code: error unused_element: error From 3b38ba7c0b4bd7078c3a59b24a190193865b507e Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 25 Jan 2023 16:52:15 -0800 Subject: [PATCH 073/115] Fix deprecated import to webdriver library (dart-lang/sse#76) Bump pgk:lints, cleanup duplicative lints Bump min SDK CI: Only analyze on dev, test on oldest supported SDK --- pkgs/sse/.github/workflows/test-package.yml | 4 +- pkgs/sse/CHANGELOG.md | 4 ++ pkgs/sse/analysis_options.yaml | 58 +-------------------- pkgs/sse/lib/src/util/uuid.dart | 18 +++---- pkgs/sse/pubspec.yaml | 12 ++--- pkgs/sse/test/sse_test.dart | 2 +- 6 files changed, 23 insertions(+), 75 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 9222d218a..cca459b2b 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [stable, dev] + sdk: [dev] steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [stable, dev] + sdk: [2.18.0, dev] steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 55269a5ed..edd1b4379 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.1.3-dev + +- Update the minimum Dart SDK version to `2.18.0`. + ## 4.1.2 - Send `fetch` requests instead of `XHR` requests. diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index f370a9d5e..fdc06ad70 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -1,85 +1,29 @@ +# https://dart.dev/guides/language/analysis-options include: package:lints/recommended.yaml analyzer: language: strict-casts: true - errors: - dead_code: error - unused_element: error - unused_import: error - unused_local_variable: error linter: rules: - always_declare_return_types - - annotate_overrides - - avoid_empty_else - - avoid_function_literals_in_foreach_calls - - avoid_init_to_null - - avoid_null_checks_in_equality_operators - - avoid_relative_lib_imports - - avoid_renaming_method_parameters - - avoid_return_types_on_setters - avoid_returning_null - - avoid_types_as_parameter_names - avoid_unused_constructor_parameters - - await_only_futures - - camel_case_types - cancel_subscriptions - #- cascade_invocations - comment_references - - constant_identifier_names - - control_flow_in_finally - directives_ordering - - empty_catches - - empty_constructor_bodies - - empty_statements - - hash_and_equals - - implementation_imports - - iterable_contains_unrelated_type - - library_names - - library_prefixes - - list_remove_unrelated_type - literal_only_boolean_expressions - no_adjacent_strings_in_list - - no_duplicate_case_values - - non_constant_identifier_names - - null_closures - omit_local_variable_types - only_throw_errors - - overridden_fields - package_api_docs - - package_names - - package_prefixed_library_names - - prefer_adjacent_string_concatenation - - prefer_collection_literals - - prefer_conditional_assignment - prefer_const_constructors - - prefer_contains - - prefer_equal_for_default_values - - prefer_final_fields - #- prefer_final_locals - - prefer_generic_function_type_aliases - - prefer_initializing_formals - prefer_interpolation_to_compose_strings - - prefer_is_empty - - prefer_is_not_empty - prefer_single_quotes - - prefer_typing_uninitialized_variables - - recursive_getters - - slash_for_doc_comments - test_types_in_equals - throw_in_finally - - type_init_formals - unawaited_futures - - unnecessary_brace_in_string_interps - - unnecessary_const - - unnecessary_getters_setters - unnecessary_lambdas - - unnecessary_new - unnecessary_null_aware_assignments - unnecessary_statements - - unnecessary_this - - unrelated_type_equality_checks - - use_rethrow_when_possible - - valid_regexps diff --git a/pkgs/sse/lib/src/util/uuid.dart b/pkgs/sse/lib/src/util/uuid.dart index e33e7e8e2..a1aa39846 100644 --- a/pkgs/sse/lib/src/util/uuid.dart +++ b/pkgs/sse/lib/src/util/uuid.dart @@ -14,19 +14,19 @@ import 'dart:math' show Random; String generateUuidV4() { final random = Random(); - int _generateBits(int bitCount) => random.nextInt(1 << bitCount); + int generateBits(int bitCount) => random.nextInt(1 << bitCount); - String _printDigits(int value, int count) => + String printDigits(int value, int count) => value.toRadixString(16).padLeft(count, '0'); - String _bitsDigits(int bitCount, int digitCount) => - _printDigits(_generateBits(bitCount), digitCount); + String bitsDigits(int bitCount, int digitCount) => + printDigits(generateBits(bitCount), digitCount); // Generate xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx / 8-4-4-4-12. var special = 8 + random.nextInt(4); - return '${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}-' - '${_bitsDigits(16, 4)}-' - '4${_bitsDigits(12, 3)}-' - '${_printDigits(special, 1)}${_bitsDigits(12, 3)}-' - '${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}'; + return '${bitsDigits(16, 4)}${bitsDigits(16, 4)}-' + '${bitsDigits(16, 4)}-' + '4${bitsDigits(12, 3)}-' + '${printDigits(special, 1)}${bitsDigits(12, 3)}-' + '${bitsDigits(16, 4)}${bitsDigits(16, 4)}${bitsDigits(16, 4)}'; } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index b11d77919..cbb903c33 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.2 +version: 4.1.3-dev description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST @@ -7,19 +7,19 @@ description: >- repository: https://github.com/dart-lang/sse environment: - sdk: '>=2.16.0 <3.0.0' + sdk: '>=2.18.0 <3.0.0' dependencies: async: ^2.0.8 collection: ^1.0.0 js: ^0.6.4 - logging: '>=0.11.3+2 <2.0.0' + logging: ^1.0.0 pool: ^1.5.0 shelf: ^1.1.0 - stream_channel: '>=1.6.8 <3.0.0' + stream_channel: ^2.0.0 dev_dependencies: - lints: ^1.0.0 - shelf_static: '>=0.2.8 <2.0.0' + lints: ^2.0.0 + shelf_static: ^1.0.0 test: ^1.5.3 webdriver: ^3.0.0 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index 8b4023c26..c34c0b711 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -13,7 +13,7 @@ import 'package:shelf_static/shelf_static.dart'; import 'package:sse/server/sse_handler.dart'; import 'package:sse/src/server/sse_handler.dart' show closeSink; import 'package:test/test.dart'; -import 'package:webdriver/io.dart'; +import 'package:webdriver/async_io.dart'; void main() { late HttpServer server; From 1eff5dac640c6e6f276528af2a254c4dd664753a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 22:00:00 -0800 Subject: [PATCH 074/115] Bump dart-lang/setup-dart from 1.3 to 1.4 (dart-lang/sse#77) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.3 to 1.4. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/6a218f2413a3e78e9087f638a238f6b40893203d...a57a6c04cf7d4840e88432aad6281d1e125f0d46) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index cca459b2b..9b234bbf1 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.18.0, dev] steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@7cbd35794f8ab317f778c3172fb86c1e9b2853f7 From 2fa909479002361978c5876457bc63a9dd055770 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 22:55:25 -0800 Subject: [PATCH 075/115] Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/sse#78) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/755da8c3cf115ac066823e79a1e1788f8940201b...ac593985615ec2ede58e132d2e21d2b1cbd6127c) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 9b234bbf1..bf913afe7 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.18.0, dev] steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From ec3ad5c7c5f47d84324fb9b996e978ea49a7f851 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Apr 2023 19:53:12 -0700 Subject: [PATCH 076/115] Bump nanasess/setup-chromedriver from 1.1.0 to 2.0.0 (dart-lang/sse#81) Bumps [nanasess/setup-chromedriver](https://github.com/nanasess/setup-chromedriver) from 1.1.0 to 2.0.0. - [Release notes](https://github.com/nanasess/setup-chromedriver/releases) - [Commits](https://github.com/nanasess/setup-chromedriver/compare/7cbd35794f8ab317f778c3172fb86c1e9b2853f7...95301782a076fbe8c9ecf54395a4689f7b195285) --- updated-dependencies: - dependency-name: nanasess/setup-chromedriver dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index bf913afe7..cd34784b1 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -53,7 +53,7 @@ jobs: - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} - - uses: nanasess/setup-chromedriver@7cbd35794f8ab317f778c3172fb86c1e9b2853f7 + - uses: nanasess/setup-chromedriver@95301782a076fbe8c9ecf54395a4689f7b195285 - id: install name: Install dependencies run: dart pub get From 2716ae2f214cc0861dd295557dc9035a08bd9a7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Apr 2023 21:54:03 -0700 Subject: [PATCH 077/115] Bump actions/checkout from 3.3.0 to 3.5.0 (dart-lang/sse#80) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/ac593985615ec2ede58e132d2e21d2b1cbd6127c...8f4b7f84864484a7bf31766abe9204da3cbe65b3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index cd34784b1..946491c75 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.18.0, dev] steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From 593f686053ff4717bd54b6b8fd8960d2bb43e5c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:35:19 -0700 Subject: [PATCH 078/115] Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (dart-lang/sse#79) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/a57a6c04cf7d4840e88432aad6281d1e125f0d46...d6a63dab3335f427404425de0fbfed4686d93c4f) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 946491c75..89a15866d 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.18.0, dev] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@95301782a076fbe8c9ecf54395a4689f7b195285 From 79e6d93489492d103f06223207ceec77a16198eb Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 10 Apr 2023 14:51:29 -0700 Subject: [PATCH 079/115] Require Dart 2.19, bump lints (dart-lang/sse#82) --- pkgs/sse/.github/workflows/test-package.yml | 2 +- pkgs/sse/CHANGELOG.md | 2 +- pkgs/sse/analysis_options.yaml | 13 +------------ pkgs/sse/lib/client/sse_client.dart | 2 ++ pkgs/sse/lib/src/server/sse_handler.dart | 17 ++++++++++------- pkgs/sse/pubspec.yaml | 4 ++-- pkgs/sse/test/sse_test.dart | 2 ++ 7 files changed, 19 insertions(+), 23 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 89a15866d..4d2ef6cee 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.18.0, dev] + sdk: [2.19.0, dev] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index edd1b4379..f51e5806f 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,6 +1,6 @@ ## 4.1.3-dev -- Update the minimum Dart SDK version to `2.18.0`. +- Update the minimum Dart SDK version to `2.19.0`. ## 4.1.2 diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index fdc06ad70..f432f0c56 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -1,5 +1,5 @@ # https://dart.dev/guides/language/analysis-options -include: package:lints/recommended.yaml +include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: language: @@ -7,23 +7,12 @@ analyzer: linter: rules: - - always_declare_return_types - avoid_returning_null - avoid_unused_constructor_parameters - cancel_subscriptions - comment_references - - directives_ordering - literal_only_boolean_expressions - no_adjacent_strings_in_list - - omit_local_variable_types - - only_throw_errors - package_api_docs - prefer_const_constructors - - prefer_interpolation_to_compose_strings - - prefer_single_quotes - test_types_in_equals - - throw_in_finally - - unawaited_futures - - unnecessary_lambdas - - unnecessary_null_aware_assignments - - unnecessary_statements diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index c6027b738..c9f20e8a1 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -136,8 +136,10 @@ class SseClient extends StreamChannelMixin { await _requestPool.withResource(() async { try { encodedMessage = jsonEncode(message); + // ignore: avoid_catching_errors } on JsonUnsupportedObjectError catch (e) { _logger.warning('[$_clientId] Unable to encode outgoing message: $e'); + // ignore: avoid_catching_errors } on ArgumentError catch (e) { _logger.warning('[$_clientId] Invalid argument: $e'); } diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index 88bb851be..fbf8f61d3 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -63,7 +63,8 @@ class SseConnection extends StreamChannelMixin { /// /// If [keepAlive] is supplied, the connection will remain active for this /// period after a disconnect and can be reconnected transparently. If there - /// is no reconnect within that period, the connection will be closed normally. + /// is no reconnect within that period, the connection will be closed + /// normally. /// /// If [keepAlive] is not supplied, the connection will be closed immediately /// after a disconnect. @@ -152,10 +153,11 @@ class SseConnection extends StreamChannelMixin { // Close immediately if we're not keeping alive. _close(); } else if (!isInKeepAlivePeriod && !_closedCompleter.isCompleted) { - // Otherwise if we didn't already have an active timer and we've not already - // been completely closed, set a timer to close after the timeout period. - // If the connection comes back, this will be cancelled and all messages left - // in the queue tried again. + // Otherwise if we didn't already have an active timer and we've not + // already been completely closed, set a timer to close after the timeout + // period. + // If the connection comes back, this will be cancelled and all messages + // left in the queue tried again. _keepAliveTimer = Timer(_keepAlive!, _close); } } @@ -220,8 +222,9 @@ class SseHandler { sink.add(_sseHeaders(req.headers['origin'])); var clientId = req.url.queryParameters['sseClientId']; - // Check if we already have a connection for this ID that is in the process - // of timing out (in which case we can reconnect it transparently). + // Check if we already have a connection for this ID that is in the + // process of timing out + // (in which case we can reconnect it transparently). if (_connections[clientId] != null && _connections[clientId]!.isInKeepAlivePeriod) { _connections[clientId]!._acceptReconnection(sink); diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index cbb903c33..73f423686 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -7,7 +7,7 @@ description: >- repository: https://github.com/dart-lang/sse environment: - sdk: '>=2.18.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' dependencies: async: ^2.0.8 @@ -19,7 +19,7 @@ dependencies: stream_channel: ^2.0.0 dev_dependencies: - lints: ^2.0.0 + dart_flutter_team_lints: ^1.0.0 shelf_static: ^1.0.0 test: ^1.5.3 webdriver: ^3.0.0 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index c34c0b711..dc8950881 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +library; + import 'dart:async'; import 'dart:io'; From fabfd94db83bf088518c35d4b02236e5663a7fc0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 May 2023 12:34:41 -0700 Subject: [PATCH 080/115] Bump actions/checkout from 3.5.0 to 3.5.2 (dart-lang/sse#83) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/8f4b7f84864484a7bf31766abe9204da3cbe65b3...8e5e7e5ab8b370d6c329ec480221332ada57f0ab) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 4d2ef6cee..ff0fb2abb 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.19.0, dev] steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From a5220f5790372c82ad8d38c7fac1d00518f445d1 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 19 May 2023 09:53:28 -0700 Subject: [PATCH 081/115] blast_repo fixes (dart-lang/sse#84) dependabot --- pkgs/sse/.github/dependabot.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/sse/.github/dependabot.yaml b/pkgs/sse/.github/dependabot.yaml index 214481934..439e796b4 100644 --- a/pkgs/sse/.github/dependabot.yaml +++ b/pkgs/sse/.github/dependabot.yaml @@ -2,7 +2,9 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: - interval: "monthly" + interval: monthly + labels: + - autosubmit From ab4f7573998ebd39d9de2efd88e2050d027a0fea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jul 2023 01:59:23 +0000 Subject: [PATCH 082/115] Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/sse#85) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
Release notes

Sourced from actions/checkout's releases.

v3.5.3

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v3.5.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

v2.3.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.2&new-version=3.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index ff0fb2abb..cee7d43b4 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.19.0, dev] steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 972c2389ae45816a02e42611b6c2716c04978dc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 01:18:10 +0000 Subject: [PATCH 083/115] Bump nanasess/setup-chromedriver from 2.0.0 to 2.1.1 (dart-lang/sse#86) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [nanasess/setup-chromedriver](https://github.com/nanasess/setup-chromedriver) from 2.0.0 to 2.1.1.
Release notes

Sourced from nanasess/setup-chromedriver's releases.

v2.1.1

What's Changed

Full Changelog: https://github.com/nanasess/setup-chromedriver/compare/v2.1.0...v2.1.1

v2.1.0

Chrome 115 or later uses Chrome for Testing. Thanks to everyone who reported the glitch!🙏

What's Changed

Full Changelog: https://github.com/nanasess/setup-chromedriver/compare/v2.0.0...v2.1.0

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nanasess/setup-chromedriver&package-manager=github_actions&previous-version=2.0.0&new-version=2.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index cee7d43b4..47b3f6d43 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -53,7 +53,7 @@ jobs: - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} - - uses: nanasess/setup-chromedriver@95301782a076fbe8c9ecf54395a4689f7b195285 + - uses: nanasess/setup-chromedriver@6fb8f5ffa6b7dc11e631ff695fbd2fec0b04bb52 - id: install name: Install dependencies run: dart pub get From 4d384948c73a075bba19949d56dbb577c8f7de24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 01:08:56 +0000 Subject: [PATCH 084/115] Bump nanasess/setup-chromedriver from 2.1.1 to 2.2.0 (dart-lang/sse#88) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [nanasess/setup-chromedriver](https://github.com/nanasess/setup-chromedriver) from 2.1.1 to 2.2.0.
Release notes

Sourced from nanasess/setup-chromedriver's releases.

v2.2.0

@​rasa's contribution has significantly improved the performance of the *NIX platform🍻🥂🍣

What's Changed

New Contributors

Full Changelog: https://github.com/nanasess/setup-chromedriver/compare/v2.1.2...v2.1.3

v2.1.2

Improved problem of failing to get ChromeDriver 115.0.5790.110. Thanks for all the feedback.🙏

What's Changed

Full Changelog: https://github.com/nanasess/setup-chromedriver/compare/v2.1.1...v2.1.2

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nanasess/setup-chromedriver&package-manager=github_actions&previous-version=2.1.1&new-version=2.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 47b3f6d43..71ef1032e 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -53,7 +53,7 @@ jobs: - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} - - uses: nanasess/setup-chromedriver@6fb8f5ffa6b7dc11e631ff695fbd2fec0b04bb52 + - uses: nanasess/setup-chromedriver@2c49495f83dd47aa7cee6b3d20cd5a5a3e1e016d - id: install name: Install dependencies run: dart pub get From b217d296a0a425d4d1714166c2659499dfaba889 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 01:08:59 +0000 Subject: [PATCH 085/115] Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/sse#87) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
Release notes

Sourced from actions/checkout's releases.

v3.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3.5.3...v3.6.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.3&new-version=3.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 71ef1032e..886a036e1 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.19.0, dev] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 126f752eb5e32994bfc7257869cc281a51bfa5b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 01:31:20 +0000 Subject: [PATCH 086/115] Bump actions/checkout from 3.6.0 to 4.1.0 (dart-lang/sse#89) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.0.
Release notes

Sourced from actions/checkout's releases.

v4.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.0.0...v4.1.0

v4.0.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v4.0.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.6.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 886a036e1..0a95c99e9 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.19.0, dev] steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From b35ff998637655c38642dd24ced2dc0e2baabb82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 07:15:30 -0700 Subject: [PATCH 087/115] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (dart-lang/sse#90) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/d6a63dab3335f427404425de0fbfed4686d93c4f...8a4b97ea2017cc079571daec46542f76189836b1) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 0a95c99e9..c24b47500 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.19.0, dev] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@2c49495f83dd47aa7cee6b3d20cd5a5a3e1e016d From 3f508501564e3d2cc70fdc000b07ec90219599f5 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 13 Oct 2023 12:06:26 -0700 Subject: [PATCH 088/115] Enable and fix latest lints (dart-lang/sse#91) * bump min sdk, rebuild js file --- pkgs/sse/.github/workflows/test-package.yml | 2 +- pkgs/sse/CHANGELOG.md | 2 +- pkgs/sse/analysis_options.yaml | 3 - pkgs/sse/lib/client/sse_client.dart | 4 +- pkgs/sse/lib/src/server/sse_handler.dart | 2 +- pkgs/sse/pubspec.yaml | 4 +- pkgs/sse/test/sse_test.dart | 4 +- pkgs/sse/test/web/index.dart.js | 6796 ++++++++++--------- 8 files changed, 3502 insertions(+), 3315 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index c24b47500..0b1fbec10 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.19.0, dev] + sdk: [3.1.0, dev] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index f51e5806f..36822cfc8 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,6 +1,6 @@ ## 4.1.3-dev -- Update the minimum Dart SDK version to `2.19.0`. +- Update the minimum Dart SDK version to `3.1.0`. ## 4.1.2 diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index f432f0c56..e04ca5566 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -10,9 +10,6 @@ linter: - avoid_returning_null - avoid_unused_constructor_parameters - cancel_subscriptions - - comment_references - literal_only_boolean_expressions - no_adjacent_strings_in_list - package_api_docs - - prefer_const_constructors - - test_types_in_equals diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index c9f20e8a1..86dac1037 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -34,7 +34,7 @@ class SseClient extends StreamChannelMixin { final _logger = Logger('SseClient'); - final _onConnected = Completer(); + final _onConnected = Completer(); int _lastMessageId = -1; @@ -97,7 +97,7 @@ class SseClient extends StreamChannelMixin { _eventSource.close(); // If the initial connection was never established. Add a listener so close // adds a done event to [sink]. - if (!_onConnected.isCompleted) _outgoingController.stream.drain(); + if (!_onConnected.isCompleted) _outgoingController.stream.drain(); _incomingController.close(); _outgoingController.close(); } diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index fbf8f61d3..d4b7e0636 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -81,7 +81,7 @@ class SseConnection extends StreamChannelMixin { // If we're in a KeepAlive timeout, there's nowhere to send messages so // wait a short period and check again. if (isInKeepAlivePeriod) { - await Future.delayed(const Duration(milliseconds: 200)); + await Future.delayed(const Duration(milliseconds: 200)); continue; } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 73f423686..12582660c 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -7,7 +7,7 @@ description: >- repository: https://github.com/dart-lang/sse environment: - sdk: '>=2.19.0 <3.0.0' + sdk: ^3.1.0 dependencies: async: ^2.0.8 @@ -19,7 +19,7 @@ dependencies: stream_channel: ^2.0.0 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 shelf_static: ^1.0.0 test: ^1.5.3 webdriver: ^3.0.0 diff --git a/pkgs/sse/test/sse_test.dart b/pkgs/sse/test/sse_test.dart index dc8950881..0455baa0f 100644 --- a/pkgs/sse/test/sse_test.dart +++ b/pkgs/sse/test/sse_test.dart @@ -76,7 +76,7 @@ void main() { for (var i = 0; i < limit; i++) { connection.sink.add('$i'); } - await connection.stream.take(limit).drain(); + await connection.stream.take(limit).drain(); }); test('messages arrive in-order', () async { @@ -149,7 +149,7 @@ void main() { await closeButton.click(); // Should complete since the connection is closed. - await connection.stream.drain(); + await connection.stream.drain(); expect(handler.numberOfClients, 0); }); diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index d3554dad1..7a680ba09 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.13.0. +// Generated by dart2js (NullSafetyMode.sound, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.3.0-16.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -9,11 +9,14 @@ // directly. Instead, a closure that will invoke [main], and its arguments // [args] is passed to [dartMainRunner]. // -// dartDeferredLibraryLoader(uri, successCallback, errorCallback): +// dartDeferredLibraryLoader(uri, successCallback, errorCallback, loadId, loadPriority): // if this function is defined, it will be called when a deferred library // is loaded. It should load and eval the javascript of `uri`, and call // successCallback. If it fails to do so, it should call errorCallback with -// an error. +// an error. The loadId argument is the deferred import that resulted in +// this uri being loaded. The loadPriority argument is the priority the +// library should be loaded with as specified in the code via the +// load-priority annotation (0: normal, 1: high). // // dartCallInstrumentation(id, qualifiedName): // if this function is defined, it will be called at each entry of a @@ -27,7 +30,7 @@ to[key] = from[key]; } } - function mixinProperties(from, to) { + function mixinPropertiesHard(from, to) { var keys = Object.keys(from); for (var i = 0; i < keys.length; i++) { var key = keys[i]; @@ -35,12 +38,15 @@ to[key] = from[key]; } } + function mixinPropertiesEasy(from, to) { + Object.assign(to, from); + } var supportsDirectProtoAccess = function() { var cls = function() { }; cls.prototype = {p: {}}; var object = new cls(); - if (!(object.__proto__ && object.__proto__.p === cls.prototype.p)) + if (!(Object.getPrototypeOf(object) && Object.getPrototypeOf(object).p === cls.prototype.p)) return false; try { if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) @@ -54,29 +60,12 @@ } return false; }(); - function setFunctionNamesIfNecessary(holders) { - function t() { - } - ; - if (typeof t.name == "string") - return; - for (var i = 0; i < holders.length; i++) { - var holder = holders[i]; - var keys = Object.keys(holder); - for (var j = 0; j < keys.length; j++) { - var key = keys[j]; - var f = holder[key]; - if (typeof f == "function") - f.name = key; - } - } - } function inherit(cls, sup) { cls.prototype.constructor = cls; cls.prototype["$is" + cls.name] = cls; if (sup != null) { if (supportsDirectProtoAccess) { - cls.prototype.__proto__ = sup.prototype; + Object.setPrototypeOf(cls.prototype, sup.prototype); return; } var clsPrototype = Object.create(sup.prototype); @@ -88,8 +77,12 @@ for (var i = 0; i < classes.length; i++) inherit(classes[i], sup); } - function mixin(cls, mixin) { - mixinProperties(mixin.prototype, cls.prototype); + function mixinEasy(cls, mixin) { + mixinPropertiesEasy(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function mixinHard(cls, mixin) { + mixinPropertiesHard(mixin.prototype, cls.prototype); cls.prototype.constructor = cls; } function lazyOld(holder, name, getterName, initializer) { @@ -97,7 +90,7 @@ holder[name] = uninitializedSentinel; holder[getterName] = function() { holder[getterName] = function() { - H.throwCyclicInit(name); + A.throwCyclicInit(name); }; var result; var sentinelInProgress = initializer; @@ -136,13 +129,14 @@ if (holder[name] === uninitializedSentinel) { var value = initializer(); if (holder[name] !== uninitializedSentinel) - H.throwLateInitializationError(name); + A.throwLateFieldADI(name); holder[name] = value; } + var finalValue = holder[name]; holder[getterName] = function() { - return this[name]; + return finalValue; }; - return holder[name]; + return finalValue; }; } function makeConstList(list) { @@ -162,45 +156,42 @@ convertToFastObject(arrayOfObjects[i]); } var functionCounter = 0; - function tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted) { - return isIntercepted ? new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "(receiver) {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, true, name);" + "return new c(this, funcs[0], receiver, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null) : new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, false, name);" + "return new c(this, funcs[0], null, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null); + function instanceTearOffGetter(isIntercepted, parameters) { + var cache = null; + return isIntercepted ? function(receiver) { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(receiver, this); + } : function() { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(this, null); + }; } - function tearOff(funcs, applyTrampolineIndex, reflectionInfo, isStatic, name, isIntercepted) { + function staticTearOffGetter(parameters) { var cache = null; - return isStatic ? function() { + return function() { if (cache === null) - cache = H.closureFromTearOff(this, funcs, applyTrampolineIndex, reflectionInfo, true, false, name).prototype; + cache = A.closureFromTearOff(parameters).prototype; return cache; - } : tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted); + }; } var typesOffset = 0; - function installTearOff(container, getterName, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { - var funs = []; - for (var i = 0; i < funsOrNames.length; i++) { - var fun = funsOrNames[i]; - if (typeof fun == "string") - fun = container[fun]; - fun.$callName = callNames[i]; - funs.push(fun); - } - var fun = funs[0]; - fun.$requiredArgCount = requiredParameterCount; - fun.$defaultValues = optionalParameterDefaultValues; - var reflectionInfo = funType; - if (typeof reflectionInfo == "number") - reflectionInfo += typesOffset; - var name = funsOrNames[0]; - fun.$stubName = name; - var getterFunction = tearOff(funs, applyIndex || 0, reflectionInfo, isStatic, name, isIntercepted); - container[getterName] = getterFunction; - if (isStatic) - fun.$tearOff = getterFunction; + function tearOffParameters(container, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + if (typeof funType == "number") + funType += typesOffset; + return {co: container, iS: isStatic, iI: isIntercepted, rC: requiredParameterCount, dV: optionalParameterDefaultValues, cs: callNames, fs: funsOrNames, fT: funType, aI: applyIndex || 0, nDA: needsDirectAccess}; } - function installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { - return installTearOff(container, getterName, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex); + function installStaticTearOff(holder, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { + var parameters = tearOffParameters(holder, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, false); + var getterFunction = staticTearOffGetter(parameters); + holder[getterName] = getterFunction; } - function installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { - return installTearOff(container, getterName, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex); + function installInstanceTearOff(prototype, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + isIntercepted = !!isIntercepted; + var parameters = tearOffParameters(prototype, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, !!needsDirectAccess); + var getterFunction = instanceTearOffGetter(isIntercepted, parameters); + prototype[getterName] = getterFunction; } function setOrUpdateInterceptorsByTag(newTags) { var tags = init.interceptorsByTag; @@ -231,7 +222,7 @@ var hunkHelpers = function() { var mkInstance = function(isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { return function(container, getterName, name, funType) { - return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); + return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex, false); }; }, mkStatic = function(requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { @@ -239,34 +230,283 @@ return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); }; }; - return {inherit: inherit, inheritMany: inheritMany, mixin: mixin, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, lazyOld: lazyOld, updateHolder: updateHolder, convertToFastObject: convertToFastObject, setFunctionNamesIfNecessary: setFunctionNamesIfNecessary, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; + return {inherit: inherit, inheritMany: inheritMany, mixin: mixinEasy, mixinHard: mixinHard, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, lazyOld: lazyOld, updateHolder: updateHolder, convertToFastObject: convertToFastObject, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; }(); function initializeDeferredHunk(hunk) { typesOffset = init.types.length; hunk(hunkHelpers, init, holders, $); } - function getGlobalFromName(name) { - for (var i = 0; i < holders.length; i++) { - if (holders[i] == C) - continue; - if (holders[i][name]) - return holders[i][name]; - } - } - var C = {}, - H = {JS_CONST: function JS_CONST() { + var J = { + makeDispatchRecord(interceptor, proto, extension, indexability) { + return {i: interceptor, p: proto, e: extension, x: indexability}; + }, + getNativeInterceptor(object) { + var proto, objectProto, $constructor, interceptor, t1, + record = object[init.dispatchPropertyName]; + if (record == null) + if ($.initNativeDispatchFlag == null) { + A.initNativeDispatch(); + record = object[init.dispatchPropertyName]; + } + if (record != null) { + proto = record.p; + if (false === proto) + return record.i; + if (true === proto) + return object; + objectProto = Object.getPrototypeOf(object); + if (proto === objectProto) + return record.i; + if (record.e === objectProto) + throw A.wrapException(A.UnimplementedError$("Return interceptor for " + A.S(proto(object, record)))); + } + $constructor = object.constructor; + if ($constructor == null) + interceptor = null; + else { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + interceptor = $constructor[t1]; + } + if (interceptor != null) + return interceptor; + interceptor = A.lookupAndCacheInterceptor(object); + if (interceptor != null) + return interceptor; + if (typeof object == "function") + return B.JavaScriptFunction_methods; + proto = Object.getPrototypeOf(object); + if (proto == null) + return B.PlainJavaScriptObject_methods; + if (proto === Object.prototype) + return B.PlainJavaScriptObject_methods; + if (typeof $constructor == "function") { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + Object.defineProperty($constructor, t1, {value: B.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + return B.UnknownJavaScriptObject_methods; + } + return B.UnknownJavaScriptObject_methods; + }, + JSArray_JSArray$fixed($length, $E) { + if ($length < 0 || $length > 4294967295) + throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); + }, + JSArray_JSArray$growable($length, $E) { + if ($length < 0) + throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); + return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); + }, + JSArray_JSArray$markFixed(allocation, $E) { + return J.JSArray_markFixedList(A._setArrayType(allocation, $E._eval$1("JSArray<0>")), $E); + }, + JSArray_markFixedList(list, $T) { + list.fixed$length = Array; + return list; + }, + getInterceptor$(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSNumNotInt.prototype; + } + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return J.JSNull.prototype; + if (typeof receiver == "boolean") + return J.JSBool.prototype; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$asx(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ax(receiver) { + if (receiver == null) + return receiver; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$s(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$x(receiver) { + if (receiver == null) + return receiver; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$z(receiver) { + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + get$error$z(receiver) { + return J.getInterceptor$z(receiver).get$error(receiver); + }, + get$hashCode$(receiver) { + return J.getInterceptor$(receiver).get$hashCode(receiver); + }, + get$iterator$ax(receiver) { + return J.getInterceptor$ax(receiver).get$iterator(receiver); + }, + get$length$asx(receiver) { + return J.getInterceptor$asx(receiver).get$length(receiver); + }, + get$onClick$x(receiver) { + return J.getInterceptor$x(receiver).get$onClick(receiver); + }, + get$runtimeType$(receiver) { + return J.getInterceptor$(receiver).get$runtimeType(receiver); + }, + $eq$(receiver, a0) { + if (receiver == null) + return a0 == null; + if (typeof receiver != "object") + return a0 != null && receiver === a0; + return J.getInterceptor$(receiver).$eq(receiver, a0); + }, + _removeEventListener$3$x(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2); + }, + addEventListener$3$x(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); + }, + complete$1$z(receiver, a0) { + return J.getInterceptor$z(receiver).complete$1(receiver, a0); + }, + forEach$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); + }, + matchAsPrefix$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); + }, + toString$0$(receiver) { + return J.getInterceptor$(receiver).toString$0(receiver); + }, + Interceptor: function Interceptor() { + }, + JSBool: function JSBool() { + }, + JSNull: function JSNull() { + }, + JavaScriptObject: function JavaScriptObject() { + }, + LegacyJavaScriptObject: function LegacyJavaScriptObject() { + }, + PlainJavaScriptObject: function PlainJavaScriptObject() { + }, + UnknownJavaScriptObject: function UnknownJavaScriptObject() { + }, + JavaScriptFunction: function JavaScriptFunction() { + }, + JavaScriptBigInt: function JavaScriptBigInt() { + }, + JavaScriptSymbol: function JavaScriptSymbol() { + }, + JSArray: function JSArray(t0) { + this.$ti = t0; }, - LateError$fieldNI: function(fieldName) { - return new H.LateError("Field '" + fieldName + "' has not been initialized."); + JSUnmodifiableArray: function JSUnmodifiableArray(t0) { + this.$ti = t0; + }, + ArrayIterator: function ArrayIterator(t0, t1, t2) { + var _ = this; + _._iterable = t0; + _._length = t1; + _._index = 0; + _._current = null; + _.$ti = t2; + }, + JSNumber: function JSNumber() { + }, + JSInt: function JSInt() { + }, + JSNumNotInt: function JSNumNotInt() { + }, + JSString: function JSString() { + } + }, + A = {JS_CONST: function JS_CONST() { }, - checkNotNullable: function(value, $name, $T) { + checkNotNullable(value, $name, $T) { return value; }, - IterableElementError_noElement: function() { - return new P.StateError("No element"); + isToStringVisiting(object) { + var t1, i; + for (t1 = $.toStringVisiting.length, i = 0; i < t1; ++i) + if (object === $.toStringVisiting[i]) + return true; + return false; }, - IterableElementError_tooFew: function() { - return new P.StateError("Too few elements"); + IterableElementError_noElement() { + return new A.StateError("No element"); + }, + IterableElementError_tooFew() { + return new A.StateError("Too few elements"); }, LateError: function LateError(t0) { this._message = t0; @@ -287,13 +527,13 @@ }, FixedLengthListMixin: function FixedLengthListMixin() { }, - unminifyOrTag: function(rawClassName) { - var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName); + unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; if (preserved != null) return preserved; return rawClassName; }, - isJsIndexable: function(object, record) { + isJsIndexable(object, record) { var result; if (record != null) { result = record.x; @@ -302,8 +542,8 @@ } return type$.JavaScriptIndexingBehavior_dynamic._is(object); }, - S: function(value) { - var res; + S(value) { + var result; if (typeof value == "string") return value; if (typeof value == "number") { @@ -315,24 +555,28 @@ return "false"; else if (value == null) return "null"; - res = J.toString$0$(value); - return res; + result = J.toString$0$(value); + return result; }, - Primitives_objectHashCode: function(object) { - var hash = object.$identityHash; + Primitives_objectHashCode(object) { + var hash, + property = $.Primitives__identityHashCodeProperty; + if (property == null) + property = $.Primitives__identityHashCodeProperty = Symbol("identityHashCode"); + hash = object[property]; if (hash == null) { hash = Math.random() * 0x3fffffff | 0; - object.$identityHash = hash; + object[property] = hash; } return hash; }, - Primitives_parseInt: function(source, radix) { + Primitives_parseInt(source, radix) { var decimalMatch, maxCharCode, digitsPart, t1, i, _null = null, match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); if (match == null) return _null; if (3 >= match.length) - return H.ioore(match, 3); + return A.ioore(match, 3); decimalMatch = match[3]; if (radix == null) { if (decimalMatch != null) @@ -342,102 +586,109 @@ return _null; } if (radix < 2 || radix > 36) - throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", _null)); + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", _null)); if (radix === 10 && decimalMatch != null) return parseInt(source, 10); if (radix < 10 || decimalMatch == null) { maxCharCode = radix <= 10 ? 47 + radix : 86 + radix; digitsPart = match[1]; for (t1 = digitsPart.length, i = 0; i < t1; ++i) - if ((C.JSString_methods._codeUnitAt$1(digitsPart, i) | 32) > maxCharCode) + if ((digitsPart.charCodeAt(i) | 32) > maxCharCode) return _null; } return parseInt(source, radix); }, - Primitives_objectTypeName: function(object) { - return H.Primitives__objectTypeNameNewRti(object); - }, - Primitives__objectTypeNameNewRti: function(object) { - var dispatchName, t1, $constructor, constructorName; - if (object instanceof P.Object) - return H._rtiToString(H.instanceType(object), null); - if (J.getInterceptor$(object) === C.Interceptor_methods || type$.UnknownJavaScriptObject._is(object)) { - dispatchName = C.C_JS_CONST(object); - t1 = dispatchName !== "Object" && dispatchName !== ""; - if (t1) + Primitives_objectTypeName(object) { + return A.Primitives__objectTypeNameNewRti(object); + }, + Primitives__objectTypeNameNewRti(object) { + var interceptor, dispatchName, $constructor, constructorName; + if (object instanceof A.Object) + return A._rtiToString(A.instanceType(object), null); + interceptor = J.getInterceptor$(object); + if (interceptor === B.Interceptor_methods || interceptor === B.JavaScriptObject_methods || type$.UnknownJavaScriptObject._is(object)) { + dispatchName = B.C_JS_CONST(object); + if (dispatchName !== "Object" && dispatchName !== "") return dispatchName; $constructor = object.constructor; if (typeof $constructor == "function") { constructorName = $constructor.name; - if (typeof constructorName == "string") - t1 = constructorName !== "Object" && constructorName !== ""; - else - t1 = false; - if (t1) + if (typeof constructorName == "string" && constructorName !== "Object" && constructorName !== "") return constructorName; } } - return H._rtiToString(H.instanceType(object), null); + return A._rtiToString(A.instanceType(object), null); }, - Primitives_stringFromCharCode: function(charCode) { + Primitives_safeToString(object) { + if (typeof object == "number" || A._isBool(object)) + return J.toString$0$(object); + if (typeof object == "string") + return JSON.stringify(object); + if (object instanceof A.Closure) + return object.toString$0(0); + return "Instance of '" + A.Primitives_objectTypeName(object) + "'"; + }, + Primitives_stringFromCharCode(charCode) { var bits; if (0 <= charCode) { if (charCode <= 65535) return String.fromCharCode(charCode); if (charCode <= 1114111) { bits = charCode - 65536; - return String.fromCharCode((C.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); + return String.fromCharCode((B.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); } } - throw H.wrapException(P.RangeError$range(charCode, 0, 1114111, null, null)); + throw A.wrapException(A.RangeError$range(charCode, 0, 1114111, null, null)); }, - Primitives_lazyAsJsDate: function(receiver) { + Primitives_lazyAsJsDate(receiver) { if (receiver.date === void 0) receiver.date = new Date(receiver._value); return receiver.date; }, - Primitives_getYear: function(receiver) { - return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCFullYear() + 0 : H.Primitives_lazyAsJsDate(receiver).getFullYear() + 0; + Primitives_getYear(receiver) { + return receiver.isUtc ? A.Primitives_lazyAsJsDate(receiver).getUTCFullYear() + 0 : A.Primitives_lazyAsJsDate(receiver).getFullYear() + 0; }, - Primitives_getMonth: function(receiver) { - return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMonth() + 1 : H.Primitives_lazyAsJsDate(receiver).getMonth() + 1; + Primitives_getMonth(receiver) { + return receiver.isUtc ? A.Primitives_lazyAsJsDate(receiver).getUTCMonth() + 1 : A.Primitives_lazyAsJsDate(receiver).getMonth() + 1; }, - Primitives_getDay: function(receiver) { - return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCDate() + 0 : H.Primitives_lazyAsJsDate(receiver).getDate() + 0; + Primitives_getDay(receiver) { + return receiver.isUtc ? A.Primitives_lazyAsJsDate(receiver).getUTCDate() + 0 : A.Primitives_lazyAsJsDate(receiver).getDate() + 0; }, - Primitives_getHours: function(receiver) { - return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCHours() + 0 : H.Primitives_lazyAsJsDate(receiver).getHours() + 0; + Primitives_getHours(receiver) { + return receiver.isUtc ? A.Primitives_lazyAsJsDate(receiver).getUTCHours() + 0 : A.Primitives_lazyAsJsDate(receiver).getHours() + 0; }, - Primitives_getMinutes: function(receiver) { - return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMinutes() + 0 : H.Primitives_lazyAsJsDate(receiver).getMinutes() + 0; + Primitives_getMinutes(receiver) { + return receiver.isUtc ? A.Primitives_lazyAsJsDate(receiver).getUTCMinutes() + 0 : A.Primitives_lazyAsJsDate(receiver).getMinutes() + 0; }, - Primitives_getSeconds: function(receiver) { - return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCSeconds() + 0 : H.Primitives_lazyAsJsDate(receiver).getSeconds() + 0; + Primitives_getSeconds(receiver) { + return receiver.isUtc ? A.Primitives_lazyAsJsDate(receiver).getUTCSeconds() + 0 : A.Primitives_lazyAsJsDate(receiver).getSeconds() + 0; }, - Primitives_getMilliseconds: function(receiver) { - return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0 : H.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; + Primitives_getMilliseconds(receiver) { + return receiver.isUtc ? A.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0 : A.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; }, - ioore: function(receiver, index) { + ioore(receiver, index) { if (receiver == null) J.get$length$asx(receiver); - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + throw A.wrapException(A.diagnoseIndexError(receiver, index)); }, - diagnoseIndexError: function(indexable, index) { + diagnoseIndexError(indexable, index) { var $length, _s5_ = "index"; - if (!H._isInt(index)) - return new P.ArgumentError(true, index, _s5_, null); - $length = H._asInt(J.get$length$asx(indexable)); + if (!A._isInt(index)) + return new A.ArgumentError(true, index, _s5_, null); + $length = A._asInt(J.get$length$asx(indexable)); if (index < 0 || index >= $length) - return P.IndexError$(index, indexable, _s5_, null, $length); - return P.RangeError$value(index, _s5_); + return A.IndexError$withLength(index, $length, indexable, null, _s5_); + return A.RangeError$value(index, _s5_); }, - wrapException: function(ex) { - var wrapper, t1; + wrapException(ex) { + return A.initializeExceptionWrapper(new Error(), ex); + }, + initializeExceptionWrapper(wrapper, ex) { + var t1; if (ex == null) - ex = new P.NullThrownError(); - wrapper = new Error(); + ex = new A.TypeError(); wrapper.dartException = ex; - t1 = H.toStringWrapper; + t1 = A.toStringWrapper; if ("defineProperty" in Object) { Object.defineProperty(wrapper, "message", {get: t1}); wrapper.name = ""; @@ -445,29 +696,32 @@ wrapper.toString = t1; return wrapper; }, - toStringWrapper: function() { + toStringWrapper() { return J.toString$0$(this.dartException); }, - throwExpression: function(ex) { - throw H.wrapException(ex); + throwExpression(ex) { + throw A.wrapException(ex); }, - throwConcurrentModificationError: function(collection) { - throw H.wrapException(P.ConcurrentModificationError$(collection)); + throwExpressionWithWrapper(ex, wrapper) { + throw A.initializeExceptionWrapper(wrapper, ex); }, - TypeErrorDecoder_extractPattern: function(message) { + throwConcurrentModificationError(collection) { + throw A.wrapException(A.ConcurrentModificationError$(collection)); + }, + TypeErrorDecoder_extractPattern(message) { var match, $arguments, argumentsExpr, expr, method, receiver; - message = H.quoteStringForRegExp(message.replace(String({}), "$receiver$")); + message = A.quoteStringForRegExp(message.replace(String({}), "$receiver$")); match = message.match(/\\\$[a-zA-Z]+\\\$/g); if (match == null) - match = H.setRuntimeTypeInfo([], type$.JSArray_String); + match = A._setArrayType([], type$.JSArray_String); $arguments = match.indexOf("\\$arguments\\$"); argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); expr = match.indexOf("\\$expr\\$"); method = match.indexOf("\\$method\\$"); receiver = match.indexOf("\\$receiver\\$"); - return new H.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); + return new A.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); }, - TypeErrorDecoder_provokeCallErrorOn: function(expression) { + TypeErrorDecoder_provokeCallErrorOn(expression) { return function($expr$) { var $argumentsExpr$ = "$arguments$"; try { @@ -477,7 +731,7 @@ } }(expression); }, - TypeErrorDecoder_provokePropertyErrorOn: function(expression) { + TypeErrorDecoder_provokePropertyErrorOn(expression) { return function($expr$) { try { $expr$.$method$; @@ -486,44 +740,47 @@ } }(expression); }, - JsNoSuchMethodError$: function(_message, match) { + JsNoSuchMethodError$(_message, match) { var t1 = match == null, t2 = t1 ? null : match.method; - return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); + return new A.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); }, - unwrapException: function(ex) { + unwrapException(ex) { + var t1; if (ex == null) - return new H.NullThrownFromJavaScriptException(ex); - if (ex instanceof H.ExceptionAndStackTrace) - return H.saveStackTrace(ex, type$.Object._as(ex.dartException)); + return new A.NullThrownFromJavaScriptException(ex); + if (ex instanceof A.ExceptionAndStackTrace) { + t1 = ex.dartException; + return A.saveStackTrace(ex, t1 == null ? type$.Object._as(t1) : t1); + } if (typeof ex !== "object") return ex; if ("dartException" in ex) - return H.saveStackTrace(ex, ex.dartException); - return H._unwrapNonDartException(ex); + return A.saveStackTrace(ex, ex.dartException); + return A._unwrapNonDartException(ex); }, - saveStackTrace: function(ex, error) { + saveStackTrace(ex, error) { if (type$.Error._is(error)) if (error.$thrownJsError == null) error.$thrownJsError = ex; return error; }, - _unwrapNonDartException: function(ex) { - var message, number, ieErrorCode, t1, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, _null = null; + _unwrapNonDartException(ex) { + var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match; if (!("message" in ex)) return ex; message = ex.message; if ("number" in ex && typeof ex.number == "number") { number = ex.number; ieErrorCode = number & 65535; - if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) + if ((B.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) switch (ieErrorCode) { case 438: - return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", _null)); + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A.S(message) + " (Error " + ieErrorCode + ")", null)); case 445: case 5007: - t1 = H.S(message) + " (Error " + ieErrorCode + ")"; - return H.saveStackTrace(ex, new H.NullError(t1, _null)); + A.S(message); + return A.saveStackTrace(ex, new A.NullError()); } } if (ex instanceof TypeError) { @@ -539,54 +796,22 @@ undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); match = nsme.matchTypeError$1(message); if (match != null) - return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asString(message), match)); + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A._asString(message), match)); else { match = notClosure.matchTypeError$1(message); if (match != null) { match.method = "call"; - return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asString(message), match)); - } else { - match = nullCall.matchTypeError$1(message); - if (match == null) { - match = nullLiteralCall.matchTypeError$1(message); - if (match == null) { - match = undefCall.matchTypeError$1(message); - if (match == null) { - match = undefLiteralCall.matchTypeError$1(message); - if (match == null) { - match = nullProperty.matchTypeError$1(message); - if (match == null) { - match = nullLiteralCall.matchTypeError$1(message); - if (match == null) { - match = undefProperty.matchTypeError$1(message); - if (match == null) { - match = undefLiteralProperty.matchTypeError$1(message); - t1 = match != null; - } else - t1 = true; - } else - t1 = true; - } else - t1 = true; - } else - t1 = true; - } else - t1 = true; - } else - t1 = true; - } else - t1 = true; - if (t1) { - H._asString(message); - return H.saveStackTrace(ex, new H.NullError(message, match == null ? _null : match.method)); - } + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A._asString(message), match)); + } else if (nullCall.matchTypeError$1(message) != null || nullLiteralCall.matchTypeError$1(message) != null || undefCall.matchTypeError$1(message) != null || undefLiteralCall.matchTypeError$1(message) != null || nullProperty.matchTypeError$1(message) != null || nullLiteralCall.matchTypeError$1(message) != null || undefProperty.matchTypeError$1(message) != null || undefLiteralProperty.matchTypeError$1(message) != null) { + A._asString(message); + return A.saveStackTrace(ex, new A.NullError()); } } - return H.saveStackTrace(ex, new H.UnknownJsTypeError(typeof message == "string" ? message : "")); + return A.saveStackTrace(ex, new A.UnknownJsTypeError(typeof message == "string" ? message : "")); } if (ex instanceof RangeError) { if (typeof message == "string" && message.indexOf("call stack") !== -1) - return new P.StackOverflowError(); + return new A.StackOverflowError(); message = function(ex) { try { return String(ex); @@ -594,25 +819,35 @@ } return null; }(ex); - return H.saveStackTrace(ex, new P.ArgumentError(false, _null, _null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message)); + return A.saveStackTrace(ex, new A.ArgumentError(false, null, null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message)); } if (typeof InternalError == "function" && ex instanceof InternalError) if (typeof message == "string" && message === "too much recursion") - return new P.StackOverflowError(); + return new A.StackOverflowError(); return ex; }, - getTraceFromException: function(exception) { + getTraceFromException(exception) { var trace; - if (exception instanceof H.ExceptionAndStackTrace) + if (exception instanceof A.ExceptionAndStackTrace) return exception.stackTrace; if (exception == null) - return new H._StackTrace(exception); + return new A._StackTrace(exception); trace = exception.$cachedTrace; if (trace != null) return trace; - return exception.$cachedTrace = new H._StackTrace(exception); + trace = new A._StackTrace(exception); + if (typeof exception === "object") + exception.$cachedTrace = trace; + return trace; + }, + objectHashCode(object) { + if (object == null) + return J.get$hashCode$(object); + if (typeof object == "object") + return A.Primitives_objectHashCode(object); + return J.get$hashCode$(object); }, - fillLiteralMap: function(keyValuePairs, result) { + fillLiteralMap(keyValuePairs, result) { var index, index0, index1, $length = keyValuePairs.length; for (index = 0; index < $length; index = index1) { @@ -622,9 +857,9 @@ } return result; }, - invokeClosure: function(closure, numberOfArguments, arg1, arg2, arg3, arg4) { + _invokeClosure(closure, numberOfArguments, arg1, arg2, arg3, arg4) { type$.Function._as(closure); - switch (H._asInt(numberOfArguments)) { + switch (A._asInt(numberOfArguments)) { case 0: return closure.call$0(); case 1: @@ -636,300 +871,273 @@ case 4: return closure.call$4(arg1, arg2, arg3, arg4); } - throw H.wrapException(new P._Exception("Unsupported number of arguments for wrapped closure")); + throw A.wrapException(new A._Exception("Unsupported number of arguments for wrapped closure")); }, - convertDartClosureToJS: function(closure, arity) { + convertDartClosureToJS(closure, arity) { var $function; if (closure == null) return null; $function = closure.$identity; if (!!$function) return $function; - $function = function(closure, arity, invoke) { - return function(a1, a2, a3, a4) { - return invoke(closure, arity, a1, a2, a3, a4); - }; - }(closure, arity, H.invokeClosure); + $function = A.convertDartClosureToJSUncached(closure, arity); closure.$identity = $function; return $function; }, - Closure_fromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, propertyName) { - var $constructor, t1, trampoline, applyTrampoline, i, stub, stubCallName, - $function = functions[0], - callName = $function.$callName, - $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(null, null, null, "").constructor.prototype); + convertDartClosureToJSUncached(closure, arity) { + var entry; + switch (arity) { + case 0: + entry = closure.call$0; + break; + case 1: + entry = closure.call$1; + break; + case 2: + entry = closure.call$2; + break; + case 3: + entry = closure.call$3; + break; + case 4: + entry = closure.call$4; + break; + default: + entry = null; + } + if (entry != null) + return entry.bind(closure); + return function(closure, arity, invoke) { + return function(a1, a2, a3, a4) { + return invoke(closure, arity, a1, a2, a3, a4); + }; + }(closure, arity, A._invokeClosure); + }, + Closure_fromTearOff(parameters) { + var $prototype, $constructor, t2, trampoline, applyTrampoline, i, stub, stub0, stubName, stubCallName, + container = parameters.co, + isStatic = parameters.iS, + isIntercepted = parameters.iI, + needsDirectAccess = parameters.nDA, + applyTrampolineIndex = parameters.aI, + funsOrNames = parameters.fs, + callNames = parameters.cs, + $name = funsOrNames[0], + callName = callNames[0], + $function = container[$name], + t1 = parameters.fT; + t1.toString; + $prototype = isStatic ? Object.create(new A.StaticClosure().constructor.prototype) : Object.create(new A.BoundClosure(null, null).constructor.prototype); $prototype.$initialize = $prototype.constructor; if (isStatic) $constructor = function static_tear_off() { this.$initialize(); }; - else { - t1 = $.Closure_functionCounter; - if (typeof t1 !== "number") - return t1.$add(); - $.Closure_functionCounter = t1 + 1; - t1 = new Function("a,b,c,d" + t1, "this.$initialize(a,b,c,d" + t1 + ")"); - $constructor = t1; - } + else + $constructor = function tear_off(a, b) { + this.$initialize(a, b); + }; $prototype.constructor = $constructor; $constructor.prototype = $prototype; - if (!isStatic) { - trampoline = H.Closure_forwardCallTo(receiver, $function, isIntercepted); - trampoline.$reflectionInfo = reflectionInfo; - } else { - $prototype.$static_name = propertyName; + $prototype.$_name = $name; + $prototype.$_target = $function; + t2 = !isStatic; + if (t2) + trampoline = A.Closure_forwardCallTo($name, $function, isIntercepted, needsDirectAccess); + else { + $prototype.$static_name = $name; trampoline = $function; } - type$.Object._as(reflectionInfo); - $prototype.$signature = H.Closure__computeSignatureFunctionNewRti(reflectionInfo, isStatic, isIntercepted); + $prototype.$signature = A.Closure__computeSignatureFunctionNewRti(t1, isStatic, isIntercepted); $prototype[callName] = trampoline; - for (applyTrampoline = trampoline, i = 1; i < functions.length; ++i) { - stub = functions[i]; - stubCallName = stub.$callName; + for (applyTrampoline = trampoline, i = 1; i < funsOrNames.length; ++i) { + stub = funsOrNames[i]; + if (typeof stub == "string") { + stub0 = container[stub]; + stubName = stub; + stub = stub0; + } else + stubName = ""; + stubCallName = callNames[i]; if (stubCallName != null) { - stub = isStatic ? stub : H.Closure_forwardCallTo(receiver, stub, isIntercepted); + if (t2) + stub = A.Closure_forwardCallTo(stubName, stub, isIntercepted, needsDirectAccess); $prototype[stubCallName] = stub; } - if (i === applyTrampolineIndex) { - stub.$reflectionInfo = reflectionInfo; + if (i === applyTrampolineIndex) applyTrampoline = stub; - } } $prototype["call*"] = applyTrampoline; - $prototype.$requiredArgCount = $function.$requiredArgCount; - $prototype.$defaultValues = $function.$defaultValues; + $prototype.$requiredArgCount = parameters.rC; + $prototype.$defaultValues = parameters.dV; return $constructor; }, - Closure__computeSignatureFunctionNewRti: function(functionType, isStatic, isIntercepted) { - var typeEvalMethod; + Closure__computeSignatureFunctionNewRti(functionType, isStatic, isIntercepted) { if (typeof functionType == "number") - return function(getType, t) { - return function() { - return getType(t); - }; - }(H.getTypeFromTypesTable, functionType); + return functionType; if (typeof functionType == "string") { if (isStatic) - throw H.wrapException("Cannot compute signature for static tearoff."); - typeEvalMethod = isIntercepted ? H.BoundClosure_evalRecipeIntercepted : H.BoundClosure_evalRecipe; + throw A.wrapException("Cannot compute signature for static tearoff."); return function(recipe, evalOnReceiver) { return function() { return evalOnReceiver(this, recipe); }; - }(functionType, typeEvalMethod); + }(functionType, A.BoundClosure_evalRecipe); } - throw H.wrapException("Error in functionType of tearoff"); + throw A.wrapException("Error in functionType of tearoff"); }, - Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) { - var getSelf = H.BoundClosure_selfOf; - switch (isSuperCall ? -1 : arity) { + Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf; + switch (needsDirectAccess ? -1 : arity) { case 0: - return function(n, S) { + return function(entry, receiverOf) { return function() { - return S(this)[n](); + return receiverOf(this)[entry](); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 1: - return function(n, S) { + return function(entry, receiverOf) { return function(a) { - return S(this)[n](a); + return receiverOf(this)[entry](a); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 2: - return function(n, S) { + return function(entry, receiverOf) { return function(a, b) { - return S(this)[n](a, b); + return receiverOf(this)[entry](a, b); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 3: - return function(n, S) { + return function(entry, receiverOf) { return function(a, b, c) { - return S(this)[n](a, b, c); + return receiverOf(this)[entry](a, b, c); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 4: - return function(n, S) { + return function(entry, receiverOf) { return function(a, b, c, d) { - return S(this)[n](a, b, c, d); + return receiverOf(this)[entry](a, b, c, d); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 5: - return function(n, S) { + return function(entry, receiverOf) { return function(a, b, c, d, e) { - return S(this)[n](a, b, c, d, e); + return receiverOf(this)[entry](a, b, c, d, e); }; - }(stubName, getSelf); + }(stubName, getReceiver); default: - return function(f, s) { + return function(f, receiverOf) { return function() { - return f.apply(s(this), arguments); + return f.apply(receiverOf(this), arguments); }; - }($function, getSelf); + }($function, getReceiver); } }, - Closure_forwardCallTo: function(receiver, $function, isIntercepted) { - var stubName, arity, lookedUpFunction, t1, t2, selfName, $arguments; + Closure_forwardCallTo(stubName, $function, isIntercepted, needsDirectAccess) { + var arity, t1; if (isIntercepted) - return H.Closure_forwardInterceptedCallTo(receiver, $function); - stubName = $function.$stubName; + return A.Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess); arity = $function.length; - lookedUpFunction = receiver[stubName]; - t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; - t2 = !t1 || arity >= 27; - if (t2) - return H.Closure_cspForwardCall(arity, !t1, stubName, $function); - if (arity === 0) { - t1 = $.Closure_functionCounter; - if (typeof t1 !== "number") - return t1.$add(); - $.Closure_functionCounter = t1 + 1; - selfName = "self" + t1; - t1 = "return function(){var " + selfName + " = this."; - t2 = $.BoundClosure_selfFieldNameCache; - return new Function(t1 + (t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + ";return " + selfName + "." + H.S(stubName) + "();}")(); - } - $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(","); - t1 = $.Closure_functionCounter; - if (typeof t1 !== "number") - return t1.$add(); - $.Closure_functionCounter = t1 + 1; - $arguments += t1; - t1 = "return function(" + $arguments + "){return this."; - t2 = $.BoundClosure_selfFieldNameCache; - return new Function(t1 + (t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + "." + H.S(stubName) + "(" + $arguments + ");}")(); - }, - Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) { - var getSelf = H.BoundClosure_selfOf, - getReceiver = H.BoundClosure_receiverOf; - switch (isSuperCall ? -1 : arity) { + t1 = A.Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function); + return t1; + }, + Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf, + getInterceptor = A.BoundClosure_interceptorOf; + switch (needsDirectAccess ? -1 : arity) { case 0: - throw H.wrapException(new H.RuntimeError("Intercepted function with no arguments.")); + throw A.wrapException(new A.RuntimeError("Intercepted function with no arguments.")); case 1: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function() { - return s(this)[n](r(this)); + return interceptorOf(this)[entry](receiverOf(this)); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 2: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a) { - return s(this)[n](r(this), a); + return interceptorOf(this)[entry](receiverOf(this), a); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 3: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a, b) { - return s(this)[n](r(this), a, b); + return interceptorOf(this)[entry](receiverOf(this), a, b); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 4: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a, b, c) { - return s(this)[n](r(this), a, b, c); + return interceptorOf(this)[entry](receiverOf(this), a, b, c); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 5: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a, b, c, d) { - return s(this)[n](r(this), a, b, c, d); + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 6: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a, b, c, d, e) { - return s(this)[n](r(this), a, b, c, d, e); + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d, e); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); default: - return function(f, s, r, a) { + return function(f, interceptorOf, receiverOf) { return function() { - a = [r(this)]; + var a = [receiverOf(this)]; Array.prototype.push.apply(a, arguments); - return f.apply(s(this), a); + return f.apply(interceptorOf(this), a); }; - }($function, getSelf, getReceiver); - } - }, - Closure_forwardInterceptedCallTo: function(receiver, $function) { - var receiverField, stubName, arity, lookedUpFunction, t1, t2, $arguments, - selfField = $.BoundClosure_selfFieldNameCache; - if (selfField == null) - selfField = $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self"); - receiverField = $.BoundClosure_receiverFieldNameCache; - if (receiverField == null) - receiverField = $.BoundClosure_receiverFieldNameCache = H.BoundClosure_computeFieldNamed("receiver"); - stubName = $function.$stubName; + }($function, getInterceptor, getReceiver); + } + }, + Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess) { + var arity, t1; + if ($.BoundClosure__interceptorFieldNameCache == null) + $.BoundClosure__interceptorFieldNameCache = A.BoundClosure__computeFieldNamed("interceptor"); + if ($.BoundClosure__receiverFieldNameCache == null) + $.BoundClosure__receiverFieldNameCache = A.BoundClosure__computeFieldNamed("receiver"); arity = $function.length; - lookedUpFunction = receiver[stubName]; - t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; - t2 = !t1 || arity >= 28; - if (t2) - return H.Closure_cspForwardInterceptedCall(arity, !t1, stubName, $function); - if (arity === 1) { - t1 = "return function(){return this." + selfField + "." + H.S(stubName) + "(this." + receiverField + ");"; - t2 = $.Closure_functionCounter; - if (typeof t2 !== "number") - return t2.$add(); - $.Closure_functionCounter = t2 + 1; - return new Function(t1 + t2 + "}")(); - } - $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(","); - t1 = "return function(" + $arguments + "){return this." + selfField + "." + H.S(stubName) + "(this." + receiverField + ", " + $arguments + ");"; - t2 = $.Closure_functionCounter; - if (typeof t2 !== "number") - return t2.$add(); - $.Closure_functionCounter = t2 + 1; - return new Function(t1 + t2 + "}")(); - }, - closureFromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, $name) { - return H.Closure_fromTearOff(receiver, functions, applyTrampolineIndex, reflectionInfo, !!isStatic, !!isIntercepted, $name); - }, - BoundClosure_evalRecipe: function(closure, recipe) { - return H._Universe_evalInEnvironment(init.typeUniverse, H.instanceType(closure._self), recipe); - }, - BoundClosure_evalRecipeIntercepted: function(closure, recipe) { - return H._Universe_evalInEnvironment(init.typeUniverse, H.instanceType(closure._receiver), recipe); - }, - BoundClosure_selfOf: function(closure) { - return closure._self; - }, - BoundClosure_receiverOf: function(closure) { + t1 = A.Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function); + return t1; + }, + closureFromTearOff(parameters) { + return A.Closure_fromTearOff(parameters); + }, + BoundClosure_evalRecipe(closure, recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, A.instanceType(closure._receiver), recipe); + }, + BoundClosure_receiverOf(closure) { return closure._receiver; }, - BoundClosure_computeFieldNamed: function(fieldName) { + BoundClosure_interceptorOf(closure) { + return closure._interceptor; + }, + BoundClosure__computeFieldNamed(fieldName) { var t1, i, $name, - template = new H.BoundClosure("self", "target", "receiver", "name"), + template = new A.BoundClosure("receiver", "interceptor"), names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template), type$.nullable_Object); for (t1 = names.length, i = 0; i < t1; ++i) { $name = names[i]; if (template[$name] === fieldName) return $name; } - throw H.wrapException(P.ArgumentError$("Field name " + fieldName + " not found.")); - }, - boolConversionCheck: function(value) { - if (value == null) - H.assertThrow("boolean expression must not be null"); - return value; - }, - assertThrow: function(message) { - throw H.wrapException(new H._AssertionError(message)); + throw A.wrapException(A.ArgumentError$("Field name " + fieldName + " not found.", null)); }, - throwCyclicInit: function(staticName) { - throw H.wrapException(new P.CyclicInitializationError(staticName)); + throwCyclicInit(staticName) { + throw A.wrapException(new A._CyclicInitializationError(staticName)); }, - getIsolateAffinityTag: function($name) { + getIsolateAffinityTag($name) { return init.getIsolateTag($name); }, - throwLateInitializationError: function($name) { - return H.throwExpression(new H.LateError($name)); - }, - defineProperty: function(obj, property, value) { + defineProperty(obj, property, value) { Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); }, - lookupAndCacheInterceptor: function(obj) { + lookupAndCacheInterceptor(obj) { var interceptor, interceptorClass, altTag, mark, t1, - tag = H._asString($.getTagFunction.call$1(obj)), + tag = A._asString($.getTagFunction.call$1(obj)), record = $.dispatchRecordsForInstanceTags[tag]; if (record != null) { Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); @@ -940,7 +1148,7 @@ return interceptor; interceptorClass = init.interceptorsByTag[tag]; if (interceptorClass == null) { - altTag = H._asStringQ($.alternateTagFunction.call$2(obj, tag)); + altTag = A._asStringQ($.alternateTagFunction.call$2(obj, tag)); if (altTag != null) { record = $.dispatchRecordsForInstanceTags[altTag]; if (record != null) { @@ -959,7 +1167,7 @@ interceptor = interceptorClass.prototype; mark = tag[0]; if (mark === "!") { - record = H.makeLeafDispatchRecord(interceptor); + record = A.makeLeafDispatchRecord(interceptor); $.dispatchRecordsForInstanceTags[tag] = record; Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); return record.i; @@ -969,47 +1177,47 @@ return interceptor; } if (mark === "-") { - t1 = H.makeLeafDispatchRecord(interceptor); + t1 = A.makeLeafDispatchRecord(interceptor); Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); return t1.i; } if (mark === "+") - return H.patchInteriorProto(obj, interceptor); + return A.patchInteriorProto(obj, interceptor); if (mark === "*") - throw H.wrapException(P.UnimplementedError$(tag)); + throw A.wrapException(A.UnimplementedError$(tag)); if (init.leafTags[tag] === true) { - t1 = H.makeLeafDispatchRecord(interceptor); + t1 = A.makeLeafDispatchRecord(interceptor); Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); return t1.i; } else - return H.patchInteriorProto(obj, interceptor); + return A.patchInteriorProto(obj, interceptor); }, - patchInteriorProto: function(obj, interceptor) { + patchInteriorProto(obj, interceptor) { var proto = Object.getPrototypeOf(obj); Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); return interceptor; }, - makeLeafDispatchRecord: function(interceptor) { + makeLeafDispatchRecord(interceptor) { return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); }, - makeDefaultDispatchRecord: function(tag, interceptorClass, proto) { + makeDefaultDispatchRecord(tag, interceptorClass, proto) { var interceptor = interceptorClass.prototype; if (init.leafTags[tag] === true) - return H.makeLeafDispatchRecord(interceptor); + return A.makeLeafDispatchRecord(interceptor); else return J.makeDispatchRecord(interceptor, proto, null, null); }, - initNativeDispatch: function() { + initNativeDispatch() { if (true === $.initNativeDispatchFlag) return; $.initNativeDispatchFlag = true; - H.initNativeDispatchContinue(); + A.initNativeDispatchContinue(); }, - initNativeDispatchContinue: function() { + initNativeDispatchContinue() { var map, tags, fun, i, tag, proto, record, interceptorClass; $.dispatchRecordsForInstanceTags = Object.create(null); $.interceptorsForUncacheableTags = Object.create(null); - H.initHooks(); + A.initHooks(); map = init.interceptorsByTag; tags = Object.getOwnPropertyNames(map); if (typeof window != "undefined") { @@ -1020,7 +1228,7 @@ tag = tags[i]; proto = $.prototypeForTagFunction.call$1(tag); if (proto != null) { - record = H.makeDefaultDispatchRecord(tag, map[tag], proto); + record = A.makeDefaultDispatchRecord(tag, map[tag], proto); if (record != null) { Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); fun.prototype = proto; @@ -1040,15 +1248,15 @@ } } }, - initHooks: function() { + initHooks() { var transformers, i, transformer, getTag, getUnknownTag, prototypeForTag, - hooks = C.C_JS_CONST0(); - hooks = H.applyHooksTransformer(C.C_JS_CONST1, H.applyHooksTransformer(C.C_JS_CONST2, H.applyHooksTransformer(C.C_JS_CONST3, H.applyHooksTransformer(C.C_JS_CONST3, H.applyHooksTransformer(C.C_JS_CONST4, H.applyHooksTransformer(C.C_JS_CONST5, H.applyHooksTransformer(C.C_JS_CONST6(C.C_JS_CONST), hooks))))))); + hooks = B.C_JS_CONST0(); + hooks = A.applyHooksTransformer(B.C_JS_CONST1, A.applyHooksTransformer(B.C_JS_CONST2, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST4, A.applyHooksTransformer(B.C_JS_CONST5, A.applyHooksTransformer(B.C_JS_CONST6(B.C_JS_CONST), hooks))))))); if (typeof dartNativeDispatchHooksTransformer != "undefined") { transformers = dartNativeDispatchHooksTransformer; if (typeof transformers == "function") transformers = [transformers]; - if (transformers.constructor == Array) + if (Array.isArray(transformers)) for (i = 0; i < transformers.length; ++i) { transformer = transformers[i]; if (typeof transformer == "function") @@ -1058,14 +1266,25 @@ getTag = hooks.getTag; getUnknownTag = hooks.getUnknownTag; prototypeForTag = hooks.prototypeForTag; - $.getTagFunction = new H.initHooks_closure(getTag); - $.alternateTagFunction = new H.initHooks_closure0(getUnknownTag); - $.prototypeForTagFunction = new H.initHooks_closure1(prototypeForTag); + $.getTagFunction = new A.initHooks_closure(getTag); + $.alternateTagFunction = new A.initHooks_closure0(getUnknownTag); + $.prototypeForTagFunction = new A.initHooks_closure1(prototypeForTag); }, - applyHooksTransformer: function(transformer, hooks) { + applyHooksTransformer(transformer, hooks) { return transformer(hooks) || hooks; }, - quoteStringForRegExp: function(string) { + createRecordTypePredicate(shape, fieldRtis) { + var $length = fieldRtis.length, + $function = init.rttc["" + $length + ";" + shape]; + if ($function == null) + return null; + if ($length === 0) + return $function; + if ($length === $function.length) + return $function.apply(null, fieldRtis); + return $function(fieldRtis); + }, + quoteStringForRegExp(string) { if (/[[\]{}()*+?.\\^$|]/.test(string)) return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); return string; @@ -1079,9 +1298,7 @@ _._method = t4; _._receiver = t5; }, - NullError: function NullError(t0, t1) { - this.__js_helper$_message = t0; - this._method = t1; + NullError: function NullError() { }, JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) { this.__js_helper$_message = t0; @@ -1104,21 +1321,22 @@ }, Closure: function Closure() { }, + Closure0Args: function Closure0Args() { + }, + Closure2Args: function Closure2Args() { + }, TearOffClosure: function TearOffClosure() { }, StaticClosure: function StaticClosure() { }, - BoundClosure: function BoundClosure(t0, t1, t2, t3) { - var _ = this; - _._self = t0; - _.__js_helper$_target = t1; - _._receiver = t2; - _._name = t3; + BoundClosure: function BoundClosure(t0, t1) { + this._receiver = t0; + this._interceptor = t1; }, - RuntimeError: function RuntimeError(t0) { - this.message = t0; + _CyclicInitializationError: function _CyclicInitializationError(t0) { + this.variableName = t0; }, - _AssertionError: function _AssertionError(t0) { + RuntimeError: function RuntimeError(t0) { this.message = t0; }, JsLinkedHashMap: function JsLinkedHashMap(t0) { @@ -1157,18 +1375,26 @@ this.start = t0; this.pattern = t1; }, - _checkValidIndex: function(index, list, $length) { + _checkValidIndex(index, list, $length) { if (index >>> 0 !== index || index >= $length) - throw H.wrapException(H.diagnoseIndexError(list, index)); + throw A.wrapException(A.diagnoseIndexError(list, index)); + }, + NativeByteBuffer: function NativeByteBuffer() { }, NativeTypedData: function NativeTypedData() { }, + NativeByteData: function NativeByteData() { + }, NativeTypedArray: function NativeTypedArray() { }, NativeTypedArrayOfDouble: function NativeTypedArrayOfDouble() { }, NativeTypedArrayOfInt: function NativeTypedArrayOfInt() { }, + NativeFloat32List: function NativeFloat32List() { + }, + NativeFloat64List: function NativeFloat64List() { + }, NativeInt16List: function NativeInt16List() { }, NativeInt32List: function NativeInt32List() { @@ -1191,27 +1417,33 @@ }, _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { }, - Rti__getQuestionFromStar: function(universe, rti) { + Rti__getQuestionFromStar(universe, rti) { var question = rti._precomputed1; - return question == null ? rti._precomputed1 = H._Universe__lookupQuestionRti(universe, rti._primary, true) : question; + return question == null ? rti._precomputed1 = A._Universe__lookupQuestionRti(universe, rti._primary, true) : question; }, - Rti__getFutureFromFutureOr: function(universe, rti) { + Rti__getFutureFromFutureOr(universe, rti) { var future = rti._precomputed1; - return future == null ? rti._precomputed1 = H._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; + return future == null ? rti._precomputed1 = A._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; }, - Rti__isUnionOfFunctionType: function(rti) { + Rti__getIsSubtypeCache(rti) { + var probe = rti._isSubtypeCache; + if (probe != null) + return probe; + return rti._isSubtypeCache = new Map(); + }, + Rti__isUnionOfFunctionType(rti) { var kind = rti._kind; if (kind === 6 || kind === 7 || kind === 8) - return H.Rti__isUnionOfFunctionType(rti._primary); - return kind === 11 || kind === 12; + return A.Rti__isUnionOfFunctionType(rti._primary); + return kind === 12 || kind === 13; }, - Rti__getCanonicalRecipe: function(rti) { + Rti__getCanonicalRecipe(rti) { return rti._canonicalRecipe; }, - findType: function(recipe) { - return H._Universe_eval(init.typeUniverse, recipe, false); + findType(recipe) { + return A._Universe_eval(init.typeUniverse, recipe, false); }, - _substitute: function(universe, rti, typeArguments, depth) { + _substitute(universe, rti, typeArguments, depth) { var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, kind = rti._kind; switch (kind) { @@ -1223,54 +1455,54 @@ return rti; case 6: baseType = rti._primary; - substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth); + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); if (substitutedBaseType === baseType) return rti; - return H._Universe__lookupStarRti(universe, substitutedBaseType, true); + return A._Universe__lookupStarRti(universe, substitutedBaseType, true); case 7: baseType = rti._primary; - substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth); + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); if (substitutedBaseType === baseType) return rti; - return H._Universe__lookupQuestionRti(universe, substitutedBaseType, true); + return A._Universe__lookupQuestionRti(universe, substitutedBaseType, true); case 8: baseType = rti._primary; - substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth); + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); if (substitutedBaseType === baseType) return rti; - return H._Universe__lookupFutureOrRti(universe, substitutedBaseType, true); + return A._Universe__lookupFutureOrRti(universe, substitutedBaseType, true); case 9: interfaceTypeArguments = rti._rest; - substitutedInterfaceTypeArguments = H._substituteArray(universe, interfaceTypeArguments, typeArguments, depth); + substitutedInterfaceTypeArguments = A._substituteArray(universe, interfaceTypeArguments, typeArguments, depth); if (substitutedInterfaceTypeArguments === interfaceTypeArguments) return rti; - return H._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments); + return A._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments); case 10: base = rti._primary; - substitutedBase = H._substitute(universe, base, typeArguments, depth); + substitutedBase = A._substitute(universe, base, typeArguments, depth); $arguments = rti._rest; - substitutedArguments = H._substituteArray(universe, $arguments, typeArguments, depth); + substitutedArguments = A._substituteArray(universe, $arguments, typeArguments, depth); if (substitutedBase === base && substitutedArguments === $arguments) return rti; - return H._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); - case 11: + return A._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); + case 12: returnType = rti._primary; - substitutedReturnType = H._substitute(universe, returnType, typeArguments, depth); + substitutedReturnType = A._substitute(universe, returnType, typeArguments, depth); functionParameters = rti._rest; - substitutedFunctionParameters = H._substituteFunctionParameters(universe, functionParameters, typeArguments, depth); + substitutedFunctionParameters = A._substituteFunctionParameters(universe, functionParameters, typeArguments, depth); if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters) return rti; - return H._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters); - case 12: + return A._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters); + case 13: bounds = rti._rest; depth += bounds.length; - substitutedBounds = H._substituteArray(universe, bounds, typeArguments, depth); + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, depth); base = rti._primary; - substitutedBase = H._substitute(universe, base, typeArguments, depth); + substitutedBase = A._substitute(universe, base, typeArguments, depth); if (substitutedBounds === bounds && substitutedBase === base) return rti; - return H._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true); - case 13: + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true); + case 14: index = rti._primary; if (index < depth) return rti; @@ -1279,89 +1511,86 @@ return rti; return argument; default: - throw H.wrapException(P.AssertionError$("Attempted to substitute unexpected RTI kind " + kind)); + throw A.wrapException(A.AssertionError$("Attempted to substitute unexpected RTI kind " + kind)); } }, - _substituteArray: function(universe, rtiArray, typeArguments, depth) { + _substituteArray(universe, rtiArray, typeArguments, depth) { var changed, i, rti, substitutedRti, $length = rtiArray.length, - result = []; + result = A._Utils_newArrayOrEmpty($length); for (changed = false, i = 0; i < $length; ++i) { rti = rtiArray[i]; - substitutedRti = H._substitute(universe, rti, typeArguments, depth); + substitutedRti = A._substitute(universe, rti, typeArguments, depth); if (substitutedRti !== rti) changed = true; - result.push(substitutedRti); + result[i] = substitutedRti; } return changed ? result : rtiArray; }, - _substituteNamed: function(universe, namedArray, typeArguments, depth) { + _substituteNamed(universe, namedArray, typeArguments, depth) { var changed, i, t1, t2, rti, substitutedRti, $length = namedArray.length, - result = []; + result = A._Utils_newArrayOrEmpty($length); for (changed = false, i = 0; i < $length; i += 3) { t1 = namedArray[i]; t2 = namedArray[i + 1]; rti = namedArray[i + 2]; - substitutedRti = H._substitute(universe, rti, typeArguments, depth); + substitutedRti = A._substitute(universe, rti, typeArguments, depth); if (substitutedRti !== rti) changed = true; - result.push(t1); - result.push(t2); - result.push(substitutedRti); + result.splice(i, 3, t1, t2, substitutedRti); } return changed ? result : namedArray; }, - _substituteFunctionParameters: function(universe, functionParameters, typeArguments, depth) { + _substituteFunctionParameters(universe, functionParameters, typeArguments, depth) { var result, requiredPositional = functionParameters._requiredPositional, - substitutedRequiredPositional = H._substituteArray(universe, requiredPositional, typeArguments, depth), + substitutedRequiredPositional = A._substituteArray(universe, requiredPositional, typeArguments, depth), optionalPositional = functionParameters._optionalPositional, - substitutedOptionalPositional = H._substituteArray(universe, optionalPositional, typeArguments, depth), + substitutedOptionalPositional = A._substituteArray(universe, optionalPositional, typeArguments, depth), named = functionParameters._named, - substitutedNamed = H._substituteNamed(universe, named, typeArguments, depth); + substitutedNamed = A._substituteNamed(universe, named, typeArguments, depth); if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named) return functionParameters; - result = new H._FunctionParameters(); + result = new A._FunctionParameters(); result._requiredPositional = substitutedRequiredPositional; result._optionalPositional = substitutedOptionalPositional; result._named = substitutedNamed; return result; }, - setRuntimeTypeInfo: function(target, rti) { + _setArrayType(target, rti) { target[init.arrayRti] = rti; return target; }, - closureFunctionType: function(closure) { - var signature = closure.$signature; + closureFunctionType(closure) { + var t1, + signature = closure.$signature; if (signature != null) { if (typeof signature == "number") - return H.getTypeFromTypesTable(signature); - return closure.$signature(); + return A.getTypeFromTypesTable(signature); + t1 = closure.$signature(); + return t1; } return null; }, - instanceOrFunctionType: function(object, testRti) { + instanceOrFunctionType(object, testRti) { var rti; - if (H.Rti__isUnionOfFunctionType(testRti)) - if (object instanceof H.Closure) { - rti = H.closureFunctionType(object); + if (A.Rti__isUnionOfFunctionType(testRti)) + if (object instanceof A.Closure) { + rti = A.closureFunctionType(object); if (rti != null) return rti; } - return H.instanceType(object); + return A.instanceType(object); }, - instanceType: function(object) { - var rti; - if (object instanceof P.Object) { - rti = object.$ti; - return rti != null ? rti : H._instanceTypeFromConstructor(object); - } + instanceType(object) { + if (object instanceof A.Object) + return A._instanceType(object); if (Array.isArray(object)) - return H._arrayInstanceType(object); - return H._instanceTypeFromConstructor(J.getInterceptor$(object)); + return A._arrayInstanceType(object); + return A._instanceTypeFromConstructor(J.getInterceptor$(object)); }, - _arrayInstanceType: function(object) { + _arrayInstanceType(object) { var rti = object[init.arrayRti], defaultRti = type$.JSArray_dynamic; if (rti == null) @@ -1370,40 +1599,69 @@ return defaultRti; return rti; }, - _instanceType: function(object) { + _instanceType(object) { var rti = object.$ti; - return rti != null ? rti : H._instanceTypeFromConstructor(object); + return rti != null ? rti : A._instanceTypeFromConstructor(object); }, - _instanceTypeFromConstructor: function(instance) { + _instanceTypeFromConstructor(instance) { var $constructor = instance.constructor, probe = $constructor.$ccache; if (probe != null) return probe; - return H._instanceTypeFromConstructorMiss(instance, $constructor); + return A._instanceTypeFromConstructorMiss(instance, $constructor); }, - _instanceTypeFromConstructorMiss: function(instance, $constructor) { - var effectiveConstructor = instance instanceof H.Closure ? instance.__proto__.__proto__.constructor : $constructor, - rti = H._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name); + _instanceTypeFromConstructorMiss(instance, $constructor) { + var effectiveConstructor = instance instanceof A.Closure ? Object.getPrototypeOf(Object.getPrototypeOf(instance)).constructor : $constructor, + rti = A._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name); $constructor.$ccache = rti; return rti; }, - getTypeFromTypesTable: function(index) { - var table, type, rti; - H._asInt(index); - table = init.types; - type = table[index]; + getTypeFromTypesTable(index) { + var rti, + table = init.types, + type = table[index]; if (typeof type == "string") { - rti = H._Universe_eval(init.typeUniverse, type, false); + rti = A._Universe_eval(init.typeUniverse, type, false); table[index] = rti; return rti; } return type; }, - _installSpecializedIsTest: function(object) { - var t1, unstarred, isFn, testRti = this; + getRuntimeTypeOfDartObject(object) { + return A.createRuntimeType(A._instanceType(object)); + }, + _structuralTypeOf(object) { + var functionRti = object instanceof A.Closure ? A.closureFunctionType(object) : null; + if (functionRti != null) + return functionRti; + if (type$.TrustedGetRuntimeType._is(object)) + return J.get$runtimeType$(object)._rti; + if (Array.isArray(object)) + return A._arrayInstanceType(object); + return A.instanceType(object); + }, + createRuntimeType(rti) { + var t1 = rti._cachedRuntimeType; + return t1 == null ? rti._cachedRuntimeType = A._createRuntimeType(rti) : t1; + }, + _createRuntimeType(rti) { + var starErasedRti, t1, + s = rti._canonicalRecipe, + starErasedRecipe = s.replace(/\*/g, ""); + if (starErasedRecipe === s) + return rti._cachedRuntimeType = new A._Type(rti); + starErasedRti = A._Universe_eval(init.typeUniverse, starErasedRecipe, true); + t1 = starErasedRti._cachedRuntimeType; + return t1 == null ? starErasedRti._cachedRuntimeType = A._createRuntimeType(starErasedRti) : t1; + }, + typeLiteral(recipe) { + return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); + }, + _installSpecializedIsTest(object) { + var t1, unstarred, unstarredKind, isFn, $name, predicate, testRti = this; if (testRti === type$.Object) - return H._finishIsFn(testRti, object, H._isObject); - if (!H.isStrongTopType(testRti)) + return A._finishIsFn(testRti, object, A._isObject); + if (!A.isStrongTopType(testRti)) if (!(testRti === type$.legacy_Object)) t1 = false; else @@ -1411,37 +1669,48 @@ else t1 = true; if (t1) - return H._finishIsFn(testRti, object, H._isTop); + return A._finishIsFn(testRti, object, A._isTop); t1 = testRti._kind; + if (t1 === 7) + return A._finishIsFn(testRti, object, A._generalNullableIsTestImplementation); + if (t1 === 1) + return A._finishIsFn(testRti, object, A._isNever); unstarred = t1 === 6 ? testRti._primary : testRti; + unstarredKind = unstarred._kind; + if (unstarredKind === 8) + return A._finishIsFn(testRti, object, A._isFutureOr); if (unstarred === type$.int) - isFn = H._isInt; + isFn = A._isInt; else if (unstarred === type$.double || unstarred === type$.num) - isFn = H._isNum; + isFn = A._isNum; else if (unstarred === type$.String) - isFn = H._isString; + isFn = A._isString; else - isFn = unstarred === type$.bool ? H._isBool : null; + isFn = unstarred === type$.bool ? A._isBool : null; if (isFn != null) - return H._finishIsFn(testRti, object, isFn); - if (unstarred._kind === 9) { - t1 = unstarred._primary; - if (unstarred._rest.every(H.isTopType)) { - testRti._specializedTestResource = "$is" + t1; - return H._finishIsFn(testRti, object, H._isTestViaProperty); + return A._finishIsFn(testRti, object, isFn); + if (unstarredKind === 9) { + $name = unstarred._primary; + if (unstarred._rest.every(A.isTopType)) { + testRti._specializedTestResource = "$is" + $name; + if ($name === "List") + return A._finishIsFn(testRti, object, A._isListTestViaProperty); + return A._finishIsFn(testRti, object, A._isTestViaProperty); } - } else if (t1 === 7) - return H._finishIsFn(testRti, object, H._generalNullableIsTestImplementation); - return H._finishIsFn(testRti, object, H._generalIsTestImplementation); + } else if (unstarredKind === 11) { + predicate = A.createRecordTypePredicate(unstarred._primary, unstarred._rest); + return A._finishIsFn(testRti, object, predicate == null ? A._isNever : predicate); + } + return A._finishIsFn(testRti, object, A._generalIsTestImplementation); }, - _finishIsFn: function(testRti, object, isFn) { + _finishIsFn(testRti, object, isFn) { testRti._is = isFn; return testRti._is(object); }, - _installSpecializedAsCheck: function(object) { + _installSpecializedAsCheck(object) { var t1, testRti = this, - asFn = H._generalAsCheckImplementation; - if (!H.isStrongTopType(testRti)) + asFn = A._generalAsCheckImplementation; + if (!A.isStrongTopType(testRti)) if (!(testRti === type$.legacy_Object)) t1 = false; else @@ -1449,25 +1718,28 @@ else t1 = true; if (t1) - asFn = H._asTop; + asFn = A._asTop; else if (testRti === type$.Object) - asFn = H._asObject; + asFn = A._asObject; else { - t1 = H.isNullable(testRti); + t1 = A.isNullable(testRti); if (t1) - asFn = H._generalNullableAsCheckImplementation; + asFn = A._generalNullableAsCheckImplementation; } testRti._as = asFn; return testRti._as(object); }, - _nullIs: function(testRti) { + _nullIs(testRti) { var t1, kind = testRti._kind; - if (!H.isStrongTopType(testRti)) + if (!A.isStrongTopType(testRti)) if (!(testRti === type$.legacy_Object)) if (!(testRti === type$.legacy_Never)) if (kind !== 7) - t1 = kind === 8 && H._nullIs(testRti._primary) || testRti === type$.Null || testRti === type$.JSNull; + if (!(kind === 6 && A._nullIs(testRti._primary))) + t1 = kind === 8 && A._nullIs(testRti._primary) || testRti === type$.Null || testRti === type$.JSNull; + else + t1 = true; else t1 = true; else @@ -1478,210 +1750,248 @@ t1 = true; return t1; }, - _generalIsTestImplementation: function(object) { + _generalIsTestImplementation(object) { var testRti = this; if (object == null) - return H._nullIs(testRti); - return H._isSubtype(init.typeUniverse, H.instanceOrFunctionType(object, testRti), null, testRti, null); + return A._nullIs(testRti); + return A.isSubtype(init.typeUniverse, A.instanceOrFunctionType(object, testRti), testRti); }, - _generalNullableIsTestImplementation: function(object) { + _generalNullableIsTestImplementation(object) { if (object == null) return true; return this._primary._is(object); }, - _isTestViaProperty: function(object) { + _isTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A._nullIs(testRti); + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _isListTestViaProperty(object) { var tag, testRti = this; if (object == null) - return H._nullIs(testRti); + return A._nullIs(testRti); + if (typeof object != "object") + return false; + if (Array.isArray(object)) + return true; tag = testRti._specializedTestResource; - if (object instanceof P.Object) + if (object instanceof A.Object) return !!object[tag]; return !!J.getInterceptor$(object)[tag]; }, - _generalAsCheckImplementation: function(object) { + _generalAsCheckImplementation(object) { var t1, testRti = this; if (object == null) { - t1 = H.isNullable(testRti); + t1 = A.isNullable(testRti); if (t1) return object; } else if (testRti._is(object)) return object; - H._failedAsCheck(object, testRti); + A._failedAsCheck(object, testRti); }, - _generalNullableAsCheckImplementation: function(object) { + _generalNullableAsCheckImplementation(object) { var testRti = this; if (object == null) return object; else if (testRti._is(object)) return object; - H._failedAsCheck(object, testRti); + A._failedAsCheck(object, testRti); }, - _failedAsCheck: function(object, testRti) { - throw H.wrapException(H._TypeError$fromMessage(H._Error_compose(object, H.instanceOrFunctionType(object, testRti), H._rtiToString(testRti, null)))); + _failedAsCheck(object, testRti) { + throw A.wrapException(A._TypeError$fromMessage(A._Error_compose(object, A._rtiToString(testRti, null)))); }, - _Error_compose: function(object, objectRti, checkedTypeDescription) { - var objectDescription = P.Error_safeToString(object), - objectTypeDescription = H._rtiToString(objectRti == null ? H.instanceType(object) : objectRti, null); - return objectDescription + ": type '" + objectTypeDescription + "' is not a subtype of type '" + checkedTypeDescription + "'"; + _Error_compose(object, checkedTypeDescription) { + return A.Error_safeToString(object) + ": type '" + A._rtiToString(A._structuralTypeOf(object), null) + "' is not a subtype of type '" + checkedTypeDescription + "'"; }, - _TypeError$fromMessage: function(message) { - return new H._TypeError("TypeError: " + message); + _TypeError$fromMessage(message) { + return new A._TypeError("TypeError: " + message); }, - _TypeError__TypeError$forType: function(object, type) { - return new H._TypeError("TypeError: " + H._Error_compose(object, null, type)); + _TypeError__TypeError$forType(object, type) { + return new A._TypeError("TypeError: " + A._Error_compose(object, type)); }, - _isObject: function(object) { + _isFutureOr(object) { + var testRti = this, + unstarred = testRti._kind === 6 ? testRti._primary : testRti; + return unstarred._primary._is(object) || A.Rti__getFutureFromFutureOr(init.typeUniverse, unstarred)._is(object); + }, + _isObject(object) { return object != null; }, - _asObject: function(object) { + _asObject(object) { if (object != null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "Object")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "Object")); }, - _isTop: function(object) { + _isTop(object) { return true; }, - _asTop: function(object) { + _asTop(object) { return object; }, - _isBool: function(object) { + _isNever(object) { + return false; + }, + _isBool(object) { return true === object || false === object; }, - _asBool: function(object) { + _asBool(object) { if (true === object) return true; if (false === object) return false; - throw H.wrapException(H._TypeError__TypeError$forType(object, "bool")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); }, - _asBoolS: function(object) { + _asBoolS(object) { if (true === object) return true; if (false === object) return false; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "bool")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); }, - _asBoolQ: function(object) { + _asBoolQ(object) { if (true === object) return true; if (false === object) return false; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "bool?")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool?")); }, - _asDouble: function(object) { + _asDouble(object) { if (typeof object == "number") return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "double")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); }, - _asDoubleS: function(object) { + _asDoubleS(object) { if (typeof object == "number") return object; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "double")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); }, - _asDoubleQ: function(object) { + _asDoubleQ(object) { if (typeof object == "number") return object; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "double?")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "double?")); }, - _isInt: function(object) { + _isInt(object) { return typeof object == "number" && Math.floor(object) === object; }, - _asInt: function(object) { + _asInt(object) { if (typeof object == "number" && Math.floor(object) === object) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "int")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); }, - _asIntS: function(object) { + _asIntS(object) { if (typeof object == "number" && Math.floor(object) === object) return object; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "int")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); }, - _asIntQ: function(object) { + _asIntQ(object) { if (typeof object == "number" && Math.floor(object) === object) return object; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "int?")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "int?")); }, - _isNum: function(object) { + _isNum(object) { return typeof object == "number"; }, - _asNum: function(object) { + _asNum(object) { if (typeof object == "number") return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "num")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); }, - _asNumS: function(object) { + _asNumS(object) { if (typeof object == "number") return object; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "num")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); }, - _asNumQ: function(object) { + _asNumQ(object) { if (typeof object == "number") return object; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "num?")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "num?")); }, - _isString: function(object) { + _isString(object) { return typeof object == "string"; }, - _asString: function(object) { + _asString(object) { if (typeof object == "string") return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "String")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); }, - _asStringS: function(object) { + _asStringS(object) { if (typeof object == "string") return object; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "String")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); }, - _asStringQ: function(object) { + _asStringQ(object) { if (typeof object == "string") return object; if (object == null) return object; - throw H.wrapException(H._TypeError__TypeError$forType(object, "String?")); + throw A.wrapException(A._TypeError__TypeError$forType(object, "String?")); }, - _rtiArrayToString: function(array, genericContext) { + _rtiArrayToString(array, genericContext) { var s, sep, i; for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ") - s += sep + H._rtiToString(array[i], genericContext); + s += sep + A._rtiToString(array[i], genericContext); return s; }, - _functionRtiToString: function(functionType, genericContext, bounds) { + _recordRtiToString(recordType, genericContext) { + var fieldCount, names, namesIndex, s, comma, i, + partialShape = recordType._primary, + fields = recordType._rest; + if ("" === partialShape) + return "(" + A._rtiArrayToString(fields, genericContext) + ")"; + fieldCount = fields.length; + names = partialShape.split(","); + namesIndex = names.length - fieldCount; + for (s = "(", comma = "", i = 0; i < fieldCount; ++i, comma = ", ") { + s += comma; + if (namesIndex === 0) + s += "{"; + s += A._rtiToString(fields[i], genericContext); + if (namesIndex >= 0) + s += " " + names[namesIndex]; + ++namesIndex; + } + return s + "})"; + }, + _functionRtiToString(functionType, genericContext, bounds) { var boundsLength, outerContextLength, offset, i, t1, t2, typeParametersText, typeSep, t3, t4, boundRti, kind, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", "; if (bounds != null) { boundsLength = bounds.length; if (genericContext == null) { - genericContext = H.setRuntimeTypeInfo([], type$.JSArray_String); + genericContext = A._setArrayType([], type$.JSArray_String); outerContextLength = null; } else outerContextLength = genericContext.length; offset = genericContext.length; for (i = boundsLength; i > 0; --i) - C.JSArray_methods.add$1(genericContext, "T" + (offset + i)); + B.JSArray_methods.add$1(genericContext, "T" + (offset + i)); for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { - typeParametersText += typeSep; t3 = genericContext.length; t4 = t3 - 1 - i; - if (t4 < 0) - return H.ioore(genericContext, t4); - typeParametersText = C.JSString_methods.$add(typeParametersText, genericContext[t4]); + if (!(t4 >= 0)) + return A.ioore(genericContext, t4); + typeParametersText = B.JSString_methods.$add(typeParametersText + typeSep, genericContext[t4]); boundRti = bounds[i]; kind = boundRti._kind; if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) @@ -1692,7 +2002,7 @@ else t3 = true; if (!t3) - typeParametersText += " extends " + H._rtiToString(boundRti, genericContext); + typeParametersText += " extends " + A._rtiToString(boundRti, genericContext); } typeParametersText += ">"; } else { @@ -1707,13 +2017,13 @@ optionalPositionalLength = optionalPositional.length; named = parameters._named; namedLength = named.length; - returnTypeText = H._rtiToString(t1, genericContext); + returnTypeText = A._rtiToString(t1, genericContext); for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_) - argumentsText += sep + H._rtiToString(requiredPositional[i], genericContext); + argumentsText += sep + A._rtiToString(requiredPositional[i], genericContext); if (optionalPositionalLength > 0) { argumentsText += sep + "["; for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_) - argumentsText += sep + H._rtiToString(optionalPositional[i], genericContext); + argumentsText += sep + A._rtiToString(optionalPositional[i], genericContext); argumentsText += "]"; } if (namedLength > 0) { @@ -1722,7 +2032,7 @@ argumentsText += sep; if (named[i + 1]) argumentsText += "required "; - argumentsText += H._rtiToString(named[i + 2], genericContext) + " " + named[i]; + argumentsText += A._rtiToString(named[i + 2], genericContext) + " " + named[i]; } argumentsText += "}"; } @@ -1732,7 +2042,7 @@ } return typeParametersText + "(" + argumentsText + ") => " + returnTypeText; }, - _rtiToString: function(rti, genericContext) { + _rtiToString(rti, genericContext) { var s, questionArgument, argumentKind, $name, $arguments, t1, t2, kind = rti._kind; if (kind === 5) @@ -1746,83 +2056,85 @@ if (kind === 4) return "any"; if (kind === 6) { - s = H._rtiToString(rti._primary, genericContext); + s = A._rtiToString(rti._primary, genericContext); return s; } if (kind === 7) { questionArgument = rti._primary; - s = H._rtiToString(questionArgument, genericContext); + s = A._rtiToString(questionArgument, genericContext); argumentKind = questionArgument._kind; - return (argumentKind === 11 || argumentKind === 12 ? "(" + s + ")" : s) + "?"; + return (argumentKind === 12 || argumentKind === 13 ? "(" + s + ")" : s) + "?"; } if (kind === 8) - return "FutureOr<" + H._rtiToString(rti._primary, genericContext) + ">"; + return "FutureOr<" + A._rtiToString(rti._primary, genericContext) + ">"; if (kind === 9) { - $name = H._unminifyOrTag(rti._primary); + $name = A._unminifyOrTag(rti._primary); $arguments = rti._rest; - return $arguments.length !== 0 ? $name + ("<" + H._rtiArrayToString($arguments, genericContext) + ">") : $name; + return $arguments.length > 0 ? $name + ("<" + A._rtiArrayToString($arguments, genericContext) + ">") : $name; } if (kind === 11) - return H._functionRtiToString(rti, genericContext, null); + return A._recordRtiToString(rti, genericContext); if (kind === 12) - return H._functionRtiToString(rti._primary, genericContext, rti._rest); - if (kind === 13) { + return A._functionRtiToString(rti, genericContext, null); + if (kind === 13) + return A._functionRtiToString(rti._primary, genericContext, rti._rest); + if (kind === 14) { t1 = rti._primary; t2 = genericContext.length; t1 = t2 - 1 - t1; - if (t1 < 0 || t1 >= t2) - return H.ioore(genericContext, t1); + if (!(t1 >= 0 && t1 < t2)) + return A.ioore(genericContext, t1); return genericContext[t1]; } return "?"; }, - _unminifyOrTag: function(rawClassName) { - var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName); + _unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; if (preserved != null) return preserved; return rawClassName; }, - _Universe_findRule: function(universe, targetType) { + _Universe_findRule(universe, targetType) { var rule = universe.tR[targetType]; for (; typeof rule == "string";) rule = universe.tR[rule]; return rule; }, - _Universe_findErasedType: function(universe, cls) { + _Universe_findErasedType(universe, cls) { var $length, erased, $arguments, i, $interface, t1 = universe.eT, probe = t1[cls]; if (probe == null) - return H._Universe_eval(universe, cls, false); + return A._Universe_eval(universe, cls, false); else if (typeof probe == "number") { $length = probe; - erased = H._Universe__lookupTerminalRti(universe, 5, "#"); - $arguments = []; + erased = A._Universe__lookupTerminalRti(universe, 5, "#"); + $arguments = A._Utils_newArrayOrEmpty($length); for (i = 0; i < $length; ++i) - $arguments.push(erased); - $interface = H._Universe__lookupInterfaceRti(universe, cls, $arguments); + $arguments[i] = erased; + $interface = A._Universe__lookupInterfaceRti(universe, cls, $arguments); t1[cls] = $interface; return $interface; } else return probe; }, - _Universe_addRules: function(universe, rules) { - return H._Utils_objectAssign(universe.tR, rules); + _Universe_addRules(universe, rules) { + return A._Utils_objectAssign(universe.tR, rules); }, - _Universe_addErasedTypes: function(universe, types) { - return H._Utils_objectAssign(universe.eT, types); + _Universe_addErasedTypes(universe, types) { + return A._Utils_objectAssign(universe.eT, types); }, - _Universe_eval: function(universe, recipe, normalize) { + _Universe_eval(universe, recipe, normalize) { var rti, t1 = universe.eC, probe = t1.get(recipe); if (probe != null) return probe; - rti = H._Parser_parse(H._Parser_create(universe, null, recipe, normalize)); + rti = A._Parser_parse(A._Parser_create(universe, null, recipe, normalize)); t1.set(recipe, rti); return rti; }, - _Universe_evalInEnvironment: function(universe, environment, recipe) { + _Universe_evalInEnvironment(universe, environment, recipe) { var probe, rti, cache = environment._evalCache; if (cache == null) @@ -1830,11 +2142,11 @@ probe = cache.get(recipe); if (probe != null) return probe; - rti = H._Parser_parse(H._Parser_create(universe, environment, recipe, true)); + rti = A._Parser_parse(A._Parser_create(universe, environment, recipe, true)); cache.set(recipe, rti); return rti; }, - _Universe_bind: function(universe, environment, argumentsRti) { + _Universe_bind(universe, environment, argumentsRti) { var argumentsRecipe, probe, rti, cache = environment._bindCache; if (cache == null) @@ -1843,72 +2155,72 @@ probe = cache.get(argumentsRecipe); if (probe != null) return probe; - rti = H._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]); + rti = A._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]); cache.set(argumentsRecipe, rti); return rti; }, - _Universe__installTypeTests: function(universe, rti) { - rti._as = H._installSpecializedAsCheck; - rti._is = H._installSpecializedIsTest; + _Universe__installTypeTests(universe, rti) { + rti._as = A._installSpecializedAsCheck; + rti._is = A._installSpecializedIsTest; return rti; }, - _Universe__lookupTerminalRti: function(universe, kind, key) { + _Universe__lookupTerminalRti(universe, kind, key) { var rti, t1, probe = universe.eC.get(key); if (probe != null) return probe; - rti = new H.Rti(null, null); + rti = new A.Rti(null, null); rti._kind = kind; rti._canonicalRecipe = key; - t1 = H._Universe__installTypeTests(universe, rti); + t1 = A._Universe__installTypeTests(universe, rti); universe.eC.set(key, t1); return t1; }, - _Universe__lookupStarRti: function(universe, baseType, normalize) { + _Universe__lookupStarRti(universe, baseType, normalize) { var t1, key = baseType._canonicalRecipe + "*", probe = universe.eC.get(key); if (probe != null) return probe; - t1 = H._Universe__createStarRti(universe, baseType, key, normalize); + t1 = A._Universe__createStarRti(universe, baseType, key, normalize); universe.eC.set(key, t1); return t1; }, - _Universe__createStarRti: function(universe, baseType, key, normalize) { + _Universe__createStarRti(universe, baseType, key, normalize) { var baseKind, t1, rti; if (normalize) { baseKind = baseType._kind; - if (!H.isStrongTopType(baseType)) + if (!A.isStrongTopType(baseType)) t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6; else t1 = true; if (t1) return baseType; } - rti = new H.Rti(null, null); + rti = new A.Rti(null, null); rti._kind = 6; rti._primary = baseType; rti._canonicalRecipe = key; - return H._Universe__installTypeTests(universe, rti); + return A._Universe__installTypeTests(universe, rti); }, - _Universe__lookupQuestionRti: function(universe, baseType, normalize) { + _Universe__lookupQuestionRti(universe, baseType, normalize) { var t1, key = baseType._canonicalRecipe + "?", probe = universe.eC.get(key); if (probe != null) return probe; - t1 = H._Universe__createQuestionRti(universe, baseType, key, normalize); + t1 = A._Universe__createQuestionRti(universe, baseType, key, normalize); universe.eC.set(key, t1); return t1; }, - _Universe__createQuestionRti: function(universe, baseType, key, normalize) { + _Universe__createQuestionRti(universe, baseType, key, normalize) { var baseKind, t1, starArgument, rti; if (normalize) { baseKind = baseType._kind; - if (!H.isStrongTopType(baseType)) + if (!A.isStrongTopType(baseType)) if (!(baseType === type$.Null || baseType === type$.JSNull)) if (baseKind !== 7) - t1 = baseKind === 8 && H.isNullable(baseType._primary); + t1 = baseKind === 8 && A.isNullable(baseType._primary); else t1 = true; else @@ -1921,33 +2233,33 @@ return type$.Null; else if (baseKind === 6) { starArgument = baseType._primary; - if (starArgument._kind === 8 && H.isNullable(starArgument._primary)) + if (starArgument._kind === 8 && A.isNullable(starArgument._primary)) return starArgument; else - return H.Rti__getQuestionFromStar(universe, baseType); + return A.Rti__getQuestionFromStar(universe, baseType); } } - rti = new H.Rti(null, null); + rti = new A.Rti(null, null); rti._kind = 7; rti._primary = baseType; rti._canonicalRecipe = key; - return H._Universe__installTypeTests(universe, rti); + return A._Universe__installTypeTests(universe, rti); }, - _Universe__lookupFutureOrRti: function(universe, baseType, normalize) { + _Universe__lookupFutureOrRti(universe, baseType, normalize) { var t1, key = baseType._canonicalRecipe + "/", probe = universe.eC.get(key); if (probe != null) return probe; - t1 = H._Universe__createFutureOrRti(universe, baseType, key, normalize); + t1 = A._Universe__createFutureOrRti(universe, baseType, key, normalize); universe.eC.set(key, t1); return t1; }, - _Universe__createFutureOrRti: function(universe, baseType, key, normalize) { + _Universe__createFutureOrRti(universe, baseType, key, normalize) { var t1, t2, rti; if (normalize) { t1 = baseType._kind; - if (!H.isStrongTopType(baseType)) + if (!A.isStrongTopType(baseType)) if (!(baseType === type$.legacy_Object)) t2 = false; else @@ -1957,68 +2269,67 @@ if (t2 || baseType === type$.Object) return baseType; else if (t1 === 1) - return H._Universe__lookupInterfaceRti(universe, "Future", [baseType]); + return A._Universe__lookupInterfaceRti(universe, "Future", [baseType]); else if (baseType === type$.Null || baseType === type$.JSNull) return type$.nullable_Future_Null; } - rti = new H.Rti(null, null); + rti = new A.Rti(null, null); rti._kind = 8; rti._primary = baseType; rti._canonicalRecipe = key; - return H._Universe__installTypeTests(universe, rti); + return A._Universe__installTypeTests(universe, rti); }, - _Universe__lookupGenericFunctionParameterRti: function(universe, index) { + _Universe__lookupGenericFunctionParameterRti(universe, index) { var rti, t1, key = "" + index + "^", probe = universe.eC.get(key); if (probe != null) return probe; - rti = new H.Rti(null, null); - rti._kind = 13; + rti = new A.Rti(null, null); + rti._kind = 14; rti._primary = index; rti._canonicalRecipe = key; - t1 = H._Universe__installTypeTests(universe, rti); + t1 = A._Universe__installTypeTests(universe, rti); universe.eC.set(key, t1); return t1; }, - _Universe__canonicalRecipeJoin: function($arguments) { + _Universe__canonicalRecipeJoin($arguments) { var s, sep, i, $length = $arguments.length; for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",") s += sep + $arguments[i]._canonicalRecipe; return s; }, - _Universe__canonicalRecipeJoinNamed: function($arguments) { - var s, sep, i, t1, nameSep, s0, + _Universe__canonicalRecipeJoinNamed($arguments) { + var s, sep, i, t1, nameSep, $length = $arguments.length; for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") { t1 = $arguments[i]; nameSep = $arguments[i + 1] ? "!" : ":"; - s0 = $arguments[i + 2]._canonicalRecipe; - s += sep + t1 + nameSep + s0; + s += sep + t1 + nameSep + $arguments[i + 2]._canonicalRecipe; } return s; }, - _Universe__lookupInterfaceRti: function(universe, $name, $arguments) { + _Universe__lookupInterfaceRti(universe, $name, $arguments) { var probe, rti, t1, s = $name; - if ($arguments.length !== 0) - s += "<" + H._Universe__canonicalRecipeJoin($arguments) + ">"; + if ($arguments.length > 0) + s += "<" + A._Universe__canonicalRecipeJoin($arguments) + ">"; probe = universe.eC.get(s); if (probe != null) return probe; - rti = new H.Rti(null, null); + rti = new A.Rti(null, null); rti._kind = 9; rti._primary = $name; rti._rest = $arguments; if ($arguments.length > 0) rti._precomputed1 = $arguments[0]; rti._canonicalRecipe = s; - t1 = H._Universe__installTypeTests(universe, rti); + t1 = A._Universe__installTypeTests(universe, rti); universe.eC.set(s, t1); return t1; }, - _Universe__lookupBindingRti: function(universe, base, $arguments) { + _Universe__lookupBindingRti(universe, base, $arguments) { var newBase, newArguments, key, probe, rti, t1; if (base._kind === 10) { newBase = base._primary; @@ -2027,21 +2338,36 @@ newArguments = $arguments; newBase = base; } - key = newBase._canonicalRecipe + (";<" + H._Universe__canonicalRecipeJoin(newArguments) + ">"); + key = newBase._canonicalRecipe + (";<" + A._Universe__canonicalRecipeJoin(newArguments) + ">"); probe = universe.eC.get(key); if (probe != null) return probe; - rti = new H.Rti(null, null); + rti = new A.Rti(null, null); rti._kind = 10; rti._primary = newBase; rti._rest = newArguments; rti._canonicalRecipe = key; - t1 = H._Universe__installTypeTests(universe, rti); + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupRecordRti(universe, partialShapeTag, fields) { + var rti, t1, + key = "+" + (partialShapeTag + "(" + A._Universe__canonicalRecipeJoin(fields) + ")"), + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 11; + rti._primary = partialShapeTag; + rti._rest = fields; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); universe.eC.set(key, t1); return t1; }, - _Universe__lookupFunctionRti: function(universe, returnType, parameters) { - var sep, t1, key, probe, rti, + _Universe__lookupFunctionRti(universe, returnType, parameters) { + var sep, key, probe, rti, t1, s = returnType._canonicalRecipe, requiredPositional = parameters._requiredPositional, requiredPositionalLength = requiredPositional.length, @@ -2049,45 +2375,43 @@ optionalPositionalLength = optionalPositional.length, named = parameters._named, namedLength = named.length, - recipe = "(" + H._Universe__canonicalRecipeJoin(requiredPositional); + recipe = "(" + A._Universe__canonicalRecipeJoin(requiredPositional); if (optionalPositionalLength > 0) { sep = requiredPositionalLength > 0 ? "," : ""; - t1 = H._Universe__canonicalRecipeJoin(optionalPositional); - recipe += sep + "[" + t1 + "]"; + recipe += sep + "[" + A._Universe__canonicalRecipeJoin(optionalPositional) + "]"; } if (namedLength > 0) { sep = requiredPositionalLength > 0 ? "," : ""; - t1 = H._Universe__canonicalRecipeJoinNamed(named); - recipe += sep + "{" + t1 + "}"; + recipe += sep + "{" + A._Universe__canonicalRecipeJoinNamed(named) + "}"; } key = s + (recipe + ")"); probe = universe.eC.get(key); if (probe != null) return probe; - rti = new H.Rti(null, null); - rti._kind = 11; + rti = new A.Rti(null, null); + rti._kind = 12; rti._primary = returnType; rti._rest = parameters; rti._canonicalRecipe = key; - t1 = H._Universe__installTypeTests(universe, rti); + t1 = A._Universe__installTypeTests(universe, rti); universe.eC.set(key, t1); return t1; }, - _Universe__lookupGenericFunctionRti: function(universe, baseFunctionType, bounds, normalize) { + _Universe__lookupGenericFunctionRti(universe, baseFunctionType, bounds, normalize) { var t1, - key = baseFunctionType._canonicalRecipe + ("<" + H._Universe__canonicalRecipeJoin(bounds) + ">"), + key = baseFunctionType._canonicalRecipe + ("<" + A._Universe__canonicalRecipeJoin(bounds) + ">"), probe = universe.eC.get(key); if (probe != null) return probe; - t1 = H._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize); + t1 = A._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize); universe.eC.set(key, t1); return t1; }, - _Universe__createGenericFunctionRti: function(universe, baseFunctionType, bounds, key, normalize) { + _Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize) { var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti; if (normalize) { $length = bounds.length; - typeArguments = new Array($length); + typeArguments = A._Utils_newArrayOrEmpty($length); for (count = 0, i = 0; i < $length; ++i) { bound = bounds[i]; if (bound._kind === 1) { @@ -2096,33 +2420,33 @@ } } if (count > 0) { - substitutedBase = H._substitute(universe, baseFunctionType, typeArguments, 0); - substitutedBounds = H._substituteArray(universe, bounds, typeArguments, 0); - return H._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds); + substitutedBase = A._substitute(universe, baseFunctionType, typeArguments, 0); + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, 0); + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds); } } - rti = new H.Rti(null, null); - rti._kind = 12; + rti = new A.Rti(null, null); + rti._kind = 13; rti._primary = baseFunctionType; rti._rest = bounds; rti._canonicalRecipe = key; - return H._Universe__installTypeTests(universe, rti); + return A._Universe__installTypeTests(universe, rti); }, - _Parser_create: function(universe, environment, recipe, normalize) { + _Parser_create(universe, environment, recipe, normalize) { return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; }, - _Parser_parse: function(parser) { - var t2, i, ch, t3, array, head, base, parameters, optionalPositional, named, item, + _Parser_parse(parser) { + var t2, i, ch, t3, array, end, item, source = parser.r, t1 = parser.s; for (t2 = source.length, i = 0; i < t2;) { ch = source.charCodeAt(i); if (ch >= 48 && ch <= 57) - i = H._Parser_handleDigit(i + 1, ch, source, t1); - else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36) - i = H._Parser_handleIdentifier(parser, i, source, t1, false); + i = A._Parser_handleDigit(i + 1, ch, source, t1); + else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124) + i = A._Parser_handleIdentifier(parser, i, source, t1, false); else if (ch === 46) - i = H._Parser_handleIdentifier(parser, i, source, t1, true); + i = A._Parser_handleIdentifier(parser, i, source, t1, true); else { ++i; switch (ch) { @@ -2135,90 +2459,49 @@ t1.push(true); break; case 59: - t1.push(H._Parser_toType(parser.u, parser.e, t1.pop())); + t1.push(A._Parser_toType(parser.u, parser.e, t1.pop())); break; case 94: - t1.push(H._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); + t1.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); break; case 35: - t1.push(H._Universe__lookupTerminalRti(parser.u, 5, "#")); + t1.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); break; case 64: - t1.push(H._Universe__lookupTerminalRti(parser.u, 2, "@")); + t1.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); break; case 126: - t1.push(H._Universe__lookupTerminalRti(parser.u, 3, "~")); + t1.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); break; case 60: t1.push(parser.p); parser.p = t1.length; break; case 62: - t3 = parser.u; - array = t1.splice(parser.p); - H._Parser_toTypes(parser.u, parser.e, array); - parser.p = t1.pop(); - head = t1.pop(); - if (typeof head == "string") - t1.push(H._Universe__lookupInterfaceRti(t3, head, array)); - else { - base = H._Parser_toType(t3, parser.e, head); - switch (base._kind) { - case 11: - t1.push(H._Universe__lookupGenericFunctionRti(t3, base, array, parser.n)); - break; - default: - t1.push(H._Universe__lookupBindingRti(t3, base, array)); - break; - } - } + A._Parser_handleTypeArguments(parser, t1); break; case 38: - H._Parser_handleExtendedOperations(parser, t1); + A._Parser_handleExtendedOperations(parser, t1); break; case 42: t3 = parser.u; - t1.push(H._Universe__lookupStarRti(t3, H._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + t1.push(A._Universe__lookupStarRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); break; case 63: t3 = parser.u; - t1.push(H._Universe__lookupQuestionRti(t3, H._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + t1.push(A._Universe__lookupQuestionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); break; case 47: t3 = parser.u; - t1.push(H._Universe__lookupFutureOrRti(t3, H._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + t1.push(A._Universe__lookupFutureOrRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); break; case 40: + t1.push(-3); t1.push(parser.p); parser.p = t1.length; break; case 41: - t3 = parser.u; - parameters = new H._FunctionParameters(); - optionalPositional = t3.sEA; - named = t3.sEA; - head = t1.pop(); - if (typeof head == "number") - switch (head) { - case -1: - optionalPositional = t1.pop(); - break; - case -2: - named = t1.pop(); - break; - default: - t1.push(head); - break; - } - else - t1.push(head); - array = t1.splice(parser.p); - H._Parser_toTypes(parser.u, parser.e, array); - parser.p = t1.pop(); - parameters._requiredPositional = array; - parameters._optionalPositional = optionalPositional; - parameters._named = named; - t1.push(H._Universe__lookupFunctionRti(t3, H._Parser_toType(t3, parser.e, t1.pop()), parameters)); + A._Parser_handleArguments(parser, t1); break; case 91: t1.push(parser.p); @@ -2226,7 +2509,7 @@ break; case 93: array = t1.splice(parser.p); - H._Parser_toTypes(parser.u, parser.e, array); + A._Parser_toTypes(parser.u, parser.e, array); parser.p = t1.pop(); t1.push(array); t1.push(-1); @@ -2237,20 +2520,28 @@ break; case 125: array = t1.splice(parser.p); - H._Parser_toTypesNamed(parser.u, parser.e, array); + A._Parser_toTypesNamed(parser.u, parser.e, array); parser.p = t1.pop(); t1.push(array); t1.push(-2); break; + case 43: + end = source.indexOf("(", i); + t1.push(source.substring(i, end)); + t1.push(-4); + t1.push(parser.p); + parser.p = t1.length; + i = end + 1; + break; default: throw "Bad character " + ch; } } } item = t1.pop(); - return H._Parser_toType(parser.u, parser.e, item); + return A._Parser_toType(parser.u, parser.e, item); }, - _Parser_handleDigit: function(i, digit, source, stack) { + _Parser_handleDigit(i, digit, source, stack) { var t1, ch, value = digit - 48; for (t1 = source.length; i < t1; ++i) { @@ -2262,7 +2553,7 @@ stack.push(value); return i; }, - _Parser_handleIdentifier: function(parser, start, source, stack, hasPeriod) { + _Parser_handleIdentifier(parser, start, source, stack, hasPeriod) { var t1, ch, t2, string, environment, recipe, i = start + 1; for (t1 = source.length; i < t1; ++i) { @@ -2272,7 +2563,7 @@ break; hasPeriod = true; } else { - if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36)) + if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124)) t2 = ch >= 48 && ch <= 57; else t2 = true; @@ -2286,47 +2577,121 @@ environment = parser.e; if (environment._kind === 10) environment = environment._primary; - recipe = H._Universe_findRule(t1, environment._primary)[string]; + recipe = A._Universe_findRule(t1, environment._primary)[string]; if (recipe == null) - H.throwExpression('No "' + string + '" in "' + H.Rti__getCanonicalRecipe(environment) + '"'); - stack.push(H._Universe_evalInEnvironment(t1, environment, recipe)); + A.throwExpression('No "' + string + '" in "' + A.Rti__getCanonicalRecipe(environment) + '"'); + stack.push(A._Universe_evalInEnvironment(t1, environment, recipe)); } else stack.push(string); return i; }, - _Parser_handleExtendedOperations: function(parser, stack) { + _Parser_handleTypeArguments(parser, stack) { + var base, + t1 = parser.u, + $arguments = A._Parser_collectArray(parser, stack), + head = stack.pop(); + if (typeof head == "string") + stack.push(A._Universe__lookupInterfaceRti(t1, head, $arguments)); + else { + base = A._Parser_toType(t1, parser.e, head); + switch (base._kind) { + case 12: + stack.push(A._Universe__lookupGenericFunctionRti(t1, base, $arguments, parser.n)); + break; + default: + stack.push(A._Universe__lookupBindingRti(t1, base, $arguments)); + break; + } + } + }, + _Parser_handleArguments(parser, stack) { + var optionalPositional, named, requiredPositional, returnType, parameters, _null = null, + t1 = parser.u, + head = stack.pop(); + if (typeof head == "number") + switch (head) { + case -1: + optionalPositional = stack.pop(); + named = _null; + break; + case -2: + named = stack.pop(); + optionalPositional = _null; + break; + default: + stack.push(head); + named = _null; + optionalPositional = named; + break; + } + else { + stack.push(head); + named = _null; + optionalPositional = named; + } + requiredPositional = A._Parser_collectArray(parser, stack); + head = stack.pop(); + switch (head) { + case -3: + head = stack.pop(); + if (optionalPositional == null) + optionalPositional = t1.sEA; + if (named == null) + named = t1.sEA; + returnType = A._Parser_toType(t1, parser.e, head); + parameters = new A._FunctionParameters(); + parameters._requiredPositional = requiredPositional; + parameters._optionalPositional = optionalPositional; + parameters._named = named; + stack.push(A._Universe__lookupFunctionRti(t1, returnType, parameters)); + return; + case -4: + stack.push(A._Universe__lookupRecordRti(t1, stack.pop(), requiredPositional)); + return; + default: + throw A.wrapException(A.AssertionError$("Unexpected state under `()`: " + A.S(head))); + } + }, + _Parser_handleExtendedOperations(parser, stack) { var $top = stack.pop(); if (0 === $top) { - stack.push(H._Universe__lookupTerminalRti(parser.u, 1, "0&")); + stack.push(A._Universe__lookupTerminalRti(parser.u, 1, "0&")); return; } if (1 === $top) { - stack.push(H._Universe__lookupTerminalRti(parser.u, 4, "1&")); + stack.push(A._Universe__lookupTerminalRti(parser.u, 4, "1&")); return; } - throw H.wrapException(P.AssertionError$("Unexpected extended operation " + H.S($top))); + throw A.wrapException(A.AssertionError$("Unexpected extended operation " + A.S($top))); }, - _Parser_toType: function(universe, environment, item) { + _Parser_collectArray(parser, stack) { + var array = stack.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = stack.pop(); + return array; + }, + _Parser_toType(universe, environment, item) { if (typeof item == "string") - return H._Universe__lookupInterfaceRti(universe, item, universe.sEA); - else if (typeof item == "number") - return H._Parser_indexToType(universe, environment, item); - else + return A._Universe__lookupInterfaceRti(universe, item, universe.sEA); + else if (typeof item == "number") { + environment.toString; + return A._Parser_indexToType(universe, environment, item); + } else return item; }, - _Parser_toTypes: function(universe, environment, items) { + _Parser_toTypes(universe, environment, items) { var i, $length = items.length; for (i = 0; i < $length; ++i) - items[i] = H._Parser_toType(universe, environment, items[i]); + items[i] = A._Parser_toType(universe, environment, items[i]); }, - _Parser_toTypesNamed: function(universe, environment, items) { + _Parser_toTypesNamed(universe, environment, items) { var i, $length = items.length; for (i = 2; i < $length; i += 3) - items[i] = H._Parser_toType(universe, environment, items[i]); + items[i] = A._Parser_toType(universe, environment, items[i]); }, - _Parser_indexToType: function(universe, environment, index) { + _Parser_indexToType(universe, environment, index) { var typeArguments, len, kind = environment._kind; if (kind === 10) { @@ -2342,17 +2707,27 @@ } else if (index === 0) return environment; if (kind !== 9) - throw H.wrapException(P.AssertionError$("Indexed base must be an interface type")); + throw A.wrapException(A.AssertionError$("Indexed base must be an interface type")); typeArguments = environment._rest; if (index <= typeArguments.length) return typeArguments[index - 1]; - throw H.wrapException(P.AssertionError$("Bad index " + index + " for " + environment.toString$0(0))); + throw A.wrapException(A.AssertionError$("Bad index " + index + " for " + environment.toString$0(0))); + }, + isSubtype(universe, s, t) { + var result, + sCache = A.Rti__getIsSubtypeCache(s), + probe = sCache.get(t); + if (probe != null) + return probe; + result = A._isSubtype(universe, s, null, t, null); + sCache.set(t, result); + return result; }, - _isSubtype: function(universe, s, sEnv, t, tEnv) { - var t1, sKind, leftTypeVariable, tKind, sBounds, tBounds, sLength, i, sBound, tBound; + _isSubtype(universe, s, sEnv, t, tEnv) { + var t1, sKind, leftTypeVariable, tKind, t2, sBounds, tBounds, sLength, i, sBound, tBound; if (s === t) return true; - if (!H.isStrongTopType(t)) + if (!A.isStrongTopType(t)) if (!(t === type$.legacy_Object)) t1 = false; else @@ -2364,7 +2739,7 @@ sKind = s._kind; if (sKind === 4) return true; - if (H.isStrongTopType(s)) + if (A.isStrongTopType(s)) return false; if (s._kind !== 1) t1 = false; @@ -2372,57 +2747,60 @@ t1 = true; if (t1) return true; - leftTypeVariable = sKind === 13; + leftTypeVariable = sKind === 14; if (leftTypeVariable) - if (H._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv)) + if (A._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv)) return true; tKind = t._kind; t1 = s === type$.Null || s === type$.JSNull; if (t1) { if (tKind === 8) - return H._isSubtype(universe, s, sEnv, t._primary, tEnv); + return A._isSubtype(universe, s, sEnv, t._primary, tEnv); return t === type$.Null || t === type$.JSNull || tKind === 7 || tKind === 6; } if (t === type$.Object) { if (sKind === 8) - return H._isSubtype(universe, s._primary, sEnv, t, tEnv); + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); if (sKind === 6) - return H._isSubtype(universe, s._primary, sEnv, t, tEnv); + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); return sKind !== 7; } if (sKind === 6) - return H._isSubtype(universe, s._primary, sEnv, t, tEnv); + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); if (tKind === 6) { - t1 = H.Rti__getQuestionFromStar(universe, t); - return H._isSubtype(universe, s, sEnv, t1, tEnv); + t1 = A.Rti__getQuestionFromStar(universe, t); + return A._isSubtype(universe, s, sEnv, t1, tEnv); } if (sKind === 8) { - if (!H._isSubtype(universe, s._primary, sEnv, t, tEnv)) + if (!A._isSubtype(universe, s._primary, sEnv, t, tEnv)) return false; - return H._isSubtype(universe, H.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv); + return A._isSubtype(universe, A.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv); } if (sKind === 7) { - t1 = H._isSubtype(universe, type$.Null, sEnv, t, tEnv); - return t1 && H._isSubtype(universe, s._primary, sEnv, t, tEnv); + t1 = A._isSubtype(universe, type$.Null, sEnv, t, tEnv); + return t1 && A._isSubtype(universe, s._primary, sEnv, t, tEnv); } if (tKind === 8) { - if (H._isSubtype(universe, s, sEnv, t._primary, tEnv)) + if (A._isSubtype(universe, s, sEnv, t._primary, tEnv)) return true; - return H._isSubtype(universe, s, sEnv, H.Rti__getFutureFromFutureOr(universe, t), tEnv); + return A._isSubtype(universe, s, sEnv, A.Rti__getFutureFromFutureOr(universe, t), tEnv); } if (tKind === 7) { - t1 = H._isSubtype(universe, s, sEnv, type$.Null, tEnv); - return t1 || H._isSubtype(universe, s, sEnv, t._primary, tEnv); + t1 = A._isSubtype(universe, s, sEnv, type$.Null, tEnv); + return t1 || A._isSubtype(universe, s, sEnv, t._primary, tEnv); } if (leftTypeVariable) return false; - t1 = sKind !== 11; - if ((!t1 || sKind === 12) && t === type$.Function) + t1 = sKind !== 12; + if ((!t1 || sKind === 13) && t === type$.Function) return true; - if (tKind === 12) { + t2 = sKind === 11; + if (t2 && t === type$.Record) + return true; + if (tKind === 13) { if (s === type$.JavaScriptFunction) return true; - if (sKind !== 12) + if (sKind !== 13) return false; sBounds = s._rest; tBounds = t._rest; @@ -2434,28 +2812,30 @@ for (i = 0; i < sLength; ++i) { sBound = sBounds[i]; tBound = tBounds[i]; - if (!H._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !H._isSubtype(universe, tBound, tEnv, sBound, sEnv)) + if (!A._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !A._isSubtype(universe, tBound, tEnv, sBound, sEnv)) return false; } - return H._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv); + return A._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv); } - if (tKind === 11) { + if (tKind === 12) { if (s === type$.JavaScriptFunction) return true; if (t1) return false; - return H._isFunctionSubtype(universe, s, sEnv, t, tEnv); + return A._isFunctionSubtype(universe, s, sEnv, t, tEnv); } if (sKind === 9) { if (tKind !== 9) return false; - return H._isInterfaceSubtype(universe, s, sEnv, t, tEnv); + return A._isInterfaceSubtype(universe, s, sEnv, t, tEnv); } + if (t2 && tKind === 11) + return A._isRecordSubtype(universe, s, sEnv, t, tEnv); return false; }, - _isFunctionSubtype: function(universe, s, sEnv, t, tEnv) { + _isFunctionSubtype(universe, s, sEnv, t, tEnv) { var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired; - if (!H._isSubtype(universe, s._primary, sEnv, t._primary, tEnv)) + if (!A._isSubtype(universe, s._primary, sEnv, t._primary, tEnv)) return false; sParameters = s._rest; tParameters = t._rest; @@ -2474,17 +2854,17 @@ return false; for (i = 0; i < sRequiredPositionalLength; ++i) { t1 = sRequiredPositional[i]; - if (!H._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv)) + if (!A._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv)) return false; } for (i = 0; i < requiredPositionalDelta; ++i) { t1 = sOptionalPositional[i]; - if (!H._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv)) + if (!A._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv)) return false; } for (i = 0; i < tOptionalPositionalLength; ++i) { t1 = sOptionalPositional[requiredPositionalDelta + i]; - if (!H._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv)) + if (!A._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv)) return false; } sNamed = sParameters._named; @@ -2510,7 +2890,7 @@ if (sIsRequired && !t1) return false; t1 = sNamed[sIndex - 1]; - if (!H._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv)) + if (!A._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv)) return false; break; } @@ -2522,45 +2902,64 @@ } return true; }, - _isInterfaceSubtype: function(universe, s, sEnv, t, tEnv) { - var sArgs, tArgs, $length, i, t1, t2, rule, supertypeArgs, + _isInterfaceSubtype(universe, s, sEnv, t, tEnv) { + var rule, recipes, $length, supertypeArgs, i, t1, t2, sName = s._primary, tName = t._primary; - if (sName === tName) { - sArgs = s._rest; - tArgs = t._rest; - $length = sArgs.length; - for (i = 0; i < $length; ++i) { - t1 = sArgs[i]; - t2 = tArgs[i]; - if (!H._isSubtype(universe, t1, sEnv, t2, tEnv)) - return false; + for (; sName !== tName;) { + rule = universe.tR[sName]; + if (rule == null) + return false; + if (typeof rule == "string") { + sName = rule; + continue; } - return true; + recipes = rule[tName]; + if (recipes == null) + return false; + $length = recipes.length; + supertypeArgs = $length > 0 ? new Array($length) : init.typeUniverse.sEA; + for (i = 0; i < $length; ++i) + supertypeArgs[i] = A._Universe_evalInEnvironment(universe, s, recipes[i]); + return A._areArgumentsSubtypes(universe, supertypeArgs, null, sEnv, t._rest, tEnv); } - if (t === type$.Object) - return true; - rule = H._Universe_findRule(universe, sName); - if (rule == null) + t1 = s._rest; + t2 = t._rest; + return A._areArgumentsSubtypes(universe, t1, null, sEnv, t2, tEnv); + }, + _areArgumentsSubtypes(universe, sArgs, sVariances, sEnv, tArgs, tEnv) { + var i, t1, t2, + $length = sArgs.length; + for (i = 0; i < $length; ++i) { + t1 = sArgs[i]; + t2 = tArgs[i]; + if (!A._isSubtype(universe, t1, sEnv, t2, tEnv)) + return false; + } + return true; + }, + _isRecordSubtype(universe, s, sEnv, t, tEnv) { + var i, + sFields = s._rest, + tFields = t._rest, + sCount = sFields.length; + if (sCount !== tFields.length) return false; - supertypeArgs = rule[tName]; - if (supertypeArgs == null) + if (s._primary !== t._primary) return false; - $length = supertypeArgs.length; - tArgs = t._rest; - for (i = 0; i < $length; ++i) - if (!H._isSubtype(universe, H._Universe_evalInEnvironment(universe, s, supertypeArgs[i]), sEnv, tArgs[i], tEnv)) + for (i = 0; i < sCount; ++i) + if (!A._isSubtype(universe, sFields[i], sEnv, tFields[i], tEnv)) return false; return true; }, - isNullable: function(t) { + isNullable(t) { var t1, kind = t._kind; if (!(t === type$.Null || t === type$.JSNull)) - if (!H.isStrongTopType(t)) + if (!A.isStrongTopType(t)) if (kind !== 7) - if (!(kind === 6 && H.isNullable(t._primary))) - t1 = kind === 8 && H.isNullable(t._primary); + if (!(kind === 6 && A.isNullable(t._primary))) + t1 = kind === 8 && A.isNullable(t._primary); else t1 = true; else @@ -2571,9 +2970,9 @@ t1 = true; return t1; }, - isTopType: function(t) { + isTopType(t) { var t1; - if (!H.isStrongTopType(t)) + if (!A.isStrongTopType(t)) if (!(t === type$.legacy_Object)) t1 = false; else @@ -2582,11 +2981,11 @@ t1 = true; return t1; }, - isStrongTopType: function(t) { + isStrongTopType(t) { var kind = t._kind; return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object; }, - _Utils_objectAssign: function(o, other) { + _Utils_objectAssign(o, other) { var i, key, keys = Object.keys(other), $length = keys.length; @@ -2595,327 +2994,95 @@ o[key] = other[key]; } }, - Rti: function Rti(t0, t1) { - var _ = this; - _._as = t0; - _._is = t1; - _._cachedRuntimeType = _._specializedTestResource = _._precomputed1 = null; - _._kind = 0; - _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; - }, - _FunctionParameters: function _FunctionParameters() { - this._named = this._optionalPositional = this._requiredPositional = null; - }, - _Error: function _Error() { - }, - _TypeError: function _TypeError(t0) { - this.__rti$_message = t0; - }, - unmangleGlobalNameIfPreservedAnyways: function($name) { - return init.mangledGlobalNames[$name]; - } - }, - J = { - makeDispatchRecord: function(interceptor, proto, extension, indexability) { - return {i: interceptor, p: proto, e: extension, x: indexability}; - }, - getNativeInterceptor: function(object) { - var proto, objectProto, $constructor, interceptor, t1, - record = object[init.dispatchPropertyName]; - if (record == null) - if ($.initNativeDispatchFlag == null) { - H.initNativeDispatch(); - record = object[init.dispatchPropertyName]; - } - if (record != null) { - proto = record.p; - if (false === proto) - return record.i; - if (true === proto) - return object; - objectProto = Object.getPrototypeOf(object); - if (proto === objectProto) - return record.i; - if (record.e === objectProto) - throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.S(proto(object, record)))); - } - $constructor = object.constructor; - if ($constructor == null) - interceptor = null; - else { - t1 = $._JS_INTEROP_INTERCEPTOR_TAG; - if (t1 == null) - t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); - interceptor = $constructor[t1]; - } - if (interceptor != null) - return interceptor; - interceptor = H.lookupAndCacheInterceptor(object); - if (interceptor != null) - return interceptor; - if (typeof object == "function") - return C.JavaScriptFunction_methods; - proto = Object.getPrototypeOf(object); - if (proto == null) - return C.PlainJavaScriptObject_methods; - if (proto === Object.prototype) - return C.PlainJavaScriptObject_methods; - if (typeof $constructor == "function") { - t1 = $._JS_INTEROP_INTERCEPTOR_TAG; - if (t1 == null) - t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); - Object.defineProperty($constructor, t1, {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); - return C.UnknownJavaScriptObject_methods; - } - return C.UnknownJavaScriptObject_methods; - }, - JSArray_JSArray$fixed: function($length, $E) { - if ($length < 0 || $length > 4294967295) - throw H.wrapException(P.RangeError$range($length, 0, 4294967295, "length", null)); - return J.JSArray_JSArray$markFixed(new Array($length), $E); - }, - JSArray_JSArray$growable: function($length, $E) { - if ($length < 0) - throw H.wrapException(P.ArgumentError$("Length must be a non-negative integer: " + $length)); - return H.setRuntimeTypeInfo(new Array($length), $E._eval$1("JSArray<0>")); - }, - JSArray_JSArray$markFixed: function(allocation, $E) { - return J.JSArray_markFixedList(H.setRuntimeTypeInfo(allocation, $E._eval$1("JSArray<0>")), $E); - }, - JSArray_markFixedList: function(list, $T) { - list.fixed$length = Array; - return list; - }, - getInterceptor$: function(receiver) { - if (typeof receiver == "number") { - if (Math.floor(receiver) == receiver) - return J.JSInt.prototype; - return J.JSNumNotInt.prototype; - } - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return J.JSNull.prototype; - if (typeof receiver == "boolean") - return J.JSBool.prototype; - if (receiver.constructor == Array) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$asx: function(receiver) { - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (receiver.constructor == Array) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$ax: function(receiver) { - if (receiver == null) - return receiver; - if (receiver.constructor == Array) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$s: function(receiver) { - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (!(receiver instanceof P.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - getInterceptor$x: function(receiver) { - if (receiver == null) - return receiver; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$z: function(receiver) { - if (receiver == null) - return receiver; - if (!(receiver instanceof P.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - get$error$z: function(receiver) { - return J.getInterceptor$z(receiver).get$error(receiver); - }, - get$hashCode$: function(receiver) { - return J.getInterceptor$(receiver).get$hashCode(receiver); - }, - get$iterator$ax: function(receiver) { - return J.getInterceptor$ax(receiver).get$iterator(receiver); - }, - get$length$asx: function(receiver) { - return J.getInterceptor$asx(receiver).get$length(receiver); - }, - get$onClick$x: function(receiver) { - return J.getInterceptor$x(receiver).get$onClick(receiver); - }, - $eq$: function(receiver, a0) { - if (receiver == null) - return a0 == null; - if (typeof receiver != "object") - return a0 != null && receiver === a0; - return J.getInterceptor$(receiver).$eq(receiver, a0); - }, - $indexSet$ax: function(receiver, a0, a1) { - return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); - }, - _removeEventListener$3$x: function(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2); - }, - addEventListener$3$x: function(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); - }, - complete$1$z: function(receiver, a0) { - return J.getInterceptor$z(receiver).complete$1(receiver, a0); - }, - forEach$1$ax: function(receiver, a0) { - return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); - }, - matchAsPrefix$2$s: function(receiver, a0, a1) { - return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); - }, - toString$0$: function(receiver) { - return J.getInterceptor$(receiver).toString$0(receiver); - }, - Interceptor: function Interceptor() { - }, - JSBool: function JSBool() { - }, - JSNull: function JSNull() { - }, - JavaScriptObject: function JavaScriptObject() { - }, - PlainJavaScriptObject: function PlainJavaScriptObject() { - }, - UnknownJavaScriptObject: function UnknownJavaScriptObject() { - }, - JavaScriptFunction: function JavaScriptFunction() { - }, - JSArray: function JSArray(t0) { - this.$ti = t0; - }, - JSUnmodifiableArray: function JSUnmodifiableArray(t0) { - this.$ti = t0; + _Utils_newArrayOrEmpty($length) { + return $length > 0 ? new Array($length) : init.typeUniverse.sEA; }, - ArrayIterator: function ArrayIterator(t0, t1, t2) { + Rti: function Rti(t0, t1) { var _ = this; - _._iterable = t0; - _._length = t1; - _._index = 0; - _._current = null; - _.$ti = t2; + _._as = t0; + _._is = t1; + _._cachedRuntimeType = _._specializedTestResource = _._unsoundIsSubtypeCache = _._isSubtypeCache = _._precomputed1 = null; + _._kind = 0; + _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; }, - JSNumber: function JSNumber() { + _FunctionParameters: function _FunctionParameters() { + this._named = this._optionalPositional = this._requiredPositional = null; }, - JSInt: function JSInt() { + _Type: function _Type(t0) { + this._rti = t0; }, - JSNumNotInt: function JSNumNotInt() { + _Error: function _Error() { }, - JSString: function JSString() { - } - }, - P = { - _AsyncRun__initializeScheduleImmediate: function() { + _TypeError: function _TypeError(t0) { + this.__rti$_message = t0; + }, + _AsyncRun__initializeScheduleImmediate() { var div, span, t1 = {}; if (self.scheduleImmediate != null) - return P.async__AsyncRun__scheduleImmediateJsOverride$closure(); + return A.async__AsyncRun__scheduleImmediateJsOverride$closure(); if (self.MutationObserver != null && self.document != null) { div = self.document.createElement("div"); span = self.document.createElement("span"); t1.storedCallback = null; - new self.MutationObserver(H.convertDartClosureToJS(new P._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); - return new P._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); + new self.MutationObserver(A.convertDartClosureToJS(new A._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); + return new A._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); } else if (self.setImmediate != null) - return P.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); - return P.async__AsyncRun__scheduleImmediateWithTimer$closure(); + return A.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); + return A.async__AsyncRun__scheduleImmediateWithTimer$closure(); }, - _AsyncRun__scheduleImmediateJsOverride: function(callback) { - self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(type$.void_Function._as(callback)), 0)); + _AsyncRun__scheduleImmediateJsOverride(callback) { + self.scheduleImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateJsOverride_internalCallback(type$.void_Function._as(callback)), 0)); }, - _AsyncRun__scheduleImmediateWithSetImmediate: function(callback) { - self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(type$.void_Function._as(callback)), 0)); + _AsyncRun__scheduleImmediateWithSetImmediate(callback) { + self.setImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(type$.void_Function._as(callback)), 0)); }, - _AsyncRun__scheduleImmediateWithTimer: function(callback) { - P.Timer__createTimer(C.Duration_0, type$.void_Function._as(callback)); + _AsyncRun__scheduleImmediateWithTimer(callback) { + A.Timer__createTimer(B.Duration_0, type$.void_Function._as(callback)); }, - Timer__createTimer: function(duration, callback) { - var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000); - return P._TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); + Timer__createTimer(duration, callback) { + return A._TimerImpl$(duration._duration / 1000 | 0, callback); }, - _TimerImpl$: function(milliseconds, callback) { - var t1 = new P._TimerImpl(); + _TimerImpl$(milliseconds, callback) { + var t1 = new A._TimerImpl(); t1._TimerImpl$2(milliseconds, callback); return t1; }, - _makeAsyncAwaitCompleter: function($T) { - return new P._AsyncAwaitCompleter(new P._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>")); + _makeAsyncAwaitCompleter($T) { + return new A._AsyncAwaitCompleter(new A._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>")); }, - _asyncStartSync: function(bodyFunction, completer) { + _asyncStartSync(bodyFunction, completer) { bodyFunction.call$2(0, null); completer.isSync = true; return completer._future; }, - _asyncAwait: function(object, bodyFunction) { - P._awaitOnObject(object, bodyFunction); + _asyncAwait(object, bodyFunction) { + A._awaitOnObject(object, bodyFunction); }, - _asyncReturn: function(object, completer) { + _asyncReturn(object, completer) { completer.complete$1(0, object); }, - _asyncRethrow: function(object, completer) { - completer.completeError$2(H.unwrapException(object), H.getTraceFromException(object)); + _asyncRethrow(object, completer) { + completer.completeError$2(A.unwrapException(object), A.getTraceFromException(object)); }, - _awaitOnObject: function(object, bodyFunction) { + _awaitOnObject(object, bodyFunction) { var t1, future, - thenCallback = new P._awaitOnObject_closure(bodyFunction), - errorCallback = new P._awaitOnObject_closure0(bodyFunction); - if (object instanceof P._Future) + thenCallback = new A._awaitOnObject_closure(bodyFunction), + errorCallback = new A._awaitOnObject_closure0(bodyFunction); + if (object instanceof A._Future) object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic); else { t1 = type$.dynamic; - if (type$.Future_dynamic._is(object)) + if (object instanceof A._Future) object.then$1$2$onError(thenCallback, errorCallback, t1); else { - future = new P._Future($.Zone__current, type$._Future_dynamic); - future._state = 4; + future = new A._Future($.Zone__current, type$._Future_dynamic); + future._state = 8; future._resultOrListeners = object; future._thenAwait$1$2(thenCallback, errorCallback, t1); } } }, - _wrapJsFunctionForAsync: function($function) { + _wrapJsFunctionForAsync($function) { var $protected = function(fn, ERROR) { return function(errorCode, result) { while (true) @@ -2928,38 +3095,35 @@ } }; }($function, 1); - return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); + return $.Zone__current.registerBinaryCallback$3$1(new A._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); }, - AsyncError$: function(error, stackTrace) { - var t1 = H.checkNotNullable(error, "error", type$.Object); - return new P.AsyncError(t1, stackTrace == null ? P.AsyncError_defaultStackTrace(error) : stackTrace); + AsyncError$(error, stackTrace) { + var t1 = A.checkNotNullable(error, "error", type$.Object); + return new A.AsyncError(t1, stackTrace == null ? A.AsyncError_defaultStackTrace(error) : stackTrace); }, - AsyncError_defaultStackTrace: function(error) { + AsyncError_defaultStackTrace(error) { var stackTrace; if (type$.Error._is(error)) { stackTrace = error.get$stackTrace(); if (stackTrace != null) return stackTrace; } - return C._StringStackTrace_3uE; + return B._StringStackTrace_3uE; }, - Future_Future$sync: function(computation, $T) { - var result, error, stackTrace, future, replacement, t1, t2, exception; + Future_Future$sync(computation, $T) { + var result, error, stackTrace, future, replacement, t1, exception; try { result = computation.call$0(); if ($T._eval$1("Future<0>")._is(result)) return result; else { - t1 = $T._as(result); - t2 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")); - t2._state = 4; - t2._resultOrListeners = t1; - return t2; + t1 = A._Future$value(result, $T); + return t1; } } catch (exception) { - error = H.unwrapException(exception); - stackTrace = H.getTraceFromException(exception); - future = new P._Future($.Zone__current, $T._eval$1("_Future<0>")); + error = A.unwrapException(exception); + stackTrace = A.getTraceFromException(exception); + future = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); type$.Object._as(error); type$.nullable_StackTrace._as(stackTrace); replacement = null; @@ -2970,41 +3134,68 @@ return future; } }, - Future_Future$value: function(value, $T) { + Future_Future$value(value, $T) { var t1 = value == null ? $T._as(value) : value, - t2 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")); + t2 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); t2._asyncComplete$1(t1); return t2; }, - Completer_Completer: function($T) { - return new P._AsyncCompleter(new P._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncCompleter<0>")); + Completer_Completer($T) { + return new A._AsyncCompleter(new A._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncCompleter<0>")); + }, + _Future$value(value, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + $T._as(value); + t1._state = 8; + t1._resultOrListeners = value; + return t1; }, - _Future__chainCoreFuture: function(source, target) { + _Future__chainCoreFutureSync(source, target) { var t1, t2, listeners; - for (t1 = type$._Future_dynamic; t2 = source._state, t2 === 2;) + for (t1 = type$._Future_dynamic; t2 = source._state, (t2 & 4) !== 0;) source = t1._as(source._resultOrListeners); - if (t2 >= 4) { + if ((t2 & 24) !== 0) { listeners = target._removeListeners$0(); - target._state = source._state; - target._resultOrListeners = source._resultOrListeners; - P._Future__propagateToListeners(target, listeners); + target._cloneResult$1(source); + A._Future__propagateToListeners(target, listeners); } else { listeners = type$.nullable__FutureListener_dynamic_dynamic._as(target._resultOrListeners); - target._state = 2; - target._resultOrListeners = source; + target._setChained$1(source); source._prependListeners$1(listeners); } }, - _Future__propagateToListeners: function(source, listeners) { - var t2, t3, t4, _box_0, hasError, asyncError, nextListener, nextListener0, t5, sourceResult, t6, t7, zone, oldZone, result, current, _null = null, _box_1 = {}, + _Future__chainCoreFutureAsync(source, target) { + var t2, t3, listeners, _box_0 = {}, + t1 = _box_0.source = source; + for (t2 = type$._Future_dynamic; t3 = t1._state, (t3 & 4) !== 0; t1 = source) { + source = t2._as(t1._resultOrListeners); + _box_0.source = source; + } + if ((t3 & 24) === 0) { + listeners = type$.nullable__FutureListener_dynamic_dynamic._as(target._resultOrListeners); + target._setChained$1(t1); + _box_0.source._prependListeners$1(listeners); + return; + } + if ((t3 & 16) === 0 && target._resultOrListeners == null) { + target._cloneResult$1(t1); + return; + } + target._state ^= 2; + A._rootScheduleMicrotask(null, null, target._zone, type$.void_Function._as(new A._Future__chainCoreFutureAsync_closure(_box_0, target))); + }, + _Future__propagateToListeners(source, listeners) { + var t2, t3, t4, _box_0, t5, t6, hasError, asyncError, nextListener, nextListener0, sourceResult, t7, zone, oldZone, result, current, _box_1 = {}, t1 = _box_1.source = source; for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic, t4 = type$.Future_dynamic; true;) { _box_0 = {}; - hasError = t1._state === 8; + t5 = t1._state; + t6 = (t5 & 16) === 0; + hasError = !t6; if (listeners == null) { - if (hasError) { + if (hasError && (t5 & 1) === 0) { asyncError = t2._as(t1._resultOrListeners); - P._rootHandleUncaughtError(_null, _null, t1._zone, asyncError.error, asyncError.stackTrace); + A._rootHandleError(asyncError.error, asyncError.stackTrace); } return; } @@ -3012,7 +3203,7 @@ nextListener = listeners._nextListener; for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) { t1._nextListener = null; - P._Future__propagateToListeners(_box_1.source, t1); + A._Future__propagateToListeners(_box_1.source, t1); _box_0.listener = nextListener; nextListener0 = nextListener._nextListener; } @@ -3020,7 +3211,6 @@ sourceResult = t5._resultOrListeners; _box_0.listenerHasError = hasError; _box_0.listenerValueOrError = sourceResult; - t6 = !hasError; if (t6) { t7 = t1.state; t7 = (t7 & 1) !== 0 || (t7 & 15) === 8; @@ -3029,32 +3219,32 @@ if (t7) { zone = t1.result._zone; if (hasError) { - t7 = t5._zone === zone; - t7 = !(t7 || t7); + t5 = t5._zone === zone; + t5 = !(t5 || t5); } else - t7 = false; - if (t7) { + t5 = false; + if (t5) { t2._as(sourceResult); - P._rootHandleUncaughtError(_null, _null, t5._zone, sourceResult.error, sourceResult.stackTrace); + A._rootHandleError(sourceResult.error, sourceResult.stackTrace); return; } oldZone = $.Zone__current; if (oldZone !== zone) $.Zone__current = zone; else - oldZone = _null; + oldZone = null; t1 = t1.state; if ((t1 & 15) === 8) - new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0(); + new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0(); else if (t6) { if ((t1 & 1) !== 0) - new P._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0(); + new A._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0(); } else if ((t1 & 2) !== 0) - new P._Future__propagateToListeners_handleError(_box_1, _box_0).call$0(); + new A._Future__propagateToListeners_handleError(_box_1, _box_0).call$0(); if (oldZone != null) $.Zone__current = oldZone; t1 = _box_0.listenerValueOrError; - if (t4._is(t1)) { + if (t1 instanceof A._Future) { t5 = _box_0.listener.$ti; t5 = t5._eval$1("Future<2>")._is(t1) || !t5._rest[1]._is(t1); } else @@ -3062,16 +3252,16 @@ if (t5) { t4._as(t1); result = _box_0.listener.result; - if (t1._state >= 4) { + if ((t1._state & 24) !== 0) { current = t3._as(result._resultOrListeners); result._resultOrListeners = null; listeners = result._reverseListeners$1(current); - result._state = t1._state; + result._state = t1._state & 30 | result._state & 1; result._resultOrListeners = t1._resultOrListeners; _box_1.source = t1; continue; } else - P._Future__chainCoreFuture(t1, result); + A._Future__chainCoreFutureSync(t1, result); return; } } @@ -3083,27 +3273,27 @@ t5 = _box_0.listenerValueOrError; if (!t1) { result.$ti._precomputed1._as(t5); - result._state = 4; + result._state = 8; result._resultOrListeners = t5; } else { t2._as(t5); - result._state = 8; + result._state = result._state & 1 | 16; result._resultOrListeners = t5; } _box_1.source = result; t1 = result; } }, - _registerErrorHandler: function(errorHandler, zone) { + _registerErrorHandler(errorHandler, zone) { var t1; if (type$.dynamic_Function_Object_StackTrace._is(errorHandler)) return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace); t1 = type$.dynamic_Function_Object; if (t1._is(errorHandler)) return t1._as(errorHandler); - throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a valid result")); + throw A.wrapException(A.ArgumentError$value(errorHandler, "onError", string$.Error_)); }, - _microtaskLoop: function() { + _microtaskLoop() { var entry, next; for (entry = $._nextCallback; entry != null; entry = $._nextCallback) { $._lastPriorityCallback = null; @@ -3114,36 +3304,36 @@ entry.callback.call$0(); } }, - _startMicrotaskLoop: function() { + _startMicrotaskLoop() { $._isInCallbackLoop = true; try { - P._microtaskLoop(); + A._microtaskLoop(); } finally { $._lastPriorityCallback = null; $._isInCallbackLoop = false; if ($._nextCallback != null) - $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); } }, - _scheduleAsyncCallback: function(callback) { - var newEntry = new P._AsyncCallbackEntry(callback), + _scheduleAsyncCallback(callback) { + var newEntry = new A._AsyncCallbackEntry(callback), lastCallback = $._lastCallback; if (lastCallback == null) { $._nextCallback = $._lastCallback = newEntry; if (!$._isInCallbackLoop) - $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); } else $._lastCallback = lastCallback.next = newEntry; }, - _schedulePriorityAsyncCallback: function(callback) { + _schedulePriorityAsyncCallback(callback) { var entry, lastPriorityCallback, next, t1 = $._nextCallback; if (t1 == null) { - P._scheduleAsyncCallback(callback); + A._scheduleAsyncCallback(callback); $._lastPriorityCallback = $._lastCallback; return; } - entry = new P._AsyncCallbackEntry(callback); + entry = new A._AsyncCallbackEntry(callback); lastPriorityCallback = $._lastPriorityCallback; if (lastPriorityCallback == null) { entry.next = t1; @@ -3156,66 +3346,69 @@ $._lastCallback = entry; } }, - scheduleMicrotask: function(callback) { - var _null = null, + scheduleMicrotask(callback) { + var t1, _null = null, currentZone = $.Zone__current; - if (C.C__RootZone === currentZone) { - P._rootScheduleMicrotask(_null, _null, C.C__RootZone, callback); + if (B.C__RootZone === currentZone) { + A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback); return; } - P._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(currentZone.bindCallbackGuarded$1(callback))); + t1 = false; + if (t1) { + A._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(callback)); + return; + } + A._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(currentZone.bindCallbackGuarded$1(callback))); }, - StreamIterator_StreamIterator: function(stream, $T) { - H.checkNotNullable(stream, "stream", type$.Object); - return new P._StreamIterator($T._eval$1("_StreamIterator<0>")); + StreamIterator_StreamIterator(stream, $T) { + A.checkNotNullable(stream, "stream", type$.Object); + return new A._StreamIterator($T._eval$1("_StreamIterator<0>")); }, - StreamController_StreamController: function($T) { + StreamController_StreamController($T) { var _null = null; - return new P._AsyncStreamController(_null, _null, _null, _null, $T._eval$1("_AsyncStreamController<0>")); + return new A._AsyncStreamController(_null, _null, _null, _null, $T._eval$1("_AsyncStreamController<0>")); }, - _runGuarded: function(notificationHandler) { + _runGuarded(notificationHandler) { return; }, - _BufferingStreamSubscription__registerDataHandler: function(zone, handleData, $T) { - var t1 = handleData == null ? P.async___nullDataHandler$closure() : handleData; + _BufferingStreamSubscription__registerDataHandler(zone, handleData, $T) { + var t1 = handleData == null ? A.async___nullDataHandler$closure() : handleData; return type$.$env_1_1_void._bind$1($T)._eval$1("1(2)")._as(t1); }, - _BufferingStreamSubscription__registerErrorHandler: function(zone, handleError) { + _BufferingStreamSubscription__registerErrorHandler(zone, handleError) { if (handleError == null) - handleError = P.async___nullErrorHandler$closure(); + handleError = A.async___nullErrorHandler$closure(); if (type$.void_Function_Object_StackTrace._is(handleError)) return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace); if (type$.void_Function_Object._is(handleError)) return type$.dynamic_Function_Object._as(handleError); - throw H.wrapException(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")); + throw A.wrapException(A.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.", null)); }, - _nullDataHandler: function(value) { + _nullDataHandler(value) { }, - _nullErrorHandler: function(error, stackTrace) { - type$.Object._as(error); - type$.StackTrace._as(stackTrace); - P._rootHandleUncaughtError(null, null, $.Zone__current, error, stackTrace); + _nullErrorHandler(error, stackTrace) { + A._rootHandleError(type$.Object._as(error), type$.StackTrace._as(stackTrace)); }, - _nullDoneHandler: function() { + _nullDoneHandler() { }, - _cancelAndValue: function(subscription, future, value) { + _cancelAndValue(subscription, future, value) { var cancelFuture = subscription.cancel$0(), t1 = $.$get$Future__nullFuture(); if (cancelFuture !== t1) - cancelFuture.whenComplete$1(new P._cancelAndValue_closure(future, value)); + cancelFuture.whenComplete$1(new A._cancelAndValue_closure(future, value)); else future._complete$1(value); }, - Timer_Timer: function(duration, callback) { + Timer_Timer(duration, callback) { var t1 = $.Zone__current; - if (t1 === C.C__RootZone) - return P.Timer__createTimer(duration, type$.void_Function._as(callback)); - return P.Timer__createTimer(duration, type$.void_Function._as(t1.bindCallbackGuarded$1(callback))); + if (t1 === B.C__RootZone) + return A.Timer__createTimer(duration, type$.void_Function._as(callback)); + return A.Timer__createTimer(duration, type$.void_Function._as(t1.bindCallbackGuarded$1(callback))); }, - _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { - P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(error, stackTrace)); + _rootHandleError(error, stackTrace) { + A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace)); }, - _rootRun: function($self, $parent, zone, f, $R) { + _rootRun($self, $parent, zone, f, $R) { var old, t1 = $.Zone__current; if (t1 === zone) @@ -3229,7 +3422,7 @@ $.Zone__current = old; } }, - _rootRunUnary: function($self, $parent, zone, f, arg, $R, $T) { + _rootRunUnary($self, $parent, zone, f, arg, $R, $T) { var old, t1 = $.Zone__current; if (t1 === zone) @@ -3243,7 +3436,7 @@ $.Zone__current = old; } }, - _rootRunBinary: function($self, $parent, zone, f, arg1, arg2, $R, T1, T2) { + _rootRunBinary($self, $parent, zone, f, arg1, arg2, $R, T1, T2) { var old, t1 = $.Zone__current; if (t1 === zone) @@ -3257,11 +3450,11 @@ $.Zone__current = old; } }, - _rootScheduleMicrotask: function($self, $parent, zone, f) { + _rootScheduleMicrotask($self, $parent, zone, f) { type$.void_Function._as(f); - if (C.C__RootZone !== zone) + if (B.C__RootZone !== zone) f = zone.bindCallbackGuarded$1(f); - P._scheduleAsyncCallback(f); + A._scheduleAsyncCallback(f); }, _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { this._box_0 = t0; @@ -3347,11 +3540,11 @@ this.e = t1; this.s = t2; }, - _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) { - this.$this = t0; - this.value = t1; + _Future__chainCoreFutureAsync_closure: function _Future__chainCoreFutureAsync_closure(t0, t1) { + this._box_0 = t0; + this.target = t1; }, - _Future__chainFuture_closure: function _Future__chainFuture_closure(t0, t1) { + _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) { this.$this = t0; this.value = t1; }, @@ -3398,10 +3591,6 @@ this.subscription = t1; this.future = t2; }, - StreamSubscription: function StreamSubscription() { - }, - StreamTransformerBase: function StreamTransformerBase() { - }, _StreamController: function _StreamController() { }, _StreamController__subscribe_closure: function _StreamController__subscribe_closure(t0) { @@ -3481,18 +3670,16 @@ }, _DelayedDone: function _DelayedDone() { }, - _PendingEvents: function _PendingEvents() { + _PendingEvents: function _PendingEvents(t0) { + var _ = this; + _._state = 0; + _.lastPendingEvent = _.firstPendingEvent = null; + _.$ti = t0; }, _PendingEvents_schedule_closure: function _PendingEvents_schedule_closure(t0, t1) { this.$this = t0; this.dispatch = t1; }, - _StreamImplEvents: function _StreamImplEvents(t0) { - var _ = this; - _.lastPendingEvent = _.firstPendingEvent = null; - _._state = 0; - _.$ti = t0; - }, _StreamIterator: function _StreamIterator(t0) { this.$ti = t0; }, @@ -3502,7 +3689,7 @@ }, _Zone: function _Zone() { }, - _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) { + _rootHandleError_closure: function _rootHandleError_closure(t0, t1) { this.error = t0; this.stackTrace = t1; }, @@ -3517,163 +3704,38 @@ this.f = t1; this.T = t2; }, - LinkedHashMap_LinkedHashMap$_literal: function(keyValuePairs, $K, $V) { - return $K._eval$1("@<0>")._bind$1($V)._eval$1("LinkedHashMap<1,2>")._as(H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")))); - }, - LinkedHashMap_LinkedHashMap$_empty: function($K, $V) { - return new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); - }, - IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDelimiter) { - var parts, t1; - if (P._isToStringVisiting(iterable)) { - if (leftDelimiter === "(" && rightDelimiter === ")") - return "(...)"; - return leftDelimiter + "..." + rightDelimiter; - } - parts = H.setRuntimeTypeInfo([], type$.JSArray_String); - C.JSArray_methods.add$1($._toStringVisiting, iterable); - try { - P._iterablePartsToStrings(iterable, parts); - } finally { - if (0 >= $._toStringVisiting.length) - return H.ioore($._toStringVisiting, -1); - $._toStringVisiting.pop(); - } - t1 = P.StringBuffer__writeAll(leftDelimiter, type$.Iterable_dynamic._as(parts), ", ") + rightDelimiter; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDelimiter) { - var buffer, t1; - if (P._isToStringVisiting(iterable)) - return leftDelimiter + "..." + rightDelimiter; - buffer = new P.StringBuffer(leftDelimiter); - C.JSArray_methods.add$1($._toStringVisiting, iterable); - try { - t1 = buffer; - t1._contents = P.StringBuffer__writeAll(t1._contents, iterable, ", "); - } finally { - if (0 >= $._toStringVisiting.length) - return H.ioore($._toStringVisiting, -1); - $._toStringVisiting.pop(); - } - buffer._contents += rightDelimiter; - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _isToStringVisiting: function(o) { - var t1, i; - for (t1 = $._toStringVisiting.length, i = 0; i < t1; ++i) - if (o === $._toStringVisiting[i]) - return true; - return false; + LinkedHashMap_LinkedHashMap$_literal(keyValuePairs, $K, $V) { + return $K._eval$1("@<0>")._bind$1($V)._eval$1("LinkedHashMap<1,2>")._as(A.fillLiteralMap(keyValuePairs, new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")))); }, - _iterablePartsToStrings: function(iterable, parts) { - var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, - it = iterable.get$iterator(iterable), - $length = 0, count = 0; - while (true) { - if (!($length < 80 || count < 3)) - break; - if (!it.moveNext$0()) - return; - next = H.S(it.get$current()); - C.JSArray_methods.add$1(parts, next); - $length += next.length + 2; - ++count; - } - if (!it.moveNext$0()) { - if (count <= 5) - return; - if (0 >= parts.length) - return H.ioore(parts, -1); - ultimateString = parts.pop(); - if (0 >= parts.length) - return H.ioore(parts, -1); - penultimateString = parts.pop(); - } else { - penultimate = it.get$current(); - ++count; - if (!it.moveNext$0()) { - if (count <= 4) { - C.JSArray_methods.add$1(parts, H.S(penultimate)); - return; - } - ultimateString = H.S(penultimate); - if (0 >= parts.length) - return H.ioore(parts, -1); - penultimateString = parts.pop(); - $length += ultimateString.length + 2; - } else { - ultimate = it.get$current(); - ++count; - for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { - ultimate0 = it.get$current(); - ++count; - if (count > 100) { - while (true) { - if (!($length > 75 && count > 3)) - break; - if (0 >= parts.length) - return H.ioore(parts, -1); - $length -= parts.pop().length + 2; - --count; - } - C.JSArray_methods.add$1(parts, "..."); - return; - } - } - penultimateString = H.S(penultimate); - ultimateString = H.S(ultimate); - $length += ultimateString.length + penultimateString.length + 4; - } - } - if (count > parts.length + 2) { - $length += 5; - elision = "..."; - } else - elision = null; - while (true) { - if (!($length > 80 && parts.length > 3)) - break; - if (0 >= parts.length) - return H.ioore(parts, -1); - $length -= parts.pop().length + 2; - if (elision == null) { - $length += 5; - elision = "..."; - } - } - if (elision != null) - C.JSArray_methods.add$1(parts, elision); - C.JSArray_methods.add$1(parts, penultimateString); - C.JSArray_methods.add$1(parts, ultimateString); + LinkedHashMap_LinkedHashMap$_empty($K, $V) { + return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); }, - MapBase_mapToString: function(m) { + MapBase_mapToString(m) { var result, t1 = {}; - if (P._isToStringVisiting(m)) + if (A.isToStringVisiting(m)) return "{...}"; - result = new P.StringBuffer(""); + result = new A.StringBuffer(""); try { - C.JSArray_methods.add$1($._toStringVisiting, m); + B.JSArray_methods.add$1($.toStringVisiting, m); result._contents += "{"; t1.first = true; - m.forEach$1(0, new P.MapBase_mapToString_closure(t1, result)); + m.forEach$1(0, new A.MapBase_mapToString_closure(t1, result)); result._contents += "}"; } finally { - if (0 >= $._toStringVisiting.length) - return H.ioore($._toStringVisiting, -1); - $._toStringVisiting.pop(); + if (0 >= $.toStringVisiting.length) + return A.ioore($.toStringVisiting, -1); + $.toStringVisiting.pop(); } t1 = result._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, - ListQueue$: function($E) { - return new P.ListQueue(P.List_List$filled(P.ListQueue__calculateCapacity(null), null, false, $E._eval$1("0?")), $E._eval$1("ListQueue<0>")); + ListQueue$($E) { + return new A.ListQueue(A.List_List$filled(A.ListQueue__calculateCapacity(null), null, false, $E._eval$1("0?")), $E._eval$1("ListQueue<0>")); }, - ListQueue__calculateCapacity: function(initialCapacity) { + ListQueue__calculateCapacity(initialCapacity) { return 8; }, - ListMixin: function ListMixin() { + ListBase: function ListBase() { }, MapBase: function MapBase() { }, @@ -3681,8 +3743,6 @@ this._box_0 = t0; this.result = t1; }, - MapMixin: function MapMixin() { - }, ListQueue: function ListQueue(t0, t1) { var _ = this; _._table = t0; @@ -3698,43 +3758,43 @@ _._collection$_current = null; _.$ti = t4; }, - _parseJson: function(source, reviver) { + _parseJson(source, reviver) { var e, exception, t1, parsed = null; try { parsed = JSON.parse(source); } catch (exception) { - e = H.unwrapException(exception); - t1 = P.FormatException$(String(e), null, null); - throw H.wrapException(t1); + e = A.unwrapException(exception); + t1 = A.FormatException$(String(e), null, null); + throw A.wrapException(t1); } - t1 = P._convertJsonToDartLazy(parsed); + t1 = A._convertJsonToDartLazy(parsed); return t1; }, - _convertJsonToDartLazy: function(object) { + _convertJsonToDartLazy(object) { var i; if (object == null) return null; if (typeof object != "object") return object; if (Object.getPrototypeOf(object) !== Array.prototype) - return new P._JsonMap(object, Object.create(null)); + return new A._JsonMap(object, Object.create(null)); for (i = 0; i < object.length; ++i) - object[i] = P._convertJsonToDartLazy(object[i]); + object[i] = A._convertJsonToDartLazy(object[i]); return object; }, - JsonUnsupportedObjectError$: function(unsupportedObject, cause, partialResult) { - return new P.JsonUnsupportedObjectError(unsupportedObject, cause); + JsonUnsupportedObjectError$(unsupportedObject, cause, partialResult) { + return new A.JsonUnsupportedObjectError(unsupportedObject, cause); }, - _defaultToEncodable: function(object) { + _defaultToEncodable(object) { return object.toJson$0(); }, - _JsonStringStringifier$: function(_sink, _toEncodable) { - return new P._JsonStringStringifier(_sink, [], P.convert___defaultToEncodable$closure()); + _JsonStringStringifier$(_sink, _toEncodable) { + return new A._JsonStringStringifier(_sink, [], A.convert___defaultToEncodable$closure()); }, - _JsonStringStringifier_stringify: function(object, toEncodable, indent) { + _JsonStringStringifier_stringify(object, toEncodable, indent) { var t1, - output = new P.StringBuffer(""), - stringifier = P._JsonStringStringifier$(output, toEncodable); + output = new A.StringBuffer(""), + stringifier = A._JsonStringStringifier$(output, toEncodable); stringifier.writeObject$1(object); t1 = output._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; @@ -3778,18 +3838,21 @@ this._seen = t1; this._toEncodable = t2; }, - int_parse: function(source, radix) { - var value = H.Primitives_parseInt(source, radix); + int_parse(source, radix) { + var value = A.Primitives_parseInt(source, radix); if (value != null) return value; - throw H.wrapException(P.FormatException$(source, null, null)); + throw A.wrapException(A.FormatException$(source, null, null)); }, - Error__objectToString: function(object) { - if (object instanceof H.Closure) - return object.toString$0(0); - return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; + Error__throw(error, stackTrace) { + error = A.wrapException(error); + if (error == null) + error = type$.Object._as(error); + error.stack = stackTrace.toString$0(0); + throw error; + throw A.wrapException("unreachable"); }, - List_List$filled: function($length, fill, growable, $E) { + List_List$filled($length, fill, growable, $E) { var i, result = growable ? J.JSArray_JSArray$growable($length, $E) : J.JSArray_JSArray$fixed($length, $E); if ($length !== 0 && fill != null) @@ -3797,118 +3860,231 @@ result[i] = fill; return result; }, - StringBuffer__writeAll: function(string, objects, separator) { + StringBuffer__writeAll(string, objects, separator) { var iterator = J.get$iterator$ax(objects); if (!iterator.moveNext$0()) return string; if (separator.length === 0) { do - string += H.S(iterator.get$current()); + string += A.S(iterator.get$current()); while (iterator.moveNext$0()); } else { - string += H.S(iterator.get$current()); + string += A.S(iterator.get$current()); for (; iterator.moveNext$0();) - string = string + separator + H.S(iterator.get$current()); + string = string + separator + A.S(iterator.get$current()); } return string; }, - StackTrace_current: function() { - var stackTrace, exception; - if (H.boolConversionCheck($.$get$_hasErrorStackProperty())) - return H.getTraceFromException(new Error()); + StackTrace_current() { + return A.getTraceFromException(new Error()); + }, + DateTime__fourDigits(n) { + var absN = Math.abs(n), + sign = n < 0 ? "-" : ""; + if (absN >= 1000) + return "" + n; + if (absN >= 100) + return sign + "0" + absN; + if (absN >= 10) + return sign + "00" + absN; + return sign + "000" + absN; + }, + DateTime__threeDigits(n) { + if (n >= 100) + return "" + n; + if (n >= 10) + return "0" + n; + return "00" + n; + }, + DateTime__twoDigits(n) { + if (n >= 10) + return "" + n; + return "0" + n; + }, + Error_safeToString(object) { + if (typeof object == "number" || A._isBool(object) || object == null) + return J.toString$0$(object); + if (typeof object == "string") + return JSON.stringify(object); + return A.Primitives_safeToString(object); + }, + Error_throwWithStackTrace(error, stackTrace) { + A.checkNotNullable(error, "error", type$.Object); + A.checkNotNullable(stackTrace, "stackTrace", type$.StackTrace); + A.Error__throw(error, stackTrace); + }, + AssertionError$(message) { + return new A.AssertionError(message); + }, + ArgumentError$(message, $name) { + return new A.ArgumentError(false, null, $name, message); + }, + ArgumentError$value(value, $name, message) { + return new A.ArgumentError(true, value, $name, message); + }, + ArgumentError$notNull($name) { + return new A.ArgumentError(false, null, $name, "Must not be null"); + }, + RangeError$(message) { + var _null = null; + return new A.RangeError(_null, _null, false, _null, _null, message); + }, + RangeError$value(value, $name) { + return new A.RangeError(null, null, true, value, $name, "Value not in range"); + }, + RangeError$range(invalidValue, minValue, maxValue, $name, message) { + return new A.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); + }, + RangeError_checkValidRange(start, end, $length) { + if (0 > start || start > $length) + throw A.wrapException(A.RangeError$range(start, 0, $length, "start", null)); + if (end != null) { + if (start > end || end > $length) + throw A.wrapException(A.RangeError$range(end, start, $length, "end", null)); + return end; + } + return $length; + }, + RangeError_checkNotNegative(value, $name) { + if (value < 0) + throw A.wrapException(A.RangeError$range(value, 0, null, $name, null)); + return value; + }, + IndexError$withLength(invalidValue, $length, indexable, message, $name) { + return new A.IndexError($length, true, invalidValue, $name, "Index out of range"); + }, + UnsupportedError$(message) { + return new A.UnsupportedError(message); + }, + UnimplementedError$(message) { + return new A.UnimplementedError(message); + }, + StateError$(message) { + return new A.StateError(message); + }, + ConcurrentModificationError$(modifiedObject) { + return new A.ConcurrentModificationError(modifiedObject); + }, + FormatException$(message, source, offset) { + return new A.FormatException(message, source, offset); + }, + Iterable_iterableToShortString(iterable, leftDelimiter, rightDelimiter) { + var parts, t1; + if (A.isToStringVisiting(iterable)) { + if (leftDelimiter === "(" && rightDelimiter === ")") + return "(...)"; + return leftDelimiter + "..." + rightDelimiter; + } + parts = A._setArrayType([], type$.JSArray_String); + B.JSArray_methods.add$1($.toStringVisiting, iterable); try { - throw H.wrapException(""); - } catch (exception) { - H.unwrapException(exception); - stackTrace = H.getTraceFromException(exception); - return stackTrace; + A._iterablePartsToStrings(iterable, parts); + } finally { + if (0 >= $.toStringVisiting.length) + return A.ioore($.toStringVisiting, -1); + $.toStringVisiting.pop(); + } + t1 = A.StringBuffer__writeAll(leftDelimiter, type$.Iterable_dynamic._as(parts), ", ") + rightDelimiter; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + Iterable_iterableToFullString(iterable, leftDelimiter, rightDelimiter) { + var buffer, t1; + if (A.isToStringVisiting(iterable)) + return leftDelimiter + "..." + rightDelimiter; + buffer = new A.StringBuffer(leftDelimiter); + B.JSArray_methods.add$1($.toStringVisiting, iterable); + try { + t1 = buffer; + t1._contents = A.StringBuffer__writeAll(t1._contents, iterable, ", "); + } finally { + if (0 >= $.toStringVisiting.length) + return A.ioore($.toStringVisiting, -1); + $.toStringVisiting.pop(); + } + buffer._contents += rightDelimiter; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _iterablePartsToStrings(iterable, parts) { + var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, + it = iterable.get$iterator(iterable), + $length = 0, count = 0; + while (true) { + if (!($length < 80 || count < 3)) + break; + if (!it.moveNext$0()) + return; + next = A.S(it.get$current()); + B.JSArray_methods.add$1(parts, next); + $length += next.length + 2; + ++count; + } + if (!it.moveNext$0()) { + if (count <= 5) + return; + if (0 >= parts.length) + return A.ioore(parts, -1); + ultimateString = parts.pop(); + if (0 >= parts.length) + return A.ioore(parts, -1); + penultimateString = parts.pop(); + } else { + penultimate = it.get$current(); + ++count; + if (!it.moveNext$0()) { + if (count <= 4) { + B.JSArray_methods.add$1(parts, A.S(penultimate)); + return; + } + ultimateString = A.S(penultimate); + if (0 >= parts.length) + return A.ioore(parts, -1); + penultimateString = parts.pop(); + $length += ultimateString.length + 2; + } else { + ultimate = it.get$current(); + ++count; + for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { + ultimate0 = it.get$current(); + ++count; + if (count > 100) { + while (true) { + if (!($length > 75 && count > 3)) + break; + if (0 >= parts.length) + return A.ioore(parts, -1); + $length -= parts.pop().length + 2; + --count; + } + B.JSArray_methods.add$1(parts, "..."); + return; + } + } + penultimateString = A.S(penultimate); + ultimateString = A.S(ultimate); + $length += ultimateString.length + penultimateString.length + 4; + } } - }, - DateTime__fourDigits: function(n) { - var absN = Math.abs(n), - sign = n < 0 ? "-" : ""; - if (absN >= 1000) - return "" + n; - if (absN >= 100) - return sign + "0" + absN; - if (absN >= 10) - return sign + "00" + absN; - return sign + "000" + absN; - }, - DateTime__threeDigits: function(n) { - if (n >= 100) - return "" + n; - if (n >= 10) - return "0" + n; - return "00" + n; - }, - DateTime__twoDigits: function(n) { - if (n >= 10) - return "" + n; - return "0" + n; - }, - Error_safeToString: function(object) { - if (typeof object == "number" || H._isBool(object) || null == object) - return J.toString$0$(object); - if (typeof object == "string") - return JSON.stringify(object); - return P.Error__objectToString(object); - }, - AssertionError$: function(message) { - return new P.AssertionError(message); - }, - ArgumentError$: function(message) { - return new P.ArgumentError(false, null, null, message); - }, - ArgumentError$value: function(value, $name, message) { - return new P.ArgumentError(true, value, $name, message); - }, - ArgumentError$notNull: function($name) { - return new P.ArgumentError(false, null, $name, "Must not be null"); - }, - RangeError$: function(message) { - var _null = null; - return new P.RangeError(_null, _null, false, _null, _null, message); - }, - RangeError$value: function(value, $name) { - return new P.RangeError(null, null, true, value, $name, "Value not in range"); - }, - RangeError$range: function(invalidValue, minValue, maxValue, $name, message) { - return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); - }, - RangeError_checkValidRange: function(start, end, $length) { - if (0 > start || start > $length) - throw H.wrapException(P.RangeError$range(start, 0, $length, "start", null)); - if (end != null) { - if (start > end || end > $length) - throw H.wrapException(P.RangeError$range(end, start, $length, "end", null)); - return end; + if (count > parts.length + 2) { + $length += 5; + elision = "..."; + } else + elision = null; + while (true) { + if (!($length > 80 && parts.length > 3)) + break; + if (0 >= parts.length) + return A.ioore(parts, -1); + $length -= parts.pop().length + 2; + if (elision == null) { + $length += 5; + elision = "..."; + } } - return $length; - }, - RangeError_checkNotNegative: function(value, $name) { - if (value < 0) - throw H.wrapException(P.RangeError$range(value, 0, null, $name, null)); - return value; - }, - IndexError$: function(invalidValue, indexable, $name, message, $length) { - var t1 = H._asInt($length == null ? J.get$length$asx(indexable) : $length); - return new P.IndexError(t1, true, invalidValue, $name, "Index out of range"); - }, - UnsupportedError$: function(message) { - return new P.UnsupportedError(message); - }, - UnimplementedError$: function(message) { - return new P.UnimplementedError(message); - }, - StateError$: function(message) { - return new P.StateError(message); - }, - ConcurrentModificationError$: function(modifiedObject) { - return new P.ConcurrentModificationError(modifiedObject); - }, - FormatException$: function(message, source, offset) { - return new P.FormatException(message, source, offset); + if (elision != null) + B.JSArray_methods.add$1(parts, elision); + B.JSArray_methods.add$1(parts, penultimateString); + B.JSArray_methods.add$1(parts, ultimateString); }, DateTime: function DateTime(t0, t1) { this._value = t0; @@ -3917,10 +4093,6 @@ Duration: function Duration(t0) { this._duration = t0; }, - Duration_toString_sixDigits: function Duration_toString_sixDigits() { - }, - Duration_toString_twoDigits: function Duration_toString_twoDigits() { - }, Error: function Error() { }, AssertionError: function AssertionError(t0) { @@ -3928,8 +4100,6 @@ }, TypeError: function TypeError() { }, - NullThrownError: function NullThrownError() { - }, ArgumentError: function ArgumentError(t0, t1, t2, t3) { var _ = this; _._hasValue = t0; @@ -3970,9 +4140,6 @@ }, StackOverflowError: function StackOverflowError() { }, - CyclicInitializationError: function CyclicInitializationError(t0) { - this.variableName = t0; - }, _Exception: function _Exception(t0) { this.message = t0; }, @@ -3993,97 +4160,20 @@ StringBuffer: function StringBuffer(t0) { this._contents = t0; }, - _convertDartToNative_Value: function(value) { - var array; - if (value == null) - return value; - if (typeof value == "string" || typeof value == "number" || H._isBool(value)) - return value; - if (type$.Map_dynamic_dynamic._is(value)) - return P.convertDartToNative_Dictionary(value); - if (type$.List_dynamic._is(value)) { - array = []; - J.forEach$1$ax(value, new P._convertDartToNative_Value_closure(array)); - value = array; - } - return value; - }, - convertDartToNative_Dictionary: function(dict) { - var object = {}; - dict.forEach$1(0, new P.convertDartToNative_Dictionary_closure(object)); - return object; - }, - _AcceptStructuredClone: function _AcceptStructuredClone() { - }, - _AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _convertDartToNative_Value_closure: function _convertDartToNative_Value_closure(t0) { - this.array = t0; - }, - convertDartToNative_Dictionary_closure: function convertDartToNative_Dictionary_closure(t0) { - this.object = t0; - }, - _AcceptStructuredCloneDart2Js: function _AcceptStructuredCloneDart2Js(t0, t1) { - this.values = t0; - this.copies = t1; - this.mustCopy = false; - }, - promiseToFuture: function(jsPromise, $T) { - var t1 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")), - completer = new P._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>")); - jsPromise.then(H.convertDartClosureToJS(new P.promiseToFuture_closure(completer, $T), 1), H.convertDartClosureToJS(new P.promiseToFuture_closure0(completer), 1)); - return t1; - }, - NullRejectionException: function NullRejectionException(t0) { - this.isUndefined = t0; - }, - promiseToFuture_closure: function promiseToFuture_closure(t0, t1) { - this.completer = t0; - this.T = t1; - }, - promiseToFuture_closure0: function promiseToFuture_closure0(t0) { - this.completer = t0; - }, - _JSRandom: function _JSRandom() { - }, - SvgElement: function SvgElement() { - } - }, - W = { - EventSource__factoryEventSource: function(url, eventSourceInitDict) { - var t1 = new EventSource(url, P.convertDartToNative_Dictionary(eventSourceInitDict)); - return t1; - }, - HttpRequest_request: function(url, method, sendData, withCredentials) { - var t2, t3, t4, - t1 = new P._Future($.Zone__current, type$._Future_HttpRequest), - completer = new P._AsyncCompleter(t1, type$._AsyncCompleter_HttpRequest), - xhr = new XMLHttpRequest(); - C.HttpRequest_methods.open$3$async(xhr, method, url, true); - C.HttpRequest_methods.set$withCredentials(xhr, true); - t2 = type$.nullable_void_Function_ProgressEvent; - t3 = t2._as(new W.HttpRequest_request_closure(xhr, completer)); - type$.nullable_void_Function._as(null); - t4 = type$.ProgressEvent; - W._EventStreamSubscription$(xhr, "load", t3, false, t4); - W._EventStreamSubscription$(xhr, "error", t2._as(completer.get$completeError()), false, t4); - if (sendData != null) - xhr.send(sendData); - else - xhr.send(); + EventSource__factoryEventSource(url, eventSourceInitDict) { + var t1 = new EventSource(url, A.convertDartToNative_Dictionary(eventSourceInitDict)); + t1.toString; return t1; }, - _EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) { - var t1 = onData == null ? null : W._wrapZone(new W._EventStreamSubscription_closure(onData), type$.Event); - t1 = new W._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); + _EventStreamSubscription$(_target, _eventType, onData, _useCapture, $T) { + var t1 = onData == null ? null : A._wrapZone(new A._EventStreamSubscription_closure(onData), type$.Event); + t1 = new A._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); t1._tryResume$0(); return t1; }, - _wrapZone: function(callback, $T) { + _wrapZone(callback, $T) { var t1 = $.Zone__current; - if (t1 === C.C__RootZone) + if (t1 === B.C__RootZone) return callback; return t1.bindUnaryCallbackGuarded$1$1(callback, $T); }, @@ -4105,22 +4195,12 @@ }, FormElement: function FormElement() { }, - HttpRequest: function HttpRequest() { - }, - HttpRequest_request_closure: function HttpRequest_request_closure(t0, t1) { - this.xhr = t0; - this.completer = t1; - }, - HttpRequestEventTarget: function HttpRequestEventTarget() { - }, MessageEvent: function MessageEvent() { }, MouseEvent: function MouseEvent() { }, Node: function Node() { }, - ProgressEvent: function ProgressEvent() { - }, SelectElement: function SelectElement() { }, UIEvent: function UIEvent() { @@ -4156,24 +4236,79 @@ }, _EventStreamSubscription_onData_closure: function _EventStreamSubscription_onData_closure(t0) { this.handleData = t0; - } - }, - S = {AsyncMemoizer: function AsyncMemoizer(t0, t1) { + }, + _convertDartToNative_Value(value) { + var array; + if (value == null) + return value; + if (typeof value == "string" || typeof value == "number" || A._isBool(value)) + return value; + if (type$.Map_dynamic_dynamic._is(value)) + return A.convertDartToNative_Dictionary(value); + if (type$.List_dynamic._is(value)) { + array = []; + J.forEach$1$ax(value, new A._convertDartToNative_Value_closure(array)); + value = array; + } + return value; + }, + convertDartToNative_Dictionary(dict) { + var object = {}; + dict.forEach$1(0, new A.convertDartToNative_Dictionary_closure(object)); + return object; + }, + _AcceptStructuredClone: function _AcceptStructuredClone() { + }, + _AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) { + this.$this = t0; + this.map = t1; + }, + _convertDartToNative_Value_closure: function _convertDartToNative_Value_closure(t0) { + this.array = t0; + }, + convertDartToNative_Dictionary_closure: function convertDartToNative_Dictionary_closure(t0) { + this.object = t0; + }, + _AcceptStructuredCloneDart2Js: function _AcceptStructuredCloneDart2Js(t0, t1) { + this.values = t0; + this.copies = t1; + this.mustCopy = false; + }, + promiseToFuture(jsPromise, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), + completer = new A._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>")); + jsPromise.then(A.convertDartClosureToJS(new A.promiseToFuture_closure(completer, $T), 1), A.convertDartClosureToJS(new A.promiseToFuture_closure0(completer), 1)); + return t1; + }, + promiseToFuture_closure: function promiseToFuture_closure(t0, t1) { + this.completer = t0; + this.T = t1; + }, + promiseToFuture_closure0: function promiseToFuture_closure0(t0) { + this.completer = t0; + }, + NullRejectionException: function NullRejectionException(t0) { + this.isUndefined = t0; + }, + _JSRandom: function _JSRandom() { + }, + SvgElement: function SvgElement() { + }, + AsyncMemoizer: function AsyncMemoizer(t0, t1) { this._completer = t0; this.$ti = t1; - }}, - Y = {Level: function Level(t0, t1) { + }, + Level: function Level(t0, t1) { this.name = t0; this.value = t1; - }}, - L = {LogRecord: function LogRecord(t0, t1, t2) { + }, + LogRecord: function LogRecord(t0, t1, t2) { this.level = t0; this.message = t1; this.loggerName = t2; - }}, - F = { - Logger_Logger: function($name) { - return $.Logger__loggers.putIfAbsent$2($name, new F.Logger_Logger_closure($name)); + }, + Logger_Logger($name) { + return $.Logger__loggers.putIfAbsent$2($name, new A.Logger_Logger_closure($name)); }, Logger: function Logger(t0, t1, t2) { var _ = this; @@ -4184,9 +4319,8 @@ }, Logger_Logger_closure: function Logger_Logger_closure(t0) { this.name = t0; - } - }, - O = {Pool: function Pool(t0, t1, t2, t3, t4) { + }, + Pool: function Pool(t0, t1, t2, t3, t4) { var _ = this; _._requestedResources = t0; _._onReleaseCallbacks = t1; @@ -4195,29 +4329,39 @@ _._allocatedResources = 0; _._timer = null; _._closeMemo = t4; - }, Pool__runOnRelease_closure: function Pool__runOnRelease_closure(t0) { + }, + Pool__runOnRelease_closure: function Pool__runOnRelease_closure(t0) { this.$this = t0; - }, Pool__runOnRelease_closure0: function Pool__runOnRelease_closure0(t0) { + }, + Pool__runOnRelease_closure0: function Pool__runOnRelease_closure0(t0) { this.$this = t0; - }, PoolResource: function PoolResource(t0) { + }, + PoolResource: function PoolResource(t0) { this._pool = t0; this._released = false; - }}, - M = { - SseClient$: function(serverUrl) { - var t1 = type$.String; - t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), F.Logger_Logger("SseClient"), new P._AsyncCompleter(new P._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic)); - t1.SseClient$1(serverUrl); + }, + SseClient$(serverUrl) { + var t3, t4, t5, + t1 = type$.String, + t2 = A.StreamController_StreamController(t1); + t1 = A.StreamController_StreamController(t1); + t3 = A.Logger_Logger("SseClient"); + t4 = $.Zone__current; + t5 = A.generateUuidV4(); + t1 = new A.SseClient(t5, t2, t1, t3, new A._AsyncCompleter(new A._Future(t4, type$._Future_void), type$._AsyncCompleter_void)); + t1.SseClient$2$debugKey(serverUrl, null); return t1; }, - SseClient: function SseClient(t0, t1, t2, t3) { + SseClient: function SseClient(t0, t1, t2, t3, t4) { var _ = this; - _._incomingController = t0; - _._outgoingController = t1; - _._logger = t2; - _._onConnected = t3; + _._clientId = t0; + _._incomingController = t1; + _._outgoingController = t2; + _._logger = t3; + _._onConnected = t4; _._lastMessageId = -1; - _._errorTimer = _.__SseClient__serverUrl = _.__SseClient__eventSource = null; + _.__SseClient__serverUrl_A = _.__SseClient__eventSource_A = $; + _._errorTimer = null; }, SseClient_closure: function SseClient_closure(t0) { this.$this = t0; @@ -4236,140 +4380,167 @@ this._box_0 = t0; this.$this = t1; this.message = t2; - } - }, - T = { - generateUuidV4: function() { - var t1 = new T.generateUuidV4__printDigits(), - t2 = new T.generateUuidV4__bitsDigits(t1, new T.generateUuidV4__generateBits(C.C__JSRandom)), - t3 = C.C__JSRandom.nextInt$1(4); - return H.S(t2.call$2(16, 4)) + H.S(t2.call$2(16, 4)) + "-" + H.S(t2.call$2(16, 4)) + "-4" + H.S(t2.call$2(12, 3)) + "-" + H.S(t1.call$2(8 + t3, 1)) + H.S(t2.call$2(12, 3)) + "-" + H.S(t2.call$2(16, 4)) + H.S(t2.call$2(16, 4)) + H.S(t2.call$2(16, 4)); - }, - generateUuidV4__generateBits: function generateUuidV4__generateBits(t0) { + }, + _FetchOptions: function _FetchOptions() { + }, + generateUuidV4() { + var t1 = new A.generateUuidV4_printDigits(), + t2 = new A.generateUuidV4_bitsDigits(t1, new A.generateUuidV4_generateBits(B.C__JSRandom)), + t3 = B.C__JSRandom.nextInt$1(4); + return A.S(t2.call$2(16, 4)) + A.S(t2.call$2(16, 4)) + "-" + A.S(t2.call$2(16, 4)) + "-4" + A.S(t2.call$2(12, 3)) + "-" + A.S(t1.call$2(8 + t3, 1)) + A.S(t2.call$2(12, 3)) + "-" + A.S(t2.call$2(16, 4)) + A.S(t2.call$2(16, 4)) + A.S(t2.call$2(16, 4)); + }, + generateUuidV4_generateBits: function generateUuidV4_generateBits(t0) { this.random = t0; }, - generateUuidV4__printDigits: function generateUuidV4__printDigits() { + generateUuidV4_printDigits: function generateUuidV4_printDigits() { }, - generateUuidV4__bitsDigits: function generateUuidV4__bitsDigits(t0, t1) { - this._printDigits = t0; - this._generateBits = t1; - } - }, - R = {StreamChannelMixin: function StreamChannelMixin() { - }}, - E = { - main: function() { - var t2, t3, - channel = M.SseClient$("/test"), + generateUuidV4_bitsDigits: function generateUuidV4_bitsDigits(t0, t1) { + this.printDigits = t0; + this.generateBits = t1; + }, + StreamChannelMixin: function StreamChannelMixin() { + }, + main() { + var t2, + channel = A.SseClient$("/test"), t1 = document.querySelector("button"); t1.toString; t1 = J.get$onClick$x(t1); t2 = t1.$ti; - t3 = t2._eval$1("~(1)?")._as(new E.main_closure(channel)); - type$.nullable_void_Function._as(null); - W._EventStreamSubscription$(t1._target, t1._eventType, t3, false, t2._precomputed1); + A._EventStreamSubscription$(t1._target, t1._eventType, t2._eval$1("~(1)?")._as(new A.main_closure(channel)), false, t2._precomputed1); t2 = channel._incomingController; - new P._ControllerStream(t2, H._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$1(new E.main_closure0(channel)); + new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$1(new A.main_closure0(channel)); }, main_closure: function main_closure(t0) { this.channel = t0; }, main_closure0: function main_closure0(t0) { this.channel = t0; + }, + throwLateFieldNI(fieldName) { + A.throwExpressionWithWrapper(new A.LateError("Field '" + fieldName + "' has not been initialized."), new Error()); + }, + throwLateFieldADI(fieldName) { + A.throwExpressionWithWrapper(new A.LateError("Field '" + fieldName + "' has been assigned during initialization."), new Error()); } - }; - var holders = [C, H, J, P, W, S, Y, L, F, O, M, T, R, E]; - hunkHelpers.setFunctionNamesIfNecessary(holders); + }, + B = {}; + var holders = [A, J, B]; var $ = {}; - H.JS_CONST.prototype = {}; + A.JS_CONST.prototype = {}; J.Interceptor.prototype = { - $eq: function(receiver, other) { + $eq(receiver, other) { return receiver === other; }, - get$hashCode: function(receiver) { - return H.Primitives_objectHashCode(receiver); + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); }, - toString$0: function(receiver) { - return "Instance of '" + H.Primitives_objectTypeName(receiver) + "'"; + toString$0(receiver) { + return "Instance of '" + A.Primitives_objectTypeName(receiver) + "'"; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(A._instanceTypeFromConstructor(this)); } }; J.JSBool.prototype = { - toString$0: function(receiver) { + toString$0(receiver) { return String(receiver); }, - get$hashCode: function(receiver) { + get$hashCode(receiver) { return receiver ? 519018 : 218159; }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.bool); + }, + $isTrustedGetRuntimeType: 1, $isbool: 1 }; J.JSNull.prototype = { - $eq: function(receiver, other) { + $eq(receiver, other) { return null == other; }, - toString$0: function(receiver) { + toString$0(receiver) { return "null"; }, - get$hashCode: function(receiver) { + get$hashCode(receiver) { return 0; }, + $isTrustedGetRuntimeType: 1, $isNull: 1 }; - J.JavaScriptObject.prototype = { - get$hashCode: function(receiver) { + J.JavaScriptObject.prototype = {}; + J.LegacyJavaScriptObject.prototype = { + get$hashCode(receiver) { return 0; }, - toString$0: function(receiver) { + toString$0(receiver) { return String(receiver); } }; J.PlainJavaScriptObject.prototype = {}; J.UnknownJavaScriptObject.prototype = {}; J.JavaScriptFunction.prototype = { - toString$0: function(receiver) { + toString$0(receiver) { var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; if (dartClosure == null) - return this.super$JavaScriptObject$toString(receiver); + return this.super$LegacyJavaScriptObject$toString(receiver); return "JavaScript function for " + J.toString$0$(dartClosure); }, $isFunction: 1 }; + J.JavaScriptBigInt.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + } + }; + J.JavaScriptSymbol.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + } + }; J.JSArray.prototype = { - add$1: function(receiver, value) { - H._arrayInstanceType(receiver)._precomputed1._as(value); + add$1(receiver, value) { + A._arrayInstanceType(receiver)._precomputed1._as(value); if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("add")); + A.throwExpression(A.UnsupportedError$("add")); receiver.push(value); }, - forEach$1: function(receiver, f) { + forEach$1(receiver, f) { var end, i; - H._arrayInstanceType(receiver)._eval$1("~(1)")._as(f); + A._arrayInstanceType(receiver)._eval$1("~(1)")._as(f); end = receiver.length; for (i = 0; i < end; ++i) { f.call$1(receiver[i]); if (receiver.length !== end) - throw H.wrapException(P.ConcurrentModificationError$(receiver)); + throw A.wrapException(A.ConcurrentModificationError$(receiver)); } }, - get$last: function(receiver) { + get$last(receiver) { var t1 = receiver.length; if (t1 > 0) return receiver[t1 - 1]; - throw H.wrapException(H.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_noElement()); }, - setRange$4: function(receiver, start, end, iterable, skipCount) { + setRange$4(receiver, start, end, iterable, skipCount) { var $length, otherList, t1, i; - H._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(iterable); + A._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(iterable); if (!!receiver.immutable$list) - H.throwExpression(P.UnsupportedError$("setRange")); - P.RangeError_checkValidRange(start, end, receiver.length); + A.throwExpression(A.UnsupportedError$("setRange")); + A.RangeError_checkValidRange(start, end, receiver.length); $length = end - start; if ($length === 0) return; - P.RangeError_checkNotNegative(skipCount, "skipCount"); + A.RangeError_checkNotNegative(skipCount, "skipCount"); otherList = iterable; t1 = J.getInterceptor$asx(otherList); if (skipCount + $length > t1.get$length(otherList)) - throw H.wrapException(H.IterableElementError_tooFew()); + throw A.wrapException(A.IterableElementError_tooFew()); if (skipCount < start) for (i = $length - 1; i >= 0; --i) receiver[start + i] = t1.$index(otherList, skipCount + i); @@ -4377,33 +4548,32 @@ for (i = 0; i < $length; ++i) receiver[start + i] = t1.$index(otherList, skipCount + i); }, - get$isNotEmpty: function(receiver) { + get$isNotEmpty(receiver) { return receiver.length !== 0; }, - toString$0: function(receiver) { - return P.IterableBase_iterableToFullString(receiver, "[", "]"); + toString$0(receiver) { + return A.Iterable_iterableToFullString(receiver, "[", "]"); }, - get$iterator: function(receiver) { - return new J.ArrayIterator(receiver, receiver.length, H._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>")); + get$iterator(receiver) { + return new J.ArrayIterator(receiver, receiver.length, A._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>")); }, - get$hashCode: function(receiver) { - return H.Primitives_objectHashCode(receiver); + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); }, - get$length: function(receiver) { + get$length(receiver) { return receiver.length; }, - $index: function(receiver, index) { - if (index >= receiver.length || index < 0) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + $index(receiver, index) { + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); return receiver[index]; }, - $indexSet: function(receiver, index, value) { - H._asInt(index); - H._arrayInstanceType(receiver)._precomputed1._as(value); + $indexSet(receiver, index, value) { + A._arrayInstanceType(receiver)._precomputed1._as(value); if (!!receiver.immutable$list) - H.throwExpression(P.UnsupportedError$("indexed set")); - if (index >= receiver.length || index < 0) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + A.throwExpression(A.UnsupportedError$("indexed set")); + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); receiver[index] = value; }, $isIterable: 1, @@ -4411,15 +4581,18 @@ }; J.JSUnmodifiableArray.prototype = {}; J.ArrayIterator.prototype = { - get$current: function() { - return this.$ti._precomputed1._as(this._current); + get$current() { + var t1 = this._current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; }, - moveNext$0: function() { + moveNext$0() { var t2, _this = this, t1 = _this._iterable, $length = t1.length; - if (_this._length !== $length) - throw H.wrapException(H.throwConcurrentModificationError(t1)); + if (_this._length !== $length) { + t1 = A.throwConcurrentModificationError(t1); + throw A.wrapException(t1); + } t2 = _this._index; if (t2 >= $length) { _this.set$_current(null); @@ -4429,42 +4602,46 @@ ++_this._index; return true; }, - set$_current: function(_current) { + set$_current(_current) { this._current = this.$ti._eval$1("1?")._as(_current); } }; J.JSNumber.prototype = { - toRadixString$1: function(receiver, radix) { - var result, match, t1, exponent; + toRadixString$1(receiver, radix) { + var result, t1, t2, match, exponent; if (radix < 2 || radix > 36) - throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", null)); + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", null)); result = receiver.toString(radix); - if (C.JSString_methods.codeUnitAt$1(result, result.length - 1) !== 41) + t1 = result.length; + t2 = t1 - 1; + if (!(t2 >= 0)) + return A.ioore(result, t2); + if (result.charCodeAt(t2) !== 41) return result; match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); if (match == null) - H.throwExpression(P.UnsupportedError$("Unexpected toString result: " + result)); + A.throwExpression(A.UnsupportedError$("Unexpected toString result: " + result)); t1 = match.length; if (1 >= t1) - return H.ioore(match, 1); + return A.ioore(match, 1); result = match[1]; if (3 >= t1) - return H.ioore(match, 3); + return A.ioore(match, 3); exponent = +match[3]; t1 = match[2]; if (t1 != null) { result += t1; exponent -= t1.length; } - return result + C.JSString_methods.$mul("0", exponent); + return result + B.JSString_methods.$mul("0", exponent); }, - toString$0: function(receiver) { + toString$0(receiver) { if (receiver === 0 && 1 / receiver < 0) return "-0.0"; else return "" + receiver; }, - get$hashCode: function(receiver) { + get$hashCode(receiver) { var absolute, floorLog2, factor, scaled, intValue = receiver | 0; if (receiver === intValue) @@ -4475,10 +4652,10 @@ scaled = absolute < 1 ? absolute / factor : factor / absolute; return ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259 & 536870911; }, - _tdivFast$1: function(receiver, other) { + _tdivFast$1(receiver, other) { return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); }, - _tdivSlow$1: function(receiver, other) { + _tdivSlow$1(receiver, other) { var quotient = receiver / other; if (quotient >= -2147483648 && quotient <= 2147483647) return quotient | 0; @@ -4487,12 +4664,12 @@ return Math.floor(quotient); } else if (quotient > -1 / 0) return Math.ceil(quotient); - throw H.wrapException(P.UnsupportedError$("Result of truncating division is " + H.S(quotient) + ": " + H.S(receiver) + " ~/ " + other)); + throw A.wrapException(A.UnsupportedError$("Result of truncating division is " + A.S(quotient) + ": " + A.S(receiver) + " ~/ " + other)); }, - _shlPositive$1: function(receiver, other) { + _shlPositive$1(receiver, other) { return other > 31 ? 0 : receiver << other >>> 0; }, - _shrOtherPositive$1: function(receiver, other) { + _shrOtherPositive$1(receiver, other) { var t1; if (receiver > 0) t1 = this._shrBothPositive$1(receiver, other); @@ -4502,47 +4679,60 @@ } return t1; }, - _shrBothPositive$1: function(receiver, other) { + _shrBothPositive$1(receiver, other) { return other > 31 ? 0 : receiver >>> other; }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.num); + }, $isdouble: 1, $isnum: 1 }; - J.JSInt.prototype = {$isint: 1}; - J.JSNumNotInt.prototype = {}; + J.JSInt.prototype = { + get$runtimeType(receiver) { + return A.createRuntimeType(type$.int); + }, + $isTrustedGetRuntimeType: 1, + $isint: 1 + }; + J.JSNumNotInt.prototype = { + get$runtimeType(receiver) { + return A.createRuntimeType(type$.double); + }, + $isTrustedGetRuntimeType: 1 + }; J.JSString.prototype = { - codeUnitAt$1: function(receiver, index) { - if (index < 0) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); - if (index >= receiver.length) - H.throwExpression(H.diagnoseIndexError(receiver, index)); - return receiver.charCodeAt(index); - }, - _codeUnitAt$1: function(receiver, index) { - if (index >= receiver.length) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); - return receiver.charCodeAt(index); - }, - matchAsPrefix$2: function(receiver, string, start) { - var t1, i, _null = null; + matchAsPrefix$2(receiver, string, start) { + var t1, t2, i, t3, _null = null; if (start < 0 || start > string.length) - throw H.wrapException(P.RangeError$range(start, 0, string.length, _null, _null)); + throw A.wrapException(A.RangeError$range(start, 0, string.length, _null, _null)); t1 = receiver.length; - if (start + t1 > string.length) + t2 = string.length; + if (start + t1 > t2) return _null; - for (i = 0; i < t1; ++i) - if (this.codeUnitAt$1(string, start + i) !== this._codeUnitAt$1(receiver, i)) + for (i = 0; i < t1; ++i) { + t3 = start + i; + if (!(t3 >= 0 && t3 < t2)) + return A.ioore(string, t3); + if (string.charCodeAt(t3) !== receiver.charCodeAt(i)) return _null; - return new H.StringMatch(start, receiver); + } + return new A.StringMatch(start, receiver); }, - $add: function(receiver, other) { + $add(receiver, other) { return receiver + other; }, - startsWith$2: function(receiver, pattern, index) { + endsWith$1(receiver, other) { + var otherLength = other.length, + t1 = receiver.length; + if (otherLength > t1) + return false; + return other === this.substring$1(receiver, t1 - otherLength); + }, + startsWith$2(receiver, pattern, index) { var endIndex; - type$.Pattern._as(pattern); if (index < 0 || index > receiver.length) - throw H.wrapException(P.RangeError$range(index, 0, receiver.length, null, null)); + throw A.wrapException(A.RangeError$range(index, 0, receiver.length, null, null)); if (typeof pattern == "string") { endIndex = index + pattern.length; if (endIndex > receiver.length) @@ -4551,31 +4741,23 @@ } return J.matchAsPrefix$2$s(pattern, receiver, index) != null; }, - startsWith$1: function($receiver, pattern) { + startsWith$1($receiver, pattern) { return this.startsWith$2($receiver, pattern, 0); }, - substring$2: function(receiver, startIndex, endIndex) { - if (endIndex == null) - endIndex = receiver.length; - if (startIndex < 0) - throw H.wrapException(P.RangeError$value(startIndex, null)); - if (startIndex > endIndex) - throw H.wrapException(P.RangeError$value(startIndex, null)); - if (endIndex > receiver.length) - throw H.wrapException(P.RangeError$value(endIndex, null)); - return receiver.substring(startIndex, endIndex); - }, - substring$1: function($receiver, startIndex) { - return this.substring$2($receiver, startIndex, null); - }, - $mul: function(receiver, times) { + substring$2(receiver, start, end) { + return receiver.substring(start, A.RangeError_checkValidRange(start, end, receiver.length)); + }, + substring$1($receiver, start) { + return this.substring$2($receiver, start, null); + }, + $mul(receiver, times) { var s, result; if (0 >= times) return ""; if (times === 1 || receiver.length === 0) return receiver; if (times !== times >>> 0) - throw H.wrapException(C.C_OutOfMemoryError); + throw A.wrapException(B.C_OutOfMemoryError); for (s = receiver, result = ""; true;) { if ((times & 1) === 1) result = s + result; @@ -4586,31 +4768,31 @@ } return result; }, - padLeft$2: function(receiver, width, padding) { + padLeft$2(receiver, width, padding) { var delta = width - receiver.length; if (delta <= 0) return receiver; return this.$mul(padding, delta) + receiver; }, - lastIndexOf$2: function(receiver, pattern, start) { + lastIndexOf$2(receiver, pattern, start) { var t1, t2; if (start == null) start = receiver.length; else if (start < 0 || start > receiver.length) - throw H.wrapException(P.RangeError$range(start, 0, receiver.length, null, null)); + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); t1 = pattern.length; t2 = receiver.length; if (start + t1 > t2) start = t2 - t1; return receiver.lastIndexOf(pattern, start); }, - lastIndexOf$1: function($receiver, pattern) { + lastIndexOf$1($receiver, pattern) { return this.lastIndexOf$2($receiver, pattern, null); }, - toString$0: function(receiver) { + toString$0(receiver) { return receiver; }, - get$hashCode: function(receiver) { + get$hashCode(receiver) { var t1, hash, i; for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { hash = hash + receiver.charCodeAt(i) & 536870911; @@ -4621,45 +4803,49 @@ hash ^= hash >> 11; return hash + ((hash & 16383) << 15) & 536870911; }, - get$length: function(receiver) { + get$runtimeType(receiver) { + return A.createRuntimeType(type$.String); + }, + get$length(receiver) { return receiver.length; }, + $isTrustedGetRuntimeType: 1, $isPattern: 1, $isString: 1 }; - H.LateError.prototype = { - toString$0: function(_) { - var t1 = "LateInitializationError: " + this._message; - return t1; + A.LateError.prototype = { + toString$0(_) { + return "LateInitializationError: " + this._message; } }; - H.nullFuture_closure.prototype = { - call$0: function() { - return P.Future_Future$value(null, type$.Null); + A.nullFuture_closure.prototype = { + call$0() { + return A.Future_Future$value(null, type$.Null); }, $signature: 7 }; - H.EfficientLengthIterable.prototype = {}; - H.ListIterable.prototype = { - get$iterator: function(_) { + A.EfficientLengthIterable.prototype = {}; + A.ListIterable.prototype = { + get$iterator(_) { var _this = this; - return new H.ListIterator(_this, _this.get$length(_this), H._instanceType(_this)._eval$1("ListIterator")); + return new A.ListIterator(_this, _this.get$length(_this), A._instanceType(_this)._eval$1("ListIterator")); }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this.get$length(this) === 0; } }; - H.ListIterator.prototype = { - get$current: function() { - return this.$ti._precomputed1._as(this.__internal$_current); + A.ListIterator.prototype = { + get$current() { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; }, - moveNext$0: function() { + moveNext$0() { var t3, _this = this, t1 = _this.__internal$_iterable, t2 = J.getInterceptor$asx(t1), $length = t2.get$length(t1); if (_this.__internal$_length !== $length) - throw H.wrapException(P.ConcurrentModificationError$(t1)); + throw A.wrapException(A.ConcurrentModificationError$(t1)); t3 = _this.__internal$_index; if (t3 >= $length) { _this.set$__internal$_current(null); @@ -4669,13 +4855,13 @@ ++_this.__internal$_index; return true; }, - set$__internal$_current: function(_current) { + set$__internal$_current(_current) { this.__internal$_current = this.$ti._eval$1("1?")._as(_current); } }; - H.FixedLengthListMixin.prototype = {}; - H.TypeErrorDecoder.prototype = { - matchTypeError$1: function(message) { + A.FixedLengthListMixin.prototype = {}; + A.TypeErrorDecoder.prototype = { + matchTypeError$1(message) { var result, t1, _this = this, match = new RegExp(_this._pattern).exec(message); if (match == null) @@ -4699,16 +4885,13 @@ return result; } }; - H.NullError.prototype = { - toString$0: function(_) { - var t1 = this._method; - if (t1 == null) - return "NoSuchMethodError: " + this.__js_helper$_message; - return "NoSuchMethodError: method not found: '" + t1 + "' on null"; + A.NullError.prototype = { + toString$0(_) { + return "Null check operator used on a null value"; } }; - H.JsNoSuchMethodError.prototype = { - toString$0: function(_) { + A.JsNoSuchMethodError.prototype = { + toString$0(_) { var t2, _this = this, _s38_ = "NoSuchMethodError: method not found: '", t1 = _this._method; @@ -4720,20 +4903,20 @@ return _s38_ + t1 + "' on '" + t2 + "' (" + _this.__js_helper$_message + ")"; } }; - H.UnknownJsTypeError.prototype = { - toString$0: function(_) { + A.UnknownJsTypeError.prototype = { + toString$0(_) { var t1 = this.__js_helper$_message; return t1.length === 0 ? "Error" : "Error: " + t1; } }; - H.NullThrownFromJavaScriptException.prototype = { - toString$0: function(_) { + A.NullThrownFromJavaScriptException.prototype = { + toString$0(_) { return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)"; } }; - H.ExceptionAndStackTrace.prototype = {}; - H._StackTrace.prototype = { - toString$0: function(_) { + A.ExceptionAndStackTrace.prototype = {}; + A._StackTrace.prototype = { + toString$0(_) { var trace, t1 = this._trace; if (t1 != null) @@ -4744,131 +4927,123 @@ }, $isStackTrace: 1 }; - H.Closure.prototype = { - toString$0: function(_) { + A.Closure.prototype = { + toString$0(_) { var $constructor = this.constructor, $name = $constructor == null ? null : $constructor.name; - return "Closure '" + H.unminifyOrTag($name == null ? "unknown" : $name) + "'"; + return "Closure '" + A.unminifyOrTag($name == null ? "unknown" : $name) + "'"; }, $isFunction: 1, - get$$call: function() { + get$$call() { return this; }, "call*": "call$1", $requiredArgCount: 1, $defaultValues: null }; - H.TearOffClosure.prototype = {}; - H.StaticClosure.prototype = { - toString$0: function(_) { + A.Closure0Args.prototype = {"call*": "call$0", $requiredArgCount: 0}; + A.Closure2Args.prototype = {"call*": "call$2", $requiredArgCount: 2}; + A.TearOffClosure.prototype = {}; + A.StaticClosure.prototype = { + toString$0(_) { var $name = this.$static_name; if ($name == null) return "Closure of unknown static method"; - return "Closure '" + H.unminifyOrTag($name) + "'"; + return "Closure '" + A.unminifyOrTag($name) + "'"; } }; - H.BoundClosure.prototype = { - $eq: function(_, other) { - var _this = this; + A.BoundClosure.prototype = { + $eq(_, other) { if (other == null) return false; - if (_this === other) + if (this === other) return true; - if (!(other instanceof H.BoundClosure)) + if (!(other instanceof A.BoundClosure)) return false; - return _this._self === other._self && _this.__js_helper$_target === other.__js_helper$_target && _this._receiver === other._receiver; + return this.$_target === other.$_target && this._receiver === other._receiver; }, - get$hashCode: function(_) { - var receiverHashCode, - t1 = this._receiver; - if (t1 == null) - 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; + get$hashCode(_) { + return (A.objectHashCode(this._receiver) ^ A.Primitives_objectHashCode(this.$_target)) >>> 0; }, - toString$0: function(_) { - var receiver = this._receiver; - if (receiver == null) - receiver = this._self; - return "Closure '" + H.S(this._name) + "' of " + ("Instance of '" + H.Primitives_objectTypeName(type$.Object._as(receiver)) + "'"); + toString$0(_) { + return "Closure '" + this.$_name + "' of " + ("Instance of '" + A.Primitives_objectTypeName(this._receiver) + "'"); } }; - H.RuntimeError.prototype = { - toString$0: function(_) { - return "RuntimeError: " + this.message; + A._CyclicInitializationError.prototype = { + toString$0(_) { + return "Reading static variable '" + this.variableName + "' during its initialization"; } }; - H._AssertionError.prototype = { - toString$0: function(_) { - return "Assertion failed: " + P.Error_safeToString(this.message); + A.RuntimeError.prototype = { + toString$0(_) { + return "RuntimeError: " + this.message; } }; - H.JsLinkedHashMap.prototype = { - get$length: function(_) { + A.JsLinkedHashMap.prototype = { + get$length(_) { return this.__js_helper$_length; }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this.__js_helper$_length === 0; }, - get$keys: function() { - return new H.LinkedHashMapKeyIterable(this, H._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>")); + get$keys() { + return new A.LinkedHashMapKeyIterable(this, this.$ti._eval$1("LinkedHashMapKeyIterable<1>")); }, - containsKey$1: function(key) { + containsKey$1(key) { var strings = this._strings; if (strings == null) return false; - return this._containsTableEntry$2(strings, key); + return strings[key] != null; }, - $index: function(_, key) { - var strings, cell, t1, nums, _this = this, _null = null; + $index(_, key) { + var strings, cell, t1, nums, _null = null; if (typeof key == "string") { - strings = _this._strings; + strings = this._strings; if (strings == null) return _null; - cell = _this._getTableCell$2(strings, key); + cell = strings[key]; t1 = cell == null ? _null : cell.hashMapCellValue; return t1; - } else if (typeof key == "number" && (key & 0x3ffffff) === key) { - nums = _this._nums; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this._nums; if (nums == null) return _null; - cell = _this._getTableCell$2(nums, key); + cell = nums[key]; t1 = cell == null ? _null : cell.hashMapCellValue; return t1; } else - return _this.internalGet$1(key); + return this.internalGet$1(key); }, - internalGet$1: function(key) { + internalGet$1(key) { var bucket, index, rest = this.__js_helper$_rest; if (rest == null) return null; - bucket = this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff); + bucket = rest[J.get$hashCode$(key) & 1073741823]; index = this.internalFindBucketIndex$2(bucket, key); if (index < 0) return null; return bucket[index].hashMapCellValue; }, - $indexSet: function(_, key, value) { + $indexSet(_, key, value) { var strings, nums, rest, hash, bucket, index, _this = this, - t1 = H._instanceType(_this); + t1 = _this.$ti; t1._precomputed1._as(key); t1._rest[1]._as(value); if (typeof key == "string") { strings = _this._strings; _this._addHashTableEntry$3(strings == null ? _this._strings = _this._newHashTable$0() : strings, key, value); - } else if (typeof key == "number" && (key & 0x3ffffff) === key) { + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { nums = _this._nums; _this._addHashTableEntry$3(nums == null ? _this._nums = _this._newHashTable$0() : nums, key, value); } else { rest = _this.__js_helper$_rest; if (rest == null) rest = _this.__js_helper$_rest = _this._newHashTable$0(); - hash = J.get$hashCode$(key) & 0x3ffffff; - bucket = _this._getTableBucket$2(rest, hash); + hash = J.get$hashCode$(key) & 1073741823; + bucket = rest[hash]; if (bucket == null) - _this._setTableEntry$3(rest, hash, [_this._newLinkedCell$2(key, value)]); + rest[hash] = [_this._newLinkedCell$2(key, value)]; else { index = _this.internalFindBucketIndex$2(bucket, key); if (index >= 0) @@ -4878,53 +5053,55 @@ } } }, - putIfAbsent$2: function(key, ifAbsent) { - var value, _this = this, - t1 = H._instanceType(_this); + putIfAbsent$2(key, ifAbsent) { + var t2, value, _this = this, + t1 = _this.$ti; t1._precomputed1._as(key); t1._eval$1("2()")._as(ifAbsent); - if (_this.containsKey$1(key)) - return t1._rest[1]._as(_this.$index(0, key)); + if (_this.containsKey$1(key)) { + t2 = _this.$index(0, key); + return t2 == null ? t1._rest[1]._as(t2) : t2; + } value = ifAbsent.call$0(); _this.$indexSet(0, key, value); return value; }, - forEach$1: function(_, action) { + forEach$1(_, action) { var cell, modifications, _this = this; - H._instanceType(_this)._eval$1("~(1,2)")._as(action); + _this.$ti._eval$1("~(1,2)")._as(action); cell = _this._first; modifications = _this._modifications; for (; cell != null;) { action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); if (modifications !== _this._modifications) - throw H.wrapException(P.ConcurrentModificationError$(_this)); + throw A.wrapException(A.ConcurrentModificationError$(_this)); cell = cell._next; } }, - _addHashTableEntry$3: function(table, key, value) { - var cell, _this = this, - t1 = H._instanceType(_this); + _addHashTableEntry$3(table, key, value) { + var cell, + t1 = this.$ti; t1._precomputed1._as(key); t1._rest[1]._as(value); - cell = _this._getTableCell$2(table, key); + cell = table[key]; if (cell == null) - _this._setTableEntry$3(table, key, _this._newLinkedCell$2(key, value)); + table[key] = this._newLinkedCell$2(key, value); else cell.hashMapCellValue = value; }, - _newLinkedCell$2: function(key, value) { + _newLinkedCell$2(key, value) { var _this = this, - t1 = H._instanceType(_this), - cell = new H.LinkedHashMapCell(t1._precomputed1._as(key), t1._rest[1]._as(value)); + t1 = _this.$ti, + cell = new A.LinkedHashMapCell(t1._precomputed1._as(key), t1._rest[1]._as(value)); if (_this._first == null) _this._first = _this._last = cell; else _this._last = _this._last._next = cell; ++_this.__js_helper$_length; - _this._modifications = _this._modifications + 1 & 67108863; + _this._modifications = _this._modifications + 1 & 1073741823; return cell; }, - internalFindBucketIndex$2: function(bucket, key) { + internalFindBucketIndex$2(bucket, key) { var $length, i; if (bucket == null) return -1; @@ -4934,57 +5111,41 @@ return i; return -1; }, - toString$0: function(_) { - return P.MapBase_mapToString(this); + toString$0(_) { + return A.MapBase_mapToString(this); }, - _getTableCell$2: function(table, key) { - return table[key]; - }, - _getTableBucket$2: function(table, key) { - return table[key]; - }, - _setTableEntry$3: function(table, key, value) { - table[key] = value; - }, - _deleteTableEntry$2: function(table, key) { - delete table[key]; - }, - _containsTableEntry$2: function(table, key) { - return this._getTableCell$2(table, key) != null; - }, - _newHashTable$0: function() { - var _s20_ = "", - table = Object.create(null); - this._setTableEntry$3(table, _s20_, table); - this._deleteTableEntry$2(table, _s20_); + _newHashTable$0() { + var table = Object.create(null); + table[""] = table; + delete table[""]; return table; }, $isLinkedHashMap: 1 }; - H.LinkedHashMapCell.prototype = {}; - H.LinkedHashMapKeyIterable.prototype = { - get$length: function(_) { + A.LinkedHashMapCell.prototype = {}; + A.LinkedHashMapKeyIterable.prototype = { + get$length(_) { return this._map.__js_helper$_length; }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this._map.__js_helper$_length === 0; }, - get$iterator: function(_) { + get$iterator(_) { var t1 = this._map, - t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti._eval$1("LinkedHashMapKeyIterator<1>")); + t2 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti._eval$1("LinkedHashMapKeyIterator<1>")); t2._cell = t1._first; return t2; } }; - H.LinkedHashMapKeyIterator.prototype = { - get$current: function() { - return this.$ti._precomputed1._as(this.__js_helper$_current); + A.LinkedHashMapKeyIterator.prototype = { + get$current() { + return this.__js_helper$_current; }, - moveNext$0: function() { + moveNext$0() { var cell, _this = this, t1 = _this._map; if (_this._modifications !== t1._modifications) - throw H.wrapException(P.ConcurrentModificationError$(t1)); + throw A.wrapException(A.ConcurrentModificationError$(t1)); cell = _this._cell; if (cell == null) { _this.set$__js_helper$_current(null); @@ -4995,129 +5156,184 @@ return true; } }, - set$__js_helper$_current: function(_current) { + set$__js_helper$_current(_current) { this.__js_helper$_current = this.$ti._eval$1("1?")._as(_current); } }; - H.initHooks_closure.prototype = { - call$1: function(o) { + A.initHooks_closure.prototype = { + call$1(o) { return this.getTag(o); }, $signature: 8 }; - H.initHooks_closure0.prototype = { - call$2: function(o, tag) { - return this.getUnknownTag(o, tag); + A.initHooks_closure0.prototype = { + call$2(o, tag) { + return this.getUnknownTag(o, tag); + }, + $signature: 12 + }; + A.initHooks_closure1.prototype = { + call$1(tag) { + return this.prototypeForTag(A._asString(tag)); }, $signature: 13 }; - H.initHooks_closure1.prototype = { - call$1: function(tag) { - return this.prototypeForTag(H._asString(tag)); + A.StringMatch.prototype = {}; + A.NativeByteBuffer.prototype = { + get$runtimeType(receiver) { + return B.Type_ByteBuffer_RkP; }, - $signature: 14 + $isTrustedGetRuntimeType: 1 + }; + A.NativeTypedData.prototype = {}; + A.NativeByteData.prototype = { + get$runtimeType(receiver) { + return B.Type_ByteData_zNC; + }, + $isTrustedGetRuntimeType: 1 }; - H.StringMatch.prototype = {}; - H.NativeTypedData.prototype = {}; - H.NativeTypedArray.prototype = { - get$length: function(receiver) { + A.NativeTypedArray.prototype = { + get$length(receiver) { return receiver.length; }, $isJavaScriptIndexingBehavior: 1 }; - H.NativeTypedArrayOfDouble.prototype = { - $index: function(receiver, index) { - H._checkValidIndex(index, receiver, receiver.length); + A.NativeTypedArrayOfDouble.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; }, - $indexSet: function(receiver, index, value) { - H._asInt(index); - H._asDouble(value); - H._checkValidIndex(index, receiver, receiver.length); + $indexSet(receiver, index, value) { + A._asDouble(value); + A._checkValidIndex(index, receiver, receiver.length); receiver[index] = value; }, $isIterable: 1, $isList: 1 }; - H.NativeTypedArrayOfInt.prototype = { - $indexSet: function(receiver, index, value) { - H._asInt(index); - H._asInt(value); - H._checkValidIndex(index, receiver, receiver.length); + A.NativeTypedArrayOfInt.prototype = { + $indexSet(receiver, index, value) { + A._asInt(value); + A._checkValidIndex(index, receiver, receiver.length); receiver[index] = value; }, $isIterable: 1, $isList: 1 }; - H.NativeInt16List.prototype = { - $index: function(receiver, index) { - H._checkValidIndex(index, receiver, receiver.length); + A.NativeFloat32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Float32List_LB7; + }, + $isTrustedGetRuntimeType: 1 + }; + A.NativeFloat64List.prototype = { + get$runtimeType(receiver) { + return B.Type_Float64List_LB7; + }, + $isTrustedGetRuntimeType: 1 + }; + A.NativeInt16List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int16List_uXf; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; - } + }, + $isTrustedGetRuntimeType: 1 }; - H.NativeInt32List.prototype = { - $index: function(receiver, index) { - H._checkValidIndex(index, receiver, receiver.length); + A.NativeInt32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int32List_O50; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; - } + }, + $isTrustedGetRuntimeType: 1 }; - H.NativeInt8List.prototype = { - $index: function(receiver, index) { - H._checkValidIndex(index, receiver, receiver.length); + A.NativeInt8List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int8List_ekJ; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; - } + }, + $isTrustedGetRuntimeType: 1 }; - H.NativeUint16List.prototype = { - $index: function(receiver, index) { - H._checkValidIndex(index, receiver, receiver.length); + A.NativeUint16List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint16List_2bx; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; - } + }, + $isTrustedGetRuntimeType: 1 }; - H.NativeUint32List.prototype = { - $index: function(receiver, index) { - H._checkValidIndex(index, receiver, receiver.length); + A.NativeUint32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint32List_2bx; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; - } + }, + $isTrustedGetRuntimeType: 1 }; - H.NativeUint8ClampedList.prototype = { - get$length: function(receiver) { + A.NativeUint8ClampedList.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint8ClampedList_Jik; + }, + get$length(receiver) { return receiver.length; }, - $index: function(receiver, index) { - H._checkValidIndex(index, receiver, receiver.length); + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; - } + }, + $isTrustedGetRuntimeType: 1 }; - H.NativeUint8List.prototype = { - get$length: function(receiver) { + A.NativeUint8List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint8List_WLA; + }, + get$length(receiver) { return receiver.length; }, - $index: function(receiver, index) { - H._checkValidIndex(index, receiver, receiver.length); + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; - } + }, + $isTrustedGetRuntimeType: 1 }; - H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; - H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; - H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; - H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; - H.Rti.prototype = { - _eval$1: function(recipe) { - return H._Universe_evalInEnvironment(init.typeUniverse, this, recipe); + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A.Rti.prototype = { + _eval$1(recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, this, recipe); }, - _bind$1: function(typeOrTuple) { - return H._Universe_bind(init.typeUniverse, this, typeOrTuple); + _bind$1(typeOrTuple) { + return A._Universe_bind(init.typeUniverse, this, typeOrTuple); + } + }; + A._FunctionParameters.prototype = {}; + A._Type.prototype = { + toString$0(_) { + return A._rtiToString(this._rti, null); } }; - H._FunctionParameters.prototype = {}; - H._Error.prototype = { - toString$0: function(_) { + A._Error.prototype = { + toString$0(_) { return this.__rti$_message; } }; - H._TypeError.prototype = {}; - P._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { - call$1: function(_) { + A._TypeError.prototype = {$isTypeError: 1}; + A._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { + call$1(_) { var t1 = this._box_0, f = t1.storedCallback; t1.storedCallback = null; @@ -5125,36 +5341,36 @@ }, $signature: 4 }; - P._AsyncRun__initializeScheduleImmediate_closure.prototype = { - call$1: function(callback) { + A._AsyncRun__initializeScheduleImmediate_closure.prototype = { + call$1(callback) { var t1, t2; this._box_0.storedCallback = type$.void_Function._as(callback); t1 = this.div; t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 15 + $signature: 14 }; - P._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { - call$0: function() { + A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { + call$0() { this.callback.call$0(); }, $signature: 3 }; - P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { - call$0: function() { + A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { + call$0() { this.callback.call$0(); }, $signature: 3 }; - P._TimerImpl.prototype = { - _TimerImpl$2: function(milliseconds, callback) { + A._TimerImpl.prototype = { + _TimerImpl$2(milliseconds, callback) { if (self.setTimeout != null) - this._handle = self.setTimeout(H.convertDartClosureToJS(new P._TimerImpl_internalCallback(this, callback), 0), milliseconds); + this._handle = self.setTimeout(A.convertDartClosureToJS(new A._TimerImpl_internalCallback(this, callback), 0), milliseconds); else - throw H.wrapException(P.UnsupportedError$("`setTimeout()` not found.")); + throw A.wrapException(A.UnsupportedError$("`setTimeout()` not found.")); }, - cancel$0: function() { + cancel$0() { if (self.setTimeout != null) { var t1 = this._handle; if (t1 == null) @@ -5162,19 +5378,19 @@ self.clearTimeout(t1); this._handle = null; } else - throw H.wrapException(P.UnsupportedError$("Canceling a timer.")); + throw A.wrapException(A.UnsupportedError$("Canceling a timer.")); }, $isTimer: 1 }; - P._TimerImpl_internalCallback.prototype = { - call$0: function() { + A._TimerImpl_internalCallback.prototype = { + call$0() { this.$this._handle = null; this.callback.call$0(); }, $signature: 0 }; - P._AsyncAwaitCompleter.prototype = { - complete$1: function(_, value) { + A._AsyncAwaitCompleter.prototype = { + complete$1(_, value) { var t2, _this = this, t1 = _this.$ti; t1._eval$1("1/?")._as(value); @@ -5187,10 +5403,10 @@ if (t1._eval$1("Future<1>")._is(value)) t2._chainFuture$1(value); else - t2._completeWithValue$1(t1._precomputed1._as(value)); + t2._completeWithValue$1(value); } }, - completeError$2: function(e, st) { + completeError$2(e, st) { var t1 = this._future; if (this.isSync) t1._completeError$2(e, st); @@ -5199,159 +5415,184 @@ }, $isCompleter: 1 }; - P._awaitOnObject_closure.prototype = { - call$1: function(result) { + A._awaitOnObject_closure.prototype = { + call$1(result) { return this.bodyFunction.call$2(0, result); }, $signature: 2 }; - P._awaitOnObject_closure0.prototype = { - call$2: function(error, stackTrace) { - this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); + A._awaitOnObject_closure0.prototype = { + call$2(error, stackTrace) { + this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - $signature: 16 + $signature: 15 }; - P._wrapJsFunctionForAsync_closure.prototype = { - call$2: function(errorCode, result) { - this.$protected(H._asInt(errorCode), result); + A._wrapJsFunctionForAsync_closure.prototype = { + call$2(errorCode, result) { + this.$protected(A._asInt(errorCode), result); }, - $signature: 17 + $signature: 16 }; - P.AsyncError.prototype = { - toString$0: function(_) { - return H.S(this.error); + A.AsyncError.prototype = { + toString$0(_) { + return A.S(this.error); }, $isError: 1, - get$stackTrace: function() { + get$stackTrace() { return this.stackTrace; } }; - P._Completer.prototype = { - completeError$2: function(error, stackTrace) { - H.checkNotNullable(error, "error", type$.Object); - if (this.future._state !== 0) - throw H.wrapException(P.StateError$("Future already completed")); + A._Completer.prototype = { + completeError$2(error, stackTrace) { + A.checkNotNullable(error, "error", type$.Object); + if ((this.future._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); if (stackTrace == null) - stackTrace = P.AsyncError_defaultStackTrace(error); + stackTrace = A.AsyncError_defaultStackTrace(error); this._completeError$2(error, stackTrace); }, - completeError$1: function(error) { + completeError$1(error) { return this.completeError$2(error, null); }, $isCompleter: 1 }; - P._AsyncCompleter.prototype = { - complete$1: function(_, value) { + A._AsyncCompleter.prototype = { + complete$1(_, value) { var t2, t1 = this.$ti; t1._eval$1("1/?")._as(value); t2 = this.future; - if (t2._state !== 0) - throw H.wrapException(P.StateError$("Future already completed")); + if ((t2._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); t2._asyncComplete$1(t1._eval$1("1/")._as(value)); }, - complete$0: function($receiver) { + complete$0($receiver) { return this.complete$1($receiver, null); }, - _completeError$2: function(error, stackTrace) { + _completeError$2(error, stackTrace) { this.future._asyncCompleteError$2(error, stackTrace); } }; - P._SyncCompleter.prototype = { - complete$1: function(_, value) { + A._SyncCompleter.prototype = { + complete$1(_, value) { var t2, t1 = this.$ti; t1._eval$1("1/?")._as(value); t2 = this.future; - if (t2._state !== 0) - throw H.wrapException(P.StateError$("Future already completed")); + if ((t2._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); t2._complete$1(t1._eval$1("1/")._as(value)); }, - _completeError$2: function(error, stackTrace) { + _completeError$2(error, stackTrace) { this.future._completeError$2(error, stackTrace); } }; - P._FutureListener.prototype = { - matchesErrorTest$1: function(asyncError) { + A._FutureListener.prototype = { + matchesErrorTest$1(asyncError) { if ((this.state & 15) !== 6) return true; return this.result._zone.runUnary$2$2(type$.bool_Function_Object._as(this.callback), asyncError.error, type$.bool, type$.Object); }, - handleError$1: function(asyncError) { - var errorCallback = this.errorCallback, + handleError$1(asyncError) { + var exception, _this = this, + errorCallback = _this.errorCallback, + result = null, t1 = type$.dynamic, t2 = type$.Object, t3 = asyncError.error, - t4 = this.$ti._eval$1("2/"), - t5 = this.result._zone; + t4 = _this.result._zone; if (type$.dynamic_Function_Object_StackTrace._is(errorCallback)) - return t4._as(t5.runBinary$3$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type$.StackTrace)); + result = t4.runBinary$3$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type$.StackTrace); else - return t4._as(t5.runUnary$2$2(type$.dynamic_Function_Object._as(errorCallback), t3, t1, t2)); + result = t4.runUnary$2$2(type$.dynamic_Function_Object._as(errorCallback), t3, t1, t2); + try { + t1 = _this.$ti._eval$1("2/")._as(result); + return t1; + } catch (exception) { + if (type$.TypeError._is(A.unwrapException(exception))) { + if ((_this.state & 1) !== 0) + throw A.wrapException(A.ArgumentError$("The error handler of Future.then must return a value of the returned future's type", "onError")); + throw A.wrapException(A.ArgumentError$("The error handler of Future.catchError must return a value of the future's type", "onError")); + } else + throw exception; + } } }; - P._Future.prototype = { - then$1$2$onError: function(f, onError, $R) { + A._Future.prototype = { + _setChained$1(source) { + this._state = this._state & 1 | 4; + this._resultOrListeners = source; + }, + then$1$2$onError(f, onError, $R) { var currentZone, result, t2, t1 = this.$ti; t1._bind$1($R)._eval$1("1/(2)")._as(f); currentZone = $.Zone__current; - if (currentZone !== C.C__RootZone) { + if (currentZone === B.C__RootZone) { + if (onError != null && !type$.dynamic_Function_Object_StackTrace._is(onError) && !type$.dynamic_Function_Object._is(onError)) + throw A.wrapException(A.ArgumentError$value(onError, "onError", string$.Error_)); + } else { $R._eval$1("@<0/>")._bind$1(t1._precomputed1)._eval$1("1(2)")._as(f); if (onError != null) - onError = P._registerErrorHandler(onError, currentZone); + onError = A._registerErrorHandler(onError, currentZone); } - result = new P._Future(currentZone, $R._eval$1("_Future<0>")); + result = new A._Future(currentZone, $R._eval$1("_Future<0>")); t2 = onError == null ? 1 : 3; - this._addListener$1(new P._FutureListener(result, t2, f, onError, t1._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>"))); + this._addListener$1(new A._FutureListener(result, t2, f, onError, t1._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>"))); return result; }, - then$1$1: function(f, $R) { + then$1$1(f, $R) { return this.then$1$2$onError(f, null, $R); }, - _thenAwait$1$2: function(f, onError, $E) { + _thenAwait$1$2(f, onError, $E) { var result, t1 = this.$ti; t1._bind$1($E)._eval$1("1/(2)")._as(f); - result = new P._Future($.Zone__current, $E._eval$1("_Future<0>")); - this._addListener$1(new P._FutureListener(result, 19, f, onError, t1._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>"))); + result = new A._Future($.Zone__current, $E._eval$1("_Future<0>")); + this._addListener$1(new A._FutureListener(result, 19, f, onError, t1._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>"))); return result; }, - whenComplete$1: function(action) { + whenComplete$1(action) { var t1, result; type$.dynamic_Function._as(action); t1 = this.$ti; - result = new P._Future($.Zone__current, t1); - this._addListener$1(new P._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>"))); + result = new A._Future($.Zone__current, t1); + this._addListener$1(new A._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>"))); return result; }, - _addListener$1: function(listener) { + _setErrorObject$1(error) { + this._state = this._state & 1 | 16; + this._resultOrListeners = error; + }, + _cloneResult$1(source) { + this._state = source._state & 30 | this._state & 1; + this._resultOrListeners = source._resultOrListeners; + }, + _addListener$1(listener) { var source, _this = this, t1 = _this._state; - if (t1 <= 1) { + if (t1 <= 3) { listener._nextListener = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners); _this._resultOrListeners = listener; } else { - if (t1 === 2) { + if ((t1 & 4) !== 0) { source = type$._Future_dynamic._as(_this._resultOrListeners); - t1 = source._state; - if (t1 < 4) { + if ((source._state & 24) === 0) { source._addListener$1(listener); return; } - _this._state = t1; - _this._resultOrListeners = source._resultOrListeners; + _this._cloneResult$1(source); } - P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__addListener_closure(_this, listener))); + A._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new A._Future__addListener_closure(_this, listener))); } }, - _prependListeners$1: function(listeners) { + _prependListeners$1(listeners) { var t1, existingListeners, next, cursor, next0, source, _this = this, _box_0 = {}; _box_0.listeners = listeners; if (listeners == null) return; t1 = _this._state; - if (t1 <= 1) { + if (t1 <= 3) { existingListeners = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners); _this._resultOrListeners = listeners; if (existingListeners != null) { @@ -5361,26 +5602,24 @@ cursor._nextListener = existingListeners; } } else { - if (t1 === 2) { + if ((t1 & 4) !== 0) { source = type$._Future_dynamic._as(_this._resultOrListeners); - t1 = source._state; - if (t1 < 4) { + if ((source._state & 24) === 0) { source._prependListeners$1(listeners); return; } - _this._state = t1; - _this._resultOrListeners = source._resultOrListeners; + _this._cloneResult$1(source); } _box_0.listeners = _this._reverseListeners$1(listeners); - P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__prependListeners_closure(_box_0, _this))); + A._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new A._Future__prependListeners_closure(_box_0, _this))); } }, - _removeListeners$0: function() { + _removeListeners$0() { var current = type$.nullable__FutureListener_dynamic_dynamic._as(this._resultOrListeners); this._resultOrListeners = null; return this._reverseListeners$1(current); }, - _reverseListeners$1: function(listeners) { + _reverseListeners$1(listeners) { var current, prev, next; for (current = listeners, prev = null; current != null; prev = current, current = next) { next = current._nextListener; @@ -5388,188 +5627,181 @@ } return prev; }, - _chainForeignFuture$1: function(source) { + _chainForeignFuture$1(source) { var e, s, exception, _this = this; - _this._state = 1; + _this._state ^= 2; try { - source.then$1$2$onError(new P._Future__chainForeignFuture_closure(_this), new P._Future__chainForeignFuture_closure0(_this), type$.Null); + source.then$1$2$onError(new A._Future__chainForeignFuture_closure(_this), new A._Future__chainForeignFuture_closure0(_this), type$.Null); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(_this, e, s)); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A.scheduleMicrotask(new A._Future__chainForeignFuture_closure1(_this, e, s)); } }, - _complete$1: function(value) { + _complete$1(value) { var listeners, _this = this, t1 = _this.$ti; t1._eval$1("1/")._as(value); if (t1._eval$1("Future<1>")._is(value)) if (t1._is(value)) - P._Future__chainCoreFuture(value, _this); + A._Future__chainCoreFutureSync(value, _this); else _this._chainForeignFuture$1(value); else { listeners = _this._removeListeners$0(); t1._precomputed1._as(value); - _this._state = 4; + _this._state = 8; _this._resultOrListeners = value; - P._Future__propagateToListeners(_this, listeners); + A._Future__propagateToListeners(_this, listeners); } }, - _completeWithValue$1: function(value) { + _completeWithValue$1(value) { var listeners, _this = this; _this.$ti._precomputed1._as(value); listeners = _this._removeListeners$0(); - _this._state = 4; + _this._state = 8; _this._resultOrListeners = value; - P._Future__propagateToListeners(_this, listeners); + A._Future__propagateToListeners(_this, listeners); }, - _completeError$2: function(error, stackTrace) { - var listeners, t1, _this = this; + _completeError$2(error, stackTrace) { + var listeners; type$.Object._as(error); type$.StackTrace._as(stackTrace); - listeners = _this._removeListeners$0(); - t1 = P.AsyncError$(error, stackTrace); - _this._state = 8; - _this._resultOrListeners = t1; - P._Future__propagateToListeners(_this, listeners); + listeners = this._removeListeners$0(); + this._setErrorObject$1(A.AsyncError$(error, stackTrace)); + A._Future__propagateToListeners(this, listeners); }, - _asyncComplete$1: function(value) { + _asyncComplete$1(value) { var t1 = this.$ti; t1._eval$1("1/")._as(value); if (t1._eval$1("Future<1>")._is(value)) { this._chainFuture$1(value); return; } - this._asyncCompleteWithValue$1(t1._precomputed1._as(value)); + this._asyncCompleteWithValue$1(value); }, - _asyncCompleteWithValue$1: function(value) { + _asyncCompleteWithValue$1(value) { var _this = this; _this.$ti._precomputed1._as(value); - _this._state = 1; - P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__asyncCompleteWithValue_closure(_this, value))); + _this._state ^= 2; + A._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new A._Future__asyncCompleteWithValue_closure(_this, value))); }, - _chainFuture$1: function(value) { - var _this = this, - t1 = _this.$ti; + _chainFuture$1(value) { + var t1 = this.$ti; t1._eval$1("Future<1>")._as(value); if (t1._is(value)) { - if (value._state === 8) { - _this._state = 1; - P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__chainFuture_closure(_this, value))); - } else - P._Future__chainCoreFuture(value, _this); + A._Future__chainCoreFutureAsync(value, this); return; } - _this._chainForeignFuture$1(value); + this._chainForeignFuture$1(value); }, - _asyncCompleteError$2: function(error, stackTrace) { + _asyncCompleteError$2(error, stackTrace) { type$.StackTrace._as(stackTrace); - this._state = 1; - P._rootScheduleMicrotask(null, null, this._zone, type$.void_Function._as(new P._Future__asyncCompleteError_closure(this, error, stackTrace))); + this._state ^= 2; + A._rootScheduleMicrotask(null, null, this._zone, type$.void_Function._as(new A._Future__asyncCompleteError_closure(this, error, stackTrace))); }, $isFuture: 1 }; - P._Future__addListener_closure.prototype = { - call$0: function() { - P._Future__propagateToListeners(this.$this, this.listener); + A._Future__addListener_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this.listener); }, $signature: 0 }; - P._Future__prependListeners_closure.prototype = { - call$0: function() { - P._Future__propagateToListeners(this.$this, this._box_0.listeners); + A._Future__prependListeners_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this._box_0.listeners); }, $signature: 0 }; - P._Future__chainForeignFuture_closure.prototype = { - call$1: function(value) { + A._Future__chainForeignFuture_closure.prototype = { + call$1(value) { var error, stackTrace, exception, t1 = this.$this; - t1._state = 0; + t1._state ^= 2; try { t1._completeWithValue$1(t1.$ti._precomputed1._as(value)); } catch (exception) { - error = H.unwrapException(exception); - stackTrace = H.getTraceFromException(exception); + error = A.unwrapException(exception); + stackTrace = A.getTraceFromException(exception); t1._completeError$2(error, stackTrace); } }, $signature: 4 }; - P._Future__chainForeignFuture_closure0.prototype = { - call$2: function(error, stackTrace) { + A._Future__chainForeignFuture_closure0.prototype = { + call$2(error, stackTrace) { this.$this._completeError$2(type$.Object._as(error), type$.StackTrace._as(stackTrace)); }, $signature: 5 }; - P._Future__chainForeignFuture_closure1.prototype = { - call$0: function() { + A._Future__chainForeignFuture_closure1.prototype = { + call$0() { this.$this._completeError$2(this.e, this.s); }, $signature: 0 }; - P._Future__asyncCompleteWithValue_closure.prototype = { - call$0: function() { - this.$this._completeWithValue$1(this.value); + A._Future__chainCoreFutureAsync_closure.prototype = { + call$0() { + A._Future__chainCoreFutureSync(this._box_0.source, this.target); }, $signature: 0 }; - P._Future__chainFuture_closure.prototype = { - call$0: function() { - P._Future__chainCoreFuture(this.value, this.$this); + A._Future__asyncCompleteWithValue_closure.prototype = { + call$0() { + this.$this._completeWithValue$1(this.value); }, $signature: 0 }; - P._Future__asyncCompleteError_closure.prototype = { - call$0: function() { + A._Future__asyncCompleteError_closure.prototype = { + call$0() { this.$this._completeError$2(this.error, this.stackTrace); }, $signature: 0 }; - P._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { - call$0: function() { + A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { + call$0() { var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null; try { t1 = _this._box_0.listener; completeResult = t1.result._zone.run$1$1(type$.dynamic_Function._as(t1.callback), type$.dynamic); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); t1 = _this.hasError && type$.AsyncError._as(_this._box_1.source._resultOrListeners).error === e; t2 = _this._box_0; if (t1) t2.listenerValueOrError = type$.AsyncError._as(_this._box_1.source._resultOrListeners); else - t2.listenerValueOrError = P.AsyncError$(e, s); + t2.listenerValueOrError = A.AsyncError$(e, s); t2.listenerHasError = true; return; } - if (completeResult instanceof P._Future && completeResult._state >= 4) { - if (completeResult._state === 8) { + if (completeResult instanceof A._Future && (completeResult._state & 24) !== 0) { + if ((completeResult._state & 16) !== 0) { t1 = _this._box_0; t1.listenerValueOrError = type$.AsyncError._as(completeResult._resultOrListeners); t1.listenerHasError = true; } return; } - if (type$.Future_dynamic._is(completeResult)) { + if (completeResult instanceof A._Future) { originalSource = _this._box_1.source; t1 = _this._box_0; - t1.listenerValueOrError = completeResult.then$1$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic); + t1.listenerValueOrError = completeResult.then$1$1(new A._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic); t1.listenerHasError = false; } }, $signature: 0 }; - P._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { - call$1: function(_) { + A._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { + call$1(_) { return this.originalSource; }, - $signature: 19 + $signature: 17 }; - P._Future__propagateToListeners_handleValueCallback.prototype = { - call$0: function() { + A._Future__propagateToListeners_handleValueCallback.prototype = { + call$0() { var e, s, t1, t2, t3, t4, t5, exception; try { t1 = this._box_0; @@ -5579,17 +5811,17 @@ t5 = t4._as(this.sourceResult); t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t3._eval$1("2/(1)")._as(t2.callback), t5, t3._eval$1("2/"), t4); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); t1 = this._box_0; - t1.listenerValueOrError = P.AsyncError$(e, s); + t1.listenerValueOrError = A.AsyncError$(e, s); t1.listenerHasError = true; } }, $signature: 0 }; - P._Future__propagateToListeners_handleError.prototype = { - call$0: function() { + A._Future__propagateToListeners_handleError.prototype = { + call$0() { var asyncError, e, s, t1, exception, t2, _this = this; try { asyncError = type$.AsyncError._as(_this._box_1.source._resultOrListeners); @@ -5599,155 +5831,153 @@ t1.listenerHasError = false; } } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners); t2 = _this._box_0; if (t1.error === e) t2.listenerValueOrError = t1; else - t2.listenerValueOrError = P.AsyncError$(e, s); + t2.listenerValueOrError = A.AsyncError$(e, s); t2.listenerHasError = true; } }, $signature: 0 }; - P._AsyncCallbackEntry.prototype = {}; - P.Stream.prototype = { - get$length: function(_) { + A._AsyncCallbackEntry.prototype = {}; + A.Stream.prototype = { + get$length(_) { var t1 = {}, - future = new P._Future($.Zone__current, type$._Future_int); + future = new A._Future($.Zone__current, type$._Future_int); t1.count = 0; - this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1, this), true, new P.Stream_length_closure0(t1, future), future.get$_completeError()); + this.listen$4$cancelOnError$onDone$onError(new A.Stream_length_closure(t1, this), true, new A.Stream_length_closure0(t1, future), future.get$_completeError()); return future; }, - get$first: function(_) { - var future = new P._Future($.Zone__current, H._instanceType(this)._eval$1("_Future<1>")), - subscription = this.listen$4$cancelOnError$onDone$onError(null, true, new P.Stream_first_closure(future), future.get$_completeError()); - subscription.onData$1(new P.Stream_first_closure0(this, subscription, future)); + get$first(_) { + var future = new A._Future($.Zone__current, A._instanceType(this)._eval$1("_Future<1>")), + subscription = this.listen$4$cancelOnError$onDone$onError(null, true, new A.Stream_first_closure(future), future.get$_completeError()); + subscription.onData$1(new A.Stream_first_closure0(this, subscription, future)); return future; } }; - P.Stream_length_closure.prototype = { - call$1: function(_) { - H._instanceType(this.$this)._precomputed1._as(_); + A.Stream_length_closure.prototype = { + call$1(_) { + A._instanceType(this.$this)._precomputed1._as(_); ++this._box_0.count; }, - $signature: function() { - return H._instanceType(this.$this)._eval$1("~(1)"); + $signature() { + return A._instanceType(this.$this)._eval$1("~(1)"); } }; - P.Stream_length_closure0.prototype = { - call$0: function() { + A.Stream_length_closure0.prototype = { + call$0() { this.future._complete$1(this._box_0.count); }, $signature: 0 }; - P.Stream_first_closure.prototype = { - call$0: function() { + A.Stream_first_closure.prototype = { + call$0() { var e, s, t1, exception, stackTrace; try { - t1 = H.IterableElementError_noElement(); - throw H.wrapException(t1); + t1 = A.IterableElementError_noElement(); + throw A.wrapException(t1); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); t1 = e; stackTrace = s; if (stackTrace == null) - stackTrace = P.AsyncError_defaultStackTrace(t1); + stackTrace = A.AsyncError_defaultStackTrace(t1); this.future._completeError$2(t1, stackTrace); } }, $signature: 0 }; - P.Stream_first_closure0.prototype = { - call$1: function(value) { - P._cancelAndValue(this.subscription, this.future, H._instanceType(this.$this)._precomputed1._as(value)); + A.Stream_first_closure0.prototype = { + call$1(value) { + A._cancelAndValue(this.subscription, this.future, A._instanceType(this.$this)._precomputed1._as(value)); }, - $signature: function() { - return H._instanceType(this.$this)._eval$1("~(1)"); + $signature() { + return A._instanceType(this.$this)._eval$1("~(1)"); } }; - P.StreamSubscription.prototype = {}; - P.StreamTransformerBase.prototype = {}; - P._StreamController.prototype = { - get$_pendingEvents: function() { + A._StreamController.prototype = { + get$_pendingEvents() { var t1, _this = this; if ((_this._state & 8) === 0) - return H._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(_this._varData); - t1 = H._instanceType(_this); + return A._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(_this._varData); + t1 = A._instanceType(_this); return t1._eval$1("_PendingEvents<1>?")._as(t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData()); }, - _ensurePendingEvents$0: function() { + _ensurePendingEvents$0() { var events, t1, _this = this; if ((_this._state & 8) === 0) { events = _this._varData; if (events == null) - events = _this._varData = new P._StreamImplEvents(H._instanceType(_this)._eval$1("_StreamImplEvents<1>")); - return H._instanceType(_this)._eval$1("_StreamImplEvents<1>")._as(events); + events = _this._varData = new A._PendingEvents(A._instanceType(_this)._eval$1("_PendingEvents<1>")); + return A._instanceType(_this)._eval$1("_PendingEvents<1>")._as(events); } - t1 = H._instanceType(_this); + t1 = A._instanceType(_this); events = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData(); - return t1._eval$1("_StreamImplEvents<1>")._as(events); + return t1._eval$1("_PendingEvents<1>")._as(events); }, - get$_subscription: function() { + get$_subscription() { var varData = this._varData; if ((this._state & 8) !== 0) varData = type$._StreamControllerAddStreamState_nullable_Object._as(varData).get$varData(); - return H._instanceType(this)._eval$1("_ControllerSubscription<1>")._as(varData); + return A._instanceType(this)._eval$1("_ControllerSubscription<1>")._as(varData); }, - _badEventState$0: function() { + _badEventState$0() { 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"); + return new A.StateError("Cannot add event after closing"); + return new A.StateError("Cannot add event while adding a stream"); }, - _ensureDoneFuture$0: function() { + _ensureDoneFuture$0() { var t1 = this._doneFuture; if (t1 == null) - t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new P._Future($.Zone__current, type$._Future_void); + t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new A._Future($.Zone__current, type$._Future_void); return t1; }, - add$1: function(_, value) { + add$1(_, value) { var t2, _this = this, - t1 = H._instanceType(_this); + t1 = A._instanceType(_this); t1._precomputed1._as(value); t2 = _this._state; if (t2 >= 4) - throw H.wrapException(_this._badEventState$0()); + throw A.wrapException(_this._badEventState$0()); if ((t2 & 1) !== 0) _this._sendData$1(value); else if ((t2 & 3) === 0) - _this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, t1._eval$1("_DelayedData<1>"))); + _this._ensurePendingEvents$0().add$1(0, new A._DelayedData(value, t1._eval$1("_DelayedData<1>"))); }, - close$0: function(_) { + close$0(_) { var _this = this, t1 = _this._state; if ((t1 & 4) !== 0) return _this._ensureDoneFuture$0(); if (t1 >= 4) - throw H.wrapException(_this._badEventState$0()); + throw A.wrapException(_this._badEventState$0()); t1 = _this._state = t1 | 4; if ((t1 & 1) !== 0) _this._sendDone$0(); else if ((t1 & 3) === 0) - _this._ensurePendingEvents$0().add$1(0, C.C__DelayedDone); + _this._ensurePendingEvents$0().add$1(0, B.C__DelayedDone); return _this._ensureDoneFuture$0(); }, - _subscribe$4: function(onData, onError, onDone, cancelOnError) { + _subscribe$4(onData, onError, onDone, cancelOnError) { var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this, - t1 = H._instanceType(_this); + t1 = A._instanceType(_this); t1._eval$1("~(1)?")._as(onData); type$.nullable_void_Function._as(onDone); if ((_this._state & 3) !== 0) - throw H.wrapException(P.StateError$("Stream has already been listened to.")); + throw A.wrapException(A.StateError$("Stream has already been listened to.")); t2 = $.Zone__current; t3 = cancelOnError ? 1 : 0; - t4 = P._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1); - t5 = P._BufferingStreamSubscription__registerErrorHandler(t2, onError); - t6 = onDone == null ? P.async___nullDoneHandler$closure() : onDone; + t4 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1); + t5 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError); + t6 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; t7 = type$.void_Function; - subscription = new P._ControllerSubscription(_this, t4, t5, t7._as(t6), t2, t3, t1._eval$1("_ControllerSubscription<1>")); + subscription = new A._ControllerSubscription(_this, t4, t5, t7._as(t6), t2, t3, t1._eval$1("_ControllerSubscription<1>")); pendingEvents = _this.get$_pendingEvents(); t3 = _this._state |= 1; if ((t3 & 8) !== 0) { @@ -5757,7 +5987,7 @@ } else _this._varData = subscription; subscription._setPendingEvents$1(pendingEvents); - t1 = t7._as(new P._StreamController__subscribe_closure(_this)); + t1 = t7._as(new A._StreamController__subscribe_closure(_this)); t2 = subscription._state; subscription._state = t2 | 32; t1.call$0(); @@ -5765,9 +5995,9 @@ subscription._checkState$1((t2 & 4) !== 0); return subscription; }, - _recordCancel$1: function(subscription) { + _recordCancel$1(subscription) { var result, onCancel, cancelResult, e, s, exception, result0, _this = this, - t1 = H._instanceType(_this); + t1 = A._instanceType(_this); t1._eval$1("StreamSubscription<1>")._as(subscription); result = null; if ((_this._state & 8) !== 0) @@ -5779,18 +6009,18 @@ if (result == null) try { cancelResult = onCancel.call$0(); - if (type$.Future_void._is(cancelResult)) + if (cancelResult instanceof A._Future) result = cancelResult; } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - result0 = new P._Future($.Zone__current, type$._Future_void); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + result0 = new A._Future($.Zone__current, type$._Future_void); result0._asyncCompleteError$2(e, s); result = result0; } else result = result.whenComplete$1(onCancel); - t1 = new P._StreamController__recordCancel_complete(_this); + t1 = new A._StreamController__recordCancel_complete(_this); if (result != null) result = result.whenComplete$1(t1); else @@ -5801,72 +6031,72 @@ $is_StreamControllerLifecycle: 1, $is_EventDispatch: 1 }; - P._StreamController__subscribe_closure.prototype = { - call$0: function() { - P._runGuarded(this.$this.onListen); + A._StreamController__subscribe_closure.prototype = { + call$0() { + A._runGuarded(this.$this.onListen); }, $signature: 0 }; - P._StreamController__recordCancel_complete.prototype = { - call$0: function() { + A._StreamController__recordCancel_complete.prototype = { + call$0() { var doneFuture = this.$this._doneFuture; - if (doneFuture != null && doneFuture._state === 0) + if (doneFuture != null && (doneFuture._state & 30) === 0) doneFuture._asyncComplete$1(null); }, $signature: 0 }; - P._AsyncStreamControllerDispatch.prototype = { - _sendData$1: function(data) { + A._AsyncStreamControllerDispatch.prototype = { + _sendData$1(data) { var t1 = this.$ti; t1._precomputed1._as(data); - this.get$_subscription()._addPending$1(new P._DelayedData(data, t1._eval$1("_DelayedData<1>"))); + this.get$_subscription()._addPending$1(new A._DelayedData(data, t1._eval$1("_DelayedData<1>"))); }, - _sendError$2: function(error, stackTrace) { - this.get$_subscription()._addPending$1(new P._DelayedError(error, stackTrace)); + _sendError$2(error, stackTrace) { + this.get$_subscription()._addPending$1(new A._DelayedError(error, stackTrace)); }, - _sendDone$0: function() { - this.get$_subscription()._addPending$1(C.C__DelayedDone); + _sendDone$0() { + this.get$_subscription()._addPending$1(B.C__DelayedDone); } }; - P._AsyncStreamController.prototype = {}; - P._ControllerStream.prototype = { - get$hashCode: function(_) { - return (H.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; + A._AsyncStreamController.prototype = {}; + A._ControllerStream.prototype = { + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; }, - $eq: function(_, other) { + $eq(_, other) { if (other == null) return false; if (this === other) return true; - return other instanceof P._ControllerStream && other._controller === this._controller; + return other instanceof A._ControllerStream && other._controller === this._controller; } }; - P._ControllerSubscription.prototype = { - _onCancel$0: function() { + A._ControllerSubscription.prototype = { + _onCancel$0() { return this._controller._recordCancel$1(this); }, - _onPause$0: function() { + _onPause$0() { var t1 = this._controller, - t2 = H._instanceType(t1); + t2 = A._instanceType(t1); t2._eval$1("StreamSubscription<1>")._as(this); if ((t1._state & 8) !== 0) t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).pause$0(0); - P._runGuarded(t1.onPause); + A._runGuarded(t1.onPause); }, - _onResume$0: function() { + _onResume$0() { var t1 = this._controller, - t2 = H._instanceType(t1); + t2 = A._instanceType(t1); t2._eval$1("StreamSubscription<1>")._as(this); if ((t1._state & 8) !== 0) t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).resume$0(); - P._runGuarded(t1.onResume); + A._runGuarded(t1.onResume); } }; - P._StreamSinkWrapper.prototype = {}; - P._BufferingStreamSubscription.prototype = { - _setPendingEvents$1: function(pendingEvents) { + A._StreamSinkWrapper.prototype = {}; + A._BufferingStreamSubscription.prototype = { + _setPendingEvents$1(pendingEvents) { var _this = this; - H._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(pendingEvents); + A._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(pendingEvents); if (pendingEvents == null) return; _this.set$_pending(pendingEvents); @@ -5875,30 +6105,30 @@ pendingEvents.schedule$1(_this); } }, - onData$1: function(handleData) { - var t1 = H._instanceType(this); - this.set$_onData(P._BufferingStreamSubscription__registerDataHandler(this._zone, t1._eval$1("~(1)?")._as(handleData), t1._precomputed1)); + onData$1(handleData) { + var t1 = A._instanceType(this); + this.set$_onData(A._BufferingStreamSubscription__registerDataHandler(this._zone, t1._eval$1("~(1)?")._as(handleData), t1._precomputed1)); }, - cancel$0: function() { + cancel$0() { var t1 = this._state &= 4294967279; if ((t1 & 8) === 0) this._cancel$0(); t1 = this._cancelFuture; return t1 == null ? $.$get$Future__nullFuture() : t1; }, - asFuture$1$1: function(futureValue, $E) { + asFuture$1$1(futureValue, $E) { var result, t1 = {}; - $E._eval$1("0?")._as(futureValue); t1.resultValue = null; if (!$E._is(null)) - throw H.wrapException(P.ArgumentError$notNull("futureValue")); - t1.resultValue = $E._as(futureValue); - result = new P._Future($.Zone__current, $E._eval$1("_Future<0>")); - this.set$_onDone(new P._BufferingStreamSubscription_asFuture_closure(t1, result)); - this._onError = new P._BufferingStreamSubscription_asFuture_closure0(this, result); + throw A.wrapException(A.ArgumentError$notNull("futureValue")); + $E._as(futureValue); + t1.resultValue = futureValue; + result = new A._Future($.Zone__current, $E._eval$1("_Future<0>")); + this.set$_onDone(new A._BufferingStreamSubscription_asFuture_closure(t1, result)); + this._onError = new A._BufferingStreamSubscription_asFuture_closure0(this, result); return result; }, - _cancel$0: function() { + _cancel$0() { var t2, _this = this, t1 = _this._state |= 8; if ((t1 & 64) !== 0) { @@ -5910,20 +6140,20 @@ _this.set$_pending(null); _this._cancelFuture = _this._onCancel$0(); }, - _onPause$0: function() { + _onPause$0() { }, - _onResume$0: function() { + _onResume$0() { }, - _onCancel$0: function() { + _onCancel$0() { return null; }, - _addPending$1: function($event) { - var _this = this, - t1 = H._instanceType(_this), - pending = t1._eval$1("_StreamImplEvents<1>?")._as(_this._pending); - if (pending == null) - pending = new P._StreamImplEvents(t1._eval$1("_StreamImplEvents<1>")); - _this.set$_pending(pending); + _addPending$1($event) { + var t1, _this = this, + pending = _this._pending; + if (pending == null) { + pending = new A._PendingEvents(A._instanceType(_this)._eval$1("_PendingEvents<1>")); + _this.set$_pending(pending); + } pending.add$1(0, $event); t1 = _this._state; if ((t1 & 64) === 0) { @@ -5933,9 +6163,9 @@ pending.schedule$1(_this); } }, - _sendData$1: function(data) { + _sendData$1(data) { var t2, _this = this, - t1 = H._instanceType(_this)._precomputed1; + t1 = A._instanceType(_this)._precomputed1; t1._as(data); t2 = _this._state; _this._state = t2 | 32; @@ -5943,10 +6173,10 @@ _this._state &= 4294967263; _this._checkState$1((t2 & 4) !== 0); }, - _sendError$2: function(error, stackTrace) { + _sendError$2(error, stackTrace) { var cancelFuture, _this = this, t1 = _this._state, - t2 = new P._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); + t2 = new A._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); if ((t1 & 1) !== 0) { _this._state = t1 | 16; _this._cancel$0(); @@ -5960,9 +6190,9 @@ _this._checkState$1((t1 & 4) !== 0); } }, - _sendDone$0: function() { + _sendDone$0() { var cancelFuture, _this = this, - t1 = new P._BufferingStreamSubscription__sendDone_sendDone(_this); + t1 = new A._BufferingStreamSubscription__sendDone_sendDone(_this); _this._cancel$0(); _this._state |= 16; cancelFuture = _this._cancelFuture; @@ -5971,7 +6201,7 @@ else t1.call$0(); }, - _checkState$1: function(wasInputPaused) { + _checkState$1(wasInputPaused) { var t2, isInputPaused, _this = this, t1 = _this._state; if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent == null) { @@ -6008,43 +6238,43 @@ if ((t1 & 64) !== 0 && t1 < 128) _this._pending.schedule$1(_this); }, - set$_onData: function(_onData) { - this._onData = H._instanceType(this)._eval$1("~(1)")._as(_onData); + set$_onData(_onData) { + this._onData = A._instanceType(this)._eval$1("~(1)")._as(_onData); }, - set$_onDone: function(_onDone) { + set$_onDone(_onDone) { this._onDone = type$.void_Function._as(_onDone); }, - set$_pending: function(_pending) { - this._pending = H._instanceType(this)._eval$1("_PendingEvents<1>?")._as(_pending); + set$_pending(_pending) { + this._pending = A._instanceType(this)._eval$1("_PendingEvents<1>?")._as(_pending); }, $isStreamSubscription: 1, $is_EventDispatch: 1 }; - P._BufferingStreamSubscription_asFuture_closure.prototype = { - call$0: function() { + A._BufferingStreamSubscription_asFuture_closure.prototype = { + call$0() { this.result._complete$1(this._box_0.resultValue); }, $signature: 0 }; - P._BufferingStreamSubscription_asFuture_closure0.prototype = { - call$2: function(error, stackTrace) { + A._BufferingStreamSubscription_asFuture_closure0.prototype = { + call$2(error, stackTrace) { var cancelFuture = this.$this.cancel$0(), t1 = this.result; if (cancelFuture !== $.$get$Future__nullFuture()) - cancelFuture.whenComplete$1(new P._BufferingStreamSubscription_asFuture__closure(t1, error, stackTrace)); + cancelFuture.whenComplete$1(new A._BufferingStreamSubscription_asFuture__closure(t1, error, stackTrace)); else t1._completeError$2(error, stackTrace); }, $signature: 5 }; - P._BufferingStreamSubscription_asFuture__closure.prototype = { - call$0: function() { + A._BufferingStreamSubscription_asFuture__closure.prototype = { + call$0() { this.result._completeError$2(this.error, this.stackTrace); }, $signature: 3 }; - P._BufferingStreamSubscription__sendError_sendError.prototype = { - call$0: function() { + A._BufferingStreamSubscription__sendError_sendError.prototype = { + call$0() { var onError, t3, t4, t1 = this.$this, t2 = t1._state; @@ -6063,8 +6293,8 @@ }, $signature: 0 }; - P._BufferingStreamSubscription__sendDone_sendDone.prototype = { - call$0: function() { + A._BufferingStreamSubscription__sendDone_sendDone.prototype = { + call$0() { var t1 = this.$this, t2 = t1._state; if ((t2 & 16) === 0) @@ -6075,55 +6305,55 @@ }, $signature: 0 }; - P._StreamImpl.prototype = { - listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { + A._StreamImpl.prototype = { + listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError) { var t1 = this.$ti; t1._eval$1("~(1)?")._as(onData); type$.nullable_void_Function._as(onDone); return this._controller._subscribe$4(t1._eval$1("~(1)?")._as(onData), onError, onDone, cancelOnError === true); }, - listen$1: function(onData) { + listen$1(onData) { return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); }, - listen$2$cancelOnError: function(onData, cancelOnError) { + listen$2$cancelOnError(onData, cancelOnError) { return this.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, null, null); }, - listen$2$onDone: function(onData, onDone) { + listen$2$onDone(onData, onDone) { return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, null); } }; - P._DelayedEvent.prototype = { - set$next: function(next) { + A._DelayedEvent.prototype = { + set$next(next) { this.next = type$.nullable__DelayedEvent_dynamic._as(next); }, - get$next: function() { + get$next() { return this.next; } }; - P._DelayedData.prototype = { - perform$1: function(dispatch) { + A._DelayedData.prototype = { + perform$1(dispatch) { this.$ti._eval$1("_EventDispatch<1>")._as(dispatch)._sendData$1(this.value); } }; - P._DelayedError.prototype = { - perform$1: function(dispatch) { + A._DelayedError.prototype = { + perform$1(dispatch) { dispatch._sendError$2(this.error, this.stackTrace); } }; - P._DelayedDone.prototype = { - perform$1: function(dispatch) { + A._DelayedDone.prototype = { + perform$1(dispatch) { dispatch._sendDone$0(); }, - get$next: function() { + get$next() { return null; }, - set$next: function(_) { - throw H.wrapException(P.StateError$("No events after a done.")); + set$next(_) { + throw A.wrapException(A.StateError$("No events after a done.")); }, $is_DelayedEvent: 1 }; - P._PendingEvents.prototype = { - schedule$1: function(dispatch) { + A._PendingEvents.prototype = { + schedule$1(dispatch) { var t1, _this = this; _this.$ti._eval$1("_EventDispatch<1>")._as(dispatch); t1 = _this._state; @@ -6133,12 +6363,22 @@ _this._state = 1; return; } - P.scheduleMicrotask(new P._PendingEvents_schedule_closure(_this, dispatch)); + A.scheduleMicrotask(new A._PendingEvents_schedule_closure(_this, dispatch)); _this._state = 1; + }, + add$1(_, $event) { + var _this = this, + lastEvent = _this.lastPendingEvent; + if (lastEvent == null) + _this.firstPendingEvent = _this.lastPendingEvent = $event; + else { + lastEvent.set$next($event); + _this.lastPendingEvent = $event; + } } }; - P._PendingEvents_schedule_closure.prototype = { - call$0: function() { + A._PendingEvents_schedule_closure.prototype = { + call$0() { var t2, $event, nextEvent, t1 = this.$this, oldState = t1._state; @@ -6155,285 +6395,275 @@ }, $signature: 0 }; - P._StreamImplEvents.prototype = { - add$1: function(_, $event) { - var _this = this, - lastEvent = _this.lastPendingEvent; - if (lastEvent == null) - _this.firstPendingEvent = _this.lastPendingEvent = $event; - else { - lastEvent.set$next($event); - _this.lastPendingEvent = $event; - } - } - }; - P._StreamIterator.prototype = {}; - P._cancelAndValue_closure.prototype = { - call$0: function() { + A._StreamIterator.prototype = {}; + A._cancelAndValue_closure.prototype = { + call$0() { return this.future._complete$1(this.value); }, $signature: 0 }; - P._Zone.prototype = {$isZone: 1}; - P._rootHandleUncaughtError_closure.prototype = { - call$0: function() { - var error = type$.Object._as(H.wrapException(this.error)); - error.stack = this.stackTrace.toString$0(0); - throw error; + A._Zone.prototype = {$isZone: 1}; + A._rootHandleError_closure.prototype = { + call$0() { + A.Error_throwWithStackTrace(this.error, this.stackTrace); }, $signature: 0 }; - P._RootZone.prototype = { - runGuarded$1: function(f) { - var e, s, exception, _null = null; + A._RootZone.prototype = { + runGuarded$1(f) { + var e, s, exception; type$.void_Function._as(f); try { - if (C.C__RootZone === $.Zone__current) { + if (B.C__RootZone === $.Zone__current) { f.call$0(); return; } - P._rootRun(_null, _null, this, f, type$.void); + A._rootRun(null, null, this, f, type$.void); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, type$.Object._as(e), type$.StackTrace._as(s)); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(type$.Object._as(e), type$.StackTrace._as(s)); } }, - runUnaryGuarded$1$2: function(f, arg, $T) { - var e, s, exception, _null = null; + runUnaryGuarded$1$2(f, arg, $T) { + var e, s, exception; $T._eval$1("~(0)")._as(f); $T._as(arg); try { - if (C.C__RootZone === $.Zone__current) { + if (B.C__RootZone === $.Zone__current) { f.call$1(arg); return; } - P._rootRunUnary(_null, _null, this, f, arg, type$.void, $T); + A._rootRunUnary(null, null, this, f, arg, type$.void, $T); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, type$.Object._as(e), type$.StackTrace._as(s)); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(type$.Object._as(e), type$.StackTrace._as(s)); } }, - runBinaryGuarded$2$3: function(f, arg1, arg2, T1, T2) { - var e, s, exception, _null = null; + runBinaryGuarded$2$3(f, arg1, arg2, T1, T2) { + var e, s, exception; T1._eval$1("@<0>")._bind$1(T2)._eval$1("~(1,2)")._as(f); T1._as(arg1); T2._as(arg2); try { - if (C.C__RootZone === $.Zone__current) { + if (B.C__RootZone === $.Zone__current) { f.call$2(arg1, arg2); return; } - P._rootRunBinary(_null, _null, this, f, arg1, arg2, type$.void, T1, T2); + A._rootRunBinary(null, null, this, f, arg1, arg2, type$.void, T1, T2); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(_null, _null, this, type$.Object._as(e), type$.StackTrace._as(s)); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(type$.Object._as(e), type$.StackTrace._as(s)); } }, - bindCallbackGuarded$1: function(f) { - return new P._RootZone_bindCallbackGuarded_closure(this, type$.void_Function._as(f)); + bindCallbackGuarded$1(f) { + return new A._RootZone_bindCallbackGuarded_closure(this, type$.void_Function._as(f)); }, - bindUnaryCallbackGuarded$1$1: function(f, $T) { - return new P._RootZone_bindUnaryCallbackGuarded_closure(this, $T._eval$1("~(0)")._as(f), $T); + bindUnaryCallbackGuarded$1$1(f, $T) { + return new A._RootZone_bindUnaryCallbackGuarded_closure(this, $T._eval$1("~(0)")._as(f), $T); }, - run$1$1: function(f, $R) { + run$1$1(f, $R) { $R._eval$1("0()")._as(f); - if ($.Zone__current === C.C__RootZone) + if ($.Zone__current === B.C__RootZone) return f.call$0(); - return P._rootRun(null, null, this, f, $R); + return A._rootRun(null, null, this, f, $R); }, - runUnary$2$2: function(f, arg, $R, $T) { + runUnary$2$2(f, arg, $R, $T) { $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f); $T._as(arg); - if ($.Zone__current === C.C__RootZone) + if ($.Zone__current === B.C__RootZone) return f.call$1(arg); - return P._rootRunUnary(null, null, this, f, arg, $R, $T); + return A._rootRunUnary(null, null, this, f, arg, $R, $T); }, - runBinary$3$3: function(f, arg1, arg2, $R, T1, T2) { + runBinary$3$3(f, arg1, arg2, $R, T1, T2) { $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); T1._as(arg1); T2._as(arg2); - if ($.Zone__current === C.C__RootZone) + if ($.Zone__current === B.C__RootZone) return f.call$2(arg1, arg2); - return P._rootRunBinary(null, null, this, f, arg1, arg2, $R, T1, T2); + return A._rootRunBinary(null, null, this, f, arg1, arg2, $R, T1, T2); }, - registerBinaryCallback$3$1: function(f, $R, T1, T2) { + registerBinaryCallback$3$1(f, $R, T1, T2) { return $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); } }; - P._RootZone_bindCallbackGuarded_closure.prototype = { - call$0: function() { + A._RootZone_bindCallbackGuarded_closure.prototype = { + call$0() { return this.$this.runGuarded$1(this.f); }, $signature: 0 }; - P._RootZone_bindUnaryCallbackGuarded_closure.prototype = { - call$1: function(arg) { + A._RootZone_bindUnaryCallbackGuarded_closure.prototype = { + call$1(arg) { var t1 = this.T; return this.$this.runUnaryGuarded$1$2(this.f, t1._as(arg), t1); }, - $signature: function() { + $signature() { return this.T._eval$1("~(0)"); } }; - P.ListMixin.prototype = { - get$iterator: function(receiver) { - return new H.ListIterator(receiver, this.get$length(receiver), H.instanceType(receiver)._eval$1("ListIterator")); + A.ListBase.prototype = { + get$iterator(receiver) { + return new A.ListIterator(receiver, this.get$length(receiver), A.instanceType(receiver)._eval$1("ListIterator")); }, - elementAt$1: function(receiver, index) { + elementAt$1(receiver, index) { return this.$index(receiver, index); }, - forEach$1: function(receiver, action) { + forEach$1(receiver, action) { var $length, i; - H.instanceType(receiver)._eval$1("~(ListMixin.E)")._as(action); + A.instanceType(receiver)._eval$1("~(ListBase.E)")._as(action); $length = this.get$length(receiver); for (i = 0; i < $length; ++i) { action.call$1(this.$index(receiver, i)); if ($length !== this.get$length(receiver)) - throw H.wrapException(P.ConcurrentModificationError$(receiver)); + throw A.wrapException(A.ConcurrentModificationError$(receiver)); } }, - get$isNotEmpty: function(receiver) { + get$isNotEmpty(receiver) { return this.get$length(receiver) !== 0; }, - toString$0: function(receiver) { - return P.IterableBase_iterableToFullString(receiver, "[", "]"); + toString$0(receiver) { + return A.Iterable_iterableToFullString(receiver, "[", "]"); } }; - P.MapBase.prototype = {}; - P.MapBase_mapToString_closure.prototype = { - call$2: function(k, v) { - var t2, - t1 = this._box_0; - if (!t1.first) - this.result._contents += ", "; - t1.first = false; - t1 = this.result; - t2 = t1._contents += H.S(k); - t1._contents = t2 + ": "; - t1._contents += H.S(v); - }, - $signature: 10 - }; - P.MapMixin.prototype = { - forEach$1: function(_, action) { - var t2, key, - t1 = H._instanceType(this); - t1._eval$1("~(MapMixin.K,MapMixin.V)")._as(action); - for (t2 = this.get$keys(), t2 = t2.get$iterator(t2), t1 = t1._eval$1("MapMixin.V"); t2.moveNext$0();) { + A.MapBase.prototype = { + forEach$1(_, action) { + var t2, key, t3, + t1 = A._instanceType(this); + t1._eval$1("~(MapBase.K,MapBase.V)")._as(action); + for (t2 = this.get$keys(), t2 = t2.get$iterator(t2), t1 = t1._eval$1("MapBase.V"); t2.moveNext$0();) { key = t2.get$current(); - action.call$2(key, t1._as(this.$index(0, key))); + t3 = this.$index(0, key); + action.call$2(key, t3 == null ? t1._as(t3) : t3); } }, - get$length: function(_) { + get$length(_) { var t1 = this.get$keys(); return t1.get$length(t1); }, - get$isEmpty: function(_) { + get$isEmpty(_) { var t1 = this.get$keys(); return t1.get$isEmpty(t1); }, - toString$0: function(_) { - return P.MapBase_mapToString(this); + toString$0(_) { + return A.MapBase_mapToString(this); }, $isMap: 1 }; - P.ListQueue.prototype = { - get$iterator: function(_) { + A.MapBase_mapToString_closure.prototype = { + call$2(k, v) { + var t2, + t1 = this._box_0; + if (!t1.first) + this.result._contents += ", "; + t1.first = false; + t1 = this.result; + t2 = t1._contents += A.S(k); + t1._contents = t2 + ": "; + t1._contents += A.S(v); + }, + $signature: 10 + }; + A.ListQueue.prototype = { + get$iterator(_) { var _this = this; - return new P._ListQueueIterator(_this, _this._tail, _this._modificationCount, _this._head, _this.$ti._eval$1("_ListQueueIterator<1>")); + return new A._ListQueueIterator(_this, _this._tail, _this._modificationCount, _this._head, _this.$ti._eval$1("_ListQueueIterator<1>")); }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this._head === this._tail; }, - get$length: function(_) { + get$length(_) { return (this._tail - this._head & this._table.length - 1) >>> 0; }, - elementAt$1: function(_, index) { - var t1, t2, t3, _this = this, - $length = _this.get$length(_this); - if (0 > index || index >= $length) - H.throwExpression(P.IndexError$(index, _this, "index", null, $length)); + elementAt$1(_, index) { + var t2, t3, _this = this, + t1 = _this.get$length(_this); + if (0 > index || index >= t1) + A.throwExpression(A.IndexError$withLength(index, t1, _this, null, "index")); t1 = _this._table; t2 = t1.length; t3 = (_this._head + index & t2 - 1) >>> 0; - if (t3 < 0 || t3 >= t2) - return H.ioore(t1, t3); - return _this.$ti._precomputed1._as(t1[t3]); + if (!(t3 >= 0 && t3 < t2)) + return A.ioore(t1, t3); + t3 = t1[t3]; + return t3 == null ? _this.$ti._precomputed1._as(t3) : t3; }, - toString$0: function(_) { - return P.IterableBase_iterableToFullString(this, "{", "}"); + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); }, - removeFirst$0: function() { + removeFirst$0() { var t2, result, _this = this, t1 = _this._head; if (t1 === _this._tail) - throw H.wrapException(H.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_noElement()); ++_this._modificationCount; t2 = _this._table; - if (t1 >= t2.length) - return H.ioore(t2, t1); - result = _this.$ti._precomputed1._as(t2[t1]); - C.JSArray_methods.$indexSet(t2, t1, null); + if (!(t1 < t2.length)) + return A.ioore(t2, t1); + result = t2[t1]; + if (result == null) + result = _this.$ti._precomputed1._as(result); + B.JSArray_methods.$indexSet(t2, t1, null); _this._head = (_this._head + 1 & _this._table.length - 1) >>> 0; return result; }, - _add$1: function(element) { + _add$1(element) { var t2, t3, newTable, split, _this = this, t1 = _this.$ti; t1._precomputed1._as(element); - C.JSArray_methods.$indexSet(_this._table, _this._tail, element); + B.JSArray_methods.$indexSet(_this._table, _this._tail, element); t2 = _this._tail; t3 = _this._table.length; t2 = (t2 + 1 & t3 - 1) >>> 0; _this._tail = t2; if (_this._head === t2) { - newTable = P.List_List$filled(t3 * 2, null, false, t1._eval$1("1?")); + newTable = A.List_List$filled(t3 * 2, null, false, t1._eval$1("1?")); t1 = _this._table; t2 = _this._head; split = t1.length - t2; - C.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); - C.JSArray_methods.setRange$4(newTable, split, split + _this._head, _this._table, 0); + B.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); + B.JSArray_methods.setRange$4(newTable, split, split + _this._head, _this._table, 0); _this._head = 0; _this._tail = _this._table.length; _this.set$_table(newTable); } ++_this._modificationCount; }, - set$_table: function(_table) { + set$_table(_table) { this._table = this.$ti._eval$1("List<1?>")._as(_table); }, $isQueue: 1 }; - P._ListQueueIterator.prototype = { - get$current: function() { - return this.$ti._precomputed1._as(this._collection$_current); + A._ListQueueIterator.prototype = { + get$current() { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; }, - moveNext$0: function() { + moveNext$0() { var t2, t3, _this = this, t1 = _this._queue; if (_this._modificationCount !== t1._modificationCount) - H.throwExpression(P.ConcurrentModificationError$(t1)); + A.throwExpression(A.ConcurrentModificationError$(t1)); t2 = _this._position; if (t2 === _this._end) { _this.set$_collection$_current(null); return false; } t3 = t1._table; - if (t2 >= t3.length) - return H.ioore(t3, t2); + if (!(t2 < t3.length)) + return A.ioore(t3, t2); _this.set$_collection$_current(t3[t2]); _this._position = (_this._position + 1 & t1._table.length - 1) >>> 0; return true; }, - set$_collection$_current: function(_current) { + set$_collection$_current(_current) { this._collection$_current = this.$ti._eval$1("1?")._as(_current); } }; - P._JsonMap.prototype = { - $index: function(_, key) { + A._JsonMap.prototype = { + $index(_, key) { var result, t1 = this._processed; if (t1 == null) @@ -6445,20 +6675,20 @@ return typeof result == "undefined" ? this._process$1(key) : result; } }, - get$length: function(_) { + get$length(_) { return this._processed == null ? this._data.__js_helper$_length : this._computeKeys$0().length; }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this.get$length(this) === 0; }, - get$keys: function() { + get$keys() { if (this._processed == null) { var t1 = this._data; - return new H.LinkedHashMapKeyIterable(t1, H._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); + return new A.LinkedHashMapKeyIterable(t1, t1.$ti._eval$1("LinkedHashMapKeyIterable<1>")); } - return new P._JsonMapKeyIterable(this); + return new A._JsonMapKeyIterable(this); }, - forEach$1: function(_, f) { + forEach$1(_, f) { var keys, i, key, value, _this = this; type$.void_Function_String_dynamic._as(f); if (_this._processed == null) @@ -6468,110 +6698,106 @@ key = keys[i]; value = _this._processed[key]; if (typeof value == "undefined") { - value = P._convertJsonToDartLazy(_this._original[key]); + value = A._convertJsonToDartLazy(_this._original[key]); _this._processed[key] = value; } f.call$2(key, value); if (keys !== _this._data) - throw H.wrapException(P.ConcurrentModificationError$(_this)); + throw A.wrapException(A.ConcurrentModificationError$(_this)); } }, - _computeKeys$0: function() { + _computeKeys$0() { var keys = type$.nullable_List_dynamic._as(this._data); if (keys == null) - keys = this._data = H.setRuntimeTypeInfo(Object.keys(this._original), type$.JSArray_String); + keys = this._data = A._setArrayType(Object.keys(this._original), type$.JSArray_String); return keys; }, - _process$1: function(key) { + _process$1(key) { var result; if (!Object.prototype.hasOwnProperty.call(this._original, key)) return null; - result = P._convertJsonToDartLazy(this._original[key]); + result = A._convertJsonToDartLazy(this._original[key]); return this._processed[key] = result; } }; - P._JsonMapKeyIterable.prototype = { - get$length: function(_) { + A._JsonMapKeyIterable.prototype = { + get$length(_) { var t1 = this._parent; return t1.get$length(t1); }, - elementAt$1: function(_, index) { + elementAt$1(_, index) { var t1 = this._parent; if (t1._processed == null) t1 = t1.get$keys().elementAt$1(0, index); else { t1 = t1._computeKeys$0(); - if (index < 0 || index >= t1.length) - return H.ioore(t1, index); + if (!(index >= 0 && index < t1.length)) + return A.ioore(t1, index); t1 = t1[index]; } return t1; }, - get$iterator: function(_) { + get$iterator(_) { var t1 = this._parent; if (t1._processed == null) { t1 = t1.get$keys(); t1 = t1.get$iterator(t1); } else { t1 = t1._computeKeys$0(); - t1 = new J.ArrayIterator(t1, t1.length, H._arrayInstanceType(t1)._eval$1("ArrayIterator<1>")); + t1 = new J.ArrayIterator(t1, t1.length, A._arrayInstanceType(t1)._eval$1("ArrayIterator<1>")); } return t1; } }; - P.Codec.prototype = {}; - P.Converter.prototype = {}; - P.JsonUnsupportedObjectError.prototype = { - toString$0: function(_) { - var safeString = P.Error_safeToString(this.unsupportedObject); + A.Codec.prototype = {}; + A.Converter.prototype = {}; + A.JsonUnsupportedObjectError.prototype = { + toString$0(_) { + var safeString = A.Error_safeToString(this.unsupportedObject); return (this.cause != null ? "Converting object to an encodable object failed:" : "Converting object did not return an encodable object:") + " " + safeString; } }; - P.JsonCyclicError.prototype = { - toString$0: function(_) { + A.JsonCyclicError.prototype = { + toString$0(_) { return "Cyclic error in JSON stringify"; } }; - P.JsonCodec.prototype = { - decode$2$reviver: function(_, source, reviver) { - var t1; - type$.nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object._as(reviver); - t1 = P._parseJson(source, this.get$decoder()._reviver); + A.JsonCodec.prototype = { + decode$2$reviver(_, source, reviver) { + var t1 = A._parseJson(source, this.get$decoder()._reviver); return t1; }, - encode$2$toEncodable: function(value, toEncodable) { - var t1; - type$.nullable_nullable_Object_Function_dynamic._as(toEncodable); - t1 = P._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); + encode$2$toEncodable(value, toEncodable) { + var t1 = A._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); return t1; }, - get$encoder: function() { - return C.JsonEncoder_null; + get$encoder() { + return B.JsonEncoder_null; }, - get$decoder: function() { - return C.JsonDecoder_null; + get$decoder() { + return B.JsonDecoder_null; } }; - P.JsonEncoder.prototype = {}; - P.JsonDecoder.prototype = {}; - P._JsonStringifier.prototype = { - writeStringContent$1: function(s) { + A.JsonEncoder.prototype = {}; + A.JsonDecoder.prototype = {}; + A._JsonStringifier.prototype = { + writeStringContent$1(s) { var offset, i, charCode, t1, t2, _this = this, $length = s.length; for (offset = 0, i = 0; i < $length; ++i) { - charCode = C.JSString_methods._codeUnitAt$1(s, i); + charCode = s.charCodeAt(i); if (charCode > 92) { if (charCode >= 55296) { t1 = charCode & 64512; if (t1 === 55296) { t2 = i + 1; - t2 = !(t2 < $length && (C.JSString_methods._codeUnitAt$1(s, t2) & 64512) === 56320); + t2 = !(t2 < $length && (s.charCodeAt(t2) & 64512) === 56320); } else t2 = false; if (!t2) if (t1 === 56320) { t1 = i - 1; - t1 = !(t1 >= 0 && (C.JSString_methods.codeUnitAt$1(s, t1) & 64512) === 55296); + t1 = !(t1 >= 0 && (s.charCodeAt(t1) & 64512) === 55296); } else t1 = false; else @@ -6637,16 +6863,16 @@ else if (offset < $length) _this.writeStringSlice$3(s, offset, $length); }, - _checkCycle$1: function(object) { + _checkCycle$1(object) { var t1, t2, i, t3; for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) { t3 = t1[i]; if (object == null ? t3 == null : object === t3) - throw H.wrapException(new P.JsonCyclicError(object, null)); + throw A.wrapException(new A.JsonCyclicError(object, null)); } - C.JSArray_methods.add$1(t1, object); + B.JSArray_methods.add$1(t1, object); }, - writeObject$1: function(object) { + writeObject$1(object) { var customJson, e, t1, exception, _this = this; if (_this.writeJsonValue$1(object)) return; @@ -6654,20 +6880,20 @@ try { customJson = _this._toEncodable.call$1(object); if (!_this.writeJsonValue$1(customJson)) { - t1 = P.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult()); - throw H.wrapException(t1); + t1 = A.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult()); + throw A.wrapException(t1); } t1 = _this._seen; if (0 >= t1.length) - return H.ioore(t1, -1); + return A.ioore(t1, -1); t1.pop(); } catch (exception) { - e = H.unwrapException(exception); - t1 = P.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult()); - throw H.wrapException(t1); + e = A.unwrapException(exception); + t1 = A.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult()); + throw A.wrapException(t1); } }, - writeJsonValue$1: function(object) { + writeJsonValue$1(object) { var t1, success, _this = this; if (typeof object == "number") { if (!isFinite(object)) @@ -6693,7 +6919,7 @@ _this.writeList$1(object); t1 = _this._seen; if (0 >= t1.length) - return H.ioore(t1, -1); + return A.ioore(t1, -1); t1.pop(); return true; } else if (type$.Map_dynamic_dynamic._is(object)) { @@ -6701,13 +6927,13 @@ success = _this.writeMap$1(object); t1 = _this._seen; if (0 >= t1.length) - return H.ioore(t1, -1); + return A.ioore(t1, -1); t1.pop(); return success; } else return false; }, - writeList$1: function(list) { + writeList$1(list) { var t1, i, _this = this; _this.writeString$1("["); t1 = J.getInterceptor$asx(list); @@ -6720,264 +6946,236 @@ } _this.writeString$1("]"); }, - writeMap$1: function(map) { + writeMap$1(map) { var t1, keyValueList, i, separator, t2, _this = this, _box_0 = {}; if (map.get$isEmpty(map)) { _this.writeString$1("{}"); return true; } t1 = map.get$length(map) * 2; - keyValueList = P.List_List$filled(t1, null, false, type$.nullable_Object); + keyValueList = A.List_List$filled(t1, null, false, type$.nullable_Object); i = _box_0.i = 0; _box_0.allStringKeys = true; - map.forEach$1(0, new P._JsonStringifier_writeMap_closure(_box_0, keyValueList)); + map.forEach$1(0, new A._JsonStringifier_writeMap_closure(_box_0, keyValueList)); if (!_box_0.allStringKeys) return false; _this.writeString$1("{"); for (separator = '"'; i < t1; i += 2, separator = ',"') { _this.writeString$1(separator); - _this.writeStringContent$1(H._asString(keyValueList[i])); + _this.writeStringContent$1(A._asString(keyValueList[i])); _this.writeString$1('":'); t2 = i + 1; - if (t2 >= t1) - return H.ioore(keyValueList, t2); + if (!(t2 < t1)) + return A.ioore(keyValueList, t2); _this.writeObject$1(keyValueList[t2]); } _this.writeString$1("}"); return true; } }; - P._JsonStringifier_writeMap_closure.prototype = { - call$2: function(key, value) { + A._JsonStringifier_writeMap_closure.prototype = { + call$2(key, value) { var t1, t2; if (typeof key != "string") this._box_0.allStringKeys = false; t1 = this.keyValueList; t2 = this._box_0; - C.JSArray_methods.$indexSet(t1, t2.i++, key); - C.JSArray_methods.$indexSet(t1, t2.i++, value); + B.JSArray_methods.$indexSet(t1, t2.i++, key); + B.JSArray_methods.$indexSet(t1, t2.i++, value); }, $signature: 10 }; - P._JsonStringStringifier.prototype = { - get$_partialResult: function() { + A._JsonStringStringifier.prototype = { + get$_partialResult() { var t1 = this._sink._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, - writeNumber$1: function(number) { - this._sink._contents += C.JSNumber_methods.toString$0(number); + writeNumber$1(number) { + this._sink._contents += B.JSNumber_methods.toString$0(number); }, - writeString$1: function(string) { + writeString$1(string) { this._sink._contents += string; }, - writeStringSlice$3: function(string, start, end) { - this._sink._contents += C.JSString_methods.substring$2(string, start, end); + writeStringSlice$3(string, start, end) { + this._sink._contents += B.JSString_methods.substring$2(string, start, end); }, - writeCharCode$1: function(charCode) { - this._sink._contents += H.Primitives_stringFromCharCode(charCode); + writeCharCode$1(charCode) { + this._sink._contents += A.Primitives_stringFromCharCode(charCode); } }; - P.DateTime.prototype = { - $eq: function(_, other) { + A.DateTime.prototype = { + $eq(_, other) { if (other == null) return false; - return other instanceof P.DateTime && this._value === other._value && this.isUtc === other.isUtc; + return other instanceof A.DateTime && this._value === other._value && this.isUtc === other.isUtc; }, - get$hashCode: function(_) { + get$hashCode(_) { var t1 = this._value; - return (t1 ^ C.JSInt_methods._shrOtherPositive$1(t1, 30)) & 1073741823; + return (t1 ^ B.JSInt_methods._shrOtherPositive$1(t1, 30)) & 1073741823; }, - toString$0: function(_) { + toString$0(_) { var _this = this, - y = P.DateTime__fourDigits(H.Primitives_getYear(_this)), - m = P.DateTime__twoDigits(H.Primitives_getMonth(_this)), - d = P.DateTime__twoDigits(H.Primitives_getDay(_this)), - h = P.DateTime__twoDigits(H.Primitives_getHours(_this)), - min = P.DateTime__twoDigits(H.Primitives_getMinutes(_this)), - sec = P.DateTime__twoDigits(H.Primitives_getSeconds(_this)), - ms = P.DateTime__threeDigits(H.Primitives_getMilliseconds(_this)); + y = A.DateTime__fourDigits(A.Primitives_getYear(_this)), + m = A.DateTime__twoDigits(A.Primitives_getMonth(_this)), + d = A.DateTime__twoDigits(A.Primitives_getDay(_this)), + h = A.DateTime__twoDigits(A.Primitives_getHours(_this)), + min = A.DateTime__twoDigits(A.Primitives_getMinutes(_this)), + sec = A.DateTime__twoDigits(A.Primitives_getSeconds(_this)), + ms = A.DateTime__threeDigits(A.Primitives_getMilliseconds(_this)), + t1 = y + "-" + m; if (_this.isUtc) - return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + "Z"; + return t1 + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + "Z"; else - return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms; + return t1 + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms; } }; - P.Duration.prototype = { - $eq: function(_, other) { + A.Duration.prototype = { + $eq(_, other) { if (other == null) return false; - return other instanceof P.Duration && this._duration === other._duration; - }, - get$hashCode: function(_) { - return C.JSInt_methods.get$hashCode(this._duration); - }, - toString$0: function(_) { - var twoDigitMinutes, twoDigitSeconds, sixDigitUs, - t1 = new P.Duration_toString_twoDigits(), - t2 = this._duration; - if (t2 < 0) - return "-" + new P.Duration(0 - t2).toString$0(0); - twoDigitMinutes = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 60000000) % 60); - twoDigitSeconds = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 1000000) % 60); - sixDigitUs = new P.Duration_toString_sixDigits().call$1(t2 % 1000000); - return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + twoDigitMinutes + ":" + twoDigitSeconds + "." + sixDigitUs; + return other instanceof A.Duration && this._duration === other._duration; + }, + get$hashCode(_) { + return B.JSInt_methods.get$hashCode(this._duration); + }, + toString$0(_) { + var minutesPadding, seconds, secondsPadding, + microseconds = this._duration, + microseconds0 = microseconds % 3600000000, + minutes = B.JSInt_methods._tdivFast$1(microseconds0, 60000000); + microseconds0 %= 60000000; + minutesPadding = minutes < 10 ? "0" : ""; + seconds = B.JSInt_methods._tdivFast$1(microseconds0, 1000000); + secondsPadding = seconds < 10 ? "0" : ""; + return "" + (microseconds / 3600000000 | 0) + ":" + minutesPadding + minutes + ":" + secondsPadding + seconds + "." + B.JSString_methods.padLeft$2(B.JSInt_methods.toString$0(microseconds0 % 1000000), 6, "0"); } }; - P.Duration_toString_sixDigits.prototype = { - call$1: function(n) { - if (n >= 100000) - return "" + n; - if (n >= 10000) - return "0" + n; - if (n >= 1000) - return "00" + n; - if (n >= 100) - return "000" + n; - if (n >= 10) - return "0000" + n; - return "00000" + n; - }, - $signature: 11 - }; - P.Duration_toString_twoDigits.prototype = { - call$1: function(n) { - if (n >= 10) - return "" + n; - return "0" + n; - }, - $signature: 11 - }; - P.Error.prototype = { - get$stackTrace: function() { - return H.getTraceFromException(this.$thrownJsError); + A.Error.prototype = { + get$stackTrace() { + return A.getTraceFromException(this.$thrownJsError); } }; - P.AssertionError.prototype = { - toString$0: function(_) { + A.AssertionError.prototype = { + toString$0(_) { var t1 = this.message; if (t1 != null) - return "Assertion failed: " + P.Error_safeToString(t1); + return "Assertion failed: " + A.Error_safeToString(t1); return "Assertion failed"; } }; - P.TypeError.prototype = {}; - P.NullThrownError.prototype = { - toString$0: function(_) { - return "Throw of null."; - } - }; - P.ArgumentError.prototype = { - get$_errorName: function() { + A.TypeError.prototype = {}; + A.ArgumentError.prototype = { + get$_errorName() { return "Invalid argument" + (!this._hasValue ? "(s)" : ""); }, - get$_errorExplanation: function() { + get$_errorExplanation() { return ""; }, - toString$0: function(_) { - var explanation, errorValue, _this = this, + toString$0(_) { + var _this = this, $name = _this.name, nameString = $name == null ? "" : " (" + $name + ")", message = _this.message, - messageString = message == null ? "" : ": " + H.S(message), + messageString = message == null ? "" : ": " + A.S(message), prefix = _this.get$_errorName() + nameString + messageString; if (!_this._hasValue) return prefix; - explanation = _this.get$_errorExplanation(); - errorValue = P.Error_safeToString(_this.invalidValue); - return prefix + explanation + ": " + errorValue; + return prefix + _this.get$_errorExplanation() + ": " + A.Error_safeToString(_this.get$invalidValue()); + }, + get$invalidValue() { + return this.invalidValue; } }; - P.RangeError.prototype = { - get$_errorName: function() { + A.RangeError.prototype = { + get$invalidValue() { + return A._asNumQ(this.invalidValue); + }, + get$_errorName() { return "RangeError"; }, - get$_errorExplanation: function() { + get$_errorExplanation() { var explanation, start = this.start, end = this.end; if (start == null) - explanation = end != null ? ": Not less than or equal to " + H.S(end) : ""; + explanation = end != null ? ": Not less than or equal to " + A.S(end) : ""; else if (end == null) - explanation = ": Not greater than or equal to " + H.S(start); + explanation = ": Not greater than or equal to " + A.S(start); else if (end > start) - explanation = ": Not in inclusive range " + H.S(start) + ".." + H.S(end); + explanation = ": Not in inclusive range " + A.S(start) + ".." + A.S(end); else - explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + H.S(start); + explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + A.S(start); return explanation; } }; - P.IndexError.prototype = { - get$_errorName: function() { + A.IndexError.prototype = { + get$invalidValue() { + return A._asInt(this.invalidValue); + }, + get$_errorName() { return "RangeError"; }, - get$_errorExplanation: function() { - if (H._asInt(this.invalidValue) < 0) + get$_errorExplanation() { + if (A._asInt(this.invalidValue) < 0) return ": index must not be negative"; var t1 = this.length; if (t1 === 0) return ": no indices are valid"; return ": index should be less than " + t1; }, - get$length: function(receiver) { + get$length(receiver) { return this.length; } }; - P.UnsupportedError.prototype = { - toString$0: function(_) { + A.UnsupportedError.prototype = { + toString$0(_) { return "Unsupported operation: " + this.message; } }; - P.UnimplementedError.prototype = { - toString$0: function(_) { - var t1 = "UnimplementedError: " + this.message; - return t1; + A.UnimplementedError.prototype = { + toString$0(_) { + return "UnimplementedError: " + this.message; } }; - P.StateError.prototype = { - toString$0: function(_) { + A.StateError.prototype = { + toString$0(_) { return "Bad state: " + this.message; } }; - P.ConcurrentModificationError.prototype = { - toString$0: function(_) { + A.ConcurrentModificationError.prototype = { + toString$0(_) { var t1 = this.modifiedObject; if (t1 == null) return "Concurrent modification during iteration."; - return "Concurrent modification during iteration: " + P.Error_safeToString(t1) + "."; + return "Concurrent modification during iteration: " + A.Error_safeToString(t1) + "."; } }; - P.OutOfMemoryError.prototype = { - toString$0: function(_) { + A.OutOfMemoryError.prototype = { + toString$0(_) { return "Out of Memory"; }, - get$stackTrace: function() { + get$stackTrace() { return null; }, $isError: 1 }; - P.StackOverflowError.prototype = { - toString$0: function(_) { + A.StackOverflowError.prototype = { + toString$0(_) { return "Stack Overflow"; }, - get$stackTrace: function() { + get$stackTrace() { return null; }, $isError: 1 }; - P.CyclicInitializationError.prototype = { - toString$0: function(_) { - var t1 = "Reading static variable '" + this.variableName + "' during its initialization"; - return t1; - } - }; - P._Exception.prototype = { - toString$0: function(_) { + A._Exception.prototype = { + toString$0(_) { return "Exception: " + this.message; } }; - P.FormatException.prototype = { - toString$0: function(_) { - var t1, lineNum, lineStart, previousCharWasCR, i, char, lineEnd, end, start, prefix, postfix, slice, + A.FormatException.prototype = { + toString$0(_) { + var t1, lineEnd, lineNum, lineStart, previousCharWasCR, i, char, end, start, prefix, postfix, message = this.message, report = "" !== message ? "FormatException: " + message : "FormatException", offset = this.offset, @@ -6991,11 +7189,13 @@ offset = null; if (offset == null) { if (source.length > 78) - source = C.JSString_methods.substring$2(source, 0, 75) + "..."; + source = B.JSString_methods.substring$2(source, 0, 75) + "..."; return report + "\n" + source; } - for (lineNum = 1, lineStart = 0, previousCharWasCR = false, i = 0; i < offset; ++i) { - char = C.JSString_methods._codeUnitAt$1(source, i); + for (lineEnd = source.length, lineNum = 1, lineStart = 0, previousCharWasCR = false, i = 0; i < offset; ++i) { + if (!(i < lineEnd)) + return A.ioore(source, i); + char = source.charCodeAt(i); if (char === 10) { if (lineStart !== i || !previousCharWasCR) ++lineNum; @@ -7008,9 +7208,10 @@ } } report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " + (offset - lineStart + 1) + ")\n") : report + (" (at character " + (offset + 1) + ")\n"); - lineEnd = source.length; for (i = offset; i < lineEnd; ++i) { - char = C.JSString_methods.codeUnitAt$1(source, i); + if (!(i >= 0)) + return A.ioore(source, i); + char = source.charCodeAt(i); if (char === 10 || char === 13) { lineEnd = i; break; @@ -7040,177 +7241,158 @@ prefix = ""; postfix = ""; } - slice = C.JSString_methods.substring$2(source, start, end); - return report + prefix + slice + postfix + "\n" + C.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; + return report + prefix + B.JSString_methods.substring$2(source, start, end) + postfix + "\n" + B.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; } else - return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report; + return offset != null ? report + (" (at offset " + A.S(offset) + ")") : report; } }; - P.Iterable.prototype = { - get$length: function(_) { + A.Iterable.prototype = { + get$length(_) { var count, it = this.get$iterator(this); for (count = 0; it.moveNext$0();) ++count; return count; }, - elementAt$1: function(_, index) { - var t1, elementIndex, element; - P.RangeError_checkNotNegative(index, "index"); - for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { - element = t1.get$current(); - if (index === elementIndex) - return element; - ++elementIndex; + elementAt$1(_, index) { + var iterator, skipCount; + A.RangeError_checkNotNegative(index, "index"); + iterator = this.get$iterator(this); + for (skipCount = index; iterator.moveNext$0();) { + if (skipCount === 0) + return iterator.get$current(); + --skipCount; } - throw H.wrapException(P.IndexError$(index, this, "index", null, elementIndex)); + throw A.wrapException(A.IndexError$withLength(index, index - skipCount, this, null, "index")); }, - toString$0: function(_) { - return P.IterableBase_iterableToShortString(this, "(", ")"); + toString$0(_) { + return A.Iterable_iterableToShortString(this, "(", ")"); } }; - P.Null.prototype = { - get$hashCode: function(_) { - return P.Object.prototype.get$hashCode.call(C.JSNull_methods, this); + A.Null.prototype = { + get$hashCode(_) { + return A.Object.prototype.get$hashCode.call(this, this); }, - toString$0: function(_) { + toString$0(_) { return "null"; } }; - P.Object.prototype = {constructor: P.Object, $isObject: 1, - $eq: function(_, other) { + A.Object.prototype = {$isObject: 1, + $eq(_, other) { return this === other; }, - get$hashCode: function(_) { - return H.Primitives_objectHashCode(this); + get$hashCode(_) { + return A.Primitives_objectHashCode(this); + }, + toString$0(_) { + return "Instance of '" + A.Primitives_objectTypeName(this) + "'"; }, - toString$0: function(_) { - return "Instance of '" + H.Primitives_objectTypeName(this) + "'"; + get$runtimeType(_) { + return A.getRuntimeTypeOfDartObject(this); }, - toString: function() { + toString() { return this.toString$0(this); } }; - P._StringStackTrace.prototype = { - toString$0: function(_) { + A._StringStackTrace.prototype = { + toString$0(_) { return this._stackTrace; }, $isStackTrace: 1 }; - P.StringBuffer.prototype = { - get$length: function(_) { + A.StringBuffer.prototype = { + get$length(_) { return this._contents.length; }, - toString$0: function(_) { + toString$0(_) { var t1 = this._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, $isStringSink: 1 }; - W.HtmlElement.prototype = {}; - W.AnchorElement.prototype = { - toString$0: function(receiver) { - return String(receiver); + A.HtmlElement.prototype = {}; + A.AnchorElement.prototype = { + toString$0(receiver) { + var t1 = String(receiver); + t1.toString; + return t1; } }; - W.AreaElement.prototype = { - toString$0: function(receiver) { - return String(receiver); + A.AreaElement.prototype = { + toString$0(receiver) { + var t1 = String(receiver); + t1.toString; + return t1; } }; - W.DomException.prototype = { - toString$0: function(receiver) { - return String(receiver); + A.DomException.prototype = { + toString$0(receiver) { + var t1 = String(receiver); + t1.toString; + return t1; } }; - W.Element.prototype = { - toString$0: function(receiver) { - return receiver.localName; + A.Element.prototype = { + toString$0(receiver) { + var t1 = receiver.localName; + t1.toString; + return t1; }, - get$onClick: function(receiver) { - return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); + get$onClick(receiver) { + return new A._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); }, $isElement: 1 }; - W.Event.prototype = {$isEvent: 1}; - W.EventSource.prototype = {$isEventSource: 1}; - W.EventTarget.prototype = { - addEventListener$3: function(receiver, type, listener, useCapture) { + A.Event.prototype = {$isEvent: 1}; + A.EventSource.prototype = {$isEventSource: 1}; + A.EventTarget.prototype = { + addEventListener$3(receiver, type, listener, useCapture) { type$.nullable_dynamic_Function_Event._as(listener); if (listener != null) this._addEventListener$3(receiver, type, listener, useCapture); }, - addEventListener$2: function($receiver, type, listener) { + addEventListener$2($receiver, type, listener) { return this.addEventListener$3($receiver, type, listener, null); }, - _addEventListener$3: function(receiver, type, listener, options) { - return receiver.addEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), options); + _addEventListener$3(receiver, type, listener, options) { + return receiver.addEventListener(type, A.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), options); }, - _removeEventListener$3: function(receiver, type, listener, options) { - return receiver.removeEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), false); + _removeEventListener$3(receiver, type, listener, options) { + return receiver.removeEventListener(type, A.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), false); }, $isEventTarget: 1 }; - W.FormElement.prototype = { - get$length: function(receiver) { + A.FormElement.prototype = { + get$length(receiver) { return receiver.length; } }; - W.HttpRequest.prototype = { - open$3$async: function(receiver, method, url, async) { - return receiver.open(method, url, true); - }, - set$withCredentials: function(receiver, value) { - receiver.withCredentials = true; - }, - $isHttpRequest: 1 - }; - W.HttpRequest_request_closure.prototype = { - call$1: function(e) { - var t1, t2, accepted, unknownRedirect, t3; - type$.ProgressEvent._as(e); - t1 = this.xhr; - t2 = t1.status; - t2.toString; - accepted = t2 >= 200 && t2 < 300; - unknownRedirect = t2 > 307 && t2 < 400; - t2 = accepted || t2 === 0 || t2 === 304 || unknownRedirect; - t3 = this.completer; - if (t2) - t3.complete$1(0, t1); - else - t3.completeError$1(e); - }, - $signature: 20 - }; - W.HttpRequestEventTarget.prototype = {}; - W.MessageEvent.prototype = {$isMessageEvent: 1}; - W.MouseEvent.prototype = {$isMouseEvent: 1}; - W.Node.prototype = { - toString$0: function(receiver) { + A.MessageEvent.prototype = {$isMessageEvent: 1}; + A.MouseEvent.prototype = {$isMouseEvent: 1}; + A.Node.prototype = { + toString$0(receiver) { var value = receiver.nodeValue; return value == null ? this.super$Interceptor$toString(receiver) : value; } }; - W.ProgressEvent.prototype = {$isProgressEvent: 1}; - W.SelectElement.prototype = { - get$length: function(receiver) { + A.SelectElement.prototype = { + get$length(receiver) { return receiver.length; } }; - W.UIEvent.prototype = {}; - W.EventStreamProvider.prototype = {}; - W._EventStream.prototype = { - listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { - var t1 = H._instanceType(this); + A.UIEvent.prototype = {}; + A.EventStreamProvider.prototype = {}; + A._EventStream.prototype = { + listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError) { + var t1 = A._instanceType(this); t1._eval$1("~(1)?")._as(onData); type$.nullable_void_Function._as(onDone); - return W._EventStreamSubscription$(this._target, this._eventType, onData, false, t1._precomputed1); + return A._EventStreamSubscription$(this._target, this._eventType, onData, false, t1._precomputed1); } }; - W._ElementEventStreamImpl.prototype = {}; - W._EventStreamSubscription.prototype = { - cancel$0: function() { + A._ElementEventStreamImpl.prototype = {}; + A._EventStreamSubscription.prototype = { + cancel$0() { var _this = this; if (_this._target == null) return $.$get$nullFuture(); @@ -7219,17 +7401,17 @@ _this.set$_html$_onData(null); return $.$get$nullFuture(); }, - onData$1: function(handleData) { + onData$1(handleData) { var t1, _this = this; _this.$ti._eval$1("~(1)?")._as(handleData); if (_this._target == null) - throw H.wrapException(P.StateError$("Subscription has been canceled.")); + throw A.wrapException(A.StateError$("Subscription has been canceled.")); _this._unlisten$0(); - t1 = W._wrapZone(new W._EventStreamSubscription_onData_closure(handleData), type$.Event); + t1 = A._wrapZone(new A._EventStreamSubscription_onData_closure(handleData), type$.Event); _this.set$_html$_onData(t1); _this._tryResume$0(); }, - _tryResume$0: function() { + _tryResume$0() { var t2, t1 = this._html$_onData; if (t1 != null && true) { @@ -7238,7 +7420,7 @@ J.addEventListener$3$x(t2, this._eventType, t1, false); } }, - _unlisten$0: function() { + _unlisten$0() { var t2, t1 = this._html$_onData; if (t1 != null) { @@ -7247,275 +7429,297 @@ J._removeEventListener$3$x(t2, this._eventType, type$.nullable_dynamic_Function_Event._as(t1), false); } }, - set$_html$_onData: function(_onData) { + set$_html$_onData(_onData) { this._html$_onData = type$.nullable_dynamic_Function_Event._as(_onData); - } + }, + $isStreamSubscription: 1 }; - W._EventStreamSubscription_closure.prototype = { - call$1: function(e) { + A._EventStreamSubscription_closure.prototype = { + call$1(e) { return this.onData.call$1(type$.Event._as(e)); }, $signature: 1 }; - W._EventStreamSubscription_onData_closure.prototype = { - call$1: function(e) { + A._EventStreamSubscription_onData_closure.prototype = { + call$1(e) { return this.handleData.call$1(type$.Event._as(e)); }, $signature: 1 }; - P._AcceptStructuredClone.prototype = { - findSlot$1: function(value) { + A._AcceptStructuredClone.prototype = { + findSlot$1(value) { var i, t1 = this.values, $length = t1.length; for (i = 0; i < $length; ++i) if (t1[i] === value) return i; - C.JSArray_methods.add$1(t1, value); - C.JSArray_methods.add$1(this.copies, null); + B.JSArray_methods.add$1(t1, value); + B.JSArray_methods.add$1(this.copies, null); return $length; }, - walk$1: function(e) { - var millisSinceEpoch, t1, proto, slot, copy, t2, l, $length, i, _this = this, _box_0 = {}; + walk$1(e) { + var t1, t2, proto, slot, copy, map, t3, $length, t4, i, _this = this; if (e == null) return e; - if (H._isBool(e)) + if (A._isBool(e)) return e; if (typeof e == "number") return e; if (typeof e == "string") return e; - if (e instanceof Date) { - millisSinceEpoch = e.getTime(); - if (Math.abs(millisSinceEpoch) <= 864e13) - t1 = false; + t1 = e instanceof Date; + t1.toString; + if (t1) { + t1 = e.getTime(); + t1.toString; + if (Math.abs(t1) <= 864e13) + t2 = false; else - t1 = true; - if (t1) - H.throwExpression(P.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch)); - H.checkNotNullable(true, "isUtc", type$.bool); - return new P.DateTime(millisSinceEpoch, true); - } - if (e instanceof RegExp) - throw H.wrapException(P.UnimplementedError$("structured clone of RegExp")); - if (typeof Promise != "undefined" && e instanceof Promise) - return P.promiseToFuture(e, type$.dynamic); + t2 = true; + if (t2) + A.throwExpression(A.ArgumentError$("DateTime is outside valid range: " + t1, null)); + A.checkNotNullable(true, "isUtc", type$.bool); + return new A.DateTime(t1, true); + } + t1 = e instanceof RegExp; + t1.toString; + if (t1) + throw A.wrapException(A.UnimplementedError$("structured clone of RegExp")); + t1 = typeof Promise != "undefined" && e instanceof Promise; + t1.toString; + if (t1) + return A.promiseToFuture(e, type$.dynamic); proto = Object.getPrototypeOf(e); - if (proto === Object.prototype || proto === null) { + t1 = proto === Object.prototype; + t1.toString; + if (!t1) { + t1 = proto === null; + t1.toString; + } else + t1 = true; + if (t1) { slot = _this.findSlot$1(e); t1 = _this.copies; - if (slot >= t1.length) - return H.ioore(t1, slot); - copy = _box_0.copy = t1[slot]; + if (!(slot < t1.length)) + return A.ioore(t1, slot); + copy = t1[slot]; if (copy != null) return copy; t2 = type$.dynamic; - copy = P.LinkedHashMap_LinkedHashMap$_empty(t2, t2); - _box_0.copy = copy; - C.JSArray_methods.$indexSet(t1, slot, copy); - _this.forEachJsField$2(e, new P._AcceptStructuredClone_walk_closure(_box_0, _this)); - return _box_0.copy; - } - if (e instanceof Array) { - l = e; - slot = _this.findSlot$1(l); - t1 = _this.copies; - if (slot >= t1.length) - return H.ioore(t1, slot); - copy = t1[slot]; + map = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + B.JSArray_methods.$indexSet(t1, slot, map); + _this.forEachJsField$2(e, new A._AcceptStructuredClone_walk_closure(_this, map)); + return map; + } + t1 = e instanceof Array; + t1.toString; + if (t1) { + t1 = e; + t1.toString; + slot = _this.findSlot$1(t1); + t2 = _this.copies; + if (!(slot < t2.length)) + return A.ioore(t2, slot); + copy = t2[slot]; if (copy != null) return copy; - t2 = J.getInterceptor$asx(l); - $length = t2.get$length(l); - copy = _this.mustCopy ? new Array($length) : l; - C.JSArray_methods.$indexSet(t1, slot, copy); - for (t1 = J.getInterceptor$ax(copy), i = 0; i < $length; ++i) - t1.$indexSet(copy, i, _this.walk$1(t2.$index(l, i))); + t3 = J.getInterceptor$asx(t1); + $length = t3.get$length(t1); + if (_this.mustCopy) { + t4 = new Array($length); + t4.toString; + copy = t4; + } else + copy = t1; + B.JSArray_methods.$indexSet(t2, slot, copy); + for (t2 = J.getInterceptor$ax(copy), i = 0; i < $length; ++i) + t2.$indexSet(copy, i, _this.walk$1(t3.$index(t1, i))); return copy; } return e; }, - convertNativeToDart_AcceptStructuredClone$2$mustCopy: function(object, mustCopy) { + convertNativeToDart_AcceptStructuredClone$2$mustCopy(object, mustCopy) { this.mustCopy = true; return this.walk$1(object); } }; - P._AcceptStructuredClone_walk_closure.prototype = { - call$2: function(key, value) { - var t1 = this._box_0.copy, - t2 = this.$this.walk$1(value); - J.$indexSet$ax(t1, key, t2); - return t2; + A._AcceptStructuredClone_walk_closure.prototype = { + call$2(key, value) { + var t1 = this.$this.walk$1(value); + this.map.$indexSet(0, key, t1); + return t1; }, - $signature: 21 + $signature: 18 }; - P._convertDartToNative_Value_closure.prototype = { - call$1: function(element) { - this.array.push(P._convertDartToNative_Value(element)); + A._convertDartToNative_Value_closure.prototype = { + call$1(element) { + this.array.push(A._convertDartToNative_Value(element)); }, $signature: 2 }; - P.convertDartToNative_Dictionary_closure.prototype = { - call$2: function(key, value) { - this.object[key] = P._convertDartToNative_Value(value); + A.convertDartToNative_Dictionary_closure.prototype = { + call$2(key, value) { + this.object[key] = A._convertDartToNative_Value(value); }, - $signature: 22 + $signature: 19 }; - P._AcceptStructuredCloneDart2Js.prototype = { - forEachJsField$2: function(object, action) { + A._AcceptStructuredCloneDart2Js.prototype = { + forEachJsField$2(object, action) { var t1, t2, _i, key; type$.dynamic_Function_dynamic_dynamic._as(action); - for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) { + for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { key = t1[_i]; action.call$2(key, object[key]); } } }; - P.NullRejectionException.prototype = { - toString$0: function(_) { - return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; - } - }; - P.promiseToFuture_closure.prototype = { - call$1: function(r) { + A.promiseToFuture_closure.prototype = { + call$1(r) { return this.completer.complete$1(0, this.T._eval$1("0/?")._as(r)); }, $signature: 2 }; - P.promiseToFuture_closure0.prototype = { - call$1: function(e) { + A.promiseToFuture_closure0.prototype = { + call$1(e) { if (e == null) - return this.completer.completeError$1(new P.NullRejectionException(e === undefined)); + return this.completer.completeError$1(new A.NullRejectionException(e === undefined)); return this.completer.completeError$1(e); }, $signature: 2 }; - P._JSRandom.prototype = { - nextInt$1: function(max) { + A.NullRejectionException.prototype = { + toString$0(_) { + return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; + } + }; + A._JSRandom.prototype = { + nextInt$1(max) { if (max <= 0 || max > 4294967296) - throw H.wrapException(P.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); + throw A.wrapException(A.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); return Math.random() * max >>> 0; } }; - P.SvgElement.prototype = { - get$onClick: function(receiver) { - return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); + A.SvgElement.prototype = { + get$onClick(receiver) { + return new A._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); } }; - S.AsyncMemoizer.prototype = {}; - Y.Level.prototype = { - $eq: function(_, other) { + A.AsyncMemoizer.prototype = {}; + A.Level.prototype = { + $eq(_, other) { if (other == null) return false; - return other instanceof Y.Level && this.value === other.value; + return other instanceof A.Level && this.value === other.value; }, - get$hashCode: function(_) { + get$hashCode(_) { return this.value; }, - toString$0: function(_) { + toString$0(_) { return this.name; } }; - L.LogRecord.prototype = { - toString$0: function(_) { + A.LogRecord.prototype = { + toString$0(_) { return "[" + this.level.name + "] " + this.loggerName + ": " + this.message; } }; - F.Logger.prototype = { - get$fullName: function() { + A.Logger.prototype = { + get$fullName() { var t1 = this.parent, t2 = t1 == null ? null : t1.name.length !== 0, t3 = this.name; return t2 === true ? t1.get$fullName() + "." + t3 : t3; }, - get$level: function() { + get$level() { var t1, effectiveLevel; if (this.parent == null) { t1 = this._level; t1.toString; effectiveLevel = t1; } else { - t1 = $.$get$Logger_root(); - t1 = t1._level; + t1 = $.$get$Logger_root()._level; t1.toString; effectiveLevel = t1; } return effectiveLevel; }, - log$4: function(logLevel, message, error, stackTrace) { + log$4(logLevel, message, error, stackTrace) { var record, _this = this, t1 = logLevel.value; if (t1 >= _this.get$level().value) { if (t1 >= 2000) { - P.StackTrace_current(); + A.StackTrace_current(); logLevel.toString$0(0); } t1 = _this.get$fullName(); Date.now(); $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1; - record = new L.LogRecord(logLevel, message, t1); + record = new A.LogRecord(logLevel, message, t1); if (_this.parent == null) _this._publish$1(record); else $.$get$Logger_root()._publish$1(record); } }, - _publish$1: function(record) { + _publish$1(record) { return null; } }; - F.Logger_Logger_closure.prototype = { - call$0: function() { + A.Logger_Logger_closure.prototype = { + call$0() { var dot, $parent, t1, thisName = this.name; - if (C.JSString_methods.startsWith$1(thisName, ".")) - H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'")); - dot = C.JSString_methods.lastIndexOf$1(thisName, "."); + if (B.JSString_methods.startsWith$1(thisName, ".")) + A.throwExpression(A.ArgumentError$("name shouldn't start with a '.'", null)); + if (B.JSString_methods.endsWith$1(thisName, ".")) + A.throwExpression(A.ArgumentError$("name shouldn't end with a '.'", null)); + dot = B.JSString_methods.lastIndexOf$1(thisName, "."); if (dot === -1) - $parent = thisName !== "" ? F.Logger_Logger("") : null; + $parent = thisName !== "" ? A.Logger_Logger("") : null; else { - $parent = F.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot)); - thisName = C.JSString_methods.substring$1(thisName, dot + 1); + $parent = A.Logger_Logger(B.JSString_methods.substring$2(thisName, 0, dot)); + thisName = B.JSString_methods.substring$1(thisName, dot + 1); } - t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Logger)); + t1 = new A.Logger(thisName, $parent, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Logger)); if ($parent == null) - t1._level = C.Level_INFO_800; + t1._level = B.Level_INFO_800; else $parent._children.$indexSet(0, thisName, t1); return t1; }, - $signature: 23 + $signature: 20 }; - O.Pool.prototype = { - request$0: function(_) { + A.Pool.prototype = { + request$0(_) { var t1, t2, _this = this; - if (_this._closeMemo._completer.future._state !== 0) - throw H.wrapException(P.StateError$("request() may not be called on a closed Pool.")); + if ((_this._closeMemo._completer.future._state & 30) !== 0) + throw A.wrapException(A.StateError$("request() may not be called on a closed Pool.")); t1 = _this._allocatedResources; if (t1 < _this._maxAllocatedResources) { _this._allocatedResources = t1 + 1; - return P.Future_Future$value(new O.PoolResource(_this), type$.PoolResource); + return A.Future_Future$value(new A.PoolResource(_this), type$.PoolResource); } else { t1 = _this._onReleaseCallbacks; if (!t1.get$isEmpty(t1)) return _this._runOnRelease$1(t1.removeFirst$0()); else { - t1 = new P._Future($.Zone__current, type$._Future_PoolResource); + t1 = new A._Future($.Zone__current, type$._Future_PoolResource); t2 = _this._requestedResources; - t2._add$1(t2.$ti._precomputed1._as(new P._AsyncCompleter(t1, type$._AsyncCompleter_PoolResource))); + t2._add$1(t2.$ti._precomputed1._as(new A._AsyncCompleter(t1, type$._AsyncCompleter_PoolResource))); _this._resetTimer$0(); return t1; } } }, - withResource$1$1: function(callback, $T) { + withResource$1$1(callback, $T) { return this.withResource$body$Pool($T._eval$1("0/()")._as(callback), $T, $T); }, - withResource$body$Pool: function(callback, $T, $async$type) { + withResource$body$Pool(callback, $T, $async$type) { var $async$goto = 0, - $async$completer = P._makeAsyncAwaitCompleter($async$type), + $async$completer = A._makeAsyncAwaitCompleter($async$type), $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, resource, t1, t2; - var $async$withResource$1$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + var $async$withResource$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) { $async$currentError = $async$result; $async$goto = $async$handler; @@ -7524,16 +7728,17 @@ switch ($async$goto) { case 0: // Function start - if ($async$self._closeMemo._completer.future._state !== 0) - throw H.wrapException(P.StateError$("withResource() may not be called on a closed Pool.")); + if (($async$self._closeMemo._completer.future._state & 30) !== 0) + throw A.wrapException(A.StateError$("withResource() may not be called on a closed Pool.")); $async$goto = 3; - return P._asyncAwait($async$self.request$0(0), $async$withResource$1$1); + return A._asyncAwait($async$self.request$0(0), $async$withResource$1$1); case 3: // returning from await. resource = $async$result; $async$handler = 4; + t1 = callback.call$0(); $async$goto = 7; - return P._asyncAwait(callback.call$0(), $async$withResource$1$1); + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value($T._as(t1), $T), $async$withResource$1$1); case 7: // returning from await. t1 = $async$result; @@ -7554,16 +7759,16 @@ $async$handler = 2; t1 = resource; if (t1._released) - H.throwExpression(P.StateError$("A PoolResource may only be released once.")); + A.throwExpression(A.StateError$("A PoolResource may only be released once.")); t1._released = true; t1 = t1._pool; t1._resetTimer$0(); t2 = t1._requestedResources; if (!t2.get$isEmpty(t2)) - t2.removeFirst$0().complete$1(0, new O.PoolResource(t1)); + t2.removeFirst$0().complete$1(0, new A.PoolResource(t1)); else { t2 = --t1._allocatedResources; - if (t1._closeMemo._completer.future._state !== 0 && t2 === 0) + if ((t1._closeMemo._completer.future._state & 30) !== 0 && t2 === 0) null.close$0(0); } // goto the next finally handler @@ -7573,30 +7778,28 @@ // after finally case 1: // return - return P._asyncReturn($async$returnValue, $async$completer); + return A._asyncReturn($async$returnValue, $async$completer); case 2: // rethrow - return P._asyncRethrow($async$currentError, $async$completer); + return A._asyncRethrow($async$currentError, $async$completer); } }); - return P._asyncStartSync($async$withResource$1$1, $async$completer); - }, - _runOnRelease$1: function(onRelease) { - var t2, t3, - t1 = P.Future_Future$sync(type$.dynamic_Function._as(onRelease), type$.dynamic).then$1$1(new O.Pool__runOnRelease_closure(this), type$.Null), - onError = new O.Pool__runOnRelease_closure0(this); - type$.nullable_bool_Function_Object._as(null); - t2 = t1.$ti; - t3 = $.Zone__current; - if (t3 !== C.C__RootZone) - onError = P._registerErrorHandler(onError, t3); - t1._addListener$1(new P._FutureListener(new P._Future(t3, t2), 2, null, onError, t2._eval$1("@<1>")._bind$1(t2._precomputed1)._eval$1("_FutureListener<1,2>"))); - t1 = new P._Future($.Zone__current, type$._Future_PoolResource); + return A._asyncStartSync($async$withResource$1$1, $async$completer); + }, + _runOnRelease$1(onRelease) { + var t1 = A.Future_Future$sync(type$.dynamic_Function._as(onRelease), type$.dynamic).then$1$1(new A.Pool__runOnRelease_closure(this), type$.Null), + onError = new A.Pool__runOnRelease_closure0(this), + t2 = t1.$ti, + t3 = $.Zone__current; + if (t3 !== B.C__RootZone) + onError = A._registerErrorHandler(onError, t3); + t1._addListener$1(new A._FutureListener(new A._Future(t3, t2), 2, null, onError, t2._eval$1("@<1>")._bind$1(t2._precomputed1)._eval$1("_FutureListener<1,2>"))); + t1 = new A._Future($.Zone__current, type$._Future_PoolResource); t2 = this._onReleaseCompleters; - t2._add$1(t2.$ti._precomputed1._as(new P._SyncCompleter(t1, type$._SyncCompleter_PoolResource))); + t2._add$1(t2.$ti._precomputed1._as(new A._SyncCompleter(t1, type$._SyncCompleter_PoolResource))); return t1; }, - _resetTimer$0: function() { + _resetTimer$0() { var t2, t1 = this._timer; if (t1 == null) @@ -7606,81 +7809,94 @@ t1._restartable_timer$_timer.cancel$0(); else { t1._restartable_timer$_timer.cancel$0(); - t1._restartable_timer$_timer = P.Timer_Timer(t1._restartable_timer$_duration, t1._callback); + t1._restartable_timer$_timer = A.Timer_Timer(t1._restartable_timer$_duration, t1._callback); } } }; - O.Pool__runOnRelease_closure.prototype = { - call$1: function(value) { + A.Pool__runOnRelease_closure.prototype = { + call$1(value) { var t1 = this.$this; - J.complete$1$z(t1._onReleaseCompleters.removeFirst$0(), new O.PoolResource(t1)); + J.complete$1$z(t1._onReleaseCompleters.removeFirst$0(), new A.PoolResource(t1)); }, $signature: 4 }; - O.Pool__runOnRelease_closure0.prototype = { - call$2: function(error, stackTrace) { + A.Pool__runOnRelease_closure0.prototype = { + call$2(error, stackTrace) { type$.Object._as(error); type$.StackTrace._as(stackTrace); this.$this._onReleaseCompleters.removeFirst$0().completeError$2(error, stackTrace); }, $signature: 5 }; - O.PoolResource.prototype = {}; - M.SseClient.prototype = { - get$_eventSource: function() { - var t1 = this.__SseClient__eventSource; - return t1 == null ? H.throwExpression(H.LateError$fieldNI("_eventSource")) : t1; - }, - SseClient$1: function(serverUrl) { - var t1, t2, t3, t4, _this = this, - clientId = T.generateUuidV4(); - _this.__SseClient__eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); - _this.__SseClient__serverUrl = serverUrl + "?sseClientId=" + clientId; - t1 = new W._EventStream(_this.get$_eventSource(), "open", false, type$._EventStream_Event); - t1.get$first(t1).whenComplete$1(new M.SseClient_closure(_this)); - C.EventSource_methods.addEventListener$2(_this.get$_eventSource(), "message", _this.get$_onIncomingMessage()); - C.EventSource_methods.addEventListener$2(_this.get$_eventSource(), "control", _this.get$_onIncomingControlMessage()); - t1 = _this.get$_eventSource(); - t2 = type$.nullable_void_Function_Event; - t3 = t2._as(new M.SseClient_closure0(_this)); - type$.nullable_void_Function._as(null); - t4 = type$.Event; - W._EventStreamSubscription$(t1, "open", t3, false, t4); - W._EventStreamSubscription$(_this.get$_eventSource(), "error", t2._as(new M.SseClient_closure1(_this)), false, t4); - }, - close$0: function(_) { - var t1, _this = this; - _this.get$_eventSource().close(); - if (_this._onConnected.future._state === 0) { + A.PoolResource.prototype = {}; + A.SseClient.prototype = { + SseClient$2$debugKey(serverUrl, debugKey) { + var t2, _this = this, + t1 = serverUrl + "?sseClientId=" + _this._clientId; + _this.__SseClient__serverUrl_A = t1; + t1 = A.EventSource__factoryEventSource(t1, A.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); + _this.__SseClient__eventSource_A = t1; + t1 = new A._EventStream(t1, "open", false, type$._EventStream_Event); + t1.get$first(t1).whenComplete$1(new A.SseClient_closure(_this)); + B.EventSource_methods.addEventListener$2(_this.__SseClient__eventSource_A, "message", _this.get$_onIncomingMessage()); + B.EventSource_methods.addEventListener$2(_this.__SseClient__eventSource_A, "control", _this.get$_onIncomingControlMessage()); + t1 = type$.nullable_void_Function_Event; + t2 = type$.Event; + A._EventStreamSubscription$(_this.__SseClient__eventSource_A, "open", t1._as(new A.SseClient_closure0(_this)), false, t2); + A._EventStreamSubscription$(_this.__SseClient__eventSource_A, "error", t1._as(new A.SseClient_closure1(_this)), false, t2); + }, + close$0(_) { + var _this = this, + t1 = _this.__SseClient__eventSource_A; + t1 === $ && A.throwLateFieldNI("_eventSource"); + t1.close(); + if ((_this._onConnected.future._state & 30) === 0) { t1 = _this._outgoingController; - new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$cancelOnError(null, true).asFuture$1$1(null, type$.dynamic); + new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$cancelOnError(null, true).asFuture$1$1(null, type$.void); } _this._incomingController.close$0(0); _this._outgoingController.close$0(0); }, - _onIncomingControlMessage$1: function(message) { - var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.MessageEvent._as(type$.Event._as(message)).data, true); + _closeWithError$1(error) { + var stackTrace, t2, + t1 = this._incomingController; + A.checkNotNullable(error, "error", type$.Object); + if (t1._state >= 4) + A.throwExpression(t1._badEventState$0()); + stackTrace = A.AsyncError_defaultStackTrace(error); + t2 = t1._state; + if ((t2 & 1) !== 0) + t1._sendError$2(error, stackTrace); + else if ((t2 & 3) === 0) + t1._ensurePendingEvents$0().add$1(0, new A._DelayedError(error, stackTrace)); + this.close$0(0); + t1 = this._onConnected; + if ((t1.future._state & 30) === 0) + t1.completeError$1(error); + }, + _onIncomingControlMessage$1(message) { + var data = new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.MessageEvent._as(type$.Event._as(message)).data, true); if (J.$eq$(data, "close")) this.close$0(0); else - throw H.wrapException(P.UnsupportedError$('Illegal Control Message "' + H.S(data) + '"')); + throw A.wrapException(A.UnsupportedError$("[" + this._clientId + '] Illegal Control Message "' + A.S(data) + '"')); }, - _onIncomingMessage$1: function(message) { - this._incomingController.add$1(0, H._asString(C.C_JsonCodec.decode$2$reviver(0, H._asString(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.MessageEvent._as(type$.Event._as(message)).data, true)), null))); + _onIncomingMessage$1(message) { + this._incomingController.add$1(0, A._asString(B.C_JsonCodec.decode$2$reviver(0, A._asString(new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.MessageEvent._as(type$.Event._as(message)).data, true)), null))); }, - _onOutgoingDone$0: function() { + _onOutgoingDone$0() { this.close$0(0); }, - _onOutgoingMessage$1: function(message) { - return this._onOutgoingMessage$body$SseClient(H._asStringQ(message)); + _onOutgoingMessage$1(message) { + return this._onOutgoingMessage$body$SseClient(A._asStringQ(message)); }, - _onOutgoingMessage$body$SseClient: function(message) { + _onOutgoingMessage$body$SseClient(message) { var $async$goto = 0, - $async$completer = P._makeAsyncAwaitCompleter(type$.dynamic), + $async$completer = A._makeAsyncAwaitCompleter(type$.dynamic), $async$self = this, t1; - var $async$_onOutgoingMessage$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + var $async$_onOutgoingMessage$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) - return P._asyncRethrow($async$result, $async$completer); + return A._asyncRethrow($async$result, $async$completer); while (true) switch ($async$goto) { case 0: @@ -7688,72 +7904,56 @@ t1 = {}; t1.encodedMessage = null; $async$goto = 2; - return P._asyncAwait($.$get$_requestPool().withResource$1$1(new M.SseClient__onOutgoingMessage_closure(t1, $async$self, message), type$.Null), $async$_onOutgoingMessage$1); + return A._asyncAwait($.$get$_requestPool().withResource$1$1(new A.SseClient__onOutgoingMessage_closure(t1, $async$self, message), type$.Null), $async$_onOutgoingMessage$1); case 2: // returning from await. // implicit return - return P._asyncReturn(null, $async$completer); + return A._asyncReturn(null, $async$completer); } }); - return P._asyncStartSync($async$_onOutgoingMessage$1, $async$completer); + return A._asyncStartSync($async$_onOutgoingMessage$1, $async$completer); } }; - M.SseClient_closure.prototype = { - call$0: function() { + A.SseClient_closure.prototype = { + call$0() { var t2, t1 = this.$this; t1._onConnected.complete$0(0); t2 = t1._outgoingController; - new P._ControllerStream(t2, H._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$2$onDone(t1.get$_onOutgoingMessage(), t1.get$_onOutgoingDone()); + new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$2$onDone(t1.get$_onOutgoingMessage(), t1.get$_onOutgoingDone()); }, $signature: 3 }; - M.SseClient_closure0.prototype = { - call$1: function(_) { + A.SseClient_closure0.prototype = { + call$1(_) { var t1 = this.$this._errorTimer; if (t1 != null) t1.cancel$0(); }, $signature: 1 }; - M.SseClient_closure1.prototype = { - call$1: function(error) { + A.SseClient_closure1.prototype = { + call$1(error) { var t1 = this.$this, t2 = t1._errorTimer; t2 = t2 == null ? null : t2._handle != null; if (t2 !== true) - t1._errorTimer = P.Timer_Timer(C.Duration_5000000, new M.SseClient__closure(t1, error)); + t1._errorTimer = A.Timer_Timer(B.Duration_5000000, new A.SseClient__closure(t1, error)); }, $signature: 1 }; - M.SseClient__closure.prototype = { - call$0: function() { - var stackTrace, t3, - t1 = this.$this, - t2 = t1._incomingController, - error = this.error; - H.checkNotNullable(error, "error", type$.Object); - if (t2._state >= 4) - H.throwExpression(t2._badEventState$0()); - stackTrace = P.AsyncError_defaultStackTrace(error); - t3 = t2._state; - if ((t3 & 1) !== 0) - t2._sendError$2(error, stackTrace); - else if ((t3 & 3) === 0) - t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, stackTrace)); - t1.close$0(0); - t1 = t1._onConnected; - if (t1.future._state === 0) - t1.completeError$1(error); + A.SseClient__closure.prototype = { + call$0() { + this.$this._closeWithError$1(this.error); }, $signature: 0 }; - M.SseClient__onOutgoingMessage_closure.prototype = { - call$0: function() { + A.SseClient__onOutgoingMessage_closure.prototype = { + call$0() { var $async$goto = 0, - $async$completer = P._makeAsyncAwaitCompleter(type$.Null), - $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, e, e0, e1, exception, t1, t2, $async$exception; - var $async$call$0 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$handler = 1, $async$currentError, $async$self = this, e, e0, url, error, augmentedError, exception, t1, t2, $async$exception; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) { $async$currentError = $async$result; $async$goto = $async$handler; @@ -7763,23 +7963,27 @@ case 0: // Function start try { - $async$self._box_0.encodedMessage = C.C_JsonCodec.encode$2$toEncodable($async$self.message, null); + $async$self._box_0.encodedMessage = B.C_JsonCodec.encode$2$toEncodable($async$self.message, null); } catch (exception) { - t1 = H.unwrapException(exception); - if (t1 instanceof P.JsonUnsupportedObjectError) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.JsonUnsupportedObjectError) { e = t1; - $async$self.$this._logger.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null); - } else if (t1 instanceof P.ArgumentError) { + t1 = $async$self.$this; + t1._logger.log$4(B.Level_WARNING_900, "[" + t1._clientId + "] Unable to encode outgoing message: " + A.S(e), null, null); + } else if (t1 instanceof A.ArgumentError) { e0 = t1; - $async$self.$this._logger.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null); + t1 = $async$self.$this; + t1._logger.log$4(B.Level_WARNING_900, "[" + t1._clientId + "] Invalid argument: " + A.S(e0), null, null); } else throw exception; } $async$handler = 3; t1 = $async$self.$this; - t2 = t1.__SseClient__serverUrl; + t2 = t1.__SseClient__serverUrl_A; + t2 === $ && A.throwLateFieldNI("_serverUrl"); + url = t2 + "&messageId=" + ++t1._lastMessageId; $async$goto = 6; - return P._asyncAwait(W.HttpRequest_request((t2 == null ? H.throwExpression(H.LateError$fieldNI("_serverUrl")) : t2) + "&messageId=" + ++t1._lastMessageId, "POST", $async$self._box_0.encodedMessage, true), $async$call$0); + return A._asyncAwait(A.promiseToFuture(self.fetch(url, {method: "POST", credentials: "include", body: $async$self._box_0.encodedMessage}), type$.dynamic), $async$call$0); case 6: // returning from await. $async$handler = 1; @@ -7790,10 +7994,11 @@ // catch $async$handler = 2; $async$exception = $async$currentError; - e1 = H.unwrapException($async$exception); + error = A.unwrapException($async$exception); t1 = $async$self.$this; - t1._logger.log$4(C.Level_SEVERE_1000, "Failed to send " + H.S($async$self.message) + ":\n " + H.S(e1), null, null); - t1.close$0(0); + augmentedError = "[" + t1._clientId + "] SSE client failed to send " + A.S($async$self.message) + ":\n " + A.S(error); + t1._logger.log$4(B.Level_SEVERE_1000, augmentedError, null, null); + t1._closeWithError$1(augmentedError); // goto after finally $async$goto = 5; break; @@ -7805,58 +8010,59 @@ case 5: // after finally // implicit return - return P._asyncReturn(null, $async$completer); + return A._asyncReturn(null, $async$completer); case 1: // rethrow - return P._asyncRethrow($async$currentError, $async$completer); + return A._asyncRethrow($async$currentError, $async$completer); } }); - return P._asyncStartSync($async$call$0, $async$completer); + return A._asyncStartSync($async$call$0, $async$completer); }, $signature: 7 }; - T.generateUuidV4__generateBits.prototype = { - call$1: function(bitCount) { - return this.random.nextInt$1(C.JSInt_methods._shlPositive$1(1, bitCount)); + A._FetchOptions.prototype = {}; + A.generateUuidV4_generateBits.prototype = { + call$1(bitCount) { + return this.random.nextInt$1(B.JSInt_methods._shlPositive$1(1, bitCount)); }, - $signature: 25 + $signature: 22 }; - T.generateUuidV4__printDigits.prototype = { - call$2: function(value, count) { - return C.JSString_methods.padLeft$2(C.JSInt_methods.toRadixString$1(value, 16), count, "0"); + A.generateUuidV4_printDigits.prototype = { + call$2(value, count) { + return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(value, 16), count, "0"); }, - $signature: 12 + $signature: 11 }; - T.generateUuidV4__bitsDigits.prototype = { - call$2: function(bitCount, digitCount) { - return this._printDigits.call$2(this._generateBits.call$1(bitCount), digitCount); + A.generateUuidV4_bitsDigits.prototype = { + call$2(bitCount, digitCount) { + return this.printDigits.call$2(this.generateBits.call$1(bitCount), digitCount); }, - $signature: 12 + $signature: 11 }; - R.StreamChannelMixin.prototype = {}; - E.main_closure.prototype = { - call$1: function(_) { + A.StreamChannelMixin.prototype = {}; + A.main_closure.prototype = { + call$1(_) { type$.MouseEvent._as(_); this.channel._outgoingController.close$0(0); }, - $signature: 26 + $signature: 23 }; - E.main_closure0.prototype = { - call$1: function(s) { + A.main_closure0.prototype = { + call$1(s) { var count, t1, t2, t3, i, t4, t5, lastEvent; - H._asString(s); - if (C.JSString_methods.startsWith$1(s, "send ")) { - count = P.int_parse(C.JSArray_methods.get$last(s.split(" ")), null); - for (t1 = this.channel._outgoingController, t2 = H._instanceType(t1), t3 = t2._precomputed1, t2 = t2._eval$1("_DelayedData<1>"), i = 0; i < count; ++i) { + A._asString(s); + if (B.JSString_methods.startsWith$1(s, "send ")) { + count = A.int_parse(B.JSArray_methods.get$last(s.split(" ")), null); + for (t1 = this.channel._outgoingController, t2 = A._instanceType(t1), t3 = t2._precomputed1, t2 = t2._eval$1("_DelayedData<1>"), i = 0; i < count; ++i) { t4 = t3._as("" + i); t5 = t1._state; if (t5 >= 4) - H.throwExpression(t1._badEventState$0()); + A.throwExpression(t1._badEventState$0()); if ((t5 & 1) !== 0) t1._sendData$1(t4); else if ((t5 & 3) === 0) { t5 = t1._ensurePendingEvents$0(); - t4 = new P._DelayedData(t4, t2); + t4 = new A._DelayedData(t4, t2); lastEvent = t5.lastPendingEvent; if (lastEvent == null) t5.firstPendingEvent = t5.lastPendingEvent = t4; @@ -7868,116 +8074,112 @@ } } else { t1 = this.channel._outgoingController; - t1.add$1(0, H._instanceType(t1)._precomputed1._as(s)); + t1.add$1(0, A._instanceType(t1)._precomputed1._as(s)); } }, - $signature: 27 + $signature: 24 }; (function aliases() { var _ = J.Interceptor.prototype; _.super$Interceptor$toString = _.toString$0; - _ = J.JavaScriptObject.prototype; - _.super$JavaScriptObject$toString = _.toString$0; + _ = J.LegacyJavaScriptObject.prototype; + _.super$LegacyJavaScriptObject$toString = _.toString$0; })(); (function installTearOffs() { var _static_1 = hunkHelpers._static_1, _static_0 = hunkHelpers._static_0, _static_2 = hunkHelpers._static_2, - _instance = hunkHelpers.installInstanceTearOff, _instance_2_u = hunkHelpers._instance_2u, _instance_1_u = hunkHelpers._instance_1u, _instance_0_u = hunkHelpers._instance_0u; - _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 6); - _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6); - _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6); - _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); - _static_1(P, "async___nullDataHandler$closure", "_nullDataHandler", 2); - _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 9); - _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); - _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 18, 0); - _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 9); - _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 8); + _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 6); + _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6); + _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6); + _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); + _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 2); + _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 9); + _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); + _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 9); + _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 8); var _; - _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 1); + _instance_1_u(_ = A.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 1); _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 1); _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0); - _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 24); + _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 21); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; - _inherit(P.Object, null); - _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, H.Closure, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.StringMatch, H.Rti, H._FunctionParameters, P._TimerImpl, P._AsyncAwaitCompleter, P.AsyncError, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P._Zone, P.ListMixin, P._ListQueueIterator, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P.NullRejectionException, P._JSRandom, S.AsyncMemoizer, Y.Level, L.LogRecord, F.Logger, O.Pool, O.PoolResource, R.StreamChannelMixin]); - _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]); - _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); + _inherit(A.Object, null); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, J.ArrayIterator, A.Error, A.Closure, A.Iterable, A.ListIterator, A.FixedLengthListMixin, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.MapBase, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.StringMatch, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._StreamIterator, A._Zone, A.ListBase, A._ListQueueIterator, A.Codec, A.Converter, A._JsonStringifier, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.Null, A._StringStackTrace, A.StringBuffer, A.EventStreamProvider, A._EventStreamSubscription, A._AcceptStructuredClone, A.NullRejectionException, A._JSRandom, A.AsyncMemoizer, A.Level, A.LogRecord, A.Logger, A.Pool, A.PoolResource, A.StreamChannelMixin]); + _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]); + _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData, A.EventTarget, A.DomException, A.Event]); + _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction, A._FetchOptions]); _inherit(J.JSUnmodifiableArray, J.JSArray); _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); - _inheritMany(P.Error, [H.LateError, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); - _inheritMany(H.Closure, [H.nullFuture_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription_asFuture_closure, P._BufferingStreamSubscription_asFuture_closure0, P._BufferingStreamSubscription_asFuture__closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P._convertDartToNative_Value_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, O.Pool__runOnRelease_closure, O.Pool__runOnRelease_closure0, M.SseClient_closure, M.SseClient_closure0, M.SseClient_closure1, M.SseClient__closure, M.SseClient__onOutgoingMessage_closure, T.generateUuidV4__generateBits, T.generateUuidV4__printDigits, T.generateUuidV4__bitsDigits, E.main_closure, E.main_closure0]); - _inherit(H.EfficientLengthIterable, P.Iterable); - _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]); - _inherit(H.NullError, P.TypeError); - _inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]); - _inherit(H._AssertionError, P.AssertionError); - _inherit(P.MapBase, P.MapMixin); - _inheritMany(P.MapBase, [H.JsLinkedHashMap, P._JsonMap]); - _inherit(H.NativeTypedArray, H.NativeTypedData); - _inheritMany(H.NativeTypedArray, [H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); - _inherit(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); - _inherit(H.NativeTypedArrayOfDouble, H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); - _inherit(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); - _inherit(H.NativeTypedArrayOfInt, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); - _inheritMany(H.NativeTypedArrayOfInt, [H.NativeInt16List, H.NativeInt32List, H.NativeInt8List, H.NativeUint16List, H.NativeUint32List, H.NativeUint8ClampedList, H.NativeUint8List]); - _inherit(H._TypeError, H._Error); - _inheritMany(P._Completer, [P._AsyncCompleter, P._SyncCompleter]); - _inherit(P._AsyncStreamController, P._StreamController); - _inheritMany(P.Stream, [P._StreamImpl, W._EventStream]); - _inherit(P._ControllerStream, P._StreamImpl); - _inherit(P._ControllerSubscription, P._BufferingStreamSubscription); - _inheritMany(P._DelayedEvent, [P._DelayedData, P._DelayedError]); - _inherit(P._StreamImplEvents, P._PendingEvents); - _inherit(P._RootZone, P._Zone); - _inheritMany(H.ListIterable, [P.ListQueue, P._JsonMapKeyIterable]); - _inherit(P.Converter, P.StreamTransformerBase); - _inherit(P.JsonCyclicError, P.JsonUnsupportedObjectError); - _inherit(P.JsonCodec, P.Codec); - _inheritMany(P.Converter, [P.JsonEncoder, P.JsonDecoder]); - _inherit(P._JsonStringStringifier, P._JsonStringifier); - _inheritMany(P.ArgumentError, [P.RangeError, P.IndexError]); - _inheritMany(W.EventTarget, [W.Node, W.EventSource, W.HttpRequestEventTarget]); - _inherit(W.Element, W.Node); - _inheritMany(W.Element, [W.HtmlElement, P.SvgElement]); - _inheritMany(W.HtmlElement, [W.AnchorElement, W.AreaElement, W.FormElement, W.SelectElement]); - _inherit(W.HttpRequest, W.HttpRequestEventTarget); - _inheritMany(W.Event, [W.MessageEvent, W.UIEvent, W.ProgressEvent]); - _inherit(W.MouseEvent, W.UIEvent); - _inherit(W._ElementEventStreamImpl, W._EventStream); - _inherit(W._EventStreamSubscription, P.StreamSubscription); - _inherit(P._AcceptStructuredCloneDart2Js, P._AcceptStructuredClone); - _inherit(M.SseClient, R.StreamChannelMixin); - _mixin(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, P.ListMixin); - _mixin(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin); - _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, P.ListMixin); - _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin); - _mixin(P._AsyncStreamController, P._AsyncStreamControllerDispatch); + _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A._CyclicInitializationError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError]); + _inheritMany(A.Closure, [A.Closure0Args, A.Closure2Args, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__chainForeignFuture_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A.Stream_length_closure, A.Stream_first_closure0, A._RootZone_bindUnaryCallbackGuarded_closure, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A._convertDartToNative_Value_closure, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.Pool__runOnRelease_closure, A.SseClient_closure0, A.SseClient_closure1, A.generateUuidV4_generateBits, A.main_closure, A.main_closure0]); + _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainForeignFuture_closure1, A._Future__chainCoreFutureAsync_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteError_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A.Stream_length_closure0, A.Stream_first_closure, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._cancelAndValue_closure, A._rootHandleError_closure, A._RootZone_bindCallbackGuarded_closure, A.Logger_Logger_closure, A.SseClient_closure, A.SseClient__closure, A.SseClient__onOutgoingMessage_closure]); + _inherit(A.EfficientLengthIterable, A.Iterable); + _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.LinkedHashMapKeyIterable]); + _inherit(A.NullError, A.TypeError); + _inheritMany(A.TearOffClosure, [A.StaticClosure, A.BoundClosure]); + _inheritMany(A.MapBase, [A.JsLinkedHashMap, A._JsonMap]); + _inheritMany(A.Closure2Args, [A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__chainForeignFuture_closure0, A._BufferingStreamSubscription_asFuture_closure0, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A._AcceptStructuredClone_walk_closure, A.convertDartToNative_Dictionary_closure, A.Pool__runOnRelease_closure0, A.generateUuidV4_printDigits, A.generateUuidV4_bitsDigits]); + _inheritMany(A.NativeTypedData, [A.NativeByteData, A.NativeTypedArray]); + _inheritMany(A.NativeTypedArray, [A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); + _inherit(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfDouble, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inherit(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfInt, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inheritMany(A.NativeTypedArrayOfDouble, [A.NativeFloat32List, A.NativeFloat64List]); + _inheritMany(A.NativeTypedArrayOfInt, [A.NativeInt16List, A.NativeInt32List, A.NativeInt8List, A.NativeUint16List, A.NativeUint32List, A.NativeUint8ClampedList, A.NativeUint8List]); + _inherit(A._TypeError, A._Error); + _inheritMany(A._Completer, [A._AsyncCompleter, A._SyncCompleter]); + _inherit(A._AsyncStreamController, A._StreamController); + _inheritMany(A.Stream, [A._StreamImpl, A._EventStream]); + _inherit(A._ControllerStream, A._StreamImpl); + _inherit(A._ControllerSubscription, A._BufferingStreamSubscription); + _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]); + _inherit(A._RootZone, A._Zone); + _inheritMany(A.ListIterable, [A.ListQueue, A._JsonMapKeyIterable]); + _inherit(A.JsonCyclicError, A.JsonUnsupportedObjectError); + _inherit(A.JsonCodec, A.Codec); + _inheritMany(A.Converter, [A.JsonEncoder, A.JsonDecoder]); + _inherit(A._JsonStringStringifier, A._JsonStringifier); + _inheritMany(A.ArgumentError, [A.RangeError, A.IndexError]); + _inheritMany(A.EventTarget, [A.Node, A.EventSource]); + _inherit(A.Element, A.Node); + _inheritMany(A.Element, [A.HtmlElement, A.SvgElement]); + _inheritMany(A.HtmlElement, [A.AnchorElement, A.AreaElement, A.FormElement, A.SelectElement]); + _inheritMany(A.Event, [A.MessageEvent, A.UIEvent]); + _inherit(A.MouseEvent, A.UIEvent); + _inherit(A._ElementEventStreamImpl, A._EventStream); + _inherit(A._AcceptStructuredCloneDart2Js, A._AcceptStructuredClone); + _inherit(A.SseClient, A.StreamChannelMixin); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListBase); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListBase); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._AsyncStreamController, A._AsyncStreamControllerDispatch); })(); var init = { typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, mangledNames: {}, - getTypeFromName: getGlobalFromName, - metadata: [], - types: ["~()", "~(Event)", "~(@)", "Null()", "Null(@)", "Null(Object,StackTrace)", "~(~())", "Future()", "@(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int)", "String(int,int)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "~(Object[StackTrace?])", "_Future<@>(@)", "~(ProgressEvent)", "@(@,@)", "~(@,@)", "Logger()", "~(String?)", "int(int)", "~(MouseEvent)", "~(String)"], + types: ["~()", "~(Event)", "~(@)", "Null()", "Null(@)", "Null(Object,StackTrace)", "~(~())", "Future()", "@(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int,int)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "_Future<@>(@)", "@(@,@)", "~(@,@)", "Logger()", "~(String?)", "int(int)", "~(MouseEvent)", "~(String)"], interceptorsByTag: null, leafTags: null, - arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti" + arrayRti: Symbol("$ti") + }; + A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","_FetchOptions":"LegacyJavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","MathMLElement":"Element","HtmlDocument":"Node","Document":"Node","JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Pattern":[],"TrustedGetRuntimeType":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"_CyclicInitializationError":{"Error":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeByteBuffer":{"TrustedGetRuntimeType":[]},"NativeByteData":{"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeFloat64List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeInt16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8ClampedList":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"Iterable":["1"],"ListIterable.E":"1"},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"MouseEvent":{"Event":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"MessageEvent":{"Event":[]},"Node":{"EventTarget":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]},"Int8List":{"List":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"Iterable":["double"]}}')); + A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"_DelayedEvent":1,"StreamChannelMixin":1}')); + var string$ = { + Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type" }; - H._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","JavaScriptFunction":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSNumNotInt":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"ListQueue":{"ListIterable":["1"],"Queue":["1"],"Iterable":["1"],"ListIterable.E":"1"},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MouseEvent":{"Event":[]},"ProgressEvent":{"Event":[]},"UIEvent":{"Event":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"MessageEvent":{"Event":[]},"Node":{"EventTarget":[]},"SelectElement":{"Element":[],"EventTarget":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]}}')); - H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"StreamChannelMixin":1}')); - 0; var type$ = (function rtii() { - var findType = H.findType; + var findType = A.findType; return { $env_1_1_void: findType("@<~>"), AsyncError: findType("AsyncError"), @@ -7985,7 +8187,6 @@ Event: findType("Event"), Function: findType("Function"), Future_dynamic: findType("Future<@>"), - Future_void: findType("Future<~>"), Iterable_dynamic: findType("Iterable<@>"), JSArray_String: findType("JSArray"), JSArray_dynamic: findType("JSArray<@>"), @@ -7999,18 +8200,17 @@ MouseEvent: findType("MouseEvent"), Null: findType("Null"), Object: findType("Object"), - Pattern: findType("Pattern"), PoolResource: findType("PoolResource"), - ProgressEvent: findType("ProgressEvent"), + Record: findType("Record"), StackTrace: findType("StackTrace"), String: findType("String"), + TrustedGetRuntimeType: findType("TrustedGetRuntimeType"), + TypeError: findType("TypeError"), UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), - _AsyncCompleter_HttpRequest: findType("_AsyncCompleter"), _AsyncCompleter_PoolResource: findType("_AsyncCompleter"), - _AsyncCompleter_dynamic: findType("_AsyncCompleter<@>"), + _AsyncCompleter_void: findType("_AsyncCompleter<~>"), _ElementEventStreamImpl_MouseEvent: findType("_ElementEventStreamImpl"), _EventStream_Event: findType("_EventStream"), - _Future_HttpRequest: findType("_Future"), _Future_PoolResource: findType("_Future"), _Future_dynamic: findType("_Future<@>"), _Future_int: findType("_Future"), @@ -8034,13 +8234,9 @@ nullable_StackTrace: findType("StackTrace?"), nullable__DelayedEvent_dynamic: findType("_DelayedEvent<@>?"), nullable__FutureListener_dynamic_dynamic: findType("_FutureListener<@,@>?"), - nullable_bool_Function_Object: findType("bool(Object)?"), nullable_dynamic_Function_Event: findType("@(Event)?"), - nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object: findType("Object?(Object?,Object?)?"), - nullable_nullable_Object_Function_dynamic: findType("Object?(@)?"), nullable_void_Function: findType("~()?"), nullable_void_Function_Event: findType("~(Event)?"), - nullable_void_Function_ProgressEvent: findType("~(ProgressEvent)?"), num: findType("num"), void: findType("~"), void_Function: findType("~()"), @@ -8050,22 +8246,21 @@ }; })(); (function constants() { - C.EventSource_methods = W.EventSource.prototype; - C.HttpRequest_methods = W.HttpRequest.prototype; - C.Interceptor_methods = J.Interceptor.prototype; - C.JSArray_methods = J.JSArray.prototype; - C.JSInt_methods = J.JSInt.prototype; - C.JSNull_methods = J.JSNull.prototype; - C.JSNumber_methods = J.JSNumber.prototype; - C.JSString_methods = J.JSString.prototype; - C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; - C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; - C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; - C.C_JS_CONST = function getTagFallback(o) { + B.EventSource_methods = A.EventSource.prototype; + B.Interceptor_methods = J.Interceptor.prototype; + B.JSArray_methods = J.JSArray.prototype; + B.JSInt_methods = J.JSInt.prototype; + B.JSNumber_methods = J.JSNumber.prototype; + B.JSString_methods = J.JSString.prototype; + B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; + B.JavaScriptObject_methods = J.JavaScriptObject.prototype; + B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; + B.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; + B.C_JS_CONST = function getTagFallback(o) { var s = Object.prototype.toString.call(o); return s.substring(8, s.length - 1); }; - C.C_JS_CONST0 = function() { + B.C_JS_CONST0 = function() { var toStringFunction = Object.prototype.toString; function getTag(o) { var s = toStringFunction.call(o); @@ -8097,7 +8292,7 @@ prototypeForTag: prototypeForTag, discriminator: discriminator }; }; - C.C_JS_CONST6 = function(getTagFallback) { + B.C_JS_CONST6 = function(getTagFallback) { return function(hooks) { if (typeof navigator != "object") return hooks; var ua = navigator.userAgent; @@ -8111,11 +8306,11 @@ hooks.getTag = getTagFallback; }; }; - C.C_JS_CONST1 = function(hooks) { + B.C_JS_CONST1 = function(hooks) { if (typeof dartExperimentalFixupGetTag != "function") return hooks; hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); }; - C.C_JS_CONST2 = function(hooks) { + B.C_JS_CONST2 = function(hooks) { var getTag = hooks.getTag; var prototypeForTag = hooks.prototypeForTag; function getTagFixed(o) { @@ -8133,7 +8328,7 @@ hooks.getTag = getTagFixed; hooks.prototypeForTag = prototypeForTagFixed; }; - C.C_JS_CONST5 = function(hooks) { + B.C_JS_CONST5 = function(hooks) { var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; if (userAgent.indexOf("Firefox") == -1) return hooks; var getTag = hooks.getTag; @@ -8150,7 +8345,7 @@ } hooks.getTag = getTagFirefox; }; - C.C_JS_CONST4 = function(hooks) { + B.C_JS_CONST4 = function(hooks) { var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; if (userAgent.indexOf("Trident/") == -1) return hooks; var getTag = hooks.getTag; @@ -8179,27 +8374,39 @@ hooks.getTag = getTagIE; hooks.prototypeForTag = prototypeForTagIE; }; - C.C_JS_CONST3 = function(hooks) { return hooks; } + B.C_JS_CONST3 = function(hooks) { return hooks; } ; - C.C_JsonCodec = new P.JsonCodec(); - C.C_OutOfMemoryError = new P.OutOfMemoryError(); - C.C__DelayedDone = new P._DelayedDone(); - C.C__JSRandom = new P._JSRandom(); - C.C__RootZone = new P._RootZone(); - C.Duration_0 = new P.Duration(0); - C.Duration_5000000 = new P.Duration(5000000); - C.JsonDecoder_null = new P.JsonDecoder(null); - C.JsonEncoder_null = new P.JsonEncoder(null); - C.Level_INFO_800 = new Y.Level("INFO", 800); - C.Level_SEVERE_1000 = new Y.Level("SEVERE", 1000); - C.Level_WARNING_900 = new Y.Level("WARNING", 900); - C._StringStackTrace_3uE = new P._StringStackTrace(""); + B.C_JsonCodec = new A.JsonCodec(); + B.C_OutOfMemoryError = new A.OutOfMemoryError(); + B.C__DelayedDone = new A._DelayedDone(); + B.C__JSRandom = new A._JSRandom(); + B.C__RootZone = new A._RootZone(); + B.Duration_0 = new A.Duration(0); + B.Duration_5000000 = new A.Duration(5000000); + B.JsonDecoder_null = new A.JsonDecoder(null); + B.JsonEncoder_null = new A.JsonEncoder(null); + B.Level_INFO_800 = new A.Level("INFO", 800); + B.Level_SEVERE_1000 = new A.Level("SEVERE", 1000); + B.Level_WARNING_900 = new A.Level("WARNING", 900); + B.Type_ByteBuffer_RkP = A.typeLiteral("ByteBuffer"); + B.Type_ByteData_zNC = A.typeLiteral("ByteData"); + B.Type_Float32List_LB7 = A.typeLiteral("Float32List"); + B.Type_Float64List_LB7 = A.typeLiteral("Float64List"); + B.Type_Int16List_uXf = A.typeLiteral("Int16List"); + B.Type_Int32List_O50 = A.typeLiteral("Int32List"); + B.Type_Int8List_ekJ = A.typeLiteral("Int8List"); + B.Type_Uint16List_2bx = A.typeLiteral("Uint16List"); + B.Type_Uint32List_2bx = A.typeLiteral("Uint32List"); + B.Type_Uint8ClampedList_Jik = A.typeLiteral("Uint8ClampedList"); + B.Type_Uint8List_WLA = A.typeLiteral("Uint8List"); + B._StringStackTrace_3uE = new A._StringStackTrace(""); })(); (function staticFields() { $._JS_INTEROP_INTERCEPTOR_TAG = null; - $.Closure_functionCounter = 0; - $.BoundClosure_selfFieldNameCache = null; - $.BoundClosure_receiverFieldNameCache = null; + $.toStringVisiting = A._setArrayType([], A.findType("JSArray")); + $.Primitives__identityHashCodeProperty = null; + $.BoundClosure__receiverFieldNameCache = null; + $.BoundClosure__interceptorFieldNameCache = null; $.getTagFunction = null; $.alternateTagFunction = null; $.prototypeForTagFunction = null; @@ -8210,104 +8417,69 @@ $._lastCallback = null; $._lastPriorityCallback = null; $._isInCallbackLoop = false; - $.Zone__current = C.C__RootZone; - $._toStringVisiting = H.setRuntimeTypeInfo([], H.findType("JSArray")); + $.Zone__current = B.C__RootZone; $.LogRecord__nextNumber = 0; - $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Logger); + $.Logger__loggers = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Logger); })(); (function lazyInitializers() { - var _lazyFinal = hunkHelpers.lazyFinal, - _lazy = hunkHelpers.lazy; - _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() { - return H.getIsolateAffinityTag("_$dart_dartClosure"); - }); - _lazyFinal($, "nullFuture", "$get$nullFuture", function() { - return C.C__RootZone.run$1$1(new H.nullFuture_closure(), H.findType("Future")); - }); - _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({ - toString: function() { - return "$receiver$"; - } - })); - }); - _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({$method$: null, - toString: function() { - return "$receiver$"; - } - })); - }); - _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(null)); - }); - _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { - return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = "$arguments$"; - try { - null.$method$($argumentsExpr$); - } catch (e) { - return e.message; - } - }()); - }); - _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(void 0)); - }); - _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { - return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = "$arguments$"; - try { - (void 0).$method$($argumentsExpr$); - } catch (e) { - return e.message; - } - }()); - }); - _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(null)); - }); - _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() { - return H.TypeErrorDecoder_extractPattern(function() { - try { - null.$method$; - } catch (e) { - return e.message; - } - }()); - }); - _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(void 0)); - }); - _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() { - return H.TypeErrorDecoder_extractPattern(function() { - try { - (void 0).$method$; - } catch (e) { - return e.message; - } - }()); - }); - _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() { - return P._AsyncRun__initializeScheduleImmediate(); - }); - _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", function() { - return H.findType("_Future")._as($.$get$nullFuture()); - }); - _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() { - return new Error().stack != void 0; - }); - _lazyFinal($, "Logger_root", "$get$Logger_root", function() { - return F.Logger_Logger(""); - }); - _lazyFinal($, "_requestPool", "$get$_requestPool", function() { + var _lazyFinal = hunkHelpers.lazyFinal; + _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", () => A.getIsolateAffinityTag("_$dart_dartClosure")); + _lazyFinal($, "nullFuture", "$get$nullFuture", () => B.C__RootZone.run$1$1(new A.nullFuture_closure(), A.findType("Future"))); + _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({ + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({$method$: null, + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + null.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + (void 0).$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + null.$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + (void 0).$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", () => A._AsyncRun__initializeScheduleImmediate()); + _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", () => A.findType("_Future")._as($.$get$nullFuture())); + _lazyFinal($, "Logger_root", "$get$Logger_root", () => A.Logger_Logger("")); + _lazyFinal($, "_requestPool", "$get$_requestPool", () => { var t4, - t1 = H.findType("Completer"), - t2 = P.ListQueue$(t1), - t3 = P.ListQueue$(type$.void_Function); - t1 = P.ListQueue$(t1); - t4 = P.Completer_Completer(type$.dynamic); - return new O.Pool(t2, t3, t1, 1000, new S.AsyncMemoizer(t4, H.findType("AsyncMemoizer<@>"))); + t1 = A.findType("Completer"), + t2 = A.ListQueue$(t1), + t3 = A.ListQueue$(type$.void_Function); + t1 = A.ListQueue$(t1); + t4 = A.Completer_Completer(type$.dynamic); + return new A.Pool(t2, t3, t1, 1000, new A.AsyncMemoizer(t4, A.findType("AsyncMemoizer<@>"))); }); })(); (function nativeSupport() { @@ -8333,16 +8505,34 @@ } init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); }(); - hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: J.Interceptor, Blob: J.Interceptor, DOMError: J.Interceptor, File: J.Interceptor, MediaError: J.Interceptor, NavigatorUserMediaError: J.Interceptor, OverconstrainedError: J.Interceptor, PositionError: J.Interceptor, SQLError: J.Interceptor, DataView: H.NativeTypedData, ArrayBufferView: H.NativeTypedData, Float32Array: H.NativeTypedArrayOfDouble, Float64Array: H.NativeTypedArrayOfDouble, Int16Array: H.NativeInt16List, Int32Array: H.NativeInt32List, Int8Array: H.NativeInt8List, Uint16Array: H.NativeUint16List, Uint32Array: H.NativeUint32List, Uint8ClampedArray: H.NativeUint8ClampedList, CanvasPixelArray: H.NativeUint8ClampedList, Uint8Array: H.NativeUint8List, HTMLAudioElement: W.HtmlElement, HTMLBRElement: W.HtmlElement, HTMLBaseElement: W.HtmlElement, HTMLBodyElement: W.HtmlElement, HTMLButtonElement: W.HtmlElement, HTMLCanvasElement: W.HtmlElement, HTMLContentElement: W.HtmlElement, HTMLDListElement: W.HtmlElement, HTMLDataElement: W.HtmlElement, HTMLDataListElement: W.HtmlElement, HTMLDetailsElement: W.HtmlElement, HTMLDialogElement: W.HtmlElement, HTMLDivElement: W.HtmlElement, HTMLEmbedElement: W.HtmlElement, HTMLFieldSetElement: W.HtmlElement, HTMLHRElement: W.HtmlElement, HTMLHeadElement: W.HtmlElement, HTMLHeadingElement: W.HtmlElement, HTMLHtmlElement: W.HtmlElement, HTMLIFrameElement: W.HtmlElement, HTMLImageElement: W.HtmlElement, HTMLInputElement: W.HtmlElement, HTMLLIElement: W.HtmlElement, HTMLLabelElement: W.HtmlElement, HTMLLegendElement: W.HtmlElement, HTMLLinkElement: W.HtmlElement, HTMLMapElement: W.HtmlElement, HTMLMediaElement: W.HtmlElement, HTMLMenuElement: W.HtmlElement, HTMLMetaElement: W.HtmlElement, HTMLMeterElement: W.HtmlElement, HTMLModElement: W.HtmlElement, HTMLOListElement: W.HtmlElement, HTMLObjectElement: W.HtmlElement, HTMLOptGroupElement: W.HtmlElement, HTMLOptionElement: W.HtmlElement, HTMLOutputElement: W.HtmlElement, HTMLParagraphElement: W.HtmlElement, HTMLParamElement: W.HtmlElement, HTMLPictureElement: W.HtmlElement, HTMLPreElement: W.HtmlElement, HTMLProgressElement: W.HtmlElement, HTMLQuoteElement: W.HtmlElement, HTMLScriptElement: W.HtmlElement, HTMLShadowElement: W.HtmlElement, HTMLSlotElement: W.HtmlElement, HTMLSourceElement: W.HtmlElement, HTMLSpanElement: W.HtmlElement, HTMLStyleElement: W.HtmlElement, HTMLTableCaptionElement: W.HtmlElement, HTMLTableCellElement: W.HtmlElement, HTMLTableDataCellElement: W.HtmlElement, HTMLTableHeaderCellElement: W.HtmlElement, HTMLTableColElement: W.HtmlElement, HTMLTableElement: W.HtmlElement, HTMLTableRowElement: W.HtmlElement, HTMLTableSectionElement: W.HtmlElement, HTMLTemplateElement: W.HtmlElement, HTMLTextAreaElement: W.HtmlElement, HTMLTimeElement: W.HtmlElement, HTMLTitleElement: W.HtmlElement, HTMLTrackElement: W.HtmlElement, HTMLUListElement: W.HtmlElement, HTMLUnknownElement: W.HtmlElement, HTMLVideoElement: W.HtmlElement, HTMLDirectoryElement: W.HtmlElement, HTMLFontElement: W.HtmlElement, HTMLFrameElement: W.HtmlElement, HTMLFrameSetElement: W.HtmlElement, HTMLMarqueeElement: W.HtmlElement, HTMLElement: W.HtmlElement, HTMLAnchorElement: W.AnchorElement, HTMLAreaElement: W.AreaElement, DOMException: W.DomException, Element: W.Element, AbortPaymentEvent: W.Event, AnimationEvent: W.Event, AnimationPlaybackEvent: W.Event, ApplicationCacheErrorEvent: W.Event, BackgroundFetchClickEvent: W.Event, BackgroundFetchEvent: W.Event, BackgroundFetchFailEvent: W.Event, BackgroundFetchedEvent: W.Event, BeforeInstallPromptEvent: W.Event, BeforeUnloadEvent: W.Event, BlobEvent: W.Event, CanMakePaymentEvent: W.Event, ClipboardEvent: W.Event, CloseEvent: W.Event, CustomEvent: W.Event, DeviceMotionEvent: W.Event, DeviceOrientationEvent: W.Event, ErrorEvent: W.Event, ExtendableEvent: W.Event, ExtendableMessageEvent: W.Event, FetchEvent: W.Event, FontFaceSetLoadEvent: W.Event, ForeignFetchEvent: W.Event, GamepadEvent: W.Event, HashChangeEvent: W.Event, InstallEvent: W.Event, MediaEncryptedEvent: W.Event, MediaKeyMessageEvent: W.Event, MediaQueryListEvent: W.Event, MediaStreamEvent: W.Event, MediaStreamTrackEvent: W.Event, MIDIConnectionEvent: W.Event, MIDIMessageEvent: W.Event, MutationEvent: W.Event, NotificationEvent: W.Event, PageTransitionEvent: W.Event, PaymentRequestEvent: W.Event, PaymentRequestUpdateEvent: W.Event, PopStateEvent: W.Event, PresentationConnectionAvailableEvent: W.Event, PresentationConnectionCloseEvent: W.Event, PromiseRejectionEvent: W.Event, PushEvent: W.Event, RTCDataChannelEvent: W.Event, RTCDTMFToneChangeEvent: W.Event, RTCPeerConnectionIceEvent: W.Event, RTCTrackEvent: W.Event, SecurityPolicyViolationEvent: W.Event, SensorErrorEvent: W.Event, SpeechRecognitionError: W.Event, SpeechRecognitionEvent: W.Event, SpeechSynthesisEvent: W.Event, StorageEvent: W.Event, SyncEvent: W.Event, TrackEvent: W.Event, TransitionEvent: W.Event, WebKitTransitionEvent: W.Event, VRDeviceEvent: W.Event, VRDisplayEvent: W.Event, VRSessionEvent: W.Event, MojoInterfaceRequestEvent: W.Event, USBConnectionEvent: W.Event, IDBVersionChangeEvent: W.Event, AudioProcessingEvent: W.Event, OfflineAudioCompletionEvent: W.Event, WebGLContextEvent: W.Event, Event: W.Event, InputEvent: W.Event, SubmitEvent: W.Event, EventSource: W.EventSource, MessagePort: W.EventTarget, EventTarget: W.EventTarget, HTMLFormElement: W.FormElement, XMLHttpRequest: W.HttpRequest, XMLHttpRequestEventTarget: W.HttpRequestEventTarget, MessageEvent: W.MessageEvent, MouseEvent: W.MouseEvent, DragEvent: W.MouseEvent, PointerEvent: W.MouseEvent, WheelEvent: W.MouseEvent, Document: W.Node, HTMLDocument: W.Node, Node: W.Node, ProgressEvent: W.ProgressEvent, ResourceProgressEvent: W.ProgressEvent, HTMLSelectElement: W.SelectElement, CompositionEvent: W.UIEvent, FocusEvent: W.UIEvent, KeyboardEvent: W.UIEvent, TextEvent: W.UIEvent, TouchEvent: W.UIEvent, UIEvent: W.UIEvent, SVGAElement: P.SvgElement, SVGAnimateElement: P.SvgElement, SVGAnimateMotionElement: P.SvgElement, SVGAnimateTransformElement: P.SvgElement, SVGAnimationElement: P.SvgElement, SVGCircleElement: P.SvgElement, SVGClipPathElement: P.SvgElement, SVGDefsElement: P.SvgElement, SVGDescElement: P.SvgElement, SVGDiscardElement: P.SvgElement, SVGEllipseElement: P.SvgElement, SVGFEBlendElement: P.SvgElement, SVGFEColorMatrixElement: P.SvgElement, SVGFEComponentTransferElement: P.SvgElement, SVGFECompositeElement: P.SvgElement, SVGFEConvolveMatrixElement: P.SvgElement, SVGFEDiffuseLightingElement: P.SvgElement, SVGFEDisplacementMapElement: P.SvgElement, SVGFEDistantLightElement: P.SvgElement, SVGFEFloodElement: P.SvgElement, SVGFEFuncAElement: P.SvgElement, SVGFEFuncBElement: P.SvgElement, SVGFEFuncGElement: P.SvgElement, SVGFEFuncRElement: P.SvgElement, SVGFEGaussianBlurElement: P.SvgElement, SVGFEImageElement: P.SvgElement, SVGFEMergeElement: P.SvgElement, SVGFEMergeNodeElement: P.SvgElement, SVGFEMorphologyElement: P.SvgElement, SVGFEOffsetElement: P.SvgElement, SVGFEPointLightElement: P.SvgElement, SVGFESpecularLightingElement: P.SvgElement, SVGFESpotLightElement: P.SvgElement, SVGFETileElement: P.SvgElement, SVGFETurbulenceElement: P.SvgElement, SVGFilterElement: P.SvgElement, SVGForeignObjectElement: P.SvgElement, SVGGElement: P.SvgElement, SVGGeometryElement: P.SvgElement, SVGGraphicsElement: P.SvgElement, SVGImageElement: P.SvgElement, SVGLineElement: P.SvgElement, SVGLinearGradientElement: P.SvgElement, SVGMarkerElement: P.SvgElement, SVGMaskElement: P.SvgElement, SVGMetadataElement: P.SvgElement, SVGPathElement: P.SvgElement, SVGPatternElement: P.SvgElement, SVGPolygonElement: P.SvgElement, SVGPolylineElement: P.SvgElement, SVGRadialGradientElement: P.SvgElement, SVGRectElement: P.SvgElement, SVGScriptElement: P.SvgElement, SVGSetElement: P.SvgElement, SVGStopElement: P.SvgElement, SVGStyleElement: P.SvgElement, SVGElement: P.SvgElement, SVGSVGElement: P.SvgElement, SVGSwitchElement: P.SvgElement, SVGSymbolElement: P.SvgElement, SVGTSpanElement: P.SvgElement, SVGTextContentElement: P.SvgElement, SVGTextElement: P.SvgElement, SVGTextPathElement: P.SvgElement, SVGTextPositioningElement: P.SvgElement, SVGTitleElement: P.SvgElement, SVGUseElement: P.SvgElement, SVGViewElement: P.SvgElement, SVGGradientElement: P.SvgElement, SVGComponentTransferFunctionElement: P.SvgElement, SVGFEDropShadowElement: P.SvgElement, SVGMPathElement: P.SvgElement}); - hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, SQLError: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLIFrameElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, DOMException: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, SubmitEvent: false, EventSource: true, MessagePort: true, EventTarget: false, HTMLFormElement: true, XMLHttpRequest: true, XMLHttpRequestEventTarget: false, MessageEvent: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, HTMLDocument: true, Node: false, ProgressEvent: true, ResourceProgressEvent: true, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true}); - H.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; - H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; - H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; - H.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; - H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; - H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; - H.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; + hunkHelpers.setOrUpdateInterceptorsByTag({Blob: J.JavaScriptObject, DOMError: J.JavaScriptObject, File: J.JavaScriptObject, MediaError: J.JavaScriptObject, NavigatorUserMediaError: J.JavaScriptObject, OverconstrainedError: J.JavaScriptObject, PositionError: J.JavaScriptObject, GeolocationPositionError: J.JavaScriptObject, ArrayBuffer: A.NativeByteBuffer, ArrayBufferView: A.NativeTypedData, DataView: A.NativeByteData, Float32Array: A.NativeFloat32List, Float64Array: A.NativeFloat64List, Int16Array: A.NativeInt16List, Int32Array: A.NativeInt32List, Int8Array: A.NativeInt8List, Uint16Array: A.NativeUint16List, Uint32Array: A.NativeUint32List, Uint8ClampedArray: A.NativeUint8ClampedList, CanvasPixelArray: A.NativeUint8ClampedList, Uint8Array: A.NativeUint8List, HTMLAudioElement: A.HtmlElement, HTMLBRElement: A.HtmlElement, HTMLBaseElement: A.HtmlElement, HTMLBodyElement: A.HtmlElement, HTMLButtonElement: A.HtmlElement, HTMLCanvasElement: A.HtmlElement, HTMLContentElement: A.HtmlElement, HTMLDListElement: A.HtmlElement, HTMLDataElement: A.HtmlElement, HTMLDataListElement: A.HtmlElement, HTMLDetailsElement: A.HtmlElement, HTMLDialogElement: A.HtmlElement, HTMLDivElement: A.HtmlElement, HTMLEmbedElement: A.HtmlElement, HTMLFieldSetElement: A.HtmlElement, HTMLHRElement: A.HtmlElement, HTMLHeadElement: A.HtmlElement, HTMLHeadingElement: A.HtmlElement, HTMLHtmlElement: A.HtmlElement, HTMLIFrameElement: A.HtmlElement, HTMLImageElement: A.HtmlElement, HTMLInputElement: A.HtmlElement, HTMLLIElement: A.HtmlElement, HTMLLabelElement: A.HtmlElement, HTMLLegendElement: A.HtmlElement, HTMLLinkElement: A.HtmlElement, HTMLMapElement: A.HtmlElement, HTMLMediaElement: A.HtmlElement, HTMLMenuElement: A.HtmlElement, HTMLMetaElement: A.HtmlElement, HTMLMeterElement: A.HtmlElement, HTMLModElement: A.HtmlElement, HTMLOListElement: A.HtmlElement, HTMLObjectElement: A.HtmlElement, HTMLOptGroupElement: A.HtmlElement, HTMLOptionElement: A.HtmlElement, HTMLOutputElement: A.HtmlElement, HTMLParagraphElement: A.HtmlElement, HTMLParamElement: A.HtmlElement, HTMLPictureElement: A.HtmlElement, HTMLPreElement: A.HtmlElement, HTMLProgressElement: A.HtmlElement, HTMLQuoteElement: A.HtmlElement, HTMLScriptElement: A.HtmlElement, HTMLShadowElement: A.HtmlElement, HTMLSlotElement: A.HtmlElement, HTMLSourceElement: A.HtmlElement, HTMLSpanElement: A.HtmlElement, HTMLStyleElement: A.HtmlElement, HTMLTableCaptionElement: A.HtmlElement, HTMLTableCellElement: A.HtmlElement, HTMLTableDataCellElement: A.HtmlElement, HTMLTableHeaderCellElement: A.HtmlElement, HTMLTableColElement: A.HtmlElement, HTMLTableElement: A.HtmlElement, HTMLTableRowElement: A.HtmlElement, HTMLTableSectionElement: A.HtmlElement, HTMLTemplateElement: A.HtmlElement, HTMLTextAreaElement: A.HtmlElement, HTMLTimeElement: A.HtmlElement, HTMLTitleElement: A.HtmlElement, HTMLTrackElement: A.HtmlElement, HTMLUListElement: A.HtmlElement, HTMLUnknownElement: A.HtmlElement, HTMLVideoElement: A.HtmlElement, HTMLDirectoryElement: A.HtmlElement, HTMLFontElement: A.HtmlElement, HTMLFrameElement: A.HtmlElement, HTMLFrameSetElement: A.HtmlElement, HTMLMarqueeElement: A.HtmlElement, HTMLElement: A.HtmlElement, HTMLAnchorElement: A.AnchorElement, HTMLAreaElement: A.AreaElement, DOMException: A.DomException, MathMLElement: A.Element, Element: A.Element, AbortPaymentEvent: A.Event, AnimationEvent: A.Event, AnimationPlaybackEvent: A.Event, ApplicationCacheErrorEvent: A.Event, BackgroundFetchClickEvent: A.Event, BackgroundFetchEvent: A.Event, BackgroundFetchFailEvent: A.Event, BackgroundFetchedEvent: A.Event, BeforeInstallPromptEvent: A.Event, BeforeUnloadEvent: A.Event, BlobEvent: A.Event, CanMakePaymentEvent: A.Event, ClipboardEvent: A.Event, CloseEvent: A.Event, CustomEvent: A.Event, DeviceMotionEvent: A.Event, DeviceOrientationEvent: A.Event, ErrorEvent: A.Event, ExtendableEvent: A.Event, ExtendableMessageEvent: A.Event, FetchEvent: A.Event, FontFaceSetLoadEvent: A.Event, ForeignFetchEvent: A.Event, GamepadEvent: A.Event, HashChangeEvent: A.Event, InstallEvent: A.Event, MediaEncryptedEvent: A.Event, MediaKeyMessageEvent: A.Event, MediaQueryListEvent: A.Event, MediaStreamEvent: A.Event, MediaStreamTrackEvent: A.Event, MIDIConnectionEvent: A.Event, MIDIMessageEvent: A.Event, MutationEvent: A.Event, NotificationEvent: A.Event, PageTransitionEvent: A.Event, PaymentRequestEvent: A.Event, PaymentRequestUpdateEvent: A.Event, PopStateEvent: A.Event, PresentationConnectionAvailableEvent: A.Event, PresentationConnectionCloseEvent: A.Event, ProgressEvent: A.Event, PromiseRejectionEvent: A.Event, PushEvent: A.Event, RTCDataChannelEvent: A.Event, RTCDTMFToneChangeEvent: A.Event, RTCPeerConnectionIceEvent: A.Event, RTCTrackEvent: A.Event, SecurityPolicyViolationEvent: A.Event, SensorErrorEvent: A.Event, SpeechRecognitionError: A.Event, SpeechRecognitionEvent: A.Event, SpeechSynthesisEvent: A.Event, StorageEvent: A.Event, SyncEvent: A.Event, TrackEvent: A.Event, TransitionEvent: A.Event, WebKitTransitionEvent: A.Event, VRDeviceEvent: A.Event, VRDisplayEvent: A.Event, VRSessionEvent: A.Event, MojoInterfaceRequestEvent: A.Event, ResourceProgressEvent: A.Event, USBConnectionEvent: A.Event, IDBVersionChangeEvent: A.Event, AudioProcessingEvent: A.Event, OfflineAudioCompletionEvent: A.Event, WebGLContextEvent: A.Event, Event: A.Event, InputEvent: A.Event, SubmitEvent: A.Event, EventSource: A.EventSource, MessagePort: A.EventTarget, EventTarget: A.EventTarget, HTMLFormElement: A.FormElement, MessageEvent: A.MessageEvent, MouseEvent: A.MouseEvent, DragEvent: A.MouseEvent, PointerEvent: A.MouseEvent, WheelEvent: A.MouseEvent, Document: A.Node, HTMLDocument: A.Node, Node: A.Node, HTMLSelectElement: A.SelectElement, CompositionEvent: A.UIEvent, FocusEvent: A.UIEvent, KeyboardEvent: A.UIEvent, TextEvent: A.UIEvent, TouchEvent: A.UIEvent, UIEvent: A.UIEvent, SVGAElement: A.SvgElement, SVGAnimateElement: A.SvgElement, SVGAnimateMotionElement: A.SvgElement, SVGAnimateTransformElement: A.SvgElement, SVGAnimationElement: A.SvgElement, SVGCircleElement: A.SvgElement, SVGClipPathElement: A.SvgElement, SVGDefsElement: A.SvgElement, SVGDescElement: A.SvgElement, SVGDiscardElement: A.SvgElement, SVGEllipseElement: A.SvgElement, SVGFEBlendElement: A.SvgElement, SVGFEColorMatrixElement: A.SvgElement, SVGFEComponentTransferElement: A.SvgElement, SVGFECompositeElement: A.SvgElement, SVGFEConvolveMatrixElement: A.SvgElement, SVGFEDiffuseLightingElement: A.SvgElement, SVGFEDisplacementMapElement: A.SvgElement, SVGFEDistantLightElement: A.SvgElement, SVGFEFloodElement: A.SvgElement, SVGFEFuncAElement: A.SvgElement, SVGFEFuncBElement: A.SvgElement, SVGFEFuncGElement: A.SvgElement, SVGFEFuncRElement: A.SvgElement, SVGFEGaussianBlurElement: A.SvgElement, SVGFEImageElement: A.SvgElement, SVGFEMergeElement: A.SvgElement, SVGFEMergeNodeElement: A.SvgElement, SVGFEMorphologyElement: A.SvgElement, SVGFEOffsetElement: A.SvgElement, SVGFEPointLightElement: A.SvgElement, SVGFESpecularLightingElement: A.SvgElement, SVGFESpotLightElement: A.SvgElement, SVGFETileElement: A.SvgElement, SVGFETurbulenceElement: A.SvgElement, SVGFilterElement: A.SvgElement, SVGForeignObjectElement: A.SvgElement, SVGGElement: A.SvgElement, SVGGeometryElement: A.SvgElement, SVGGraphicsElement: A.SvgElement, SVGImageElement: A.SvgElement, SVGLineElement: A.SvgElement, SVGLinearGradientElement: A.SvgElement, SVGMarkerElement: A.SvgElement, SVGMaskElement: A.SvgElement, SVGMetadataElement: A.SvgElement, SVGPathElement: A.SvgElement, SVGPatternElement: A.SvgElement, SVGPolygonElement: A.SvgElement, SVGPolylineElement: A.SvgElement, SVGRadialGradientElement: A.SvgElement, SVGRectElement: A.SvgElement, SVGScriptElement: A.SvgElement, SVGSetElement: A.SvgElement, SVGStopElement: A.SvgElement, SVGStyleElement: A.SvgElement, SVGElement: A.SvgElement, SVGSVGElement: A.SvgElement, SVGSwitchElement: A.SvgElement, SVGSymbolElement: A.SvgElement, SVGTSpanElement: A.SvgElement, SVGTextContentElement: A.SvgElement, SVGTextElement: A.SvgElement, SVGTextPathElement: A.SvgElement, SVGTextPositioningElement: A.SvgElement, SVGTitleElement: A.SvgElement, SVGUseElement: A.SvgElement, SVGViewElement: A.SvgElement, SVGGradientElement: A.SvgElement, SVGComponentTransferFunctionElement: A.SvgElement, SVGFEDropShadowElement: A.SvgElement, SVGMPathElement: A.SvgElement}); + hunkHelpers.setOrUpdateLeafTags({Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, GeolocationPositionError: true, ArrayBuffer: true, ArrayBufferView: false, DataView: true, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLIFrameElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, DOMException: true, MathMLElement: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, ProgressEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, ResourceProgressEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, SubmitEvent: false, EventSource: true, MessagePort: true, EventTarget: false, HTMLFormElement: true, MessageEvent: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, HTMLDocument: true, Node: false, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true}); + A.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; })(); + Function.prototype.call$1 = function(a) { + return this(a); + }; + Function.prototype.call$0 = function() { + return this(); + }; + Function.prototype.call$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$3 = function(a, b, c) { + return this(a, b, c); + }; + Function.prototype.call$4 = function(a, b, c, d) { + return this(a, b, c, d); + }; + Function.prototype.call$1$1 = function(a) { + return this(a); + }; convertAllToFastObject(holders); convertToFastObject($); (function(callback) { @@ -8364,7 +8554,7 @@ scripts[i].addEventListener("load", onLoad, false); })(function(currentScript) { init.currentScript = currentScript; - var callMain = E.main; + var callMain = A.main; if (typeof dartMainRunner === "function") dartMainRunner(callMain, []); else From 340710f38fd84bc84113d0298f8ca38473f4cf4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 02:01:56 +0000 Subject: [PATCH 089/115] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (dart-lang/sse#93) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.1 to 1.6.0.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available in an environment variable, DART_HOME (dart-lang/sse#43).
  • Fixed an issue where cached downloads could lead to unzip issues on self-hosted runners (dart-lang/sse#35).

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

  • Added a flavor option setup.sh to allow downloading unpublished builds.

v1.0.0

  • Promoted to 1.0 stable.

v0.5

  • Fixed a Windows pub global activate path issue.

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.1&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 0b1fbec10..e8948a280 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.1.0, dev] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@2c49495f83dd47aa7cee6b3d20cd5a5a3e1e016d From f84f02a2214937cb13feedee8aee3a033c8d18f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 02:01:57 +0000 Subject: [PATCH 090/115] Bump nanasess/setup-chromedriver from 2.2.0 to 2.2.1 (dart-lang/sse#94) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [nanasess/setup-chromedriver](https://github.com/nanasess/setup-chromedriver) from 2.2.0 to 2.2.1.
Release notes

Sourced from nanasess/setup-chromedriver's releases.

v2.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/nanasess/setup-chromedriver/compare/v2.2.0...v2.2.1

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nanasess/setup-chromedriver&package-manager=github_actions&previous-version=2.2.0&new-version=2.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index e8948a280..19fbfba1d 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -53,7 +53,7 @@ jobs: - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} - - uses: nanasess/setup-chromedriver@2c49495f83dd47aa7cee6b3d20cd5a5a3e1e016d + - uses: nanasess/setup-chromedriver@e66222fd7ec9c46b83cc837781ce6930b5d95f90 - id: install name: Install dependencies run: dart pub get From 77707092d552076dffcc2daf9191d9f0f1b33d52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 04:02:42 +0000 Subject: [PATCH 091/115] Bump actions/checkout from 4.1.0 to 4.1.1 (dart-lang/sse#95) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
Release notes

Sourced from actions/checkout's releases.

v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.0...v4.1.1

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.0&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 19fbfba1d..e6e490931 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1.0, dev] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} From 10d062afc526df30d420936d27c66ea970aa098e Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 15 Nov 2023 10:34:04 -0800 Subject: [PATCH 092/115] Require Dart 3.2, use pkg:web (dart-lang/sse#92) --- pkgs/sse/.github/workflows/test-package.yml | 2 +- pkgs/sse/CHANGELOG.md | 4 +-- pkgs/sse/lib/client/sse_client.dart | 38 +++++++-------------- pkgs/sse/lib/src/server/sse_handler.dart | 2 +- pkgs/sse/pubspec.yaml | 5 +-- pkgs/sse/test/web/index.dart | 3 +- 6 files changed, 21 insertions(+), 33 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index e6e490931..73bf50262 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [3.1.0, dev] + sdk: [3.2.0, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 36822cfc8..fef1e3148 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,6 +1,6 @@ -## 4.1.3-dev +## 4.1.3 -- Update the minimum Dart SDK version to `3.1.0`. +- Update the minimum Dart SDK version to `3.2.0`. ## 4.1.2 diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 86dac1037..96cd1f36f 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -4,12 +4,12 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:html'; +import 'dart:js_interop'; -import 'package:js/js.dart'; import 'package:logging/logging.dart'; import 'package:pool/pool.dart'; import 'package:stream_channel/stream_channel.dart'; +import 'package:web/helpers.dart'; import '../src/util/uuid.dart'; @@ -52,14 +52,15 @@ class SseClient extends StreamChannelMixin { ? generateUuidV4() : '$debugKey-${generateUuidV4()}' { _serverUrl = '$serverUrl?sseClientId=$_clientId'; - _eventSource = EventSource(_serverUrl, withCredentials: true); + _eventSource = + EventSource(_serverUrl, EventSourceInit(withCredentials: true)); _eventSource.onOpen.first.whenComplete(() { _onConnected.complete(); _outgoingController.stream .listen(_onOutgoingMessage, onDone: _onOutgoingDone); }); - _eventSource.addEventListener('message', _onIncomingMessage); - _eventSource.addEventListener('control', _onIncomingControlMessage); + _eventSource.addEventListener('message', _onIncomingMessage.toJS); + _eventSource.addEventListener('control', _onIncomingControlMessage.toJS); _eventSource.onOpen.listen((_) { _errorTimer?.cancel(); @@ -114,7 +115,7 @@ class SseClient extends StreamChannelMixin { void _onIncomingControlMessage(Event message) { var data = (message as MessageEvent).data; - if (data == 'close') { + if (data.dartify() == 'close') { close(); } else { throw UnsupportedError('[$_clientId] Illegal Control Message "$data"'); @@ -147,8 +148,10 @@ class SseClient extends StreamChannelMixin { final url = '$_serverUrl&messageId=${++_lastMessageId}'; await _fetch( url, - _FetchOptions( - method: 'POST', body: encodedMessage, credentials: 'include')); + RequestInit( + method: 'POST', + body: encodedMessage?.toJS, + credentials: 'include')); } catch (error) { final augmentedError = '[$_clientId] SSE client failed to send $message:\n $error'; @@ -159,20 +162,5 @@ class SseClient extends StreamChannelMixin { } } -// Custom implementation of Fetch API until Dart supports GET vs. POST, -// credentials, etc. See https://github.com/dart-lang/http/issues/595. -@JS('fetch') -external Object _nativeJsFetch(String resourceUrl, _FetchOptions options); - -Future _fetch(String resourceUrl, _FetchOptions options) => - promiseToFuture(_nativeJsFetch(resourceUrl, options)); - -@JS() -@anonymous -class _FetchOptions { - external factory _FetchOptions({ - required String method, // e.g., 'GET', 'POST' - required String credentials, // e.g., 'omit', 'same-origin', 'include' - required String? body, - }); -} +Future _fetch(String resourceUrl, RequestInit options) => + window.fetch(resourceUrl.toJS, options).toDart; diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index d4b7e0636..c235c2029 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -158,7 +158,7 @@ class SseConnection extends StreamChannelMixin { // period. // If the connection comes back, this will be cancelled and all messages // left in the queue tried again. - _keepAliveTimer = Timer(_keepAlive!, _close); + _keepAliveTimer = Timer(_keepAlive, _close); } } diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 12582660c..8581f8ed2 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.3-dev +version: 4.1.3 description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST @@ -7,7 +7,7 @@ description: >- repository: https://github.com/dart-lang/sse environment: - sdk: ^3.1.0 + sdk: ^3.2.0 dependencies: async: ^2.0.8 @@ -17,6 +17,7 @@ dependencies: pool: ^1.5.0 shelf: ^1.1.0 stream_channel: ^2.0.0 + web: '>=0.3.0 <0.5.0' dev_dependencies: dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/sse/test/web/index.dart b/pkgs/sse/test/web/index.dart index e149372aa..fadb14707 100644 --- a/pkgs/sse/test/web/index.dart +++ b/pkgs/sse/test/web/index.dart @@ -2,9 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:html'; - import 'package:sse/client/sse_client.dart'; +import 'package:web/helpers.dart'; void main() { var channel = SseClient('/test'); From fa2c621a10b4c5d5ea0c76714f4810970d16ea62 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 21 Nov 2023 16:34:50 -0800 Subject: [PATCH 093/115] Fix incorrect cast causing wasm failure, prepare v4.1.4 (dart-lang/sse#96) --- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/lib/client/sse_client.dart | 4 ++-- pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index fef1e3148..94b984874 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.1.4 + +- Fix incorrect cast causing failure with `dart2wasm`. + ## 4.1.3 - Update the minimum Dart SDK version to `3.2.0`. diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index 96cd1f36f..f5be1e512 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -124,8 +124,8 @@ class SseClient extends StreamChannelMixin { void _onIncomingMessage(Event message) { var decoded = - jsonDecode((message as MessageEvent).data as String) as String; - _incomingController.add(decoded); + jsonDecode(((message as MessageEvent).data as JSString).toDart); + _incomingController.add(decoded as String); } void _onOutgoingDone() { diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 8581f8ed2..f45fe3c30 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.3 +version: 4.1.4 description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST From 9237f53a2987e78a2884be533af0be3e2256a129 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 1 Dec 2023 08:39:57 -0800 Subject: [PATCH 094/115] Drop unneeded dep on pkg:test (dart-lang/sse#98) And added a script to rebuild the test file And rebuilt the script file and tiny cleanup to .gitignore --- pkgs/sse/.gitignore | 2 +- pkgs/sse/CHANGELOG.md | 4 + pkgs/sse/analysis_options.yaml | 1 - pkgs/sse/pubspec.yaml | 3 +- pkgs/sse/test/web/index.dart.js | 1778 ++++++++++++++++++------------- pkgs/sse/tool/build_js.sh | 2 + 6 files changed, 1063 insertions(+), 727 deletions(-) create mode 100755 pkgs/sse/tool/build_js.sh diff --git a/pkgs/sse/.gitignore b/pkgs/sse/.gitignore index 79f51c3d5..146778230 100644 --- a/pkgs/sse/.gitignore +++ b/pkgs/sse/.gitignore @@ -1,3 +1,3 @@ .dart_tool -.packages pubspec.lock +test/web/index.dart.js.deps diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 94b984874..f1deed7d7 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.1.5-wip + +- Drop unneeded dependency on `package:js`. + ## 4.1.4 - Fix incorrect cast causing failure with `dart2wasm`. diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index e04ca5566..6bc938d6c 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -7,7 +7,6 @@ analyzer: linter: rules: - - avoid_returning_null - avoid_unused_constructor_parameters - cancel_subscriptions - literal_only_boolean_expressions diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index f45fe3c30..6d150adab 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.4 +version: 4.1.5-wip description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST @@ -12,7 +12,6 @@ environment: dependencies: async: ^2.0.8 collection: ^1.0.0 - js: ^0.6.4 logging: ^1.0.0 pool: ^1.5.0 shelf: ^1.1.0 diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index 7a680ba09..d0f3d2b1b 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (NullSafetyMode.sound, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.3.0-16.0.dev. +// Generated by dart2js (NullSafetyMode.sound, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.3.0-170.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -34,8 +34,9 @@ var keys = Object.keys(from); for (var i = 0; i < keys.length; i++) { var key = keys[i]; - if (!to.hasOwnProperty(key)) + if (!to.hasOwnProperty(key)) { to[key] = from[key]; + } } } function mixinPropertiesEasy(from, to) { @@ -74,8 +75,9 @@ } } function inheritMany(sup, classes) { - for (var i = 0; i < classes.length; i++) + for (var i = 0; i < classes.length; i++) { inherit(classes[i], sup); + } } function mixinEasy(cls, mixin) { mixinPropertiesEasy(mixin.prototype, cls.prototype); @@ -98,11 +100,13 @@ if (holder[name] === uninitializedSentinel) { result = holder[name] = sentinelInProgress; result = holder[name] = initializer(); - } else + } else { result = holder[name]; + } } finally { - if (result === sentinelInProgress) + if (result === sentinelInProgress) { holder[name] = null; + } holder[getterName] = function() { return this[name]; }; @@ -114,8 +118,9 @@ var uninitializedSentinel = holder; holder[name] = uninitializedSentinel; holder[getterName] = function() { - if (holder[name] === uninitializedSentinel) + if (holder[name] === uninitializedSentinel) { holder[name] = initializer(); + } holder[getterName] = function() { return this[name]; }; @@ -128,8 +133,9 @@ holder[getterName] = function() { if (holder[name] === uninitializedSentinel) { var value = initializer(); - if (holder[name] !== uninitializedSentinel) + if (holder[name] !== uninitializedSentinel) { A.throwLateFieldADI(name); + } holder[name] = value; } var finalValue = holder[name]; @@ -152,8 +158,9 @@ return properties; } function convertAllToFastObject(arrayOfObjects) { - for (var i = 0; i < arrayOfObjects.length; ++i) + for (var i = 0; i < arrayOfObjects.length; ++i) { convertToFastObject(arrayOfObjects[i]); + } } var functionCounter = 0; function instanceTearOffGetter(isIntercepted, parameters) { @@ -178,8 +185,9 @@ } var typesOffset = 0; function tearOffParameters(container, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { - if (typeof funType == "number") + if (typeof funType == "number") { funType += typesOffset; + } return {co: container, iS: isStatic, iI: isIntercepted, rC: requiredParameterCount, dV: optionalParameterDefaultValues, cs: callNames, fs: funsOrNames, fT: funType, aI: applyIndex || 0, nDA: needsDirectAccess}; } function installStaticTearOff(holder, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { @@ -307,6 +315,11 @@ list.fixed$length = Array; return list; }, + JSArray_markUnmodifiableList(list) { + list.fixed$length = Array; + list.immutable$list = Array; + return list; + }, getInterceptor$(receiver) { if (typeof receiver == "number") { if (Math.floor(receiver) == receiver) @@ -381,22 +394,6 @@ return J.UnknownJavaScriptObject.prototype; return receiver; }, - getInterceptor$x(receiver) { - if (receiver == null) - return receiver; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - if (typeof receiver == "symbol") - return J.JavaScriptSymbol.prototype; - if (typeof receiver == "bigint") - return J.JavaScriptBigInt.prototype; - return receiver; - } - if (receiver instanceof A.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, getInterceptor$z(receiver) { if (receiver == null) return receiver; @@ -416,9 +413,6 @@ get$length$asx(receiver) { return J.getInterceptor$asx(receiver).get$length(receiver); }, - get$onClick$x(receiver) { - return J.getInterceptor$x(receiver).get$onClick(receiver); - }, get$runtimeType$(receiver) { return J.getInterceptor$(receiver).get$runtimeType(receiver); }, @@ -429,21 +423,12 @@ return a0 != null && receiver === a0; return J.getInterceptor$(receiver).$eq(receiver, a0); }, - _removeEventListener$3$x(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2); - }, - addEventListener$3$x(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); - }, - complete$1$z(receiver, a0) { - return J.getInterceptor$z(receiver).complete$1(receiver, a0); - }, - forEach$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); - }, matchAsPrefix$2$s(receiver, a0, a1) { return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); }, + noSuchMethod$1$(receiver, a0) { + return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); + }, toString$0$(receiver) { return J.getInterceptor$(receiver).toString$0(receiver); }, @@ -527,6 +512,9 @@ }, FixedLengthListMixin: function FixedLengthListMixin() { }, + Symbol: function Symbol(t0) { + this._name = t0; + }, unminifyOrTag(rawClassName) { var preserved = init.mangledGlobalNames[rawClassName]; if (preserved != null) @@ -666,6 +654,116 @@ Primitives_getMilliseconds(receiver) { return receiver.isUtc ? A.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0 : A.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; }, + Primitives_functionNoSuchMethod($function, positionalArguments, namedArguments) { + var $arguments, namedArgumentList, t1 = {}; + t1.argumentCount = 0; + $arguments = []; + namedArgumentList = []; + t1.argumentCount = positionalArguments.length; + B.JSArray_methods.addAll$1($arguments, positionalArguments); + t1.names = ""; + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + namedArguments.forEach$1(0, new A.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); + return J.noSuchMethod$1$($function, new A.JSInvocationMirror(B.Symbol_call, 0, $arguments, namedArgumentList, 0)); + }, + Primitives_applyFunction($function, positionalArguments, namedArguments) { + var t1, argumentCount, jsStub; + if (Array.isArray(positionalArguments)) + t1 = namedArguments == null || namedArguments.__js_helper$_length === 0; + else + t1 = false; + if (t1) { + argumentCount = positionalArguments.length; + if (argumentCount === 0) { + if (!!$function.call$0) + return $function.call$0(); + } else if (argumentCount === 1) { + if (!!$function.call$1) + return $function.call$1(positionalArguments[0]); + } else if (argumentCount === 2) { + if (!!$function.call$2) + return $function.call$2(positionalArguments[0], positionalArguments[1]); + } else if (argumentCount === 3) { + if (!!$function.call$3) + return $function.call$3(positionalArguments[0], positionalArguments[1], positionalArguments[2]); + } else if (argumentCount === 4) { + if (!!$function.call$4) + return $function.call$4(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3]); + } else if (argumentCount === 5) + if (!!$function.call$5) + return $function.call$5(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3], positionalArguments[4]); + jsStub = $function["call" + "$" + argumentCount]; + if (jsStub != null) + return jsStub.apply($function, positionalArguments); + } + return A.Primitives__generalApplyFunction($function, positionalArguments, namedArguments); + }, + Primitives__generalApplyFunction($function, positionalArguments, namedArguments) { + var defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, maxArguments, missingDefaults, keys, _i, defaultValue, used, key, + $arguments = Array.isArray(positionalArguments) ? positionalArguments : A.List_List$of(positionalArguments, true, type$.dynamic), + argumentCount = $arguments.length, + requiredParameterCount = $function.$requiredArgCount; + if (argumentCount < requiredParameterCount) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + defaultValuesClosure = $function.$defaultValues; + t1 = defaultValuesClosure == null; + defaultValues = !t1 ? defaultValuesClosure() : null; + interceptor = J.getInterceptor$($function); + jsFunction = interceptor["call*"]; + if (typeof jsFunction == "string") + jsFunction = interceptor[jsFunction]; + if (t1) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if (argumentCount === requiredParameterCount) + return jsFunction.apply($function, $arguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + if (Array.isArray(defaultValues)) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + maxArguments = requiredParameterCount + defaultValues.length; + if (argumentCount > maxArguments) + return A.Primitives_functionNoSuchMethod($function, $arguments, null); + if (argumentCount < maxArguments) { + missingDefaults = defaultValues.slice(argumentCount - requiredParameterCount); + if ($arguments === positionalArguments) + $arguments = A.List_List$of($arguments, true, type$.dynamic); + B.JSArray_methods.addAll$1($arguments, missingDefaults); + } + return jsFunction.apply($function, $arguments); + } else { + if (argumentCount > requiredParameterCount) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if ($arguments === positionalArguments) + $arguments = A.List_List$of($arguments, true, type$.dynamic); + keys = Object.keys(defaultValues); + if (namedArguments == null) + for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + defaultValue = defaultValues[A._asString(keys[_i])]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } + else { + for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + key = A._asString(keys[_i]); + if (namedArguments.containsKey$1(key)) { + ++used; + B.JSArray_methods.add$1($arguments, namedArguments.$index(0, key)); + } else { + defaultValue = defaultValues[key]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } + } + if (used !== namedArguments.__js_helper$_length) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + return jsFunction.apply($function, $arguments); + } + }, ioore(receiver, index) { if (receiver == null) J.get$length$asx(receiver); @@ -847,16 +945,6 @@ return A.Primitives_objectHashCode(object); return J.get$hashCode$(object); }, - fillLiteralMap(keyValuePairs, result) { - var index, index0, index1, - $length = keyValuePairs.length; - for (index = 0; index < $length; index = index1) { - index0 = index + 1; - index1 = index0 + 1; - result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); - } - return result; - }, _invokeClosure(closure, numberOfArguments, arg1, arg2, arg3, arg4) { type$.Function._as(closure); switch (A._asInt(numberOfArguments)) { @@ -874,10 +962,7 @@ throw A.wrapException(new A._Exception("Unsupported number of arguments for wrapped closure")); }, convertDartClosureToJS(closure, arity) { - var $function; - if (closure == null) - return null; - $function = closure.$identity; + var $function = closure.$identity; if (!!$function) return $function; $function = A.convertDartClosureToJSUncached(closure, arity); @@ -929,14 +1014,11 @@ t1.toString; $prototype = isStatic ? Object.create(new A.StaticClosure().constructor.prototype) : Object.create(new A.BoundClosure(null, null).constructor.prototype); $prototype.$initialize = $prototype.constructor; - if (isStatic) - $constructor = function static_tear_off() { - this.$initialize(); - }; - else - $constructor = function tear_off(a, b) { - this.$initialize(a, b); - }; + $constructor = isStatic ? function static_tear_off() { + this.$initialize(); + } : function tear_off(a, b) { + this.$initialize(a, b); + }; $prototype.constructor = $constructor; $constructor.prototype = $prototype; $prototype.$_name = $name; @@ -1034,12 +1116,9 @@ } }, Closure_forwardCallTo(stubName, $function, isIntercepted, needsDirectAccess) { - var arity, t1; if (isIntercepted) return A.Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess); - arity = $function.length; - t1 = A.Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function); - return t1; + return A.Closure_cspForwardCall($function.length, needsDirectAccess, stubName, $function); }, Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function) { var getReceiver = A.BoundClosure_receiverOf, @@ -1132,9 +1211,6 @@ getIsolateAffinityTag($name) { return init.getIsolateTag($name); }, - defineProperty(obj, property, value) { - Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); - }, lookupAndCacheInterceptor(obj) { var interceptor, interceptorClass, altTag, mark, t1, tag = A._asString($.getTagFunction.call$1(obj)), @@ -1289,6 +1365,30 @@ return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); return string; }, + ConstantMapView: function ConstantMapView(t0, t1) { + this._collection$_map = t0; + this.$ti = t1; + }, + ConstantMap: function ConstantMap() { + }, + ConstantStringMap: function ConstantStringMap(t0, t1, t2) { + this._jsIndex = t0; + this._values = t1; + this.$ti = t2; + }, + JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { + var _ = this; + _._memberName = t0; + _.__js_helper$_kind = t1; + _._arguments = t2; + _._namedArgumentNames = t3; + _._typeArgumentCount = t4; + }, + Primitives_functionNoSuchMethod_closure: function Primitives_functionNoSuchMethod_closure(t0, t1, t2) { + this._box_0 = t0; + this.namedArgumentList = t1; + this.$arguments = t2; + }, TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) { var _ = this; _._pattern = t0; @@ -1339,6 +1439,8 @@ RuntimeError: function RuntimeError(t0) { this.message = t0; }, + _Required: function _Required() { + }, JsLinkedHashMap: function JsLinkedHashMap(t0) { var _ = this; _.__js_helper$_length = 0; @@ -1425,12 +1527,6 @@ var future = rti._precomputed1; return future == null ? rti._precomputed1 = A._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; }, - Rti__getIsSubtypeCache(rti) { - var probe = rti._isSubtypeCache; - if (probe != null) - return probe; - return rti._isSubtypeCache = new Map(); - }, Rti__isUnionOfFunctionType(rti) { var kind = rti._kind; if (kind === 6 || kind === 7 || kind === 8) @@ -1563,13 +1659,11 @@ return target; }, closureFunctionType(closure) { - var t1, - signature = closure.$signature; + var signature = closure.$signature; if (signature != null) { if (typeof signature == "number") return A.getTypeFromTypesTable(signature); - t1 = closure.$signature(); - return t1; + return closure.$signature(); } return null; }, @@ -1661,7 +1755,7 @@ var t1, unstarred, unstarredKind, isFn, $name, predicate, testRti = this; if (testRti === type$.Object) return A._finishIsFn(testRti, object, A._isObject); - if (!A.isStrongTopType(testRti)) + if (!A.isSoundTopType(testRti)) if (!(testRti === type$.legacy_Object)) t1 = false; else @@ -1691,7 +1785,7 @@ return A._finishIsFn(testRti, object, isFn); if (unstarredKind === 9) { $name = unstarred._primary; - if (unstarred._rest.every(A.isTopType)) { + if (unstarred._rest.every(A.isDefinitelyTopType)) { testRti._specializedTestResource = "$is" + $name; if ($name === "List") return A._finishIsFn(testRti, object, A._isListTestViaProperty); @@ -1710,7 +1804,7 @@ _installSpecializedAsCheck(object) { var t1, testRti = this, asFn = A._generalAsCheckImplementation; - if (!A.isStrongTopType(testRti)) + if (!A.isSoundTopType(testRti)) if (!(testRti === type$.legacy_Object)) t1 = false; else @@ -1732,7 +1826,7 @@ _nullIs(testRti) { var t1, kind = testRti._kind; - if (!A.isStrongTopType(testRti)) + if (!A.isSoundTopType(testRti)) if (!(testRti === type$.legacy_Object)) if (!(testRti === type$.legacy_Never)) if (kind !== 7) @@ -1784,10 +1878,9 @@ return !!J.getInterceptor$(object)[tag]; }, _generalAsCheckImplementation(object) { - var t1, testRti = this; + var testRti = this; if (object == null) { - t1 = A.isNullable(testRti); - if (t1) + if (A.isNullable(testRti)) return object; } else if (testRti._is(object)) return object; @@ -2043,7 +2136,7 @@ return typeParametersText + "(" + argumentsText + ") => " + returnTypeText; }, _rtiToString(rti, genericContext) { - var s, questionArgument, argumentKind, $name, $arguments, t1, t2, + var questionArgument, s, argumentKind, $name, $arguments, t1, t2, kind = rti._kind; if (kind === 5) return "erased"; @@ -2055,10 +2148,8 @@ return "Never"; if (kind === 4) return "any"; - if (kind === 6) { - s = A._rtiToString(rti._primary, genericContext); - return s; - } + if (kind === 6) + return A._rtiToString(rti._primary, genericContext); if (kind === 7) { questionArgument = rti._primary; s = A._rtiToString(questionArgument, genericContext); @@ -2190,7 +2281,7 @@ var baseKind, t1, rti; if (normalize) { baseKind = baseType._kind; - if (!A.isStrongTopType(baseType)) + if (!A.isSoundTopType(baseType)) t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6; else t1 = true; @@ -2217,7 +2308,7 @@ var baseKind, t1, starArgument, rti; if (normalize) { baseKind = baseType._kind; - if (!A.isStrongTopType(baseType)) + if (!A.isSoundTopType(baseType)) if (!(baseType === type$.Null || baseType === type$.JSNull)) if (baseKind !== 7) t1 = baseKind === 8 && A.isNullable(baseType._primary); @@ -2256,17 +2347,10 @@ return t1; }, _Universe__createFutureOrRti(universe, baseType, key, normalize) { - var t1, t2, rti; + var t1, rti; if (normalize) { t1 = baseType._kind; - if (!A.isStrongTopType(baseType)) - if (!(baseType === type$.legacy_Object)) - t2 = false; - else - t2 = true; - else - t2 = true; - if (t2 || baseType === type$.Object) + if (A.isSoundTopType(baseType) || baseType === type$.Object || baseType === type$.legacy_Object) return baseType; else if (t1 === 1) return A._Universe__lookupInterfaceRti(universe, "Future", [baseType]); @@ -2715,19 +2799,25 @@ }, isSubtype(universe, s, t) { var result, - sCache = A.Rti__getIsSubtypeCache(s), - probe = sCache.get(t); - if (probe != null) - return probe; - result = A._isSubtype(universe, s, null, t, null); - sCache.set(t, result); - return result; + sCache = s._isSubtypeCache; + if (sCache == null) + sCache = s._isSubtypeCache = new Map(); + result = sCache.get(t); + if (result == null) { + result = A._isSubtype(universe, s, null, t, null, false) ? 1 : 0; + sCache.set(t, result); + } + if (0 === result) + return false; + if (1 === result) + return true; + return true; }, - _isSubtype(universe, s, sEnv, t, tEnv) { + _isSubtype(universe, s, sEnv, t, tEnv, isLegacy) { var t1, sKind, leftTypeVariable, tKind, t2, sBounds, tBounds, sLength, i, sBound, tBound; if (s === t) return true; - if (!A.isStrongTopType(t)) + if (!A.isSoundTopType(t)) if (!(t === type$.legacy_Object)) t1 = false; else @@ -2739,7 +2829,7 @@ sKind = s._kind; if (sKind === 4) return true; - if (A.isStrongTopType(s)) + if (A.isSoundTopType(s)) return false; if (s._kind !== 1) t1 = false; @@ -2749,45 +2839,45 @@ return true; leftTypeVariable = sKind === 14; if (leftTypeVariable) - if (A._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv)) + if (A._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv, false)) return true; tKind = t._kind; t1 = s === type$.Null || s === type$.JSNull; if (t1) { if (tKind === 8) - return A._isSubtype(universe, s, sEnv, t._primary, tEnv); + return A._isSubtype(universe, s, sEnv, t._primary, tEnv, false); return t === type$.Null || t === type$.JSNull || tKind === 7 || tKind === 6; } if (t === type$.Object) { if (sKind === 8) - return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); if (sKind === 6) - return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); return sKind !== 7; } if (sKind === 6) - return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); if (tKind === 6) { t1 = A.Rti__getQuestionFromStar(universe, t); - return A._isSubtype(universe, s, sEnv, t1, tEnv); + return A._isSubtype(universe, s, sEnv, t1, tEnv, false); } if (sKind === 8) { - if (!A._isSubtype(universe, s._primary, sEnv, t, tEnv)) + if (!A._isSubtype(universe, s._primary, sEnv, t, tEnv, false)) return false; - return A._isSubtype(universe, A.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv); + return A._isSubtype(universe, A.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv, false); } if (sKind === 7) { - t1 = A._isSubtype(universe, type$.Null, sEnv, t, tEnv); - return t1 && A._isSubtype(universe, s._primary, sEnv, t, tEnv); + t1 = A._isSubtype(universe, type$.Null, sEnv, t, tEnv, false); + return t1 && A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); } if (tKind === 8) { - if (A._isSubtype(universe, s, sEnv, t._primary, tEnv)) + if (A._isSubtype(universe, s, sEnv, t._primary, tEnv, false)) return true; - return A._isSubtype(universe, s, sEnv, A.Rti__getFutureFromFutureOr(universe, t), tEnv); + return A._isSubtype(universe, s, sEnv, A.Rti__getFutureFromFutureOr(universe, t), tEnv, false); } if (tKind === 7) { - t1 = A._isSubtype(universe, s, sEnv, type$.Null, tEnv); - return t1 || A._isSubtype(universe, s, sEnv, t._primary, tEnv); + t1 = A._isSubtype(universe, s, sEnv, type$.Null, tEnv, false); + return t1 || A._isSubtype(universe, s, sEnv, t._primary, tEnv, false); } if (leftTypeVariable) return false; @@ -2812,30 +2902,30 @@ for (i = 0; i < sLength; ++i) { sBound = sBounds[i]; tBound = tBounds[i]; - if (!A._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !A._isSubtype(universe, tBound, tEnv, sBound, sEnv)) + if (!A._isSubtype(universe, sBound, sEnv, tBound, tEnv, false) || !A._isSubtype(universe, tBound, tEnv, sBound, sEnv, false)) return false; } - return A._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv); + return A._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv, false); } if (tKind === 12) { if (s === type$.JavaScriptFunction) return true; if (t1) return false; - return A._isFunctionSubtype(universe, s, sEnv, t, tEnv); + return A._isFunctionSubtype(universe, s, sEnv, t, tEnv, false); } if (sKind === 9) { if (tKind !== 9) return false; - return A._isInterfaceSubtype(universe, s, sEnv, t, tEnv); + return A._isInterfaceSubtype(universe, s, sEnv, t, tEnv, false); } if (t2 && tKind === 11) - return A._isRecordSubtype(universe, s, sEnv, t, tEnv); + return A._isRecordSubtype(universe, s, sEnv, t, tEnv, false); return false; }, - _isFunctionSubtype(universe, s, sEnv, t, tEnv) { + _isFunctionSubtype(universe, s, sEnv, t, tEnv, isLegacy) { var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired; - if (!A._isSubtype(universe, s._primary, sEnv, t._primary, tEnv)) + if (!A._isSubtype(universe, s._primary, sEnv, t._primary, tEnv, false)) return false; sParameters = s._rest; tParameters = t._rest; @@ -2854,17 +2944,17 @@ return false; for (i = 0; i < sRequiredPositionalLength; ++i) { t1 = sRequiredPositional[i]; - if (!A._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv)) + if (!A._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv, false)) return false; } for (i = 0; i < requiredPositionalDelta; ++i) { t1 = sOptionalPositional[i]; - if (!A._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv)) + if (!A._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv, false)) return false; } for (i = 0; i < tOptionalPositionalLength; ++i) { t1 = sOptionalPositional[requiredPositionalDelta + i]; - if (!A._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv)) + if (!A._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv, false)) return false; } sNamed = sParameters._named; @@ -2890,7 +2980,7 @@ if (sIsRequired && !t1) return false; t1 = sNamed[sIndex - 1]; - if (!A._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv)) + if (!A._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv, false)) return false; break; } @@ -2902,8 +2992,8 @@ } return true; }, - _isInterfaceSubtype(universe, s, sEnv, t, tEnv) { - var rule, recipes, $length, supertypeArgs, i, t1, t2, + _isInterfaceSubtype(universe, s, sEnv, t, tEnv, isLegacy) { + var rule, recipes, $length, supertypeArgs, i, sName = s._primary, tName = t._primary; for (; sName !== tName;) { @@ -2921,24 +3011,19 @@ supertypeArgs = $length > 0 ? new Array($length) : init.typeUniverse.sEA; for (i = 0; i < $length; ++i) supertypeArgs[i] = A._Universe_evalInEnvironment(universe, s, recipes[i]); - return A._areArgumentsSubtypes(universe, supertypeArgs, null, sEnv, t._rest, tEnv); + return A._areArgumentsSubtypes(universe, supertypeArgs, null, sEnv, t._rest, tEnv, false); } - t1 = s._rest; - t2 = t._rest; - return A._areArgumentsSubtypes(universe, t1, null, sEnv, t2, tEnv); + return A._areArgumentsSubtypes(universe, s._rest, null, sEnv, t._rest, tEnv, false); }, - _areArgumentsSubtypes(universe, sArgs, sVariances, sEnv, tArgs, tEnv) { - var i, t1, t2, + _areArgumentsSubtypes(universe, sArgs, sVariances, sEnv, tArgs, tEnv, isLegacy) { + var i, $length = sArgs.length; - for (i = 0; i < $length; ++i) { - t1 = sArgs[i]; - t2 = tArgs[i]; - if (!A._isSubtype(universe, t1, sEnv, t2, tEnv)) + for (i = 0; i < $length; ++i) + if (!A._isSubtype(universe, sArgs[i], sEnv, tArgs[i], tEnv, false)) return false; - } return true; }, - _isRecordSubtype(universe, s, sEnv, t, tEnv) { + _isRecordSubtype(universe, s, sEnv, t, tEnv, isLegacy) { var i, sFields = s._rest, tFields = t._rest, @@ -2948,7 +3033,7 @@ if (s._primary !== t._primary) return false; for (i = 0; i < sCount; ++i) - if (!A._isSubtype(universe, sFields[i], sEnv, tFields[i], tEnv)) + if (!A._isSubtype(universe, sFields[i], sEnv, tFields[i], tEnv, false)) return false; return true; }, @@ -2956,7 +3041,7 @@ var t1, kind = t._kind; if (!(t === type$.Null || t === type$.JSNull)) - if (!A.isStrongTopType(t)) + if (!A.isSoundTopType(t)) if (kind !== 7) if (!(kind === 6 && A.isNullable(t._primary))) t1 = kind === 8 && A.isNullable(t._primary); @@ -2970,9 +3055,9 @@ t1 = true; return t1; }, - isTopType(t) { + isDefinitelyTopType(t) { var t1; - if (!A.isStrongTopType(t)) + if (!A.isSoundTopType(t)) if (!(t === type$.legacy_Object)) t1 = false; else @@ -2981,7 +3066,7 @@ t1 = true; return t1; }, - isStrongTopType(t) { + isSoundTopType(t) { var kind = t._kind; return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object; }, @@ -3001,7 +3086,7 @@ var _ = this; _._as = t0; _._is = t1; - _._cachedRuntimeType = _._specializedTestResource = _._unsoundIsSubtypeCache = _._isSubtypeCache = _._precomputed1 = null; + _._cachedRuntimeType = _._specializedTestResource = _._isSubtypeCache = _._precomputed1 = null; _._kind = 0; _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; }, @@ -3059,7 +3144,7 @@ A._awaitOnObject(object, bodyFunction); }, _asyncReturn(object, completer) { - completer.complete$1(0, object); + completer.complete$1(object); }, _asyncRethrow(object, completer) { completer.completeError$2(A.unwrapException(object), A.getTraceFromException(object)); @@ -3085,7 +3170,7 @@ _wrapJsFunctionForAsync($function) { var $protected = function(fn, ERROR) { return function(errorCode, result) { - while (true) + while (true) { try { fn(errorCode, result); break; @@ -3093,6 +3178,7 @@ result = error; errorCode = ERROR; } + } }; }($function, 1); return $.Zone__current.registerBinaryCallback$3$1(new A._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); @@ -3114,12 +3200,8 @@ var result, error, stackTrace, future, replacement, t1, exception; try { result = computation.call$0(); - if ($T._eval$1("Future<0>")._is(result)) - return result; - else { - t1 = A._Future$value(result, $T); - return t1; - } + t1 = $T._eval$1("Future<0>")._is(result) ? result : A._Future$value(result, $T); + return t1; } catch (exception) { error = A.unwrapException(exception); stackTrace = A.getTraceFromException(exception); @@ -3704,8 +3786,21 @@ this.f = t1; this.T = t2; }, - LinkedHashMap_LinkedHashMap$_literal(keyValuePairs, $K, $V) { - return $K._eval$1("@<0>")._bind$1($V)._eval$1("LinkedHashMap<1,2>")._as(A.fillLiteralMap(keyValuePairs, new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")))); + _HashMap__getTableEntry(table, key) { + var entry = table[key]; + return entry === table ? null : entry; + }, + _HashMap__setTableEntry(table, key, value) { + if (value == null) + table[key] = table; + else + table[key] = value; + }, + _HashMap__newHashTable() { + var table = Object.create(null); + A._HashMap__setTableEntry(table, "", table); + delete table[""]; + return table; }, LinkedHashMap_LinkedHashMap$_empty($K, $V) { return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); @@ -3735,6 +3830,26 @@ ListQueue__calculateCapacity(initialCapacity) { return 8; }, + _HashMap: function _HashMap() { + }, + _IdentityHashMap: function _IdentityHashMap(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_keys = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _.$ti = t0; + }, + _HashMapKeyIterable: function _HashMapKeyIterable(t0, t1) { + this._collection$_map = t0; + this.$ti = t1; + }, + _HashMapKeyIterator: function _HashMapKeyIterator(t0, t1, t2) { + var _ = this; + _._collection$_map = t0; + _._collection$_keys = t1; + _._offset = 0; + _._collection$_current = null; + _.$ti = t2; + }, ListBase: function ListBase() { }, MapBase: function MapBase() { @@ -3743,6 +3858,12 @@ this._box_0 = t0; this.result = t1; }, + _UnmodifiableMapMixin: function _UnmodifiableMapMixin() { + }, + MapView: function MapView() { + }, + UnmodifiableMapView: function UnmodifiableMapView() { + }, ListQueue: function ListQueue(t0, t1) { var _ = this; _._table = t0; @@ -3758,6 +3879,8 @@ _._collection$_current = null; _.$ti = t4; }, + _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() { + }, _parseJson(source, reviver) { var e, exception, t1, parsed = null; try { @@ -3860,6 +3983,19 @@ result[i] = fill; return result; }, + List_List$of(elements, growable, $E) { + var t1 = A.List_List$_of(elements, $E); + return t1; + }, + List_List$_of(elements, $E) { + var list, t1; + if (Array.isArray(elements)) + return A._setArrayType(elements.slice(0), $E._eval$1("JSArray<0>")); + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + B.JSArray_methods.add$1(list, t1.get$current()); + return list; + }, StringBuffer__writeAll(string, objects, separator) { var iterator = J.get$iterator$ax(objects); if (!iterator.moveNext$0()) @@ -3875,6 +4011,9 @@ } return string; }, + NoSuchMethodError_NoSuchMethodError$withInvocation(receiver, invocation) { + return new A.NoSuchMethodError(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments()); + }, StackTrace_current() { return A.getTraceFromException(new Error()); }, @@ -4086,6 +4225,10 @@ B.JSArray_methods.add$1(parts, penultimateString); B.JSArray_methods.add$1(parts, ultimateString); }, + NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { + this._box_0 = t0; + this.sb = t1; + }, DateTime: function DateTime(t0, t1) { this._value = t0; this.isUtc = t1; @@ -4124,6 +4267,13 @@ _.name = t3; _.message = t4; }, + NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) { + var _ = this; + _._core$_receiver = t0; + _._core$_memberName = t1; + _._core$_arguments = t2; + _._namedArguments = t3; + }, UnsupportedError: function UnsupportedError(t0) { this.message = t0; }, @@ -4160,119 +4310,30 @@ StringBuffer: function StringBuffer(t0) { this._contents = t0; }, - EventSource__factoryEventSource(url, eventSourceInitDict) { - var t1 = new EventSource(url, A.convertDartToNative_Dictionary(eventSourceInitDict)); - t1.toString; - return t1; - }, - _EventStreamSubscription$(_target, _eventType, onData, _useCapture, $T) { - var t1 = onData == null ? null : A._wrapZone(new A._EventStreamSubscription_closure(onData), type$.Event); - t1 = new A._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); - t1._tryResume$0(); - return t1; - }, - _wrapZone(callback, $T) { - var t1 = $.Zone__current; - if (t1 === B.C__RootZone) - return callback; - return t1.bindUnaryCallbackGuarded$1$1(callback, $T); - }, - HtmlElement: function HtmlElement() { - }, - AnchorElement: function AnchorElement() { - }, - AreaElement: function AreaElement() { - }, - DomException: function DomException() { - }, - Element: function Element() { - }, - Event: function Event() { - }, - EventSource: function EventSource() { - }, - EventTarget: function EventTarget() { - }, - FormElement: function FormElement() { - }, - MessageEvent: function MessageEvent() { - }, - MouseEvent: function MouseEvent() { - }, - Node: function Node() { - }, - SelectElement: function SelectElement() { - }, - UIEvent: function UIEvent() { - }, - EventStreamProvider: function EventStreamProvider(t0, t1) { - this._eventType = t0; - this.$ti = t1; - }, - _EventStream: function _EventStream(t0, t1, t2, t3) { - var _ = this; - _._target = t0; - _._eventType = t1; - _._useCapture = t2; - _.$ti = t3; - }, - _ElementEventStreamImpl: function _ElementEventStreamImpl(t0, t1, t2, t3) { - var _ = this; - _._target = t0; - _._eventType = t1; - _._useCapture = t2; - _.$ti = t3; - }, - _EventStreamSubscription: function _EventStreamSubscription(t0, t1, t2, t3, t4) { - var _ = this; - _._target = t0; - _._eventType = t1; - _._html$_onData = t2; - _._useCapture = t3; - _.$ti = t4; - }, - _EventStreamSubscription_closure: function _EventStreamSubscription_closure(t0) { - this.onData = t0; - }, - _EventStreamSubscription_onData_closure: function _EventStreamSubscription_onData_closure(t0) { - this.handleData = t0; - }, - _convertDartToNative_Value(value) { - var array; - if (value == null) - return value; - if (typeof value == "string" || typeof value == "number" || A._isBool(value)) - return value; - if (type$.Map_dynamic_dynamic._is(value)) - return A.convertDartToNative_Dictionary(value); - if (type$.List_dynamic._is(value)) { - array = []; - J.forEach$1$ax(value, new A._convertDartToNative_Value_closure(array)); - value = array; - } - return value; - }, - convertDartToNative_Dictionary(dict) { - var object = {}; - dict.forEach$1(0, new A.convertDartToNative_Dictionary_closure(object)); - return object; - }, - _AcceptStructuredClone: function _AcceptStructuredClone() { - }, - _AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) { - this.$this = t0; - this.map = t1; - }, - _convertDartToNative_Value_closure: function _convertDartToNative_Value_closure(t0) { - this.array = t0; - }, - convertDartToNative_Dictionary_closure: function convertDartToNative_Dictionary_closure(t0) { - this.object = t0; - }, - _AcceptStructuredCloneDart2Js: function _AcceptStructuredCloneDart2Js(t0, t1) { - this.values = t0; - this.copies = t1; - this.mustCopy = false; + _convertDartFunctionFast(f) { + var ret, + existing = f.$dart_jsFunction; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFast, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f.$dart_jsFunction = ret; + return ret; + }, + _callDartFunctionFast(callback, $arguments) { + type$.List_dynamic._as($arguments); + type$.Function._as(callback); + return A.Primitives_applyFunction(callback, $arguments, null); + }, + allowInterop(f, $F) { + if (typeof f == "function") + return f; + else + return $F._as(A._convertDartFunctionFast(f)); }, promiseToFuture(jsPromise, $T) { var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), @@ -4280,6 +4341,14 @@ jsPromise.then(A.convertDartClosureToJS(new A.promiseToFuture_closure(completer, $T), 1), A.convertDartClosureToJS(new A.promiseToFuture_closure0(completer), 1)); return t1; }, + _noDartifyRequired(o) { + return o == null || typeof o === "boolean" || typeof o === "number" || typeof o === "string" || o instanceof Int8Array || o instanceof Uint8Array || o instanceof Uint8ClampedArray || o instanceof Int16Array || o instanceof Uint16Array || o instanceof Int32Array || o instanceof Uint32Array || o instanceof Float32Array || o instanceof Float64Array || o instanceof ArrayBuffer || o instanceof DataView; + }, + dartify(o) { + if (A._noDartifyRequired(o)) + return o; + return new A.dartify_convert(new A._IdentityHashMap(type$._IdentityHashMap_of_nullable_Object_and_nullable_Object)).call$1(o); + }, promiseToFuture_closure: function promiseToFuture_closure(t0, t1) { this.completer = t0; this.T = t1; @@ -4287,13 +4356,14 @@ promiseToFuture_closure0: function promiseToFuture_closure0(t0) { this.completer = t0; }, + dartify_convert: function dartify_convert(t0) { + this._convertedObjects = t0; + }, NullRejectionException: function NullRejectionException(t0) { this.isUndefined = t0; }, _JSRandom: function _JSRandom() { }, - SvgElement: function SvgElement() { - }, AsyncMemoizer: function AsyncMemoizer(t0, t1) { this._completer = t0; this.$ti = t1; @@ -4381,8 +4451,6 @@ this.$this = t1; this.message = t2; }, - _FetchOptions: function _FetchOptions() { - }, generateUuidV4() { var t1 = new A.generateUuidV4_printDigits(), t2 = new A.generateUuidV4_bitsDigits(t1, new A.generateUuidV4_generateBits(B.C__JSRandom)), @@ -4400,14 +4468,63 @@ }, StreamChannelMixin: function StreamChannelMixin() { }, + _EventStreamSubscription$(_target, _eventType, onData, _useCapture, $T) { + var t1; + if (onData == null) + t1 = null; + else { + t1 = A._wrapZone(new A._EventStreamSubscription_closure(onData), type$.JavaScriptObject); + t1 = t1 == null ? null : A.allowInterop(t1, type$.Function); + } + t1 = new A._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); + t1._tryResume$0(); + return t1; + }, + _wrapZone(callback, $T) { + var t1 = $.Zone__current; + if (t1 === B.C__RootZone) + return callback; + return t1.bindUnaryCallbackGuarded$1$1(callback, $T); + }, + EventStreamProvider: function EventStreamProvider(t0, t1) { + this._eventType = t0; + this.$ti = t1; + }, + _EventStream: function _EventStream(t0, t1, t2, t3) { + var _ = this; + _._target = t0; + _._eventType = t1; + _._useCapture = t2; + _.$ti = t3; + }, + _ElementEventStreamImpl: function _ElementEventStreamImpl(t0, t1, t2, t3) { + var _ = this; + _._target = t0; + _._eventType = t1; + _._useCapture = t2; + _.$ti = t3; + }, + _EventStreamSubscription: function _EventStreamSubscription(t0, t1, t2, t3, t4) { + var _ = this; + _._target = t0; + _._eventType = t1; + _._streams$_onData = t2; + _._useCapture = t3; + _.$ti = t4; + }, + _EventStreamSubscription_closure: function _EventStreamSubscription_closure(t0) { + this.onData = t0; + }, + _EventStreamSubscription_onData_closure: function _EventStreamSubscription_onData_closure(t0) { + this.handleData = t0; + }, main() { var t2, channel = A.SseClient$("/test"), - t1 = document.querySelector("button"); + t1 = type$.nullable_JavaScriptObject._as(type$.JavaScriptObject._as(self.document).querySelector("button")); t1.toString; - t1 = J.get$onClick$x(t1); - t2 = t1.$ti; - A._EventStreamSubscription$(t1._target, t1._eventType, t2._eval$1("~(1)?")._as(new A.main_closure(channel)), false, t2._precomputed1); + t2 = type$._ElementEventStreamImpl_JavaScriptObject; + A._EventStreamSubscription$(t1, "click", t2._eval$1("~(1)?")._as(new A.main_closure(channel)), false, t2._precomputed1); t2 = channel._incomingController; new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$1(new A.main_closure0(channel)); }, @@ -4438,6 +4555,9 @@ toString$0(receiver) { return "Instance of '" + A.Primitives_objectTypeName(receiver) + "'"; }, + noSuchMethod$1(receiver, invocation) { + throw A.wrapException(A.NoSuchMethodError_NoSuchMethodError$withInvocation(receiver, type$.Invocation._as(invocation))); + }, get$runtimeType(receiver) { return A.createRuntimeType(A._instanceTypeFromConstructor(this)); } @@ -4468,7 +4588,7 @@ $isTrustedGetRuntimeType: 1, $isNull: 1 }; - J.JavaScriptObject.prototype = {}; + J.JavaScriptObject.prototype = {$isJSObject: 1}; J.LegacyJavaScriptObject.prototype = { get$hashCode(receiver) { return 0; @@ -4511,15 +4631,28 @@ A.throwExpression(A.UnsupportedError$("add")); receiver.push(value); }, - forEach$1(receiver, f) { - var end, i; - A._arrayInstanceType(receiver)._eval$1("~(1)")._as(f); - end = receiver.length; - for (i = 0; i < end; ++i) { - f.call$1(receiver[i]); - if (receiver.length !== end) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } + addAll$1(receiver, collection) { + var t1; + A._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(collection); + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("addAll")); + if (Array.isArray(collection)) { + this._addAllFromArray$1(receiver, collection); + return; + } + for (t1 = J.get$iterator$ax(collection); t1.moveNext$0();) + receiver.push(t1.get$current()); + }, + _addAllFromArray$1(receiver, array) { + var len, i; + type$.JSArray_dynamic._as(array); + len = array.length; + if (len === 0) + return; + if (receiver === array) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + for (i = 0; i < len; ++i) + receiver.push(array[i]); }, get$last(receiver) { var t1 = receiver.length; @@ -4860,6 +4993,113 @@ } }; A.FixedLengthListMixin.prototype = {}; + A.Symbol.prototype = { + get$hashCode(_) { + var hash = this._hashCode; + if (hash != null) + return hash; + hash = 664597 * B.JSString_methods.get$hashCode(this._name) & 536870911; + this._hashCode = hash; + return hash; + }, + toString$0(_) { + return 'Symbol("' + this._name + '")'; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Symbol && this._name === other._name; + }, + $isSymbol0: 1 + }; + A.ConstantMapView.prototype = {}; + A.ConstantMap.prototype = { + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + $isMap: 1 + }; + A.ConstantStringMap.prototype = { + get$length(_) { + return this._values.length; + }, + get$_keys() { + var keys = this.$keys; + if (keys == null) { + keys = Object.keys(this._jsIndex); + this.$keys = keys; + } + return keys; + }, + forEach$1(_, f) { + var keys, values, t1, i; + this.$ti._eval$1("~(1,2)")._as(f); + keys = this.get$_keys(); + values = this._values; + for (t1 = keys.length, i = 0; i < t1; ++i) + f.call$2(keys[i], values[i]); + } + }; + A.JSInvocationMirror.prototype = { + get$memberName() { + var t1 = this._memberName; + return t1; + }, + get$positionalArguments() { + var t1, argumentCount, list, index, _this = this; + if (_this.__js_helper$_kind === 1) + return B.List_empty; + t1 = _this._arguments; + argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount; + if (argumentCount === 0) + return B.List_empty; + list = []; + for (index = 0; index < argumentCount; ++index) { + if (!(index < t1.length)) + return A.ioore(t1, index); + list.push(t1[index]); + } + return J.JSArray_markUnmodifiableList(list); + }, + get$namedArguments() { + var t1, namedArgumentCount, t2, namedArgumentsStartIndex, map, i, t3, t4, _this = this; + if (_this.__js_helper$_kind !== 0) + return B.Map_empty; + t1 = _this._namedArgumentNames; + namedArgumentCount = t1.length; + t2 = _this._arguments; + namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount; + if (namedArgumentCount === 0) + return B.Map_empty; + map = new A.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); + for (i = 0; i < namedArgumentCount; ++i) { + if (!(i < t1.length)) + return A.ioore(t1, i); + t3 = t1[i]; + t4 = namedArgumentsStartIndex + i; + if (!(t4 >= 0 && t4 < t2.length)) + return A.ioore(t2, t4); + map.$indexSet(0, new A.Symbol(t3), t2[t4]); + } + return new A.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); + }, + $isInvocation: 1 + }; + A.Primitives_functionNoSuchMethod_closure.prototype = { + call$2($name, argument) { + var t1; + A._asString($name); + t1 = this._box_0; + t1.names = t1.names + "$" + $name; + B.JSArray_methods.add$1(this.namedArgumentList, $name); + B.JSArray_methods.add$1(this.$arguments, argument); + ++t1.argumentCount; + }, + $signature: 12 + }; A.TypeErrorDecoder.prototype = { matchTypeError$1(message) { var result, t1, _this = this, @@ -4979,6 +5219,7 @@ return "RuntimeError: " + this.message; } }; + A._Required.prototype = {}; A.JsLinkedHashMap.prototype = { get$length(_) { return this.__js_helper$_length; @@ -4987,7 +5228,7 @@ return this.__js_helper$_length === 0; }, get$keys() { - return new A.LinkedHashMapKeyIterable(this, this.$ti._eval$1("LinkedHashMapKeyIterable<1>")); + return new A.LinkedHashMapKeyIterable(this, A._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>")); }, containsKey$1(key) { var strings = this._strings; @@ -5019,7 +5260,7 @@ rest = this.__js_helper$_rest; if (rest == null) return null; - bucket = rest[J.get$hashCode$(key) & 1073741823]; + bucket = rest[this.internalComputeHashCode$1(key)]; index = this.internalFindBucketIndex$2(bucket, key); if (index < 0) return null; @@ -5027,7 +5268,7 @@ }, $indexSet(_, key, value) { var strings, nums, rest, hash, bucket, index, _this = this, - t1 = _this.$ti; + t1 = A._instanceType(_this); t1._precomputed1._as(key); t1._rest[1]._as(value); if (typeof key == "string") { @@ -5040,7 +5281,7 @@ rest = _this.__js_helper$_rest; if (rest == null) rest = _this.__js_helper$_rest = _this._newHashTable$0(); - hash = J.get$hashCode$(key) & 1073741823; + hash = _this.internalComputeHashCode$1(key); bucket = rest[hash]; if (bucket == null) rest[hash] = [_this._newLinkedCell$2(key, value)]; @@ -5055,7 +5296,7 @@ }, putIfAbsent$2(key, ifAbsent) { var t2, value, _this = this, - t1 = _this.$ti; + t1 = A._instanceType(_this); t1._precomputed1._as(key); t1._eval$1("2()")._as(ifAbsent); if (_this.containsKey$1(key)) { @@ -5068,7 +5309,7 @@ }, forEach$1(_, action) { var cell, modifications, _this = this; - _this.$ti._eval$1("~(1,2)")._as(action); + A._instanceType(_this)._eval$1("~(1,2)")._as(action); cell = _this._first; modifications = _this._modifications; for (; cell != null;) { @@ -5080,7 +5321,7 @@ }, _addHashTableEntry$3(table, key, value) { var cell, - t1 = this.$ti; + t1 = A._instanceType(this); t1._precomputed1._as(key); t1._rest[1]._as(value); cell = table[key]; @@ -5091,7 +5332,7 @@ }, _newLinkedCell$2(key, value) { var _this = this, - t1 = _this.$ti, + t1 = A._instanceType(_this), cell = new A.LinkedHashMapCell(t1._precomputed1._as(key), t1._rest[1]._as(value)); if (_this._first == null) _this._first = _this._last = cell; @@ -5101,6 +5342,9 @@ _this._modifications = _this._modifications + 1 & 1073741823; return cell; }, + internalComputeHashCode$1(key) { + return J.get$hashCode$(key) & 1073741823; + }, internalFindBucketIndex$2(bucket, key) { var $length, i; if (bucket == null) @@ -5119,8 +5363,7 @@ table[""] = table; delete table[""]; return table; - }, - $isLinkedHashMap: 1 + } }; A.LinkedHashMapCell.prototype = {}; A.LinkedHashMapKeyIterable.prototype = { @@ -5170,13 +5413,13 @@ call$2(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 12 + $signature: 13 }; A.initHooks_closure1.prototype = { call$1(tag) { return this.prototypeForTag(A._asString(tag)); }, - $signature: 13 + $signature: 14 }; A.StringMatch.prototype = {}; A.NativeByteBuffer.prototype = { @@ -5203,23 +5446,10 @@ A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; }, - $indexSet(receiver, index, value) { - A._asDouble(value); - A._checkValidIndex(index, receiver, receiver.length); - receiver[index] = value; - }, - $isIterable: 1, - $isList: 1 - }; - A.NativeTypedArrayOfInt.prototype = { - $indexSet(receiver, index, value) { - A._asInt(value); - A._checkValidIndex(index, receiver, receiver.length); - receiver[index] = value; - }, $isIterable: 1, $isList: 1 }; + A.NativeTypedArrayOfInt.prototype = {$isIterable: 1, $isList: 1}; A.NativeFloat32List.prototype = { get$runtimeType(receiver) { return B.Type_Float32List_LB7; @@ -5349,19 +5579,19 @@ t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 14 + $signature: 15 }; A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { call$0() { this.callback.call$0(); }, - $signature: 3 + $signature: 2 }; A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { call$0() { this.callback.call$0(); }, - $signature: 3 + $signature: 2 }; A._TimerImpl.prototype = { _TimerImpl$2(milliseconds, callback) { @@ -5390,7 +5620,7 @@ $signature: 0 }; A._AsyncAwaitCompleter.prototype = { - complete$1(_, value) { + complete$1(value) { var t2, _this = this, t1 = _this.$ti; t1._eval$1("1/?")._as(value); @@ -5419,19 +5649,19 @@ call$1(result) { return this.bodyFunction.call$2(0, result); }, - $signature: 2 + $signature: 3 }; A._awaitOnObject_closure0.prototype = { call$2(error, stackTrace) { this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - $signature: 15 + $signature: 16 }; A._wrapJsFunctionForAsync_closure.prototype = { call$2(errorCode, result) { this.$protected(A._asInt(errorCode), result); }, - $signature: 16 + $signature: 17 }; A.AsyncError.prototype = { toString$0(_) { @@ -5457,7 +5687,7 @@ $isCompleter: 1 }; A._AsyncCompleter.prototype = { - complete$1(_, value) { + complete$1(value) { var t2, t1 = this.$ti; t1._eval$1("1/?")._as(value); @@ -5466,15 +5696,15 @@ throw A.wrapException(A.StateError$("Future already completed")); t2._asyncComplete$1(t1._eval$1("1/")._as(value)); }, - complete$0($receiver) { - return this.complete$1($receiver, null); + complete$0() { + return this.complete$1(null); }, _completeError$2(error, stackTrace) { this.future._asyncCompleteError$2(error, stackTrace); } }; A._SyncCompleter.prototype = { - complete$1(_, value) { + complete$1(value) { var t2, t1 = this.$ti; t1._eval$1("1/?")._as(value); @@ -5798,7 +6028,7 @@ call$1(_) { return this.originalSource; }, - $signature: 17 + $signature: 18 }; A._Future__propagateToListeners_handleValueCallback.prototype = { call$0() { @@ -5950,7 +6180,7 @@ else if ((t2 & 3) === 0) _this._ensurePendingEvents$0().add$1(0, new A._DelayedData(value, t1._eval$1("_DelayedData<1>"))); }, - close$0(_) { + close$0() { var _this = this, t1 = _this._state; if ((t1 & 4) !== 0) @@ -6080,7 +6310,7 @@ t2 = A._instanceType(t1); t2._eval$1("StreamSubscription<1>")._as(this); if ((t1._state & 8) !== 0) - t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).pause$0(0); + t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).pause$0(); A._runGuarded(t1.onPause); }, _onResume$0() { @@ -6271,7 +6501,7 @@ call$0() { this.result._completeError$2(this.error, this.stackTrace); }, - $signature: 3 + $signature: 2 }; A._BufferingStreamSubscription__sendError_sendError.prototype = { call$0() { @@ -6504,6 +6734,207 @@ return this.T._eval$1("~(0)"); } }; + A._HashMap.prototype = { + get$length(_) { + return this._collection$_length; + }, + get$isEmpty(_) { + return this._collection$_length === 0; + }, + get$keys() { + return new A._HashMapKeyIterable(this, this.$ti._eval$1("_HashMapKeyIterable<1>")); + }, + containsKey$1(key) { + var strings, nums; + if (typeof key == "string" && key !== "__proto__") { + strings = this._collection$_strings; + return strings == null ? false : strings[key] != null; + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._collection$_nums; + return nums == null ? false : nums[key] != null; + } else + return this._containsKey$1(key); + }, + _containsKey$1(key) { + var rest = this._collection$_rest; + if (rest == null) + return false; + return this._findBucketIndex$2(this._getBucket$2(rest, key), key) >= 0; + }, + $index(_, key) { + var strings, t1, nums; + if (typeof key == "string" && key !== "__proto__") { + strings = this._collection$_strings; + t1 = strings == null ? null : A._HashMap__getTableEntry(strings, key); + return t1; + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._collection$_nums; + t1 = nums == null ? null : A._HashMap__getTableEntry(nums, key); + return t1; + } else + return this._get$1(key); + }, + _get$1(key) { + var bucket, index, + rest = this._collection$_rest; + if (rest == null) + return null; + bucket = this._getBucket$2(rest, key); + index = this._findBucketIndex$2(bucket, key); + return index < 0 ? null : bucket[index + 1]; + }, + $indexSet(_, key, value) { + var strings, nums, rest, hash, bucket, index, _this = this, + t1 = _this.$ti; + t1._precomputed1._as(key); + t1._rest[1]._as(value); + if (typeof key == "string" && key !== "__proto__") { + strings = _this._collection$_strings; + _this._collection$_addHashTableEntry$3(strings == null ? _this._collection$_strings = A._HashMap__newHashTable() : strings, key, value); + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = _this._collection$_nums; + _this._collection$_addHashTableEntry$3(nums == null ? _this._collection$_nums = A._HashMap__newHashTable() : nums, key, value); + } else { + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._HashMap__newHashTable(); + hash = A.objectHashCode(key) & 1073741823; + bucket = rest[hash]; + if (bucket == null) { + A._HashMap__setTableEntry(rest, hash, [key, value]); + ++_this._collection$_length; + _this._collection$_keys = null; + } else { + index = _this._findBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index + 1] = value; + else { + bucket.push(key, value); + ++_this._collection$_length; + _this._collection$_keys = null; + } + } + } + }, + forEach$1(_, action) { + var keys, $length, t2, i, key, t3, _this = this, + t1 = _this.$ti; + t1._eval$1("~(1,2)")._as(action); + keys = _this._computeKeys$0(); + for ($length = keys.length, t2 = t1._precomputed1, t1 = t1._rest[1], i = 0; i < $length; ++i) { + key = keys[i]; + t2._as(key); + t3 = _this.$index(0, key); + action.call$2(key, t3 == null ? t1._as(t3) : t3); + if (keys !== _this._collection$_keys) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + }, + _computeKeys$0() { + var strings, names, entries, index, i, nums, rest, bucket, $length, i0, _this = this, + result = _this._collection$_keys; + if (result != null) + return result; + result = A.List_List$filled(_this._collection$_length, null, false, type$.dynamic); + strings = _this._collection$_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._collection$_nums; + if (nums != null) { + names = Object.getOwnPropertyNames(nums); + entries = names.length; + for (i = 0; i < entries; ++i) { + result[index] = +names[i]; + ++index; + } + } + rest = _this._collection$_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 += 2) { + result[index] = bucket[i0]; + ++index; + } + } + } + return _this._collection$_keys = result; + }, + _collection$_addHashTableEntry$3(table, key, value) { + var t1 = this.$ti; + t1._precomputed1._as(key); + t1._rest[1]._as(value); + if (table[key] == null) { + ++this._collection$_length; + this._collection$_keys = null; + } + A._HashMap__setTableEntry(table, key, value); + }, + _getBucket$2(table, key) { + return table[A.objectHashCode(key) & 1073741823]; + } + }; + A._IdentityHashMap.prototype = { + _findBucketIndex$2(bucket, key) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; i += 2) { + t1 = bucket[i]; + if (t1 == null ? key == null : t1 === key) + return i; + } + return -1; + } + }; + A._HashMapKeyIterable.prototype = { + get$length(_) { + return this._collection$_map._collection$_length; + }, + get$isEmpty(_) { + return this._collection$_map._collection$_length === 0; + }, + get$iterator(_) { + var t1 = this._collection$_map; + return new A._HashMapKeyIterator(t1, t1._computeKeys$0(), this.$ti._eval$1("_HashMapKeyIterator<1>")); + } + }; + A._HashMapKeyIterator.prototype = { + get$current() { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + keys = _this._collection$_keys, + offset = _this._offset, + t1 = _this._collection$_map; + if (keys !== t1._collection$_keys) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + else if (offset >= keys.length) { + _this.set$_collection$_current(null); + return false; + } else { + _this.set$_collection$_current(keys[offset]); + _this._offset = offset + 1; + return true; + } + }, + set$_collection$_current(_current) { + this._collection$_current = this.$ti._eval$1("1?")._as(_current); + } + }; A.ListBase.prototype = { get$iterator(receiver) { return new A.ListIterator(receiver, this.get$length(receiver), A.instanceType(receiver)._eval$1("ListIterator")); @@ -6511,16 +6942,6 @@ elementAt$1(receiver, index) { return this.$index(receiver, index); }, - forEach$1(receiver, action) { - var $length, i; - A.instanceType(receiver)._eval$1("~(ListBase.E)")._as(action); - $length = this.get$length(receiver); - for (i = 0; i < $length; ++i) { - action.call$1(this.$index(receiver, i)); - if ($length !== this.get$length(receiver)) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - }, get$isNotEmpty(receiver) { return this.get$length(receiver) !== 0; }, @@ -6566,6 +6987,23 @@ }, $signature: 10 }; + A._UnmodifiableMapMixin.prototype = {}; + A.MapView.prototype = { + forEach$1(_, action) { + this._collection$_map.forEach$1(0, A._instanceType(this)._eval$1("~(1,2)")._as(action)); + }, + get$isEmpty(_) { + return this._collection$_map.__js_helper$_length === 0; + }, + get$length(_) { + return this._collection$_map.__js_helper$_length; + }, + toString$0(_) { + return A.MapBase_mapToString(this._collection$_map); + }, + $isMap: 1 + }; + A.UnmodifiableMapView.prototype = {}; A.ListQueue.prototype = { get$iterator(_) { var _this = this; @@ -6662,6 +7100,7 @@ this._collection$_current = this.$ti._eval$1("1?")._as(_current); } }; + A._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; A._JsonMap.prototype = { $index(_, key) { var result, @@ -6676,7 +7115,7 @@ } }, get$length(_) { - return this._processed == null ? this._data.__js_helper$_length : this._computeKeys$0().length; + return this._processed == null ? this._data.__js_helper$_length : this._convert$_computeKeys$0().length; }, get$isEmpty(_) { return this.get$length(this) === 0; @@ -6684,7 +7123,7 @@ get$keys() { if (this._processed == null) { var t1 = this._data; - return new A.LinkedHashMapKeyIterable(t1, t1.$ti._eval$1("LinkedHashMapKeyIterable<1>")); + return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); } return new A._JsonMapKeyIterable(this); }, @@ -6693,7 +7132,7 @@ type$.void_Function_String_dynamic._as(f); if (_this._processed == null) return _this._data.forEach$1(0, f); - keys = _this._computeKeys$0(); + keys = _this._convert$_computeKeys$0(); for (i = 0; i < keys.length; ++i) { key = keys[i]; value = _this._processed[key]; @@ -6706,7 +7145,7 @@ throw A.wrapException(A.ConcurrentModificationError$(_this)); } }, - _computeKeys$0() { + _convert$_computeKeys$0() { var keys = type$.nullable_List_dynamic._as(this._data); if (keys == null) keys = this._data = A._setArrayType(Object.keys(this._original), type$.JSArray_String); @@ -6730,7 +7169,7 @@ if (t1._processed == null) t1 = t1.get$keys().elementAt$1(0, index); else { - t1 = t1._computeKeys$0(); + t1 = t1._convert$_computeKeys$0(); if (!(index >= 0 && index < t1.length)) return A.ioore(t1, index); t1 = t1[index]; @@ -6743,7 +7182,7 @@ t1 = t1.get$keys(); t1 = t1.get$iterator(t1); } else { - t1 = t1._computeKeys$0(); + t1 = t1._convert$_computeKeys$0(); t1 = new J.ArrayIterator(t1, t1.length, A._arrayInstanceType(t1)._eval$1("ArrayIterator<1>")); } return t1; @@ -6763,7 +7202,7 @@ } }; A.JsonCodec.prototype = { - decode$2$reviver(_, source, reviver) { + decode$2$reviver(source, reviver) { var t1 = A._parseJson(source, this.get$decoder()._reviver); return t1; }, @@ -7003,6 +7442,21 @@ this._sink._contents += A.Primitives_stringFromCharCode(charCode); } }; + A.NoSuchMethodError_toString_closure.prototype = { + call$2(key, value) { + var t1, t2, t3; + type$.Symbol._as(key); + t1 = this.sb; + t2 = this._box_0; + t3 = t1._contents += t2.comma; + t3 += key._name; + t1._contents = t3; + t1._contents = t3 + ": "; + t1._contents += A.Error_safeToString(value); + t2.comma = ", "; + }, + $signature: 19 + }; A.DateTime.prototype = { $eq(_, other) { if (other == null) @@ -7127,6 +7581,24 @@ return this.length; } }; + A.NoSuchMethodError.prototype = { + toString$0(_) { + var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {}, + sb = new A.StringBuffer(""); + _box_0.comma = ""; + $arguments = _this._core$_arguments; + for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { + argument = $arguments[_i]; + sb._contents = t2 + t3; + t2 = sb._contents += A.Error_safeToString(argument); + _box_0.comma = ", "; + } + _this._namedArguments.forEach$1(0, new A.NoSuchMethodError_toString_closure(_box_0, sb)); + receiverText = A.Error_safeToString(_this._core$_receiver); + actualParameters = sb.toString$0(0); + return "NoSuchMethodError: method not found: '" + _this._core$_memberName._name + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; + } + }; A.UnsupportedError.prototype = { toString$0(_) { return "Unsupported operation: " + this.message; @@ -7287,6 +7759,9 @@ toString$0(_) { return "Instance of '" + A.Primitives_objectTypeName(this) + "'"; }, + noSuchMethod$1(_, invocation) { + throw A.wrapException(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, type$.Invocation._as(invocation))); + }, get$runtimeType(_) { return A.getRuntimeTypeOfDartObject(this); }, @@ -7310,275 +7785,11 @@ }, $isStringSink: 1 }; - A.HtmlElement.prototype = {}; - A.AnchorElement.prototype = { - toString$0(receiver) { - var t1 = String(receiver); - t1.toString; - return t1; - } - }; - A.AreaElement.prototype = { - toString$0(receiver) { - var t1 = String(receiver); - t1.toString; - return t1; - } - }; - A.DomException.prototype = { - toString$0(receiver) { - var t1 = String(receiver); - t1.toString; - return t1; - } - }; - A.Element.prototype = { - toString$0(receiver) { - var t1 = receiver.localName; - t1.toString; - return t1; - }, - get$onClick(receiver) { - return new A._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); - }, - $isElement: 1 - }; - A.Event.prototype = {$isEvent: 1}; - A.EventSource.prototype = {$isEventSource: 1}; - A.EventTarget.prototype = { - addEventListener$3(receiver, type, listener, useCapture) { - type$.nullable_dynamic_Function_Event._as(listener); - if (listener != null) - this._addEventListener$3(receiver, type, listener, useCapture); - }, - addEventListener$2($receiver, type, listener) { - return this.addEventListener$3($receiver, type, listener, null); - }, - _addEventListener$3(receiver, type, listener, options) { - return receiver.addEventListener(type, A.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), options); - }, - _removeEventListener$3(receiver, type, listener, options) { - return receiver.removeEventListener(type, A.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), false); - }, - $isEventTarget: 1 - }; - A.FormElement.prototype = { - get$length(receiver) { - return receiver.length; - } - }; - A.MessageEvent.prototype = {$isMessageEvent: 1}; - A.MouseEvent.prototype = {$isMouseEvent: 1}; - A.Node.prototype = { - toString$0(receiver) { - var value = receiver.nodeValue; - return value == null ? this.super$Interceptor$toString(receiver) : value; - } - }; - A.SelectElement.prototype = { - get$length(receiver) { - return receiver.length; - } - }; - A.UIEvent.prototype = {}; - A.EventStreamProvider.prototype = {}; - A._EventStream.prototype = { - listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError) { - var t1 = A._instanceType(this); - t1._eval$1("~(1)?")._as(onData); - type$.nullable_void_Function._as(onDone); - return A._EventStreamSubscription$(this._target, this._eventType, onData, false, t1._precomputed1); - } - }; - A._ElementEventStreamImpl.prototype = {}; - A._EventStreamSubscription.prototype = { - cancel$0() { - var _this = this; - if (_this._target == null) - return $.$get$nullFuture(); - _this._unlisten$0(); - _this._target = null; - _this.set$_html$_onData(null); - return $.$get$nullFuture(); - }, - onData$1(handleData) { - var t1, _this = this; - _this.$ti._eval$1("~(1)?")._as(handleData); - if (_this._target == null) - throw A.wrapException(A.StateError$("Subscription has been canceled.")); - _this._unlisten$0(); - t1 = A._wrapZone(new A._EventStreamSubscription_onData_closure(handleData), type$.Event); - _this.set$_html$_onData(t1); - _this._tryResume$0(); - }, - _tryResume$0() { - var t2, - t1 = this._html$_onData; - if (t1 != null && true) { - t2 = this._target; - t2.toString; - J.addEventListener$3$x(t2, this._eventType, t1, false); - } - }, - _unlisten$0() { - var t2, - t1 = this._html$_onData; - if (t1 != null) { - t2 = this._target; - t2.toString; - J._removeEventListener$3$x(t2, this._eventType, type$.nullable_dynamic_Function_Event._as(t1), false); - } - }, - set$_html$_onData(_onData) { - this._html$_onData = type$.nullable_dynamic_Function_Event._as(_onData); - }, - $isStreamSubscription: 1 - }; - A._EventStreamSubscription_closure.prototype = { - call$1(e) { - return this.onData.call$1(type$.Event._as(e)); - }, - $signature: 1 - }; - A._EventStreamSubscription_onData_closure.prototype = { - call$1(e) { - return this.handleData.call$1(type$.Event._as(e)); - }, - $signature: 1 - }; - A._AcceptStructuredClone.prototype = { - findSlot$1(value) { - var i, - t1 = this.values, - $length = t1.length; - for (i = 0; i < $length; ++i) - if (t1[i] === value) - return i; - B.JSArray_methods.add$1(t1, value); - B.JSArray_methods.add$1(this.copies, null); - return $length; - }, - walk$1(e) { - var t1, t2, proto, slot, copy, map, t3, $length, t4, i, _this = this; - if (e == null) - return e; - if (A._isBool(e)) - return e; - if (typeof e == "number") - return e; - if (typeof e == "string") - return e; - t1 = e instanceof Date; - t1.toString; - if (t1) { - t1 = e.getTime(); - t1.toString; - if (Math.abs(t1) <= 864e13) - t2 = false; - else - t2 = true; - if (t2) - A.throwExpression(A.ArgumentError$("DateTime is outside valid range: " + t1, null)); - A.checkNotNullable(true, "isUtc", type$.bool); - return new A.DateTime(t1, true); - } - t1 = e instanceof RegExp; - t1.toString; - if (t1) - throw A.wrapException(A.UnimplementedError$("structured clone of RegExp")); - t1 = typeof Promise != "undefined" && e instanceof Promise; - t1.toString; - if (t1) - return A.promiseToFuture(e, type$.dynamic); - proto = Object.getPrototypeOf(e); - t1 = proto === Object.prototype; - t1.toString; - if (!t1) { - t1 = proto === null; - t1.toString; - } else - t1 = true; - if (t1) { - slot = _this.findSlot$1(e); - t1 = _this.copies; - if (!(slot < t1.length)) - return A.ioore(t1, slot); - copy = t1[slot]; - if (copy != null) - return copy; - t2 = type$.dynamic; - map = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); - B.JSArray_methods.$indexSet(t1, slot, map); - _this.forEachJsField$2(e, new A._AcceptStructuredClone_walk_closure(_this, map)); - return map; - } - t1 = e instanceof Array; - t1.toString; - if (t1) { - t1 = e; - t1.toString; - slot = _this.findSlot$1(t1); - t2 = _this.copies; - if (!(slot < t2.length)) - return A.ioore(t2, slot); - copy = t2[slot]; - if (copy != null) - return copy; - t3 = J.getInterceptor$asx(t1); - $length = t3.get$length(t1); - if (_this.mustCopy) { - t4 = new Array($length); - t4.toString; - copy = t4; - } else - copy = t1; - B.JSArray_methods.$indexSet(t2, slot, copy); - for (t2 = J.getInterceptor$ax(copy), i = 0; i < $length; ++i) - t2.$indexSet(copy, i, _this.walk$1(t3.$index(t1, i))); - return copy; - } - return e; - }, - convertNativeToDart_AcceptStructuredClone$2$mustCopy(object, mustCopy) { - this.mustCopy = true; - return this.walk$1(object); - } - }; - A._AcceptStructuredClone_walk_closure.prototype = { - call$2(key, value) { - var t1 = this.$this.walk$1(value); - this.map.$indexSet(0, key, t1); - return t1; - }, - $signature: 18 - }; - A._convertDartToNative_Value_closure.prototype = { - call$1(element) { - this.array.push(A._convertDartToNative_Value(element)); - }, - $signature: 2 - }; - A.convertDartToNative_Dictionary_closure.prototype = { - call$2(key, value) { - this.object[key] = A._convertDartToNative_Value(value); - }, - $signature: 19 - }; - A._AcceptStructuredCloneDart2Js.prototype = { - forEachJsField$2(object, action) { - var t1, t2, _i, key; - type$.dynamic_Function_dynamic_dynamic._as(action); - for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - key = t1[_i]; - action.call$2(key, object[key]); - } - } - }; A.promiseToFuture_closure.prototype = { call$1(r) { - return this.completer.complete$1(0, this.T._eval$1("0/?")._as(r)); + return this.completer.complete$1(this.T._eval$1("0/?")._as(r)); }, - $signature: 2 + $signature: 3 }; A.promiseToFuture_closure0.prototype = { call$1(e) { @@ -7586,7 +7797,63 @@ return this.completer.completeError$1(new A.NullRejectionException(e === undefined)); return this.completer.completeError$1(e); }, - $signature: 2 + $signature: 3 + }; + A.dartify_convert.prototype = { + call$1(o) { + var t1, millisSinceEpoch, proto, t2, dartObject, originalKeys, dartKeys, i, jsKey, dartKey, l, $length; + if (A._noDartifyRequired(o)) + return o; + t1 = this._convertedObjects; + o.toString; + if (t1.containsKey$1(o)) + return t1.$index(0, o); + if (o instanceof Date) { + millisSinceEpoch = o.getTime(); + if (Math.abs(millisSinceEpoch) <= 864e13) + t1 = false; + else + t1 = true; + if (t1) + A.throwExpression(A.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch, null)); + A.checkNotNullable(true, "isUtc", type$.bool); + return new A.DateTime(millisSinceEpoch, true); + } + if (o instanceof RegExp) + throw A.wrapException(A.ArgumentError$("structured clone of RegExp", null)); + if (typeof Promise != "undefined" && o instanceof Promise) + return A.promiseToFuture(o, type$.nullable_Object); + proto = Object.getPrototypeOf(o); + if (proto === Object.prototype || proto === null) { + t2 = type$.nullable_Object; + dartObject = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + t1.$indexSet(0, o, dartObject); + originalKeys = Object.keys(o); + dartKeys = []; + for (t1 = J.getInterceptor$ax(originalKeys), t2 = t1.get$iterator(originalKeys); t2.moveNext$0();) + dartKeys.push(A.dartify(t2.get$current())); + for (i = 0; i < t1.get$length(originalKeys); ++i) { + jsKey = t1.$index(originalKeys, i); + if (!(i < dartKeys.length)) + return A.ioore(dartKeys, i); + dartKey = dartKeys[i]; + if (jsKey != null) + dartObject.$indexSet(0, dartKey, this.call$1(o[jsKey])); + } + return dartObject; + } + if (o instanceof Array) { + l = o; + dartObject = []; + t1.$indexSet(0, o, dartObject); + $length = A._asInt(o.length); + for (t1 = J.getInterceptor$asx(l), i = 0; i < $length; ++i) + dartObject.push(this.call$1(t1.$index(l, i))); + return dartObject; + } + return o; + }, + $signature: 20 }; A.NullRejectionException.prototype = { toString$0(_) { @@ -7600,11 +7867,6 @@ return Math.random() * max >>> 0; } }; - A.SvgElement.prototype = { - get$onClick(receiver) { - return new A._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); - } - }; A.AsyncMemoizer.prototype = {}; A.Level.prototype = { $eq(_, other) { @@ -7688,10 +7950,10 @@ $parent._children.$indexSet(0, thisName, t1); return t1; }, - $signature: 20 + $signature: 21 }; A.Pool.prototype = { - request$0(_) { + request$0() { var t1, t2, _this = this; if ((_this._closeMemo._completer.future._state & 30) !== 0) throw A.wrapException(A.StateError$("request() may not be called on a closed Pool.")); @@ -7731,7 +7993,7 @@ if (($async$self._closeMemo._completer.future._state & 30) !== 0) throw A.wrapException(A.StateError$("withResource() may not be called on a closed Pool.")); $async$goto = 3; - return A._asyncAwait($async$self.request$0(0), $async$withResource$1$1); + return A._asyncAwait($async$self.request$0(), $async$withResource$1$1); case 3: // returning from await. resource = $async$result; @@ -7765,11 +8027,11 @@ t1._resetTimer$0(); t2 = t1._requestedResources; if (!t2.get$isEmpty(t2)) - t2.removeFirst$0().complete$1(0, new A.PoolResource(t1)); + t2.removeFirst$0().complete$1(new A.PoolResource(t1)); else { t2 = --t1._allocatedResources; if ((t1._closeMemo._completer.future._state & 30) !== 0 && t2 === 0) - null.close$0(0); + null.close$0(); } // goto the next finally handler $async$goto = $async$next.pop(); @@ -7816,7 +8078,7 @@ A.Pool__runOnRelease_closure.prototype = { call$1(value) { var t1 = this.$this; - J.complete$1$z(t1._onReleaseCompleters.removeFirst$0(), new A.PoolResource(t1)); + t1._onReleaseCompleters.removeFirst$0().complete$1(new A.PoolResource(t1)); }, $signature: 4 }; @@ -7834,18 +8096,19 @@ var t2, _this = this, t1 = serverUrl + "?sseClientId=" + _this._clientId; _this.__SseClient__serverUrl_A = t1; - t1 = A.EventSource__factoryEventSource(t1, A.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic)); + t2 = type$.JavaScriptObject; + t1 = t2._as(new self.EventSource(t1, t2._as({withCredentials: true}))); _this.__SseClient__eventSource_A = t1; - t1 = new A._EventStream(t1, "open", false, type$._EventStream_Event); + t1 = new A._EventStream(t1, "open", false, type$._EventStream_JavaScriptObject); t1.get$first(t1).whenComplete$1(new A.SseClient_closure(_this)); - B.EventSource_methods.addEventListener$2(_this.__SseClient__eventSource_A, "message", _this.get$_onIncomingMessage()); - B.EventSource_methods.addEventListener$2(_this.__SseClient__eventSource_A, "control", _this.get$_onIncomingControlMessage()); - t1 = type$.nullable_void_Function_Event; - t2 = type$.Event; + t1 = type$.Function; + _this.__SseClient__eventSource_A.addEventListener("message", A.allowInterop(_this.get$_onIncomingMessage(), t1)); + _this.__SseClient__eventSource_A.addEventListener("control", A.allowInterop(_this.get$_onIncomingControlMessage(), t1)); + t1 = type$.nullable_void_Function_JavaScriptObject; A._EventStreamSubscription$(_this.__SseClient__eventSource_A, "open", t1._as(new A.SseClient_closure0(_this)), false, t2); A._EventStreamSubscription$(_this.__SseClient__eventSource_A, "error", t1._as(new A.SseClient_closure1(_this)), false, t2); }, - close$0(_) { + close$0() { var _this = this, t1 = _this.__SseClient__eventSource_A; t1 === $ && A.throwLateFieldNI("_eventSource"); @@ -7854,8 +8117,8 @@ t1 = _this._outgoingController; new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$cancelOnError(null, true).asFuture$1$1(null, type$.void); } - _this._incomingController.close$0(0); - _this._outgoingController.close$0(0); + _this._incomingController.close$0(); + _this._outgoingController.close$0(); }, _closeWithError$1(error) { var stackTrace, t2, @@ -7869,23 +8132,23 @@ t1._sendError$2(error, stackTrace); else if ((t2 & 3) === 0) t1._ensurePendingEvents$0().add$1(0, new A._DelayedError(error, stackTrace)); - this.close$0(0); + this.close$0(); t1 = this._onConnected; if ((t1.future._state & 30) === 0) t1.completeError$1(error); }, _onIncomingControlMessage$1(message) { - var data = new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.MessageEvent._as(type$.Event._as(message)).data, true); - if (J.$eq$(data, "close")) - this.close$0(0); + var data = type$.JavaScriptObject._as(message).data; + if (J.$eq$(A.dartify(data), "close")) + this.close$0(); else throw A.wrapException(A.UnsupportedError$("[" + this._clientId + '] Illegal Control Message "' + A.S(data) + '"')); }, _onIncomingMessage$1(message) { - this._incomingController.add$1(0, A._asString(B.C_JsonCodec.decode$2$reviver(0, A._asString(new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.MessageEvent._as(type$.Event._as(message)).data, true)), null))); + this._incomingController.add$1(0, A._asString(B.C_JsonCodec.decode$2$reviver(A._asString(type$.JavaScriptObject._as(message).data), null))); }, _onOutgoingDone$0() { - this.close$0(0); + this.close$0(); }, _onOutgoingMessage$1(message) { return this._onOutgoingMessage$body$SseClient(A._asStringQ(message)); @@ -7918,11 +8181,11 @@ call$0() { var t2, t1 = this.$this; - t1._onConnected.complete$0(0); + t1._onConnected.complete$0(); t2 = t1._outgoingController; new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$2$onDone(t1.get$_onOutgoingMessage(), t1.get$_onOutgoingDone()); }, - $signature: 3 + $signature: 2 }; A.SseClient_closure0.prototype = { call$1(_) { @@ -7982,8 +8245,13 @@ t2 = t1.__SseClient__serverUrl_A; t2 === $ && A.throwLateFieldNI("_serverUrl"); url = t2 + "&messageId=" + ++t1._lastMessageId; + t1 = $async$self._box_0.encodedMessage; + if (t1 == null) + t1 = null; + t2 = type$.JavaScriptObject; + t1 = t2._as({method: "POST", body: t1, credentials: "include"}); $async$goto = 6; - return A._asyncAwait(A.promiseToFuture(self.fetch(url, {method: "POST", credentials: "include", body: $async$self._box_0.encodedMessage}), type$.dynamic), $async$call$0); + return A._asyncAwait(A.promiseToFuture(type$.JSObject._as(t2._as(self.window).fetch(url, t1)), type$.nullable_Object), $async$call$0); case 6: // returning from await. $async$handler = 1; @@ -8020,12 +8288,11 @@ }, $signature: 7 }; - A._FetchOptions.prototype = {}; A.generateUuidV4_generateBits.prototype = { call$1(bitCount) { return this.random.nextInt$1(B.JSInt_methods._shlPositive$1(1, bitCount)); }, - $signature: 22 + $signature: 23 }; A.generateUuidV4_printDigits.prototype = { call$2(value, count) { @@ -8040,12 +8307,66 @@ $signature: 11 }; A.StreamChannelMixin.prototype = {}; + A.EventStreamProvider.prototype = {}; + A._EventStream.prototype = { + listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError) { + var t1 = A._instanceType(this); + t1._eval$1("~(1)?")._as(onData); + type$.nullable_void_Function._as(onDone); + return A._EventStreamSubscription$(this._target, this._eventType, onData, false, t1._precomputed1); + } + }; + A._ElementEventStreamImpl.prototype = {}; + A._EventStreamSubscription.prototype = { + cancel$0() { + var _this = this, + emptyFuture = A.Future_Future$value(null, type$.void); + if (_this._target == null) + return emptyFuture; + _this._unlisten$0(); + _this._streams$_onData = _this._target = null; + return emptyFuture; + }, + onData$1(handleData) { + var t1, _this = this; + _this.$ti._eval$1("~(1)?")._as(handleData); + if (_this._target == null) + throw A.wrapException(A.StateError$("Subscription has been canceled.")); + _this._unlisten$0(); + t1 = A._wrapZone(new A._EventStreamSubscription_onData_closure(handleData), type$.JavaScriptObject); + t1 = t1 == null ? null : A.allowInterop(t1, type$.Function); + _this._streams$_onData = t1; + _this._tryResume$0(); + }, + _tryResume$0() { + var t1 = this._streams$_onData; + if (t1 != null && true) + this._target.addEventListener(this._eventType, t1, false); + }, + _unlisten$0() { + var t1 = this._streams$_onData; + if (t1 != null) + this._target.removeEventListener(this._eventType, t1, false); + }, + $isStreamSubscription: 1 + }; + A._EventStreamSubscription_closure.prototype = { + call$1(e) { + return this.onData.call$1(type$.JavaScriptObject._as(e)); + }, + $signature: 1 + }; + A._EventStreamSubscription_onData_closure.prototype = { + call$1(e) { + return this.handleData.call$1(type$.JavaScriptObject._as(e)); + }, + $signature: 1 + }; A.main_closure.prototype = { call$1(_) { - type$.MouseEvent._as(_); - this.channel._outgoingController.close$0(0); + this.channel._outgoingController.close$0(); }, - $signature: 23 + $signature: 1 }; A.main_closure0.prototype = { call$1(s) { @@ -8080,9 +8401,7 @@ $signature: 24 }; (function aliases() { - var _ = J.Interceptor.prototype; - _.super$Interceptor$toString = _.toString$0; - _ = J.LegacyJavaScriptObject.prototype; + var _ = J.LegacyJavaScriptObject.prototype; _.super$LegacyJavaScriptObject$toString = _.toString$0; })(); (function installTearOffs() { @@ -8096,7 +8415,7 @@ _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6); _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6); _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); - _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 2); + _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 3); _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 9); _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 9); @@ -8105,28 +8424,32 @@ _instance_1_u(_ = A.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 1); _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 1); _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0); - _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 21); + _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 22); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(A.Object, null); - _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, J.ArrayIterator, A.Error, A.Closure, A.Iterable, A.ListIterator, A.FixedLengthListMixin, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.MapBase, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.StringMatch, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._StreamIterator, A._Zone, A.ListBase, A._ListQueueIterator, A.Codec, A.Converter, A._JsonStringifier, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.Null, A._StringStackTrace, A.StringBuffer, A.EventStreamProvider, A._EventStreamSubscription, A._AcceptStructuredClone, A.NullRejectionException, A._JSRandom, A.AsyncMemoizer, A.Level, A.LogRecord, A.Logger, A.Pool, A.PoolResource, A.StreamChannelMixin]); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, J.ArrayIterator, A.Error, A.Closure, A.Iterable, A.ListIterator, A.FixedLengthListMixin, A.Symbol, A.MapView, A.ConstantMap, A.JSInvocationMirror, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A._Required, A.MapBase, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.StringMatch, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._StreamIterator, A._Zone, A._HashMapKeyIterator, A.ListBase, A._UnmodifiableMapMixin, A._ListQueueIterator, A.Codec, A.Converter, A._JsonStringifier, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.Null, A._StringStackTrace, A.StringBuffer, A.NullRejectionException, A._JSRandom, A.AsyncMemoizer, A.Level, A.LogRecord, A.Logger, A.Pool, A.PoolResource, A.StreamChannelMixin, A.EventStreamProvider, A._EventStreamSubscription]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]); - _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData, A.EventTarget, A.DomException, A.Event]); - _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction, A._FetchOptions]); + _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]); + _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); _inherit(J.JSUnmodifiableArray, J.JSArray); _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); - _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A._CyclicInitializationError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError]); - _inheritMany(A.Closure, [A.Closure0Args, A.Closure2Args, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__chainForeignFuture_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A.Stream_length_closure, A.Stream_first_closure0, A._RootZone_bindUnaryCallbackGuarded_closure, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A._convertDartToNative_Value_closure, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.Pool__runOnRelease_closure, A.SseClient_closure0, A.SseClient_closure1, A.generateUuidV4_generateBits, A.main_closure, A.main_closure0]); + _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A._CyclicInitializationError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.NoSuchMethodError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError]); + _inheritMany(A.Closure, [A.Closure0Args, A.Closure2Args, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__chainForeignFuture_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A.Stream_length_closure, A.Stream_first_closure0, A._RootZone_bindUnaryCallbackGuarded_closure, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.dartify_convert, A.Pool__runOnRelease_closure, A.SseClient_closure0, A.SseClient_closure1, A.generateUuidV4_generateBits, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A.main_closure, A.main_closure0]); _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainForeignFuture_closure1, A._Future__chainCoreFutureAsync_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteError_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A.Stream_length_closure0, A.Stream_first_closure, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._cancelAndValue_closure, A._rootHandleError_closure, A._RootZone_bindCallbackGuarded_closure, A.Logger_Logger_closure, A.SseClient_closure, A.SseClient__closure, A.SseClient__onOutgoingMessage_closure]); _inherit(A.EfficientLengthIterable, A.Iterable); - _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.LinkedHashMapKeyIterable]); + _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.LinkedHashMapKeyIterable, A._HashMapKeyIterable]); + _inherit(A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A.MapView); + _inherit(A.UnmodifiableMapView, A._UnmodifiableMapView_MapView__UnmodifiableMapMixin); + _inherit(A.ConstantMapView, A.UnmodifiableMapView); + _inherit(A.ConstantStringMap, A.ConstantMap); + _inheritMany(A.Closure2Args, [A.Primitives_functionNoSuchMethod_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__chainForeignFuture_closure0, A._BufferingStreamSubscription_asFuture_closure0, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A.NoSuchMethodError_toString_closure, A.Pool__runOnRelease_closure0, A.generateUuidV4_printDigits, A.generateUuidV4_bitsDigits]); _inherit(A.NullError, A.TypeError); _inheritMany(A.TearOffClosure, [A.StaticClosure, A.BoundClosure]); - _inheritMany(A.MapBase, [A.JsLinkedHashMap, A._JsonMap]); - _inheritMany(A.Closure2Args, [A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__chainForeignFuture_closure0, A._BufferingStreamSubscription_asFuture_closure0, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A._AcceptStructuredClone_walk_closure, A.convertDartToNative_Dictionary_closure, A.Pool__runOnRelease_closure0, A.generateUuidV4_printDigits, A.generateUuidV4_bitsDigits]); + _inheritMany(A.MapBase, [A.JsLinkedHashMap, A._HashMap, A._JsonMap]); _inheritMany(A.NativeTypedData, [A.NativeByteData, A.NativeTypedArray]); _inheritMany(A.NativeTypedArray, [A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); _inherit(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); @@ -8143,37 +8466,32 @@ _inherit(A._ControllerSubscription, A._BufferingStreamSubscription); _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]); _inherit(A._RootZone, A._Zone); + _inherit(A._IdentityHashMap, A._HashMap); _inheritMany(A.ListIterable, [A.ListQueue, A._JsonMapKeyIterable]); _inherit(A.JsonCyclicError, A.JsonUnsupportedObjectError); _inherit(A.JsonCodec, A.Codec); _inheritMany(A.Converter, [A.JsonEncoder, A.JsonDecoder]); _inherit(A._JsonStringStringifier, A._JsonStringifier); _inheritMany(A.ArgumentError, [A.RangeError, A.IndexError]); - _inheritMany(A.EventTarget, [A.Node, A.EventSource]); - _inherit(A.Element, A.Node); - _inheritMany(A.Element, [A.HtmlElement, A.SvgElement]); - _inheritMany(A.HtmlElement, [A.AnchorElement, A.AreaElement, A.FormElement, A.SelectElement]); - _inheritMany(A.Event, [A.MessageEvent, A.UIEvent]); - _inherit(A.MouseEvent, A.UIEvent); - _inherit(A._ElementEventStreamImpl, A._EventStream); - _inherit(A._AcceptStructuredCloneDart2Js, A._AcceptStructuredClone); _inherit(A.SseClient, A.StreamChannelMixin); + _inherit(A._ElementEventStreamImpl, A._EventStream); _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListBase); _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListBase); _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); _mixin(A._AsyncStreamController, A._AsyncStreamControllerDispatch); + _mixin(A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A._UnmodifiableMapMixin); })(); var init = { typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, - mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, + mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List", Object: "Object", Map: "Map"}, mangledNames: {}, - types: ["~()", "~(Event)", "~(@)", "Null()", "Null(@)", "Null(Object,StackTrace)", "~(~())", "Future()", "@(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int,int)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "_Future<@>(@)", "@(@,@)", "~(@,@)", "Logger()", "~(String?)", "int(int)", "~(MouseEvent)", "~(String)"], + types: ["~()", "~(JavaScriptObject)", "Null()", "~(@)", "Null(@)", "Null(Object,StackTrace)", "~(~())", "Future()", "@(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int,int)", "~(String,@)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "_Future<@>(@)", "~(Symbol0,@)", "Object?(Object?)", "Logger()", "~(String?)", "int(int)", "~(String)"], interceptorsByTag: null, leafTags: null, arrayRti: Symbol("$ti") }; - A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","_FetchOptions":"LegacyJavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","MathMLElement":"Element","HtmlDocument":"Node","Document":"Node","JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Pattern":[],"TrustedGetRuntimeType":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"_CyclicInitializationError":{"Error":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeByteBuffer":{"TrustedGetRuntimeType":[]},"NativeByteData":{"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeFloat64List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeInt16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8ClampedList":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"Iterable":["1"],"ListIterable.E":"1"},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"MouseEvent":{"Event":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"MessageEvent":{"Event":[]},"Node":{"EventTarget":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]},"Int8List":{"List":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"Iterable":["double"]}}')); + A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","JavaScriptObject":{"JSObject":[]},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"JavaScriptObject":[],"JSObject":[]},"JSArray":{"List":["1"],"JavaScriptObject":[],"JSObject":[],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JavaScriptObject":[],"JSObject":[],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Pattern":[],"TrustedGetRuntimeType":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"JSInvocationMirror":{"Invocation":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"_CyclicInitializationError":{"Error":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeByteBuffer":{"JavaScriptObject":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JavaScriptObject":[],"JSObject":[]},"NativeByteData":{"JavaScriptObject":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JavaScriptObject":[],"JSObject":[]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeFloat64List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeInt16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8ClampedList":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_HashMap":{"MapBase":["1","2"],"Map":["1","2"]},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"Iterable":["1"],"ListIterable.E":"1"},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"Int8List":{"List":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"Iterable":["double"]}}')); A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"_DelayedEvent":1,"StreamChannelMixin":1}')); var string$ = { Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type" @@ -8183,38 +8501,42 @@ return { $env_1_1_void: findType("@<~>"), AsyncError: findType("AsyncError"), + ConstantMapView_Symbol_dynamic: findType("ConstantMapView"), Error: findType("Error"), - Event: findType("Event"), Function: findType("Function"), Future_dynamic: findType("Future<@>"), + Invocation: findType("Invocation"), Iterable_dynamic: findType("Iterable<@>"), JSArray_String: findType("JSArray"), JSArray_dynamic: findType("JSArray<@>"), JSNull: findType("JSNull"), + JSObject: findType("JSObject"), JavaScriptFunction: findType("JavaScriptFunction"), JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), + JavaScriptObject: findType("JavaScriptObject"), + JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), List_dynamic: findType("List<@>"), Logger: findType("Logger"), Map_dynamic_dynamic: findType("Map<@,@>"), - MessageEvent: findType("MessageEvent"), - MouseEvent: findType("MouseEvent"), Null: findType("Null"), Object: findType("Object"), PoolResource: findType("PoolResource"), Record: findType("Record"), StackTrace: findType("StackTrace"), String: findType("String"), + Symbol: findType("Symbol0"), TrustedGetRuntimeType: findType("TrustedGetRuntimeType"), TypeError: findType("TypeError"), UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), _AsyncCompleter_PoolResource: findType("_AsyncCompleter"), _AsyncCompleter_void: findType("_AsyncCompleter<~>"), - _ElementEventStreamImpl_MouseEvent: findType("_ElementEventStreamImpl"), - _EventStream_Event: findType("_EventStream"), + _ElementEventStreamImpl_JavaScriptObject: findType("_ElementEventStreamImpl"), + _EventStream_JavaScriptObject: findType("_EventStream"), _Future_PoolResource: findType("_Future"), _Future_dynamic: findType("_Future<@>"), _Future_int: findType("_Future"), _Future_void: findType("_Future<~>"), + _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType("_IdentityHashMap"), _StreamControllerAddStreamState_nullable_Object: findType("_StreamControllerAddStreamState"), _SyncCompleter_PoolResource: findType("_SyncCompleter"), bool: findType("bool"), @@ -8224,19 +8546,18 @@ dynamic_Function: findType("@()"), dynamic_Function_Object: findType("@(Object)"), dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"), - dynamic_Function_dynamic_dynamic: findType("@(@,@)"), int: findType("int"), legacy_Never: findType("0&*"), legacy_Object: findType("Object*"), nullable_Future_Null: findType("Future?"), + nullable_JavaScriptObject: findType("JavaScriptObject?"), nullable_List_dynamic: findType("List<@>?"), nullable_Object: findType("Object?"), nullable_StackTrace: findType("StackTrace?"), nullable__DelayedEvent_dynamic: findType("_DelayedEvent<@>?"), nullable__FutureListener_dynamic_dynamic: findType("_FutureListener<@,@>?"), - nullable_dynamic_Function_Event: findType("@(Event)?"), nullable_void_Function: findType("~()?"), - nullable_void_Function_Event: findType("~(Event)?"), + nullable_void_Function_JavaScriptObject: findType("~(JavaScriptObject)?"), num: findType("num"), void: findType("~"), void_Function: findType("~()"), @@ -8246,7 +8567,7 @@ }; })(); (function constants() { - B.EventSource_methods = A.EventSource.prototype; + var makeConstList = hunkHelpers.makeConstList; B.Interceptor_methods = J.Interceptor.prototype; B.JSArray_methods = J.JSArray.prototype; B.JSInt_methods = J.JSInt.prototype; @@ -8274,7 +8595,7 @@ } } function getUnknownTagGenericBrowser(object, tag) { - if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement"; + if (object instanceof HTMLElement) return "HTMLElement"; return getUnknownTag(object, tag); } function prototypeForTag(tag) { @@ -8285,7 +8606,7 @@ return constructor.prototype; } function discriminator(tag) { return null; } - var isBrowser = typeof navigator == "object"; + var isBrowser = typeof HTMLElement == "function"; return { getTag: getTag, getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, @@ -8295,9 +8616,10 @@ B.C_JS_CONST6 = function(getTagFallback) { return function(hooks) { if (typeof navigator != "object") return hooks; - var ua = navigator.userAgent; - if (ua.indexOf("DumpRenderTree") >= 0) return hooks; - if (ua.indexOf("Chrome") >= 0) { + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; + if (userAgent.indexOf("DumpRenderTree") >= 0) return hooks; + if (userAgent.indexOf("Chrome") >= 0) { function confirm(p) { return typeof window == "object" && window[p] && window[p].name == p; } @@ -8309,27 +8631,11 @@ B.C_JS_CONST1 = function(hooks) { if (typeof dartExperimentalFixupGetTag != "function") return hooks; hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); -}; - B.C_JS_CONST2 = function(hooks) { - var getTag = hooks.getTag; - var prototypeForTag = hooks.prototypeForTag; - function getTagFixed(o) { - var tag = getTag(o); - if (tag == "Document") { - if (!!o.xmlVersion) return "!Document"; - return "!HTMLDocument"; - } - return tag; - } - function prototypeForTagFixed(tag) { - if (tag == "Document") return null; - return prototypeForTag(tag); - } - hooks.getTag = getTagFixed; - hooks.prototypeForTag = prototypeForTagFixed; }; B.C_JS_CONST5 = function(hooks) { - var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (typeof navigator != "object") return hooks; + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; if (userAgent.indexOf("Firefox") == -1) return hooks; var getTag = hooks.getTag; var quickMap = { @@ -8346,7 +8652,9 @@ hooks.getTag = getTagFirefox; }; B.C_JS_CONST4 = function(hooks) { - var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (typeof navigator != "object") return hooks; + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; if (userAgent.indexOf("Trident/") == -1) return hooks; var getTag = hooks.getTag; var quickMap = { @@ -8373,6 +8681,24 @@ } hooks.getTag = getTagIE; hooks.prototypeForTag = prototypeForTagIE; +}; + B.C_JS_CONST2 = function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; }; B.C_JS_CONST3 = function(hooks) { return hooks; } ; @@ -8380,6 +8706,7 @@ B.C_OutOfMemoryError = new A.OutOfMemoryError(); B.C__DelayedDone = new A._DelayedDone(); B.C__JSRandom = new A._JSRandom(); + B.C__Required = new A._Required(); B.C__RootZone = new A._RootZone(); B.Duration_0 = new A.Duration(0); B.Duration_5000000 = new A.Duration(5000000); @@ -8388,6 +8715,10 @@ B.Level_INFO_800 = new A.Level("INFO", 800); B.Level_SEVERE_1000 = new A.Level("SEVERE", 1000); B.Level_WARNING_900 = new A.Level("WARNING", 900); + B.List_empty = A._setArrayType(makeConstList([]), type$.JSArray_dynamic); + B.Object_empty = {}; + B.Map_empty = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Symbol_call = new A.Symbol("call"); B.Type_ByteBuffer_RkP = A.typeLiteral("ByteBuffer"); B.Type_ByteData_zNC = A.typeLiteral("ByteData"); B.Type_Float32List_LB7 = A.typeLiteral("Float32List"); @@ -8505,8 +8836,8 @@ } init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); }(); - hunkHelpers.setOrUpdateInterceptorsByTag({Blob: J.JavaScriptObject, DOMError: J.JavaScriptObject, File: J.JavaScriptObject, MediaError: J.JavaScriptObject, NavigatorUserMediaError: J.JavaScriptObject, OverconstrainedError: J.JavaScriptObject, PositionError: J.JavaScriptObject, GeolocationPositionError: J.JavaScriptObject, ArrayBuffer: A.NativeByteBuffer, ArrayBufferView: A.NativeTypedData, DataView: A.NativeByteData, Float32Array: A.NativeFloat32List, Float64Array: A.NativeFloat64List, Int16Array: A.NativeInt16List, Int32Array: A.NativeInt32List, Int8Array: A.NativeInt8List, Uint16Array: A.NativeUint16List, Uint32Array: A.NativeUint32List, Uint8ClampedArray: A.NativeUint8ClampedList, CanvasPixelArray: A.NativeUint8ClampedList, Uint8Array: A.NativeUint8List, HTMLAudioElement: A.HtmlElement, HTMLBRElement: A.HtmlElement, HTMLBaseElement: A.HtmlElement, HTMLBodyElement: A.HtmlElement, HTMLButtonElement: A.HtmlElement, HTMLCanvasElement: A.HtmlElement, HTMLContentElement: A.HtmlElement, HTMLDListElement: A.HtmlElement, HTMLDataElement: A.HtmlElement, HTMLDataListElement: A.HtmlElement, HTMLDetailsElement: A.HtmlElement, HTMLDialogElement: A.HtmlElement, HTMLDivElement: A.HtmlElement, HTMLEmbedElement: A.HtmlElement, HTMLFieldSetElement: A.HtmlElement, HTMLHRElement: A.HtmlElement, HTMLHeadElement: A.HtmlElement, HTMLHeadingElement: A.HtmlElement, HTMLHtmlElement: A.HtmlElement, HTMLIFrameElement: A.HtmlElement, HTMLImageElement: A.HtmlElement, HTMLInputElement: A.HtmlElement, HTMLLIElement: A.HtmlElement, HTMLLabelElement: A.HtmlElement, HTMLLegendElement: A.HtmlElement, HTMLLinkElement: A.HtmlElement, HTMLMapElement: A.HtmlElement, HTMLMediaElement: A.HtmlElement, HTMLMenuElement: A.HtmlElement, HTMLMetaElement: A.HtmlElement, HTMLMeterElement: A.HtmlElement, HTMLModElement: A.HtmlElement, HTMLOListElement: A.HtmlElement, HTMLObjectElement: A.HtmlElement, HTMLOptGroupElement: A.HtmlElement, HTMLOptionElement: A.HtmlElement, HTMLOutputElement: A.HtmlElement, HTMLParagraphElement: A.HtmlElement, HTMLParamElement: A.HtmlElement, HTMLPictureElement: A.HtmlElement, HTMLPreElement: A.HtmlElement, HTMLProgressElement: A.HtmlElement, HTMLQuoteElement: A.HtmlElement, HTMLScriptElement: A.HtmlElement, HTMLShadowElement: A.HtmlElement, HTMLSlotElement: A.HtmlElement, HTMLSourceElement: A.HtmlElement, HTMLSpanElement: A.HtmlElement, HTMLStyleElement: A.HtmlElement, HTMLTableCaptionElement: A.HtmlElement, HTMLTableCellElement: A.HtmlElement, HTMLTableDataCellElement: A.HtmlElement, HTMLTableHeaderCellElement: A.HtmlElement, HTMLTableColElement: A.HtmlElement, HTMLTableElement: A.HtmlElement, HTMLTableRowElement: A.HtmlElement, HTMLTableSectionElement: A.HtmlElement, HTMLTemplateElement: A.HtmlElement, HTMLTextAreaElement: A.HtmlElement, HTMLTimeElement: A.HtmlElement, HTMLTitleElement: A.HtmlElement, HTMLTrackElement: A.HtmlElement, HTMLUListElement: A.HtmlElement, HTMLUnknownElement: A.HtmlElement, HTMLVideoElement: A.HtmlElement, HTMLDirectoryElement: A.HtmlElement, HTMLFontElement: A.HtmlElement, HTMLFrameElement: A.HtmlElement, HTMLFrameSetElement: A.HtmlElement, HTMLMarqueeElement: A.HtmlElement, HTMLElement: A.HtmlElement, HTMLAnchorElement: A.AnchorElement, HTMLAreaElement: A.AreaElement, DOMException: A.DomException, MathMLElement: A.Element, Element: A.Element, AbortPaymentEvent: A.Event, AnimationEvent: A.Event, AnimationPlaybackEvent: A.Event, ApplicationCacheErrorEvent: A.Event, BackgroundFetchClickEvent: A.Event, BackgroundFetchEvent: A.Event, BackgroundFetchFailEvent: A.Event, BackgroundFetchedEvent: A.Event, BeforeInstallPromptEvent: A.Event, BeforeUnloadEvent: A.Event, BlobEvent: A.Event, CanMakePaymentEvent: A.Event, ClipboardEvent: A.Event, CloseEvent: A.Event, CustomEvent: A.Event, DeviceMotionEvent: A.Event, DeviceOrientationEvent: A.Event, ErrorEvent: A.Event, ExtendableEvent: A.Event, ExtendableMessageEvent: A.Event, FetchEvent: A.Event, FontFaceSetLoadEvent: A.Event, ForeignFetchEvent: A.Event, GamepadEvent: A.Event, HashChangeEvent: A.Event, InstallEvent: A.Event, MediaEncryptedEvent: A.Event, MediaKeyMessageEvent: A.Event, MediaQueryListEvent: A.Event, MediaStreamEvent: A.Event, MediaStreamTrackEvent: A.Event, MIDIConnectionEvent: A.Event, MIDIMessageEvent: A.Event, MutationEvent: A.Event, NotificationEvent: A.Event, PageTransitionEvent: A.Event, PaymentRequestEvent: A.Event, PaymentRequestUpdateEvent: A.Event, PopStateEvent: A.Event, PresentationConnectionAvailableEvent: A.Event, PresentationConnectionCloseEvent: A.Event, ProgressEvent: A.Event, PromiseRejectionEvent: A.Event, PushEvent: A.Event, RTCDataChannelEvent: A.Event, RTCDTMFToneChangeEvent: A.Event, RTCPeerConnectionIceEvent: A.Event, RTCTrackEvent: A.Event, SecurityPolicyViolationEvent: A.Event, SensorErrorEvent: A.Event, SpeechRecognitionError: A.Event, SpeechRecognitionEvent: A.Event, SpeechSynthesisEvent: A.Event, StorageEvent: A.Event, SyncEvent: A.Event, TrackEvent: A.Event, TransitionEvent: A.Event, WebKitTransitionEvent: A.Event, VRDeviceEvent: A.Event, VRDisplayEvent: A.Event, VRSessionEvent: A.Event, MojoInterfaceRequestEvent: A.Event, ResourceProgressEvent: A.Event, USBConnectionEvent: A.Event, IDBVersionChangeEvent: A.Event, AudioProcessingEvent: A.Event, OfflineAudioCompletionEvent: A.Event, WebGLContextEvent: A.Event, Event: A.Event, InputEvent: A.Event, SubmitEvent: A.Event, EventSource: A.EventSource, MessagePort: A.EventTarget, EventTarget: A.EventTarget, HTMLFormElement: A.FormElement, MessageEvent: A.MessageEvent, MouseEvent: A.MouseEvent, DragEvent: A.MouseEvent, PointerEvent: A.MouseEvent, WheelEvent: A.MouseEvent, Document: A.Node, HTMLDocument: A.Node, Node: A.Node, HTMLSelectElement: A.SelectElement, CompositionEvent: A.UIEvent, FocusEvent: A.UIEvent, KeyboardEvent: A.UIEvent, TextEvent: A.UIEvent, TouchEvent: A.UIEvent, UIEvent: A.UIEvent, SVGAElement: A.SvgElement, SVGAnimateElement: A.SvgElement, SVGAnimateMotionElement: A.SvgElement, SVGAnimateTransformElement: A.SvgElement, SVGAnimationElement: A.SvgElement, SVGCircleElement: A.SvgElement, SVGClipPathElement: A.SvgElement, SVGDefsElement: A.SvgElement, SVGDescElement: A.SvgElement, SVGDiscardElement: A.SvgElement, SVGEllipseElement: A.SvgElement, SVGFEBlendElement: A.SvgElement, SVGFEColorMatrixElement: A.SvgElement, SVGFEComponentTransferElement: A.SvgElement, SVGFECompositeElement: A.SvgElement, SVGFEConvolveMatrixElement: A.SvgElement, SVGFEDiffuseLightingElement: A.SvgElement, SVGFEDisplacementMapElement: A.SvgElement, SVGFEDistantLightElement: A.SvgElement, SVGFEFloodElement: A.SvgElement, SVGFEFuncAElement: A.SvgElement, SVGFEFuncBElement: A.SvgElement, SVGFEFuncGElement: A.SvgElement, SVGFEFuncRElement: A.SvgElement, SVGFEGaussianBlurElement: A.SvgElement, SVGFEImageElement: A.SvgElement, SVGFEMergeElement: A.SvgElement, SVGFEMergeNodeElement: A.SvgElement, SVGFEMorphologyElement: A.SvgElement, SVGFEOffsetElement: A.SvgElement, SVGFEPointLightElement: A.SvgElement, SVGFESpecularLightingElement: A.SvgElement, SVGFESpotLightElement: A.SvgElement, SVGFETileElement: A.SvgElement, SVGFETurbulenceElement: A.SvgElement, SVGFilterElement: A.SvgElement, SVGForeignObjectElement: A.SvgElement, SVGGElement: A.SvgElement, SVGGeometryElement: A.SvgElement, SVGGraphicsElement: A.SvgElement, SVGImageElement: A.SvgElement, SVGLineElement: A.SvgElement, SVGLinearGradientElement: A.SvgElement, SVGMarkerElement: A.SvgElement, SVGMaskElement: A.SvgElement, SVGMetadataElement: A.SvgElement, SVGPathElement: A.SvgElement, SVGPatternElement: A.SvgElement, SVGPolygonElement: A.SvgElement, SVGPolylineElement: A.SvgElement, SVGRadialGradientElement: A.SvgElement, SVGRectElement: A.SvgElement, SVGScriptElement: A.SvgElement, SVGSetElement: A.SvgElement, SVGStopElement: A.SvgElement, SVGStyleElement: A.SvgElement, SVGElement: A.SvgElement, SVGSVGElement: A.SvgElement, SVGSwitchElement: A.SvgElement, SVGSymbolElement: A.SvgElement, SVGTSpanElement: A.SvgElement, SVGTextContentElement: A.SvgElement, SVGTextElement: A.SvgElement, SVGTextPathElement: A.SvgElement, SVGTextPositioningElement: A.SvgElement, SVGTitleElement: A.SvgElement, SVGUseElement: A.SvgElement, SVGViewElement: A.SvgElement, SVGGradientElement: A.SvgElement, SVGComponentTransferFunctionElement: A.SvgElement, SVGFEDropShadowElement: A.SvgElement, SVGMPathElement: A.SvgElement}); - hunkHelpers.setOrUpdateLeafTags({Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, GeolocationPositionError: true, ArrayBuffer: true, ArrayBufferView: false, DataView: true, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLIFrameElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, DOMException: true, MathMLElement: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, ProgressEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, ResourceProgressEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, SubmitEvent: false, EventSource: true, MessagePort: true, EventTarget: false, HTMLFormElement: true, MessageEvent: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, HTMLDocument: true, Node: false, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true}); + hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: A.NativeByteBuffer, ArrayBufferView: A.NativeTypedData, DataView: A.NativeByteData, Float32Array: A.NativeFloat32List, Float64Array: A.NativeFloat64List, Int16Array: A.NativeInt16List, Int32Array: A.NativeInt32List, Int8Array: A.NativeInt8List, Uint16Array: A.NativeUint16List, Uint32Array: A.NativeUint32List, Uint8ClampedArray: A.NativeUint8ClampedList, CanvasPixelArray: A.NativeUint8ClampedList, Uint8Array: A.NativeUint8List}); + hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, ArrayBufferView: false, DataView: true, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false}); A.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; @@ -8546,20 +8877,21 @@ } var scripts = document.scripts; function onLoad(event) { - for (var i = 0; i < scripts.length; ++i) + for (var i = 0; i < scripts.length; ++i) { scripts[i].removeEventListener("load", onLoad, false); + } callback(event.target); } - for (var i = 0; i < scripts.length; ++i) + for (var i = 0; i < scripts.length; ++i) { scripts[i].addEventListener("load", onLoad, false); + } })(function(currentScript) { init.currentScript = currentScript; var callMain = A.main; - if (typeof dartMainRunner === "function") + if (typeof dartMainRunner === "function") { dartMainRunner(callMain, []); - else + } else { callMain([]); + } }); })(); - -//# sourceMappingURL=index.dart.js.map diff --git a/pkgs/sse/tool/build_js.sh b/pkgs/sse/tool/build_js.sh new file mode 100755 index 000000000..ef29b706c --- /dev/null +++ b/pkgs/sse/tool/build_js.sh @@ -0,0 +1,2 @@ +#!/bin/bash +dart compile js --no-source-maps test/web/index.dart -o test/web/index.dart.js From 72387ba6dd135c19b95ef233adc261be0fcd1b0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:44:13 +0000 Subject: [PATCH 095/115] Bump nanasess/setup-chromedriver (dart-lang/sse#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [nanasess/setup-chromedriver](https://github.com/nanasess/setup-chromedriver) from e66222fd7ec9c46b83cc837781ce6930b5d95f90 to 480d644e773cd6d53e4cb76557c8ad5e5806d7da.
Commits
  • 480d644 Merge pull request dart-lang/sse#251 from nanasess/dependabot/npm_and_yarn/types/node-20.10.0
  • 60e30be Merge pull request dart-lang/sse#249 from nanasess/dependabot/npm_and_yarn/types/yauzl-2.10.3
  • d28b97c Bump @​types/node from 20.6.2 to 20.10.0
  • cf16226 Merge branch 'master' into dependabot/npm_and_yarn/types/yauzl-2.10.3
  • 567664f Merge pull request dart-lang/sse#248 from nanasess/dependabot/npm_and_yarn/prettier-3.1.0
  • 47a663d Merge branch 'master' into dependabot/npm_and_yarn/prettier-3.1.0
  • 01569c9 Merge pull request dart-lang/sse#245 from nanasess/dependabot/npm_and_yarn/selenium-webdri...
  • ddcac44 Merge pull request dart-lang/sse#237 from nanasess/dependabot/npm_and_yarn/vercel/ncc-0.38.1
  • ce78d4d Bump @​types/yauzl from 2.10.1 to 2.10.3
  • 89279c4 Bump prettier from 3.0.3 to 3.1.0
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 73bf50262..5192649d2 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -53,7 +53,7 @@ jobs: - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} - - uses: nanasess/setup-chromedriver@e66222fd7ec9c46b83cc837781ce6930b5d95f90 + - uses: nanasess/setup-chromedriver@480d644e773cd6d53e4cb76557c8ad5e5806d7da - id: install name: Install dependencies run: dart pub get From 0e0942a44348c65150878c6a753fe53bf1b6b60f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 01:21:04 +0000 Subject: [PATCH 096/115] Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/sse#101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.0 to 1.6.2.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available in an environment variable, DART_HOME (dart-lang/sse#43).
  • Fixed an issue where cached downloads could lead to unzip issues on self-hosted runners (dart-lang/sse#35).

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.0&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 5192649d2..1fb326031 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.2.0, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@480d644e773cd6d53e4cb76557c8ad5e5806d7da From 5c2e923f40c839df6c9f46426dc95a3e9578ae46 Mon Sep 17 00:00:00 2001 From: Ilya Yanok Date: Fri, 9 Feb 2024 18:22:57 +0100 Subject: [PATCH 097/115] Make `SseConnection` extend `StreamChannelMixin` (dart-lang/sse#102) I don't see any reason for the type argument to be nullable. Seems like a null safety migration artifact. --- pkgs/sse/lib/src/server/sse_handler.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sse/lib/src/server/sse_handler.dart b/pkgs/sse/lib/src/server/sse_handler.dart index c235c2029..376fe27bf 100644 --- a/pkgs/sse/lib/src/server/sse_handler.dart +++ b/pkgs/sse/lib/src/server/sse_handler.dart @@ -28,7 +28,7 @@ class _SseMessage { } /// A bi-directional SSE connection between server and browser. -class SseConnection extends StreamChannelMixin { +class SseConnection extends StreamChannelMixin { /// Incoming messages from the Browser client. final _incomingController = StreamController(); From 60c2d5090f38db99eb99c47769c139964e93eef1 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 16 Feb 2024 17:42:24 -0800 Subject: [PATCH 098/115] Support the latest pkg:web, require Dart 3.3 (dart-lang/sse#103) --- pkgs/sse/.github/workflows/test-package.yml | 2 +- pkgs/sse/CHANGELOG.md | 2 ++ pkgs/sse/example/server.dart | 2 +- pkgs/sse/lib/client/sse_client.dart | 4 ++-- pkgs/sse/pubspec.yaml | 4 ++-- pkgs/sse/test/web/index.dart | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 1fb326031..84d263d08 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [3.2.0, dev] + sdk: [3.3, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index f1deed7d7..b652f9cab 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,6 +1,8 @@ ## 4.1.5-wip - Drop unneeded dependency on `package:js`. +- Update the minimum Dart SDK version to `3.3.0`. +- Support the latest `package:web`. ## 4.1.4 diff --git a/pkgs/sse/example/server.dart b/pkgs/sse/example/server.dart index 74439c9e1..b6ee75067 100644 --- a/pkgs/sse/example/server.dart +++ b/pkgs/sse/example/server.dart @@ -7,7 +7,7 @@ import 'package:sse/server/sse_handler.dart'; /// A basic server which sets up an SSE handler. /// -/// When a client connnects it will send a simple message and print the +/// When a client connects it will send a simple message and print the /// response. void main() async { var handler = SseHandler(Uri.parse('/sseHandler')); diff --git a/pkgs/sse/lib/client/sse_client.dart b/pkgs/sse/lib/client/sse_client.dart index f5be1e512..4d3df490c 100644 --- a/pkgs/sse/lib/client/sse_client.dart +++ b/pkgs/sse/lib/client/sse_client.dart @@ -9,7 +9,7 @@ import 'dart:js_interop'; import 'package:logging/logging.dart'; import 'package:pool/pool.dart'; import 'package:stream_channel/stream_channel.dart'; -import 'package:web/helpers.dart'; +import 'package:web/web.dart'; import '../src/util/uuid.dart'; @@ -21,7 +21,7 @@ import '../src/util/uuid.dart'; /// Note Chrome's limit is 6000. So this gives us plenty of headroom. final _requestPool = Pool(1000); -/// A client for bi-directional sse communcation. +/// A client for bi-directional sse communication. /// /// The client can send any JSON-encodable messages to the server by adding /// them to the [sink] and listen to messages from the server on the [stream]. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 6d150adab..4aae6e4f1 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -7,7 +7,7 @@ description: >- repository: https://github.com/dart-lang/sse environment: - sdk: ^3.2.0 + sdk: ^3.3.0 dependencies: async: ^2.0.8 @@ -16,7 +16,7 @@ dependencies: pool: ^1.5.0 shelf: ^1.1.0 stream_channel: ^2.0.0 - web: '>=0.3.0 <0.5.0' + web: ^0.5.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/sse/test/web/index.dart b/pkgs/sse/test/web/index.dart index fadb14707..c4d78cd9a 100644 --- a/pkgs/sse/test/web/index.dart +++ b/pkgs/sse/test/web/index.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'package:sse/client/sse_client.dart'; -import 'package:web/helpers.dart'; +import 'package:web/web.dart'; void main() { var channel = SseClient('/test'); From 7fac9cd4e7169a3a5f7004a34b7e0178a69e4216 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 20 Feb 2024 10:39:52 -0800 Subject: [PATCH 099/115] blast_repo fixes (dart-lang/sse#104) auto-publish, github-actions, no-response --- pkgs/sse/.github/workflows/no-response.yml | 37 +++++++++++++++++++++ pkgs/sse/.github/workflows/publish.yaml | 17 ++++++++++ pkgs/sse/.github/workflows/test-package.yml | 2 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 pkgs/sse/.github/workflows/no-response.yml create mode 100644 pkgs/sse/.github/workflows/publish.yaml diff --git a/pkgs/sse/.github/workflows/no-response.yml b/pkgs/sse/.github/workflows/no-response.yml new file mode 100644 index 000000000..ab1ac4984 --- /dev/null +++ b/pkgs/sse/.github/workflows/no-response.yml @@ -0,0 +1,37 @@ +# A workflow to close issues where the author hasn't responded to a request for +# more information; see https://github.com/actions/stale. + +name: No Response + +# Run as a daily cron. +on: + schedule: + # Every day at 8am + - cron: '0 8 * * *' + +# All permissions not specified are set to 'none'. +permissions: + issues: write + pull-requests: write + +jobs: + no-response: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'dart-lang' }} + steps: + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e + with: + # Don't automatically mark inactive issues+PRs as stale. + days-before-stale: -1 + # Close needs-info issues and PRs after 14 days of inactivity. + days-before-close: 14 + stale-issue-label: "needs-info" + close-issue-message: > + Without additional information we're not able to resolve this issue. + Feel free to add more info or respond to any questions above and we + can reopen the case. Thanks for your contribution! + stale-pr-label: "needs-info" + close-pr-message: > + Without additional information we're not able to resolve this PR. + Feel free to add more info or respond to any questions above. + Thanks for your contribution! diff --git a/pkgs/sse/.github/workflows/publish.yaml b/pkgs/sse/.github/workflows/publish.yaml new file mode 100644 index 000000000..27157a046 --- /dev/null +++ b/pkgs/sse/.github/workflows/publish.yaml @@ -0,0 +1,17 @@ +# A CI configuration to auto-publish pub packages. + +name: Publish + +on: + pull_request: + branches: [ master ] + push: + tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] + +jobs: + publish: + if: ${{ github.repository_owner == 'dart-lang' }} + uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + permissions: + id-token: write # Required for authentication using OIDC + pull-requests: write # Required for writing the pull request note diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 84d263d08..e28299d8a 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -53,7 +53,7 @@ jobs: - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - - uses: nanasess/setup-chromedriver@480d644e773cd6d53e4cb76557c8ad5e5806d7da + - uses: nanasess/setup-chromedriver@42cc2998329f041de87dc3cfa33a930eacd57eaa - id: install name: Install dependencies run: dart pub get From 508636bdb6842b1b781b869064c1a61dcaa66fe4 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 29 Feb 2024 12:41:03 -0800 Subject: [PATCH 100/115] Prepare release of v4.1.5 (dart-lang/sse#105) --- pkgs/sse/CHANGELOG.md | 2 +- pkgs/sse/pubspec.yaml | 2 +- pkgs/sse/test/web/index.dart.js | 320 ++++++++++++++------------------ 3 files changed, 139 insertions(+), 185 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index b652f9cab..eaca66901 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,4 +1,4 @@ -## 4.1.5-wip +## 4.1.5 - Drop unneeded dependency on `package:js`. - Update the minimum Dart SDK version to `3.3.0`. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 4aae6e4f1..71fbfaa3a 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.5-wip +version: 4.1.5 description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST diff --git a/pkgs/sse/test/web/index.dart.js b/pkgs/sse/test/web/index.dart.js index d0f3d2b1b..e1b37b927 100644 --- a/pkgs/sse/test/web/index.dart.js +++ b/pkgs/sse/test/web/index.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (NullSafetyMode.sound, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.3.0-170.0.dev. +// Generated by dart2js (NullSafetyMode.sound, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.4.0-157.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -17,6 +17,14 @@ // this uri being loaded. The loadPriority argument is the priority the // library should be loaded with as specified in the code via the // load-priority annotation (0: normal, 1: high). +// dartDeferredLibraryMultiLoader(uris, successCallback, errorCallback, loadId, loadPriority): +// if this function is defined, it will be called when a deferred library +// is loaded. It should load and eval the javascript of every URI in `uris`, +// and call successCallback. If it fails to do so, it should call +// errorCallback with an error. The loadId argument is the deferred import +// that resulted in this uri being loaded. The loadPriority argument is the +// priority the library should be loaded with as specified in the code via +// the load-priority annotation (0: normal, 1: high). // // dartCallInstrumentation(id, qualifiedName): // if this function is defined, it will be called at each entry of a @@ -87,33 +95,6 @@ mixinPropertiesHard(mixin.prototype, cls.prototype); cls.prototype.constructor = cls; } - function lazyOld(holder, name, getterName, initializer) { - var uninitializedSentinel = holder; - holder[name] = uninitializedSentinel; - holder[getterName] = function() { - holder[getterName] = function() { - A.throwCyclicInit(name); - }; - var result; - var sentinelInProgress = initializer; - try { - if (holder[name] === uninitializedSentinel) { - result = holder[name] = sentinelInProgress; - result = holder[name] = initializer(); - } else { - result = holder[name]; - } - } finally { - if (result === sentinelInProgress) { - holder[name] = null; - } - holder[getterName] = function() { - return this[name]; - }; - } - return result; - }; - } function lazy(holder, name, getterName, initializer) { var uninitializedSentinel = holder; holder[name] = uninitializedSentinel; @@ -238,7 +219,7 @@ return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); }; }; - return {inherit: inherit, inheritMany: inheritMany, mixin: mixinEasy, mixinHard: mixinHard, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, lazyOld: lazyOld, updateHolder: updateHolder, convertToFastObject: convertToFastObject, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; + return {inherit: inherit, inheritMany: inheritMany, mixin: mixinEasy, mixinHard: mixinHard, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, updateHolder: updateHolder, convertToFastObject: convertToFastObject, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; }(); function initializeDeferredHunk(hunk) { typesOffset = init.types.length; @@ -394,16 +375,6 @@ return J.UnknownJavaScriptObject.prototype; return receiver; }, - getInterceptor$z(receiver) { - if (receiver == null) - return receiver; - if (!(receiver instanceof A.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - get$error$z(receiver) { - return J.getInterceptor$z(receiver).get$error(receiver); - }, get$hashCode$(receiver) { return J.getInterceptor$(receiver).get$hashCode(receiver); }, @@ -1540,7 +1511,7 @@ return A._Universe_eval(init.typeUniverse, recipe, false); }, _substitute(universe, rti, typeArguments, depth) { - var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, + var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, t1, fields, substitutedFields, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, kind = rti._kind; switch (kind) { case 5: @@ -1581,6 +1552,13 @@ if (substitutedBase === base && substitutedArguments === $arguments) return rti; return A._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); + case 11: + t1 = rti._primary; + fields = rti._rest; + substitutedFields = A._substituteArray(universe, fields, typeArguments, depth); + if (substitutedFields === fields) + return rti; + return A._Universe__lookupRecordRti(universe, t1, substitutedFields); case 12: returnType = rti._primary; substitutedReturnType = A._substitute(universe, returnType, typeArguments, depth); @@ -1756,10 +1734,7 @@ if (testRti === type$.Object) return A._finishIsFn(testRti, object, A._isObject); if (!A.isSoundTopType(testRti)) - if (!(testRti === type$.legacy_Object)) - t1 = false; - else - t1 = true; + t1 = testRti === type$.legacy_Object; else t1 = true; if (t1) @@ -1805,10 +1780,7 @@ var t1, testRti = this, asFn = A._generalAsCheckImplementation; if (!A.isSoundTopType(testRti)) - if (!(testRti === type$.legacy_Object)) - t1 = false; - else - t1 = true; + t1 = testRti === type$.legacy_Object; else t1 = true; if (t1) @@ -2088,10 +2060,7 @@ boundRti = bounds[i]; kind = boundRti._kind; if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) - if (!(boundRti === t2)) - t3 = false; - else - t3 = true; + t3 = boundRti === t2; else t3 = true; if (!t3) @@ -2818,10 +2787,7 @@ if (s === t) return true; if (!A.isSoundTopType(t)) - if (!(t === type$.legacy_Object)) - t1 = false; - else - t1 = true; + t1 = t === type$.legacy_Object; else t1 = true; if (t1) @@ -2831,11 +2797,8 @@ return true; if (A.isSoundTopType(s)) return false; - if (s._kind !== 1) - t1 = false; - else - t1 = true; - if (t1) + t1 = s._kind; + if (t1 === 1) return true; leftTypeVariable = sKind === 14; if (leftTypeVariable) @@ -3058,10 +3021,7 @@ isDefinitelyTopType(t) { var t1; if (!A.isSoundTopType(t)) - if (!(t === type$.legacy_Object)) - t1 = false; - else - t1 = true; + t1 = t === type$.legacy_Object; else t1 = true; return t1; @@ -3210,7 +3170,7 @@ type$.nullable_StackTrace._as(stackTrace); replacement = null; if (replacement != null) - future._asyncCompleteError$2(J.get$error$z(replacement), replacement.get$stackTrace()); + future._asyncCompleteError$2(replacement.get$error(), replacement.get$stackTrace()); else future._asyncCompleteError$2(error, stackTrace); return future; @@ -3429,17 +3389,12 @@ } }, scheduleMicrotask(callback) { - var t1, _null = null, + var _null = null, currentZone = $.Zone__current; if (B.C__RootZone === currentZone) { A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback); return; } - t1 = false; - if (t1) { - A._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(callback)); - return; - } A._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(currentZone.bindCallbackGuarded$1(callback))); }, StreamIterator_StreamIterator(stream, $T) { @@ -4473,8 +4428,8 @@ if (onData == null) t1 = null; else { - t1 = A._wrapZone(new A._EventStreamSubscription_closure(onData), type$.JavaScriptObject); - t1 = t1 == null ? null : A.allowInterop(t1, type$.Function); + t1 = A._wrapZone(new A._EventStreamSubscription_closure(onData), type$.JSObject); + t1 = t1 == null ? null : type$.JavaScriptFunction._as(A.allowInterop(t1, type$.Function)); } t1 = new A._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); t1._tryResume$0(); @@ -4521,9 +4476,9 @@ main() { var t2, channel = A.SseClient$("/test"), - t1 = type$.nullable_JavaScriptObject._as(type$.JavaScriptObject._as(self.document).querySelector("button")); + t1 = type$.nullable_JSObject._as(type$.JSObject._as(self.document).querySelector("button")); t1.toString; - t2 = type$._ElementEventStreamImpl_JavaScriptObject; + t2 = type$._ElementEventStreamImpl_JSObject; A._EventStreamSubscription$(t1, "click", t2._eval$1("~(1)?")._as(new A.main_closure(channel)), false, t2._precomputed1); t2 = channel._incomingController; new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$1(new A.main_closure0(channel)); @@ -4874,14 +4829,14 @@ } return J.matchAsPrefix$2$s(pattern, receiver, index) != null; }, - startsWith$1($receiver, pattern) { - return this.startsWith$2($receiver, pattern, 0); + startsWith$1(receiver, pattern) { + return this.startsWith$2(receiver, pattern, 0); }, substring$2(receiver, start, end) { return receiver.substring(start, A.RangeError_checkValidRange(start, end, receiver.length)); }, - substring$1($receiver, start) { - return this.substring$2($receiver, start, null); + substring$1(receiver, start) { + return this.substring$2(receiver, start, null); }, $mul(receiver, times) { var s, result; @@ -4919,8 +4874,8 @@ start = t2 - t1; return receiver.lastIndexOf(pattern, start); }, - lastIndexOf$1($receiver, pattern) { - return this.lastIndexOf$2($receiver, pattern, null); + lastIndexOf$1(receiver, pattern) { + return this.lastIndexOf$2(receiver, pattern, null); }, toString$0(receiver) { return receiver; @@ -5046,44 +5001,39 @@ A.JSInvocationMirror.prototype = { get$memberName() { var t1 = this._memberName; - return t1; + if (t1 instanceof A.Symbol) + return t1; + return this._memberName = new A.Symbol(A._asString(t1)); }, get$positionalArguments() { - var t1, argumentCount, list, index, _this = this; + var t1, t2, argumentCount, list, index, _this = this; if (_this.__js_helper$_kind === 1) return B.List_empty; t1 = _this._arguments; - argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount; + t2 = J.getInterceptor$asx(t1); + argumentCount = t2.get$length(t1) - J.get$length$asx(_this._namedArgumentNames) - _this._typeArgumentCount; if (argumentCount === 0) return B.List_empty; list = []; - for (index = 0; index < argumentCount; ++index) { - if (!(index < t1.length)) - return A.ioore(t1, index); - list.push(t1[index]); - } + for (index = 0; index < argumentCount; ++index) + list.push(t2.$index(t1, index)); return J.JSArray_markUnmodifiableList(list); }, get$namedArguments() { - var t1, namedArgumentCount, t2, namedArgumentsStartIndex, map, i, t3, t4, _this = this; + var t1, t2, namedArgumentCount, t3, t4, namedArgumentsStartIndex, map, i, _this = this; if (_this.__js_helper$_kind !== 0) return B.Map_empty; t1 = _this._namedArgumentNames; - namedArgumentCount = t1.length; - t2 = _this._arguments; - namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount; + t2 = J.getInterceptor$asx(t1); + namedArgumentCount = t2.get$length(t1); + t3 = _this._arguments; + t4 = J.getInterceptor$asx(t3); + namedArgumentsStartIndex = t4.get$length(t3) - namedArgumentCount - _this._typeArgumentCount; if (namedArgumentCount === 0) return B.Map_empty; map = new A.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); - for (i = 0; i < namedArgumentCount; ++i) { - if (!(i < t1.length)) - return A.ioore(t1, i); - t3 = t1[i]; - t4 = namedArgumentsStartIndex + i; - if (!(t4 >= 0 && t4 < t2.length)) - return A.ioore(t2, t4); - map.$indexSet(0, new A.Symbol(t3), t2[t4]); - } + for (i = 0; i < namedArgumentCount; ++i) + map.$indexSet(0, new A.Symbol(A._asString(t2.$index(t1, i))), t4.$index(t3, namedArgumentsStartIndex + i)); return new A.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); }, $isInvocation: 1 @@ -6137,7 +6087,7 @@ if ((_this._state & 8) === 0) return A._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(_this._varData); t1 = A._instanceType(_this); - return t1._eval$1("_PendingEvents<1>?")._as(t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData()); + return t1._eval$1("_PendingEvents<1>?")._as(t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$_varData()); }, _ensurePendingEvents$0() { var events, t1, _this = this; @@ -6148,13 +6098,13 @@ return A._instanceType(_this)._eval$1("_PendingEvents<1>")._as(events); } t1 = A._instanceType(_this); - events = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData(); + events = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$_varData(); return t1._eval$1("_PendingEvents<1>")._as(events); }, get$_subscription() { var varData = this._varData; if ((this._state & 8) !== 0) - varData = type$._StreamControllerAddStreamState_nullable_Object._as(varData).get$varData(); + varData = type$._StreamControllerAddStreamState_nullable_Object._as(varData).get$_varData(); return A._instanceType(this)._eval$1("_ControllerSubscription<1>")._as(varData); }, _badEventState$0() { @@ -6195,7 +6145,7 @@ return _this._ensureDoneFuture$0(); }, _subscribe$4(onData, onError, onDone, cancelOnError) { - var t2, t3, t4, t5, t6, t7, subscription, pendingEvents, addState, _this = this, + var t2, t3, t4, t5, t6, t7, t8, subscription, pendingEvents, addState, _this = this, t1 = A._instanceType(_this); t1._eval$1("~(1)?")._as(onData); type$.nullable_void_Function._as(onDone); @@ -6203,25 +6153,26 @@ throw A.wrapException(A.StateError$("Stream has already been listened to.")); t2 = $.Zone__current; t3 = cancelOnError ? 1 : 0; - t4 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1); - t5 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError); - t6 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; - t7 = type$.void_Function; - subscription = new A._ControllerSubscription(_this, t4, t5, t7._as(t6), t2, t3, t1._eval$1("_ControllerSubscription<1>")); + t4 = onError != null ? 32 : 0; + t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1); + t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError); + t7 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; + t8 = type$.void_Function; + subscription = new A._ControllerSubscription(_this, t5, t6, t8._as(t7), t2, t3 | t4, t1._eval$1("_ControllerSubscription<1>")); pendingEvents = _this.get$_pendingEvents(); - t3 = _this._state |= 1; - if ((t3 & 8) !== 0) { + t4 = _this._state |= 1; + if ((t4 & 8) !== 0) { addState = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData); - addState.set$varData(subscription); + addState.set$_varData(subscription); addState.resume$0(); } else _this._varData = subscription; subscription._setPendingEvents$1(pendingEvents); - t1 = t7._as(new A._StreamController__subscribe_closure(_this)); + t1 = t8._as(new A._StreamController__subscribe_closure(_this)); t2 = subscription._state; - subscription._state = t2 | 32; + subscription._state = t2 | 64; t1.call$0(); - subscription._state &= 4294967263; + subscription._state &= 4294967231; subscription._checkState$1((t2 & 4) !== 0); return subscription; }, @@ -6331,7 +6282,7 @@ return; _this.set$_pending(pendingEvents); if (pendingEvents.lastPendingEvent != null) { - _this._state |= 64; + _this._state |= 128; pendingEvents.schedule$1(_this); } }, @@ -6347,26 +6298,27 @@ return t1 == null ? $.$get$Future__nullFuture() : t1; }, asFuture$1$1(futureValue, $E) { - var result, t1 = {}; + var result, _this = this, t1 = {}; t1.resultValue = null; if (!$E._is(null)) throw A.wrapException(A.ArgumentError$notNull("futureValue")); $E._as(futureValue); t1.resultValue = futureValue; result = new A._Future($.Zone__current, $E._eval$1("_Future<0>")); - this.set$_onDone(new A._BufferingStreamSubscription_asFuture_closure(t1, result)); - this._onError = new A._BufferingStreamSubscription_asFuture_closure0(this, result); + _this.set$_onDone(new A._BufferingStreamSubscription_asFuture_closure(t1, result)); + _this._state |= 32; + _this._onError = new A._BufferingStreamSubscription_asFuture_closure0(_this, result); return result; }, _cancel$0() { var t2, _this = this, t1 = _this._state |= 8; - if ((t1 & 64) !== 0) { + if ((t1 & 128) !== 0) { t2 = _this._pending; if (t2._state === 1) t2._state = 3; } - if ((t1 & 32) === 0) + if ((t1 & 64) === 0) _this.set$_pending(null); _this._cancelFuture = _this._onCancel$0(); }, @@ -6386,10 +6338,10 @@ } pending.add$1(0, $event); t1 = _this._state; - if ((t1 & 64) === 0) { - t1 |= 64; + if ((t1 & 128) === 0) { + t1 |= 128; _this._state = t1; - if (t1 < 128) + if (t1 < 256) pending.schedule$1(_this); } }, @@ -6398,9 +6350,9 @@ t1 = A._instanceType(_this)._precomputed1; t1._as(data); t2 = _this._state; - _this._state = t2 | 32; + _this._state = t2 | 64; _this._zone.runUnaryGuarded$1$2(_this._onData, data, t1); - _this._state &= 4294967263; + _this._state &= 4294967231; _this._checkState$1((t2 & 4) !== 0); }, _sendError$2(error, stackTrace) { @@ -6434,10 +6386,10 @@ _checkState$1(wasInputPaused) { var t2, isInputPaused, _this = this, t1 = _this._state; - if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent == null) { - t1 = _this._state = t1 & 4294967231; + if ((t1 & 128) !== 0 && _this._pending.lastPendingEvent == null) { + t1 = _this._state = t1 & 4294967167; if ((t1 & 4) !== 0) - if (t1 < 128) { + if (t1 < 256) { t2 = _this._pending; t2 = t2 == null ? null : t2.lastPendingEvent == null; t2 = t2 !== false; @@ -6458,14 +6410,14 @@ isInputPaused = (t1 & 4) !== 0; if (wasInputPaused === isInputPaused) break; - _this._state = t1 ^ 32; + _this._state = t1 ^ 64; if (isInputPaused) _this._onPause$0(); else _this._onResume$0(); - t1 = _this._state &= 4294967263; + t1 = _this._state &= 4294967231; } - if ((t1 & 64) !== 0 && t1 < 128) + if ((t1 & 128) !== 0 && t1 < 256) _this._pending.schedule$1(_this); }, set$_onData(_onData) { @@ -6510,7 +6462,7 @@ t2 = t1._state; if ((t2 & 8) !== 0 && (t2 & 16) === 0) return; - t1._state = t2 | 32; + t1._state = t2 | 64; onError = t1._onError; t2 = this.error; t3 = type$.Object; @@ -6519,7 +6471,7 @@ t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace); else t4.runUnaryGuarded$1$2(type$.void_Function_Object._as(onError), t2, t3); - t1._state &= 4294967263; + t1._state &= 4294967231; }, $signature: 0 }; @@ -6529,9 +6481,9 @@ t2 = t1._state; if ((t2 & 16) === 0) return; - t1._state = t2 | 42; + t1._state = t2 | 74; t1._zone.runGuarded$1(t1._onDone); - t1._state &= 4294967263; + t1._state &= 4294967231; }, $signature: 0 }; @@ -6981,9 +6933,11 @@ this.result._contents += ", "; t1.first = false; t1 = this.result; - t2 = t1._contents += A.S(k); + t2 = A.S(k); + t2 = t1._contents += t2; t1._contents = t2 + ": "; - t1._contents += A.S(v); + t2 = A.S(v); + t1._contents += t2; }, $signature: 10 }; @@ -7017,7 +6971,7 @@ }, elementAt$1(_, index) { var t2, t3, _this = this, - t1 = _this.get$length(_this); + t1 = _this.get$length(0); if (0 > index || index >= t1) A.throwExpression(A.IndexError$withLength(index, t1, _this, null, "index")); t1 = _this._table; @@ -7118,7 +7072,7 @@ return this._processed == null ? this._data.__js_helper$_length : this._convert$_computeKeys$0().length; }, get$isEmpty(_) { - return this.get$length(this) === 0; + return this.get$length(0) === 0; }, get$keys() { if (this._processed == null) { @@ -7161,8 +7115,7 @@ }; A._JsonMapKeyIterable.prototype = { get$length(_) { - var t1 = this._parent; - return t1.get$length(t1); + return this._parent.get$length(0); }, elementAt$1(_, index) { var t1 = this._parent; @@ -7430,7 +7383,9 @@ return t1.charCodeAt(0) == 0 ? t1 : t1; }, writeNumber$1(number) { - this._sink._contents += B.JSNumber_methods.toString$0(number); + var t1 = this._sink, + t2 = B.JSNumber_methods.toString$0(number); + t1._contents += t2; }, writeString$1(string) { this._sink._contents += string; @@ -7439,7 +7394,9 @@ this._sink._contents += B.JSString_methods.substring$2(string, start, end); }, writeCharCode$1(charCode) { - this._sink._contents += A.Primitives_stringFromCharCode(charCode); + var t1 = this._sink, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; } }; A.NoSuchMethodError_toString_closure.prototype = { @@ -7452,7 +7409,8 @@ t3 += key._name; t1._contents = t3; t1._contents = t3 + ": "; - t1._contents += A.Error_safeToString(value); + t3 = A.Error_safeToString(value); + t1._contents += t3; t2.comma = ", "; }, $signature: 19 @@ -7590,7 +7548,8 @@ for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { argument = $arguments[_i]; sb._contents = t2 + t3; - t2 = sb._contents += A.Error_safeToString(argument); + t2 = A.Error_safeToString(argument); + t2 = sb._contents += t2; _box_0.comma = ", "; } _this._namedArguments.forEach$1(0, new A.NoSuchMethodError_toString_closure(_box_0, sb)); @@ -7743,7 +7702,7 @@ }; A.Null.prototype = { get$hashCode(_) { - return A.Object.prototype.get$hashCode.call(this, this); + return A.Object.prototype.get$hashCode.call(this, 0); }, toString$0(_) { return "null"; @@ -7810,11 +7769,7 @@ return t1.$index(0, o); if (o instanceof Date) { millisSinceEpoch = o.getTime(); - if (Math.abs(millisSinceEpoch) <= 864e13) - t1 = false; - else - t1 = true; - if (t1) + if (Math.abs(millisSinceEpoch) > 864e13) A.throwExpression(A.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch, null)); A.checkNotNullable(true, "isUtc", type$.bool); return new A.DateTime(millisSinceEpoch, true); @@ -7963,7 +7918,7 @@ return A.Future_Future$value(new A.PoolResource(_this), type$.PoolResource); } else { t1 = _this._onReleaseCallbacks; - if (!t1.get$isEmpty(t1)) + if (!t1.get$isEmpty(0)) return _this._runOnRelease$1(t1.removeFirst$0()); else { t1 = new A._Future($.Zone__current, type$._Future_PoolResource); @@ -8026,7 +7981,7 @@ t1 = t1._pool; t1._resetTimer$0(); t2 = t1._requestedResources; - if (!t2.get$isEmpty(t2)) + if (!t2.get$isEmpty(0)) t2.removeFirst$0().complete$1(new A.PoolResource(t1)); else { t2 = --t1._allocatedResources; @@ -8093,18 +8048,18 @@ A.PoolResource.prototype = {}; A.SseClient.prototype = { SseClient$2$debugKey(serverUrl, debugKey) { - var t2, _this = this, + var t2, t3, _this = this, t1 = serverUrl + "?sseClientId=" + _this._clientId; _this.__SseClient__serverUrl_A = t1; - t2 = type$.JavaScriptObject; - t1 = t2._as(new self.EventSource(t1, t2._as({withCredentials: true}))); + t2 = type$.JSObject; + t1 = t2._as(new self.EventSource(t1, {withCredentials: true})); _this.__SseClient__eventSource_A = t1; - t1 = new A._EventStream(t1, "open", false, type$._EventStream_JavaScriptObject); - t1.get$first(t1).whenComplete$1(new A.SseClient_closure(_this)); + new A._EventStream(t1, "open", false, type$._EventStream_JSObject).get$first(0).whenComplete$1(new A.SseClient_closure(_this)); t1 = type$.Function; - _this.__SseClient__eventSource_A.addEventListener("message", A.allowInterop(_this.get$_onIncomingMessage(), t1)); - _this.__SseClient__eventSource_A.addEventListener("control", A.allowInterop(_this.get$_onIncomingControlMessage(), t1)); - t1 = type$.nullable_void_Function_JavaScriptObject; + t3 = type$.JavaScriptFunction; + _this.__SseClient__eventSource_A.addEventListener("message", t3._as(A.allowInterop(_this.get$_onIncomingMessage(), t1))); + _this.__SseClient__eventSource_A.addEventListener("control", t3._as(A.allowInterop(_this.get$_onIncomingControlMessage(), t1))); + t1 = type$.nullable_void_Function_JSObject; A._EventStreamSubscription$(_this.__SseClient__eventSource_A, "open", t1._as(new A.SseClient_closure0(_this)), false, t2); A._EventStreamSubscription$(_this.__SseClient__eventSource_A, "error", t1._as(new A.SseClient_closure1(_this)), false, t2); }, @@ -8138,14 +8093,14 @@ t1.completeError$1(error); }, _onIncomingControlMessage$1(message) { - var data = type$.JavaScriptObject._as(message).data; + var data = type$.JSObject._as(message).data; if (J.$eq$(A.dartify(data), "close")) this.close$0(); else throw A.wrapException(A.UnsupportedError$("[" + this._clientId + '] Illegal Control Message "' + A.S(data) + '"')); }, _onIncomingMessage$1(message) { - this._incomingController.add$1(0, A._asString(B.C_JsonCodec.decode$2$reviver(A._asString(type$.JavaScriptObject._as(message).data), null))); + this._incomingController.add$1(0, A._asString(B.C_JsonCodec.decode$2$reviver(A._asString(type$.JSObject._as(message).data), null))); }, _onOutgoingDone$0() { this.close$0(); @@ -8155,7 +8110,7 @@ }, _onOutgoingMessage$body$SseClient(message) { var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.dynamic), + $async$completer = A._makeAsyncAwaitCompleter(type$.void), $async$self = this, t1; var $async$_onOutgoingMessage$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) @@ -8248,10 +8203,10 @@ t1 = $async$self._box_0.encodedMessage; if (t1 == null) t1 = null; - t2 = type$.JavaScriptObject; - t1 = t2._as({method: "POST", body: t1, credentials: "include"}); + t1 = {method: "POST", body: t1, credentials: "include"}; + t2 = type$.JSObject; $async$goto = 6; - return A._asyncAwait(A.promiseToFuture(type$.JSObject._as(t2._as(self.window).fetch(url, t1)), type$.nullable_Object), $async$call$0); + return A._asyncAwait(A.promiseToFuture(t2._as(t2._as(self.window).fetch(url, t1)), t2), $async$call$0); case 6: // returning from await. $async$handler = 1; @@ -8333,14 +8288,14 @@ if (_this._target == null) throw A.wrapException(A.StateError$("Subscription has been canceled.")); _this._unlisten$0(); - t1 = A._wrapZone(new A._EventStreamSubscription_onData_closure(handleData), type$.JavaScriptObject); - t1 = t1 == null ? null : A.allowInterop(t1, type$.Function); + t1 = A._wrapZone(new A._EventStreamSubscription_onData_closure(handleData), type$.JSObject); + t1 = t1 == null ? null : type$.JavaScriptFunction._as(A.allowInterop(t1, type$.Function)); _this._streams$_onData = t1; _this._tryResume$0(); }, _tryResume$0() { var t1 = this._streams$_onData; - if (t1 != null && true) + if (t1 != null) this._target.addEventListener(this._eventType, t1, false); }, _unlisten$0() { @@ -8352,13 +8307,13 @@ }; A._EventStreamSubscription_closure.prototype = { call$1(e) { - return this.onData.call$1(type$.JavaScriptObject._as(e)); + return this.onData.call$1(type$.JSObject._as(e)); }, $signature: 1 }; A._EventStreamSubscription_onData_closure.prototype = { call$1(e) { - return this.handleData.call$1(type$.JavaScriptObject._as(e)); + return this.handleData.call$1(type$.JSObject._as(e)); }, $signature: 1 }; @@ -8486,12 +8441,12 @@ typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List", Object: "Object", Map: "Map"}, mangledNames: {}, - types: ["~()", "~(JavaScriptObject)", "Null()", "~(@)", "Null(@)", "Null(Object,StackTrace)", "~(~())", "Future()", "@(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int,int)", "~(String,@)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "_Future<@>(@)", "~(Symbol0,@)", "Object?(Object?)", "Logger()", "~(String?)", "int(int)", "~(String)"], + types: ["~()", "~(JSObject)", "Null()", "~(@)", "Null(@)", "Null(Object,StackTrace)", "~(~())", "Future()", "@(@)", "~(Object,StackTrace)", "~(Object?,Object?)", "String(int,int)", "~(String,@)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "~(int,@)", "_Future<@>(@)", "~(Symbol0,@)", "Object?(Object?)", "Logger()", "~(String?)", "int(int)", "~(String)"], interceptorsByTag: null, leafTags: null, arrayRti: Symbol("$ti") }; - A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","JavaScriptObject":{"JSObject":[]},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"JavaScriptObject":[],"JSObject":[]},"JSArray":{"List":["1"],"JavaScriptObject":[],"JSObject":[],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JavaScriptObject":[],"JSObject":[],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Pattern":[],"TrustedGetRuntimeType":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"JSInvocationMirror":{"Invocation":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"_CyclicInitializationError":{"Error":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeByteBuffer":{"JavaScriptObject":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JavaScriptObject":[],"JSObject":[]},"NativeByteData":{"JavaScriptObject":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JavaScriptObject":[],"JSObject":[]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeFloat64List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeInt16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8ClampedList":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_HashMap":{"MapBase":["1","2"],"Map":["1","2"]},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"Iterable":["1"],"ListIterable.E":"1"},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"Int8List":{"List":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"Iterable":["double"]}}')); + A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"JavaScriptObject":{"JSObject":[]},"LegacyJavaScriptObject":{"JSObject":[]},"JSArray":{"List":["1"],"JSObject":[],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JSObject":[],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Pattern":[],"TrustedGetRuntimeType":[]},"LateError":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"JSInvocationMirror":{"Invocation":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"_CyclicInitializationError":{"Error":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeByteBuffer":{"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JSObject":[]},"NativeByteData":{"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JSObject":[]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeFloat64List":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JSObject":[],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeInt16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint16List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint32List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8ClampedList":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8List":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JSObject":[],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"AsyncError":{"Error":[]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_HashMap":{"MapBase":["1","2"],"Map":["1","2"]},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"Iterable":["1"],"ListIterable.E":"1"},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"Int8List":{"List":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"Iterable":["double"]}}')); A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"_DelayedEvent":1,"StreamChannelMixin":1}')); var string$ = { Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type" @@ -8513,7 +8468,6 @@ JSObject: findType("JSObject"), JavaScriptFunction: findType("JavaScriptFunction"), JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), - JavaScriptObject: findType("JavaScriptObject"), JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), List_dynamic: findType("List<@>"), Logger: findType("Logger"), @@ -8530,8 +8484,8 @@ UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), _AsyncCompleter_PoolResource: findType("_AsyncCompleter"), _AsyncCompleter_void: findType("_AsyncCompleter<~>"), - _ElementEventStreamImpl_JavaScriptObject: findType("_ElementEventStreamImpl"), - _EventStream_JavaScriptObject: findType("_EventStream"), + _ElementEventStreamImpl_JSObject: findType("_ElementEventStreamImpl"), + _EventStream_JSObject: findType("_EventStream"), _Future_PoolResource: findType("_Future"), _Future_dynamic: findType("_Future<@>"), _Future_int: findType("_Future"), @@ -8550,14 +8504,14 @@ legacy_Never: findType("0&*"), legacy_Object: findType("Object*"), nullable_Future_Null: findType("Future?"), - nullable_JavaScriptObject: findType("JavaScriptObject?"), + nullable_JSObject: findType("JSObject?"), nullable_List_dynamic: findType("List<@>?"), nullable_Object: findType("Object?"), nullable_StackTrace: findType("StackTrace?"), nullable__DelayedEvent_dynamic: findType("_DelayedEvent<@>?"), nullable__FutureListener_dynamic_dynamic: findType("_FutureListener<@,@>?"), nullable_void_Function: findType("~()?"), - nullable_void_Function_JavaScriptObject: findType("~(JavaScriptObject)?"), + nullable_void_Function_JSObject: findType("~(JSObject)?"), num: findType("num"), void: findType("~"), void_Function: findType("~()"), From b2916dc706f61a134914388ec31960b758592ad2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 01:52:31 +0000 Subject: [PATCH 101/115] Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/sse#106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
Release notes

Sourced from actions/checkout's releases.

v4.1.2

We are investigating the following issue with this release and have rolled-back the v4 tag to point to v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.1...v4.1.2

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.1&new-version=4.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index e28299d8a..b4e25d8a9 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.3, dev] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} From 47e5bcd1a6bf202baab3139ec22a9f95cf112b18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 02:01:23 +0000 Subject: [PATCH 102/115] Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/sse#107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.2 to 1.6.4.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.4

  • Rebuild JS code to include changes from v1.6.3

v1.6.3

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.2&new-version=1.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index b4e25d8a9..87f93effc 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.3, dev] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@42cc2998329f041de87dc3cfa33a930eacd57eaa From 10c856bf2d22b74e8b49ea8ce38c3073f370d4d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 15:23:06 +0000 Subject: [PATCH 103/115] Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/sse#108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
Release notes

Sourced from actions/checkout's releases.

v4.1.4

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.3...v4.1.4

v4.1.3

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.2...v4.1.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.2&new-version=4.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 87f93effc..3a7057306 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.3, dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 604897fa2a87a7fc8c61ad49ed8bd998bab9ee93 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 13 May 2024 10:42:13 -0700 Subject: [PATCH 104/115] blast_repo fixes (dart-lang/sse#109) dependabot --- pkgs/sse/.github/dependabot.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/sse/.github/dependabot.yaml b/pkgs/sse/.github/dependabot.yaml index 439e796b4..bf6b38a4d 100644 --- a/pkgs/sse/.github/dependabot.yaml +++ b/pkgs/sse/.github/dependabot.yaml @@ -8,3 +8,7 @@ updates: interval: monthly labels: - autosubmit + groups: + github-actions: + patterns: + - "*" From 6c5b63e3b7f933440f9b1ce16670dcf498e337ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 17:45:01 +0000 Subject: [PATCH 105/115] Bump actions/checkout from 4.1.4 to 4.1.5 in the github-actions group (dart-lang/sse#110) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.4 to 4.1.5
Release notes

Sourced from actions/checkout's releases.

v4.1.5

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.4...v4.1.5

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.4&new-version=4.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 3a7057306..2addac7d1 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.3, dev] steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 64c23895dc3eea8ae4469d6fe067718a55666faf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:33:13 +0000 Subject: [PATCH 106/115] Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/sse#111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.5 to 4.1.6
Release notes

Sourced from actions/checkout's releases.

v4.1.6

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.5...v4.1.6

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.5&new-version=4.1.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 2addac7d1..421348838 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.3, dev] steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From d2145608ed7f4d28fc990718b5e6ed2aebfee079 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 01:55:05 +0000 Subject: [PATCH 107/115] Bump the github-actions group with 2 updates (dart-lang/sse#112) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `actions/checkout` from 4.1.6 to 4.1.7
Release notes

Sourced from actions/checkout's releases.

v4.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.6...v4.1.7

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

... (truncated)

Commits

Updates `dart-lang/setup-dart` from 1.6.4 to 1.6.5
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.5

dart-lang/sse#118: dart-lang/setup-dartdart-lang/sse#118

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.5

dart-lang/sse#118: dart-lang/setup-dartdart-lang/sse#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/sse/.github/workflows/test-package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 421348838..b3606f80d 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,8 +22,8 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} - id: install @@ -49,8 +49,8 @@ jobs: os: [ubuntu-latest] sdk: [3.3, dev] steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@42cc2998329f041de87dc3cfa33a930eacd57eaa From d5acd696c89a7302b8d4432b126791da900eb25e Mon Sep 17 00:00:00 2001 From: Srujan Gaddam <58529443+srujzs@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:41:30 -0700 Subject: [PATCH 108/115] Add support for package:web v1.0.0 (dart-lang/sse#113) Updates the constraints to allow for >=0.5.0 <2.0.0. Publishes 4.1.6. --- pkgs/sse/CHANGELOG.md | 4 ++++ pkgs/sse/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index eaca66901..f084678d0 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.1.6 + +- Require package `web: '>=0.5.0 <2.0.0'`. + ## 4.1.5 - Drop unneeded dependency on `package:js`. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 71fbfaa3a..5fa630000 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.5 +version: 4.1.6 description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST @@ -16,7 +16,7 @@ dependencies: pool: ^1.5.0 shelf: ^1.1.0 stream_channel: ^2.0.0 - web: ^0.5.0 + web: '>=0.5.0 <2.0.0' dev_dependencies: dart_flutter_team_lints: ^2.0.0 From 8c64cb67f314aa188263431b43be7df72f7b0b02 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 17 Jul 2024 08:33:51 -0700 Subject: [PATCH 109/115] Bump to latest lints (dart-lang/sse#114) --- pkgs/sse/CHANGELOG.md | 2 ++ pkgs/sse/pubspec.yaml | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index f084678d0..63fe5f6c0 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,3 +1,5 @@ +## 4.1.7-wip + ## 4.1.6 - Require package `web: '>=0.5.0 <2.0.0'`. diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 5fa630000..0b20b93ee 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.6 +version: 4.1.7-wip description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST @@ -19,7 +19,7 @@ dependencies: web: '>=0.5.0 <2.0.0' dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 shelf_static: ^1.0.0 - test: ^1.5.3 + test: ^1.16.6 webdriver: ^3.0.0 From 3ec9b8bb1c3267becd9c42e0ce5fccb66d51b6d5 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 28 Oct 2024 19:06:35 -0700 Subject: [PATCH 110/115] blast_repo fixes (dart-lang/sse#117) drop-lint --- pkgs/sse/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/sse/analysis_options.yaml b/pkgs/sse/analysis_options.yaml index 6bc938d6c..6729bd923 100644 --- a/pkgs/sse/analysis_options.yaml +++ b/pkgs/sse/analysis_options.yaml @@ -11,4 +11,3 @@ linter: - cancel_subscriptions - literal_only_boolean_expressions - no_adjacent_strings_in_list - - package_api_docs From 18c2a7b4b3c85897fbaae85b55960fbdb912561a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 19:06:49 -0700 Subject: [PATCH 111/115] Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/sse#116) Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.7 to 4.2.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/692973e3d937129bcbf40652eb9f2f61becf3332...d632683dd7b4114ad314bca15554477dd762a938) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index b3606f80d..e20709415 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.3, dev] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 261036ccf4a25f1a82e1bcb062ded27f79f270c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:25:02 -0800 Subject: [PATCH 112/115] Bump actions/checkout from 4.2.0 to 4.2.2 in the github-actions group (dart-lang/sse#118) Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...11bd71901bbe5b1630ceea73d27597364c9af683) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index e20709415..351b844c5 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.3, dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 32f019ea8de8e2bef46a7f7b672cb7e91a1d18d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 15:49:30 -0800 Subject: [PATCH 113/115] Bump dart-lang/setup-dart in the github-actions group (dart-lang/sse#119) Bumps the github-actions group with 1 update: [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `dart-lang/setup-dart` from 1.6.5 to 1.7.0 - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/0a8a0fc875eb934c15d08629302413c671d3f672...e630b99d28a3b71860378cafdc2a067c71107f94) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/sse/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sse/.github/workflows/test-package.yml b/pkgs/sse/.github/workflows/test-package.yml index 351b844c5..47eeddef8 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/pkgs/sse/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.3, dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 with: sdk: ${{ matrix.sdk }} - uses: nanasess/setup-chromedriver@42cc2998329f041de87dc3cfa33a930eacd57eaa From 969af626520ba24be1658bc0ffe3b7815bdaf777 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 10 Dec 2024 16:28:29 +0100 Subject: [PATCH 114/115] Add issue template and other fixes --- .github/ISSUE_TEMPLATE/sse.md | 5 +++++ pkgs/sse/CONTRIBUTING.md | 39 ----------------------------------- pkgs/sse/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 40 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/sse.md delete mode 100644 pkgs/sse/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/sse.md b/.github/ISSUE_TEMPLATE/sse.md new file mode 100644 index 000000000..17cc488c3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/sse.md @@ -0,0 +1,5 @@ +--- +name: "package:sse" +about: "Create a bug or file a feature request against package:sse." +labels: "package:sse" +--- \ No newline at end of file diff --git a/pkgs/sse/CONTRIBUTING.md b/pkgs/sse/CONTRIBUTING.md deleted file mode 100644 index 069477c9e..000000000 --- a/pkgs/sse/CONTRIBUTING.md +++ /dev/null @@ -1,39 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at -the end). - -### Before you contribute - -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. - -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews - -All submissions, including submissions by project members, require review. - -### File headers - -All files in the project must start with the following header. - -``` -// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -``` - -### The small print - -Contributions made by corporations are covered by a different agreement than the -one above, the -[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 0b20b93ee..407f65417 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -4,7 +4,7 @@ description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST requests. -repository: https://github.com/dart-lang/sse +repository: https://github.com/dart-lang/tools/tree/main/pkgs/sse environment: sdk: ^3.3.0 From 597d290cfb820b825c51c415fd4fac78012db002 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 10 Dec 2024 16:37:37 +0100 Subject: [PATCH 115/115] merge fixes --- .github/labeler.yml | 4 ++ .../workflows/sse.yaml | 17 +++++++-- README.md | 1 + pkgs/sse/.github/dependabot.yaml | 14 ------- pkgs/sse/.github/workflows/no-response.yml | 37 ------------------- pkgs/sse/.github/workflows/publish.yaml | 17 --------- pkgs/sse/CHANGELOG.md | 4 +- pkgs/sse/README.md | 2 +- pkgs/sse/pubspec.yaml | 2 +- 9 files changed, 24 insertions(+), 74 deletions(-) rename pkgs/sse/.github/workflows/test-package.yml => .github/workflows/sse.yaml (87%) delete mode 100644 pkgs/sse/.github/dependabot.yaml delete mode 100644 pkgs/sse/.github/workflows/no-response.yml delete mode 100644 pkgs/sse/.github/workflows/publish.yaml diff --git a/.github/labeler.yml b/.github/labeler.yml index eca80bbc2..858a9e756 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -84,6 +84,10 @@ - changed-files: - any-glob-to-any-file: 'pkgs/source_map_stack_trace/**' +'package:sse': + - changed-files: + - any-glob-to-any-file: 'pkgs/sse/**' + 'package:unified_analytics': - changed-files: - any-glob-to-any-file: 'pkgs/unified_analytics/**' diff --git a/pkgs/sse/.github/workflows/test-package.yml b/.github/workflows/sse.yaml similarity index 87% rename from pkgs/sse/.github/workflows/test-package.yml rename to .github/workflows/sse.yaml index 47eeddef8..9e2f21260 100644 --- a/pkgs/sse/.github/workflows/test-package.yml +++ b/.github/workflows/sse.yaml @@ -1,17 +1,28 @@ -name: Dart CI +name: package:sse on: # Run on PRs and pushes to the default branch. push: - branches: [ master ] + branches: [ main ] + paths: + - '.github/workflows/sse.yaml' + - 'pkgs/sse/**' pull_request: - branches: [ master ] + branches: [ main ] + paths: + - '.github/workflows/sse.yaml' + - 'pkgs/sse/**' schedule: - cron: "0 0 * * 0" env: PUB_ENVIRONMENT: bot.github + +defaults: + run: + working-directory: pkgs/sse/ + jobs: # Check code formatting and static analysis on a single OS (linux) # against Dart dev. diff --git a/README.md b/README.md index 50517c36e..a941decc3 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ don't naturally belong to other topic monorepos (like | [mime](pkgs/mime/) | Utilities for handling media (MIME) types, including determining a type from a file extension and file contents. | [![package issues](https://img.shields.io/badge/package:mime-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Amime) | [![pub package](https://img.shields.io/pub/v/mime.svg)](https://pub.dev/packages/mime) | | [oauth2](pkgs/oauth2/) | A client library for authenticating with a remote service via OAuth2 on behalf of a user, and making authorized HTTP requests with the user's OAuth2 credentials. | [![package issues](https://img.shields.io/badge/package:oauth2-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aoauth2) | [![pub package](https://img.shields.io/pub/v/oauth2.svg)](https://pub.dev/packages/oauth2) | | [source_map_stack_trace](pkgs/source_map_stack_trace/) | A package for applying source maps to stack traces. | [![package issues](https://img.shields.io/badge/package:source_map_stack_trace-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_map_stack_trace) | [![pub package](https://img.shields.io/pub/v/source_map_stack_trace.svg)](https://pub.dev/packages/source_map_stack_trace) | +| [sse](pkgs/sse/) | Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST requests. | [![package issues](https://img.shields.io/badge/package:sse-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asse) | [![pub package](https://img.shields.io/pub/v/sse.svg)](https://pub.dev/packages/sse) | | [unified_analytics](pkgs/unified_analytics/) | A package for logging analytics for all Dart and Flutter related tooling to Google Analytics. | [![package issues](https://img.shields.io/badge/package:unified_analytics-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aunified_analytics) | [![pub package](https://img.shields.io/pub/v/unified_analytics.svg)](https://pub.dev/packages/unified_analytics) | ## Publishing automation diff --git a/pkgs/sse/.github/dependabot.yaml b/pkgs/sse/.github/dependabot.yaml deleted file mode 100644 index bf6b38a4d..000000000 --- a/pkgs/sse/.github/dependabot.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Dependabot configuration file. -version: 2 - -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: monthly - labels: - - autosubmit - groups: - github-actions: - patterns: - - "*" diff --git a/pkgs/sse/.github/workflows/no-response.yml b/pkgs/sse/.github/workflows/no-response.yml deleted file mode 100644 index ab1ac4984..000000000 --- a/pkgs/sse/.github/workflows/no-response.yml +++ /dev/null @@ -1,37 +0,0 @@ -# A workflow to close issues where the author hasn't responded to a request for -# more information; see https://github.com/actions/stale. - -name: No Response - -# Run as a daily cron. -on: - schedule: - # Every day at 8am - - cron: '0 8 * * *' - -# All permissions not specified are set to 'none'. -permissions: - issues: write - pull-requests: write - -jobs: - no-response: - runs-on: ubuntu-latest - if: ${{ github.repository_owner == 'dart-lang' }} - steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e - with: - # Don't automatically mark inactive issues+PRs as stale. - days-before-stale: -1 - # Close needs-info issues and PRs after 14 days of inactivity. - days-before-close: 14 - stale-issue-label: "needs-info" - close-issue-message: > - Without additional information we're not able to resolve this issue. - Feel free to add more info or respond to any questions above and we - can reopen the case. Thanks for your contribution! - stale-pr-label: "needs-info" - close-pr-message: > - Without additional information we're not able to resolve this PR. - Feel free to add more info or respond to any questions above. - Thanks for your contribution! diff --git a/pkgs/sse/.github/workflows/publish.yaml b/pkgs/sse/.github/workflows/publish.yaml deleted file mode 100644 index 27157a046..000000000 --- a/pkgs/sse/.github/workflows/publish.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# A CI configuration to auto-publish pub packages. - -name: Publish - -on: - pull_request: - branches: [ master ] - push: - tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] - -jobs: - publish: - if: ${{ github.repository_owner == 'dart-lang' }} - uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main - permissions: - id-token: write # Required for authentication using OIDC - pull-requests: write # Required for writing the pull request note diff --git a/pkgs/sse/CHANGELOG.md b/pkgs/sse/CHANGELOG.md index 63fe5f6c0..0387ba98f 100644 --- a/pkgs/sse/CHANGELOG.md +++ b/pkgs/sse/CHANGELOG.md @@ -1,4 +1,6 @@ -## 4.1.7-wip +## 4.1.7 + +- Move to `dart-lang/tools` monorepo. ## 4.1.6 diff --git a/pkgs/sse/README.md b/pkgs/sse/README.md index 367219cbe..ef514155e 100644 --- a/pkgs/sse/README.md +++ b/pkgs/sse/README.md @@ -1,4 +1,4 @@ -[![Dart CI](https://github.com/dart-lang/sse/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/sse/actions/workflows/test-package.yml) +[![Build Status](https://github.com/dart-lang/tools/actions/workflows/sse.yaml/badge.svg)](https://github.com/dart-lang/tools/actions/workflows/sse.yaml) [![pub package](https://img.shields.io/pub/v/sse.svg)](https://pub.dev/packages/sse) [![package publisher](https://img.shields.io/pub/publisher/sse.svg)](https://pub.dev/packages/sse/publisher) diff --git a/pkgs/sse/pubspec.yaml b/pkgs/sse/pubspec.yaml index 407f65417..bd70f7452 100644 --- a/pkgs/sse/pubspec.yaml +++ b/pkgs/sse/pubspec.yaml @@ -1,5 +1,5 @@ name: sse -version: 4.1.7-wip +version: 4.1.7 description: >- Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST