LWNode_Release_220518_3df4d0e 14/275214/1 submit/tizen/20220518.081418
authorRyan Hyun Choi <ryan.choi@samsung.com>
Wed, 18 May 2022 08:06:25 +0000 (17:06 +0900)
committerRyan Hyun Choi <ryan.choi@samsung.com>
Wed, 18 May 2022 08:06:56 +0000 (17:06 +0900)
Change-Id: Icaf6029947feecb707f9855ae829f7003c443557
Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
365 files changed:
docs/spec.md
lib/buffer.js
lib/internal/lwnode/memory.js [new file with mode: 0644]
lib/internal/lwnode/setup.js
lib/internal/process/per_thread.js
lwnode/apps/service/package.json [new file with mode: 0644]
lwnode/apps/service/src/index.ts [new file with mode: 0644]
lwnode/apps/service/src/service.ts [new file with mode: 0644]
lwnode/apps/sqlite3/.eslintrc.js [new file with mode: 0644]
lwnode/apps/sqlite3/.gitignore [new file with mode: 0644]
lwnode/apps/sqlite3/CMakeLists.txt [new file with mode: 0644]
lwnode/apps/sqlite3/LICENSE [new file with mode: 0644]
lwnode/apps/sqlite3/LICENSE.BOEHM-GC [new file with mode: 0644]
lwnode/apps/sqlite3/LICENSE.BSD-3-Clause [new file with mode: 0644]
lwnode/apps/sqlite3/LICENSE.MIT [new file with mode: 0644]
lwnode/apps/sqlite3/LICENSE.NodeJS [new file with mode: 0644]
lwnode/apps/sqlite3/MAINTAINERS.md [new file with mode: 0644]
lwnode/apps/sqlite3/README.md [new file with mode: 0644]
lwnode/apps/sqlite3/build/build.sh [new file with mode: 0755]
lwnode/apps/sqlite3/build/install.sh [new file with mode: 0755]
lwnode/apps/sqlite3/build/post.sh [new file with mode: 0755]
lwnode/apps/sqlite3/build/sqlite3.manifest [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/js_native_api.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/js_native_api_types.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/napi-inl.deprecated.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/napi-inl.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/napi.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/node_api.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/node_api_types.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/node_internals.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/util-inl.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/util.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/aix.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/android-ifaddrs.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/bsd.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/darwin.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/errno.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/linux.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/os390.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/posix.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/stdint-msvc2008.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/sunos.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/threadpool.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/tree.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/unix.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/version.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/include/uv/win.h [new file with mode: 0644]
lwnode/apps/sqlite3/deps/lwnode/lwnode [new file with mode: 0755]
lwnode/apps/sqlite3/jsconfig.json [new file with mode: 0644]
lwnode/apps/sqlite3/jsdoc.json [new file with mode: 0644]
lwnode/apps/sqlite3/package-lock.json [new file with mode: 0644]
lwnode/apps/sqlite3/package.json [new file with mode: 0644]
lwnode/apps/sqlite3/packaging/node-sqlite3-ep.manifest [new file with mode: 0644]
lwnode/apps/sqlite3/packaging/node-sqlite3-ep.service [new file with mode: 0644]
lwnode/apps/sqlite3/packaging/node-sqlite3-ep.spec [new file with mode: 0644]
lwnode/apps/sqlite3/sample/config.xml [new file with mode: 0644]
lwnode/apps/sqlite3/sample/icon.png [new file with mode: 0644]
lwnode/apps/sqlite3/sample/index.html [new file with mode: 0644]
lwnode/apps/sqlite3/sample/index_node.js [new file with mode: 0644]
lwnode/apps/sqlite3/sample/package.json [new file with mode: 0644]
lwnode/apps/sqlite3/sample/script/lib/mocha.css [new file with mode: 0644]
lwnode/apps/sqlite3/sample/script/lib/mocha.js [new file with mode: 0644]
lwnode/apps/sqlite3/sample/script/lib/mocha.js.map [new file with mode: 0644]
lwnode/apps/sqlite3/sample/styles/style.css [new file with mode: 0644]
lwnode/apps/sqlite3/sample/test.html [new file with mode: 0644]
lwnode/apps/sqlite3/sample/test.js [new file with mode: 0644]
lwnode/apps/sqlite3/sample/tizen-manifest.xml [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/api/api.ctrl.js [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/api/auth.ctrl.js [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/api/index.js [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/api/service.ctrl.js [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/config.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/db/Services.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/db/Users.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/db/dao.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/index.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/log.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/middleware/jwt.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/response.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/rpc.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/rpcerror.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/rpcinspector.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/services.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/socket.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/sqlite3/database.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/sqlite3/error.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/sqlite3/index.js [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/sqlite3/packet.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/sqlite3/statement.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/token.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/utils.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/lib/variables.js [new file with mode: 0644]
lwnode/apps/sqlite3/src/backend/tsconfig.json [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/.eslintrc.js [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/.gitignore [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/jsdoc.json [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/lib/database.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/lib/socket.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/lib/sqlite3.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/lib/statement.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/lib/tsconfig.json [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/lib/utils.ts [new file with mode: 0644]
lwnode/apps/sqlite3/src/frontend/lib/variables.ts [new file with mode: 0644]
lwnode/apps/sqlite3/tools/README.md [new file with mode: 0644]
lwnode/apps/sqlite3/tools/buildlib.sh [new file with mode: 0755]
lwnode/apps/sqlite3/tools/buildtpk.sh [new file with mode: 0755]
lwnode/apps/sqlite3/tools/buildwgt.sh [new file with mode: 0755]
lwnode/apps/sqlite3/tools/certificates/tizen-distributor-partner-manufacturer-signer.p12 [new file with mode: 0644]
lwnode/apps/sqlite3/tools/certificates/tizen_author.p12 [new file with mode: 0644]
lwnode/apps/sqlite3/tools/install-build-tools.sh [new file with mode: 0755]
lwnode/apps/sqlite3/tools/release.sh [new file with mode: 0755]
lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/LICENSE [new file with mode: 0644]
lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/bin/removeNPMAbsolutePaths [new file with mode: 0755]
lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/cli.js [new file with mode: 0644]
lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/errno.js [new file with mode: 0644]
lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/removeNPMAbsolutePaths.js [new file with mode: 0644]
lwnode/apps/sqlite3/tools/run-verification.sh [new file with mode: 0755]
lwnode/apps/sqlite3/tools/sqlite3-filter.txt [new file with mode: 0644]
lwnode/build-cctest.sh
lwnode/build-modules.sh
lwnode/code/escargotshim/deps/escargot/build/escargot.cmake
lwnode/code/escargotshim/deps/escargot/src/api/EscargotPublic.cpp
lwnode/code/escargotshim/deps/escargot/src/api/EscargotPublic.h
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinArray.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinArrayBuffer.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinAsyncFromSyncIterator.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinAsyncFunction.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinAsyncGeneratorFunction.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinAtomics.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinBigInt.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinDate.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinError.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinFinalizationRegistry.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinFunction.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinGeneratorFunction.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinMap.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinPromise.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinRegExp.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinSet.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinSharedArrayBuffer.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinString.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinSymbol.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinWeakMap.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinWeakRef.cpp
lwnode/code/escargotshim/deps/escargot/src/builtins/BuiltinWeakSet.cpp
lwnode/code/escargotshim/deps/escargot/src/codecache/CodeCacheReaderWriter.cpp
lwnode/code/escargotshim/deps/escargot/src/debugger/Debugger.cpp
lwnode/code/escargotshim/deps/escargot/src/debugger/Debugger.h
lwnode/code/escargotshim/deps/escargot/src/debugger/DebuggerTcp.cpp
lwnode/code/escargotshim/deps/escargot/src/heap/CustomAllocator.cpp
lwnode/code/escargotshim/deps/escargot/src/heap/CustomAllocator.h
lwnode/code/escargotshim/deps/escargot/src/interpreter/ByteCode.cpp
lwnode/code/escargotshim/deps/escargot/src/interpreter/ByteCode.h
lwnode/code/escargotshim/deps/escargot/src/interpreter/ByteCodeGenerator.cpp
lwnode/code/escargotshim/deps/escargot/src/interpreter/ByteCodeGenerator.h
lwnode/code/escargotshim/deps/escargot/src/interpreter/ByteCodeInterpreter.cpp
lwnode/code/escargotshim/deps/escargot/src/interpreter/ByteCodeInterpreter.h
lwnode/code/escargotshim/deps/escargot/src/parser/CodeBlock.cpp
lwnode/code/escargotshim/deps/escargot/src/parser/CodeBlock.h
lwnode/code/escargotshim/deps/escargot/src/parser/Script.cpp
lwnode/code/escargotshim/deps/escargot/src/parser/Script.h
lwnode/code/escargotshim/deps/escargot/src/parser/ScriptParser.cpp
lwnode/code/escargotshim/deps/escargot/src/parser/ScriptParser.h
lwnode/code/escargotshim/deps/escargot/src/parser/ast/ForInOfStatementNode.h
lwnode/code/escargotshim/deps/escargot/src/parser/ast/FunctionNode.h
lwnode/code/escargotshim/deps/escargot/src/parser/esprima_cpp/esprima.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/ArrayBuffer.h
lwnode/code/escargotshim/deps/escargot/src/runtime/ArrayBufferObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/ArrayObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/ArrayObject.h
lwnode/code/escargotshim/deps/escargot/src/runtime/Context.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/EncodedValue.h
lwnode/code/escargotshim/deps/escargot/src/runtime/EncodedValueData.h
lwnode/code/escargotshim/deps/escargot/src/runtime/EnumerateObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/EnumerateObject.h
lwnode/code/escargotshim/deps/escargot/src/runtime/EnvironmentRecord.h
lwnode/code/escargotshim/deps/escargot/src/runtime/FunctionObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/FunctionObject.h
lwnode/code/escargotshim/deps/escargot/src/runtime/FunctionObjectInlines.h
lwnode/code/escargotshim/deps/escargot/src/runtime/Global.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/GlobalObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/GlobalObject.h
lwnode/code/escargotshim/deps/escargot/src/runtime/Object.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/Object.h
lwnode/code/escargotshim/deps/escargot/src/runtime/PointerValue.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/PointerValue.h
lwnode/code/escargotshim/deps/escargot/src/runtime/PrototypeObject.cpp [new file with mode: 0644]
lwnode/code/escargotshim/deps/escargot/src/runtime/PrototypeObject.h [new file with mode: 0644]
lwnode/code/escargotshim/deps/escargot/src/runtime/RegExpObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/SandBox.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/ScriptAsyncGeneratorFunctionObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/ScriptFunctionObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/ScriptGeneratorFunctionObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/ScriptSimpleFunctionObject.h
lwnode/code/escargotshim/deps/escargot/src/runtime/SharedArrayBufferObject.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/Template.h
lwnode/code/escargotshim/deps/escargot/src/runtime/VMInstance.cpp
lwnode/code/escargotshim/deps/escargot/src/runtime/VMInstance.h
lwnode/code/escargotshim/deps/escargot/src/runtime/Value.h
lwnode/code/escargotshim/deps/escargot/src/runtime/ValueInlines.h
lwnode/code/escargotshim/deps/escargot/src/shell/Shell.cpp
lwnode/code/escargotshim/deps/node-bindings/include/node_bindings.h
lwnode/code/escargotshim/deps/node-bindings/src/gmainloop_node_bindings.cc
lwnode/code/escargotshim/escargotshim.gyp
lwnode/code/escargotshim/include/lwnode/lwnode.h
lwnode/code/escargotshim/src/api-data.cc
lwnode/code/escargotshim/src/api-environment.cc
lwnode/code/escargotshim/src/api-handles.cc
lwnode/code/escargotshim/src/api-scripts.cc
lwnode/code/escargotshim/src/api.cc
lwnode/code/escargotshim/src/api.h
lwnode/code/escargotshim/src/api/arraybuffer-allocator.h
lwnode/code/escargotshim/src/api/context.cc
lwnode/code/escargotshim/src/api/context.h
lwnode/code/escargotshim/src/api/engine.h
lwnode/code/escargotshim/src/api/es-helper.cc
lwnode/code/escargotshim/src/api/es-helper.h
lwnode/code/escargotshim/src/api/extra-data.h
lwnode/code/escargotshim/src/api/function.cc
lwnode/code/escargotshim/src/api/global-handles.cc
lwnode/code/escargotshim/src/api/global-handles.h
lwnode/code/escargotshim/src/api/global.cc
lwnode/code/escargotshim/src/api/global.h
lwnode/code/escargotshim/src/api/handle.cc
lwnode/code/escargotshim/src/api/handle.h
lwnode/code/escargotshim/src/api/handlescope.cc
lwnode/code/escargotshim/src/api/handlescope.h
lwnode/code/escargotshim/src/api/isolate.cc
lwnode/code/escargotshim/src/api/isolate.h
lwnode/code/escargotshim/src/api/stack-trace.cc
lwnode/code/escargotshim/src/api/stack-trace.h
lwnode/code/escargotshim/src/api/utils.h
lwnode/code/escargotshim/src/api/utils/gc-container.h
lwnode/code/escargotshim/src/api/utils/gc-util.cc [new file with mode: 0644]
lwnode/code/escargotshim/src/api/utils/gc-util.h [new file with mode: 0644]
lwnode/code/escargotshim/src/api/utils/gc-vector.h [deleted file]
lwnode/code/escargotshim/src/api/utils/gc.cc [deleted file]
lwnode/code/escargotshim/src/api/utils/gc.h [deleted file]
lwnode/code/escargotshim/src/api/utils/logger/flags.cc
lwnode/code/escargotshim/src/api/utils/logger/flags.h
lwnode/code/escargotshim/src/api/utils/misc.h
lwnode/code/escargotshim/src/api/utils/sf-vector.h [new file with mode: 0644]
lwnode/code/escargotshim/src/base.h
lwnode/code/escargotshim/src/execution/v8threads.h
lwnode/code/escargotshim/src/lwnode/lwnode.cc
lwnode/modules/device-api/CMakeLists.txt [new file with mode: 0644]
lwnode/modules/device-api/src/DeviceAPIModule.cpp [new file with mode: 0644]
lwnode/modules/device-api/src/Extension.cpp [new file with mode: 0644]
lwnode/modules/device-api/src/Extension.h [new file with mode: 0644]
lwnode/modules/device-api/src/ExtensionAdapter.cpp [new file with mode: 0644]
lwnode/modules/device-api/src/ExtensionAdapter.h [new file with mode: 0644]
lwnode/modules/device-api/src/ExtensionManager.cpp [new file with mode: 0644]
lwnode/modules/device-api/src/ExtensionManager.h [new file with mode: 0644]
lwnode/modules/device-api/src/TizenDeviceAPIBase.h [new file with mode: 0644]
lwnode/modules/device-api/src/TizenDeviceAPILoaderForEscargot.cpp [new file with mode: 0644]
lwnode/modules/device-api/src/TizenDeviceAPILoaderForEscargot.h [new file with mode: 0644]
lwnode/modules/device-api/src/XW_Extension.h [new file with mode: 0644]
lwnode/modules/device-api/src/XW_Extension_Data.h [new file with mode: 0644]
lwnode/modules/device-api/src/XW_Extension_EntryPoints.h [new file with mode: 0644]
lwnode/modules/device-api/src/XW_Extension_Permissions.h [new file with mode: 0644]
lwnode/modules/device-api/src/XW_Extension_Runtime.h [new file with mode: 0644]
lwnode/modules/device-api/src/XW_Extension_SyncMessage.h [new file with mode: 0644]
lwnode/modules/device-api/src/wrt-common-native-plugin.h [new file with mode: 0644]
lwnode/modules/gmain-loop/CMakeLists.txt [new file with mode: 0644]
lwnode/modules/gmain-loop/sample/hello-world.js [new file with mode: 0644]
lwnode/modules/gmain-loop/src/gmain-loop.cc [new file with mode: 0644]
lwnode/pkgs/.clang-format [new file with mode: 0644]
lwnode/pkgs/.gitignore [new file with mode: 0644]
lwnode/pkgs/README.md [new file with mode: 0644]
lwnode/pkgs/apps/beagle/.gitignore [new file with mode: 0644]
lwnode/pkgs/apps/beagle/__tests__/greeter.test.ts [new file with mode: 0644]
lwnode/pkgs/apps/beagle/package-lock.json [new file with mode: 0644]
lwnode/pkgs/apps/beagle/package.json [new file with mode: 0644]
lwnode/pkgs/apps/beagle/src/core/index.ts [new file with mode: 0644]
lwnode/pkgs/apps/beagle/src/core/service-broker.ts [new file with mode: 0644]
lwnode/pkgs/apps/beagle/src/core/service.ts [new file with mode: 0644]
lwnode/pkgs/apps/beagle/src/index.ts [new file with mode: 0644]
lwnode/pkgs/apps/beagle/src/lib/utils.ts [new file with mode: 0644]
lwnode/pkgs/apps/beagle/tsconfig.json [new file with mode: 0644]
lwnode/pkgs/apps/beagle/tslint.json [new file with mode: 0644]
lwnode/pkgs/examples/README.md [new file with mode: 0644]
lwnode/pkgs/examples/async-work/.gitignore [new file with mode: 0644]
lwnode/pkgs/examples/async-work/CMakeLists.txt [new file with mode: 0644]
lwnode/pkgs/examples/async-work/async-work.cc [new file with mode: 0644]
lwnode/pkgs/examples/async-work/include/node_api.h [new file with mode: 0644]
lwnode/pkgs/examples/async-work/include/node_api_types.h [new file with mode: 0644]
lwnode/pkgs/examples/async-work/package.json [new file with mode: 0644]
lwnode/pkgs/examples/async-work/packaging/async-work.manifest [new file with mode: 0644]
lwnode/pkgs/examples/async-work/packaging/async-work.spec [new file with mode: 0644]
lwnode/pkgs/examples/async-work/packaging/gbs.conf [new file with mode: 0644]
lwnode/pkgs/examples/async-work/sample.js [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/CMakeLists.txt [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/README.md [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/hello.cc [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/hello.js [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/include/node_api.h [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/include/node_api_types.h [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/package.json [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/packaging/gbs.tv.conf [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/packaging/node-escargot-addon.manifest [new file with mode: 0644]
lwnode/pkgs/examples/hello-world-node/packaging/node-escargot-addon.spec [new file with mode: 0644]
lwnode/pkgs/modules/app/.gitignore [new file with mode: 0644]
lwnode/pkgs/modules/app/CMakeLists.txt [new file with mode: 0644]
lwnode/pkgs/modules/app/include/common.h [new file with mode: 0644]
lwnode/pkgs/modules/app/include/node_api.h [new file with mode: 0644]
lwnode/pkgs/modules/app/include/node_api_types.h [new file with mode: 0644]
lwnode/pkgs/modules/app/package.json [new file with mode: 0644]
lwnode/pkgs/modules/app/packaging/app-node.manifest [new file with mode: 0644]
lwnode/pkgs/modules/app/packaging/app-node.spec [new file with mode: 0644]
lwnode/pkgs/modules/app/packaging/gbs.conf [new file with mode: 0644]
lwnode/pkgs/modules/app/src/app.cc [new file with mode: 0644]
lwnode/pkgs/modules/app/src/common.cc [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/.gitignore [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/CMakeLists.txt [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/include/common.h [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/include/node_api.h [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/include/node_api_types.h [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/index.js [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/package.json [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/packaging/audio-player-node.manifest [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/packaging/audio-player-node.spec [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/packaging/gbs.conf [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/audio_player.cc [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/audio_player.h [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/audio_player_module.cc [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/audio_player_sample.cc [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/audio_player_sample.h [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/bridge/bridge.h [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/bridge/bridge_async.h [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/bridge/service.cc [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/bridge/service.h [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/tizen_audio_io.cc [new file with mode: 0644]
lwnode/pkgs/modules/audio-player-node/src/tizen_audio_player.cc [new file with mode: 0644]
lwnode/pkgs/template/rpm/CMakeLists.txt [new file with mode: 0644]
lwnode/pkgs/template/rpm/README.md [new file with mode: 0644]
lwnode/pkgs/template/rpm/include/node_api.h [new file with mode: 0644]
lwnode/pkgs/template/rpm/include/node_api_types.h [new file with mode: 0644]
lwnode/pkgs/template/rpm/include/node_escargot.h [new file with mode: 0644]
lwnode/pkgs/template/rpm/lib/index.js [new file with mode: 0644]
lwnode/pkgs/template/rpm/packaging/helloworld.manifest [new file with mode: 0644]
lwnode/pkgs/template/rpm/packaging/helloworld.service [new file with mode: 0644]
lwnode/pkgs/template/rpm/packaging/helloworld.spec [new file with mode: 0644]
lwnode/pkgs/template/rpm/src/main.cc [new file with mode: 0644]
lwnode/pkgs/template/tpk/.gitignore [new file with mode: 0644]
lwnode/pkgs/template/tpk/CMakeLists.txt [new file with mode: 0644]
lwnode/pkgs/template/tpk/README.md [new file with mode: 0644]
lwnode/pkgs/template/tpk/include/node_api.h [new file with mode: 0644]
lwnode/pkgs/template/tpk/include/node_api_types.h [new file with mode: 0644]
lwnode/pkgs/template/tpk/include/node_escargot.h [new file with mode: 0644]
lwnode/pkgs/template/tpk/index.js [new file with mode: 0644]
lwnode/pkgs/template/tpk/lib/helloworld.js [new file with mode: 0644]
lwnode/pkgs/template/tpk/package.json [new file with mode: 0644]
lwnode/pkgs/template/tpk/packaging/helloworld.spec [new file with mode: 0644]
lwnode/pkgs/template/tpk/packaging/tizen-distributor-partner-manufacturer-signer.p12 [new file with mode: 0644]
lwnode/pkgs/template/tpk/packaging/tizen_author.p12 [new file with mode: 0644]
lwnode/pkgs/template/tpk/packaging/x.manifest [new file with mode: 0644]
lwnode/pkgs/template/tpk/src/main.cc [new file with mode: 0644]
lwnode/pkgs/template/tpk/tizen-manifest.xml [new file with mode: 0644]
node.gyp
packaging/lwnode.spec
src/lwnode_api.h [new file with mode: 0644]
src/node.cc
src/node_api.cc
src/node_main_lw_runner-inl.h

index 3ed5100aabd96f5b99000dc6d478f028ab2e3ec9..efa94059ece0df97f2e11a28dca9ec2d0b884f3f 100644 (file)
@@ -1,68 +1,80 @@
 # Lightweight Node.js Specification
 
-* Forked version: 14.14
+## Node.js
+  * Forked version: 14.14
+## Supported Features
+  * [Assertion](https://nodejs.org/dist/latest-v14.x/docs/api/assert.html)
+  * [Async hooks](https://nodejs.org/dist/latest-v14.x/docs/api/async_hooks.html)
+  * [Buffer](https://nodejs.org/dist/latest-v14.x/docs/api/buffer.html)
+  * [C/C++ addons with Node-API](https://nodejs.org/dist/latest-v14.x/docs/api/n-api.html)
+  * [Child processes](https://nodejs.org/dist/latest-v14.x/docs/api/child_process.html)
+  * [Cluster](https://nodejs.org/dist/latest-v14.x/docs/api/cluster.html)
+  * [Command-line options](https://nodejs.org/dist/latest-v14.x/docs/api/cli.html)
+  * [Console](https://nodejs.org/dist/latest-v14.x/docs/api/console.html)
+  * [Crypto](https://nodejs.org/dist/latest-v14.x/docs/api/crypto.html)
+  * [DNS](https://nodejs.org/dist/latest-v14.x/docs/api/dns.html)
+  * [Domain](https://nodejs.org/dist/latest-v14.x/docs/api/domain.html)
+  * [Errors](https://nodejs.org/dist/latest-v14.x/docs/api/errors.html)
+  * [Events](https://nodejs.org/dist/latest-v14.x/docs/api/events.html)
+  * [File system](https://nodejs.org/dist/latest-v14.x/docs/api/fs.html)
+  * [Globals](https://nodejs.org/dist/latest-v14.x/docs/api/globals.html)
+  * [HTTP](https://nodejs.org/dist/latest-v14.x/docs/api/http.html)
+  * [HTTP/2](https://nodejs.org/dist/latest-v14.x/docs/api/http2.html)
+  * [HTTPS](https://nodejs.org/dist/latest-v14.x/docs/api/https.html)
+  * [Modules: CommonJS modules](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html)
+  * [Net](https://nodejs.org/dist/latest-v14.x/docs/api/net.html)
+  * [OS](https://nodejs.org/dist/latest-v14.x/docs/api/os.html)
+  * [Path](https://nodejs.org/dist/latest-v14.x/docs/api/path.html)
+  * [Process](https://nodejs.org/dist/latest-v14.x/docs/api/process.html)
+  * [Punycode](https://nodejs.org/dist/latest-v14.x/docs/api/punycode.html)
+  * [Query strings](https://nodejs.org/dist/latest-v14.x/docs/api/querystring.html)
+  * [Readline](https://nodejs.org/dist/latest-v14.x/docs/api/readline.html)
+  * [Stream](https://nodejs.org/dist/latest-v14.x/docs/api/stream.html)
+  * [String decoder](https://nodejs.org/dist/latest-v14.x/docs/api/string_decoder.html)
+  * [Timers](https://nodejs.org/dist/latest-v14.x/docs/api/timers.html)
+  * [TLS/SSL](https://nodejs.org/dist/latest-v14.x/docs/api/tls.html)
+  * [TTY](https://nodejs.org/dist/latest-v14.x/docs/api/tty.html)
+  * [UDP/datagram](https://nodejs.org/dist/latest-v14.x/docs/api/dgram.html)
+  * [URL](https://nodejs.org/dist/latest-v14.x/docs/api/url.html)
+  * [Utilities](https://nodejs.org/dist/latest-v14.x/docs/api/util.html)
+  * [Zlib](https://nodejs.org/dist/latest-v14.x/docs/api/zlib.html)
 
-* Node.js APIs
-  - Supported Features
-    - [Assertion](https://nodejs.org/dist/latest-v14.x/docs/api/assert.html)
-    - [Buffer](https://nodejs.org/dist/latest-v14.x/docs/api/buffer.html)
-    - [C/C++ addons with Node-API](https://nodejs.org/dist/latest-v14.x/docs/api/n-api.html)
-    - [Console](https://nodejs.org/dist/latest-v14.x/docs/api/console.html)
-    - [Crypto](https://nodejs.org/dist/latest-v14.x/docs/api/crypto.html)
-    - [DNS](https://nodejs.org/dist/latest-v14.x/docs/api/dns.html)
-    - [Errors](https://nodejs.org/dist/latest-v14.x/docs/api/errors.html)
-    - [Events](https://nodejs.org/dist/latest-v14.x/docs/api/events.html)
-    - [File system](https://nodejs.org/dist/latest-v14.x/docs/api/fs.html)
-    - [Globals](https://nodejs.org/dist/latest-v14.x/docs/api/globals.html)
-    - [HTTP](https://nodejs.org/dist/latest-v14.x/docs/api/http.html)
-    - [HTTPS](https://nodejs.org/dist/latest-v14.x/docs/api/https.html)
-    - [Modules: CommonJS modules](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html)
-    - [Net](https://nodejs.org/dist/latest-v14.x/docs/api/net.html)
-    - [OS](https://nodejs.org/dist/latest-v14.x/docs/api/os.html)
-    - [Path](https://nodejs.org/dist/latest-v14.x/docs/api/path.html)
-    - [Process](https://nodejs.org/dist/latest-v14.x/docs/api/process.html)
-    - [Query strings](https://nodejs.org/dist/latest-v14.x/docs/api/querystring.html)
-    - [Stream](https://nodejs.org/dist/latest-v14.x/docs/api/stream.html)
-    - [String decoder](https://nodejs.org/dist/latest-v14.x/docs/api/string_decoder.html)
-    - [Timers](https://nodejs.org/dist/latest-v14.x/docs/api/timers.html)
-    - [TLS/SSL](https://nodejs.org/dist/latest-v14.x/docs/api/tls.html)
-    - [UDP/datagram](https://nodejs.org/dist/latest-v14.x/docs/api/dgram.html)
-    - [URL](https://nodejs.org/dist/latest-v14.x/docs/api/url.html)
-    - [Utilities](https://nodejs.org/dist/latest-v14.x/docs/api/util.html)
-    - [Zlib](https://nodejs.org/dist/latest-v14.x/docs/api/zlib.html)
-  - Supported (Possibly) but Not Opened Features
-    - Experimental
-      - [Async hooks](https://nodejs.org/dist/latest-v14.x/docs/api/async_hooks.html)
-      - [Modules: ECMAScript modules](https://nodejs.org/dist/latest-v14.x/docs/api/esm.html)
-      - [Modules: `module` API](https://nodejs.org/dist/latest-v14.x/docs/api/module.html)
-      - [Modules: Packages](https://nodejs.org/dist/latest-v14.x/docs/api/packages.html)
-    - Deprecated
-      - [Domain](https://nodejs.org/dist/latest-v14.x/docs/api/domain.html)
-      - [Punycode](https://nodejs.org/dist/latest-v14.x/docs/api/punycode.html)
-    - [Command-line options](https://nodejs.org/dist/latest-v14.x/docs/api/cli.html)
-    - [Child processes](https://nodejs.org/dist/latest-v14.x/docs/api/child_process.html)
-    - [Cluster](https://nodejs.org/dist/latest-v14.x/docs/api/cluster.html)
-    - [HTTP/2](https://nodejs.org/dist/latest-v14.x/docs/api/http2.html)
-    - [Internationalization](https://nodejs.org/dist/latest-v14.x/docs/api/intl.html)
-    - [Readline](https://nodejs.org/dist/latest-v14.x/docs/api/readline.html)
-    - [REPL](https://nodejs.org/dist/latest-v14.x/docs/api/repl.html)
-    - [TTY](https://nodejs.org/dist/latest-v14.x/docs/api/tty.html)
-  - Unsupported Features
-    - Experimental
-      - [WASI](https://nodejs.org/dist/latest-v14.x/docs/api/wasi.html)
-      - [Policies](https://nodejs.org/dist/latest-v14.x/docs/api/policy.html)
-      - [Trace events](https://nodejs.org/dist/latest-v14.x/docs/api/tracing.html)
-    - [C++ addons](https://nodejs.org/dist/latest-v14.x/docs/api/addons.html)
-    - [C++ embedder API](https://nodejs.org/dist/latest-v14.x/docs/api/embedding.html)
-    - [Debugger](https://nodejs.org/dist/latest-v14.x/docs/api/debugger.html)
-    - [Deprecated APIs](https://nodejs.org/dist/latest-v14.x/docs/api/deprecations.html)
-    - [Worker threads](https://nodejs.org/dist/latest-v14.x/docs/api/worker_threads.html)
-    - [Diagnostics Channel](https://nodejs.org/dist/latest-v14.x/docs/api/diagnostics_channel.html)
-    - [Inspector](https://nodejs.org/dist/latest-v14.x/docs/api/inspector.html)
-    - [Report](https://nodejs.org/dist/latest-v14.x/docs/api/report.html)
-    - [V8](https://nodejs.org/dist/latest-v14.x/docs/api/v8.html)
-    - [VM](https://nodejs.org/dist/latest-v14.x/docs/api/vm.html)
-    - [Performance hooks](https://nodejs.org/dist/latest-v14.x/docs/api/perf_hooks.html)
+## Experimental (with optional runtime flags)
+  * [Deprecated APIs](https://nodejs.org/dist/latest-v14.x/docs/api/deprecations.html)
+  * [REPL](https://nodejs.org/dist/latest-v14.x/docs/api/repl.html)
+  * [Worker threads](https://nodejs.org/dist/latest-v14.x/docs/api/worker_threads.html)
+## Experimental (with compile options)
+  * [Modules: ECMAScript modules](https://nodejs.org/dist/latest-v14.x/docs/api/esm.html)
+  * [Modules: `module` API](https://nodejs.org/dist/latest-v14.x/docs/api/module.html)
+  * [Modules: Packages](https://nodejs.org/dist/latest-v14.x/docs/api/packages.html)
+  * [Internationalization](https://nodejs.org/dist/latest-v14.x/docs/api/intl.html)
 
-* ECMAScript
+## Unsupported Features
+  * [C++ addons](https://nodejs.org/dist/latest-v14.x/docs/api/addons.html)
+  * [C++ embedder API](https://nodejs.org/dist/latest-v14.x/docs/api/embedding.html)
+  * [Debugger](https://nodejs.org/dist/latest-v14.x/docs/api/debugger.html): Specific to V8. Debugging is supported via VS Code.
+  * [Inspector](https://nodejs.org/dist/latest-v14.x/docs/api/inspector.html): Specific to V8
+  * [Performance hooks](https://nodejs.org/dist/latest-v14.x/docs/api/perf_hooks.html): Specific to V8
+  * [Policies](https://nodejs.org/dist/latest-v14.x/docs/api/policy.html)
+  * [Report](https://nodejs.org/dist/latest-v14.x/docs/api/report.html): Specific to V8
+  * [Trace events](https://nodejs.org/dist/latest-v14.x/docs/api/tracing.html): Specific to V8
+  * [V8](https://nodejs.org/dist/latest-v14.x/docs/api/v8.html): Specific to V8
+  * [VM](https://nodejs.org/dist/latest-v14.x/docs/api/vm.html)
+  * [WASI](https://nodejs.org/dist/latest-v14.x/docs/api/wasi.html)
+
+## Design Decisions and Known Issues
+  * V8's implementation-specific internal APIs are not supported, e.g., Modules, etc.
+  * Due to different GC models, V8's GC-related operations are not supported. Memory management is achieved by lwnode's automatic GC.
+  * Supported user flags are: `--exposed-gc`, `--disallow-code-generation-from-strings`. User flags specific to V8's internal APIs are not supported, e.g., `--max_old_space_size`, etc.
+  * `vm` and `repl`  are not supported for security reasons.
+  * All literal strings are encoded in UTF16, when JS source has been encoded in UTF16.
+  * Known Issues:
+    - In some cases, an async hook ID is set to null.
+    - In some cases, an error message format is slightly different from node.js's error message, although it contains the same information.
+    - In some cases, an event listener cannot receive an event thrown by a child process.
+    - In some cases, a child process cannot obtain values from `process.env`.
+    - `Worker` is experimental. It should be used with caution.
+    - `ValueSerializer` is experimental. It should be used with caution.
+
+## ECMAScript
   * [node.green](https://node.green/) provides an overview over supported ECMAScript features in our target version of Node.js, `v14.14`.
index d05f0bc61ae2bb63df0b1cd34bde75ec5331510c..07f7161cda9d6afdc0121b733bbb8844f8f15f4d 100644 (file)
@@ -178,18 +178,6 @@ const bufferWarning = 'Buffer() is deprecated due to security and usability ' +
                       'Buffer.allocUnsafe(), or Buffer.from() methods instead.';
 
 function showFlaggedDeprecation() {
-  // @lwnode
-  // @fixme force depress DeprecationWarning until isInsideNodeModules works
-  if (bufferWarningAlreadyEmitted ||
-    ++nodeModulesCheckCounter > 10000 ||
-    (!require('internal/options').getOptionValue('--pending-deprecation'))) {
-    return;
-  }
-
-  process.emitWarning(bufferWarning, 'DeprecationWarning', 'DEP0005');
-  bufferWarningAlreadyEmitted = true;
-  return;
-
   if (bufferWarningAlreadyEmitted ||
       ++nodeModulesCheckCounter > 10000 ||
       (!require('internal/options').getOptionValue('--pending-deprecation') &&
diff --git a/lib/internal/lwnode/memory.js b/lib/internal/lwnode/memory.js
new file mode 100644 (file)
index 0000000..37018cd
--- /dev/null
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 2022-present Samsung Electronics Co., Ltd
+ *
+ * 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.
+ */
+
+const EventEmitter = require('events');
+const rawMethods = internalBinding('process_methods');
+
+/**
+ * @typedef {object} FileSizeOption
+ * @property {number} [fractionalDigits=2]
+ * @property {boolean} [signed=false]
+ */
+
+/**
+ * @typedef {object} LeakRecord
+ * @property {Date} time
+ * @property {MemoryStats} stats
+ */
+
+/** @type {number} msec time for idle GC interval time */
+const kGcInterval = 5000;
+
+/**
+ * Converts a number into a human-readable string
+ * @param {number} size number
+ * @param {FileSizeOption?} options
+ * @return {string} human-readable string
+ */
+function getHumanSize(size, { fractionalDigits = 2, signed = false } = {}) {
+  let isNegative = size < 0;
+  let abs = Math.abs(size);
+  let i = abs == 0 ? 0 : Math.floor(Math.log(abs) / Math.log(1024));
+  return (
+    `${isNegative ? '-' : signed ? '+' : ''}` +
+    `${(abs / Math.pow(1024, i)).toFixed(fractionalDigits)} ${
+      ['B', 'kB', 'MB', 'GB', 'TB'][i]
+    }`
+  );
+}
+
+/**
+ * @param {number} size number
+ * @param {FileSizeOption?} options
+ * @return {[string,number]} [human-readable string, the given size]
+ */
+function formatMemStats(size, option) {
+  return [getHumanSize(size, option), size];
+}
+
+/**
+ * @typedef {object} MemoryStats
+ * @property {[string,number]} heap
+ * @property {[string,number]} unmapped
+ * @property {[string,number]} sinceLastGc
+ */
+
+/**
+ * @param {{
+ *  heapSize: number,
+ *  bytesSinceGC: number,
+ *  unmappedBytes: number,
+ *  }} [stats=] if undefined, gc stats from native bindings is used.
+ * @return {MemoryStats}
+ */
+function createMemStats(stats = rawMethods.getGCMemoryStats()) {
+  return {
+    heap: formatMemStats(stats.heapSize),
+    sinceLastGc: formatMemStats(stats.bytesSinceGC),
+    unmapped: formatMemStats(stats.unmappedBytes),
+  };
+}
+
+class MemDiff {
+  #last;
+  #cur;
+  #max;
+
+  /** @type {MemoryStats} */
+  static zero = createMemStats({
+    heapSize: 0,
+    unmappedBytes: 0,
+    bytesSinceGC: 0,
+  });
+
+  constructor() {
+    /** @type {MemoryStats} */
+    this.#last = MemDiff.zero;
+    /** @type {MemoryStats} */
+    this.#cur = MemDiff.zero;
+    /** @type {MemoryStats} */
+    this.#max = MemDiff.zero;
+  }
+
+  /**
+   * check the current stats and return the result
+   * @return {CheckedResult}
+   */
+  check() {
+    this.#last = this.#cur;
+    this.#cur = createMemStats();
+    this.#max = createMemStats({
+      heapSize: Math.max(this.#cur.heap[1], this.#max.heap[1]),
+      unmappedBytes: Math.max(this.#cur.unmapped[1], this.#max.unmapped[1]),
+      bytesSinceGC: Math.max(
+        this.#cur.sinceLastGc[1],
+        this.#max.sinceLastGc[1],
+      ),
+    });
+
+    /** @type {FileSizeOption} */
+    const heap = this.#cur.heap[1] - this.#last.heap[1];
+    const unmapped = this.#cur.unmapped[1] - this.#last.unmapped[1];
+    const sinceLastGc = this.#cur.sinceLastGc[1] - this.#last.sinceLastGc[1];
+    const option = { signed: true, fractionalDigits: 2 };
+
+    /**
+     * @typedef {object} CheckedResult
+     * @property {MemoryStats} max
+     * @property {MemoryStats} last
+     * @property {MemoryStats} current
+     * @property {MemoryStats} change
+     */
+    return {
+      max: Object.assign({}, this.#max),
+      last: Object.assign({}, this.#last),
+      current: Object.assign({}, this.#cur),
+      change: {
+        heap: formatMemStats(heap, option),
+        unmapped: formatMemStats(unmapped, option),
+        sinceLastGc: formatMemStats(sinceLastGc, option),
+      },
+    };
+  }
+}
+
+/**
+ * @typedef {object} TrackRecord
+ * @property {number} value
+ * @property {Date} time
+ */
+
+/**
+ * @callback OnMaxUpdated
+ * @param {{
+ *  growth: number,
+ *  current: number,
+ *  count: number,
+ *  elapsed: number,
+ * }}
+ */
+
+class ValueTracker {
+  #onMaxUpdated;
+  #maxIgnoreCount;
+  #records;
+  #count;
+  /**
+   * @param {number} maxIgnoreCount
+   * @param {{ onMaxUpdated: OnMaxUpdated }}
+   */
+  constructor(maxIgnoreCount = 2, { onMaxUpdated }) {
+    if (typeof onMaxUpdated != 'function') {
+      throw new TypeError('emitter');
+    }
+    /** @type {OnMaxUpdated} */
+    this.#onMaxUpdated = onMaxUpdated;
+    /** @type {number} */
+    this.#maxIgnoreCount = Math.max(maxIgnoreCount, 2);
+    /** @type {TrackRecord[]} */
+    this.#records = [];
+    /** @type {number} */
+    this.#count = 0;
+  }
+
+  /**
+   * @param {number} current a value to update
+   */
+  update(current) {
+    if (this.#records.length == 0) {
+      this.#addRecord(current);
+      return;
+    }
+
+    const { value: last } = this.#records.slice(-1)[0];
+
+    if (current > last) {
+      if (++this.#count >= this.#maxIgnoreCount) {
+        const now = new Date();
+        const { value: base, time: basetime } = this.#records[0];
+        const growth = current - base;
+        const elapsed = Math.round((now - basetime) / 1000);
+
+        this.#onMaxUpdated({ growth, current, count: this.#count, elapsed });
+
+        this.reset();
+        this.#addRecord(current, now);
+      } else {
+        this.#addRecord(current);
+      }
+    }
+  }
+
+  reset() {
+    this.#records = [];
+    this.#count = 0;
+  }
+
+  #addRecord(value, time = new Date()) {
+    this.#records.push({ value, time });
+  }
+}
+
+class MemWatcher extends EventEmitter {
+  #statsTimerId;
+  #delay;
+  #diff;
+  #tracker;
+
+  /**
+   * @param {number} delay heap size (bytes)
+   * @param {EventEmitter} emitter
+   */
+  constructor({ delay = kGcInterval, maxIgnoreCount = 2 } = {}) {
+    super([arguments]);
+
+    this.#delay = delay;
+    this.#statsTimerId = null;
+    this.#diff = new MemDiff();
+    this.#tracker = new ValueTracker(maxIgnoreCount, {
+      onMaxUpdated: ({ growth, current, count, elapsed }) => {
+        this.emit('max', {
+          reason: `Max value growth occurred ${count} times over ${elapsed}s`,
+          change: [getHumanSize(growth, { signed: true }), growth],
+          currentMax: [getHumanSize(current), current],
+        });
+      },
+    });
+
+    this.setMaxListeners(5);
+    this.on('newListener', this.#onnewListener);
+    this.on('removeListener', this.#onremoveListener);
+  }
+
+  end() {
+    if (this.#statsTimerId) {
+      clearInterval(this.#statsTimerId);
+      this.#statsTimerId = null;
+    }
+  }
+
+  #hasListener() {
+    return ['stats', 'max'].some((event) => this.listeners(event).length > 0);
+  }
+
+  #onnewListener(event) {
+    switch (event) {
+      case 'max':
+      case 'stats':
+        if (this.#hasListener() == false) {
+          this.#statsTimerId = setInterval(() => {
+            let current = this.#diff.check();
+            this.emit('stats', current);
+
+            if (this.listeners('max').length) {
+              this.#tracker.update(current.max.heap[1]);
+            }
+          }, this.#delay);
+        }
+        break;
+      default:
+        break;
+    }
+  }
+
+  #onremoveListener(event) {
+    switch (event) {
+      case 'max':
+        this.#tracker.reset();
+      // fall-through
+      case 'stats':
+        if (this.#hasListener() == false) {
+          this.end();
+        }
+        break;
+      default:
+        break;
+    }
+  }
+}
+
+module.exports = {
+  MemWatcher,
+  MemDiff,
+};
index c9a9caa8298f2d9cd899ffe1c19c64589e4f99f3..e2392e6c978e8c127feb23693b989698abff1588 100644 (file)
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+const { MemWatcher, MemDiff } = require("internal/lwnode/memory");
+
 const useEscargot = process.config.variables.javascript_engine == "escargot";
 const isDebugBuild =
   process.config.target_defaults.default_configuration == "Debug";
@@ -22,7 +24,7 @@ const isDebugBuild =
 const disabledFeatures = new Set(["WASI"]);
 
 // @note 'binding' is process module binding
-function createProcessEntry(binding) {
+function wrapLWNodeMethods(binding) {
   function _internalLog(...args) {
     if (binding.print) {
       binding.print.apply(null, args);
@@ -43,6 +45,8 @@ function createProcessEntry(binding) {
         binding.print.stack.apply(null, args);
       }
     },
+    MemWatcher,
+    MemDiff,
     PssUsage: (...args) => {
       if (binding.PssUsage) {
         return binding.PssUsage.apply(null, args);
@@ -89,5 +93,5 @@ function createProcessEntry(binding) {
 }
 
 module.exports = {
-  createProcessEntry,
+  wrapLWNodeMethods,
 };
index d02fc480b7332cbbaf84a7ecdac94ade0976b9e1..01bcf8648e9bbf6f5a0cf448b7ae4582831942b7 100644 (file)
@@ -230,7 +230,7 @@ function wrapProcessMethods(binding) {
 
   return {
     // @lwnode
-    lwnode: lwnodeSetup.createProcessEntry(binding),
+    lwnode: lwnodeSetup.wrapLWNodeMethods(binding),
     _rawDebug,
     hrtime,
     hrtimeBigInt,
diff --git a/lwnode/apps/service/package.json b/lwnode/apps/service/package.json
new file mode 100644 (file)
index 0000000..9c07f79
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name": "service",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "express": "4.17.1",
+    "express-asyncify": "^1.0.1",
+    "knex": "^0.95.15"
+  }
+}
diff --git a/lwnode/apps/service/src/index.ts b/lwnode/apps/service/src/index.ts
new file mode 100644 (file)
index 0000000..6185d56
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+const express = require('express');
+const asyncify = require('express-asyncify');
+import { Services } from './services';
+
+const app = asyncify(express());
+startService(app);
+
+async function startService(app) {
+  const router = express.Router();
+  const serviceRouter = express.Router();
+  app.use(router);
+  router.use('/service', serviceRouter);
+
+  const services = Services.getInstance();
+  app.set('view engine', services.getViewEngine());
+  services.start(serviceRouter);
+}
diff --git a/lwnode/apps/service/src/service.ts b/lwnode/apps/service/src/service.ts
new file mode 100644 (file)
index 0000000..969f59a
--- /dev/null
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+
+import { Router } from 'express';
+import { Knex } from 'knex';
+
+const State = {
+  RUN: 'run',
+  STOP: 'stop'
+} as const;
+type State = typeof State[keyof typeof State];
+
+class ServiceData {
+  public readonly name: string;
+  public path: string;
+  public version: string;
+  public summary: string;
+
+  constructor(name: string, path: string, version: string, summary: string) {
+    this.name = name;
+    this.path = path;
+    this.version = version;
+    this.summary = summary;
+  }
+}
+
+export class Service {
+  private serviceData: ServiceData;
+  public state: State;
+
+  constructor(serviceData: ServiceData, router: Router) {
+    this.serviceData = serviceData;
+    this.state = State.STOP;
+
+    router.get(`/${this.serviceData.name}`, (req, res) => {
+      console.log(`${this.serviceData.name} state is ${this.state}.`);
+
+      if (this.state === State.RUN) {
+        console.log(`render service: ${this.serviceData.name}: ${this.serviceData.path}`);
+        res.render(this.serviceData.path, { name: this.serviceData.name });
+      } else {
+        res.status(404).send('not found');
+      }
+    });
+  }
+
+  public setPath(path: string) {
+    this.serviceData.path = path;
+  }
+
+  public run() {
+    if (this.state === State.RUN) {
+      return;
+    }
+
+    console.log(`run service: ${this.serviceData.name}(${this.serviceData.path})`);
+
+    this.state = State.RUN;
+  }
+
+  public stop() {
+    if (this.state === State.STOP) {
+      return;
+    }
+
+    console.log(`stop service: ${this.serviceData.name}`);
+
+    this.state = State.STOP;
+  }
+}
+
+export class ServiceDB {
+  private knex: Knex;
+  private dbName: string;
+  private dbTable: string;
+
+  constructor() {
+    this.dbName = 'service_app.db';
+    this.dbTable = 'service';
+
+    this.knex = require('knex')({
+      client: 'sqlite3',
+      connection: {
+          filename: this.dbName,
+      }
+    });
+  }
+
+  public ensureTable() {
+    return this.knex.schema.hasTable('service').then((exists) => {
+      if (!exists) {
+        return this.knex.schema.createTable('service', (table) => {
+          table.string('name').primary();
+          table.string('path').unique();
+          table.string('version');
+          table.string('summary')
+        })
+          .then(() => {
+            console.log(`${'service'} table is created`);
+          });
+      }
+    });
+  }
+
+  async insertDataInDB(data: ServiceData) {
+    await this.ensureTable();
+    return this.knex(this.dbTable).insert({
+      name: data.name, path: data.path, version: data.version, summary: data.summary
+    });
+  }
+
+  async getDataByNameFromDB(name: string) {
+    await this.ensureTable();
+    return this.knex(this.dbTable)
+      .where('name', name)
+      .then((result) => {
+        if (result.length) {
+          return result[0];
+        }
+      });
+  }
+
+  async getServiceData() {
+    await this.ensureTable();
+    return this.knex(this.dbTable).select('*');
+  }
+}
+
+export class Services {
+  private static instance: Services;
+  private router: Router;
+  private appList: Map<string, Service>;
+  private viewEngine: string;
+  private isRunning: boolean;
+  private serviceDB: ServiceDB;
+
+  constructor() {
+    this.appList = new Map<string, Service>();
+    this.viewEngine = 'ejs';
+    this.isRunning = false;
+  }
+
+  public static getInstance(): Services {
+    return this.instance || (this.instance = new this())
+  }
+
+  public getViewEngine(): string {
+    return this.viewEngine;
+  }
+
+  public async start(router: Router) {
+    this.router = router;
+    this.isRunning = true;
+
+    try {
+      const servicesData = this.serviceDB.getServiceData();
+
+      servicesData.forEach(function (data) {
+        this.addService(data);
+      }, this);
+    } catch(e) {
+      console.log('cannot start service app.');
+    }
+  }
+
+  public addService(name: string, path: string, version: string, summary: string) {
+    if (!this.isRunning) {
+      throw new Error("Service is not start!");
+    }
+
+    let service;
+    if (this.appList.has(name)) {
+      throw new Error("Cannot add service: exist service name");
+    } else {
+      let data = new ServiceData(name, path, version, summary)
+      service = new Service(data, this.router);
+      this.appList.set(name, service);
+      this.serviceDB.insertDataInDB(data);
+    }
+
+    service.run();
+  }
+
+  public getService(name: string) {
+    if (this.appList.has(name)) {
+      let service = this.serviceDB.getDataByNameFromDB(name);
+      if (!service) {
+        throw new Error("Cannot get service")
+      }
+    }
+    return this.appList.get(name);
+  }
+}
+
+export default Services;
diff --git a/lwnode/apps/sqlite3/.eslintrc.js b/lwnode/apps/sqlite3/.eslintrc.js
new file mode 100644 (file)
index 0000000..a058e65
--- /dev/null
@@ -0,0 +1,13 @@
+module.exports = {
+  env: {
+    browser: false,
+    commonjs: true,
+    node: true,
+  },
+  extends: ['airbnb-base', 'plugin:prettier/recommended'],
+  ignorePatterns: ['node_modules/'],
+  rules: {
+    'global-require': 0,
+    'no-console': 0,
+  },
+};
diff --git a/lwnode/apps/sqlite3/.gitignore b/lwnode/apps/sqlite3/.gitignore
new file mode 100644 (file)
index 0000000..d4d68a8
--- /dev/null
@@ -0,0 +1,15 @@
+.vscode
+.buildResult
+node_modules
+
+.cache
+*.wgt
+dist
+out
+docs
+release
+download
+.nyc_output
+
+CMakeCache.txt
+CMakeFiles/*
diff --git a/lwnode/apps/sqlite3/CMakeLists.txt b/lwnode/apps/sqlite3/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8a20ada
--- /dev/null
@@ -0,0 +1,76 @@
+#
+# Copyright 2021-present Samsung Electronics Co., Ltd.
+#
+# 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.
+#
+
+cmake_minimum_required (VERSION 2.8)
+project(node_sqlite3)
+
+set(SQLITE3_ROOT node_modules/sqlite3)
+set(BUILD_MODE "release" CACHE STRING "BUILD_MODE")
+
+# Source Files
+file(GLOB_RECURSE SQLITE3_SRC_FILES ${SQLITE3_ROOT}/src/*.cc)
+
+# Include Paths
+set(SQLITE3_INC_PATHS
+    src
+    deps/include
+)
+
+# Options
+set(SQLITE3_FLAGS
+    -std=gnu++11
+    -g
+    -fstack-protector
+    -fdata-sections
+    -ffunction-sections
+    -Wno-format
+)
+if(${BUILD_MODE} STREQUAL debug)
+    list(APPEND SQLITE3_FLAGS
+        -O0
+    )
+elseif(${BUILD_MODE} STREQUAL release)
+    list(APPEND SQLITE3_FLAGS
+        -O3
+    )
+endif()
+
+
+# Defines
+set(SQLITE3_DEFINES
+    BUILDING_NODE_EXTENSION=1
+)
+if(${BUILD_MODE} STREQUAL debug)
+    list(APPEND SQLITE3_DEFINES
+        _GLIBCXX_DEBUG
+        GC_DEBUG
+        DEBUG
+    )
+elseif(${BUILD_MODE} STREQUAL release)
+    list(APPEND SQLITE3_DEFINES
+        NDEBUG)
+endif()
+
+# Library
+find_library(LIB_SQLITE3 NAMES sqlite3)
+
+# Target
+add_library(${PROJECT_NAME} SHARED ${SQLITE3_SRC_FILES})
+target_include_directories(${PROJECT_NAME} PUBLIC ${SQLITE3_INC_PATHS})
+target_compile_options(${PROJECT_NAME} PUBLIC ${SQLITE3_FLAGS})
+target_compile_definitions(${PROJECT_NAME} PUBLIC ${SQLITE3_DEFINES})
+target_link_libraries(${PROJECT_NAME} PUBLIC ${LIB_SQLITE3})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
diff --git a/lwnode/apps/sqlite3/LICENSE b/lwnode/apps/sqlite3/LICENSE
new file mode 100644 (file)
index 0000000..f433b1a
--- /dev/null
@@ -0,0 +1,177 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
diff --git a/lwnode/apps/sqlite3/LICENSE.BOEHM-GC b/lwnode/apps/sqlite3/LICENSE.BOEHM-GC
new file mode 100644 (file)
index 0000000..0a7cc7a
--- /dev/null
@@ -0,0 +1,30 @@
+Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers
+Copyright (c) 1991-1996 by Xerox Corporation.  All rights reserved.
+Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
+
+The file linux_threads.c is also
+Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+
+The files Makefile.am, and configure.in are
+Copyright (c) 2001 by Red Hat Inc. All rights reserved.
+
+Several files supporting GNU-style builds are copyrighted by the Free
+Software Foundation, and carry a different license from that given
+below.
+
+THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+
+Permission is hereby granted to use or copy this program
+for any purpose,  provided the above notices are retained on all copies.
+Permission to modify the code and to distribute modified code is granted,
+provided the above notices are retained, and a notice that the code was
+modified is included with the above copyright notice.
+
+A few of the files needed to use the GNU-style build procedure come with
+slightly different licenses, though they are all similar in spirit.  A few
+are GPL'ed, but with an exception that should cover all uses in the
+collector.  (If you are concerned about such things, I recommend you look
+at the notice in config.guess or ltmain.sh.)
+
diff --git a/lwnode/apps/sqlite3/LICENSE.BSD-3-Clause b/lwnode/apps/sqlite3/LICENSE.BSD-3-Clause
new file mode 100644 (file)
index 0000000..7ace4d3
--- /dev/null
@@ -0,0 +1,9 @@
+Copyright (c) <year> <owner>. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+2. 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.
+3. Neither the name of the copyright holder 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 HOLDER 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/lwnode/apps/sqlite3/LICENSE.MIT b/lwnode/apps/sqlite3/LICENSE.MIT
new file mode 100644 (file)
index 0000000..356e7ec
--- /dev/null
@@ -0,0 +1,20 @@
+Copyright (C) 2017-2018 by various contributors (see AUTHORS)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/lwnode/apps/sqlite3/LICENSE.NodeJS b/lwnode/apps/sqlite3/LICENSE.NodeJS
new file mode 100644 (file)
index 0000000..53ebbc7
--- /dev/null
@@ -0,0 +1,1072 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""
+
+The Node.js license applies to all parts of Node.js that are not externally
+maintained libraries.
+
+The externally maintained libraries used by Node.js are:
+
+- c-ares, located at deps/cares, is licensed as follows:
+  """
+    Copyright 1998 by the Massachusetts Institute of Technology.
+    Copyright (C) 2007-2013 by Daniel Stenberg
+
+    Permission to use, copy, modify, and distribute this
+    software and its documentation for any purpose and without
+    fee is hereby granted, provided that the above copyright
+    notice appear in all copies and that both that copyright
+    notice and this permission notice appear in supporting
+    documentation, and that the name of M.I.T. not be used in
+    advertising or publicity pertaining to distribution of the
+    software without specific, written prior permission.
+    M.I.T. makes no representations about the suitability of
+    this software for any purpose.  It is provided "as is"
+    without express or implied warranty.
+  """
+
+- HTTP Parser, located at deps/http_parser, is licensed as follows:
+  """
+    http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright
+    Igor Sysoev.
+
+    Additional changes are licensed under the same terms as NGINX and
+    copyright Joyent, Inc. and other Node contributors. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to
+    deal in the Software without restriction, including without limitation the
+    rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+    sell copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+    IN THE SOFTWARE.
+  """
+
+- ICU, located at deps/icu-small, is licensed as follows:
+  """
+    COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
+
+    Copyright © 1991-2017 Unicode, Inc. All rights reserved.
+    Distributed under the Terms of Use in http://www.unicode.org/copyright.html
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of the Unicode data files and any associated documentation
+    (the "Data Files") or Unicode software and any associated documentation
+    (the "Software") to deal in the Data Files or Software
+    without restriction, including without limitation the rights to use,
+    copy, modify, merge, publish, distribute, and/or sell copies of
+    the Data Files or Software, and to permit persons to whom the Data Files
+    or Software are furnished to do so, provided that either
+    (a) this copyright and permission notice appear with all copies
+    of the Data Files or Software, or
+    (b) this copyright and permission notice appear in associated
+    Documentation.
+
+    THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+    ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+    WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+    NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+    NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+    DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+    PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale,
+    use or other dealings in these Data Files or Software without prior
+    written authorization of the copyright holder.
+
+    ---------------------
+
+    Third-Party Software Licenses
+
+    This section contains third-party software notices and/or additional
+    terms for licensed third-party software components included within ICU
+    libraries.
+
+    1. ICU License - ICU 1.8.1 to ICU 57.1
+
+    COPYRIGHT AND PERMISSION NOTICE
+
+    Copyright (c) 1995-2016 International Business Machines Corporation and others
+    All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies of
+    the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+    OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+    HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
+    SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
+    RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+    CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+    CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale, use
+    or other dealings in this Software without prior written authorization
+    of the copyright holder.
+
+    All trademarks and registered trademarks mentioned herein are the
+    property of their respective owners.
+
+    2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
+
+     #     The Google Chrome software developed by Google is licensed under
+     # the BSD license. Other software included in this distribution is
+     # provided under other licenses, as set forth below.
+     #
+     #  The BSD License
+     #  http://opensource.org/licenses/bsd-license.php
+     #  Copyright (C) 2006-2008, Google Inc.
+     #
+     #  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.
+     #
+     #
+     #  The word list in cjdict.txt are generated by combining three word lists
+     # listed below with further processing for compound word breaking. The
+     # frequency is generated with an iterative training against Google web
+     # corpora.
+     #
+     #  * Libtabe (Chinese)
+     #    - https://sourceforge.net/project/?group_id=1519
+     #    - Its license terms and conditions are shown below.
+     #
+     #  * IPADIC (Japanese)
+     #    - http://chasen.aist-nara.ac.jp/chasen/distribution.html
+     #    - Its license terms and conditions are shown below.
+     #
+     #  ---------COPYING.libtabe ---- BEGIN--------------------
+     #
+     #  /*
+     #   * Copyrighy (c) 1999 TaBE Project.
+     #   * Copyright (c) 1999 Pai-Hsiang Hsiao.
+     #   * 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 the TaBE Project 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
+     #   * REGENTS 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.
+     #   */
+     #
+     #  /*
+     #   * Copyright (c) 1999 Computer Systems and Communication Lab,
+     #   *                    Institute of Information Science, Academia
+     #       *                    Sinica. 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 the Computer Systems and Communication Lab
+     #   *   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
+     #   * REGENTS 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.
+     #   */
+     #
+     #  Copyright 1996 Chih-Hao Tsai @ Beckman Institute,
+     #      University of Illinois
+     #  c-tsai4@uiuc.edu  http://casper.beckman.uiuc.edu/~c-tsai4
+     #
+     #  ---------------COPYING.libtabe-----END--------------------------------
+     #
+     #
+     #  ---------------COPYING.ipadic-----BEGIN-------------------------------
+     #
+     #  Copyright 2000, 2001, 2002, 2003 Nara Institute of Science
+     #  and Technology.  All Rights Reserved.
+     #
+     #  Use, reproduction, and distribution of this software is permitted.
+     #  Any copy of this software, whether in its original form or modified,
+     #  must include both the above copyright notice and the following
+     #  paragraphs.
+     #
+     #  Nara Institute of Science and Technology (NAIST),
+     #  the copyright holders, disclaims all warranties with regard to this
+     #  software, including all implied warranties of merchantability and
+     #  fitness, in no event shall NAIST be liable for
+     #  any special, indirect or consequential damages or any damages
+     #  whatsoever resulting from loss of use, data or profits, whether in an
+     #  action of contract, negligence or other tortuous action, arising out
+     #  of or in connection with the use or performance of this software.
+     #
+     #  A large portion of the dictionary entries
+     #  originate from ICOT Free Software.  The following conditions for ICOT
+     #  Free Software applies to the current dictionary as well.
+     #
+     #  Each User may also freely distribute the Program, whether in its
+     #  original form or modified, to any third party or parties, PROVIDED
+     #  that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
+     #  on, or be attached to, the Program, which is distributed substantially
+     #  in the same form as set out herein and that such intended
+     #  distribution, if actually made, will neither violate or otherwise
+     #  contravene any of the laws and regulations of the countries having
+     #  jurisdiction over the User or the intended distribution itself.
+     #
+     #  NO WARRANTY
+     #
+     #  The program was produced on an experimental basis in the course of the
+     #  research and development conducted during the project and is provided
+     #  to users as so produced on an experimental basis.  Accordingly, the
+     #  program is provided without any warranty whatsoever, whether express,
+     #  implied, statutory or otherwise.  The term "warranty" used herein
+     #  includes, but is not limited to, any warranty of the quality,
+     #  performance, merchantability and fitness for a particular purpose of
+     #  the program and the nonexistence of any infringement or violation of
+     #  any right of any third party.
+     #
+     #  Each user of the program will agree and understand, and be deemed to
+     #  have agreed and understood, that there is no warranty whatsoever for
+     #  the program and, accordingly, the entire risk arising from or
+     #  otherwise connected with the program is assumed by the user.
+     #
+     #  Therefore, neither ICOT, the copyright holder, or any other
+     #  organization that participated in or was otherwise related to the
+     #  development of the program and their respective officials, directors,
+     #  officers and other employees shall be held liable for any and all
+     #  damages, including, without limitation, general, special, incidental
+     #  and consequential damages, arising out of or otherwise in connection
+     #  with the use or inability to use the program or any product, material
+     #  or result produced or otherwise obtained by using the program,
+     #  regardless of whether they have been advised of, or otherwise had
+     #  knowledge of, the possibility of such damages at any time during the
+     #  project or thereafter.  Each user will be deemed to have agreed to the
+     #  foregoing by his or her commencement of use of the program.  The term
+     #  "use" as used herein includes, but is not limited to, the use,
+     #  modification, copying and distribution of the program and the
+     #  production of secondary products from the program.
+     #
+     #  In the case where the program, whether in its original form or
+     #  modified, was distributed or delivered to or received by a user from
+     #  any person, organization or entity other than ICOT, unless it makes or
+     #  grants independently of ICOT any specific warranty to the user in
+     #  writing, such person, organization or entity, will also be exempted
+     #  from and not be held liable to the user for any such damages as noted
+     #  above as far as the program is concerned.
+     #
+     #  ---------------COPYING.ipadic-----END----------------------------------
+
+    3. Lao Word Break Dictionary Data (laodict.txt)
+
+     #  Copyright (c) 2013 International Business Machines Corporation
+     #  and others. All Rights Reserved.
+     #
+     # Project: http://code.google.com/p/lao-dictionary/
+     # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt
+     # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt
+     #              (copied below)
+     #
+     #  This file is derived from the above dictionary, with slight
+     #  modifications.
+     #  ----------------------------------------------------------------------
+     #  Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell.
+     #  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.
+     #
+     #
+     # 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 HOLDER 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.
+     #  --------------------------------------------------------------------------
+
+    4. Burmese Word Break Dictionary Data (burmesedict.txt)
+
+     #  Copyright (c) 2014 International Business Machines Corporation
+     #  and others. All Rights Reserved.
+     #
+     #  This list is part of a project hosted at:
+     #    github.com/kanyawtech/myanmar-karen-word-lists
+     #
+     #  --------------------------------------------------------------------------
+     #  Copyright (c) 2013, LeRoy Benjamin Sharon
+     #  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 Myanmar Karen Word Lists, 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 HOLDER 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.
+     #  --------------------------------------------------------------------------
+
+    5. Time Zone Database
+
+      ICU uses the public domain data and code derived from Time Zone
+    Database for its time zone support. The ownership of the TZ database
+    is explained in BCP 175: Procedure for Maintaining the Time Zone
+    Database section 7.
+
+     # 7.  Database Ownership
+     #
+     #    The TZ database itself is not an IETF Contribution or an IETF
+     #    document.  Rather it is a pre-existing and regularly updated work
+     #    that is in the public domain, and is intended to remain in the
+     #    public domain.  Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do
+     #    not apply to the TZ Database or contributions that individuals make
+     #    to it.  Should any claims be made and substantiated against the TZ
+     #    Database, the organization that is providing the IANA
+     #    Considerations defined in this RFC, under the memorandum of
+     #    understanding with the IETF, currently ICANN, may act in accordance
+     #    with all competent court orders.  No ownership claims will be made
+     #    by ICANN or the IETF Trust on the database or the code.  Any person
+     #    making a contribution to the database or code waives all rights to
+     #    future claims in that contribution or in the TZ Database.
+  """
+
+- libuv, located at deps/uv, is licensed as follows:
+  """
+    libuv is part of the Node project: http://nodejs.org/
+    libuv may be distributed alone under Node's license:
+
+    ====
+
+    Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to
+    deal in the Software without restriction, including without limitation the
+    rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+    sell copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+    IN THE SOFTWARE.
+
+    ====
+
+    This license applies to all parts of libuv that are not externally
+    maintained libraries.
+
+    The externally maintained libraries used by libuv are:
+
+      - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license.
+
+      - inet_pton and inet_ntop implementations, contained in src/inet.c, are
+        copyright the Internet Systems Consortium, Inc., and licensed under the ISC
+        license.
+
+      - stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three
+        clause BSD license.
+
+      - pthread-fixes.h, pthread-fixes.c, copyright Google Inc. and Sony Mobile
+        Communications AB. Three clause BSD license.
+
+      - android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design
+        Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement
+        n° 289016). Three clause BSD license.
+  """
+
+- OpenSSL, located at deps/openssl, is licensed as follows:
+  """
+    Copyright (c) 1998-2016 The OpenSSL Project.  All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+    2. 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.
+
+    3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+
+    4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission. For written permission, please contact
+    openssl-core@openssl.org.
+
+    5. Products derived from this software may not be called "OpenSSL"
+    nor may "OpenSSL" appear in their names without prior written
+    permission of the OpenSSL Project.
+
+    6. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+
+    THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+    EXPRESSED 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 OpenSSL PROJECT OR
+    ITS 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.
+    ====================================================================
+
+    This product includes cryptographic software written by Eric Young
+    (eay@cryptsoft.com).  This product includes software written by Tim
+    Hudson (tjh@cryptsoft.com).
+  """
+
+- Punycode.js, located at lib/punycode.js, is licensed as follows:
+  """
+    Copyright Mathias Bynens <https://mathiasbynens.be/>
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, sublicense, and/or sell copies of the Software, and to
+    permit persons to whom the Software is furnished to do so, subject to
+    the following conditions:
+
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+    LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+    OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+  """
+
+- V8, located at deps/v8, is licensed as follows:
+  """
+    This license applies to all parts of V8 that are not externally
+    maintained libraries.  The externally maintained libraries used by V8
+    are:
+
+      - PCRE test suite, located in
+        test/mjsunit/third_party/regexp-pcre/regexp-pcre.js.  This is based on the
+        test suite from PCRE-7.3, which is copyrighted by the University
+        of Cambridge and Google, Inc.  The copyright notice and license
+        are embedded in regexp-pcre.js.
+
+      - Layout tests, located in test/mjsunit/third_party/object-keys.  These are
+        based on layout tests from webkit.org which are copyrighted by
+        Apple Computer, Inc. and released under a 3-clause BSD license.
+
+      - Strongtalk assembler, the basis of the files assembler-arm-inl.h,
+        assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h,
+        assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h,
+        assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h,
+        assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h.
+        This code is copyrighted by Sun Microsystems Inc. and released
+        under a 3-clause BSD license.
+
+      - Valgrind client API header, located at third_party/valgrind/valgrind.h
+        This is release under the BSD license.
+
+    These libraries have their own licenses; we recommend you read them,
+    as their terms may differ from the terms below.
+
+    Further license information can be found in LICENSE files located in
+    sub-directories.
+
+    Copyright 2014, the V8 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.
+  """
+
+- zlib, located at deps/zlib, is licensed as follows:
+  """
+    zlib.h -- interface of the 'zlib' general purpose compression library
+    version 1.2.8, April 28th, 2013
+
+    Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
+
+    This software is provided 'as-is', without any express or implied
+    warranty.  In no event will the authors be held liable for any damages
+    arising from the use of this software.
+
+    Permission is granted to anyone to use this software for any purpose,
+    including commercial applications, and to alter it and redistribute it
+    freely, subject to the following restrictions:
+
+    1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+    2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+    3. This notice may not be removed or altered from any source distribution.
+
+    Jean-loup Gailly        Mark Adler
+    jloup@gzip.org          madler@alumni.caltech.edu
+  """
+
+- npm, located at deps/npm, is licensed as follows:
+  """
+    The npm application
+    Copyright (c) npm, Inc. and Contributors
+    Licensed on the terms of The Artistic License 2.0
+
+    Node package dependencies of the npm application
+    Copyright (c) their respective copyright owners
+    Licensed on their respective license terms
+
+    The npm public registry at https://registry.npmjs.org
+    and the npm website at https://www.npmjs.com
+    Operated by npm, Inc.
+    Use governed by terms published on https://www.npmjs.com
+
+    "Node.js"
+    Trademark Joyent, Inc., https://joyent.com
+    Neither npm nor npm, Inc. are affiliated with Joyent, Inc.
+
+    The Node.js application
+    Project of Node Foundation, https://nodejs.org
+
+    The npm Logo
+    Copyright (c) Mathias Pettersson and Brian Hammond
+
+    "Gubblebum Blocky" typeface
+    Copyright (c) Tjarda Koster, https://jelloween.deviantart.com
+    Used with permission
+
+    --------
+
+    The Artistic License 2.0
+
+    Copyright (c) 2000-2006, The Perl Foundation.
+
+    Everyone is permitted to copy and distribute verbatim copies
+    of this license document, but changing it is not allowed.
+
+    Preamble
+
+    This license establishes the terms under which a given free software
+    Package may be copied, modified, distributed, and/or redistributed.
+    The intent is that the Copyright Holder maintains some artistic
+    control over the development of that Package while still keeping the
+    Package available as open source and free software.
+
+    You are always permitted to make arrangements wholly outside of this
+    license directly with the Copyright Holder of a given Package.  If the
+    terms of this license do not permit the full use that you propose to
+    make of the Package, you should contact the Copyright Holder and seek
+    a different licensing arrangement.
+
+    Definitions
+
+        "Copyright Holder" means the individual(s) or organization(s)
+        named in the copyright notice for the entire Package.
+
+        "Contributor" means any party that has contributed code or other
+        material to the Package, in accordance with the Copyright Holder's
+        procedures.
+
+        "You" and "your" means any person who would like to copy,
+        distribute, or modify the Package.
+
+        "Package" means the collection of files distributed by the
+        Copyright Holder, and derivatives of that collection and/or of
+        those files. A given Package may consist of either the Standard
+        Version, or a Modified Version.
+
+        "Distribute" means providing a copy of the Package or making it
+        accessible to anyone else, or in the case of a company or
+        organization, to others outside of your company or organization.
+
+        "Distributor Fee" means any fee that you charge for Distributing
+        this Package or providing support for this Package to another
+        party.  It does not mean licensing fees.
+
+        "Standard Version" refers to the Package if it has not been
+        modified, or has been modified only in ways explicitly requested
+        by the Copyright Holder.
+
+        "Modified Version" means the Package, if it has been changed, and
+        such changes were not explicitly requested by the Copyright
+        Holder.
+
+        "Original License" means this Artistic License as Distributed with
+        the Standard Version of the Package, in its current version or as
+        it may be modified by The Perl Foundation in the future.
+
+        "Source" form means the source code, documentation source, and
+        configuration files for the Package.
+
+        "Compiled" form means the compiled bytecode, object code, binary,
+        or any other form resulting from mechanical transformation or
+        translation of the Source form.
+
+    Permission for Use and Modification Without Distribution
+
+    (1)  You are permitted to use the Standard Version and create and use
+    Modified Versions for any purpose without restriction, provided that
+    you do not Distribute the Modified Version.
+
+    Permissions for Redistribution of the Standard Version
+
+    (2)  You may Distribute verbatim copies of the Source form of the
+    Standard Version of this Package in any medium without restriction,
+    either gratis or for a Distributor Fee, provided that you duplicate
+    all of the original copyright notices and associated disclaimers.  At
+    your discretion, such verbatim copies may or may not include a
+    Compiled form of the Package.
+
+    (3)  You may apply any bug fixes, portability changes, and other
+    modifications made available from the Copyright Holder.  The resulting
+    Package will still be considered the Standard Version, and as such
+    will be subject to the Original License.
+
+    Distribution of Modified Versions of the Package as Source
+
+    (4)  You may Distribute your Modified Version as Source (either gratis
+    or for a Distributor Fee, and with or without a Compiled form of the
+    Modified Version) provided that you clearly document how it differs
+    from the Standard Version, including, but not limited to, documenting
+    any non-standard features, executables, or modules, and provided that
+    you do at least ONE of the following:
+
+        (a)  make the Modified Version available to the Copyright Holder
+        of the Standard Version, under the Original License, so that the
+        Copyright Holder may include your modifications in the Standard
+        Version.
+
+        (b)  ensure that installation of your Modified Version does not
+        prevent the user installing or running the Standard Version. In
+        addition, the Modified Version must bear a name that is different
+        from the name of the Standard Version.
+
+        (c)  allow anyone who receives a copy of the Modified Version to
+        make the Source form of the Modified Version available to others
+        under
+
+            (i)  the Original License or
+
+            (ii)  a license that permits the licensee to freely copy,
+            modify and redistribute the Modified Version using the same
+            licensing terms that apply to the copy that the licensee
+            received, and requires that the Source form of the Modified
+            Version, and of any works derived from it, be made freely
+            available in that license fees are prohibited but Distributor
+            Fees are allowed.
+
+    Distribution of Compiled Forms of the Standard Version
+    or Modified Versions without the Source
+
+    (5)  You may Distribute Compiled forms of the Standard Version without
+    the Source, provided that you include complete instructions on how to
+    get the Source of the Standard Version.  Such instructions must be
+    valid at the time of your distribution.  If these instructions, at any
+    time while you are carrying out such distribution, become invalid, you
+    must provide new instructions on demand or cease further distribution.
+    If you provide valid instructions or cease distribution within thirty
+    days after you become aware that the instructions are invalid, then
+    you do not forfeit any of your rights under this license.
+
+    (6)  You may Distribute a Modified Version in Compiled form without
+    the Source, provided that you comply with Section 4 with respect to
+    the Source of the Modified Version.
+
+    Aggregating or Linking the Package
+
+    (7)  You may aggregate the Package (either the Standard Version or
+    Modified Version) with other packages and Distribute the resulting
+    aggregation provided that you do not charge a licensing fee for the
+    Package.  Distributor Fees are permitted, and licensing fees for other
+    components in the aggregation are permitted. The terms of this license
+    apply to the use and Distribution of the Standard or Modified Versions
+    as included in the aggregation.
+
+    (8) You are permitted to link Modified and Standard Versions with
+    other works, to embed the Package in a larger work of your own, or to
+    build stand-alone binary or bytecode versions of applications that
+    include the Package, and Distribute the result without restriction,
+    provided the result does not expose a direct interface to the Package.
+
+    Items That are Not Considered Part of a Modified Version
+
+    (9) Works (including, but not limited to, modules and scripts) that
+    merely extend or make use of the Package, do not, by themselves, cause
+    the Package to be a Modified Version.  In addition, such works are not
+    considered parts of the Package itself, and are not subject to the
+    terms of this license.
+
+    General Provisions
+
+    (10)  Any use, modification, and distribution of the Standard or
+    Modified Versions is governed by this Artistic License. By using,
+    modifying or distributing the Package, you accept this license. Do not
+    use, modify, or distribute the Package, if you do not accept this
+    license.
+
+    (11)  If your Modified Version has been derived from a Modified
+    Version made by someone other than you, you are nevertheless required
+    to ensure that your Modified Version complies with the requirements of
+    this license.
+
+    (12)  This license does not grant you the right to use any trademark,
+    service mark, tradename, or logo of the Copyright Holder.
+
+    (13)  This license includes the non-exclusive, worldwide,
+    free-of-charge patent license to make, have made, use, offer to sell,
+    sell, import and otherwise transfer the Package with respect to any
+    patent claims licensable by the Copyright Holder that are necessarily
+    infringed by the Package. If you institute patent litigation
+    (including a cross-claim or counterclaim) against any party alleging
+    that the Package constitutes direct or contributory patent
+    infringement, then this Artistic License to you shall terminate on the
+    date that such litigation is filed.
+
+    (14)  Disclaimer of Warranty:
+    THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
+    IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+    NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
+    LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
+    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+    DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
+    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+    --------
+  """
+
+- GYP, located at tools/gyp, is licensed as follows:
+  """
+    Copyright (c) 2009 Google Inc. 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.
+  """
+
+- marked, located at tools/doc/node_modules/marked, is licensed as follows:
+  """
+    Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+    THE SOFTWARE.
+  """
+
+- cpplint.py, located at tools/cpplint.py, is licensed as follows:
+  """
+    Copyright (c) 2009 Google Inc. 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.
+  """
+
+- ESLint, located at tools/eslint, is licensed as follows:
+  """
+    ESLint
+    Copyright jQuery Foundation and other contributors, https://jquery.org/
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+    THE SOFTWARE.
+  """
+
+- gtest, located at deps/gtest, is licensed as follows:
+  """
+    Copyright 2008, Google Inc.
+    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/lwnode/apps/sqlite3/MAINTAINERS.md b/lwnode/apps/sqlite3/MAINTAINERS.md
new file mode 100644 (file)
index 0000000..bf59075
--- /dev/null
@@ -0,0 +1,9 @@
+# Maintainers
+Maintainers in alphabetical order.
+
+```
+Ryan Hyun Choi <ryan.choi@samsung.com>
+Daeyeon Jeong <daeyeon.jeong@samsung.com>
+Haesik Jun <haesik.jun@samsung.com>
+Ho Sung Kim <hs852.kim@samsung.com>
+```
diff --git a/lwnode/apps/sqlite3/README.md b/lwnode/apps/sqlite3/README.md
new file mode 100644 (file)
index 0000000..c4c2940
--- /dev/null
@@ -0,0 +1,96 @@
+# Node-Sqlite3 Service
+Node-Sqlite3 is a pure JavaScript interface to libsqlite3, which allows a Web App to connect and
+utilize a sqlite3 database.
+
+## Supported Platforms
+* Ubuntu 18.04, 16.04
+* Tizen 4.0 and above
+
+## Update submodule
+```sh
+git submodule update --init --recursive
+```
+
+## How to Run Tests
+### Prerequisite
+Set up a node environment on a Ubuntu machine. Then run:
+```sh
+npm install
+npm run build:all
+```
+
+### Run
+```sh
+npm run test
+```
+
+### Analyze line coverage
+```sh
+npm run coverage
+```
+
+## How to Compile: Ubuntu
+### Prerequisite
+Set up a node environment on a Ubuntu machine. Then run:
+```sh
+npm install
+npm run build:all
+```
+
+### Run
+The following environment variables can be set:
+* DB_STORE: it is a directory where libsqlite3 DBs are to be read and written.
+* DEBUG: (optional) it displays packets sent and received from the backend.
+```sh
+export DB_STORE='/path/to/DB/store'
+// export DEBUG="rpc:*,sql:*,api:*"
+npm run start
+```
+
+```sh
+export DB_STORE='/path/to/DB/store'
+cp sample/script/test/support/*.db $DB_STORE  // copy sample dbs used by testcases
+google-chrome sample/index.html
+```
+
+## How to Compile: Tizen
+### Prerequisite
+Set up a node environment on a Ubuntu machine. Then run:
+```sh
+npm install
+npm run build:all
+```
+
+### Build a wgt package
+```sh
+npm run build
+./tools/buildwgt.sh
+```
+### Build rpms
+```sh
+gbs -c ./packaging/gbs.conf build -A armv7l --incremental --include-all --define 'build_native true'
+```
+
+### Install the .wgt and .rpm
+Copy ``.wgt`` and ``.rpm`` to a target device. Then, run:
+```sh
+rpm -Uvh node-sqlite3-ep-1.0.0-1.armv7l.rpm --force --nodeps
+pkgcmd -i -t wgt -p sqlite3.wgt
+```
+
+### Run the Web App
+The node service starts automatically when it is installed.
+Only the Web app needs to be started manually.
+The Web app runs a set of libsqlite3 testcases.
+
+```sh
+app_launcher -s OwOD84MFBg.sqlite3
+```
+
+To print node-sqlite3 service log, run:
+```sh
+dlogutil NODE_CONSOLE
+```
+
+## Maintainers
+A list of maintainers can be found in [MAINTAINERS.md](MAINTAINERS.md).
diff --git a/lwnode/apps/sqlite3/build/build.sh b/lwnode/apps/sqlite3/build/build.sh
new file mode 100755 (executable)
index 0000000..ed63a20
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+# Copyright (c) 2022-present Samsung Electronics Co., Ltd
+#
+# 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.
+
+echo -e "\033[0;33m"build sqlite3"\033[0m"
+
+rm -rf $BUILD_OUT_PATH
+mkdir -p $BUILD_OUT_PATH
+
+# build native module
+echo -e "\033[0;32m"build native module"\033[0m"
+cmake $APP_PATH -B$BUILD_OUT_PATH -H$APP_PATH -G Ninja
+ninja -C $BUILD_OUT_PATH
+
+# copy native module
+echo -e "\033[0;32m"copy native module"\033[0m"
+mkdir -p $APP_PATH/node_modules/sqlite3/lib/binding/napi-v3-linux-arm
+cp -f $BUILD_OUT_PATH/node_sqlite3.node $APP_PATH/node_modules/sqlite3/lib/binding/napi-v3-linux-arm/
+
+# zip node_modules
+echo -e "\033[0;32m"zip node_modules"\033[0m"
+SQLITE3_SCRIPT_DIR=$BUILD_OUT_PATH/script
+mkdir -p $SQLITE3_SCRIPT_DIR
+cd $APP_PATH
+
+find node_modules | rsync -avmL --delete --delete-excluded --filter="merge tools/sqlite3-filter.txt" --files-from=- ./ $SQLITE3_SCRIPT_DIR
+
+cp -rf download $SQLITE3_SCRIPT_DIR
+cp -rf out/backend/* $SQLITE3_SCRIPT_DIR # *.js files should have been generated
+mkdir -p $BUILD_OUT_PATH/script
+
+cd $BUILD_OUT_PATH
+zip -r script.zip ./script/*
+cd -
+
+cd -
+
diff --git a/lwnode/apps/sqlite3/build/install.sh b/lwnode/apps/sqlite3/build/install.sh
new file mode 100755 (executable)
index 0000000..0ffb6b9
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Copyright (c) 2022-present Samsung Electronics Co., Ltd
+#
+# 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.
+
+echo -e "\033[0;33m"install"\033[0m"
+
+cp -f $BUILD_OUT_PATH/script.zip $FILES_PATH
diff --git a/lwnode/apps/sqlite3/build/post.sh b/lwnode/apps/sqlite3/build/post.sh
new file mode 100755 (executable)
index 0000000..446d503
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Copyright (c) 2022-present Samsung Electronics Co., Ltd
+#
+# 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.
+
+rm -rf $APP_PATH/script
+
+echo -e "\033[0;33m"unzip script"\033[0m"
+unzip -q $FILES_PATH/script.zip -d $APP_PATH
+if [ $? != 0 ];then
+    echo -e "\033[0;31m"fail to unzip script"\033[0m"
+fi
+rm $FILES_PATH/script.zip
+
diff --git a/lwnode/apps/sqlite3/build/sqlite3.manifest b/lwnode/apps/sqlite3/build/sqlite3.manifest
new file mode 100644 (file)
index 0000000..f5a44ec
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+        <request>
+                <domain name="_"/>
+        </request>
+</manifest>
diff --git a/lwnode/apps/sqlite3/deps/include/js_native_api.h b/lwnode/apps/sqlite3/deps/include/js_native_api.h
new file mode 100644 (file)
index 0000000..5daa20f
--- /dev/null
@@ -0,0 +1,561 @@
+#ifndef SRC_JS_NATIVE_API_H_
+#define SRC_JS_NATIVE_API_H_
+
+// This file needs to be compatible with C compilers.
+#include <stddef.h>   // NOLINT(modernize-deprecated-headers)
+#include <stdbool.h>  // NOLINT(modernize-deprecated-headers)
+
+// Use INT_MAX, this should only be consumed by the pre-processor anyway.
+#define NAPI_VERSION_EXPERIMENTAL 2147483647
+#ifndef NAPI_VERSION
+#ifdef NAPI_EXPERIMENTAL
+#define NAPI_VERSION NAPI_VERSION_EXPERIMENTAL
+#else
+// The baseline version for N-API.
+// The NAPI_VERSION controls which version will be used by default when
+// compilling a native addon. If the addon developer specifically wants to use
+// functions available in a new version of N-API that is not yet ported in all
+// LTS versions, they can set NAPI_VERSION knowing that they have specifically
+// depended on that version.
+#define NAPI_VERSION 7
+#endif
+#endif
+
+#include "js_native_api_types.h"
+
+// If you need __declspec(dllimport), either include <node_api.h> instead, or
+// define NAPI_EXTERN as __declspec(dllimport) on the compiler's command line.
+#ifndef NAPI_EXTERN
+  #ifdef _WIN32
+    #define NAPI_EXTERN __declspec(dllexport)
+  #elif defined(__wasm32__)
+    #define NAPI_EXTERN __attribute__((visibility("default")))                \
+                        __attribute__((__import_module__("napi")))
+  #else
+    #define NAPI_EXTERN __attribute__((visibility("default")))
+  #endif
+#endif
+
+#define NAPI_AUTO_LENGTH SIZE_MAX
+
+#ifdef __cplusplus
+#define EXTERN_C_START extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_START
+#define EXTERN_C_END
+#endif
+
+EXTERN_C_START
+
+NAPI_EXTERN napi_status
+napi_get_last_error_info(napi_env env,
+                         const napi_extended_error_info** result);
+
+// Getters for defined singletons
+NAPI_EXTERN napi_status napi_get_undefined(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_null(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_global(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_boolean(napi_env env,
+                                         bool value,
+                                         napi_value* result);
+
+// Methods to create Primitive types/Objects
+NAPI_EXTERN napi_status napi_create_object(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array_with_length(napi_env env,
+                                                      size_t length,
+                                                      napi_value* result);
+NAPI_EXTERN napi_status napi_create_double(napi_env env,
+                                           double value,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_int32(napi_env env,
+                                          int32_t value,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_uint32(napi_env env,
+                                           uint32_t value,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_int64(napi_env env,
+                                          int64_t value,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_latin1(napi_env env,
+                                                  const char* str,
+                                                  size_t length,
+                                                  napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf8(napi_env env,
+                                                const char* str,
+                                                size_t length,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf16(napi_env env,
+                                                 const char16_t* str,
+                                                 size_t length,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_create_symbol(napi_env env,
+                                           napi_value description,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_function(napi_env env,
+                                             const char* utf8name,
+                                             size_t length,
+                                             napi_callback cb,
+                                             void* data,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_create_error(napi_env env,
+                                          napi_value code,
+                                          napi_value msg,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_type_error(napi_env env,
+                                               napi_value code,
+                                               napi_value msg,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
+                                                napi_value code,
+                                                napi_value msg,
+                                                napi_value* result);
+
+// Methods to get the native napi_value from Primitive type
+NAPI_EXTERN napi_status napi_typeof(napi_env env,
+                                    napi_value value,
+                                    napi_valuetype* result);
+NAPI_EXTERN napi_status napi_get_value_double(napi_env env,
+                                              napi_value value,
+                                              double* result);
+NAPI_EXTERN napi_status napi_get_value_int32(napi_env env,
+                                             napi_value value,
+                                             int32_t* result);
+NAPI_EXTERN napi_status napi_get_value_uint32(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+NAPI_EXTERN napi_status napi_get_value_int64(napi_env env,
+                                             napi_value value,
+                                             int64_t* result);
+NAPI_EXTERN napi_status napi_get_value_bool(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+
+// Copies LATIN-1 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
+                                                     napi_value value,
+                                                     char* buf,
+                                                     size_t bufsize,
+                                                     size_t* result);
+
+// Copies UTF-8 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf8(napi_env env,
+                                                   napi_value value,
+                                                   char* buf,
+                                                   size_t bufsize,
+                                                   size_t* result);
+
+// Copies UTF-16 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf16(napi_env env,
+                                                    napi_value value,
+                                                    char16_t* buf,
+                                                    size_t bufsize,
+                                                    size_t* result);
+
+// Methods to coerce values
+// These APIs may execute user scripts
+NAPI_EXTERN napi_status napi_coerce_to_bool(napi_env env,
+                                            napi_value value,
+                                            napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_number(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_object(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_string(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+
+// Methods to work with Objects
+NAPI_EXTERN napi_status napi_get_prototype(napi_env env,
+                                           napi_value object,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_get_property_names(napi_env env,
+                                                napi_value object,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_set_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_delete_property(napi_env env,
+                                             napi_value object,
+                                             napi_value key,
+                                             bool* result);
+NAPI_EXTERN napi_status napi_has_own_property(napi_env env,
+                                              napi_value object,
+                                              napi_value key,
+                                              bool* result);
+NAPI_EXTERN napi_status napi_set_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value value);
+NAPI_EXTERN napi_status napi_has_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         bool* result);
+NAPI_EXTERN napi_status napi_get_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value* result);
+NAPI_EXTERN napi_status napi_delete_element(napi_env env,
+                                            napi_value object,
+                                            uint32_t index,
+                                            bool* result);
+NAPI_EXTERN napi_status
+napi_define_properties(napi_env env,
+                       napi_value object,
+                       size_t property_count,
+                       const napi_property_descriptor* properties);
+
+// Methods to work with Arrays
+NAPI_EXTERN napi_status napi_is_array(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+NAPI_EXTERN napi_status napi_get_array_length(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+
+// Methods to compare values
+NAPI_EXTERN napi_status napi_strict_equals(napi_env env,
+                                           napi_value lhs,
+                                           napi_value rhs,
+                                           bool* result);
+
+// Methods to work with Functions
+NAPI_EXTERN napi_status napi_call_function(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_new_instance(napi_env env,
+                                          napi_value constructor,
+                                          size_t argc,
+                                          const napi_value* argv,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_instanceof(napi_env env,
+                                        napi_value object,
+                                        napi_value constructor,
+                                        bool* result);
+
+// Methods to work with napi_callbacks
+
+// Gets all callback info in a single call. (Ugly, but faster.)
+NAPI_EXTERN napi_status napi_get_cb_info(
+    napi_env env,               // [in] NAPI environment handle
+    napi_callback_info cbinfo,  // [in] Opaque callback-info handle
+    size_t* argc,      // [in-out] Specifies the size of the provided argv array
+                       // and receives the actual count of args.
+    napi_value* argv,  // [out] Array of values
+    napi_value* this_arg,  // [out] Receives the JS 'this' arg for the call
+    void** data);          // [out] Receives the data pointer for the callback.
+
+NAPI_EXTERN napi_status napi_get_new_target(napi_env env,
+                                            napi_callback_info cbinfo,
+                                            napi_value* result);
+NAPI_EXTERN napi_status
+napi_define_class(napi_env env,
+                  const char* utf8name,
+                  size_t length,
+                  napi_callback constructor,
+                  void* data,
+                  size_t property_count,
+                  const napi_property_descriptor* properties,
+                  napi_value* result);
+
+// Methods to work with external data objects
+NAPI_EXTERN napi_status napi_wrap(napi_env env,
+                                  napi_value js_object,
+                                  void* native_object,
+                                  napi_finalize finalize_cb,
+                                  void* finalize_hint,
+                                  napi_ref* result);
+NAPI_EXTERN napi_status napi_unwrap(napi_env env,
+                                    napi_value js_object,
+                                    void** result);
+NAPI_EXTERN napi_status napi_remove_wrap(napi_env env,
+                                         napi_value js_object,
+                                         void** result);
+NAPI_EXTERN napi_status napi_create_external(napi_env env,
+                                             void* data,
+                                             napi_finalize finalize_cb,
+                                             void* finalize_hint,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_get_value_external(napi_env env,
+                                                napi_value value,
+                                                void** result);
+
+// Methods to control object lifespan
+
+// Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
+NAPI_EXTERN napi_status napi_create_reference(napi_env env,
+                                              napi_value value,
+                                              uint32_t initial_refcount,
+                                              napi_ref* result);
+
+// Deletes a reference. The referenced value is released, and may
+// be GC'd unless there are other references to it.
+NAPI_EXTERN napi_status napi_delete_reference(napi_env env, napi_ref ref);
+
+// Increments the reference count, optionally returning the resulting count.
+// After this call the  reference will be a strong reference because its
+// refcount is >0, and the referenced object is effectively "pinned".
+// Calling this when the refcount is 0 and the object is unavailable
+// results in an error.
+NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
+                                           napi_ref ref,
+                                           uint32_t* result);
+
+// Decrements the reference count, optionally returning the resulting count.
+// If the result is 0 the reference is now weak and the object may be GC'd
+// at any time if there are no other references. Calling this when the
+// refcount is already 0 results in an error.
+NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
+                                             napi_ref ref,
+                                             uint32_t* result);
+
+// Attempts to get a referenced value. If the reference is weak,
+// the value might no longer be available, in that case the call
+// is still successful but the result is NULL.
+NAPI_EXTERN napi_status napi_get_reference_value(napi_env env,
+                                                 napi_ref ref,
+                                                 napi_value* result);
+
+NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env,
+                                               napi_handle_scope* result);
+NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
+                                                napi_handle_scope scope);
+NAPI_EXTERN napi_status
+napi_open_escapable_handle_scope(napi_env env,
+                                 napi_escapable_handle_scope* result);
+NAPI_EXTERN napi_status
+napi_close_escapable_handle_scope(napi_env env,
+                                  napi_escapable_handle_scope scope);
+
+NAPI_EXTERN napi_status napi_escape_handle(napi_env env,
+                                           napi_escapable_handle_scope scope,
+                                           napi_value escapee,
+                                           napi_value* result);
+
+// Methods to support error handling
+NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error);
+NAPI_EXTERN napi_status napi_throw_error(napi_env env,
+                                         const char* code,
+                                         const char* msg);
+NAPI_EXTERN napi_status napi_throw_type_error(napi_env env,
+                                         const char* code,
+                                         const char* msg);
+NAPI_EXTERN napi_status napi_throw_range_error(napi_env env,
+                                         const char* code,
+                                         const char* msg);
+NAPI_EXTERN napi_status napi_is_error(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+
+// Methods to support catching exceptions
+NAPI_EXTERN napi_status napi_is_exception_pending(napi_env env, bool* result);
+NAPI_EXTERN napi_status napi_get_and_clear_last_exception(napi_env env,
+                                                          napi_value* result);
+
+// Methods to work with array buffers and typed arrays
+NAPI_EXTERN napi_status napi_is_arraybuffer(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+NAPI_EXTERN napi_status napi_create_arraybuffer(napi_env env,
+                                                size_t byte_length,
+                                                void** data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status
+napi_create_external_arraybuffer(napi_env env,
+                                 void* external_data,
+                                 size_t byte_length,
+                                 napi_finalize finalize_cb,
+                                 void* finalize_hint,
+                                 napi_value* result);
+NAPI_EXTERN napi_status napi_get_arraybuffer_info(napi_env env,
+                                                  napi_value arraybuffer,
+                                                  void** data,
+                                                  size_t* byte_length);
+NAPI_EXTERN napi_status napi_is_typedarray(napi_env env,
+                                           napi_value value,
+                                           bool* result);
+NAPI_EXTERN napi_status napi_create_typedarray(napi_env env,
+                                               napi_typedarray_type type,
+                                               size_t length,
+                                               napi_value arraybuffer,
+                                               size_t byte_offset,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_get_typedarray_info(napi_env env,
+                                                 napi_value typedarray,
+                                                 napi_typedarray_type* type,
+                                                 size_t* length,
+                                                 void** data,
+                                                 napi_value* arraybuffer,
+                                                 size_t* byte_offset);
+
+NAPI_EXTERN napi_status napi_create_dataview(napi_env env,
+                                             size_t length,
+                                             napi_value arraybuffer,
+                                             size_t byte_offset,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_is_dataview(napi_env env,
+                                         napi_value value,
+                                         bool* result);
+NAPI_EXTERN napi_status napi_get_dataview_info(napi_env env,
+                                               napi_value dataview,
+                                               size_t* bytelength,
+                                               void** data,
+                                               napi_value* arraybuffer,
+                                               size_t* byte_offset);
+
+// version management
+NAPI_EXTERN napi_status napi_get_version(napi_env env, uint32_t* result);
+
+// Promises
+NAPI_EXTERN napi_status napi_create_promise(napi_env env,
+                                            napi_deferred* deferred,
+                                            napi_value* promise);
+NAPI_EXTERN napi_status napi_resolve_deferred(napi_env env,
+                                              napi_deferred deferred,
+                                              napi_value resolution);
+NAPI_EXTERN napi_status napi_reject_deferred(napi_env env,
+                                             napi_deferred deferred,
+                                             napi_value rejection);
+NAPI_EXTERN napi_status napi_is_promise(napi_env env,
+                                        napi_value value,
+                                        bool* is_promise);
+
+// Running a script
+NAPI_EXTERN napi_status napi_run_script(napi_env env,
+                                        napi_value script,
+                                        napi_value* result);
+
+// Memory management
+NAPI_EXTERN napi_status napi_adjust_external_memory(napi_env env,
+                                                    int64_t change_in_bytes,
+                                                    int64_t* adjusted_value);
+
+#if NAPI_VERSION >= 5
+
+// Dates
+NAPI_EXTERN napi_status napi_create_date(napi_env env,
+                                         double time,
+                                         napi_value* result);
+
+NAPI_EXTERN napi_status napi_is_date(napi_env env,
+                                     napi_value value,
+                                     bool* is_date);
+
+NAPI_EXTERN napi_status napi_get_date_value(napi_env env,
+                                            napi_value value,
+                                            double* result);
+
+// Add finalizer for pointer
+NAPI_EXTERN napi_status napi_add_finalizer(napi_env env,
+                                           napi_value js_object,
+                                           void* native_object,
+                                           napi_finalize finalize_cb,
+                                           void* finalize_hint,
+                                           napi_ref* result);
+
+#endif  // NAPI_VERSION >= 5
+
+#if NAPI_VERSION >= 6
+
+// BigInt
+NAPI_EXTERN napi_status napi_create_bigint_int64(napi_env env,
+                                                 int64_t value,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_create_bigint_uint64(napi_env env,
+                                                  uint64_t value,
+                                                  napi_value* result);
+NAPI_EXTERN napi_status napi_create_bigint_words(napi_env env,
+                                                 int sign_bit,
+                                                 size_t word_count,
+                                                 const uint64_t* words,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_get_value_bigint_int64(napi_env env,
+                                                    napi_value value,
+                                                    int64_t* result,
+                                                    bool* lossless);
+NAPI_EXTERN napi_status napi_get_value_bigint_uint64(napi_env env,
+                                                     napi_value value,
+                                                     uint64_t* result,
+                                                     bool* lossless);
+NAPI_EXTERN napi_status napi_get_value_bigint_words(napi_env env,
+                                                    napi_value value,
+                                                    int* sign_bit,
+                                                    size_t* word_count,
+                                                    uint64_t* words);
+
+// Object
+NAPI_EXTERN napi_status
+napi_get_all_property_names(napi_env env,
+                            napi_value object,
+                            napi_key_collection_mode key_mode,
+                            napi_key_filter key_filter,
+                            napi_key_conversion key_conversion,
+                            napi_value* result);
+
+// Instance data
+NAPI_EXTERN napi_status napi_set_instance_data(napi_env env,
+                                               void* data,
+                                               napi_finalize finalize_cb,
+                                               void* finalize_hint);
+
+NAPI_EXTERN napi_status napi_get_instance_data(napi_env env,
+                                               void** data);
+#endif  // NAPI_VERSION >= 6
+
+#if NAPI_VERSION >= 7
+// ArrayBuffer detaching
+NAPI_EXTERN napi_status napi_detach_arraybuffer(napi_env env,
+                                                napi_value arraybuffer);
+
+NAPI_EXTERN napi_status napi_is_detached_arraybuffer(napi_env env,
+                                                     napi_value value,
+                                                     bool* result);
+#endif  // NAPI_VERSION >= 7
+
+#ifdef NAPI_EXPERIMENTAL
+// Type tagging
+NAPI_EXTERN napi_status napi_type_tag_object(napi_env env,
+                                             napi_value value,
+                                             const napi_type_tag* type_tag);
+
+NAPI_EXTERN napi_status
+napi_check_object_type_tag(napi_env env,
+                           napi_value value,
+                           const napi_type_tag* type_tag,
+                           bool* result);
+NAPI_EXTERN napi_status napi_object_freeze(napi_env env,
+                                           napi_value object);
+NAPI_EXTERN napi_status napi_object_seal(napi_env env,
+                                         napi_value object);
+#endif  // NAPI_EXPERIMENTAL
+
+EXTERN_C_END
+
+#endif  // SRC_JS_NATIVE_API_H_
diff --git a/lwnode/apps/sqlite3/deps/include/js_native_api_types.h b/lwnode/apps/sqlite3/deps/include/js_native_api_types.h
new file mode 100644 (file)
index 0000000..7011c80
--- /dev/null
@@ -0,0 +1,160 @@
+#ifndef SRC_JS_NATIVE_API_TYPES_H_
+#define SRC_JS_NATIVE_API_TYPES_H_
+
+// This file needs to be compatible with C compilers.
+// This is a public include file, and these includes have essentially
+// became part of it's API.
+#include <stddef.h>  // NOLINT(modernize-deprecated-headers)
+#include <stdint.h>  // NOLINT(modernize-deprecated-headers)
+
+#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
+    typedef uint16_t char16_t;
+#endif
+
+// JSVM API types are all opaque pointers for ABI stability
+// typedef undefined structs instead of void* for compile time type safety
+typedef struct napi_env__* napi_env;
+typedef struct napi_value__* napi_value;
+typedef struct napi_ref__* napi_ref;
+typedef struct napi_handle_scope__* napi_handle_scope;
+typedef struct napi_escapable_handle_scope__* napi_escapable_handle_scope;
+typedef struct napi_callback_info__* napi_callback_info;
+typedef struct napi_deferred__* napi_deferred;
+
+typedef enum {
+  napi_default = 0,
+  napi_writable = 1 << 0,
+  napi_enumerable = 1 << 1,
+  napi_configurable = 1 << 2,
+
+  // Used with napi_define_class to distinguish static properties
+  // from instance properties. Ignored by napi_define_properties.
+  napi_static = 1 << 10,
+
+#ifdef NAPI_EXPERIMENTAL
+  // Default for class methods.
+  napi_default_method = napi_writable | napi_configurable,
+
+  // Default for object properties, like in JS obj[prop].
+  napi_default_jsproperty = napi_writable |
+                            napi_enumerable |
+                            napi_configurable,
+#endif  // NAPI_EXPERIMENTAL
+} napi_property_attributes;
+
+typedef enum {
+  // ES6 types (corresponds to typeof)
+  napi_undefined,
+  napi_null,
+  napi_boolean,
+  napi_number,
+  napi_string,
+  napi_symbol,
+  napi_object,
+  napi_function,
+  napi_external,
+  napi_bigint,
+} napi_valuetype;
+
+typedef enum {
+  napi_int8_array,
+  napi_uint8_array,
+  napi_uint8_clamped_array,
+  napi_int16_array,
+  napi_uint16_array,
+  napi_int32_array,
+  napi_uint32_array,
+  napi_float32_array,
+  napi_float64_array,
+  napi_bigint64_array,
+  napi_biguint64_array,
+} napi_typedarray_type;
+
+typedef enum {
+  napi_ok,
+  napi_invalid_arg,
+  napi_object_expected,
+  napi_string_expected,
+  napi_name_expected,
+  napi_function_expected,
+  napi_number_expected,
+  napi_boolean_expected,
+  napi_array_expected,
+  napi_generic_failure,
+  napi_pending_exception,
+  napi_cancelled,
+  napi_escape_called_twice,
+  napi_handle_scope_mismatch,
+  napi_callback_scope_mismatch,
+  napi_queue_full,
+  napi_closing,
+  napi_bigint_expected,
+  napi_date_expected,
+  napi_arraybuffer_expected,
+  napi_detachable_arraybuffer_expected,
+  napi_would_deadlock  // unused
+} napi_status;
+// Note: when adding a new enum value to `napi_status`, please also update
+//   * `const int last_status` in the definition of `napi_get_last_error_info()'
+//     in file js_native_api_v8.cc.
+//   * `const char* error_messages[]` in file js_native_api_v8.cc with a brief
+//     message explaining the error.
+//   * the definition of `napi_status` in doc/api/n-api.md to reflect the newly
+//     added value(s).
+
+typedef napi_value (*napi_callback)(napi_env env,
+                                    napi_callback_info info);
+typedef void (*napi_finalize)(napi_env env,
+                              void* finalize_data,
+                              void* finalize_hint);
+
+typedef struct {
+  // One of utf8name or name should be NULL.
+  const char* utf8name;
+  napi_value name;
+
+  napi_callback method;
+  napi_callback getter;
+  napi_callback setter;
+  napi_value value;
+
+  napi_property_attributes attributes;
+  void* data;
+} napi_property_descriptor;
+
+typedef struct {
+  const char* error_message;
+  void* engine_reserved;
+  uint32_t engine_error_code;
+  napi_status error_code;
+} napi_extended_error_info;
+
+#if NAPI_VERSION >= 6
+typedef enum {
+  napi_key_include_prototypes,
+  napi_key_own_only
+} napi_key_collection_mode;
+
+typedef enum {
+  napi_key_all_properties = 0,
+  napi_key_writable = 1,
+  napi_key_enumerable = 1 << 1,
+  napi_key_configurable = 1 << 2,
+  napi_key_skip_strings = 1 << 3,
+  napi_key_skip_symbols = 1 << 4
+} napi_key_filter;
+
+typedef enum {
+  napi_key_keep_numbers,
+  napi_key_numbers_to_strings
+} napi_key_conversion;
+#endif  // NAPI_VERSION >= 6
+
+#ifdef NAPI_EXPERIMENTAL
+typedef struct {
+  uint64_t lower;
+  uint64_t upper;
+} napi_type_tag;
+#endif  // NAPI_EXPERIMENTAL
+
+#endif  // SRC_JS_NATIVE_API_TYPES_H_
diff --git a/lwnode/apps/sqlite3/deps/include/napi-inl.deprecated.h b/lwnode/apps/sqlite3/deps/include/napi-inl.deprecated.h
new file mode 100644 (file)
index 0000000..51e954c
--- /dev/null
@@ -0,0 +1,192 @@
+#ifndef SRC_NAPI_INL_DEPRECATED_H_
+#define SRC_NAPI_INL_DEPRECATED_H_
+
+////////////////////////////////////////////////////////////////////////////////
+// PropertyDescriptor class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename Getter>
+inline PropertyDescriptor
+PropertyDescriptor::Accessor(const char* utf8name,
+                             Getter getter,
+                             napi_property_attributes attributes,
+                             void* /*data*/) {
+  using CbData = details::CallbackData<Getter, Napi::Value>;
+  // TODO: Delete when the function is destroyed
+  auto callbackData = new CbData({ getter, nullptr });
+
+  return PropertyDescriptor({
+    utf8name,
+    nullptr,
+    nullptr,
+    CbData::Wrapper,
+    nullptr,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Getter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(const std::string& utf8name,
+                                                       Getter getter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  return Accessor(utf8name.c_str(), getter, attributes, data);
+}
+
+template <typename Getter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(napi_value name,
+                                                       Getter getter,
+                                                       napi_property_attributes attributes,
+                                                       void* /*data*/) {
+  using CbData = details::CallbackData<Getter, Napi::Value>;
+  // TODO: Delete when the function is destroyed
+  auto callbackData = new CbData({ getter, nullptr });
+
+  return PropertyDescriptor({
+    nullptr,
+    name,
+    nullptr,
+    CbData::Wrapper,
+    nullptr,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Getter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(Name name,
+                                                       Getter getter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  napi_value nameValue = name;
+  return PropertyDescriptor::Accessor(nameValue, getter, attributes, data);
+}
+
+template <typename Getter, typename Setter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(const char* utf8name,
+                                                       Getter getter,
+                                                       Setter setter,
+                                                       napi_property_attributes attributes,
+                                                       void* /*data*/) {
+  using CbData = details::AccessorCallbackData<Getter, Setter>;
+  // TODO: Delete when the function is destroyed
+  auto callbackData = new CbData({ getter, setter, nullptr });
+
+  return PropertyDescriptor({
+    utf8name,
+    nullptr,
+    nullptr,
+    CbData::GetterWrapper,
+    CbData::SetterWrapper,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Getter, typename Setter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(const std::string& utf8name,
+                                                       Getter getter,
+                                                       Setter setter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  return Accessor(utf8name.c_str(), getter, setter, attributes, data);
+}
+
+template <typename Getter, typename Setter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(napi_value name,
+                                                       Getter getter,
+                                                       Setter setter,
+                                                       napi_property_attributes attributes,
+                                                       void* /*data*/) {
+  using CbData = details::AccessorCallbackData<Getter, Setter>;
+  // TODO: Delete when the function is destroyed
+  auto callbackData = new CbData({ getter, setter, nullptr });
+
+  return PropertyDescriptor({
+    nullptr,
+    name,
+    nullptr,
+    CbData::GetterWrapper,
+    CbData::SetterWrapper,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Getter, typename Setter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(Name name,
+                                                       Getter getter,
+                                                       Setter setter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  napi_value nameValue = name;
+  return PropertyDescriptor::Accessor(nameValue, getter, setter, attributes, data);
+}
+
+template <typename Callable>
+inline PropertyDescriptor PropertyDescriptor::Function(const char* utf8name,
+                                                       Callable cb,
+                                                       napi_property_attributes attributes,
+                                                       void* /*data*/) {
+  using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
+  using CbData = details::CallbackData<Callable, ReturnType>;
+  // TODO: Delete when the function is destroyed
+  auto callbackData = new CbData({ cb, nullptr });
+
+  return PropertyDescriptor({
+    utf8name,
+    nullptr,
+    CbData::Wrapper,
+    nullptr,
+    nullptr,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Callable>
+inline PropertyDescriptor PropertyDescriptor::Function(const std::string& utf8name,
+                                                       Callable cb,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  return Function(utf8name.c_str(), cb, attributes, data);
+}
+
+template <typename Callable>
+inline PropertyDescriptor PropertyDescriptor::Function(napi_value name,
+                                                       Callable cb,
+                                                       napi_property_attributes attributes,
+                                                       void* /*data*/) {
+  using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
+  using CbData = details::CallbackData<Callable, ReturnType>;
+  // TODO: Delete when the function is destroyed
+  auto callbackData = new CbData({ cb, nullptr });
+
+  return PropertyDescriptor({
+    nullptr,
+    name,
+    CbData::Wrapper,
+    nullptr,
+    nullptr,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Callable>
+inline PropertyDescriptor PropertyDescriptor::Function(Name name,
+                                                       Callable cb,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  napi_value nameValue = name;
+  return PropertyDescriptor::Function(nameValue, cb, attributes, data);
+}
+
+#endif // !SRC_NAPI_INL_DEPRECATED_H_
diff --git a/lwnode/apps/sqlite3/deps/include/napi-inl.h b/lwnode/apps/sqlite3/deps/include/napi-inl.h
new file mode 100644 (file)
index 0000000..7e9dd72
--- /dev/null
@@ -0,0 +1,5671 @@
+#ifndef SRC_NAPI_INL_H_
+#define SRC_NAPI_INL_H_
+
+////////////////////////////////////////////////////////////////////////////////
+// Node-API C++ Wrapper Classes
+//
+// Inline header-only implementations for "Node-API" ABI-stable C APIs for
+// Node.js.
+////////////////////////////////////////////////////////////////////////////////
+
+// Note: Do not include this file directly! Include "napi.h" instead.
+
+#include <algorithm>
+#include <cstring>
+#include <mutex>
+#include <type_traits>
+
+namespace Napi {
+
+// Helpers to handle functions exposed from C++.
+namespace details {
+
+// Attach a data item to an object and delete it when the object gets
+// garbage-collected.
+// TODO: Replace this code with `napi_add_finalizer()` whenever it becomes
+// available on all supported versions of Node.js.
+template <typename FreeType>
+static inline napi_status AttachData(napi_env env,
+                                     napi_value obj,
+                                     FreeType* data,
+                                     napi_finalize finalizer = nullptr,
+                                     void* hint = nullptr) {
+  napi_status status;
+  if (finalizer == nullptr) {
+    finalizer = [](napi_env /*env*/, void* data, void* /*hint*/) {
+      delete static_cast<FreeType*>(data);
+    };
+  }
+#if (NAPI_VERSION < 5)
+  napi_value symbol, external;
+  status = napi_create_symbol(env, nullptr, &symbol);
+  if (status == napi_ok) {
+    status = napi_create_external(env,
+                              data,
+                              finalizer,
+                              hint,
+                              &external);
+    if (status == napi_ok) {
+      napi_property_descriptor desc = {
+        nullptr,
+        symbol,
+        nullptr,
+        nullptr,
+        nullptr,
+        external,
+        napi_default,
+        nullptr
+      };
+      status = napi_define_properties(env, obj, 1, &desc);
+    }
+  }
+#else  // NAPI_VERSION >= 5
+  status = napi_add_finalizer(env, obj, data, finalizer, hint, nullptr);
+#endif
+  return status;
+}
+
+// For use in JS to C++ callback wrappers to catch any Napi::Error exceptions
+// and rethrow them as JavaScript exceptions before returning from the callback.
+template <typename Callable>
+inline napi_value WrapCallback(Callable callback) {
+#ifdef NAPI_CPP_EXCEPTIONS
+  try {
+    return callback();
+  } catch (const Error& e) {
+    e.ThrowAsJavaScriptException();
+    return nullptr;
+  }
+#else // NAPI_CPP_EXCEPTIONS
+  // When C++ exceptions are disabled, errors are immediately thrown as JS
+  // exceptions, so there is no need to catch and rethrow them here.
+  return callback();
+#endif // NAPI_CPP_EXCEPTIONS
+}
+
+// For use in JS to C++ void callback wrappers to catch any Napi::Error
+// exceptions and rethrow them as JavaScript exceptions before returning from the
+// callback.
+template <typename Callable>
+inline void WrapVoidCallback(Callable callback) {
+#ifdef NAPI_CPP_EXCEPTIONS
+  try {
+    callback();
+  } catch (const Error& e) {
+    e.ThrowAsJavaScriptException();
+  }
+#else // NAPI_CPP_EXCEPTIONS
+  // When C++ exceptions are disabled, errors are immediately thrown as JS
+  // exceptions, so there is no need to catch and rethrow them here.
+  callback();
+#endif // NAPI_CPP_EXCEPTIONS
+}
+
+template <typename Callable, typename Return>
+struct CallbackData {
+  static inline
+  napi_value Wrapper(napi_env env, napi_callback_info info) {
+    return details::WrapCallback([&] {
+      CallbackInfo callbackInfo(env, info);
+      CallbackData* callbackData =
+        static_cast<CallbackData*>(callbackInfo.Data());
+      callbackInfo.SetData(callbackData->data);
+      return callbackData->callback(callbackInfo);
+    });
+  }
+
+  Callable callback;
+  void* data;
+};
+
+template <typename Callable>
+struct CallbackData<Callable, void> {
+  static inline
+  napi_value Wrapper(napi_env env, napi_callback_info info) {
+    return details::WrapCallback([&] {
+      CallbackInfo callbackInfo(env, info);
+      CallbackData* callbackData =
+        static_cast<CallbackData*>(callbackInfo.Data());
+      callbackInfo.SetData(callbackData->data);
+      callbackData->callback(callbackInfo);
+      return nullptr;
+    });
+  }
+
+  Callable callback;
+  void* data;
+};
+
+template <void (*Callback)(const CallbackInfo& info)>
+static napi_value
+TemplatedVoidCallback(napi_env env, napi_callback_info info) NAPI_NOEXCEPT {
+  return details::WrapCallback([&] {
+    CallbackInfo cbInfo(env, info);
+    Callback(cbInfo);
+    return nullptr;
+  });
+}
+
+template <Napi::Value (*Callback)(const CallbackInfo& info)>
+static napi_value
+TemplatedCallback(napi_env env, napi_callback_info info) NAPI_NOEXCEPT {
+  return details::WrapCallback([&] {
+    CallbackInfo cbInfo(env, info);
+    return Callback(cbInfo);
+  });
+}
+
+template <typename T,
+          Napi::Value (T::*UnwrapCallback)(const CallbackInfo& info)>
+static napi_value
+TemplatedInstanceCallback(napi_env env, napi_callback_info info) NAPI_NOEXCEPT {
+  return details::WrapCallback([&] {
+    CallbackInfo cbInfo(env, info);
+    T* instance = T::Unwrap(cbInfo.This().As<Object>());
+    return (instance->*UnwrapCallback)(cbInfo);
+  });
+}
+
+template <typename T, void (T::*UnwrapCallback)(const CallbackInfo& info)>
+static napi_value
+TemplatedInstanceVoidCallback(napi_env env,
+                              napi_callback_info info) NAPI_NOEXCEPT {
+  return details::WrapCallback([&] {
+    CallbackInfo cbInfo(env, info);
+    T* instance = T::Unwrap(cbInfo.This().As<Object>());
+    (instance->*UnwrapCallback)(cbInfo);
+    return nullptr;
+  });
+}
+
+template <typename T, typename Finalizer, typename Hint = void>
+struct FinalizeData {
+  static inline void Wrapper(napi_env env,
+                             void* data,
+                             void* finalizeHint) NAPI_NOEXCEPT {
+    WrapVoidCallback([&] {
+      FinalizeData* finalizeData = static_cast<FinalizeData*>(finalizeHint);
+      finalizeData->callback(Env(env), static_cast<T*>(data));
+      delete finalizeData;
+    });
+  }
+
+  static inline void WrapperWithHint(napi_env env,
+                                     void* data,
+                                     void* finalizeHint) NAPI_NOEXCEPT {
+    WrapVoidCallback([&] {
+      FinalizeData* finalizeData = static_cast<FinalizeData*>(finalizeHint);
+      finalizeData->callback(Env(env), static_cast<T*>(data), finalizeData->hint);
+      delete finalizeData;
+    });
+  }
+
+  Finalizer callback;
+  Hint* hint;
+};
+
+#if (NAPI_VERSION > 3 && !defined(__wasm32__))
+template <typename ContextType=void,
+          typename Finalizer=std::function<void(Env, void*, ContextType*)>,
+          typename FinalizerDataType=void>
+struct ThreadSafeFinalize {
+  static inline
+  void Wrapper(napi_env env, void* rawFinalizeData, void* /* rawContext */) {
+    if (rawFinalizeData == nullptr)
+      return;
+
+    ThreadSafeFinalize* finalizeData =
+        static_cast<ThreadSafeFinalize*>(rawFinalizeData);
+    finalizeData->callback(Env(env));
+    delete finalizeData;
+  }
+
+  static inline
+  void FinalizeWrapperWithData(napi_env env,
+                               void* rawFinalizeData,
+                               void* /* rawContext */) {
+    if (rawFinalizeData == nullptr)
+      return;
+
+    ThreadSafeFinalize* finalizeData =
+        static_cast<ThreadSafeFinalize*>(rawFinalizeData);
+    finalizeData->callback(Env(env), finalizeData->data);
+    delete finalizeData;
+  }
+
+  static inline
+  void FinalizeWrapperWithContext(napi_env env,
+                                  void* rawFinalizeData,
+                                  void* rawContext) {
+    if (rawFinalizeData == nullptr)
+      return;
+
+    ThreadSafeFinalize* finalizeData =
+        static_cast<ThreadSafeFinalize*>(rawFinalizeData);
+    finalizeData->callback(Env(env), static_cast<ContextType*>(rawContext));
+    delete finalizeData;
+  }
+
+  static inline
+  void FinalizeFinalizeWrapperWithDataAndContext(napi_env env,
+                                         void* rawFinalizeData,
+                                         void* rawContext) {
+    if (rawFinalizeData == nullptr)
+      return;
+
+    ThreadSafeFinalize* finalizeData =
+        static_cast<ThreadSafeFinalize*>(rawFinalizeData);
+    finalizeData->callback(Env(env), finalizeData->data,
+        static_cast<ContextType*>(rawContext));
+    delete finalizeData;
+  }
+
+  FinalizerDataType* data;
+  Finalizer callback;
+};
+
+template <typename ContextType, typename DataType, typename CallJs, CallJs call>
+typename std::enable_if<call != nullptr>::type static inline CallJsWrapper(
+    napi_env env, napi_value jsCallback, void* context, void* data) {
+  call(env,
+       Function(env, jsCallback),
+       static_cast<ContextType*>(context),
+       static_cast<DataType*>(data));
+}
+
+template <typename ContextType, typename DataType, typename CallJs, CallJs call>
+typename std::enable_if<call == nullptr>::type static inline CallJsWrapper(
+    napi_env env, napi_value jsCallback, void* /*context*/, void* /*data*/) {
+  if (jsCallback != nullptr) {
+    Function(env, jsCallback).Call(0, nullptr);
+  }
+}
+
+#if NAPI_VERSION > 4
+
+template <typename CallbackType, typename TSFN>
+napi_value DefaultCallbackWrapper(napi_env /*env*/, std::nullptr_t /*cb*/) {
+  return nullptr;
+}
+
+template <typename CallbackType, typename TSFN>
+napi_value DefaultCallbackWrapper(napi_env /*env*/, Napi::Function cb) {
+  return cb;
+}
+
+#else
+template <typename CallbackType, typename TSFN>
+napi_value DefaultCallbackWrapper(napi_env env, Napi::Function cb) {
+  if (cb.IsEmpty()) {
+    return TSFN::EmptyFunctionFactory(env);
+  }
+  return cb;
+}
+#endif  // NAPI_VERSION > 4
+#endif  // NAPI_VERSION > 3 && !defined(__wasm32__)
+
+template <typename Getter, typename Setter>
+struct AccessorCallbackData {
+  static inline
+  napi_value GetterWrapper(napi_env env, napi_callback_info info) {
+    return details::WrapCallback([&] {
+      CallbackInfo callbackInfo(env, info);
+      AccessorCallbackData* callbackData =
+        static_cast<AccessorCallbackData*>(callbackInfo.Data());
+      callbackInfo.SetData(callbackData->data);
+      return callbackData->getterCallback(callbackInfo);
+    });
+  }
+
+  static inline
+  napi_value SetterWrapper(napi_env env, napi_callback_info info) {
+    return details::WrapCallback([&] {
+      CallbackInfo callbackInfo(env, info);
+      AccessorCallbackData* callbackData =
+        static_cast<AccessorCallbackData*>(callbackInfo.Data());
+      callbackInfo.SetData(callbackData->data);
+      callbackData->setterCallback(callbackInfo);
+      return nullptr;
+    });
+  }
+
+  Getter getterCallback;
+  Setter setterCallback;
+  void* data;
+};
+
+}  // namespace details
+
+#ifndef NODE_ADDON_API_DISABLE_DEPRECATED
+# include "napi-inl.deprecated.h"
+#endif // !NODE_ADDON_API_DISABLE_DEPRECATED
+
+////////////////////////////////////////////////////////////////////////////////
+// Module registration
+////////////////////////////////////////////////////////////////////////////////
+
+// Register an add-on based on an initializer function.
+#define NODE_API_MODULE(modname, regfunc)                                      \
+  static napi_value __napi_##regfunc(napi_env env, napi_value exports) {       \
+    return Napi::RegisterModule(env, exports, regfunc);                        \
+  }                                                                            \
+  NAPI_MODULE(modname, __napi_##regfunc)
+
+// Register an add-on based on a subclass of `Addon<T>` with a custom Node.js
+// module name.
+#define NODE_API_NAMED_ADDON(modname, classname)                 \
+  static napi_value __napi_ ## classname(napi_env env,           \
+                                         napi_value exports) {   \
+    return Napi::RegisterModule(env, exports, &classname::Init); \
+  }                                                              \
+  NAPI_MODULE(modname, __napi_ ## classname)
+
+// Register an add-on based on a subclass of `Addon<T>` with the Node.js module
+// name given by node-gyp from the `target_name` in binding.gyp.
+#define NODE_API_ADDON(classname) \
+  NODE_API_NAMED_ADDON(NODE_GYP_MODULE_NAME, classname)
+
+// Adapt the NAPI_MODULE registration function:
+//  - Wrap the arguments in NAPI wrappers.
+//  - Catch any NAPI errors and rethrow as JS exceptions.
+inline napi_value RegisterModule(napi_env env,
+                                 napi_value exports,
+                                 ModuleRegisterCallback registerCallback) {
+  return details::WrapCallback([&] {
+    return napi_value(registerCallback(Napi::Env(env),
+                                       Napi::Object(env, exports)));
+  });
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Env class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Env::Env(napi_env env) : _env(env) {
+}
+
+inline Env::operator napi_env() const {
+  return _env;
+}
+
+inline Object Env::Global() const {
+  napi_value value;
+  napi_status status = napi_get_global(*this, &value);
+  NAPI_THROW_IF_FAILED(*this, status, Object());
+  return Object(*this, value);
+}
+
+inline Value Env::Undefined() const {
+  napi_value value;
+  napi_status status = napi_get_undefined(*this, &value);
+  NAPI_THROW_IF_FAILED(*this, status, Value());
+  return Value(*this, value);
+}
+
+inline Value Env::Null() const {
+  napi_value value;
+  napi_status status = napi_get_null(*this, &value);
+  NAPI_THROW_IF_FAILED(*this, status, Value());
+  return Value(*this, value);
+}
+
+inline bool Env::IsExceptionPending() const {
+  bool result;
+  napi_status status = napi_is_exception_pending(_env, &result);
+  if (status != napi_ok) result = false; // Checking for a pending exception shouldn't throw.
+  return result;
+}
+
+inline Error Env::GetAndClearPendingException() {
+  napi_value value;
+  napi_status status = napi_get_and_clear_last_exception(_env, &value);
+  if (status != napi_ok) {
+    // Don't throw another exception when failing to get the exception!
+    return Error();
+  }
+  return Error(_env, value);
+}
+
+inline Value Env::RunScript(const char* utf8script) {
+  String script = String::New(_env, utf8script);
+  return RunScript(script);
+}
+
+inline Value Env::RunScript(const std::string& utf8script) {
+  return RunScript(utf8script.c_str());
+}
+
+inline Value Env::RunScript(String script) {
+  napi_value result;
+  napi_status status = napi_run_script(_env, script, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Undefined());
+  return Value(_env, result);
+}
+
+#if NAPI_VERSION > 5
+template <typename T, Env::Finalizer<T> fini>
+inline void Env::SetInstanceData(T* data) {
+  napi_status status =
+    napi_set_instance_data(_env, data, [](napi_env env, void* data, void*) {
+      fini(env, static_cast<T*>(data));
+    }, nullptr);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+template <typename DataType,
+          typename HintType,
+          Napi::Env::FinalizerWithHint<DataType, HintType> fini>
+inline void Env::SetInstanceData(DataType* data, HintType* hint) {
+  napi_status status =
+    napi_set_instance_data(_env, data,
+      [](napi_env env, void* data, void* hint) {
+        fini(env, static_cast<DataType*>(data), static_cast<HintType*>(hint));
+      }, hint);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+template <typename T>
+inline T* Env::GetInstanceData() {
+  void* data = nullptr;
+
+  napi_status status = napi_get_instance_data(_env, &data);
+  NAPI_THROW_IF_FAILED(_env, status, nullptr);
+
+  return static_cast<T*>(data);
+}
+
+template <typename T> void Env::DefaultFini(Env, T* data) {
+  delete data;
+}
+
+template <typename DataType, typename HintType>
+void Env::DefaultFiniWithHint(Env, DataType* data, HintType*) {
+  delete data;
+}
+#endif  // NAPI_VERSION > 5
+
+////////////////////////////////////////////////////////////////////////////////
+// Value class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Value::Value() : _env(nullptr), _value(nullptr) {
+}
+
+inline Value::Value(napi_env env, napi_value value) : _env(env), _value(value) {
+}
+
+inline Value::operator napi_value() const {
+  return _value;
+}
+
+inline bool Value::operator ==(const Value& other) const {
+  return StrictEquals(other);
+}
+
+inline bool Value::operator !=(const Value& other) const {
+  return !this->operator ==(other);
+}
+
+inline bool Value::StrictEquals(const Value& other) const {
+  bool result;
+  napi_status status = napi_strict_equals(_env, *this, other, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline Napi::Env Value::Env() const {
+  return Napi::Env(_env);
+}
+
+inline bool Value::IsEmpty() const {
+  return _value == nullptr;
+}
+
+inline napi_valuetype Value::Type() const {
+  if (IsEmpty()) {
+    return napi_undefined;
+  }
+
+  napi_valuetype type;
+  napi_status status = napi_typeof(_env, _value, &type);
+  NAPI_THROW_IF_FAILED(_env, status, napi_undefined);
+  return type;
+}
+
+inline bool Value::IsUndefined() const {
+  return Type() == napi_undefined;
+}
+
+inline bool Value::IsNull() const {
+  return Type() == napi_null;
+}
+
+inline bool Value::IsBoolean() const {
+  return Type() == napi_boolean;
+}
+
+inline bool Value::IsNumber() const {
+  return Type() == napi_number;
+}
+
+#if NAPI_VERSION > 5
+inline bool Value::IsBigInt() const {
+  return Type() == napi_bigint;
+}
+#endif  // NAPI_VERSION > 5
+
+#if (NAPI_VERSION > 4)
+inline bool Value::IsDate() const {
+  if (IsEmpty()) {
+    return false;
+  }
+
+  bool result;
+  napi_status status = napi_is_date(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+#endif
+
+inline bool Value::IsString() const {
+  return Type() == napi_string;
+}
+
+inline bool Value::IsSymbol() const {
+  return Type() == napi_symbol;
+}
+
+inline bool Value::IsArray() const {
+  if (IsEmpty()) {
+    return false;
+  }
+
+  bool result;
+  napi_status status = napi_is_array(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Value::IsArrayBuffer() const {
+  if (IsEmpty()) {
+    return false;
+  }
+
+  bool result;
+  napi_status status = napi_is_arraybuffer(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Value::IsTypedArray() const {
+  if (IsEmpty()) {
+    return false;
+  }
+
+  bool result;
+  napi_status status = napi_is_typedarray(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Value::IsObject() const {
+  return Type() == napi_object || IsFunction();
+}
+
+inline bool Value::IsFunction() const {
+  return Type() == napi_function;
+}
+
+inline bool Value::IsPromise() const {
+  if (IsEmpty()) {
+    return false;
+  }
+
+  bool result;
+  napi_status status = napi_is_promise(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Value::IsDataView() const {
+  if (IsEmpty()) {
+    return false;
+  }
+
+  bool result;
+  napi_status status = napi_is_dataview(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Value::IsBuffer() const {
+  if (IsEmpty()) {
+    return false;
+  }
+
+  bool result;
+  napi_status status = napi_is_buffer(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Value::IsExternal() const {
+  return Type() == napi_external;
+}
+
+template <typename T>
+inline T Value::As() const {
+  return T(_env, _value);
+}
+
+inline Boolean Value::ToBoolean() const {
+  napi_value result;
+  napi_status status = napi_coerce_to_bool(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Boolean());
+  return Boolean(_env, result);
+}
+
+inline Number Value::ToNumber() const {
+  napi_value result;
+  napi_status status = napi_coerce_to_number(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Number());
+  return Number(_env, result);
+}
+
+inline String Value::ToString() const {
+  napi_value result;
+  napi_status status = napi_coerce_to_string(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, String());
+  return String(_env, result);
+}
+
+inline Object Value::ToObject() const {
+  napi_value result;
+  napi_status status = napi_coerce_to_object(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Object());
+  return Object(_env, result);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Boolean class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Boolean Boolean::New(napi_env env, bool val) {
+  napi_value value;
+  napi_status status = napi_get_boolean(env, val, &value);
+  NAPI_THROW_IF_FAILED(env, status, Boolean());
+  return Boolean(env, value);
+}
+
+inline Boolean::Boolean() : Napi::Value() {
+}
+
+inline Boolean::Boolean(napi_env env, napi_value value) : Napi::Value(env, value) {
+}
+
+inline Boolean::operator bool() const {
+  return Value();
+}
+
+inline bool Boolean::Value() const {
+  bool result;
+  napi_status status = napi_get_value_bool(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Number class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Number Number::New(napi_env env, double val) {
+  napi_value value;
+  napi_status status = napi_create_double(env, val, &value);
+  NAPI_THROW_IF_FAILED(env, status, Number());
+  return Number(env, value);
+}
+
+inline Number::Number() : Value() {
+}
+
+inline Number::Number(napi_env env, napi_value value) : Value(env, value) {
+}
+
+inline Number::operator int32_t() const {
+  return Int32Value();
+}
+
+inline Number::operator uint32_t() const {
+  return Uint32Value();
+}
+
+inline Number::operator int64_t() const {
+  return Int64Value();
+}
+
+inline Number::operator float() const {
+  return FloatValue();
+}
+
+inline Number::operator double() const {
+  return DoubleValue();
+}
+
+inline int32_t Number::Int32Value() const {
+  int32_t result;
+  napi_status status = napi_get_value_int32(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return result;
+}
+
+inline uint32_t Number::Uint32Value() const {
+  uint32_t result;
+  napi_status status = napi_get_value_uint32(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return result;
+}
+
+inline int64_t Number::Int64Value() const {
+  int64_t result;
+  napi_status status = napi_get_value_int64(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return result;
+}
+
+inline float Number::FloatValue() const {
+  return static_cast<float>(DoubleValue());
+}
+
+inline double Number::DoubleValue() const {
+  double result;
+  napi_status status = napi_get_value_double(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return result;
+}
+
+#if NAPI_VERSION > 5
+////////////////////////////////////////////////////////////////////////////////
+// BigInt Class
+////////////////////////////////////////////////////////////////////////////////
+
+inline BigInt BigInt::New(napi_env env, int64_t val) {
+  napi_value value;
+  napi_status status = napi_create_bigint_int64(env, val, &value);
+  NAPI_THROW_IF_FAILED(env, status, BigInt());
+  return BigInt(env, value);
+}
+
+inline BigInt BigInt::New(napi_env env, uint64_t val) {
+  napi_value value;
+  napi_status status = napi_create_bigint_uint64(env, val, &value);
+  NAPI_THROW_IF_FAILED(env, status, BigInt());
+  return BigInt(env, value);
+}
+
+inline BigInt BigInt::New(napi_env env, int sign_bit, size_t word_count, const uint64_t* words) {
+  napi_value value;
+  napi_status status = napi_create_bigint_words(env, sign_bit, word_count, words, &value);
+  NAPI_THROW_IF_FAILED(env, status, BigInt());
+  return BigInt(env, value);
+}
+
+inline BigInt::BigInt() : Value() {
+}
+
+inline BigInt::BigInt(napi_env env, napi_value value) : Value(env, value) {
+}
+
+inline int64_t BigInt::Int64Value(bool* lossless) const {
+  int64_t result;
+  napi_status status = napi_get_value_bigint_int64(
+      _env, _value, &result, lossless);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return result;
+}
+
+inline uint64_t BigInt::Uint64Value(bool* lossless) const {
+  uint64_t result;
+  napi_status status = napi_get_value_bigint_uint64(
+      _env, _value, &result, lossless);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return result;
+}
+
+inline size_t BigInt::WordCount() const {
+  size_t word_count;
+  napi_status status = napi_get_value_bigint_words(
+      _env, _value, nullptr, &word_count, nullptr);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return word_count;
+}
+
+inline void BigInt::ToWords(int* sign_bit, size_t* word_count, uint64_t* words) {
+  napi_status status = napi_get_value_bigint_words(
+      _env, _value, sign_bit, word_count, words);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+#endif  // NAPI_VERSION > 5
+
+#if (NAPI_VERSION > 4)
+////////////////////////////////////////////////////////////////////////////////
+// Date Class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Date Date::New(napi_env env, double val) {
+  napi_value value;
+  napi_status status = napi_create_date(env, val, &value);
+  NAPI_THROW_IF_FAILED(env, status, Date());
+  return Date(env, value);
+}
+
+inline Date::Date() : Value() {
+}
+
+inline Date::Date(napi_env env, napi_value value) : Value(env, value) {
+}
+
+inline Date::operator double() const {
+  return ValueOf();
+}
+
+inline double Date::ValueOf() const {
+  double result;
+  napi_status status = napi_get_date_value(
+      _env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return result;
+}
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// Name class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Name::Name() : Value() {
+}
+
+inline Name::Name(napi_env env, napi_value value) : Value(env, value) {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// String class
+////////////////////////////////////////////////////////////////////////////////
+
+inline String String::New(napi_env env, const std::string& val) {
+  return String::New(env, val.c_str(), val.size());
+}
+
+inline String String::New(napi_env env, const std::u16string& val) {
+  return String::New(env, val.c_str(), val.size());
+}
+
+inline String String::New(napi_env env, const char* val) {
+  napi_value value;
+  napi_status status = napi_create_string_utf8(env, val, std::strlen(val), &value);
+  NAPI_THROW_IF_FAILED(env, status, String());
+  return String(env, value);
+}
+
+inline String String::New(napi_env env, const char16_t* val) {
+  napi_value value;
+  napi_status status = napi_create_string_utf16(env, val, std::u16string(val).size(), &value);
+  NAPI_THROW_IF_FAILED(env, status, String());
+  return String(env, value);
+}
+
+inline String String::New(napi_env env, const char* val, size_t length) {
+  napi_value value;
+  napi_status status = napi_create_string_utf8(env, val, length, &value);
+  NAPI_THROW_IF_FAILED(env, status, String());
+  return String(env, value);
+}
+
+inline String String::New(napi_env env, const char16_t* val, size_t length) {
+  napi_value value;
+  napi_status status = napi_create_string_utf16(env, val, length, &value);
+  NAPI_THROW_IF_FAILED(env, status, String());
+  return String(env, value);
+}
+
+inline String::String() : Name() {
+}
+
+inline String::String(napi_env env, napi_value value) : Name(env, value) {
+}
+
+inline String::operator std::string() const {
+  return Utf8Value();
+}
+
+inline String::operator std::u16string() const {
+  return Utf16Value();
+}
+
+inline std::string String::Utf8Value() const {
+  size_t length;
+  napi_status status = napi_get_value_string_utf8(_env, _value, nullptr, 0, &length);
+  NAPI_THROW_IF_FAILED(_env, status, "");
+
+  std::string value;
+  value.reserve(length + 1);
+  value.resize(length);
+  status = napi_get_value_string_utf8(_env, _value, &value[0], value.capacity(), nullptr);
+  NAPI_THROW_IF_FAILED(_env, status, "");
+  return value;
+}
+
+inline std::u16string String::Utf16Value() const {
+  size_t length;
+  napi_status status = napi_get_value_string_utf16(_env, _value, nullptr, 0, &length);
+  NAPI_THROW_IF_FAILED(_env, status, NAPI_WIDE_TEXT(""));
+
+  std::u16string value;
+  value.reserve(length + 1);
+  value.resize(length);
+  status = napi_get_value_string_utf16(_env, _value, &value[0], value.capacity(), nullptr);
+  NAPI_THROW_IF_FAILED(_env, status, NAPI_WIDE_TEXT(""));
+  return value;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Symbol class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Symbol Symbol::New(napi_env env, const char* description) {
+  napi_value descriptionValue = description != nullptr ?
+    String::New(env, description) : static_cast<napi_value>(nullptr);
+  return Symbol::New(env, descriptionValue);
+}
+
+inline Symbol Symbol::New(napi_env env, const std::string& description) {
+  napi_value descriptionValue = String::New(env, description);
+  return Symbol::New(env, descriptionValue);
+}
+
+inline Symbol Symbol::New(napi_env env, String description) {
+  napi_value descriptionValue = description;
+  return Symbol::New(env, descriptionValue);
+}
+
+inline Symbol Symbol::New(napi_env env, napi_value description) {
+  napi_value value;
+  napi_status status = napi_create_symbol(env, description, &value);
+  NAPI_THROW_IF_FAILED(env, status, Symbol());
+  return Symbol(env, value);
+}
+
+inline Symbol Symbol::WellKnown(napi_env env, const std::string& name) {
+  return Napi::Env(env).Global().Get("Symbol").As<Object>().Get(name).As<Symbol>();
+}
+
+inline Symbol::Symbol() : Name() {
+}
+
+inline Symbol::Symbol(napi_env env, napi_value value) : Name(env, value) {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Automagic value creation
+////////////////////////////////////////////////////////////////////////////////
+
+namespace details {
+template <typename T>
+struct vf_number {
+  static Number From(napi_env env, T value) {
+    return Number::New(env, static_cast<double>(value));
+  }
+};
+
+template<>
+struct vf_number<bool> {
+  static Boolean From(napi_env env, bool value) {
+    return Boolean::New(env, value);
+  }
+};
+
+struct vf_utf8_charp {
+  static String From(napi_env env, const char* value) {
+    return String::New(env, value);
+  }
+};
+
+struct vf_utf16_charp {
+  static String From(napi_env env, const char16_t* value) {
+    return String::New(env, value);
+  }
+};
+struct vf_utf8_string {
+  static String From(napi_env env, const std::string& value) {
+    return String::New(env, value);
+  }
+};
+
+struct vf_utf16_string {
+  static String From(napi_env env, const std::u16string& value) {
+    return String::New(env, value);
+  }
+};
+
+template <typename T>
+struct vf_fallback {
+  static Value From(napi_env env, const T& value) {
+    return Value(env, value);
+  }
+};
+
+template <typename...> struct disjunction : std::false_type {};
+template <typename B> struct disjunction<B> : B {};
+template <typename B, typename... Bs>
+struct disjunction<B, Bs...>
+    : std::conditional<bool(B::value), B, disjunction<Bs...>>::type {};
+
+template <typename T>
+struct can_make_string
+    : disjunction<typename std::is_convertible<T, const char *>::type,
+                  typename std::is_convertible<T, const char16_t *>::type,
+                  typename std::is_convertible<T, std::string>::type,
+                  typename std::is_convertible<T, std::u16string>::type> {};
+}
+
+template <typename T>
+Value Value::From(napi_env env, const T& value) {
+  using Helper = typename std::conditional<
+    std::is_integral<T>::value || std::is_floating_point<T>::value,
+    details::vf_number<T>,
+    typename std::conditional<
+      details::can_make_string<T>::value,
+      String,
+      details::vf_fallback<T>
+    >::type
+  >::type;
+  return Helper::From(env, value);
+}
+
+template <typename T>
+String String::From(napi_env env, const T& value) {
+  struct Dummy {};
+  using Helper = typename std::conditional<
+    std::is_convertible<T, const char*>::value,
+    details::vf_utf8_charp,
+    typename std::conditional<
+      std::is_convertible<T, const char16_t*>::value,
+      details::vf_utf16_charp,
+      typename std::conditional<
+        std::is_convertible<T, std::string>::value,
+        details::vf_utf8_string,
+        typename std::conditional<
+          std::is_convertible<T, std::u16string>::value,
+          details::vf_utf16_string,
+          Dummy
+        >::type
+      >::type
+    >::type
+  >::type;
+  return Helper::From(env, value);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Object class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename Key>
+inline Object::PropertyLValue<Key>::operator Value() const {
+  return Object(_env, _object).Get(_key);
+}
+
+template <typename Key> template <typename ValueType>
+inline Object::PropertyLValue<Key>& Object::PropertyLValue<Key>::operator =(ValueType value) {
+  Object(_env, _object).Set(_key, value);
+  return *this;
+}
+
+template <typename Key>
+inline Object::PropertyLValue<Key>::PropertyLValue(Object object, Key key)
+  : _env(object.Env()), _object(object), _key(key) {}
+
+inline Object Object::New(napi_env env) {
+  napi_value value;
+  napi_status status = napi_create_object(env, &value);
+  NAPI_THROW_IF_FAILED(env, status, Object());
+  return Object(env, value);
+}
+
+inline Object::Object() : Value() {
+}
+
+inline Object::Object(napi_env env, napi_value value) : Value(env, value) {
+}
+
+inline Object::PropertyLValue<std::string> Object::operator [](const char* utf8name) {
+  return PropertyLValue<std::string>(*this, utf8name);
+}
+
+inline Object::PropertyLValue<std::string> Object::operator [](const std::string& utf8name) {
+  return PropertyLValue<std::string>(*this, utf8name);
+}
+
+inline Object::PropertyLValue<uint32_t> Object::operator [](uint32_t index) {
+  return PropertyLValue<uint32_t>(*this, index);
+}
+
+inline Value Object::operator [](const char* utf8name) const {
+  return Get(utf8name);
+}
+
+inline Value Object::operator [](const std::string& utf8name) const {
+  return Get(utf8name);
+}
+
+inline Value Object::operator [](uint32_t index) const {
+  return Get(index);
+}
+
+inline bool Object::Has(napi_value key) const {
+  bool result;
+  napi_status status = napi_has_property(_env, _value, key, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Object::Has(Value key) const {
+  bool result;
+  napi_status status = napi_has_property(_env, _value, key, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Object::Has(const char* utf8name) const {
+  bool result;
+  napi_status status = napi_has_named_property(_env, _value, utf8name, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Object::Has(const std::string& utf8name) const {
+  return Has(utf8name.c_str());
+}
+
+inline bool Object::HasOwnProperty(napi_value key) const {
+  bool result;
+  napi_status status = napi_has_own_property(_env, _value, key, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Object::HasOwnProperty(Value key) const {
+  bool result;
+  napi_status status = napi_has_own_property(_env, _value, key, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Object::HasOwnProperty(const char* utf8name) const {
+  napi_value key;
+  napi_status status = napi_create_string_utf8(_env, utf8name, std::strlen(utf8name), &key);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return HasOwnProperty(key);
+}
+
+inline bool Object::HasOwnProperty(const std::string& utf8name) const {
+  return HasOwnProperty(utf8name.c_str());
+}
+
+inline Value Object::Get(napi_value key) const {
+  napi_value result;
+  napi_status status = napi_get_property(_env, _value, key, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Value());
+  return Value(_env, result);
+}
+
+inline Value Object::Get(Value key) const {
+  napi_value result;
+  napi_status status = napi_get_property(_env, _value, key, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Value());
+  return Value(_env, result);
+}
+
+inline Value Object::Get(const char* utf8name) const {
+  napi_value result;
+  napi_status status = napi_get_named_property(_env, _value, utf8name, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Value());
+  return Value(_env, result);
+}
+
+inline Value Object::Get(const std::string& utf8name) const {
+  return Get(utf8name.c_str());
+}
+
+template <typename ValueType>
+inline bool Object::Set(napi_value key, const ValueType& value) {
+  napi_status status =
+      napi_set_property(_env, _value, key, Value::From(_env, value));
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+
+template <typename ValueType>
+inline bool Object::Set(Value key, const ValueType& value) {
+  napi_status status =
+      napi_set_property(_env, _value, key, Value::From(_env, value));
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+
+template <typename ValueType>
+inline bool Object::Set(const char* utf8name, const ValueType& value) {
+  napi_status status =
+      napi_set_named_property(_env, _value, utf8name, Value::From(_env, value));
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+
+template <typename ValueType>
+inline bool Object::Set(const std::string& utf8name, const ValueType& value) {
+  return Set(utf8name.c_str(), value);
+}
+
+inline bool Object::Delete(napi_value key) {
+  bool result;
+  napi_status status = napi_delete_property(_env, _value, key, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Object::Delete(Value key) {
+  bool result;
+  napi_status status = napi_delete_property(_env, _value, key, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline bool Object::Delete(const char* utf8name) {
+  return Delete(String::New(_env, utf8name));
+}
+
+inline bool Object::Delete(const std::string& utf8name) {
+  return Delete(String::New(_env, utf8name));
+}
+
+inline bool Object::Has(uint32_t index) const {
+  bool result;
+  napi_status status = napi_has_element(_env, _value, index, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline Value Object::Get(uint32_t index) const {
+  napi_value value;
+  napi_status status = napi_get_element(_env, _value, index, &value);
+  NAPI_THROW_IF_FAILED(_env, status, Value());
+  return Value(_env, value);
+}
+
+template <typename ValueType>
+inline bool Object::Set(uint32_t index, const ValueType& value) {
+  napi_status status =
+      napi_set_element(_env, _value, index, Value::From(_env, value));
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+
+inline bool Object::Delete(uint32_t index) {
+  bool result;
+  napi_status status = napi_delete_element(_env, _value, index, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+inline Array Object::GetPropertyNames() const {
+  napi_value result;
+  napi_status status = napi_get_property_names(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Array());
+  return Array(_env, result);
+}
+
+inline bool Object::DefineProperty(const PropertyDescriptor& property) {
+  napi_status status = napi_define_properties(_env, _value, 1,
+    reinterpret_cast<const napi_property_descriptor*>(&property));
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+
+inline bool Object::DefineProperties(
+    const std::initializer_list<PropertyDescriptor>& properties) {
+  napi_status status = napi_define_properties(_env, _value, properties.size(),
+    reinterpret_cast<const napi_property_descriptor*>(properties.begin()));
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+
+inline bool Object::DefineProperties(
+    const std::vector<PropertyDescriptor>& properties) {
+  napi_status status = napi_define_properties(_env, _value, properties.size(),
+    reinterpret_cast<const napi_property_descriptor*>(properties.data()));
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+
+inline bool Object::InstanceOf(const Function& constructor) const {
+  bool result;
+  napi_status status = napi_instanceof(_env, _value, constructor, &result);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return result;
+}
+
+template <typename Finalizer, typename T>
+inline void Object::AddFinalizer(Finalizer finalizeCallback, T* data) {
+  details::FinalizeData<T, Finalizer>* finalizeData =
+      new details::FinalizeData<T, Finalizer>(
+          {std::move(finalizeCallback), nullptr});
+  napi_status status =
+      details::AttachData(_env,
+                          *this,
+                          data,
+                          details::FinalizeData<T, Finalizer>::Wrapper,
+                          finalizeData);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED_VOID(_env, status);
+  }
+}
+
+template <typename Finalizer, typename T, typename Hint>
+inline void Object::AddFinalizer(Finalizer finalizeCallback,
+                                 T* data,
+                                 Hint* finalizeHint) {
+  details::FinalizeData<T, Finalizer, Hint>* finalizeData =
+      new details::FinalizeData<T, Finalizer, Hint>(
+          {std::move(finalizeCallback), finalizeHint});
+  napi_status status =
+      details::AttachData(_env,
+                          *this,
+                          data,
+                          details::FinalizeData<T, Finalizer, Hint>::WrapperWithHint,
+                          finalizeData);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED_VOID(_env, status);
+  }
+}
+
+#if NAPI_VERSION >= 8
+inline bool Object::Freeze() {
+  napi_status status = napi_object_freeze(_env, _value);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+
+inline bool Object::Seal() {
+  napi_status status = napi_object_seal(_env, _value);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return true;
+}
+#endif  // NAPI_VERSION >= 8
+
+////////////////////////////////////////////////////////////////////////////////
+// External class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline External<T> External<T>::New(napi_env env, T* data) {
+  napi_value value;
+  napi_status status = napi_create_external(env, data, nullptr, nullptr, &value);
+  NAPI_THROW_IF_FAILED(env, status, External());
+  return External(env, value);
+}
+
+template <typename T>
+template <typename Finalizer>
+inline External<T> External<T>::New(napi_env env,
+                                    T* data,
+                                    Finalizer finalizeCallback) {
+  napi_value value;
+  details::FinalizeData<T, Finalizer>* finalizeData =
+      new details::FinalizeData<T, Finalizer>(
+          {std::move(finalizeCallback), nullptr});
+  napi_status status = napi_create_external(
+    env,
+    data,
+    details::FinalizeData<T, Finalizer>::Wrapper,
+    finalizeData,
+    &value);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(env, status, External());
+  }
+  return External(env, value);
+}
+
+template <typename T>
+template <typename Finalizer, typename Hint>
+inline External<T> External<T>::New(napi_env env,
+                                    T* data,
+                                    Finalizer finalizeCallback,
+                                    Hint* finalizeHint) {
+  napi_value value;
+  details::FinalizeData<T, Finalizer, Hint>* finalizeData =
+      new details::FinalizeData<T, Finalizer, Hint>(
+          {std::move(finalizeCallback), finalizeHint});
+  napi_status status = napi_create_external(
+    env,
+    data,
+    details::FinalizeData<T, Finalizer, Hint>::WrapperWithHint,
+    finalizeData,
+    &value);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(env, status, External());
+  }
+  return External(env, value);
+}
+
+template <typename T>
+inline External<T>::External() : Value() {
+}
+
+template <typename T>
+inline External<T>::External(napi_env env, napi_value value) : Value(env, value) {
+}
+
+template <typename T>
+inline T* External<T>::Data() const {
+  void* data;
+  napi_status status = napi_get_value_external(_env, _value, &data);
+  NAPI_THROW_IF_FAILED(_env, status, nullptr);
+  return reinterpret_cast<T*>(data);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Array class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Array Array::New(napi_env env) {
+  napi_value value;
+  napi_status status = napi_create_array(env, &value);
+  NAPI_THROW_IF_FAILED(env, status, Array());
+  return Array(env, value);
+}
+
+inline Array Array::New(napi_env env, size_t length) {
+  napi_value value;
+  napi_status status = napi_create_array_with_length(env, length, &value);
+  NAPI_THROW_IF_FAILED(env, status, Array());
+  return Array(env, value);
+}
+
+inline Array::Array() : Object() {
+}
+
+inline Array::Array(napi_env env, napi_value value) : Object(env, value) {
+}
+
+inline uint32_t Array::Length() const {
+  uint32_t result;
+  napi_status status = napi_get_array_length(_env, _value, &result);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// ArrayBuffer class
+////////////////////////////////////////////////////////////////////////////////
+
+inline ArrayBuffer ArrayBuffer::New(napi_env env, size_t byteLength) {
+  napi_value value;
+  void* data;
+  napi_status status = napi_create_arraybuffer(env, byteLength, &data, &value);
+  NAPI_THROW_IF_FAILED(env, status, ArrayBuffer());
+
+  return ArrayBuffer(env, value);
+}
+
+inline ArrayBuffer ArrayBuffer::New(napi_env env,
+                                    void* externalData,
+                                    size_t byteLength) {
+  napi_value value;
+  napi_status status = napi_create_external_arraybuffer(
+    env, externalData, byteLength, nullptr, nullptr, &value);
+  NAPI_THROW_IF_FAILED(env, status, ArrayBuffer());
+
+  return ArrayBuffer(env, value);
+}
+
+template <typename Finalizer>
+inline ArrayBuffer ArrayBuffer::New(napi_env env,
+                                    void* externalData,
+                                    size_t byteLength,
+                                    Finalizer finalizeCallback) {
+  napi_value value;
+  details::FinalizeData<void, Finalizer>* finalizeData =
+      new details::FinalizeData<void, Finalizer>(
+          {std::move(finalizeCallback), nullptr});
+  napi_status status = napi_create_external_arraybuffer(
+    env,
+    externalData,
+    byteLength,
+    details::FinalizeData<void, Finalizer>::Wrapper,
+    finalizeData,
+    &value);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(env, status, ArrayBuffer());
+  }
+
+  return ArrayBuffer(env, value);
+}
+
+template <typename Finalizer, typename Hint>
+inline ArrayBuffer ArrayBuffer::New(napi_env env,
+                                    void* externalData,
+                                    size_t byteLength,
+                                    Finalizer finalizeCallback,
+                                    Hint* finalizeHint) {
+  napi_value value;
+  details::FinalizeData<void, Finalizer, Hint>* finalizeData =
+      new details::FinalizeData<void, Finalizer, Hint>(
+          {std::move(finalizeCallback), finalizeHint});
+  napi_status status = napi_create_external_arraybuffer(
+    env,
+    externalData,
+    byteLength,
+    details::FinalizeData<void, Finalizer, Hint>::WrapperWithHint,
+    finalizeData,
+    &value);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(env, status, ArrayBuffer());
+  }
+
+  return ArrayBuffer(env, value);
+}
+
+inline ArrayBuffer::ArrayBuffer() : Object() {
+}
+
+inline ArrayBuffer::ArrayBuffer(napi_env env, napi_value value)
+  : Object(env, value) {
+}
+
+inline void* ArrayBuffer::Data() {
+  void* data;
+  napi_status status = napi_get_arraybuffer_info(_env, _value, &data, nullptr);
+  NAPI_THROW_IF_FAILED(_env, status, nullptr);
+  return data;
+}
+
+inline size_t ArrayBuffer::ByteLength() {
+  size_t length;
+  napi_status status = napi_get_arraybuffer_info(_env, _value, nullptr, &length);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return length;
+}
+
+#if NAPI_VERSION >= 7
+inline bool ArrayBuffer::IsDetached() const {
+  bool detached;
+  napi_status status = napi_is_detached_arraybuffer(_env, _value, &detached);
+  NAPI_THROW_IF_FAILED(_env, status, false);
+  return detached;
+}
+
+inline void ArrayBuffer::Detach() {
+  napi_status status = napi_detach_arraybuffer(_env, _value);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+#endif  // NAPI_VERSION >= 7
+
+////////////////////////////////////////////////////////////////////////////////
+// DataView class
+////////////////////////////////////////////////////////////////////////////////
+inline DataView DataView::New(napi_env env,
+                              Napi::ArrayBuffer arrayBuffer) {
+  return New(env, arrayBuffer, 0, arrayBuffer.ByteLength());
+}
+
+inline DataView DataView::New(napi_env env,
+                              Napi::ArrayBuffer arrayBuffer,
+                              size_t byteOffset) {
+  if (byteOffset > arrayBuffer.ByteLength()) {
+    NAPI_THROW(RangeError::New(env,
+        "Start offset is outside the bounds of the buffer"),
+        DataView());
+  }
+  return New(env, arrayBuffer, byteOffset,
+      arrayBuffer.ByteLength() - byteOffset);
+}
+
+inline DataView DataView::New(napi_env env,
+                              Napi::ArrayBuffer arrayBuffer,
+                              size_t byteOffset,
+                              size_t byteLength) {
+  if (byteOffset + byteLength > arrayBuffer.ByteLength()) {
+    NAPI_THROW(RangeError::New(env, "Invalid DataView length"),
+               DataView());
+  }
+  napi_value value;
+  napi_status status = napi_create_dataview(
+    env, byteLength, arrayBuffer, byteOffset, &value);
+  NAPI_THROW_IF_FAILED(env, status, DataView());
+  return DataView(env, value);
+}
+
+inline DataView::DataView() : Object() {
+}
+
+inline DataView::DataView(napi_env env, napi_value value) : Object(env, value) {
+  napi_status status = napi_get_dataview_info(
+    _env,
+    _value   /* dataView */,
+    &_length /* byteLength */,
+    &_data   /* data */,
+    nullptr  /* arrayBuffer */,
+    nullptr  /* byteOffset */);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline Napi::ArrayBuffer DataView::ArrayBuffer() const {
+  napi_value arrayBuffer;
+  napi_status status = napi_get_dataview_info(
+    _env,
+    _value       /* dataView */,
+    nullptr      /* byteLength */,
+    nullptr      /* data */,
+    &arrayBuffer /* arrayBuffer */,
+    nullptr      /* byteOffset */);
+  NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer());
+  return Napi::ArrayBuffer(_env, arrayBuffer);
+}
+
+inline size_t DataView::ByteOffset() const {
+  size_t byteOffset;
+  napi_status status = napi_get_dataview_info(
+    _env,
+    _value      /* dataView */,
+    nullptr     /* byteLength */,
+    nullptr     /* data */,
+    nullptr     /* arrayBuffer */,
+    &byteOffset /* byteOffset */);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return byteOffset;
+}
+
+inline size_t DataView::ByteLength() const {
+  return _length;
+}
+
+inline void* DataView::Data() const {
+  return _data;
+}
+
+inline float DataView::GetFloat32(size_t byteOffset) const {
+  return ReadData<float>(byteOffset);
+}
+
+inline double DataView::GetFloat64(size_t byteOffset) const {
+  return ReadData<double>(byteOffset);
+}
+
+inline int8_t DataView::GetInt8(size_t byteOffset) const {
+  return ReadData<int8_t>(byteOffset);
+}
+
+inline int16_t DataView::GetInt16(size_t byteOffset) const {
+  return ReadData<int16_t>(byteOffset);
+}
+
+inline int32_t DataView::GetInt32(size_t byteOffset) const {
+  return ReadData<int32_t>(byteOffset);
+}
+
+inline uint8_t DataView::GetUint8(size_t byteOffset) const {
+  return ReadData<uint8_t>(byteOffset);
+}
+
+inline uint16_t DataView::GetUint16(size_t byteOffset) const {
+  return ReadData<uint16_t>(byteOffset);
+}
+
+inline uint32_t DataView::GetUint32(size_t byteOffset) const {
+  return ReadData<uint32_t>(byteOffset);
+}
+
+inline void DataView::SetFloat32(size_t byteOffset, float value) const {
+  WriteData<float>(byteOffset, value);
+}
+
+inline void DataView::SetFloat64(size_t byteOffset, double value) const {
+  WriteData<double>(byteOffset, value);
+}
+
+inline void DataView::SetInt8(size_t byteOffset, int8_t value) const {
+  WriteData<int8_t>(byteOffset, value);
+}
+
+inline void DataView::SetInt16(size_t byteOffset, int16_t value) const {
+  WriteData<int16_t>(byteOffset, value);
+}
+
+inline void DataView::SetInt32(size_t byteOffset, int32_t value) const {
+  WriteData<int32_t>(byteOffset, value);
+}
+
+inline void DataView::SetUint8(size_t byteOffset, uint8_t value) const {
+  WriteData<uint8_t>(byteOffset, value);
+}
+
+inline void DataView::SetUint16(size_t byteOffset, uint16_t value) const {
+  WriteData<uint16_t>(byteOffset, value);
+}
+
+inline void DataView::SetUint32(size_t byteOffset, uint32_t value) const {
+  WriteData<uint32_t>(byteOffset, value);
+}
+
+template <typename T>
+inline T DataView::ReadData(size_t byteOffset) const {
+  if (byteOffset + sizeof(T) > _length ||
+      byteOffset + sizeof(T) < byteOffset) {  // overflow
+    NAPI_THROW(RangeError::New(_env,
+        "Offset is outside the bounds of the DataView"), 0);
+  }
+
+  return *reinterpret_cast<T*>(static_cast<uint8_t*>(_data) + byteOffset);
+}
+
+template <typename T>
+inline void DataView::WriteData(size_t byteOffset, T value) const {
+  if (byteOffset + sizeof(T) > _length ||
+      byteOffset + sizeof(T) < byteOffset) {  // overflow
+    NAPI_THROW_VOID(RangeError::New(_env,
+        "Offset is outside the bounds of the DataView"));
+  }
+
+  *reinterpret_cast<T*>(static_cast<uint8_t*>(_data) + byteOffset) = value;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// TypedArray class
+////////////////////////////////////////////////////////////////////////////////
+
+inline TypedArray::TypedArray()
+  : Object(), _type(TypedArray::unknown_array_type), _length(0) {
+}
+
+inline TypedArray::TypedArray(napi_env env, napi_value value)
+  : Object(env, value), _type(TypedArray::unknown_array_type), _length(0) {
+}
+
+inline TypedArray::TypedArray(napi_env env,
+                              napi_value value,
+                              napi_typedarray_type type,
+                              size_t length)
+  : Object(env, value), _type(type), _length(length) {
+}
+
+inline napi_typedarray_type TypedArray::TypedArrayType() const {
+  if (_type == TypedArray::unknown_array_type) {
+    napi_status status = napi_get_typedarray_info(_env, _value,
+      &const_cast<TypedArray*>(this)->_type, &const_cast<TypedArray*>(this)->_length,
+      nullptr, nullptr, nullptr);
+    NAPI_THROW_IF_FAILED(_env, status, napi_int8_array);
+  }
+
+  return _type;
+}
+
+inline uint8_t TypedArray::ElementSize() const {
+  switch (TypedArrayType()) {
+    case napi_int8_array:
+    case napi_uint8_array:
+    case napi_uint8_clamped_array:
+      return 1;
+    case napi_int16_array:
+    case napi_uint16_array:
+      return 2;
+    case napi_int32_array:
+    case napi_uint32_array:
+    case napi_float32_array:
+      return 4;
+    case napi_float64_array:
+#if (NAPI_VERSION > 5)
+    case napi_bigint64_array:
+    case napi_biguint64_array:
+#endif  // (NAPI_VERSION > 5)
+      return 8;
+    default:
+      return 0;
+  }
+}
+
+inline size_t TypedArray::ElementLength() const {
+  if (_type == TypedArray::unknown_array_type) {
+    napi_status status = napi_get_typedarray_info(_env, _value,
+      &const_cast<TypedArray*>(this)->_type, &const_cast<TypedArray*>(this)->_length,
+      nullptr, nullptr, nullptr);
+    NAPI_THROW_IF_FAILED(_env, status, 0);
+  }
+
+  return _length;
+}
+
+inline size_t TypedArray::ByteOffset() const {
+  size_t byteOffset;
+  napi_status status = napi_get_typedarray_info(
+    _env, _value, nullptr, nullptr, nullptr, nullptr, &byteOffset);
+  NAPI_THROW_IF_FAILED(_env, status, 0);
+  return byteOffset;
+}
+
+inline size_t TypedArray::ByteLength() const {
+  return ElementSize() * ElementLength();
+}
+
+inline Napi::ArrayBuffer TypedArray::ArrayBuffer() const {
+  napi_value arrayBuffer;
+  napi_status status = napi_get_typedarray_info(
+    _env, _value, nullptr, nullptr, nullptr, &arrayBuffer, nullptr);
+  NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer());
+  return Napi::ArrayBuffer(_env, arrayBuffer);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// TypedArrayOf<T> class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline TypedArrayOf<T> TypedArrayOf<T>::New(napi_env env,
+                                            size_t elementLength,
+                                            napi_typedarray_type type) {
+  Napi::ArrayBuffer arrayBuffer = Napi::ArrayBuffer::New(env, elementLength * sizeof (T));
+  return New(env, elementLength, arrayBuffer, 0, type);
+}
+
+template <typename T>
+inline TypedArrayOf<T> TypedArrayOf<T>::New(napi_env env,
+                                            size_t elementLength,
+                                            Napi::ArrayBuffer arrayBuffer,
+                                            size_t bufferOffset,
+                                            napi_typedarray_type type) {
+  napi_value value;
+  napi_status status = napi_create_typedarray(
+    env, type, elementLength, arrayBuffer, bufferOffset, &value);
+  NAPI_THROW_IF_FAILED(env, status, TypedArrayOf<T>());
+
+  return TypedArrayOf<T>(
+    env, value, type, elementLength,
+    reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(arrayBuffer.Data()) + bufferOffset));
+}
+
+template <typename T>
+inline TypedArrayOf<T>::TypedArrayOf() : TypedArray(), _data(nullptr) {
+}
+
+template <typename T>
+inline TypedArrayOf<T>::TypedArrayOf(napi_env env, napi_value value)
+  : TypedArray(env, value), _data(nullptr) {
+  napi_status status = napi_ok;
+  if (value != nullptr) {
+    status = napi_get_typedarray_info(
+      _env, _value, &_type, &_length, reinterpret_cast<void**>(&_data), nullptr, nullptr);
+  } else {
+    _type = TypedArrayTypeForPrimitiveType<T>();
+    _length = 0;
+  }
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+template <typename T>
+inline TypedArrayOf<T>::TypedArrayOf(napi_env env,
+                                     napi_value value,
+                                     napi_typedarray_type type,
+                                     size_t length,
+                                     T* data)
+  : TypedArray(env, value, type, length), _data(data) {
+  if (!(type == TypedArrayTypeForPrimitiveType<T>() ||
+      (type == napi_uint8_clamped_array && std::is_same<T, uint8_t>::value))) {
+    NAPI_THROW_VOID(TypeError::New(env, "Array type must match the template parameter. "
+      "(Uint8 arrays may optionally have the \"clamped\" array type.)"));
+  }
+}
+
+template <typename T>
+inline T& TypedArrayOf<T>::operator [](size_t index) {
+  return _data[index];
+}
+
+template <typename T>
+inline const T& TypedArrayOf<T>::operator [](size_t index) const {
+  return _data[index];
+}
+
+template <typename T>
+inline T* TypedArrayOf<T>::Data() {
+  return _data;
+}
+
+template <typename T>
+inline const T* TypedArrayOf<T>::Data() const {
+  return _data;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Function class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename CbData>
+static inline napi_status
+CreateFunction(napi_env env,
+               const char* utf8name,
+               napi_callback cb,
+               CbData* data,
+               napi_value* result) {
+  napi_status status =
+      napi_create_function(env, utf8name, NAPI_AUTO_LENGTH, cb, data, result);
+  if (status == napi_ok) {
+    status = Napi::details::AttachData(env, *result, data);
+  }
+
+  return status;
+}
+
+template <Function::VoidCallback cb>
+inline Function Function::New(napi_env env, const char* utf8name, void* data) {
+  napi_value result = nullptr;
+  napi_status status = napi_create_function(env,
+                                            utf8name,
+                                            NAPI_AUTO_LENGTH,
+                                            details::TemplatedVoidCallback<cb>,
+                                            data,
+                                            &result);
+  NAPI_THROW_IF_FAILED(env, status, Function());
+  return Function(env, result);
+}
+
+template <Function::Callback cb>
+inline Function Function::New(napi_env env, const char* utf8name, void* data) {
+  napi_value result = nullptr;
+  napi_status status = napi_create_function(env,
+                                            utf8name,
+                                            NAPI_AUTO_LENGTH,
+                                            details::TemplatedCallback<cb>,
+                                            data,
+                                            &result);
+  NAPI_THROW_IF_FAILED(env, status, Function());
+  return Function(env, result);
+}
+
+template <Function::VoidCallback cb>
+inline Function Function::New(napi_env env,
+                              const std::string& utf8name,
+                              void* data) {
+  return Function::New<cb>(env, utf8name.c_str(), data);
+}
+
+template <Function::Callback cb>
+inline Function Function::New(napi_env env,
+                              const std::string& utf8name,
+                              void* data) {
+  return Function::New<cb>(env, utf8name.c_str(), data);
+}
+
+template <typename Callable>
+inline Function Function::New(napi_env env,
+                              Callable cb,
+                              const char* utf8name,
+                              void* data) {
+  using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
+  using CbData = details::CallbackData<Callable, ReturnType>;
+  auto callbackData = new CbData({ cb, data });
+
+  napi_value value;
+  napi_status status = CreateFunction(env,
+                                      utf8name,
+                                      CbData::Wrapper,
+                                      callbackData,
+                                      &value);
+  if (status != napi_ok) {
+    delete callbackData;
+    NAPI_THROW_IF_FAILED(env, status, Function());
+  }
+
+  return Function(env, value);
+}
+
+template <typename Callable>
+inline Function Function::New(napi_env env,
+                              Callable cb,
+                              const std::string& utf8name,
+                              void* data) {
+  return New(env, cb, utf8name.c_str(), data);
+}
+
+inline Function::Function() : Object() {
+}
+
+inline Function::Function(napi_env env, napi_value value) : Object(env, value) {
+}
+
+inline Value Function::operator ()(const std::initializer_list<napi_value>& args) const {
+  return Call(Env().Undefined(), args);
+}
+
+inline Value Function::Call(const std::initializer_list<napi_value>& args) const {
+  return Call(Env().Undefined(), args);
+}
+
+inline Value Function::Call(const std::vector<napi_value>& args) const {
+  return Call(Env().Undefined(), args);
+}
+
+inline Value Function::Call(size_t argc, const napi_value* args) const {
+  return Call(Env().Undefined(), argc, args);
+}
+
+inline Value Function::Call(napi_value recv, const std::initializer_list<napi_value>& args) const {
+  return Call(recv, args.size(), args.begin());
+}
+
+inline Value Function::Call(napi_value recv, const std::vector<napi_value>& args) const {
+  return Call(recv, args.size(), args.data());
+}
+
+inline Value Function::Call(napi_value recv, size_t argc, const napi_value* args) const {
+  napi_value result;
+  napi_status status = napi_call_function(
+    _env, recv, _value, argc, args, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Value());
+  return Value(_env, result);
+}
+
+inline Value Function::MakeCallback(
+    napi_value recv,
+    const std::initializer_list<napi_value>& args,
+    napi_async_context context) const {
+  return MakeCallback(recv, args.size(), args.begin(), context);
+}
+
+inline Value Function::MakeCallback(
+    napi_value recv,
+    const std::vector<napi_value>& args,
+    napi_async_context context) const {
+  return MakeCallback(recv, args.size(), args.data(), context);
+}
+
+inline Value Function::MakeCallback(
+    napi_value recv,
+    size_t argc,
+    const napi_value* args,
+    napi_async_context context) const {
+  napi_value result;
+  napi_status status = napi_make_callback(
+    _env, context, recv, _value, argc, args, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Value());
+  return Value(_env, result);
+}
+
+inline Object Function::New(const std::initializer_list<napi_value>& args) const {
+  return New(args.size(), args.begin());
+}
+
+inline Object Function::New(const std::vector<napi_value>& args) const {
+  return New(args.size(), args.data());
+}
+
+inline Object Function::New(size_t argc, const napi_value* args) const {
+  napi_value result;
+  napi_status status = napi_new_instance(
+    _env, _value, argc, args, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Object());
+  return Object(_env, result);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Promise class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Promise::Deferred Promise::Deferred::New(napi_env env) {
+  return Promise::Deferred(env);
+}
+
+inline Promise::Deferred::Deferred(napi_env env) : _env(env) {
+  napi_status status = napi_create_promise(_env, &_deferred, &_promise);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline Promise Promise::Deferred::Promise() const {
+  return Napi::Promise(_env, _promise);
+}
+
+inline Napi::Env Promise::Deferred::Env() const {
+  return Napi::Env(_env);
+}
+
+inline void Promise::Deferred::Resolve(napi_value value) const {
+  napi_status status = napi_resolve_deferred(_env, _deferred, value);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline void Promise::Deferred::Reject(napi_value value) const {
+  napi_status status = napi_reject_deferred(_env, _deferred, value);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline Promise::Promise(napi_env env, napi_value value) : Object(env, value) {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Buffer<T> class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline Buffer<T> Buffer<T>::New(napi_env env, size_t length) {
+  napi_value value;
+  void* data;
+  napi_status status = napi_create_buffer(env, length * sizeof (T), &data, &value);
+  NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
+  return Buffer(env, value, length, static_cast<T*>(data));
+}
+
+template <typename T>
+inline Buffer<T> Buffer<T>::New(napi_env env, T* data, size_t length) {
+  napi_value value;
+  napi_status status = napi_create_external_buffer(
+    env, length * sizeof (T), data, nullptr, nullptr, &value);
+  NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
+  return Buffer(env, value, length, data);
+}
+
+template <typename T>
+template <typename Finalizer>
+inline Buffer<T> Buffer<T>::New(napi_env env,
+                                T* data,
+                                size_t length,
+                                Finalizer finalizeCallback) {
+  napi_value value;
+  details::FinalizeData<T, Finalizer>* finalizeData =
+      new details::FinalizeData<T, Finalizer>(
+          {std::move(finalizeCallback), nullptr});
+  napi_status status = napi_create_external_buffer(
+    env,
+    length * sizeof (T),
+    data,
+    details::FinalizeData<T, Finalizer>::Wrapper,
+    finalizeData,
+    &value);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(env, status, Buffer());
+  }
+  return Buffer(env, value, length, data);
+}
+
+template <typename T>
+template <typename Finalizer, typename Hint>
+inline Buffer<T> Buffer<T>::New(napi_env env,
+                                T* data,
+                                size_t length,
+                                Finalizer finalizeCallback,
+                                Hint* finalizeHint) {
+  napi_value value;
+  details::FinalizeData<T, Finalizer, Hint>* finalizeData =
+      new details::FinalizeData<T, Finalizer, Hint>(
+          {std::move(finalizeCallback), finalizeHint});
+  napi_status status = napi_create_external_buffer(
+    env,
+    length * sizeof (T),
+    data,
+    details::FinalizeData<T, Finalizer, Hint>::WrapperWithHint,
+    finalizeData,
+    &value);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(env, status, Buffer());
+  }
+  return Buffer(env, value, length, data);
+}
+
+template <typename T>
+inline Buffer<T> Buffer<T>::Copy(napi_env env, const T* data, size_t length) {
+  napi_value value;
+  napi_status status = napi_create_buffer_copy(
+    env, length * sizeof (T), data, nullptr, &value);
+  NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
+  return Buffer<T>(env, value);
+}
+
+template <typename T>
+inline Buffer<T>::Buffer() : Uint8Array(), _length(0), _data(nullptr) {
+}
+
+template <typename T>
+inline Buffer<T>::Buffer(napi_env env, napi_value value)
+  : Uint8Array(env, value), _length(0), _data(nullptr) {
+}
+
+template <typename T>
+inline Buffer<T>::Buffer(napi_env env, napi_value value, size_t length, T* data)
+  : Uint8Array(env, value), _length(length), _data(data) {
+}
+
+template <typename T>
+inline size_t Buffer<T>::Length() const {
+  EnsureInfo();
+  return _length;
+}
+
+template <typename T>
+inline T* Buffer<T>::Data() const {
+  EnsureInfo();
+  return _data;
+}
+
+template <typename T>
+inline void Buffer<T>::EnsureInfo() const {
+  // The Buffer instance may have been constructed from a napi_value whose
+  // length/data are not yet known. Fetch and cache these values just once,
+  // since they can never change during the lifetime of the Buffer.
+  if (_data == nullptr) {
+    size_t byteLength;
+    void* voidData;
+    napi_status status = napi_get_buffer_info(_env, _value, &voidData, &byteLength);
+    NAPI_THROW_IF_FAILED_VOID(_env, status);
+    _length = byteLength / sizeof (T);
+    _data = static_cast<T*>(voidData);
+  }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Error class
+////////////////////////////////////////////////////////////////////////////////
+
+inline Error Error::New(napi_env env) {
+  napi_status status;
+  napi_value error = nullptr;
+  bool is_exception_pending;
+  const napi_extended_error_info* info;
+
+  // We must retrieve the last error info before doing anything else, because
+  // doing anything else will replace the last error info.
+  status = napi_get_last_error_info(env, &info);
+  NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_get_last_error_info");
+
+  status = napi_is_exception_pending(env, &is_exception_pending);
+  NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_is_exception_pending");
+
+  // A pending exception takes precedence over any internal error status.
+  if (is_exception_pending) {
+    status = napi_get_and_clear_last_exception(env, &error);
+    NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_get_and_clear_last_exception");
+  }
+  else {
+    const char* error_message = info->error_message != nullptr ?
+      info->error_message : "Error in native callback";
+
+    napi_value message;
+    status = napi_create_string_utf8(
+      env,
+      error_message,
+      std::strlen(error_message),
+      &message);
+    NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_create_string_utf8");
+
+    switch (info->error_code) {
+    case napi_object_expected:
+    case napi_string_expected:
+    case napi_boolean_expected:
+    case napi_number_expected:
+      status = napi_create_type_error(env, nullptr, message, &error);
+      break;
+    default:
+      status = napi_create_error(env, nullptr,  message, &error);
+      break;
+    }
+    NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_create_error");
+  }
+
+  return Error(env, error);
+}
+
+inline Error Error::New(napi_env env, const char* message) {
+  return Error::New<Error>(env, message, std::strlen(message), napi_create_error);
+}
+
+inline Error Error::New(napi_env env, const std::string& message) {
+  return Error::New<Error>(env, message.c_str(), message.size(), napi_create_error);
+}
+
+inline NAPI_NO_RETURN void Error::Fatal(const char* location, const char* message) {
+  napi_fatal_error(location, NAPI_AUTO_LENGTH, message, NAPI_AUTO_LENGTH);
+}
+
+inline Error::Error() : ObjectReference() {
+}
+
+inline Error::Error(napi_env env, napi_value value) : ObjectReference(env, nullptr) {
+  if (value != nullptr) {
+    napi_status status = napi_create_reference(env, value, 1, &_ref);
+
+    // Avoid infinite recursion in the failure case.
+    // Don't try to construct & throw another Error instance.
+    NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_create_reference");
+  }
+}
+
+inline Error::Error(Error&& other) : ObjectReference(std::move(other)) {
+}
+
+inline Error& Error::operator =(Error&& other) {
+  static_cast<Reference<Object>*>(this)->operator=(std::move(other));
+  return *this;
+}
+
+inline Error::Error(const Error& other) : ObjectReference(other) {
+}
+
+inline Error& Error::operator =(const Error& other) {
+  Reset();
+
+  _env = other.Env();
+  HandleScope scope(_env);
+
+  napi_value value = other.Value();
+  if (value != nullptr) {
+    napi_status status = napi_create_reference(_env, value, 1, &_ref);
+    NAPI_THROW_IF_FAILED(_env, status, *this);
+  }
+
+  return *this;
+}
+
+inline const std::string& Error::Message() const NAPI_NOEXCEPT {
+  if (_message.size() == 0 && _env != nullptr) {
+#ifdef NAPI_CPP_EXCEPTIONS
+    try {
+      _message = Get("message").As<String>();
+    }
+    catch (...) {
+      // Catch all errors here, to include e.g. a std::bad_alloc from
+      // the std::string::operator=, because this method may not throw.
+    }
+#else // NAPI_CPP_EXCEPTIONS
+    _message = Get("message").As<String>();
+#endif // NAPI_CPP_EXCEPTIONS
+  }
+  return _message;
+}
+
+inline void Error::ThrowAsJavaScriptException() const {
+  HandleScope scope(_env);
+  if (!IsEmpty()) {
+
+    // We intentionally don't use `NAPI_THROW_*` macros here to ensure
+    // that there is no possible recursion as `ThrowAsJavaScriptException`
+    // is part of `NAPI_THROW_*` macro definition for noexcept.
+
+    napi_status status = napi_throw(_env, Value());
+
+#ifdef NAPI_CPP_EXCEPTIONS
+    if (status != napi_ok) {
+      throw Error::New(_env);
+    }
+#else // NAPI_CPP_EXCEPTIONS
+    NAPI_FATAL_IF_FAILED(status, "Error::ThrowAsJavaScriptException", "napi_throw");
+#endif // NAPI_CPP_EXCEPTIONS
+  }
+}
+
+#ifdef NAPI_CPP_EXCEPTIONS
+
+inline const char* Error::what() const NAPI_NOEXCEPT {
+  return Message().c_str();
+}
+
+#endif // NAPI_CPP_EXCEPTIONS
+
+template <typename TError>
+inline TError Error::New(napi_env env,
+                         const char* message,
+                         size_t length,
+                         create_error_fn create_error) {
+  napi_value str;
+  napi_status status = napi_create_string_utf8(env, message, length, &str);
+  NAPI_THROW_IF_FAILED(env, status, TError());
+
+  napi_value error;
+  status = create_error(env, nullptr, str, &error);
+  NAPI_THROW_IF_FAILED(env, status, TError());
+
+  return TError(env, error);
+}
+
+inline TypeError TypeError::New(napi_env env, const char* message) {
+  return Error::New<TypeError>(env, message, std::strlen(message), napi_create_type_error);
+}
+
+inline TypeError TypeError::New(napi_env env, const std::string& message) {
+  return Error::New<TypeError>(env, message.c_str(), message.size(), napi_create_type_error);
+}
+
+inline TypeError::TypeError() : Error() {
+}
+
+inline TypeError::TypeError(napi_env env, napi_value value) : Error(env, value) {
+}
+
+inline RangeError RangeError::New(napi_env env, const char* message) {
+  return Error::New<RangeError>(env, message, std::strlen(message), napi_create_range_error);
+}
+
+inline RangeError RangeError::New(napi_env env, const std::string& message) {
+  return Error::New<RangeError>(env, message.c_str(), message.size(), napi_create_range_error);
+}
+
+inline RangeError::RangeError() : Error() {
+}
+
+inline RangeError::RangeError(napi_env env, napi_value value) : Error(env, value) {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Reference<T> class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline Reference<T> Reference<T>::New(const T& value, uint32_t initialRefcount) {
+  napi_env env = value.Env();
+  napi_value val = value;
+
+  if (val == nullptr) {
+    return Reference<T>(env, nullptr);
+  }
+
+  napi_ref ref;
+  napi_status status = napi_create_reference(env, value, initialRefcount, &ref);
+  NAPI_THROW_IF_FAILED(env, status, Reference<T>());
+
+  return Reference<T>(env, ref);
+}
+
+
+template <typename T>
+inline Reference<T>::Reference() : _env(nullptr), _ref(nullptr), _suppressDestruct(false) {
+}
+
+template <typename T>
+inline Reference<T>::Reference(napi_env env, napi_ref ref)
+  : _env(env), _ref(ref), _suppressDestruct(false) {
+}
+
+template <typename T>
+inline Reference<T>::~Reference() {
+  if (_ref != nullptr) {
+    if (!_suppressDestruct) {
+      napi_delete_reference(_env, _ref);
+    }
+
+    _ref = nullptr;
+  }
+}
+
+template <typename T>
+inline Reference<T>::Reference(Reference<T>&& other)
+  : _env(other._env), _ref(other._ref), _suppressDestruct(other._suppressDestruct) {
+  other._env = nullptr;
+  other._ref = nullptr;
+  other._suppressDestruct = false;
+}
+
+template <typename T>
+inline Reference<T>& Reference<T>::operator =(Reference<T>&& other) {
+  Reset();
+  _env = other._env;
+  _ref = other._ref;
+  _suppressDestruct = other._suppressDestruct;
+  other._env = nullptr;
+  other._ref = nullptr;
+  other._suppressDestruct = false;
+  return *this;
+}
+
+template <typename T>
+inline Reference<T>::Reference(const Reference<T>& other)
+  : _env(other._env), _ref(nullptr), _suppressDestruct(false) {
+  HandleScope scope(_env);
+
+  napi_value value = other.Value();
+  if (value != nullptr) {
+    // Copying is a limited scenario (currently only used for Error object) and always creates a
+    // strong reference to the given value even if the incoming reference is weak.
+    napi_status status = napi_create_reference(_env, value, 1, &_ref);
+    NAPI_FATAL_IF_FAILED(status, "Reference<T>::Reference", "napi_create_reference");
+  }
+}
+
+template <typename T>
+inline Reference<T>::operator napi_ref() const {
+  return _ref;
+}
+
+template <typename T>
+inline bool Reference<T>::operator ==(const Reference<T> &other) const {
+  HandleScope scope(_env);
+  return this->Value().StrictEquals(other.Value());
+}
+
+template <typename T>
+inline bool Reference<T>::operator !=(const Reference<T> &other) const {
+  return !this->operator ==(other);
+}
+
+template <typename T>
+inline Napi::Env Reference<T>::Env() const {
+  return Napi::Env(_env);
+}
+
+template <typename T>
+inline bool Reference<T>::IsEmpty() const {
+  return _ref == nullptr;
+}
+
+template <typename T>
+inline T Reference<T>::Value() const {
+  if (_ref == nullptr) {
+    return T(_env, nullptr);
+  }
+
+  napi_value value;
+  napi_status status = napi_get_reference_value(_env, _ref, &value);
+  NAPI_THROW_IF_FAILED(_env, status, T());
+  return T(_env, value);
+}
+
+template <typename T>
+inline uint32_t Reference<T>::Ref() {
+  uint32_t result;
+  napi_status status = napi_reference_ref(_env, _ref, &result);
+  NAPI_THROW_IF_FAILED(_env, status, 1);
+  return result;
+}
+
+template <typename T>
+inline uint32_t Reference<T>::Unref() {
+  uint32_t result;
+  napi_status status = napi_reference_unref(_env, _ref, &result);
+  NAPI_THROW_IF_FAILED(_env, status, 1);
+  return result;
+}
+
+template <typename T>
+inline void Reference<T>::Reset() {
+  if (_ref != nullptr) {
+    napi_status status = napi_delete_reference(_env, _ref);
+    NAPI_THROW_IF_FAILED_VOID(_env, status);
+    _ref = nullptr;
+  }
+}
+
+template <typename T>
+inline void Reference<T>::Reset(const T& value, uint32_t refcount) {
+  Reset();
+  _env = value.Env();
+
+  napi_value val = value;
+  if (val != nullptr) {
+    napi_status status = napi_create_reference(_env, value, refcount, &_ref);
+    NAPI_THROW_IF_FAILED_VOID(_env, status);
+  }
+}
+
+template <typename T>
+inline void Reference<T>::SuppressDestruct() {
+  _suppressDestruct = true;
+}
+
+template <typename T>
+inline Reference<T> Weak(T value) {
+  return Reference<T>::New(value, 0);
+}
+
+inline ObjectReference Weak(Object value) {
+  return Reference<Object>::New(value, 0);
+}
+
+inline FunctionReference Weak(Function value) {
+  return Reference<Function>::New(value, 0);
+}
+
+template <typename T>
+inline Reference<T> Persistent(T value) {
+  return Reference<T>::New(value, 1);
+}
+
+inline ObjectReference Persistent(Object value) {
+  return Reference<Object>::New(value, 1);
+}
+
+inline FunctionReference Persistent(Function value) {
+  return Reference<Function>::New(value, 1);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// ObjectReference class
+////////////////////////////////////////////////////////////////////////////////
+
+inline ObjectReference::ObjectReference(): Reference<Object>() {
+}
+
+inline ObjectReference::ObjectReference(napi_env env, napi_ref ref): Reference<Object>(env, ref) {
+}
+
+inline ObjectReference::ObjectReference(Reference<Object>&& other)
+  : Reference<Object>(std::move(other)) {
+}
+
+inline ObjectReference& ObjectReference::operator =(Reference<Object>&& other) {
+  static_cast<Reference<Object>*>(this)->operator=(std::move(other));
+  return *this;
+}
+
+inline ObjectReference::ObjectReference(ObjectReference&& other)
+  : Reference<Object>(std::move(other)) {
+}
+
+inline ObjectReference& ObjectReference::operator =(ObjectReference&& other) {
+  static_cast<Reference<Object>*>(this)->operator=(std::move(other));
+  return *this;
+}
+
+inline ObjectReference::ObjectReference(const ObjectReference& other)
+  : Reference<Object>(other) {
+}
+
+inline Napi::Value ObjectReference::Get(const char* utf8name) const {
+  EscapableHandleScope scope(_env);
+  return scope.Escape(Value().Get(utf8name));
+}
+
+inline Napi::Value ObjectReference::Get(const std::string& utf8name) const {
+  EscapableHandleScope scope(_env);
+  return scope.Escape(Value().Get(utf8name));
+}
+
+inline bool ObjectReference::Set(const char* utf8name, napi_value value) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, value);
+}
+
+inline bool ObjectReference::Set(const char* utf8name, Napi::Value value) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, value);
+}
+
+inline bool ObjectReference::Set(const char* utf8name, const char* utf8value) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, utf8value);
+}
+
+inline bool ObjectReference::Set(const char* utf8name, bool boolValue) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, boolValue);
+}
+
+inline bool ObjectReference::Set(const char* utf8name, double numberValue) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, numberValue);
+}
+
+inline bool ObjectReference::Set(const std::string& utf8name,
+                                 napi_value value) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, value);
+}
+
+inline bool ObjectReference::Set(const std::string& utf8name,
+                                 Napi::Value value) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, value);
+}
+
+inline bool ObjectReference::Set(const std::string& utf8name,
+                                 std::string& utf8value) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, utf8value);
+}
+
+inline bool ObjectReference::Set(const std::string& utf8name, bool boolValue) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, boolValue);
+}
+
+inline bool ObjectReference::Set(const std::string& utf8name,
+                                 double numberValue) {
+  HandleScope scope(_env);
+  return Value().Set(utf8name, numberValue);
+}
+
+inline Napi::Value ObjectReference::Get(uint32_t index) const {
+  EscapableHandleScope scope(_env);
+  return scope.Escape(Value().Get(index));
+}
+
+inline bool ObjectReference::Set(uint32_t index, napi_value value) {
+  HandleScope scope(_env);
+  return Value().Set(index, value);
+}
+
+inline bool ObjectReference::Set(uint32_t index, Napi::Value value) {
+  HandleScope scope(_env);
+  return Value().Set(index, value);
+}
+
+inline bool ObjectReference::Set(uint32_t index, const char* utf8value) {
+  HandleScope scope(_env);
+  return Value().Set(index, utf8value);
+}
+
+inline bool ObjectReference::Set(uint32_t index, const std::string& utf8value) {
+  HandleScope scope(_env);
+  return Value().Set(index, utf8value);
+}
+
+inline bool ObjectReference::Set(uint32_t index, bool boolValue) {
+  HandleScope scope(_env);
+  return Value().Set(index, boolValue);
+}
+
+inline bool ObjectReference::Set(uint32_t index, double numberValue) {
+  HandleScope scope(_env);
+  return Value().Set(index, numberValue);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FunctionReference class
+////////////////////////////////////////////////////////////////////////////////
+
+inline FunctionReference::FunctionReference(): Reference<Function>() {
+}
+
+inline FunctionReference::FunctionReference(napi_env env, napi_ref ref)
+  : Reference<Function>(env, ref) {
+}
+
+inline FunctionReference::FunctionReference(Reference<Function>&& other)
+  : Reference<Function>(std::move(other)) {
+}
+
+inline FunctionReference& FunctionReference::operator =(Reference<Function>&& other) {
+  static_cast<Reference<Function>*>(this)->operator=(std::move(other));
+  return *this;
+}
+
+inline FunctionReference::FunctionReference(FunctionReference&& other)
+  : Reference<Function>(std::move(other)) {
+}
+
+inline FunctionReference& FunctionReference::operator =(FunctionReference&& other) {
+  static_cast<Reference<Function>*>(this)->operator=(std::move(other));
+  return *this;
+}
+
+inline Napi::Value FunctionReference::operator ()(
+    const std::initializer_list<napi_value>& args) const {
+  EscapableHandleScope scope(_env);
+  return scope.Escape(Value()(args));
+}
+
+inline Napi::Value FunctionReference::Call(const std::initializer_list<napi_value>& args) const {
+  EscapableHandleScope scope(_env);
+  Napi::Value result = Value().Call(args);
+  if (scope.Env().IsExceptionPending()) {
+    return Value();
+  }
+  return scope.Escape(result);
+}
+
+inline Napi::Value FunctionReference::Call(const std::vector<napi_value>& args) const {
+  EscapableHandleScope scope(_env);
+  Napi::Value result = Value().Call(args);
+  if (scope.Env().IsExceptionPending()) {
+    return Value();
+  }
+  return scope.Escape(result);
+}
+
+inline Napi::Value FunctionReference::Call(
+    napi_value recv, const std::initializer_list<napi_value>& args) const {
+  EscapableHandleScope scope(_env);
+  Napi::Value result = Value().Call(recv, args);
+  if (scope.Env().IsExceptionPending()) {
+    return Value();
+  }
+  return scope.Escape(result);
+}
+
+inline Napi::Value FunctionReference::Call(
+    napi_value recv, const std::vector<napi_value>& args) const {
+  EscapableHandleScope scope(_env);
+  Napi::Value result = Value().Call(recv, args);
+  if (scope.Env().IsExceptionPending()) {
+    return Value();
+  }
+  return scope.Escape(result);
+}
+
+inline Napi::Value FunctionReference::Call(
+    napi_value recv, size_t argc, const napi_value* args) const {
+  EscapableHandleScope scope(_env);
+  Napi::Value result = Value().Call(recv, argc, args);
+  if (scope.Env().IsExceptionPending()) {
+    return Value();
+  }
+  return scope.Escape(result);
+}
+
+inline Napi::Value FunctionReference::MakeCallback(
+    napi_value recv,
+    const std::initializer_list<napi_value>& args,
+    napi_async_context context) const {
+  EscapableHandleScope scope(_env);
+  Napi::Value result = Value().MakeCallback(recv, args, context);
+  if (scope.Env().IsExceptionPending()) {
+    return Value();
+  }
+  return scope.Escape(result);
+}
+
+inline Napi::Value FunctionReference::MakeCallback(
+    napi_value recv,
+    const std::vector<napi_value>& args,
+    napi_async_context context) const {
+  EscapableHandleScope scope(_env);
+  Napi::Value result = Value().MakeCallback(recv, args, context);
+  if (scope.Env().IsExceptionPending()) {
+    return Value();
+  }
+  return scope.Escape(result);
+}
+
+inline Napi::Value FunctionReference::MakeCallback(
+    napi_value recv,
+    size_t argc,
+    const napi_value* args,
+    napi_async_context context) const {
+  EscapableHandleScope scope(_env);
+  Napi::Value result = Value().MakeCallback(recv, argc, args, context);
+  if (scope.Env().IsExceptionPending()) {
+    return Value();
+  }
+  return scope.Escape(result);
+}
+
+inline Object FunctionReference::New(const std::initializer_list<napi_value>& args) const {
+  EscapableHandleScope scope(_env);
+  return scope.Escape(Value().New(args)).As<Object>();
+}
+
+inline Object FunctionReference::New(const std::vector<napi_value>& args) const {
+  EscapableHandleScope scope(_env);
+  return scope.Escape(Value().New(args)).As<Object>();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// CallbackInfo class
+////////////////////////////////////////////////////////////////////////////////
+
+inline CallbackInfo::CallbackInfo(napi_env env, napi_callback_info info)
+    : _env(env), _info(info), _this(nullptr), _dynamicArgs(nullptr), _data(nullptr) {
+  _argc = _staticArgCount;
+  _argv = _staticArgs;
+  napi_status status = napi_get_cb_info(env, info, &_argc, _argv, &_this, &_data);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+
+  if (_argc > _staticArgCount) {
+    // Use either a fixed-size array (on the stack) or a dynamically-allocated
+    // array (on the heap) depending on the number of args.
+    _dynamicArgs = new napi_value[_argc];
+    _argv = _dynamicArgs;
+
+    status = napi_get_cb_info(env, info, &_argc, _argv, nullptr, nullptr);
+    NAPI_THROW_IF_FAILED_VOID(_env, status);
+  }
+}
+
+inline CallbackInfo::~CallbackInfo() {
+  if (_dynamicArgs != nullptr) {
+    delete[] _dynamicArgs;
+  }
+}
+
+inline Value CallbackInfo::NewTarget() const {
+  napi_value newTarget;
+  napi_status status = napi_get_new_target(_env, _info, &newTarget);
+  NAPI_THROW_IF_FAILED(_env, status, Value());
+  return Value(_env, newTarget);
+}
+
+inline bool CallbackInfo::IsConstructCall() const {
+  return !NewTarget().IsEmpty();
+}
+
+inline Napi::Env CallbackInfo::Env() const {
+  return Napi::Env(_env);
+}
+
+inline size_t CallbackInfo::Length() const {
+  return _argc;
+}
+
+inline const Value CallbackInfo::operator [](size_t index) const {
+  return index < _argc ? Value(_env, _argv[index]) : Env().Undefined();
+}
+
+inline Value CallbackInfo::This() const {
+  if (_this == nullptr) {
+    return Env().Undefined();
+  }
+  return Object(_env, _this);
+}
+
+inline void* CallbackInfo::Data() const {
+  return _data;
+}
+
+inline void CallbackInfo::SetData(void* data) {
+  _data = data;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// PropertyDescriptor class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename PropertyDescriptor::GetterCallback Getter>
+PropertyDescriptor
+PropertyDescriptor::Accessor(const char* utf8name,
+                             napi_property_attributes attributes,
+                             void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+
+  desc.utf8name = utf8name;
+  desc.getter = details::TemplatedCallback<Getter>;
+  desc.attributes = attributes;
+  desc.data = data;
+
+  return desc;
+}
+
+template <typename PropertyDescriptor::GetterCallback Getter>
+PropertyDescriptor
+PropertyDescriptor::Accessor(const std::string& utf8name,
+                             napi_property_attributes attributes,
+                             void* data) {
+  return Accessor<Getter>(utf8name.c_str(), attributes, data);
+}
+
+template <typename PropertyDescriptor::GetterCallback Getter>
+PropertyDescriptor
+PropertyDescriptor::Accessor(Name name,
+                             napi_property_attributes attributes,
+                             void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+
+  desc.name = name;
+  desc.getter = details::TemplatedCallback<Getter>;
+  desc.attributes = attributes;
+  desc.data = data;
+
+  return desc;
+}
+
+template <
+typename PropertyDescriptor::GetterCallback Getter,
+typename PropertyDescriptor::SetterCallback Setter>
+PropertyDescriptor
+PropertyDescriptor::Accessor(const char* utf8name,
+                             napi_property_attributes attributes,
+                             void* data) {
+
+  napi_property_descriptor desc = napi_property_descriptor();
+
+  desc.utf8name = utf8name;
+  desc.getter = details::TemplatedCallback<Getter>;
+  desc.setter = details::TemplatedVoidCallback<Setter>;
+  desc.attributes = attributes;
+  desc.data = data;
+
+  return desc;
+}
+
+template <
+typename PropertyDescriptor::GetterCallback Getter,
+typename PropertyDescriptor::SetterCallback Setter>
+PropertyDescriptor
+PropertyDescriptor::Accessor(const std::string& utf8name,
+                             napi_property_attributes attributes,
+                             void* data) {
+  return Accessor<Getter, Setter>(utf8name.c_str(), attributes, data);
+}
+
+template <
+typename PropertyDescriptor::GetterCallback Getter,
+typename PropertyDescriptor::SetterCallback Setter>
+PropertyDescriptor
+PropertyDescriptor::Accessor(Name name,
+                             napi_property_attributes attributes,
+                             void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+
+  desc.name = name;
+  desc.getter = details::TemplatedCallback<Getter>;
+  desc.setter = details::TemplatedVoidCallback<Setter>;
+  desc.attributes = attributes;
+  desc.data = data;
+
+  return desc;
+}
+
+template <typename Getter>
+inline PropertyDescriptor
+PropertyDescriptor::Accessor(Napi::Env env,
+                             Napi::Object object,
+                             const char* utf8name,
+                             Getter getter,
+                             napi_property_attributes attributes,
+                             void* data) {
+  using CbData = details::CallbackData<Getter, Napi::Value>;
+  auto callbackData = new CbData({ getter, data });
+
+  napi_status status = AttachData(env, object, callbackData);
+  if (status != napi_ok) {
+    delete callbackData;
+    NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor());
+  }
+
+  return PropertyDescriptor({
+    utf8name,
+    nullptr,
+    nullptr,
+    CbData::Wrapper,
+    nullptr,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Getter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
+                                                       Napi::Object object,
+                                                       const std::string& utf8name,
+                                                       Getter getter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  return Accessor(env, object, utf8name.c_str(), getter, attributes, data);
+}
+
+template <typename Getter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
+                                                       Napi::Object object,
+                                                       Name name,
+                                                       Getter getter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  using CbData = details::CallbackData<Getter, Napi::Value>;
+  auto callbackData = new CbData({ getter, data });
+
+  napi_status status = AttachData(env, object, callbackData);
+  if (status != napi_ok) {
+    delete callbackData;
+    NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor());
+  }
+
+  return PropertyDescriptor({
+    nullptr,
+    name,
+    nullptr,
+    CbData::Wrapper,
+    nullptr,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Getter, typename Setter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
+                                                       Napi::Object object,
+                                                       const char* utf8name,
+                                                       Getter getter,
+                                                       Setter setter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  using CbData = details::AccessorCallbackData<Getter, Setter>;
+  auto callbackData = new CbData({ getter, setter, data });
+
+  napi_status status = AttachData(env, object, callbackData);
+  if (status != napi_ok) {
+    delete callbackData;
+    NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor());
+  }
+
+  return PropertyDescriptor({
+    utf8name,
+    nullptr,
+    nullptr,
+    CbData::GetterWrapper,
+    CbData::SetterWrapper,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Getter, typename Setter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
+                                                       Napi::Object object,
+                                                       const std::string& utf8name,
+                                                       Getter getter,
+                                                       Setter setter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  return Accessor(env, object, utf8name.c_str(), getter, setter, attributes, data);
+}
+
+template <typename Getter, typename Setter>
+inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
+                                                       Napi::Object object,
+                                                       Name name,
+                                                       Getter getter,
+                                                       Setter setter,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  using CbData = details::AccessorCallbackData<Getter, Setter>;
+  auto callbackData = new CbData({ getter, setter, data });
+
+  napi_status status = AttachData(env, object, callbackData);
+  if (status != napi_ok) {
+    delete callbackData;
+    NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor());
+  }
+
+  return PropertyDescriptor({
+    nullptr,
+    name,
+    nullptr,
+    CbData::GetterWrapper,
+    CbData::SetterWrapper,
+    nullptr,
+    attributes,
+    callbackData
+  });
+}
+
+template <typename Callable>
+inline PropertyDescriptor PropertyDescriptor::Function(Napi::Env env,
+                                                       Napi::Object /*object*/,
+                                                       const char* utf8name,
+                                                       Callable cb,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  return PropertyDescriptor({
+    utf8name,
+    nullptr,
+    nullptr,
+    nullptr,
+    nullptr,
+    Napi::Function::New(env, cb, utf8name, data),
+    attributes,
+    nullptr
+  });
+}
+
+template <typename Callable>
+inline PropertyDescriptor PropertyDescriptor::Function(Napi::Env env,
+                                                       Napi::Object object,
+                                                       const std::string& utf8name,
+                                                       Callable cb,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  return Function(env, object, utf8name.c_str(), cb, attributes, data);
+}
+
+template <typename Callable>
+inline PropertyDescriptor PropertyDescriptor::Function(Napi::Env env,
+                                                       Napi::Object /*object*/,
+                                                       Name name,
+                                                       Callable cb,
+                                                       napi_property_attributes attributes,
+                                                       void* data) {
+  return PropertyDescriptor({
+    nullptr,
+    name,
+    nullptr,
+    nullptr,
+    nullptr,
+    Napi::Function::New(env, cb, nullptr, data),
+    attributes,
+    nullptr
+  });
+}
+
+inline PropertyDescriptor PropertyDescriptor::Value(const char* utf8name,
+                                                    napi_value value,
+                                                    napi_property_attributes attributes) {
+  return PropertyDescriptor({
+    utf8name, nullptr, nullptr, nullptr, nullptr, value, attributes, nullptr
+  });
+}
+
+inline PropertyDescriptor PropertyDescriptor::Value(const std::string& utf8name,
+                                                    napi_value value,
+                                                    napi_property_attributes attributes) {
+  return Value(utf8name.c_str(), value, attributes);
+}
+
+inline PropertyDescriptor PropertyDescriptor::Value(napi_value name,
+                                                    napi_value value,
+                                                    napi_property_attributes attributes) {
+  return PropertyDescriptor({
+    nullptr, name, nullptr, nullptr, nullptr, value, attributes, nullptr
+  });
+}
+
+inline PropertyDescriptor PropertyDescriptor::Value(Name name,
+                                                    Napi::Value value,
+                                                    napi_property_attributes attributes) {
+  napi_value nameValue = name;
+  napi_value valueValue = value;
+  return PropertyDescriptor::Value(nameValue, valueValue, attributes);
+}
+
+inline PropertyDescriptor::PropertyDescriptor(napi_property_descriptor desc)
+  : _desc(desc) {
+}
+
+inline PropertyDescriptor::operator napi_property_descriptor&() {
+  return _desc;
+}
+
+inline PropertyDescriptor::operator const napi_property_descriptor&() const {
+  return _desc;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// InstanceWrap<T> class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline void InstanceWrap<T>::AttachPropData(napi_env env,
+                                       napi_value value,
+                                       const napi_property_descriptor* prop) {
+  napi_status status;
+  if (!(prop->attributes & napi_static)) {
+    if (prop->method == T::InstanceVoidMethodCallbackWrapper) {
+      status = Napi::details::AttachData(env,
+                    value,
+                    static_cast<InstanceVoidMethodCallbackData*>(prop->data));
+      NAPI_THROW_IF_FAILED_VOID(env, status);
+    } else if (prop->method == T::InstanceMethodCallbackWrapper) {
+      status = Napi::details::AttachData(env,
+                        value,
+                        static_cast<InstanceMethodCallbackData*>(prop->data));
+      NAPI_THROW_IF_FAILED_VOID(env, status);
+    } else if (prop->getter == T::InstanceGetterCallbackWrapper ||
+        prop->setter == T::InstanceSetterCallbackWrapper) {
+      status = Napi::details::AttachData(env,
+                          value,
+                          static_cast<InstanceAccessorCallbackData*>(prop->data));
+      NAPI_THROW_IF_FAILED_VOID(env, status);
+    }
+  }
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceMethod(
+    const char* utf8name,
+    InstanceVoidMethodCallback method,
+    napi_property_attributes attributes,
+    void* data) {
+  InstanceVoidMethodCallbackData* callbackData =
+    new InstanceVoidMethodCallbackData({ method, data});
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.method = T::InstanceVoidMethodCallbackWrapper;
+  desc.data = callbackData;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceMethod(
+    const char* utf8name,
+    InstanceMethodCallback method,
+    napi_property_attributes attributes,
+    void* data) {
+  InstanceMethodCallbackData* callbackData = new InstanceMethodCallbackData({ method, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.method = T::InstanceMethodCallbackWrapper;
+  desc.data = callbackData;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceMethod(
+    Symbol name,
+    InstanceVoidMethodCallback method,
+    napi_property_attributes attributes,
+    void* data) {
+  InstanceVoidMethodCallbackData* callbackData =
+    new InstanceVoidMethodCallbackData({ method, data});
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.method = T::InstanceVoidMethodCallbackWrapper;
+  desc.data = callbackData;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceMethod(
+    Symbol name,
+    InstanceMethodCallback method,
+    napi_property_attributes attributes,
+    void* data) {
+  InstanceMethodCallbackData* callbackData = new InstanceMethodCallbackData({ method, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.method = T::InstanceMethodCallbackWrapper;
+  desc.data = callbackData;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+template <typename InstanceWrap<T>::InstanceVoidMethodCallback method>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceMethod(
+    const char* utf8name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.method = details::TemplatedInstanceVoidCallback<T, method>;
+  desc.data = data;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+template <typename InstanceWrap<T>::InstanceMethodCallback method>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceMethod(
+    const char* utf8name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.method = details::TemplatedInstanceCallback<T, method>;
+  desc.data = data;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+template <typename InstanceWrap<T>::InstanceVoidMethodCallback method>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceMethod(
+    Symbol name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.method = details::TemplatedInstanceVoidCallback<T, method>;
+  desc.data = data;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+template <typename InstanceWrap<T>::InstanceMethodCallback method>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceMethod(
+    Symbol name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.method = details::TemplatedInstanceCallback<T, method>;
+  desc.data = data;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceAccessor(
+    const char* utf8name,
+    InstanceGetterCallback getter,
+    InstanceSetterCallback setter,
+    napi_property_attributes attributes,
+    void* data) {
+  InstanceAccessorCallbackData* callbackData =
+    new InstanceAccessorCallbackData({ getter, setter, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr;
+  desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr;
+  desc.data = callbackData;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceAccessor(
+    Symbol name,
+    InstanceGetterCallback getter,
+    InstanceSetterCallback setter,
+    napi_property_attributes attributes,
+    void* data) {
+  InstanceAccessorCallbackData* callbackData =
+    new InstanceAccessorCallbackData({ getter, setter, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr;
+  desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr;
+  desc.data = callbackData;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+template <typename InstanceWrap<T>::InstanceGetterCallback getter,
+          typename InstanceWrap<T>::InstanceSetterCallback setter>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceAccessor(
+    const char* utf8name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.getter = details::TemplatedInstanceCallback<T, getter>;
+  desc.setter = This::WrapSetter(This::SetterTag<setter>());
+  desc.data = data;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+template <typename InstanceWrap<T>::InstanceGetterCallback getter,
+          typename InstanceWrap<T>::InstanceSetterCallback setter>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceAccessor(
+    Symbol name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.getter = details::TemplatedInstanceCallback<T, getter>;
+  desc.setter = This::WrapSetter(This::SetterTag<setter>());
+  desc.data = data;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceValue(
+    const char* utf8name,
+    Napi::Value value,
+    napi_property_attributes attributes) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.value = value;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceValue(
+    Symbol name,
+    Napi::Value value,
+    napi_property_attributes attributes) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.value = value;
+  desc.attributes = attributes;
+  return desc;
+}
+
+template <typename T>
+inline napi_value InstanceWrap<T>::InstanceVoidMethodCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  return details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    InstanceVoidMethodCallbackData* callbackData =
+      reinterpret_cast<InstanceVoidMethodCallbackData*>(callbackInfo.Data());
+    callbackInfo.SetData(callbackData->data);
+    T* instance = T::Unwrap(callbackInfo.This().As<Object>());
+    auto cb = callbackData->callback;
+    (instance->*cb)(callbackInfo);
+    return nullptr;
+  });
+}
+
+template <typename T>
+inline napi_value InstanceWrap<T>::InstanceMethodCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  return details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    InstanceMethodCallbackData* callbackData =
+      reinterpret_cast<InstanceMethodCallbackData*>(callbackInfo.Data());
+    callbackInfo.SetData(callbackData->data);
+    T* instance = T::Unwrap(callbackInfo.This().As<Object>());
+    auto cb = callbackData->callback;
+    return (instance->*cb)(callbackInfo);
+  });
+}
+
+template <typename T>
+inline napi_value InstanceWrap<T>::InstanceGetterCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  return details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    InstanceAccessorCallbackData* callbackData =
+      reinterpret_cast<InstanceAccessorCallbackData*>(callbackInfo.Data());
+    callbackInfo.SetData(callbackData->data);
+    T* instance = T::Unwrap(callbackInfo.This().As<Object>());
+    auto cb = callbackData->getterCallback;
+    return (instance->*cb)(callbackInfo);
+  });
+}
+
+template <typename T>
+inline napi_value InstanceWrap<T>::InstanceSetterCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  return details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    InstanceAccessorCallbackData* callbackData =
+      reinterpret_cast<InstanceAccessorCallbackData*>(callbackInfo.Data());
+    callbackInfo.SetData(callbackData->data);
+    T* instance = T::Unwrap(callbackInfo.This().As<Object>());
+    auto cb = callbackData->setterCallback;
+    (instance->*cb)(callbackInfo, callbackInfo[0]);
+    return nullptr;
+  });
+}
+
+template <typename T>
+template <typename InstanceWrap<T>::InstanceSetterCallback method>
+inline napi_value InstanceWrap<T>::WrappedMethod(
+    napi_env env, napi_callback_info info) NAPI_NOEXCEPT {
+  return details::WrapCallback([&] {
+    const CallbackInfo cbInfo(env, info);
+    T* instance = T::Unwrap(cbInfo.This().As<Object>());
+    (instance->*method)(cbInfo, cbInfo[0]);
+    return nullptr;
+  });
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// ObjectWrap<T> class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline ObjectWrap<T>::ObjectWrap(const Napi::CallbackInfo& callbackInfo) {
+  napi_env env = callbackInfo.Env();
+  napi_value wrapper = callbackInfo.This();
+  napi_status status;
+  napi_ref ref;
+  T* instance = static_cast<T*>(this);
+  status = napi_wrap(env, wrapper, instance, FinalizeCallback, nullptr, &ref);
+  NAPI_THROW_IF_FAILED_VOID(env, status);
+
+  Reference<Object>* instanceRef = instance;
+  *instanceRef = Reference<Object>(env, ref);
+}
+
+template <typename T>
+inline ObjectWrap<T>::~ObjectWrap() {
+  // If the JS object still exists at this point, remove the finalizer added
+  // through `napi_wrap()`.
+  if (!IsEmpty()) {
+    Object object = Value();
+    // It is not valid to call `napi_remove_wrap()` with an empty `object`.
+    // This happens e.g. during garbage collection.
+    if (!object.IsEmpty() && _construction_failed) {
+      napi_remove_wrap(Env(), object, nullptr);
+    }
+  }
+}
+
+template<typename T>
+inline T* ObjectWrap<T>::Unwrap(Object wrapper) {
+  T* unwrapped;
+  napi_status status = napi_unwrap(wrapper.Env(), wrapper, reinterpret_cast<void**>(&unwrapped));
+  NAPI_THROW_IF_FAILED(wrapper.Env(), status, nullptr);
+  return unwrapped;
+}
+
+template <typename T>
+inline Function
+ObjectWrap<T>::DefineClass(Napi::Env env,
+                           const char* utf8name,
+                           const size_t props_count,
+                           const napi_property_descriptor* descriptors,
+                           void* data) {
+  napi_status status;
+  std::vector<napi_property_descriptor> props(props_count);
+
+  // We copy the descriptors to a local array because before defining the class
+  // we must replace static method property descriptors with value property
+  // descriptors such that the value is a function-valued `napi_value` created
+  // with `CreateFunction()`.
+  //
+  // This replacement could be made for instance methods as well, but V8 aborts
+  // if we do that, because it expects methods defined on the prototype template
+  // to have `FunctionTemplate`s.
+  for (size_t index = 0; index < props_count; index++) {
+    props[index] = descriptors[index];
+    napi_property_descriptor* prop = &props[index];
+    if (prop->method == T::StaticMethodCallbackWrapper) {
+      status = CreateFunction(env,
+                             utf8name,
+                             prop->method,
+                             static_cast<StaticMethodCallbackData*>(prop->data),
+               &(prop->value));
+      NAPI_THROW_IF_FAILED(env, status, Function());
+      prop->method = nullptr;
+      prop->data = nullptr;
+    } else if (prop->method == T::StaticVoidMethodCallbackWrapper) {
+      status = CreateFunction(env,
+                         utf8name,
+                         prop->method,
+                         static_cast<StaticVoidMethodCallbackData*>(prop->data),
+                         &(prop->value));
+      NAPI_THROW_IF_FAILED(env, status, Function());
+      prop->method = nullptr;
+      prop->data = nullptr;
+    }
+  }
+
+  napi_value value;
+  status = napi_define_class(env,
+                             utf8name,
+                             NAPI_AUTO_LENGTH,
+                             T::ConstructorCallbackWrapper,
+                             data,
+                             props_count,
+                             props.data(),
+                             &value);
+  NAPI_THROW_IF_FAILED(env, status, Function());
+
+  // After defining the class we iterate once more over the property descriptors
+  // and attach the data associated with accessors and instance methods to the
+  // newly created JavaScript class.
+  for (size_t idx = 0; idx < props_count; idx++) {
+    const napi_property_descriptor* prop = &props[idx];
+
+    if (prop->getter == T::StaticGetterCallbackWrapper ||
+        prop->setter == T::StaticSetterCallbackWrapper) {
+      status = Napi::details::AttachData(env,
+                          value,
+                          static_cast<StaticAccessorCallbackData*>(prop->data));
+      NAPI_THROW_IF_FAILED(env, status, Function());
+    } else {
+      // InstanceWrap<T>::AttachPropData is responsible for attaching the data
+      // of instance methods and accessors.
+      T::AttachPropData(env, value, prop);
+    }
+  }
+
+  return Function(env, value);
+}
+
+template <typename T>
+inline Function ObjectWrap<T>::DefineClass(
+    Napi::Env env,
+    const char* utf8name,
+    const std::initializer_list<ClassPropertyDescriptor<T>>& properties,
+    void* data) {
+  return DefineClass(env,
+          utf8name,
+          properties.size(),
+          reinterpret_cast<const napi_property_descriptor*>(properties.begin()),
+          data);
+}
+
+template <typename T>
+inline Function ObjectWrap<T>::DefineClass(
+    Napi::Env env,
+    const char* utf8name,
+    const std::vector<ClassPropertyDescriptor<T>>& properties,
+    void* data) {
+  return DefineClass(env,
+           utf8name,
+           properties.size(),
+           reinterpret_cast<const napi_property_descriptor*>(properties.data()),
+           data);
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
+    const char* utf8name,
+    StaticVoidMethodCallback method,
+    napi_property_attributes attributes,
+    void* data) {
+  StaticVoidMethodCallbackData* callbackData = new StaticVoidMethodCallbackData({ method, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.method = T::StaticVoidMethodCallbackWrapper;
+  desc.data = callbackData;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
+    const char* utf8name,
+    StaticMethodCallback method,
+    napi_property_attributes attributes,
+    void* data) {
+  StaticMethodCallbackData* callbackData = new StaticMethodCallbackData({ method, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.method = T::StaticMethodCallbackWrapper;
+  desc.data = callbackData;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
+    Symbol name,
+    StaticVoidMethodCallback method,
+    napi_property_attributes attributes,
+    void* data) {
+  StaticVoidMethodCallbackData* callbackData = new StaticVoidMethodCallbackData({ method, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.method = T::StaticVoidMethodCallbackWrapper;
+  desc.data = callbackData;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
+    Symbol name,
+    StaticMethodCallback method,
+    napi_property_attributes attributes,
+    void* data) {
+  StaticMethodCallbackData* callbackData = new StaticMethodCallbackData({ method, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.method = T::StaticMethodCallbackWrapper;
+  desc.data = callbackData;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+template <typename ObjectWrap<T>::StaticVoidMethodCallback method>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
+    const char* utf8name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.method = details::TemplatedVoidCallback<method>;
+  desc.data = data;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+template <typename ObjectWrap<T>::StaticVoidMethodCallback method>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
+    Symbol name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.method = details::TemplatedVoidCallback<method>;
+  desc.data = data;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+template <typename ObjectWrap<T>::StaticMethodCallback method>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
+    const char* utf8name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.method = details::TemplatedCallback<method>;
+  desc.data = data;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+template <typename ObjectWrap<T>::StaticMethodCallback method>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
+    Symbol name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.method = details::TemplatedCallback<method>;
+  desc.data = data;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticAccessor(
+    const char* utf8name,
+    StaticGetterCallback getter,
+    StaticSetterCallback setter,
+    napi_property_attributes attributes,
+    void* data) {
+  StaticAccessorCallbackData* callbackData =
+    new StaticAccessorCallbackData({ getter, setter, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr;
+  desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr;
+  desc.data = callbackData;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticAccessor(
+    Symbol name,
+    StaticGetterCallback getter,
+    StaticSetterCallback setter,
+    napi_property_attributes attributes,
+    void* data) {
+  StaticAccessorCallbackData* callbackData =
+    new StaticAccessorCallbackData({ getter, setter, data });
+
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr;
+  desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr;
+  desc.data = callbackData;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+template <typename ObjectWrap<T>::StaticGetterCallback getter,
+          typename ObjectWrap<T>::StaticSetterCallback setter>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticAccessor(
+    const char* utf8name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.getter = details::TemplatedCallback<getter>;
+  desc.setter = This::WrapStaticSetter(This::StaticSetterTag<setter>());
+  desc.data = data;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+template <typename ObjectWrap<T>::StaticGetterCallback getter,
+          typename ObjectWrap<T>::StaticSetterCallback setter>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticAccessor(
+    Symbol name,
+    napi_property_attributes attributes,
+    void* data) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.getter = details::TemplatedCallback<getter>;
+  desc.setter = This::WrapStaticSetter(This::StaticSetterTag<setter>());
+  desc.data = data;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticValue(const char* utf8name,
+    Napi::Value value, napi_property_attributes attributes) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.utf8name = utf8name;
+  desc.value = value;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticValue(Symbol name,
+    Napi::Value value, napi_property_attributes attributes) {
+  napi_property_descriptor desc = napi_property_descriptor();
+  desc.name = name;
+  desc.value = value;
+  desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
+  return desc;
+}
+
+template <typename T>
+inline void ObjectWrap<T>::Finalize(Napi::Env /*env*/) {}
+
+template <typename T>
+inline napi_value ObjectWrap<T>::ConstructorCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  napi_value new_target;
+  napi_status status = napi_get_new_target(env, info, &new_target);
+  if (status != napi_ok) return nullptr;
+
+  bool isConstructCall = (new_target != nullptr);
+  if (!isConstructCall) {
+    napi_throw_type_error(env, nullptr, "Class constructors cannot be invoked without 'new'");
+    return nullptr;
+  }
+
+  napi_value wrapper = details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    T* instance = new T(callbackInfo);
+#ifdef NAPI_CPP_EXCEPTIONS
+    instance->_construction_failed = false;
+#else
+    if (callbackInfo.Env().IsExceptionPending()) {
+      // We need to clear the exception so that removing the wrap might work.
+      Error e = callbackInfo.Env().GetAndClearPendingException();
+      delete instance;
+      e.ThrowAsJavaScriptException();
+    } else {
+      instance->_construction_failed = false;
+    }
+# endif  // NAPI_CPP_EXCEPTIONS
+    return callbackInfo.This();
+  });
+
+  return wrapper;
+}
+
+template <typename T>
+inline napi_value ObjectWrap<T>::StaticVoidMethodCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  return details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    StaticVoidMethodCallbackData* callbackData =
+      reinterpret_cast<StaticVoidMethodCallbackData*>(callbackInfo.Data());
+    callbackInfo.SetData(callbackData->data);
+    callbackData->callback(callbackInfo);
+    return nullptr;
+  });
+}
+
+template <typename T>
+inline napi_value ObjectWrap<T>::StaticMethodCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  return details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    StaticMethodCallbackData* callbackData =
+      reinterpret_cast<StaticMethodCallbackData*>(callbackInfo.Data());
+    callbackInfo.SetData(callbackData->data);
+    return callbackData->callback(callbackInfo);
+  });
+}
+
+template <typename T>
+inline napi_value ObjectWrap<T>::StaticGetterCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  return details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    StaticAccessorCallbackData* callbackData =
+      reinterpret_cast<StaticAccessorCallbackData*>(callbackInfo.Data());
+    callbackInfo.SetData(callbackData->data);
+    return callbackData->getterCallback(callbackInfo);
+  });
+}
+
+template <typename T>
+inline napi_value ObjectWrap<T>::StaticSetterCallbackWrapper(
+    napi_env env,
+    napi_callback_info info) {
+  return details::WrapCallback([&] {
+    CallbackInfo callbackInfo(env, info);
+    StaticAccessorCallbackData* callbackData =
+      reinterpret_cast<StaticAccessorCallbackData*>(callbackInfo.Data());
+    callbackInfo.SetData(callbackData->data);
+    callbackData->setterCallback(callbackInfo, callbackInfo[0]);
+    return nullptr;
+  });
+}
+
+template <typename T>
+inline void ObjectWrap<T>::FinalizeCallback(napi_env env, void* data, void* /*hint*/) {
+  HandleScope scope(env);
+  T* instance = static_cast<T*>(data);
+  instance->Finalize(Napi::Env(env));
+  delete instance;
+}
+
+template <typename T>
+template <typename ObjectWrap<T>::StaticSetterCallback method>
+inline napi_value ObjectWrap<T>::WrappedMethod(
+    napi_env env, napi_callback_info info) NAPI_NOEXCEPT {
+  return details::WrapCallback([&] {
+    const CallbackInfo cbInfo(env, info);
+    method(cbInfo, cbInfo[0]);
+    return nullptr;
+  });
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// HandleScope class
+////////////////////////////////////////////////////////////////////////////////
+
+inline HandleScope::HandleScope(napi_env env, napi_handle_scope scope)
+    : _env(env), _scope(scope) {
+}
+
+inline HandleScope::HandleScope(Napi::Env env) : _env(env) {
+  napi_status status = napi_open_handle_scope(_env, &_scope);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline HandleScope::~HandleScope() {
+  napi_status status = napi_close_handle_scope(_env, _scope);
+  NAPI_FATAL_IF_FAILED(status,
+                       "HandleScope::~HandleScope",
+                       "napi_close_handle_scope");
+}
+
+inline HandleScope::operator napi_handle_scope() const {
+  return _scope;
+}
+
+inline Napi::Env HandleScope::Env() const {
+  return Napi::Env(_env);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// EscapableHandleScope class
+////////////////////////////////////////////////////////////////////////////////
+
+inline EscapableHandleScope::EscapableHandleScope(
+  napi_env env, napi_escapable_handle_scope scope) : _env(env), _scope(scope) {
+}
+
+inline EscapableHandleScope::EscapableHandleScope(Napi::Env env) : _env(env) {
+  napi_status status = napi_open_escapable_handle_scope(_env, &_scope);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline EscapableHandleScope::~EscapableHandleScope() {
+  napi_status status = napi_close_escapable_handle_scope(_env, _scope);
+  NAPI_FATAL_IF_FAILED(status,
+                       "EscapableHandleScope::~EscapableHandleScope",
+                       "napi_close_escapable_handle_scope");
+}
+
+inline EscapableHandleScope::operator napi_escapable_handle_scope() const {
+  return _scope;
+}
+
+inline Napi::Env EscapableHandleScope::Env() const {
+  return Napi::Env(_env);
+}
+
+inline Value EscapableHandleScope::Escape(napi_value escapee) {
+  napi_value result;
+  napi_status status = napi_escape_handle(_env, _scope, escapee, &result);
+  NAPI_THROW_IF_FAILED(_env, status, Value());
+  return Value(_env, result);
+}
+
+
+#if (NAPI_VERSION > 2)
+////////////////////////////////////////////////////////////////////////////////
+// CallbackScope class
+////////////////////////////////////////////////////////////////////////////////
+
+inline CallbackScope::CallbackScope(
+  napi_env env, napi_callback_scope scope) : _env(env), _scope(scope) {
+}
+
+inline CallbackScope::CallbackScope(napi_env env, napi_async_context context)
+    : _env(env) {
+  napi_status status = napi_open_callback_scope(
+      _env, Object::New(env), context, &_scope);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline CallbackScope::~CallbackScope() {
+  napi_status status = napi_close_callback_scope(_env, _scope);
+  NAPI_FATAL_IF_FAILED(status,
+                       "CallbackScope::~CallbackScope",
+                       "napi_close_callback_scope");
+}
+
+inline CallbackScope::operator napi_callback_scope() const {
+  return _scope;
+}
+
+inline Napi::Env CallbackScope::Env() const {
+  return Napi::Env(_env);
+}
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// AsyncContext class
+////////////////////////////////////////////////////////////////////////////////
+
+inline AsyncContext::AsyncContext(napi_env env, const char* resource_name)
+  : AsyncContext(env, resource_name, Object::New(env)) {
+}
+
+inline AsyncContext::AsyncContext(napi_env env,
+                                  const char* resource_name,
+                                  const Object& resource)
+    : _env(env), _context(nullptr) {
+  napi_value resource_id;
+  napi_status status = napi_create_string_utf8(
+      _env, resource_name, NAPI_AUTO_LENGTH, &resource_id);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+
+  status = napi_async_init(_env, resource, resource_id, &_context);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline AsyncContext::~AsyncContext() {
+  if (_context != nullptr) {
+    napi_async_destroy(_env, _context);
+    _context = nullptr;
+  }
+}
+
+inline AsyncContext::AsyncContext(AsyncContext&& other) {
+  _env = other._env;
+  other._env = nullptr;
+  _context = other._context;
+  other._context = nullptr;
+}
+
+inline AsyncContext& AsyncContext::operator =(AsyncContext&& other) {
+  _env = other._env;
+  other._env = nullptr;
+  _context = other._context;
+  other._context = nullptr;
+  return *this;
+}
+
+inline AsyncContext::operator napi_async_context() const {
+  return _context;
+}
+
+inline Napi::Env AsyncContext::Env() const {
+  return Napi::Env(_env);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// AsyncWorker class
+////////////////////////////////////////////////////////////////////////////////
+
+inline AsyncWorker::AsyncWorker(const Function& callback)
+  : AsyncWorker(callback, "generic") {
+}
+
+inline AsyncWorker::AsyncWorker(const Function& callback,
+                                const char* resource_name)
+  : AsyncWorker(callback, resource_name, Object::New(callback.Env())) {
+}
+
+inline AsyncWorker::AsyncWorker(const Function& callback,
+                                const char* resource_name,
+                                const Object& resource)
+  : AsyncWorker(Object::New(callback.Env()),
+                callback,
+                resource_name,
+                resource) {
+}
+
+inline AsyncWorker::AsyncWorker(const Object& receiver,
+                                const Function& callback)
+  : AsyncWorker(receiver, callback, "generic") {
+}
+
+inline AsyncWorker::AsyncWorker(const Object& receiver,
+                                const Function& callback,
+                                const char* resource_name)
+  : AsyncWorker(receiver,
+                callback,
+                resource_name,
+                Object::New(callback.Env())) {
+}
+
+inline AsyncWorker::AsyncWorker(const Object& receiver,
+                                const Function& callback,
+                                const char* resource_name,
+                                const Object& resource)
+  : _env(callback.Env()),
+    _receiver(Napi::Persistent(receiver)),
+    _callback(Napi::Persistent(callback)),
+    _suppress_destruct(false) {
+  napi_value resource_id;
+  napi_status status = napi_create_string_latin1(
+      _env, resource_name, NAPI_AUTO_LENGTH, &resource_id);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+
+  status = napi_create_async_work(_env, resource, resource_id, OnAsyncWorkExecute,
+                                  OnAsyncWorkComplete, this, &_work);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline AsyncWorker::AsyncWorker(Napi::Env env)
+  : AsyncWorker(env, "generic") {
+}
+
+inline AsyncWorker::AsyncWorker(Napi::Env env,
+                                const char* resource_name)
+  : AsyncWorker(env, resource_name, Object::New(env)) {
+}
+
+inline AsyncWorker::AsyncWorker(Napi::Env env,
+                                const char* resource_name,
+                                const Object& resource)
+  : _env(env),
+    _receiver(),
+    _callback(),
+    _suppress_destruct(false) {
+  napi_value resource_id;
+  napi_status status = napi_create_string_latin1(
+      _env, resource_name, NAPI_AUTO_LENGTH, &resource_id);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+
+  status = napi_create_async_work(_env, resource, resource_id, OnAsyncWorkExecute,
+                                  OnAsyncWorkComplete, this, &_work);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline AsyncWorker::~AsyncWorker() {
+  if (_work != nullptr) {
+    napi_delete_async_work(_env, _work);
+    _work = nullptr;
+  }
+}
+
+inline void AsyncWorker::Destroy() {
+  delete this;
+}
+
+inline AsyncWorker::AsyncWorker(AsyncWorker&& other) {
+  _env = other._env;
+  other._env = nullptr;
+  _work = other._work;
+  other._work = nullptr;
+  _receiver = std::move(other._receiver);
+  _callback = std::move(other._callback);
+  _error = std::move(other._error);
+  _suppress_destruct = other._suppress_destruct;
+}
+
+inline AsyncWorker& AsyncWorker::operator =(AsyncWorker&& other) {
+  _env = other._env;
+  other._env = nullptr;
+  _work = other._work;
+  other._work = nullptr;
+  _receiver = std::move(other._receiver);
+  _callback = std::move(other._callback);
+  _error = std::move(other._error);
+  _suppress_destruct = other._suppress_destruct;
+  return *this;
+}
+
+inline AsyncWorker::operator napi_async_work() const {
+  return _work;
+}
+
+inline Napi::Env AsyncWorker::Env() const {
+  return Napi::Env(_env);
+}
+
+inline void AsyncWorker::Queue() {
+  napi_status status = napi_queue_async_work(_env, _work);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline void AsyncWorker::Cancel() {
+  napi_status status = napi_cancel_async_work(_env, _work);
+  NAPI_THROW_IF_FAILED_VOID(_env, status);
+}
+
+inline ObjectReference& AsyncWorker::Receiver() {
+  return _receiver;
+}
+
+inline FunctionReference& AsyncWorker::Callback() {
+  return _callback;
+}
+
+inline void AsyncWorker::SuppressDestruct() {
+  _suppress_destruct = true;
+}
+
+inline void AsyncWorker::OnOK() {
+  if (!_callback.IsEmpty()) {
+    _callback.Call(_receiver.Value(), GetResult(_callback.Env()));
+  }
+}
+
+inline void AsyncWorker::OnError(const Error& e) {
+  if (!_callback.IsEmpty()) {
+    _callback.Call(_receiver.Value(), std::initializer_list<napi_value>{ e.Value() });
+  }
+}
+
+inline void AsyncWorker::SetError(const std::string& error) {
+  _error = error;
+}
+
+inline std::vector<napi_value> AsyncWorker::GetResult(Napi::Env /*env*/) {
+  return {};
+}
+// The OnAsyncWorkExecute method receives an napi_env argument. However, do NOT
+// use it within this method, as it does not run on the JavaScript thread and
+// must not run any method that would cause JavaScript to run. In practice,
+// this means that almost any use of napi_env will be incorrect.
+inline void AsyncWorker::OnAsyncWorkExecute(napi_env env, void* asyncworker) {
+  AsyncWorker* self = static_cast<AsyncWorker*>(asyncworker);
+  self->OnExecute(env);
+}
+// The OnExecute method receives an napi_env argument. However, do NOT
+// use it within this method, as it does not run on the JavaScript thread and
+// must not run any method that would cause JavaScript to run. In practice,
+// this means that almost any use of napi_env will be incorrect.
+inline void AsyncWorker::OnExecute(Napi::Env /*DO_NOT_USE*/) {
+#ifdef NAPI_CPP_EXCEPTIONS
+  try {
+    Execute();
+  } catch (const std::exception& e) {
+    SetError(e.what());
+  }
+#else // NAPI_CPP_EXCEPTIONS
+  Execute();
+#endif // NAPI_CPP_EXCEPTIONS
+}
+
+inline void AsyncWorker::OnAsyncWorkComplete(napi_env env,
+                                             napi_status status,
+                                             void* asyncworker) {
+  AsyncWorker* self = static_cast<AsyncWorker*>(asyncworker);
+  self->OnWorkComplete(env, status);
+}
+inline void AsyncWorker::OnWorkComplete(Napi::Env /*env*/, napi_status status) {
+  if (status != napi_cancelled) {
+    HandleScope scope(_env);
+    details::WrapCallback([&] {
+      if (_error.size() == 0) {
+        OnOK();
+      }
+      else {
+        OnError(Error::New(_env, _error));
+      }
+      return nullptr;
+    });
+  }
+  if (!_suppress_destruct) {
+    Destroy();
+  }
+}
+
+#if (NAPI_VERSION > 3 && !defined(__wasm32__))
+////////////////////////////////////////////////////////////////////////////////
+// TypedThreadSafeFunction<ContextType,DataType,CallJs> class
+////////////////////////////////////////////////////////////////////////////////
+
+// Starting with NAPI 5, the JavaScript function `func` parameter of
+// `napi_create_threadsafe_function` is optional.
+#if NAPI_VERSION > 4
+// static, with Callback [missing] Resource [missing] Finalizer [missing]
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+template <typename ResourceString>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(
+    napi_env env,
+    ResourceString resourceName,
+    size_t maxQueueSize,
+    size_t initialThreadCount,
+    ContextType* context) {
+  TypedThreadSafeFunction<ContextType, DataType, CallJs> tsfn;
+
+  napi_status status =
+      napi_create_threadsafe_function(env,
+                                      nullptr,
+                                      nullptr,
+                                      String::From(env, resourceName),
+                                      maxQueueSize,
+                                      initialThreadCount,
+                                      nullptr,
+                                      nullptr,
+                                      context,
+                                      CallJsInternal,
+                                      &tsfn._tsfn);
+  if (status != napi_ok) {
+    NAPI_THROW_IF_FAILED(
+        env, status, TypedThreadSafeFunction<ContextType, DataType, CallJs>());
+  }
+
+  return tsfn;
+}
+
+// static, with Callback [missing] Resource [passed] Finalizer [missing]
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+template <typename ResourceString>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(
+    napi_env env,
+    const Object& resource,
+    ResourceString resourceName,
+    size_t maxQueueSize,
+    size_t initialThreadCount,
+    ContextType* context) {
+  TypedThreadSafeFunction<ContextType, DataType, CallJs> tsfn;
+
+  napi_status status =
+      napi_create_threadsafe_function(env,
+                                      nullptr,
+                                      resource,
+                                      String::From(env, resourceName),
+                                      maxQueueSize,
+                                      initialThreadCount,
+                                      nullptr,
+                                      nullptr,
+                                      context,
+                                      CallJsInternal,
+                                      &tsfn._tsfn);
+  if (status != napi_ok) {
+    NAPI_THROW_IF_FAILED(
+        env, status, TypedThreadSafeFunction<ContextType, DataType, CallJs>());
+  }
+
+  return tsfn;
+}
+
+// static, with Callback [missing] Resource [missing] Finalizer [passed]
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+template <typename ResourceString,
+          typename Finalizer,
+          typename FinalizerDataType>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(
+    napi_env env,
+    ResourceString resourceName,
+    size_t maxQueueSize,
+    size_t initialThreadCount,
+    ContextType* context,
+    Finalizer finalizeCallback,
+    FinalizerDataType* data) {
+  TypedThreadSafeFunction<ContextType, DataType, CallJs> tsfn;
+
+  auto* finalizeData = new details::
+      ThreadSafeFinalize<ContextType, Finalizer, FinalizerDataType>(
+          {data, finalizeCallback});
+  napi_status status = napi_create_threadsafe_function(
+      env,
+      nullptr,
+      nullptr,
+      String::From(env, resourceName),
+      maxQueueSize,
+      initialThreadCount,
+      finalizeData,
+      details::ThreadSafeFinalize<ContextType, Finalizer, FinalizerDataType>::
+          FinalizeFinalizeWrapperWithDataAndContext,
+      context,
+      CallJsInternal,
+      &tsfn._tsfn);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(
+        env, status, TypedThreadSafeFunction<ContextType, DataType, CallJs>());
+  }
+
+  return tsfn;
+}
+
+// static, with Callback [missing] Resource [passed] Finalizer [passed]
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+template <typename ResourceString,
+          typename Finalizer,
+          typename FinalizerDataType>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(
+    napi_env env,
+    const Object& resource,
+    ResourceString resourceName,
+    size_t maxQueueSize,
+    size_t initialThreadCount,
+    ContextType* context,
+    Finalizer finalizeCallback,
+    FinalizerDataType* data) {
+  TypedThreadSafeFunction<ContextType, DataType, CallJs> tsfn;
+
+  auto* finalizeData = new details::
+      ThreadSafeFinalize<ContextType, Finalizer, FinalizerDataType>(
+          {data, finalizeCallback});
+  napi_status status = napi_create_threadsafe_function(
+      env,
+      nullptr,
+      resource,
+      String::From(env, resourceName),
+      maxQueueSize,
+      initialThreadCount,
+      finalizeData,
+      details::ThreadSafeFinalize<ContextType, Finalizer, FinalizerDataType>::
+          FinalizeFinalizeWrapperWithDataAndContext,
+      context,
+      CallJsInternal,
+      &tsfn._tsfn);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(
+        env, status, TypedThreadSafeFunction<ContextType, DataType, CallJs>());
+  }
+
+  return tsfn;
+}
+#endif
+
+// static, with Callback [passed] Resource [missing] Finalizer [missing]
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+template <typename ResourceString>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(
+    napi_env env,
+    const Function& callback,
+    ResourceString resourceName,
+    size_t maxQueueSize,
+    size_t initialThreadCount,
+    ContextType* context) {
+  TypedThreadSafeFunction<ContextType, DataType, CallJs> tsfn;
+
+  napi_status status =
+      napi_create_threadsafe_function(env,
+                                      callback,
+                                      nullptr,
+                                      String::From(env, resourceName),
+                                      maxQueueSize,
+                                      initialThreadCount,
+                                      nullptr,
+                                      nullptr,
+                                      context,
+                                      CallJsInternal,
+                                      &tsfn._tsfn);
+  if (status != napi_ok) {
+    NAPI_THROW_IF_FAILED(
+        env, status, TypedThreadSafeFunction<ContextType, DataType, CallJs>());
+  }
+
+  return tsfn;
+}
+
+// static, with Callback [passed] Resource [passed] Finalizer [missing]
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+template <typename ResourceString>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(
+    napi_env env,
+    const Function& callback,
+    const Object& resource,
+    ResourceString resourceName,
+    size_t maxQueueSize,
+    size_t initialThreadCount,
+    ContextType* context) {
+  TypedThreadSafeFunction<ContextType, DataType, CallJs> tsfn;
+
+  napi_status status =
+      napi_create_threadsafe_function(env,
+                                      callback,
+                                      resource,
+                                      String::From(env, resourceName),
+                                      maxQueueSize,
+                                      initialThreadCount,
+                                      nullptr,
+                                      nullptr,
+                                      context,
+                                      CallJsInternal,
+                                      &tsfn._tsfn);
+  if (status != napi_ok) {
+    NAPI_THROW_IF_FAILED(
+        env, status, TypedThreadSafeFunction<ContextType, DataType, CallJs>());
+  }
+
+  return tsfn;
+}
+
+// static, with Callback [passed] Resource [missing] Finalizer [passed]
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+template <typename ResourceString,
+          typename Finalizer,
+          typename FinalizerDataType>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(
+    napi_env env,
+    const Function& callback,
+    ResourceString resourceName,
+    size_t maxQueueSize,
+    size_t initialThreadCount,
+    ContextType* context,
+    Finalizer finalizeCallback,
+    FinalizerDataType* data) {
+  TypedThreadSafeFunction<ContextType, DataType, CallJs> tsfn;
+
+  auto* finalizeData = new details::
+      ThreadSafeFinalize<ContextType, Finalizer, FinalizerDataType>(
+          {data, finalizeCallback});
+  napi_status status = napi_create_threadsafe_function(
+      env,
+      callback,
+      nullptr,
+      String::From(env, resourceName),
+      maxQueueSize,
+      initialThreadCount,
+      finalizeData,
+      details::ThreadSafeFinalize<ContextType, Finalizer, FinalizerDataType>::
+          FinalizeFinalizeWrapperWithDataAndContext,
+      context,
+      CallJsInternal,
+      &tsfn._tsfn);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(
+        env, status, TypedThreadSafeFunction<ContextType, DataType, CallJs>());
+  }
+
+  return tsfn;
+}
+
+// static, with: Callback [passed] Resource [passed] Finalizer [passed]
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+template <typename CallbackType,
+          typename ResourceString,
+          typename Finalizer,
+          typename FinalizerDataType>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(
+    napi_env env,
+    CallbackType callback,
+    const Object& resource,
+    ResourceString resourceName,
+    size_t maxQueueSize,
+    size_t initialThreadCount,
+    ContextType* context,
+    Finalizer finalizeCallback,
+    FinalizerDataType* data) {
+  TypedThreadSafeFunction<ContextType, DataType, CallJs> tsfn;
+
+  auto* finalizeData = new details::
+      ThreadSafeFinalize<ContextType, Finalizer, FinalizerDataType>(
+          {data, finalizeCallback});
+  napi_status status = napi_create_threadsafe_function(
+      env,
+      details::DefaultCallbackWrapper<
+          CallbackType,
+          TypedThreadSafeFunction<ContextType, DataType, CallJs>>(env,
+                                                                  callback),
+      resource,
+      String::From(env, resourceName),
+      maxQueueSize,
+      initialThreadCount,
+      finalizeData,
+      details::ThreadSafeFinalize<ContextType, Finalizer, FinalizerDataType>::
+          FinalizeFinalizeWrapperWithDataAndContext,
+      context,
+      CallJsInternal,
+      &tsfn._tsfn);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(
+        env, status, TypedThreadSafeFunction<ContextType, DataType, CallJs>());
+  }
+
+  return tsfn;
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>::
+    TypedThreadSafeFunction()
+    : _tsfn() {}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>::
+    TypedThreadSafeFunction(napi_threadsafe_function tsfn)
+    : _tsfn(tsfn) {}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline TypedThreadSafeFunction<ContextType, DataType, CallJs>::
+operator napi_threadsafe_function() const {
+  return _tsfn;
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline napi_status
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::BlockingCall(
+    DataType* data) const {
+  return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_blocking);
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline napi_status
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::NonBlockingCall(
+    DataType* data) const {
+  return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_nonblocking);
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline void TypedThreadSafeFunction<ContextType, DataType, CallJs>::Ref(
+    napi_env env) const {
+  if (_tsfn != nullptr) {
+    napi_status status = napi_ref_threadsafe_function(env, _tsfn);
+    NAPI_THROW_IF_FAILED_VOID(env, status);
+  }
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline void TypedThreadSafeFunction<ContextType, DataType, CallJs>::Unref(
+    napi_env env) const {
+  if (_tsfn != nullptr) {
+    napi_status status = napi_unref_threadsafe_function(env, _tsfn);
+    NAPI_THROW_IF_FAILED_VOID(env, status);
+  }
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline napi_status
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::Acquire() const {
+  return napi_acquire_threadsafe_function(_tsfn);
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline napi_status
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::Release() {
+  return napi_release_threadsafe_function(_tsfn, napi_tsfn_release);
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline napi_status
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::Abort() {
+  return napi_release_threadsafe_function(_tsfn, napi_tsfn_abort);
+}
+
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+inline ContextType*
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::GetContext() const {
+  void* context;
+  napi_status status = napi_get_threadsafe_function_context(_tsfn, &context);
+  NAPI_FATAL_IF_FAILED(status,
+                       "TypedThreadSafeFunction::GetContext",
+                       "napi_get_threadsafe_function_context");
+  return static_cast<ContextType*>(context);
+}
+
+// static
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+void TypedThreadSafeFunction<ContextType, DataType, CallJs>::CallJsInternal(
+    napi_env env, napi_value jsCallback, void* context, void* data) {
+  details::CallJsWrapper<ContextType, DataType, decltype(CallJs), CallJs>(
+      env, jsCallback, context, data);
+}
+
+#if NAPI_VERSION == 4
+// static
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+Napi::Function
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::EmptyFunctionFactory(
+    Napi::Env env) {
+  return Napi::Function::New(env, [](const CallbackInfo& cb) {});
+}
+
+// static
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+Napi::Function
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::FunctionOrEmpty(
+    Napi::Env env, Napi::Function& callback) {
+  if (callback.IsEmpty()) {
+    return EmptyFunctionFactory(env);
+  }
+  return callback;
+}
+
+#else
+// static
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+std::nullptr_t
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::EmptyFunctionFactory(
+    Napi::Env /*env*/) {
+  return nullptr;
+}
+
+// static
+template <typename ContextType,
+          typename DataType,
+          void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
+Napi::Function
+TypedThreadSafeFunction<ContextType, DataType, CallJs>::FunctionOrEmpty(
+    Napi::Env /*env*/, Napi::Function& callback) {
+  return callback;
+}
+
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// ThreadSafeFunction class
+////////////////////////////////////////////////////////////////////////////////
+
+// static
+template <typename ResourceString>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount) {
+  return New(env, callback, Object(), resourceName, maxQueueSize,
+             initialThreadCount);
+}
+
+// static
+template <typename ResourceString, typename ContextType>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context) {
+  return New(env, callback, Object(), resourceName, maxQueueSize,
+             initialThreadCount, context);
+}
+
+// static
+template <typename ResourceString, typename Finalizer>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  Finalizer finalizeCallback) {
+  return New(env, callback, Object(), resourceName, maxQueueSize,
+             initialThreadCount, finalizeCallback);
+}
+
+// static
+template <typename ResourceString, typename Finalizer,
+          typename FinalizerDataType>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  Finalizer finalizeCallback,
+                                  FinalizerDataType* data) {
+  return New(env, callback, Object(), resourceName, maxQueueSize,
+             initialThreadCount, finalizeCallback, data);
+}
+
+// static
+template <typename ResourceString, typename ContextType, typename Finalizer>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context,
+                                  Finalizer finalizeCallback) {
+  return New(env, callback, Object(), resourceName, maxQueueSize,
+             initialThreadCount, context, finalizeCallback);
+}
+
+// static
+template <typename ResourceString, typename ContextType,
+          typename Finalizer, typename FinalizerDataType>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                                  const Function& callback,
+                                                  ResourceString resourceName,
+                                                  size_t maxQueueSize,
+                                                  size_t initialThreadCount,
+                                                  ContextType* context,
+                                                  Finalizer finalizeCallback,
+                                                  FinalizerDataType* data) {
+  return New(env, callback, Object(), resourceName, maxQueueSize,
+             initialThreadCount, context, finalizeCallback, data);
+}
+
+// static
+template <typename ResourceString>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount) {
+  return New(env, callback, resource, resourceName, maxQueueSize,
+             initialThreadCount, static_cast<void*>(nullptr) /* context */);
+}
+
+// static
+template <typename ResourceString, typename ContextType>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context) {
+  return New(env, callback, resource, resourceName, maxQueueSize,
+             initialThreadCount, context,
+             [](Env, ContextType*) {} /* empty finalizer */);
+}
+
+// static
+template <typename ResourceString, typename Finalizer>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  Finalizer finalizeCallback) {
+  return New(env, callback, resource, resourceName, maxQueueSize,
+             initialThreadCount, static_cast<void*>(nullptr) /* context */,
+             finalizeCallback, static_cast<void*>(nullptr) /* data */,
+             details::ThreadSafeFinalize<void, Finalizer>::Wrapper);
+}
+
+// static
+template <typename ResourceString, typename Finalizer,
+          typename FinalizerDataType>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  Finalizer finalizeCallback,
+                                  FinalizerDataType* data) {
+  return New(env, callback, resource, resourceName, maxQueueSize,
+             initialThreadCount, static_cast<void*>(nullptr) /* context */,
+             finalizeCallback, data,
+             details::ThreadSafeFinalize<
+                 void, Finalizer, FinalizerDataType>::FinalizeWrapperWithData);
+}
+
+// static
+template <typename ResourceString, typename ContextType, typename Finalizer>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context,
+                                  Finalizer finalizeCallback) {
+  return New(env, callback, resource, resourceName, maxQueueSize,
+             initialThreadCount, context, finalizeCallback,
+             static_cast<void*>(nullptr) /* data */,
+             details::ThreadSafeFinalize<
+                 ContextType, Finalizer>::FinalizeWrapperWithContext);
+}
+
+// static
+template <typename ResourceString, typename ContextType,
+          typename Finalizer, typename FinalizerDataType>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                                  const Function& callback,
+                                                  const Object& resource,
+                                                  ResourceString resourceName,
+                                                  size_t maxQueueSize,
+                                                  size_t initialThreadCount,
+                                                  ContextType* context,
+                                                  Finalizer finalizeCallback,
+                                                  FinalizerDataType* data) {
+  return New(env, callback, resource, resourceName, maxQueueSize,
+             initialThreadCount, context, finalizeCallback, data,
+             details::ThreadSafeFinalize<ContextType, Finalizer,
+                 FinalizerDataType>::FinalizeFinalizeWrapperWithDataAndContext);
+}
+
+inline ThreadSafeFunction::ThreadSafeFunction()
+  : _tsfn() {
+}
+
+inline ThreadSafeFunction::ThreadSafeFunction(
+    napi_threadsafe_function tsfn)
+  : _tsfn(tsfn) {
+}
+
+inline ThreadSafeFunction::operator napi_threadsafe_function() const {
+  return _tsfn;
+}
+
+inline napi_status ThreadSafeFunction::BlockingCall() const {
+  return CallInternal(nullptr, napi_tsfn_blocking);
+}
+
+template <>
+inline napi_status ThreadSafeFunction::BlockingCall(
+    void* data) const {
+  return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_blocking);
+}
+
+template <typename Callback>
+inline napi_status ThreadSafeFunction::BlockingCall(
+    Callback callback) const {
+  return CallInternal(new CallbackWrapper(callback), napi_tsfn_blocking);
+}
+
+template <typename DataType, typename Callback>
+inline napi_status ThreadSafeFunction::BlockingCall(
+    DataType* data, Callback callback) const {
+  auto wrapper = [data, callback](Env env, Function jsCallback) {
+    callback(env, jsCallback, data);
+  };
+  return CallInternal(new CallbackWrapper(wrapper), napi_tsfn_blocking);
+}
+
+inline napi_status ThreadSafeFunction::NonBlockingCall() const {
+  return CallInternal(nullptr, napi_tsfn_nonblocking);
+}
+
+template <>
+inline napi_status ThreadSafeFunction::NonBlockingCall(
+    void* data) const {
+  return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_nonblocking);
+}
+
+template <typename Callback>
+inline napi_status ThreadSafeFunction::NonBlockingCall(
+    Callback callback) const {
+  return CallInternal(new CallbackWrapper(callback), napi_tsfn_nonblocking);
+}
+
+template <typename DataType, typename Callback>
+inline napi_status ThreadSafeFunction::NonBlockingCall(
+    DataType* data, Callback callback) const {
+  auto wrapper = [data, callback](Env env, Function jsCallback) {
+    callback(env, jsCallback, data);
+  };
+  return CallInternal(new CallbackWrapper(wrapper), napi_tsfn_nonblocking);
+}
+
+inline void ThreadSafeFunction::Ref(napi_env env) const {
+  if (_tsfn != nullptr) {
+    napi_status status = napi_ref_threadsafe_function(env, _tsfn);
+    NAPI_THROW_IF_FAILED_VOID(env, status);
+  }
+}
+
+inline void ThreadSafeFunction::Unref(napi_env env) const {
+  if (_tsfn != nullptr) {
+    napi_status status = napi_unref_threadsafe_function(env, _tsfn);
+    NAPI_THROW_IF_FAILED_VOID(env, status);
+  }
+}
+
+inline napi_status ThreadSafeFunction::Acquire() const {
+  return napi_acquire_threadsafe_function(_tsfn);
+}
+
+inline napi_status ThreadSafeFunction::Release() {
+  return napi_release_threadsafe_function(_tsfn, napi_tsfn_release);
+}
+
+inline napi_status ThreadSafeFunction::Abort() {
+  return napi_release_threadsafe_function(_tsfn, napi_tsfn_abort);
+}
+
+inline ThreadSafeFunction::ConvertibleContext
+ThreadSafeFunction::GetContext() const {
+  void* context;
+  napi_status status = napi_get_threadsafe_function_context(_tsfn, &context);
+  NAPI_FATAL_IF_FAILED(status, "ThreadSafeFunction::GetContext", "napi_get_threadsafe_function_context");
+  return ConvertibleContext({ context });
+}
+
+// static
+template <typename ResourceString, typename ContextType,
+          typename Finalizer, typename FinalizerDataType>
+inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
+                                                  const Function& callback,
+                                                  const Object& resource,
+                                                  ResourceString resourceName,
+                                                  size_t maxQueueSize,
+                                                  size_t initialThreadCount,
+                                                  ContextType* context,
+                                                  Finalizer finalizeCallback,
+                                                  FinalizerDataType* data,
+                                                  napi_finalize wrapper) {
+  static_assert(details::can_make_string<ResourceString>::value
+      || std::is_convertible<ResourceString, napi_value>::value,
+      "Resource name should be convertible to the string type");
+
+  ThreadSafeFunction tsfn;
+  auto* finalizeData = new details::ThreadSafeFinalize<ContextType, Finalizer,
+      FinalizerDataType>({ data, finalizeCallback });
+  napi_status status = napi_create_threadsafe_function(env, callback, resource,
+      Value::From(env, resourceName), maxQueueSize, initialThreadCount,
+      finalizeData, wrapper, context, CallJS, &tsfn._tsfn);
+  if (status != napi_ok) {
+    delete finalizeData;
+    NAPI_THROW_IF_FAILED(env, status, ThreadSafeFunction());
+  }
+
+  return tsfn;
+}
+
+inline napi_status ThreadSafeFunction::CallInternal(
+    CallbackWrapper* callbackWrapper,
+    napi_threadsafe_function_call_mode mode) const {
+  napi_status status = napi_call_threadsafe_function(
+      _tsfn, callbackWrapper, mode);
+  if (status != napi_ok && callbackWrapper != nullptr) {
+    delete callbackWrapper;
+  }
+
+  return status;
+}
+
+// static
+inline void ThreadSafeFunction::CallJS(napi_env env,
+                                       napi_value jsCallback,
+                                       void* /* context */,
+                                       void* data) {
+  if (env == nullptr && jsCallback == nullptr) {
+    return;
+  }
+
+  if (data != nullptr) {
+    auto* callbackWrapper = static_cast<CallbackWrapper*>(data);
+    (*callbackWrapper)(env, Function(env, jsCallback));
+    delete callbackWrapper;
+  } else if (jsCallback != nullptr) {
+    Function(env, jsCallback).Call({});
+  }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Async Progress Worker Base class
+////////////////////////////////////////////////////////////////////////////////
+template <typename DataType>
+inline AsyncProgressWorkerBase<DataType>::AsyncProgressWorkerBase(const Object& receiver,
+                                                                  const Function& callback,
+                                                                  const char* resource_name,
+                                                                  const Object& resource,
+                                                                  size_t queue_size)
+  : AsyncWorker(receiver, callback, resource_name, resource) {
+  // Fill all possible arguments to work around ambiguous ThreadSafeFunction::New signatures.
+  _tsfn = ThreadSafeFunction::New(callback.Env(),
+                                  callback,
+                                  resource,
+                                  resource_name,
+                                  queue_size,
+                                  /** initialThreadCount */ 1,
+                                  /** context */ this,
+                                  OnThreadSafeFunctionFinalize,
+                                  /** finalizeData */ this);
+}
+
+#if NAPI_VERSION > 4
+template <typename DataType>
+inline AsyncProgressWorkerBase<DataType>::AsyncProgressWorkerBase(Napi::Env env,
+                                                                  const char* resource_name,
+                                                                  const Object& resource,
+                                                                  size_t queue_size)
+  : AsyncWorker(env, resource_name, resource) {
+  // TODO: Once the changes to make the callback optional for threadsafe
+  // functions are available on all versions we can remove the dummy Function here.
+  Function callback;
+  // Fill all possible arguments to work around ambiguous ThreadSafeFunction::New signatures.
+  _tsfn = ThreadSafeFunction::New(env,
+                                  callback,
+                                  resource,
+                                  resource_name,
+                                  queue_size,
+                                  /** initialThreadCount */ 1,
+                                  /** context */ this,
+                                  OnThreadSafeFunctionFinalize,
+                                  /** finalizeData */ this);
+}
+#endif
+
+template<typename DataType>
+inline AsyncProgressWorkerBase<DataType>::~AsyncProgressWorkerBase() {
+  // Abort pending tsfn call.
+  // Don't send progress events after we've already completed.
+  // It's ok to call ThreadSafeFunction::Abort and ThreadSafeFunction::Release duplicated.
+  _tsfn.Abort();
+}
+
+template <typename DataType>
+inline void AsyncProgressWorkerBase<DataType>::OnAsyncWorkProgress(Napi::Env /* env */,
+                                Napi::Function /* jsCallback */,
+                                void* data) {
+  ThreadSafeData* tsd = static_cast<ThreadSafeData*>(data);
+  tsd->asyncprogressworker()->OnWorkProgress(tsd->data());
+  delete tsd;
+}
+
+template <typename DataType>
+inline napi_status AsyncProgressWorkerBase<DataType>::NonBlockingCall(DataType* data) {
+  auto tsd = new AsyncProgressWorkerBase::ThreadSafeData(this, data);
+  return _tsfn.NonBlockingCall(tsd, OnAsyncWorkProgress);
+}
+
+template <typename DataType>
+inline void AsyncProgressWorkerBase<DataType>::OnWorkComplete(Napi::Env /* env */, napi_status status) {
+  _work_completed = true;
+  _complete_status = status;
+  _tsfn.Release();
+}
+
+template <typename DataType>
+inline void AsyncProgressWorkerBase<DataType>::OnThreadSafeFunctionFinalize(Napi::Env env, void* /* data */, AsyncProgressWorkerBase* context) {
+  if (context->_work_completed) {
+    context->AsyncWorker::OnWorkComplete(env, context->_complete_status);
+  }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Async Progress Worker class
+////////////////////////////////////////////////////////////////////////////////
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(const Function& callback)
+  : AsyncProgressWorker(callback, "generic") {
+}
+
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(const Function& callback,
+                                const char* resource_name)
+  : AsyncProgressWorker(callback, resource_name, Object::New(callback.Env())) {
+}
+
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(const Function& callback,
+                                const char* resource_name,
+                                const Object& resource)
+  : AsyncProgressWorker(Object::New(callback.Env()),
+                callback,
+                resource_name,
+                resource) {
+}
+
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(const Object& receiver,
+                                                   const Function& callback)
+  : AsyncProgressWorker(receiver, callback, "generic") {
+}
+
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(const Object& receiver,
+                                                   const Function& callback,
+                                                   const char* resource_name)
+  : AsyncProgressWorker(receiver,
+                callback,
+                resource_name,
+                Object::New(callback.Env())) {
+}
+
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(const Object& receiver,
+                                                   const Function& callback,
+                                                   const char* resource_name,
+                                                   const Object& resource)
+  : AsyncProgressWorkerBase(receiver, callback, resource_name, resource),
+    _asyncdata(nullptr),
+    _asyncsize(0) {
+}
+
+#if NAPI_VERSION > 4
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(Napi::Env env)
+  : AsyncProgressWorker(env, "generic") {
+}
+
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(Napi::Env env,
+                                                   const char* resource_name)
+  : AsyncProgressWorker(env, resource_name, Object::New(env)) {
+}
+
+template<class T>
+inline AsyncProgressWorker<T>::AsyncProgressWorker(Napi::Env env,
+                                                   const char* resource_name,
+                                                   const Object& resource)
+  : AsyncProgressWorkerBase(env, resource_name, resource),
+    _asyncdata(nullptr),
+    _asyncsize(0) {
+}
+#endif
+
+template<class T>
+inline AsyncProgressWorker<T>::~AsyncProgressWorker() {
+  {
+    std::lock_guard<std::mutex> lock(this->_mutex);
+    _asyncdata = nullptr;
+    _asyncsize = 0;
+  }
+}
+
+template<class T>
+inline void AsyncProgressWorker<T>::Execute() {
+  ExecutionProgress progress(this);
+  Execute(progress);
+}
+
+template<class T>
+inline void AsyncProgressWorker<T>::OnWorkProgress(void*) {
+  T* data;
+  size_t size;
+  {
+    std::lock_guard<std::mutex> lock(this->_mutex);
+    data = this->_asyncdata;
+    size = this->_asyncsize;
+    this->_asyncdata = nullptr;
+    this->_asyncsize = 0;
+  }
+
+  /**
+   * The callback of ThreadSafeFunction is not been invoked immediately on the
+   * callback of uv_async_t (uv io poll), rather the callback of TSFN is
+   * invoked on the right next uv idle callback. There are chances that during
+   * the deferring the signal of uv_async_t is been sent again, i.e. potential
+   * not coalesced two calls of the TSFN callback.
+   */
+  if (data == nullptr) {
+    return;
+  }
+
+  this->OnProgress(data, size);
+  delete[] data;
+}
+
+template<class T>
+inline void AsyncProgressWorker<T>::SendProgress_(const T* data, size_t count) {
+    T* new_data = new T[count];
+    std::copy(data, data + count, new_data);
+
+    T* old_data;
+    {
+      std::lock_guard<std::mutex> lock(this->_mutex);
+      old_data = _asyncdata;
+      _asyncdata = new_data;
+      _asyncsize = count;
+    }
+    this->NonBlockingCall(nullptr);
+
+    delete[] old_data;
+}
+
+template<class T>
+inline void AsyncProgressWorker<T>::Signal() const {
+  this->NonBlockingCall(static_cast<T*>(nullptr));
+}
+
+template<class T>
+inline void AsyncProgressWorker<T>::ExecutionProgress::Signal() const {
+  _worker->Signal();
+}
+
+template<class T>
+inline void AsyncProgressWorker<T>::ExecutionProgress::Send(const T* data, size_t count) const {
+  _worker->SendProgress_(data, count);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Async Progress Queue Worker class
+////////////////////////////////////////////////////////////////////////////////
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(const Function& callback)
+  : AsyncProgressQueueWorker(callback, "generic") {
+}
+
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(const Function& callback,
+                                                             const char* resource_name)
+  : AsyncProgressQueueWorker(callback, resource_name, Object::New(callback.Env())) {
+}
+
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(const Function& callback,
+                                                             const char* resource_name,
+                                                             const Object& resource)
+  : AsyncProgressQueueWorker(Object::New(callback.Env()),
+                             callback,
+                             resource_name,
+                             resource) {
+}
+
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(const Object& receiver,
+                                                             const Function& callback)
+  : AsyncProgressQueueWorker(receiver, callback, "generic") {
+}
+
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(const Object& receiver,
+                                                             const Function& callback,
+                                                             const char* resource_name)
+  : AsyncProgressQueueWorker(receiver,
+                             callback,
+                             resource_name,
+                             Object::New(callback.Env())) {
+}
+
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(const Object& receiver,
+                                                             const Function& callback,
+                                                             const char* resource_name,
+                                                             const Object& resource)
+  : AsyncProgressWorkerBase<std::pair<T*, size_t>>(receiver, callback, resource_name, resource, /** unlimited queue size */0) {
+}
+
+#if NAPI_VERSION > 4
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(Napi::Env env)
+  : AsyncProgressQueueWorker(env, "generic") {
+}
+
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(Napi::Env env,
+                                const char* resource_name)
+  : AsyncProgressQueueWorker(env, resource_name, Object::New(env)) {
+}
+
+template<class T>
+inline AsyncProgressQueueWorker<T>::AsyncProgressQueueWorker(Napi::Env env,
+                                                             const char* resource_name,
+                                                             const Object& resource)
+  : AsyncProgressWorkerBase<std::pair<T*, size_t>>(env, resource_name, resource, /** unlimited queue size */0) {
+}
+#endif
+
+template<class T>
+inline void AsyncProgressQueueWorker<T>::Execute() {
+  ExecutionProgress progress(this);
+  Execute(progress);
+}
+
+template<class T>
+inline void AsyncProgressQueueWorker<T>::OnWorkProgress(std::pair<T*, size_t>* datapair) {
+  if (datapair == nullptr) {
+    return;
+  }
+
+  T *data = datapair->first;
+  size_t size = datapair->second;
+
+  this->OnProgress(data, size);
+  delete datapair;
+  delete[] data;
+}
+
+template<class T>
+inline void AsyncProgressQueueWorker<T>::SendProgress_(const T* data, size_t count) {
+    T* new_data = new T[count];
+    std::copy(data, data + count, new_data);
+
+    auto pair = new std::pair<T*, size_t>(new_data, count);
+    this->NonBlockingCall(pair);
+}
+
+template<class T>
+inline void AsyncProgressQueueWorker<T>::Signal() const {
+  this->NonBlockingCall(nullptr);
+}
+
+template<class T>
+inline void AsyncProgressQueueWorker<T>::OnWorkComplete(Napi::Env env, napi_status status) {
+  // Draining queued items in TSFN.
+  AsyncProgressWorkerBase<std::pair<T*, size_t>>::OnWorkComplete(env, status);
+}
+
+template<class T>
+inline void AsyncProgressQueueWorker<T>::ExecutionProgress::Signal() const {
+  _worker->Signal();
+}
+
+template<class T>
+inline void AsyncProgressQueueWorker<T>::ExecutionProgress::Send(const T* data, size_t count) const {
+  _worker->SendProgress_(data, count);
+}
+#endif  // NAPI_VERSION > 3 && !defined(__wasm32__)
+
+////////////////////////////////////////////////////////////////////////////////
+// Memory Management class
+////////////////////////////////////////////////////////////////////////////////
+
+inline int64_t MemoryManagement::AdjustExternalMemory(Env env, int64_t change_in_bytes) {
+  int64_t result;
+  napi_status status = napi_adjust_external_memory(env, change_in_bytes, &result);
+  NAPI_THROW_IF_FAILED(env, status, 0);
+  return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Version Management class
+////////////////////////////////////////////////////////////////////////////////
+
+inline uint32_t VersionManagement::GetNapiVersion(Env env) {
+  uint32_t result;
+  napi_status status = napi_get_version(env, &result);
+  NAPI_THROW_IF_FAILED(env, status, 0);
+  return result;
+}
+
+inline const napi_node_version* VersionManagement::GetNodeVersion(Env env) {
+  const napi_node_version* result;
+  napi_status status = napi_get_node_version(env, &result);
+  NAPI_THROW_IF_FAILED(env, status, 0);
+  return result;
+}
+
+#if NAPI_VERSION > 5
+////////////////////////////////////////////////////////////////////////////////
+// Addon<T> class
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+inline Object Addon<T>::Init(Env env, Object exports) {
+  T* addon = new T(env, exports);
+  env.SetInstanceData(addon);
+  return addon->entry_point_;
+}
+
+template <typename T>
+inline T* Addon<T>::Unwrap(Object wrapper) {
+  return wrapper.Env().GetInstanceData<T>();
+}
+
+template <typename T>
+inline void
+Addon<T>::DefineAddon(Object exports,
+                      const std::initializer_list<AddonProp>& props) {
+  DefineProperties(exports, props);
+  entry_point_ = exports;
+}
+
+template <typename T>
+inline Napi::Object
+Addon<T>::DefineProperties(Object object,
+                           const std::initializer_list<AddonProp>& props) {
+  const napi_property_descriptor* properties =
+    reinterpret_cast<const napi_property_descriptor*>(props.begin());
+  size_t size = props.size();
+  napi_status status = napi_define_properties(object.Env(),
+                                              object,
+                                              size,
+                                              properties);
+  NAPI_THROW_IF_FAILED(object.Env(), status, object);
+  for (size_t idx = 0; idx < size; idx++)
+    T::AttachPropData(object.Env(), object, &properties[idx]);
+  return object;
+}
+#endif  // NAPI_VERSION > 5
+
+} // namespace Napi
+
+#endif // SRC_NAPI_INL_H_
diff --git a/lwnode/apps/sqlite3/deps/include/napi.h b/lwnode/apps/sqlite3/deps/include/napi.h
new file mode 100644 (file)
index 0000000..7dc9b17
--- /dev/null
@@ -0,0 +1,2727 @@
+#ifndef SRC_NAPI_H_
+#define SRC_NAPI_H_
+
+#include <node_api.h>
+#include <functional>
+#include <initializer_list>
+#include <memory>
+#include <mutex>
+#include <string>
+#include <vector>
+
+// VS2015 RTM has bugs with constexpr, so require min of VS2015 Update 3 (known good version)
+#if !defined(_MSC_VER) || _MSC_FULL_VER >= 190024210
+#define NAPI_HAS_CONSTEXPR 1
+#endif
+
+// VS2013 does not support char16_t literal strings, so we'll work around it using wchar_t strings
+// and casting them. This is safe as long as the character sizes are the same.
+#if defined(_MSC_VER) && _MSC_VER <= 1800
+static_assert(sizeof(char16_t) == sizeof(wchar_t), "Size mismatch between char16_t and wchar_t");
+#define NAPI_WIDE_TEXT(x) reinterpret_cast<char16_t*>(L ## x)
+#else
+#define NAPI_WIDE_TEXT(x) u ## x
+#endif
+
+// If C++ exceptions are not explicitly enabled or disabled, enable them
+// if exceptions were enabled in the compiler settings.
+#if !defined(NAPI_CPP_EXCEPTIONS) && !defined(NAPI_DISABLE_CPP_EXCEPTIONS)
+  #if defined(_CPPUNWIND) || defined (__EXCEPTIONS)
+    #define NAPI_CPP_EXCEPTIONS
+  #else
+    #error Exception support not detected. \
+      Define either NAPI_CPP_EXCEPTIONS or NAPI_DISABLE_CPP_EXCEPTIONS.
+  #endif
+#endif
+
+#ifdef _NOEXCEPT
+  #define NAPI_NOEXCEPT _NOEXCEPT
+#else
+  #define NAPI_NOEXCEPT noexcept
+#endif
+
+#ifdef NAPI_CPP_EXCEPTIONS
+
+// When C++ exceptions are enabled, Errors are thrown directly. There is no need
+// to return anything after the throw statements. The variadic parameter is an
+// optional return value that is ignored.
+// We need _VOID versions of the macros to avoid warnings resulting from
+// leaving the NAPI_THROW_* `...` argument empty.
+
+#define NAPI_THROW(e, ...)  throw e
+#define NAPI_THROW_VOID(e)  throw e
+
+#define NAPI_THROW_IF_FAILED(env, status, ...)           \
+  if ((status) != napi_ok) throw Napi::Error::New(env);
+
+#define NAPI_THROW_IF_FAILED_VOID(env, status)           \
+  if ((status) != napi_ok) throw Napi::Error::New(env);
+
+#else // NAPI_CPP_EXCEPTIONS
+
+// When C++ exceptions are disabled, Errors are thrown as JavaScript exceptions,
+// which are pending until the callback returns to JS.  The variadic parameter
+// is an optional return value; usually it is an empty result.
+// We need _VOID versions of the macros to avoid warnings resulting from
+// leaving the NAPI_THROW_* `...` argument empty.
+
+#define NAPI_THROW(e, ...)                               \
+  do {                                                   \
+    (e).ThrowAsJavaScriptException();                    \
+    return __VA_ARGS__;                                  \
+  } while (0)
+
+#define NAPI_THROW_VOID(e)                               \
+  do {                                                   \
+    (e).ThrowAsJavaScriptException();                    \
+    return;                                              \
+  } while (0)
+
+#define NAPI_THROW_IF_FAILED(env, status, ...)           \
+  if ((status) != napi_ok) {                             \
+    Napi::Error::New(env).ThrowAsJavaScriptException();  \
+    return __VA_ARGS__;                                  \
+  }
+
+#define NAPI_THROW_IF_FAILED_VOID(env, status)           \
+  if ((status) != napi_ok) {                             \
+    Napi::Error::New(env).ThrowAsJavaScriptException();  \
+    return;                                              \
+  }
+
+#endif // NAPI_CPP_EXCEPTIONS
+
+# define NAPI_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&) = delete;
+# define NAPI_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete;
+
+#define NAPI_DISALLOW_ASSIGN_COPY(CLASS)  \
+    NAPI_DISALLOW_ASSIGN(CLASS)           \
+    NAPI_DISALLOW_COPY(CLASS)
+
+#define NAPI_FATAL_IF_FAILED(status, location, message)  \
+  do {                                                   \
+    if ((status) != napi_ok) {                           \
+      Napi::Error::Fatal((location), (message));         \
+    }                                                    \
+  } while (0)
+
+////////////////////////////////////////////////////////////////////////////////
+/// Node-API C++ Wrapper Classes
+///
+/// These classes wrap the "Node-API" ABI-stable C APIs for Node.js, providing a
+/// C++ object model and C++ exception-handling semantics with low overhead.
+/// The wrappers are all header-only so that they do not affect the ABI.
+////////////////////////////////////////////////////////////////////////////////
+namespace Napi {
+
+  // Forward declarations
+  class Env;
+  class Value;
+  class Boolean;
+  class Number;
+#if NAPI_VERSION > 5
+  class BigInt;
+#endif  // NAPI_VERSION > 5
+#if (NAPI_VERSION > 4)
+  class Date;
+#endif
+  class String;
+  class Object;
+  class Array;
+  class ArrayBuffer;
+  class Function;
+  class Error;
+  class PropertyDescriptor;
+  class CallbackInfo;
+  class TypedArray;
+  template <typename T> class TypedArrayOf;
+
+  using Int8Array =
+      TypedArrayOf<int8_t>;  ///< Typed-array of signed 8-bit integers
+  using Uint8Array =
+      TypedArrayOf<uint8_t>;  ///< Typed-array of unsigned 8-bit integers
+  using Int16Array =
+      TypedArrayOf<int16_t>;  ///< Typed-array of signed 16-bit integers
+  using Uint16Array =
+      TypedArrayOf<uint16_t>;  ///< Typed-array of unsigned 16-bit integers
+  using Int32Array =
+      TypedArrayOf<int32_t>;  ///< Typed-array of signed 32-bit integers
+  using Uint32Array =
+      TypedArrayOf<uint32_t>;  ///< Typed-array of unsigned 32-bit integers
+  using Float32Array =
+      TypedArrayOf<float>;  ///< Typed-array of 32-bit floating-point values
+  using Float64Array =
+      TypedArrayOf<double>;  ///< Typed-array of 64-bit floating-point values
+#if NAPI_VERSION > 5
+  using BigInt64Array =
+      TypedArrayOf<int64_t>;  ///< Typed array of signed 64-bit integers
+  using BigUint64Array =
+      TypedArrayOf<uint64_t>;  ///< Typed array of unsigned 64-bit integers
+#endif  // NAPI_VERSION > 5
+
+  /// Defines the signature of a Node-API C++ module's registration callback
+  /// (init) function.
+  using ModuleRegisterCallback = Object (*)(Env env, Object exports);
+
+  class MemoryManagement;
+
+  /// Environment for Node-API values and operations.
+  ///
+  /// All Node-API values and operations must be associated with an environment.
+  /// An environment instance is always provided to callback functions; that
+  /// environment must then be used for any creation of Node-API values or other
+  /// Node-API operations within the callback. (Many methods infer the
+  /// environment from the `this` instance that the method is called on.)
+  ///
+  /// In the future, multiple environments per process may be supported,
+  /// although current implementations only support one environment per process.
+  ///
+  /// In the V8 JavaScript engine, a Node-API environment approximately
+  /// corresponds to an Isolate.
+  class Env {
+#if NAPI_VERSION > 5
+  private:
+    template <typename T> static void DefaultFini(Env, T* data);
+    template <typename DataType, typename HintType>
+    static void DefaultFiniWithHint(Env, DataType* data, HintType* hint);
+#endif  // NAPI_VERSION > 5
+  public:
+    Env(napi_env env);
+
+    operator napi_env() const;
+
+    Object Global() const;
+    Value Undefined() const;
+    Value Null() const;
+
+    bool IsExceptionPending() const;
+    Error GetAndClearPendingException();
+
+    Value RunScript(const char* utf8script);
+    Value RunScript(const std::string& utf8script);
+    Value RunScript(String script);
+
+#if NAPI_VERSION > 5
+    template <typename T> T* GetInstanceData();
+
+    template <typename T> using Finalizer = void (*)(Env, T*);
+    template <typename T, Finalizer<T> fini = Env::DefaultFini<T>>
+    void SetInstanceData(T* data);
+
+    template <typename DataType, typename HintType>
+    using FinalizerWithHint = void (*)(Env, DataType*, HintType*);
+    template <typename DataType,
+              typename HintType,
+              FinalizerWithHint<DataType, HintType> fini =
+                Env::DefaultFiniWithHint<DataType, HintType>>
+    void SetInstanceData(DataType* data, HintType* hint);
+#endif  // NAPI_VERSION > 5
+
+  private:
+    napi_env _env;
+  };
+
+  /// A JavaScript value of unknown type.
+  ///
+  /// For type-specific operations, convert to one of the Value subclasses using a `To*` or `As()`
+  /// method. The `To*` methods do type coercion; the `As()` method does not.
+  ///
+  ///     Napi::Value value = ...
+  ///     if (!value.IsString()) throw Napi::TypeError::New(env, "Invalid arg...");
+  ///     Napi::String str = value.As<Napi::String>(); // Cast to a string value
+  ///
+  ///     Napi::Value anotherValue = ...
+  ///     bool isTruthy = anotherValue.ToBoolean(); // Coerce to a boolean value
+  class Value {
+  public:
+    Value();                               ///< Creates a new _empty_ Value instance.
+    Value(napi_env env,
+          napi_value value);  ///< Wraps a Node-API value primitive.
+
+    /// Creates a JS value from a C++ primitive.
+    ///
+    /// `value` may be any of:
+    /// - bool
+    /// - Any integer type
+    /// - Any floating point type
+    /// - const char* (encoded using UTF-8, null-terminated)
+    /// - const char16_t* (encoded using UTF-16-LE, null-terminated)
+    /// - std::string (encoded using UTF-8)
+    /// - std::u16string
+    /// - napi::Value
+    /// - napi_value
+    template <typename T>
+    static Value From(napi_env env, const T& value);
+
+    /// Converts to a Node-API value primitive.
+    ///
+    /// If the instance is _empty_, this returns `nullptr`.
+    operator napi_value() const;
+
+    /// Tests if this value strictly equals another value.
+    bool operator ==(const Value& other) const;
+
+    /// Tests if this value does not strictly equal another value.
+    bool operator !=(const Value& other) const;
+
+    /// Tests if this value strictly equals another value.
+    bool StrictEquals(const Value& other) const;
+
+    /// Gets the environment the value is associated with.
+    Napi::Env Env() const;
+
+    /// Checks if the value is empty (uninitialized).
+    ///
+    /// An empty value is invalid, and most attempts to perform an operation on an empty value
+    /// will result in an exception. Note an empty value is distinct from JavaScript `null` or
+    /// `undefined`, which are valid values.
+    ///
+    /// When C++ exceptions are disabled at compile time, a method with a `Value` return type may
+    /// return an empty value to indicate a pending exception. So when not using C++ exceptions,
+    /// callers should check whether the value is empty before attempting to use it.
+    bool IsEmpty() const;
+
+    napi_valuetype Type() const; ///< Gets the type of the value.
+
+    bool IsUndefined() const;   ///< Tests if a value is an undefined JavaScript value.
+    bool IsNull() const;        ///< Tests if a value is a null JavaScript value.
+    bool IsBoolean() const;     ///< Tests if a value is a JavaScript boolean.
+    bool IsNumber() const;      ///< Tests if a value is a JavaScript number.
+#if NAPI_VERSION > 5
+    bool IsBigInt() const;      ///< Tests if a value is a JavaScript bigint.
+#endif  // NAPI_VERSION > 5
+#if (NAPI_VERSION > 4)
+    bool IsDate() const;        ///< Tests if a value is a JavaScript date.
+#endif
+    bool IsString() const;      ///< Tests if a value is a JavaScript string.
+    bool IsSymbol() const;      ///< Tests if a value is a JavaScript symbol.
+    bool IsArray() const;       ///< Tests if a value is a JavaScript array.
+    bool IsArrayBuffer() const; ///< Tests if a value is a JavaScript array buffer.
+    bool IsTypedArray() const;  ///< Tests if a value is a JavaScript typed array.
+    bool IsObject() const;      ///< Tests if a value is a JavaScript object.
+    bool IsFunction() const;    ///< Tests if a value is a JavaScript function.
+    bool IsPromise() const;     ///< Tests if a value is a JavaScript promise.
+    bool IsDataView() const;    ///< Tests if a value is a JavaScript data view.
+    bool IsBuffer() const;      ///< Tests if a value is a Node buffer.
+    bool IsExternal() const;    ///< Tests if a value is a pointer to external data.
+
+    /// Casts to another type of `Napi::Value`, when the actual type is known or assumed.
+    ///
+    /// This conversion does NOT coerce the type. Calling any methods inappropriate for the actual
+    /// value type will throw `Napi::Error`.
+    template <typename T> T As() const;
+
+    Boolean ToBoolean() const; ///< Coerces a value to a JavaScript boolean.
+    Number ToNumber() const;   ///< Coerces a value to a JavaScript number.
+    String ToString() const;   ///< Coerces a value to a JavaScript string.
+    Object ToObject() const;   ///< Coerces a value to a JavaScript object.
+
+  protected:
+    /// !cond INTERNAL
+    napi_env _env;
+    napi_value _value;
+    /// !endcond
+  };
+
+  /// A JavaScript boolean value.
+  class Boolean : public Value {
+  public:
+   static Boolean New(napi_env env,  ///< Node-API environment
+                      bool value     ///< Boolean value
+   );
+
+   Boolean();  ///< Creates a new _empty_ Boolean instance.
+   Boolean(napi_env env,
+           napi_value value);  ///< Wraps a Node-API value primitive.
+
+   operator bool() const;  ///< Converts a Boolean value to a boolean primitive.
+   bool Value() const;     ///< Converts a Boolean value to a boolean primitive.
+  };
+
+  /// A JavaScript number value.
+  class Number : public Value {
+  public:
+   static Number New(napi_env env,  ///< Node-API environment
+                     double value   ///< Number value
+   );
+
+   Number();  ///< Creates a new _empty_ Number instance.
+   Number(napi_env env,
+          napi_value value);  ///< Wraps a Node-API value primitive.
+
+   operator int32_t()
+       const;  ///< Converts a Number value to a 32-bit signed integer value.
+   operator uint32_t()
+       const;  ///< Converts a Number value to a 32-bit unsigned integer value.
+   operator int64_t()
+       const;  ///< Converts a Number value to a 64-bit signed integer value.
+   operator float()
+       const;  ///< Converts a Number value to a 32-bit floating-point value.
+   operator double()
+       const;  ///< Converts a Number value to a 64-bit floating-point value.
+
+   int32_t Int32Value()
+       const;  ///< Converts a Number value to a 32-bit signed integer value.
+   uint32_t Uint32Value()
+       const;  ///< Converts a Number value to a 32-bit unsigned integer value.
+   int64_t Int64Value()
+       const;  ///< Converts a Number value to a 64-bit signed integer value.
+   float FloatValue()
+       const;  ///< Converts a Number value to a 32-bit floating-point value.
+   double DoubleValue()
+       const;  ///< Converts a Number value to a 64-bit floating-point value.
+  };
+
+#if NAPI_VERSION > 5
+  /// A JavaScript bigint value.
+  class BigInt : public Value {
+  public:
+   static BigInt New(napi_env env,  ///< Node-API environment
+                     int64_t value  ///< Number value
+   );
+   static BigInt New(napi_env env,   ///< Node-API environment
+                     uint64_t value  ///< Number value
+   );
+
+   /// Creates a new BigInt object using a specified sign bit and a
+   /// specified list of digits/words.
+   /// The resulting number is calculated as:
+   /// (-1)^sign_bit * (words[0] * (2^64)^0 + words[1] * (2^64)^1 + ...)
+   static BigInt New(napi_env env,          ///< Node-API environment
+                     int sign_bit,          ///< Sign bit. 1 if negative.
+                     size_t word_count,     ///< Number of words in array
+                     const uint64_t* words  ///< Array of words
+   );
+
+   BigInt();  ///< Creates a new _empty_ BigInt instance.
+   BigInt(napi_env env,
+          napi_value value);  ///< Wraps a Node-API value primitive.
+
+   int64_t Int64Value(bool* lossless)
+       const;  ///< Converts a BigInt value to a 64-bit signed integer value.
+   uint64_t Uint64Value(bool* lossless)
+       const;  ///< Converts a BigInt value to a 64-bit unsigned integer value.
+
+   size_t WordCount() const;  ///< The number of 64-bit words needed to store
+                              ///< the result of ToWords().
+
+   /// Writes the contents of this BigInt to a specified memory location.
+   /// `sign_bit` must be provided and will be set to 1 if this BigInt is
+   /// negative.
+   /// `*word_count` has to be initialized to the length of the `words` array.
+   /// Upon return, it will be set to the actual number of words that would
+   /// be needed to store this BigInt (i.e. the return value of `WordCount()`).
+   void ToWords(int* sign_bit, size_t* word_count, uint64_t* words);
+  };
+#endif  // NAPI_VERSION > 5
+
+#if (NAPI_VERSION > 4)
+  /// A JavaScript date value.
+  class Date : public Value {
+  public:
+    /// Creates a new Date value from a double primitive.
+   static Date New(napi_env env,  ///< Node-API environment
+                   double value   ///< Number value
+   );
+
+   Date();  ///< Creates a new _empty_ Date instance.
+   Date(napi_env env, napi_value value);  ///< Wraps a Node-API value primitive.
+   operator double() const;  ///< Converts a Date value to double primitive
+
+   double ValueOf() const;  ///< Converts a Date value to a double primitive.
+  };
+  #endif
+
+  /// A JavaScript string or symbol value (that can be used as a property name).
+  class Name : public Value {
+  public:
+    Name();                               ///< Creates a new _empty_ Name instance.
+    Name(napi_env env,
+         napi_value value);  ///< Wraps a Node-API value primitive.
+  };
+
+  /// A JavaScript string value.
+  class String : public Name {
+  public:
+    /// Creates a new String value from a UTF-8 encoded C++ string.
+   static String New(napi_env env,             ///< Node-API environment
+                     const std::string& value  ///< UTF-8 encoded C++ string
+   );
+
+   /// Creates a new String value from a UTF-16 encoded C++ string.
+   static String New(napi_env env,                ///< Node-API environment
+                     const std::u16string& value  ///< UTF-16 encoded C++ string
+   );
+
+   /// Creates a new String value from a UTF-8 encoded C string.
+   static String New(
+       napi_env env,      ///< Node-API environment
+       const char* value  ///< UTF-8 encoded null-terminated C string
+   );
+
+   /// Creates a new String value from a UTF-16 encoded C string.
+   static String New(
+       napi_env env,          ///< Node-API environment
+       const char16_t* value  ///< UTF-16 encoded null-terminated C string
+   );
+
+   /// Creates a new String value from a UTF-8 encoded C string with specified
+   /// length.
+   static String New(napi_env env,       ///< Node-API environment
+                     const char* value,  ///< UTF-8 encoded C string (not
+                                         ///< necessarily null-terminated)
+                     size_t length       ///< length of the string in bytes
+   );
+
+   /// Creates a new String value from a UTF-16 encoded C string with specified
+   /// length.
+   static String New(
+       napi_env env,           ///< Node-API environment
+       const char16_t* value,  ///< UTF-16 encoded C string (not necessarily
+                               ///< null-terminated)
+       size_t length           ///< Length of the string in 2-byte code units
+   );
+
+   /// Creates a new String based on the original object's type.
+   ///
+   /// `value` may be any of:
+   /// - const char* (encoded using UTF-8, null-terminated)
+   /// - const char16_t* (encoded using UTF-16-LE, null-terminated)
+   /// - std::string (encoded using UTF-8)
+   /// - std::u16string
+   template <typename T>
+   static String From(napi_env env, const T& value);
+
+   String();  ///< Creates a new _empty_ String instance.
+   String(napi_env env,
+          napi_value value);  ///< Wraps a Node-API value primitive.
+
+   operator std::string()
+       const;  ///< Converts a String value to a UTF-8 encoded C++ string.
+   operator std::u16string()
+       const;  ///< Converts a String value to a UTF-16 encoded C++ string.
+   std::string Utf8Value()
+       const;  ///< Converts a String value to a UTF-8 encoded C++ string.
+   std::u16string Utf16Value()
+       const;  ///< Converts a String value to a UTF-16 encoded C++ string.
+  };
+
+  /// A JavaScript symbol value.
+  class Symbol : public Name {
+  public:
+    /// Creates a new Symbol value with an optional description.
+   static Symbol New(
+       napi_env env,  ///< Node-API environment
+       const char* description =
+           nullptr  ///< Optional UTF-8 encoded null-terminated C string
+                    ///  describing the symbol
+   );
+
+   /// Creates a new Symbol value with a description.
+   static Symbol New(
+       napi_env env,  ///< Node-API environment
+       const std::string&
+           description  ///< UTF-8 encoded C++ string describing the symbol
+   );
+
+   /// Creates a new Symbol value with a description.
+   static Symbol New(napi_env env,       ///< Node-API environment
+                     String description  ///< String value describing the symbol
+   );
+
+   /// Creates a new Symbol value with a description.
+   static Symbol New(
+       napi_env env,           ///< Node-API environment
+       napi_value description  ///< String value describing the symbol
+   );
+
+   /// Get a public Symbol (e.g. Symbol.iterator).
+   static Symbol WellKnown(napi_env, const std::string& name);
+
+   Symbol();  ///< Creates a new _empty_ Symbol instance.
+   Symbol(napi_env env,
+          napi_value value);  ///< Wraps a Node-API value primitive.
+  };
+
+  /// A JavaScript object value.
+  class Object : public Value {
+  public:
+    /// Enables property and element assignments using indexing syntax.
+    ///
+    /// Example:
+    ///
+    ///     Napi::Value propertyValue = object1['A'];
+    ///     object2['A'] = propertyValue;
+    ///     Napi::Value elementValue = array[0];
+    ///     array[1] = elementValue;
+    template <typename Key>
+    class PropertyLValue {
+    public:
+      /// Converts an L-value to a value.
+      operator Value() const;
+
+      /// Assigns a value to the property. The type of value can be
+      /// anything supported by `Object::Set`.
+      template <typename ValueType>
+      PropertyLValue& operator =(ValueType value);
+
+    private:
+      PropertyLValue() = delete;
+      PropertyLValue(Object object, Key key);
+      napi_env _env;
+      napi_value _object;
+      Key _key;
+
+      friend class Napi::Object;
+    };
+
+    /// Creates a new Object value.
+    static Object New(napi_env env  ///< Node-API environment
+    );
+
+    Object();                               ///< Creates a new _empty_ Object instance.
+    Object(napi_env env,
+           napi_value value);  ///< Wraps a Node-API value primitive.
+
+    /// Gets or sets a named property.
+    PropertyLValue<std::string> operator [](
+      const char* utf8name ///< UTF-8 encoded null-terminated property name
+    );
+
+    /// Gets or sets a named property.
+    PropertyLValue<std::string> operator [](
+      const std::string& utf8name ///< UTF-8 encoded property name
+    );
+
+    /// Gets or sets an indexed property or array element.
+    PropertyLValue<uint32_t> operator [](
+      uint32_t index /// Property / element index
+    );
+
+    /// Gets a named property.
+    Value operator [](
+      const char* utf8name ///< UTF-8 encoded null-terminated property name
+    ) const;
+
+    /// Gets a named property.
+    Value operator [](
+      const std::string& utf8name ///< UTF-8 encoded property name
+    ) const;
+
+    /// Gets an indexed property or array element.
+    Value operator [](
+      uint32_t index ///< Property / element index
+    ) const;
+
+    /// Checks whether a property is present.
+    bool Has(
+      napi_value key ///< Property key primitive
+    ) const;
+
+    /// Checks whether a property is present.
+    bool Has(
+      Value key ///< Property key
+    ) const;
+
+    /// Checks whether a named property is present.
+    bool Has(
+      const char* utf8name ///< UTF-8 encoded null-terminated property name
+    ) const;
+
+    /// Checks whether a named property is present.
+    bool Has(
+      const std::string& utf8name ///< UTF-8 encoded property name
+    ) const;
+
+    /// Checks whether a own property is present.
+    bool HasOwnProperty(
+      napi_value key ///< Property key primitive
+    ) const;
+
+    /// Checks whether a own property is present.
+    bool HasOwnProperty(
+      Value key ///< Property key
+    ) const;
+
+    /// Checks whether a own property is present.
+    bool HasOwnProperty(
+      const char* utf8name ///< UTF-8 encoded null-terminated property name
+    ) const;
+
+    /// Checks whether a own property is present.
+    bool HasOwnProperty(
+      const std::string& utf8name ///< UTF-8 encoded property name
+    ) const;
+
+    /// Gets a property.
+    Value Get(
+      napi_value key ///< Property key primitive
+    ) const;
+
+    /// Gets a property.
+    Value Get(
+      Value key ///< Property key
+    ) const;
+
+    /// Gets a named property.
+    Value Get(
+      const char* utf8name ///< UTF-8 encoded null-terminated property name
+    ) const;
+
+    /// Gets a named property.
+    Value Get(
+      const std::string& utf8name ///< UTF-8 encoded property name
+    ) const;
+
+    /// Sets a property.
+    template <typename ValueType>
+    bool Set(napi_value key,         ///< Property key primitive
+             const ValueType& value  ///< Property value primitive
+    );
+
+    /// Sets a property.
+    template <typename ValueType>
+    bool Set(Value key,              ///< Property key
+             const ValueType& value  ///< Property value
+    );
+
+    /// Sets a named property.
+    template <typename ValueType>
+    bool Set(
+        const char* utf8name,  ///< UTF-8 encoded null-terminated property name
+        const ValueType& value);
+
+    /// Sets a named property.
+    template <typename ValueType>
+    bool Set(const std::string& utf8name,  ///< UTF-8 encoded property name
+             const ValueType& value        ///< Property value primitive
+    );
+
+    /// Delete property.
+    bool Delete(
+      napi_value key ///< Property key primitive
+    );
+
+    /// Delete property.
+    bool Delete(
+      Value key ///< Property key
+    );
+
+    /// Delete property.
+    bool Delete(
+      const char* utf8name ///< UTF-8 encoded null-terminated property name
+    );
+
+    /// Delete property.
+    bool Delete(
+      const std::string& utf8name ///< UTF-8 encoded property name
+    );
+
+    /// Checks whether an indexed property is present.
+    bool Has(
+      uint32_t index ///< Property / element index
+    ) const;
+
+    /// Gets an indexed property or array element.
+    Value Get(
+      uint32_t index ///< Property / element index
+    ) const;
+
+    /// Sets an indexed property or array element.
+    template <typename ValueType>
+    bool Set(uint32_t index,         ///< Property / element index
+             const ValueType& value  ///< Property value primitive
+    );
+
+    /// Deletes an indexed property or array element.
+    bool Delete(
+      uint32_t index ///< Property / element index
+    );
+
+    Array GetPropertyNames() const; ///< Get all property names
+
+    /// Defines a property on the object.
+    bool DefineProperty(
+        const PropertyDescriptor&
+            property  ///< Descriptor for the property to be defined
+    );
+
+    /// Defines properties on the object.
+    bool DefineProperties(
+        const std::initializer_list<PropertyDescriptor>& properties
+        ///< List of descriptors for the properties to be defined
+    );
+
+    /// Defines properties on the object.
+    bool DefineProperties(
+        const std::vector<PropertyDescriptor>& properties
+        ///< Vector of descriptors for the properties to be defined
+    );
+
+    /// Checks if an object is an instance created by a constructor function.
+    ///
+    /// This is equivalent to the JavaScript `instanceof` operator.
+    bool InstanceOf(
+      const Function& constructor ///< Constructor function
+    ) const;
+
+    template <typename Finalizer, typename T>
+    inline void AddFinalizer(Finalizer finalizeCallback, T* data);
+
+    template <typename Finalizer, typename T, typename Hint>
+    inline void AddFinalizer(Finalizer finalizeCallback,
+                             T* data,
+                             Hint* finalizeHint);
+#if NAPI_VERSION >= 8
+    bool Freeze();
+    bool Seal();
+#endif  // NAPI_VERSION >= 8
+  };
+
+  template <typename T>
+  class External : public Value {
+  public:
+    static External New(napi_env env, T* data);
+
+    // Finalizer must implement `void operator()(Env env, T* data)`.
+    template <typename Finalizer>
+    static External New(napi_env env,
+                        T* data,
+                        Finalizer finalizeCallback);
+    // Finalizer must implement `void operator()(Env env, T* data, Hint* hint)`.
+    template <typename Finalizer, typename Hint>
+    static External New(napi_env env,
+                        T* data,
+                        Finalizer finalizeCallback,
+                        Hint* finalizeHint);
+
+    External();
+    External(napi_env env, napi_value value);
+
+    T* Data() const;
+  };
+
+  class Array : public Object {
+  public:
+    static Array New(napi_env env);
+    static Array New(napi_env env, size_t length);
+
+    Array();
+    Array(napi_env env, napi_value value);
+
+    uint32_t Length() const;
+  };
+
+  /// A JavaScript array buffer value.
+  class ArrayBuffer : public Object {
+  public:
+    /// Creates a new ArrayBuffer instance over a new automatically-allocated buffer.
+   static ArrayBuffer New(
+       napi_env env,      ///< Node-API environment
+       size_t byteLength  ///< Length of the buffer to be allocated, in bytes
+   );
+
+   /// Creates a new ArrayBuffer instance, using an external buffer with
+   /// specified byte length.
+   static ArrayBuffer New(
+       napi_env env,        ///< Node-API environment
+       void* externalData,  ///< Pointer to the external buffer to be used by
+                            ///< the array
+       size_t byteLength    ///< Length of the external buffer to be used by the
+                            ///< array, in bytes
+   );
+
+   /// Creates a new ArrayBuffer instance, using an external buffer with
+   /// specified byte length.
+   template <typename Finalizer>
+   static ArrayBuffer New(
+       napi_env env,        ///< Node-API environment
+       void* externalData,  ///< Pointer to the external buffer to be used by
+                            ///< the array
+       size_t byteLength,   ///< Length of the external buffer to be used by the
+                            ///< array,
+                            ///  in bytes
+       Finalizer finalizeCallback  ///< Function to be called when the array
+                                   ///< buffer is destroyed;
+                                   ///  must implement `void operator()(Env env,
+                                   ///  void* externalData)`
+   );
+
+   /// Creates a new ArrayBuffer instance, using an external buffer with
+   /// specified byte length.
+   template <typename Finalizer, typename Hint>
+   static ArrayBuffer New(
+       napi_env env,        ///< Node-API environment
+       void* externalData,  ///< Pointer to the external buffer to be used by
+                            ///< the array
+       size_t byteLength,   ///< Length of the external buffer to be used by the
+                            ///< array,
+                            ///  in bytes
+       Finalizer finalizeCallback,  ///< Function to be called when the array
+                                    ///< buffer is destroyed;
+                                    ///  must implement `void operator()(Env
+                                    ///  env, void* externalData, Hint* hint)`
+       Hint* finalizeHint  ///< Hint (second parameter) to be passed to the
+                           ///< finalize callback
+   );
+
+   ArrayBuffer();  ///< Creates a new _empty_ ArrayBuffer instance.
+   ArrayBuffer(napi_env env,
+               napi_value value);  ///< Wraps a Node-API value primitive.
+
+   void* Data();         ///< Gets a pointer to the data buffer.
+   size_t ByteLength();  ///< Gets the length of the array buffer in bytes.
+
+#if NAPI_VERSION >= 7
+    bool IsDetached() const;
+    void Detach();
+#endif  // NAPI_VERSION >= 7
+  };
+
+  /// A JavaScript typed-array value with unknown array type.
+  ///
+  /// For type-specific operations, cast to a `TypedArrayOf<T>` instance using the `As()`
+  /// method:
+  ///
+  ///     Napi::TypedArray array = ...
+  ///     if (t.TypedArrayType() == napi_int32_array) {
+  ///         Napi::Int32Array int32Array = t.As<Napi::Int32Array>();
+  ///     }
+  class TypedArray : public Object {
+  public:
+    TypedArray();                               ///< Creates a new _empty_ TypedArray instance.
+    TypedArray(napi_env env,
+               napi_value value);  ///< Wraps a Node-API value primitive.
+
+    napi_typedarray_type TypedArrayType() const; ///< Gets the type of this typed-array.
+    Napi::ArrayBuffer ArrayBuffer() const;       ///< Gets the backing array buffer.
+
+    uint8_t ElementSize() const;  ///< Gets the size in bytes of one element in the array.
+    size_t ElementLength() const; ///< Gets the number of elements in the array.
+    size_t ByteOffset() const;    ///< Gets the offset into the buffer where the array starts.
+    size_t ByteLength() const;    ///< Gets the length of the array in bytes.
+
+  protected:
+    /// !cond INTERNAL
+    napi_typedarray_type _type;
+    size_t _length;
+
+    TypedArray(napi_env env, napi_value value, napi_typedarray_type type, size_t length);
+
+    static const napi_typedarray_type unknown_array_type = static_cast<napi_typedarray_type>(-1);
+
+    template <typename T>
+    static
+#if defined(NAPI_HAS_CONSTEXPR)
+    constexpr
+#endif
+    napi_typedarray_type TypedArrayTypeForPrimitiveType() {
+      return std::is_same<T, int8_t>::value ? napi_int8_array
+        : std::is_same<T, uint8_t>::value ? napi_uint8_array
+        : std::is_same<T, int16_t>::value ? napi_int16_array
+        : std::is_same<T, uint16_t>::value ? napi_uint16_array
+        : std::is_same<T, int32_t>::value ? napi_int32_array
+        : std::is_same<T, uint32_t>::value ? napi_uint32_array
+        : std::is_same<T, float>::value ? napi_float32_array
+        : std::is_same<T, double>::value ? napi_float64_array
+#if NAPI_VERSION > 5
+        : std::is_same<T, int64_t>::value ? napi_bigint64_array
+        : std::is_same<T, uint64_t>::value ? napi_biguint64_array
+#endif  // NAPI_VERSION > 5
+        : unknown_array_type;
+    }
+    /// !endcond
+  };
+
+  /// A JavaScript typed-array value with known array type.
+  ///
+  /// Note while it is possible to create and access Uint8 "clamped" arrays using this class,
+  /// the _clamping_ behavior is only applied in JavaScript.
+  template <typename T>
+  class TypedArrayOf : public TypedArray {
+  public:
+    /// Creates a new TypedArray instance over a new automatically-allocated array buffer.
+    ///
+    /// The array type parameter can normally be omitted (because it is inferred from the template
+    /// parameter T), except when creating a "clamped" array:
+    ///
+    ///     Uint8Array::New(env, length, napi_uint8_clamped_array)
+   static TypedArrayOf New(
+       napi_env env,          ///< Node-API environment
+       size_t elementLength,  ///< Length of the created array, as a number of
+                              ///< elements
+#if defined(NAPI_HAS_CONSTEXPR)
+       napi_typedarray_type type =
+           TypedArray::TypedArrayTypeForPrimitiveType<T>()
+#else
+       napi_typedarray_type type
+#endif
+       ///< Type of array, if different from the default array type for the
+       ///< template parameter T.
+   );
+
+    /// Creates a new TypedArray instance over a provided array buffer.
+    ///
+    /// The array type parameter can normally be omitted (because it is inferred from the template
+    /// parameter T), except when creating a "clamped" array:
+    ///
+    ///     Uint8Array::New(env, length, buffer, 0, napi_uint8_clamped_array)
+   static TypedArrayOf New(
+       napi_env env,          ///< Node-API environment
+       size_t elementLength,  ///< Length of the created array, as a number of
+                              ///< elements
+       Napi::ArrayBuffer arrayBuffer,  ///< Backing array buffer instance to use
+       size_t bufferOffset,  ///< Offset into the array buffer where the
+                             ///< typed-array starts
+#if defined(NAPI_HAS_CONSTEXPR)
+       napi_typedarray_type type =
+           TypedArray::TypedArrayTypeForPrimitiveType<T>()
+#else
+       napi_typedarray_type type
+#endif
+       ///< Type of array, if different from the default array type for the
+       ///< template parameter T.
+   );
+
+    TypedArrayOf();                               ///< Creates a new _empty_ TypedArrayOf instance.
+    TypedArrayOf(napi_env env,
+                 napi_value value);  ///< Wraps a Node-API value primitive.
+
+    T& operator [](size_t index);             ///< Gets or sets an element in the array.
+    const T& operator [](size_t index) const; ///< Gets an element in the array.
+
+    /// Gets a pointer to the array's backing buffer.
+    ///
+    /// This is not necessarily the same as the `ArrayBuffer::Data()` pointer, because the
+    /// typed-array may have a non-zero `ByteOffset()` into the `ArrayBuffer`.
+    T* Data();
+
+    /// Gets a pointer to the array's backing buffer.
+    ///
+    /// This is not necessarily the same as the `ArrayBuffer::Data()` pointer, because the
+    /// typed-array may have a non-zero `ByteOffset()` into the `ArrayBuffer`.
+    const T* Data() const;
+
+  private:
+    T* _data;
+
+    TypedArrayOf(napi_env env,
+                 napi_value value,
+                 napi_typedarray_type type,
+                 size_t length,
+                 T* data);
+  };
+
+  /// The DataView provides a low-level interface for reading/writing multiple
+  /// number types in an ArrayBuffer irrespective of the platform's endianness.
+  class DataView : public Object {
+  public:
+    static DataView New(napi_env env,
+                        Napi::ArrayBuffer arrayBuffer);
+    static DataView New(napi_env env,
+                        Napi::ArrayBuffer arrayBuffer,
+                        size_t byteOffset);
+    static DataView New(napi_env env,
+                        Napi::ArrayBuffer arrayBuffer,
+                        size_t byteOffset,
+                        size_t byteLength);
+
+    DataView();                               ///< Creates a new _empty_ DataView instance.
+    DataView(napi_env env,
+             napi_value value);  ///< Wraps a Node-API value primitive.
+
+    Napi::ArrayBuffer ArrayBuffer() const;    ///< Gets the backing array buffer.
+    size_t ByteOffset() const;    ///< Gets the offset into the buffer where the array starts.
+    size_t ByteLength() const;    ///< Gets the length of the array in bytes.
+
+    void* Data() const;
+
+    float GetFloat32(size_t byteOffset) const;
+    double GetFloat64(size_t byteOffset) const;
+    int8_t GetInt8(size_t byteOffset) const;
+    int16_t GetInt16(size_t byteOffset) const;
+    int32_t GetInt32(size_t byteOffset) const;
+    uint8_t GetUint8(size_t byteOffset) const;
+    uint16_t GetUint16(size_t byteOffset) const;
+    uint32_t GetUint32(size_t byteOffset) const;
+
+    void SetFloat32(size_t byteOffset, float value) const;
+    void SetFloat64(size_t byteOffset, double value) const;
+    void SetInt8(size_t byteOffset, int8_t value) const;
+    void SetInt16(size_t byteOffset, int16_t value) const;
+    void SetInt32(size_t byteOffset, int32_t value) const;
+    void SetUint8(size_t byteOffset, uint8_t value) const;
+    void SetUint16(size_t byteOffset, uint16_t value) const;
+    void SetUint32(size_t byteOffset, uint32_t value) const;
+
+  private:
+    template <typename T>
+    T ReadData(size_t byteOffset) const;
+
+    template <typename T>
+    void WriteData(size_t byteOffset, T value) const;
+
+    void* _data;
+    size_t _length;
+  };
+
+  class Function : public Object {
+  public:
+   using VoidCallback = void (*)(const CallbackInfo& info);
+   using Callback = Value (*)(const CallbackInfo& info);
+
+   template <VoidCallback cb>
+   static Function New(napi_env env,
+                       const char* utf8name = nullptr,
+                       void* data = nullptr);
+
+   template <Callback cb>
+   static Function New(napi_env env,
+                       const char* utf8name = nullptr,
+                       void* data = nullptr);
+
+   template <VoidCallback cb>
+   static Function New(napi_env env,
+                       const std::string& utf8name,
+                       void* data = nullptr);
+
+   template <Callback cb>
+   static Function New(napi_env env,
+                       const std::string& utf8name,
+                       void* data = nullptr);
+
+   /// Callable must implement operator() accepting a const CallbackInfo&
+   /// and return either void or Value.
+   template <typename Callable>
+   static Function New(napi_env env,
+                       Callable cb,
+                       const char* utf8name = nullptr,
+                       void* data = nullptr);
+   /// Callable must implement operator() accepting a const CallbackInfo&
+   /// and return either void or Value.
+   template <typename Callable>
+   static Function New(napi_env env,
+                       Callable cb,
+                       const std::string& utf8name,
+                       void* data = nullptr);
+
+   Function();
+   Function(napi_env env, napi_value value);
+
+   Value operator()(const std::initializer_list<napi_value>& args) const;
+
+   Value Call(const std::initializer_list<napi_value>& args) const;
+   Value Call(const std::vector<napi_value>& args) const;
+   Value Call(size_t argc, const napi_value* args) const;
+   Value Call(napi_value recv,
+              const std::initializer_list<napi_value>& args) const;
+   Value Call(napi_value recv, const std::vector<napi_value>& args) const;
+   Value Call(napi_value recv, size_t argc, const napi_value* args) const;
+
+   Value MakeCallback(napi_value recv,
+                      const std::initializer_list<napi_value>& args,
+                      napi_async_context context = nullptr) const;
+   Value MakeCallback(napi_value recv,
+                      const std::vector<napi_value>& args,
+                      napi_async_context context = nullptr) const;
+   Value MakeCallback(napi_value recv,
+                      size_t argc,
+                      const napi_value* args,
+                      napi_async_context context = nullptr) const;
+
+   Object New(const std::initializer_list<napi_value>& args) const;
+   Object New(const std::vector<napi_value>& args) const;
+   Object New(size_t argc, const napi_value* args) const;
+  };
+
+  class Promise : public Object {
+  public:
+    class Deferred {
+    public:
+      static Deferred New(napi_env env);
+      Deferred(napi_env env);
+
+      Napi::Promise Promise() const;
+      Napi::Env Env() const;
+
+      void Resolve(napi_value value) const;
+      void Reject(napi_value value) const;
+
+    private:
+      napi_env _env;
+      napi_deferred _deferred;
+      napi_value _promise;
+    };
+
+    Promise(napi_env env, napi_value value);
+  };
+
+  template <typename T>
+  class Buffer : public Uint8Array {
+  public:
+    static Buffer<T> New(napi_env env, size_t length);
+    static Buffer<T> New(napi_env env, T* data, size_t length);
+
+    // Finalizer must implement `void operator()(Env env, T* data)`.
+    template <typename Finalizer>
+    static Buffer<T> New(napi_env env, T* data,
+                         size_t length,
+                         Finalizer finalizeCallback);
+    // Finalizer must implement `void operator()(Env env, T* data, Hint* hint)`.
+    template <typename Finalizer, typename Hint>
+    static Buffer<T> New(napi_env env, T* data,
+                         size_t length,
+                         Finalizer finalizeCallback,
+                         Hint* finalizeHint);
+
+    static Buffer<T> Copy(napi_env env, const T* data, size_t length);
+
+    Buffer();
+    Buffer(napi_env env, napi_value value);
+    size_t Length() const;
+    T* Data() const;
+
+  private:
+    mutable size_t _length;
+    mutable T* _data;
+
+    Buffer(napi_env env, napi_value value, size_t length, T* data);
+    void EnsureInfo() const;
+  };
+
+  /// Holds a counted reference to a value; initially a weak reference unless otherwise specified,
+  /// may be changed to/from a strong reference by adjusting the refcount.
+  ///
+  /// The referenced value is not immediately destroyed when the reference count is zero; it is
+  /// merely then eligible for garbage-collection if there are no other references to the value.
+  template <typename T>
+  class Reference {
+  public:
+    static Reference<T> New(const T& value, uint32_t initialRefcount = 0);
+
+    Reference();
+    Reference(napi_env env, napi_ref ref);
+    ~Reference();
+
+    // A reference can be moved but cannot be copied.
+    Reference(Reference<T>&& other);
+    Reference<T>& operator =(Reference<T>&& other);
+    NAPI_DISALLOW_ASSIGN(Reference<T>)
+
+    operator napi_ref() const;
+    bool operator ==(const Reference<T> &other) const;
+    bool operator !=(const Reference<T> &other) const;
+
+    Napi::Env Env() const;
+    bool IsEmpty() const;
+
+    // Note when getting the value of a Reference it is usually correct to do so
+    // within a HandleScope so that the value handle gets cleaned up efficiently.
+    T Value() const;
+
+    uint32_t Ref();
+    uint32_t Unref();
+    void Reset();
+    void Reset(const T& value, uint32_t refcount = 0);
+
+    // Call this on a reference that is declared as static data, to prevent its
+    // destructor from running at program shutdown time, which would attempt to
+    // reset the reference when the environment is no longer valid. Avoid using
+    // this if at all possible. If you do need to use static data, MAKE SURE to
+    // warn your users that your addon is NOT threadsafe.
+    void SuppressDestruct();
+
+  protected:
+    Reference(const Reference<T>&);
+
+    /// !cond INTERNAL
+    napi_env _env;
+    napi_ref _ref;
+    /// !endcond
+
+  private:
+    bool _suppressDestruct;
+  };
+
+  class ObjectReference: public Reference<Object> {
+  public:
+    ObjectReference();
+    ObjectReference(napi_env env, napi_ref ref);
+
+    // A reference can be moved but cannot be copied.
+    ObjectReference(Reference<Object>&& other);
+    ObjectReference& operator =(Reference<Object>&& other);
+    ObjectReference(ObjectReference&& other);
+    ObjectReference& operator =(ObjectReference&& other);
+    NAPI_DISALLOW_ASSIGN(ObjectReference)
+
+    Napi::Value Get(const char* utf8name) const;
+    Napi::Value Get(const std::string& utf8name) const;
+    bool Set(const char* utf8name, napi_value value);
+    bool Set(const char* utf8name, Napi::Value value);
+    bool Set(const char* utf8name, const char* utf8value);
+    bool Set(const char* utf8name, bool boolValue);
+    bool Set(const char* utf8name, double numberValue);
+    bool Set(const std::string& utf8name, napi_value value);
+    bool Set(const std::string& utf8name, Napi::Value value);
+    bool Set(const std::string& utf8name, std::string& utf8value);
+    bool Set(const std::string& utf8name, bool boolValue);
+    bool Set(const std::string& utf8name, double numberValue);
+
+    Napi::Value Get(uint32_t index) const;
+    bool Set(uint32_t index, const napi_value value);
+    bool Set(uint32_t index, const Napi::Value value);
+    bool Set(uint32_t index, const char* utf8value);
+    bool Set(uint32_t index, const std::string& utf8value);
+    bool Set(uint32_t index, bool boolValue);
+    bool Set(uint32_t index, double numberValue);
+
+   protected:
+    ObjectReference(const ObjectReference&);
+  };
+
+  class FunctionReference: public Reference<Function> {
+  public:
+    FunctionReference();
+    FunctionReference(napi_env env, napi_ref ref);
+
+    // A reference can be moved but cannot be copied.
+    FunctionReference(Reference<Function>&& other);
+    FunctionReference& operator =(Reference<Function>&& other);
+    FunctionReference(FunctionReference&& other);
+    FunctionReference& operator =(FunctionReference&& other);
+    NAPI_DISALLOW_ASSIGN_COPY(FunctionReference)
+
+    Napi::Value operator ()(const std::initializer_list<napi_value>& args) const;
+
+    Napi::Value Call(const std::initializer_list<napi_value>& args) const;
+    Napi::Value Call(const std::vector<napi_value>& args) const;
+    Napi::Value Call(napi_value recv, const std::initializer_list<napi_value>& args) const;
+    Napi::Value Call(napi_value recv, const std::vector<napi_value>& args) const;
+    Napi::Value Call(napi_value recv, size_t argc, const napi_value* args) const;
+
+    Napi::Value MakeCallback(napi_value recv,
+                             const std::initializer_list<napi_value>& args,
+                             napi_async_context context = nullptr) const;
+    Napi::Value MakeCallback(napi_value recv,
+                             const std::vector<napi_value>& args,
+                             napi_async_context context = nullptr) const;
+    Napi::Value MakeCallback(napi_value recv,
+                             size_t argc,
+                             const napi_value* args,
+                             napi_async_context context = nullptr) const;
+
+    Object New(const std::initializer_list<napi_value>& args) const;
+    Object New(const std::vector<napi_value>& args) const;
+  };
+
+  // Shortcuts to creating a new reference with inferred type and refcount = 0.
+  template <typename T> Reference<T> Weak(T value);
+  ObjectReference Weak(Object value);
+  FunctionReference Weak(Function value);
+
+  // Shortcuts to creating a new reference with inferred type and refcount = 1.
+  template <typename T> Reference<T> Persistent(T value);
+  ObjectReference Persistent(Object value);
+  FunctionReference Persistent(Function value);
+
+  /// A persistent reference to a JavaScript error object. Use of this class
+  /// depends somewhat on whether C++ exceptions are enabled at compile time.
+  ///
+  /// ### Handling Errors With C++ Exceptions
+  ///
+  /// If C++ exceptions are enabled, then the `Error` class extends
+  /// `std::exception` and enables integrated error-handling for C++ exceptions
+  /// and JavaScript exceptions.
+  ///
+  /// If a Node-API call fails without executing any JavaScript code (for
+  /// example due to an invalid argument), then the Node-API wrapper
+  /// automatically converts and throws the error as a C++ exception of type
+  /// `Napi::Error`. Or if a JavaScript function called by C++ code via Node-API
+  /// throws a JavaScript exception, then the Node-API wrapper automatically
+  /// converts and throws it as a C++ exception of type `Napi::Error`.
+  ///
+  /// If a C++ exception of type `Napi::Error` escapes from a Node-API C++
+  /// callback, then the Node-API wrapper automatically converts and throws it
+  /// as a JavaScript exception. Therefore, catching a C++ exception of type
+  /// `Napi::Error` prevents a JavaScript exception from being thrown.
+  ///
+  /// #### Example 1A - Throwing a C++ exception:
+  ///
+  ///     Napi::Env env = ...
+  ///     throw Napi::Error::New(env, "Example exception");
+  ///
+  /// Following C++ statements will not be executed. The exception will bubble
+  /// up as a C++ exception of type `Napi::Error`, until it is either caught
+  /// while still in C++, or else automatically propataged as a JavaScript
+  /// exception when the callback returns to JavaScript.
+  ///
+  /// #### Example 2A - Propagating a Node-API C++ exception:
+  ///
+  ///     Napi::Function jsFunctionThatThrows = someObj.As<Napi::Function>();
+  ///     Napi::Value result = jsFunctionThatThrows({ arg1, arg2 });
+  ///
+  /// Following C++ statements will not be executed. The exception will bubble
+  /// up as a C++ exception of type `Napi::Error`, until it is either caught
+  /// while still in C++, or else automatically propagated as a JavaScript
+  /// exception when the callback returns to JavaScript.
+  ///
+  /// #### Example 3A - Handling a Node-API C++ exception:
+  ///
+  ///     Napi::Function jsFunctionThatThrows = someObj.As<Napi::Function>();
+  ///     Napi::Value result;
+  ///     try {
+  ///        result = jsFunctionThatThrows({ arg1, arg2 });
+  ///     } catch (const Napi::Error& e) {
+  ///       cerr << "Caught JavaScript exception: " + e.what();
+  ///     }
+  ///
+  /// Since the exception was caught here, it will not be propagated as a
+  /// JavaScript exception.
+  ///
+  /// ### Handling Errors Without C++ Exceptions
+  ///
+  /// If C++ exceptions are disabled (by defining `NAPI_DISABLE_CPP_EXCEPTIONS`)
+  /// then this class does not extend `std::exception`, and APIs in the `Napi`
+  /// namespace do not throw C++ exceptions when they fail. Instead, they raise
+  /// _pending_ JavaScript exceptions and return _empty_ `Value`s. Calling code
+  /// should check `Value::IsEmpty()` before attempting to use a returned value,
+  /// and may use methods on the `Env` class to check for, get, and clear a
+  /// pending JavaScript exception. If the pending exception is not cleared, it
+  /// will be thrown when the native callback returns to JavaScript.
+  ///
+  /// #### Example 1B - Throwing a JS exception
+  ///
+  ///     Napi::Env env = ...
+  ///     Napi::Error::New(env, "Example
+  ///     exception").ThrowAsJavaScriptException(); return;
+  ///
+  /// After throwing a JS exception, the code should generally return
+  /// immediately from the native callback, after performing any necessary
+  /// cleanup.
+  ///
+  /// #### Example 2B - Propagating a Node-API JS exception:
+  ///
+  ///     Napi::Function jsFunctionThatThrows = someObj.As<Napi::Function>();
+  ///     Napi::Value result = jsFunctionThatThrows({ arg1, arg2 });
+  ///     if (result.IsEmpty()) return;
+  ///
+  /// An empty value result from a Node-API call indicates an error occurred,
+  /// and a JavaScript exception is pending. To let the exception propagate, the
+  /// code should generally return immediately from the native callback, after
+  /// performing any necessary cleanup.
+  ///
+  /// #### Example 3B - Handling a Node-API JS exception:
+  ///
+  ///     Napi::Function jsFunctionThatThrows = someObj.As<Napi::Function>();
+  ///     Napi::Value result = jsFunctionThatThrows({ arg1, arg2 });
+  ///     if (result.IsEmpty()) {
+  ///       Napi::Error e = env.GetAndClearPendingException();
+  ///       cerr << "Caught JavaScript exception: " + e.Message();
+  ///     }
+  ///
+  /// Since the exception was cleared here, it will not be propagated as a
+  /// JavaScript exception after the native callback returns.
+  class Error : public ObjectReference
+#ifdef NAPI_CPP_EXCEPTIONS
+    , public std::exception
+#endif // NAPI_CPP_EXCEPTIONS
+    {
+  public:
+    static Error New(napi_env env);
+    static Error New(napi_env env, const char* message);
+    static Error New(napi_env env, const std::string& message);
+
+    static NAPI_NO_RETURN void Fatal(const char* location, const char* message);
+
+    Error();
+    Error(napi_env env, napi_value value);
+
+    // An error can be moved or copied.
+    Error(Error&& other);
+    Error& operator =(Error&& other);
+    Error(const Error&);
+    Error& operator =(const Error&);
+
+    const std::string& Message() const NAPI_NOEXCEPT;
+    void ThrowAsJavaScriptException() const;
+
+#ifdef NAPI_CPP_EXCEPTIONS
+    const char* what() const NAPI_NOEXCEPT override;
+#endif // NAPI_CPP_EXCEPTIONS
+
+  protected:
+    /// !cond INTERNAL
+   using create_error_fn = napi_status (*)(napi_env envb,
+                                           napi_value code,
+                                           napi_value msg,
+                                           napi_value* result);
+
+   template <typename TError>
+   static TError New(napi_env env,
+                     const char* message,
+                     size_t length,
+                     create_error_fn create_error);
+   /// !endcond
+
+  private:
+    mutable std::string _message;
+  };
+
+  class TypeError : public Error {
+  public:
+    static TypeError New(napi_env env, const char* message);
+    static TypeError New(napi_env env, const std::string& message);
+
+    TypeError();
+    TypeError(napi_env env, napi_value value);
+  };
+
+  class RangeError : public Error {
+  public:
+    static RangeError New(napi_env env, const char* message);
+    static RangeError New(napi_env env, const std::string& message);
+
+    RangeError();
+    RangeError(napi_env env, napi_value value);
+  };
+
+  class CallbackInfo {
+  public:
+    CallbackInfo(napi_env env, napi_callback_info info);
+    ~CallbackInfo();
+
+    // Disallow copying to prevent multiple free of _dynamicArgs
+    NAPI_DISALLOW_ASSIGN_COPY(CallbackInfo)
+
+    Napi::Env Env() const;
+    Value NewTarget() const;
+    bool IsConstructCall() const;
+    size_t Length() const;
+    const Value operator [](size_t index) const;
+    Value This() const;
+    void* Data() const;
+    void SetData(void* data);
+
+  private:
+    const size_t _staticArgCount = 6;
+    napi_env _env;
+    napi_callback_info _info;
+    napi_value _this;
+    size_t _argc;
+    napi_value* _argv;
+    napi_value _staticArgs[6];
+    napi_value* _dynamicArgs;
+    void* _data;
+  };
+
+  class PropertyDescriptor {
+  public:
+   using GetterCallback = Napi::Value (*)(const Napi::CallbackInfo& info);
+   using SetterCallback = void (*)(const Napi::CallbackInfo& info);
+
+#ifndef NODE_ADDON_API_DISABLE_DEPRECATED
+    template <typename Getter>
+    static PropertyDescriptor Accessor(const char* utf8name,
+                                       Getter getter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter>
+    static PropertyDescriptor Accessor(const std::string& utf8name,
+                                       Getter getter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter>
+    static PropertyDescriptor Accessor(napi_value name,
+                                       Getter getter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter>
+    static PropertyDescriptor Accessor(Name name,
+                                       Getter getter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter, typename Setter>
+    static PropertyDescriptor Accessor(const char* utf8name,
+                                       Getter getter,
+                                       Setter setter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter, typename Setter>
+    static PropertyDescriptor Accessor(const std::string& utf8name,
+                                       Getter getter,
+                                       Setter setter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter, typename Setter>
+    static PropertyDescriptor Accessor(napi_value name,
+                                       Getter getter,
+                                       Setter setter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter, typename Setter>
+    static PropertyDescriptor Accessor(Name name,
+                                       Getter getter,
+                                       Setter setter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Callable>
+    static PropertyDescriptor Function(const char* utf8name,
+                                       Callable cb,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Callable>
+    static PropertyDescriptor Function(const std::string& utf8name,
+                                       Callable cb,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Callable>
+    static PropertyDescriptor Function(napi_value name,
+                                       Callable cb,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Callable>
+    static PropertyDescriptor Function(Name name,
+                                       Callable cb,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+#endif // !NODE_ADDON_API_DISABLE_DEPRECATED
+
+    template <GetterCallback Getter>
+    static PropertyDescriptor Accessor(const char* utf8name,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+
+    template <GetterCallback Getter>
+    static PropertyDescriptor Accessor(const std::string& utf8name,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+
+    template <GetterCallback Getter>
+    static PropertyDescriptor Accessor(Name name,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+
+    template <GetterCallback Getter, SetterCallback Setter>
+    static PropertyDescriptor Accessor(const char* utf8name,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+
+    template <GetterCallback Getter, SetterCallback Setter>
+    static PropertyDescriptor Accessor(const std::string& utf8name,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+
+    template <GetterCallback Getter, SetterCallback Setter>
+    static PropertyDescriptor Accessor(Name name,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+
+    template <typename Getter>
+    static PropertyDescriptor Accessor(Napi::Env env,
+                                       Napi::Object object,
+                                       const char* utf8name,
+                                       Getter getter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter>
+    static PropertyDescriptor Accessor(Napi::Env env,
+                                       Napi::Object object,
+                                       const std::string& utf8name,
+                                       Getter getter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter>
+    static PropertyDescriptor Accessor(Napi::Env env,
+                                       Napi::Object object,
+                                       Name name,
+                                       Getter getter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter, typename Setter>
+    static PropertyDescriptor Accessor(Napi::Env env,
+                                       Napi::Object object,
+                                       const char* utf8name,
+                                       Getter getter,
+                                       Setter setter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter, typename Setter>
+    static PropertyDescriptor Accessor(Napi::Env env,
+                                       Napi::Object object,
+                                       const std::string& utf8name,
+                                       Getter getter,
+                                       Setter setter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Getter, typename Setter>
+    static PropertyDescriptor Accessor(Napi::Env env,
+                                       Napi::Object object,
+                                       Name name,
+                                       Getter getter,
+                                       Setter setter,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Callable>
+    static PropertyDescriptor Function(Napi::Env env,
+                                       Napi::Object object,
+                                       const char* utf8name,
+                                       Callable cb,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Callable>
+    static PropertyDescriptor Function(Napi::Env env,
+                                       Napi::Object object,
+                                       const std::string& utf8name,
+                                       Callable cb,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    template <typename Callable>
+    static PropertyDescriptor Function(Napi::Env env,
+                                       Napi::Object object,
+                                       Name name,
+                                       Callable cb,
+                                       napi_property_attributes attributes = napi_default,
+                                       void* data = nullptr);
+    static PropertyDescriptor Value(const char* utf8name,
+                                    napi_value value,
+                                    napi_property_attributes attributes = napi_default);
+    static PropertyDescriptor Value(const std::string& utf8name,
+                                    napi_value value,
+                                    napi_property_attributes attributes = napi_default);
+    static PropertyDescriptor Value(napi_value name,
+                                    napi_value value,
+                                    napi_property_attributes attributes = napi_default);
+    static PropertyDescriptor Value(Name name,
+                                    Napi::Value value,
+                                    napi_property_attributes attributes = napi_default);
+
+    PropertyDescriptor(napi_property_descriptor desc);
+
+    operator napi_property_descriptor&();
+    operator const napi_property_descriptor&() const;
+
+  private:
+    napi_property_descriptor _desc;
+  };
+
+  /// Property descriptor for use with `ObjectWrap::DefineClass()`.
+  ///
+  /// This is different from the standalone `PropertyDescriptor` because it is specific to each
+  /// `ObjectWrap<T>` subclass. This prevents using descriptors from a different class when
+  /// defining a new class (preventing the callbacks from having incorrect `this` pointers).
+  template <typename T>
+  class ClassPropertyDescriptor {
+  public:
+    ClassPropertyDescriptor(napi_property_descriptor desc) : _desc(desc) {}
+
+    operator napi_property_descriptor&() { return _desc; }
+    operator const napi_property_descriptor&() const { return _desc; }
+
+  private:
+    napi_property_descriptor _desc;
+  };
+
+  template <typename T, typename TCallback>
+  struct MethodCallbackData {
+    TCallback callback;
+    void* data;
+  };
+
+  template <typename T, typename TGetterCallback, typename TSetterCallback>
+  struct AccessorCallbackData {
+    TGetterCallback getterCallback;
+    TSetterCallback setterCallback;
+    void* data;
+  };
+
+  template <typename T>
+  class InstanceWrap {
+   public:
+    using InstanceVoidMethodCallback = void (T::*)(const CallbackInfo& info);
+    using InstanceMethodCallback = Napi::Value (T::*)(const CallbackInfo& info);
+    using InstanceGetterCallback = Napi::Value (T::*)(const CallbackInfo& info);
+    using InstanceSetterCallback = void (T::*)(const CallbackInfo& info,
+                                               const Napi::Value& value);
+
+    using PropertyDescriptor = ClassPropertyDescriptor<T>;
+
+    static PropertyDescriptor InstanceMethod(const char* utf8name,
+                                             InstanceVoidMethodCallback method,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    static PropertyDescriptor InstanceMethod(const char* utf8name,
+                                             InstanceMethodCallback method,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    static PropertyDescriptor InstanceMethod(Symbol name,
+                                             InstanceVoidMethodCallback method,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    static PropertyDescriptor InstanceMethod(Symbol name,
+                                             InstanceMethodCallback method,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    template <InstanceVoidMethodCallback method>
+    static PropertyDescriptor InstanceMethod(const char* utf8name,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    template <InstanceMethodCallback method>
+    static PropertyDescriptor InstanceMethod(const char* utf8name,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    template <InstanceVoidMethodCallback method>
+    static PropertyDescriptor InstanceMethod(Symbol name,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    template <InstanceMethodCallback method>
+    static PropertyDescriptor InstanceMethod(Symbol name,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    static PropertyDescriptor InstanceAccessor(const char* utf8name,
+                                               InstanceGetterCallback getter,
+                                               InstanceSetterCallback setter,
+                                               napi_property_attributes attributes = napi_default,
+                                               void* data = nullptr);
+    static PropertyDescriptor InstanceAccessor(Symbol name,
+                                               InstanceGetterCallback getter,
+                                               InstanceSetterCallback setter,
+                                               napi_property_attributes attributes = napi_default,
+                                               void* data = nullptr);
+    template <InstanceGetterCallback getter, InstanceSetterCallback setter=nullptr>
+    static PropertyDescriptor InstanceAccessor(const char* utf8name,
+                                               napi_property_attributes attributes = napi_default,
+                                               void* data = nullptr);
+    template <InstanceGetterCallback getter, InstanceSetterCallback setter=nullptr>
+    static PropertyDescriptor InstanceAccessor(Symbol name,
+                                               napi_property_attributes attributes = napi_default,
+                                               void* data = nullptr);
+    static PropertyDescriptor InstanceValue(const char* utf8name,
+                                            Napi::Value value,
+                                            napi_property_attributes attributes = napi_default);
+    static PropertyDescriptor InstanceValue(Symbol name,
+                                            Napi::Value value,
+                                            napi_property_attributes attributes = napi_default);
+
+   protected:
+    static void AttachPropData(napi_env env, napi_value value, const napi_property_descriptor* prop);
+
+   private:
+    using This = InstanceWrap<T>;
+
+    using InstanceVoidMethodCallbackData =
+        MethodCallbackData<T, InstanceVoidMethodCallback>;
+    using InstanceMethodCallbackData =
+        MethodCallbackData<T, InstanceMethodCallback>;
+    using InstanceAccessorCallbackData =
+        AccessorCallbackData<T, InstanceGetterCallback, InstanceSetterCallback>;
+
+    static napi_value InstanceVoidMethodCallbackWrapper(napi_env env, napi_callback_info info);
+    static napi_value InstanceMethodCallbackWrapper(napi_env env, napi_callback_info info);
+    static napi_value InstanceGetterCallbackWrapper(napi_env env, napi_callback_info info);
+    static napi_value InstanceSetterCallbackWrapper(napi_env env, napi_callback_info info);
+
+    template <InstanceSetterCallback method>
+    static napi_value WrappedMethod(napi_env env,
+                                    napi_callback_info info) NAPI_NOEXCEPT;
+
+    template <InstanceSetterCallback setter> struct SetterTag {};
+
+    template <InstanceSetterCallback setter>
+    static napi_callback WrapSetter(SetterTag<setter>) NAPI_NOEXCEPT {
+      return &This::WrappedMethod<setter>;
+    }
+    static napi_callback WrapSetter(SetterTag<nullptr>) NAPI_NOEXCEPT {
+      return nullptr;
+    }
+  };
+
+  /// Base class to be extended by C++ classes exposed to JavaScript; each C++ class instance gets
+  /// "wrapped" by a JavaScript object that is managed by this class.
+  ///
+  /// At initialization time, the `DefineClass()` method must be used to
+  /// hook up the accessor and method callbacks. It takes a list of
+  /// property descriptors, which can be constructed via the various
+  /// static methods on the base class.
+  ///
+  /// #### Example:
+  ///
+  ///     class Example: public Napi::ObjectWrap<Example> {
+  ///       public:
+  ///         static void Initialize(Napi::Env& env, Napi::Object& target) {
+  ///           Napi::Function constructor = DefineClass(env, "Example", {
+  ///             InstanceAccessor<&Example::GetSomething, &Example::SetSomething>("value"),
+  ///             InstanceMethod<&Example::DoSomething>("doSomething"),
+  ///           });
+  ///           target.Set("Example", constructor);
+  ///         }
+  ///
+  ///         Example(const Napi::CallbackInfo& info); // Constructor
+  ///         Napi::Value GetSomething(const Napi::CallbackInfo& info);
+  ///         void SetSomething(const Napi::CallbackInfo& info, const Napi::Value& value);
+  ///         Napi::Value DoSomething(const Napi::CallbackInfo& info);
+  ///     }
+  template <typename T>
+  class ObjectWrap : public InstanceWrap<T>, public Reference<Object> {
+  public:
+    ObjectWrap(const CallbackInfo& callbackInfo);
+    virtual ~ObjectWrap();
+
+    static T* Unwrap(Object wrapper);
+
+    // Methods exposed to JavaScript must conform to one of these callback signatures.
+    using StaticVoidMethodCallback = void (*)(const CallbackInfo& info);
+    using StaticMethodCallback = Napi::Value (*)(const CallbackInfo& info);
+    using StaticGetterCallback = Napi::Value (*)(const CallbackInfo& info);
+    using StaticSetterCallback = void (*)(const CallbackInfo& info,
+                                          const Napi::Value& value);
+
+    using PropertyDescriptor = ClassPropertyDescriptor<T>;
+
+    static Function DefineClass(Napi::Env env,
+                                const char* utf8name,
+                                const std::initializer_list<PropertyDescriptor>& properties,
+                                void* data = nullptr);
+    static Function DefineClass(Napi::Env env,
+                                const char* utf8name,
+                                const std::vector<PropertyDescriptor>& properties,
+                                void* data = nullptr);
+    static PropertyDescriptor StaticMethod(const char* utf8name,
+                                           StaticVoidMethodCallback method,
+                                           napi_property_attributes attributes = napi_default,
+                                           void* data = nullptr);
+    static PropertyDescriptor StaticMethod(const char* utf8name,
+                                           StaticMethodCallback method,
+                                           napi_property_attributes attributes = napi_default,
+                                           void* data = nullptr);
+    static PropertyDescriptor StaticMethod(Symbol name,
+                                           StaticVoidMethodCallback method,
+                                           napi_property_attributes attributes = napi_default,
+                                           void* data = nullptr);
+    static PropertyDescriptor StaticMethod(Symbol name,
+                                           StaticMethodCallback method,
+                                           napi_property_attributes attributes = napi_default,
+                                           void* data = nullptr);
+    template <StaticVoidMethodCallback method>
+    static PropertyDescriptor StaticMethod(const char* utf8name,
+                                           napi_property_attributes attributes = napi_default,
+                                           void* data = nullptr);
+    template <StaticVoidMethodCallback method>
+    static PropertyDescriptor StaticMethod(Symbol name,
+                                           napi_property_attributes attributes = napi_default,
+                                           void* data = nullptr);
+    template <StaticMethodCallback method>
+    static PropertyDescriptor StaticMethod(const char* utf8name,
+                                           napi_property_attributes attributes = napi_default,
+                                           void* data = nullptr);
+    template <StaticMethodCallback method>
+    static PropertyDescriptor StaticMethod(Symbol name,
+                                           napi_property_attributes attributes = napi_default,
+                                           void* data = nullptr);
+    static PropertyDescriptor StaticAccessor(const char* utf8name,
+                                             StaticGetterCallback getter,
+                                             StaticSetterCallback setter,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    static PropertyDescriptor StaticAccessor(Symbol name,
+                                             StaticGetterCallback getter,
+                                             StaticSetterCallback setter,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    template <StaticGetterCallback getter, StaticSetterCallback setter=nullptr>
+    static PropertyDescriptor StaticAccessor(const char* utf8name,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    template <StaticGetterCallback getter, StaticSetterCallback setter=nullptr>
+    static PropertyDescriptor StaticAccessor(Symbol name,
+                                             napi_property_attributes attributes = napi_default,
+                                             void* data = nullptr);
+    static PropertyDescriptor StaticValue(const char* utf8name,
+                                          Napi::Value value,
+                                          napi_property_attributes attributes = napi_default);
+    static PropertyDescriptor StaticValue(Symbol name,
+                                          Napi::Value value,
+                                          napi_property_attributes attributes = napi_default);
+    virtual void Finalize(Napi::Env env);
+
+  private:
+    using This = ObjectWrap<T>;
+
+    static napi_value ConstructorCallbackWrapper(napi_env env, napi_callback_info info);
+    static napi_value StaticVoidMethodCallbackWrapper(napi_env env, napi_callback_info info);
+    static napi_value StaticMethodCallbackWrapper(napi_env env, napi_callback_info info);
+    static napi_value StaticGetterCallbackWrapper(napi_env env, napi_callback_info info);
+    static napi_value StaticSetterCallbackWrapper(napi_env env, napi_callback_info info);
+    static void FinalizeCallback(napi_env env, void* data, void* hint);
+    static Function DefineClass(Napi::Env env,
+                                const char* utf8name,
+                                const size_t props_count,
+                                const napi_property_descriptor* props,
+                                void* data = nullptr);
+
+    using StaticVoidMethodCallbackData =
+        MethodCallbackData<T, StaticVoidMethodCallback>;
+    using StaticMethodCallbackData =
+        MethodCallbackData<T, StaticMethodCallback>;
+
+    using StaticAccessorCallbackData =
+        AccessorCallbackData<T, StaticGetterCallback, StaticSetterCallback>;
+
+    template <StaticSetterCallback method>
+    static napi_value WrappedMethod(napi_env env,
+                                    napi_callback_info info) NAPI_NOEXCEPT;
+
+    template <StaticSetterCallback setter> struct StaticSetterTag {};
+
+    template <StaticSetterCallback setter>
+    static napi_callback WrapStaticSetter(StaticSetterTag<setter>)
+        NAPI_NOEXCEPT {
+      return &This::WrappedMethod<setter>;
+    }
+    static napi_callback WrapStaticSetter(StaticSetterTag<nullptr>)
+        NAPI_NOEXCEPT {
+      return nullptr;
+    }
+
+    bool _construction_failed = true;
+  };
+
+  class HandleScope {
+  public:
+    HandleScope(napi_env env, napi_handle_scope scope);
+    explicit HandleScope(Napi::Env env);
+    ~HandleScope();
+
+    // Disallow copying to prevent double close of napi_handle_scope
+    NAPI_DISALLOW_ASSIGN_COPY(HandleScope)
+
+    operator napi_handle_scope() const;
+
+    Napi::Env Env() const;
+
+  private:
+    napi_env _env;
+    napi_handle_scope _scope;
+  };
+
+  class EscapableHandleScope {
+  public:
+    EscapableHandleScope(napi_env env, napi_escapable_handle_scope scope);
+    explicit EscapableHandleScope(Napi::Env env);
+    ~EscapableHandleScope();
+
+    // Disallow copying to prevent double close of napi_escapable_handle_scope
+    NAPI_DISALLOW_ASSIGN_COPY(EscapableHandleScope)
+
+    operator napi_escapable_handle_scope() const;
+
+    Napi::Env Env() const;
+    Value Escape(napi_value escapee);
+
+  private:
+    napi_env _env;
+    napi_escapable_handle_scope _scope;
+  };
+
+#if (NAPI_VERSION > 2)
+  class CallbackScope {
+  public:
+    CallbackScope(napi_env env, napi_callback_scope scope);
+    CallbackScope(napi_env env, napi_async_context context);
+    virtual ~CallbackScope();
+
+    // Disallow copying to prevent double close of napi_callback_scope
+    NAPI_DISALLOW_ASSIGN_COPY(CallbackScope)
+
+    operator napi_callback_scope() const;
+
+    Napi::Env Env() const;
+
+  private:
+    napi_env _env;
+    napi_callback_scope _scope;
+  };
+#endif
+
+  class AsyncContext {
+  public:
+    explicit AsyncContext(napi_env env, const char* resource_name);
+    explicit AsyncContext(napi_env env, const char* resource_name, const Object& resource);
+    virtual ~AsyncContext();
+
+    AsyncContext(AsyncContext&& other);
+    AsyncContext& operator =(AsyncContext&& other);
+    NAPI_DISALLOW_ASSIGN_COPY(AsyncContext)
+
+    operator napi_async_context() const;
+
+    Napi::Env Env() const;
+
+  private:
+    napi_env _env;
+    napi_async_context _context;
+  };
+
+  class AsyncWorker {
+  public:
+    virtual ~AsyncWorker();
+
+    // An async worker can be moved but cannot be copied.
+    AsyncWorker(AsyncWorker&& other);
+    AsyncWorker& operator =(AsyncWorker&& other);
+    NAPI_DISALLOW_ASSIGN_COPY(AsyncWorker)
+
+    operator napi_async_work() const;
+
+    Napi::Env Env() const;
+
+    void Queue();
+    void Cancel();
+    void SuppressDestruct();
+
+    ObjectReference& Receiver();
+    FunctionReference& Callback();
+
+    virtual void OnExecute(Napi::Env env);
+    virtual void OnWorkComplete(Napi::Env env,
+                                napi_status status);
+
+  protected:
+    explicit AsyncWorker(const Function& callback);
+    explicit AsyncWorker(const Function& callback,
+                         const char* resource_name);
+    explicit AsyncWorker(const Function& callback,
+                         const char* resource_name,
+                         const Object& resource);
+    explicit AsyncWorker(const Object& receiver,
+                         const Function& callback);
+    explicit AsyncWorker(const Object& receiver,
+                         const Function& callback,
+                         const char* resource_name);
+    explicit AsyncWorker(const Object& receiver,
+                         const Function& callback,
+                         const char* resource_name,
+                         const Object& resource);
+
+    explicit AsyncWorker(Napi::Env env);
+    explicit AsyncWorker(Napi::Env env,
+                         const char* resource_name);
+    explicit AsyncWorker(Napi::Env env,
+                         const char* resource_name,
+                         const Object& resource);
+
+    virtual void Execute() = 0;
+    virtual void OnOK();
+    virtual void OnError(const Error& e);
+    virtual void Destroy();
+    virtual std::vector<napi_value> GetResult(Napi::Env env);
+
+    void SetError(const std::string& error);
+
+  private:
+    static inline void OnAsyncWorkExecute(napi_env env, void* asyncworker);
+    static inline void OnAsyncWorkComplete(napi_env env,
+                                           napi_status status,
+                                           void* asyncworker);
+
+    napi_env _env;
+    napi_async_work _work;
+    ObjectReference _receiver;
+    FunctionReference _callback;
+    std::string _error;
+    bool _suppress_destruct;
+  };
+
+  #if (NAPI_VERSION > 3 && !defined(__wasm32__))
+  class ThreadSafeFunction {
+  public:
+    // This API may only be called from the main thread.
+    template <typename ResourceString>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename ContextType>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename Finalizer>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  Finalizer finalizeCallback);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename Finalizer,
+              typename FinalizerDataType>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  Finalizer finalizeCallback,
+                                  FinalizerDataType* data);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename ContextType, typename Finalizer>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context,
+                                  Finalizer finalizeCallback);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename ContextType,
+              typename Finalizer, typename FinalizerDataType>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context,
+                                  Finalizer finalizeCallback,
+                                  FinalizerDataType* data);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename ContextType>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename Finalizer>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  Finalizer finalizeCallback);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename Finalizer,
+              typename FinalizerDataType>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  Finalizer finalizeCallback,
+                                  FinalizerDataType* data);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename ContextType, typename Finalizer>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context,
+                                  Finalizer finalizeCallback);
+
+    // This API may only be called from the main thread.
+    template <typename ResourceString, typename ContextType,
+              typename Finalizer, typename FinalizerDataType>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context,
+                                  Finalizer finalizeCallback,
+                                  FinalizerDataType* data);
+
+    ThreadSafeFunction();
+    ThreadSafeFunction(napi_threadsafe_function tsFunctionValue);
+
+    operator napi_threadsafe_function() const;
+
+    // This API may be called from any thread.
+    napi_status BlockingCall() const;
+
+    // This API may be called from any thread.
+    template <typename Callback>
+    napi_status BlockingCall(Callback callback) const;
+
+    // This API may be called from any thread.
+    template <typename DataType, typename Callback>
+    napi_status BlockingCall(DataType* data, Callback callback) const;
+
+    // This API may be called from any thread.
+    napi_status NonBlockingCall() const;
+
+    // This API may be called from any thread.
+    template <typename Callback>
+    napi_status NonBlockingCall(Callback callback) const;
+
+    // This API may be called from any thread.
+    template <typename DataType, typename Callback>
+    napi_status NonBlockingCall(DataType* data, Callback callback) const;
+
+    // This API may only be called from the main thread.
+    void Ref(napi_env env) const;
+
+    // This API may only be called from the main thread.
+    void Unref(napi_env env) const;
+
+    // This API may be called from any thread.
+    napi_status Acquire() const;
+
+    // This API may be called from any thread.
+    napi_status Release();
+
+    // This API may be called from any thread.
+    napi_status Abort();
+
+    struct ConvertibleContext
+    {
+      template <class T>
+      operator T*() { return static_cast<T*>(context); }
+      void* context;
+    };
+
+    // This API may be called from any thread.
+    ConvertibleContext GetContext() const;
+
+  private:
+    using CallbackWrapper = std::function<void(Napi::Env, Napi::Function)>;
+
+    template <typename ResourceString, typename ContextType,
+              typename Finalizer, typename FinalizerDataType>
+    static ThreadSafeFunction New(napi_env env,
+                                  const Function& callback,
+                                  const Object& resource,
+                                  ResourceString resourceName,
+                                  size_t maxQueueSize,
+                                  size_t initialThreadCount,
+                                  ContextType* context,
+                                  Finalizer finalizeCallback,
+                                  FinalizerDataType* data,
+                                  napi_finalize wrapper);
+
+    napi_status CallInternal(CallbackWrapper* callbackWrapper,
+                        napi_threadsafe_function_call_mode mode) const;
+
+    static void CallJS(napi_env env,
+                       napi_value jsCallback,
+                       void* context,
+                       void* data);
+
+    napi_threadsafe_function _tsfn;
+  };
+
+  // A TypedThreadSafeFunction by default has no context (nullptr) and can
+  // accept any type (void) to its CallJs.
+  template <typename ContextType = std::nullptr_t,
+            typename DataType = void,
+            void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*) =
+                nullptr>
+  class TypedThreadSafeFunction {
+   public:
+    // This API may only be called from the main thread.
+    // Helper function that returns nullptr if running Node-API 5+, otherwise a
+    // non-empty, no-op Function. This provides the ability to specify at
+    // compile-time a callback parameter to `New` that safely does no action
+    // when targeting _any_ Node-API version.
+#if NAPI_VERSION > 4
+    static std::nullptr_t EmptyFunctionFactory(Napi::Env env);
+#else
+    static Napi::Function EmptyFunctionFactory(Napi::Env env);
+#endif
+    static Napi::Function FunctionOrEmpty(Napi::Env env,
+                                          Napi::Function& callback);
+
+#if NAPI_VERSION > 4
+    // This API may only be called from the main thread.
+    // Creates a new threadsafe function with:
+    //   Callback [missing] Resource [missing] Finalizer [missing]
+    template <typename ResourceString>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context = nullptr);
+
+    // This API may only be called from the main thread.
+    // Creates a new threadsafe function with:
+    //   Callback [missing] Resource [passed] Finalizer [missing]
+    template <typename ResourceString>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        const Object& resource,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context = nullptr);
+
+    // This API may only be called from the main thread.
+    // Creates a new threadsafe function with:
+    //   Callback [missing] Resource [missing] Finalizer [passed]
+    template <typename ResourceString,
+              typename Finalizer,
+              typename FinalizerDataType = void>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context,
+        Finalizer finalizeCallback,
+        FinalizerDataType* data = nullptr);
+
+    // This API may only be called from the main thread.
+    // Creates a new threadsafe function with:
+    //   Callback [missing] Resource [passed] Finalizer [passed]
+    template <typename ResourceString,
+              typename Finalizer,
+              typename FinalizerDataType = void>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        const Object& resource,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context,
+        Finalizer finalizeCallback,
+        FinalizerDataType* data = nullptr);
+#endif
+
+    // This API may only be called from the main thread.
+    // Creates a new threadsafe function with:
+    //   Callback [passed] Resource [missing] Finalizer [missing]
+    template <typename ResourceString>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        const Function& callback,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context = nullptr);
+
+    // This API may only be called from the main thread.
+    // Creates a new threadsafe function with:
+    //   Callback [passed] Resource [passed] Finalizer [missing]
+    template <typename ResourceString>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        const Function& callback,
+        const Object& resource,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context = nullptr);
+
+    // This API may only be called from the main thread.
+    // Creates a new threadsafe function with:
+    //   Callback [passed] Resource [missing] Finalizer [passed]
+    template <typename ResourceString,
+              typename Finalizer,
+              typename FinalizerDataType = void>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        const Function& callback,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context,
+        Finalizer finalizeCallback,
+        FinalizerDataType* data = nullptr);
+
+    // This API may only be called from the main thread.
+    // Creates a new threadsafe function with:
+    //   Callback [passed] Resource [passed] Finalizer [passed]
+    template <typename CallbackType,
+              typename ResourceString,
+              typename Finalizer,
+              typename FinalizerDataType>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        CallbackType callback,
+        const Object& resource,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context,
+        Finalizer finalizeCallback,
+        FinalizerDataType* data = nullptr);
+
+    TypedThreadSafeFunction<ContextType, DataType, CallJs>();
+    TypedThreadSafeFunction<ContextType, DataType, CallJs>(
+        napi_threadsafe_function tsFunctionValue);
+
+    operator napi_threadsafe_function() const;
+
+    // This API may be called from any thread.
+    napi_status BlockingCall(DataType* data = nullptr) const;
+
+    // This API may be called from any thread.
+    napi_status NonBlockingCall(DataType* data = nullptr) const;
+
+    // This API may only be called from the main thread.
+    void Ref(napi_env env) const;
+
+    // This API may only be called from the main thread.
+    void Unref(napi_env env) const;
+
+    // This API may be called from any thread.
+    napi_status Acquire() const;
+
+    // This API may be called from any thread.
+    napi_status Release();
+
+    // This API may be called from any thread.
+    napi_status Abort();
+
+    // This API may be called from any thread.
+    ContextType* GetContext() const;
+
+   private:
+    template <typename ResourceString,
+              typename Finalizer,
+              typename FinalizerDataType>
+    static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
+        napi_env env,
+        const Function& callback,
+        const Object& resource,
+        ResourceString resourceName,
+        size_t maxQueueSize,
+        size_t initialThreadCount,
+        ContextType* context,
+        Finalizer finalizeCallback,
+        FinalizerDataType* data,
+        napi_finalize wrapper);
+
+    static void CallJsInternal(napi_env env,
+                               napi_value jsCallback,
+                               void* context,
+                               void* data);
+
+   protected:
+    napi_threadsafe_function _tsfn;
+  };
+  template <typename DataType>
+  class AsyncProgressWorkerBase : public AsyncWorker {
+    public:
+     virtual void OnWorkProgress(DataType* data) = 0;
+     class ThreadSafeData {
+       public:
+        ThreadSafeData(AsyncProgressWorkerBase* asyncprogressworker, DataType* data)
+          : _asyncprogressworker(asyncprogressworker), _data(data) {}
+
+        AsyncProgressWorkerBase* asyncprogressworker() { return _asyncprogressworker; };
+        DataType* data() { return _data; };
+
+       private:
+        AsyncProgressWorkerBase* _asyncprogressworker;
+        DataType* _data;
+     };
+     void OnWorkComplete(Napi::Env env, napi_status status) override;
+    protected:
+     explicit AsyncProgressWorkerBase(const Object& receiver,
+                                      const Function& callback,
+                                      const char* resource_name,
+                                      const Object& resource,
+                                      size_t queue_size = 1);
+    virtual ~AsyncProgressWorkerBase();
+
+// Optional callback of Napi::ThreadSafeFunction only available after NAPI_VERSION 4.
+// Refs: https://github.com/nodejs/node/pull/27791
+#if NAPI_VERSION > 4
+     explicit AsyncProgressWorkerBase(Napi::Env env,
+                                      const char* resource_name,
+                                      const Object& resource,
+                                      size_t queue_size = 1);
+#endif
+
+     static inline void OnAsyncWorkProgress(Napi::Env env,
+                                            Napi::Function jsCallback,
+                                            void* data);
+
+     napi_status NonBlockingCall(DataType* data);
+
+    private:
+     ThreadSafeFunction _tsfn;
+     bool _work_completed = false;
+     napi_status _complete_status;
+     static inline void OnThreadSafeFunctionFinalize(Napi::Env env, void* data, AsyncProgressWorkerBase* context);
+  };
+
+  template<class T>
+  class AsyncProgressWorker : public AsyncProgressWorkerBase<void> {
+    public:
+     virtual ~AsyncProgressWorker();
+
+     class ExecutionProgress {
+        friend class AsyncProgressWorker;
+       public:
+        void Signal() const;
+        void Send(const T* data, size_t count) const;
+       private:
+        explicit ExecutionProgress(AsyncProgressWorker* worker) : _worker(worker) {}
+        AsyncProgressWorker* const _worker;
+     };
+
+     void OnWorkProgress(void*) override;
+
+    protected:
+     explicit AsyncProgressWorker(const Function& callback);
+     explicit AsyncProgressWorker(const Function& callback,
+                                  const char* resource_name);
+     explicit AsyncProgressWorker(const Function& callback,
+                                  const char* resource_name,
+                                  const Object& resource);
+     explicit AsyncProgressWorker(const Object& receiver,
+                                  const Function& callback);
+     explicit AsyncProgressWorker(const Object& receiver,
+                                  const Function& callback,
+                                  const char* resource_name);
+     explicit AsyncProgressWorker(const Object& receiver,
+                                  const Function& callback,
+                                  const char* resource_name,
+                                  const Object& resource);
+
+// Optional callback of Napi::ThreadSafeFunction only available after NAPI_VERSION 4.
+// Refs: https://github.com/nodejs/node/pull/27791
+#if NAPI_VERSION > 4
+     explicit AsyncProgressWorker(Napi::Env env);
+     explicit AsyncProgressWorker(Napi::Env env,
+                                  const char* resource_name);
+     explicit AsyncProgressWorker(Napi::Env env,
+                                  const char* resource_name,
+                                  const Object& resource);
+#endif
+     virtual void Execute(const ExecutionProgress& progress) = 0;
+     virtual void OnProgress(const T* data, size_t count) = 0;
+
+    private:
+     void Execute() override;
+     void Signal() const;
+     void SendProgress_(const T* data, size_t count);
+
+     std::mutex _mutex;
+     T* _asyncdata;
+     size_t _asyncsize;
+  };
+
+  template<class T>
+  class AsyncProgressQueueWorker : public AsyncProgressWorkerBase<std::pair<T*, size_t>> {
+    public:
+     virtual ~AsyncProgressQueueWorker() {};
+
+     class ExecutionProgress {
+        friend class AsyncProgressQueueWorker;
+       public:
+        void Signal() const;
+        void Send(const T* data, size_t count) const;
+       private:
+        explicit ExecutionProgress(AsyncProgressQueueWorker* worker) : _worker(worker) {}
+        AsyncProgressQueueWorker* const _worker;
+     };
+
+     void OnWorkComplete(Napi::Env env, napi_status status) override;
+     void OnWorkProgress(std::pair<T*, size_t>*) override;
+
+    protected:
+     explicit AsyncProgressQueueWorker(const Function& callback);
+     explicit AsyncProgressQueueWorker(const Function& callback,
+                                       const char* resource_name);
+     explicit AsyncProgressQueueWorker(const Function& callback,
+                                       const char* resource_name,
+                                       const Object& resource);
+     explicit AsyncProgressQueueWorker(const Object& receiver,
+                                       const Function& callback);
+     explicit AsyncProgressQueueWorker(const Object& receiver,
+                                       const Function& callback,
+                                       const char* resource_name);
+     explicit AsyncProgressQueueWorker(const Object& receiver,
+                                       const Function& callback,
+                                       const char* resource_name,
+                                       const Object& resource);
+
+// Optional callback of Napi::ThreadSafeFunction only available after NAPI_VERSION 4.
+// Refs: https://github.com/nodejs/node/pull/27791
+#if NAPI_VERSION > 4
+     explicit AsyncProgressQueueWorker(Napi::Env env);
+     explicit AsyncProgressQueueWorker(Napi::Env env,
+                                       const char* resource_name);
+     explicit AsyncProgressQueueWorker(Napi::Env env,
+                                       const char* resource_name,
+                                       const Object& resource);
+#endif
+     virtual void Execute(const ExecutionProgress& progress) = 0;
+     virtual void OnProgress(const T* data, size_t count) = 0;
+
+    private:
+     void Execute() override;
+     void Signal() const;
+     void SendProgress_(const T* data, size_t count);
+  };
+  #endif  // NAPI_VERSION > 3 && !defined(__wasm32__)
+
+  // Memory management.
+  class MemoryManagement {
+    public:
+      static int64_t AdjustExternalMemory(Env env, int64_t change_in_bytes);
+  };
+
+  // Version management
+  class VersionManagement {
+    public:
+      static uint32_t GetNapiVersion(Env env);
+      static const napi_node_version* GetNodeVersion(Env env);
+  };
+
+#if NAPI_VERSION > 5
+  template <typename T>
+  class Addon : public InstanceWrap<T> {
+   public:
+    static inline Object Init(Env env, Object exports);
+    static T* Unwrap(Object wrapper);
+
+   protected:
+    using AddonProp = ClassPropertyDescriptor<T>;
+    void DefineAddon(Object exports,
+                     const std::initializer_list<AddonProp>& props);
+    Napi::Object DefineProperties(Object object,
+                                 const std::initializer_list<AddonProp>& props);
+
+   private:
+    Object entry_point_;
+  };
+#endif  // NAPI_VERSION > 5
+
+} // namespace Napi
+
+// Inline implementations of all the above class methods are included here.
+#include "napi-inl.h"
+
+#endif // SRC_NAPI_H_
diff --git a/lwnode/apps/sqlite3/deps/include/node_api.h b/lwnode/apps/sqlite3/deps/include/node_api.h
new file mode 100644 (file)
index 0000000..786988e
--- /dev/null
@@ -0,0 +1,268 @@
+#ifndef SRC_NODE_API_H_
+#define SRC_NODE_API_H_
+
+#ifdef BUILDING_NODE_EXTENSION
+  #ifdef _WIN32
+    // Building native module against node
+    #define NAPI_EXTERN __declspec(dllimport)
+  #elif defined(__wasm32__)
+    #define NAPI_EXTERN __attribute__((__import_module__("napi")))
+  #endif
+#endif
+#include "js_native_api.h"
+#include "node_api_types.h"
+
+struct uv_loop_s;  // Forward declaration.
+
+#ifdef _WIN32
+# define NAPI_MODULE_EXPORT __declspec(dllexport)
+#else
+# define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
+#endif
+
+#if defined(__GNUC__)
+# define NAPI_NO_RETURN __attribute__((noreturn))
+#elif defined(_WIN32)
+# define NAPI_NO_RETURN __declspec(noreturn)
+#else
+# define NAPI_NO_RETURN
+#endif
+
+typedef napi_value (*napi_addon_register_func)(napi_env env,
+                                               napi_value exports);
+
+typedef struct napi_module {
+  int nm_version;
+  unsigned int nm_flags;
+  const char* nm_filename;
+  napi_addon_register_func nm_register_func;
+  const char* nm_modname;
+  void* nm_priv;
+  void* reserved[4];
+} napi_module;
+
+#define NAPI_MODULE_VERSION  1
+
+#if defined(_MSC_VER)
+#pragma section(".CRT$XCU", read)
+#define NAPI_C_CTOR(fn)                                                     \
+  static void __cdecl fn(void);                                             \
+  __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
+      fn;                                                                   \
+  static void __cdecl fn(void)
+#else
+#define NAPI_C_CTOR(fn)                              \
+  static void fn(void) __attribute__((constructor)); \
+  static void fn(void)
+#endif
+
+#define NAPI_MODULE_X(modname, regfunc, priv, flags)                  \
+  EXTERN_C_START                                                      \
+    static napi_module _module =                                      \
+    {                                                                 \
+      NAPI_MODULE_VERSION,                                            \
+      flags,                                                          \
+      __FILE__,                                                       \
+      regfunc,                                                        \
+      #modname,                                                       \
+      priv,                                                           \
+      {0},                                                            \
+    };                                                                \
+    NAPI_C_CTOR(_register_ ## modname) {                              \
+      napi_module_register(&_module);                                 \
+    }                                                                 \
+  EXTERN_C_END
+
+#define NAPI_MODULE_INITIALIZER_X(base, version)                               \
+  NAPI_MODULE_INITIALIZER_X_HELPER(base, version)
+#define NAPI_MODULE_INITIALIZER_X_HELPER(base, version) base##version
+
+#ifdef __wasm32__
+#define NAPI_WASM_INITIALIZER                                                  \
+  NAPI_MODULE_INITIALIZER_X(napi_register_wasm_v, NAPI_MODULE_VERSION)
+#define NAPI_MODULE(modname, regfunc)                                          \
+  EXTERN_C_START                                                               \
+  NAPI_MODULE_EXPORT napi_value NAPI_WASM_INITIALIZER(napi_env env,            \
+                                                      napi_value exports) {    \
+    return regfunc(env, exports);                                              \
+  }                                                                            \
+  EXTERN_C_END
+#else
+#define NAPI_MODULE(modname, regfunc)                                 \
+  NAPI_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
+#endif
+
+#define NAPI_MODULE_INITIALIZER_BASE napi_register_module_v
+
+#define NAPI_MODULE_INITIALIZER                                       \
+  NAPI_MODULE_INITIALIZER_X(NAPI_MODULE_INITIALIZER_BASE,             \
+      NAPI_MODULE_VERSION)
+
+#define NAPI_MODULE_INIT()                                            \
+  EXTERN_C_START                                                      \
+  NAPI_MODULE_EXPORT napi_value                                       \
+  NAPI_MODULE_INITIALIZER(napi_env env, napi_value exports);          \
+  EXTERN_C_END                                                        \
+  NAPI_MODULE(NODE_GYP_MODULE_NAME, NAPI_MODULE_INITIALIZER)          \
+  napi_value NAPI_MODULE_INITIALIZER(napi_env env,                    \
+                                     napi_value exports)
+
+EXTERN_C_START
+
+NAPI_EXTERN void napi_module_register(napi_module* mod);
+
+NAPI_EXTERN NAPI_NO_RETURN void napi_fatal_error(const char* location,
+                                                 size_t location_len,
+                                                 const char* message,
+                                                 size_t message_len);
+
+// Methods for custom handling of async operations
+NAPI_EXTERN napi_status napi_async_init(napi_env env,
+                                        napi_value async_resource,
+                                        napi_value async_resource_name,
+                                        napi_async_context* result);
+
+NAPI_EXTERN napi_status napi_async_destroy(napi_env env,
+                                           napi_async_context async_context);
+
+NAPI_EXTERN napi_status napi_make_callback(napi_env env,
+                                           napi_async_context async_context,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+
+// Methods to provide node::Buffer functionality with napi types
+NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
+                                           size_t length,
+                                           void** data,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
+                                                    size_t length,
+                                                    void* data,
+                                                    napi_finalize finalize_cb,
+                                                    void* finalize_hint,
+                                                    napi_value* result);
+NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
+                                                size_t length,
+                                                const void* data,
+                                                void** result_data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
+                                       napi_value value,
+                                       bool* result);
+NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
+                                             napi_value value,
+                                             void** data,
+                                             size_t* length);
+
+// Methods to manage simple async operations
+NAPI_EXTERN
+napi_status napi_create_async_work(napi_env env,
+                                   napi_value async_resource,
+                                   napi_value async_resource_name,
+                                   napi_async_execute_callback execute,
+                                   napi_async_complete_callback complete,
+                                   void* data,
+                                   napi_async_work* result);
+NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
+                                               napi_async_work work);
+NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
+                                              napi_async_work work);
+NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
+                                               napi_async_work work);
+
+// version management
+NAPI_EXTERN
+napi_status napi_get_node_version(napi_env env,
+                                  const napi_node_version** version);
+
+#if NAPI_VERSION >= 2
+
+// Return the current libuv event loop for a given environment
+NAPI_EXTERN napi_status napi_get_uv_event_loop(napi_env env,
+                                               struct uv_loop_s** loop);
+
+#endif  // NAPI_VERSION >= 2
+
+#if NAPI_VERSION >= 3
+
+NAPI_EXTERN napi_status napi_fatal_exception(napi_env env, napi_value err);
+
+NAPI_EXTERN napi_status napi_add_env_cleanup_hook(napi_env env,
+                                                  void (*fun)(void* arg),
+                                                  void* arg);
+
+NAPI_EXTERN napi_status napi_remove_env_cleanup_hook(napi_env env,
+                                                     void (*fun)(void* arg),
+                                                     void* arg);
+
+NAPI_EXTERN napi_status napi_open_callback_scope(napi_env env,
+                                                 napi_value resource_object,
+                                                 napi_async_context context,
+                                                 napi_callback_scope* result);
+
+NAPI_EXTERN napi_status napi_close_callback_scope(napi_env env,
+                                                  napi_callback_scope scope);
+
+#endif  // NAPI_VERSION >= 3
+
+#if NAPI_VERSION >= 4
+
+#ifndef __wasm32__
+// Calling into JS from other threads
+NAPI_EXTERN napi_status
+napi_create_threadsafe_function(napi_env env,
+                                napi_value func,
+                                napi_value async_resource,
+                                napi_value async_resource_name,
+                                size_t max_queue_size,
+                                size_t initial_thread_count,
+                                void* thread_finalize_data,
+                                napi_finalize thread_finalize_cb,
+                                void* context,
+                                napi_threadsafe_function_call_js call_js_cb,
+                                napi_threadsafe_function* result);
+
+NAPI_EXTERN napi_status
+napi_get_threadsafe_function_context(napi_threadsafe_function func,
+                                     void** result);
+
+NAPI_EXTERN napi_status
+napi_call_threadsafe_function(napi_threadsafe_function func,
+                              void* data,
+                              napi_threadsafe_function_call_mode is_blocking);
+
+NAPI_EXTERN napi_status
+napi_acquire_threadsafe_function(napi_threadsafe_function func);
+
+NAPI_EXTERN napi_status
+napi_release_threadsafe_function(napi_threadsafe_function func,
+                                 napi_threadsafe_function_release_mode mode);
+
+NAPI_EXTERN napi_status
+napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func);
+
+NAPI_EXTERN napi_status
+napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
+#endif  // __wasm32__
+
+#endif  // NAPI_VERSION >= 4
+
+#ifdef NAPI_EXPERIMENTAL
+
+NAPI_EXTERN napi_status napi_add_async_cleanup_hook(
+    napi_env env,
+    napi_async_cleanup_hook hook,
+    void* arg,
+    napi_async_cleanup_hook_handle* remove_handle);
+
+NAPI_EXTERN napi_status napi_remove_async_cleanup_hook(
+    napi_async_cleanup_hook_handle remove_handle);
+
+#endif  // NAPI_EXPERIMENTAL
+
+EXTERN_C_END
+
+#endif  // SRC_NODE_API_H_
diff --git a/lwnode/apps/sqlite3/deps/include/node_api_types.h b/lwnode/apps/sqlite3/deps/include/node_api_types.h
new file mode 100644 (file)
index 0000000..0e400e9
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef SRC_NODE_API_TYPES_H_
+#define SRC_NODE_API_TYPES_H_
+
+#include "js_native_api_types.h"
+
+typedef struct napi_callback_scope__* napi_callback_scope;
+typedef struct napi_async_context__* napi_async_context;
+typedef struct napi_async_work__* napi_async_work;
+#if NAPI_VERSION >= 4
+typedef struct napi_threadsafe_function__* napi_threadsafe_function;
+#endif  // NAPI_VERSION >= 4
+
+#if NAPI_VERSION >= 4
+typedef enum {
+  napi_tsfn_release,
+  napi_tsfn_abort
+} napi_threadsafe_function_release_mode;
+
+typedef enum {
+  napi_tsfn_nonblocking,
+  napi_tsfn_blocking
+} napi_threadsafe_function_call_mode;
+#endif  // NAPI_VERSION >= 4
+
+typedef void (*napi_async_execute_callback)(napi_env env,
+                                            void* data);
+typedef void (*napi_async_complete_callback)(napi_env env,
+                                             napi_status status,
+                                             void* data);
+#if NAPI_VERSION >= 4
+typedef void (*napi_threadsafe_function_call_js)(napi_env env,
+                                                 napi_value js_callback,
+                                                 void* context,
+                                                 void* data);
+#endif  // NAPI_VERSION >= 4
+
+typedef struct {
+  uint32_t major;
+  uint32_t minor;
+  uint32_t patch;
+  const char* release;
+} napi_node_version;
+
+#ifdef NAPI_EXPERIMENTAL
+typedef struct napi_async_cleanup_hook_handle__* napi_async_cleanup_hook_handle;
+typedef void (*napi_async_cleanup_hook)(napi_async_cleanup_hook_handle handle,
+                                        void* data);
+#endif  // NAPI_EXPERIMENTAL
+
+#endif  // SRC_NODE_API_TYPES_H_
diff --git a/lwnode/apps/sqlite3/deps/include/node_internals.h b/lwnode/apps/sqlite3/deps/include/node_internals.h
new file mode 100644 (file)
index 0000000..aa7180e
--- /dev/null
@@ -0,0 +1,403 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#ifndef SRC_NODE_INTERNALS_H_
+#define SRC_NODE_INTERNALS_H_
+
+#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
+
+#include "env.h"
+#include "node.h"
+#include "node_binding.h"
+#include "node_mutex.h"
+#include "tracing/trace_event.h"
+#include "util.h"
+#include "uv.h"
+#include "v8.h"
+
+#include <cstdint>
+#include <cstdlib>
+
+#include <string>
+#include <vector>
+
+// Custom constants used by both node_constants.cc and node_zlib.cc
+#define Z_MIN_WINDOWBITS 8
+#define Z_MAX_WINDOWBITS 15
+#define Z_DEFAULT_WINDOWBITS 15
+
+struct sockaddr;
+
+namespace node {
+
+namespace native_module {
+class NativeModuleLoader;
+}
+
+namespace per_process {
+extern Mutex env_var_mutex;
+extern uint64_t node_start_time;
+}  // namespace per_process
+
+// Forward declaration
+class Environment;
+
+// Convert a struct sockaddr to a { address: '1.2.3.4', port: 1234 } JS object.
+// Sets address and port properties on the info object and returns it.
+// If |info| is omitted, a new object is returned.
+v8::Local<v8::Object> AddressToJS(
+    Environment* env,
+    const sockaddr* addr,
+    v8::Local<v8::Object> info = v8::Local<v8::Object>());
+
+template <typename T, int (*F)(const typename T::HandleType*, sockaddr*, int*)>
+void GetSockOrPeerName(const v8::FunctionCallbackInfo<v8::Value>& args) {
+  T* wrap;
+  ASSIGN_OR_RETURN_UNWRAP(&wrap,
+                          args.Holder(),
+                          args.GetReturnValue().Set(UV_EBADF));
+  CHECK(args[0]->IsObject());
+  sockaddr_storage storage;
+  int addrlen = sizeof(storage);
+  sockaddr* const addr = reinterpret_cast<sockaddr*>(&storage);
+  const int err = F(&wrap->handle_, addr, &addrlen);
+  if (err == 0)
+    AddressToJS(wrap->env(), addr, args[0].As<v8::Object>());
+  args.GetReturnValue().Set(err);
+}
+
+void PrintStackTrace(v8::Isolate* isolate, v8::Local<v8::StackTrace> stack);
+void PrintCaughtException(v8::Isolate* isolate,
+                          v8::Local<v8::Context> context,
+                          const v8::TryCatch& try_catch);
+
+void ResetStdio();  // Safe to call more than once and from signal handlers.
+#ifdef __POSIX__
+void SignalExit(int signal, siginfo_t* info, void* ucontext);
+#endif
+
+std::string GetProcessTitle(const char* default_title);
+std::string GetHumanReadableProcessName();
+
+void InitializeContextRuntime(v8::Local<v8::Context>);
+bool InitializePrimordials(v8::Local<v8::Context> context);
+
+class NodeArrayBufferAllocator : public ArrayBufferAllocator {
+ public:
+  inline uint32_t* zero_fill_field() { return &zero_fill_field_; }
+
+  void* Allocate(size_t size) override;  // Defined in src/node.cc
+  void* AllocateUninitialized(size_t size) override;
+  void Free(void* data, size_t size) override;
+  void* Reallocate(void* data, size_t old_size, size_t size) override;
+  virtual void RegisterPointer(void* data, size_t size) {
+    total_mem_usage_.fetch_add(size, std::memory_order_relaxed);
+  }
+  virtual void UnregisterPointer(void* data, size_t size) {
+    total_mem_usage_.fetch_sub(size, std::memory_order_relaxed);
+  }
+
+  NodeArrayBufferAllocator* GetImpl() final { return this; }
+  inline uint64_t total_mem_usage() const {
+    return total_mem_usage_.load(std::memory_order_relaxed);
+  }
+
+ private:
+  uint32_t zero_fill_field_ = 1;  // Boolean but exposed as uint32 to JS land.
+  std::atomic<size_t> total_mem_usage_ {0};
+};
+
+class DebuggingArrayBufferAllocator final : public NodeArrayBufferAllocator {
+ public:
+  ~DebuggingArrayBufferAllocator() override;
+  void* Allocate(size_t size) override;
+  void* AllocateUninitialized(size_t size) override;
+  void Free(void* data, size_t size) override;
+  void* Reallocate(void* data, size_t old_size, size_t size) override;
+  void RegisterPointer(void* data, size_t size) override;
+  void UnregisterPointer(void* data, size_t size) override;
+
+ private:
+  void RegisterPointerInternal(void* data, size_t size);
+  void UnregisterPointerInternal(void* data, size_t size);
+  Mutex mutex_;
+  std::unordered_map<void*, size_t> allocations_;
+};
+
+namespace Buffer {
+v8::MaybeLocal<v8::Object> Copy(Environment* env, const char* data, size_t len);
+v8::MaybeLocal<v8::Object> New(Environment* env, size_t size);
+// Takes ownership of |data|.
+v8::MaybeLocal<v8::Object> New(Environment* env,
+                               char* data,
+                               size_t length,
+                               void (*callback)(char* data, void* hint),
+                               void* hint);
+// Takes ownership of |data|.  Must allocate |data| with the current Isolate's
+// ArrayBuffer::Allocator().
+v8::MaybeLocal<v8::Object> New(Environment* env,
+                               char* data,
+                               size_t length);
+// Creates a Buffer instance over an existing ArrayBuffer.
+v8::MaybeLocal<v8::Uint8Array> New(Environment* env,
+                                   v8::Local<v8::ArrayBuffer> ab,
+                                   size_t byte_offset,
+                                   size_t length);
+// Construct a Buffer from a MaybeStackBuffer (and also its subclasses like
+// Utf8Value and TwoByteValue).
+// If |buf| is invalidated, an empty MaybeLocal is returned, and nothing is
+// changed.
+// If |buf| contains actual data, this method takes ownership of |buf|'s
+// underlying buffer. However, |buf| itself can be reused even after this call,
+// but its capacity, if increased through AllocateSufficientStorage, is not
+// guaranteed to stay the same.
+template <typename T>
+static v8::MaybeLocal<v8::Object> New(Environment* env,
+                                      MaybeStackBuffer<T>* buf) {
+  v8::MaybeLocal<v8::Object> ret;
+  char* src = reinterpret_cast<char*>(buf->out());
+  const size_t len_in_bytes = buf->length() * sizeof(buf->out()[0]);
+
+  if (buf->IsAllocated())
+    ret = New(env, src, len_in_bytes);
+  else if (!buf->IsInvalidated())
+    ret = Copy(env, src, len_in_bytes);
+
+  if (ret.IsEmpty())
+    return ret;
+
+  if (buf->IsAllocated())
+    buf->Release();
+
+  return ret;
+}
+}  // namespace Buffer
+
+v8::MaybeLocal<v8::Value> InternalMakeCallback(
+    Environment* env,
+    v8::Local<v8::Object> resource,
+    v8::Local<v8::Object> recv,
+    const v8::Local<v8::Function> callback,
+    int argc,
+    v8::Local<v8::Value> argv[],
+    async_context asyncContext);
+
+class InternalCallbackScope {
+ public:
+  enum Flags {
+    kNoFlags = 0,
+    // Indicates whether 'before' and 'after' hooks should be skipped.
+    kSkipAsyncHooks = 1,
+    // Indicates whether nextTick and microtask queues should be skipped.
+    // This should only be used when there is no call into JS in this scope.
+    // (The HTTP parser also uses it for some weird backwards
+    // compatibility issues, but it shouldn't.)
+    kSkipTaskQueues = 2
+  };
+  InternalCallbackScope(Environment* env,
+                        v8::Local<v8::Object> object,
+                        const async_context& asyncContext,
+                        int flags = kNoFlags);
+  // Utility that can be used by AsyncWrap classes.
+  explicit InternalCallbackScope(AsyncWrap* async_wrap, int flags = 0);
+  ~InternalCallbackScope();
+  void Close();
+
+  inline bool Failed() const { return failed_; }
+  inline void MarkAsFailed() { failed_ = true; }
+
+ private:
+  Environment* env_;
+  async_context async_context_;
+  v8::Local<v8::Object> object_;
+  bool skip_hooks_;
+  bool skip_task_queues_;
+  bool failed_ = false;
+  bool pushed_ids_ = false;
+  bool closed_ = false;
+};
+
+class DebugSealHandleScope {
+ public:
+  explicit inline DebugSealHandleScope(v8::Isolate* isolate = nullptr)
+#ifdef DEBUG
+    : actual_scope_(isolate != nullptr ? isolate : v8::Isolate::GetCurrent())
+#endif
+  {}
+
+ private:
+#ifdef DEBUG
+  v8::SealHandleScope actual_scope_;
+#endif
+};
+
+class ThreadPoolWork {
+ public:
+  explicit inline ThreadPoolWork(Environment* env) : env_(env) {
+    CHECK_NOT_NULL(env);
+  }
+  inline virtual ~ThreadPoolWork() = default;
+
+  inline void ScheduleWork();
+  inline int CancelWork();
+
+  virtual void DoThreadPoolWork() = 0;
+  virtual void AfterThreadPoolWork(int status) = 0;
+
+  Environment* env() const { return env_; }
+
+ private:
+  Environment* env_;
+  uv_work_t work_req_;
+};
+
+#define TRACING_CATEGORY_NODE "node"
+#define TRACING_CATEGORY_NODE1(one)                                           \
+    TRACING_CATEGORY_NODE ","                                                 \
+    TRACING_CATEGORY_NODE "." #one
+#define TRACING_CATEGORY_NODE2(one, two)                                      \
+    TRACING_CATEGORY_NODE ","                                                 \
+    TRACING_CATEGORY_NODE "." #one ","                                        \
+    TRACING_CATEGORY_NODE "." #one "." #two
+
+// Functions defined in node.cc that are exposed via the bootstrapper object
+
+#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
+#define NODE_IMPLEMENTS_POSIX_CREDENTIALS 1
+#endif  // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
+
+namespace credentials {
+bool SafeGetenv(const char* key, std::string* text, Environment* env = nullptr);
+}  // namespace credentials
+
+void DefineZlibConstants(v8::Local<v8::Object> target);
+v8::Isolate* NewIsolate(v8::Isolate::CreateParams* params,
+                        uv_loop_t* event_loop,
+                        MultiIsolatePlatform* platform);
+// This overload automatically picks the right 'main_script_id' if no callback
+// was provided by the embedder.
+v8::MaybeLocal<v8::Value> StartExecution(Environment* env,
+                                         StartExecutionCallback cb = nullptr);
+v8::MaybeLocal<v8::Object> GetPerContextExports(v8::Local<v8::Context> context);
+v8::MaybeLocal<v8::Value> ExecuteBootstrapper(
+    Environment* env,
+    const char* id,
+    std::vector<v8::Local<v8::String>>* parameters,
+    std::vector<v8::Local<v8::Value>>* arguments);
+void MarkBootstrapComplete(const v8::FunctionCallbackInfo<v8::Value>& args);
+
+struct InitializationResult {
+  int exit_code = 0;
+  std::vector<std::string> args;
+  std::vector<std::string> exec_args;
+  bool early_return = false;
+};
+InitializationResult InitializeOncePerProcess(int argc, char** argv);
+void TearDownOncePerProcess();
+void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s);
+void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s);
+void SetIsolateCreateParamsForNode(v8::Isolate::CreateParams* params);
+
+#if HAVE_INSPECTOR
+namespace profiler {
+void StartProfilers(Environment* env);
+}
+#endif  // HAVE_INSPECTOR
+
+#ifdef __POSIX__
+static constexpr unsigned kMaxSignal = 32;
+#endif
+
+bool HasSignalJSHandler(int signum);
+
+#ifdef _WIN32
+typedef SYSTEMTIME TIME_TYPE;
+#else  // UNIX, OSX
+typedef struct tm TIME_TYPE;
+#endif
+
+double GetCurrentTimeInMicroseconds();
+int WriteFileSync(const char* path, uv_buf_t buf);
+int WriteFileSync(v8::Isolate* isolate,
+                  const char* path,
+                  v8::Local<v8::String> string);
+
+class DiagnosticFilename {
+ public:
+  static void LocalTime(TIME_TYPE* tm_struct);
+
+  inline DiagnosticFilename(Environment* env,
+                            const char* prefix,
+                            const char* ext);
+
+  inline DiagnosticFilename(uint64_t thread_id,
+                            const char* prefix,
+                            const char* ext);
+
+  inline const char* operator*() const;
+
+ private:
+  static std::string MakeFilename(
+      uint64_t thread_id,
+      const char* prefix,
+      const char* ext);
+
+  std::string filename_;
+};
+
+class TraceEventScope {
+ public:
+  TraceEventScope(const char* category,
+                  const char* name,
+                  void* id) : category_(category), name_(name), id_(id) {
+    TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(category_, name_, id_);
+  }
+  ~TraceEventScope() {
+    TRACE_EVENT_NESTABLE_ASYNC_END0(category_, name_, id_);
+  }
+
+ private:
+  const char* category_;
+  const char* name_;
+  void* id_;
+};
+
+namespace heap {
+
+void DeleteHeapSnapshot(const v8::HeapSnapshot* snapshot);
+using HeapSnapshotPointer =
+  DeleteFnPtr<const v8::HeapSnapshot, DeleteHeapSnapshot>;
+
+BaseObjectPtr<AsyncWrap> CreateHeapSnapshotStream(
+    Environment* env, HeapSnapshotPointer&& snapshot);
+}  // namespace heap
+
+namespace fs {
+std::string Basename(const std::string& str, const std::string& extension);
+}  // namespace fs
+
+node_module napi_module_to_node_module(const napi_module* mod);
+
+}  // namespace node
+
+#endif  // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
+
+#endif  // SRC_NODE_INTERNALS_H_
diff --git a/lwnode/apps/sqlite3/deps/include/util-inl.h b/lwnode/apps/sqlite3/deps/include/util-inl.h
new file mode 100644 (file)
index 0000000..30aad16
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef SRC_UTIL_INL_H_
+#define SRC_UTIL_INL_H_
+
+#include "util.h"
+#include "v8.h"
+
+namespace node {
+
+inline v8::Local<v8::String> OneByteString(v8::Isolate* isolate,
+                                           const char* data,
+                                           int length) {
+  return v8::String::NewFromOneByte(isolate,
+                                    reinterpret_cast<const uint8_t*>(data),
+                                    v8::NewStringType::kNormal,
+                                    length).ToLocalChecked();
+}
+
+inline v8::Local<v8::String> OneByteString(v8::Isolate* isolate,
+                                           const signed char* data,
+                                           int length) {
+  return v8::String::NewFromOneByte(isolate,
+                                    reinterpret_cast<const uint8_t*>(data),
+                                    v8::NewStringType::kNormal,
+                                    length).ToLocalChecked();
+}
+
+inline v8::Local<v8::String> OneByteString(v8::Isolate* isolate,
+                                           const unsigned char* data,
+                                           int length) {
+  return v8::String::NewFromOneByte(isolate,
+                                    reinterpret_cast<const uint8_t*>(data),
+                                    v8::NewStringType::kNormal,
+                                    length).ToLocalChecked();
+}
+
+}  // namespace node
+
+#endif  // SRC_UTIL_INL_H_
diff --git a/lwnode/apps/sqlite3/deps/include/util.h b/lwnode/apps/sqlite3/deps/include/util.h
new file mode 100644 (file)
index 0000000..6765bc1
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef SRC_UTIL_H_
+#define SRC_UTIL_H_
+
+#define FIXED_ONE_BYTE_STRING(isolate, string)                                \
+  (node::OneByteString((isolate), (string), sizeof(string) - 1))
+
+#endif  // SRC_UTIL_H_
diff --git a/lwnode/apps/sqlite3/deps/include/uv.h b/lwnode/apps/sqlite3/deps/include/uv.h
new file mode 100644 (file)
index 0000000..2557961
--- /dev/null
@@ -0,0 +1,1824 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/* See https://github.com/libuv/libuv#documentation for documentation. */
+
+#ifndef UV_H
+#define UV_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(BUILDING_UV_SHARED) && defined(USING_UV_SHARED)
+#error "Define either BUILDING_UV_SHARED or USING_UV_SHARED, not both."
+#endif
+
+#ifdef _WIN32
+  /* Windows - set up dll import/export decorators. */
+# if defined(BUILDING_UV_SHARED)
+    /* Building shared library. */
+#   define UV_EXTERN __declspec(dllexport)
+# elif defined(USING_UV_SHARED)
+    /* Using shared library. */
+#   define UV_EXTERN __declspec(dllimport)
+# else
+    /* Building static library. */
+#   define UV_EXTERN /* nothing */
+# endif
+#elif __GNUC__ >= 4
+# define UV_EXTERN __attribute__((visibility("default")))
+#else
+# define UV_EXTERN /* nothing */
+#endif
+
+#include "uv/errno.h"
+#include "uv/version.h"
+#include <stddef.h>
+#include <stdio.h>
+
+#if defined(_MSC_VER) && _MSC_VER < 1600
+# include "uv/stdint-msvc2008.h"
+#else
+# include <stdint.h>
+#endif
+
+#if defined(_WIN32)
+# include "uv/win.h"
+#else
+# include "uv/unix.h"
+#endif
+
+/* Expand this list if necessary. */
+#define UV_ERRNO_MAP(XX)                                                      \
+  XX(E2BIG, "argument list too long")                                         \
+  XX(EACCES, "permission denied")                                             \
+  XX(EADDRINUSE, "address already in use")                                    \
+  XX(EADDRNOTAVAIL, "address not available")                                  \
+  XX(EAFNOSUPPORT, "address family not supported")                            \
+  XX(EAGAIN, "resource temporarily unavailable")                              \
+  XX(EAI_ADDRFAMILY, "address family not supported")                          \
+  XX(EAI_AGAIN, "temporary failure")                                          \
+  XX(EAI_BADFLAGS, "bad ai_flags value")                                      \
+  XX(EAI_BADHINTS, "invalid value for hints")                                 \
+  XX(EAI_CANCELED, "request canceled")                                        \
+  XX(EAI_FAIL, "permanent failure")                                           \
+  XX(EAI_FAMILY, "ai_family not supported")                                   \
+  XX(EAI_MEMORY, "out of memory")                                             \
+  XX(EAI_NODATA, "no address")                                                \
+  XX(EAI_NONAME, "unknown node or service")                                   \
+  XX(EAI_OVERFLOW, "argument buffer overflow")                                \
+  XX(EAI_PROTOCOL, "resolved protocol is unknown")                            \
+  XX(EAI_SERVICE, "service not available for socket type")                    \
+  XX(EAI_SOCKTYPE, "socket type not supported")                               \
+  XX(EALREADY, "connection already in progress")                              \
+  XX(EBADF, "bad file descriptor")                                            \
+  XX(EBUSY, "resource busy or locked")                                        \
+  XX(ECANCELED, "operation canceled")                                         \
+  XX(ECHARSET, "invalid Unicode character")                                   \
+  XX(ECONNABORTED, "software caused connection abort")                        \
+  XX(ECONNREFUSED, "connection refused")                                      \
+  XX(ECONNRESET, "connection reset by peer")                                  \
+  XX(EDESTADDRREQ, "destination address required")                            \
+  XX(EEXIST, "file already exists")                                           \
+  XX(EFAULT, "bad address in system call argument")                           \
+  XX(EFBIG, "file too large")                                                 \
+  XX(EHOSTUNREACH, "host is unreachable")                                     \
+  XX(EINTR, "interrupted system call")                                        \
+  XX(EINVAL, "invalid argument")                                              \
+  XX(EIO, "i/o error")                                                        \
+  XX(EISCONN, "socket is already connected")                                  \
+  XX(EISDIR, "illegal operation on a directory")                              \
+  XX(ELOOP, "too many symbolic links encountered")                            \
+  XX(EMFILE, "too many open files")                                           \
+  XX(EMSGSIZE, "message too long")                                            \
+  XX(ENAMETOOLONG, "name too long")                                           \
+  XX(ENETDOWN, "network is down")                                             \
+  XX(ENETUNREACH, "network is unreachable")                                   \
+  XX(ENFILE, "file table overflow")                                           \
+  XX(ENOBUFS, "no buffer space available")                                    \
+  XX(ENODEV, "no such device")                                                \
+  XX(ENOENT, "no such file or directory")                                     \
+  XX(ENOMEM, "not enough memory")                                             \
+  XX(ENONET, "machine is not on the network")                                 \
+  XX(ENOPROTOOPT, "protocol not available")                                   \
+  XX(ENOSPC, "no space left on device")                                       \
+  XX(ENOSYS, "function not implemented")                                      \
+  XX(ENOTCONN, "socket is not connected")                                     \
+  XX(ENOTDIR, "not a directory")                                              \
+  XX(ENOTEMPTY, "directory not empty")                                        \
+  XX(ENOTSOCK, "socket operation on non-socket")                              \
+  XX(ENOTSUP, "operation not supported on socket")                            \
+  XX(EPERM, "operation not permitted")                                        \
+  XX(EPIPE, "broken pipe")                                                    \
+  XX(EPROTO, "protocol error")                                                \
+  XX(EPROTONOSUPPORT, "protocol not supported")                               \
+  XX(EPROTOTYPE, "protocol wrong type for socket")                            \
+  XX(ERANGE, "result too large")                                              \
+  XX(EROFS, "read-only file system")                                          \
+  XX(ESHUTDOWN, "cannot send after transport endpoint shutdown")              \
+  XX(ESPIPE, "invalid seek")                                                  \
+  XX(ESRCH, "no such process")                                                \
+  XX(ETIMEDOUT, "connection timed out")                                       \
+  XX(ETXTBSY, "text file is busy")                                            \
+  XX(EXDEV, "cross-device link not permitted")                                \
+  XX(UNKNOWN, "unknown error")                                                \
+  XX(EOF, "end of file")                                                      \
+  XX(ENXIO, "no such device or address")                                      \
+  XX(EMLINK, "too many links")                                                \
+  XX(EHOSTDOWN, "host is down")                                               \
+  XX(EREMOTEIO, "remote I/O error")                                           \
+  XX(ENOTTY, "inappropriate ioctl for device")                                \
+  XX(EFTYPE, "inappropriate file type or format")                             \
+  XX(EILSEQ, "illegal byte sequence")                                         \
+
+#define UV_HANDLE_TYPE_MAP(XX)                                                \
+  XX(ASYNC, async)                                                            \
+  XX(CHECK, check)                                                            \
+  XX(FS_EVENT, fs_event)                                                      \
+  XX(FS_POLL, fs_poll)                                                        \
+  XX(HANDLE, handle)                                                          \
+  XX(IDLE, idle)                                                              \
+  XX(NAMED_PIPE, pipe)                                                        \
+  XX(POLL, poll)                                                              \
+  XX(PREPARE, prepare)                                                        \
+  XX(PROCESS, process)                                                        \
+  XX(STREAM, stream)                                                          \
+  XX(TCP, tcp)                                                                \
+  XX(TIMER, timer)                                                            \
+  XX(TTY, tty)                                                                \
+  XX(UDP, udp)                                                                \
+  XX(SIGNAL, signal)                                                          \
+
+#define UV_REQ_TYPE_MAP(XX)                                                   \
+  XX(REQ, req)                                                                \
+  XX(CONNECT, connect)                                                        \
+  XX(WRITE, write)                                                            \
+  XX(SHUTDOWN, shutdown)                                                      \
+  XX(UDP_SEND, udp_send)                                                      \
+  XX(FS, fs)                                                                  \
+  XX(WORK, work)                                                              \
+  XX(GETADDRINFO, getaddrinfo)                                                \
+  XX(GETNAMEINFO, getnameinfo)                                                \
+  XX(RANDOM, random)                                                          \
+
+typedef enum {
+#define XX(code, _) UV_ ## code = UV__ ## code,
+  UV_ERRNO_MAP(XX)
+#undef XX
+  UV_ERRNO_MAX = UV__EOF - 1
+} uv_errno_t;
+
+typedef enum {
+  UV_UNKNOWN_HANDLE = 0,
+#define XX(uc, lc) UV_##uc,
+  UV_HANDLE_TYPE_MAP(XX)
+#undef XX
+  UV_FILE,
+  UV_HANDLE_TYPE_MAX
+} uv_handle_type;
+
+typedef enum {
+  UV_UNKNOWN_REQ = 0,
+#define XX(uc, lc) UV_##uc,
+  UV_REQ_TYPE_MAP(XX)
+#undef XX
+  UV_REQ_TYPE_PRIVATE
+  UV_REQ_TYPE_MAX
+} uv_req_type;
+
+
+/* Handle types. */
+typedef struct uv_loop_s uv_loop_t;
+typedef struct uv_handle_s uv_handle_t;
+typedef struct uv_dir_s uv_dir_t;
+typedef struct uv_stream_s uv_stream_t;
+typedef struct uv_tcp_s uv_tcp_t;
+typedef struct uv_udp_s uv_udp_t;
+typedef struct uv_pipe_s uv_pipe_t;
+typedef struct uv_tty_s uv_tty_t;
+typedef struct uv_poll_s uv_poll_t;
+typedef struct uv_timer_s uv_timer_t;
+typedef struct uv_prepare_s uv_prepare_t;
+typedef struct uv_check_s uv_check_t;
+typedef struct uv_idle_s uv_idle_t;
+typedef struct uv_async_s uv_async_t;
+typedef struct uv_process_s uv_process_t;
+typedef struct uv_fs_event_s uv_fs_event_t;
+typedef struct uv_fs_poll_s uv_fs_poll_t;
+typedef struct uv_signal_s uv_signal_t;
+
+/* Request types. */
+typedef struct uv_req_s uv_req_t;
+typedef struct uv_getaddrinfo_s uv_getaddrinfo_t;
+typedef struct uv_getnameinfo_s uv_getnameinfo_t;
+typedef struct uv_shutdown_s uv_shutdown_t;
+typedef struct uv_write_s uv_write_t;
+typedef struct uv_connect_s uv_connect_t;
+typedef struct uv_udp_send_s uv_udp_send_t;
+typedef struct uv_fs_s uv_fs_t;
+typedef struct uv_work_s uv_work_t;
+typedef struct uv_random_s uv_random_t;
+
+/* None of the above. */
+typedef struct uv_env_item_s uv_env_item_t;
+typedef struct uv_cpu_info_s uv_cpu_info_t;
+typedef struct uv_interface_address_s uv_interface_address_t;
+typedef struct uv_dirent_s uv_dirent_t;
+typedef struct uv_passwd_s uv_passwd_t;
+typedef struct uv_utsname_s uv_utsname_t;
+typedef struct uv_statfs_s uv_statfs_t;
+
+typedef enum {
+  UV_LOOP_BLOCK_SIGNAL = 0,
+  UV_METRICS_IDLE_TIME
+} uv_loop_option;
+
+typedef enum {
+  UV_RUN_DEFAULT = 0,
+  UV_RUN_ONCE,
+  UV_RUN_NOWAIT
+} uv_run_mode;
+
+
+UV_EXTERN unsigned int uv_version(void);
+UV_EXTERN const char* uv_version_string(void);
+
+typedef void* (*uv_malloc_func)(size_t size);
+typedef void* (*uv_realloc_func)(void* ptr, size_t size);
+typedef void* (*uv_calloc_func)(size_t count, size_t size);
+typedef void (*uv_free_func)(void* ptr);
+
+UV_EXTERN void uv_library_shutdown(void);
+
+UV_EXTERN int uv_replace_allocator(uv_malloc_func malloc_func,
+                                   uv_realloc_func realloc_func,
+                                   uv_calloc_func calloc_func,
+                                   uv_free_func free_func);
+
+UV_EXTERN uv_loop_t* uv_default_loop(void);
+UV_EXTERN int uv_loop_init(uv_loop_t* loop);
+UV_EXTERN int uv_loop_close(uv_loop_t* loop);
+/*
+ * NOTE:
+ *  This function is DEPRECATED (to be removed after 0.12), users should
+ *  allocate the loop manually and use uv_loop_init instead.
+ */
+UV_EXTERN uv_loop_t* uv_loop_new(void);
+/*
+ * NOTE:
+ *  This function is DEPRECATED (to be removed after 0.12). Users should use
+ *  uv_loop_close and free the memory manually instead.
+ */
+UV_EXTERN void uv_loop_delete(uv_loop_t*);
+UV_EXTERN size_t uv_loop_size(void);
+UV_EXTERN int uv_loop_alive(const uv_loop_t* loop);
+UV_EXTERN int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...);
+UV_EXTERN int uv_loop_fork(uv_loop_t* loop);
+
+UV_EXTERN int uv_run(uv_loop_t*, uv_run_mode mode);
+UV_EXTERN void uv_stop(uv_loop_t*);
+
+UV_EXTERN void uv_ref(uv_handle_t*);
+UV_EXTERN void uv_unref(uv_handle_t*);
+UV_EXTERN int uv_has_ref(const uv_handle_t*);
+
+UV_EXTERN void uv_update_time(uv_loop_t*);
+UV_EXTERN uint64_t uv_now(const uv_loop_t*);
+
+UV_EXTERN int uv_backend_fd(const uv_loop_t*);
+UV_EXTERN int uv_backend_timeout(const uv_loop_t*);
+
+typedef void (*uv_alloc_cb)(uv_handle_t* handle,
+                            size_t suggested_size,
+                            uv_buf_t* buf);
+typedef void (*uv_read_cb)(uv_stream_t* stream,
+                           ssize_t nread,
+                           const uv_buf_t* buf);
+typedef void (*uv_write_cb)(uv_write_t* req, int status);
+typedef void (*uv_connect_cb)(uv_connect_t* req, int status);
+typedef void (*uv_shutdown_cb)(uv_shutdown_t* req, int status);
+typedef void (*uv_connection_cb)(uv_stream_t* server, int status);
+typedef void (*uv_close_cb)(uv_handle_t* handle);
+typedef void (*uv_poll_cb)(uv_poll_t* handle, int status, int events);
+typedef void (*uv_timer_cb)(uv_timer_t* handle);
+typedef void (*uv_async_cb)(uv_async_t* handle);
+typedef void (*uv_prepare_cb)(uv_prepare_t* handle);
+typedef void (*uv_check_cb)(uv_check_t* handle);
+typedef void (*uv_idle_cb)(uv_idle_t* handle);
+typedef void (*uv_exit_cb)(uv_process_t*, int64_t exit_status, int term_signal);
+typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg);
+typedef void (*uv_fs_cb)(uv_fs_t* req);
+typedef void (*uv_work_cb)(uv_work_t* req);
+typedef void (*uv_after_work_cb)(uv_work_t* req, int status);
+typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req,
+                                  int status,
+                                  struct addrinfo* res);
+typedef void (*uv_getnameinfo_cb)(uv_getnameinfo_t* req,
+                                  int status,
+                                  const char* hostname,
+                                  const char* service);
+typedef void (*uv_random_cb)(uv_random_t* req,
+                             int status,
+                             void* buf,
+                             size_t buflen);
+
+typedef struct {
+  long tv_sec;
+  long tv_nsec;
+} uv_timespec_t;
+
+
+typedef struct {
+  uint64_t st_dev;
+  uint64_t st_mode;
+  uint64_t st_nlink;
+  uint64_t st_uid;
+  uint64_t st_gid;
+  uint64_t st_rdev;
+  uint64_t st_ino;
+  uint64_t st_size;
+  uint64_t st_blksize;
+  uint64_t st_blocks;
+  uint64_t st_flags;
+  uint64_t st_gen;
+  uv_timespec_t st_atim;
+  uv_timespec_t st_mtim;
+  uv_timespec_t st_ctim;
+  uv_timespec_t st_birthtim;
+} uv_stat_t;
+
+
+typedef void (*uv_fs_event_cb)(uv_fs_event_t* handle,
+                               const char* filename,
+                               int events,
+                               int status);
+
+typedef void (*uv_fs_poll_cb)(uv_fs_poll_t* handle,
+                              int status,
+                              const uv_stat_t* prev,
+                              const uv_stat_t* curr);
+
+typedef void (*uv_signal_cb)(uv_signal_t* handle, int signum);
+
+
+typedef enum {
+  UV_LEAVE_GROUP = 0,
+  UV_JOIN_GROUP
+} uv_membership;
+
+
+UV_EXTERN int uv_translate_sys_error(int sys_errno);
+
+UV_EXTERN const char* uv_strerror(int err);
+UV_EXTERN char* uv_strerror_r(int err, char* buf, size_t buflen);
+
+UV_EXTERN const char* uv_err_name(int err);
+UV_EXTERN char* uv_err_name_r(int err, char* buf, size_t buflen);
+
+
+#define UV_REQ_FIELDS                                                         \
+  /* public */                                                                \
+  void* data;                                                                 \
+  /* read-only */                                                             \
+  uv_req_type type;                                                           \
+  /* private */                                                               \
+  void* reserved[6];                                                          \
+  UV_REQ_PRIVATE_FIELDS                                                       \
+
+/* Abstract base class of all requests. */
+struct uv_req_s {
+  UV_REQ_FIELDS
+};
+
+
+/* Platform-specific request types. */
+UV_PRIVATE_REQ_TYPES
+
+
+UV_EXTERN int uv_shutdown(uv_shutdown_t* req,
+                          uv_stream_t* handle,
+                          uv_shutdown_cb cb);
+
+struct uv_shutdown_s {
+  UV_REQ_FIELDS
+  uv_stream_t* handle;
+  uv_shutdown_cb cb;
+  UV_SHUTDOWN_PRIVATE_FIELDS
+};
+
+
+#define UV_HANDLE_FIELDS                                                      \
+  /* public */                                                                \
+  void* data;                                                                 \
+  /* read-only */                                                             \
+  uv_loop_t* loop;                                                            \
+  uv_handle_type type;                                                        \
+  /* private */                                                               \
+  uv_close_cb close_cb;                                                       \
+  void* handle_queue[2];                                                      \
+  union {                                                                     \
+    int fd;                                                                   \
+    void* reserved[4];                                                        \
+  } u;                                                                        \
+  UV_HANDLE_PRIVATE_FIELDS                                                    \
+
+/* The abstract base class of all handles. */
+struct uv_handle_s {
+  UV_HANDLE_FIELDS
+};
+
+UV_EXTERN size_t uv_handle_size(uv_handle_type type);
+UV_EXTERN uv_handle_type uv_handle_get_type(const uv_handle_t* handle);
+UV_EXTERN const char* uv_handle_type_name(uv_handle_type type);
+UV_EXTERN void* uv_handle_get_data(const uv_handle_t* handle);
+UV_EXTERN uv_loop_t* uv_handle_get_loop(const uv_handle_t* handle);
+UV_EXTERN void uv_handle_set_data(uv_handle_t* handle, void* data);
+
+UV_EXTERN size_t uv_req_size(uv_req_type type);
+UV_EXTERN void* uv_req_get_data(const uv_req_t* req);
+UV_EXTERN void uv_req_set_data(uv_req_t* req, void* data);
+UV_EXTERN uv_req_type uv_req_get_type(const uv_req_t* req);
+UV_EXTERN const char* uv_req_type_name(uv_req_type type);
+
+UV_EXTERN int uv_is_active(const uv_handle_t* handle);
+
+UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg);
+
+/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */
+UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream);
+UV_EXTERN void uv_print_active_handles(uv_loop_t* loop, FILE* stream);
+
+UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb);
+
+UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value);
+UV_EXTERN int uv_recv_buffer_size(uv_handle_t* handle, int* value);
+
+UV_EXTERN int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd);
+
+UV_EXTERN uv_buf_t uv_buf_init(char* base, unsigned int len);
+
+
+#define UV_STREAM_FIELDS                                                      \
+  /* number of bytes queued for writing */                                    \
+  size_t write_queue_size;                                                    \
+  uv_alloc_cb alloc_cb;                                                       \
+  uv_read_cb read_cb;                                                         \
+  /* private */                                                               \
+  UV_STREAM_PRIVATE_FIELDS
+
+/*
+ * uv_stream_t is a subclass of uv_handle_t.
+ *
+ * uv_stream is an abstract class.
+ *
+ * uv_stream_t is the parent class of uv_tcp_t, uv_pipe_t and uv_tty_t.
+ */
+struct uv_stream_s {
+  UV_HANDLE_FIELDS
+  UV_STREAM_FIELDS
+};
+
+UV_EXTERN size_t uv_stream_get_write_queue_size(const uv_stream_t* stream);
+
+UV_EXTERN int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb);
+UV_EXTERN int uv_accept(uv_stream_t* server, uv_stream_t* client);
+
+UV_EXTERN int uv_read_start(uv_stream_t*,
+                            uv_alloc_cb alloc_cb,
+                            uv_read_cb read_cb);
+UV_EXTERN int uv_read_stop(uv_stream_t*);
+
+UV_EXTERN int uv_write(uv_write_t* req,
+                       uv_stream_t* handle,
+                       const uv_buf_t bufs[],
+                       unsigned int nbufs,
+                       uv_write_cb cb);
+UV_EXTERN int uv_write2(uv_write_t* req,
+                        uv_stream_t* handle,
+                        const uv_buf_t bufs[],
+                        unsigned int nbufs,
+                        uv_stream_t* send_handle,
+                        uv_write_cb cb);
+UV_EXTERN int uv_try_write(uv_stream_t* handle,
+                           const uv_buf_t bufs[],
+                           unsigned int nbufs);
+
+/* uv_write_t is a subclass of uv_req_t. */
+struct uv_write_s {
+  UV_REQ_FIELDS
+  uv_write_cb cb;
+  uv_stream_t* send_handle; /* TODO: make private and unix-only in v2.x. */
+  uv_stream_t* handle;
+  UV_WRITE_PRIVATE_FIELDS
+};
+
+
+UV_EXTERN int uv_is_readable(const uv_stream_t* handle);
+UV_EXTERN int uv_is_writable(const uv_stream_t* handle);
+
+UV_EXTERN int uv_stream_set_blocking(uv_stream_t* handle, int blocking);
+
+UV_EXTERN int uv_is_closing(const uv_handle_t* handle);
+
+
+/*
+ * uv_tcp_t is a subclass of uv_stream_t.
+ *
+ * Represents a TCP stream or TCP server.
+ */
+struct uv_tcp_s {
+  UV_HANDLE_FIELDS
+  UV_STREAM_FIELDS
+  UV_TCP_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_tcp_init(uv_loop_t*, uv_tcp_t* handle);
+UV_EXTERN int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, unsigned int flags);
+UV_EXTERN int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock);
+UV_EXTERN int uv_tcp_nodelay(uv_tcp_t* handle, int enable);
+UV_EXTERN int uv_tcp_keepalive(uv_tcp_t* handle,
+                               int enable,
+                               unsigned int delay);
+UV_EXTERN int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable);
+
+enum uv_tcp_flags {
+  /* Used with uv_tcp_bind, when an IPv6 address is used. */
+  UV_TCP_IPV6ONLY = 1
+};
+
+UV_EXTERN int uv_tcp_bind(uv_tcp_t* handle,
+                          const struct sockaddr* addr,
+                          unsigned int flags);
+UV_EXTERN int uv_tcp_getsockname(const uv_tcp_t* handle,
+                                 struct sockaddr* name,
+                                 int* namelen);
+UV_EXTERN int uv_tcp_getpeername(const uv_tcp_t* handle,
+                                 struct sockaddr* name,
+                                 int* namelen);
+UV_EXTERN int uv_tcp_close_reset(uv_tcp_t* handle, uv_close_cb close_cb);
+UV_EXTERN int uv_tcp_connect(uv_connect_t* req,
+                             uv_tcp_t* handle,
+                             const struct sockaddr* addr,
+                             uv_connect_cb cb);
+
+/* uv_connect_t is a subclass of uv_req_t. */
+struct uv_connect_s {
+  UV_REQ_FIELDS
+  uv_connect_cb cb;
+  uv_stream_t* handle;
+  UV_CONNECT_PRIVATE_FIELDS
+};
+
+
+/*
+ * UDP support.
+ */
+
+enum uv_udp_flags {
+  /* Disables dual stack mode. */
+  UV_UDP_IPV6ONLY = 1,
+  /*
+   * Indicates message was truncated because read buffer was too small. The
+   * remainder was discarded by the OS. Used in uv_udp_recv_cb.
+   */
+  UV_UDP_PARTIAL = 2,
+  /*
+   * Indicates if SO_REUSEADDR will be set when binding the handle.
+   * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other
+   * Unix platforms, it sets the SO_REUSEADDR flag.  What that means is that
+   * multiple threads or processes can bind to the same address without error
+   * (provided they all set the flag) but only the last one to bind will receive
+   * any traffic, in effect "stealing" the port from the previous listener.
+   */
+  UV_UDP_REUSEADDR = 4,
+  /*
+   * Indicates that the message was received by recvmmsg, so the buffer provided
+   * must not be freed by the recv_cb callback.
+   */
+  UV_UDP_MMSG_CHUNK = 8,
+  /*
+   * Indicates that the buffer provided has been fully utilized by recvmmsg and
+   * that it should now be freed by the recv_cb callback. When this flag is set
+   * in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL.
+   */
+  UV_UDP_MMSG_FREE = 16,
+
+  /*
+   * Indicates that recvmmsg should be used, if available.
+   */
+  UV_UDP_RECVMMSG = 256
+};
+
+typedef void (*uv_udp_send_cb)(uv_udp_send_t* req, int status);
+typedef void (*uv_udp_recv_cb)(uv_udp_t* handle,
+                               ssize_t nread,
+                               const uv_buf_t* buf,
+                               const struct sockaddr* addr,
+                               unsigned flags);
+
+/* uv_udp_t is a subclass of uv_handle_t. */
+struct uv_udp_s {
+  UV_HANDLE_FIELDS
+  /* read-only */
+  /*
+   * Number of bytes queued for sending. This field strictly shows how much
+   * information is currently queued.
+   */
+  size_t send_queue_size;
+  /*
+   * Number of send requests currently in the queue awaiting to be processed.
+   */
+  size_t send_queue_count;
+  UV_UDP_PRIVATE_FIELDS
+};
+
+/* uv_udp_send_t is a subclass of uv_req_t. */
+struct uv_udp_send_s {
+  UV_REQ_FIELDS
+  uv_udp_t* handle;
+  uv_udp_send_cb cb;
+  UV_UDP_SEND_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_udp_init(uv_loop_t*, uv_udp_t* handle);
+UV_EXTERN int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, unsigned int flags);
+UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock);
+UV_EXTERN int uv_udp_bind(uv_udp_t* handle,
+                          const struct sockaddr* addr,
+                          unsigned int flags);
+UV_EXTERN int uv_udp_connect(uv_udp_t* handle, const struct sockaddr* addr);
+
+UV_EXTERN int uv_udp_getpeername(const uv_udp_t* handle,
+                                 struct sockaddr* name,
+                                 int* namelen);
+UV_EXTERN int uv_udp_getsockname(const uv_udp_t* handle,
+                                 struct sockaddr* name,
+                                 int* namelen);
+UV_EXTERN int uv_udp_set_membership(uv_udp_t* handle,
+                                    const char* multicast_addr,
+                                    const char* interface_addr,
+                                    uv_membership membership);
+UV_EXTERN int uv_udp_set_source_membership(uv_udp_t* handle,
+                                           const char* multicast_addr,
+                                           const char* interface_addr,
+                                           const char* source_addr,
+                                           uv_membership membership);
+UV_EXTERN int uv_udp_set_multicast_loop(uv_udp_t* handle, int on);
+UV_EXTERN int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl);
+UV_EXTERN int uv_udp_set_multicast_interface(uv_udp_t* handle,
+                                             const char* interface_addr);
+UV_EXTERN int uv_udp_set_broadcast(uv_udp_t* handle, int on);
+UV_EXTERN int uv_udp_set_ttl(uv_udp_t* handle, int ttl);
+UV_EXTERN int uv_udp_send(uv_udp_send_t* req,
+                          uv_udp_t* handle,
+                          const uv_buf_t bufs[],
+                          unsigned int nbufs,
+                          const struct sockaddr* addr,
+                          uv_udp_send_cb send_cb);
+UV_EXTERN int uv_udp_try_send(uv_udp_t* handle,
+                              const uv_buf_t bufs[],
+                              unsigned int nbufs,
+                              const struct sockaddr* addr);
+UV_EXTERN int uv_udp_recv_start(uv_udp_t* handle,
+                                uv_alloc_cb alloc_cb,
+                                uv_udp_recv_cb recv_cb);
+UV_EXTERN int uv_udp_using_recvmmsg(const uv_udp_t* handle);
+UV_EXTERN int uv_udp_recv_stop(uv_udp_t* handle);
+UV_EXTERN size_t uv_udp_get_send_queue_size(const uv_udp_t* handle);
+UV_EXTERN size_t uv_udp_get_send_queue_count(const uv_udp_t* handle);
+
+
+/*
+ * uv_tty_t is a subclass of uv_stream_t.
+ *
+ * Representing a stream for the console.
+ */
+struct uv_tty_s {
+  UV_HANDLE_FIELDS
+  UV_STREAM_FIELDS
+  UV_TTY_PRIVATE_FIELDS
+};
+
+typedef enum {
+  /* Initial/normal terminal mode */
+  UV_TTY_MODE_NORMAL,
+  /* Raw input mode (On Windows, ENABLE_WINDOW_INPUT is also enabled) */
+  UV_TTY_MODE_RAW,
+  /* Binary-safe I/O mode for IPC (Unix-only) */
+  UV_TTY_MODE_IO
+} uv_tty_mode_t;
+
+typedef enum {
+  /*
+   * The console supports handling of virtual terminal sequences
+   * (Windows10 new console, ConEmu)
+   */
+  UV_TTY_SUPPORTED,
+  /* The console cannot process the virtual terminal sequence.  (Legacy
+   * console)
+   */
+  UV_TTY_UNSUPPORTED
+} uv_tty_vtermstate_t;
+
+
+UV_EXTERN int uv_tty_init(uv_loop_t*, uv_tty_t*, uv_file fd, int readable);
+UV_EXTERN int uv_tty_set_mode(uv_tty_t*, uv_tty_mode_t mode);
+UV_EXTERN int uv_tty_reset_mode(void);
+UV_EXTERN int uv_tty_get_winsize(uv_tty_t*, int* width, int* height);
+UV_EXTERN void uv_tty_set_vterm_state(uv_tty_vtermstate_t state);
+UV_EXTERN int uv_tty_get_vterm_state(uv_tty_vtermstate_t* state);
+
+#ifdef __cplusplus
+extern "C++" {
+
+inline int uv_tty_set_mode(uv_tty_t* handle, int mode) {
+  return uv_tty_set_mode(handle, static_cast<uv_tty_mode_t>(mode));
+}
+
+}
+#endif
+
+UV_EXTERN uv_handle_type uv_guess_handle(uv_file file);
+
+/*
+ * uv_pipe_t is a subclass of uv_stream_t.
+ *
+ * Representing a pipe stream or pipe server. On Windows this is a Named
+ * Pipe. On Unix this is a Unix domain socket.
+ */
+struct uv_pipe_s {
+  UV_HANDLE_FIELDS
+  UV_STREAM_FIELDS
+  int ipc; /* non-zero if this pipe is used for passing handles */
+  UV_PIPE_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_pipe_init(uv_loop_t*, uv_pipe_t* handle, int ipc);
+UV_EXTERN int uv_pipe_open(uv_pipe_t*, uv_file file);
+UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name);
+UV_EXTERN void uv_pipe_connect(uv_connect_t* req,
+                               uv_pipe_t* handle,
+                               const char* name,
+                               uv_connect_cb cb);
+UV_EXTERN int uv_pipe_getsockname(const uv_pipe_t* handle,
+                                  char* buffer,
+                                  size_t* size);
+UV_EXTERN int uv_pipe_getpeername(const uv_pipe_t* handle,
+                                  char* buffer,
+                                  size_t* size);
+UV_EXTERN void uv_pipe_pending_instances(uv_pipe_t* handle, int count);
+UV_EXTERN int uv_pipe_pending_count(uv_pipe_t* handle);
+UV_EXTERN uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle);
+UV_EXTERN int uv_pipe_chmod(uv_pipe_t* handle, int flags);
+
+
+struct uv_poll_s {
+  UV_HANDLE_FIELDS
+  uv_poll_cb poll_cb;
+  UV_POLL_PRIVATE_FIELDS
+};
+
+enum uv_poll_event {
+  UV_READABLE = 1,
+  UV_WRITABLE = 2,
+  UV_DISCONNECT = 4,
+  UV_PRIORITIZED = 8
+};
+
+UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd);
+UV_EXTERN int uv_poll_init_socket(uv_loop_t* loop,
+                                  uv_poll_t* handle,
+                                  uv_os_sock_t socket);
+UV_EXTERN int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb);
+UV_EXTERN int uv_poll_stop(uv_poll_t* handle);
+
+
+struct uv_prepare_s {
+  UV_HANDLE_FIELDS
+  UV_PREPARE_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_prepare_init(uv_loop_t*, uv_prepare_t* prepare);
+UV_EXTERN int uv_prepare_start(uv_prepare_t* prepare, uv_prepare_cb cb);
+UV_EXTERN int uv_prepare_stop(uv_prepare_t* prepare);
+
+
+struct uv_check_s {
+  UV_HANDLE_FIELDS
+  UV_CHECK_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_check_init(uv_loop_t*, uv_check_t* check);
+UV_EXTERN int uv_check_start(uv_check_t* check, uv_check_cb cb);
+UV_EXTERN int uv_check_stop(uv_check_t* check);
+
+
+struct uv_idle_s {
+  UV_HANDLE_FIELDS
+  UV_IDLE_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_idle_init(uv_loop_t*, uv_idle_t* idle);
+UV_EXTERN int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb);
+UV_EXTERN int uv_idle_stop(uv_idle_t* idle);
+
+
+struct uv_async_s {
+  UV_HANDLE_FIELDS
+  UV_ASYNC_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_async_init(uv_loop_t*,
+                            uv_async_t* async,
+                            uv_async_cb async_cb);
+UV_EXTERN int uv_async_send(uv_async_t* async);
+
+
+/*
+ * uv_timer_t is a subclass of uv_handle_t.
+ *
+ * Used to get woken up at a specified time in the future.
+ */
+struct uv_timer_s {
+  UV_HANDLE_FIELDS
+  UV_TIMER_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* handle);
+UV_EXTERN int uv_timer_start(uv_timer_t* handle,
+                             uv_timer_cb cb,
+                             uint64_t timeout,
+                             uint64_t repeat);
+UV_EXTERN int uv_timer_stop(uv_timer_t* handle);
+UV_EXTERN int uv_timer_again(uv_timer_t* handle);
+UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat);
+UV_EXTERN uint64_t uv_timer_get_repeat(const uv_timer_t* handle);
+UV_EXTERN uint64_t uv_timer_get_due_in(const uv_timer_t* handle);
+
+
+/*
+ * uv_getaddrinfo_t is a subclass of uv_req_t.
+ *
+ * Request object for uv_getaddrinfo.
+ */
+struct uv_getaddrinfo_s {
+  UV_REQ_FIELDS
+  /* read-only */
+  uv_loop_t* loop;
+  /* struct addrinfo* addrinfo is marked as private, but it really isn't. */
+  UV_GETADDRINFO_PRIVATE_FIELDS
+};
+
+
+UV_EXTERN int uv_getaddrinfo(uv_loop_t* loop,
+                             uv_getaddrinfo_t* req,
+                             uv_getaddrinfo_cb getaddrinfo_cb,
+                             const char* node,
+                             const char* service,
+                             const struct addrinfo* hints);
+UV_EXTERN void uv_freeaddrinfo(struct addrinfo* ai);
+
+
+/*
+* uv_getnameinfo_t is a subclass of uv_req_t.
+*
+* Request object for uv_getnameinfo.
+*/
+struct uv_getnameinfo_s {
+  UV_REQ_FIELDS
+  /* read-only */
+  uv_loop_t* loop;
+  /* host and service are marked as private, but they really aren't. */
+  UV_GETNAMEINFO_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_getnameinfo(uv_loop_t* loop,
+                             uv_getnameinfo_t* req,
+                             uv_getnameinfo_cb getnameinfo_cb,
+                             const struct sockaddr* addr,
+                             int flags);
+
+
+/* uv_spawn() options. */
+typedef enum {
+  UV_IGNORE         = 0x00,
+  UV_CREATE_PIPE    = 0x01,
+  UV_INHERIT_FD     = 0x02,
+  UV_INHERIT_STREAM = 0x04,
+
+  /*
+   * When UV_CREATE_PIPE is specified, UV_READABLE_PIPE and UV_WRITABLE_PIPE
+   * determine the direction of flow, from the child process' perspective. Both
+   * flags may be specified to create a duplex data stream.
+   */
+  UV_READABLE_PIPE  = 0x10,
+  UV_WRITABLE_PIPE  = 0x20,
+
+  /*
+   * Open the child pipe handle in overlapped mode on Windows.
+   * On Unix it is silently ignored.
+   */
+  UV_OVERLAPPED_PIPE = 0x40
+} uv_stdio_flags;
+
+typedef struct uv_stdio_container_s {
+  uv_stdio_flags flags;
+
+  union {
+    uv_stream_t* stream;
+    int fd;
+  } data;
+} uv_stdio_container_t;
+
+typedef struct uv_process_options_s {
+  uv_exit_cb exit_cb; /* Called after the process exits. */
+  const char* file;   /* Path to program to execute. */
+  /*
+   * Command line arguments. args[0] should be the path to the program. On
+   * Windows this uses CreateProcess which concatenates the arguments into a
+   * string this can cause some strange errors. See the note at
+   * windows_verbatim_arguments.
+   */
+  char** args;
+  /*
+   * This will be set as the environ variable in the subprocess. If this is
+   * NULL then the parents environ will be used.
+   */
+  char** env;
+  /*
+   * If non-null this represents a directory the subprocess should execute
+   * in. Stands for current working directory.
+   */
+  const char* cwd;
+  /*
+   * Various flags that control how uv_spawn() behaves. See the definition of
+   * `enum uv_process_flags` below.
+   */
+  unsigned int flags;
+  /*
+   * The `stdio` field points to an array of uv_stdio_container_t structs that
+   * describe the file descriptors that will be made available to the child
+   * process. The convention is that stdio[0] points to stdin, fd 1 is used for
+   * stdout, and fd 2 is stderr.
+   *
+   * Note that on windows file descriptors greater than 2 are available to the
+   * child process only if the child processes uses the MSVCRT runtime.
+   */
+  int stdio_count;
+  uv_stdio_container_t* stdio;
+  /*
+   * Libuv can change the child process' user/group id. This happens only when
+   * the appropriate bits are set in the flags fields. This is not supported on
+   * windows; uv_spawn() will fail and set the error to UV_ENOTSUP.
+   */
+  uv_uid_t uid;
+  uv_gid_t gid;
+} uv_process_options_t;
+
+/*
+ * These are the flags that can be used for the uv_process_options.flags field.
+ */
+enum uv_process_flags {
+  /*
+   * Set the child process' user id. The user id is supplied in the `uid` field
+   * of the options struct. This does not work on windows; setting this flag
+   * will cause uv_spawn() to fail.
+   */
+  UV_PROCESS_SETUID = (1 << 0),
+  /*
+   * Set the child process' group id. The user id is supplied in the `gid`
+   * field of the options struct. This does not work on windows; setting this
+   * flag will cause uv_spawn() to fail.
+   */
+  UV_PROCESS_SETGID = (1 << 1),
+  /*
+   * Do not wrap any arguments in quotes, or perform any other escaping, when
+   * converting the argument list into a command line string. This option is
+   * only meaningful on Windows systems. On Unix it is silently ignored.
+   */
+  UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = (1 << 2),
+  /*
+   * Spawn the child process in a detached state - this will make it a process
+   * group leader, and will effectively enable the child to keep running after
+   * the parent exits.  Note that the child process will still keep the
+   * parent's event loop alive unless the parent process calls uv_unref() on
+   * the child's process handle.
+   */
+  UV_PROCESS_DETACHED = (1 << 3),
+  /*
+   * Hide the subprocess window that would normally be created. This option is
+   * only meaningful on Windows systems. On Unix it is silently ignored.
+   */
+  UV_PROCESS_WINDOWS_HIDE = (1 << 4),
+  /*
+   * Hide the subprocess console window that would normally be created. This
+   * option is only meaningful on Windows systems. On Unix it is silently
+   * ignored.
+   */
+  UV_PROCESS_WINDOWS_HIDE_CONSOLE = (1 << 5),
+  /*
+   * Hide the subprocess GUI window that would normally be created. This
+   * option is only meaningful on Windows systems. On Unix it is silently
+   * ignored.
+   */
+  UV_PROCESS_WINDOWS_HIDE_GUI = (1 << 6)
+};
+
+/*
+ * uv_process_t is a subclass of uv_handle_t.
+ */
+struct uv_process_s {
+  UV_HANDLE_FIELDS
+  uv_exit_cb exit_cb;
+  int pid;
+  UV_PROCESS_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_spawn(uv_loop_t* loop,
+                       uv_process_t* handle,
+                       const uv_process_options_t* options);
+UV_EXTERN int uv_process_kill(uv_process_t*, int signum);
+UV_EXTERN int uv_kill(int pid, int signum);
+UV_EXTERN uv_pid_t uv_process_get_pid(const uv_process_t*);
+
+
+/*
+ * uv_work_t is a subclass of uv_req_t.
+ */
+struct uv_work_s {
+  UV_REQ_FIELDS
+  uv_loop_t* loop;
+  uv_work_cb work_cb;
+  uv_after_work_cb after_work_cb;
+  UV_WORK_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_queue_work(uv_loop_t* loop,
+                            uv_work_t* req,
+                            uv_work_cb work_cb,
+                            uv_after_work_cb after_work_cb);
+
+UV_EXTERN int uv_cancel(uv_req_t* req);
+
+
+struct uv_cpu_times_s {
+  uint64_t user; /* milliseconds */
+  uint64_t nice; /* milliseconds */
+  uint64_t sys; /* milliseconds */
+  uint64_t idle; /* milliseconds */
+  uint64_t irq; /* milliseconds */
+};
+
+struct uv_cpu_info_s {
+  char* model;
+  int speed;
+  struct uv_cpu_times_s cpu_times;
+};
+
+struct uv_interface_address_s {
+  char* name;
+  char phys_addr[6];
+  int is_internal;
+  union {
+    struct sockaddr_in address4;
+    struct sockaddr_in6 address6;
+  } address;
+  union {
+    struct sockaddr_in netmask4;
+    struct sockaddr_in6 netmask6;
+  } netmask;
+};
+
+struct uv_passwd_s {
+  char* username;
+  long uid;
+  long gid;
+  char* shell;
+  char* homedir;
+};
+
+struct uv_utsname_s {
+  char sysname[256];
+  char release[256];
+  char version[256];
+  char machine[256];
+  /* This struct does not contain the nodename and domainname fields present in
+     the utsname type. domainname is a GNU extension. Both fields are referred
+     to as meaningless in the docs. */
+};
+
+struct uv_statfs_s {
+  uint64_t f_type;
+  uint64_t f_bsize;
+  uint64_t f_blocks;
+  uint64_t f_bfree;
+  uint64_t f_bavail;
+  uint64_t f_files;
+  uint64_t f_ffree;
+  uint64_t f_spare[4];
+};
+
+typedef enum {
+  UV_DIRENT_UNKNOWN,
+  UV_DIRENT_FILE,
+  UV_DIRENT_DIR,
+  UV_DIRENT_LINK,
+  UV_DIRENT_FIFO,
+  UV_DIRENT_SOCKET,
+  UV_DIRENT_CHAR,
+  UV_DIRENT_BLOCK
+} uv_dirent_type_t;
+
+struct uv_dirent_s {
+  const char* name;
+  uv_dirent_type_t type;
+};
+
+UV_EXTERN char** uv_setup_args(int argc, char** argv);
+UV_EXTERN int uv_get_process_title(char* buffer, size_t size);
+UV_EXTERN int uv_set_process_title(const char* title);
+UV_EXTERN int uv_resident_set_memory(size_t* rss);
+UV_EXTERN int uv_uptime(double* uptime);
+UV_EXTERN uv_os_fd_t uv_get_osfhandle(int fd);
+UV_EXTERN int uv_open_osfhandle(uv_os_fd_t os_fd);
+
+typedef struct {
+  long tv_sec;
+  long tv_usec;
+} uv_timeval_t;
+
+typedef struct {
+  int64_t tv_sec;
+  int32_t tv_usec;
+} uv_timeval64_t;
+
+typedef struct {
+   uv_timeval_t ru_utime; /* user CPU time used */
+   uv_timeval_t ru_stime; /* system CPU time used */
+   uint64_t ru_maxrss;    /* maximum resident set size */
+   uint64_t ru_ixrss;     /* integral shared memory size */
+   uint64_t ru_idrss;     /* integral unshared data size */
+   uint64_t ru_isrss;     /* integral unshared stack size */
+   uint64_t ru_minflt;    /* page reclaims (soft page faults) */
+   uint64_t ru_majflt;    /* page faults (hard page faults) */
+   uint64_t ru_nswap;     /* swaps */
+   uint64_t ru_inblock;   /* block input operations */
+   uint64_t ru_oublock;   /* block output operations */
+   uint64_t ru_msgsnd;    /* IPC messages sent */
+   uint64_t ru_msgrcv;    /* IPC messages received */
+   uint64_t ru_nsignals;  /* signals received */
+   uint64_t ru_nvcsw;     /* voluntary context switches */
+   uint64_t ru_nivcsw;    /* involuntary context switches */
+} uv_rusage_t;
+
+UV_EXTERN int uv_getrusage(uv_rusage_t* rusage);
+
+UV_EXTERN int uv_os_homedir(char* buffer, size_t* size);
+UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size);
+UV_EXTERN int uv_os_get_passwd(uv_passwd_t* pwd);
+UV_EXTERN void uv_os_free_passwd(uv_passwd_t* pwd);
+UV_EXTERN uv_pid_t uv_os_getpid(void);
+UV_EXTERN uv_pid_t uv_os_getppid(void);
+
+#if defined(__PASE__)
+/* On IBM i PASE, the highest process priority is -10 */
+# define UV_PRIORITY_LOW 39          /* RUNPTY(99) */
+# define UV_PRIORITY_BELOW_NORMAL 15 /* RUNPTY(50) */
+# define UV_PRIORITY_NORMAL 0        /* RUNPTY(20) */
+# define UV_PRIORITY_ABOVE_NORMAL -4 /* RUNTY(12) */
+# define UV_PRIORITY_HIGH -7         /* RUNPTY(6) */
+# define UV_PRIORITY_HIGHEST -10     /* RUNPTY(1) */
+#else
+# define UV_PRIORITY_LOW 19
+# define UV_PRIORITY_BELOW_NORMAL 10
+# define UV_PRIORITY_NORMAL 0
+# define UV_PRIORITY_ABOVE_NORMAL -7
+# define UV_PRIORITY_HIGH -14
+# define UV_PRIORITY_HIGHEST -20
+#endif
+
+UV_EXTERN int uv_os_getpriority(uv_pid_t pid, int* priority);
+UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority);
+
+UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
+UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);
+
+UV_EXTERN int uv_interface_addresses(uv_interface_address_t** addresses,
+                                     int* count);
+UV_EXTERN void uv_free_interface_addresses(uv_interface_address_t* addresses,
+                                           int count);
+
+struct uv_env_item_s {
+  char* name;
+  char* value;
+};
+
+UV_EXTERN int uv_os_environ(uv_env_item_t** envitems, int* count);
+UV_EXTERN void uv_os_free_environ(uv_env_item_t* envitems, int count);
+UV_EXTERN int uv_os_getenv(const char* name, char* buffer, size_t* size);
+UV_EXTERN int uv_os_setenv(const char* name, const char* value);
+UV_EXTERN int uv_os_unsetenv(const char* name);
+
+#ifdef MAXHOSTNAMELEN
+# define UV_MAXHOSTNAMESIZE (MAXHOSTNAMELEN + 1)
+#else
+  /*
+    Fallback for the maximum hostname size, including the null terminator. The
+    Windows gethostname() documentation states that 256 bytes will always be
+    large enough to hold the null-terminated hostname.
+  */
+# define UV_MAXHOSTNAMESIZE 256
+#endif
+
+UV_EXTERN int uv_os_gethostname(char* buffer, size_t* size);
+
+UV_EXTERN int uv_os_uname(uv_utsname_t* buffer);
+
+UV_EXTERN uint64_t uv_metrics_idle_time(uv_loop_t* loop);
+
+typedef enum {
+  UV_FS_UNKNOWN = -1,
+  UV_FS_CUSTOM,
+  UV_FS_OPEN,
+  UV_FS_CLOSE,
+  UV_FS_READ,
+  UV_FS_WRITE,
+  UV_FS_SENDFILE,
+  UV_FS_STAT,
+  UV_FS_LSTAT,
+  UV_FS_FSTAT,
+  UV_FS_FTRUNCATE,
+  UV_FS_UTIME,
+  UV_FS_FUTIME,
+  UV_FS_ACCESS,
+  UV_FS_CHMOD,
+  UV_FS_FCHMOD,
+  UV_FS_FSYNC,
+  UV_FS_FDATASYNC,
+  UV_FS_UNLINK,
+  UV_FS_RMDIR,
+  UV_FS_MKDIR,
+  UV_FS_MKDTEMP,
+  UV_FS_RENAME,
+  UV_FS_SCANDIR,
+  UV_FS_LINK,
+  UV_FS_SYMLINK,
+  UV_FS_READLINK,
+  UV_FS_CHOWN,
+  UV_FS_FCHOWN,
+  UV_FS_REALPATH,
+  UV_FS_COPYFILE,
+  UV_FS_LCHOWN,
+  UV_FS_OPENDIR,
+  UV_FS_READDIR,
+  UV_FS_CLOSEDIR,
+  UV_FS_STATFS,
+  UV_FS_MKSTEMP,
+  UV_FS_LUTIME
+} uv_fs_type;
+
+struct uv_dir_s {
+  uv_dirent_t* dirents;
+  size_t nentries;
+  void* reserved[4];
+  UV_DIR_PRIVATE_FIELDS
+};
+
+/* uv_fs_t is a subclass of uv_req_t. */
+struct uv_fs_s {
+  UV_REQ_FIELDS
+  uv_fs_type fs_type;
+  uv_loop_t* loop;
+  uv_fs_cb cb;
+  ssize_t result;
+  void* ptr;
+  const char* path;
+  uv_stat_t statbuf;  /* Stores the result of uv_fs_stat() and uv_fs_fstat(). */
+  UV_FS_PRIVATE_FIELDS
+};
+
+UV_EXTERN uv_fs_type uv_fs_get_type(const uv_fs_t*);
+UV_EXTERN ssize_t uv_fs_get_result(const uv_fs_t*);
+UV_EXTERN int uv_fs_get_system_error(const uv_fs_t*);
+UV_EXTERN void* uv_fs_get_ptr(const uv_fs_t*);
+UV_EXTERN const char* uv_fs_get_path(const uv_fs_t*);
+UV_EXTERN uv_stat_t* uv_fs_get_statbuf(uv_fs_t*);
+
+UV_EXTERN void uv_fs_req_cleanup(uv_fs_t* req);
+UV_EXTERN int uv_fs_close(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          uv_file file,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_open(uv_loop_t* loop,
+                         uv_fs_t* req,
+                         const char* path,
+                         int flags,
+                         int mode,
+                         uv_fs_cb cb);
+UV_EXTERN int uv_fs_read(uv_loop_t* loop,
+                         uv_fs_t* req,
+                         uv_file file,
+                         const uv_buf_t bufs[],
+                         unsigned int nbufs,
+                         int64_t offset,
+                         uv_fs_cb cb);
+UV_EXTERN int uv_fs_unlink(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           const char* path,
+                           uv_fs_cb cb);
+UV_EXTERN int uv_fs_write(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          uv_file file,
+                          const uv_buf_t bufs[],
+                          unsigned int nbufs,
+                          int64_t offset,
+                          uv_fs_cb cb);
+/*
+ * This flag can be used with uv_fs_copyfile() to return an error if the
+ * destination already exists.
+ */
+#define UV_FS_COPYFILE_EXCL   0x0001
+
+/*
+ * This flag can be used with uv_fs_copyfile() to attempt to create a reflink.
+ * If copy-on-write is not supported, a fallback copy mechanism is used.
+ */
+#define UV_FS_COPYFILE_FICLONE 0x0002
+
+/*
+ * This flag can be used with uv_fs_copyfile() to attempt to create a reflink.
+ * If copy-on-write is not supported, an error is returned.
+ */
+#define UV_FS_COPYFILE_FICLONE_FORCE 0x0004
+
+UV_EXTERN int uv_fs_copyfile(uv_loop_t* loop,
+                             uv_fs_t* req,
+                             const char* path,
+                             const char* new_path,
+                             int flags,
+                             uv_fs_cb cb);
+UV_EXTERN int uv_fs_mkdir(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          const char* path,
+                          int mode,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_mkdtemp(uv_loop_t* loop,
+                            uv_fs_t* req,
+                            const char* tpl,
+                            uv_fs_cb cb);
+UV_EXTERN int uv_fs_mkstemp(uv_loop_t* loop,
+                            uv_fs_t* req,
+                            const char* tpl,
+                            uv_fs_cb cb);
+UV_EXTERN int uv_fs_rmdir(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          const char* path,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_scandir(uv_loop_t* loop,
+                            uv_fs_t* req,
+                            const char* path,
+                            int flags,
+                            uv_fs_cb cb);
+UV_EXTERN int uv_fs_scandir_next(uv_fs_t* req,
+                                 uv_dirent_t* ent);
+UV_EXTERN int uv_fs_opendir(uv_loop_t* loop,
+                            uv_fs_t* req,
+                            const char* path,
+                            uv_fs_cb cb);
+UV_EXTERN int uv_fs_readdir(uv_loop_t* loop,
+                            uv_fs_t* req,
+                            uv_dir_t* dir,
+                            uv_fs_cb cb);
+UV_EXTERN int uv_fs_closedir(uv_loop_t* loop,
+                             uv_fs_t* req,
+                             uv_dir_t* dir,
+                             uv_fs_cb cb);
+UV_EXTERN int uv_fs_stat(uv_loop_t* loop,
+                         uv_fs_t* req,
+                         const char* path,
+                         uv_fs_cb cb);
+UV_EXTERN int uv_fs_fstat(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          uv_file file,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_rename(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           const char* path,
+                           const char* new_path,
+                           uv_fs_cb cb);
+UV_EXTERN int uv_fs_fsync(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          uv_file file,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_fdatasync(uv_loop_t* loop,
+                              uv_fs_t* req,
+                              uv_file file,
+                              uv_fs_cb cb);
+UV_EXTERN int uv_fs_ftruncate(uv_loop_t* loop,
+                              uv_fs_t* req,
+                              uv_file file,
+                              int64_t offset,
+                              uv_fs_cb cb);
+UV_EXTERN int uv_fs_sendfile(uv_loop_t* loop,
+                             uv_fs_t* req,
+                             uv_file out_fd,
+                             uv_file in_fd,
+                             int64_t in_offset,
+                             size_t length,
+                             uv_fs_cb cb);
+UV_EXTERN int uv_fs_access(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           const char* path,
+                           int mode,
+                           uv_fs_cb cb);
+UV_EXTERN int uv_fs_chmod(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          const char* path,
+                          int mode,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_utime(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          const char* path,
+                          double atime,
+                          double mtime,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_futime(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           uv_file file,
+                           double atime,
+                           double mtime,
+                           uv_fs_cb cb);
+UV_EXTERN int uv_fs_lutime(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           const char* path,
+                           double atime,
+                           double mtime,
+                           uv_fs_cb cb);
+UV_EXTERN int uv_fs_lstat(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          const char* path,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_link(uv_loop_t* loop,
+                         uv_fs_t* req,
+                         const char* path,
+                         const char* new_path,
+                         uv_fs_cb cb);
+
+/*
+ * This flag can be used with uv_fs_symlink() on Windows to specify whether
+ * path argument points to a directory.
+ */
+#define UV_FS_SYMLINK_DIR          0x0001
+
+/*
+ * This flag can be used with uv_fs_symlink() on Windows to specify whether
+ * the symlink is to be created using junction points.
+ */
+#define UV_FS_SYMLINK_JUNCTION     0x0002
+
+UV_EXTERN int uv_fs_symlink(uv_loop_t* loop,
+                            uv_fs_t* req,
+                            const char* path,
+                            const char* new_path,
+                            int flags,
+                            uv_fs_cb cb);
+UV_EXTERN int uv_fs_readlink(uv_loop_t* loop,
+                             uv_fs_t* req,
+                             const char* path,
+                             uv_fs_cb cb);
+UV_EXTERN int uv_fs_realpath(uv_loop_t* loop,
+                             uv_fs_t* req,
+                             const char* path,
+                             uv_fs_cb cb);
+UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           uv_file file,
+                           int mode,
+                           uv_fs_cb cb);
+UV_EXTERN int uv_fs_chown(uv_loop_t* loop,
+                          uv_fs_t* req,
+                          const char* path,
+                          uv_uid_t uid,
+                          uv_gid_t gid,
+                          uv_fs_cb cb);
+UV_EXTERN int uv_fs_fchown(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           uv_file file,
+                           uv_uid_t uid,
+                           uv_gid_t gid,
+                           uv_fs_cb cb);
+UV_EXTERN int uv_fs_lchown(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           const char* path,
+                           uv_uid_t uid,
+                           uv_gid_t gid,
+                           uv_fs_cb cb);
+UV_EXTERN int uv_fs_statfs(uv_loop_t* loop,
+                           uv_fs_t* req,
+                           const char* path,
+                           uv_fs_cb cb);
+
+
+enum uv_fs_event {
+  UV_RENAME = 1,
+  UV_CHANGE = 2
+};
+
+
+struct uv_fs_event_s {
+  UV_HANDLE_FIELDS
+  /* private */
+  char* path;
+  UV_FS_EVENT_PRIVATE_FIELDS
+};
+
+
+/*
+ * uv_fs_stat() based polling file watcher.
+ */
+struct uv_fs_poll_s {
+  UV_HANDLE_FIELDS
+  /* Private, don't touch. */
+  void* poll_ctx;
+};
+
+UV_EXTERN int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle);
+UV_EXTERN int uv_fs_poll_start(uv_fs_poll_t* handle,
+                               uv_fs_poll_cb poll_cb,
+                               const char* path,
+                               unsigned int interval);
+UV_EXTERN int uv_fs_poll_stop(uv_fs_poll_t* handle);
+UV_EXTERN int uv_fs_poll_getpath(uv_fs_poll_t* handle,
+                                 char* buffer,
+                                 size_t* size);
+
+
+struct uv_signal_s {
+  UV_HANDLE_FIELDS
+  uv_signal_cb signal_cb;
+  int signum;
+  UV_SIGNAL_PRIVATE_FIELDS
+};
+
+UV_EXTERN int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle);
+UV_EXTERN int uv_signal_start(uv_signal_t* handle,
+                              uv_signal_cb signal_cb,
+                              int signum);
+UV_EXTERN int uv_signal_start_oneshot(uv_signal_t* handle,
+                                      uv_signal_cb signal_cb,
+                                      int signum);
+UV_EXTERN int uv_signal_stop(uv_signal_t* handle);
+
+UV_EXTERN void uv_loadavg(double avg[3]);
+
+
+/*
+ * Flags to be passed to uv_fs_event_start().
+ */
+enum uv_fs_event_flags {
+  /*
+   * By default, if the fs event watcher is given a directory name, we will
+   * watch for all events in that directory. This flags overrides this behavior
+   * and makes fs_event report only changes to the directory entry itself. This
+   * flag does not affect individual files watched.
+   * This flag is currently not implemented yet on any backend.
+   */
+  UV_FS_EVENT_WATCH_ENTRY = 1,
+
+  /*
+   * By default uv_fs_event will try to use a kernel interface such as inotify
+   * or kqueue to detect events. This may not work on remote filesystems such
+   * as NFS mounts. This flag makes fs_event fall back to calling stat() on a
+   * regular interval.
+   * This flag is currently not implemented yet on any backend.
+   */
+  UV_FS_EVENT_STAT = 2,
+
+  /*
+   * By default, event watcher, when watching directory, is not registering
+   * (is ignoring) changes in it's subdirectories.
+   * This flag will override this behaviour on platforms that support it.
+   */
+  UV_FS_EVENT_RECURSIVE = 4
+};
+
+
+UV_EXTERN int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle);
+UV_EXTERN int uv_fs_event_start(uv_fs_event_t* handle,
+                                uv_fs_event_cb cb,
+                                const char* path,
+                                unsigned int flags);
+UV_EXTERN int uv_fs_event_stop(uv_fs_event_t* handle);
+UV_EXTERN int uv_fs_event_getpath(uv_fs_event_t* handle,
+                                  char* buffer,
+                                  size_t* size);
+
+UV_EXTERN int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr);
+UV_EXTERN int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr);
+
+UV_EXTERN int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size);
+UV_EXTERN int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size);
+
+UV_EXTERN int uv_inet_ntop(int af, const void* src, char* dst, size_t size);
+UV_EXTERN int uv_inet_pton(int af, const char* src, void* dst);
+
+
+struct uv_random_s {
+  UV_REQ_FIELDS
+  /* read-only */
+  uv_loop_t* loop;
+  /* private */
+  int status;
+  void* buf;
+  size_t buflen;
+  uv_random_cb cb;
+  struct uv__work work_req;
+};
+
+UV_EXTERN int uv_random(uv_loop_t* loop,
+                        uv_random_t* req,
+                        void *buf,
+                        size_t buflen,
+                        unsigned flags,  /* For future extension; must be 0. */
+                        uv_random_cb cb);
+
+#if defined(IF_NAMESIZE)
+# define UV_IF_NAMESIZE (IF_NAMESIZE + 1)
+#elif defined(IFNAMSIZ)
+# define UV_IF_NAMESIZE (IFNAMSIZ + 1)
+#else
+# define UV_IF_NAMESIZE (16 + 1)
+#endif
+
+UV_EXTERN int uv_if_indextoname(unsigned int ifindex,
+                                char* buffer,
+                                size_t* size);
+UV_EXTERN int uv_if_indextoiid(unsigned int ifindex,
+                               char* buffer,
+                               size_t* size);
+
+UV_EXTERN int uv_exepath(char* buffer, size_t* size);
+
+UV_EXTERN int uv_cwd(char* buffer, size_t* size);
+
+UV_EXTERN int uv_chdir(const char* dir);
+
+UV_EXTERN uint64_t uv_get_free_memory(void);
+UV_EXTERN uint64_t uv_get_total_memory(void);
+UV_EXTERN uint64_t uv_get_constrained_memory(void);
+
+UV_EXTERN uint64_t uv_hrtime(void);
+UV_EXTERN void uv_sleep(unsigned int msec);
+
+UV_EXTERN void uv_disable_stdio_inheritance(void);
+
+UV_EXTERN int uv_dlopen(const char* filename, uv_lib_t* lib);
+UV_EXTERN void uv_dlclose(uv_lib_t* lib);
+UV_EXTERN int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr);
+UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib);
+
+UV_EXTERN int uv_mutex_init(uv_mutex_t* handle);
+UV_EXTERN int uv_mutex_init_recursive(uv_mutex_t* handle);
+UV_EXTERN void uv_mutex_destroy(uv_mutex_t* handle);
+UV_EXTERN void uv_mutex_lock(uv_mutex_t* handle);
+UV_EXTERN int uv_mutex_trylock(uv_mutex_t* handle);
+UV_EXTERN void uv_mutex_unlock(uv_mutex_t* handle);
+
+UV_EXTERN int uv_rwlock_init(uv_rwlock_t* rwlock);
+UV_EXTERN void uv_rwlock_destroy(uv_rwlock_t* rwlock);
+UV_EXTERN void uv_rwlock_rdlock(uv_rwlock_t* rwlock);
+UV_EXTERN int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock);
+UV_EXTERN void uv_rwlock_rdunlock(uv_rwlock_t* rwlock);
+UV_EXTERN void uv_rwlock_wrlock(uv_rwlock_t* rwlock);
+UV_EXTERN int uv_rwlock_trywrlock(uv_rwlock_t* rwlock);
+UV_EXTERN void uv_rwlock_wrunlock(uv_rwlock_t* rwlock);
+
+UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
+UV_EXTERN void uv_sem_destroy(uv_sem_t* sem);
+UV_EXTERN void uv_sem_post(uv_sem_t* sem);
+UV_EXTERN void uv_sem_wait(uv_sem_t* sem);
+UV_EXTERN int uv_sem_trywait(uv_sem_t* sem);
+
+UV_EXTERN int uv_cond_init(uv_cond_t* cond);
+UV_EXTERN void uv_cond_destroy(uv_cond_t* cond);
+UV_EXTERN void uv_cond_signal(uv_cond_t* cond);
+UV_EXTERN void uv_cond_broadcast(uv_cond_t* cond);
+
+UV_EXTERN int uv_barrier_init(uv_barrier_t* barrier, unsigned int count);
+UV_EXTERN void uv_barrier_destroy(uv_barrier_t* barrier);
+UV_EXTERN int uv_barrier_wait(uv_barrier_t* barrier);
+
+UV_EXTERN void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex);
+UV_EXTERN int uv_cond_timedwait(uv_cond_t* cond,
+                                uv_mutex_t* mutex,
+                                uint64_t timeout);
+
+UV_EXTERN void uv_once(uv_once_t* guard, void (*callback)(void));
+
+UV_EXTERN int uv_key_create(uv_key_t* key);
+UV_EXTERN void uv_key_delete(uv_key_t* key);
+UV_EXTERN void* uv_key_get(uv_key_t* key);
+UV_EXTERN void uv_key_set(uv_key_t* key, void* value);
+
+UV_EXTERN int uv_gettimeofday(uv_timeval64_t* tv);
+
+typedef void (*uv_thread_cb)(void* arg);
+
+UV_EXTERN int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg);
+
+typedef enum {
+  UV_THREAD_NO_FLAGS = 0x00,
+  UV_THREAD_HAS_STACK_SIZE = 0x01
+} uv_thread_create_flags;
+
+struct uv_thread_options_s {
+  unsigned int flags;
+  size_t stack_size;
+  /* More fields may be added at any time. */
+};
+
+typedef struct uv_thread_options_s uv_thread_options_t;
+
+UV_EXTERN int uv_thread_create_ex(uv_thread_t* tid,
+                                  const uv_thread_options_t* params,
+                                  uv_thread_cb entry,
+                                  void* arg);
+UV_EXTERN uv_thread_t uv_thread_self(void);
+UV_EXTERN int uv_thread_join(uv_thread_t *tid);
+UV_EXTERN int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2);
+
+/* The presence of these unions force similar struct layout. */
+#define XX(_, name) uv_ ## name ## _t name;
+union uv_any_handle {
+  UV_HANDLE_TYPE_MAP(XX)
+};
+
+union uv_any_req {
+  UV_REQ_TYPE_MAP(XX)
+};
+#undef XX
+
+
+struct uv_loop_s {
+  /* User data - use this for whatever. */
+  void* data;
+  /* Loop reference counting. */
+  unsigned int active_handles;
+  void* handle_queue[2];
+  union {
+    void* unused;
+    unsigned int count;
+  } active_reqs;
+  /* Internal storage for future extensions. */
+  void* internal_fields;
+  /* Internal flag to signal loop stop. */
+  unsigned int stop_flag;
+  UV_LOOP_PRIVATE_FIELDS
+};
+
+UV_EXTERN void* uv_loop_get_data(const uv_loop_t*);
+UV_EXTERN void uv_loop_set_data(uv_loop_t*, void* data);
+
+/* Don't export the private CPP symbols. */
+#undef UV_HANDLE_TYPE_PRIVATE
+#undef UV_REQ_TYPE_PRIVATE
+#undef UV_REQ_PRIVATE_FIELDS
+#undef UV_STREAM_PRIVATE_FIELDS
+#undef UV_TCP_PRIVATE_FIELDS
+#undef UV_PREPARE_PRIVATE_FIELDS
+#undef UV_CHECK_PRIVATE_FIELDS
+#undef UV_IDLE_PRIVATE_FIELDS
+#undef UV_ASYNC_PRIVATE_FIELDS
+#undef UV_TIMER_PRIVATE_FIELDS
+#undef UV_GETADDRINFO_PRIVATE_FIELDS
+#undef UV_GETNAMEINFO_PRIVATE_FIELDS
+#undef UV_FS_REQ_PRIVATE_FIELDS
+#undef UV_WORK_PRIVATE_FIELDS
+#undef UV_FS_EVENT_PRIVATE_FIELDS
+#undef UV_SIGNAL_PRIVATE_FIELDS
+#undef UV_LOOP_PRIVATE_FIELDS
+#undef UV_LOOP_PRIVATE_PLATFORM_FIELDS
+#undef UV__ERR
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UV_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/aix.h b/lwnode/apps/sqlite3/deps/include/uv/aix.h
new file mode 100644 (file)
index 0000000..7dc992f
--- /dev/null
@@ -0,0 +1,32 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_AIX_H
+#define UV_AIX_H
+
+#define UV_PLATFORM_LOOP_FIELDS                                               \
+  int fs_fd;                                                                  \
+
+#define UV_PLATFORM_FS_EVENT_FIELDS                                           \
+  uv__io_t event_watcher;                                                     \
+  char *dir_filename;                                                         \
+
+#endif /* UV_AIX_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/android-ifaddrs.h b/lwnode/apps/sqlite3/deps/include/uv/android-ifaddrs.h
new file mode 100644 (file)
index 0000000..9cd19fe
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1995, 1999
+ *     Berkeley Software Design, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``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 Berkeley Software Design, Inc. 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.
+ *
+ *     BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
+ */
+
+#ifndef        _IFADDRS_H_
+#define        _IFADDRS_H_
+
+struct ifaddrs {
+       struct ifaddrs  *ifa_next;
+       char            *ifa_name;
+       unsigned int     ifa_flags;
+       struct sockaddr *ifa_addr;
+       struct sockaddr *ifa_netmask;
+       struct sockaddr *ifa_dstaddr;
+       void            *ifa_data;
+};
+
+/*
+ * This may have been defined in <net/if.h>.  Note that if <net/if.h> is
+ * to be included it must be included before this header file.
+ */
+#ifndef        ifa_broadaddr
+#define        ifa_broadaddr   ifa_dstaddr     /* broadcast address interface */
+#endif
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+extern int getifaddrs(struct ifaddrs **ifap);
+extern void freeifaddrs(struct ifaddrs *ifa);
+__END_DECLS
+
+#endif
diff --git a/lwnode/apps/sqlite3/deps/include/uv/bsd.h b/lwnode/apps/sqlite3/deps/include/uv/bsd.h
new file mode 100644 (file)
index 0000000..2d72b3d
--- /dev/null
@@ -0,0 +1,34 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_BSD_H
+#define UV_BSD_H
+
+#define UV_PLATFORM_FS_EVENT_FIELDS                                           \
+  uv__io_t event_watcher;                                                     \
+
+#define UV_IO_PRIVATE_PLATFORM_FIELDS                                         \
+  int rcount;                                                                 \
+  int wcount;                                                                 \
+
+#define UV_HAVE_KQUEUE 1
+
+#endif /* UV_BSD_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/darwin.h b/lwnode/apps/sqlite3/deps/include/uv/darwin.h
new file mode 100644 (file)
index 0000000..d226415
--- /dev/null
@@ -0,0 +1,61 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_DARWIN_H
+#define UV_DARWIN_H
+
+#if defined(__APPLE__) && defined(__MACH__)
+# include <mach/mach.h>
+# include <mach/task.h>
+# include <mach/semaphore.h>
+# include <TargetConditionals.h>
+# define UV_PLATFORM_SEM_T semaphore_t
+#endif
+
+#define UV_IO_PRIVATE_PLATFORM_FIELDS                                         \
+  int rcount;                                                                 \
+  int wcount;                                                                 \
+
+#define UV_PLATFORM_LOOP_FIELDS                                               \
+  uv_thread_t cf_thread;                                                      \
+  void* _cf_reserved;                                                         \
+  void* cf_state;                                                             \
+  uv_mutex_t cf_mutex;                                                        \
+  uv_sem_t cf_sem;                                                            \
+  void* cf_signals[2];                                                        \
+
+#define UV_PLATFORM_FS_EVENT_FIELDS                                           \
+  uv__io_t event_watcher;                                                     \
+  char* realpath;                                                             \
+  int realpath_len;                                                           \
+  int cf_flags;                                                               \
+  uv_async_t* cf_cb;                                                          \
+  void* cf_events[2];                                                         \
+  void* cf_member[2];                                                         \
+  int cf_error;                                                               \
+  uv_mutex_t cf_mutex;                                                        \
+
+#define UV_STREAM_PRIVATE_PLATFORM_FIELDS                                     \
+  void* select;                                                               \
+
+#define UV_HAVE_KQUEUE 1
+
+#endif /* UV_DARWIN_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/errno.h b/lwnode/apps/sqlite3/deps/include/uv/errno.h
new file mode 100644 (file)
index 0000000..aadce9c
--- /dev/null
@@ -0,0 +1,448 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_ERRNO_H_
+#define UV_ERRNO_H_
+
+#include <errno.h>
+#if EDOM > 0
+# define UV__ERR(x) (-(x))
+#else
+# define UV__ERR(x) (x)
+#endif
+
+#define UV__EOF     (-4095)
+#define UV__UNKNOWN (-4094)
+
+#define UV__EAI_ADDRFAMILY  (-3000)
+#define UV__EAI_AGAIN       (-3001)
+#define UV__EAI_BADFLAGS    (-3002)
+#define UV__EAI_CANCELED    (-3003)
+#define UV__EAI_FAIL        (-3004)
+#define UV__EAI_FAMILY      (-3005)
+#define UV__EAI_MEMORY      (-3006)
+#define UV__EAI_NODATA      (-3007)
+#define UV__EAI_NONAME      (-3008)
+#define UV__EAI_OVERFLOW    (-3009)
+#define UV__EAI_SERVICE     (-3010)
+#define UV__EAI_SOCKTYPE    (-3011)
+#define UV__EAI_BADHINTS    (-3013)
+#define UV__EAI_PROTOCOL    (-3014)
+
+/* Only map to the system errno on non-Windows platforms. It's apparently
+ * a fairly common practice for Windows programmers to redefine errno codes.
+ */
+#if defined(E2BIG) && !defined(_WIN32)
+# define UV__E2BIG UV__ERR(E2BIG)
+#else
+# define UV__E2BIG (-4093)
+#endif
+
+#if defined(EACCES) && !defined(_WIN32)
+# define UV__EACCES UV__ERR(EACCES)
+#else
+# define UV__EACCES (-4092)
+#endif
+
+#if defined(EADDRINUSE) && !defined(_WIN32)
+# define UV__EADDRINUSE UV__ERR(EADDRINUSE)
+#else
+# define UV__EADDRINUSE (-4091)
+#endif
+
+#if defined(EADDRNOTAVAIL) && !defined(_WIN32)
+# define UV__EADDRNOTAVAIL UV__ERR(EADDRNOTAVAIL)
+#else
+# define UV__EADDRNOTAVAIL (-4090)
+#endif
+
+#if defined(EAFNOSUPPORT) && !defined(_WIN32)
+# define UV__EAFNOSUPPORT UV__ERR(EAFNOSUPPORT)
+#else
+# define UV__EAFNOSUPPORT (-4089)
+#endif
+
+#if defined(EAGAIN) && !defined(_WIN32)
+# define UV__EAGAIN UV__ERR(EAGAIN)
+#else
+# define UV__EAGAIN (-4088)
+#endif
+
+#if defined(EALREADY) && !defined(_WIN32)
+# define UV__EALREADY UV__ERR(EALREADY)
+#else
+# define UV__EALREADY (-4084)
+#endif
+
+#if defined(EBADF) && !defined(_WIN32)
+# define UV__EBADF UV__ERR(EBADF)
+#else
+# define UV__EBADF (-4083)
+#endif
+
+#if defined(EBUSY) && !defined(_WIN32)
+# define UV__EBUSY UV__ERR(EBUSY)
+#else
+# define UV__EBUSY (-4082)
+#endif
+
+#if defined(ECANCELED) && !defined(_WIN32)
+# define UV__ECANCELED UV__ERR(ECANCELED)
+#else
+# define UV__ECANCELED (-4081)
+#endif
+
+#if defined(ECHARSET) && !defined(_WIN32)
+# define UV__ECHARSET UV__ERR(ECHARSET)
+#else
+# define UV__ECHARSET (-4080)
+#endif
+
+#if defined(ECONNABORTED) && !defined(_WIN32)
+# define UV__ECONNABORTED UV__ERR(ECONNABORTED)
+#else
+# define UV__ECONNABORTED (-4079)
+#endif
+
+#if defined(ECONNREFUSED) && !defined(_WIN32)
+# define UV__ECONNREFUSED UV__ERR(ECONNREFUSED)
+#else
+# define UV__ECONNREFUSED (-4078)
+#endif
+
+#if defined(ECONNRESET) && !defined(_WIN32)
+# define UV__ECONNRESET UV__ERR(ECONNRESET)
+#else
+# define UV__ECONNRESET (-4077)
+#endif
+
+#if defined(EDESTADDRREQ) && !defined(_WIN32)
+# define UV__EDESTADDRREQ UV__ERR(EDESTADDRREQ)
+#else
+# define UV__EDESTADDRREQ (-4076)
+#endif
+
+#if defined(EEXIST) && !defined(_WIN32)
+# define UV__EEXIST UV__ERR(EEXIST)
+#else
+# define UV__EEXIST (-4075)
+#endif
+
+#if defined(EFAULT) && !defined(_WIN32)
+# define UV__EFAULT UV__ERR(EFAULT)
+#else
+# define UV__EFAULT (-4074)
+#endif
+
+#if defined(EHOSTUNREACH) && !defined(_WIN32)
+# define UV__EHOSTUNREACH UV__ERR(EHOSTUNREACH)
+#else
+# define UV__EHOSTUNREACH (-4073)
+#endif
+
+#if defined(EINTR) && !defined(_WIN32)
+# define UV__EINTR UV__ERR(EINTR)
+#else
+# define UV__EINTR (-4072)
+#endif
+
+#if defined(EINVAL) && !defined(_WIN32)
+# define UV__EINVAL UV__ERR(EINVAL)
+#else
+# define UV__EINVAL (-4071)
+#endif
+
+#if defined(EIO) && !defined(_WIN32)
+# define UV__EIO UV__ERR(EIO)
+#else
+# define UV__EIO (-4070)
+#endif
+
+#if defined(EISCONN) && !defined(_WIN32)
+# define UV__EISCONN UV__ERR(EISCONN)
+#else
+# define UV__EISCONN (-4069)
+#endif
+
+#if defined(EISDIR) && !defined(_WIN32)
+# define UV__EISDIR UV__ERR(EISDIR)
+#else
+# define UV__EISDIR (-4068)
+#endif
+
+#if defined(ELOOP) && !defined(_WIN32)
+# define UV__ELOOP UV__ERR(ELOOP)
+#else
+# define UV__ELOOP (-4067)
+#endif
+
+#if defined(EMFILE) && !defined(_WIN32)
+# define UV__EMFILE UV__ERR(EMFILE)
+#else
+# define UV__EMFILE (-4066)
+#endif
+
+#if defined(EMSGSIZE) && !defined(_WIN32)
+# define UV__EMSGSIZE UV__ERR(EMSGSIZE)
+#else
+# define UV__EMSGSIZE (-4065)
+#endif
+
+#if defined(ENAMETOOLONG) && !defined(_WIN32)
+# define UV__ENAMETOOLONG UV__ERR(ENAMETOOLONG)
+#else
+# define UV__ENAMETOOLONG (-4064)
+#endif
+
+#if defined(ENETDOWN) && !defined(_WIN32)
+# define UV__ENETDOWN UV__ERR(ENETDOWN)
+#else
+# define UV__ENETDOWN (-4063)
+#endif
+
+#if defined(ENETUNREACH) && !defined(_WIN32)
+# define UV__ENETUNREACH UV__ERR(ENETUNREACH)
+#else
+# define UV__ENETUNREACH (-4062)
+#endif
+
+#if defined(ENFILE) && !defined(_WIN32)
+# define UV__ENFILE UV__ERR(ENFILE)
+#else
+# define UV__ENFILE (-4061)
+#endif
+
+#if defined(ENOBUFS) && !defined(_WIN32)
+# define UV__ENOBUFS UV__ERR(ENOBUFS)
+#else
+# define UV__ENOBUFS (-4060)
+#endif
+
+#if defined(ENODEV) && !defined(_WIN32)
+# define UV__ENODEV UV__ERR(ENODEV)
+#else
+# define UV__ENODEV (-4059)
+#endif
+
+#if defined(ENOENT) && !defined(_WIN32)
+# define UV__ENOENT UV__ERR(ENOENT)
+#else
+# define UV__ENOENT (-4058)
+#endif
+
+#if defined(ENOMEM) && !defined(_WIN32)
+# define UV__ENOMEM UV__ERR(ENOMEM)
+#else
+# define UV__ENOMEM (-4057)
+#endif
+
+#if defined(ENONET) && !defined(_WIN32)
+# define UV__ENONET UV__ERR(ENONET)
+#else
+# define UV__ENONET (-4056)
+#endif
+
+#if defined(ENOSPC) && !defined(_WIN32)
+# define UV__ENOSPC UV__ERR(ENOSPC)
+#else
+# define UV__ENOSPC (-4055)
+#endif
+
+#if defined(ENOSYS) && !defined(_WIN32)
+# define UV__ENOSYS UV__ERR(ENOSYS)
+#else
+# define UV__ENOSYS (-4054)
+#endif
+
+#if defined(ENOTCONN) && !defined(_WIN32)
+# define UV__ENOTCONN UV__ERR(ENOTCONN)
+#else
+# define UV__ENOTCONN (-4053)
+#endif
+
+#if defined(ENOTDIR) && !defined(_WIN32)
+# define UV__ENOTDIR UV__ERR(ENOTDIR)
+#else
+# define UV__ENOTDIR (-4052)
+#endif
+
+#if defined(ENOTEMPTY) && !defined(_WIN32)
+# define UV__ENOTEMPTY UV__ERR(ENOTEMPTY)
+#else
+# define UV__ENOTEMPTY (-4051)
+#endif
+
+#if defined(ENOTSOCK) && !defined(_WIN32)
+# define UV__ENOTSOCK UV__ERR(ENOTSOCK)
+#else
+# define UV__ENOTSOCK (-4050)
+#endif
+
+#if defined(ENOTSUP) && !defined(_WIN32)
+# define UV__ENOTSUP UV__ERR(ENOTSUP)
+#else
+# define UV__ENOTSUP (-4049)
+#endif
+
+#if defined(EPERM) && !defined(_WIN32)
+# define UV__EPERM UV__ERR(EPERM)
+#else
+# define UV__EPERM (-4048)
+#endif
+
+#if defined(EPIPE) && !defined(_WIN32)
+# define UV__EPIPE UV__ERR(EPIPE)
+#else
+# define UV__EPIPE (-4047)
+#endif
+
+#if defined(EPROTO) && !defined(_WIN32)
+# define UV__EPROTO UV__ERR(EPROTO)
+#else
+# define UV__EPROTO (-4046)
+#endif
+
+#if defined(EPROTONOSUPPORT) && !defined(_WIN32)
+# define UV__EPROTONOSUPPORT UV__ERR(EPROTONOSUPPORT)
+#else
+# define UV__EPROTONOSUPPORT (-4045)
+#endif
+
+#if defined(EPROTOTYPE) && !defined(_WIN32)
+# define UV__EPROTOTYPE UV__ERR(EPROTOTYPE)
+#else
+# define UV__EPROTOTYPE (-4044)
+#endif
+
+#if defined(EROFS) && !defined(_WIN32)
+# define UV__EROFS UV__ERR(EROFS)
+#else
+# define UV__EROFS (-4043)
+#endif
+
+#if defined(ESHUTDOWN) && !defined(_WIN32)
+# define UV__ESHUTDOWN UV__ERR(ESHUTDOWN)
+#else
+# define UV__ESHUTDOWN (-4042)
+#endif
+
+#if defined(ESPIPE) && !defined(_WIN32)
+# define UV__ESPIPE UV__ERR(ESPIPE)
+#else
+# define UV__ESPIPE (-4041)
+#endif
+
+#if defined(ESRCH) && !defined(_WIN32)
+# define UV__ESRCH UV__ERR(ESRCH)
+#else
+# define UV__ESRCH (-4040)
+#endif
+
+#if defined(ETIMEDOUT) && !defined(_WIN32)
+# define UV__ETIMEDOUT UV__ERR(ETIMEDOUT)
+#else
+# define UV__ETIMEDOUT (-4039)
+#endif
+
+#if defined(ETXTBSY) && !defined(_WIN32)
+# define UV__ETXTBSY UV__ERR(ETXTBSY)
+#else
+# define UV__ETXTBSY (-4038)
+#endif
+
+#if defined(EXDEV) && !defined(_WIN32)
+# define UV__EXDEV UV__ERR(EXDEV)
+#else
+# define UV__EXDEV (-4037)
+#endif
+
+#if defined(EFBIG) && !defined(_WIN32)
+# define UV__EFBIG UV__ERR(EFBIG)
+#else
+# define UV__EFBIG (-4036)
+#endif
+
+#if defined(ENOPROTOOPT) && !defined(_WIN32)
+# define UV__ENOPROTOOPT UV__ERR(ENOPROTOOPT)
+#else
+# define UV__ENOPROTOOPT (-4035)
+#endif
+
+#if defined(ERANGE) && !defined(_WIN32)
+# define UV__ERANGE UV__ERR(ERANGE)
+#else
+# define UV__ERANGE (-4034)
+#endif
+
+#if defined(ENXIO) && !defined(_WIN32)
+# define UV__ENXIO UV__ERR(ENXIO)
+#else
+# define UV__ENXIO (-4033)
+#endif
+
+#if defined(EMLINK) && !defined(_WIN32)
+# define UV__EMLINK UV__ERR(EMLINK)
+#else
+# define UV__EMLINK (-4032)
+#endif
+
+/* EHOSTDOWN is not visible on BSD-like systems when _POSIX_C_SOURCE is
+ * defined. Fortunately, its value is always 64 so it's possible albeit
+ * icky to hard-code it.
+ */
+#if defined(EHOSTDOWN) && !defined(_WIN32)
+# define UV__EHOSTDOWN UV__ERR(EHOSTDOWN)
+#elif defined(__APPLE__) || \
+      defined(__DragonFly__) || \
+      defined(__FreeBSD__) || \
+      defined(__FreeBSD_kernel__) || \
+      defined(__NetBSD__) || \
+      defined(__OpenBSD__)
+# define UV__EHOSTDOWN (-64)
+#else
+# define UV__EHOSTDOWN (-4031)
+#endif
+
+#if defined(EREMOTEIO) && !defined(_WIN32)
+# define UV__EREMOTEIO UV__ERR(EREMOTEIO)
+#else
+# define UV__EREMOTEIO (-4030)
+#endif
+
+#if defined(ENOTTY) && !defined(_WIN32)
+# define UV__ENOTTY UV__ERR(ENOTTY)
+#else
+# define UV__ENOTTY (-4029)
+#endif
+
+#if defined(EFTYPE) && !defined(_WIN32)
+# define UV__EFTYPE UV__ERR(EFTYPE)
+#else
+# define UV__EFTYPE (-4028)
+#endif
+
+#if defined(EILSEQ) && !defined(_WIN32)
+# define UV__EILSEQ UV__ERR(EILSEQ)
+#else
+# define UV__EILSEQ (-4027)
+#endif
+
+#endif /* UV_ERRNO_H_ */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/linux.h b/lwnode/apps/sqlite3/deps/include/uv/linux.h
new file mode 100644 (file)
index 0000000..9b38405
--- /dev/null
@@ -0,0 +1,34 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_LINUX_H
+#define UV_LINUX_H
+
+#define UV_PLATFORM_LOOP_FIELDS                                               \
+  uv__io_t inotify_read_watcher;                                              \
+  void* inotify_watchers;                                                     \
+  int inotify_fd;                                                             \
+
+#define UV_PLATFORM_FS_EVENT_FIELDS                                           \
+  void* watchers[2];                                                          \
+  int wd;                                                                     \
+
+#endif /* UV_LINUX_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/os390.h b/lwnode/apps/sqlite3/deps/include/uv/os390.h
new file mode 100644 (file)
index 0000000..0267d74
--- /dev/null
@@ -0,0 +1,33 @@
+/* Copyright libuv project contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_MVS_H
+#define UV_MVS_H
+
+#define UV_PLATFORM_SEM_T long
+
+#define UV_PLATFORM_LOOP_FIELDS                                               \
+  void* ep;                                                                   \
+
+#define UV_PLATFORM_FS_EVENT_FIELDS                                           \
+  char rfis_rftok[8];                                                         \
+
+#endif /* UV_MVS_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/posix.h b/lwnode/apps/sqlite3/deps/include/uv/posix.h
new file mode 100644 (file)
index 0000000..9a96634
--- /dev/null
@@ -0,0 +1,31 @@
+/* Copyright libuv project contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_POSIX_H
+#define UV_POSIX_H
+
+#define UV_PLATFORM_LOOP_FIELDS                                               \
+  struct pollfd* poll_fds;                                                    \
+  size_t poll_fds_used;                                                       \
+  size_t poll_fds_size;                                                       \
+  unsigned char poll_fds_iterating;                                           \
+
+#endif /* UV_POSIX_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/stdint-msvc2008.h b/lwnode/apps/sqlite3/deps/include/uv/stdint-msvc2008.h
new file mode 100644 (file)
index 0000000..d02608a
--- /dev/null
@@ -0,0 +1,247 @@
+// ISO C9x  compliant stdint.h for Microsoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 
+// 
+//  Copyright (c) 2006-2008 Alexander Chemeris
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// 
+//   1. Redistributions of source code must retain the above copyright notice,
+//      this list of conditions and the following disclaimer.
+// 
+//   2. 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.
+// 
+//   3. The name of the author may be used to endorse or promote products
+//      derived from this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+// 
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_STDINT_H_ // [
+#define _MSC_STDINT_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include <limits.h>
+
+// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
+// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
+// or compiler give many errors like this:
+//   error C2733: second C linkage of overloaded function 'wmemchr' not allowed
+#ifdef __cplusplus
+extern "C" {
+#endif
+#  include <wchar.h>
+#ifdef __cplusplus
+}
+#endif
+
+// Define _W64 macros to mark types changing their size, like intptr_t.
+#ifndef _W64
+#  if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
+#     define _W64 __w64
+#  else
+#     define _W64
+#  endif
+#endif
+
+
+// 7.18.1 Integer types
+
+// 7.18.1.1 Exact-width integer types
+
+// Visual Studio 6 and Embedded Visual C++ 4 doesn't
+// realize that, e.g. char has the same size as __int8
+// so we give up on __intX for them.
+#if (_MSC_VER < 1300)
+   typedef signed char       int8_t;
+   typedef signed short      int16_t;
+   typedef signed int        int32_t;
+   typedef unsigned char     uint8_t;
+   typedef unsigned short    uint16_t;
+   typedef unsigned int      uint32_t;
+#else
+   typedef signed __int8     int8_t;
+   typedef signed __int16    int16_t;
+   typedef signed __int32    int32_t;
+   typedef unsigned __int8   uint8_t;
+   typedef unsigned __int16  uint16_t;
+   typedef unsigned __int32  uint32_t;
+#endif
+typedef signed __int64       int64_t;
+typedef unsigned __int64     uint64_t;
+
+
+// 7.18.1.2 Minimum-width integer types
+typedef int8_t    int_least8_t;
+typedef int16_t   int_least16_t;
+typedef int32_t   int_least32_t;
+typedef int64_t   int_least64_t;
+typedef uint8_t   uint_least8_t;
+typedef uint16_t  uint_least16_t;
+typedef uint32_t  uint_least32_t;
+typedef uint64_t  uint_least64_t;
+
+// 7.18.1.3 Fastest minimum-width integer types
+typedef int8_t    int_fast8_t;
+typedef int16_t   int_fast16_t;
+typedef int32_t   int_fast32_t;
+typedef int64_t   int_fast64_t;
+typedef uint8_t   uint_fast8_t;
+typedef uint16_t  uint_fast16_t;
+typedef uint32_t  uint_fast32_t;
+typedef uint64_t  uint_fast64_t;
+
+// 7.18.1.4 Integer types capable of holding object pointers
+#ifdef _WIN64 // [
+   typedef signed __int64    intptr_t;
+   typedef unsigned __int64  uintptr_t;
+#else // _WIN64 ][
+   typedef _W64 signed int   intptr_t;
+   typedef _W64 unsigned int uintptr_t;
+#endif // _WIN64 ]
+
+// 7.18.1.5 Greatest-width integer types
+typedef int64_t   intmax_t;
+typedef uint64_t  uintmax_t;
+
+
+// 7.18.2 Limits of specified-width integer types
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [   See footnote 220 at page 257 and footnote 221 at page 259
+
+// 7.18.2.1 Limits of exact-width integer types
+#define INT8_MIN     ((int8_t)_I8_MIN)
+#define INT8_MAX     _I8_MAX
+#define INT16_MIN    ((int16_t)_I16_MIN)
+#define INT16_MAX    _I16_MAX
+#define INT32_MIN    ((int32_t)_I32_MIN)
+#define INT32_MAX    _I32_MAX
+#define INT64_MIN    ((int64_t)_I64_MIN)
+#define INT64_MAX    _I64_MAX
+#define UINT8_MAX    _UI8_MAX
+#define UINT16_MAX   _UI16_MAX
+#define UINT32_MAX   _UI32_MAX
+#define UINT64_MAX   _UI64_MAX
+
+// 7.18.2.2 Limits of minimum-width integer types
+#define INT_LEAST8_MIN    INT8_MIN
+#define INT_LEAST8_MAX    INT8_MAX
+#define INT_LEAST16_MIN   INT16_MIN
+#define INT_LEAST16_MAX   INT16_MAX
+#define INT_LEAST32_MIN   INT32_MIN
+#define INT_LEAST32_MAX   INT32_MAX
+#define INT_LEAST64_MIN   INT64_MIN
+#define INT_LEAST64_MAX   INT64_MAX
+#define UINT_LEAST8_MAX   UINT8_MAX
+#define UINT_LEAST16_MAX  UINT16_MAX
+#define UINT_LEAST32_MAX  UINT32_MAX
+#define UINT_LEAST64_MAX  UINT64_MAX
+
+// 7.18.2.3 Limits of fastest minimum-width integer types
+#define INT_FAST8_MIN    INT8_MIN
+#define INT_FAST8_MAX    INT8_MAX
+#define INT_FAST16_MIN   INT16_MIN
+#define INT_FAST16_MAX   INT16_MAX
+#define INT_FAST32_MIN   INT32_MIN
+#define INT_FAST32_MAX   INT32_MAX
+#define INT_FAST64_MIN   INT64_MIN
+#define INT_FAST64_MAX   INT64_MAX
+#define UINT_FAST8_MAX   UINT8_MAX
+#define UINT_FAST16_MAX  UINT16_MAX
+#define UINT_FAST32_MAX  UINT32_MAX
+#define UINT_FAST64_MAX  UINT64_MAX
+
+// 7.18.2.4 Limits of integer types capable of holding object pointers
+#ifdef _WIN64 // [
+#  define INTPTR_MIN   INT64_MIN
+#  define INTPTR_MAX   INT64_MAX
+#  define UINTPTR_MAX  UINT64_MAX
+#else // _WIN64 ][
+#  define INTPTR_MIN   INT32_MIN
+#  define INTPTR_MAX   INT32_MAX
+#  define UINTPTR_MAX  UINT32_MAX
+#endif // _WIN64 ]
+
+// 7.18.2.5 Limits of greatest-width integer types
+#define INTMAX_MIN   INT64_MIN
+#define INTMAX_MAX   INT64_MAX
+#define UINTMAX_MAX  UINT64_MAX
+
+// 7.18.3 Limits of other integer types
+
+#ifdef _WIN64 // [
+#  define PTRDIFF_MIN  _I64_MIN
+#  define PTRDIFF_MAX  _I64_MAX
+#else  // _WIN64 ][
+#  define PTRDIFF_MIN  _I32_MIN
+#  define PTRDIFF_MAX  _I32_MAX
+#endif  // _WIN64 ]
+
+#define SIG_ATOMIC_MIN  INT_MIN
+#define SIG_ATOMIC_MAX  INT_MAX
+
+#ifndef SIZE_MAX // [
+#  ifdef _WIN64 // [
+#     define SIZE_MAX  _UI64_MAX
+#  else // _WIN64 ][
+#     define SIZE_MAX  _UI32_MAX
+#  endif // _WIN64 ]
+#endif // SIZE_MAX ]
+
+// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
+#ifndef WCHAR_MIN // [
+#  define WCHAR_MIN  0
+#endif  // WCHAR_MIN ]
+#ifndef WCHAR_MAX // [
+#  define WCHAR_MAX  _UI16_MAX
+#endif  // WCHAR_MAX ]
+
+#define WINT_MIN  0
+#define WINT_MAX  _UI16_MAX
+
+#endif // __STDC_LIMIT_MACROS ]
+
+
+// 7.18.4 Limits of other integer types
+
+#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [   See footnote 224 at page 260
+
+// 7.18.4.1 Macros for minimum-width integer constants
+
+#define INT8_C(val)  val##i8
+#define INT16_C(val) val##i16
+#define INT32_C(val) val##i32
+#define INT64_C(val) val##i64
+
+#define UINT8_C(val)  val##ui8
+#define UINT16_C(val) val##ui16
+#define UINT32_C(val) val##ui32
+#define UINT64_C(val) val##ui64
+
+// 7.18.4.2 Macros for greatest-width integer constants
+#define INTMAX_C   INT64_C
+#define UINTMAX_C  UINT64_C
+
+#endif // __STDC_CONSTANT_MACROS ]
+
+
+#endif // _MSC_STDINT_H_ ]
diff --git a/lwnode/apps/sqlite3/deps/include/uv/sunos.h b/lwnode/apps/sqlite3/deps/include/uv/sunos.h
new file mode 100644 (file)
index 0000000..0421664
--- /dev/null
@@ -0,0 +1,44 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_SUNOS_H
+#define UV_SUNOS_H
+
+#include <sys/port.h>
+#include <port.h>
+
+/* For the sake of convenience and reduced #ifdef-ery in src/unix/sunos.c,
+ * add the fs_event fields even when this version of SunOS doesn't support
+ * file watching.
+ */
+#define UV_PLATFORM_LOOP_FIELDS                                               \
+  uv__io_t fs_event_watcher;                                                  \
+  int fs_fd;                                                                  \
+
+#if defined(PORT_SOURCE_FILE)
+
+# define UV_PLATFORM_FS_EVENT_FIELDS                                          \
+  file_obj_t fo;                                                              \
+  int fd;                                                                     \
+
+#endif /* defined(PORT_SOURCE_FILE) */
+
+#endif /* UV_SUNOS_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/threadpool.h b/lwnode/apps/sqlite3/deps/include/uv/threadpool.h
new file mode 100644 (file)
index 0000000..9708ebd
--- /dev/null
@@ -0,0 +1,37 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/*
+ * This file is private to libuv. It provides common functionality to both
+ * Windows and Unix backends.
+ */
+
+#ifndef UV_THREADPOOL_H_
+#define UV_THREADPOOL_H_
+
+struct uv__work {
+  void (*work)(struct uv__work *w);
+  void (*done)(struct uv__work *w, int status);
+  struct uv_loop_s* loop;
+  void* wq[2];
+};
+
+#endif /* UV_THREADPOOL_H_ */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/tree.h b/lwnode/apps/sqlite3/deps/include/uv/tree.h
new file mode 100644 (file)
index 0000000..f936416
--- /dev/null
@@ -0,0 +1,768 @@
+/*-
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#ifndef  UV_TREE_H_
+#define  UV_TREE_H_
+
+#ifndef UV__UNUSED
+# if __GNUC__
+#  define UV__UNUSED __attribute__((unused))
+# else
+#  define UV__UNUSED
+# endif
+#endif
+
+/*
+ * This file defines data structures for different types of trees:
+ * splay trees and red-black trees.
+ *
+ * A splay tree is a self-organizing data structure.  Every operation
+ * on the tree causes a splay to happen.  The splay moves the requested
+ * node to the root of the tree and partly rebalances it.
+ *
+ * This has the benefit that request locality causes faster lookups as
+ * the requested nodes move to the top of the tree.  On the other hand,
+ * every lookup causes memory writes.
+ *
+ * The Balance Theorem bounds the total access time for m operations
+ * and n inserts on an initially empty tree as O((m + n)lg n).  The
+ * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
+ *
+ * A red-black tree is a binary search tree with the node color as an
+ * extra attribute.  It fulfills a set of conditions:
+ *  - every search path from the root to a leaf consists of the
+ *    same number of black nodes,
+ *  - each red node (except for the root) has a black parent,
+ *  - each leaf node is black.
+ *
+ * Every operation on a red-black tree is bounded as O(lg n).
+ * The maximum height of a red-black tree is 2lg (n+1).
+ */
+
+#define SPLAY_HEAD(name, type)                                                \
+struct name {                                                                 \
+  struct type *sph_root; /* root of the tree */                               \
+}
+
+#define SPLAY_INITIALIZER(root)                                               \
+  { NULL }
+
+#define SPLAY_INIT(root) do {                                                 \
+  (root)->sph_root = NULL;                                                    \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ENTRY(type)                                                     \
+struct {                                                                      \
+  struct type *spe_left;          /* left element */                          \
+  struct type *spe_right;         /* right element */                         \
+}
+
+#define SPLAY_LEFT(elm, field)    (elm)->field.spe_left
+#define SPLAY_RIGHT(elm, field)   (elm)->field.spe_right
+#define SPLAY_ROOT(head)          (head)->sph_root
+#define SPLAY_EMPTY(head)         (SPLAY_ROOT(head) == NULL)
+
+/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
+#define SPLAY_ROTATE_RIGHT(head, tmp, field) do {                             \
+  SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field);              \
+  SPLAY_RIGHT(tmp, field) = (head)->sph_root;                                 \
+  (head)->sph_root = tmp;                                                     \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ROTATE_LEFT(head, tmp, field) do {                              \
+  SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field);              \
+  SPLAY_LEFT(tmp, field) = (head)->sph_root;                                  \
+  (head)->sph_root = tmp;                                                     \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_LINKLEFT(head, tmp, field) do {                                 \
+  SPLAY_LEFT(tmp, field) = (head)->sph_root;                                  \
+  tmp = (head)->sph_root;                                                     \
+  (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);                     \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_LINKRIGHT(head, tmp, field) do {                                \
+  SPLAY_RIGHT(tmp, field) = (head)->sph_root;                                 \
+  tmp = (head)->sph_root;                                                     \
+  (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);                    \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ASSEMBLE(head, node, left, right, field) do {                   \
+  SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field);             \
+  SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);            \
+  SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field);             \
+  SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field);             \
+} while (/*CONSTCOND*/ 0)
+
+/* Generates prototypes and inline functions */
+
+#define SPLAY_PROTOTYPE(name, type, field, cmp)                               \
+void name##_SPLAY(struct name *, struct type *);                              \
+void name##_SPLAY_MINMAX(struct name *, int);                                 \
+struct type *name##_SPLAY_INSERT(struct name *, struct type *);               \
+struct type *name##_SPLAY_REMOVE(struct name *, struct type *);               \
+                                                                              \
+/* Finds the node with the same key as elm */                                 \
+static __inline struct type *                                                 \
+name##_SPLAY_FIND(struct name *head, struct type *elm)                        \
+{                                                                             \
+  if (SPLAY_EMPTY(head))                                                      \
+    return(NULL);                                                             \
+  name##_SPLAY(head, elm);                                                    \
+  if ((cmp)(elm, (head)->sph_root) == 0)                                      \
+    return (head->sph_root);                                                  \
+  return (NULL);                                                              \
+}                                                                             \
+                                                                              \
+static __inline struct type *                                                 \
+name##_SPLAY_NEXT(struct name *head, struct type *elm)                        \
+{                                                                             \
+  name##_SPLAY(head, elm);                                                    \
+  if (SPLAY_RIGHT(elm, field) != NULL) {                                      \
+    elm = SPLAY_RIGHT(elm, field);                                            \
+    while (SPLAY_LEFT(elm, field) != NULL) {                                  \
+      elm = SPLAY_LEFT(elm, field);                                           \
+    }                                                                         \
+  } else                                                                      \
+    elm = NULL;                                                               \
+  return (elm);                                                               \
+}                                                                             \
+                                                                              \
+static __inline struct type *                                                 \
+name##_SPLAY_MIN_MAX(struct name *head, int val)                              \
+{                                                                             \
+  name##_SPLAY_MINMAX(head, val);                                             \
+  return (SPLAY_ROOT(head));                                                  \
+}
+
+/* Main splay operation.
+ * Moves node close to the key of elm to top
+ */
+#define SPLAY_GENERATE(name, type, field, cmp)                                \
+struct type *                                                                 \
+name##_SPLAY_INSERT(struct name *head, struct type *elm)                      \
+{                                                                             \
+    if (SPLAY_EMPTY(head)) {                                                  \
+      SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL;                \
+    } else {                                                                  \
+      int __comp;                                                             \
+      name##_SPLAY(head, elm);                                                \
+      __comp = (cmp)(elm, (head)->sph_root);                                  \
+      if(__comp < 0) {                                                        \
+        SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);         \
+        SPLAY_RIGHT(elm, field) = (head)->sph_root;                           \
+        SPLAY_LEFT((head)->sph_root, field) = NULL;                           \
+      } else if (__comp > 0) {                                                \
+        SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);       \
+        SPLAY_LEFT(elm, field) = (head)->sph_root;                            \
+        SPLAY_RIGHT((head)->sph_root, field) = NULL;                          \
+      } else                                                                  \
+        return ((head)->sph_root);                                            \
+    }                                                                         \
+    (head)->sph_root = (elm);                                                 \
+    return (NULL);                                                            \
+}                                                                             \
+                                                                              \
+struct type *                                                                 \
+name##_SPLAY_REMOVE(struct name *head, struct type *elm)                      \
+{                                                                             \
+  struct type *__tmp;                                                         \
+  if (SPLAY_EMPTY(head))                                                      \
+    return (NULL);                                                            \
+  name##_SPLAY(head, elm);                                                    \
+  if ((cmp)(elm, (head)->sph_root) == 0) {                                    \
+    if (SPLAY_LEFT((head)->sph_root, field) == NULL) {                        \
+      (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);                \
+    } else {                                                                  \
+      __tmp = SPLAY_RIGHT((head)->sph_root, field);                           \
+      (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);                 \
+      name##_SPLAY(head, elm);                                                \
+      SPLAY_RIGHT((head)->sph_root, field) = __tmp;                           \
+    }                                                                         \
+    return (elm);                                                             \
+  }                                                                           \
+  return (NULL);                                                              \
+}                                                                             \
+                                                                              \
+void                                                                          \
+name##_SPLAY(struct name *head, struct type *elm)                             \
+{                                                                             \
+  struct type __node, *__left, *__right, *__tmp;                              \
+  int __comp;                                                                 \
+                                                                              \
+  SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;            \
+  __left = __right = &__node;                                                 \
+                                                                              \
+  while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) {                      \
+    if (__comp < 0) {                                                         \
+      __tmp = SPLAY_LEFT((head)->sph_root, field);                            \
+      if (__tmp == NULL)                                                      \
+        break;                                                                \
+      if ((cmp)(elm, __tmp) < 0){                                             \
+        SPLAY_ROTATE_RIGHT(head, __tmp, field);                               \
+        if (SPLAY_LEFT((head)->sph_root, field) == NULL)                      \
+          break;                                                              \
+      }                                                                       \
+      SPLAY_LINKLEFT(head, __right, field);                                   \
+    } else if (__comp > 0) {                                                  \
+      __tmp = SPLAY_RIGHT((head)->sph_root, field);                           \
+      if (__tmp == NULL)                                                      \
+        break;                                                                \
+      if ((cmp)(elm, __tmp) > 0){                                             \
+        SPLAY_ROTATE_LEFT(head, __tmp, field);                                \
+        if (SPLAY_RIGHT((head)->sph_root, field) == NULL)                     \
+          break;                                                              \
+      }                                                                       \
+      SPLAY_LINKRIGHT(head, __left, field);                                   \
+    }                                                                         \
+  }                                                                           \
+  SPLAY_ASSEMBLE(head, &__node, __left, __right, field);                      \
+}                                                                             \
+                                                                              \
+/* Splay with either the minimum or the maximum element                       \
+ * Used to find minimum or maximum element in tree.                           \
+ */                                                                           \
+void name##_SPLAY_MINMAX(struct name *head, int __comp)                       \
+{                                                                             \
+  struct type __node, *__left, *__right, *__tmp;                              \
+                                                                              \
+  SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;            \
+  __left = __right = &__node;                                                 \
+                                                                              \
+  while (1) {                                                                 \
+    if (__comp < 0) {                                                         \
+      __tmp = SPLAY_LEFT((head)->sph_root, field);                            \
+      if (__tmp == NULL)                                                      \
+        break;                                                                \
+      if (__comp < 0){                                                        \
+        SPLAY_ROTATE_RIGHT(head, __tmp, field);                               \
+        if (SPLAY_LEFT((head)->sph_root, field) == NULL)                      \
+          break;                                                              \
+      }                                                                       \
+      SPLAY_LINKLEFT(head, __right, field);                                   \
+    } else if (__comp > 0) {                                                  \
+      __tmp = SPLAY_RIGHT((head)->sph_root, field);                           \
+      if (__tmp == NULL)                                                      \
+        break;                                                                \
+      if (__comp > 0) {                                                       \
+        SPLAY_ROTATE_LEFT(head, __tmp, field);                                \
+        if (SPLAY_RIGHT((head)->sph_root, field) == NULL)                     \
+          break;                                                              \
+      }                                                                       \
+      SPLAY_LINKRIGHT(head, __left, field);                                   \
+    }                                                                         \
+  }                                                                           \
+  SPLAY_ASSEMBLE(head, &__node, __left, __right, field);                      \
+}
+
+#define SPLAY_NEGINF  -1
+#define SPLAY_INF     1
+
+#define SPLAY_INSERT(name, x, y)  name##_SPLAY_INSERT(x, y)
+#define SPLAY_REMOVE(name, x, y)  name##_SPLAY_REMOVE(x, y)
+#define SPLAY_FIND(name, x, y)    name##_SPLAY_FIND(x, y)
+#define SPLAY_NEXT(name, x, y)    name##_SPLAY_NEXT(x, y)
+#define SPLAY_MIN(name, x)        (SPLAY_EMPTY(x) ? NULL                      \
+                                  : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
+#define SPLAY_MAX(name, x)        (SPLAY_EMPTY(x) ? NULL                      \
+                                  : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
+
+#define SPLAY_FOREACH(x, name, head)                                          \
+  for ((x) = SPLAY_MIN(name, head);                                           \
+       (x) != NULL;                                                           \
+       (x) = SPLAY_NEXT(name, head, x))
+
+/* Macros that define a red-black tree */
+#define RB_HEAD(name, type)                                                   \
+struct name {                                                                 \
+  struct type *rbh_root; /* root of the tree */                               \
+}
+
+#define RB_INITIALIZER(root)                                                  \
+  { NULL }
+
+#define RB_INIT(root) do {                                                    \
+  (root)->rbh_root = NULL;                                                    \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_BLACK  0
+#define RB_RED    1
+#define RB_ENTRY(type)                                                        \
+struct {                                                                      \
+  struct type *rbe_left;        /* left element */                            \
+  struct type *rbe_right;       /* right element */                           \
+  struct type *rbe_parent;      /* parent element */                          \
+  int rbe_color;                /* node color */                              \
+}
+
+#define RB_LEFT(elm, field)     (elm)->field.rbe_left
+#define RB_RIGHT(elm, field)    (elm)->field.rbe_right
+#define RB_PARENT(elm, field)   (elm)->field.rbe_parent
+#define RB_COLOR(elm, field)    (elm)->field.rbe_color
+#define RB_ROOT(head)           (head)->rbh_root
+#define RB_EMPTY(head)          (RB_ROOT(head) == NULL)
+
+#define RB_SET(elm, parent, field) do {                                       \
+  RB_PARENT(elm, field) = parent;                                             \
+  RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL;                          \
+  RB_COLOR(elm, field) = RB_RED;                                              \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_SET_BLACKRED(black, red, field) do {                               \
+  RB_COLOR(black, field) = RB_BLACK;                                          \
+  RB_COLOR(red, field) = RB_RED;                                              \
+} while (/*CONSTCOND*/ 0)
+
+#ifndef RB_AUGMENT
+#define RB_AUGMENT(x)  do {} while (0)
+#endif
+
+#define RB_ROTATE_LEFT(head, elm, tmp, field) do {                            \
+  (tmp) = RB_RIGHT(elm, field);                                               \
+  if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) {                 \
+    RB_PARENT(RB_LEFT(tmp, field), field) = (elm);                            \
+  }                                                                           \
+  RB_AUGMENT(elm);                                                            \
+  if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) {              \
+    if ((elm) == RB_LEFT(RB_PARENT(elm, field), field))                       \
+      RB_LEFT(RB_PARENT(elm, field), field) = (tmp);                          \
+    else                                                                      \
+      RB_RIGHT(RB_PARENT(elm, field), field) = (tmp);                         \
+  } else                                                                      \
+    (head)->rbh_root = (tmp);                                                 \
+  RB_LEFT(tmp, field) = (elm);                                                \
+  RB_PARENT(elm, field) = (tmp);                                              \
+  RB_AUGMENT(tmp);                                                            \
+  if ((RB_PARENT(tmp, field)))                                                \
+    RB_AUGMENT(RB_PARENT(tmp, field));                                        \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_ROTATE_RIGHT(head, elm, tmp, field) do {                           \
+  (tmp) = RB_LEFT(elm, field);                                                \
+  if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) {                 \
+    RB_PARENT(RB_RIGHT(tmp, field), field) = (elm);                           \
+  }                                                                           \
+  RB_AUGMENT(elm);                                                            \
+  if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) {              \
+    if ((elm) == RB_LEFT(RB_PARENT(elm, field), field))                       \
+      RB_LEFT(RB_PARENT(elm, field), field) = (tmp);                          \
+    else                                                                      \
+      RB_RIGHT(RB_PARENT(elm, field), field) = (tmp);                         \
+  } else                                                                      \
+    (head)->rbh_root = (tmp);                                                 \
+  RB_RIGHT(tmp, field) = (elm);                                               \
+  RB_PARENT(elm, field) = (tmp);                                              \
+  RB_AUGMENT(tmp);                                                            \
+  if ((RB_PARENT(tmp, field)))                                                \
+    RB_AUGMENT(RB_PARENT(tmp, field));                                        \
+} while (/*CONSTCOND*/ 0)
+
+/* Generates prototypes and inline functions */
+#define  RB_PROTOTYPE(name, type, field, cmp)                                 \
+  RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
+#define  RB_PROTOTYPE_STATIC(name, type, field, cmp)                          \
+  RB_PROTOTYPE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
+#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr)                   \
+attr void name##_RB_INSERT_COLOR(struct name *, struct type *);               \
+attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
+attr struct type *name##_RB_REMOVE(struct name *, struct type *);             \
+attr struct type *name##_RB_INSERT(struct name *, struct type *);             \
+attr struct type *name##_RB_FIND(struct name *, struct type *);               \
+attr struct type *name##_RB_NFIND(struct name *, struct type *);              \
+attr struct type *name##_RB_NEXT(struct type *);                              \
+attr struct type *name##_RB_PREV(struct type *);                              \
+attr struct type *name##_RB_MINMAX(struct name *, int);                       \
+                                                                              \
+
+/* Main rb operation.
+ * Moves node close to the key of elm to top
+ */
+#define  RB_GENERATE(name, type, field, cmp)                                  \
+  RB_GENERATE_INTERNAL(name, type, field, cmp,)
+#define  RB_GENERATE_STATIC(name, type, field, cmp)                           \
+  RB_GENERATE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
+#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr)                    \
+attr void                                                                     \
+name##_RB_INSERT_COLOR(struct name *head, struct type *elm)                   \
+{                                                                             \
+  struct type *parent, *gparent, *tmp;                                        \
+  while ((parent = RB_PARENT(elm, field)) != NULL &&                          \
+      RB_COLOR(parent, field) == RB_RED) {                                    \
+    gparent = RB_PARENT(parent, field);                                       \
+    if (parent == RB_LEFT(gparent, field)) {                                  \
+      tmp = RB_RIGHT(gparent, field);                                         \
+      if (tmp && RB_COLOR(tmp, field) == RB_RED) {                            \
+        RB_COLOR(tmp, field) = RB_BLACK;                                      \
+        RB_SET_BLACKRED(parent, gparent, field);                              \
+        elm = gparent;                                                        \
+        continue;                                                             \
+      }                                                                       \
+      if (RB_RIGHT(parent, field) == elm) {                                   \
+        RB_ROTATE_LEFT(head, parent, tmp, field);                             \
+        tmp = parent;                                                         \
+        parent = elm;                                                         \
+        elm = tmp;                                                            \
+      }                                                                       \
+      RB_SET_BLACKRED(parent, gparent, field);                                \
+      RB_ROTATE_RIGHT(head, gparent, tmp, field);                             \
+    } else {                                                                  \
+      tmp = RB_LEFT(gparent, field);                                          \
+      if (tmp && RB_COLOR(tmp, field) == RB_RED) {                            \
+        RB_COLOR(tmp, field) = RB_BLACK;                                      \
+        RB_SET_BLACKRED(parent, gparent, field);                              \
+        elm = gparent;                                                        \
+        continue;                                                             \
+      }                                                                       \
+      if (RB_LEFT(parent, field) == elm) {                                    \
+        RB_ROTATE_RIGHT(head, parent, tmp, field);                            \
+        tmp = parent;                                                         \
+        parent = elm;                                                         \
+        elm = tmp;                                                            \
+      }                                                                       \
+      RB_SET_BLACKRED(parent, gparent, field);                                \
+      RB_ROTATE_LEFT(head, gparent, tmp, field);                              \
+    }                                                                         \
+  }                                                                           \
+  RB_COLOR(head->rbh_root, field) = RB_BLACK;                                 \
+}                                                                             \
+                                                                              \
+attr void                                                                     \
+name##_RB_REMOVE_COLOR(struct name *head, struct type *parent,                \
+    struct type *elm)                                                         \
+{                                                                             \
+  struct type *tmp;                                                           \
+  while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) &&                 \
+      elm != RB_ROOT(head)) {                                                 \
+    if (RB_LEFT(parent, field) == elm) {                                      \
+      tmp = RB_RIGHT(parent, field);                                          \
+      if (RB_COLOR(tmp, field) == RB_RED) {                                   \
+        RB_SET_BLACKRED(tmp, parent, field);                                  \
+        RB_ROTATE_LEFT(head, parent, tmp, field);                             \
+        tmp = RB_RIGHT(parent, field);                                        \
+      }                                                                       \
+      if ((RB_LEFT(tmp, field) == NULL ||                                     \
+          RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&                \
+          (RB_RIGHT(tmp, field) == NULL ||                                    \
+          RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {               \
+        RB_COLOR(tmp, field) = RB_RED;                                        \
+        elm = parent;                                                         \
+        parent = RB_PARENT(elm, field);                                       \
+      } else {                                                                \
+        if (RB_RIGHT(tmp, field) == NULL ||                                   \
+            RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {              \
+          struct type *oleft;                                                 \
+          if ((oleft = RB_LEFT(tmp, field))                                   \
+              != NULL)                                                        \
+            RB_COLOR(oleft, field) = RB_BLACK;                                \
+          RB_COLOR(tmp, field) = RB_RED;                                      \
+          RB_ROTATE_RIGHT(head, tmp, oleft, field);                           \
+          tmp = RB_RIGHT(parent, field);                                      \
+        }                                                                     \
+        RB_COLOR(tmp, field) = RB_COLOR(parent, field);                       \
+        RB_COLOR(parent, field) = RB_BLACK;                                   \
+        if (RB_RIGHT(tmp, field))                                             \
+          RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;                   \
+        RB_ROTATE_LEFT(head, parent, tmp, field);                             \
+        elm = RB_ROOT(head);                                                  \
+        break;                                                                \
+      }                                                                       \
+    } else {                                                                  \
+      tmp = RB_LEFT(parent, field);                                           \
+      if (RB_COLOR(tmp, field) == RB_RED) {                                   \
+        RB_SET_BLACKRED(tmp, parent, field);                                  \
+        RB_ROTATE_RIGHT(head, parent, tmp, field);                            \
+        tmp = RB_LEFT(parent, field);                                         \
+      }                                                                       \
+      if ((RB_LEFT(tmp, field) == NULL ||                                     \
+          RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&                \
+          (RB_RIGHT(tmp, field) == NULL ||                                    \
+          RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {               \
+        RB_COLOR(tmp, field) = RB_RED;                                        \
+        elm = parent;                                                         \
+        parent = RB_PARENT(elm, field);                                       \
+      } else {                                                                \
+        if (RB_LEFT(tmp, field) == NULL ||                                    \
+            RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {               \
+          struct type *oright;                                                \
+          if ((oright = RB_RIGHT(tmp, field))                                 \
+              != NULL)                                                        \
+            RB_COLOR(oright, field) = RB_BLACK;                               \
+          RB_COLOR(tmp, field) = RB_RED;                                      \
+          RB_ROTATE_LEFT(head, tmp, oright, field);                           \
+          tmp = RB_LEFT(parent, field);                                       \
+        }                                                                     \
+        RB_COLOR(tmp, field) = RB_COLOR(parent, field);                       \
+        RB_COLOR(parent, field) = RB_BLACK;                                   \
+        if (RB_LEFT(tmp, field))                                              \
+          RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;                    \
+        RB_ROTATE_RIGHT(head, parent, tmp, field);                            \
+        elm = RB_ROOT(head);                                                  \
+        break;                                                                \
+      }                                                                       \
+    }                                                                         \
+  }                                                                           \
+  if (elm)                                                                    \
+    RB_COLOR(elm, field) = RB_BLACK;                                          \
+}                                                                             \
+                                                                              \
+attr struct type *                                                            \
+name##_RB_REMOVE(struct name *head, struct type *elm)                         \
+{                                                                             \
+  struct type *child, *parent, *old = elm;                                    \
+  int color;                                                                  \
+  if (RB_LEFT(elm, field) == NULL)                                            \
+    child = RB_RIGHT(elm, field);                                             \
+  else if (RB_RIGHT(elm, field) == NULL)                                      \
+    child = RB_LEFT(elm, field);                                              \
+  else {                                                                      \
+    struct type *left;                                                        \
+    elm = RB_RIGHT(elm, field);                                               \
+    while ((left = RB_LEFT(elm, field)) != NULL)                              \
+      elm = left;                                                             \
+    child = RB_RIGHT(elm, field);                                             \
+    parent = RB_PARENT(elm, field);                                           \
+    color = RB_COLOR(elm, field);                                             \
+    if (child)                                                                \
+      RB_PARENT(child, field) = parent;                                       \
+    if (parent) {                                                             \
+      if (RB_LEFT(parent, field) == elm)                                      \
+        RB_LEFT(parent, field) = child;                                       \
+      else                                                                    \
+        RB_RIGHT(parent, field) = child;                                      \
+      RB_AUGMENT(parent);                                                     \
+    } else                                                                    \
+      RB_ROOT(head) = child;                                                  \
+    if (RB_PARENT(elm, field) == old)                                         \
+      parent = elm;                                                           \
+    (elm)->field = (old)->field;                                              \
+    if (RB_PARENT(old, field)) {                                              \
+      if (RB_LEFT(RB_PARENT(old, field), field) == old)                       \
+        RB_LEFT(RB_PARENT(old, field), field) = elm;                          \
+      else                                                                    \
+        RB_RIGHT(RB_PARENT(old, field), field) = elm;                         \
+      RB_AUGMENT(RB_PARENT(old, field));                                      \
+    } else                                                                    \
+      RB_ROOT(head) = elm;                                                    \
+    RB_PARENT(RB_LEFT(old, field), field) = elm;                              \
+    if (RB_RIGHT(old, field))                                                 \
+      RB_PARENT(RB_RIGHT(old, field), field) = elm;                           \
+    if (parent) {                                                             \
+      left = parent;                                                          \
+      do {                                                                    \
+        RB_AUGMENT(left);                                                     \
+      } while ((left = RB_PARENT(left, field)) != NULL);                      \
+    }                                                                         \
+    goto color;                                                               \
+  }                                                                           \
+  parent = RB_PARENT(elm, field);                                             \
+  color = RB_COLOR(elm, field);                                               \
+  if (child)                                                                  \
+    RB_PARENT(child, field) = parent;                                         \
+  if (parent) {                                                               \
+    if (RB_LEFT(parent, field) == elm)                                        \
+      RB_LEFT(parent, field) = child;                                         \
+    else                                                                      \
+      RB_RIGHT(parent, field) = child;                                        \
+    RB_AUGMENT(parent);                                                       \
+  } else                                                                      \
+    RB_ROOT(head) = child;                                                    \
+color:                                                                        \
+  if (color == RB_BLACK)                                                      \
+    name##_RB_REMOVE_COLOR(head, parent, child);                              \
+  return (old);                                                               \
+}                                                                             \
+                                                                              \
+/* Inserts a node into the RB tree */                                         \
+attr struct type *                                                            \
+name##_RB_INSERT(struct name *head, struct type *elm)                         \
+{                                                                             \
+  struct type *tmp;                                                           \
+  struct type *parent = NULL;                                                 \
+  int comp = 0;                                                               \
+  tmp = RB_ROOT(head);                                                        \
+  while (tmp) {                                                               \
+    parent = tmp;                                                             \
+    comp = (cmp)(elm, parent);                                                \
+    if (comp < 0)                                                             \
+      tmp = RB_LEFT(tmp, field);                                              \
+    else if (comp > 0)                                                        \
+      tmp = RB_RIGHT(tmp, field);                                             \
+    else                                                                      \
+      return (tmp);                                                           \
+  }                                                                           \
+  RB_SET(elm, parent, field);                                                 \
+  if (parent != NULL) {                                                       \
+    if (comp < 0)                                                             \
+      RB_LEFT(parent, field) = elm;                                           \
+    else                                                                      \
+      RB_RIGHT(parent, field) = elm;                                          \
+    RB_AUGMENT(parent);                                                       \
+  } else                                                                      \
+    RB_ROOT(head) = elm;                                                      \
+  name##_RB_INSERT_COLOR(head, elm);                                          \
+  return (NULL);                                                              \
+}                                                                             \
+                                                                              \
+/* Finds the node with the same key as elm */                                 \
+attr struct type *                                                            \
+name##_RB_FIND(struct name *head, struct type *elm)                           \
+{                                                                             \
+  struct type *tmp = RB_ROOT(head);                                           \
+  int comp;                                                                   \
+  while (tmp) {                                                               \
+    comp = cmp(elm, tmp);                                                     \
+    if (comp < 0)                                                             \
+      tmp = RB_LEFT(tmp, field);                                              \
+    else if (comp > 0)                                                        \
+      tmp = RB_RIGHT(tmp, field);                                             \
+    else                                                                      \
+      return (tmp);                                                           \
+  }                                                                           \
+  return (NULL);                                                              \
+}                                                                             \
+                                                                              \
+/* Finds the first node greater than or equal to the search key */            \
+attr struct type *                                                            \
+name##_RB_NFIND(struct name *head, struct type *elm)                          \
+{                                                                             \
+  struct type *tmp = RB_ROOT(head);                                           \
+  struct type *res = NULL;                                                    \
+  int comp;                                                                   \
+  while (tmp) {                                                               \
+    comp = cmp(elm, tmp);                                                     \
+    if (comp < 0) {                                                           \
+      res = tmp;                                                              \
+      tmp = RB_LEFT(tmp, field);                                              \
+    }                                                                         \
+    else if (comp > 0)                                                        \
+      tmp = RB_RIGHT(tmp, field);                                             \
+    else                                                                      \
+      return (tmp);                                                           \
+  }                                                                           \
+  return (res);                                                               \
+}                                                                             \
+                                                                              \
+/* ARGSUSED */                                                                \
+attr struct type *                                                            \
+name##_RB_NEXT(struct type *elm)                                              \
+{                                                                             \
+  if (RB_RIGHT(elm, field)) {                                                 \
+    elm = RB_RIGHT(elm, field);                                               \
+    while (RB_LEFT(elm, field))                                               \
+      elm = RB_LEFT(elm, field);                                              \
+  } else {                                                                    \
+    if (RB_PARENT(elm, field) &&                                              \
+        (elm == RB_LEFT(RB_PARENT(elm, field), field)))                       \
+      elm = RB_PARENT(elm, field);                                            \
+    else {                                                                    \
+      while (RB_PARENT(elm, field) &&                                         \
+          (elm == RB_RIGHT(RB_PARENT(elm, field), field)))                    \
+        elm = RB_PARENT(elm, field);                                          \
+      elm = RB_PARENT(elm, field);                                            \
+    }                                                                         \
+  }                                                                           \
+  return (elm);                                                               \
+}                                                                             \
+                                                                              \
+/* ARGSUSED */                                                                \
+attr struct type *                                                            \
+name##_RB_PREV(struct type *elm)                                              \
+{                                                                             \
+  if (RB_LEFT(elm, field)) {                                                  \
+    elm = RB_LEFT(elm, field);                                                \
+    while (RB_RIGHT(elm, field))                                              \
+      elm = RB_RIGHT(elm, field);                                             \
+  } else {                                                                    \
+    if (RB_PARENT(elm, field) &&                                              \
+        (elm == RB_RIGHT(RB_PARENT(elm, field), field)))                      \
+      elm = RB_PARENT(elm, field);                                            \
+    else {                                                                    \
+      while (RB_PARENT(elm, field) &&                                         \
+          (elm == RB_LEFT(RB_PARENT(elm, field), field)))                     \
+        elm = RB_PARENT(elm, field);                                          \
+      elm = RB_PARENT(elm, field);                                            \
+    }                                                                         \
+  }                                                                           \
+  return (elm);                                                               \
+}                                                                             \
+                                                                              \
+attr struct type *                                                            \
+name##_RB_MINMAX(struct name *head, int val)                                  \
+{                                                                             \
+  struct type *tmp = RB_ROOT(head);                                           \
+  struct type *parent = NULL;                                                 \
+  while (tmp) {                                                               \
+    parent = tmp;                                                             \
+    if (val < 0)                                                              \
+      tmp = RB_LEFT(tmp, field);                                              \
+    else                                                                      \
+      tmp = RB_RIGHT(tmp, field);                                             \
+  }                                                                           \
+  return (parent);                                                            \
+}
+
+#define RB_NEGINF   -1
+#define RB_INF      1
+
+#define RB_INSERT(name, x, y)   name##_RB_INSERT(x, y)
+#define RB_REMOVE(name, x, y)   name##_RB_REMOVE(x, y)
+#define RB_FIND(name, x, y)     name##_RB_FIND(x, y)
+#define RB_NFIND(name, x, y)    name##_RB_NFIND(x, y)
+#define RB_NEXT(name, x, y)     name##_RB_NEXT(y)
+#define RB_PREV(name, x, y)     name##_RB_PREV(y)
+#define RB_MIN(name, x)         name##_RB_MINMAX(x, RB_NEGINF)
+#define RB_MAX(name, x)         name##_RB_MINMAX(x, RB_INF)
+
+#define RB_FOREACH(x, name, head)                                             \
+  for ((x) = RB_MIN(name, head);                                              \
+       (x) != NULL;                                                           \
+       (x) = name##_RB_NEXT(x))
+
+#define RB_FOREACH_FROM(x, name, y)                                           \
+  for ((x) = (y);                                                             \
+      ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL);                \
+       (x) = (y))
+
+#define RB_FOREACH_SAFE(x, name, head, y)                                     \
+  for ((x) = RB_MIN(name, head);                                              \
+      ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL);                \
+       (x) = (y))
+
+#define RB_FOREACH_REVERSE(x, name, head)                                     \
+  for ((x) = RB_MAX(name, head);                                              \
+       (x) != NULL;                                                           \
+       (x) = name##_RB_PREV(x))
+
+#define RB_FOREACH_REVERSE_FROM(x, name, y)                                   \
+  for ((x) = (y);                                                             \
+      ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL);                \
+       (x) = (y))
+
+#define RB_FOREACH_REVERSE_SAFE(x, name, head, y)                             \
+  for ((x) = RB_MAX(name, head);                                              \
+      ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL);                \
+       (x) = (y))
+
+#endif  /* UV_TREE_H_ */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/unix.h b/lwnode/apps/sqlite3/deps/include/uv/unix.h
new file mode 100644 (file)
index 0000000..e3cf7bd
--- /dev/null
@@ -0,0 +1,507 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_UNIX_H
+#define UV_UNIX_H
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <dirent.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <netdb.h>  /* MAXHOSTNAMELEN on Solaris */
+
+#include <termios.h>
+#include <pwd.h>
+
+#if !defined(__MVS__)
+#include <semaphore.h>
+#include <sys/param.h> /* MAXHOSTNAMELEN on Linux and the BSDs */
+#endif
+#include <pthread.h>
+#include <signal.h>
+
+#include "uv/threadpool.h"
+
+#if defined(__linux__)
+# include "uv/linux.h"
+#elif defined (__MVS__)
+# include "uv/os390.h"
+#elif defined(__PASE__)  /* __PASE__ and _AIX are both defined on IBM i */
+# include "uv/posix.h"  /* IBM i needs uv/posix.h, not uv/aix.h */
+#elif defined(_AIX)
+# include "uv/aix.h"
+#elif defined(__sun)
+# include "uv/sunos.h"
+#elif defined(__APPLE__)
+# include "uv/darwin.h"
+#elif defined(__DragonFly__)       || \
+      defined(__FreeBSD__)         || \
+      defined(__FreeBSD_kernel__)  || \
+      defined(__OpenBSD__)         || \
+      defined(__NetBSD__)
+# include "uv/bsd.h"
+#elif defined(__CYGWIN__) || \
+      defined(__MSYS__)   || \
+      defined(__GNU__)
+# include "uv/posix.h"
+#elif defined(__HAIKU__)
+# include "uv/posix.h"
+#elif defined(__QNX__)
+# include "uv/posix.h"
+#endif
+
+#ifndef NI_MAXHOST
+# define NI_MAXHOST 1025
+#endif
+
+#ifndef NI_MAXSERV
+# define NI_MAXSERV 32
+#endif
+
+#ifndef UV_IO_PRIVATE_PLATFORM_FIELDS
+# define UV_IO_PRIVATE_PLATFORM_FIELDS /* empty */
+#endif
+
+struct uv__io_s;
+struct uv_loop_s;
+
+typedef void (*uv__io_cb)(struct uv_loop_s* loop,
+                          struct uv__io_s* w,
+                          unsigned int events);
+typedef struct uv__io_s uv__io_t;
+
+struct uv__io_s {
+  uv__io_cb cb;
+  void* pending_queue[2];
+  void* watcher_queue[2];
+  unsigned int pevents; /* Pending event mask i.e. mask at next tick. */
+  unsigned int events;  /* Current event mask. */
+  int fd;
+  UV_IO_PRIVATE_PLATFORM_FIELDS
+};
+
+#ifndef UV_PLATFORM_SEM_T
+# define UV_PLATFORM_SEM_T sem_t
+#endif
+
+#ifndef UV_PLATFORM_LOOP_FIELDS
+# define UV_PLATFORM_LOOP_FIELDS /* empty */
+#endif
+
+#ifndef UV_PLATFORM_FS_EVENT_FIELDS
+# define UV_PLATFORM_FS_EVENT_FIELDS /* empty */
+#endif
+
+#ifndef UV_STREAM_PRIVATE_PLATFORM_FIELDS
+# define UV_STREAM_PRIVATE_PLATFORM_FIELDS /* empty */
+#endif
+
+/* Note: May be cast to struct iovec. See writev(2). */
+typedef struct uv_buf_t {
+  char* base;
+  size_t len;
+} uv_buf_t;
+
+typedef int uv_file;
+typedef int uv_os_sock_t;
+typedef int uv_os_fd_t;
+typedef pid_t uv_pid_t;
+
+#define UV_ONCE_INIT PTHREAD_ONCE_INIT
+
+typedef pthread_once_t uv_once_t;
+typedef pthread_t uv_thread_t;
+typedef pthread_mutex_t uv_mutex_t;
+typedef pthread_rwlock_t uv_rwlock_t;
+typedef UV_PLATFORM_SEM_T uv_sem_t;
+typedef pthread_cond_t uv_cond_t;
+typedef pthread_key_t uv_key_t;
+
+/* Note: guard clauses should match uv_barrier_init's in src/unix/thread.c. */
+#if defined(_AIX) || \
+    defined(__OpenBSD__) || \
+    !defined(PTHREAD_BARRIER_SERIAL_THREAD)
+/* TODO(bnoordhuis) Merge into uv_barrier_t in v2. */
+struct _uv_barrier {
+  uv_mutex_t mutex;
+  uv_cond_t cond;
+  unsigned threshold;
+  unsigned in;
+  unsigned out;
+};
+
+typedef struct {
+  struct _uv_barrier* b;
+# if defined(PTHREAD_BARRIER_SERIAL_THREAD)
+  /* TODO(bnoordhuis) Remove padding in v2. */
+  char pad[sizeof(pthread_barrier_t) - sizeof(struct _uv_barrier*)];
+# endif
+} uv_barrier_t;
+#else
+typedef pthread_barrier_t uv_barrier_t;
+#endif
+
+/* Platform-specific definitions for uv_spawn support. */
+typedef gid_t uv_gid_t;
+typedef uid_t uv_uid_t;
+
+typedef struct dirent uv__dirent_t;
+
+#define UV_DIR_PRIVATE_FIELDS \
+  DIR* dir;
+
+#if defined(DT_UNKNOWN)
+# define HAVE_DIRENT_TYPES
+# if defined(DT_REG)
+#  define UV__DT_FILE DT_REG
+# else
+#  define UV__DT_FILE -1
+# endif
+# if defined(DT_DIR)
+#  define UV__DT_DIR DT_DIR
+# else
+#  define UV__DT_DIR -2
+# endif
+# if defined(DT_LNK)
+#  define UV__DT_LINK DT_LNK
+# else
+#  define UV__DT_LINK -3
+# endif
+# if defined(DT_FIFO)
+#  define UV__DT_FIFO DT_FIFO
+# else
+#  define UV__DT_FIFO -4
+# endif
+# if defined(DT_SOCK)
+#  define UV__DT_SOCKET DT_SOCK
+# else
+#  define UV__DT_SOCKET -5
+# endif
+# if defined(DT_CHR)
+#  define UV__DT_CHAR DT_CHR
+# else
+#  define UV__DT_CHAR -6
+# endif
+# if defined(DT_BLK)
+#  define UV__DT_BLOCK DT_BLK
+# else
+#  define UV__DT_BLOCK -7
+# endif
+#endif
+
+/* Platform-specific definitions for uv_dlopen support. */
+#define UV_DYNAMIC /* empty */
+
+typedef struct {
+  void* handle;
+  char* errmsg;
+} uv_lib_t;
+
+#define UV_LOOP_PRIVATE_FIELDS                                                \
+  unsigned long flags;                                                        \
+  int backend_fd;                                                             \
+  void* pending_queue[2];                                                     \
+  void* watcher_queue[2];                                                     \
+  uv__io_t** watchers;                                                        \
+  unsigned int nwatchers;                                                     \
+  unsigned int nfds;                                                          \
+  void* wq[2];                                                                \
+  uv_mutex_t wq_mutex;                                                        \
+  uv_async_t wq_async;                                                        \
+  uv_rwlock_t cloexec_lock;                                                   \
+  uv_handle_t* closing_handles;                                               \
+  void* process_handles[2];                                                   \
+  void* prepare_handles[2];                                                   \
+  void* check_handles[2];                                                     \
+  void* idle_handles[2];                                                      \
+  void* async_handles[2];                                                     \
+  void (*async_unused)(void);  /* TODO(bnoordhuis) Remove in libuv v2. */     \
+  uv__io_t async_io_watcher;                                                  \
+  int async_wfd;                                                              \
+  struct {                                                                    \
+    void* min;                                                                \
+    unsigned int nelts;                                                       \
+  } timer_heap;                                                               \
+  uint64_t timer_counter;                                                     \
+  uint64_t time;                                                              \
+  int signal_pipefd[2];                                                       \
+  uv__io_t signal_io_watcher;                                                 \
+  uv_signal_t child_watcher;                                                  \
+  int emfile_fd;                                                              \
+  UV_PLATFORM_LOOP_FIELDS                                                     \
+
+#define UV_REQ_TYPE_PRIVATE /* empty */
+
+#define UV_REQ_PRIVATE_FIELDS  /* empty */
+
+#define UV_PRIVATE_REQ_TYPES /* empty */
+
+#define UV_WRITE_PRIVATE_FIELDS                                               \
+  void* queue[2];                                                             \
+  unsigned int write_index;                                                   \
+  uv_buf_t* bufs;                                                             \
+  unsigned int nbufs;                                                         \
+  int error;                                                                  \
+  uv_buf_t bufsml[4];                                                         \
+
+#define UV_CONNECT_PRIVATE_FIELDS                                             \
+  void* queue[2];                                                             \
+
+#define UV_SHUTDOWN_PRIVATE_FIELDS /* empty */
+
+#define UV_UDP_SEND_PRIVATE_FIELDS                                            \
+  void* queue[2];                                                             \
+  struct sockaddr_storage addr;                                               \
+  unsigned int nbufs;                                                         \
+  uv_buf_t* bufs;                                                             \
+  ssize_t status;                                                             \
+  uv_udp_send_cb send_cb;                                                     \
+  uv_buf_t bufsml[4];                                                         \
+
+#define UV_HANDLE_PRIVATE_FIELDS                                              \
+  uv_handle_t* next_closing;                                                  \
+  unsigned int flags;                                                         \
+
+#define UV_STREAM_PRIVATE_FIELDS                                              \
+  uv_connect_t *connect_req;                                                  \
+  uv_shutdown_t *shutdown_req;                                                \
+  uv__io_t io_watcher;                                                        \
+  void* write_queue[2];                                                       \
+  void* write_completed_queue[2];                                             \
+  uv_connection_cb connection_cb;                                             \
+  int delayed_error;                                                          \
+  int accepted_fd;                                                            \
+  void* queued_fds;                                                           \
+  UV_STREAM_PRIVATE_PLATFORM_FIELDS                                           \
+
+#define UV_TCP_PRIVATE_FIELDS /* empty */
+
+#define UV_UDP_PRIVATE_FIELDS                                                 \
+  uv_alloc_cb alloc_cb;                                                       \
+  uv_udp_recv_cb recv_cb;                                                     \
+  uv__io_t io_watcher;                                                        \
+  void* write_queue[2];                                                       \
+  void* write_completed_queue[2];                                             \
+
+#define UV_PIPE_PRIVATE_FIELDS                                                \
+  const char* pipe_fname; /* strdup'ed */
+
+#define UV_POLL_PRIVATE_FIELDS                                                \
+  uv__io_t io_watcher;
+
+#define UV_PREPARE_PRIVATE_FIELDS                                             \
+  uv_prepare_cb prepare_cb;                                                   \
+  void* queue[2];                                                             \
+
+#define UV_CHECK_PRIVATE_FIELDS                                               \
+  uv_check_cb check_cb;                                                       \
+  void* queue[2];                                                             \
+
+#define UV_IDLE_PRIVATE_FIELDS                                                \
+  uv_idle_cb idle_cb;                                                         \
+  void* queue[2];                                                             \
+
+#define UV_ASYNC_PRIVATE_FIELDS                                               \
+  uv_async_cb async_cb;                                                       \
+  void* queue[2];                                                             \
+  int pending;                                                                \
+
+#define UV_TIMER_PRIVATE_FIELDS                                               \
+  uv_timer_cb timer_cb;                                                       \
+  void* heap_node[3];                                                         \
+  uint64_t timeout;                                                           \
+  uint64_t repeat;                                                            \
+  uint64_t start_id;
+
+#define UV_GETADDRINFO_PRIVATE_FIELDS                                         \
+  struct uv__work work_req;                                                   \
+  uv_getaddrinfo_cb cb;                                                       \
+  struct addrinfo* hints;                                                     \
+  char* hostname;                                                             \
+  char* service;                                                              \
+  struct addrinfo* addrinfo;                                                  \
+  int retcode;
+
+#define UV_GETNAMEINFO_PRIVATE_FIELDS                                         \
+  struct uv__work work_req;                                                   \
+  uv_getnameinfo_cb getnameinfo_cb;                                           \
+  struct sockaddr_storage storage;                                            \
+  int flags;                                                                  \
+  char host[NI_MAXHOST];                                                      \
+  char service[NI_MAXSERV];                                                   \
+  int retcode;
+
+#define UV_PROCESS_PRIVATE_FIELDS                                             \
+  void* queue[2];                                                             \
+  int status;                                                                 \
+
+#define UV_FS_PRIVATE_FIELDS                                                  \
+  const char *new_path;                                                       \
+  uv_file file;                                                               \
+  int flags;                                                                  \
+  mode_t mode;                                                                \
+  unsigned int nbufs;                                                         \
+  uv_buf_t* bufs;                                                             \
+  off_t off;                                                                  \
+  uv_uid_t uid;                                                               \
+  uv_gid_t gid;                                                               \
+  double atime;                                                               \
+  double mtime;                                                               \
+  struct uv__work work_req;                                                   \
+  uv_buf_t bufsml[4];                                                         \
+
+#define UV_WORK_PRIVATE_FIELDS                                                \
+  struct uv__work work_req;
+
+#define UV_TTY_PRIVATE_FIELDS                                                 \
+  struct termios orig_termios;                                                \
+  int mode;
+
+#define UV_SIGNAL_PRIVATE_FIELDS                                              \
+  /* RB_ENTRY(uv_signal_s) tree_entry; */                                     \
+  struct {                                                                    \
+    struct uv_signal_s* rbe_left;                                             \
+    struct uv_signal_s* rbe_right;                                            \
+    struct uv_signal_s* rbe_parent;                                           \
+    int rbe_color;                                                            \
+  } tree_entry;                                                               \
+  /* Use two counters here so we don have to fiddle with atomics. */          \
+  unsigned int caught_signals;                                                \
+  unsigned int dispatched_signals;
+
+#define UV_FS_EVENT_PRIVATE_FIELDS                                            \
+  uv_fs_event_cb cb;                                                          \
+  UV_PLATFORM_FS_EVENT_FIELDS                                                 \
+
+/* fs open() flags supported on this platform: */
+#if defined(O_APPEND)
+# define UV_FS_O_APPEND       O_APPEND
+#else
+# define UV_FS_O_APPEND       0
+#endif
+#if defined(O_CREAT)
+# define UV_FS_O_CREAT        O_CREAT
+#else
+# define UV_FS_O_CREAT        0
+#endif
+
+#if defined(__linux__) && defined(__arm__)
+# define UV_FS_O_DIRECT       0x10000
+#elif defined(__linux__) && defined(__m68k__)
+# define UV_FS_O_DIRECT       0x10000
+#elif defined(__linux__) && defined(__mips__)
+# define UV_FS_O_DIRECT       0x08000
+#elif defined(__linux__) && defined(__powerpc__)
+# define UV_FS_O_DIRECT       0x20000
+#elif defined(__linux__) && defined(__s390x__)
+# define UV_FS_O_DIRECT       0x04000
+#elif defined(__linux__) && defined(__x86_64__)
+# define UV_FS_O_DIRECT       0x04000
+#elif defined(O_DIRECT)
+# define UV_FS_O_DIRECT       O_DIRECT
+#else
+# define UV_FS_O_DIRECT       0
+#endif
+
+#if defined(O_DIRECTORY)
+# define UV_FS_O_DIRECTORY    O_DIRECTORY
+#else
+# define UV_FS_O_DIRECTORY    0
+#endif
+#if defined(O_DSYNC)
+# define UV_FS_O_DSYNC        O_DSYNC
+#else
+# define UV_FS_O_DSYNC        0
+#endif
+#if defined(O_EXCL)
+# define UV_FS_O_EXCL         O_EXCL
+#else
+# define UV_FS_O_EXCL         0
+#endif
+#if defined(O_EXLOCK)
+# define UV_FS_O_EXLOCK       O_EXLOCK
+#else
+# define UV_FS_O_EXLOCK       0
+#endif
+#if defined(O_NOATIME)
+# define UV_FS_O_NOATIME      O_NOATIME
+#else
+# define UV_FS_O_NOATIME      0
+#endif
+#if defined(O_NOCTTY)
+# define UV_FS_O_NOCTTY       O_NOCTTY
+#else
+# define UV_FS_O_NOCTTY       0
+#endif
+#if defined(O_NOFOLLOW)
+# define UV_FS_O_NOFOLLOW     O_NOFOLLOW
+#else
+# define UV_FS_O_NOFOLLOW     0
+#endif
+#if defined(O_NONBLOCK)
+# define UV_FS_O_NONBLOCK     O_NONBLOCK
+#else
+# define UV_FS_O_NONBLOCK     0
+#endif
+#if defined(O_RDONLY)
+# define UV_FS_O_RDONLY       O_RDONLY
+#else
+# define UV_FS_O_RDONLY       0
+#endif
+#if defined(O_RDWR)
+# define UV_FS_O_RDWR         O_RDWR
+#else
+# define UV_FS_O_RDWR         0
+#endif
+#if defined(O_SYMLINK)
+# define UV_FS_O_SYMLINK      O_SYMLINK
+#else
+# define UV_FS_O_SYMLINK      0
+#endif
+#if defined(O_SYNC)
+# define UV_FS_O_SYNC         O_SYNC
+#else
+# define UV_FS_O_SYNC         0
+#endif
+#if defined(O_TRUNC)
+# define UV_FS_O_TRUNC        O_TRUNC
+#else
+# define UV_FS_O_TRUNC        0
+#endif
+#if defined(O_WRONLY)
+# define UV_FS_O_WRONLY       O_WRONLY
+#else
+# define UV_FS_O_WRONLY       0
+#endif
+
+/* fs open() flags supported on other platforms: */
+#define UV_FS_O_FILEMAP       0
+#define UV_FS_O_RANDOM        0
+#define UV_FS_O_SHORT_LIVED   0
+#define UV_FS_O_SEQUENTIAL    0
+#define UV_FS_O_TEMPORARY     0
+
+#endif /* UV_UNIX_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/version.h b/lwnode/apps/sqlite3/deps/include/uv/version.h
new file mode 100644 (file)
index 0000000..5272008
--- /dev/null
@@ -0,0 +1,43 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_VERSION_H
+#define UV_VERSION_H
+
+ /*
+ * Versions with the same major number are ABI stable. API is allowed to
+ * evolve between minor releases, but only in a backwards compatible way.
+ * Make sure you update the -soname directives in configure.ac
+ * whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but
+ * not UV_VERSION_PATCH.)
+ */
+
+#define UV_VERSION_MAJOR 1
+#define UV_VERSION_MINOR 40
+#define UV_VERSION_PATCH 0
+#define UV_VERSION_IS_RELEASE 1
+#define UV_VERSION_SUFFIX ""
+
+#define UV_VERSION_HEX  ((UV_VERSION_MAJOR << 16) | \
+                         (UV_VERSION_MINOR <<  8) | \
+                         (UV_VERSION_PATCH))
+
+#endif /* UV_VERSION_H */
diff --git a/lwnode/apps/sqlite3/deps/include/uv/win.h b/lwnode/apps/sqlite3/deps/include/uv/win.h
new file mode 100644 (file)
index 0000000..f5f1d3a
--- /dev/null
@@ -0,0 +1,691 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef _WIN32_WINNT
+# define _WIN32_WINNT   0x0600
+#endif
+
+#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
+typedef intptr_t ssize_t;
+# define SSIZE_MAX INTPTR_MAX
+# define _SSIZE_T_
+# define _SSIZE_T_DEFINED
+#endif
+
+#include <winsock2.h>
+
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
+typedef struct pollfd {
+  SOCKET fd;
+  short  events;
+  short  revents;
+} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
+#endif
+
+#ifndef LOCALE_INVARIANT
+# define LOCALE_INVARIANT 0x007f
+#endif
+
+#include <mswsock.h>
+#include <ws2tcpip.h>
+#include <windows.h>
+
+#include <process.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(_MSC_VER) && _MSC_VER < 1600
+# include "uv/stdint-msvc2008.h"
+#else
+# include <stdint.h>
+#endif
+
+#include "uv/tree.h"
+#include "uv/threadpool.h"
+
+#define MAX_PIPENAME_LEN 256
+
+#ifndef S_IFLNK
+# define S_IFLNK 0xA000
+#endif
+
+/* Additional signals supported by uv_signal and or uv_kill. The CRT defines
+ * the following signals already:
+ *
+ *   #define SIGINT           2
+ *   #define SIGILL           4
+ *   #define SIGABRT_COMPAT   6
+ *   #define SIGFPE           8
+ *   #define SIGSEGV         11
+ *   #define SIGTERM         15
+ *   #define SIGBREAK        21
+ *   #define SIGABRT         22
+ *
+ * The additional signals have values that are common on other Unix
+ * variants (Linux and Darwin)
+ */
+#define SIGHUP                1
+#define SIGKILL               9
+#define SIGWINCH             28
+
+/* Redefine NSIG to take SIGWINCH into consideration */
+#if defined(NSIG) && NSIG <= SIGWINCH
+# undef NSIG
+#endif
+#ifndef NSIG
+# define NSIG SIGWINCH + 1
+#endif
+
+/* The CRT defines SIGABRT_COMPAT as 6, which equals SIGABRT on many unix-like
+ * platforms. However MinGW doesn't define it, so we do. */
+#ifndef SIGABRT_COMPAT
+# define SIGABRT_COMPAT       6
+#endif
+
+/*
+ * Guids and typedefs for winsock extension functions
+ * Mingw32 doesn't have these :-(
+ */
+#ifndef WSAID_ACCEPTEX
+# define WSAID_ACCEPTEX                                                       \
+         {0xb5367df1, 0xcbac, 0x11cf,                                         \
+         {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
+
+# define WSAID_CONNECTEX                                                      \
+         {0x25a207b9, 0xddf3, 0x4660,                                         \
+         {0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}}
+
+# define WSAID_GETACCEPTEXSOCKADDRS                                           \
+         {0xb5367df2, 0xcbac, 0x11cf,                                         \
+         {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
+
+# define WSAID_DISCONNECTEX                                                   \
+         {0x7fda2e11, 0x8630, 0x436f,                                         \
+         {0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}}
+
+# define WSAID_TRANSMITFILE                                                   \
+         {0xb5367df0, 0xcbac, 0x11cf,                                         \
+         {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
+
+  typedef BOOL (PASCAL *LPFN_ACCEPTEX)
+                      (SOCKET sListenSocket,
+                       SOCKET sAcceptSocket,
+                       PVOID lpOutputBuffer,
+                       DWORD dwReceiveDataLength,
+                       DWORD dwLocalAddressLength,
+                       DWORD dwRemoteAddressLength,
+                       LPDWORD lpdwBytesReceived,
+                       LPOVERLAPPED lpOverlapped);
+
+  typedef BOOL (PASCAL *LPFN_CONNECTEX)
+                      (SOCKET s,
+                       const struct sockaddr* name,
+                       int namelen,
+                       PVOID lpSendBuffer,
+                       DWORD dwSendDataLength,
+                       LPDWORD lpdwBytesSent,
+                       LPOVERLAPPED lpOverlapped);
+
+  typedef void (PASCAL *LPFN_GETACCEPTEXSOCKADDRS)
+                      (PVOID lpOutputBuffer,
+                       DWORD dwReceiveDataLength,
+                       DWORD dwLocalAddressLength,
+                       DWORD dwRemoteAddressLength,
+                       LPSOCKADDR* LocalSockaddr,
+                       LPINT LocalSockaddrLength,
+                       LPSOCKADDR* RemoteSockaddr,
+                       LPINT RemoteSockaddrLength);
+
+  typedef BOOL (PASCAL *LPFN_DISCONNECTEX)
+                      (SOCKET hSocket,
+                       LPOVERLAPPED lpOverlapped,
+                       DWORD dwFlags,
+                       DWORD reserved);
+
+  typedef BOOL (PASCAL *LPFN_TRANSMITFILE)
+                      (SOCKET hSocket,
+                       HANDLE hFile,
+                       DWORD nNumberOfBytesToWrite,
+                       DWORD nNumberOfBytesPerSend,
+                       LPOVERLAPPED lpOverlapped,
+                       LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers,
+                       DWORD dwFlags);
+
+  typedef PVOID RTL_SRWLOCK;
+  typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
+#endif
+
+typedef int (WSAAPI* LPFN_WSARECV)
+            (SOCKET socket,
+             LPWSABUF buffers,
+             DWORD buffer_count,
+             LPDWORD bytes,
+             LPDWORD flags,
+             LPWSAOVERLAPPED overlapped,
+             LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);
+
+typedef int (WSAAPI* LPFN_WSARECVFROM)
+            (SOCKET socket,
+             LPWSABUF buffers,
+             DWORD buffer_count,
+             LPDWORD bytes,
+             LPDWORD flags,
+             struct sockaddr* addr,
+             LPINT addr_len,
+             LPWSAOVERLAPPED overlapped,
+             LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);
+
+#ifndef _NTDEF_
+  typedef LONG NTSTATUS;
+  typedef NTSTATUS *PNTSTATUS;
+#endif
+
+#ifndef RTL_CONDITION_VARIABLE_INIT
+  typedef PVOID CONDITION_VARIABLE, *PCONDITION_VARIABLE;
+#endif
+
+typedef struct _AFD_POLL_HANDLE_INFO {
+  HANDLE Handle;
+  ULONG Events;
+  NTSTATUS Status;
+} AFD_POLL_HANDLE_INFO, *PAFD_POLL_HANDLE_INFO;
+
+typedef struct _AFD_POLL_INFO {
+  LARGE_INTEGER Timeout;
+  ULONG NumberOfHandles;
+  ULONG Exclusive;
+  AFD_POLL_HANDLE_INFO Handles[1];
+} AFD_POLL_INFO, *PAFD_POLL_INFO;
+
+#define UV_MSAFD_PROVIDER_COUNT 3
+
+
+/**
+ * It should be possible to cast uv_buf_t[] to WSABUF[]
+ * see http://msdn.microsoft.com/en-us/library/ms741542(v=vs.85).aspx
+ */
+typedef struct uv_buf_t {
+  ULONG len;
+  char* base;
+} uv_buf_t;
+
+typedef int uv_file;
+typedef SOCKET uv_os_sock_t;
+typedef HANDLE uv_os_fd_t;
+typedef int uv_pid_t;
+
+typedef HANDLE uv_thread_t;
+
+typedef HANDLE uv_sem_t;
+
+typedef CRITICAL_SECTION uv_mutex_t;
+
+/* This condition variable implementation is based on the SetEvent solution
+ * (section 3.2) at http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
+ * We could not use the SignalObjectAndWait solution (section 3.4) because
+ * it want the 2nd argument (type uv_mutex_t) of uv_cond_wait() and
+ * uv_cond_timedwait() to be HANDLEs, but we use CRITICAL_SECTIONs.
+ */
+
+typedef union {
+  CONDITION_VARIABLE cond_var;
+  struct {
+    unsigned int waiters_count;
+    CRITICAL_SECTION waiters_count_lock;
+    HANDLE signal_event;
+    HANDLE broadcast_event;
+  } unused_; /* TODO: retained for ABI compatibility; remove me in v2.x. */
+} uv_cond_t;
+
+typedef union {
+  struct {
+    unsigned int num_readers_;
+    CRITICAL_SECTION num_readers_lock_;
+    HANDLE write_semaphore_;
+  } state_;
+  /* TODO: remove me in v2.x. */
+  struct {
+    SRWLOCK unused_;
+  } unused1_;
+  /* TODO: remove me in v2.x. */
+  struct {
+    uv_mutex_t unused1_;
+    uv_mutex_t unused2_;
+  } unused2_;
+} uv_rwlock_t;
+
+typedef struct {
+  unsigned int n;
+  unsigned int count;
+  uv_mutex_t mutex;
+  uv_sem_t turnstile1;
+  uv_sem_t turnstile2;
+} uv_barrier_t;
+
+typedef struct {
+  DWORD tls_index;
+} uv_key_t;
+
+#define UV_ONCE_INIT { 0, NULL }
+
+typedef struct uv_once_s {
+  unsigned char ran;
+  HANDLE event;
+} uv_once_t;
+
+/* Platform-specific definitions for uv_spawn support. */
+typedef unsigned char uv_uid_t;
+typedef unsigned char uv_gid_t;
+
+typedef struct uv__dirent_s {
+  int d_type;
+  char d_name[1];
+} uv__dirent_t;
+
+#define UV_DIR_PRIVATE_FIELDS \
+  HANDLE dir_handle;          \
+  WIN32_FIND_DATAW find_data; \
+  BOOL need_find_call;
+
+#define HAVE_DIRENT_TYPES
+#define UV__DT_DIR     UV_DIRENT_DIR
+#define UV__DT_FILE    UV_DIRENT_FILE
+#define UV__DT_LINK    UV_DIRENT_LINK
+#define UV__DT_FIFO    UV_DIRENT_FIFO
+#define UV__DT_SOCKET  UV_DIRENT_SOCKET
+#define UV__DT_CHAR    UV_DIRENT_CHAR
+#define UV__DT_BLOCK   UV_DIRENT_BLOCK
+
+/* Platform-specific definitions for uv_dlopen support. */
+#define UV_DYNAMIC FAR WINAPI
+typedef struct {
+  HMODULE handle;
+  char* errmsg;
+} uv_lib_t;
+
+#define UV_LOOP_PRIVATE_FIELDS                                                \
+    /* The loop's I/O completion port */                                      \
+  HANDLE iocp;                                                                \
+  /* The current time according to the event loop. in msecs. */               \
+  uint64_t time;                                                              \
+  /* Tail of a single-linked circular queue of pending reqs. If the queue */  \
+  /* is empty, tail_ is NULL. If there is only one item, */                   \
+  /* tail_->next_req == tail_ */                                              \
+  uv_req_t* pending_reqs_tail;                                                \
+  /* Head of a single-linked list of closed handles */                        \
+  uv_handle_t* endgame_handles;                                               \
+  /* TODO(bnoordhuis) Stop heap-allocating |timer_heap| in libuv v2.x. */     \
+  void* timer_heap;                                                           \
+    /* Lists of active loop (prepare / check / idle) watchers */              \
+  uv_prepare_t* prepare_handles;                                              \
+  uv_check_t* check_handles;                                                  \
+  uv_idle_t* idle_handles;                                                    \
+  /* This pointer will refer to the prepare/check/idle handle whose */        \
+  /* callback is scheduled to be called next. This is needed to allow */      \
+  /* safe removal from one of the lists above while that list being */        \
+  /* iterated over. */                                                        \
+  uv_prepare_t* next_prepare_handle;                                          \
+  uv_check_t* next_check_handle;                                              \
+  uv_idle_t* next_idle_handle;                                                \
+  /* This handle holds the peer sockets for the fast variant of uv_poll_t */  \
+  SOCKET poll_peer_sockets[UV_MSAFD_PROVIDER_COUNT];                          \
+  /* Counter to keep track of active tcp streams */                           \
+  unsigned int active_tcp_streams;                                            \
+  /* Counter to keep track of active udp streams */                           \
+  unsigned int active_udp_streams;                                            \
+  /* Counter to started timer */                                              \
+  uint64_t timer_counter;                                                     \
+  /* Threadpool */                                                            \
+  void* wq[2];                                                                \
+  uv_mutex_t wq_mutex;                                                        \
+  uv_async_t wq_async;
+
+#define UV_REQ_TYPE_PRIVATE                                                   \
+  /* TODO: remove the req suffix */                                           \
+  UV_ACCEPT,                                                                  \
+  UV_FS_EVENT_REQ,                                                            \
+  UV_POLL_REQ,                                                                \
+  UV_PROCESS_EXIT,                                                            \
+  UV_READ,                                                                    \
+  UV_UDP_RECV,                                                                \
+  UV_WAKEUP,                                                                  \
+  UV_SIGNAL_REQ,
+
+#define UV_REQ_PRIVATE_FIELDS                                                 \
+  union {                                                                     \
+    /* Used by I/O operations */                                              \
+    struct {                                                                  \
+      OVERLAPPED overlapped;                                                  \
+      size_t queued_bytes;                                                    \
+    } io;                                                                     \
+  } u;                                                                        \
+  struct uv_req_s* next_req;
+
+#define UV_WRITE_PRIVATE_FIELDS \
+  int coalesced;                \
+  uv_buf_t write_buffer;        \
+  HANDLE event_handle;          \
+  HANDLE wait_handle;
+
+#define UV_CONNECT_PRIVATE_FIELDS                                             \
+  /* empty */
+
+#define UV_SHUTDOWN_PRIVATE_FIELDS                                            \
+  /* empty */
+
+#define UV_UDP_SEND_PRIVATE_FIELDS                                            \
+  /* empty */
+
+#define UV_PRIVATE_REQ_TYPES                                                  \
+  typedef struct uv_pipe_accept_s {                                           \
+    UV_REQ_FIELDS                                                             \
+    HANDLE pipeHandle;                                                        \
+    struct uv_pipe_accept_s* next_pending;                                    \
+  } uv_pipe_accept_t;                                                         \
+                                                                              \
+  typedef struct uv_tcp_accept_s {                                            \
+    UV_REQ_FIELDS                                                             \
+    SOCKET accept_socket;                                                     \
+    char accept_buffer[sizeof(struct sockaddr_storage) * 2 + 32];             \
+    HANDLE event_handle;                                                      \
+    HANDLE wait_handle;                                                       \
+    struct uv_tcp_accept_s* next_pending;                                     \
+  } uv_tcp_accept_t;                                                          \
+                                                                              \
+  typedef struct uv_read_s {                                                  \
+    UV_REQ_FIELDS                                                             \
+    HANDLE event_handle;                                                      \
+    HANDLE wait_handle;                                                       \
+  } uv_read_t;
+
+#define uv_stream_connection_fields                                           \
+  unsigned int write_reqs_pending;                                            \
+  uv_shutdown_t* shutdown_req;
+
+#define uv_stream_server_fields                                               \
+  uv_connection_cb connection_cb;
+
+#define UV_STREAM_PRIVATE_FIELDS                                              \
+  unsigned int reqs_pending;                                                  \
+  int activecnt;                                                              \
+  uv_read_t read_req;                                                         \
+  union {                                                                     \
+    struct { uv_stream_connection_fields } conn;                              \
+    struct { uv_stream_server_fields     } serv;                              \
+  } stream;
+
+#define uv_tcp_server_fields                                                  \
+  uv_tcp_accept_t* accept_reqs;                                               \
+  unsigned int processed_accepts;                                             \
+  uv_tcp_accept_t* pending_accepts;                                           \
+  LPFN_ACCEPTEX func_acceptex;
+
+#define uv_tcp_connection_fields                                              \
+  uv_buf_t read_buffer;                                                       \
+  LPFN_CONNECTEX func_connectex;
+
+#define UV_TCP_PRIVATE_FIELDS                                                 \
+  SOCKET socket;                                                              \
+  int delayed_error;                                                          \
+  union {                                                                     \
+    struct { uv_tcp_server_fields } serv;                                     \
+    struct { uv_tcp_connection_fields } conn;                                 \
+  } tcp;
+
+#define UV_UDP_PRIVATE_FIELDS                                                 \
+  SOCKET socket;                                                              \
+  unsigned int reqs_pending;                                                  \
+  int activecnt;                                                              \
+  uv_req_t recv_req;                                                          \
+  uv_buf_t recv_buffer;                                                       \
+  struct sockaddr_storage recv_from;                                          \
+  int recv_from_len;                                                          \
+  uv_udp_recv_cb recv_cb;                                                     \
+  uv_alloc_cb alloc_cb;                                                       \
+  LPFN_WSARECV func_wsarecv;                                                  \
+  LPFN_WSARECVFROM func_wsarecvfrom;
+
+#define uv_pipe_server_fields                                                 \
+  int pending_instances;                                                      \
+  uv_pipe_accept_t* accept_reqs;                                              \
+  uv_pipe_accept_t* pending_accepts;
+
+#define uv_pipe_connection_fields                                             \
+  uv_timer_t* eof_timer;                                                      \
+  uv_write_t dummy; /* TODO: retained for ABI compat; remove this in v2.x. */ \
+  DWORD ipc_remote_pid;                                                       \
+  union {                                                                     \
+    uint32_t payload_remaining;                                               \
+    uint64_t dummy; /* TODO: retained for ABI compat; remove this in v2.x. */ \
+  } ipc_data_frame;                                                           \
+  void* ipc_xfer_queue[2];                                                    \
+  int ipc_xfer_queue_length;                                                  \
+  uv_write_t* non_overlapped_writes_tail;                                     \
+  CRITICAL_SECTION readfile_thread_lock;                                      \
+  volatile HANDLE readfile_thread_handle;
+
+#define UV_PIPE_PRIVATE_FIELDS                                                \
+  HANDLE handle;                                                              \
+  WCHAR* name;                                                                \
+  union {                                                                     \
+    struct { uv_pipe_server_fields } serv;                                    \
+    struct { uv_pipe_connection_fields } conn;                                \
+  } pipe;
+
+/* TODO: put the parser states in an union - TTY handles are always half-duplex
+ * so read-state can safely overlap write-state. */
+#define UV_TTY_PRIVATE_FIELDS                                                 \
+  HANDLE handle;                                                              \
+  union {                                                                     \
+    struct {                                                                  \
+      /* Used for readable TTY handles */                                     \
+      /* TODO: remove me in v2.x. */                                          \
+      HANDLE unused_;                                                         \
+      uv_buf_t read_line_buffer;                                              \
+      HANDLE read_raw_wait;                                                   \
+      /* Fields used for translating win keystrokes into vt100 characters */  \
+      char last_key[8];                                                       \
+      unsigned char last_key_offset;                                          \
+      unsigned char last_key_len;                                             \
+      WCHAR last_utf16_high_surrogate;                                        \
+      INPUT_RECORD last_input_record;                                         \
+    } rd;                                                                     \
+    struct {                                                                  \
+      /* Used for writable TTY handles */                                     \
+      /* utf8-to-utf16 conversion state */                                    \
+      unsigned int utf8_codepoint;                                            \
+      unsigned char utf8_bytes_left;                                          \
+      /* eol conversion state */                                              \
+      unsigned char previous_eol;                                             \
+      /* ansi parser state */                                                 \
+      unsigned short ansi_parser_state;                                       \
+      unsigned char ansi_csi_argc;                                            \
+      unsigned short ansi_csi_argv[4];                                        \
+      COORD saved_position;                                                   \
+      WORD saved_attributes;                                                  \
+    } wr;                                                                     \
+  } tty;
+
+#define UV_POLL_PRIVATE_FIELDS                                                \
+  SOCKET socket;                                                              \
+  /* Used in fast mode */                                                     \
+  SOCKET peer_socket;                                                         \
+  AFD_POLL_INFO afd_poll_info_1;                                              \
+  AFD_POLL_INFO afd_poll_info_2;                                              \
+  /* Used in fast and slow mode. */                                           \
+  uv_req_t poll_req_1;                                                        \
+  uv_req_t poll_req_2;                                                        \
+  unsigned char submitted_events_1;                                           \
+  unsigned char submitted_events_2;                                           \
+  unsigned char mask_events_1;                                                \
+  unsigned char mask_events_2;                                                \
+  unsigned char events;
+
+#define UV_TIMER_PRIVATE_FIELDS                                               \
+  void* heap_node[3];                                                         \
+  int unused;                                                                 \
+  uint64_t timeout;                                                           \
+  uint64_t repeat;                                                            \
+  uint64_t start_id;                                                          \
+  uv_timer_cb timer_cb;
+
+#define UV_ASYNC_PRIVATE_FIELDS                                               \
+  struct uv_req_s async_req;                                                  \
+  uv_async_cb async_cb;                                                       \
+  /* char to avoid alignment issues */                                        \
+  char volatile async_sent;
+
+#define UV_PREPARE_PRIVATE_FIELDS                                             \
+  uv_prepare_t* prepare_prev;                                                 \
+  uv_prepare_t* prepare_next;                                                 \
+  uv_prepare_cb prepare_cb;
+
+#define UV_CHECK_PRIVATE_FIELDS                                               \
+  uv_check_t* check_prev;                                                     \
+  uv_check_t* check_next;                                                     \
+  uv_check_cb check_cb;
+
+#define UV_IDLE_PRIVATE_FIELDS                                                \
+  uv_idle_t* idle_prev;                                                       \
+  uv_idle_t* idle_next;                                                       \
+  uv_idle_cb idle_cb;
+
+#define UV_HANDLE_PRIVATE_FIELDS                                              \
+  uv_handle_t* endgame_next;                                                  \
+  unsigned int flags;
+
+#define UV_GETADDRINFO_PRIVATE_FIELDS                                         \
+  struct uv__work work_req;                                                   \
+  uv_getaddrinfo_cb getaddrinfo_cb;                                           \
+  void* alloc;                                                                \
+  WCHAR* node;                                                                \
+  WCHAR* service;                                                             \
+  /* The addrinfoW field is used to store a pointer to the hints, and    */   \
+  /* later on to store the result of GetAddrInfoW. The final result will */   \
+  /* be converted to struct addrinfo* and stored in the addrinfo field.  */   \
+  struct addrinfoW* addrinfow;                                                \
+  struct addrinfo* addrinfo;                                                  \
+  int retcode;
+
+#define UV_GETNAMEINFO_PRIVATE_FIELDS                                         \
+  struct uv__work work_req;                                                   \
+  uv_getnameinfo_cb getnameinfo_cb;                                           \
+  struct sockaddr_storage storage;                                            \
+  int flags;                                                                  \
+  char host[NI_MAXHOST];                                                      \
+  char service[NI_MAXSERV];                                                   \
+  int retcode;
+
+#define UV_PROCESS_PRIVATE_FIELDS                                             \
+  struct uv_process_exit_s {                                                  \
+    UV_REQ_FIELDS                                                             \
+  } exit_req;                                                                 \
+  BYTE* child_stdio_buffer;                                                   \
+  int exit_signal;                                                            \
+  HANDLE wait_handle;                                                         \
+  HANDLE process_handle;                                                      \
+  volatile char exit_cb_pending;
+
+#define UV_FS_PRIVATE_FIELDS                                                  \
+  struct uv__work work_req;                                                   \
+  int flags;                                                                  \
+  DWORD sys_errno_;                                                           \
+  union {                                                                     \
+    /* TODO: remove me in 0.9. */                                             \
+    WCHAR* pathw;                                                             \
+    int fd;                                                                   \
+  } file;                                                                     \
+  union {                                                                     \
+    struct {                                                                  \
+      int mode;                                                               \
+      WCHAR* new_pathw;                                                       \
+      int file_flags;                                                         \
+      int fd_out;                                                             \
+      unsigned int nbufs;                                                     \
+      uv_buf_t* bufs;                                                         \
+      int64_t offset;                                                         \
+      uv_buf_t bufsml[4];                                                     \
+    } info;                                                                   \
+    struct {                                                                  \
+      double atime;                                                           \
+      double mtime;                                                           \
+    } time;                                                                   \
+  } fs;
+
+#define UV_WORK_PRIVATE_FIELDS                                                \
+  struct uv__work work_req;
+
+#define UV_FS_EVENT_PRIVATE_FIELDS                                            \
+  struct uv_fs_event_req_s {                                                  \
+    UV_REQ_FIELDS                                                             \
+  } req;                                                                      \
+  HANDLE dir_handle;                                                          \
+  int req_pending;                                                            \
+  uv_fs_event_cb cb;                                                          \
+  WCHAR* filew;                                                               \
+  WCHAR* short_filew;                                                         \
+  WCHAR* dirw;                                                                \
+  char* buffer;
+
+#define UV_SIGNAL_PRIVATE_FIELDS                                              \
+  RB_ENTRY(uv_signal_s) tree_entry;                                           \
+  struct uv_req_s signal_req;                                                 \
+  unsigned long pending_signum;
+
+#ifndef F_OK
+#define F_OK 0
+#endif
+#ifndef R_OK
+#define R_OK 4
+#endif
+#ifndef W_OK
+#define W_OK 2
+#endif
+#ifndef X_OK
+#define X_OK 1
+#endif
+
+/* fs open() flags supported on this platform: */
+#define UV_FS_O_APPEND       _O_APPEND
+#define UV_FS_O_CREAT        _O_CREAT
+#define UV_FS_O_EXCL         _O_EXCL
+#define UV_FS_O_FILEMAP      0x20000000
+#define UV_FS_O_RANDOM       _O_RANDOM
+#define UV_FS_O_RDONLY       _O_RDONLY
+#define UV_FS_O_RDWR         _O_RDWR
+#define UV_FS_O_SEQUENTIAL   _O_SEQUENTIAL
+#define UV_FS_O_SHORT_LIVED  _O_SHORT_LIVED
+#define UV_FS_O_TEMPORARY    _O_TEMPORARY
+#define UV_FS_O_TRUNC        _O_TRUNC
+#define UV_FS_O_WRONLY       _O_WRONLY
+
+/* fs open() flags supported on other platforms (or mapped on this platform): */
+#define UV_FS_O_DIRECT       0x02000000 /* FILE_FLAG_NO_BUFFERING */
+#define UV_FS_O_DIRECTORY    0
+#define UV_FS_O_DSYNC        0x04000000 /* FILE_FLAG_WRITE_THROUGH */
+#define UV_FS_O_EXLOCK       0x10000000 /* EXCLUSIVE SHARING MODE */
+#define UV_FS_O_NOATIME      0
+#define UV_FS_O_NOCTTY       0
+#define UV_FS_O_NOFOLLOW     0
+#define UV_FS_O_NONBLOCK     0
+#define UV_FS_O_SYMLINK      0
+#define UV_FS_O_SYNC         0x08000000 /* FILE_FLAG_WRITE_THROUGH */
diff --git a/lwnode/apps/sqlite3/deps/lwnode/lwnode b/lwnode/apps/sqlite3/deps/lwnode/lwnode
new file mode 100755 (executable)
index 0000000..4ca68f0
Binary files /dev/null and b/lwnode/apps/sqlite3/deps/lwnode/lwnode differ
diff --git a/lwnode/apps/sqlite3/jsconfig.json b/lwnode/apps/sqlite3/jsconfig.json
new file mode 100644 (file)
index 0000000..6ea02f4
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "compilerOptions": {
+      "baseUrl": "./src"
+  }
+}
diff --git a/lwnode/apps/sqlite3/jsdoc.json b/lwnode/apps/sqlite3/jsdoc.json
new file mode 100644 (file)
index 0000000..8e1080f
--- /dev/null
@@ -0,0 +1,25 @@
+{
+    "tags": {
+      "allowUnknownTags": false
+    },
+    "source": {
+      "include": "./out/frontend",
+      "includePattern": "\\.js$",
+      "excludePattern": "(node_modules/|docs)"
+    },
+    "opts": {
+      "template": "node_modules/docdash",
+      "encoding": "utf8",
+      "destination": "docs/",
+      "recurse": true,
+      "verbose": true
+    },
+    "templates": {
+      "default": {
+        "cleverLinks": false,
+        "monospaceLinks": false,
+        "outputSourceFiles": false,
+        "outputSourcePath": false
+      }
+    }
+  }
\ No newline at end of file
diff --git a/lwnode/apps/sqlite3/package-lock.json b/lwnode/apps/sqlite3/package-lock.json
new file mode 100644 (file)
index 0000000..105a4d4
--- /dev/null
@@ -0,0 +1,12969 @@
+{
+  "name": "sqlite3-service",
+  "version": "1.0.0",
+  "lockfileVersion": 1,
+  "requires": true,
+  "dependencies": {
+    "@babel/code-frame": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+      "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+      "dev": true,
+      "requires": {
+        "@babel/highlight": "^7.10.4"
+      }
+    },
+    "@babel/compat-data": {
+      "version": "7.12.7",
+      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.7.tgz",
+      "integrity": "sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw==",
+      "dev": true
+    },
+    "@babel/core": {
+      "version": "7.12.10",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz",
+      "integrity": "sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.10.4",
+        "@babel/generator": "^7.12.10",
+        "@babel/helper-module-transforms": "^7.12.1",
+        "@babel/helpers": "^7.12.5",
+        "@babel/parser": "^7.12.10",
+        "@babel/template": "^7.12.7",
+        "@babel/traverse": "^7.12.10",
+        "@babel/types": "^7.12.10",
+        "convert-source-map": "^1.7.0",
+        "debug": "^4.1.0",
+        "gensync": "^1.0.0-beta.1",
+        "json5": "^2.1.2",
+        "lodash": "^4.17.19",
+        "semver": "^5.4.1",
+        "source-map": "^0.5.0"
+      },
+      "dependencies": {
+        "@babel/parser": {
+          "version": "7.12.11",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
+          "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==",
+          "dev": true
+        },
+        "convert-source-map": {
+          "version": "1.7.0",
+          "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
+          "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.1"
+          }
+        },
+        "json5": {
+          "version": "2.1.3",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
+          "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        }
+      }
+    },
+    "@babel/generator": {
+      "version": "7.12.11",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz",
+      "integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.11",
+        "jsesc": "^2.5.1",
+        "source-map": "^0.5.0"
+      }
+    },
+    "@babel/helper-annotate-as-pure": {
+      "version": "7.12.10",
+      "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz",
+      "integrity": "sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.10"
+      }
+    },
+    "@babel/helper-builder-binary-assignment-operator-visitor": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz",
+      "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-explode-assignable-expression": "^7.10.4",
+        "@babel/types": "^7.10.4"
+      }
+    },
+    "@babel/helper-compilation-targets": {
+      "version": "7.12.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz",
+      "integrity": "sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw==",
+      "dev": true,
+      "requires": {
+        "@babel/compat-data": "^7.12.5",
+        "@babel/helper-validator-option": "^7.12.1",
+        "browserslist": "^4.14.5",
+        "semver": "^5.5.0"
+      }
+    },
+    "@babel/helper-create-class-features-plugin": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz",
+      "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-function-name": "^7.10.4",
+        "@babel/helper-member-expression-to-functions": "^7.12.1",
+        "@babel/helper-optimise-call-expression": "^7.10.4",
+        "@babel/helper-replace-supers": "^7.12.1",
+        "@babel/helper-split-export-declaration": "^7.10.4"
+      }
+    },
+    "@babel/helper-create-regexp-features-plugin": {
+      "version": "7.12.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz",
+      "integrity": "sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.10.4",
+        "regexpu-core": "^4.7.1"
+      }
+    },
+    "@babel/helper-define-map": {
+      "version": "7.10.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz",
+      "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-function-name": "^7.10.4",
+        "@babel/types": "^7.10.5",
+        "lodash": "^4.17.19"
+      }
+    },
+    "@babel/helper-explode-assignable-expression": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz",
+      "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.1"
+      }
+    },
+    "@babel/helper-function-name": {
+      "version": "7.12.11",
+      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz",
+      "integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-get-function-arity": "^7.12.10",
+        "@babel/template": "^7.12.7",
+        "@babel/types": "^7.12.11"
+      }
+    },
+    "@babel/helper-get-function-arity": {
+      "version": "7.12.10",
+      "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz",
+      "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.10"
+      }
+    },
+    "@babel/helper-hoist-variables": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz",
+      "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.10.4"
+      }
+    },
+    "@babel/helper-member-expression-to-functions": {
+      "version": "7.12.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz",
+      "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.7"
+      }
+    },
+    "@babel/helper-module-imports": {
+      "version": "7.12.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz",
+      "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.5"
+      }
+    },
+    "@babel/helper-module-transforms": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz",
+      "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-imports": "^7.12.1",
+        "@babel/helper-replace-supers": "^7.12.1",
+        "@babel/helper-simple-access": "^7.12.1",
+        "@babel/helper-split-export-declaration": "^7.11.0",
+        "@babel/helper-validator-identifier": "^7.10.4",
+        "@babel/template": "^7.10.4",
+        "@babel/traverse": "^7.12.1",
+        "@babel/types": "^7.12.1",
+        "lodash": "^4.17.19"
+      }
+    },
+    "@babel/helper-optimise-call-expression": {
+      "version": "7.12.10",
+      "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz",
+      "integrity": "sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.10"
+      }
+    },
+    "@babel/helper-plugin-utils": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
+      "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+      "dev": true
+    },
+    "@babel/helper-remap-async-to-generator": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz",
+      "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.10.4",
+        "@babel/helper-wrap-function": "^7.10.4",
+        "@babel/types": "^7.12.1"
+      }
+    },
+    "@babel/helper-replace-supers": {
+      "version": "7.12.11",
+      "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz",
+      "integrity": "sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-member-expression-to-functions": "^7.12.7",
+        "@babel/helper-optimise-call-expression": "^7.12.10",
+        "@babel/traverse": "^7.12.10",
+        "@babel/types": "^7.12.11"
+      }
+    },
+    "@babel/helper-simple-access": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz",
+      "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.1"
+      }
+    },
+    "@babel/helper-skip-transparent-expression-wrappers": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz",
+      "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.1"
+      }
+    },
+    "@babel/helper-split-export-declaration": {
+      "version": "7.12.11",
+      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz",
+      "integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.11"
+      }
+    },
+    "@babel/helper-validator-identifier": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
+      "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
+      "dev": true
+    },
+    "@babel/helper-validator-option": {
+      "version": "7.12.11",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz",
+      "integrity": "sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw==",
+      "dev": true
+    },
+    "@babel/helper-wrap-function": {
+      "version": "7.12.3",
+      "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz",
+      "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-function-name": "^7.10.4",
+        "@babel/template": "^7.10.4",
+        "@babel/traverse": "^7.10.4",
+        "@babel/types": "^7.10.4"
+      }
+    },
+    "@babel/helpers": {
+      "version": "7.12.5",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz",
+      "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==",
+      "dev": true,
+      "requires": {
+        "@babel/template": "^7.10.4",
+        "@babel/traverse": "^7.12.5",
+        "@babel/types": "^7.12.5"
+      }
+    },
+    "@babel/highlight": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+      "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-validator-identifier": "^7.10.4",
+        "chalk": "^2.0.0",
+        "js-tokens": "^4.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "@babel/parser": {
+      "version": "7.12.7",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz",
+      "integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==",
+      "dev": true
+    },
+    "@babel/plugin-proposal-async-generator-functions": {
+      "version": "7.12.12",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.12.tgz",
+      "integrity": "sha512-nrz9y0a4xmUrRq51bYkWJIO5SBZyG2ys2qinHsN0zHDHVsUaModrkpyWWWXfGqYQmOL3x9sQIcTNN/pBGpo09A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-remap-async-to-generator": "^7.12.1",
+        "@babel/plugin-syntax-async-generators": "^7.8.0"
+      }
+    },
+    "@babel/plugin-proposal-class-properties": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz",
+      "integrity": "sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-class-features-plugin": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-proposal-dynamic-import": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz",
+      "integrity": "sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-dynamic-import": "^7.8.0"
+      }
+    },
+    "@babel/plugin-proposal-export-namespace-from": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz",
+      "integrity": "sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-export-namespace-from": "^7.8.3"
+      }
+    },
+    "@babel/plugin-proposal-json-strings": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz",
+      "integrity": "sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-json-strings": "^7.8.0"
+      }
+    },
+    "@babel/plugin-proposal-logical-assignment-operators": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz",
+      "integrity": "sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
+      }
+    },
+    "@babel/plugin-proposal-nullish-coalescing-operator": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz",
+      "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0"
+      }
+    },
+    "@babel/plugin-proposal-numeric-separator": {
+      "version": "7.12.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz",
+      "integrity": "sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-numeric-separator": "^7.10.4"
+      }
+    },
+    "@babel/plugin-proposal-object-rest-spread": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz",
+      "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
+        "@babel/plugin-transform-parameters": "^7.12.1"
+      }
+    },
+    "@babel/plugin-proposal-optional-catch-binding": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz",
+      "integrity": "sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-optional-catch-binding": "^7.8.0"
+      }
+    },
+    "@babel/plugin-proposal-optional-chaining": {
+      "version": "7.12.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz",
+      "integrity": "sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1",
+        "@babel/plugin-syntax-optional-chaining": "^7.8.0"
+      }
+    },
+    "@babel/plugin-proposal-private-methods": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz",
+      "integrity": "sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-class-features-plugin": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-proposal-unicode-property-regex": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz",
+      "integrity": "sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-regexp-features-plugin": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-syntax-async-generators": {
+      "version": "7.8.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
+      "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-class-properties": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz",
+      "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-syntax-dynamic-import": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
+      "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-export-namespace-from": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz",
+      "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.3"
+      }
+    },
+    "@babel/plugin-syntax-flow": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.12.1.tgz",
+      "integrity": "sha512-1lBLLmtxrwpm4VKmtVFselI/P3pX+G63fAtUUt6b2Nzgao77KNDwyuRt90Mj2/9pKobtt68FdvjfqohZjg/FCA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-syntax-json-strings": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+      "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-jsx": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz",
+      "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-syntax-logical-assignment-operators": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+      "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-syntax-nullish-coalescing-operator": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
+      "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-numeric-separator": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
+      "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-syntax-object-rest-spread": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
+      "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-optional-catch-binding": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
+      "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-optional-chaining": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
+      "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-top-level-await": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz",
+      "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-arrow-functions": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz",
+      "integrity": "sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-async-to-generator": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz",
+      "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-imports": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-remap-async-to-generator": "^7.12.1"
+      }
+    },
+    "@babel/plugin-transform-block-scoped-functions": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz",
+      "integrity": "sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-block-scoping": {
+      "version": "7.12.12",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz",
+      "integrity": "sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-classes": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz",
+      "integrity": "sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.10.4",
+        "@babel/helper-define-map": "^7.10.4",
+        "@babel/helper-function-name": "^7.10.4",
+        "@babel/helper-optimise-call-expression": "^7.10.4",
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-replace-supers": "^7.12.1",
+        "@babel/helper-split-export-declaration": "^7.10.4",
+        "globals": "^11.1.0"
+      },
+      "dependencies": {
+        "globals": {
+          "version": "11.12.0",
+          "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+          "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-computed-properties": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz",
+      "integrity": "sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-destructuring": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz",
+      "integrity": "sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-dotall-regex": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz",
+      "integrity": "sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-regexp-features-plugin": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-duplicate-keys": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz",
+      "integrity": "sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-exponentiation-operator": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz",
+      "integrity": "sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4",
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-flow-strip-types": {
+      "version": "7.12.10",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.12.10.tgz",
+      "integrity": "sha512-0ti12wLTLeUIzu9U7kjqIn4MyOL7+Wibc7avsHhj4o1l5C0ATs8p2IMHrVYjm9t9wzhfEO6S3kxax0Rpdo8LTg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-flow": "^7.12.1"
+      }
+    },
+    "@babel/plugin-transform-for-of": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz",
+      "integrity": "sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-function-name": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz",
+      "integrity": "sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-function-name": "^7.10.4",
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-literals": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz",
+      "integrity": "sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-member-expression-literals": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz",
+      "integrity": "sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-modules-amd": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz",
+      "integrity": "sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-transforms": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "babel-plugin-dynamic-import-node": "^2.3.3"
+      }
+    },
+    "@babel/plugin-transform-modules-commonjs": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz",
+      "integrity": "sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-transforms": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-simple-access": "^7.12.1",
+        "babel-plugin-dynamic-import-node": "^2.3.3"
+      }
+    },
+    "@babel/plugin-transform-modules-systemjs": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz",
+      "integrity": "sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-hoist-variables": "^7.10.4",
+        "@babel/helper-module-transforms": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-validator-identifier": "^7.10.4",
+        "babel-plugin-dynamic-import-node": "^2.3.3"
+      }
+    },
+    "@babel/plugin-transform-modules-umd": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz",
+      "integrity": "sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-transforms": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-named-capturing-groups-regex": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz",
+      "integrity": "sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-regexp-features-plugin": "^7.12.1"
+      }
+    },
+    "@babel/plugin-transform-new-target": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz",
+      "integrity": "sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-object-super": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz",
+      "integrity": "sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-replace-supers": "^7.12.1"
+      }
+    },
+    "@babel/plugin-transform-parameters": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz",
+      "integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-property-literals": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz",
+      "integrity": "sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-react-jsx": {
+      "version": "7.12.12",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.12.tgz",
+      "integrity": "sha512-JDWGuzGNWscYcq8oJVCtSE61a5+XAOos+V0HrxnDieUus4UMnBEosDnY1VJqU5iZ4pA04QY7l0+JvHL1hZEfsw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.12.10",
+        "@babel/helper-module-imports": "^7.12.5",
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/plugin-syntax-jsx": "^7.12.1",
+        "@babel/types": "^7.12.12"
+      }
+    },
+    "@babel/plugin-transform-regenerator": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz",
+      "integrity": "sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==",
+      "dev": true,
+      "requires": {
+        "regenerator-transform": "^0.14.2"
+      }
+    },
+    "@babel/plugin-transform-reserved-words": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz",
+      "integrity": "sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-shorthand-properties": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz",
+      "integrity": "sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-spread": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz",
+      "integrity": "sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1"
+      }
+    },
+    "@babel/plugin-transform-sticky-regex": {
+      "version": "7.12.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz",
+      "integrity": "sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-template-literals": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz",
+      "integrity": "sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-typeof-symbol": {
+      "version": "7.12.10",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz",
+      "integrity": "sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-unicode-escapes": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz",
+      "integrity": "sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-transform-unicode-regex": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz",
+      "integrity": "sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-regexp-features-plugin": "^7.12.1",
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/preset-env": {
+      "version": "7.12.11",
+      "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.11.tgz",
+      "integrity": "sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw==",
+      "dev": true,
+      "requires": {
+        "@babel/compat-data": "^7.12.7",
+        "@babel/helper-compilation-targets": "^7.12.5",
+        "@babel/helper-module-imports": "^7.12.5",
+        "@babel/helper-plugin-utils": "^7.10.4",
+        "@babel/helper-validator-option": "^7.12.11",
+        "@babel/plugin-proposal-async-generator-functions": "^7.12.1",
+        "@babel/plugin-proposal-class-properties": "^7.12.1",
+        "@babel/plugin-proposal-dynamic-import": "^7.12.1",
+        "@babel/plugin-proposal-export-namespace-from": "^7.12.1",
+        "@babel/plugin-proposal-json-strings": "^7.12.1",
+        "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1",
+        "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
+        "@babel/plugin-proposal-numeric-separator": "^7.12.7",
+        "@babel/plugin-proposal-object-rest-spread": "^7.12.1",
+        "@babel/plugin-proposal-optional-catch-binding": "^7.12.1",
+        "@babel/plugin-proposal-optional-chaining": "^7.12.7",
+        "@babel/plugin-proposal-private-methods": "^7.12.1",
+        "@babel/plugin-proposal-unicode-property-regex": "^7.12.1",
+        "@babel/plugin-syntax-async-generators": "^7.8.0",
+        "@babel/plugin-syntax-class-properties": "^7.12.1",
+        "@babel/plugin-syntax-dynamic-import": "^7.8.0",
+        "@babel/plugin-syntax-export-namespace-from": "^7.8.3",
+        "@babel/plugin-syntax-json-strings": "^7.8.0",
+        "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
+        "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0",
+        "@babel/plugin-syntax-numeric-separator": "^7.10.4",
+        "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
+        "@babel/plugin-syntax-optional-catch-binding": "^7.8.0",
+        "@babel/plugin-syntax-optional-chaining": "^7.8.0",
+        "@babel/plugin-syntax-top-level-await": "^7.12.1",
+        "@babel/plugin-transform-arrow-functions": "^7.12.1",
+        "@babel/plugin-transform-async-to-generator": "^7.12.1",
+        "@babel/plugin-transform-block-scoped-functions": "^7.12.1",
+        "@babel/plugin-transform-block-scoping": "^7.12.11",
+        "@babel/plugin-transform-classes": "^7.12.1",
+        "@babel/plugin-transform-computed-properties": "^7.12.1",
+        "@babel/plugin-transform-destructuring": "^7.12.1",
+        "@babel/plugin-transform-dotall-regex": "^7.12.1",
+        "@babel/plugin-transform-duplicate-keys": "^7.12.1",
+        "@babel/plugin-transform-exponentiation-operator": "^7.12.1",
+        "@babel/plugin-transform-for-of": "^7.12.1",
+        "@babel/plugin-transform-function-name": "^7.12.1",
+        "@babel/plugin-transform-literals": "^7.12.1",
+        "@babel/plugin-transform-member-expression-literals": "^7.12.1",
+        "@babel/plugin-transform-modules-amd": "^7.12.1",
+        "@babel/plugin-transform-modules-commonjs": "^7.12.1",
+        "@babel/plugin-transform-modules-systemjs": "^7.12.1",
+        "@babel/plugin-transform-modules-umd": "^7.12.1",
+        "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1",
+        "@babel/plugin-transform-new-target": "^7.12.1",
+        "@babel/plugin-transform-object-super": "^7.12.1",
+        "@babel/plugin-transform-parameters": "^7.12.1",
+        "@babel/plugin-transform-property-literals": "^7.12.1",
+        "@babel/plugin-transform-regenerator": "^7.12.1",
+        "@babel/plugin-transform-reserved-words": "^7.12.1",
+        "@babel/plugin-transform-shorthand-properties": "^7.12.1",
+        "@babel/plugin-transform-spread": "^7.12.1",
+        "@babel/plugin-transform-sticky-regex": "^7.12.7",
+        "@babel/plugin-transform-template-literals": "^7.12.1",
+        "@babel/plugin-transform-typeof-symbol": "^7.12.10",
+        "@babel/plugin-transform-unicode-escapes": "^7.12.1",
+        "@babel/plugin-transform-unicode-regex": "^7.12.1",
+        "@babel/preset-modules": "^0.1.3",
+        "@babel/types": "^7.12.11",
+        "core-js-compat": "^3.8.0",
+        "semver": "^5.5.0"
+      }
+    },
+    "@babel/preset-modules": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz",
+      "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.0.0",
+        "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
+        "@babel/plugin-transform-dotall-regex": "^7.4.4",
+        "@babel/types": "^7.4.4",
+        "esutils": "^2.0.2"
+      }
+    },
+    "@babel/runtime": {
+      "version": "7.12.5",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",
+      "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
+      "dev": true,
+      "requires": {
+        "regenerator-runtime": "^0.13.4"
+      }
+    },
+    "@babel/template": {
+      "version": "7.12.7",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz",
+      "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.10.4",
+        "@babel/parser": "^7.12.7",
+        "@babel/types": "^7.12.7"
+      }
+    },
+    "@babel/traverse": {
+      "version": "7.12.12",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz",
+      "integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.12.11",
+        "@babel/generator": "^7.12.11",
+        "@babel/helper-function-name": "^7.12.11",
+        "@babel/helper-split-export-declaration": "^7.12.11",
+        "@babel/parser": "^7.12.11",
+        "@babel/types": "^7.12.12",
+        "debug": "^4.1.0",
+        "globals": "^11.1.0",
+        "lodash": "^4.17.19"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.12.11",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
+          "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.10.4"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.12.11",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
+          "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==",
+          "dev": true
+        },
+        "globals": {
+          "version": "11.12.0",
+          "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+          "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/types": {
+      "version": "7.12.12",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
+      "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-validator-identifier": "^7.12.11",
+        "lodash": "^4.17.19",
+        "to-fast-properties": "^2.0.0"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.12.11",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
+          "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==",
+          "dev": true
+        }
+      }
+    },
+    "@eslint/eslintrc": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz",
+      "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==",
+      "dev": true,
+      "requires": {
+        "ajv": "^6.12.4",
+        "debug": "^4.1.1",
+        "espree": "^7.3.0",
+        "globals": "^12.1.0",
+        "ignore": "^4.0.6",
+        "import-fresh": "^3.2.1",
+        "js-yaml": "^3.13.1",
+        "lodash": "^4.17.19",
+        "minimatch": "^3.0.4",
+        "strip-json-comments": "^3.1.1"
+      },
+      "dependencies": {
+        "strip-json-comments": {
+          "version": "3.1.1",
+          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+          "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+          "dev": true
+        }
+      }
+    },
+    "@iarna/toml": {
+      "version": "2.2.5",
+      "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
+      "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==",
+      "dev": true
+    },
+    "@istanbuljs/load-nyc-config": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
+      "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
+      "dev": true,
+      "requires": {
+        "camelcase": "^5.3.1",
+        "find-up": "^4.1.0",
+        "get-package-type": "^0.1.0",
+        "js-yaml": "^3.13.1",
+        "resolve-from": "^5.0.0"
+      },
+      "dependencies": {
+        "find-up": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+          "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^5.0.0",
+            "path-exists": "^4.0.0"
+          }
+        },
+        "locate-path": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+          "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^4.1.0"
+          }
+        },
+        "p-limit": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+          "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+          "dev": true,
+          "requires": {
+            "p-try": "^2.0.0"
+          }
+        },
+        "p-locate": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+          "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.2.0"
+          }
+        },
+        "p-try": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+          "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+          "dev": true
+        },
+        "path-exists": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+          "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+          "dev": true
+        },
+        "resolve-from": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+          "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+          "dev": true
+        }
+      }
+    },
+    "@istanbuljs/schema": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
+      "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
+      "dev": true
+    },
+    "@mrmlnc/readdir-enhanced": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
+      "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
+      "dev": true,
+      "requires": {
+        "call-me-maybe": "^1.0.1",
+        "glob-to-regexp": "^0.3.0"
+      }
+    },
+    "@nodelib/fs.stat": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
+      "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
+      "dev": true
+    },
+    "@parcel/fs": {
+      "version": "1.11.0",
+      "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-1.11.0.tgz",
+      "integrity": "sha512-86RyEqULbbVoeo8OLcv+LQ1Vq2PKBAvWTU9fCgALxuCTbbs5Ppcvll4Vr+Ko1AnmMzja/k++SzNAwJfeQXVlpA==",
+      "dev": true,
+      "requires": {
+        "@parcel/utils": "^1.11.0",
+        "mkdirp": "^0.5.1",
+        "rimraf": "^2.6.2"
+      }
+    },
+    "@parcel/logger": {
+      "version": "1.11.1",
+      "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-1.11.1.tgz",
+      "integrity": "sha512-9NF3M6UVeP2udOBDILuoEHd8VrF4vQqoWHEafymO1pfSoOMfxrSJZw1MfyAAIUN/IFp9qjcpDCUbDZB+ioVevA==",
+      "dev": true,
+      "requires": {
+        "@parcel/workers": "^1.11.0",
+        "chalk": "^2.1.0",
+        "grapheme-breaker": "^0.3.2",
+        "ora": "^2.1.0",
+        "strip-ansi": "^4.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "@parcel/utils": {
+      "version": "1.11.0",
+      "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-1.11.0.tgz",
+      "integrity": "sha512-cA3p4jTlaMeOtAKR/6AadanOPvKeg8VwgnHhOyfi0yClD0TZS/hi9xu12w4EzA/8NtHu0g6o4RDfcNjqN8l1AQ==",
+      "dev": true
+    },
+    "@parcel/watcher": {
+      "version": "1.12.1",
+      "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-1.12.1.tgz",
+      "integrity": "sha512-od+uCtCxC/KoNQAIE1vWx1YTyKYY+7CTrxBJPRh3cDWw/C0tCtlBMVlrbplscGoEpt6B27KhJDCv82PBxOERNA==",
+      "dev": true,
+      "requires": {
+        "@parcel/utils": "^1.11.0",
+        "chokidar": "^2.1.5"
+      },
+      "dependencies": {
+        "anymatch": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+          "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+          "dev": true,
+          "requires": {
+            "micromatch": "^3.1.4",
+            "normalize-path": "^2.1.1"
+          },
+          "dependencies": {
+            "normalize-path": {
+              "version": "2.1.1",
+              "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+              "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+              "dev": true,
+              "requires": {
+                "remove-trailing-separator": "^1.0.1"
+              }
+            }
+          }
+        },
+        "binary-extensions": {
+          "version": "1.13.1",
+          "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+          "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
+          "dev": true
+        },
+        "braces": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+          "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+          "dev": true,
+          "requires": {
+            "arr-flatten": "^1.1.0",
+            "array-unique": "^0.3.2",
+            "extend-shallow": "^2.0.1",
+            "fill-range": "^4.0.0",
+            "isobject": "^3.0.1",
+            "repeat-element": "^1.1.2",
+            "snapdragon": "^0.8.1",
+            "snapdragon-node": "^2.0.1",
+            "split-string": "^3.0.2",
+            "to-regex": "^3.0.1"
+          }
+        },
+        "chokidar": {
+          "version": "2.1.8",
+          "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
+          "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
+          "dev": true,
+          "requires": {
+            "anymatch": "^2.0.0",
+            "async-each": "^1.0.1",
+            "braces": "^2.3.2",
+            "fsevents": "^1.2.7",
+            "glob-parent": "^3.1.0",
+            "inherits": "^2.0.3",
+            "is-binary-path": "^1.0.0",
+            "is-glob": "^4.0.0",
+            "normalize-path": "^3.0.0",
+            "path-is-absolute": "^1.0.0",
+            "readdirp": "^2.2.1",
+            "upath": "^1.1.1"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "requires": {
+            "extend-shallow": "^2.0.1",
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1",
+            "to-regex-range": "^2.1.0"
+          }
+        },
+        "fsevents": {
+          "version": "1.2.13",
+          "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+          "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "bindings": "^1.5.0",
+            "nan": "^2.12.1"
+          }
+        },
+        "glob-parent": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+          "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+          "dev": true,
+          "requires": {
+            "is-glob": "^3.1.0",
+            "path-dirname": "^1.0.0"
+          },
+          "dependencies": {
+            "is-glob": {
+              "version": "3.1.0",
+              "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+              "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+              "dev": true,
+              "requires": {
+                "is-extglob": "^2.1.0"
+              }
+            }
+          }
+        },
+        "is-binary-path": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+          "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+          "dev": true,
+          "requires": {
+            "binary-extensions": "^1.0.0"
+          }
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          }
+        },
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        },
+        "readdirp": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+          "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "^4.1.11",
+            "micromatch": "^3.1.10",
+            "readable-stream": "^2.0.2"
+          }
+        },
+        "to-regex-range": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+          "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+          "dev": true,
+          "requires": {
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1"
+          }
+        }
+      }
+    },
+    "@parcel/workers": {
+      "version": "1.11.0",
+      "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-1.11.0.tgz",
+      "integrity": "sha512-USSjRAAQYsZFlv43FUPdD+jEGML5/8oLF0rUzPQTtK4q9kvaXr49F5ZplyLz5lox78cLZ0TxN2bIDQ1xhOkulQ==",
+      "dev": true,
+      "requires": {
+        "@parcel/utils": "^1.11.0",
+        "physical-cpu-count": "^2.0.0"
+      }
+    },
+    "@types/body-parser": {
+      "version": "1.19.2",
+      "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
+      "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
+      "dev": true,
+      "requires": {
+        "@types/connect": "*",
+        "@types/node": "*"
+      }
+    },
+    "@types/browserify": {
+      "version": "12.0.36",
+      "resolved": "https://registry.npmjs.org/@types/browserify/-/browserify-12.0.36.tgz",
+      "integrity": "sha512-hYXvPod5upkYTC7auziOATFsu/0MGxozbzNI80sZV044JTF7UtstHeNOM52b+bg7/taZ3fheK7oeb+jpm4C0/w==",
+      "dev": true,
+      "requires": {
+        "@types/insert-module-globals": "*",
+        "@types/node": "*"
+      }
+    },
+    "@types/connect": {
+      "version": "3.4.35",
+      "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
+      "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*"
+      }
+    },
+    "@types/express": {
+      "version": "4.17.13",
+      "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
+      "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
+      "dev": true,
+      "requires": {
+        "@types/body-parser": "*",
+        "@types/express-serve-static-core": "^4.17.18",
+        "@types/qs": "*",
+        "@types/serve-static": "*"
+      }
+    },
+    "@types/express-serve-static-core": {
+      "version": "4.17.28",
+      "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz",
+      "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*",
+        "@types/qs": "*",
+        "@types/range-parser": "*"
+      }
+    },
+    "@types/insert-module-globals": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/@types/insert-module-globals/-/insert-module-globals-7.0.1.tgz",
+      "integrity": "sha512-qtSfo/jdYHO4jNO6QCp4CwR/TPrvR39Yan5K4nPU1iCmxcnTWiERKDXcvFGuXEmfpjrHeOCvrZPa0UrUsy+mvA==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*"
+      }
+    },
+    "@types/json5": {
+      "version": "0.0.29",
+      "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
+      "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=",
+      "dev": true
+    },
+    "@types/jsonwebtoken": {
+      "version": "8.5.8",
+      "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.8.tgz",
+      "integrity": "sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*"
+      }
+    },
+    "@types/mime": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
+      "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
+      "dev": true
+    },
+    "@types/node": {
+      "version": "14.14.20",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz",
+      "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==",
+      "dev": true
+    },
+    "@types/q": {
+      "version": "1.5.4",
+      "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz",
+      "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==",
+      "dev": true
+    },
+    "@types/qs": {
+      "version": "6.9.7",
+      "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
+      "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
+      "dev": true
+    },
+    "@types/range-parser": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
+      "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
+      "dev": true
+    },
+    "@types/serve-static": {
+      "version": "1.13.10",
+      "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz",
+      "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==",
+      "dev": true,
+      "requires": {
+        "@types/mime": "^1",
+        "@types/node": "*"
+      }
+    },
+    "@types/sqlite3": {
+      "version": "3.1.8",
+      "resolved": "https://registry.npmjs.org/@types/sqlite3/-/sqlite3-3.1.8.tgz",
+      "integrity": "sha512-sQMt/qnyUWnqiTcJXm5ZfNPIBeJ/DVvJDwxw+0tAxPJvadzfiP1QhryO1JOR6t1yfb8NpzQb/Rud06mob5laIA==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*"
+      }
+    },
+    "@ungap/promise-all-settled": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz",
+      "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==",
+      "dev": true
+    },
+    "JSONStream": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
+      "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
+      "dev": true,
+      "requires": {
+        "jsonparse": "^1.2.0",
+        "through": ">=2.2.7 <3"
+      }
+    },
+    "abab": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz",
+      "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==",
+      "dev": true
+    },
+    "abbrev": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+      "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
+    },
+    "accepts": {
+      "version": "1.3.7",
+      "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
+      "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
+      "requires": {
+        "mime-types": "~2.1.24",
+        "negotiator": "0.6.2"
+      }
+    },
+    "acorn": {
+      "version": "7.4.1",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
+      "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
+      "dev": true
+    },
+    "acorn-globals": {
+      "version": "4.3.4",
+      "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz",
+      "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==",
+      "dev": true,
+      "requires": {
+        "acorn": "^6.0.1",
+        "acorn-walk": "^6.0.1"
+      },
+      "dependencies": {
+        "acorn": {
+          "version": "6.4.2",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz",
+          "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==",
+          "dev": true
+        },
+        "acorn-walk": {
+          "version": "6.2.0",
+          "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz",
+          "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==",
+          "dev": true
+        }
+      }
+    },
+    "acorn-jsx": {
+      "version": "5.3.1",
+      "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz",
+      "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==",
+      "dev": true
+    },
+    "acorn-node": {
+      "version": "1.8.2",
+      "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz",
+      "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==",
+      "dev": true,
+      "requires": {
+        "acorn": "^7.0.0",
+        "acorn-walk": "^7.0.0",
+        "xtend": "^4.0.2"
+      }
+    },
+    "acorn-walk": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
+      "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
+      "dev": true
+    },
+    "aggregate-error": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
+      "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
+      "dev": true,
+      "requires": {
+        "clean-stack": "^2.0.0",
+        "indent-string": "^4.0.0"
+      }
+    },
+    "ajv": {
+      "version": "6.12.6",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+      "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+      "requires": {
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
+      }
+    },
+    "alphanum-sort": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz",
+      "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=",
+      "dev": true
+    },
+    "ansi-align": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz",
+      "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=",
+      "dev": true,
+      "requires": {
+        "string-width": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "string-width": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+          "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+          "dev": true,
+          "requires": {
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^4.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
+          }
+        }
+      }
+    },
+    "ansi-colors": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
+      "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
+      "dev": true
+    },
+    "ansi-regex": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+      "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+    },
+    "ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+      "requires": {
+        "color-convert": "^2.0.1"
+      }
+    },
+    "ansi-to-html": {
+      "version": "0.6.14",
+      "resolved": "https://registry.npmjs.org/ansi-to-html/-/ansi-to-html-0.6.14.tgz",
+      "integrity": "sha512-7ZslfB1+EnFSDO5Ju+ue5Y6It19DRnZXWv8jrGHgIlPna5Mh4jz7BV5jCbQneXNFurQcKoolaaAjHtgSBfOIuA==",
+      "dev": true,
+      "requires": {
+        "entities": "^1.1.2"
+      },
+      "dependencies": {
+        "entities": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
+          "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
+          "dev": true
+        }
+      }
+    },
+    "anymatch": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
+      "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+      "dev": true,
+      "requires": {
+        "normalize-path": "^3.0.0",
+        "picomatch": "^2.0.4"
+      }
+    },
+    "append-transform": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz",
+      "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==",
+      "dev": true,
+      "requires": {
+        "default-require-extensions": "^3.0.0"
+      }
+    },
+    "aproba": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+      "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
+    },
+    "archy": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
+      "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
+      "dev": true
+    },
+    "are-we-there-yet": {
+      "version": "1.1.5",
+      "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
+      "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
+      "requires": {
+        "delegates": "^1.0.0",
+        "readable-stream": "^2.0.6"
+      }
+    },
+    "argparse": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+      "dev": true,
+      "requires": {
+        "sprintf-js": "~1.0.2"
+      }
+    },
+    "arr-diff": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+      "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+      "dev": true
+    },
+    "arr-flatten": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
+      "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
+      "dev": true
+    },
+    "arr-union": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
+      "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
+      "dev": true
+    },
+    "array-equal": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
+      "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
+      "dev": true
+    },
+    "array-filter": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz",
+      "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=",
+      "dev": true
+    },
+    "array-flatten": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+      "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
+    },
+    "array-includes": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.2.tgz",
+      "integrity": "sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.1",
+        "get-intrinsic": "^1.0.1",
+        "is-string": "^1.0.5"
+      }
+    },
+    "array-unique": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+      "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+      "dev": true
+    },
+    "array.prototype.flat": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz",
+      "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.1"
+      }
+    },
+    "asn1": {
+      "version": "0.2.4",
+      "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
+      "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
+      "requires": {
+        "safer-buffer": "~2.1.0"
+      }
+    },
+    "asn1.js": {
+      "version": "5.4.1",
+      "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
+      "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.0.0",
+        "inherits": "^2.0.1",
+        "minimalistic-assert": "^1.0.0",
+        "safer-buffer": "^2.1.0"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.11.9",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
+          "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+          "dev": true
+        }
+      }
+    },
+    "assert": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
+      "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==",
+      "dev": true,
+      "requires": {
+        "object-assign": "^4.1.1",
+        "util": "0.10.3"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+          "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
+          "dev": true
+        },
+        "util": {
+          "version": "0.10.3",
+          "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+          "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
+          "dev": true,
+          "requires": {
+            "inherits": "2.0.1"
+          }
+        }
+      }
+    },
+    "assert-plus": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+    },
+    "assign-symbols": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+      "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
+      "dev": true
+    },
+    "astral-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
+      "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
+      "dev": true
+    },
+    "async": {
+      "version": "0.9.2",
+      "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
+      "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
+    },
+    "async-each": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
+      "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
+      "dev": true
+    },
+    "async-limiter": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+      "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
+      "dev": true
+    },
+    "asynckit": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+    },
+    "atob": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+      "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+      "dev": true
+    },
+    "available-typed-arrays": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz",
+      "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==",
+      "dev": true,
+      "requires": {
+        "array-filter": "^1.0.0"
+      }
+    },
+    "aws-sign2": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+      "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
+    },
+    "aws4": {
+      "version": "1.11.0",
+      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
+      "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
+    },
+    "babel-plugin-dynamic-import-node": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
+      "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
+      "dev": true,
+      "requires": {
+        "object.assign": "^4.1.0"
+      }
+    },
+    "babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
+      "dev": true,
+      "requires": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      },
+      "dependencies": {
+        "regenerator-runtime": {
+          "version": "0.11.1",
+          "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+          "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
+          "dev": true
+        }
+      }
+    },
+    "babel-types": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
+      "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.26.0",
+        "esutils": "^2.0.2",
+        "lodash": "^4.17.4",
+        "to-fast-properties": "^1.0.3"
+      },
+      "dependencies": {
+        "to-fast-properties": {
+          "version": "1.0.3",
+          "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
+          "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
+          "dev": true
+        }
+      }
+    },
+    "babylon-walk": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/babylon-walk/-/babylon-walk-1.0.2.tgz",
+      "integrity": "sha1-OxWl3btIKni0zpwByLoYFwLZ1s4=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.11.6",
+        "babel-types": "^6.15.0",
+        "lodash.clone": "^4.5.0"
+      }
+    },
+    "balanced-match": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+    },
+    "base": {
+      "version": "0.11.2",
+      "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
+      "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+      "dev": true,
+      "requires": {
+        "cache-base": "^1.0.1",
+        "class-utils": "^0.3.5",
+        "component-emitter": "^1.2.1",
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.1",
+        "mixin-deep": "^1.2.0",
+        "pascalcase": "^0.1.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        }
+      }
+    },
+    "base64-js": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+      "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+      "dev": true
+    },
+    "bcrypt-pbkdf": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+      "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+      "requires": {
+        "tweetnacl": "^0.14.3"
+      }
+    },
+    "binary-extensions": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
+      "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
+      "dev": true
+    },
+    "bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "dev": true,
+      "requires": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
+    "block-stream": {
+      "version": "0.0.9",
+      "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
+      "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
+      "optional": true,
+      "requires": {
+        "inherits": "~2.0.0"
+      }
+    },
+    "bluebird": {
+      "version": "3.7.2",
+      "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
+      "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
+      "dev": true
+    },
+    "bn.js": {
+      "version": "5.1.3",
+      "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz",
+      "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==",
+      "dev": true
+    },
+    "body-parser": {
+      "version": "1.19.0",
+      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
+      "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
+      "requires": {
+        "bytes": "3.1.0",
+        "content-type": "~1.0.4",
+        "debug": "2.6.9",
+        "depd": "~1.1.2",
+        "http-errors": "1.7.2",
+        "iconv-lite": "0.4.24",
+        "on-finished": "~2.3.0",
+        "qs": "6.7.0",
+        "raw-body": "2.4.0",
+        "type-is": "~1.6.17"
+      },
+      "dependencies": {
+        "bytes": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
+          "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
+        },
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "requires": {
+            "ms": "2.0.0"
+          }
+        }
+      }
+    },
+    "boolbase": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+      "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
+      "dev": true
+    },
+    "boxen": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz",
+      "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==",
+      "dev": true,
+      "requires": {
+        "ansi-align": "^2.0.0",
+        "camelcase": "^4.0.0",
+        "chalk": "^2.0.1",
+        "cli-boxes": "^1.0.0",
+        "string-width": "^2.0.0",
+        "term-size": "^1.2.0",
+        "widest-line": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "camelcase": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+          "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+          "dev": true
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "string-width": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+          "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+          "dev": true,
+          "requires": {
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^4.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "requires": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "braces": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+      "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+      "dev": true,
+      "requires": {
+        "fill-range": "^7.0.1"
+      }
+    },
+    "brfs": {
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz",
+      "integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==",
+      "dev": true,
+      "requires": {
+        "quote-stream": "^1.0.1",
+        "resolve": "^1.1.5",
+        "static-module": "^2.2.0",
+        "through2": "^2.0.0"
+      }
+    },
+    "brorand": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+      "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
+      "dev": true
+    },
+    "browser-pack": {
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz",
+      "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==",
+      "dev": true,
+      "requires": {
+        "JSONStream": "^1.0.3",
+        "combine-source-map": "~0.8.0",
+        "defined": "^1.0.0",
+        "safe-buffer": "^5.1.1",
+        "through2": "^2.0.0",
+        "umd": "^3.0.0"
+      }
+    },
+    "browser-process-hrtime": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
+      "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==",
+      "dev": true
+    },
+    "browser-resolve": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz",
+      "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==",
+      "dev": true,
+      "requires": {
+        "resolve": "^1.17.0"
+      }
+    },
+    "browser-stdout": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
+      "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
+      "dev": true
+    },
+    "browserify": {
+      "version": "17.0.0",
+      "resolved": "https://registry.npmjs.org/browserify/-/browserify-17.0.0.tgz",
+      "integrity": "sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w==",
+      "dev": true,
+      "requires": {
+        "JSONStream": "^1.0.3",
+        "assert": "^1.4.0",
+        "browser-pack": "^6.0.1",
+        "browser-resolve": "^2.0.0",
+        "browserify-zlib": "~0.2.0",
+        "buffer": "~5.2.1",
+        "cached-path-relative": "^1.0.0",
+        "concat-stream": "^1.6.0",
+        "console-browserify": "^1.1.0",
+        "constants-browserify": "~1.0.0",
+        "crypto-browserify": "^3.0.0",
+        "defined": "^1.0.0",
+        "deps-sort": "^2.0.1",
+        "domain-browser": "^1.2.0",
+        "duplexer2": "~0.1.2",
+        "events": "^3.0.0",
+        "glob": "^7.1.0",
+        "has": "^1.0.0",
+        "htmlescape": "^1.1.0",
+        "https-browserify": "^1.0.0",
+        "inherits": "~2.0.1",
+        "insert-module-globals": "^7.2.1",
+        "labeled-stream-splicer": "^2.0.0",
+        "mkdirp-classic": "^0.5.2",
+        "module-deps": "^6.2.3",
+        "os-browserify": "~0.3.0",
+        "parents": "^1.0.1",
+        "path-browserify": "^1.0.0",
+        "process": "~0.11.0",
+        "punycode": "^1.3.2",
+        "querystring-es3": "~0.2.0",
+        "read-only-stream": "^2.0.0",
+        "readable-stream": "^2.0.2",
+        "resolve": "^1.1.4",
+        "shasum-object": "^1.0.0",
+        "shell-quote": "^1.6.1",
+        "stream-browserify": "^3.0.0",
+        "stream-http": "^3.0.0",
+        "string_decoder": "^1.1.1",
+        "subarg": "^1.0.0",
+        "syntax-error": "^1.1.1",
+        "through2": "^2.0.0",
+        "timers-browserify": "^1.0.1",
+        "tty-browserify": "0.0.1",
+        "url": "~0.11.0",
+        "util": "~0.12.0",
+        "vm-browserify": "^1.0.0",
+        "xtend": "^4.0.0"
+      },
+      "dependencies": {
+        "punycode": {
+          "version": "1.4.1",
+          "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+          "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+          "dev": true
+        }
+      }
+    },
+    "browserify-aes": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+      "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
+      "dev": true,
+      "requires": {
+        "buffer-xor": "^1.0.3",
+        "cipher-base": "^1.0.0",
+        "create-hash": "^1.1.0",
+        "evp_bytestokey": "^1.0.3",
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "browserify-cipher": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
+      "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
+      "dev": true,
+      "requires": {
+        "browserify-aes": "^1.0.4",
+        "browserify-des": "^1.0.0",
+        "evp_bytestokey": "^1.0.0"
+      }
+    },
+    "browserify-des": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+      "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
+      "dev": true,
+      "requires": {
+        "cipher-base": "^1.0.1",
+        "des.js": "^1.0.0",
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.1.2"
+      }
+    },
+    "browserify-rsa": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz",
+      "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^5.0.0",
+        "randombytes": "^2.0.1"
+      }
+    },
+    "browserify-sign": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz",
+      "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^5.1.1",
+        "browserify-rsa": "^4.0.1",
+        "create-hash": "^1.2.0",
+        "create-hmac": "^1.1.7",
+        "elliptic": "^6.5.3",
+        "inherits": "^2.0.4",
+        "parse-asn1": "^5.1.5",
+        "readable-stream": "^3.6.0",
+        "safe-buffer": "^5.2.0"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+          "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "3.6.0",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+          "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+          "dev": true,
+          "requires": {
+            "inherits": "^2.0.3",
+            "string_decoder": "^1.1.1",
+            "util-deprecate": "^1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.2.1",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+          "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+          "dev": true
+        }
+      }
+    },
+    "browserify-zlib": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
+      "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
+      "dev": true,
+      "requires": {
+        "pako": "~1.0.5"
+      }
+    },
+    "browserslist": {
+      "version": "4.16.1",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.1.tgz",
+      "integrity": "sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA==",
+      "dev": true,
+      "requires": {
+        "caniuse-lite": "^1.0.30001173",
+        "colorette": "^1.2.1",
+        "electron-to-chromium": "^1.3.634",
+        "escalade": "^3.1.1",
+        "node-releases": "^1.1.69"
+      }
+    },
+    "buffer": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz",
+      "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==",
+      "dev": true,
+      "requires": {
+        "base64-js": "^1.0.2",
+        "ieee754": "^1.1.4"
+      }
+    },
+    "buffer-equal": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz",
+      "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=",
+      "dev": true
+    },
+    "buffer-equal-constant-time": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+      "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
+    },
+    "buffer-from": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
+      "dev": true
+    },
+    "buffer-xor": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
+      "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
+      "dev": true
+    },
+    "builtin-status-codes": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+      "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
+      "dev": true
+    },
+    "bytes": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+      "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
+    },
+    "cache-base": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
+      "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+      "dev": true,
+      "requires": {
+        "collection-visit": "^1.0.0",
+        "component-emitter": "^1.2.1",
+        "get-value": "^2.0.6",
+        "has-value": "^1.0.0",
+        "isobject": "^3.0.1",
+        "set-value": "^2.0.0",
+        "to-object-path": "^0.3.0",
+        "union-value": "^1.0.0",
+        "unset-value": "^1.0.0"
+      }
+    },
+    "cached-path-relative": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz",
+      "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==",
+      "dev": true
+    },
+    "caching-transform": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz",
+      "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==",
+      "dev": true,
+      "requires": {
+        "hasha": "^5.0.0",
+        "make-dir": "^3.0.0",
+        "package-hash": "^4.0.0",
+        "write-file-atomic": "^3.0.0"
+      },
+      "dependencies": {
+        "make-dir": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+          "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+          "dev": true,
+          "requires": {
+            "semver": "^6.0.0"
+          }
+        },
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        },
+        "write-file-atomic": {
+          "version": "3.0.3",
+          "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+          "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+          "dev": true,
+          "requires": {
+            "imurmurhash": "^0.1.4",
+            "is-typedarray": "^1.0.0",
+            "signal-exit": "^3.0.2",
+            "typedarray-to-buffer": "^3.1.5"
+          }
+        }
+      }
+    },
+    "call-bind": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz",
+      "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==",
+      "dev": true,
+      "requires": {
+        "function-bind": "^1.1.1",
+        "get-intrinsic": "^1.0.0"
+      }
+    },
+    "call-me-maybe": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
+      "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=",
+      "dev": true
+    },
+    "caller-callsite": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
+      "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
+      "dev": true,
+      "requires": {
+        "callsites": "^2.0.0"
+      },
+      "dependencies": {
+        "callsites": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
+          "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
+          "dev": true
+        }
+      }
+    },
+    "caller-path": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz",
+      "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
+      "dev": true,
+      "requires": {
+        "caller-callsite": "^2.0.0"
+      }
+    },
+    "callsites": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+      "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+      "dev": true
+    },
+    "camelcase": {
+      "version": "5.3.1",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+      "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+      "dev": true
+    },
+    "caniuse-api": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
+      "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.0.0",
+        "caniuse-lite": "^1.0.0",
+        "lodash.memoize": "^4.1.2",
+        "lodash.uniq": "^4.5.0"
+      },
+      "dependencies": {
+        "lodash.memoize": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
+          "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
+          "dev": true
+        }
+      }
+    },
+    "caniuse-lite": {
+      "version": "1.0.30001180",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001180.tgz",
+      "integrity": "sha512-n8JVqXuZMVSPKiPiypjFtDTXc4jWIdjxull0f92WLo7e1MSi3uJ3NvveakSh/aCl1QKFAvIz3vIj0v+0K+FrXw==",
+      "dev": true
+    },
+    "capture-stack-trace": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz",
+      "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==",
+      "dev": true
+    },
+    "caseless": {
+      "version": "0.12.0",
+      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+      "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
+    },
+    "catharsis": {
+      "version": "0.8.11",
+      "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz",
+      "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.14"
+      }
+    },
+    "chalk": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+      "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+      "requires": {
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      }
+    },
+    "chokidar": {
+      "version": "3.4.3",
+      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
+      "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==",
+      "dev": true,
+      "requires": {
+        "anymatch": "~3.1.1",
+        "braces": "~3.0.2",
+        "fsevents": "~2.1.2",
+        "glob-parent": "~5.1.0",
+        "is-binary-path": "~2.1.0",
+        "is-glob": "~4.0.1",
+        "normalize-path": "~3.0.0",
+        "readdirp": "~3.5.0"
+      }
+    },
+    "chownr": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+      "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
+    },
+    "ci-info": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
+      "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
+      "dev": true
+    },
+    "cipher-base": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
+      "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "class-utils": {
+      "version": "0.3.6",
+      "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
+      "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+      "dev": true,
+      "requires": {
+        "arr-union": "^3.1.0",
+        "define-property": "^0.2.5",
+        "isobject": "^3.0.0",
+        "static-extend": "^0.1.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        }
+      }
+    },
+    "clean-stack": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
+      "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
+      "dev": true
+    },
+    "cli-boxes": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz",
+      "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=",
+      "dev": true
+    },
+    "cli-cursor": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
+      "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
+      "dev": true,
+      "requires": {
+        "restore-cursor": "^2.0.0"
+      }
+    },
+    "cli-spinners": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz",
+      "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==",
+      "dev": true
+    },
+    "cliui": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
+      "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+      "dev": true,
+      "requires": {
+        "string-width": "^3.1.0",
+        "strip-ansi": "^5.2.0",
+        "wrap-ansi": "^5.1.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "string-width": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^7.0.1",
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^5.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        }
+      }
+    },
+    "clone": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
+      "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
+      "dev": true
+    },
+    "coa": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz",
+      "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==",
+      "dev": true,
+      "requires": {
+        "@types/q": "^1.5.1",
+        "chalk": "^2.4.1",
+        "q": "^1.1.2"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "code-point-at": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
+    },
+    "collection-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
+      "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
+      "dev": true,
+      "requires": {
+        "map-visit": "^1.0.0",
+        "object-visit": "^1.0.0"
+      }
+    },
+    "color": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/color/-/color-3.1.3.tgz",
+      "integrity": "sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==",
+      "dev": true,
+      "requires": {
+        "color-convert": "^1.9.1",
+        "color-string": "^1.5.4"
+      },
+      "dependencies": {
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        }
+      }
+    },
+    "color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+      "requires": {
+        "color-name": "~1.1.4"
+      }
+    },
+    "color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+    },
+    "color-string": {
+      "version": "1.5.4",
+      "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz",
+      "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==",
+      "dev": true,
+      "requires": {
+        "color-name": "^1.0.0",
+        "simple-swizzle": "^0.2.2"
+      }
+    },
+    "colorette": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
+      "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==",
+      "dev": true
+    },
+    "combine-source-map": {
+      "version": "0.8.0",
+      "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
+      "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=",
+      "dev": true,
+      "requires": {
+        "convert-source-map": "~1.1.0",
+        "inline-source-map": "~0.6.0",
+        "lodash.memoize": "~3.0.3",
+        "source-map": "~0.5.3"
+      }
+    },
+    "combined-stream": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+      "requires": {
+        "delayed-stream": "~1.0.0"
+      }
+    },
+    "command-exists": {
+      "version": "1.2.9",
+      "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz",
+      "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==",
+      "dev": true
+    },
+    "commander": {
+      "version": "2.20.3",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+      "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+      "dev": true
+    },
+    "commondir": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+      "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
+      "dev": true
+    },
+    "component-emitter": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+      "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
+      "dev": true
+    },
+    "compressible": {
+      "version": "2.0.18",
+      "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
+      "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
+      "requires": {
+        "mime-db": ">= 1.43.0 < 2"
+      }
+    },
+    "compression": {
+      "version": "1.7.4",
+      "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz",
+      "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==",
+      "requires": {
+        "accepts": "~1.3.5",
+        "bytes": "3.0.0",
+        "compressible": "~2.0.16",
+        "debug": "2.6.9",
+        "on-headers": "~1.0.2",
+        "safe-buffer": "5.1.2",
+        "vary": "~1.1.2"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "requires": {
+            "ms": "2.0.0"
+          }
+        }
+      }
+    },
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+    },
+    "concat-stream": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+      "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+      "dev": true,
+      "requires": {
+        "buffer-from": "^1.0.0",
+        "inherits": "^2.0.3",
+        "readable-stream": "^2.2.2",
+        "typedarray": "^0.0.6"
+      }
+    },
+    "configstore": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.5.tgz",
+      "integrity": "sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA==",
+      "dev": true,
+      "requires": {
+        "dot-prop": "^4.2.1",
+        "graceful-fs": "^4.1.2",
+        "make-dir": "^1.0.0",
+        "unique-string": "^1.0.0",
+        "write-file-atomic": "^2.0.0",
+        "xdg-basedir": "^3.0.0"
+      }
+    },
+    "confusing-browser-globals": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz",
+      "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==",
+      "dev": true
+    },
+    "console-browserify": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
+      "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==",
+      "dev": true
+    },
+    "console-control-strings": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+      "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
+    },
+    "constants-browserify": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+      "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
+      "dev": true
+    },
+    "contains-path": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
+      "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
+      "dev": true
+    },
+    "content-disposition": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
+      "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
+      "requires": {
+        "safe-buffer": "5.1.2"
+      }
+    },
+    "content-type": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+      "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
+    },
+    "convert-source-map": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz",
+      "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=",
+      "dev": true
+    },
+    "cookie": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
+      "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
+    },
+    "cookie-signature": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+      "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
+    },
+    "copy-descriptor": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
+      "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
+      "dev": true
+    },
+    "core-js": {
+      "version": "2.6.12",
+      "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
+      "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
+      "dev": true
+    },
+    "core-js-compat": {
+      "version": "3.8.3",
+      "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz",
+      "integrity": "sha512-1sCb0wBXnBIL16pfFG1Gkvei6UzvKyTNYpiC41yrdjEv0UoJoq9E/abTMzyYJ6JpTkAj15dLjbqifIzEBDVvog==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.16.1",
+        "semver": "7.0.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "7.0.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
+          "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
+          "dev": true
+        }
+      }
+    },
+    "core-util-is": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+    },
+    "cosmiconfig": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
+      "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
+      "dev": true,
+      "requires": {
+        "import-fresh": "^2.0.0",
+        "is-directory": "^0.3.1",
+        "js-yaml": "^3.13.1",
+        "parse-json": "^4.0.0"
+      },
+      "dependencies": {
+        "import-fresh": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
+          "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
+          "dev": true,
+          "requires": {
+            "caller-path": "^2.0.0",
+            "resolve-from": "^3.0.0"
+          }
+        },
+        "parse-json": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+          "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+          "dev": true,
+          "requires": {
+            "error-ex": "^1.3.1",
+            "json-parse-better-errors": "^1.0.1"
+          }
+        },
+        "resolve-from": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+          "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
+          "dev": true
+        }
+      }
+    },
+    "create-ecdh": {
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
+      "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.1.0",
+        "elliptic": "^6.5.3"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.11.9",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
+          "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+          "dev": true
+        }
+      }
+    },
+    "create-error-class": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
+      "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=",
+      "dev": true,
+      "requires": {
+        "capture-stack-trace": "^1.0.0"
+      }
+    },
+    "create-hash": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+      "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
+      "dev": true,
+      "requires": {
+        "cipher-base": "^1.0.1",
+        "inherits": "^2.0.1",
+        "md5.js": "^1.3.4",
+        "ripemd160": "^2.0.1",
+        "sha.js": "^2.4.0"
+      }
+    },
+    "create-hmac": {
+      "version": "1.1.7",
+      "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+      "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
+      "dev": true,
+      "requires": {
+        "cipher-base": "^1.0.3",
+        "create-hash": "^1.1.0",
+        "inherits": "^2.0.1",
+        "ripemd160": "^2.0.0",
+        "safe-buffer": "^5.0.1",
+        "sha.js": "^2.4.8"
+      }
+    },
+    "cross-spawn": {
+      "version": "7.0.3",
+      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+      "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+      "dev": true,
+      "requires": {
+        "path-key": "^3.1.0",
+        "shebang-command": "^2.0.0",
+        "which": "^2.0.1"
+      }
+    },
+    "crypto-browserify": {
+      "version": "3.12.0",
+      "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
+      "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
+      "dev": true,
+      "requires": {
+        "browserify-cipher": "^1.0.0",
+        "browserify-sign": "^4.0.0",
+        "create-ecdh": "^4.0.0",
+        "create-hash": "^1.1.0",
+        "create-hmac": "^1.1.0",
+        "diffie-hellman": "^5.0.0",
+        "inherits": "^2.0.1",
+        "pbkdf2": "^3.0.3",
+        "public-encrypt": "^4.0.0",
+        "randombytes": "^2.0.0",
+        "randomfill": "^1.0.3"
+      }
+    },
+    "crypto-random-string": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz",
+      "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=",
+      "dev": true
+    },
+    "css-color-names": {
+      "version": "0.0.4",
+      "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
+      "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
+      "dev": true
+    },
+    "css-declaration-sorter": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz",
+      "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.1",
+        "timsort": "^0.3.0"
+      }
+    },
+    "css-modules-loader-core": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/css-modules-loader-core/-/css-modules-loader-core-1.1.0.tgz",
+      "integrity": "sha1-WQhmgpShvs0mGuCkziGwtVHyHRY=",
+      "dev": true,
+      "requires": {
+        "icss-replace-symbols": "1.1.0",
+        "postcss": "6.0.1",
+        "postcss-modules-extract-imports": "1.1.0",
+        "postcss-modules-local-by-default": "1.2.0",
+        "postcss-modules-scope": "1.1.0",
+        "postcss-modules-values": "1.3.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+          "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+          "dev": true
+        },
+        "chalk": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+          "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^2.2.1",
+            "escape-string-regexp": "^1.0.2",
+            "has-ansi": "^2.0.0",
+            "strip-ansi": "^3.0.0",
+            "supports-color": "^2.0.0"
+          },
+          "dependencies": {
+            "supports-color": {
+              "version": "2.0.0",
+              "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+              "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+              "dev": true
+            }
+          }
+        },
+        "has-flag": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+          "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
+          "dev": true
+        },
+        "postcss": {
+          "version": "6.0.1",
+          "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.1.tgz",
+          "integrity": "sha1-AA29H47vIXqjaLmiEsX8QLKo8/I=",
+          "dev": true,
+          "requires": {
+            "chalk": "^1.1.3",
+            "source-map": "^0.5.6",
+            "supports-color": "^3.2.3"
+          }
+        },
+        "supports-color": {
+          "version": "3.2.3",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
+          "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
+          "dev": true,
+          "requires": {
+            "has-flag": "^1.0.0"
+          }
+        }
+      }
+    },
+    "css-select": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
+      "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
+      "dev": true,
+      "requires": {
+        "boolbase": "^1.0.0",
+        "css-what": "^3.2.1",
+        "domutils": "^1.7.0",
+        "nth-check": "^1.0.2"
+      }
+    },
+    "css-select-base-adapter": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz",
+      "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==",
+      "dev": true
+    },
+    "css-selector-tokenizer": {
+      "version": "0.7.3",
+      "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.3.tgz",
+      "integrity": "sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg==",
+      "dev": true,
+      "requires": {
+        "cssesc": "^3.0.0",
+        "fastparse": "^1.1.2"
+      }
+    },
+    "css-tree": {
+      "version": "1.0.0-alpha.37",
+      "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz",
+      "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==",
+      "dev": true,
+      "requires": {
+        "mdn-data": "2.0.4",
+        "source-map": "^0.6.1"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "css-what": {
+      "version": "3.4.2",
+      "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz",
+      "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==",
+      "dev": true
+    },
+    "cssesc": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+      "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+      "dev": true
+    },
+    "cssnano": {
+      "version": "4.1.10",
+      "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz",
+      "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==",
+      "dev": true,
+      "requires": {
+        "cosmiconfig": "^5.0.0",
+        "cssnano-preset-default": "^4.0.7",
+        "is-resolvable": "^1.0.0",
+        "postcss": "^7.0.0"
+      }
+    },
+    "cssnano-preset-default": {
+      "version": "4.0.7",
+      "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz",
+      "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==",
+      "dev": true,
+      "requires": {
+        "css-declaration-sorter": "^4.0.1",
+        "cssnano-util-raw-cache": "^4.0.1",
+        "postcss": "^7.0.0",
+        "postcss-calc": "^7.0.1",
+        "postcss-colormin": "^4.0.3",
+        "postcss-convert-values": "^4.0.1",
+        "postcss-discard-comments": "^4.0.2",
+        "postcss-discard-duplicates": "^4.0.2",
+        "postcss-discard-empty": "^4.0.1",
+        "postcss-discard-overridden": "^4.0.1",
+        "postcss-merge-longhand": "^4.0.11",
+        "postcss-merge-rules": "^4.0.3",
+        "postcss-minify-font-values": "^4.0.2",
+        "postcss-minify-gradients": "^4.0.2",
+        "postcss-minify-params": "^4.0.2",
+        "postcss-minify-selectors": "^4.0.2",
+        "postcss-normalize-charset": "^4.0.1",
+        "postcss-normalize-display-values": "^4.0.2",
+        "postcss-normalize-positions": "^4.0.2",
+        "postcss-normalize-repeat-style": "^4.0.2",
+        "postcss-normalize-string": "^4.0.2",
+        "postcss-normalize-timing-functions": "^4.0.2",
+        "postcss-normalize-unicode": "^4.0.1",
+        "postcss-normalize-url": "^4.0.1",
+        "postcss-normalize-whitespace": "^4.0.2",
+        "postcss-ordered-values": "^4.1.2",
+        "postcss-reduce-initial": "^4.0.3",
+        "postcss-reduce-transforms": "^4.0.2",
+        "postcss-svgo": "^4.0.2",
+        "postcss-unique-selectors": "^4.0.1"
+      }
+    },
+    "cssnano-util-get-arguments": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz",
+      "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=",
+      "dev": true
+    },
+    "cssnano-util-get-match": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz",
+      "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=",
+      "dev": true
+    },
+    "cssnano-util-raw-cache": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz",
+      "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0"
+      }
+    },
+    "cssnano-util-same-parent": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz",
+      "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==",
+      "dev": true
+    },
+    "csso": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
+      "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==",
+      "dev": true,
+      "requires": {
+        "css-tree": "^1.1.2"
+      },
+      "dependencies": {
+        "css-tree": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz",
+          "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==",
+          "dev": true,
+          "requires": {
+            "mdn-data": "2.0.14",
+            "source-map": "^0.6.1"
+          }
+        },
+        "mdn-data": {
+          "version": "2.0.14",
+          "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
+          "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "cssom": {
+      "version": "0.3.8",
+      "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
+      "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==",
+      "dev": true
+    },
+    "cssstyle": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz",
+      "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==",
+      "dev": true,
+      "requires": {
+        "cssom": "0.3.x"
+      }
+    },
+    "d": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
+      "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
+      "dev": true,
+      "requires": {
+        "es5-ext": "^0.10.50",
+        "type": "^1.0.1"
+      }
+    },
+    "dash-ast": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz",
+      "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==",
+      "dev": true
+    },
+    "dashdash": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+      "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+      "requires": {
+        "assert-plus": "^1.0.0"
+      }
+    },
+    "data-urls": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz",
+      "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==",
+      "dev": true,
+      "requires": {
+        "abab": "^2.0.0",
+        "whatwg-mimetype": "^2.2.0",
+        "whatwg-url": "^7.0.0"
+      }
+    },
+    "deasync": {
+      "version": "0.1.21",
+      "resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.21.tgz",
+      "integrity": "sha512-kUmM8Y+PZpMpQ+B4AuOW9k2Pfx/mSupJtxOsLzmnHY2WqZUYRFccFn2RhzPAqt3Xb+sorK/badW2D4zNzqZz5w==",
+      "dev": true,
+      "requires": {
+        "bindings": "^1.5.0",
+        "node-addon-api": "^1.7.1"
+      },
+      "dependencies": {
+        "node-addon-api": {
+          "version": "1.7.2",
+          "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
+          "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==",
+          "dev": true
+        }
+      }
+    },
+    "debug": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
+      "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+      "requires": {
+        "ms": "2.1.2"
+      },
+      "dependencies": {
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+        }
+      }
+    },
+    "decamelize": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+      "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+      "dev": true
+    },
+    "decode-uri-component": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+      "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+      "dev": true
+    },
+    "deep-extend": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+      "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
+    },
+    "deep-is": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+      "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
+      "dev": true
+    },
+    "default-require-extensions": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz",
+      "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==",
+      "dev": true,
+      "requires": {
+        "strip-bom": "^4.0.0"
+      },
+      "dependencies": {
+        "strip-bom": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
+          "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
+          "dev": true
+        }
+      }
+    },
+    "defaults": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
+      "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
+      "dev": true,
+      "requires": {
+        "clone": "^1.0.2"
+      },
+      "dependencies": {
+        "clone": {
+          "version": "1.0.4",
+          "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+          "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
+          "dev": true
+        }
+      }
+    },
+    "define-properties": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+      "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+      "dev": true,
+      "requires": {
+        "object-keys": "^1.0.12"
+      }
+    },
+    "define-property": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
+      "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+      "dev": true,
+      "requires": {
+        "is-descriptor": "^1.0.2",
+        "isobject": "^3.0.1"
+      },
+      "dependencies": {
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        }
+      }
+    },
+    "defined": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
+      "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
+      "dev": true
+    },
+    "delayed-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
+    },
+    "delegates": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+      "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+    },
+    "depd": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+      "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
+    },
+    "deps-sort": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz",
+      "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==",
+      "dev": true,
+      "requires": {
+        "JSONStream": "^1.0.3",
+        "shasum-object": "^1.0.0",
+        "subarg": "^1.0.0",
+        "through2": "^2.0.0"
+      }
+    },
+    "des.js": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
+      "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "minimalistic-assert": "^1.0.0"
+      }
+    },
+    "destroy": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
+      "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
+    },
+    "detect-libc": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+      "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
+    },
+    "detective": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz",
+      "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==",
+      "dev": true,
+      "requires": {
+        "acorn-node": "^1.6.1",
+        "defined": "^1.0.0",
+        "minimist": "^1.1.1"
+      }
+    },
+    "diff": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+      "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+      "dev": true
+    },
+    "diffie-hellman": {
+      "version": "5.0.3",
+      "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+      "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.1.0",
+        "miller-rabin": "^4.0.0",
+        "randombytes": "^2.0.0"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.11.9",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
+          "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+          "dev": true
+        }
+      }
+    },
+    "docdash": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/docdash/-/docdash-1.2.0.tgz",
+      "integrity": "sha512-IYZbgYthPTspgqYeciRJNPhSwL51yer7HAwDXhF5p+H7mTDbPvY3PCk/QDjNxdPCpWkaJVFC4t7iCNB/t9E5Kw==",
+      "dev": true
+    },
+    "doctrine": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+      "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+      "dev": true,
+      "requires": {
+        "esutils": "^2.0.2"
+      }
+    },
+    "dom-serializer": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
+      "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
+      "dev": true,
+      "requires": {
+        "domelementtype": "^2.0.1",
+        "entities": "^2.0.0"
+      },
+      "dependencies": {
+        "domelementtype": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
+          "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
+          "dev": true
+        }
+      }
+    },
+    "domain-browser": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
+      "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
+      "dev": true
+    },
+    "domelementtype": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
+      "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
+      "dev": true
+    },
+    "domexception": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
+      "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==",
+      "dev": true,
+      "requires": {
+        "webidl-conversions": "^4.0.2"
+      }
+    },
+    "domhandler": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
+      "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
+      "dev": true,
+      "requires": {
+        "domelementtype": "1"
+      }
+    },
+    "domutils": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
+      "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
+      "dev": true,
+      "requires": {
+        "dom-serializer": "0",
+        "domelementtype": "1"
+      }
+    },
+    "dot-prop": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
+      "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
+      "dev": true,
+      "requires": {
+        "is-obj": "^1.0.0"
+      }
+    },
+    "dotenv": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz",
+      "integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==",
+      "dev": true
+    },
+    "dotenv-expand": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
+      "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
+      "dev": true
+    },
+    "duplexer2": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
+      "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
+      "dev": true,
+      "requires": {
+        "readable-stream": "^2.0.2"
+      }
+    },
+    "duplexer3": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
+      "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=",
+      "dev": true
+    },
+    "ecc-jsbn": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+      "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+      "requires": {
+        "jsbn": "~0.1.0",
+        "safer-buffer": "^2.1.0"
+      }
+    },
+    "ecdsa-sig-formatter": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+      "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+      "requires": {
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "ee-first": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+      "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
+    },
+    "ejs": {
+      "version": "3.1.6",
+      "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.6.tgz",
+      "integrity": "sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==",
+      "requires": {
+        "jake": "^10.6.1"
+      }
+    },
+    "electron-to-chromium": {
+      "version": "1.3.647",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.647.tgz",
+      "integrity": "sha512-Or2Nu8TjkmSywY9hk85K/Y6il28hchlonITz30fkC87qvSNupQl29O12BzDDDTnUFlo6kEIFL2QGSpkZDMxH8g==",
+      "dev": true
+    },
+    "elliptic": {
+      "version": "6.5.3",
+      "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
+      "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.4.0",
+        "brorand": "^1.0.1",
+        "hash.js": "^1.0.0",
+        "hmac-drbg": "^1.0.0",
+        "inherits": "^2.0.1",
+        "minimalistic-assert": "^1.0.0",
+        "minimalistic-crypto-utils": "^1.0.0"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.11.9",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
+          "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+          "dev": true
+        }
+      }
+    },
+    "emoji-regex": {
+      "version": "7.0.3",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+      "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+      "dev": true
+    },
+    "encodeurl": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+      "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
+    },
+    "enquirer": {
+      "version": "2.3.6",
+      "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
+      "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
+      "dev": true,
+      "requires": {
+        "ansi-colors": "^4.1.1"
+      }
+    },
+    "entities": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz",
+      "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==",
+      "dev": true
+    },
+    "envify": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/envify/-/envify-4.1.0.tgz",
+      "integrity": "sha512-IKRVVoAYr4pIx4yIWNsz9mOsboxlNXiu7TNBnem/K/uTHdkyzXWDzHCK7UTolqBbgaBz0tQHsD3YNls0uIIjiw==",
+      "dev": true,
+      "requires": {
+        "esprima": "^4.0.0",
+        "through": "~2.3.4"
+      }
+    },
+    "envinfo": {
+      "version": "7.7.3",
+      "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.7.3.tgz",
+      "integrity": "sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA==",
+      "dev": true
+    },
+    "error-ex": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+      "dev": true,
+      "requires": {
+        "is-arrayish": "^0.2.1"
+      }
+    },
+    "es-abstract": {
+      "version": "1.18.0-next.1",
+      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
+      "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+      "dev": true,
+      "requires": {
+        "es-to-primitive": "^1.2.1",
+        "function-bind": "^1.1.1",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.1",
+        "is-callable": "^1.2.2",
+        "is-negative-zero": "^2.0.0",
+        "is-regex": "^1.1.1",
+        "object-inspect": "^1.8.0",
+        "object-keys": "^1.1.1",
+        "object.assign": "^4.1.1",
+        "string.prototype.trimend": "^1.0.1",
+        "string.prototype.trimstart": "^1.0.1"
+      }
+    },
+    "es-to-primitive": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+      "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+      "dev": true,
+      "requires": {
+        "is-callable": "^1.1.4",
+        "is-date-object": "^1.0.1",
+        "is-symbol": "^1.0.2"
+      }
+    },
+    "es5-ext": {
+      "version": "0.10.53",
+      "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
+      "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
+      "dev": true,
+      "requires": {
+        "es6-iterator": "~2.0.3",
+        "es6-symbol": "~3.1.3",
+        "next-tick": "~1.0.0"
+      }
+    },
+    "es6-error": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
+      "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
+      "dev": true
+    },
+    "es6-iterator": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+      "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
+      "dev": true,
+      "requires": {
+        "d": "1",
+        "es5-ext": "^0.10.35",
+        "es6-symbol": "^3.1.1"
+      }
+    },
+    "es6-symbol": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
+      "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
+      "dev": true,
+      "requires": {
+        "d": "^1.0.1",
+        "ext": "^1.1.2"
+      }
+    },
+    "escalade": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+      "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
+    },
+    "escape-html": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+      "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
+    },
+    "escape-string-regexp": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+      "dev": true
+    },
+    "escodegen": {
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz",
+      "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==",
+      "dev": true,
+      "requires": {
+        "esprima": "^3.1.3",
+        "estraverse": "^4.2.0",
+        "esutils": "^2.0.2",
+        "optionator": "^0.8.1",
+        "source-map": "~0.6.1"
+      },
+      "dependencies": {
+        "esprima": {
+          "version": "3.1.3",
+          "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
+          "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
+          "dev": true
+        },
+        "levn": {
+          "version": "0.3.0",
+          "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+          "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+          "dev": true,
+          "requires": {
+            "prelude-ls": "~1.1.2",
+            "type-check": "~0.3.2"
+          }
+        },
+        "optionator": {
+          "version": "0.8.3",
+          "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+          "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+          "dev": true,
+          "requires": {
+            "deep-is": "~0.1.3",
+            "fast-levenshtein": "~2.0.6",
+            "levn": "~0.3.0",
+            "prelude-ls": "~1.1.2",
+            "type-check": "~0.3.2",
+            "word-wrap": "~1.2.3"
+          }
+        },
+        "prelude-ls": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+          "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true,
+          "optional": true
+        },
+        "type-check": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+          "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+          "dev": true,
+          "requires": {
+            "prelude-ls": "~1.1.2"
+          }
+        }
+      }
+    },
+    "eslint": {
+      "version": "7.14.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.14.0.tgz",
+      "integrity": "sha512-5YubdnPXrlrYAFCKybPuHIAH++PINe1pmKNc5wQRB9HSbqIK1ywAnntE3Wwua4giKu0bjligf1gLF6qxMGOYRA==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.0.0",
+        "@eslint/eslintrc": "^0.2.1",
+        "ajv": "^6.10.0",
+        "chalk": "^4.0.0",
+        "cross-spawn": "^7.0.2",
+        "debug": "^4.0.1",
+        "doctrine": "^3.0.0",
+        "enquirer": "^2.3.5",
+        "eslint-scope": "^5.1.1",
+        "eslint-utils": "^2.1.0",
+        "eslint-visitor-keys": "^2.0.0",
+        "espree": "^7.3.0",
+        "esquery": "^1.2.0",
+        "esutils": "^2.0.2",
+        "file-entry-cache": "^5.0.1",
+        "functional-red-black-tree": "^1.0.1",
+        "glob-parent": "^5.0.0",
+        "globals": "^12.1.0",
+        "ignore": "^4.0.6",
+        "import-fresh": "^3.0.0",
+        "imurmurhash": "^0.1.4",
+        "is-glob": "^4.0.0",
+        "js-yaml": "^3.13.1",
+        "json-stable-stringify-without-jsonify": "^1.0.1",
+        "levn": "^0.4.1",
+        "lodash": "^4.17.19",
+        "minimatch": "^3.0.4",
+        "natural-compare": "^1.4.0",
+        "optionator": "^0.9.1",
+        "progress": "^2.0.0",
+        "regexpp": "^3.1.0",
+        "semver": "^7.2.1",
+        "strip-ansi": "^6.0.0",
+        "strip-json-comments": "^3.1.0",
+        "table": "^5.2.3",
+        "text-table": "^0.2.0",
+        "v8-compile-cache": "^2.0.3"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+          "dev": true
+        },
+        "semver": {
+          "version": "7.3.4",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
+          "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
+          "dev": true,
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+          "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^5.0.0"
+          }
+        },
+        "strip-json-comments": {
+          "version": "3.1.1",
+          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+          "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+          "dev": true
+        }
+      }
+    },
+    "eslint-config-airbnb-base": {
+      "version": "14.2.1",
+      "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz",
+      "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==",
+      "dev": true,
+      "requires": {
+        "confusing-browser-globals": "^1.0.10",
+        "object.assign": "^4.1.2",
+        "object.entries": "^1.1.2"
+      }
+    },
+    "eslint-config-prettier": {
+      "version": "6.15.0",
+      "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz",
+      "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==",
+      "dev": true,
+      "requires": {
+        "get-stdin": "^6.0.0"
+      }
+    },
+    "eslint-import-resolver-node": {
+      "version": "0.3.4",
+      "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz",
+      "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==",
+      "dev": true,
+      "requires": {
+        "debug": "^2.6.9",
+        "resolve": "^1.13.1"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        }
+      }
+    },
+    "eslint-module-utils": {
+      "version": "2.6.0",
+      "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz",
+      "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==",
+      "dev": true,
+      "requires": {
+        "debug": "^2.6.9",
+        "pkg-dir": "^2.0.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        }
+      }
+    },
+    "eslint-plugin-import": {
+      "version": "2.22.1",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz",
+      "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==",
+      "dev": true,
+      "requires": {
+        "array-includes": "^3.1.1",
+        "array.prototype.flat": "^1.2.3",
+        "contains-path": "^0.1.0",
+        "debug": "^2.6.9",
+        "doctrine": "1.5.0",
+        "eslint-import-resolver-node": "^0.3.4",
+        "eslint-module-utils": "^2.6.0",
+        "has": "^1.0.3",
+        "minimatch": "^3.0.4",
+        "object.values": "^1.1.1",
+        "read-pkg-up": "^2.0.0",
+        "resolve": "^1.17.0",
+        "tsconfig-paths": "^3.9.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "doctrine": {
+          "version": "1.5.0",
+          "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
+          "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
+          "dev": true,
+          "requires": {
+            "esutils": "^2.0.2",
+            "isarray": "^1.0.0"
+          }
+        }
+      }
+    },
+    "eslint-plugin-prettier": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.2.0.tgz",
+      "integrity": "sha512-kOUSJnFjAUFKwVxuzy6sA5yyMx6+o9ino4gCdShzBNx4eyFRudWRYKCFolKjoM40PEiuU6Cn7wBLfq3WsGg7qg==",
+      "dev": true,
+      "requires": {
+        "prettier-linter-helpers": "^1.0.0"
+      }
+    },
+    "eslint-scope": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
+      "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
+      "dev": true,
+      "requires": {
+        "esrecurse": "^4.3.0",
+        "estraverse": "^4.1.1"
+      }
+    },
+    "eslint-utils": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
+      "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
+      "dev": true,
+      "requires": {
+        "eslint-visitor-keys": "^1.1.0"
+      },
+      "dependencies": {
+        "eslint-visitor-keys": {
+          "version": "1.3.0",
+          "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
+          "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
+          "dev": true
+        }
+      }
+    },
+    "eslint-visitor-keys": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz",
+      "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==",
+      "dev": true
+    },
+    "esm": {
+      "version": "3.2.25",
+      "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
+      "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA=="
+    },
+    "espree": {
+      "version": "7.3.0",
+      "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz",
+      "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==",
+      "dev": true,
+      "requires": {
+        "acorn": "^7.4.0",
+        "acorn-jsx": "^5.2.0",
+        "eslint-visitor-keys": "^1.3.0"
+      },
+      "dependencies": {
+        "eslint-visitor-keys": {
+          "version": "1.3.0",
+          "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
+          "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
+          "dev": true
+        }
+      }
+    },
+    "esprima": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+      "dev": true
+    },
+    "esquery": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz",
+      "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==",
+      "dev": true,
+      "requires": {
+        "estraverse": "^5.1.0"
+      },
+      "dependencies": {
+        "estraverse": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+          "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
+          "dev": true
+        }
+      }
+    },
+    "esrecurse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+      "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+      "dev": true,
+      "requires": {
+        "estraverse": "^5.2.0"
+      },
+      "dependencies": {
+        "estraverse": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+          "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
+          "dev": true
+        }
+      }
+    },
+    "estraverse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+      "dev": true
+    },
+    "esutils": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+      "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+      "dev": true
+    },
+    "etag": {
+      "version": "1.8.1",
+      "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+      "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
+    },
+    "events": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz",
+      "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==",
+      "dev": true
+    },
+    "evp_bytestokey": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
+      "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
+      "dev": true,
+      "requires": {
+        "md5.js": "^1.3.4",
+        "safe-buffer": "^5.1.1"
+      }
+    },
+    "execa": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
+      "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
+      "dev": true,
+      "requires": {
+        "cross-spawn": "^5.0.1",
+        "get-stream": "^3.0.0",
+        "is-stream": "^1.1.0",
+        "npm-run-path": "^2.0.0",
+        "p-finally": "^1.0.0",
+        "signal-exit": "^3.0.0",
+        "strip-eof": "^1.0.0"
+      },
+      "dependencies": {
+        "cross-spawn": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
+          "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+          "dev": true,
+          "requires": {
+            "lru-cache": "^4.0.1",
+            "shebang-command": "^1.2.0",
+            "which": "^1.2.9"
+          }
+        },
+        "lru-cache": {
+          "version": "4.1.5",
+          "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
+          "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
+          "dev": true,
+          "requires": {
+            "pseudomap": "^1.0.2",
+            "yallist": "^2.1.2"
+          }
+        },
+        "shebang-command": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+          "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+          "dev": true,
+          "requires": {
+            "shebang-regex": "^1.0.0"
+          }
+        },
+        "shebang-regex": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+          "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+          "dev": true
+        },
+        "which": {
+          "version": "1.3.1",
+          "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+          "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+          "dev": true,
+          "requires": {
+            "isexe": "^2.0.0"
+          }
+        },
+        "yallist": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
+          "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
+          "dev": true
+        }
+      }
+    },
+    "expand-brackets": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+      "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+      "dev": true,
+      "requires": {
+        "debug": "^2.3.3",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "posix-character-classes": "^0.1.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "express": {
+      "version": "4.17.1",
+      "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
+      "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
+      "requires": {
+        "accepts": "~1.3.7",
+        "array-flatten": "1.1.1",
+        "body-parser": "1.19.0",
+        "content-disposition": "0.5.3",
+        "content-type": "~1.0.4",
+        "cookie": "0.4.0",
+        "cookie-signature": "1.0.6",
+        "debug": "2.6.9",
+        "depd": "~1.1.2",
+        "encodeurl": "~1.0.2",
+        "escape-html": "~1.0.3",
+        "etag": "~1.8.1",
+        "finalhandler": "~1.1.2",
+        "fresh": "0.5.2",
+        "merge-descriptors": "1.0.1",
+        "methods": "~1.1.2",
+        "on-finished": "~2.3.0",
+        "parseurl": "~1.3.3",
+        "path-to-regexp": "0.1.7",
+        "proxy-addr": "~2.0.5",
+        "qs": "6.7.0",
+        "range-parser": "~1.2.1",
+        "safe-buffer": "5.1.2",
+        "send": "0.17.1",
+        "serve-static": "1.14.1",
+        "setprototypeof": "1.1.1",
+        "statuses": "~1.5.0",
+        "type-is": "~1.6.18",
+        "utils-merge": "1.0.1",
+        "vary": "~1.1.2"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "requires": {
+            "ms": "2.0.0"
+          }
+        }
+      }
+    },
+    "express-asyncify": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/express-asyncify/-/express-asyncify-1.0.1.tgz",
+      "integrity": "sha512-eaAtzRRUbZMHKrgAthIFIloci7pMmJf4PFAhFEof/caukFi6oroe8ps3FuDOk0h57epaEKuzTfF5wSWEsqFxXg=="
+    },
+    "ext": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
+      "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
+      "dev": true,
+      "requires": {
+        "type": "^2.0.0"
+      },
+      "dependencies": {
+        "type": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz",
+          "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==",
+          "dev": true
+        }
+      }
+    },
+    "extend": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+      "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
+    },
+    "extend-shallow": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+      "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+      "dev": true,
+      "requires": {
+        "assign-symbols": "^1.0.0",
+        "is-extendable": "^1.0.1"
+      },
+      "dependencies": {
+        "is-extendable": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+          "dev": true,
+          "requires": {
+            "is-plain-object": "^2.0.4"
+          }
+        }
+      }
+    },
+    "extglob": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+      "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+      "dev": true,
+      "requires": {
+        "array-unique": "^0.3.2",
+        "define-property": "^1.0.0",
+        "expand-brackets": "^2.1.4",
+        "extend-shallow": "^2.0.1",
+        "fragment-cache": "^0.2.1",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        }
+      }
+    },
+    "extsprintf": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
+    },
+    "falafel": {
+      "version": "2.2.4",
+      "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.4.tgz",
+      "integrity": "sha512-0HXjo8XASWRmsS0X1EkhwEMZaD3Qvp7FfURwjLKjG1ghfRm/MGZl2r4cWUTv41KdNghTw4OUMmVtdGQp3+H+uQ==",
+      "dev": true,
+      "requires": {
+        "acorn": "^7.1.1",
+        "foreach": "^2.0.5",
+        "isarray": "^2.0.1",
+        "object-keys": "^1.0.6"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "2.0.5",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+          "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+          "dev": true
+        }
+      }
+    },
+    "fast-deep-equal": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+    },
+    "fast-diff": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
+      "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
+      "dev": true
+    },
+    "fast-glob": {
+      "version": "2.2.7",
+      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
+      "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
+      "dev": true,
+      "requires": {
+        "@mrmlnc/readdir-enhanced": "^2.2.1",
+        "@nodelib/fs.stat": "^1.1.2",
+        "glob-parent": "^3.1.0",
+        "is-glob": "^4.0.0",
+        "merge2": "^1.2.3",
+        "micromatch": "^3.1.10"
+      },
+      "dependencies": {
+        "glob-parent": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+          "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+          "dev": true,
+          "requires": {
+            "is-glob": "^3.1.0",
+            "path-dirname": "^1.0.0"
+          },
+          "dependencies": {
+            "is-glob": {
+              "version": "3.1.0",
+              "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+              "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+              "dev": true,
+              "requires": {
+                "is-extglob": "^2.1.0"
+              }
+            }
+          }
+        }
+      }
+    },
+    "fast-json-stable-stringify": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
+    },
+    "fast-levenshtein": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+      "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
+      "dev": true
+    },
+    "fast-safe-stringify": {
+      "version": "2.0.7",
+      "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
+      "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==",
+      "dev": true
+    },
+    "fastparse": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",
+      "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
+      "dev": true
+    },
+    "file-entry-cache": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
+      "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
+      "dev": true,
+      "requires": {
+        "flat-cache": "^2.0.1"
+      }
+    },
+    "file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "dev": true
+    },
+    "filelist": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.2.tgz",
+      "integrity": "sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==",
+      "requires": {
+        "minimatch": "^3.0.4"
+      }
+    },
+    "filesize": {
+      "version": "3.6.1",
+      "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz",
+      "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==",
+      "dev": true
+    },
+    "fill-range": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+      "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+      "dev": true,
+      "requires": {
+        "to-regex-range": "^5.0.1"
+      }
+    },
+    "finalhandler": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
+      "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
+      "requires": {
+        "debug": "2.6.9",
+        "encodeurl": "~1.0.2",
+        "escape-html": "~1.0.3",
+        "on-finished": "~2.3.0",
+        "parseurl": "~1.3.3",
+        "statuses": "~1.5.0",
+        "unpipe": "~1.0.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "requires": {
+            "ms": "2.0.0"
+          }
+        }
+      }
+    },
+    "find-cache-dir": {
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
+      "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==",
+      "dev": true,
+      "requires": {
+        "commondir": "^1.0.1",
+        "make-dir": "^3.0.2",
+        "pkg-dir": "^4.1.0"
+      },
+      "dependencies": {
+        "find-up": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+          "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^5.0.0",
+            "path-exists": "^4.0.0"
+          }
+        },
+        "locate-path": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+          "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^4.1.0"
+          }
+        },
+        "make-dir": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+          "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+          "dev": true,
+          "requires": {
+            "semver": "^6.0.0"
+          }
+        },
+        "p-limit": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+          "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+          "dev": true,
+          "requires": {
+            "p-try": "^2.0.0"
+          }
+        },
+        "p-locate": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+          "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.2.0"
+          }
+        },
+        "p-try": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+          "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+          "dev": true
+        },
+        "path-exists": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+          "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+          "dev": true
+        },
+        "pkg-dir": {
+          "version": "4.2.0",
+          "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+          "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+          "dev": true,
+          "requires": {
+            "find-up": "^4.0.0"
+          }
+        },
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "find-up": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+      "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+      "dev": true,
+      "requires": {
+        "locate-path": "^2.0.0"
+      }
+    },
+    "flat": {
+      "version": "5.0.2",
+      "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
+      "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==",
+      "dev": true
+    },
+    "flat-cache": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
+      "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
+      "dev": true,
+      "requires": {
+        "flatted": "^2.0.0",
+        "rimraf": "2.6.3",
+        "write": "1.0.3"
+      },
+      "dependencies": {
+        "rimraf": {
+          "version": "2.6.3",
+          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+          "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+          "dev": true,
+          "requires": {
+            "glob": "^7.1.3"
+          }
+        }
+      }
+    },
+    "flatted": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
+      "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
+      "dev": true
+    },
+    "for-in": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+      "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
+      "dev": true
+    },
+    "foreach": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+      "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=",
+      "dev": true
+    },
+    "foreground-child": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz",
+      "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==",
+      "dev": true,
+      "requires": {
+        "cross-spawn": "^7.0.0",
+        "signal-exit": "^3.0.2"
+      }
+    },
+    "forever-agent": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+      "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
+    },
+    "form-data": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
+      "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
+      "requires": {
+        "asynckit": "^0.4.0",
+        "combined-stream": "^1.0.6",
+        "mime-types": "^2.1.12"
+      }
+    },
+    "forwarded": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
+      "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
+    },
+    "fragment-cache": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+      "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
+      "dev": true,
+      "requires": {
+        "map-cache": "^0.2.2"
+      }
+    },
+    "fresh": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+      "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
+    },
+    "fromentries": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz",
+      "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==",
+      "dev": true
+    },
+    "fs-minipass": {
+      "version": "1.2.7",
+      "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
+      "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
+      "requires": {
+        "minipass": "^2.6.0"
+      }
+    },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+    },
+    "fsevents": {
+      "version": "2.1.3",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
+      "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
+      "dev": true,
+      "optional": true
+    },
+    "fstream": {
+      "version": "1.0.12",
+      "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
+      "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
+      "optional": true,
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "inherits": "~2.0.0",
+        "mkdirp": ">=0.5 0",
+        "rimraf": "2"
+      }
+    },
+    "function-bind": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+    },
+    "functional-red-black-tree": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+      "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
+      "dev": true
+    },
+    "gauge": {
+      "version": "2.7.4",
+      "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
+      "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+      "requires": {
+        "aproba": "^1.0.3",
+        "console-control-strings": "^1.0.0",
+        "has-unicode": "^2.0.0",
+        "object-assign": "^4.1.0",
+        "signal-exit": "^3.0.0",
+        "string-width": "^1.0.1",
+        "strip-ansi": "^3.0.1",
+        "wide-align": "^1.1.0"
+      }
+    },
+    "gensync": {
+      "version": "1.0.0-beta.2",
+      "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+      "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+      "dev": true
+    },
+    "get-assigned-identifiers": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz",
+      "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==",
+      "dev": true
+    },
+    "get-caller-file": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+      "dev": true
+    },
+    "get-intrinsic": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz",
+      "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==",
+      "dev": true,
+      "requires": {
+        "function-bind": "^1.1.1",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.1"
+      }
+    },
+    "get-package-type": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
+      "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
+      "dev": true
+    },
+    "get-port": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz",
+      "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=",
+      "dev": true
+    },
+    "get-stdin": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
+      "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
+      "dev": true
+    },
+    "get-stream": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+      "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
+      "dev": true
+    },
+    "get-value": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
+      "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
+      "dev": true
+    },
+    "getopts": {
+      "version": "2.2.5",
+      "resolved": "https://registry.npmjs.org/getopts/-/getopts-2.2.5.tgz",
+      "integrity": "sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA=="
+    },
+    "getpass": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+      "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+      "requires": {
+        "assert-plus": "^1.0.0"
+      }
+    },
+    "glob": {
+      "version": "7.1.6",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+      "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+      "requires": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.0.4",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      }
+    },
+    "glob-parent": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
+      "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
+      "dev": true,
+      "requires": {
+        "is-glob": "^4.0.1"
+      }
+    },
+    "glob-to-regexp": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz",
+      "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=",
+      "dev": true
+    },
+    "global-dirs": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz",
+      "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=",
+      "dev": true,
+      "requires": {
+        "ini": "^1.3.4"
+      }
+    },
+    "globals": {
+      "version": "12.4.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
+      "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
+      "dev": true,
+      "requires": {
+        "type-fest": "^0.8.1"
+      }
+    },
+    "got": {
+      "version": "6.7.1",
+      "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz",
+      "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=",
+      "dev": true,
+      "requires": {
+        "create-error-class": "^3.0.0",
+        "duplexer3": "^0.1.4",
+        "get-stream": "^3.0.0",
+        "is-redirect": "^1.0.0",
+        "is-retry-allowed": "^1.0.0",
+        "is-stream": "^1.0.0",
+        "lowercase-keys": "^1.0.0",
+        "safe-buffer": "^5.0.1",
+        "timed-out": "^4.0.0",
+        "unzip-response": "^2.0.1",
+        "url-parse-lax": "^1.0.0"
+      }
+    },
+    "graceful-fs": {
+      "version": "4.2.4",
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
+      "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
+    },
+    "grapheme-breaker": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/grapheme-breaker/-/grapheme-breaker-0.3.2.tgz",
+      "integrity": "sha1-W55reMODJFLSuiuxy4MPlidkEKw=",
+      "dev": true,
+      "requires": {
+        "brfs": "^1.2.0",
+        "unicode-trie": "^0.3.1"
+      }
+    },
+    "growl": {
+      "version": "1.10.5",
+      "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
+      "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
+      "dev": true
+    },
+    "har-schema": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+      "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
+    },
+    "har-validator": {
+      "version": "5.1.5",
+      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
+      "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
+      "requires": {
+        "ajv": "^6.12.3",
+        "har-schema": "^2.0.0"
+      }
+    },
+    "has": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+      "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+      "requires": {
+        "function-bind": "^1.1.1"
+      }
+    },
+    "has-ansi": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+      "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+      "dev": true,
+      "requires": {
+        "ansi-regex": "^2.0.0"
+      }
+    },
+    "has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+    },
+    "has-symbols": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+      "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
+      "dev": true
+    },
+    "has-unicode": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+      "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
+    },
+    "has-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
+      "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
+      "dev": true,
+      "requires": {
+        "get-value": "^2.0.6",
+        "has-values": "^1.0.0",
+        "isobject": "^3.0.0"
+      }
+    },
+    "has-values": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
+      "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
+      "dev": true,
+      "requires": {
+        "is-number": "^3.0.0",
+        "kind-of": "^4.0.0"
+      },
+      "dependencies": {
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "kind-of": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+          "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "hash-base": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz",
+      "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.4",
+        "readable-stream": "^3.6.0",
+        "safe-buffer": "^5.2.0"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+          "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "3.6.0",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+          "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+          "dev": true,
+          "requires": {
+            "inherits": "^2.0.3",
+            "string_decoder": "^1.1.1",
+            "util-deprecate": "^1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.2.1",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+          "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+          "dev": true
+        }
+      }
+    },
+    "hash.js": {
+      "version": "1.1.7",
+      "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+      "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.3",
+        "minimalistic-assert": "^1.0.1"
+      }
+    },
+    "hasha": {
+      "version": "5.2.2",
+      "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz",
+      "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==",
+      "dev": true,
+      "requires": {
+        "is-stream": "^2.0.0",
+        "type-fest": "^0.8.0"
+      },
+      "dependencies": {
+        "is-stream": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
+          "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
+          "dev": true
+        }
+      }
+    },
+    "he": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+      "dev": true
+    },
+    "hex-color-regex": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz",
+      "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==",
+      "dev": true
+    },
+    "hmac-drbg": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
+      "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
+      "dev": true,
+      "requires": {
+        "hash.js": "^1.0.3",
+        "minimalistic-assert": "^1.0.0",
+        "minimalistic-crypto-utils": "^1.0.1"
+      }
+    },
+    "hoek": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
+      "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA=="
+    },
+    "hosted-git-info": {
+      "version": "2.8.8",
+      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
+      "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
+      "dev": true
+    },
+    "hsl-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz",
+      "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=",
+      "dev": true
+    },
+    "hsla-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz",
+      "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=",
+      "dev": true
+    },
+    "html-comment-regex": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz",
+      "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==",
+      "dev": true
+    },
+    "html-encoding-sniffer": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
+      "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
+      "dev": true,
+      "requires": {
+        "whatwg-encoding": "^1.0.1"
+      }
+    },
+    "html-escaper": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
+      "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
+      "dev": true
+    },
+    "html-tags": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-1.2.0.tgz",
+      "integrity": "sha1-x43mW1Zjqll5id0rerSSANfk25g=",
+      "dev": true
+    },
+    "htmlescape": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
+      "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=",
+      "dev": true
+    },
+    "htmlnano": {
+      "version": "0.2.8",
+      "resolved": "https://registry.npmjs.org/htmlnano/-/htmlnano-0.2.8.tgz",
+      "integrity": "sha512-q5gbo4SIDAE5sfJ5V0UD6uu+n1dcO/Mpr0B6SlDlJBoV7xKPne4uG4UwrT8vUWjdjIPJl95TY8EDuEbBW2TG0A==",
+      "dev": true,
+      "requires": {
+        "cssnano": "^4.1.10",
+        "posthtml": "^0.13.4",
+        "posthtml-render": "^1.3.0",
+        "purgecss": "^2.3.0",
+        "relateurl": "^0.2.7",
+        "srcset": "^3.0.0",
+        "svgo": "^1.3.2",
+        "terser": "^4.8.0",
+        "timsort": "^0.3.0",
+        "uncss": "^0.17.3"
+      },
+      "dependencies": {
+        "posthtml": {
+          "version": "0.13.4",
+          "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.13.4.tgz",
+          "integrity": "sha512-i2oTo/+dwXGC6zaAQSF6WZEQSbEqu10hsvg01DWzGAfZmy31Iiy9ktPh9nnXDfZiYytjxTIvxoK4TI0uk4QWpw==",
+          "dev": true,
+          "requires": {
+            "posthtml-parser": "^0.5.0",
+            "posthtml-render": "^1.2.3"
+          }
+        },
+        "posthtml-parser": {
+          "version": "0.5.3",
+          "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.5.3.tgz",
+          "integrity": "sha512-uHosRn0y+1wbnlYKrqMjBPoo/kK5LPYImLtiETszNFYfFwAD3cQdD1R2E13Mh5icBxkHj+yKtlIHozCsmVWD/Q==",
+          "dev": true,
+          "requires": {
+            "htmlparser2": "^3.9.2"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "terser": {
+          "version": "4.8.0",
+          "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
+          "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
+          "dev": true,
+          "requires": {
+            "commander": "^2.20.0",
+            "source-map": "~0.6.1",
+            "source-map-support": "~0.5.12"
+          }
+        }
+      }
+    },
+    "htmlparser2": {
+      "version": "3.10.1",
+      "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
+      "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
+      "dev": true,
+      "requires": {
+        "domelementtype": "^1.3.1",
+        "domhandler": "^2.3.0",
+        "domutils": "^1.5.1",
+        "entities": "^1.1.1",
+        "inherits": "^2.0.1",
+        "readable-stream": "^3.1.1"
+      },
+      "dependencies": {
+        "entities": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
+          "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "3.6.0",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+          "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+          "dev": true,
+          "requires": {
+            "inherits": "^2.0.3",
+            "string_decoder": "^1.1.1",
+            "util-deprecate": "^1.0.1"
+          }
+        }
+      }
+    },
+    "http-errors": {
+      "version": "1.7.2",
+      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
+      "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
+      "requires": {
+        "depd": "~1.1.2",
+        "inherits": "2.0.3",
+        "setprototypeof": "1.1.1",
+        "statuses": ">= 1.5.0 < 2",
+        "toidentifier": "1.0.0"
+      }
+    },
+    "http-signature": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+      "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+      "requires": {
+        "assert-plus": "^1.0.0",
+        "jsprim": "^1.2.2",
+        "sshpk": "^1.7.0"
+      }
+    },
+    "https-browserify": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
+      "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
+      "dev": true
+    },
+    "iconv-lite": {
+      "version": "0.4.24",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+      "requires": {
+        "safer-buffer": ">= 2.1.2 < 3"
+      }
+    },
+    "icss-replace-symbols": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz",
+      "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=",
+      "dev": true
+    },
+    "ieee754": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+      "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+      "dev": true
+    },
+    "ignore": {
+      "version": "4.0.6",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+      "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+      "dev": true
+    },
+    "ignore-by-default": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+      "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=",
+      "dev": true
+    },
+    "ignore-walk": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
+      "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
+      "requires": {
+        "minimatch": "^3.0.4"
+      }
+    },
+    "import-fresh": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz",
+      "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==",
+      "dev": true,
+      "requires": {
+        "parent-module": "^1.0.0",
+        "resolve-from": "^4.0.0"
+      }
+    },
+    "import-lazy": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
+      "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
+      "dev": true
+    },
+    "imurmurhash": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+      "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+      "dev": true
+    },
+    "indent-string": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
+      "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
+      "dev": true
+    },
+    "indexes-of": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz",
+      "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=",
+      "dev": true
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+      "requires": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "inherits": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+    },
+    "ini": {
+      "version": "1.3.8",
+      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+      "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
+    },
+    "inline-source-map": {
+      "version": "0.6.2",
+      "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz",
+      "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=",
+      "dev": true,
+      "requires": {
+        "source-map": "~0.5.3"
+      }
+    },
+    "insert-module-globals": {
+      "version": "7.2.1",
+      "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.1.tgz",
+      "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==",
+      "dev": true,
+      "requires": {
+        "JSONStream": "^1.0.3",
+        "acorn-node": "^1.5.2",
+        "combine-source-map": "^0.8.0",
+        "concat-stream": "^1.6.1",
+        "is-buffer": "^1.1.0",
+        "path-is-absolute": "^1.0.1",
+        "process": "~0.11.0",
+        "through2": "^2.0.0",
+        "undeclared-identifiers": "^1.1.2",
+        "xtend": "^4.0.0"
+      }
+    },
+    "interpret": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz",
+      "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw=="
+    },
+    "ipaddr.js": {
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+      "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
+    },
+    "is-absolute-url": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz",
+      "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=",
+      "dev": true
+    },
+    "is-accessor-descriptor": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+      "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "is-arguments": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz",
+      "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0"
+      }
+    },
+    "is-arrayish": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+      "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
+      "dev": true
+    },
+    "is-binary-path": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+      "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+      "dev": true,
+      "requires": {
+        "binary-extensions": "^2.0.0"
+      }
+    },
+    "is-buffer": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+      "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+      "dev": true
+    },
+    "is-callable": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
+      "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==",
+      "dev": true
+    },
+    "is-ci": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz",
+      "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==",
+      "dev": true,
+      "requires": {
+        "ci-info": "^1.5.0"
+      }
+    },
+    "is-color-stop": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz",
+      "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=",
+      "dev": true,
+      "requires": {
+        "css-color-names": "^0.0.4",
+        "hex-color-regex": "^1.1.0",
+        "hsl-regex": "^1.0.0",
+        "hsla-regex": "^1.0.0",
+        "rgb-regex": "^1.0.1",
+        "rgba-regex": "^1.0.0"
+      }
+    },
+    "is-core-module": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz",
+      "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==",
+      "requires": {
+        "has": "^1.0.3"
+      }
+    },
+    "is-data-descriptor": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+      "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "is-date-object": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
+      "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
+      "dev": true
+    },
+    "is-descriptor": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+      "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+      "dev": true,
+      "requires": {
+        "is-accessor-descriptor": "^0.1.6",
+        "is-data-descriptor": "^0.1.4",
+        "kind-of": "^5.0.0"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+          "dev": true
+        }
+      }
+    },
+    "is-directory": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
+      "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
+      "dev": true
+    },
+    "is-extendable": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+      "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+      "dev": true
+    },
+    "is-extglob": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+      "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+      "dev": true
+    },
+    "is-fullwidth-code-point": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+      "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+      "requires": {
+        "number-is-nan": "^1.0.0"
+      }
+    },
+    "is-generator-function": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz",
+      "integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ==",
+      "dev": true
+    },
+    "is-glob": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+      "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+      "dev": true,
+      "requires": {
+        "is-extglob": "^2.1.1"
+      }
+    },
+    "is-html": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-html/-/is-html-1.1.0.tgz",
+      "integrity": "sha1-4E8cGNOUhRETlvmgJz6rUa8hhGQ=",
+      "dev": true,
+      "requires": {
+        "html-tags": "^1.0.0"
+      }
+    },
+    "is-installed-globally": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz",
+      "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=",
+      "dev": true,
+      "requires": {
+        "global-dirs": "^0.1.0",
+        "is-path-inside": "^1.0.0"
+      }
+    },
+    "is-negative-zero": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz",
+      "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=",
+      "dev": true
+    },
+    "is-npm": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz",
+      "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=",
+      "dev": true
+    },
+    "is-number": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+      "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+      "dev": true
+    },
+    "is-obj": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
+      "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
+      "dev": true
+    },
+    "is-path-inside": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
+      "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=",
+      "dev": true,
+      "requires": {
+        "path-is-inside": "^1.0.1"
+      }
+    },
+    "is-plain-obj": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
+      "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
+      "dev": true
+    },
+    "is-plain-object": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+      "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.1"
+      }
+    },
+    "is-redirect": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz",
+      "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=",
+      "dev": true
+    },
+    "is-regex": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz",
+      "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==",
+      "dev": true,
+      "requires": {
+        "has-symbols": "^1.0.1"
+      }
+    },
+    "is-resolvable": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
+      "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==",
+      "dev": true
+    },
+    "is-retry-allowed": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz",
+      "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==",
+      "dev": true
+    },
+    "is-stream": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
+      "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
+      "dev": true
+    },
+    "is-string": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+      "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
+      "dev": true
+    },
+    "is-svg": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz",
+      "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==",
+      "dev": true,
+      "requires": {
+        "html-comment-regex": "^1.1.0"
+      }
+    },
+    "is-symbol": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+      "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+      "dev": true,
+      "requires": {
+        "has-symbols": "^1.0.1"
+      }
+    },
+    "is-typed-array": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.4.tgz",
+      "integrity": "sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA==",
+      "dev": true,
+      "requires": {
+        "available-typed-arrays": "^1.0.2",
+        "call-bind": "^1.0.0",
+        "es-abstract": "^1.18.0-next.1",
+        "foreach": "^2.0.5",
+        "has-symbols": "^1.0.1"
+      }
+    },
+    "is-typedarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+      "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
+    },
+    "is-url": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz",
+      "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==",
+      "dev": true
+    },
+    "is-windows": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+      "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
+      "dev": true
+    },
+    "is-wsl": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
+      "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
+      "dev": true
+    },
+    "isarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+    },
+    "isemail": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/isemail/-/isemail-2.2.1.tgz",
+      "integrity": "sha1-A1PT2aYpUQgMJiwqoKQrjqjp4qY="
+    },
+    "isexe": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+    },
+    "isobject": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+      "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+      "dev": true
+    },
+    "isstream": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+      "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
+    },
+    "istanbul-lib-coverage": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz",
+      "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==",
+      "dev": true
+    },
+    "istanbul-lib-hook": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz",
+      "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==",
+      "dev": true,
+      "requires": {
+        "append-transform": "^2.0.0"
+      }
+    },
+    "istanbul-lib-instrument": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz",
+      "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==",
+      "dev": true,
+      "requires": {
+        "@babel/core": "^7.7.5",
+        "@istanbuljs/schema": "^0.1.2",
+        "istanbul-lib-coverage": "^3.0.0",
+        "semver": "^6.3.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "istanbul-lib-processinfo": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz",
+      "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==",
+      "dev": true,
+      "requires": {
+        "archy": "^1.0.0",
+        "cross-spawn": "^7.0.0",
+        "istanbul-lib-coverage": "^3.0.0-alpha.1",
+        "make-dir": "^3.0.0",
+        "p-map": "^3.0.0",
+        "rimraf": "^3.0.0",
+        "uuid": "^3.3.3"
+      },
+      "dependencies": {
+        "make-dir": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+          "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+          "dev": true,
+          "requires": {
+            "semver": "^6.0.0"
+          }
+        },
+        "rimraf": {
+          "version": "3.0.2",
+          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+          "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+          "dev": true,
+          "requires": {
+            "glob": "^7.1.3"
+          }
+        },
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "istanbul-lib-report": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
+      "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==",
+      "dev": true,
+      "requires": {
+        "istanbul-lib-coverage": "^3.0.0",
+        "make-dir": "^3.0.0",
+        "supports-color": "^7.1.0"
+      },
+      "dependencies": {
+        "make-dir": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+          "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+          "dev": true,
+          "requires": {
+            "semver": "^6.0.0"
+          }
+        },
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "istanbul-lib-source-maps": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz",
+      "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==",
+      "dev": true,
+      "requires": {
+        "debug": "^4.1.1",
+        "istanbul-lib-coverage": "^3.0.0",
+        "source-map": "^0.6.1"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "istanbul-reports": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz",
+      "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==",
+      "dev": true,
+      "requires": {
+        "html-escaper": "^2.0.0",
+        "istanbul-lib-report": "^3.0.0"
+      }
+    },
+    "items": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/items/-/items-2.1.2.tgz",
+      "integrity": "sha512-kezcEqgB97BGeZZYtX/MA8AG410ptURstvnz5RAgyFZ8wQFPMxHY8GpTq+/ZHKT3frSlIthUq7EvLt9xn3TvXg=="
+    },
+    "jake": {
+      "version": "10.8.4",
+      "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.4.tgz",
+      "integrity": "sha512-MtWeTkl1qGsWUtbl/Jsca/8xSoK3x0UmS82sNbjqxxG/de/M/3b1DntdjHgPMC50enlTNwXOCRqPXLLt5cCfZA==",
+      "requires": {
+        "async": "0.9.x",
+        "chalk": "^4.0.2",
+        "filelist": "^1.0.1",
+        "minimatch": "^3.0.4"
+      }
+    },
+    "joi": {
+      "version": "10.6.0",
+      "resolved": "https://registry.npmjs.org/joi/-/joi-10.6.0.tgz",
+      "integrity": "sha512-hBF3LcqyAid+9X/pwg+eXjD2QBZI5eXnBFJYaAkH4SK3mp9QSRiiQnDYlmlz5pccMvnLcJRS4whhDOTCkmsAdQ==",
+      "requires": {
+        "hoek": "4.x.x",
+        "isemail": "2.x.x",
+        "items": "2.x.x",
+        "topo": "2.x.x"
+      }
+    },
+    "js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+      "dev": true
+    },
+    "js-yaml": {
+      "version": "3.14.0",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
+      "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
+      "dev": true,
+      "requires": {
+        "argparse": "^1.0.7",
+        "esprima": "^4.0.0"
+      }
+    },
+    "js2xmlparser": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz",
+      "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==",
+      "dev": true,
+      "requires": {
+        "xmlcreate": "^2.0.3"
+      }
+    },
+    "jsbn": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
+    },
+    "jsdoc": {
+      "version": "3.6.6",
+      "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.6.tgz",
+      "integrity": "sha512-znR99e1BHeyEkSvgDDpX0sTiTu+8aQyDl9DawrkOGZTTW8hv0deIFXx87114zJ7gRaDZKVQD/4tr1ifmJp9xhQ==",
+      "dev": true,
+      "requires": {
+        "@babel/parser": "^7.9.4",
+        "bluebird": "^3.7.2",
+        "catharsis": "^0.8.11",
+        "escape-string-regexp": "^2.0.0",
+        "js2xmlparser": "^4.0.1",
+        "klaw": "^3.0.0",
+        "markdown-it": "^10.0.0",
+        "markdown-it-anchor": "^5.2.7",
+        "marked": "^0.8.2",
+        "mkdirp": "^1.0.4",
+        "requizzle": "^0.2.3",
+        "strip-json-comments": "^3.1.0",
+        "taffydb": "2.6.2",
+        "underscore": "~1.10.2"
+      },
+      "dependencies": {
+        "escape-string-regexp": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+          "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+          "dev": true
+        },
+        "mkdirp": {
+          "version": "1.0.4",
+          "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+          "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+          "dev": true
+        },
+        "strip-json-comments": {
+          "version": "3.1.1",
+          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+          "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+          "dev": true
+        }
+      }
+    },
+    "jsdom": {
+      "version": "14.1.0",
+      "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-14.1.0.tgz",
+      "integrity": "sha512-O901mfJSuTdwU2w3Sn+74T+RnDVP+FuV5fH8tcPWyqrseRAb0s5xOtPgCFiPOtLcyK7CLIJwPyD83ZqQWvA5ng==",
+      "dev": true,
+      "requires": {
+        "abab": "^2.0.0",
+        "acorn": "^6.0.4",
+        "acorn-globals": "^4.3.0",
+        "array-equal": "^1.0.0",
+        "cssom": "^0.3.4",
+        "cssstyle": "^1.1.1",
+        "data-urls": "^1.1.0",
+        "domexception": "^1.0.1",
+        "escodegen": "^1.11.0",
+        "html-encoding-sniffer": "^1.0.2",
+        "nwsapi": "^2.1.3",
+        "parse5": "5.1.0",
+        "pn": "^1.1.0",
+        "request": "^2.88.0",
+        "request-promise-native": "^1.0.5",
+        "saxes": "^3.1.9",
+        "symbol-tree": "^3.2.2",
+        "tough-cookie": "^2.5.0",
+        "w3c-hr-time": "^1.0.1",
+        "w3c-xmlserializer": "^1.1.2",
+        "webidl-conversions": "^4.0.2",
+        "whatwg-encoding": "^1.0.5",
+        "whatwg-mimetype": "^2.3.0",
+        "whatwg-url": "^7.0.0",
+        "ws": "^6.1.2",
+        "xml-name-validator": "^3.0.0"
+      },
+      "dependencies": {
+        "acorn": {
+          "version": "6.4.2",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz",
+          "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==",
+          "dev": true
+        },
+        "escodegen": {
+          "version": "1.14.3",
+          "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
+          "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
+          "dev": true,
+          "requires": {
+            "esprima": "^4.0.1",
+            "estraverse": "^4.2.0",
+            "esutils": "^2.0.2",
+            "optionator": "^0.8.1",
+            "source-map": "~0.6.1"
+          }
+        },
+        "levn": {
+          "version": "0.3.0",
+          "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+          "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+          "dev": true,
+          "requires": {
+            "prelude-ls": "~1.1.2",
+            "type-check": "~0.3.2"
+          }
+        },
+        "optionator": {
+          "version": "0.8.3",
+          "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+          "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+          "dev": true,
+          "requires": {
+            "deep-is": "~0.1.3",
+            "fast-levenshtein": "~2.0.6",
+            "levn": "~0.3.0",
+            "prelude-ls": "~1.1.2",
+            "type-check": "~0.3.2",
+            "word-wrap": "~1.2.3"
+          }
+        },
+        "prelude-ls": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+          "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true,
+          "optional": true
+        },
+        "type-check": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+          "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+          "dev": true,
+          "requires": {
+            "prelude-ls": "~1.1.2"
+          }
+        },
+        "ws": {
+          "version": "6.2.1",
+          "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
+          "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
+          "dev": true,
+          "requires": {
+            "async-limiter": "~1.0.0"
+          }
+        }
+      }
+    },
+    "jsesc": {
+      "version": "2.5.2",
+      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+      "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+      "dev": true
+    },
+    "json-parse-better-errors": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+      "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+      "dev": true
+    },
+    "json-schema": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+      "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
+    },
+    "json-schema-traverse": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
+    },
+    "json-stable-stringify-without-jsonify": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+      "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
+      "dev": true
+    },
+    "json-stringify-safe": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+      "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
+    },
+    "json5": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
+      "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.2.0"
+      }
+    },
+    "jsonparse": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
+      "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
+      "dev": true
+    },
+    "jsonrpc-lite": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/jsonrpc-lite/-/jsonrpc-lite-2.2.0.tgz",
+      "integrity": "sha512-/cbbSxtZWs1O7R4tWqabrCM/t3N8qKUZMAg9IUqpPvUs6UyRvm6pCNYkskyKN/XU0UgffW+NY2ZRr8t0AknX7g=="
+    },
+    "jsonwebtoken": {
+      "version": "8.5.1",
+      "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
+      "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
+      "requires": {
+        "jws": "^3.2.2",
+        "lodash.includes": "^4.3.0",
+        "lodash.isboolean": "^3.0.3",
+        "lodash.isinteger": "^4.0.4",
+        "lodash.isnumber": "^3.0.3",
+        "lodash.isplainobject": "^4.0.6",
+        "lodash.isstring": "^4.0.1",
+        "lodash.once": "^4.0.0",
+        "ms": "^2.1.1",
+        "semver": "^5.6.0"
+      },
+      "dependencies": {
+        "ms": {
+          "version": "2.1.3",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+          "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+        }
+      }
+    },
+    "jsprim": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
+      "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+      "requires": {
+        "assert-plus": "1.0.0",
+        "extsprintf": "1.3.0",
+        "json-schema": "0.2.3",
+        "verror": "1.10.0"
+      }
+    },
+    "jwa": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+      "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+      "requires": {
+        "buffer-equal-constant-time": "1.0.1",
+        "ecdsa-sig-formatter": "1.0.11",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "jws": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+      "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+      "requires": {
+        "jwa": "^1.4.1",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "kind-of": {
+      "version": "6.0.3",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+      "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+      "dev": true
+    },
+    "klaw": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
+      "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.9"
+      }
+    },
+    "knex": {
+      "version": "0.95.15",
+      "resolved": "https://registry.npmjs.org/knex/-/knex-0.95.15.tgz",
+      "integrity": "sha512-Loq6WgHaWlmL2bfZGWPsy4l8xw4pOE+tmLGkPG0auBppxpI0UcK+GYCycJcqz9W54f2LiGewkCVLBm3Wq4ur/w==",
+      "requires": {
+        "colorette": "2.0.16",
+        "commander": "^7.1.0",
+        "debug": "4.3.2",
+        "escalade": "^3.1.1",
+        "esm": "^3.2.25",
+        "getopts": "2.2.5",
+        "interpret": "^2.2.0",
+        "lodash": "^4.17.21",
+        "pg-connection-string": "2.5.0",
+        "rechoir": "0.7.0",
+        "resolve-from": "^5.0.0",
+        "tarn": "^3.0.1",
+        "tildify": "2.0.0"
+      },
+      "dependencies": {
+        "colorette": {
+          "version": "2.0.16",
+          "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
+          "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g=="
+        },
+        "commander": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+          "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="
+        },
+        "debug": {
+          "version": "4.3.2",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
+          "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
+          "requires": {
+            "ms": "2.1.2"
+          }
+        },
+        "lodash": {
+          "version": "4.17.21",
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+          "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+        },
+        "resolve-from": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+          "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="
+        }
+      }
+    },
+    "labeled-stream-splicer": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz",
+      "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "stream-splicer": "^2.0.0"
+      }
+    },
+    "latest-version": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz",
+      "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=",
+      "dev": true,
+      "requires": {
+        "package-json": "^4.0.0"
+      }
+    },
+    "levn": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+      "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+      "dev": true,
+      "requires": {
+        "prelude-ls": "^1.2.1",
+        "type-check": "~0.4.0"
+      }
+    },
+    "linkify-it": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
+      "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
+      "dev": true,
+      "requires": {
+        "uc.micro": "^1.0.1"
+      }
+    },
+    "load-json-file": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
+      "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "parse-json": "^2.2.0",
+        "pify": "^2.0.0",
+        "strip-bom": "^3.0.0"
+      }
+    },
+    "locate-path": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+      "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+      "dev": true,
+      "requires": {
+        "p-locate": "^2.0.0",
+        "path-exists": "^3.0.0"
+      }
+    },
+    "lodash": {
+      "version": "4.17.20",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+      "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+      "dev": true
+    },
+    "lodash.clone": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz",
+      "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=",
+      "dev": true
+    },
+    "lodash.flattendeep": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz",
+      "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=",
+      "dev": true
+    },
+    "lodash.includes": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+      "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8="
+    },
+    "lodash.isboolean": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+      "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY="
+    },
+    "lodash.isinteger": {
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+      "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M="
+    },
+    "lodash.isnumber": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+      "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w="
+    },
+    "lodash.isplainobject": {
+      "version": "4.0.6",
+      "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+      "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
+    },
+    "lodash.isstring": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+      "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
+    },
+    "lodash.memoize": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz",
+      "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=",
+      "dev": true
+    },
+    "lodash.once": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+      "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
+    },
+    "lodash.sortby": {
+      "version": "4.7.0",
+      "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
+      "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=",
+      "dev": true
+    },
+    "lodash.uniq": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
+      "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=",
+      "dev": true
+    },
+    "log-symbols": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz",
+      "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==",
+      "dev": true,
+      "requires": {
+        "chalk": "^4.0.0"
+      }
+    },
+    "lowercase-keys": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
+      "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",
+      "dev": true
+    },
+    "lru-cache": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+      "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+      "dev": true,
+      "requires": {
+        "yallist": "^4.0.0"
+      },
+      "dependencies": {
+        "yallist": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+          "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+          "dev": true
+        }
+      }
+    },
+    "magic-string": {
+      "version": "0.22.5",
+      "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz",
+      "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==",
+      "dev": true,
+      "requires": {
+        "vlq": "^0.2.2"
+      }
+    },
+    "make-dir": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
+      "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
+      "dev": true,
+      "requires": {
+        "pify": "^3.0.0"
+      },
+      "dependencies": {
+        "pify": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+          "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+          "dev": true
+        }
+      }
+    },
+    "map-cache": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+      "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
+      "dev": true
+    },
+    "map-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
+      "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
+      "dev": true,
+      "requires": {
+        "object-visit": "^1.0.0"
+      }
+    },
+    "markdown-it": {
+      "version": "10.0.0",
+      "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz",
+      "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==",
+      "dev": true,
+      "requires": {
+        "argparse": "^1.0.7",
+        "entities": "~2.0.0",
+        "linkify-it": "^2.0.0",
+        "mdurl": "^1.0.1",
+        "uc.micro": "^1.0.5"
+      }
+    },
+    "markdown-it-anchor": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz",
+      "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==",
+      "dev": true
+    },
+    "marked": {
+      "version": "0.8.2",
+      "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz",
+      "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==",
+      "dev": true
+    },
+    "md5.js": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+      "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
+      "dev": true,
+      "requires": {
+        "hash-base": "^3.0.0",
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.1.2"
+      }
+    },
+    "mdn-data": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
+      "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==",
+      "dev": true
+    },
+    "mdurl": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
+      "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
+      "dev": true
+    },
+    "media-typer": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+      "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
+    },
+    "memorystream": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
+      "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
+      "dev": true
+    },
+    "merge-descriptors": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+      "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
+    },
+    "merge-source-map": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz",
+      "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=",
+      "dev": true,
+      "requires": {
+        "source-map": "^0.5.6"
+      }
+    },
+    "merge2": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+      "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+      "dev": true
+    },
+    "methods": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+      "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
+    },
+    "micromatch": {
+      "version": "3.1.10",
+      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+      "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+      "dev": true,
+      "requires": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "braces": "^2.3.1",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "extglob": "^2.0.4",
+        "fragment-cache": "^0.2.1",
+        "kind-of": "^6.0.2",
+        "nanomatch": "^1.2.9",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.2"
+      },
+      "dependencies": {
+        "braces": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+          "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+          "dev": true,
+          "requires": {
+            "arr-flatten": "^1.1.0",
+            "array-unique": "^0.3.2",
+            "extend-shallow": "^2.0.1",
+            "fill-range": "^4.0.0",
+            "isobject": "^3.0.1",
+            "repeat-element": "^1.1.2",
+            "snapdragon": "^0.8.1",
+            "snapdragon-node": "^2.0.1",
+            "split-string": "^3.0.2",
+            "to-regex": "^3.0.1"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "requires": {
+            "extend-shallow": "^2.0.1",
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1",
+            "to-regex-range": "^2.1.0"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "to-regex-range": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+          "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+          "dev": true,
+          "requires": {
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1"
+          }
+        }
+      }
+    },
+    "miller-rabin": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
+      "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.0.0",
+        "brorand": "^1.0.1"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.11.9",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
+          "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+          "dev": true
+        }
+      }
+    },
+    "mime": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+      "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
+    },
+    "mime-db": {
+      "version": "1.44.0",
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
+      "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
+    },
+    "mime-types": {
+      "version": "2.1.27",
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
+      "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
+      "requires": {
+        "mime-db": "1.44.0"
+      }
+    },
+    "mimic-fn": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+      "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+      "dev": true
+    },
+    "minimalistic-assert": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+      "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
+      "dev": true
+    },
+    "minimalistic-crypto-utils": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
+      "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
+      "dev": true
+    },
+    "minimatch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+      "requires": {
+        "brace-expansion": "^1.1.7"
+      }
+    },
+    "minimist": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+    },
+    "minipass": {
+      "version": "2.9.0",
+      "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
+      "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
+      "requires": {
+        "safe-buffer": "^5.1.2",
+        "yallist": "^3.0.0"
+      }
+    },
+    "minizlib": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
+      "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
+      "requires": {
+        "minipass": "^2.9.0"
+      }
+    },
+    "mixin-deep": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
+      "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
+      "dev": true,
+      "requires": {
+        "for-in": "^1.0.2",
+        "is-extendable": "^1.0.1"
+      },
+      "dependencies": {
+        "is-extendable": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+          "dev": true,
+          "requires": {
+            "is-plain-object": "^2.0.4"
+          }
+        }
+      }
+    },
+    "mkdirp": {
+      "version": "0.5.5",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+      "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+      "requires": {
+        "minimist": "^1.2.5"
+      }
+    },
+    "mkdirp-classic": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+      "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
+      "dev": true
+    },
+    "mocha": {
+      "version": "8.2.1",
+      "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz",
+      "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==",
+      "dev": true,
+      "requires": {
+        "@ungap/promise-all-settled": "1.1.2",
+        "ansi-colors": "4.1.1",
+        "browser-stdout": "1.3.1",
+        "chokidar": "3.4.3",
+        "debug": "4.2.0",
+        "diff": "4.0.2",
+        "escape-string-regexp": "4.0.0",
+        "find-up": "5.0.0",
+        "glob": "7.1.6",
+        "growl": "1.10.5",
+        "he": "1.2.0",
+        "js-yaml": "3.14.0",
+        "log-symbols": "4.0.0",
+        "minimatch": "3.0.4",
+        "ms": "2.1.2",
+        "nanoid": "3.1.12",
+        "serialize-javascript": "5.0.1",
+        "strip-json-comments": "3.1.1",
+        "supports-color": "7.2.0",
+        "which": "2.0.2",
+        "wide-align": "1.1.3",
+        "workerpool": "6.0.2",
+        "yargs": "13.3.2",
+        "yargs-parser": "13.1.2",
+        "yargs-unparser": "2.0.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "4.2.0",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
+          "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
+          "dev": true,
+          "requires": {
+            "ms": "2.1.2"
+          }
+        },
+        "escape-string-regexp": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+          "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+          "dev": true
+        },
+        "find-up": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+          "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^6.0.0",
+            "path-exists": "^4.0.0"
+          }
+        },
+        "locate-path": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+          "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^5.0.0"
+          }
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+          "dev": true
+        },
+        "p-limit": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+          "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+          "dev": true,
+          "requires": {
+            "yocto-queue": "^0.1.0"
+          }
+        },
+        "p-locate": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+          "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^3.0.2"
+          }
+        },
+        "path-exists": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+          "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+          "dev": true
+        },
+        "strip-json-comments": {
+          "version": "3.1.1",
+          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+          "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+          "dev": true
+        }
+      }
+    },
+    "module-deps": {
+      "version": "6.2.3",
+      "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz",
+      "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==",
+      "dev": true,
+      "requires": {
+        "JSONStream": "^1.0.3",
+        "browser-resolve": "^2.0.0",
+        "cached-path-relative": "^1.0.2",
+        "concat-stream": "~1.6.0",
+        "defined": "^1.0.0",
+        "detective": "^5.2.0",
+        "duplexer2": "^0.1.2",
+        "inherits": "^2.0.1",
+        "parents": "^1.0.0",
+        "readable-stream": "^2.0.2",
+        "resolve": "^1.4.0",
+        "stream-combiner2": "^1.1.1",
+        "subarg": "^1.0.0",
+        "through2": "^2.0.0",
+        "xtend": "^4.0.0"
+      }
+    },
+    "moment": {
+      "version": "2.29.1",
+      "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
+      "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
+    },
+    "ms": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+    },
+    "nan": {
+      "version": "2.14.2",
+      "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
+      "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
+      "dev": true
+    },
+    "nanoid": {
+      "version": "3.1.12",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz",
+      "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==",
+      "dev": true
+    },
+    "nanomatch": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
+      "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
+      "dev": true,
+      "requires": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "fragment-cache": "^0.2.1",
+        "is-windows": "^1.0.2",
+        "kind-of": "^6.0.2",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      }
+    },
+    "natural-compare": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+      "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
+      "dev": true
+    },
+    "needle": {
+      "version": "2.5.2",
+      "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz",
+      "integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==",
+      "requires": {
+        "debug": "^3.2.6",
+        "iconv-lite": "^0.4.4",
+        "sax": "^1.2.4"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "3.2.7",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+          "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+        }
+      }
+    },
+    "negotiator": {
+      "version": "0.6.2",
+      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
+      "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
+    },
+    "next-tick": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
+      "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
+      "dev": true
+    },
+    "nice-try": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
+      "dev": true
+    },
+    "node-addon-api": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz",
+      "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A=="
+    },
+    "node-fetch": {
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
+      "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
+      "dev": true
+    },
+    "node-forge": {
+      "version": "0.7.6",
+      "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz",
+      "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==",
+      "dev": true
+    },
+    "node-gyp": {
+      "version": "3.8.0",
+      "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
+      "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
+      "optional": true,
+      "requires": {
+        "fstream": "^1.0.0",
+        "glob": "^7.0.3",
+        "graceful-fs": "^4.1.2",
+        "mkdirp": "^0.5.0",
+        "nopt": "2 || 3",
+        "npmlog": "0 || 1 || 2 || 3 || 4",
+        "osenv": "0",
+        "request": "^2.87.0",
+        "rimraf": "2",
+        "semver": "~5.3.0",
+        "tar": "^2.0.0",
+        "which": "1"
+      },
+      "dependencies": {
+        "nopt": {
+          "version": "3.0.6",
+          "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
+          "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+          "optional": true,
+          "requires": {
+            "abbrev": "1"
+          }
+        },
+        "semver": {
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
+          "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
+          "optional": true
+        },
+        "tar": {
+          "version": "2.2.2",
+          "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
+          "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
+          "optional": true,
+          "requires": {
+            "block-stream": "*",
+            "fstream": "^1.0.12",
+            "inherits": "2"
+          }
+        },
+        "which": {
+          "version": "1.3.1",
+          "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+          "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+          "optional": true,
+          "requires": {
+            "isexe": "^2.0.0"
+          }
+        }
+      }
+    },
+    "node-libs-browser": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz",
+      "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==",
+      "dev": true,
+      "requires": {
+        "assert": "^1.1.1",
+        "browserify-zlib": "^0.2.0",
+        "buffer": "^4.3.0",
+        "console-browserify": "^1.1.0",
+        "constants-browserify": "^1.0.0",
+        "crypto-browserify": "^3.11.0",
+        "domain-browser": "^1.1.1",
+        "events": "^3.0.0",
+        "https-browserify": "^1.0.0",
+        "os-browserify": "^0.3.0",
+        "path-browserify": "0.0.1",
+        "process": "^0.11.10",
+        "punycode": "^1.2.4",
+        "querystring-es3": "^0.2.0",
+        "readable-stream": "^2.3.3",
+        "stream-browserify": "^2.0.1",
+        "stream-http": "^2.7.2",
+        "string_decoder": "^1.0.0",
+        "timers-browserify": "^2.0.4",
+        "tty-browserify": "0.0.0",
+        "url": "^0.11.0",
+        "util": "^0.11.0",
+        "vm-browserify": "^1.0.1"
+      },
+      "dependencies": {
+        "buffer": {
+          "version": "4.9.2",
+          "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
+          "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
+          "dev": true,
+          "requires": {
+            "base64-js": "^1.0.2",
+            "ieee754": "^1.1.4",
+            "isarray": "^1.0.0"
+          }
+        },
+        "path-browserify": {
+          "version": "0.0.1",
+          "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
+          "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
+          "dev": true
+        },
+        "punycode": {
+          "version": "1.4.1",
+          "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+          "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+          "dev": true
+        },
+        "stream-browserify": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
+          "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
+          "dev": true,
+          "requires": {
+            "inherits": "~2.0.1",
+            "readable-stream": "^2.0.2"
+          }
+        },
+        "stream-http": {
+          "version": "2.8.3",
+          "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
+          "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
+          "dev": true,
+          "requires": {
+            "builtin-status-codes": "^3.0.0",
+            "inherits": "^2.0.1",
+            "readable-stream": "^2.3.6",
+            "to-arraybuffer": "^1.0.0",
+            "xtend": "^4.0.0"
+          }
+        },
+        "timers-browserify": {
+          "version": "2.0.12",
+          "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz",
+          "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==",
+          "dev": true,
+          "requires": {
+            "setimmediate": "^1.0.4"
+          }
+        },
+        "tty-browserify": {
+          "version": "0.0.0",
+          "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+          "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
+          "dev": true
+        },
+        "util": {
+          "version": "0.11.1",
+          "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
+          "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
+          "dev": true,
+          "requires": {
+            "inherits": "2.0.3"
+          }
+        }
+      }
+    },
+    "node-pre-gyp": {
+      "version": "0.11.0",
+      "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz",
+      "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==",
+      "requires": {
+        "detect-libc": "^1.0.2",
+        "mkdirp": "^0.5.1",
+        "needle": "^2.2.1",
+        "nopt": "^4.0.1",
+        "npm-packlist": "^1.1.6",
+        "npmlog": "^4.0.2",
+        "rc": "^1.2.7",
+        "rimraf": "^2.6.1",
+        "semver": "^5.3.0",
+        "tar": "^4"
+      }
+    },
+    "node-preload": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz",
+      "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==",
+      "dev": true,
+      "requires": {
+        "process-on-spawn": "^1.0.0"
+      }
+    },
+    "node-releases": {
+      "version": "1.1.70",
+      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.70.tgz",
+      "integrity": "sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw==",
+      "dev": true
+    },
+    "nodemon": {
+      "version": "1.19.4",
+      "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.4.tgz",
+      "integrity": "sha512-VGPaqQBNk193lrJFotBU8nvWZPqEZY2eIzymy2jjY0fJ9qIsxA0sxQ8ATPl0gZC645gijYEc1jtZvpS8QWzJGQ==",
+      "dev": true,
+      "requires": {
+        "chokidar": "^2.1.8",
+        "debug": "^3.2.6",
+        "ignore-by-default": "^1.0.1",
+        "minimatch": "^3.0.4",
+        "pstree.remy": "^1.1.7",
+        "semver": "^5.7.1",
+        "supports-color": "^5.5.0",
+        "touch": "^3.1.0",
+        "undefsafe": "^2.0.2",
+        "update-notifier": "^2.5.0"
+      },
+      "dependencies": {
+        "anymatch": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+          "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+          "dev": true,
+          "requires": {
+            "micromatch": "^3.1.4",
+            "normalize-path": "^2.1.1"
+          },
+          "dependencies": {
+            "normalize-path": {
+              "version": "2.1.1",
+              "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+              "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+              "dev": true,
+              "requires": {
+                "remove-trailing-separator": "^1.0.1"
+              }
+            }
+          }
+        },
+        "binary-extensions": {
+          "version": "1.13.1",
+          "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+          "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
+          "dev": true
+        },
+        "braces": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+          "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+          "dev": true,
+          "requires": {
+            "arr-flatten": "^1.1.0",
+            "array-unique": "^0.3.2",
+            "extend-shallow": "^2.0.1",
+            "fill-range": "^4.0.0",
+            "isobject": "^3.0.1",
+            "repeat-element": "^1.1.2",
+            "snapdragon": "^0.8.1",
+            "snapdragon-node": "^2.0.1",
+            "split-string": "^3.0.2",
+            "to-regex": "^3.0.1"
+          }
+        },
+        "chokidar": {
+          "version": "2.1.8",
+          "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
+          "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
+          "dev": true,
+          "requires": {
+            "anymatch": "^2.0.0",
+            "async-each": "^1.0.1",
+            "braces": "^2.3.2",
+            "fsevents": "^1.2.7",
+            "glob-parent": "^3.1.0",
+            "inherits": "^2.0.3",
+            "is-binary-path": "^1.0.0",
+            "is-glob": "^4.0.0",
+            "normalize-path": "^3.0.0",
+            "path-is-absolute": "^1.0.0",
+            "readdirp": "^2.2.1",
+            "upath": "^1.1.1"
+          }
+        },
+        "debug": {
+          "version": "3.2.7",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+          "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+          "dev": true,
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "requires": {
+            "extend-shallow": "^2.0.1",
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1",
+            "to-regex-range": "^2.1.0"
+          }
+        },
+        "fsevents": {
+          "version": "1.2.13",
+          "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+          "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "bindings": "^1.5.0",
+            "nan": "^2.12.1"
+          }
+        },
+        "glob-parent": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+          "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+          "dev": true,
+          "requires": {
+            "is-glob": "^3.1.0",
+            "path-dirname": "^1.0.0"
+          },
+          "dependencies": {
+            "is-glob": {
+              "version": "3.1.0",
+              "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+              "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+              "dev": true,
+              "requires": {
+                "is-extglob": "^2.1.0"
+              }
+            }
+          }
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "is-binary-path": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+          "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+          "dev": true,
+          "requires": {
+            "binary-extensions": "^1.0.0"
+          }
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          }
+        },
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+          "dev": true
+        },
+        "readdirp": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+          "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "^4.1.11",
+            "micromatch": "^3.1.10",
+            "readable-stream": "^2.0.2"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        },
+        "to-regex-range": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+          "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+          "dev": true,
+          "requires": {
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1"
+          }
+        }
+      }
+    },
+    "nopt": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
+      "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
+      "requires": {
+        "abbrev": "1",
+        "osenv": "^0.1.4"
+      }
+    },
+    "normalize-package-data": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+      "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+      "dev": true,
+      "requires": {
+        "hosted-git-info": "^2.1.4",
+        "resolve": "^1.10.0",
+        "semver": "2 || 3 || 4 || 5",
+        "validate-npm-package-license": "^3.0.1"
+      }
+    },
+    "normalize-path": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+      "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+      "dev": true
+    },
+    "normalize-url": {
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz",
+      "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==",
+      "dev": true
+    },
+    "npm-bundled": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
+      "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
+      "requires": {
+        "npm-normalize-package-bin": "^1.0.1"
+      }
+    },
+    "npm-normalize-package-bin": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
+      "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
+    },
+    "npm-packlist": {
+      "version": "1.4.8",
+      "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz",
+      "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==",
+      "requires": {
+        "ignore-walk": "^3.0.1",
+        "npm-bundled": "^1.0.1",
+        "npm-normalize-package-bin": "^1.0.1"
+      }
+    },
+    "npm-run-all": {
+      "version": "4.1.5",
+      "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
+      "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
+      "dev": true,
+      "requires": {
+        "ansi-styles": "^3.2.1",
+        "chalk": "^2.4.1",
+        "cross-spawn": "^6.0.5",
+        "memorystream": "^0.3.1",
+        "minimatch": "^3.0.4",
+        "pidtree": "^0.3.0",
+        "read-pkg": "^3.0.0",
+        "shell-quote": "^1.6.1",
+        "string.prototype.padend": "^3.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "cross-spawn": {
+          "version": "6.0.5",
+          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+          "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+          "dev": true,
+          "requires": {
+            "nice-try": "^1.0.4",
+            "path-key": "^2.0.1",
+            "semver": "^5.5.0",
+            "shebang-command": "^1.2.0",
+            "which": "^1.2.9"
+          }
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "load-json-file": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+          "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "^4.1.2",
+            "parse-json": "^4.0.0",
+            "pify": "^3.0.0",
+            "strip-bom": "^3.0.0"
+          }
+        },
+        "parse-json": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+          "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+          "dev": true,
+          "requires": {
+            "error-ex": "^1.3.1",
+            "json-parse-better-errors": "^1.0.1"
+          }
+        },
+        "path-key": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+          "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+          "dev": true
+        },
+        "path-type": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+          "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+          "dev": true,
+          "requires": {
+            "pify": "^3.0.0"
+          }
+        },
+        "pify": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+          "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+          "dev": true
+        },
+        "read-pkg": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+          "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+          "dev": true,
+          "requires": {
+            "load-json-file": "^4.0.0",
+            "normalize-package-data": "^2.3.2",
+            "path-type": "^3.0.0"
+          }
+        },
+        "shebang-command": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+          "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+          "dev": true,
+          "requires": {
+            "shebang-regex": "^1.0.0"
+          }
+        },
+        "shebang-regex": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+          "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        },
+        "which": {
+          "version": "1.3.1",
+          "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+          "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+          "dev": true,
+          "requires": {
+            "isexe": "^2.0.0"
+          }
+        }
+      }
+    },
+    "npm-run-path": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
+      "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
+      "dev": true,
+      "requires": {
+        "path-key": "^2.0.0"
+      },
+      "dependencies": {
+        "path-key": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+          "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+          "dev": true
+        }
+      }
+    },
+    "npmlog": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
+      "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+      "requires": {
+        "are-we-there-yet": "~1.1.2",
+        "console-control-strings": "~1.1.0",
+        "gauge": "~2.7.3",
+        "set-blocking": "~2.0.0"
+      }
+    },
+    "nth-check": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
+      "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
+      "dev": true,
+      "requires": {
+        "boolbase": "~1.0.0"
+      }
+    },
+    "number-is-nan": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
+    },
+    "nwsapi": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
+      "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==",
+      "dev": true
+    },
+    "nyc": {
+      "version": "15.1.0",
+      "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz",
+      "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==",
+      "dev": true,
+      "requires": {
+        "@istanbuljs/load-nyc-config": "^1.0.0",
+        "@istanbuljs/schema": "^0.1.2",
+        "caching-transform": "^4.0.0",
+        "convert-source-map": "^1.7.0",
+        "decamelize": "^1.2.0",
+        "find-cache-dir": "^3.2.0",
+        "find-up": "^4.1.0",
+        "foreground-child": "^2.0.0",
+        "get-package-type": "^0.1.0",
+        "glob": "^7.1.6",
+        "istanbul-lib-coverage": "^3.0.0",
+        "istanbul-lib-hook": "^3.0.0",
+        "istanbul-lib-instrument": "^4.0.0",
+        "istanbul-lib-processinfo": "^2.0.2",
+        "istanbul-lib-report": "^3.0.0",
+        "istanbul-lib-source-maps": "^4.0.0",
+        "istanbul-reports": "^3.0.2",
+        "make-dir": "^3.0.0",
+        "node-preload": "^0.2.1",
+        "p-map": "^3.0.0",
+        "process-on-spawn": "^1.0.0",
+        "resolve-from": "^5.0.0",
+        "rimraf": "^3.0.0",
+        "signal-exit": "^3.0.2",
+        "spawn-wrap": "^2.0.0",
+        "test-exclude": "^6.0.0",
+        "yargs": "^15.0.2"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+          "dev": true
+        },
+        "cliui": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+          "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+          "dev": true,
+          "requires": {
+            "string-width": "^4.2.0",
+            "strip-ansi": "^6.0.0",
+            "wrap-ansi": "^6.2.0"
+          }
+        },
+        "convert-source-map": {
+          "version": "1.7.0",
+          "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
+          "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.1"
+          }
+        },
+        "emoji-regex": {
+          "version": "8.0.0",
+          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+          "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+          "dev": true
+        },
+        "find-up": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+          "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^5.0.0",
+            "path-exists": "^4.0.0"
+          }
+        },
+        "is-fullwidth-code-point": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+          "dev": true
+        },
+        "locate-path": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+          "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^4.1.0"
+          }
+        },
+        "make-dir": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+          "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+          "dev": true,
+          "requires": {
+            "semver": "^6.0.0"
+          }
+        },
+        "p-limit": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+          "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+          "dev": true,
+          "requires": {
+            "p-try": "^2.0.0"
+          }
+        },
+        "p-locate": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+          "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.2.0"
+          }
+        },
+        "p-try": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+          "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+          "dev": true
+        },
+        "path-exists": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+          "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+          "dev": true
+        },
+        "resolve-from": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+          "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+          "dev": true
+        },
+        "rimraf": {
+          "version": "3.0.2",
+          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+          "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+          "dev": true,
+          "requires": {
+            "glob": "^7.1.3"
+          }
+        },
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        },
+        "string-width": {
+          "version": "4.2.2",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
+          "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^8.0.0",
+            "is-fullwidth-code-point": "^3.0.0",
+            "strip-ansi": "^6.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+          "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^5.0.0"
+          }
+        },
+        "wrap-ansi": {
+          "version": "6.2.0",
+          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+          "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.0.0",
+            "string-width": "^4.1.0",
+            "strip-ansi": "^6.0.0"
+          }
+        },
+        "yargs": {
+          "version": "15.4.1",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+          "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+          "dev": true,
+          "requires": {
+            "cliui": "^6.0.0",
+            "decamelize": "^1.2.0",
+            "find-up": "^4.1.0",
+            "get-caller-file": "^2.0.1",
+            "require-directory": "^2.1.1",
+            "require-main-filename": "^2.0.0",
+            "set-blocking": "^2.0.0",
+            "string-width": "^4.2.0",
+            "which-module": "^2.0.0",
+            "y18n": "^4.0.0",
+            "yargs-parser": "^18.1.2"
+          }
+        },
+        "yargs-parser": {
+          "version": "18.1.3",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+          "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+          "dev": true,
+          "requires": {
+            "camelcase": "^5.0.0",
+            "decamelize": "^1.2.0"
+          }
+        }
+      }
+    },
+    "oauth-sign": {
+      "version": "0.9.0",
+      "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
+      "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
+    },
+    "object-assign": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+    },
+    "object-copy": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
+      "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
+      "dev": true,
+      "requires": {
+        "copy-descriptor": "^0.1.0",
+        "define-property": "^0.2.5",
+        "kind-of": "^3.0.3"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "object-inspect": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
+      "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==",
+      "dev": true
+    },
+    "object-keys": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+      "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+      "dev": true
+    },
+    "object-visit": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
+      "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.0"
+      }
+    },
+    "object.assign": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+      "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "has-symbols": "^1.0.1",
+        "object-keys": "^1.1.1"
+      }
+    },
+    "object.entries": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.3.tgz",
+      "integrity": "sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.1",
+        "has": "^1.0.3"
+      }
+    },
+    "object.getownpropertydescriptors": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz",
+      "integrity": "sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.1"
+      }
+    },
+    "object.pick": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
+      "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.1"
+      }
+    },
+    "object.values": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz",
+      "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.1",
+        "has": "^1.0.3"
+      }
+    },
+    "on-finished": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+      "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
+      "requires": {
+        "ee-first": "1.1.1"
+      }
+    },
+    "on-headers": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
+      "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA=="
+    },
+    "once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+      "requires": {
+        "wrappy": "1"
+      }
+    },
+    "onetime": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
+      "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
+      "dev": true,
+      "requires": {
+        "mimic-fn": "^1.0.0"
+      }
+    },
+    "opn": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz",
+      "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==",
+      "dev": true,
+      "requires": {
+        "is-wsl": "^1.1.0"
+      }
+    },
+    "optionator": {
+      "version": "0.9.1",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
+      "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
+      "dev": true,
+      "requires": {
+        "deep-is": "^0.1.3",
+        "fast-levenshtein": "^2.0.6",
+        "levn": "^0.4.1",
+        "prelude-ls": "^1.2.1",
+        "type-check": "^0.4.0",
+        "word-wrap": "^1.2.3"
+      }
+    },
+    "ora": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/ora/-/ora-2.1.0.tgz",
+      "integrity": "sha512-hNNlAd3gfv/iPmsNxYoAPLvxg7HuPozww7fFonMZvL84tP6Ox5igfk5j/+a9rtJJwqMgKK+JgWsAQik5o0HTLA==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.3.1",
+        "cli-cursor": "^2.1.0",
+        "cli-spinners": "^1.1.0",
+        "log-symbols": "^2.2.0",
+        "strip-ansi": "^4.0.0",
+        "wcwidth": "^1.0.1"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "log-symbols": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
+          "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
+          "dev": true,
+          "requires": {
+            "chalk": "^2.0.1"
+          }
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "os-browserify": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
+      "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
+      "dev": true
+    },
+    "os-homedir": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+      "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
+    },
+    "os-tmpdir": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+      "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
+    },
+    "osenv": {
+      "version": "0.1.5",
+      "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
+      "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
+      "requires": {
+        "os-homedir": "^1.0.0",
+        "os-tmpdir": "^1.0.0"
+      }
+    },
+    "p-finally": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
+      "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
+      "dev": true
+    },
+    "p-limit": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+      "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+      "dev": true,
+      "requires": {
+        "p-try": "^1.0.0"
+      }
+    },
+    "p-locate": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+      "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+      "dev": true,
+      "requires": {
+        "p-limit": "^1.1.0"
+      }
+    },
+    "p-map": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz",
+      "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==",
+      "dev": true,
+      "requires": {
+        "aggregate-error": "^3.0.0"
+      }
+    },
+    "p-try": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+      "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+      "dev": true
+    },
+    "package-hash": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz",
+      "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.15",
+        "hasha": "^5.0.0",
+        "lodash.flattendeep": "^4.4.0",
+        "release-zalgo": "^1.0.0"
+      }
+    },
+    "package-json": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz",
+      "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=",
+      "dev": true,
+      "requires": {
+        "got": "^6.7.1",
+        "registry-auth-token": "^3.0.1",
+        "registry-url": "^3.0.3",
+        "semver": "^5.1.0"
+      }
+    },
+    "pako": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+      "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
+      "dev": true
+    },
+    "parcel-bundler": {
+      "version": "1.12.4",
+      "resolved": "https://registry.npmjs.org/parcel-bundler/-/parcel-bundler-1.12.4.tgz",
+      "integrity": "sha512-G+iZGGiPEXcRzw0fiRxWYCKxdt/F7l9a0xkiU4XbcVRJCSlBnioWEwJMutOCCpoQmaQtjB4RBHDGIHN85AIhLQ==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.0.0",
+        "@babel/core": "^7.4.4",
+        "@babel/generator": "^7.4.4",
+        "@babel/parser": "^7.4.4",
+        "@babel/plugin-transform-flow-strip-types": "^7.4.4",
+        "@babel/plugin-transform-modules-commonjs": "^7.4.4",
+        "@babel/plugin-transform-react-jsx": "^7.0.0",
+        "@babel/preset-env": "^7.4.4",
+        "@babel/runtime": "^7.4.4",
+        "@babel/template": "^7.4.4",
+        "@babel/traverse": "^7.4.4",
+        "@babel/types": "^7.4.4",
+        "@iarna/toml": "^2.2.0",
+        "@parcel/fs": "^1.11.0",
+        "@parcel/logger": "^1.11.1",
+        "@parcel/utils": "^1.11.0",
+        "@parcel/watcher": "^1.12.1",
+        "@parcel/workers": "^1.11.0",
+        "ansi-to-html": "^0.6.4",
+        "babylon-walk": "^1.0.2",
+        "browserslist": "^4.1.0",
+        "chalk": "^2.1.0",
+        "clone": "^2.1.1",
+        "command-exists": "^1.2.6",
+        "commander": "^2.11.0",
+        "core-js": "^2.6.5",
+        "cross-spawn": "^6.0.4",
+        "css-modules-loader-core": "^1.1.0",
+        "cssnano": "^4.0.0",
+        "deasync": "^0.1.14",
+        "dotenv": "^5.0.0",
+        "dotenv-expand": "^5.1.0",
+        "envinfo": "^7.3.1",
+        "fast-glob": "^2.2.2",
+        "filesize": "^3.6.0",
+        "get-port": "^3.2.0",
+        "htmlnano": "^0.2.2",
+        "is-glob": "^4.0.0",
+        "is-url": "^1.2.2",
+        "js-yaml": "^3.10.0",
+        "json5": "^1.0.1",
+        "micromatch": "^3.0.4",
+        "mkdirp": "^0.5.1",
+        "node-forge": "^0.7.1",
+        "node-libs-browser": "^2.0.0",
+        "opn": "^5.1.0",
+        "postcss": "^7.0.11",
+        "postcss-value-parser": "^3.3.1",
+        "posthtml": "^0.11.2",
+        "posthtml-parser": "^0.4.0",
+        "posthtml-render": "^1.1.3",
+        "resolve": "^1.4.0",
+        "semver": "^5.4.1",
+        "serialize-to-js": "^3.0.0",
+        "serve-static": "^1.12.4",
+        "source-map": "0.6.1",
+        "terser": "^3.7.3",
+        "v8-compile-cache": "^2.0.0",
+        "ws": "^5.1.1"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "cross-spawn": {
+          "version": "6.0.5",
+          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+          "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+          "dev": true,
+          "requires": {
+            "nice-try": "^1.0.4",
+            "path-key": "^2.0.1",
+            "semver": "^5.5.0",
+            "shebang-command": "^1.2.0",
+            "which": "^1.2.9"
+          }
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "path-key": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+          "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+          "dev": true
+        },
+        "shebang-command": {
+          "version": "1.2.0",
+          "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+          "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+          "dev": true,
+          "requires": {
+            "shebang-regex": "^1.0.0"
+          }
+        },
+        "shebang-regex": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+          "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        },
+        "which": {
+          "version": "1.3.1",
+          "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+          "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+          "dev": true,
+          "requires": {
+            "isexe": "^2.0.0"
+          }
+        },
+        "ws": {
+          "version": "5.2.2",
+          "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz",
+          "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==",
+          "dev": true,
+          "requires": {
+            "async-limiter": "~1.0.0"
+          }
+        }
+      }
+    },
+    "parent-module": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+      "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+      "dev": true,
+      "requires": {
+        "callsites": "^3.0.0"
+      }
+    },
+    "parents": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz",
+      "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=",
+      "dev": true,
+      "requires": {
+        "path-platform": "~0.11.15"
+      }
+    },
+    "parse-asn1": {
+      "version": "5.1.6",
+      "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz",
+      "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==",
+      "dev": true,
+      "requires": {
+        "asn1.js": "^5.2.0",
+        "browserify-aes": "^1.0.0",
+        "evp_bytestokey": "^1.0.0",
+        "pbkdf2": "^3.0.3",
+        "safe-buffer": "^5.1.1"
+      }
+    },
+    "parse-json": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+      "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+      "dev": true,
+      "requires": {
+        "error-ex": "^1.2.0"
+      }
+    },
+    "parse5": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz",
+      "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==",
+      "dev": true
+    },
+    "parseurl": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+      "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
+    },
+    "pascalcase": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
+      "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
+      "dev": true
+    },
+    "path-browserify": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
+      "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
+      "dev": true
+    },
+    "path-dirname": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
+      "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
+      "dev": true
+    },
+    "path-exists": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+      "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+      "dev": true
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+    },
+    "path-is-inside": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+      "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
+      "dev": true
+    },
+    "path-key": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+      "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+      "dev": true
+    },
+    "path-parse": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+      "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+    },
+    "path-platform": {
+      "version": "0.11.15",
+      "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz",
+      "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=",
+      "dev": true
+    },
+    "path-to-regexp": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+      "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
+    },
+    "path-type": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
+      "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+      "dev": true,
+      "requires": {
+        "pify": "^2.0.0"
+      }
+    },
+    "pbkdf2": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz",
+      "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==",
+      "dev": true,
+      "requires": {
+        "create-hash": "^1.1.2",
+        "create-hmac": "^1.1.4",
+        "ripemd160": "^2.0.1",
+        "safe-buffer": "^5.0.1",
+        "sha.js": "^2.4.8"
+      }
+    },
+    "performance-now": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+      "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
+    },
+    "pg-connection-string": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz",
+      "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ=="
+    },
+    "physical-cpu-count": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz",
+      "integrity": "sha1-GN4vl+S/epVRrXURlCtUlverpmA=",
+      "dev": true
+    },
+    "picomatch": {
+      "version": "2.2.2",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
+      "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
+      "dev": true
+    },
+    "pidtree": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz",
+      "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==",
+      "dev": true
+    },
+    "pify": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+      "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+      "dev": true
+    },
+    "pkg-dir": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
+      "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
+      "dev": true,
+      "requires": {
+        "find-up": "^2.1.0"
+      }
+    },
+    "pn": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
+      "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
+      "dev": true
+    },
+    "posix-character-classes": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
+      "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
+      "dev": true
+    },
+    "postcss": {
+      "version": "7.0.35",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz",
+      "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.4.2",
+        "source-map": "^0.6.1",
+        "supports-color": "^6.1.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          },
+          "dependencies": {
+            "supports-color": {
+              "version": "5.5.0",
+              "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+              "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+              "dev": true,
+              "requires": {
+                "has-flag": "^3.0.0"
+              }
+            }
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "6.1.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
+          "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "postcss-calc": {
+      "version": "7.0.5",
+      "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz",
+      "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.27",
+        "postcss-selector-parser": "^6.0.2",
+        "postcss-value-parser": "^4.0.2"
+      },
+      "dependencies": {
+        "postcss-value-parser": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz",
+          "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==",
+          "dev": true
+        }
+      }
+    },
+    "postcss-colormin": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz",
+      "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.0.0",
+        "color": "^3.0.0",
+        "has": "^1.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-convert-values": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz",
+      "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-discard-comments": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz",
+      "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0"
+      }
+    },
+    "postcss-discard-duplicates": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz",
+      "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0"
+      }
+    },
+    "postcss-discard-empty": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz",
+      "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0"
+      }
+    },
+    "postcss-discard-overridden": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz",
+      "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0"
+      }
+    },
+    "postcss-merge-longhand": {
+      "version": "4.0.11",
+      "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz",
+      "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==",
+      "dev": true,
+      "requires": {
+        "css-color-names": "0.0.4",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0",
+        "stylehacks": "^4.0.0"
+      }
+    },
+    "postcss-merge-rules": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz",
+      "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.0.0",
+        "caniuse-api": "^3.0.0",
+        "cssnano-util-same-parent": "^4.0.0",
+        "postcss": "^7.0.0",
+        "postcss-selector-parser": "^3.0.0",
+        "vendors": "^1.0.0"
+      },
+      "dependencies": {
+        "dot-prop": {
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
+          "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
+          "dev": true,
+          "requires": {
+            "is-obj": "^2.0.0"
+          }
+        },
+        "is-obj": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+          "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
+          "dev": true
+        },
+        "postcss-selector-parser": {
+          "version": "3.1.2",
+          "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
+          "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==",
+          "dev": true,
+          "requires": {
+            "dot-prop": "^5.2.0",
+            "indexes-of": "^1.0.1",
+            "uniq": "^1.0.1"
+          }
+        }
+      }
+    },
+    "postcss-minify-font-values": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz",
+      "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-minify-gradients": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz",
+      "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==",
+      "dev": true,
+      "requires": {
+        "cssnano-util-get-arguments": "^4.0.0",
+        "is-color-stop": "^1.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-minify-params": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz",
+      "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==",
+      "dev": true,
+      "requires": {
+        "alphanum-sort": "^1.0.0",
+        "browserslist": "^4.0.0",
+        "cssnano-util-get-arguments": "^4.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0",
+        "uniqs": "^2.0.0"
+      }
+    },
+    "postcss-minify-selectors": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz",
+      "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==",
+      "dev": true,
+      "requires": {
+        "alphanum-sort": "^1.0.0",
+        "has": "^1.0.0",
+        "postcss": "^7.0.0",
+        "postcss-selector-parser": "^3.0.0"
+      },
+      "dependencies": {
+        "dot-prop": {
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
+          "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
+          "dev": true,
+          "requires": {
+            "is-obj": "^2.0.0"
+          }
+        },
+        "is-obj": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+          "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
+          "dev": true
+        },
+        "postcss-selector-parser": {
+          "version": "3.1.2",
+          "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
+          "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==",
+          "dev": true,
+          "requires": {
+            "dot-prop": "^5.2.0",
+            "indexes-of": "^1.0.1",
+            "uniq": "^1.0.1"
+          }
+        }
+      }
+    },
+    "postcss-modules-extract-imports": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz",
+      "integrity": "sha1-thTJcgvmgW6u41+zpfqh26agXds=",
+      "dev": true,
+      "requires": {
+        "postcss": "^6.0.1"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "postcss": {
+          "version": "6.0.23",
+          "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+          "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+          "dev": true,
+          "requires": {
+            "chalk": "^2.4.1",
+            "source-map": "^0.6.1",
+            "supports-color": "^5.4.0"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "postcss-modules-local-by-default": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz",
+      "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=",
+      "dev": true,
+      "requires": {
+        "css-selector-tokenizer": "^0.7.0",
+        "postcss": "^6.0.1"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "postcss": {
+          "version": "6.0.23",
+          "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+          "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+          "dev": true,
+          "requires": {
+            "chalk": "^2.4.1",
+            "source-map": "^0.6.1",
+            "supports-color": "^5.4.0"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "postcss-modules-scope": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz",
+      "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=",
+      "dev": true,
+      "requires": {
+        "css-selector-tokenizer": "^0.7.0",
+        "postcss": "^6.0.1"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "postcss": {
+          "version": "6.0.23",
+          "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+          "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+          "dev": true,
+          "requires": {
+            "chalk": "^2.4.1",
+            "source-map": "^0.6.1",
+            "supports-color": "^5.4.0"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "postcss-modules-values": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz",
+      "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=",
+      "dev": true,
+      "requires": {
+        "icss-replace-symbols": "^1.1.0",
+        "postcss": "^6.0.1"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "postcss": {
+          "version": "6.0.23",
+          "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
+          "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
+          "dev": true,
+          "requires": {
+            "chalk": "^2.4.1",
+            "source-map": "^0.6.1",
+            "supports-color": "^5.4.0"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "postcss-normalize-charset": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz",
+      "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0"
+      }
+    },
+    "postcss-normalize-display-values": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz",
+      "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==",
+      "dev": true,
+      "requires": {
+        "cssnano-util-get-match": "^4.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-normalize-positions": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz",
+      "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==",
+      "dev": true,
+      "requires": {
+        "cssnano-util-get-arguments": "^4.0.0",
+        "has": "^1.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-normalize-repeat-style": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz",
+      "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==",
+      "dev": true,
+      "requires": {
+        "cssnano-util-get-arguments": "^4.0.0",
+        "cssnano-util-get-match": "^4.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-normalize-string": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz",
+      "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==",
+      "dev": true,
+      "requires": {
+        "has": "^1.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-normalize-timing-functions": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz",
+      "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==",
+      "dev": true,
+      "requires": {
+        "cssnano-util-get-match": "^4.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-normalize-unicode": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz",
+      "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-normalize-url": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz",
+      "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==",
+      "dev": true,
+      "requires": {
+        "is-absolute-url": "^2.0.0",
+        "normalize-url": "^3.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-normalize-whitespace": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz",
+      "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==",
+      "dev": true,
+      "requires": {
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-ordered-values": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz",
+      "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==",
+      "dev": true,
+      "requires": {
+        "cssnano-util-get-arguments": "^4.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-reduce-initial": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz",
+      "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.0.0",
+        "caniuse-api": "^3.0.0",
+        "has": "^1.0.0",
+        "postcss": "^7.0.0"
+      }
+    },
+    "postcss-reduce-transforms": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz",
+      "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==",
+      "dev": true,
+      "requires": {
+        "cssnano-util-get-match": "^4.0.0",
+        "has": "^1.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0"
+      }
+    },
+    "postcss-selector-parser": {
+      "version": "6.0.4",
+      "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz",
+      "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==",
+      "dev": true,
+      "requires": {
+        "cssesc": "^3.0.0",
+        "indexes-of": "^1.0.1",
+        "uniq": "^1.0.1",
+        "util-deprecate": "^1.0.2"
+      }
+    },
+    "postcss-svgo": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz",
+      "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==",
+      "dev": true,
+      "requires": {
+        "is-svg": "^3.0.0",
+        "postcss": "^7.0.0",
+        "postcss-value-parser": "^3.0.0",
+        "svgo": "^1.0.0"
+      }
+    },
+    "postcss-unique-selectors": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz",
+      "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==",
+      "dev": true,
+      "requires": {
+        "alphanum-sort": "^1.0.0",
+        "postcss": "^7.0.0",
+        "uniqs": "^2.0.0"
+      }
+    },
+    "postcss-value-parser": {
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
+      "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
+      "dev": true
+    },
+    "posthtml": {
+      "version": "0.11.6",
+      "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.11.6.tgz",
+      "integrity": "sha512-C2hrAPzmRdpuL3iH0TDdQ6XCc9M7Dcc3zEW5BLerY65G4tWWszwv6nG/ksi6ul5i2mx22ubdljgktXCtNkydkw==",
+      "dev": true,
+      "requires": {
+        "posthtml-parser": "^0.4.1",
+        "posthtml-render": "^1.1.5"
+      }
+    },
+    "posthtml-parser": {
+      "version": "0.4.2",
+      "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.4.2.tgz",
+      "integrity": "sha512-BUIorsYJTvS9UhXxPTzupIztOMVNPa/HtAm9KHni9z6qEfiJ1bpOBL5DfUOL9XAc3XkLIEzBzpph+Zbm4AdRAg==",
+      "dev": true,
+      "requires": {
+        "htmlparser2": "^3.9.2"
+      }
+    },
+    "posthtml-render": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-1.4.0.tgz",
+      "integrity": "sha512-W1779iVHGfq0Fvh2PROhCe2QhB8mEErgqzo1wpIt36tCgChafP+hbXIhLDOM8ePJrZcFs0vkNEtdibEWVqChqw==",
+      "dev": true
+    },
+    "prelude-ls": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+      "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+      "dev": true
+    },
+    "prepend-http": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
+      "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
+      "dev": true
+    },
+    "prettier": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
+      "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==",
+      "dev": true
+    },
+    "prettier-linter-helpers": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
+      "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
+      "dev": true,
+      "requires": {
+        "fast-diff": "^1.1.2"
+      }
+    },
+    "process": {
+      "version": "0.11.10",
+      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
+      "dev": true
+    },
+    "process-nextick-args": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+    },
+    "process-on-spawn": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz",
+      "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==",
+      "dev": true,
+      "requires": {
+        "fromentries": "^1.2.0"
+      }
+    },
+    "progress": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+      "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+      "dev": true
+    },
+    "proxy-addr": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
+      "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==",
+      "requires": {
+        "forwarded": "~0.1.2",
+        "ipaddr.js": "1.9.1"
+      }
+    },
+    "pseudomap": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
+      "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
+      "dev": true
+    },
+    "psl": {
+      "version": "1.8.0",
+      "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
+      "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
+    },
+    "pstree.remy": {
+      "version": "1.1.8",
+      "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
+      "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
+      "dev": true
+    },
+    "public-encrypt": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
+      "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.1.0",
+        "browserify-rsa": "^4.0.0",
+        "create-hash": "^1.1.0",
+        "parse-asn1": "^5.0.0",
+        "randombytes": "^2.0.1",
+        "safe-buffer": "^5.1.2"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.11.9",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
+          "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+          "dev": true
+        }
+      }
+    },
+    "punycode": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
+    },
+    "purgecss": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.3.0.tgz",
+      "integrity": "sha512-BE5CROfVGsx2XIhxGuZAT7rTH9lLeQx/6M0P7DTXQH4IUc3BBzs9JUzt4yzGf3JrH9enkeq6YJBe9CTtkm1WmQ==",
+      "dev": true,
+      "requires": {
+        "commander": "^5.0.0",
+        "glob": "^7.0.0",
+        "postcss": "7.0.32",
+        "postcss-selector-parser": "^6.0.2"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          },
+          "dependencies": {
+            "supports-color": {
+              "version": "5.5.0",
+              "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+              "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+              "dev": true,
+              "requires": {
+                "has-flag": "^3.0.0"
+              }
+            }
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "commander": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
+          "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "postcss": {
+          "version": "7.0.32",
+          "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz",
+          "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==",
+          "dev": true,
+          "requires": {
+            "chalk": "^2.4.2",
+            "source-map": "^0.6.1",
+            "supports-color": "^6.1.0"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "6.1.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
+          "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "q": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
+      "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
+      "dev": true
+    },
+    "qs": {
+      "version": "6.7.0",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
+      "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
+    },
+    "querystring": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+      "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
+      "dev": true
+    },
+    "querystring-es3": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+      "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
+      "dev": true
+    },
+    "quote-stream": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz",
+      "integrity": "sha1-hJY/jJwmuULhU/7rU6rnRlK34LI=",
+      "dev": true,
+      "requires": {
+        "buffer-equal": "0.0.1",
+        "minimist": "^1.1.3",
+        "through2": "^2.0.0"
+      }
+    },
+    "randombytes": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+      "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "^5.1.0"
+      }
+    },
+    "randomfill": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+      "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
+      "dev": true,
+      "requires": {
+        "randombytes": "^2.0.5",
+        "safe-buffer": "^5.1.0"
+      }
+    },
+    "range-parser": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+      "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
+    },
+    "raw-body": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
+      "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
+      "requires": {
+        "bytes": "3.1.0",
+        "http-errors": "1.7.2",
+        "iconv-lite": "0.4.24",
+        "unpipe": "1.0.0"
+      },
+      "dependencies": {
+        "bytes": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
+          "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
+        }
+      }
+    },
+    "rc": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+      "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+      "requires": {
+        "deep-extend": "^0.6.0",
+        "ini": "~1.3.0",
+        "minimist": "^1.2.0",
+        "strip-json-comments": "~2.0.1"
+      }
+    },
+    "read-only-stream": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz",
+      "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=",
+      "dev": true,
+      "requires": {
+        "readable-stream": "^2.0.2"
+      }
+    },
+    "read-pkg": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
+      "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+      "dev": true,
+      "requires": {
+        "load-json-file": "^2.0.0",
+        "normalize-package-data": "^2.3.2",
+        "path-type": "^2.0.0"
+      }
+    },
+    "read-pkg-up": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
+      "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+      "dev": true,
+      "requires": {
+        "find-up": "^2.0.0",
+        "read-pkg": "^2.0.0"
+      }
+    },
+    "readable-stream": {
+      "version": "2.3.7",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+      "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+      "requires": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.3",
+        "isarray": "~1.0.0",
+        "process-nextick-args": "~2.0.0",
+        "safe-buffer": "~5.1.1",
+        "string_decoder": "~1.1.1",
+        "util-deprecate": "~1.0.1"
+      }
+    },
+    "readdirp": {
+      "version": "3.5.0",
+      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
+      "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
+      "dev": true,
+      "requires": {
+        "picomatch": "^2.2.1"
+      }
+    },
+    "rechoir": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz",
+      "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==",
+      "requires": {
+        "resolve": "^1.9.0"
+      }
+    },
+    "regenerate": {
+      "version": "1.4.2",
+      "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
+      "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
+      "dev": true
+    },
+    "regenerate-unicode-properties": {
+      "version": "8.2.0",
+      "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz",
+      "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==",
+      "dev": true,
+      "requires": {
+        "regenerate": "^1.4.0"
+      }
+    },
+    "regenerator-runtime": {
+      "version": "0.13.7",
+      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+      "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
+      "dev": true
+    },
+    "regenerator-transform": {
+      "version": "0.14.5",
+      "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz",
+      "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==",
+      "dev": true,
+      "requires": {
+        "@babel/runtime": "^7.8.4"
+      }
+    },
+    "regex-not": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
+      "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^3.0.2",
+        "safe-regex": "^1.1.0"
+      }
+    },
+    "regexpp": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
+      "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
+      "dev": true
+    },
+    "regexpu-core": {
+      "version": "4.7.1",
+      "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz",
+      "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==",
+      "dev": true,
+      "requires": {
+        "regenerate": "^1.4.0",
+        "regenerate-unicode-properties": "^8.2.0",
+        "regjsgen": "^0.5.1",
+        "regjsparser": "^0.6.4",
+        "unicode-match-property-ecmascript": "^1.0.4",
+        "unicode-match-property-value-ecmascript": "^1.2.0"
+      }
+    },
+    "registry-auth-token": {
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz",
+      "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==",
+      "dev": true,
+      "requires": {
+        "rc": "^1.1.6",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "registry-url": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz",
+      "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=",
+      "dev": true,
+      "requires": {
+        "rc": "^1.0.1"
+      }
+    },
+    "regjsgen": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz",
+      "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==",
+      "dev": true
+    },
+    "regjsparser": {
+      "version": "0.6.6",
+      "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.6.tgz",
+      "integrity": "sha512-jjyuCp+IEMIm3N1H1LLTJW1EISEJV9+5oHdEyrt43Pg9cDSb6rrLZei2cVWpl0xTjmmlpec/lEQGYgM7xfpGCQ==",
+      "dev": true,
+      "requires": {
+        "jsesc": "~0.5.0"
+      },
+      "dependencies": {
+        "jsesc": {
+          "version": "0.5.0",
+          "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+          "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
+          "dev": true
+        }
+      }
+    },
+    "relateurl": {
+      "version": "0.2.7",
+      "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+      "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
+      "dev": true
+    },
+    "release-zalgo": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz",
+      "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=",
+      "dev": true,
+      "requires": {
+        "es6-error": "^4.0.1"
+      }
+    },
+    "remove-trailing-separator": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
+      "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
+      "dev": true
+    },
+    "repeat-element": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
+      "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
+      "dev": true
+    },
+    "repeat-string": {
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+      "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+      "dev": true
+    },
+    "request": {
+      "version": "2.88.2",
+      "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
+      "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
+      "requires": {
+        "aws-sign2": "~0.7.0",
+        "aws4": "^1.8.0",
+        "caseless": "~0.12.0",
+        "combined-stream": "~1.0.6",
+        "extend": "~3.0.2",
+        "forever-agent": "~0.6.1",
+        "form-data": "~2.3.2",
+        "har-validator": "~5.1.3",
+        "http-signature": "~1.2.0",
+        "is-typedarray": "~1.0.0",
+        "isstream": "~0.1.2",
+        "json-stringify-safe": "~5.0.1",
+        "mime-types": "~2.1.19",
+        "oauth-sign": "~0.9.0",
+        "performance-now": "^2.1.0",
+        "qs": "~6.5.2",
+        "safe-buffer": "^5.1.2",
+        "tough-cookie": "~2.5.0",
+        "tunnel-agent": "^0.6.0",
+        "uuid": "^3.3.2"
+      },
+      "dependencies": {
+        "qs": {
+          "version": "6.5.2",
+          "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+          "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
+        }
+      }
+    },
+    "request-promise-core": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz",
+      "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.19"
+      }
+    },
+    "request-promise-native": {
+      "version": "1.0.9",
+      "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz",
+      "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==",
+      "dev": true,
+      "requires": {
+        "request-promise-core": "1.1.4",
+        "stealthy-require": "^1.1.1",
+        "tough-cookie": "^2.3.3"
+      }
+    },
+    "require-directory": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+      "dev": true
+    },
+    "require-main-filename": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+      "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
+      "dev": true
+    },
+    "requizzle": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz",
+      "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.14"
+      }
+    },
+    "resolve": {
+      "version": "1.19.0",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
+      "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==",
+      "requires": {
+        "is-core-module": "^2.1.0",
+        "path-parse": "^1.0.6"
+      }
+    },
+    "resolve-from": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+      "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+      "dev": true
+    },
+    "resolve-url": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
+      "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
+      "dev": true
+    },
+    "restore-cursor": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
+      "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
+      "dev": true,
+      "requires": {
+        "onetime": "^2.0.0",
+        "signal-exit": "^3.0.2"
+      }
+    },
+    "ret": {
+      "version": "0.1.15",
+      "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
+      "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
+      "dev": true
+    },
+    "rgb-regex": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz",
+      "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=",
+      "dev": true
+    },
+    "rgba-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz",
+      "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=",
+      "dev": true
+    },
+    "rimraf": {
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+      "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+      "requires": {
+        "glob": "^7.1.3"
+      }
+    },
+    "ripemd160": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+      "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
+      "dev": true,
+      "requires": {
+        "hash-base": "^3.0.0",
+        "inherits": "^2.0.1"
+      }
+    },
+    "safe-buffer": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+    },
+    "safe-regex": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+      "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+      "dev": true,
+      "requires": {
+        "ret": "~0.1.10"
+      }
+    },
+    "safer-buffer": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+    },
+    "sax": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
+      "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
+    },
+    "saxes": {
+      "version": "3.1.11",
+      "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.11.tgz",
+      "integrity": "sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g==",
+      "dev": true,
+      "requires": {
+        "xmlchars": "^2.1.1"
+      }
+    },
+    "semver": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+      "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+    },
+    "semver-diff": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz",
+      "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=",
+      "dev": true,
+      "requires": {
+        "semver": "^5.0.3"
+      }
+    },
+    "send": {
+      "version": "0.17.1",
+      "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
+      "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
+      "requires": {
+        "debug": "2.6.9",
+        "depd": "~1.1.2",
+        "destroy": "~1.0.4",
+        "encodeurl": "~1.0.2",
+        "escape-html": "~1.0.3",
+        "etag": "~1.8.1",
+        "fresh": "0.5.2",
+        "http-errors": "~1.7.2",
+        "mime": "1.6.0",
+        "ms": "2.1.1",
+        "on-finished": "~2.3.0",
+        "range-parser": "~1.2.1",
+        "statuses": "~1.5.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "requires": {
+            "ms": "2.0.0"
+          },
+          "dependencies": {
+            "ms": {
+              "version": "2.0.0",
+              "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+              "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+            }
+          }
+        },
+        "ms": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+          "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+        }
+      }
+    },
+    "serialize-javascript": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz",
+      "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==",
+      "dev": true,
+      "requires": {
+        "randombytes": "^2.1.0"
+      }
+    },
+    "serialize-to-js": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/serialize-to-js/-/serialize-to-js-3.1.1.tgz",
+      "integrity": "sha512-F+NGU0UHMBO4Q965tjw7rvieNVjlH6Lqi2emq/Lc9LUURYJbiCzmpi4Cy1OOjjVPtxu0c+NE85LU6968Wko5ZA==",
+      "dev": true
+    },
+    "serve-static": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
+      "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
+      "requires": {
+        "encodeurl": "~1.0.2",
+        "escape-html": "~1.0.3",
+        "parseurl": "~1.3.3",
+        "send": "0.17.1"
+      }
+    },
+    "set-blocking": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+    },
+    "set-value": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
+      "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^2.0.1",
+        "is-extendable": "^0.1.1",
+        "is-plain-object": "^2.0.3",
+        "split-string": "^3.0.1"
+      },
+      "dependencies": {
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "setimmediate": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+      "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
+      "dev": true
+    },
+    "setprototypeof": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
+      "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
+    },
+    "sha.js": {
+      "version": "2.4.11",
+      "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+      "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "shallow-copy": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz",
+      "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=",
+      "dev": true
+    },
+    "shasum-object": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz",
+      "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==",
+      "dev": true,
+      "requires": {
+        "fast-safe-stringify": "^2.0.7"
+      }
+    },
+    "shebang-command": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+      "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+      "dev": true,
+      "requires": {
+        "shebang-regex": "^3.0.0"
+      }
+    },
+    "shebang-regex": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+      "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+      "dev": true
+    },
+    "shell-quote": {
+      "version": "1.7.2",
+      "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz",
+      "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
+      "dev": true
+    },
+    "signal-exit": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+      "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
+    },
+    "simple-concat": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
+      "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
+      "dev": true
+    },
+    "simple-swizzle": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
+      "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
+      "dev": true,
+      "requires": {
+        "is-arrayish": "^0.3.1"
+      },
+      "dependencies": {
+        "is-arrayish": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
+          "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
+          "dev": true
+        }
+      }
+    },
+    "slice-ansi": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
+      "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+      "dev": true,
+      "requires": {
+        "ansi-styles": "^3.2.0",
+        "astral-regex": "^1.0.0",
+        "is-fullwidth-code-point": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        }
+      }
+    },
+    "snapdragon": {
+      "version": "0.8.2",
+      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+      "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
+      "dev": true,
+      "requires": {
+        "base": "^0.11.1",
+        "debug": "^2.2.0",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "map-cache": "^0.2.2",
+        "source-map": "^0.5.6",
+        "source-map-resolve": "^0.5.0",
+        "use": "^3.1.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "snapdragon-node": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
+      "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+      "dev": true,
+      "requires": {
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.0",
+        "snapdragon-util": "^3.0.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        }
+      }
+    },
+    "snapdragon-util": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
+      "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.2.0"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "source-map": {
+      "version": "0.5.7",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+      "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+      "dev": true
+    },
+    "source-map-resolve": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
+      "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
+      "dev": true,
+      "requires": {
+        "atob": "^2.1.2",
+        "decode-uri-component": "^0.2.0",
+        "resolve-url": "^0.2.1",
+        "source-map-url": "^0.4.0",
+        "urix": "^0.1.0"
+      }
+    },
+    "source-map-support": {
+      "version": "0.5.19",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
+      "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
+      "dev": true,
+      "requires": {
+        "buffer-from": "^1.0.0",
+        "source-map": "^0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "source-map-url": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
+      "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
+      "dev": true
+    },
+    "spawn-wrap": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz",
+      "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==",
+      "dev": true,
+      "requires": {
+        "foreground-child": "^2.0.0",
+        "is-windows": "^1.0.2",
+        "make-dir": "^3.0.0",
+        "rimraf": "^3.0.0",
+        "signal-exit": "^3.0.2",
+        "which": "^2.0.1"
+      },
+      "dependencies": {
+        "make-dir": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+          "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+          "dev": true,
+          "requires": {
+            "semver": "^6.0.0"
+          }
+        },
+        "rimraf": {
+          "version": "3.0.2",
+          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+          "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+          "dev": true,
+          "requires": {
+            "glob": "^7.1.3"
+          }
+        },
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "spdx-correct": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
+      "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
+      "dev": true,
+      "requires": {
+        "spdx-expression-parse": "^3.0.0",
+        "spdx-license-ids": "^3.0.0"
+      }
+    },
+    "spdx-exceptions": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
+      "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
+      "dev": true
+    },
+    "spdx-expression-parse": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
+      "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
+      "dev": true,
+      "requires": {
+        "spdx-exceptions": "^2.1.0",
+        "spdx-license-ids": "^3.0.0"
+      }
+    },
+    "spdx-license-ids": {
+      "version": "3.0.7",
+      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz",
+      "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==",
+      "dev": true
+    },
+    "split-string": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
+      "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^3.0.0"
+      }
+    },
+    "sprintf-js": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+      "dev": true
+    },
+    "sqlite3": {
+      "version": "5.0.2",
+      "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.2.tgz",
+      "integrity": "sha512-1SdTNo+BVU211Xj1csWa8lV6KM0CtucDwRyA0VHl91wEH1Mgh7RxUpI4rVvG7OhHrzCSGaVyW5g8vKvlrk9DJA==",
+      "requires": {
+        "node-addon-api": "^3.0.0",
+        "node-gyp": "3.x",
+        "node-pre-gyp": "^0.11.0"
+      }
+    },
+    "srcset": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/srcset/-/srcset-3.0.0.tgz",
+      "integrity": "sha512-D59vF08Qzu/C4GAOXVgMTLfgryt5fyWo93FZyhEWANo0PokFz/iWdDe13mX3O5TRf6l8vMTqckAfR4zPiaH0yQ==",
+      "dev": true
+    },
+    "sshpk": {
+      "version": "1.16.1",
+      "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
+      "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
+      "requires": {
+        "asn1": "~0.2.3",
+        "assert-plus": "^1.0.0",
+        "bcrypt-pbkdf": "^1.0.0",
+        "dashdash": "^1.12.0",
+        "ecc-jsbn": "~0.1.1",
+        "getpass": "^0.1.1",
+        "jsbn": "~0.1.0",
+        "safer-buffer": "^2.0.2",
+        "tweetnacl": "~0.14.0"
+      }
+    },
+    "stable": {
+      "version": "0.1.8",
+      "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
+      "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
+      "dev": true
+    },
+    "static-eval": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.1.0.tgz",
+      "integrity": "sha512-agtxZ/kWSsCkI5E4QifRwsaPs0P0JmZV6dkLz6ILYfFYQGn+5plctanRN+IC8dJRiFkyXHrwEE3W9Wmx67uDbw==",
+      "dev": true,
+      "requires": {
+        "escodegen": "^1.11.1"
+      },
+      "dependencies": {
+        "escodegen": {
+          "version": "1.14.3",
+          "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
+          "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
+          "dev": true,
+          "requires": {
+            "esprima": "^4.0.1",
+            "estraverse": "^4.2.0",
+            "esutils": "^2.0.2",
+            "optionator": "^0.8.1",
+            "source-map": "~0.6.1"
+          }
+        },
+        "levn": {
+          "version": "0.3.0",
+          "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+          "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+          "dev": true,
+          "requires": {
+            "prelude-ls": "~1.1.2",
+            "type-check": "~0.3.2"
+          }
+        },
+        "optionator": {
+          "version": "0.8.3",
+          "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+          "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+          "dev": true,
+          "requires": {
+            "deep-is": "~0.1.3",
+            "fast-levenshtein": "~2.0.6",
+            "levn": "~0.3.0",
+            "prelude-ls": "~1.1.2",
+            "type-check": "~0.3.2",
+            "word-wrap": "~1.2.3"
+          }
+        },
+        "prelude-ls": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+          "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true,
+          "optional": true
+        },
+        "type-check": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+          "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+          "dev": true,
+          "requires": {
+            "prelude-ls": "~1.1.2"
+          }
+        }
+      }
+    },
+    "static-extend": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
+      "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
+      "dev": true,
+      "requires": {
+        "define-property": "^0.2.5",
+        "object-copy": "^0.1.0"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        }
+      }
+    },
+    "static-module": {
+      "version": "2.2.5",
+      "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz",
+      "integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==",
+      "dev": true,
+      "requires": {
+        "concat-stream": "~1.6.0",
+        "convert-source-map": "^1.5.1",
+        "duplexer2": "~0.1.4",
+        "escodegen": "~1.9.0",
+        "falafel": "^2.1.0",
+        "has": "^1.0.1",
+        "magic-string": "^0.22.4",
+        "merge-source-map": "1.0.4",
+        "object-inspect": "~1.4.0",
+        "quote-stream": "~1.0.2",
+        "readable-stream": "~2.3.3",
+        "shallow-copy": "~0.0.1",
+        "static-eval": "^2.0.0",
+        "through2": "~2.0.3"
+      },
+      "dependencies": {
+        "convert-source-map": {
+          "version": "1.7.0",
+          "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
+          "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.1"
+          }
+        },
+        "object-inspect": {
+          "version": "1.4.1",
+          "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz",
+          "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==",
+          "dev": true
+        }
+      }
+    },
+    "statuses": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+      "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
+    },
+    "stealthy-require": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
+      "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
+      "dev": true
+    },
+    "stream-browserify": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",
+      "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==",
+      "dev": true,
+      "requires": {
+        "inherits": "~2.0.4",
+        "readable-stream": "^3.5.0"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+          "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "3.6.0",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+          "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+          "dev": true,
+          "requires": {
+            "inherits": "^2.0.3",
+            "string_decoder": "^1.1.1",
+            "util-deprecate": "^1.0.1"
+          }
+        }
+      }
+    },
+    "stream-combiner2": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
+      "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
+      "dev": true,
+      "requires": {
+        "duplexer2": "~0.1.0",
+        "readable-stream": "^2.0.2"
+      }
+    },
+    "stream-http": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.1.tgz",
+      "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==",
+      "dev": true,
+      "requires": {
+        "builtin-status-codes": "^3.0.0",
+        "inherits": "^2.0.4",
+        "readable-stream": "^3.6.0",
+        "xtend": "^4.0.2"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+          "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "3.6.0",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+          "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+          "dev": true,
+          "requires": {
+            "inherits": "^2.0.3",
+            "string_decoder": "^1.1.1",
+            "util-deprecate": "^1.0.1"
+          }
+        }
+      }
+    },
+    "stream-splicer": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz",
+      "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "readable-stream": "^2.0.2"
+      }
+    },
+    "string-width": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+      "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+      "requires": {
+        "code-point-at": "^1.0.0",
+        "is-fullwidth-code-point": "^1.0.0",
+        "strip-ansi": "^3.0.0"
+      }
+    },
+    "string.prototype.padend": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.1.tgz",
+      "integrity": "sha512-eCzTASPnoCr5Ht+Vn1YXgm8SB015hHKgEIMu9Nr9bQmLhRBxKRfmzSj/IQsxDFc8JInJDDFA0qXwK+xxI7wDkg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.1"
+      }
+    },
+    "string.prototype.trimend": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
+      "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
+      }
+    },
+    "string.prototype.trimstart": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
+      "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
+      }
+    },
+    "string_decoder": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "requires": {
+        "safe-buffer": "~5.1.0"
+      }
+    },
+    "strip-ansi": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+      "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+      "requires": {
+        "ansi-regex": "^2.0.0"
+      }
+    },
+    "strip-bom": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+      "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+      "dev": true
+    },
+    "strip-eof": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+      "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
+      "dev": true
+    },
+    "strip-json-comments": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+      "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
+    },
+    "stylehacks": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz",
+      "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.0.0",
+        "postcss": "^7.0.0",
+        "postcss-selector-parser": "^3.0.0"
+      },
+      "dependencies": {
+        "dot-prop": {
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
+          "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
+          "dev": true,
+          "requires": {
+            "is-obj": "^2.0.0"
+          }
+        },
+        "is-obj": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+          "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
+          "dev": true
+        },
+        "postcss-selector-parser": {
+          "version": "3.1.2",
+          "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
+          "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==",
+          "dev": true,
+          "requires": {
+            "dot-prop": "^5.2.0",
+            "indexes-of": "^1.0.1",
+            "uniq": "^1.0.1"
+          }
+        }
+      }
+    },
+    "subarg": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
+      "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.1.0"
+      }
+    },
+    "supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+      "requires": {
+        "has-flag": "^4.0.0"
+      }
+    },
+    "svgo": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz",
+      "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.4.1",
+        "coa": "^2.0.2",
+        "css-select": "^2.0.0",
+        "css-select-base-adapter": "^0.1.1",
+        "css-tree": "1.0.0-alpha.37",
+        "csso": "^4.0.2",
+        "js-yaml": "^3.13.1",
+        "mkdirp": "~0.5.1",
+        "object.values": "^1.1.0",
+        "sax": "~1.2.4",
+        "stable": "^0.1.8",
+        "unquote": "~1.1.1",
+        "util.promisify": "~1.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "symbol-tree": {
+      "version": "3.2.4",
+      "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
+      "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",
+      "dev": true
+    },
+    "syntax-error": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz",
+      "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==",
+      "dev": true,
+      "requires": {
+        "acorn-node": "^1.2.0"
+      }
+    },
+    "table": {
+      "version": "5.4.6",
+      "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
+      "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+      "dev": true,
+      "requires": {
+        "ajv": "^6.10.2",
+        "lodash": "^4.17.14",
+        "slice-ansi": "^2.1.0",
+        "string-width": "^3.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "string-width": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^7.0.1",
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^5.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        }
+      }
+    },
+    "taffydb": {
+      "version": "2.6.2",
+      "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
+      "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
+      "dev": true
+    },
+    "tar": {
+      "version": "4.4.13",
+      "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
+      "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
+      "requires": {
+        "chownr": "^1.1.1",
+        "fs-minipass": "^1.2.5",
+        "minipass": "^2.8.6",
+        "minizlib": "^1.2.1",
+        "mkdirp": "^0.5.0",
+        "safe-buffer": "^5.1.2",
+        "yallist": "^3.0.3"
+      }
+    },
+    "tarn": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz",
+      "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ=="
+    },
+    "term-size": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz",
+      "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=",
+      "dev": true,
+      "requires": {
+        "execa": "^0.7.0"
+      }
+    },
+    "terser": {
+      "version": "3.17.0",
+      "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz",
+      "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==",
+      "dev": true,
+      "requires": {
+        "commander": "^2.19.0",
+        "source-map": "~0.6.1",
+        "source-map-support": "~0.5.10"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "test-exclude": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
+      "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
+      "dev": true,
+      "requires": {
+        "@istanbuljs/schema": "^0.1.2",
+        "glob": "^7.1.4",
+        "minimatch": "^3.0.4"
+      }
+    },
+    "text-table": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+      "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
+      "dev": true
+    },
+    "through": {
+      "version": "2.3.8",
+      "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+      "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+      "dev": true
+    },
+    "through2": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+      "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+      "dev": true,
+      "requires": {
+        "readable-stream": "~2.3.6",
+        "xtend": "~4.0.1"
+      }
+    },
+    "tildify": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/tildify/-/tildify-2.0.0.tgz",
+      "integrity": "sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw=="
+    },
+    "timed-out": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz",
+      "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=",
+      "dev": true
+    },
+    "timers-browserify": {
+      "version": "1.4.2",
+      "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz",
+      "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=",
+      "dev": true,
+      "requires": {
+        "process": "~0.11.0"
+      }
+    },
+    "timsort": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
+      "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
+      "dev": true
+    },
+    "tiny-inflate": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz",
+      "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==",
+      "dev": true
+    },
+    "to-arraybuffer": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
+      "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
+      "dev": true
+    },
+    "to-fast-properties": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+      "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
+      "dev": true
+    },
+    "to-object-path": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
+      "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "to-regex": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
+      "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+      "dev": true,
+      "requires": {
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "regex-not": "^1.0.2",
+        "safe-regex": "^1.1.0"
+      }
+    },
+    "to-regex-range": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+      "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+      "dev": true,
+      "requires": {
+        "is-number": "^7.0.0"
+      }
+    },
+    "toidentifier": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
+      "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
+    },
+    "topo": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz",
+      "integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=",
+      "requires": {
+        "hoek": "4.x.x"
+      }
+    },
+    "touch": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
+      "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
+      "dev": true,
+      "requires": {
+        "nopt": "~1.0.10"
+      },
+      "dependencies": {
+        "nopt": {
+          "version": "1.0.10",
+          "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
+          "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
+          "dev": true,
+          "requires": {
+            "abbrev": "1"
+          }
+        }
+      }
+    },
+    "tough-cookie": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
+      "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+      "requires": {
+        "psl": "^1.1.28",
+        "punycode": "^2.1.1"
+      }
+    },
+    "tr46": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz",
+      "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
+      "dev": true,
+      "requires": {
+        "punycode": "^2.1.0"
+      }
+    },
+    "tsconfig-paths": {
+      "version": "3.9.0",
+      "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz",
+      "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==",
+      "dev": true,
+      "requires": {
+        "@types/json5": "^0.0.29",
+        "json5": "^1.0.1",
+        "minimist": "^1.2.0",
+        "strip-bom": "^3.0.0"
+      }
+    },
+    "tty-browserify": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz",
+      "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==",
+      "dev": true
+    },
+    "tunnel-agent": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+      "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+      "requires": {
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "tweetnacl": {
+      "version": "0.14.5",
+      "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
+    },
+    "type": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
+      "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==",
+      "dev": true
+    },
+    "type-check": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+      "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+      "dev": true,
+      "requires": {
+        "prelude-ls": "^1.2.1"
+      }
+    },
+    "type-fest": {
+      "version": "0.8.1",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
+      "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+      "dev": true
+    },
+    "type-is": {
+      "version": "1.6.18",
+      "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+      "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+      "requires": {
+        "media-typer": "0.3.0",
+        "mime-types": "~2.1.24"
+      }
+    },
+    "typedarray": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+      "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+      "dev": true
+    },
+    "typedarray-to-buffer": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+      "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+      "dev": true,
+      "requires": {
+        "is-typedarray": "^1.0.0"
+      }
+    },
+    "typescript": {
+      "version": "4.1.3",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
+      "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
+      "dev": true
+    },
+    "uc.micro": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
+      "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
+      "dev": true
+    },
+    "umd": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz",
+      "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==",
+      "dev": true
+    },
+    "uncss": {
+      "version": "0.17.3",
+      "resolved": "https://registry.npmjs.org/uncss/-/uncss-0.17.3.tgz",
+      "integrity": "sha512-ksdDWl81YWvF/X14fOSw4iu8tESDHFIeyKIeDrK6GEVTQvqJc1WlOEXqostNwOCi3qAj++4EaLsdAgPmUbEyog==",
+      "dev": true,
+      "requires": {
+        "commander": "^2.20.0",
+        "glob": "^7.1.4",
+        "is-absolute-url": "^3.0.1",
+        "is-html": "^1.1.0",
+        "jsdom": "^14.1.0",
+        "lodash": "^4.17.15",
+        "postcss": "^7.0.17",
+        "postcss-selector-parser": "6.0.2",
+        "request": "^2.88.0"
+      },
+      "dependencies": {
+        "is-absolute-url": {
+          "version": "3.0.3",
+          "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz",
+          "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==",
+          "dev": true
+        },
+        "postcss-selector-parser": {
+          "version": "6.0.2",
+          "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz",
+          "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==",
+          "dev": true,
+          "requires": {
+            "cssesc": "^3.0.0",
+            "indexes-of": "^1.0.1",
+            "uniq": "^1.0.1"
+          }
+        }
+      }
+    },
+    "undeclared-identifiers": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz",
+      "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==",
+      "dev": true,
+      "requires": {
+        "acorn-node": "^1.3.0",
+        "dash-ast": "^1.0.0",
+        "get-assigned-identifiers": "^1.2.0",
+        "simple-concat": "^1.0.0",
+        "xtend": "^4.0.1"
+      }
+    },
+    "undefsafe": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz",
+      "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==",
+      "dev": true,
+      "requires": {
+        "debug": "^2.2.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        }
+      }
+    },
+    "underscore": {
+      "version": "1.10.2",
+      "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
+      "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==",
+      "dev": true
+    },
+    "unicode-canonical-property-names-ecmascript": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
+      "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==",
+      "dev": true
+    },
+    "unicode-match-property-ecmascript": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz",
+      "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==",
+      "dev": true,
+      "requires": {
+        "unicode-canonical-property-names-ecmascript": "^1.0.4",
+        "unicode-property-aliases-ecmascript": "^1.0.4"
+      }
+    },
+    "unicode-match-property-value-ecmascript": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz",
+      "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==",
+      "dev": true
+    },
+    "unicode-property-aliases-ecmascript": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz",
+      "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==",
+      "dev": true
+    },
+    "unicode-trie": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-0.3.1.tgz",
+      "integrity": "sha1-1nHd3YkQGgi6w3tqUWEBBgIFIIU=",
+      "dev": true,
+      "requires": {
+        "pako": "^0.2.5",
+        "tiny-inflate": "^1.0.0"
+      },
+      "dependencies": {
+        "pako": {
+          "version": "0.2.9",
+          "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
+          "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=",
+          "dev": true
+        }
+      }
+    },
+    "union-value": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
+      "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
+      "dev": true,
+      "requires": {
+        "arr-union": "^3.1.0",
+        "get-value": "^2.0.6",
+        "is-extendable": "^0.1.1",
+        "set-value": "^2.0.1"
+      }
+    },
+    "uniq": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz",
+      "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=",
+      "dev": true
+    },
+    "uniqs": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz",
+      "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=",
+      "dev": true
+    },
+    "unique-string": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz",
+      "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=",
+      "dev": true,
+      "requires": {
+        "crypto-random-string": "^1.0.0"
+      }
+    },
+    "unpipe": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+      "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
+    },
+    "unquote": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz",
+      "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=",
+      "dev": true
+    },
+    "unset-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+      "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
+      "dev": true,
+      "requires": {
+        "has-value": "^0.3.1",
+        "isobject": "^3.0.0"
+      },
+      "dependencies": {
+        "has-value": {
+          "version": "0.3.1",
+          "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
+          "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
+          "dev": true,
+          "requires": {
+            "get-value": "^2.0.3",
+            "has-values": "^0.1.4",
+            "isobject": "^2.0.0"
+          },
+          "dependencies": {
+            "isobject": {
+              "version": "2.1.0",
+              "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+              "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+              "dev": true,
+              "requires": {
+                "isarray": "1.0.0"
+              }
+            }
+          }
+        },
+        "has-values": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+          "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
+          "dev": true
+        }
+      }
+    },
+    "unzip-response": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz",
+      "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=",
+      "dev": true
+    },
+    "upath": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
+      "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
+      "dev": true
+    },
+    "update-notifier": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz",
+      "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==",
+      "dev": true,
+      "requires": {
+        "boxen": "^1.2.1",
+        "chalk": "^2.0.1",
+        "configstore": "^3.0.0",
+        "import-lazy": "^2.1.0",
+        "is-ci": "^1.0.10",
+        "is-installed-globally": "^0.1.0",
+        "is-npm": "^1.0.0",
+        "latest-version": "^3.0.0",
+        "semver-diff": "^2.0.0",
+        "xdg-basedir": "^3.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "uri-js": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz",
+      "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==",
+      "requires": {
+        "punycode": "^2.1.0"
+      }
+    },
+    "urix": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+      "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
+      "dev": true
+    },
+    "url": {
+      "version": "0.11.0",
+      "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+      "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
+      "dev": true,
+      "requires": {
+        "punycode": "1.3.2",
+        "querystring": "0.2.0"
+      },
+      "dependencies": {
+        "punycode": {
+          "version": "1.3.2",
+          "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+          "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
+          "dev": true
+        }
+      }
+    },
+    "url-parse-lax": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
+      "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=",
+      "dev": true,
+      "requires": {
+        "prepend-http": "^1.0.1"
+      }
+    },
+    "use": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+      "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
+      "dev": true
+    },
+    "util": {
+      "version": "0.12.3",
+      "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz",
+      "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.3",
+        "is-arguments": "^1.0.4",
+        "is-generator-function": "^1.0.7",
+        "is-typed-array": "^1.1.3",
+        "safe-buffer": "^5.1.2",
+        "which-typed-array": "^1.1.2"
+      }
+    },
+    "util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+    },
+    "util.promisify": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz",
+      "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==",
+      "dev": true,
+      "requires": {
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.17.2",
+        "has-symbols": "^1.0.1",
+        "object.getownpropertydescriptors": "^2.1.0"
+      },
+      "dependencies": {
+        "es-abstract": {
+          "version": "1.17.7",
+          "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
+          "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
+          "dev": true,
+          "requires": {
+            "es-to-primitive": "^1.2.1",
+            "function-bind": "^1.1.1",
+            "has": "^1.0.3",
+            "has-symbols": "^1.0.1",
+            "is-callable": "^1.2.2",
+            "is-regex": "^1.1.1",
+            "object-inspect": "^1.8.0",
+            "object-keys": "^1.1.1",
+            "object.assign": "^4.1.1",
+            "string.prototype.trimend": "^1.0.1",
+            "string.prototype.trimstart": "^1.0.1"
+          }
+        }
+      }
+    },
+    "utils-merge": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+      "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
+    },
+    "uuid": {
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
+    },
+    "v8-compile-cache": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz",
+      "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==",
+      "dev": true
+    },
+    "validate-npm-package-license": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+      "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+      "dev": true,
+      "requires": {
+        "spdx-correct": "^3.0.0",
+        "spdx-expression-parse": "^3.0.0"
+      }
+    },
+    "vary": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+      "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
+    },
+    "vendors": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz",
+      "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==",
+      "dev": true
+    },
+    "verror": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+      "requires": {
+        "assert-plus": "^1.0.0",
+        "core-util-is": "1.0.2",
+        "extsprintf": "^1.2.0"
+      }
+    },
+    "vlq": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz",
+      "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==",
+      "dev": true
+    },
+    "vm-browserify": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
+      "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
+      "dev": true
+    },
+    "w3c-hr-time": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
+      "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
+      "dev": true,
+      "requires": {
+        "browser-process-hrtime": "^1.0.0"
+      }
+    },
+    "w3c-xmlserializer": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz",
+      "integrity": "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==",
+      "dev": true,
+      "requires": {
+        "domexception": "^1.0.1",
+        "webidl-conversions": "^4.0.2",
+        "xml-name-validator": "^3.0.0"
+      }
+    },
+    "wcwidth": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+      "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
+      "dev": true,
+      "requires": {
+        "defaults": "^1.0.3"
+      }
+    },
+    "webidl-conversions": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
+      "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==",
+      "dev": true
+    },
+    "websocket": {
+      "version": "1.0.31",
+      "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.31.tgz",
+      "integrity": "sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ==",
+      "dev": true,
+      "requires": {
+        "debug": "^2.2.0",
+        "es5-ext": "^0.10.50",
+        "nan": "^2.14.0",
+        "typedarray-to-buffer": "^3.1.5",
+        "yaeti": "^0.0.6"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        }
+      }
+    },
+    "whatwg-encoding": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz",
+      "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==",
+      "dev": true,
+      "requires": {
+        "iconv-lite": "0.4.24"
+      }
+    },
+    "whatwg-mimetype": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
+      "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==",
+      "dev": true
+    },
+    "whatwg-url": {
+      "version": "7.1.0",
+      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz",
+      "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==",
+      "dev": true,
+      "requires": {
+        "lodash.sortby": "^4.7.0",
+        "tr46": "^1.0.1",
+        "webidl-conversions": "^4.0.2"
+      }
+    },
+    "which": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+      "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+      "dev": true,
+      "requires": {
+        "isexe": "^2.0.0"
+      }
+    },
+    "which-module": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+      "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+      "dev": true
+    },
+    "which-typed-array": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz",
+      "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==",
+      "dev": true,
+      "requires": {
+        "available-typed-arrays": "^1.0.2",
+        "call-bind": "^1.0.0",
+        "es-abstract": "^1.18.0-next.1",
+        "foreach": "^2.0.5",
+        "function-bind": "^1.1.1",
+        "has-symbols": "^1.0.1",
+        "is-typed-array": "^1.1.3"
+      }
+    },
+    "wide-align": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
+      "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
+      "requires": {
+        "string-width": "^1.0.2 || 2"
+      }
+    },
+    "widest-line": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz",
+      "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==",
+      "dev": true,
+      "requires": {
+        "string-width": "^2.1.1"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "string-width": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+          "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+          "dev": true,
+          "requires": {
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^4.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
+          }
+        }
+      }
+    },
+    "word-wrap": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+      "dev": true
+    },
+    "workerpool": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz",
+      "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==",
+      "dev": true
+    },
+    "wrap-ansi": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
+      "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+      "dev": true,
+      "requires": {
+        "ansi-styles": "^3.2.0",
+        "string-width": "^3.0.0",
+        "strip-ansi": "^5.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+          "dev": true
+        },
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "string-width": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^7.0.1",
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^5.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        }
+      }
+    },
+    "wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+    },
+    "write": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
+      "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
+      "dev": true,
+      "requires": {
+        "mkdirp": "^0.5.1"
+      }
+    },
+    "write-file-atomic": {
+      "version": "2.4.3",
+      "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
+      "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.11",
+        "imurmurhash": "^0.1.4",
+        "signal-exit": "^3.0.2"
+      }
+    },
+    "ws": {
+      "version": "7.4.0",
+      "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz",
+      "integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ=="
+    },
+    "xdg-basedir": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz",
+      "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=",
+      "dev": true
+    },
+    "xml-name-validator": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
+      "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
+      "dev": true
+    },
+    "xmlchars": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
+      "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
+      "dev": true
+    },
+    "xmlcreate": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz",
+      "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==",
+      "dev": true
+    },
+    "xtend": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+      "dev": true
+    },
+    "y18n": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
+      "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
+      "dev": true
+    },
+    "yaeti": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz",
+      "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=",
+      "dev": true
+    },
+    "yallist": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+      "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
+    },
+    "yargs": {
+      "version": "13.3.2",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+      "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
+      "dev": true,
+      "requires": {
+        "cliui": "^5.0.0",
+        "find-up": "^3.0.0",
+        "get-caller-file": "^2.0.1",
+        "require-directory": "^2.1.1",
+        "require-main-filename": "^2.0.0",
+        "set-blocking": "^2.0.0",
+        "string-width": "^3.0.0",
+        "which-module": "^2.0.0",
+        "y18n": "^4.0.0",
+        "yargs-parser": "^13.1.2"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+          "dev": true
+        },
+        "find-up": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^3.0.0"
+          }
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "locate-path": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^3.0.0",
+            "path-exists": "^3.0.0"
+          }
+        },
+        "p-limit": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+          "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+          "dev": true,
+          "requires": {
+            "p-try": "^2.0.0"
+          }
+        },
+        "p-locate": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.0.0"
+          }
+        },
+        "p-try": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+          "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+          "dev": true
+        },
+        "string-width": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^7.0.1",
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^5.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        }
+      }
+    },
+    "yargs-parser": {
+      "version": "13.1.2",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
+      "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
+      "dev": true,
+      "requires": {
+        "camelcase": "^5.0.0",
+        "decamelize": "^1.2.0"
+      }
+    },
+    "yargs-unparser": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz",
+      "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==",
+      "dev": true,
+      "requires": {
+        "camelcase": "^6.0.0",
+        "decamelize": "^4.0.0",
+        "flat": "^5.0.2",
+        "is-plain-obj": "^2.1.0"
+      },
+      "dependencies": {
+        "camelcase": {
+          "version": "6.2.0",
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz",
+          "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==",
+          "dev": true
+        },
+        "decamelize": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz",
+          "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==",
+          "dev": true
+        }
+      }
+    },
+    "yocto-queue": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+      "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+      "dev": true
+    }
+  }
+}
diff --git a/lwnode/apps/sqlite3/package.json b/lwnode/apps/sqlite3/package.json
new file mode 100644 (file)
index 0000000..4c4bec9
--- /dev/null
@@ -0,0 +1,78 @@
+{
+  "name": "sqlite3-service",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "engines": {
+    "node": ">=14.14.0"
+  },
+  "scripts": {
+    "lint": "eslint --fix --ext .js src || true",
+    "build:backend": "tsc -p ./src/backend",
+    "build:backend:watch": "npm run build:backend -- --watch",
+    "build:frontend": "tsc -p ./src/frontend/lib",
+    "build:frontend:production": "npm-run-all clean:frontend build:frontend && parcel build ./out/frontend/sqlite3.js --global sqlite3 --out-file=libsqlite.js --out-dir=./download --no-source-maps && cp -r ./download ./out/backend",
+    "build:test": "mkdir -p sample/script/dist && browserify --insert-globals sample/script/test/test_main.js -t envify > sample/script/dist/test_main.js",
+    "build:test_noenv": "mkdir -p sample/script/dist && browserify --insert-globals sample/script/test/test_main.js > sample/script/dist/test_main.js",
+    "build:all": "npm-run-all clean build:backend build:frontend:production build:test",
+    "build:all_noenv": "npm-run-all clean build:backend build:frontend:production build:test_noenv",
+    "clean": "npm-run-all clean:backend clean:frontend",
+    "clean:backend": "rm -rf ./out/backend",
+    "clean:frontend": "rm -rf ./out/frontend",
+    "watch": "nodemon ./out/backend",
+    "test": "node sample/index_node.js",
+    "start": "node ./out/backend",
+    "dev": "npm-run-all clean:backend build:backend -p -r build:backend:watch watch",
+    "docs": "jsdoc -c jsdoc.json",
+    "coverage": "nyc npm run test"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.sec.samsung.net/lws/sqlite3-service.git"
+  },
+  "nyc": {
+    "exclude": "**/deps/node-sqlite3/lib/*.js"
+  },
+  "author": "Samsung Research",
+  "license": "Apache-2.0",
+  "dependencies": {
+    "chalk": "^4.1.0",
+    "compression": "^1.7.4",
+    "debug": "^4.2.0",
+    "ejs": "^3.1.6",
+    "express": "4.17.1",
+    "express-asyncify": "^1.0.1",
+    "joi": "^10.6.0",
+    "jsonrpc-lite": "^2.2.0",
+    "jsonwebtoken": "^8.5.1",
+    "knex": "^0.95.15",
+    "moment": "^2.29.1",
+    "sqlite3": "^5.0.2",
+    "ws": "^7.4.0"
+  },
+  "devDependencies": {
+    "@types/browserify": "^12.0.36",
+    "@types/express": "^4.17.1",
+    "@types/jsonwebtoken": "^8.5.1",
+    "@types/node": "^14.14.20",
+    "@types/sqlite3": "^3.1.8",
+    "browserify": "^17.0.0",
+    "docdash": "^1.2.0",
+    "envify": "^4.1.0",
+    "eslint": "^7.13.0",
+    "eslint-config-airbnb-base": "^14.2.1",
+    "eslint-config-prettier": "^6.12.0",
+    "eslint-plugin-import": "^2.22.1",
+    "eslint-plugin-prettier": "^3.1.4",
+    "jsdoc": "^3.6.6",
+    "mocha": "^8.2.1",
+    "node-fetch": "^2.6.1",
+    "nodemon": "^1.19.4",
+    "npm-run-all": "^4.1.5",
+    "nyc": "^15.1.0",
+    "parcel-bundler": "^1.12.4",
+    "prettier": "^2.1.2",
+    "typescript": "^4.1.3",
+    "websocket": "1.0.31"
+  }
+}
diff --git a/lwnode/apps/sqlite3/packaging/node-sqlite3-ep.manifest b/lwnode/apps/sqlite3/packaging/node-sqlite3-ep.manifest
new file mode 100644 (file)
index 0000000..f5a44ec
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+        <request>
+                <domain name="_"/>
+        </request>
+</manifest>
diff --git a/lwnode/apps/sqlite3/packaging/node-sqlite3-ep.service b/lwnode/apps/sqlite3/packaging/node-sqlite3-ep.service
new file mode 100644 (file)
index 0000000..454a397
--- /dev/null
@@ -0,0 +1,12 @@
+[Unit]
+Description=Node SQLite3 Service
+
+[Service]
+User=owner
+Group=users
+ExecStart=/usr/bin/lwnode /usr/apps/node-sqlite3-ep/script
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/lwnode/apps/sqlite3/packaging/node-sqlite3-ep.spec b/lwnode/apps/sqlite3/packaging/node-sqlite3-ep.spec
new file mode 100644 (file)
index 0000000..c8d9cee
--- /dev/null
@@ -0,0 +1,168 @@
+#
+# Copyright 2020-present Samsung Electronics Co., Ltd.
+#
+# 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.
+#
+
+Name:          node-sqlite3-ep
+Summary:       -
+Version:       1.0.0
+Release:       1
+Group:         Application Framework/Service
+License:       Apache-2.0
+Source:        %{name}-%{version}.tar.gz
+Source1:       %{name}.service
+Source1001:    %{name}.manifest
+BuildRequires: cmake
+BuildRequires: make
+BuildRequires: ninja
+BuildRequires: rsync
+BuildRequires: zip
+BuildRequires: python
+BuildRequires: libgcc
+BuildRequires: glibc-devel
+BuildRequires: libstdc++-devel
+BuildRequires: zlib-devel
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(aul)
+BuildRequires: pkgconfig(capi-appfw-app-common)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(capi-system-system-settings)
+BuildRequires: pkgconfig(icu-i18n)
+BuildRequires: pkgconfig(icu-uc)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(sqlite3)
+
+%%if (0%{?tizen_version_major} >= 6)
+BuildRequires: libopenssl1.1-devel
+%else
+  %if (0%{?tizen_version_major} == 5) && (0%{?tizen_version_minor} == 5)
+BuildRequires: libopenssl-devel
+  %else
+BuildRequires: libopenssl-devel
+  %endif
+%endif
+
+%description
+
+%define _jsdir /usr/apps/%{name}
+%define _tmpdir /tmp
+%define _prodir ./script
+
+##############################################
+# Prep
+##############################################
+%prep
+%setup -q
+
+
+##############################################
+# Build
+##############################################
+%build
+
+%ifarch armv7l
+%define tizen_arch arm
+%endif
+%ifarch aarch64
+%define tizen_arch aarch64
+%endif
+%ifarch i686
+%define tizen_arch i686
+%endif
+%ifarch x86_64
+%define tizen_arch x86_64
+%endif
+
+%if "%{tizen_arch}" == "arm"
+find . -name CMakeCache.txt | xargs rm -f
+find . -name CMakeFiles | xargs rm -fr
+rm -fr ./out_tizen
+cmake CMakeLists.txt -B./out_tizen -H. -G Ninja
+ninja -vC ./out_tizen
+mkdir -p ./node_modules/sqlite3/lib/binding/napi-v3-linux-arm
+cp -f ./out_tizen/node_sqlite3.node ./node_modules/sqlite3/lib/binding/napi-v3-linux-arm
+rm -rf ./out_tizen
+%endif
+
+##############################################
+## Install
+##############################################
+%install
+mkdir -p %{buildroot}%{_libdir}/systemd/system
+mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
+install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/%{name}.service
+ln -sf ../%{name}.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/%{name}.service
+
+rm -rf %{buildroot}%{_jsdir}
+mkdir -p %{buildroot}%{_jsdir}
+mkdir -p %{_prodir}
+
+if [ -f "tools/sqlite3-filter.txt" ]; then
+  # rsync is only used when building rpm in dev environment
+  find node_modules | rsync -avmL --delete --delete-excluded --filter="merge tools/sqlite3-filter.txt" --files-from=- ./ %{_prodir}
+else
+  cp -fr node_modules %{_prodir}
+fi
+
+cp -rf download %{_prodir}
+cp -rf out/backend/* %{_prodir} # *.js files should have been generated
+mkdir -p %{buildroot}/%{_tmpdir}
+zip -r %{buildroot}/%{_tmpdir}/script.zip %{_prodir}
+
+%clean
+rm -f ./*.list
+rm -f ./*.manifest
+rm -rf %{_prodir}
+
+##############################################
+## Scripts
+##############################################
+
+%post
+/sbin/ldconfig
+echo -e "\033[0;33mclean project folder\033[0m"
+rm -rf %{_jsdir}
+
+echo -e "\033[0;33munzip script\033[0m"
+unzip -q %{_tmpdir}/script.zip -d %{_jsdir}
+if [ $? != 0 ];then
+    echo -e "\033[0;31mfaile to unzip script\033[0m"
+fi
+rm %{_tmpdir}/script.zip
+
+systemctl daemon-reload
+if [ $1 == 1 ]; then
+    echo -e "\033[0;33msqlite3-service start\033[0m"
+    systemctl start %{name}.service
+fi
+
+if [ $1 == 2 ]; then
+    echo -e "\033[0;33msqlite3-service restart\033[0m"
+    systemctl restart %{name}.service
+fi
+
+%postun
+/sbin/ldconfig
+
+##############################################
+## Packaging rpms
+##############################################
+
+%files
+%defattr(-,root,root,-)
+%manifest packaging/%{name}.manifest
+%{_tmpdir}/script.zip
+%{_libdir}/systemd/system/%{name}.service
+%{_libdir}/systemd/system/multi-user.target.wants/%{name}.service
+%license LICENSE LICENSE.BOEHM-GC LICENSE.BSD-3-Clause LICENSE.MIT LICENSE.NodeJS
diff --git a/lwnode/apps/sqlite3/sample/config.xml b/lwnode/apps/sqlite3/sample/config.xml
new file mode 100644 (file)
index 0000000..33a796b
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" version="1.0.0" viewmodes="maximized">
+    <tizen:application id="OwOD84MFBg.sqlite3" package="OwOD84MFBg" required_version="3.0"/>
+    <feature name="http://tizen.org/feature/screen.size.all"/>
+    <content src="index.html"/>
+    <icon src="icon.png"/>
+    <name>sqlite3</name>
+    <tizen:profile name="tv"/>
+    <tizen:privilege name="http://tizen.org/privilege/filesystem.write"/>
+    <tizen:privilege name="http://tizen.org/privilege/filesystem.read"/>
+    <tizen:setting background-support="disable" context-menu="enable" encryption="disable" hwkey-event="enable" install-location="auto"/>
+</widget>
diff --git a/lwnode/apps/sqlite3/sample/icon.png b/lwnode/apps/sqlite3/sample/icon.png
new file mode 100644 (file)
index 0000000..1f02568
Binary files /dev/null and b/lwnode/apps/sqlite3/sample/icon.png differ
diff --git a/lwnode/apps/sqlite3/sample/index.html b/lwnode/apps/sqlite3/sample/index.html
new file mode 100644 (file)
index 0000000..3af44bb
--- /dev/null
@@ -0,0 +1,69 @@
+<!--
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+    <meta name="description" content="Tizen TV basic template generated by Samsung TV Web IDE"/>
+    <title>Sqlite3 Service Test</title>
+    <link rel="stylesheet" href="styles/style.css"/>
+    <link rel="stylesheet" href="script/lib/mocha.css"/>
+    <script src="script/dist/test_main.js"></script>
+    <script src="script/test/support/tizen.js"></script>
+</head>
+
+<body>
+  <div class=contents>
+    <div class=content_text id=textbox></div>
+  </div>
+  <div id="mocha"></div>
+  <script src="script/lib/mocha.js"></script>
+  <script class="mocha-init">
+    mocha.setup('bdd');
+    mocha.timeout(480000);
+    mocha.checkLeaks();
+  </script>
+  <script src="script/test/affected.test.js"></script>
+  <script src="script/test/blob.test.js"></script>
+  <script src="script/test/constants.test.js"></script>
+  <script src="script/test/database_fail.test.js"></script>
+  <script src="script/test/each.test.js"></script> <!-- Needs big.db -->
+  <script src="script/test/exec.test.js"></script>
+  <script src="script/test/fts-content.test.js"></script>
+  <script src="script/test/issue-108.test.js"></script>
+  <script src="script/test/named_columns.test.js"></script>
+  <script src="script/test/named_params.test.js"></script>
+  <script src="script/test/null_error.test.js"></script>
+  <script src="script/test/open_close.test.js"></script>
+  <script src="script/test/other_objects.test.js"></script>
+  <script src="script/test/parallel_insert.test.js"></script>
+  <script src="script/test/prepare.test.js"></script>  <!-- Needs prepare.db -->
+  <script src="script/test/profile.test.js"></script>
+  <script src="script/test/rerun.test.js"></script>
+  <script src="script/test/scheduling.test.js"></script>
+  <script src="script/test/trace.test.js"></script>
+  <script src="script/test/unicode.test.js"></script>
+  <script src="script/test/custom.basic.test.js"></script>
+  <script src="script/test/custom.each.test.js"></script>
+  <script src="script/test/custom.kiosk.test.js"></script>
+  <script src="script/test/custom.trace.test.js"></script>
+  <script src="script/test/custom.version.test.js"></script>
+</body>
+</html>
diff --git a/lwnode/apps/sqlite3/sample/index_node.js b/lwnode/apps/sqlite3/sample/index_node.js
new file mode 100644 (file)
index 0000000..9167e0e
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+const { spawn } = require('child_process');
+const Mocha = require('mocha');
+const fs = require('fs');
+const path = require('path');
+const variables = require('./script/test/support/variables');
+if (!global.fetch) {
+  global.fetch = require('node-fetch');
+}
+
+const sqlite3ServiceRoot = process.cwd();
+
+global.sqlite3 = require(path.join(sqlite3ServiceRoot, 'out/frontend/sqlite3.js'));
+console.log(variables.DB_URL);
+global.sqlite3.configure(variables.DB_URL);
+global.WebSocket = require('ws');
+
+const server = spawn(
+  'lwnode',
+  [
+    '--allow-code-generation-from-strings',
+    path.resolve(sqlite3ServiceRoot + '/out/backend'),
+  ],
+  {
+    stdio: 'inherit',
+    env: process.env,
+  },
+);
+
+setTimeout(function () {
+  console.log('test start');
+  const mocha = new Mocha();
+  mocha.timeout(560000);
+  const testDir = path.resolve(sqlite3ServiceRoot, 'sample/script/test');
+  fs.readdirSync(testDir)
+    .filter(function (file) {
+      return file.substr(-3) === '.js';
+    })
+    .forEach(function (file) {
+      if (file === 'test_main.js') {
+        return;
+      }
+      // if (file === 'prepare.test.js')
+      mocha.addFile(path.join(testDir, file));
+    });
+
+  const runner = mocha.run(function (failures) {
+    process.exitCode = failures ? 1 : 0;
+  });
+
+  runner.on('end', function () {
+    server.kill('SIGINT');
+  });
+}, 2000);
diff --git a/lwnode/apps/sqlite3/sample/package.json b/lwnode/apps/sqlite3/sample/package.json
new file mode 100644 (file)
index 0000000..825e7b2
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name": "unittest",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "node runner.js"
+  },
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "mocha": "^8.2.1",
+    "websocket": "1.0.31"
+  }
+}
diff --git a/lwnode/apps/sqlite3/sample/script/lib/mocha.css b/lwnode/apps/sqlite3/sample/script/lib/mocha.css
new file mode 100644 (file)
index 0000000..4ca8fcb
--- /dev/null
@@ -0,0 +1,325 @@
+@charset "utf-8";
+
+body {
+  margin:0;
+}
+
+#mocha {
+  font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
+  margin: 60px 50px;
+}
+
+#mocha ul,
+#mocha li {
+  margin: 0;
+  padding: 0;
+}
+
+#mocha ul {
+  list-style: none;
+}
+
+#mocha h1,
+#mocha h2 {
+  margin: 0;
+}
+
+#mocha h1 {
+  margin-top: 15px;
+  font-size: 1em;
+  font-weight: 200;
+}
+
+#mocha h1 a {
+  text-decoration: none;
+  color: inherit;
+}
+
+#mocha h1 a:hover {
+  text-decoration: underline;
+}
+
+#mocha .suite .suite h1 {
+  margin-top: 0;
+  font-size: .8em;
+}
+
+#mocha .hidden {
+  display: none;
+}
+
+#mocha h2 {
+  font-size: 12px;
+  font-weight: normal;
+  cursor: pointer;
+}
+
+#mocha .suite {
+  margin-left: 15px;
+}
+
+#mocha .test {
+  margin-left: 15px;
+  overflow: hidden;
+}
+
+#mocha .test.pending:hover h2::after {
+  content: '(pending)';
+  font-family: arial, sans-serif;
+}
+
+#mocha .test.pass.medium .duration {
+  background: #c09853;
+}
+
+#mocha .test.pass.slow .duration {
+  background: #b94a48;
+}
+
+#mocha .test.pass::before {
+  content: '✓';
+  font-size: 12px;
+  display: block;
+  float: left;
+  margin-right: 5px;
+  color: #00d6b2;
+}
+
+#mocha .test.pass .duration {
+  font-size: 9px;
+  margin-left: 5px;
+  padding: 2px 5px;
+  color: #fff;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
+  -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
+  box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  -ms-border-radius: 5px;
+  -o-border-radius: 5px;
+  border-radius: 5px;
+}
+
+#mocha .test.pass.fast .duration {
+  display: none;
+}
+
+#mocha .test.pending {
+  color: #0b97c4;
+}
+
+#mocha .test.pending::before {
+  content: '◦';
+  color: #0b97c4;
+}
+
+#mocha .test.fail {
+  color: #c00;
+}
+
+#mocha .test.fail pre {
+  color: black;
+}
+
+#mocha .test.fail::before {
+  content: '✖';
+  font-size: 12px;
+  display: block;
+  float: left;
+  margin-right: 5px;
+  color: #c00;
+}
+
+#mocha .test pre.error {
+  color: #c00;
+  max-height: 300px;
+  overflow: auto;
+}
+
+#mocha .test .html-error {
+  overflow: auto;
+  color: black;
+  display: block;
+  float: left;
+  clear: left;
+  font: 12px/1.5 monaco, monospace;
+  margin: 5px;
+  padding: 15px;
+  border: 1px solid #eee;
+  max-width: 85%; /*(1)*/
+  max-width: -webkit-calc(100% - 42px);
+  max-width: -moz-calc(100% - 42px);
+  max-width: calc(100% - 42px); /*(2)*/
+  max-height: 300px;
+  word-wrap: break-word;
+  border-bottom-color: #ddd;
+  -webkit-box-shadow: 0 1px 3px #eee;
+  -moz-box-shadow: 0 1px 3px #eee;
+  box-shadow: 0 1px 3px #eee;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+#mocha .test .html-error pre.error {
+  border: none;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+  -webkit-box-shadow: 0;
+  -moz-box-shadow: 0;
+  box-shadow: 0;
+  padding: 0;
+  margin: 0;
+  margin-top: 18px;
+  max-height: none;
+}
+
+/**
+ * (1): approximate for browsers not supporting calc
+ * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border)
+ *      ^^ seriously
+ */
+#mocha .test pre {
+  display: block;
+  float: left;
+  clear: left;
+  font: 12px/1.5 monaco, monospace;
+  margin: 5px;
+  padding: 15px;
+  border: 1px solid #eee;
+  max-width: 85%; /*(1)*/
+  max-width: -webkit-calc(100% - 42px);
+  max-width: -moz-calc(100% - 42px);
+  max-width: calc(100% - 42px); /*(2)*/
+  word-wrap: break-word;
+  border-bottom-color: #ddd;
+  -webkit-box-shadow: 0 1px 3px #eee;
+  -moz-box-shadow: 0 1px 3px #eee;
+  box-shadow: 0 1px 3px #eee;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+#mocha .test h2 {
+  position: relative;
+}
+
+#mocha .test a.replay {
+  position: absolute;
+  top: 3px;
+  right: 0;
+  text-decoration: none;
+  vertical-align: middle;
+  display: block;
+  width: 15px;
+  height: 15px;
+  line-height: 15px;
+  text-align: center;
+  background: #eee;
+  font-size: 15px;
+  -webkit-border-radius: 15px;
+  -moz-border-radius: 15px;
+  border-radius: 15px;
+  -webkit-transition:opacity 200ms;
+  -moz-transition:opacity 200ms;
+  -o-transition:opacity 200ms;
+  transition: opacity 200ms;
+  opacity: 0.3;
+  color: #888;
+}
+
+#mocha .test:hover a.replay {
+  opacity: 1;
+}
+
+#mocha-report.pass .test.fail {
+  display: none;
+}
+
+#mocha-report.fail .test.pass {
+  display: none;
+}
+
+#mocha-report.pending .test.pass,
+#mocha-report.pending .test.fail {
+  display: none;
+}
+#mocha-report.pending .test.pass.pending {
+  display: block;
+}
+
+#mocha-error {
+  color: #c00;
+  font-size: 1.5em;
+  font-weight: 100;
+  letter-spacing: 1px;
+}
+
+#mocha-stats {
+  position: fixed;
+  top: 15px;
+  right: 10px;
+  font-size: 12px;
+  margin: 0;
+  color: #888;
+  z-index: 1;
+}
+
+#mocha-stats .progress {
+  float: right;
+  padding-top: 0;
+
+  /**
+   * Set safe initial values, so mochas .progress does not inherit these
+   * properties from Bootstrap .progress (which causes .progress height to
+   * equal line height set in Bootstrap).
+   */
+  height: auto;
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+  background-color: initial;
+}
+
+#mocha-stats em {
+  color: black;
+}
+
+#mocha-stats a {
+  text-decoration: none;
+  color: inherit;
+}
+
+#mocha-stats a:hover {
+  border-bottom: 1px solid #eee;
+}
+
+#mocha-stats li {
+  display: inline-block;
+  margin: 0 5px;
+  list-style: none;
+  padding-top: 11px;
+}
+
+#mocha-stats canvas {
+  width: 40px;
+  height: 40px;
+}
+
+#mocha code .comment { color: #ddd; }
+#mocha code .init { color: #2f6fad; }
+#mocha code .string { color: #5890ad; }
+#mocha code .keyword { color: #8a6343; }
+#mocha code .number { color: #2f6fad; }
+
+@media screen and (max-device-width: 480px) {
+  #mocha {
+    margin: 60px 0px;
+  }
+
+  #mocha #stats {
+    position: absolute;
+  }
+}
diff --git a/lwnode/apps/sqlite3/sample/script/lib/mocha.js b/lwnode/apps/sqlite3/sample/script/lib/mocha.js
new file mode 100644 (file)
index 0000000..62c7838
--- /dev/null
@@ -0,0 +1,29734 @@
+(function (global, factory) {
+       typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+       typeof define === 'function' && define.amd ? define(factory) :
+       (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.mocha = factory());
+}(this, (function () { 'use strict';
+
+       var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+       function createCommonjsModule(fn, basedir, module) {
+               return module = {
+                 path: basedir,
+                 exports: {},
+                 require: function (path, base) {
+             return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
+           }
+               }, fn(module, module.exports), module.exports;
+       }
+
+       function getCjsExportFromNamespace (n) {
+               return n && n['default'] || n;
+       }
+
+       function commonjsRequire () {
+               throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
+       }
+
+       var check = function (it) {
+         return it && it.Math == Math && it;
+       };
+
+       // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+       var global_1 =
+         // eslint-disable-next-line no-undef
+         check(typeof globalThis == 'object' && globalThis) ||
+         check(typeof window == 'object' && window) ||
+         check(typeof self == 'object' && self) ||
+         check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
+         // eslint-disable-next-line no-new-func
+         Function('return this')();
+
+       var fails = function (exec) {
+         try {
+           return !!exec();
+         } catch (error) {
+           return true;
+         }
+       };
+
+       // Thank's IE8 for his funny defineProperty
+       var descriptors = !fails(function () {
+         return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
+       });
+
+       var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
+       var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+
+       // Nashorn ~ JDK8 bug
+       var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
+
+       // `Object.prototype.propertyIsEnumerable` method implementation
+       // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
+       var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
+         var descriptor = getOwnPropertyDescriptor(this, V);
+         return !!descriptor && descriptor.enumerable;
+       } : nativePropertyIsEnumerable;
+
+       var objectPropertyIsEnumerable = {
+               f: f
+       };
+
+       var createPropertyDescriptor = function (bitmap, value) {
+         return {
+           enumerable: !(bitmap & 1),
+           configurable: !(bitmap & 2),
+           writable: !(bitmap & 4),
+           value: value
+         };
+       };
+
+       var toString = {}.toString;
+
+       var classofRaw = function (it) {
+         return toString.call(it).slice(8, -1);
+       };
+
+       var split = ''.split;
+
+       // fallback for non-array-like ES3 and non-enumerable old V8 strings
+       var indexedObject = fails(function () {
+         // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
+         // eslint-disable-next-line no-prototype-builtins
+         return !Object('z').propertyIsEnumerable(0);
+       }) ? function (it) {
+         return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
+       } : Object;
+
+       // `RequireObjectCoercible` abstract operation
+       // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
+       var requireObjectCoercible = function (it) {
+         if (it == undefined) throw TypeError("Can't call method on " + it);
+         return it;
+       };
+
+       // toObject with fallback for non-array-like ES3 strings
+
+
+
+       var toIndexedObject = function (it) {
+         return indexedObject(requireObjectCoercible(it));
+       };
+
+       var isObject = function (it) {
+         return typeof it === 'object' ? it !== null : typeof it === 'function';
+       };
+
+       // `ToPrimitive` abstract operation
+       // https://tc39.github.io/ecma262/#sec-toprimitive
+       // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+       // and the second argument - flag - preferred type is a string
+       var toPrimitive = function (input, PREFERRED_STRING) {
+         if (!isObject(input)) return input;
+         var fn, val;
+         if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
+         if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
+         if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
+         throw TypeError("Can't convert object to primitive value");
+       };
+
+       var hasOwnProperty = {}.hasOwnProperty;
+
+       var has = function (it, key) {
+         return hasOwnProperty.call(it, key);
+       };
+
+       var document$1 = global_1.document;
+       // typeof document.createElement is 'object' in old IE
+       var EXISTS = isObject(document$1) && isObject(document$1.createElement);
+
+       var documentCreateElement = function (it) {
+         return EXISTS ? document$1.createElement(it) : {};
+       };
+
+       // Thank's IE8 for his funny defineProperty
+       var ie8DomDefine = !descriptors && !fails(function () {
+         return Object.defineProperty(documentCreateElement('div'), 'a', {
+           get: function () { return 7; }
+         }).a != 7;
+       });
+
+       var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+
+       // `Object.getOwnPropertyDescriptor` method
+       // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
+       var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
+         O = toIndexedObject(O);
+         P = toPrimitive(P, true);
+         if (ie8DomDefine) try {
+           return nativeGetOwnPropertyDescriptor(O, P);
+         } catch (error) { /* empty */ }
+         if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
+       };
+
+       var objectGetOwnPropertyDescriptor = {
+               f: f$1
+       };
+
+       var anObject = function (it) {
+         if (!isObject(it)) {
+           throw TypeError(String(it) + ' is not an object');
+         } return it;
+       };
+
+       var nativeDefineProperty = Object.defineProperty;
+
+       // `Object.defineProperty` method
+       // https://tc39.github.io/ecma262/#sec-object.defineproperty
+       var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
+         anObject(O);
+         P = toPrimitive(P, true);
+         anObject(Attributes);
+         if (ie8DomDefine) try {
+           return nativeDefineProperty(O, P, Attributes);
+         } catch (error) { /* empty */ }
+         if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
+         if ('value' in Attributes) O[P] = Attributes.value;
+         return O;
+       };
+
+       var objectDefineProperty = {
+               f: f$2
+       };
+
+       var createNonEnumerableProperty = descriptors ? function (object, key, value) {
+         return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
+       } : function (object, key, value) {
+         object[key] = value;
+         return object;
+       };
+
+       var setGlobal = function (key, value) {
+         try {
+           createNonEnumerableProperty(global_1, key, value);
+         } catch (error) {
+           global_1[key] = value;
+         } return value;
+       };
+
+       var SHARED = '__core-js_shared__';
+       var store = global_1[SHARED] || setGlobal(SHARED, {});
+
+       var sharedStore = store;
+
+       var functionToString = Function.toString;
+
+       // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
+       if (typeof sharedStore.inspectSource != 'function') {
+         sharedStore.inspectSource = function (it) {
+           return functionToString.call(it);
+         };
+       }
+
+       var inspectSource = sharedStore.inspectSource;
+
+       var WeakMap = global_1.WeakMap;
+
+       var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
+
+       var shared = createCommonjsModule(function (module) {
+       (module.exports = function (key, value) {
+         return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
+       })('versions', []).push({
+         version: '3.6.5',
+         mode:  'global',
+         copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
+       });
+       });
+
+       var id = 0;
+       var postfix = Math.random();
+
+       var uid = function (key) {
+         return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
+       };
+
+       var keys = shared('keys');
+
+       var sharedKey = function (key) {
+         return keys[key] || (keys[key] = uid(key));
+       };
+
+       var hiddenKeys = {};
+
+       var WeakMap$1 = global_1.WeakMap;
+       var set, get, has$1;
+
+       var enforce = function (it) {
+         return has$1(it) ? get(it) : set(it, {});
+       };
+
+       var getterFor = function (TYPE) {
+         return function (it) {
+           var state;
+           if (!isObject(it) || (state = get(it)).type !== TYPE) {
+             throw TypeError('Incompatible receiver, ' + TYPE + ' required');
+           } return state;
+         };
+       };
+
+       if (nativeWeakMap) {
+         var store$1 = new WeakMap$1();
+         var wmget = store$1.get;
+         var wmhas = store$1.has;
+         var wmset = store$1.set;
+         set = function (it, metadata) {
+           wmset.call(store$1, it, metadata);
+           return metadata;
+         };
+         get = function (it) {
+           return wmget.call(store$1, it) || {};
+         };
+         has$1 = function (it) {
+           return wmhas.call(store$1, it);
+         };
+       } else {
+         var STATE = sharedKey('state');
+         hiddenKeys[STATE] = true;
+         set = function (it, metadata) {
+           createNonEnumerableProperty(it, STATE, metadata);
+           return metadata;
+         };
+         get = function (it) {
+           return has(it, STATE) ? it[STATE] : {};
+         };
+         has$1 = function (it) {
+           return has(it, STATE);
+         };
+       }
+
+       var internalState = {
+         set: set,
+         get: get,
+         has: has$1,
+         enforce: enforce,
+         getterFor: getterFor
+       };
+
+       var redefine = createCommonjsModule(function (module) {
+       var getInternalState = internalState.get;
+       var enforceInternalState = internalState.enforce;
+       var TEMPLATE = String(String).split('String');
+
+       (module.exports = function (O, key, value, options) {
+         var unsafe = options ? !!options.unsafe : false;
+         var simple = options ? !!options.enumerable : false;
+         var noTargetGet = options ? !!options.noTargetGet : false;
+         if (typeof value == 'function') {
+           if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
+           enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
+         }
+         if (O === global_1) {
+           if (simple) O[key] = value;
+           else setGlobal(key, value);
+           return;
+         } else if (!unsafe) {
+           delete O[key];
+         } else if (!noTargetGet && O[key]) {
+           simple = true;
+         }
+         if (simple) O[key] = value;
+         else createNonEnumerableProperty(O, key, value);
+       // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
+       })(Function.prototype, 'toString', function toString() {
+         return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
+       });
+       });
+
+       var path = global_1;
+
+       var aFunction = function (variable) {
+         return typeof variable == 'function' ? variable : undefined;
+       };
+
+       var getBuiltIn = function (namespace, method) {
+         return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
+           : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
+       };
+
+       var ceil = Math.ceil;
+       var floor = Math.floor;
+
+       // `ToInteger` abstract operation
+       // https://tc39.github.io/ecma262/#sec-tointeger
+       var toInteger = function (argument) {
+         return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
+       };
+
+       var min = Math.min;
+
+       // `ToLength` abstract operation
+       // https://tc39.github.io/ecma262/#sec-tolength
+       var toLength = function (argument) {
+         return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
+       };
+
+       var max = Math.max;
+       var min$1 = Math.min;
+
+       // Helper for a popular repeating case of the spec:
+       // Let integer be ? ToInteger(index).
+       // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
+       var toAbsoluteIndex = function (index, length) {
+         var integer = toInteger(index);
+         return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
+       };
+
+       // `Array.prototype.{ indexOf, includes }` methods implementation
+       var createMethod = function (IS_INCLUDES) {
+         return function ($this, el, fromIndex) {
+           var O = toIndexedObject($this);
+           var length = toLength(O.length);
+           var index = toAbsoluteIndex(fromIndex, length);
+           var value;
+           // Array#includes uses SameValueZero equality algorithm
+           // eslint-disable-next-line no-self-compare
+           if (IS_INCLUDES && el != el) while (length > index) {
+             value = O[index++];
+             // eslint-disable-next-line no-self-compare
+             if (value != value) return true;
+           // Array#indexOf ignores holes, Array#includes - not
+           } else for (;length > index; index++) {
+             if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
+           } return !IS_INCLUDES && -1;
+         };
+       };
+
+       var arrayIncludes = {
+         // `Array.prototype.includes` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.includes
+         includes: createMethod(true),
+         // `Array.prototype.indexOf` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
+         indexOf: createMethod(false)
+       };
+
+       var indexOf = arrayIncludes.indexOf;
+
+
+       var objectKeysInternal = function (object, names) {
+         var O = toIndexedObject(object);
+         var i = 0;
+         var result = [];
+         var key;
+         for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
+         // Don't enum bug & hidden keys
+         while (names.length > i) if (has(O, key = names[i++])) {
+           ~indexOf(result, key) || result.push(key);
+         }
+         return result;
+       };
+
+       // IE8- don't enum bug keys
+       var enumBugKeys = [
+         'constructor',
+         'hasOwnProperty',
+         'isPrototypeOf',
+         'propertyIsEnumerable',
+         'toLocaleString',
+         'toString',
+         'valueOf'
+       ];
+
+       var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
+
+       // `Object.getOwnPropertyNames` method
+       // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
+       var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
+         return objectKeysInternal(O, hiddenKeys$1);
+       };
+
+       var objectGetOwnPropertyNames = {
+               f: f$3
+       };
+
+       var f$4 = Object.getOwnPropertySymbols;
+
+       var objectGetOwnPropertySymbols = {
+               f: f$4
+       };
+
+       // all object keys, includes non-enumerable and symbols
+       var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
+         var keys = objectGetOwnPropertyNames.f(anObject(it));
+         var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
+         return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
+       };
+
+       var copyConstructorProperties = function (target, source) {
+         var keys = ownKeys(source);
+         var defineProperty = objectDefineProperty.f;
+         var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
+         for (var i = 0; i < keys.length; i++) {
+           var key = keys[i];
+           if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
+         }
+       };
+
+       var replacement = /#|\.prototype\./;
+
+       var isForced = function (feature, detection) {
+         var value = data[normalize(feature)];
+         return value == POLYFILL ? true
+           : value == NATIVE ? false
+           : typeof detection == 'function' ? fails(detection)
+           : !!detection;
+       };
+
+       var normalize = isForced.normalize = function (string) {
+         return String(string).replace(replacement, '.').toLowerCase();
+       };
+
+       var data = isForced.data = {};
+       var NATIVE = isForced.NATIVE = 'N';
+       var POLYFILL = isForced.POLYFILL = 'P';
+
+       var isForced_1 = isForced;
+
+       var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
+
+
+
+
+
+
+       /*
+         options.target      - name of the target object
+         options.global      - target is the global object
+         options.stat        - export as static methods of target
+         options.proto       - export as prototype methods of target
+         options.real        - real prototype method for the `pure` version
+         options.forced      - export even if the native feature is available
+         options.bind        - bind methods to the target, required for the `pure` version
+         options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
+         options.unsafe      - use the simple assignment of property instead of delete + defineProperty
+         options.sham        - add a flag to not completely full polyfills
+         options.enumerable  - export as enumerable property
+         options.noTargetGet - prevent calling a getter on target
+       */
+       var _export = function (options, source) {
+         var TARGET = options.target;
+         var GLOBAL = options.global;
+         var STATIC = options.stat;
+         var FORCED, target, key, targetProperty, sourceProperty, descriptor;
+         if (GLOBAL) {
+           target = global_1;
+         } else if (STATIC) {
+           target = global_1[TARGET] || setGlobal(TARGET, {});
+         } else {
+           target = (global_1[TARGET] || {}).prototype;
+         }
+         if (target) for (key in source) {
+           sourceProperty = source[key];
+           if (options.noTargetGet) {
+             descriptor = getOwnPropertyDescriptor$1(target, key);
+             targetProperty = descriptor && descriptor.value;
+           } else targetProperty = target[key];
+           FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
+           // contained in target
+           if (!FORCED && targetProperty !== undefined) {
+             if (typeof sourceProperty === typeof targetProperty) continue;
+             copyConstructorProperties(sourceProperty, targetProperty);
+           }
+           // add a flag to not completely full polyfills
+           if (options.sham || (targetProperty && targetProperty.sham)) {
+             createNonEnumerableProperty(sourceProperty, 'sham', true);
+           }
+           // extend global
+           redefine(target, key, sourceProperty, options);
+         }
+       };
+
+       var aFunction$1 = function (it) {
+         if (typeof it != 'function') {
+           throw TypeError(String(it) + ' is not a function');
+         } return it;
+       };
+
+       // optional / simple context binding
+       var functionBindContext = function (fn, that, length) {
+         aFunction$1(fn);
+         if (that === undefined) return fn;
+         switch (length) {
+           case 0: return function () {
+             return fn.call(that);
+           };
+           case 1: return function (a) {
+             return fn.call(that, a);
+           };
+           case 2: return function (a, b) {
+             return fn.call(that, a, b);
+           };
+           case 3: return function (a, b, c) {
+             return fn.call(that, a, b, c);
+           };
+         }
+         return function (/* ...args */) {
+           return fn.apply(that, arguments);
+         };
+       };
+
+       // `ToObject` abstract operation
+       // https://tc39.github.io/ecma262/#sec-toobject
+       var toObject = function (argument) {
+         return Object(requireObjectCoercible(argument));
+       };
+
+       // `IsArray` abstract operation
+       // https://tc39.github.io/ecma262/#sec-isarray
+       var isArray = Array.isArray || function isArray(arg) {
+         return classofRaw(arg) == 'Array';
+       };
+
+       var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
+         // Chrome 38 Symbol has incorrect toString conversion
+         // eslint-disable-next-line no-undef
+         return !String(Symbol());
+       });
+
+       var useSymbolAsUid = nativeSymbol
+         // eslint-disable-next-line no-undef
+         && !Symbol.sham
+         // eslint-disable-next-line no-undef
+         && typeof Symbol.iterator == 'symbol';
+
+       var WellKnownSymbolsStore = shared('wks');
+       var Symbol$1 = global_1.Symbol;
+       var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
+
+       var wellKnownSymbol = function (name) {
+         if (!has(WellKnownSymbolsStore, name)) {
+           if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
+           else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
+         } return WellKnownSymbolsStore[name];
+       };
+
+       var SPECIES = wellKnownSymbol('species');
+
+       // `ArraySpeciesCreate` abstract operation
+       // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
+       var arraySpeciesCreate = function (originalArray, length) {
+         var C;
+         if (isArray(originalArray)) {
+           C = originalArray.constructor;
+           // cross-realm fallback
+           if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
+           else if (isObject(C)) {
+             C = C[SPECIES];
+             if (C === null) C = undefined;
+           }
+         } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
+       };
+
+       var push = [].push;
+
+       // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
+       var createMethod$1 = function (TYPE) {
+         var IS_MAP = TYPE == 1;
+         var IS_FILTER = TYPE == 2;
+         var IS_SOME = TYPE == 3;
+         var IS_EVERY = TYPE == 4;
+         var IS_FIND_INDEX = TYPE == 6;
+         var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
+         return function ($this, callbackfn, that, specificCreate) {
+           var O = toObject($this);
+           var self = indexedObject(O);
+           var boundFunction = functionBindContext(callbackfn, that, 3);
+           var length = toLength(self.length);
+           var index = 0;
+           var create = specificCreate || arraySpeciesCreate;
+           var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
+           var value, result;
+           for (;length > index; index++) if (NO_HOLES || index in self) {
+             value = self[index];
+             result = boundFunction(value, index, O);
+             if (TYPE) {
+               if (IS_MAP) target[index] = result; // map
+               else if (result) switch (TYPE) {
+                 case 3: return true;              // some
+                 case 5: return value;             // find
+                 case 6: return index;             // findIndex
+                 case 2: push.call(target, value); // filter
+               } else if (IS_EVERY) return false;  // every
+             }
+           }
+           return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
+         };
+       };
+
+       var arrayIteration = {
+         // `Array.prototype.forEach` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
+         forEach: createMethod$1(0),
+         // `Array.prototype.map` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.map
+         map: createMethod$1(1),
+         // `Array.prototype.filter` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.filter
+         filter: createMethod$1(2),
+         // `Array.prototype.some` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.some
+         some: createMethod$1(3),
+         // `Array.prototype.every` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.every
+         every: createMethod$1(4),
+         // `Array.prototype.find` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.find
+         find: createMethod$1(5),
+         // `Array.prototype.findIndex` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
+         findIndex: createMethod$1(6)
+       };
+
+       var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
+
+       var process = global_1.process;
+       var versions = process && process.versions;
+       var v8 = versions && versions.v8;
+       var match, version;
+
+       if (v8) {
+         match = v8.split('.');
+         version = match[0] + match[1];
+       } else if (engineUserAgent) {
+         match = engineUserAgent.match(/Edge\/(\d+)/);
+         if (!match || match[1] >= 74) {
+           match = engineUserAgent.match(/Chrome\/(\d+)/);
+           if (match) version = match[1];
+         }
+       }
+
+       var engineV8Version = version && +version;
+
+       var SPECIES$1 = wellKnownSymbol('species');
+
+       var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
+         // We can't use this feature detection in V8 since it causes
+         // deoptimization and serious performance degradation
+         // https://github.com/zloirock/core-js/issues/677
+         return engineV8Version >= 51 || !fails(function () {
+           var array = [];
+           var constructor = array.constructor = {};
+           constructor[SPECIES$1] = function () {
+             return { foo: 1 };
+           };
+           return array[METHOD_NAME](Boolean).foo !== 1;
+         });
+       };
+
+       var defineProperty = Object.defineProperty;
+       var cache = {};
+
+       var thrower = function (it) { throw it; };
+
+       var arrayMethodUsesToLength = function (METHOD_NAME, options) {
+         if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
+         if (!options) options = {};
+         var method = [][METHOD_NAME];
+         var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
+         var argument0 = has(options, 0) ? options[0] : thrower;
+         var argument1 = has(options, 1) ? options[1] : undefined;
+
+         return cache[METHOD_NAME] = !!method && !fails(function () {
+           if (ACCESSORS && !descriptors) return true;
+           var O = { length: -1 };
+
+           if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
+           else O[1] = 1;
+
+           method.call(O, argument0, argument1);
+         });
+       };
+
+       var $filter = arrayIteration.filter;
+
+
+
+       var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
+       // Edge 14- issue
+       var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
+
+       // `Array.prototype.filter` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.filter
+       // with adding support of @@species
+       _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
+         filter: function filter(callbackfn /* , thisArg */) {
+           return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+         }
+       });
+
+       var arrayMethodIsStrict = function (METHOD_NAME, argument) {
+         var method = [][METHOD_NAME];
+         return !!method && fails(function () {
+           // eslint-disable-next-line no-useless-call,no-throw-literal
+           method.call(null, argument || function () { throw 1; }, 1);
+         });
+       };
+
+       var $forEach = arrayIteration.forEach;
+
+
+
+       var STRICT_METHOD = arrayMethodIsStrict('forEach');
+       var USES_TO_LENGTH$1 = arrayMethodUsesToLength('forEach');
+
+       // `Array.prototype.forEach` method implementation
+       // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
+       var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$1) ? function forEach(callbackfn /* , thisArg */) {
+         return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+       } : [].forEach;
+
+       // `Array.prototype.forEach` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
+       _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
+         forEach: arrayForEach
+       });
+
+       var $indexOf = arrayIncludes.indexOf;
+
+
+
+       var nativeIndexOf = [].indexOf;
+
+       var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
+       var STRICT_METHOD$1 = arrayMethodIsStrict('indexOf');
+       var USES_TO_LENGTH$2 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
+
+       // `Array.prototype.indexOf` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
+       _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 || !USES_TO_LENGTH$2 }, {
+         indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
+           return NEGATIVE_ZERO
+             // convert -0 to +0
+             ? nativeIndexOf.apply(this, arguments) || 0
+             : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
+         }
+       });
+
+       var createProperty = function (object, key, value) {
+         var propertyKey = toPrimitive(key);
+         if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
+         else object[propertyKey] = value;
+       };
+
+       var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('splice');
+       var USES_TO_LENGTH$3 = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
+
+       var max$1 = Math.max;
+       var min$2 = Math.min;
+       var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
+       var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
+
+       // `Array.prototype.splice` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.splice
+       // with adding support of @@species
+       _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3 }, {
+         splice: function splice(start, deleteCount /* , ...items */) {
+           var O = toObject(this);
+           var len = toLength(O.length);
+           var actualStart = toAbsoluteIndex(start, len);
+           var argumentsLength = arguments.length;
+           var insertCount, actualDeleteCount, A, k, from, to;
+           if (argumentsLength === 0) {
+             insertCount = actualDeleteCount = 0;
+           } else if (argumentsLength === 1) {
+             insertCount = 0;
+             actualDeleteCount = len - actualStart;
+           } else {
+             insertCount = argumentsLength - 2;
+             actualDeleteCount = min$2(max$1(toInteger(deleteCount), 0), len - actualStart);
+           }
+           if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
+             throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
+           }
+           A = arraySpeciesCreate(O, actualDeleteCount);
+           for (k = 0; k < actualDeleteCount; k++) {
+             from = actualStart + k;
+             if (from in O) createProperty(A, k, O[from]);
+           }
+           A.length = actualDeleteCount;
+           if (insertCount < actualDeleteCount) {
+             for (k = actualStart; k < len - actualDeleteCount; k++) {
+               from = k + actualDeleteCount;
+               to = k + insertCount;
+               if (from in O) O[to] = O[from];
+               else delete O[to];
+             }
+             for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
+           } else if (insertCount > actualDeleteCount) {
+             for (k = len - actualDeleteCount; k > actualStart; k--) {
+               from = k + actualDeleteCount - 1;
+               to = k + insertCount - 1;
+               if (from in O) O[to] = O[from];
+               else delete O[to];
+             }
+           }
+           for (k = 0; k < insertCount; k++) {
+             O[k + actualStart] = arguments[k + 2];
+           }
+           O.length = len - actualDeleteCount + insertCount;
+           return A;
+         }
+       });
+
+       // `Object.keys` method
+       // https://tc39.github.io/ecma262/#sec-object.keys
+       var objectKeys = Object.keys || function keys(O) {
+         return objectKeysInternal(O, enumBugKeys);
+       };
+
+       var nativeAssign = Object.assign;
+       var defineProperty$1 = Object.defineProperty;
+
+       // `Object.assign` method
+       // https://tc39.github.io/ecma262/#sec-object.assign
+       var objectAssign = !nativeAssign || fails(function () {
+         // should have correct order of operations (Edge bug)
+         if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', {
+           enumerable: true,
+           get: function () {
+             defineProperty$1(this, 'b', {
+               value: 3,
+               enumerable: false
+             });
+           }
+         }), { b: 2 })).b !== 1) return true;
+         // should work with symbols and should have deterministic property order (V8 bug)
+         var A = {};
+         var B = {};
+         // eslint-disable-next-line no-undef
+         var symbol = Symbol();
+         var alphabet = 'abcdefghijklmnopqrst';
+         A[symbol] = 7;
+         alphabet.split('').forEach(function (chr) { B[chr] = chr; });
+         return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
+       }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
+         var T = toObject(target);
+         var argumentsLength = arguments.length;
+         var index = 1;
+         var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
+         var propertyIsEnumerable = objectPropertyIsEnumerable.f;
+         while (argumentsLength > index) {
+           var S = indexedObject(arguments[index++]);
+           var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
+           var length = keys.length;
+           var j = 0;
+           var key;
+           while (length > j) {
+             key = keys[j++];
+             if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
+           }
+         } return T;
+       } : nativeAssign;
+
+       // `Object.assign` method
+       // https://tc39.github.io/ecma262/#sec-object.assign
+       _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
+         assign: objectAssign
+       });
+
+       var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
+
+       // `Object.keys` method
+       // https://tc39.github.io/ecma262/#sec-object.keys
+       _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
+         keys: function keys(it) {
+           return objectKeys(toObject(it));
+         }
+       });
+
+       // `RegExp.prototype.flags` getter implementation
+       // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
+       var regexpFlags = function () {
+         var that = anObject(this);
+         var result = '';
+         if (that.global) result += 'g';
+         if (that.ignoreCase) result += 'i';
+         if (that.multiline) result += 'm';
+         if (that.dotAll) result += 's';
+         if (that.unicode) result += 'u';
+         if (that.sticky) result += 'y';
+         return result;
+       };
+
+       // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
+       // so we use an intermediate function.
+       function RE(s, f) {
+         return RegExp(s, f);
+       }
+
+       var UNSUPPORTED_Y = fails(function () {
+         // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
+         var re = RE('a', 'y');
+         re.lastIndex = 2;
+         return re.exec('abcd') != null;
+       });
+
+       var BROKEN_CARET = fails(function () {
+         // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
+         var re = RE('^r', 'gy');
+         re.lastIndex = 2;
+         return re.exec('str') != null;
+       });
+
+       var regexpStickyHelpers = {
+               UNSUPPORTED_Y: UNSUPPORTED_Y,
+               BROKEN_CARET: BROKEN_CARET
+       };
+
+       var nativeExec = RegExp.prototype.exec;
+       // This always refers to the native implementation, because the
+       // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
+       // which loads this file before patching the method.
+       var nativeReplace = String.prototype.replace;
+
+       var patchedExec = nativeExec;
+
+       var UPDATES_LAST_INDEX_WRONG = (function () {
+         var re1 = /a/;
+         var re2 = /b*/g;
+         nativeExec.call(re1, 'a');
+         nativeExec.call(re2, 'a');
+         return re1.lastIndex !== 0 || re2.lastIndex !== 0;
+       })();
+
+       var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
+
+       // nonparticipating capturing group, copied from es5-shim's String#split patch.
+       var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
+
+       var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
+
+       if (PATCH) {
+         patchedExec = function exec(str) {
+           var re = this;
+           var lastIndex, reCopy, match, i;
+           var sticky = UNSUPPORTED_Y$1 && re.sticky;
+           var flags = regexpFlags.call(re);
+           var source = re.source;
+           var charsAdded = 0;
+           var strCopy = str;
+
+           if (sticky) {
+             flags = flags.replace('y', '');
+             if (flags.indexOf('g') === -1) {
+               flags += 'g';
+             }
+
+             strCopy = String(str).slice(re.lastIndex);
+             // Support anchored sticky behavior.
+             if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
+               source = '(?: ' + source + ')';
+               strCopy = ' ' + strCopy;
+               charsAdded++;
+             }
+             // ^(? + rx + ) is needed, in combination with some str slicing, to
+             // simulate the 'y' flag.
+             reCopy = new RegExp('^(?:' + source + ')', flags);
+           }
+
+           if (NPCG_INCLUDED) {
+             reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
+           }
+           if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
+
+           match = nativeExec.call(sticky ? reCopy : re, strCopy);
+
+           if (sticky) {
+             if (match) {
+               match.input = match.input.slice(charsAdded);
+               match[0] = match[0].slice(charsAdded);
+               match.index = re.lastIndex;
+               re.lastIndex += match[0].length;
+             } else re.lastIndex = 0;
+           } else if (UPDATES_LAST_INDEX_WRONG && match) {
+             re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
+           }
+           if (NPCG_INCLUDED && match && match.length > 1) {
+             // Fix browsers whose `exec` methods don't consistently return `undefined`
+             // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
+             nativeReplace.call(match[0], reCopy, function () {
+               for (i = 1; i < arguments.length - 2; i++) {
+                 if (arguments[i] === undefined) match[i] = undefined;
+               }
+             });
+           }
+
+           return match;
+         };
+       }
+
+       var regexpExec = patchedExec;
+
+       _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
+         exec: regexpExec
+       });
+
+       // TODO: Remove from `core-js@4` since it's moved to entry points
+
+
+
+
+
+
+
+       var SPECIES$2 = wellKnownSymbol('species');
+
+       var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
+         // #replace needs built-in support for named groups.
+         // #match works fine because it just return the exec results, even if it has
+         // a "grops" property.
+         var re = /./;
+         re.exec = function () {
+           var result = [];
+           result.groups = { a: '7' };
+           return result;
+         };
+         return ''.replace(re, '$<a>') !== '7';
+       });
+
+       // IE <= 11 replaces $0 with the whole match, as if it was $&
+       // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
+       var REPLACE_KEEPS_$0 = (function () {
+         return 'a'.replace(/./, '$0') === '$0';
+       })();
+
+       var REPLACE = wellKnownSymbol('replace');
+       // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
+       var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
+         if (/./[REPLACE]) {
+           return /./[REPLACE]('a', '$0') === '';
+         }
+         return false;
+       })();
+
+       // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
+       // Weex JS has frozen built-in prototypes, so use try / catch wrapper
+       var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
+         var re = /(?:)/;
+         var originalExec = re.exec;
+         re.exec = function () { return originalExec.apply(this, arguments); };
+         var result = 'ab'.split(re);
+         return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
+       });
+
+       var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
+         var SYMBOL = wellKnownSymbol(KEY);
+
+         var DELEGATES_TO_SYMBOL = !fails(function () {
+           // String methods call symbol-named RegEp methods
+           var O = {};
+           O[SYMBOL] = function () { return 7; };
+           return ''[KEY](O) != 7;
+         });
+
+         var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
+           // Symbol-named RegExp methods call .exec
+           var execCalled = false;
+           var re = /a/;
+
+           if (KEY === 'split') {
+             // We can't use real regex here since it causes deoptimization
+             // and serious performance degradation in V8
+             // https://github.com/zloirock/core-js/issues/306
+             re = {};
+             // RegExp[@@split] doesn't call the regex's exec method, but first creates
+             // a new one. We need to return the patched regex when creating the new one.
+             re.constructor = {};
+             re.constructor[SPECIES$2] = function () { return re; };
+             re.flags = '';
+             re[SYMBOL] = /./[SYMBOL];
+           }
+
+           re.exec = function () { execCalled = true; return null; };
+
+           re[SYMBOL]('');
+           return !execCalled;
+         });
+
+         if (
+           !DELEGATES_TO_SYMBOL ||
+           !DELEGATES_TO_EXEC ||
+           (KEY === 'replace' && !(
+             REPLACE_SUPPORTS_NAMED_GROUPS &&
+             REPLACE_KEEPS_$0 &&
+             !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
+           )) ||
+           (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
+         ) {
+           var nativeRegExpMethod = /./[SYMBOL];
+           var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
+             if (regexp.exec === regexpExec) {
+               if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
+                 // The native String method already delegates to @@method (this
+                 // polyfilled function), leasing to infinite recursion.
+                 // We avoid it by directly calling the native @@method method.
+                 return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
+               }
+               return { done: true, value: nativeMethod.call(str, regexp, arg2) };
+             }
+             return { done: false };
+           }, {
+             REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
+             REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
+           });
+           var stringMethod = methods[0];
+           var regexMethod = methods[1];
+
+           redefine(String.prototype, KEY, stringMethod);
+           redefine(RegExp.prototype, SYMBOL, length == 2
+             // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
+             // 21.2.5.11 RegExp.prototype[@@split](string, limit)
+             ? function (string, arg) { return regexMethod.call(string, this, arg); }
+             // 21.2.5.6 RegExp.prototype[@@match](string)
+             // 21.2.5.9 RegExp.prototype[@@search](string)
+             : function (string) { return regexMethod.call(string, this); }
+           );
+         }
+
+         if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
+       };
+
+       // `SameValue` abstract operation
+       // https://tc39.github.io/ecma262/#sec-samevalue
+       var sameValue = Object.is || function is(x, y) {
+         // eslint-disable-next-line no-self-compare
+         return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+       };
+
+       // `RegExpExec` abstract operation
+       // https://tc39.github.io/ecma262/#sec-regexpexec
+       var regexpExecAbstract = function (R, S) {
+         var exec = R.exec;
+         if (typeof exec === 'function') {
+           var result = exec.call(R, S);
+           if (typeof result !== 'object') {
+             throw TypeError('RegExp exec method returned something other than an Object or null');
+           }
+           return result;
+         }
+
+         if (classofRaw(R) !== 'RegExp') {
+           throw TypeError('RegExp#exec called on incompatible receiver');
+         }
+
+         return regexpExec.call(R, S);
+       };
+
+       // @@search logic
+       fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
+         return [
+           // `String.prototype.search` method
+           // https://tc39.github.io/ecma262/#sec-string.prototype.search
+           function search(regexp) {
+             var O = requireObjectCoercible(this);
+             var searcher = regexp == undefined ? undefined : regexp[SEARCH];
+             return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
+           },
+           // `RegExp.prototype[@@search]` method
+           // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
+           function (regexp) {
+             var res = maybeCallNative(nativeSearch, regexp, this);
+             if (res.done) return res.value;
+
+             var rx = anObject(regexp);
+             var S = String(this);
+
+             var previousLastIndex = rx.lastIndex;
+             if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
+             var result = regexpExecAbstract(rx, S);
+             if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
+             return result === null ? -1 : result.index;
+           }
+         ];
+       });
+
+       // iterable DOM collections
+       // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
+       var domIterables = {
+         CSSRuleList: 0,
+         CSSStyleDeclaration: 0,
+         CSSValueList: 0,
+         ClientRectList: 0,
+         DOMRectList: 0,
+         DOMStringList: 0,
+         DOMTokenList: 1,
+         DataTransferItemList: 0,
+         FileList: 0,
+         HTMLAllCollection: 0,
+         HTMLCollection: 0,
+         HTMLFormElement: 0,
+         HTMLSelectElement: 0,
+         MediaList: 0,
+         MimeTypeArray: 0,
+         NamedNodeMap: 0,
+         NodeList: 1,
+         PaintRequestList: 0,
+         Plugin: 0,
+         PluginArray: 0,
+         SVGLengthList: 0,
+         SVGNumberList: 0,
+         SVGPathSegList: 0,
+         SVGPointList: 0,
+         SVGStringList: 0,
+         SVGTransformList: 0,
+         SourceBufferList: 0,
+         StyleSheetList: 0,
+         TextTrackCueList: 0,
+         TextTrackList: 0,
+         TouchList: 0
+       };
+
+       for (var COLLECTION_NAME in domIterables) {
+         var Collection = global_1[COLLECTION_NAME];
+         var CollectionPrototype = Collection && Collection.prototype;
+         // some Chrome versions have non-configurable methods on DOMTokenList
+         if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
+           createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
+         } catch (error) {
+           CollectionPrototype.forEach = arrayForEach;
+         }
+       }
+
+       var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
+       var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
+       var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
+
+       // We can't use this feature detection in V8 since it causes
+       // deoptimization and serious performance degradation
+       // https://github.com/zloirock/core-js/issues/679
+       var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
+         var array = [];
+         array[IS_CONCAT_SPREADABLE] = false;
+         return array.concat()[0] !== array;
+       });
+
+       var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
+
+       var isConcatSpreadable = function (O) {
+         if (!isObject(O)) return false;
+         var spreadable = O[IS_CONCAT_SPREADABLE];
+         return spreadable !== undefined ? !!spreadable : isArray(O);
+       };
+
+       var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
+
+       // `Array.prototype.concat` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.concat
+       // with adding support of @@isConcatSpreadable and @@species
+       _export({ target: 'Array', proto: true, forced: FORCED }, {
+         concat: function concat(arg) { // eslint-disable-line no-unused-vars
+           var O = toObject(this);
+           var A = arraySpeciesCreate(O, 0);
+           var n = 0;
+           var i, k, length, len, E;
+           for (i = -1, length = arguments.length; i < length; i++) {
+             E = i === -1 ? O : arguments[i];
+             if (isConcatSpreadable(E)) {
+               len = toLength(E.length);
+               if (n + len > MAX_SAFE_INTEGER$1) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
+               for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
+             } else {
+               if (n >= MAX_SAFE_INTEGER$1) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
+               createProperty(A, n++, E);
+             }
+           }
+           A.length = n;
+           return A;
+         }
+       });
+
+       var global$1 = typeof global$2 !== "undefined" ? global$2 : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
+
+       var global$2 = typeof global$1 !== "undefined" ? global$1 : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
+
+       // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
+
+       function defaultSetTimout() {
+         throw new Error('setTimeout has not been defined');
+       }
+
+       function defaultClearTimeout() {
+         throw new Error('clearTimeout has not been defined');
+       }
+
+       var cachedSetTimeout = defaultSetTimout;
+       var cachedClearTimeout = defaultClearTimeout;
+
+       if (typeof global$2.setTimeout === 'function') {
+         cachedSetTimeout = setTimeout;
+       }
+
+       if (typeof global$2.clearTimeout === 'function') {
+         cachedClearTimeout = clearTimeout;
+       }
+
+       function runTimeout(fun) {
+         if (cachedSetTimeout === setTimeout) {
+           //normal enviroments in sane situations
+           return setTimeout(fun, 0);
+         } // if setTimeout wasn't available but was latter defined
+
+
+         if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+           cachedSetTimeout = setTimeout;
+           return setTimeout(fun, 0);
+         }
+
+         try {
+           // when when somebody has screwed with setTimeout but no I.E. maddness
+           return cachedSetTimeout(fun, 0);
+         } catch (e) {
+           try {
+             // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+             return cachedSetTimeout.call(null, fun, 0);
+           } catch (e) {
+             // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+             return cachedSetTimeout.call(this, fun, 0);
+           }
+         }
+       }
+
+       function runClearTimeout(marker) {
+         if (cachedClearTimeout === clearTimeout) {
+           //normal enviroments in sane situations
+           return clearTimeout(marker);
+         } // if clearTimeout wasn't available but was latter defined
+
+
+         if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+           cachedClearTimeout = clearTimeout;
+           return clearTimeout(marker);
+         }
+
+         try {
+           // when when somebody has screwed with setTimeout but no I.E. maddness
+           return cachedClearTimeout(marker);
+         } catch (e) {
+           try {
+             // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
+             return cachedClearTimeout.call(null, marker);
+           } catch (e) {
+             // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+             // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+             return cachedClearTimeout.call(this, marker);
+           }
+         }
+       }
+
+       var queue = [];
+       var draining = false;
+       var currentQueue;
+       var queueIndex = -1;
+
+       function cleanUpNextTick() {
+         if (!draining || !currentQueue) {
+           return;
+         }
+
+         draining = false;
+
+         if (currentQueue.length) {
+           queue = currentQueue.concat(queue);
+         } else {
+           queueIndex = -1;
+         }
+
+         if (queue.length) {
+           drainQueue();
+         }
+       }
+
+       function drainQueue() {
+         if (draining) {
+           return;
+         }
+
+         var timeout = runTimeout(cleanUpNextTick);
+         draining = true;
+         var len = queue.length;
+
+         while (len) {
+           currentQueue = queue;
+           queue = [];
+
+           while (++queueIndex < len) {
+             if (currentQueue) {
+               currentQueue[queueIndex].run();
+             }
+           }
+
+           queueIndex = -1;
+           len = queue.length;
+         }
+
+         currentQueue = null;
+         draining = false;
+         runClearTimeout(timeout);
+       }
+
+       function nextTick(fun) {
+         var args = new Array(arguments.length - 1);
+
+         if (arguments.length > 1) {
+           for (var i = 1; i < arguments.length; i++) {
+             args[i - 1] = arguments[i];
+           }
+         }
+
+         queue.push(new Item(fun, args));
+
+         if (queue.length === 1 && !draining) {
+           runTimeout(drainQueue);
+         }
+       } // v8 likes predictible objects
+
+       function Item(fun, array) {
+         this.fun = fun;
+         this.array = array;
+       }
+
+       Item.prototype.run = function () {
+         this.fun.apply(null, this.array);
+       };
+
+       var title = 'browser';
+       var platform = 'browser';
+       var browser = true;
+       var env = {};
+       var argv = [];
+       var version$1 = ''; // empty string to avoid regexp issues
+
+       var versions$1 = {};
+       var release = {};
+       var config = {};
+
+       function noop() {}
+
+       var on = noop;
+       var addListener = noop;
+       var once = noop;
+       var off = noop;
+       var removeListener = noop;
+       var removeAllListeners = noop;
+       var emit = noop;
+       function binding(name) {
+         throw new Error('process.binding is not supported');
+       }
+       function cwd() {
+         return '/';
+       }
+       function chdir(dir) {
+         throw new Error('process.chdir is not supported');
+       }
+       function umask() {
+         return 0;
+       } // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
+
+       var performance = global$2.performance || {};
+
+       var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function () {
+         return new Date().getTime();
+       }; // generate timestamp or delta
+       // see http://nodejs.org/api/process.html#process_process_hrtime
+
+
+       function hrtime(previousTimestamp) {
+         var clocktime = performanceNow.call(performance) * 1e-3;
+         var seconds = Math.floor(clocktime);
+         var nanoseconds = Math.floor(clocktime % 1 * 1e9);
+
+         if (previousTimestamp) {
+           seconds = seconds - previousTimestamp[0];
+           nanoseconds = nanoseconds - previousTimestamp[1];
+
+           if (nanoseconds < 0) {
+             seconds--;
+             nanoseconds += 1e9;
+           }
+         }
+
+         return [seconds, nanoseconds];
+       }
+       var startTime = new Date();
+       function uptime() {
+         var currentTime = new Date();
+         var dif = currentTime - startTime;
+         return dif / 1000;
+       }
+       var process$1 = {
+         nextTick: nextTick,
+         title: title,
+         browser: browser,
+         env: env,
+         argv: argv,
+         version: version$1,
+         versions: versions$1,
+         on: on,
+         addListener: addListener,
+         once: once,
+         off: off,
+         removeListener: removeListener,
+         removeAllListeners: removeAllListeners,
+         emit: emit,
+         binding: binding,
+         cwd: cwd,
+         chdir: chdir,
+         umask: umask,
+         hrtime: hrtime,
+         platform: platform,
+         release: release,
+         config: config,
+         uptime: uptime
+       };
+
+       var TO_STRING_TAG = wellKnownSymbol('toStringTag');
+       var test = {};
+
+       test[TO_STRING_TAG] = 'z';
+
+       var toStringTagSupport = String(test) === '[object z]';
+
+       var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
+       // ES3 wrong here
+       var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
+
+       // fallback for IE11 Script Access Denied error
+       var tryGet = function (it, key) {
+         try {
+           return it[key];
+         } catch (error) { /* empty */ }
+       };
+
+       // getting tag from ES6+ `Object.prototype.toString`
+       var classof = toStringTagSupport ? classofRaw : function (it) {
+         var O, tag, result;
+         return it === undefined ? 'Undefined' : it === null ? 'Null'
+           // @@toStringTag case
+           : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
+           // builtinTag case
+           : CORRECT_ARGUMENTS ? classofRaw(O)
+           // ES3 arguments fallback
+           : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
+       };
+
+       // `Object.prototype.toString` method implementation
+       // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
+       var objectToString = toStringTagSupport ? {}.toString : function toString() {
+         return '[object ' + classof(this) + ']';
+       };
+
+       // `Object.prototype.toString` method
+       // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
+       if (!toStringTagSupport) {
+         redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
+       }
+
+       var TO_STRING = 'toString';
+       var RegExpPrototype = RegExp.prototype;
+       var nativeToString = RegExpPrototype[TO_STRING];
+
+       var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
+       // FF44- RegExp#toString has a wrong name
+       var INCORRECT_NAME = nativeToString.name != TO_STRING;
+
+       // `RegExp.prototype.toString` method
+       // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
+       if (NOT_GENERIC || INCORRECT_NAME) {
+         redefine(RegExp.prototype, TO_STRING, function toString() {
+           var R = anObject(this);
+           var p = String(R.source);
+           var rf = R.flags;
+           var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
+           return '/' + p + '/' + f;
+         }, { unsafe: true });
+       }
+
+       var defineProperty$2 = objectDefineProperty.f;
+
+       var FunctionPrototype = Function.prototype;
+       var FunctionPrototypeToString = FunctionPrototype.toString;
+       var nameRE = /^\s*function ([^ (]*)/;
+       var NAME = 'name';
+
+       // Function instances `.name` property
+       // https://tc39.github.io/ecma262/#sec-function-instances-name
+       if (descriptors && !(NAME in FunctionPrototype)) {
+         defineProperty$2(FunctionPrototype, NAME, {
+           configurable: true,
+           get: function () {
+             try {
+               return FunctionPrototypeToString.call(this).match(nameRE)[1];
+             } catch (error) {
+               return '';
+             }
+           }
+         });
+       }
+
+       var correctPrototypeGetter = !fails(function () {
+         function F() { /* empty */ }
+         F.prototype.constructor = null;
+         return Object.getPrototypeOf(new F()) !== F.prototype;
+       });
+
+       var IE_PROTO = sharedKey('IE_PROTO');
+       var ObjectPrototype = Object.prototype;
+
+       // `Object.getPrototypeOf` method
+       // https://tc39.github.io/ecma262/#sec-object.getprototypeof
+       var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
+         O = toObject(O);
+         if (has(O, IE_PROTO)) return O[IE_PROTO];
+         if (typeof O.constructor == 'function' && O instanceof O.constructor) {
+           return O.constructor.prototype;
+         } return O instanceof Object ? ObjectPrototype : null;
+       };
+
+       var FAILS_ON_PRIMITIVES$1 = fails(function () { objectGetPrototypeOf(1); });
+
+       // `Object.getPrototypeOf` method
+       // https://tc39.github.io/ecma262/#sec-object.getprototypeof
+       _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$1, sham: !correctPrototypeGetter }, {
+         getPrototypeOf: function getPrototypeOf(it) {
+           return objectGetPrototypeOf(toObject(it));
+         }
+       });
+
+       // `Reflect.ownKeys` method
+       // https://tc39.github.io/ecma262/#sec-reflect.ownkeys
+       _export({ target: 'Reflect', stat: true }, {
+         ownKeys: ownKeys
+       });
+
+       var domain; // This constructor is used to store event handlers. Instantiating this is
+       // faster than explicitly calling `Object.create(null)` to get a "clean" empty
+       // object (tested with v8 v4.9).
+
+       function EventHandlers() {}
+
+       EventHandlers.prototype = Object.create(null);
+
+       function EventEmitter() {
+         EventEmitter.init.call(this);
+       }
+       // require('events') === require('events').EventEmitter
+
+       EventEmitter.EventEmitter = EventEmitter;
+       EventEmitter.usingDomains = false;
+       EventEmitter.prototype.domain = undefined;
+       EventEmitter.prototype._events = undefined;
+       EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are
+       // added to it. This is a useful default which helps finding memory leaks.
+
+       EventEmitter.defaultMaxListeners = 10;
+
+       EventEmitter.init = function () {
+         this.domain = null;
+
+         if (EventEmitter.usingDomains) {
+           // if there is an active domain, then attach to it.
+           if (domain.active ) ;
+         }
+
+         if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
+           this._events = new EventHandlers();
+           this._eventsCount = 0;
+         }
+
+         this._maxListeners = this._maxListeners || undefined;
+       }; // Obviously not all Emitters should be limited to 10. This function allows
+       // that to be increased. Set to zero for unlimited.
+
+
+       EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
+         if (typeof n !== 'number' || n < 0 || isNaN(n)) throw new TypeError('"n" argument must be a positive number');
+         this._maxListeners = n;
+         return this;
+       };
+
+       function $getMaxListeners(that) {
+         if (that._maxListeners === undefined) return EventEmitter.defaultMaxListeners;
+         return that._maxListeners;
+       }
+
+       EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
+         return $getMaxListeners(this);
+       }; // These standalone emit* functions are used to optimize calling of event
+       // handlers for fast cases because emit() itself often has a variable number of
+       // arguments and can be deoptimized because of that. These functions always have
+       // the same number of arguments and thus do not get deoptimized, so the code
+       // inside them can execute faster.
+
+
+       function emitNone(handler, isFn, self) {
+         if (isFn) handler.call(self);else {
+           var len = handler.length;
+           var listeners = arrayClone(handler, len);
+
+           for (var i = 0; i < len; ++i) {
+             listeners[i].call(self);
+           }
+         }
+       }
+
+       function emitOne(handler, isFn, self, arg1) {
+         if (isFn) handler.call(self, arg1);else {
+           var len = handler.length;
+           var listeners = arrayClone(handler, len);
+
+           for (var i = 0; i < len; ++i) {
+             listeners[i].call(self, arg1);
+           }
+         }
+       }
+
+       function emitTwo(handler, isFn, self, arg1, arg2) {
+         if (isFn) handler.call(self, arg1, arg2);else {
+           var len = handler.length;
+           var listeners = arrayClone(handler, len);
+
+           for (var i = 0; i < len; ++i) {
+             listeners[i].call(self, arg1, arg2);
+           }
+         }
+       }
+
+       function emitThree(handler, isFn, self, arg1, arg2, arg3) {
+         if (isFn) handler.call(self, arg1, arg2, arg3);else {
+           var len = handler.length;
+           var listeners = arrayClone(handler, len);
+
+           for (var i = 0; i < len; ++i) {
+             listeners[i].call(self, arg1, arg2, arg3);
+           }
+         }
+       }
+
+       function emitMany(handler, isFn, self, args) {
+         if (isFn) handler.apply(self, args);else {
+           var len = handler.length;
+           var listeners = arrayClone(handler, len);
+
+           for (var i = 0; i < len; ++i) {
+             listeners[i].apply(self, args);
+           }
+         }
+       }
+
+       EventEmitter.prototype.emit = function emit(type) {
+         var er, handler, len, args, i, events, domain;
+         var doError = type === 'error';
+         events = this._events;
+         if (events) doError = doError && events.error == null;else if (!doError) return false;
+         domain = this.domain; // If there is no 'error' event listener then throw.
+
+         if (doError) {
+           er = arguments[1];
+
+           if (domain) {
+             if (!er) er = new Error('Uncaught, unspecified "error" event');
+             er.domainEmitter = this;
+             er.domain = domain;
+             er.domainThrown = false;
+             domain.emit('error', er);
+           } else if (er instanceof Error) {
+             throw er; // Unhandled 'error' event
+           } else {
+             // At least give some kind of context to the user
+             var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
+             err.context = er;
+             throw err;
+           }
+
+           return false;
+         }
+
+         handler = events[type];
+         if (!handler) return false;
+         var isFn = typeof handler === 'function';
+         len = arguments.length;
+
+         switch (len) {
+           // fast cases
+           case 1:
+             emitNone(handler, isFn, this);
+             break;
+
+           case 2:
+             emitOne(handler, isFn, this, arguments[1]);
+             break;
+
+           case 3:
+             emitTwo(handler, isFn, this, arguments[1], arguments[2]);
+             break;
+
+           case 4:
+             emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);
+             break;
+           // slower
+
+           default:
+             args = new Array(len - 1);
+
+             for (i = 1; i < len; i++) {
+               args[i - 1] = arguments[i];
+             }
+
+             emitMany(handler, isFn, this, args);
+         }
+         return true;
+       };
+
+       function _addListener(target, type, listener, prepend) {
+         var m;
+         var events;
+         var existing;
+         if (typeof listener !== 'function') throw new TypeError('"listener" argument must be a function');
+         events = target._events;
+
+         if (!events) {
+           events = target._events = new EventHandlers();
+           target._eventsCount = 0;
+         } else {
+           // To avoid recursion in the case that type === "newListener"! Before
+           // adding it to the listeners, first emit "newListener".
+           if (events.newListener) {
+             target.emit('newListener', type, listener.listener ? listener.listener : listener); // Re-assign `events` because a newListener handler could have caused the
+             // this._events to be assigned to a new object
+
+             events = target._events;
+           }
+
+           existing = events[type];
+         }
+
+         if (!existing) {
+           // Optimize the case of one listener. Don't need the extra array object.
+           existing = events[type] = listener;
+           ++target._eventsCount;
+         } else {
+           if (typeof existing === 'function') {
+             // Adding the second element, need to change to array.
+             existing = events[type] = prepend ? [listener, existing] : [existing, listener];
+           } else {
+             // If we've already got an array, just append.
+             if (prepend) {
+               existing.unshift(listener);
+             } else {
+               existing.push(listener);
+             }
+           } // Check for listener leak
+
+
+           if (!existing.warned) {
+             m = $getMaxListeners(target);
+
+             if (m && m > 0 && existing.length > m) {
+               existing.warned = true;
+               var w = new Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + type + ' listeners added. ' + 'Use emitter.setMaxListeners() to increase limit');
+               w.name = 'MaxListenersExceededWarning';
+               w.emitter = target;
+               w.type = type;
+               w.count = existing.length;
+               emitWarning(w);
+             }
+           }
+         }
+
+         return target;
+       }
+
+       function emitWarning(e) {
+         typeof console.warn === 'function' ? console.warn(e) : console.log(e);
+       }
+
+       EventEmitter.prototype.addListener = function addListener(type, listener) {
+         return _addListener(this, type, listener, false);
+       };
+
+       EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+       EventEmitter.prototype.prependListener = function prependListener(type, listener) {
+         return _addListener(this, type, listener, true);
+       };
+
+       function _onceWrap(target, type, listener) {
+         var fired = false;
+
+         function g() {
+           target.removeListener(type, g);
+
+           if (!fired) {
+             fired = true;
+             listener.apply(target, arguments);
+           }
+         }
+
+         g.listener = listener;
+         return g;
+       }
+
+       EventEmitter.prototype.once = function once(type, listener) {
+         if (typeof listener !== 'function') throw new TypeError('"listener" argument must be a function');
+         this.on(type, _onceWrap(this, type, listener));
+         return this;
+       };
+
+       EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
+         if (typeof listener !== 'function') throw new TypeError('"listener" argument must be a function');
+         this.prependListener(type, _onceWrap(this, type, listener));
+         return this;
+       }; // emits a 'removeListener' event iff the listener was removed
+
+
+       EventEmitter.prototype.removeListener = function removeListener(type, listener) {
+         var list, events, position, i, originalListener;
+         if (typeof listener !== 'function') throw new TypeError('"listener" argument must be a function');
+         events = this._events;
+         if (!events) return this;
+         list = events[type];
+         if (!list) return this;
+
+         if (list === listener || list.listener && list.listener === listener) {
+           if (--this._eventsCount === 0) this._events = new EventHandlers();else {
+             delete events[type];
+             if (events.removeListener) this.emit('removeListener', type, list.listener || listener);
+           }
+         } else if (typeof list !== 'function') {
+           position = -1;
+
+           for (i = list.length; i-- > 0;) {
+             if (list[i] === listener || list[i].listener && list[i].listener === listener) {
+               originalListener = list[i].listener;
+               position = i;
+               break;
+             }
+           }
+
+           if (position < 0) return this;
+
+           if (list.length === 1) {
+             list[0] = undefined;
+
+             if (--this._eventsCount === 0) {
+               this._events = new EventHandlers();
+               return this;
+             } else {
+               delete events[type];
+             }
+           } else {
+             spliceOne(list, position);
+           }
+
+           if (events.removeListener) this.emit('removeListener', type, originalListener || listener);
+         }
+
+         return this;
+       };
+
+       EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
+         var listeners, events;
+         events = this._events;
+         if (!events) return this; // not listening for removeListener, no need to emit
+
+         if (!events.removeListener) {
+           if (arguments.length === 0) {
+             this._events = new EventHandlers();
+             this._eventsCount = 0;
+           } else if (events[type]) {
+             if (--this._eventsCount === 0) this._events = new EventHandlers();else delete events[type];
+           }
+
+           return this;
+         } // emit removeListener for all listeners on all events
+
+
+         if (arguments.length === 0) {
+           var keys = Object.keys(events);
+
+           for (var i = 0, key; i < keys.length; ++i) {
+             key = keys[i];
+             if (key === 'removeListener') continue;
+             this.removeAllListeners(key);
+           }
+
+           this.removeAllListeners('removeListener');
+           this._events = new EventHandlers();
+           this._eventsCount = 0;
+           return this;
+         }
+
+         listeners = events[type];
+
+         if (typeof listeners === 'function') {
+           this.removeListener(type, listeners);
+         } else if (listeners) {
+           // LIFO order
+           do {
+             this.removeListener(type, listeners[listeners.length - 1]);
+           } while (listeners[0]);
+         }
+
+         return this;
+       };
+
+       EventEmitter.prototype.listeners = function listeners(type) {
+         var evlistener;
+         var ret;
+         var events = this._events;
+         if (!events) ret = [];else {
+           evlistener = events[type];
+           if (!evlistener) ret = [];else if (typeof evlistener === 'function') ret = [evlistener.listener || evlistener];else ret = unwrapListeners(evlistener);
+         }
+         return ret;
+       };
+
+       EventEmitter.listenerCount = function (emitter, type) {
+         if (typeof emitter.listenerCount === 'function') {
+           return emitter.listenerCount(type);
+         } else {
+           return listenerCount.call(emitter, type);
+         }
+       };
+
+       EventEmitter.prototype.listenerCount = listenerCount;
+
+       function listenerCount(type) {
+         var events = this._events;
+
+         if (events) {
+           var evlistener = events[type];
+
+           if (typeof evlistener === 'function') {
+             return 1;
+           } else if (evlistener) {
+             return evlistener.length;
+           }
+         }
+
+         return 0;
+       }
+
+       EventEmitter.prototype.eventNames = function eventNames() {
+         return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
+       }; // About 1.5x faster than the two-arg version of Array#splice().
+
+
+       function spliceOne(list, index) {
+         for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
+           list[i] = list[k];
+         }
+
+         list.pop();
+       }
+
+       function arrayClone(arr, i) {
+         var copy = new Array(i);
+
+         while (i--) {
+           copy[i] = arr[i];
+         }
+
+         return copy;
+       }
+
+       function unwrapListeners(arr) {
+         var ret = new Array(arr.length);
+
+         for (var i = 0; i < ret.length; ++i) {
+           ret[i] = arr[i].listener || arr[i];
+         }
+
+         return ret;
+       }
+
+       var nativeJoin = [].join;
+
+       var ES3_STRINGS = indexedObject != Object;
+       var STRICT_METHOD$2 = arrayMethodIsStrict('join', ',');
+
+       // `Array.prototype.join` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.join
+       _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$2 }, {
+         join: function join(separator) {
+           return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
+         }
+       });
+
+       var $map = arrayIteration.map;
+
+
+
+       var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('map');
+       // FF49- issue
+       var USES_TO_LENGTH$4 = arrayMethodUsesToLength('map');
+
+       // `Array.prototype.map` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.map
+       // with adding support of @@species
+       _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$4 }, {
+         map: function map(callbackfn /* , thisArg */) {
+           return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+         }
+       });
+
+       // `Array.prototype.{ reduce, reduceRight }` methods implementation
+       var createMethod$2 = function (IS_RIGHT) {
+         return function (that, callbackfn, argumentsLength, memo) {
+           aFunction$1(callbackfn);
+           var O = toObject(that);
+           var self = indexedObject(O);
+           var length = toLength(O.length);
+           var index = IS_RIGHT ? length - 1 : 0;
+           var i = IS_RIGHT ? -1 : 1;
+           if (argumentsLength < 2) while (true) {
+             if (index in self) {
+               memo = self[index];
+               index += i;
+               break;
+             }
+             index += i;
+             if (IS_RIGHT ? index < 0 : length <= index) {
+               throw TypeError('Reduce of empty array with no initial value');
+             }
+           }
+           for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
+             memo = callbackfn(memo, self[index], index, O);
+           }
+           return memo;
+         };
+       };
+
+       var arrayReduce = {
+         // `Array.prototype.reduce` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
+         left: createMethod$2(false),
+         // `Array.prototype.reduceRight` method
+         // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
+         right: createMethod$2(true)
+       };
+
+       var $reduce = arrayReduce.left;
+
+
+
+       var STRICT_METHOD$3 = arrayMethodIsStrict('reduce');
+       var USES_TO_LENGTH$5 = arrayMethodUsesToLength('reduce', { 1: 0 });
+
+       // `Array.prototype.reduce` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
+       _export({ target: 'Array', proto: true, forced: !STRICT_METHOD$3 || !USES_TO_LENGTH$5 }, {
+         reduce: function reduce(callbackfn /* , initialValue */) {
+           return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
+         }
+       });
+
+       var aPossiblePrototype = function (it) {
+         if (!isObject(it) && it !== null) {
+           throw TypeError("Can't set " + String(it) + ' as a prototype');
+         } return it;
+       };
+
+       // `Object.setPrototypeOf` method
+       // https://tc39.github.io/ecma262/#sec-object.setprototypeof
+       // Works with __proto__ only. Old v8 can't work with null proto objects.
+       /* eslint-disable no-proto */
+       var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
+         var CORRECT_SETTER = false;
+         var test = {};
+         var setter;
+         try {
+           setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
+           setter.call(test, []);
+           CORRECT_SETTER = test instanceof Array;
+         } catch (error) { /* empty */ }
+         return function setPrototypeOf(O, proto) {
+           anObject(O);
+           aPossiblePrototype(proto);
+           if (CORRECT_SETTER) setter.call(O, proto);
+           else O.__proto__ = proto;
+           return O;
+         };
+       }() : undefined);
+
+       // makes subclassing work correct for wrapped built-ins
+       var inheritIfRequired = function ($this, dummy, Wrapper) {
+         var NewTarget, NewTargetPrototype;
+         if (
+           // it can work only with native `setPrototypeOf`
+           objectSetPrototypeOf &&
+           // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
+           typeof (NewTarget = dummy.constructor) == 'function' &&
+           NewTarget !== Wrapper &&
+           isObject(NewTargetPrototype = NewTarget.prototype) &&
+           NewTargetPrototype !== Wrapper.prototype
+         ) objectSetPrototypeOf($this, NewTargetPrototype);
+         return $this;
+       };
+
+       // `Object.defineProperties` method
+       // https://tc39.github.io/ecma262/#sec-object.defineproperties
+       var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
+         anObject(O);
+         var keys = objectKeys(Properties);
+         var length = keys.length;
+         var index = 0;
+         var key;
+         while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
+         return O;
+       };
+
+       var html = getBuiltIn('document', 'documentElement');
+
+       var GT = '>';
+       var LT = '<';
+       var PROTOTYPE = 'prototype';
+       var SCRIPT = 'script';
+       var IE_PROTO$1 = sharedKey('IE_PROTO');
+
+       var EmptyConstructor = function () { /* empty */ };
+
+       var scriptTag = function (content) {
+         return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
+       };
+
+       // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
+       var NullProtoObjectViaActiveX = function (activeXDocument) {
+         activeXDocument.write(scriptTag(''));
+         activeXDocument.close();
+         var temp = activeXDocument.parentWindow.Object;
+         activeXDocument = null; // avoid memory leak
+         return temp;
+       };
+
+       // Create object with fake `null` prototype: use iframe Object with cleared prototype
+       var NullProtoObjectViaIFrame = function () {
+         // Thrash, waste and sodomy: IE GC bug
+         var iframe = documentCreateElement('iframe');
+         var JS = 'java' + SCRIPT + ':';
+         var iframeDocument;
+         iframe.style.display = 'none';
+         html.appendChild(iframe);
+         // https://github.com/zloirock/core-js/issues/475
+         iframe.src = String(JS);
+         iframeDocument = iframe.contentWindow.document;
+         iframeDocument.open();
+         iframeDocument.write(scriptTag('document.F=Object'));
+         iframeDocument.close();
+         return iframeDocument.F;
+       };
+
+       // Check for document.domain and active x support
+       // No need to use active x approach when document.domain is not set
+       // see https://github.com/es-shims/es5-shim/issues/150
+       // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
+       // avoid IE GC bug
+       var activeXDocument;
+       var NullProtoObject = function () {
+         try {
+           /* global ActiveXObject */
+           activeXDocument = document.domain && new ActiveXObject('htmlfile');
+         } catch (error) { /* ignore */ }
+         NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
+         var length = enumBugKeys.length;
+         while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
+         return NullProtoObject();
+       };
+
+       hiddenKeys[IE_PROTO$1] = true;
+
+       // `Object.create` method
+       // https://tc39.github.io/ecma262/#sec-object.create
+       var objectCreate = Object.create || function create(O, Properties) {
+         var result;
+         if (O !== null) {
+           EmptyConstructor[PROTOTYPE] = anObject(O);
+           result = new EmptyConstructor();
+           EmptyConstructor[PROTOTYPE] = null;
+           // add "__proto__" for Object.getPrototypeOf polyfill
+           result[IE_PROTO$1] = O;
+         } else result = NullProtoObject();
+         return Properties === undefined ? result : objectDefineProperties(result, Properties);
+       };
+
+       // a string of all valid unicode whitespaces
+       // eslint-disable-next-line max-len
+       var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
+
+       var whitespace = '[' + whitespaces + ']';
+       var ltrim = RegExp('^' + whitespace + whitespace + '*');
+       var rtrim = RegExp(whitespace + whitespace + '*$');
+
+       // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
+       var createMethod$3 = function (TYPE) {
+         return function ($this) {
+           var string = String(requireObjectCoercible($this));
+           if (TYPE & 1) string = string.replace(ltrim, '');
+           if (TYPE & 2) string = string.replace(rtrim, '');
+           return string;
+         };
+       };
+
+       var stringTrim = {
+         // `String.prototype.{ trimLeft, trimStart }` methods
+         // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
+         start: createMethod$3(1),
+         // `String.prototype.{ trimRight, trimEnd }` methods
+         // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
+         end: createMethod$3(2),
+         // `String.prototype.trim` method
+         // https://tc39.github.io/ecma262/#sec-string.prototype.trim
+         trim: createMethod$3(3)
+       };
+
+       var getOwnPropertyNames = objectGetOwnPropertyNames.f;
+       var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
+       var defineProperty$3 = objectDefineProperty.f;
+       var trim = stringTrim.trim;
+
+       var NUMBER = 'Number';
+       var NativeNumber = global_1[NUMBER];
+       var NumberPrototype = NativeNumber.prototype;
+
+       // Opera ~12 has broken Object#toString
+       var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER;
+
+       // `ToNumber` abstract operation
+       // https://tc39.github.io/ecma262/#sec-tonumber
+       var toNumber = function (argument) {
+         var it = toPrimitive(argument, false);
+         var first, third, radix, maxCode, digits, length, index, code;
+         if (typeof it == 'string' && it.length > 2) {
+           it = trim(it);
+           first = it.charCodeAt(0);
+           if (first === 43 || first === 45) {
+             third = it.charCodeAt(2);
+             if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
+           } else if (first === 48) {
+             switch (it.charCodeAt(1)) {
+               case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
+               case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
+               default: return +it;
+             }
+             digits = it.slice(2);
+             length = digits.length;
+             for (index = 0; index < length; index++) {
+               code = digits.charCodeAt(index);
+               // parseInt parses a string to a first unavailable symbol
+               // but ToNumber should return NaN if a string contains unavailable symbols
+               if (code < 48 || code > maxCode) return NaN;
+             } return parseInt(digits, radix);
+           }
+         } return +it;
+       };
+
+       // `Number` constructor
+       // https://tc39.github.io/ecma262/#sec-number-constructor
+       if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
+         var NumberWrapper = function Number(value) {
+           var it = arguments.length < 1 ? 0 : value;
+           var dummy = this;
+           return dummy instanceof NumberWrapper
+             // check on 1..constructor(foo) case
+             && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classofRaw(dummy) != NUMBER)
+               ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
+         };
+         for (var keys$1 = descriptors ? getOwnPropertyNames(NativeNumber) : (
+           // ES3:
+           'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
+           // ES2015 (in case, if modules with ES2015 Number statics required before):
+           'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
+           'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
+         ).split(','), j = 0, key; keys$1.length > j; j++) {
+           if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) {
+             defineProperty$3(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key));
+           }
+         }
+         NumberWrapper.prototype = NumberPrototype;
+         NumberPrototype.constructor = NumberWrapper;
+         redefine(global_1, NUMBER, NumberWrapper);
+       }
+
+       var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
+
+
+       var FAILS_ON_PRIMITIVES$2 = fails(function () { nativeGetOwnPropertyDescriptor$1(1); });
+       var FORCED$1 = !descriptors || FAILS_ON_PRIMITIVES$2;
+
+       // `Object.getOwnPropertyDescriptor` method
+       // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
+       _export({ target: 'Object', stat: true, forced: FORCED$1, sham: !descriptors }, {
+         getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
+           return nativeGetOwnPropertyDescriptor$1(toIndexedObject(it), key);
+         }
+       });
+
+       var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
+
+       var toString$1 = {}.toString;
+
+       var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
+         ? Object.getOwnPropertyNames(window) : [];
+
+       var getWindowNames = function (it) {
+         try {
+           return nativeGetOwnPropertyNames(it);
+         } catch (error) {
+           return windowNames.slice();
+         }
+       };
+
+       // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+       var f$5 = function getOwnPropertyNames(it) {
+         return windowNames && toString$1.call(it) == '[object Window]'
+           ? getWindowNames(it)
+           : nativeGetOwnPropertyNames(toIndexedObject(it));
+       };
+
+       var objectGetOwnPropertyNamesExternal = {
+               f: f$5
+       };
+
+       var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
+
+       var FAILS_ON_PRIMITIVES$3 = fails(function () { return !Object.getOwnPropertyNames(1); });
+
+       // `Object.getOwnPropertyNames` method
+       // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
+       _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3 }, {
+         getOwnPropertyNames: nativeGetOwnPropertyNames$1
+       });
+
+       var MATCH = wellKnownSymbol('match');
+
+       // `IsRegExp` abstract operation
+       // https://tc39.github.io/ecma262/#sec-isregexp
+       var isRegexp = function (it) {
+         var isRegExp;
+         return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
+       };
+
+       var SPECIES$3 = wellKnownSymbol('species');
+
+       var setSpecies = function (CONSTRUCTOR_NAME) {
+         var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
+         var defineProperty = objectDefineProperty.f;
+
+         if (descriptors && Constructor && !Constructor[SPECIES$3]) {
+           defineProperty(Constructor, SPECIES$3, {
+             configurable: true,
+             get: function () { return this; }
+           });
+         }
+       };
+
+       var defineProperty$4 = objectDefineProperty.f;
+       var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;
+
+
+
+
+
+       var setInternalState = internalState.set;
+
+
+
+       var MATCH$1 = wellKnownSymbol('match');
+       var NativeRegExp = global_1.RegExp;
+       var RegExpPrototype$1 = NativeRegExp.prototype;
+       var re1 = /a/g;
+       var re2 = /a/g;
+
+       // "new" should create a new object, old webkit bug
+       var CORRECT_NEW = new NativeRegExp(re1) !== re1;
+
+       var UNSUPPORTED_Y$2 = regexpStickyHelpers.UNSUPPORTED_Y;
+
+       var FORCED$2 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y$2 || fails(function () {
+         re2[MATCH$1] = false;
+         // RegExp constructor can alter flags and IsRegExp works correct with @@match
+         return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
+       })));
+
+       // `RegExp` constructor
+       // https://tc39.github.io/ecma262/#sec-regexp-constructor
+       if (FORCED$2) {
+         var RegExpWrapper = function RegExp(pattern, flags) {
+           var thisIsRegExp = this instanceof RegExpWrapper;
+           var patternIsRegExp = isRegexp(pattern);
+           var flagsAreUndefined = flags === undefined;
+           var sticky;
+
+           if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {
+             return pattern;
+           }
+
+           if (CORRECT_NEW) {
+             if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;
+           } else if (pattern instanceof RegExpWrapper) {
+             if (flagsAreUndefined) flags = regexpFlags.call(pattern);
+             pattern = pattern.source;
+           }
+
+           if (UNSUPPORTED_Y$2) {
+             sticky = !!flags && flags.indexOf('y') > -1;
+             if (sticky) flags = flags.replace(/y/g, '');
+           }
+
+           var result = inheritIfRequired(
+             CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),
+             thisIsRegExp ? this : RegExpPrototype$1,
+             RegExpWrapper
+           );
+
+           if (UNSUPPORTED_Y$2 && sticky) setInternalState(result, { sticky: sticky });
+
+           return result;
+         };
+         var proxy = function (key) {
+           key in RegExpWrapper || defineProperty$4(RegExpWrapper, key, {
+             configurable: true,
+             get: function () { return NativeRegExp[key]; },
+             set: function (it) { NativeRegExp[key] = it; }
+           });
+         };
+         var keys$2 = getOwnPropertyNames$1(NativeRegExp);
+         var index = 0;
+         while (keys$2.length > index) proxy(keys$2[index++]);
+         RegExpPrototype$1.constructor = RegExpWrapper;
+         RegExpWrapper.prototype = RegExpPrototype$1;
+         redefine(global_1, 'RegExp', RegExpWrapper);
+       }
+
+       // https://tc39.github.io/ecma262/#sec-get-regexp-@@species
+       setSpecies('RegExp');
+
+       // `String.prototype.{ codePointAt, at }` methods implementation
+       var createMethod$4 = function (CONVERT_TO_STRING) {
+         return function ($this, pos) {
+           var S = String(requireObjectCoercible($this));
+           var position = toInteger(pos);
+           var size = S.length;
+           var first, second;
+           if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
+           first = S.charCodeAt(position);
+           return first < 0xD800 || first > 0xDBFF || position + 1 === size
+             || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
+               ? CONVERT_TO_STRING ? S.charAt(position) : first
+               : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
+         };
+       };
+
+       var stringMultibyte = {
+         // `String.prototype.codePointAt` method
+         // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
+         codeAt: createMethod$4(false),
+         // `String.prototype.at` method
+         // https://github.com/mathiasbynens/String.prototype.at
+         charAt: createMethod$4(true)
+       };
+
+       var charAt = stringMultibyte.charAt;
+
+       // `AdvanceStringIndex` abstract operation
+       // https://tc39.github.io/ecma262/#sec-advancestringindex
+       var advanceStringIndex = function (S, index, unicode) {
+         return index + (unicode ? charAt(S, index).length : 1);
+       };
+
+       // @@match logic
+       fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
+         return [
+           // `String.prototype.match` method
+           // https://tc39.github.io/ecma262/#sec-string.prototype.match
+           function match(regexp) {
+             var O = requireObjectCoercible(this);
+             var matcher = regexp == undefined ? undefined : regexp[MATCH];
+             return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
+           },
+           // `RegExp.prototype[@@match]` method
+           // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
+           function (regexp) {
+             var res = maybeCallNative(nativeMatch, regexp, this);
+             if (res.done) return res.value;
+
+             var rx = anObject(regexp);
+             var S = String(this);
+
+             if (!rx.global) return regexpExecAbstract(rx, S);
+
+             var fullUnicode = rx.unicode;
+             rx.lastIndex = 0;
+             var A = [];
+             var n = 0;
+             var result;
+             while ((result = regexpExecAbstract(rx, S)) !== null) {
+               var matchStr = String(result[0]);
+               A[n] = matchStr;
+               if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
+               n++;
+             }
+             return n === 0 ? null : A;
+           }
+         ];
+       });
+
+       var max$2 = Math.max;
+       var min$3 = Math.min;
+       var floor$1 = Math.floor;
+       var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
+       var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
+
+       var maybeToString = function (it) {
+         return it === undefined ? it : String(it);
+       };
+
+       // @@replace logic
+       fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
+         var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
+         var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
+         var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
+
+         return [
+           // `String.prototype.replace` method
+           // https://tc39.github.io/ecma262/#sec-string.prototype.replace
+           function replace(searchValue, replaceValue) {
+             var O = requireObjectCoercible(this);
+             var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
+             return replacer !== undefined
+               ? replacer.call(searchValue, O, replaceValue)
+               : nativeReplace.call(String(O), searchValue, replaceValue);
+           },
+           // `RegExp.prototype[@@replace]` method
+           // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
+           function (regexp, replaceValue) {
+             if (
+               (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
+               (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
+             ) {
+               var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
+               if (res.done) return res.value;
+             }
+
+             var rx = anObject(regexp);
+             var S = String(this);
+
+             var functionalReplace = typeof replaceValue === 'function';
+             if (!functionalReplace) replaceValue = String(replaceValue);
+
+             var global = rx.global;
+             if (global) {
+               var fullUnicode = rx.unicode;
+               rx.lastIndex = 0;
+             }
+             var results = [];
+             while (true) {
+               var result = regexpExecAbstract(rx, S);
+               if (result === null) break;
+
+               results.push(result);
+               if (!global) break;
+
+               var matchStr = String(result[0]);
+               if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
+             }
+
+             var accumulatedResult = '';
+             var nextSourcePosition = 0;
+             for (var i = 0; i < results.length; i++) {
+               result = results[i];
+
+               var matched = String(result[0]);
+               var position = max$2(min$3(toInteger(result.index), S.length), 0);
+               var captures = [];
+               // NOTE: This is equivalent to
+               //   captures = result.slice(1).map(maybeToString)
+               // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
+               // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
+               // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
+               for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
+               var namedCaptures = result.groups;
+               if (functionalReplace) {
+                 var replacerArgs = [matched].concat(captures, position, S);
+                 if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
+                 var replacement = String(replaceValue.apply(undefined, replacerArgs));
+               } else {
+                 replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
+               }
+               if (position >= nextSourcePosition) {
+                 accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
+                 nextSourcePosition = position + matched.length;
+               }
+             }
+             return accumulatedResult + S.slice(nextSourcePosition);
+           }
+         ];
+
+         // https://tc39.github.io/ecma262/#sec-getsubstitution
+         function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
+           var tailPos = position + matched.length;
+           var m = captures.length;
+           var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
+           if (namedCaptures !== undefined) {
+             namedCaptures = toObject(namedCaptures);
+             symbols = SUBSTITUTION_SYMBOLS;
+           }
+           return nativeReplace.call(replacement, symbols, function (match, ch) {
+             var capture;
+             switch (ch.charAt(0)) {
+               case '$': return '$';
+               case '&': return matched;
+               case '`': return str.slice(0, position);
+               case "'": return str.slice(tailPos);
+               case '<':
+                 capture = namedCaptures[ch.slice(1, -1)];
+                 break;
+               default: // \d\d?
+                 var n = +ch;
+                 if (n === 0) return match;
+                 if (n > m) {
+                   var f = floor$1(n / 10);
+                   if (f === 0) return match;
+                   if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
+                   return match;
+                 }
+                 capture = captures[n - 1];
+             }
+             return capture === undefined ? '' : capture;
+           });
+         }
+       });
+
+       var SPECIES$4 = wellKnownSymbol('species');
+
+       // `SpeciesConstructor` abstract operation
+       // https://tc39.github.io/ecma262/#sec-speciesconstructor
+       var speciesConstructor = function (O, defaultConstructor) {
+         var C = anObject(O).constructor;
+         var S;
+         return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction$1(S);
+       };
+
+       var arrayPush = [].push;
+       var min$4 = Math.min;
+       var MAX_UINT32 = 0xFFFFFFFF;
+
+       // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
+       var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
+
+       // @@split logic
+       fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
+         var internalSplit;
+         if (
+           'abbc'.split(/(b)*/)[1] == 'c' ||
+           'test'.split(/(?:)/, -1).length != 4 ||
+           'ab'.split(/(?:ab)*/).length != 2 ||
+           '.'.split(/(.?)(.?)/).length != 4 ||
+           '.'.split(/()()/).length > 1 ||
+           ''.split(/.?/).length
+         ) {
+           // based on es5-shim implementation, need to rework it
+           internalSplit = function (separator, limit) {
+             var string = String(requireObjectCoercible(this));
+             var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
+             if (lim === 0) return [];
+             if (separator === undefined) return [string];
+             // If `separator` is not a regex, use native split
+             if (!isRegexp(separator)) {
+               return nativeSplit.call(string, separator, lim);
+             }
+             var output = [];
+             var flags = (separator.ignoreCase ? 'i' : '') +
+                         (separator.multiline ? 'm' : '') +
+                         (separator.unicode ? 'u' : '') +
+                         (separator.sticky ? 'y' : '');
+             var lastLastIndex = 0;
+             // Make `global` and avoid `lastIndex` issues by working with a copy
+             var separatorCopy = new RegExp(separator.source, flags + 'g');
+             var match, lastIndex, lastLength;
+             while (match = regexpExec.call(separatorCopy, string)) {
+               lastIndex = separatorCopy.lastIndex;
+               if (lastIndex > lastLastIndex) {
+                 output.push(string.slice(lastLastIndex, match.index));
+                 if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
+                 lastLength = match[0].length;
+                 lastLastIndex = lastIndex;
+                 if (output.length >= lim) break;
+               }
+               if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
+             }
+             if (lastLastIndex === string.length) {
+               if (lastLength || !separatorCopy.test('')) output.push('');
+             } else output.push(string.slice(lastLastIndex));
+             return output.length > lim ? output.slice(0, lim) : output;
+           };
+         // Chakra, V8
+         } else if ('0'.split(undefined, 0).length) {
+           internalSplit = function (separator, limit) {
+             return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
+           };
+         } else internalSplit = nativeSplit;
+
+         return [
+           // `String.prototype.split` method
+           // https://tc39.github.io/ecma262/#sec-string.prototype.split
+           function split(separator, limit) {
+             var O = requireObjectCoercible(this);
+             var splitter = separator == undefined ? undefined : separator[SPLIT];
+             return splitter !== undefined
+               ? splitter.call(separator, O, limit)
+               : internalSplit.call(String(O), separator, limit);
+           },
+           // `RegExp.prototype[@@split]` method
+           // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
+           //
+           // NOTE: This cannot be properly polyfilled in engines that don't support
+           // the 'y' flag.
+           function (regexp, limit) {
+             var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
+             if (res.done) return res.value;
+
+             var rx = anObject(regexp);
+             var S = String(this);
+             var C = speciesConstructor(rx, RegExp);
+
+             var unicodeMatching = rx.unicode;
+             var flags = (rx.ignoreCase ? 'i' : '') +
+                         (rx.multiline ? 'm' : '') +
+                         (rx.unicode ? 'u' : '') +
+                         (SUPPORTS_Y ? 'y' : 'g');
+
+             // ^(? + rx + ) is needed, in combination with some S slicing, to
+             // simulate the 'y' flag.
+             var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
+             var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
+             if (lim === 0) return [];
+             if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
+             var p = 0;
+             var q = 0;
+             var A = [];
+             while (q < S.length) {
+               splitter.lastIndex = SUPPORTS_Y ? q : 0;
+               var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));
+               var e;
+               if (
+                 z === null ||
+                 (e = min$4(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
+               ) {
+                 q = advanceStringIndex(S, q, unicodeMatching);
+               } else {
+                 A.push(S.slice(p, q));
+                 if (A.length === lim) return A;
+                 for (var i = 1; i <= z.length - 1; i++) {
+                   A.push(z[i]);
+                   if (A.length === lim) return A;
+                 }
+                 q = p = e;
+               }
+             }
+             A.push(S.slice(p));
+             return A;
+           }
+         ];
+       }, !SUPPORTS_Y);
+
+       function _typeof(obj) {
+         "@babel/helpers - typeof";
+
+         if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
+           _typeof = function (obj) {
+             return typeof obj;
+           };
+         } else {
+           _typeof = function (obj) {
+             return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+           };
+         }
+
+         return _typeof(obj);
+       }
+
+       function _asyncIterator(iterable) {
+         var method;
+
+         if (typeof Symbol !== "undefined") {
+           if (Symbol.asyncIterator) {
+             method = iterable[Symbol.asyncIterator];
+             if (method != null) return method.call(iterable);
+           }
+
+           if (Symbol.iterator) {
+             method = iterable[Symbol.iterator];
+             if (method != null) return method.call(iterable);
+           }
+         }
+
+         throw new TypeError("Object is not async iterable");
+       }
+
+       function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+         try {
+           var info = gen[key](arg);
+           var value = info.value;
+         } catch (error) {
+           reject(error);
+           return;
+         }
+
+         if (info.done) {
+           resolve(value);
+         } else {
+           Promise.resolve(value).then(_next, _throw);
+         }
+       }
+
+       function _asyncToGenerator(fn) {
+         return function () {
+           var self = this,
+               args = arguments;
+           return new Promise(function (resolve, reject) {
+             var gen = fn.apply(self, args);
+
+             function _next(value) {
+               asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+             }
+
+             function _throw(err) {
+               asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+             }
+
+             _next(undefined);
+           });
+         };
+       }
+
+       function _classCallCheck(instance, Constructor) {
+         if (!(instance instanceof Constructor)) {
+           throw new TypeError("Cannot call a class as a function");
+         }
+       }
+
+       function _defineProperty(obj, key, value) {
+         if (key in obj) {
+           Object.defineProperty(obj, key, {
+             value: value,
+             enumerable: true,
+             configurable: true,
+             writable: true
+           });
+         } else {
+           obj[key] = value;
+         }
+
+         return obj;
+       }
+
+       function ownKeys$1(object, enumerableOnly) {
+         var keys = Object.keys(object);
+
+         if (Object.getOwnPropertySymbols) {
+           var symbols = Object.getOwnPropertySymbols(object);
+           if (enumerableOnly) symbols = symbols.filter(function (sym) {
+             return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+           });
+           keys.push.apply(keys, symbols);
+         }
+
+         return keys;
+       }
+
+       function _objectSpread2(target) {
+         for (var i = 1; i < arguments.length; i++) {
+           var source = arguments[i] != null ? arguments[i] : {};
+
+           if (i % 2) {
+             ownKeys$1(Object(source), true).forEach(function (key) {
+               _defineProperty(target, key, source[key]);
+             });
+           } else if (Object.getOwnPropertyDescriptors) {
+             Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+           } else {
+             ownKeys$1(Object(source)).forEach(function (key) {
+               Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
+             });
+           }
+         }
+
+         return target;
+       }
+
+       function _inherits(subClass, superClass) {
+         if (typeof superClass !== "function" && superClass !== null) {
+           throw new TypeError("Super expression must either be null or a function");
+         }
+
+         subClass.prototype = Object.create(superClass && superClass.prototype, {
+           constructor: {
+             value: subClass,
+             writable: true,
+             configurable: true
+           }
+         });
+         if (superClass) _setPrototypeOf(subClass, superClass);
+       }
+
+       function _getPrototypeOf(o) {
+         _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
+           return o.__proto__ || Object.getPrototypeOf(o);
+         };
+         return _getPrototypeOf(o);
+       }
+
+       function _setPrototypeOf(o, p) {
+         _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
+           o.__proto__ = p;
+           return o;
+         };
+
+         return _setPrototypeOf(o, p);
+       }
+
+       function _isNativeReflectConstruct() {
+         if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+         if (Reflect.construct.sham) return false;
+         if (typeof Proxy === "function") return true;
+
+         try {
+           Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
+           return true;
+         } catch (e) {
+           return false;
+         }
+       }
+
+       function _assertThisInitialized(self) {
+         if (self === void 0) {
+           throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+         }
+
+         return self;
+       }
+
+       function _possibleConstructorReturn(self, call) {
+         if (call && (typeof call === "object" || typeof call === "function")) {
+           return call;
+         }
+
+         return _assertThisInitialized(self);
+       }
+
+       function _createSuper(Derived) {
+         var hasNativeReflectConstruct = _isNativeReflectConstruct();
+
+         return function _createSuperInternal() {
+           var Super = _getPrototypeOf(Derived),
+               result;
+
+           if (hasNativeReflectConstruct) {
+             var NewTarget = _getPrototypeOf(this).constructor;
+
+             result = Reflect.construct(Super, arguments, NewTarget);
+           } else {
+             result = Super.apply(this, arguments);
+           }
+
+           return _possibleConstructorReturn(this, result);
+         };
+       }
+
+       function _toConsumableArray(arr) {
+         return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
+       }
+
+       function _arrayWithoutHoles(arr) {
+         if (Array.isArray(arr)) return _arrayLikeToArray(arr);
+       }
+
+       function _iterableToArray(iter) {
+         if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
+       }
+
+       function _unsupportedIterableToArray(o, minLen) {
+         if (!o) return;
+         if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+         var n = Object.prototype.toString.call(o).slice(8, -1);
+         if (n === "Object" && o.constructor) n = o.constructor.name;
+         if (n === "Map" || n === "Set") return Array.from(o);
+         if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+       }
+
+       function _arrayLikeToArray(arr, len) {
+         if (len == null || len > arr.length) len = arr.length;
+
+         for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+         return arr2;
+       }
+
+       function _nonIterableSpread() {
+         throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+       }
+
+       var f$6 = wellKnownSymbol;
+
+       var wellKnownSymbolWrapped = {
+               f: f$6
+       };
+
+       var defineProperty$5 = objectDefineProperty.f;
+
+       var defineWellKnownSymbol = function (NAME) {
+         var Symbol = path.Symbol || (path.Symbol = {});
+         if (!has(Symbol, NAME)) defineProperty$5(Symbol, NAME, {
+           value: wellKnownSymbolWrapped.f(NAME)
+         });
+       };
+
+       var defineProperty$6 = objectDefineProperty.f;
+
+
+
+       var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
+
+       var setToStringTag = function (it, TAG, STATIC) {
+         if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG$2)) {
+           defineProperty$6(it, TO_STRING_TAG$2, { configurable: true, value: TAG });
+         }
+       };
+
+       var $forEach$1 = arrayIteration.forEach;
+
+       var HIDDEN = sharedKey('hidden');
+       var SYMBOL = 'Symbol';
+       var PROTOTYPE$1 = 'prototype';
+       var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
+       var setInternalState$1 = internalState.set;
+       var getInternalState = internalState.getterFor(SYMBOL);
+       var ObjectPrototype$1 = Object[PROTOTYPE$1];
+       var $Symbol = global_1.Symbol;
+       var $stringify = getBuiltIn('JSON', 'stringify');
+       var nativeGetOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
+       var nativeDefineProperty$1 = objectDefineProperty.f;
+       var nativeGetOwnPropertyNames$2 = objectGetOwnPropertyNamesExternal.f;
+       var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
+       var AllSymbols = shared('symbols');
+       var ObjectPrototypeSymbols = shared('op-symbols');
+       var StringToSymbolRegistry = shared('string-to-symbol-registry');
+       var SymbolToStringRegistry = shared('symbol-to-string-registry');
+       var WellKnownSymbolsStore$1 = shared('wks');
+       var QObject = global_1.QObject;
+       // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
+       var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
+
+       // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+       var setSymbolDescriptor = descriptors && fails(function () {
+         return objectCreate(nativeDefineProperty$1({}, 'a', {
+           get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
+         })).a != 7;
+       }) ? function (O, P, Attributes) {
+         var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$2(ObjectPrototype$1, P);
+         if (ObjectPrototypeDescriptor) delete ObjectPrototype$1[P];
+         nativeDefineProperty$1(O, P, Attributes);
+         if (ObjectPrototypeDescriptor && O !== ObjectPrototype$1) {
+           nativeDefineProperty$1(ObjectPrototype$1, P, ObjectPrototypeDescriptor);
+         }
+       } : nativeDefineProperty$1;
+
+       var wrap = function (tag, description) {
+         var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
+         setInternalState$1(symbol, {
+           type: SYMBOL,
+           tag: tag,
+           description: description
+         });
+         if (!descriptors) symbol.description = description;
+         return symbol;
+       };
+
+       var isSymbol = useSymbolAsUid ? function (it) {
+         return typeof it == 'symbol';
+       } : function (it) {
+         return Object(it) instanceof $Symbol;
+       };
+
+       var $defineProperty = function defineProperty(O, P, Attributes) {
+         if (O === ObjectPrototype$1) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
+         anObject(O);
+         var key = toPrimitive(P, true);
+         anObject(Attributes);
+         if (has(AllSymbols, key)) {
+           if (!Attributes.enumerable) {
+             if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));
+             O[HIDDEN][key] = true;
+           } else {
+             if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
+             Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
+           } return setSymbolDescriptor(O, key, Attributes);
+         } return nativeDefineProperty$1(O, key, Attributes);
+       };
+
+       var $defineProperties = function defineProperties(O, Properties) {
+         anObject(O);
+         var properties = toIndexedObject(Properties);
+         var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
+         $forEach$1(keys, function (key) {
+           if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
+         });
+         return O;
+       };
+
+       var $create = function create(O, Properties) {
+         return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
+       };
+
+       var $propertyIsEnumerable = function propertyIsEnumerable(V) {
+         var P = toPrimitive(V, true);
+         var enumerable = nativePropertyIsEnumerable$1.call(this, P);
+         if (this === ObjectPrototype$1 && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
+         return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
+       };
+
+       var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
+         var it = toIndexedObject(O);
+         var key = toPrimitive(P, true);
+         if (it === ObjectPrototype$1 && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
+         var descriptor = nativeGetOwnPropertyDescriptor$2(it, key);
+         if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
+           descriptor.enumerable = true;
+         }
+         return descriptor;
+       };
+
+       var $getOwnPropertyNames = function getOwnPropertyNames(O) {
+         var names = nativeGetOwnPropertyNames$2(toIndexedObject(O));
+         var result = [];
+         $forEach$1(names, function (key) {
+           if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
+         });
+         return result;
+       };
+
+       var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
+         var IS_OBJECT_PROTOTYPE = O === ObjectPrototype$1;
+         var names = nativeGetOwnPropertyNames$2(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
+         var result = [];
+         $forEach$1(names, function (key) {
+           if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype$1, key))) {
+             result.push(AllSymbols[key]);
+           }
+         });
+         return result;
+       };
+
+       // `Symbol` constructor
+       // https://tc39.github.io/ecma262/#sec-symbol-constructor
+       if (!nativeSymbol) {
+         $Symbol = function Symbol() {
+           if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
+           var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
+           var tag = uid(description);
+           var setter = function (value) {
+             if (this === ObjectPrototype$1) setter.call(ObjectPrototypeSymbols, value);
+             if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
+             setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
+           };
+           if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype$1, tag, { configurable: true, set: setter });
+           return wrap(tag, description);
+         };
+
+         redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
+           return getInternalState(this).tag;
+         });
+
+         redefine($Symbol, 'withoutSetter', function (description) {
+           return wrap(uid(description), description);
+         });
+
+         objectPropertyIsEnumerable.f = $propertyIsEnumerable;
+         objectDefineProperty.f = $defineProperty;
+         objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
+         objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
+         objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
+
+         wellKnownSymbolWrapped.f = function (name) {
+           return wrap(wellKnownSymbol(name), name);
+         };
+
+         if (descriptors) {
+           // https://github.com/tc39/proposal-Symbol-description
+           nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
+             configurable: true,
+             get: function description() {
+               return getInternalState(this).description;
+             }
+           });
+           {
+             redefine(ObjectPrototype$1, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
+           }
+         }
+       }
+
+       _export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
+         Symbol: $Symbol
+       });
+
+       $forEach$1(objectKeys(WellKnownSymbolsStore$1), function (name) {
+         defineWellKnownSymbol(name);
+       });
+
+       _export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
+         // `Symbol.for` method
+         // https://tc39.github.io/ecma262/#sec-symbol.for
+         'for': function (key) {
+           var string = String(key);
+           if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
+           var symbol = $Symbol(string);
+           StringToSymbolRegistry[string] = symbol;
+           SymbolToStringRegistry[symbol] = string;
+           return symbol;
+         },
+         // `Symbol.keyFor` method
+         // https://tc39.github.io/ecma262/#sec-symbol.keyfor
+         keyFor: function keyFor(sym) {
+           if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
+           if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
+         },
+         useSetter: function () { USE_SETTER = true; },
+         useSimple: function () { USE_SETTER = false; }
+       });
+
+       _export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
+         // `Object.create` method
+         // https://tc39.github.io/ecma262/#sec-object.create
+         create: $create,
+         // `Object.defineProperty` method
+         // https://tc39.github.io/ecma262/#sec-object.defineproperty
+         defineProperty: $defineProperty,
+         // `Object.defineProperties` method
+         // https://tc39.github.io/ecma262/#sec-object.defineproperties
+         defineProperties: $defineProperties,
+         // `Object.getOwnPropertyDescriptor` method
+         // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
+         getOwnPropertyDescriptor: $getOwnPropertyDescriptor
+       });
+
+       _export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
+         // `Object.getOwnPropertyNames` method
+         // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
+         getOwnPropertyNames: $getOwnPropertyNames,
+         // `Object.getOwnPropertySymbols` method
+         // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
+         getOwnPropertySymbols: $getOwnPropertySymbols
+       });
+
+       // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
+       // https://bugs.chromium.org/p/v8/issues/detail?id=3443
+       _export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwnPropertySymbols.f(1); }) }, {
+         getOwnPropertySymbols: function getOwnPropertySymbols(it) {
+           return objectGetOwnPropertySymbols.f(toObject(it));
+         }
+       });
+
+       // `JSON.stringify` method behavior with symbols
+       // https://tc39.github.io/ecma262/#sec-json.stringify
+       if ($stringify) {
+         var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
+           var symbol = $Symbol();
+           // MS Edge converts symbol values to JSON as {}
+           return $stringify([symbol]) != '[null]'
+             // WebKit converts symbol values to JSON as null
+             || $stringify({ a: symbol }) != '{}'
+             // V8 throws on boxed symbols
+             || $stringify(Object(symbol)) != '{}';
+         });
+
+         _export({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
+           // eslint-disable-next-line no-unused-vars
+           stringify: function stringify(it, replacer, space) {
+             var args = [it];
+             var index = 1;
+             var $replacer;
+             while (arguments.length > index) args.push(arguments[index++]);
+             $replacer = replacer;
+             if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
+             if (!isArray(replacer)) replacer = function (key, value) {
+               if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
+               if (!isSymbol(value)) return value;
+             };
+             args[1] = replacer;
+             return $stringify.apply(null, args);
+           }
+         });
+       }
+
+       // `Symbol.prototype[@@toPrimitive]` method
+       // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
+       if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
+         createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
+       }
+       // `Symbol.prototype[@@toStringTag]` property
+       // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
+       setToStringTag($Symbol, SYMBOL);
+
+       hiddenKeys[HIDDEN] = true;
+
+       var defineProperty$7 = objectDefineProperty.f;
+
+
+       var NativeSymbol = global_1.Symbol;
+
+       if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
+         // Safari 12 bug
+         NativeSymbol().description !== undefined
+       )) {
+         var EmptyStringDescriptionStore = {};
+         // wrap Symbol constructor for correct work with undefined description
+         var SymbolWrapper = function Symbol() {
+           var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
+           var result = this instanceof SymbolWrapper
+             ? new NativeSymbol(description)
+             // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
+             : description === undefined ? NativeSymbol() : NativeSymbol(description);
+           if (description === '') EmptyStringDescriptionStore[result] = true;
+           return result;
+         };
+         copyConstructorProperties(SymbolWrapper, NativeSymbol);
+         var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
+         symbolPrototype.constructor = SymbolWrapper;
+
+         var symbolToString = symbolPrototype.toString;
+         var native = String(NativeSymbol('test')) == 'Symbol(test)';
+         var regexp = /^Symbol\((.*)\)[^)]+$/;
+         defineProperty$7(symbolPrototype, 'description', {
+           configurable: true,
+           get: function description() {
+             var symbol = isObject(this) ? this.valueOf() : this;
+             var string = symbolToString.call(symbol);
+             if (has(EmptyStringDescriptionStore, symbol)) return '';
+             var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
+             return desc === '' ? undefined : desc;
+           }
+         });
+
+         _export({ global: true, forced: true }, {
+           Symbol: SymbolWrapper
+         });
+       }
+
+       // `Symbol.species` well-known symbol
+       // https://tc39.github.io/ecma262/#sec-symbol.species
+       defineWellKnownSymbol('species');
+
+       // `Array.prototype.fill` method implementation
+       // https://tc39.github.io/ecma262/#sec-array.prototype.fill
+       var arrayFill = function fill(value /* , start = 0, end = @length */) {
+         var O = toObject(this);
+         var length = toLength(O.length);
+         var argumentsLength = arguments.length;
+         var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
+         var end = argumentsLength > 2 ? arguments[2] : undefined;
+         var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
+         while (endPos > index) O[index++] = value;
+         return O;
+       };
+
+       var UNSCOPABLES = wellKnownSymbol('unscopables');
+       var ArrayPrototype = Array.prototype;
+
+       // Array.prototype[@@unscopables]
+       // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
+       if (ArrayPrototype[UNSCOPABLES] == undefined) {
+         objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
+           configurable: true,
+           value: objectCreate(null)
+         });
+       }
+
+       // add a key to Array.prototype[@@unscopables]
+       var addToUnscopables = function (key) {
+         ArrayPrototype[UNSCOPABLES][key] = true;
+       };
+
+       // `Array.prototype.fill` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.fill
+       _export({ target: 'Array', proto: true }, {
+         fill: arrayFill
+       });
+
+       // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
+       addToUnscopables('fill');
+
+       var $includes = arrayIncludes.includes;
+
+
+
+       var USES_TO_LENGTH$6 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
+
+       // `Array.prototype.includes` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.includes
+       _export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$6 }, {
+         includes: function includes(el /* , fromIndex = 0 */) {
+           return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+         }
+       });
+
+       // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
+       addToUnscopables('includes');
+
+       var iterators = {};
+
+       var ITERATOR = wellKnownSymbol('iterator');
+       var BUGGY_SAFARI_ITERATORS = false;
+
+       var returnThis = function () { return this; };
+
+       // `%IteratorPrototype%` object
+       // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
+       var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
+
+       if ([].keys) {
+         arrayIterator = [].keys();
+         // Safari 8 has buggy iterators w/o `next`
+         if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
+         else {
+           PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
+           if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
+         }
+       }
+
+       if (IteratorPrototype == undefined) IteratorPrototype = {};
+
+       // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+       if ( !has(IteratorPrototype, ITERATOR)) {
+         createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
+       }
+
+       var iteratorsCore = {
+         IteratorPrototype: IteratorPrototype,
+         BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
+       };
+
+       var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
+
+
+
+
+
+       var returnThis$1 = function () { return this; };
+
+       var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
+         var TO_STRING_TAG = NAME + ' Iterator';
+         IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
+         setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
+         iterators[TO_STRING_TAG] = returnThis$1;
+         return IteratorConstructor;
+       };
+
+       var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
+       var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
+       var ITERATOR$1 = wellKnownSymbol('iterator');
+       var KEYS = 'keys';
+       var VALUES = 'values';
+       var ENTRIES = 'entries';
+
+       var returnThis$2 = function () { return this; };
+
+       var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
+         createIteratorConstructor(IteratorConstructor, NAME, next);
+
+         var getIterationMethod = function (KIND) {
+           if (KIND === DEFAULT && defaultIterator) return defaultIterator;
+           if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
+           switch (KIND) {
+             case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
+             case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
+             case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
+           } return function () { return new IteratorConstructor(this); };
+         };
+
+         var TO_STRING_TAG = NAME + ' Iterator';
+         var INCORRECT_VALUES_NAME = false;
+         var IterablePrototype = Iterable.prototype;
+         var nativeIterator = IterablePrototype[ITERATOR$1]
+           || IterablePrototype['@@iterator']
+           || DEFAULT && IterablePrototype[DEFAULT];
+         var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
+         var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
+         var CurrentIteratorPrototype, methods, KEY;
+
+         // fix native
+         if (anyNativeIterator) {
+           CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
+           if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
+             if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
+               if (objectSetPrototypeOf) {
+                 objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
+               } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
+                 createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$1, returnThis$2);
+               }
+             }
+             // Set @@toStringTag to native iterators
+             setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
+           }
+         }
+
+         // fix Array#{values, @@iterator}.name in V8 / FF
+         if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
+           INCORRECT_VALUES_NAME = true;
+           defaultIterator = function values() { return nativeIterator.call(this); };
+         }
+
+         // define iterator
+         if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
+           createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator);
+         }
+         iterators[NAME] = defaultIterator;
+
+         // export additional methods
+         if (DEFAULT) {
+           methods = {
+             values: getIterationMethod(VALUES),
+             keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
+             entries: getIterationMethod(ENTRIES)
+           };
+           if (FORCED) for (KEY in methods) {
+             if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
+               redefine(IterablePrototype, KEY, methods[KEY]);
+             }
+           } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
+         }
+
+         return methods;
+       };
+
+       var ARRAY_ITERATOR = 'Array Iterator';
+       var setInternalState$2 = internalState.set;
+       var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
+
+       // `Array.prototype.entries` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.entries
+       // `Array.prototype.keys` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.keys
+       // `Array.prototype.values` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.values
+       // `Array.prototype[@@iterator]` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
+       // `CreateArrayIterator` internal method
+       // https://tc39.github.io/ecma262/#sec-createarrayiterator
+       var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
+         setInternalState$2(this, {
+           type: ARRAY_ITERATOR,
+           target: toIndexedObject(iterated), // target
+           index: 0,                          // next index
+           kind: kind                         // kind
+         });
+       // `%ArrayIteratorPrototype%.next` method
+       // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
+       }, function () {
+         var state = getInternalState$1(this);
+         var target = state.target;
+         var kind = state.kind;
+         var index = state.index++;
+         if (!target || index >= target.length) {
+           state.target = undefined;
+           return { value: undefined, done: true };
+         }
+         if (kind == 'keys') return { value: index, done: false };
+         if (kind == 'values') return { value: target[index], done: false };
+         return { value: [index, target[index]], done: false };
+       }, 'values');
+
+       // argumentsList[@@iterator] is %ArrayProto_values%
+       // https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
+       // https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
+       iterators.Arguments = iterators.Array;
+
+       // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
+       addToUnscopables('keys');
+       addToUnscopables('values');
+       addToUnscopables('entries');
+
+       var min$5 = Math.min;
+       var nativeLastIndexOf = [].lastIndexOf;
+       var NEGATIVE_ZERO$1 = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
+       var STRICT_METHOD$4 = arrayMethodIsStrict('lastIndexOf');
+       // For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
+       var USES_TO_LENGTH$7 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
+       var FORCED$3 = NEGATIVE_ZERO$1 || !STRICT_METHOD$4 || !USES_TO_LENGTH$7;
+
+       // `Array.prototype.lastIndexOf` method implementation
+       // https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
+       var arrayLastIndexOf = FORCED$3 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
+         // convert -0 to +0
+         if (NEGATIVE_ZERO$1) return nativeLastIndexOf.apply(this, arguments) || 0;
+         var O = toIndexedObject(this);
+         var length = toLength(O.length);
+         var index = length - 1;
+         if (arguments.length > 1) index = min$5(index, toInteger(arguments[1]));
+         if (index < 0) index = length + index;
+         for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
+         return -1;
+       } : nativeLastIndexOf;
+
+       // `Array.prototype.lastIndexOf` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
+       _export({ target: 'Array', proto: true, forced: arrayLastIndexOf !== [].lastIndexOf }, {
+         lastIndexOf: arrayLastIndexOf
+       });
+
+       var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('slice');
+       var USES_TO_LENGTH$8 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
+
+       var SPECIES$5 = wellKnownSymbol('species');
+       var nativeSlice = [].slice;
+       var max$3 = Math.max;
+
+       // `Array.prototype.slice` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.slice
+       // fallback for not array-like ES3 strings and DOM objects
+       _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$8 }, {
+         slice: function slice(start, end) {
+           var O = toIndexedObject(this);
+           var length = toLength(O.length);
+           var k = toAbsoluteIndex(start, length);
+           var fin = toAbsoluteIndex(end === undefined ? length : end, length);
+           // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
+           var Constructor, result, n;
+           if (isArray(O)) {
+             Constructor = O.constructor;
+             // cross-realm fallback
+             if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
+               Constructor = undefined;
+             } else if (isObject(Constructor)) {
+               Constructor = Constructor[SPECIES$5];
+               if (Constructor === null) Constructor = undefined;
+             }
+             if (Constructor === Array || Constructor === undefined) {
+               return nativeSlice.call(O, k, fin);
+             }
+           }
+           result = new (Constructor === undefined ? Array : Constructor)(max$3(fin - k, 0));
+           for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
+           result.length = n;
+           return result;
+         }
+       });
+
+       // `Array[@@species]` getter
+       // https://tc39.github.io/ecma262/#sec-get-array-@@species
+       setSpecies('Array');
+
+       var arrayBufferNative = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
+
+       var redefineAll = function (target, src, options) {
+         for (var key in src) redefine(target, key, src[key], options);
+         return target;
+       };
+
+       var anInstance = function (it, Constructor, name) {
+         if (!(it instanceof Constructor)) {
+           throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
+         } return it;
+       };
+
+       // `ToIndex` abstract operation
+       // https://tc39.github.io/ecma262/#sec-toindex
+       var toIndex = function (it) {
+         if (it === undefined) return 0;
+         var number = toInteger(it);
+         var length = toLength(number);
+         if (number !== length) throw RangeError('Wrong length or index');
+         return length;
+       };
+
+       // IEEE754 conversions based on https://github.com/feross/ieee754
+       // eslint-disable-next-line no-shadow-restricted-names
+       var Infinity$1 = 1 / 0;
+       var abs = Math.abs;
+       var pow = Math.pow;
+       var floor$2 = Math.floor;
+       var log = Math.log;
+       var LN2 = Math.LN2;
+
+       var pack = function (number, mantissaLength, bytes) {
+         var buffer = new Array(bytes);
+         var exponentLength = bytes * 8 - mantissaLength - 1;
+         var eMax = (1 << exponentLength) - 1;
+         var eBias = eMax >> 1;
+         var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
+         var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
+         var index = 0;
+         var exponent, mantissa, c;
+         number = abs(number);
+         // eslint-disable-next-line no-self-compare
+         if (number != number || number === Infinity$1) {
+           // eslint-disable-next-line no-self-compare
+           mantissa = number != number ? 1 : 0;
+           exponent = eMax;
+         } else {
+           exponent = floor$2(log(number) / LN2);
+           if (number * (c = pow(2, -exponent)) < 1) {
+             exponent--;
+             c *= 2;
+           }
+           if (exponent + eBias >= 1) {
+             number += rt / c;
+           } else {
+             number += rt * pow(2, 1 - eBias);
+           }
+           if (number * c >= 2) {
+             exponent++;
+             c /= 2;
+           }
+           if (exponent + eBias >= eMax) {
+             mantissa = 0;
+             exponent = eMax;
+           } else if (exponent + eBias >= 1) {
+             mantissa = (number * c - 1) * pow(2, mantissaLength);
+             exponent = exponent + eBias;
+           } else {
+             mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
+             exponent = 0;
+           }
+         }
+         for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
+         exponent = exponent << mantissaLength | mantissa;
+         exponentLength += mantissaLength;
+         for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
+         buffer[--index] |= sign * 128;
+         return buffer;
+       };
+
+       var unpack = function (buffer, mantissaLength) {
+         var bytes = buffer.length;
+         var exponentLength = bytes * 8 - mantissaLength - 1;
+         var eMax = (1 << exponentLength) - 1;
+         var eBias = eMax >> 1;
+         var nBits = exponentLength - 7;
+         var index = bytes - 1;
+         var sign = buffer[index--];
+         var exponent = sign & 127;
+         var mantissa;
+         sign >>= 7;
+         for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
+         mantissa = exponent & (1 << -nBits) - 1;
+         exponent >>= -nBits;
+         nBits += mantissaLength;
+         for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
+         if (exponent === 0) {
+           exponent = 1 - eBias;
+         } else if (exponent === eMax) {
+           return mantissa ? NaN : sign ? -Infinity$1 : Infinity$1;
+         } else {
+           mantissa = mantissa + pow(2, mantissaLength);
+           exponent = exponent - eBias;
+         } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
+       };
+
+       var ieee754 = {
+         pack: pack,
+         unpack: unpack
+       };
+
+       var getOwnPropertyNames$2 = objectGetOwnPropertyNames.f;
+       var defineProperty$8 = objectDefineProperty.f;
+
+
+
+
+       var getInternalState$2 = internalState.get;
+       var setInternalState$3 = internalState.set;
+       var ARRAY_BUFFER = 'ArrayBuffer';
+       var DATA_VIEW = 'DataView';
+       var PROTOTYPE$2 = 'prototype';
+       var WRONG_LENGTH = 'Wrong length';
+       var WRONG_INDEX = 'Wrong index';
+       var NativeArrayBuffer = global_1[ARRAY_BUFFER];
+       var $ArrayBuffer = NativeArrayBuffer;
+       var $DataView = global_1[DATA_VIEW];
+       var $DataViewPrototype = $DataView && $DataView[PROTOTYPE$2];
+       var ObjectPrototype$2 = Object.prototype;
+       var RangeError$1 = global_1.RangeError;
+
+       var packIEEE754 = ieee754.pack;
+       var unpackIEEE754 = ieee754.unpack;
+
+       var packInt8 = function (number) {
+         return [number & 0xFF];
+       };
+
+       var packInt16 = function (number) {
+         return [number & 0xFF, number >> 8 & 0xFF];
+       };
+
+       var packInt32 = function (number) {
+         return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
+       };
+
+       var unpackInt32 = function (buffer) {
+         return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
+       };
+
+       var packFloat32 = function (number) {
+         return packIEEE754(number, 23, 4);
+       };
+
+       var packFloat64 = function (number) {
+         return packIEEE754(number, 52, 8);
+       };
+
+       var addGetter = function (Constructor, key) {
+         defineProperty$8(Constructor[PROTOTYPE$2], key, { get: function () { return getInternalState$2(this)[key]; } });
+       };
+
+       var get$1 = function (view, count, index, isLittleEndian) {
+         var intIndex = toIndex(index);
+         var store = getInternalState$2(view);
+         if (intIndex + count > store.byteLength) throw RangeError$1(WRONG_INDEX);
+         var bytes = getInternalState$2(store.buffer).bytes;
+         var start = intIndex + store.byteOffset;
+         var pack = bytes.slice(start, start + count);
+         return isLittleEndian ? pack : pack.reverse();
+       };
+
+       var set$1 = function (view, count, index, conversion, value, isLittleEndian) {
+         var intIndex = toIndex(index);
+         var store = getInternalState$2(view);
+         if (intIndex + count > store.byteLength) throw RangeError$1(WRONG_INDEX);
+         var bytes = getInternalState$2(store.buffer).bytes;
+         var start = intIndex + store.byteOffset;
+         var pack = conversion(+value);
+         for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
+       };
+
+       if (!arrayBufferNative) {
+         $ArrayBuffer = function ArrayBuffer(length) {
+           anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
+           var byteLength = toIndex(length);
+           setInternalState$3(this, {
+             bytes: arrayFill.call(new Array(byteLength), 0),
+             byteLength: byteLength
+           });
+           if (!descriptors) this.byteLength = byteLength;
+         };
+
+         $DataView = function DataView(buffer, byteOffset, byteLength) {
+           anInstance(this, $DataView, DATA_VIEW);
+           anInstance(buffer, $ArrayBuffer, DATA_VIEW);
+           var bufferLength = getInternalState$2(buffer).byteLength;
+           var offset = toInteger(byteOffset);
+           if (offset < 0 || offset > bufferLength) throw RangeError$1('Wrong offset');
+           byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
+           if (offset + byteLength > bufferLength) throw RangeError$1(WRONG_LENGTH);
+           setInternalState$3(this, {
+             buffer: buffer,
+             byteLength: byteLength,
+             byteOffset: offset
+           });
+           if (!descriptors) {
+             this.buffer = buffer;
+             this.byteLength = byteLength;
+             this.byteOffset = offset;
+           }
+         };
+
+         if (descriptors) {
+           addGetter($ArrayBuffer, 'byteLength');
+           addGetter($DataView, 'buffer');
+           addGetter($DataView, 'byteLength');
+           addGetter($DataView, 'byteOffset');
+         }
+
+         redefineAll($DataView[PROTOTYPE$2], {
+           getInt8: function getInt8(byteOffset) {
+             return get$1(this, 1, byteOffset)[0] << 24 >> 24;
+           },
+           getUint8: function getUint8(byteOffset) {
+             return get$1(this, 1, byteOffset)[0];
+           },
+           getInt16: function getInt16(byteOffset /* , littleEndian */) {
+             var bytes = get$1(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
+             return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
+           },
+           getUint16: function getUint16(byteOffset /* , littleEndian */) {
+             var bytes = get$1(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
+             return bytes[1] << 8 | bytes[0];
+           },
+           getInt32: function getInt32(byteOffset /* , littleEndian */) {
+             return unpackInt32(get$1(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
+           },
+           getUint32: function getUint32(byteOffset /* , littleEndian */) {
+             return unpackInt32(get$1(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
+           },
+           getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
+             return unpackIEEE754(get$1(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
+           },
+           getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
+             return unpackIEEE754(get$1(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
+           },
+           setInt8: function setInt8(byteOffset, value) {
+             set$1(this, 1, byteOffset, packInt8, value);
+           },
+           setUint8: function setUint8(byteOffset, value) {
+             set$1(this, 1, byteOffset, packInt8, value);
+           },
+           setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
+             set$1(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
+           },
+           setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
+             set$1(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
+           },
+           setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
+             set$1(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
+           },
+           setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
+             set$1(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
+           },
+           setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
+             set$1(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
+           },
+           setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
+             set$1(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
+           }
+         });
+       } else {
+         if (!fails(function () {
+           NativeArrayBuffer(1);
+         }) || !fails(function () {
+           new NativeArrayBuffer(-1); // eslint-disable-line no-new
+         }) || fails(function () {
+           new NativeArrayBuffer(); // eslint-disable-line no-new
+           new NativeArrayBuffer(1.5); // eslint-disable-line no-new
+           new NativeArrayBuffer(NaN); // eslint-disable-line no-new
+           return NativeArrayBuffer.name != ARRAY_BUFFER;
+         })) {
+           $ArrayBuffer = function ArrayBuffer(length) {
+             anInstance(this, $ArrayBuffer);
+             return new NativeArrayBuffer(toIndex(length));
+           };
+           var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE$2] = NativeArrayBuffer[PROTOTYPE$2];
+           for (var keys$3 = getOwnPropertyNames$2(NativeArrayBuffer), j$1 = 0, key$1; keys$3.length > j$1;) {
+             if (!((key$1 = keys$3[j$1++]) in $ArrayBuffer)) {
+               createNonEnumerableProperty($ArrayBuffer, key$1, NativeArrayBuffer[key$1]);
+             }
+           }
+           ArrayBufferPrototype.constructor = $ArrayBuffer;
+         }
+
+         // WebKit bug - the same parent prototype for typed arrays and data view
+         if (objectSetPrototypeOf && objectGetPrototypeOf($DataViewPrototype) !== ObjectPrototype$2) {
+           objectSetPrototypeOf($DataViewPrototype, ObjectPrototype$2);
+         }
+
+         // iOS Safari 7.x bug
+         var testView = new $DataView(new $ArrayBuffer(2));
+         var nativeSetInt8 = $DataViewPrototype.setInt8;
+         testView.setInt8(0, 2147483648);
+         testView.setInt8(1, 2147483649);
+         if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {
+           setInt8: function setInt8(byteOffset, value) {
+             nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
+           },
+           setUint8: function setUint8(byteOffset, value) {
+             nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
+           }
+         }, { unsafe: true });
+       }
+
+       setToStringTag($ArrayBuffer, ARRAY_BUFFER);
+       setToStringTag($DataView, DATA_VIEW);
+
+       var arrayBuffer = {
+         ArrayBuffer: $ArrayBuffer,
+         DataView: $DataView
+       };
+
+       var ARRAY_BUFFER$1 = 'ArrayBuffer';
+       var ArrayBuffer$1 = arrayBuffer[ARRAY_BUFFER$1];
+       var NativeArrayBuffer$1 = global_1[ARRAY_BUFFER$1];
+
+       // `ArrayBuffer` constructor
+       // https://tc39.github.io/ecma262/#sec-arraybuffer-constructor
+       _export({ global: true, forced: NativeArrayBuffer$1 !== ArrayBuffer$1 }, {
+         ArrayBuffer: ArrayBuffer$1
+       });
+
+       setSpecies(ARRAY_BUFFER$1);
+
+       var notARegexp = function (it) {
+         if (isRegexp(it)) {
+           throw TypeError("The method doesn't accept regular expressions");
+         } return it;
+       };
+
+       var MATCH$2 = wellKnownSymbol('match');
+
+       var correctIsRegexpLogic = function (METHOD_NAME) {
+         var regexp = /./;
+         try {
+           '/./'[METHOD_NAME](regexp);
+         } catch (e) {
+           try {
+             regexp[MATCH$2] = false;
+             return '/./'[METHOD_NAME](regexp);
+           } catch (f) { /* empty */ }
+         } return false;
+       };
+
+       // `String.prototype.includes` method
+       // https://tc39.github.io/ecma262/#sec-string.prototype.includes
+       _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
+         includes: function includes(searchString /* , position = 0 */) {
+           return !!~String(requireObjectCoercible(this))
+             .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
+         }
+       });
+
+       var non = '\u200B\u0085\u180E';
+
+       // check that a method works with the correct list
+       // of whitespaces and has a correct name
+       var stringTrimForced = function (METHOD_NAME) {
+         return fails(function () {
+           return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
+         });
+       };
+
+       var $trim = stringTrim.trim;
+
+
+       // `String.prototype.trim` method
+       // https://tc39.github.io/ecma262/#sec-string.prototype.trim
+       _export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
+         trim: function trim() {
+           return $trim(this);
+         }
+       });
+
+       var ITERATOR$2 = wellKnownSymbol('iterator');
+       var SAFE_CLOSING = false;
+
+       try {
+         var called = 0;
+         var iteratorWithReturn = {
+           next: function () {
+             return { done: !!called++ };
+           },
+           'return': function () {
+             SAFE_CLOSING = true;
+           }
+         };
+         iteratorWithReturn[ITERATOR$2] = function () {
+           return this;
+         };
+         // eslint-disable-next-line no-throw-literal
+         Array.from(iteratorWithReturn, function () { throw 2; });
+       } catch (error) { /* empty */ }
+
+       var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
+         if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
+         var ITERATION_SUPPORT = false;
+         try {
+           var object = {};
+           object[ITERATOR$2] = function () {
+             return {
+               next: function () {
+                 return { done: ITERATION_SUPPORT = true };
+               }
+             };
+           };
+           exec(object);
+         } catch (error) { /* empty */ }
+         return ITERATION_SUPPORT;
+       };
+
+       var defineProperty$9 = objectDefineProperty.f;
+
+
+
+
+
+       var Int8Array$1 = global_1.Int8Array;
+       var Int8ArrayPrototype = Int8Array$1 && Int8Array$1.prototype;
+       var Uint8ClampedArray = global_1.Uint8ClampedArray;
+       var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
+       var TypedArray = Int8Array$1 && objectGetPrototypeOf(Int8Array$1);
+       var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
+       var ObjectPrototype$3 = Object.prototype;
+       var isPrototypeOf = ObjectPrototype$3.isPrototypeOf;
+
+       var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
+       var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
+       // Fixing native typed arrays in Opera Presto crashes the browser, see #595
+       var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
+       var TYPED_ARRAY_TAG_REQIRED = false;
+       var NAME$1;
+
+       var TypedArrayConstructorsList = {
+         Int8Array: 1,
+         Uint8Array: 1,
+         Uint8ClampedArray: 1,
+         Int16Array: 2,
+         Uint16Array: 2,
+         Int32Array: 4,
+         Uint32Array: 4,
+         Float32Array: 4,
+         Float64Array: 8
+       };
+
+       var isView = function isView(it) {
+         var klass = classof(it);
+         return klass === 'DataView' || has(TypedArrayConstructorsList, klass);
+       };
+
+       var isTypedArray = function (it) {
+         return isObject(it) && has(TypedArrayConstructorsList, classof(it));
+       };
+
+       var aTypedArray = function (it) {
+         if (isTypedArray(it)) return it;
+         throw TypeError('Target is not a typed array');
+       };
+
+       var aTypedArrayConstructor = function (C) {
+         if (objectSetPrototypeOf) {
+           if (isPrototypeOf.call(TypedArray, C)) return C;
+         } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME$1)) {
+           var TypedArrayConstructor = global_1[ARRAY];
+           if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
+             return C;
+           }
+         } throw TypeError('Target is not a typed array constructor');
+       };
+
+       var exportTypedArrayMethod = function (KEY, property, forced) {
+         if (!descriptors) return;
+         if (forced) for (var ARRAY in TypedArrayConstructorsList) {
+           var TypedArrayConstructor = global_1[ARRAY];
+           if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {
+             delete TypedArrayConstructor.prototype[KEY];
+           }
+         }
+         if (!TypedArrayPrototype[KEY] || forced) {
+           redefine(TypedArrayPrototype, KEY, forced ? property
+             : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
+         }
+       };
+
+       var exportTypedArrayStaticMethod = function (KEY, property, forced) {
+         var ARRAY, TypedArrayConstructor;
+         if (!descriptors) return;
+         if (objectSetPrototypeOf) {
+           if (forced) for (ARRAY in TypedArrayConstructorsList) {
+             TypedArrayConstructor = global_1[ARRAY];
+             if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {
+               delete TypedArrayConstructor[KEY];
+             }
+           }
+           if (!TypedArray[KEY] || forced) {
+             // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
+             try {
+               return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array$1[KEY] || property);
+             } catch (error) { /* empty */ }
+           } else return;
+         }
+         for (ARRAY in TypedArrayConstructorsList) {
+           TypedArrayConstructor = global_1[ARRAY];
+           if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
+             redefine(TypedArrayConstructor, KEY, property);
+           }
+         }
+       };
+
+       for (NAME$1 in TypedArrayConstructorsList) {
+         if (!global_1[NAME$1]) NATIVE_ARRAY_BUFFER_VIEWS = false;
+       }
+
+       // WebKit bug - typed arrays constructors prototype is Object.prototype
+       if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
+         // eslint-disable-next-line no-shadow
+         TypedArray = function TypedArray() {
+           throw TypeError('Incorrect invocation');
+         };
+         if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME$1 in TypedArrayConstructorsList) {
+           if (global_1[NAME$1]) objectSetPrototypeOf(global_1[NAME$1], TypedArray);
+         }
+       }
+
+       if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$3) {
+         TypedArrayPrototype = TypedArray.prototype;
+         if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME$1 in TypedArrayConstructorsList) {
+           if (global_1[NAME$1]) objectSetPrototypeOf(global_1[NAME$1].prototype, TypedArrayPrototype);
+         }
+       }
+
+       // WebKit bug - one more object in Uint8ClampedArray prototype chain
+       if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
+         objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
+       }
+
+       if (descriptors && !has(TypedArrayPrototype, TO_STRING_TAG$3)) {
+         TYPED_ARRAY_TAG_REQIRED = true;
+         defineProperty$9(TypedArrayPrototype, TO_STRING_TAG$3, { get: function () {
+           return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
+         } });
+         for (NAME$1 in TypedArrayConstructorsList) if (global_1[NAME$1]) {
+           createNonEnumerableProperty(global_1[NAME$1], TYPED_ARRAY_TAG, NAME$1);
+         }
+       }
+
+       var arrayBufferViewCore = {
+         NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
+         TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
+         aTypedArray: aTypedArray,
+         aTypedArrayConstructor: aTypedArrayConstructor,
+         exportTypedArrayMethod: exportTypedArrayMethod,
+         exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
+         isView: isView,
+         isTypedArray: isTypedArray,
+         TypedArray: TypedArray,
+         TypedArrayPrototype: TypedArrayPrototype
+       };
+
+       /* eslint-disable no-new */
+
+
+
+       var NATIVE_ARRAY_BUFFER_VIEWS$1 = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
+
+       var ArrayBuffer$2 = global_1.ArrayBuffer;
+       var Int8Array$2 = global_1.Int8Array;
+
+       var typedArrayConstructorsRequireWrappers = !NATIVE_ARRAY_BUFFER_VIEWS$1 || !fails(function () {
+         Int8Array$2(1);
+       }) || !fails(function () {
+         new Int8Array$2(-1);
+       }) || !checkCorrectnessOfIteration(function (iterable) {
+         new Int8Array$2();
+         new Int8Array$2(null);
+         new Int8Array$2(1.5);
+         new Int8Array$2(iterable);
+       }, true) || fails(function () {
+         // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
+         return new Int8Array$2(new ArrayBuffer$2(2), 1, undefined).length !== 1;
+       });
+
+       var toPositiveInteger = function (it) {
+         var result = toInteger(it);
+         if (result < 0) throw RangeError("The argument can't be less than 0");
+         return result;
+       };
+
+       var toOffset = function (it, BYTES) {
+         var offset = toPositiveInteger(it);
+         if (offset % BYTES) throw RangeError('Wrong offset');
+         return offset;
+       };
+
+       var ITERATOR$3 = wellKnownSymbol('iterator');
+
+       var getIteratorMethod = function (it) {
+         if (it != undefined) return it[ITERATOR$3]
+           || it['@@iterator']
+           || iterators[classof(it)];
+       };
+
+       var ITERATOR$4 = wellKnownSymbol('iterator');
+       var ArrayPrototype$1 = Array.prototype;
+
+       // check on default Array iterator
+       var isArrayIteratorMethod = function (it) {
+         return it !== undefined && (iterators.Array === it || ArrayPrototype$1[ITERATOR$4] === it);
+       };
+
+       var aTypedArrayConstructor$1 = arrayBufferViewCore.aTypedArrayConstructor;
+
+       var typedArrayFrom = function from(source /* , mapfn, thisArg */) {
+         var O = toObject(source);
+         var argumentsLength = arguments.length;
+         var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
+         var mapping = mapfn !== undefined;
+         var iteratorMethod = getIteratorMethod(O);
+         var i, length, result, step, iterator, next;
+         if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {
+           iterator = iteratorMethod.call(O);
+           next = iterator.next;
+           O = [];
+           while (!(step = next.call(iterator)).done) {
+             O.push(step.value);
+           }
+         }
+         if (mapping && argumentsLength > 2) {
+           mapfn = functionBindContext(mapfn, arguments[2], 2);
+         }
+         length = toLength(O.length);
+         result = new (aTypedArrayConstructor$1(this))(length);
+         for (i = 0; length > i; i++) {
+           result[i] = mapping ? mapfn(O[i], i) : O[i];
+         }
+         return result;
+       };
+
+       var typedArrayConstructor = createCommonjsModule(function (module) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+       var getOwnPropertyNames = objectGetOwnPropertyNames.f;
+
+       var forEach = arrayIteration.forEach;
+
+
+
+
+
+
+       var getInternalState = internalState.get;
+       var setInternalState = internalState.set;
+       var nativeDefineProperty = objectDefineProperty.f;
+       var nativeGetOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
+       var round = Math.round;
+       var RangeError = global_1.RangeError;
+       var ArrayBuffer = arrayBuffer.ArrayBuffer;
+       var DataView = arrayBuffer.DataView;
+       var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
+       var TYPED_ARRAY_TAG = arrayBufferViewCore.TYPED_ARRAY_TAG;
+       var TypedArray = arrayBufferViewCore.TypedArray;
+       var TypedArrayPrototype = arrayBufferViewCore.TypedArrayPrototype;
+       var aTypedArrayConstructor = arrayBufferViewCore.aTypedArrayConstructor;
+       var isTypedArray = arrayBufferViewCore.isTypedArray;
+       var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
+       var WRONG_LENGTH = 'Wrong length';
+
+       var fromList = function (C, list) {
+         var index = 0;
+         var length = list.length;
+         var result = new (aTypedArrayConstructor(C))(length);
+         while (length > index) result[index] = list[index++];
+         return result;
+       };
+
+       var addGetter = function (it, key) {
+         nativeDefineProperty(it, key, { get: function () {
+           return getInternalState(this)[key];
+         } });
+       };
+
+       var isArrayBuffer = function (it) {
+         var klass;
+         return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
+       };
+
+       var isTypedArrayIndex = function (target, key) {
+         return isTypedArray(target)
+           && typeof key != 'symbol'
+           && key in target
+           && String(+key) == String(key);
+       };
+
+       var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
+         return isTypedArrayIndex(target, key = toPrimitive(key, true))
+           ? createPropertyDescriptor(2, target[key])
+           : nativeGetOwnPropertyDescriptor(target, key);
+       };
+
+       var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
+         if (isTypedArrayIndex(target, key = toPrimitive(key, true))
+           && isObject(descriptor)
+           && has(descriptor, 'value')
+           && !has(descriptor, 'get')
+           && !has(descriptor, 'set')
+           // TODO: add validation descriptor w/o calling accessors
+           && !descriptor.configurable
+           && (!has(descriptor, 'writable') || descriptor.writable)
+           && (!has(descriptor, 'enumerable') || descriptor.enumerable)
+         ) {
+           target[key] = descriptor.value;
+           return target;
+         } return nativeDefineProperty(target, key, descriptor);
+       };
+
+       if (descriptors) {
+         if (!NATIVE_ARRAY_BUFFER_VIEWS) {
+           objectGetOwnPropertyDescriptor.f = wrappedGetOwnPropertyDescriptor;
+           objectDefineProperty.f = wrappedDefineProperty;
+           addGetter(TypedArrayPrototype, 'buffer');
+           addGetter(TypedArrayPrototype, 'byteOffset');
+           addGetter(TypedArrayPrototype, 'byteLength');
+           addGetter(TypedArrayPrototype, 'length');
+         }
+
+         _export({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
+           getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
+           defineProperty: wrappedDefineProperty
+         });
+
+         module.exports = function (TYPE, wrapper, CLAMPED) {
+           var BYTES = TYPE.match(/\d+$/)[0] / 8;
+           var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
+           var GETTER = 'get' + TYPE;
+           var SETTER = 'set' + TYPE;
+           var NativeTypedArrayConstructor = global_1[CONSTRUCTOR_NAME];
+           var TypedArrayConstructor = NativeTypedArrayConstructor;
+           var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
+           var exported = {};
+
+           var getter = function (that, index) {
+             var data = getInternalState(that);
+             return data.view[GETTER](index * BYTES + data.byteOffset, true);
+           };
+
+           var setter = function (that, index, value) {
+             var data = getInternalState(that);
+             if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
+             data.view[SETTER](index * BYTES + data.byteOffset, value, true);
+           };
+
+           var addElement = function (that, index) {
+             nativeDefineProperty(that, index, {
+               get: function () {
+                 return getter(this, index);
+               },
+               set: function (value) {
+                 return setter(this, index, value);
+               },
+               enumerable: true
+             });
+           };
+
+           if (!NATIVE_ARRAY_BUFFER_VIEWS) {
+             TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
+               anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);
+               var index = 0;
+               var byteOffset = 0;
+               var buffer, byteLength, length;
+               if (!isObject(data)) {
+                 length = toIndex(data);
+                 byteLength = length * BYTES;
+                 buffer = new ArrayBuffer(byteLength);
+               } else if (isArrayBuffer(data)) {
+                 buffer = data;
+                 byteOffset = toOffset(offset, BYTES);
+                 var $len = data.byteLength;
+                 if ($length === undefined) {
+                   if ($len % BYTES) throw RangeError(WRONG_LENGTH);
+                   byteLength = $len - byteOffset;
+                   if (byteLength < 0) throw RangeError(WRONG_LENGTH);
+                 } else {
+                   byteLength = toLength($length) * BYTES;
+                   if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
+                 }
+                 length = byteLength / BYTES;
+               } else if (isTypedArray(data)) {
+                 return fromList(TypedArrayConstructor, data);
+               } else {
+                 return typedArrayFrom.call(TypedArrayConstructor, data);
+               }
+               setInternalState(that, {
+                 buffer: buffer,
+                 byteOffset: byteOffset,
+                 byteLength: byteLength,
+                 length: length,
+                 view: new DataView(buffer)
+               });
+               while (index < length) addElement(that, index++);
+             });
+
+             if (objectSetPrototypeOf) objectSetPrototypeOf(TypedArrayConstructor, TypedArray);
+             TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = objectCreate(TypedArrayPrototype);
+           } else if (typedArrayConstructorsRequireWrappers) {
+             TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
+               anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);
+               return inheritIfRequired(function () {
+                 if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
+                 if (isArrayBuffer(data)) return $length !== undefined
+                   ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
+                   : typedArrayOffset !== undefined
+                     ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
+                     : new NativeTypedArrayConstructor(data);
+                 if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
+                 return typedArrayFrom.call(TypedArrayConstructor, data);
+               }(), dummy, TypedArrayConstructor);
+             });
+
+             if (objectSetPrototypeOf) objectSetPrototypeOf(TypedArrayConstructor, TypedArray);
+             forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
+               if (!(key in TypedArrayConstructor)) {
+                 createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
+               }
+             });
+             TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
+           }
+
+           if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
+             createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
+           }
+
+           if (TYPED_ARRAY_TAG) {
+             createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
+           }
+
+           exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
+
+           _export({
+             global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS
+           }, exported);
+
+           if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
+             createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
+           }
+
+           if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
+             createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
+           }
+
+           setSpecies(CONSTRUCTOR_NAME);
+         };
+       } else module.exports = function () { /* empty */ };
+       });
+
+       // `Uint8Array` constructor
+       // https://tc39.github.io/ecma262/#sec-typedarray-objects
+       typedArrayConstructor('Uint8', function (init) {
+         return function Uint8Array(data, byteOffset, length) {
+           return init(this, data, byteOffset, length);
+         };
+       });
+
+       var min$6 = Math.min;
+
+       // `Array.prototype.copyWithin` method implementation
+       // https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
+       var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
+         var O = toObject(this);
+         var len = toLength(O.length);
+         var to = toAbsoluteIndex(target, len);
+         var from = toAbsoluteIndex(start, len);
+         var end = arguments.length > 2 ? arguments[2] : undefined;
+         var count = min$6((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
+         var inc = 1;
+         if (from < to && to < from + count) {
+           inc = -1;
+           from += count - 1;
+           to += count - 1;
+         }
+         while (count-- > 0) {
+           if (from in O) O[to] = O[from];
+           else delete O[to];
+           to += inc;
+           from += inc;
+         } return O;
+       };
+
+       var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.copyWithin` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.copywithin
+       exportTypedArrayMethod$1('copyWithin', function copyWithin(target, start /* , end */) {
+         return arrayCopyWithin.call(aTypedArray$1(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
+       });
+
+       var $every = arrayIteration.every;
+
+       var aTypedArray$2 = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$2 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.every` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every
+       exportTypedArrayMethod$2('every', function every(callbackfn /* , thisArg */) {
+         return $every(aTypedArray$2(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var aTypedArray$3 = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$3 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.fill` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.fill
+       // eslint-disable-next-line no-unused-vars
+       exportTypedArrayMethod$3('fill', function fill(value /* , start, end */) {
+         return arrayFill.apply(aTypedArray$3(this), arguments);
+       });
+
+       var $filter$1 = arrayIteration.filter;
+
+
+       var aTypedArray$4 = arrayBufferViewCore.aTypedArray;
+       var aTypedArrayConstructor$2 = arrayBufferViewCore.aTypedArrayConstructor;
+       var exportTypedArrayMethod$4 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.filter` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter
+       exportTypedArrayMethod$4('filter', function filter(callbackfn /* , thisArg */) {
+         var list = $filter$1(aTypedArray$4(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+         var C = speciesConstructor(this, this.constructor);
+         var index = 0;
+         var length = list.length;
+         var result = new (aTypedArrayConstructor$2(C))(length);
+         while (length > index) result[index] = list[index++];
+         return result;
+       });
+
+       var $find = arrayIteration.find;
+
+       var aTypedArray$5 = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$5 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.find` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find
+       exportTypedArrayMethod$5('find', function find(predicate /* , thisArg */) {
+         return $find(aTypedArray$5(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var $findIndex = arrayIteration.findIndex;
+
+       var aTypedArray$6 = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$6 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.findIndex` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findindex
+       exportTypedArrayMethod$6('findIndex', function findIndex(predicate /* , thisArg */) {
+         return $findIndex(aTypedArray$6(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var $forEach$2 = arrayIteration.forEach;
+
+       var aTypedArray$7 = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$7 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.forEach` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.foreach
+       exportTypedArrayMethod$7('forEach', function forEach(callbackfn /* , thisArg */) {
+         $forEach$2(aTypedArray$7(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var $includes$1 = arrayIncludes.includes;
+
+       var aTypedArray$8 = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$8 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.includes` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.includes
+       exportTypedArrayMethod$8('includes', function includes(searchElement /* , fromIndex */) {
+         return $includes$1(aTypedArray$8(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var $indexOf$1 = arrayIncludes.indexOf;
+
+       var aTypedArray$9 = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$9 = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.indexOf` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.indexof
+       exportTypedArrayMethod$9('indexOf', function indexOf(searchElement /* , fromIndex */) {
+         return $indexOf$1(aTypedArray$9(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var ITERATOR$5 = wellKnownSymbol('iterator');
+       var Uint8Array$1 = global_1.Uint8Array;
+       var arrayValues = es_array_iterator.values;
+       var arrayKeys = es_array_iterator.keys;
+       var arrayEntries = es_array_iterator.entries;
+       var aTypedArray$a = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$a = arrayBufferViewCore.exportTypedArrayMethod;
+       var nativeTypedArrayIterator = Uint8Array$1 && Uint8Array$1.prototype[ITERATOR$5];
+
+       var CORRECT_ITER_NAME = !!nativeTypedArrayIterator
+         && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);
+
+       var typedArrayValues = function values() {
+         return arrayValues.call(aTypedArray$a(this));
+       };
+
+       // `%TypedArray%.prototype.entries` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.entries
+       exportTypedArrayMethod$a('entries', function entries() {
+         return arrayEntries.call(aTypedArray$a(this));
+       });
+       // `%TypedArray%.prototype.keys` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.keys
+       exportTypedArrayMethod$a('keys', function keys() {
+         return arrayKeys.call(aTypedArray$a(this));
+       });
+       // `%TypedArray%.prototype.values` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.values
+       exportTypedArrayMethod$a('values', typedArrayValues, !CORRECT_ITER_NAME);
+       // `%TypedArray%.prototype[@@iterator]` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype-@@iterator
+       exportTypedArrayMethod$a(ITERATOR$5, typedArrayValues, !CORRECT_ITER_NAME);
+
+       var aTypedArray$b = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$b = arrayBufferViewCore.exportTypedArrayMethod;
+       var $join = [].join;
+
+       // `%TypedArray%.prototype.join` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join
+       // eslint-disable-next-line no-unused-vars
+       exportTypedArrayMethod$b('join', function join(separator) {
+         return $join.apply(aTypedArray$b(this), arguments);
+       });
+
+       var aTypedArray$c = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$c = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.lastIndexOf` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.lastindexof
+       // eslint-disable-next-line no-unused-vars
+       exportTypedArrayMethod$c('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
+         return arrayLastIndexOf.apply(aTypedArray$c(this), arguments);
+       });
+
+       var $map$1 = arrayIteration.map;
+
+
+       var aTypedArray$d = arrayBufferViewCore.aTypedArray;
+       var aTypedArrayConstructor$3 = arrayBufferViewCore.aTypedArrayConstructor;
+       var exportTypedArrayMethod$d = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.map` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.map
+       exportTypedArrayMethod$d('map', function map(mapfn /* , thisArg */) {
+         return $map$1(aTypedArray$d(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
+           return new (aTypedArrayConstructor$3(speciesConstructor(O, O.constructor)))(length);
+         });
+       });
+
+       var $reduce$1 = arrayReduce.left;
+
+       var aTypedArray$e = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$e = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.reduce` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce
+       exportTypedArrayMethod$e('reduce', function reduce(callbackfn /* , initialValue */) {
+         return $reduce$1(aTypedArray$e(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var $reduceRight = arrayReduce.right;
+
+       var aTypedArray$f = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$f = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.reduceRicht` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright
+       exportTypedArrayMethod$f('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
+         return $reduceRight(aTypedArray$f(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var aTypedArray$g = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$g = arrayBufferViewCore.exportTypedArrayMethod;
+       var floor$3 = Math.floor;
+
+       // `%TypedArray%.prototype.reverse` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reverse
+       exportTypedArrayMethod$g('reverse', function reverse() {
+         var that = this;
+         var length = aTypedArray$g(that).length;
+         var middle = floor$3(length / 2);
+         var index = 0;
+         var value;
+         while (index < middle) {
+           value = that[index];
+           that[index++] = that[--length];
+           that[length] = value;
+         } return that;
+       });
+
+       var aTypedArray$h = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$h = arrayBufferViewCore.exportTypedArrayMethod;
+
+       var FORCED$4 = fails(function () {
+         // eslint-disable-next-line no-undef
+         new Int8Array(1).set({});
+       });
+
+       // `%TypedArray%.prototype.set` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.set
+       exportTypedArrayMethod$h('set', function set(arrayLike /* , offset */) {
+         aTypedArray$h(this);
+         var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
+         var length = this.length;
+         var src = toObject(arrayLike);
+         var len = toLength(src.length);
+         var index = 0;
+         if (len + offset > length) throw RangeError('Wrong length');
+         while (index < len) this[offset + index] = src[index++];
+       }, FORCED$4);
+
+       var aTypedArray$i = arrayBufferViewCore.aTypedArray;
+       var aTypedArrayConstructor$4 = arrayBufferViewCore.aTypedArrayConstructor;
+       var exportTypedArrayMethod$i = arrayBufferViewCore.exportTypedArrayMethod;
+       var $slice = [].slice;
+
+       var FORCED$5 = fails(function () {
+         // eslint-disable-next-line no-undef
+         new Int8Array(1).slice();
+       });
+
+       // `%TypedArray%.prototype.slice` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice
+       exportTypedArrayMethod$i('slice', function slice(start, end) {
+         var list = $slice.call(aTypedArray$i(this), start, end);
+         var C = speciesConstructor(this, this.constructor);
+         var index = 0;
+         var length = list.length;
+         var result = new (aTypedArrayConstructor$4(C))(length);
+         while (length > index) result[index] = list[index++];
+         return result;
+       }, FORCED$5);
+
+       var $some = arrayIteration.some;
+
+       var aTypedArray$j = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$j = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.some` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some
+       exportTypedArrayMethod$j('some', function some(callbackfn /* , thisArg */) {
+         return $some(aTypedArray$j(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+       });
+
+       var aTypedArray$k = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$k = arrayBufferViewCore.exportTypedArrayMethod;
+       var $sort = [].sort;
+
+       // `%TypedArray%.prototype.sort` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort
+       exportTypedArrayMethod$k('sort', function sort(comparefn) {
+         return $sort.call(aTypedArray$k(this), comparefn);
+       });
+
+       var aTypedArray$l = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$l = arrayBufferViewCore.exportTypedArrayMethod;
+
+       // `%TypedArray%.prototype.subarray` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.subarray
+       exportTypedArrayMethod$l('subarray', function subarray(begin, end) {
+         var O = aTypedArray$l(this);
+         var length = O.length;
+         var beginIndex = toAbsoluteIndex(begin, length);
+         return new (speciesConstructor(O, O.constructor))(
+           O.buffer,
+           O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
+           toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
+         );
+       });
+
+       var Int8Array$3 = global_1.Int8Array;
+       var aTypedArray$m = arrayBufferViewCore.aTypedArray;
+       var exportTypedArrayMethod$m = arrayBufferViewCore.exportTypedArrayMethod;
+       var $toLocaleString = [].toLocaleString;
+       var $slice$1 = [].slice;
+
+       // iOS Safari 6.x fails here
+       var TO_LOCALE_STRING_BUG = !!Int8Array$3 && fails(function () {
+         $toLocaleString.call(new Int8Array$3(1));
+       });
+
+       var FORCED$6 = fails(function () {
+         return [1, 2].toLocaleString() != new Int8Array$3([1, 2]).toLocaleString();
+       }) || !fails(function () {
+         Int8Array$3.prototype.toLocaleString.call([1, 2]);
+       });
+
+       // `%TypedArray%.prototype.toLocaleString` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring
+       exportTypedArrayMethod$m('toLocaleString', function toLocaleString() {
+         return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice$1.call(aTypedArray$m(this)) : aTypedArray$m(this), arguments);
+       }, FORCED$6);
+
+       var exportTypedArrayMethod$n = arrayBufferViewCore.exportTypedArrayMethod;
+
+
+
+       var Uint8Array$2 = global_1.Uint8Array;
+       var Uint8ArrayPrototype = Uint8Array$2 && Uint8Array$2.prototype || {};
+       var arrayToString = [].toString;
+       var arrayJoin = [].join;
+
+       if (fails(function () { arrayToString.call({}); })) {
+         arrayToString = function toString() {
+           return arrayJoin.call(this);
+         };
+       }
+
+       var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
+
+       // `%TypedArray%.prototype.toString` method
+       // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tostring
+       exportTypedArrayMethod$n('toString', arrayToString, IS_NOT_ARRAY_METHOD);
+
+       // `URL.prototype.toJSON` method
+       // https://url.spec.whatwg.org/#dom-url-tojson
+       _export({ target: 'URL', proto: true, enumerable: true }, {
+         toJSON: function toJSON() {
+           return URL.prototype.toString.call(this);
+         }
+       });
+
+       var lookup = [];
+       var revLookup = [];
+       var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
+       var inited = false;
+
+       function init() {
+         inited = true;
+         var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+
+         for (var i = 0, len = code.length; i < len; ++i) {
+           lookup[i] = code[i];
+           revLookup[code.charCodeAt(i)] = i;
+         }
+
+         revLookup['-'.charCodeAt(0)] = 62;
+         revLookup['_'.charCodeAt(0)] = 63;
+       }
+
+       function toByteArray(b64) {
+         if (!inited) {
+           init();
+         }
+
+         var i, j, l, tmp, placeHolders, arr;
+         var len = b64.length;
+
+         if (len % 4 > 0) {
+           throw new Error('Invalid string. Length must be a multiple of 4');
+         } // the number of equal signs (place holders)
+         // if there are two placeholders, than the two characters before it
+         // represent one byte
+         // if there is only one, then the three characters before it represent 2 bytes
+         // this is just a cheap hack to not do indexOf twice
+
+
+         placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; // base64 is 4/3 + up to two characters of the original data
+
+         arr = new Arr(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars
+
+         l = placeHolders > 0 ? len - 4 : len;
+         var L = 0;
+
+         for (i = 0, j = 0; i < l; i += 4, j += 3) {
+           tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
+           arr[L++] = tmp >> 16 & 0xFF;
+           arr[L++] = tmp >> 8 & 0xFF;
+           arr[L++] = tmp & 0xFF;
+         }
+
+         if (placeHolders === 2) {
+           tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
+           arr[L++] = tmp & 0xFF;
+         } else if (placeHolders === 1) {
+           tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
+           arr[L++] = tmp >> 8 & 0xFF;
+           arr[L++] = tmp & 0xFF;
+         }
+
+         return arr;
+       }
+
+       function tripletToBase64(num) {
+         return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
+       }
+
+       function encodeChunk(uint8, start, end) {
+         var tmp;
+         var output = [];
+
+         for (var i = start; i < end; i += 3) {
+           tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
+           output.push(tripletToBase64(tmp));
+         }
+
+         return output.join('');
+       }
+
+       function fromByteArray(uint8) {
+         if (!inited) {
+           init();
+         }
+
+         var tmp;
+         var len = uint8.length;
+         var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
+
+         var output = '';
+         var parts = [];
+         var maxChunkLength = 16383; // must be multiple of 3
+         // go through the array every three bytes, we'll deal with trailing stuff later
+
+         for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+           parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
+         } // pad the end with zeros, but make sure to not forget the extra bytes
+
+
+         if (extraBytes === 1) {
+           tmp = uint8[len - 1];
+           output += lookup[tmp >> 2];
+           output += lookup[tmp << 4 & 0x3F];
+           output += '==';
+         } else if (extraBytes === 2) {
+           tmp = (uint8[len - 2] << 8) + uint8[len - 1];
+           output += lookup[tmp >> 10];
+           output += lookup[tmp >> 4 & 0x3F];
+           output += lookup[tmp << 2 & 0x3F];
+           output += '=';
+         }
+
+         parts.push(output);
+         return parts.join('');
+       }
+
+       function read(buffer, offset, isLE, mLen, nBytes) {
+         var e, m;
+         var eLen = nBytes * 8 - mLen - 1;
+         var eMax = (1 << eLen) - 1;
+         var eBias = eMax >> 1;
+         var nBits = -7;
+         var i = isLE ? nBytes - 1 : 0;
+         var d = isLE ? -1 : 1;
+         var s = buffer[offset + i];
+         i += d;
+         e = s & (1 << -nBits) - 1;
+         s >>= -nBits;
+         nBits += eLen;
+
+         for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+         m = e & (1 << -nBits) - 1;
+         e >>= -nBits;
+         nBits += mLen;
+
+         for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+         if (e === 0) {
+           e = 1 - eBias;
+         } else if (e === eMax) {
+           return m ? NaN : (s ? -1 : 1) * Infinity;
+         } else {
+           m = m + Math.pow(2, mLen);
+           e = e - eBias;
+         }
+
+         return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
+       }
+       function write(buffer, value, offset, isLE, mLen, nBytes) {
+         var e, m, c;
+         var eLen = nBytes * 8 - mLen - 1;
+         var eMax = (1 << eLen) - 1;
+         var eBias = eMax >> 1;
+         var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
+         var i = isLE ? 0 : nBytes - 1;
+         var d = isLE ? 1 : -1;
+         var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
+         value = Math.abs(value);
+
+         if (isNaN(value) || value === Infinity) {
+           m = isNaN(value) ? 1 : 0;
+           e = eMax;
+         } else {
+           e = Math.floor(Math.log(value) / Math.LN2);
+
+           if (value * (c = Math.pow(2, -e)) < 1) {
+             e--;
+             c *= 2;
+           }
+
+           if (e + eBias >= 1) {
+             value += rt / c;
+           } else {
+             value += rt * Math.pow(2, 1 - eBias);
+           }
+
+           if (value * c >= 2) {
+             e++;
+             c /= 2;
+           }
+
+           if (e + eBias >= eMax) {
+             m = 0;
+             e = eMax;
+           } else if (e + eBias >= 1) {
+             m = (value * c - 1) * Math.pow(2, mLen);
+             e = e + eBias;
+           } else {
+             m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
+             e = 0;
+           }
+         }
+
+         for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+         e = e << mLen | m;
+         eLen += mLen;
+
+         for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+         buffer[offset + i - d] |= s * 128;
+       }
+
+       var toString$2 = {}.toString;
+       var isArray$1 = Array.isArray || function (arr) {
+         return toString$2.call(arr) == '[object Array]';
+       };
+
+       var INSPECT_MAX_BYTES = 50;
+       /**
+        * If `Buffer.TYPED_ARRAY_SUPPORT`:
+        *   === true    Use Uint8Array implementation (fastest)
+        *   === false   Use Object implementation (most compatible, even IE6)
+        *
+        * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+        * Opera 11.6+, iOS 4.2+.
+        *
+        * Due to various browser bugs, sometimes the Object implementation will be used even
+        * when the browser supports typed arrays.
+        *
+        * Note:
+        *
+        *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
+        *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+        *
+        *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+        *
+        *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+        *     incorrect length in some situations.
+
+        * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
+        * get the Object implementation, which is slower but behaves correctly.
+        */
+
+       Buffer.TYPED_ARRAY_SUPPORT = global$2.TYPED_ARRAY_SUPPORT !== undefined ? global$2.TYPED_ARRAY_SUPPORT : true;
+
+       function kMaxLength() {
+         return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
+       }
+
+       function createBuffer(that, length) {
+         if (kMaxLength() < length) {
+           throw new RangeError('Invalid typed array length');
+         }
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           // Return an augmented `Uint8Array` instance, for best performance
+           that = new Uint8Array(length);
+           that.__proto__ = Buffer.prototype;
+         } else {
+           // Fallback: Return an object instance of the Buffer class
+           if (that === null) {
+             that = new Buffer(length);
+           }
+
+           that.length = length;
+         }
+
+         return that;
+       }
+       /**
+        * The Buffer constructor returns instances of `Uint8Array` that have their
+        * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+        * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+        * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+        * returns a single octet.
+        *
+        * The `Uint8Array` prototype remains unmodified.
+        */
+
+
+       function Buffer(arg, encodingOrOffset, length) {
+         if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
+           return new Buffer(arg, encodingOrOffset, length);
+         } // Common case.
+
+
+         if (typeof arg === 'number') {
+           if (typeof encodingOrOffset === 'string') {
+             throw new Error('If encoding is specified then the first argument must be a string');
+           }
+
+           return allocUnsafe(this, arg);
+         }
+
+         return from(this, arg, encodingOrOffset, length);
+       }
+       Buffer.poolSize = 8192; // not used by this implementation
+       // TODO: Legacy, not needed anymore. Remove in next major version.
+
+       Buffer._augment = function (arr) {
+         arr.__proto__ = Buffer.prototype;
+         return arr;
+       };
+
+       function from(that, value, encodingOrOffset, length) {
+         if (typeof value === 'number') {
+           throw new TypeError('"value" argument must not be a number');
+         }
+
+         if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+           return fromArrayBuffer(that, value, encodingOrOffset, length);
+         }
+
+         if (typeof value === 'string') {
+           return fromString(that, value, encodingOrOffset);
+         }
+
+         return fromObject(that, value);
+       }
+       /**
+        * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+        * if value is a number.
+        * Buffer.from(str[, encoding])
+        * Buffer.from(array)
+        * Buffer.from(buffer)
+        * Buffer.from(arrayBuffer[, byteOffset[, length]])
+        **/
+
+
+       Buffer.from = function (value, encodingOrOffset, length) {
+         return from(null, value, encodingOrOffset, length);
+       };
+
+       if (Buffer.TYPED_ARRAY_SUPPORT) {
+         Buffer.prototype.__proto__ = Uint8Array.prototype;
+         Buffer.__proto__ = Uint8Array;
+       }
+
+       function assertSize(size) {
+         if (typeof size !== 'number') {
+           throw new TypeError('"size" argument must be a number');
+         } else if (size < 0) {
+           throw new RangeError('"size" argument must not be negative');
+         }
+       }
+
+       function alloc(that, size, fill, encoding) {
+         assertSize(size);
+
+         if (size <= 0) {
+           return createBuffer(that, size);
+         }
+
+         if (fill !== undefined) {
+           // Only pay attention to encoding if it's a string. This
+           // prevents accidentally sending in a number that would
+           // be interpretted as a start offset.
+           return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
+         }
+
+         return createBuffer(that, size);
+       }
+       /**
+        * Creates a new filled Buffer instance.
+        * alloc(size[, fill[, encoding]])
+        **/
+
+
+       Buffer.alloc = function (size, fill, encoding) {
+         return alloc(null, size, fill, encoding);
+       };
+
+       function allocUnsafe(that, size) {
+         assertSize(size);
+         that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
+
+         if (!Buffer.TYPED_ARRAY_SUPPORT) {
+           for (var i = 0; i < size; ++i) {
+             that[i] = 0;
+           }
+         }
+
+         return that;
+       }
+       /**
+        * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+        * */
+
+
+       Buffer.allocUnsafe = function (size) {
+         return allocUnsafe(null, size);
+       };
+       /**
+        * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+        */
+
+
+       Buffer.allocUnsafeSlow = function (size) {
+         return allocUnsafe(null, size);
+       };
+
+       function fromString(that, string, encoding) {
+         if (typeof encoding !== 'string' || encoding === '') {
+           encoding = 'utf8';
+         }
+
+         if (!Buffer.isEncoding(encoding)) {
+           throw new TypeError('"encoding" must be a valid string encoding');
+         }
+
+         var length = byteLength(string, encoding) | 0;
+         that = createBuffer(that, length);
+         var actual = that.write(string, encoding);
+
+         if (actual !== length) {
+           // Writing a hex string, for example, that contains invalid characters will
+           // cause everything after the first invalid character to be ignored. (e.g.
+           // 'abxxcd' will be treated as 'ab')
+           that = that.slice(0, actual);
+         }
+
+         return that;
+       }
+
+       function fromArrayLike(that, array) {
+         var length = array.length < 0 ? 0 : checked(array.length) | 0;
+         that = createBuffer(that, length);
+
+         for (var i = 0; i < length; i += 1) {
+           that[i] = array[i] & 255;
+         }
+
+         return that;
+       }
+
+       function fromArrayBuffer(that, array, byteOffset, length) {
+         array.byteLength; // this throws if `array` is not a valid ArrayBuffer
+
+         if (byteOffset < 0 || array.byteLength < byteOffset) {
+           throw new RangeError('\'offset\' is out of bounds');
+         }
+
+         if (array.byteLength < byteOffset + (length || 0)) {
+           throw new RangeError('\'length\' is out of bounds');
+         }
+
+         if (byteOffset === undefined && length === undefined) {
+           array = new Uint8Array(array);
+         } else if (length === undefined) {
+           array = new Uint8Array(array, byteOffset);
+         } else {
+           array = new Uint8Array(array, byteOffset, length);
+         }
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           // Return an augmented `Uint8Array` instance, for best performance
+           that = array;
+           that.__proto__ = Buffer.prototype;
+         } else {
+           // Fallback: Return an object instance of the Buffer class
+           that = fromArrayLike(that, array);
+         }
+
+         return that;
+       }
+
+       function fromObject(that, obj) {
+         if (internalIsBuffer(obj)) {
+           var len = checked(obj.length) | 0;
+           that = createBuffer(that, len);
+
+           if (that.length === 0) {
+             return that;
+           }
+
+           obj.copy(that, 0, 0, len);
+           return that;
+         }
+
+         if (obj) {
+           if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
+             if (typeof obj.length !== 'number' || isnan(obj.length)) {
+               return createBuffer(that, 0);
+             }
+
+             return fromArrayLike(that, obj);
+           }
+
+           if (obj.type === 'Buffer' && isArray$1(obj.data)) {
+             return fromArrayLike(that, obj.data);
+           }
+         }
+
+         throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
+       }
+
+       function checked(length) {
+         // Note: cannot use `length < kMaxLength()` here because that fails when
+         // length is NaN (which is otherwise coerced to zero.)
+         if (length >= kMaxLength()) {
+           throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
+         }
+
+         return length | 0;
+       }
+       Buffer.isBuffer = isBuffer;
+
+       function internalIsBuffer(b) {
+         return !!(b != null && b._isBuffer);
+       }
+
+       Buffer.compare = function compare(a, b) {
+         if (!internalIsBuffer(a) || !internalIsBuffer(b)) {
+           throw new TypeError('Arguments must be Buffers');
+         }
+
+         if (a === b) return 0;
+         var x = a.length;
+         var y = b.length;
+
+         for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+           if (a[i] !== b[i]) {
+             x = a[i];
+             y = b[i];
+             break;
+           }
+         }
+
+         if (x < y) return -1;
+         if (y < x) return 1;
+         return 0;
+       };
+
+       Buffer.isEncoding = function isEncoding(encoding) {
+         switch (String(encoding).toLowerCase()) {
+           case 'hex':
+           case 'utf8':
+           case 'utf-8':
+           case 'ascii':
+           case 'latin1':
+           case 'binary':
+           case 'base64':
+           case 'ucs2':
+           case 'ucs-2':
+           case 'utf16le':
+           case 'utf-16le':
+             return true;
+
+           default:
+             return false;
+         }
+       };
+
+       Buffer.concat = function concat(list, length) {
+         if (!isArray$1(list)) {
+           throw new TypeError('"list" argument must be an Array of Buffers');
+         }
+
+         if (list.length === 0) {
+           return Buffer.alloc(0);
+         }
+
+         var i;
+
+         if (length === undefined) {
+           length = 0;
+
+           for (i = 0; i < list.length; ++i) {
+             length += list[i].length;
+           }
+         }
+
+         var buffer = Buffer.allocUnsafe(length);
+         var pos = 0;
+
+         for (i = 0; i < list.length; ++i) {
+           var buf = list[i];
+
+           if (!internalIsBuffer(buf)) {
+             throw new TypeError('"list" argument must be an Array of Buffers');
+           }
+
+           buf.copy(buffer, pos);
+           pos += buf.length;
+         }
+
+         return buffer;
+       };
+
+       function byteLength(string, encoding) {
+         if (internalIsBuffer(string)) {
+           return string.length;
+         }
+
+         if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
+           return string.byteLength;
+         }
+
+         if (typeof string !== 'string') {
+           string = '' + string;
+         }
+
+         var len = string.length;
+         if (len === 0) return 0; // Use a for loop to avoid recursion
+
+         var loweredCase = false;
+
+         for (;;) {
+           switch (encoding) {
+             case 'ascii':
+             case 'latin1':
+             case 'binary':
+               return len;
+
+             case 'utf8':
+             case 'utf-8':
+             case undefined:
+               return utf8ToBytes(string).length;
+
+             case 'ucs2':
+             case 'ucs-2':
+             case 'utf16le':
+             case 'utf-16le':
+               return len * 2;
+
+             case 'hex':
+               return len >>> 1;
+
+             case 'base64':
+               return base64ToBytes(string).length;
+
+             default:
+               if (loweredCase) return utf8ToBytes(string).length; // assume utf8
+
+               encoding = ('' + encoding).toLowerCase();
+               loweredCase = true;
+           }
+         }
+       }
+
+       Buffer.byteLength = byteLength;
+
+       function slowToString(encoding, start, end) {
+         var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+         // property of a typed array.
+         // This behaves neither like String nor Uint8Array in that we set start/end
+         // to their upper/lower bounds if the value passed is out of range.
+         // undefined is handled specially as per ECMA-262 6th Edition,
+         // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+
+         if (start === undefined || start < 0) {
+           start = 0;
+         } // Return early if start > this.length. Done here to prevent potential uint32
+         // coercion fail below.
+
+
+         if (start > this.length) {
+           return '';
+         }
+
+         if (end === undefined || end > this.length) {
+           end = this.length;
+         }
+
+         if (end <= 0) {
+           return '';
+         } // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+
+
+         end >>>= 0;
+         start >>>= 0;
+
+         if (end <= start) {
+           return '';
+         }
+
+         if (!encoding) encoding = 'utf8';
+
+         while (true) {
+           switch (encoding) {
+             case 'hex':
+               return hexSlice(this, start, end);
+
+             case 'utf8':
+             case 'utf-8':
+               return utf8Slice(this, start, end);
+
+             case 'ascii':
+               return asciiSlice(this, start, end);
+
+             case 'latin1':
+             case 'binary':
+               return latin1Slice(this, start, end);
+
+             case 'base64':
+               return base64Slice(this, start, end);
+
+             case 'ucs2':
+             case 'ucs-2':
+             case 'utf16le':
+             case 'utf-16le':
+               return utf16leSlice(this, start, end);
+
+             default:
+               if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
+               encoding = (encoding + '').toLowerCase();
+               loweredCase = true;
+           }
+         }
+       } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
+       // Buffer instances.
+
+
+       Buffer.prototype._isBuffer = true;
+
+       function swap(b, n, m) {
+         var i = b[n];
+         b[n] = b[m];
+         b[m] = i;
+       }
+
+       Buffer.prototype.swap16 = function swap16() {
+         var len = this.length;
+
+         if (len % 2 !== 0) {
+           throw new RangeError('Buffer size must be a multiple of 16-bits');
+         }
+
+         for (var i = 0; i < len; i += 2) {
+           swap(this, i, i + 1);
+         }
+
+         return this;
+       };
+
+       Buffer.prototype.swap32 = function swap32() {
+         var len = this.length;
+
+         if (len % 4 !== 0) {
+           throw new RangeError('Buffer size must be a multiple of 32-bits');
+         }
+
+         for (var i = 0; i < len; i += 4) {
+           swap(this, i, i + 3);
+           swap(this, i + 1, i + 2);
+         }
+
+         return this;
+       };
+
+       Buffer.prototype.swap64 = function swap64() {
+         var len = this.length;
+
+         if (len % 8 !== 0) {
+           throw new RangeError('Buffer size must be a multiple of 64-bits');
+         }
+
+         for (var i = 0; i < len; i += 8) {
+           swap(this, i, i + 7);
+           swap(this, i + 1, i + 6);
+           swap(this, i + 2, i + 5);
+           swap(this, i + 3, i + 4);
+         }
+
+         return this;
+       };
+
+       Buffer.prototype.toString = function toString() {
+         var length = this.length | 0;
+         if (length === 0) return '';
+         if (arguments.length === 0) return utf8Slice(this, 0, length);
+         return slowToString.apply(this, arguments);
+       };
+
+       Buffer.prototype.equals = function equals(b) {
+         if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer');
+         if (this === b) return true;
+         return Buffer.compare(this, b) === 0;
+       };
+
+       Buffer.prototype.inspect = function inspect() {
+         var str = '';
+         var max = INSPECT_MAX_BYTES;
+
+         if (this.length > 0) {
+           str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
+           if (this.length > max) str += ' ... ';
+         }
+
+         return '<Buffer ' + str + '>';
+       };
+
+       Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
+         if (!internalIsBuffer(target)) {
+           throw new TypeError('Argument must be a Buffer');
+         }
+
+         if (start === undefined) {
+           start = 0;
+         }
+
+         if (end === undefined) {
+           end = target ? target.length : 0;
+         }
+
+         if (thisStart === undefined) {
+           thisStart = 0;
+         }
+
+         if (thisEnd === undefined) {
+           thisEnd = this.length;
+         }
+
+         if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+           throw new RangeError('out of range index');
+         }
+
+         if (thisStart >= thisEnd && start >= end) {
+           return 0;
+         }
+
+         if (thisStart >= thisEnd) {
+           return -1;
+         }
+
+         if (start >= end) {
+           return 1;
+         }
+
+         start >>>= 0;
+         end >>>= 0;
+         thisStart >>>= 0;
+         thisEnd >>>= 0;
+         if (this === target) return 0;
+         var x = thisEnd - thisStart;
+         var y = end - start;
+         var len = Math.min(x, y);
+         var thisCopy = this.slice(thisStart, thisEnd);
+         var targetCopy = target.slice(start, end);
+
+         for (var i = 0; i < len; ++i) {
+           if (thisCopy[i] !== targetCopy[i]) {
+             x = thisCopy[i];
+             y = targetCopy[i];
+             break;
+           }
+         }
+
+         if (x < y) return -1;
+         if (y < x) return 1;
+         return 0;
+       }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+       // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+       //
+       // Arguments:
+       // - buffer - a Buffer to search
+       // - val - a string, Buffer, or number
+       // - byteOffset - an index into `buffer`; will be clamped to an int32
+       // - encoding - an optional encoding, relevant is val is a string
+       // - dir - true for indexOf, false for lastIndexOf
+
+
+       function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
+         // Empty buffer means no match
+         if (buffer.length === 0) return -1; // Normalize byteOffset
+
+         if (typeof byteOffset === 'string') {
+           encoding = byteOffset;
+           byteOffset = 0;
+         } else if (byteOffset > 0x7fffffff) {
+           byteOffset = 0x7fffffff;
+         } else if (byteOffset < -0x80000000) {
+           byteOffset = -0x80000000;
+         }
+
+         byteOffset = +byteOffset; // Coerce to Number.
+
+         if (isNaN(byteOffset)) {
+           // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+           byteOffset = dir ? 0 : buffer.length - 1;
+         } // Normalize byteOffset: negative offsets start from the end of the buffer
+
+
+         if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
+
+         if (byteOffset >= buffer.length) {
+           if (dir) return -1;else byteOffset = buffer.length - 1;
+         } else if (byteOffset < 0) {
+           if (dir) byteOffset = 0;else return -1;
+         } // Normalize val
+
+
+         if (typeof val === 'string') {
+           val = Buffer.from(val, encoding);
+         } // Finally, search either indexOf (if dir is true) or lastIndexOf
+
+
+         if (internalIsBuffer(val)) {
+           // Special case: looking for empty string/buffer always fails
+           if (val.length === 0) {
+             return -1;
+           }
+
+           return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
+         } else if (typeof val === 'number') {
+           val = val & 0xFF; // Search for a byte value [0-255]
+
+           if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
+             if (dir) {
+               return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
+             } else {
+               return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
+             }
+           }
+
+           return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
+         }
+
+         throw new TypeError('val must be string, number or Buffer');
+       }
+
+       function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
+         var indexSize = 1;
+         var arrLength = arr.length;
+         var valLength = val.length;
+
+         if (encoding !== undefined) {
+           encoding = String(encoding).toLowerCase();
+
+           if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
+             if (arr.length < 2 || val.length < 2) {
+               return -1;
+             }
+
+             indexSize = 2;
+             arrLength /= 2;
+             valLength /= 2;
+             byteOffset /= 2;
+           }
+         }
+
+         function read(buf, i) {
+           if (indexSize === 1) {
+             return buf[i];
+           } else {
+             return buf.readUInt16BE(i * indexSize);
+           }
+         }
+
+         var i;
+
+         if (dir) {
+           var foundIndex = -1;
+
+           for (i = byteOffset; i < arrLength; i++) {
+             if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+               if (foundIndex === -1) foundIndex = i;
+               if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
+             } else {
+               if (foundIndex !== -1) i -= i - foundIndex;
+               foundIndex = -1;
+             }
+           }
+         } else {
+           if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
+
+           for (i = byteOffset; i >= 0; i--) {
+             var found = true;
+
+             for (var j = 0; j < valLength; j++) {
+               if (read(arr, i + j) !== read(val, j)) {
+                 found = false;
+                 break;
+               }
+             }
+
+             if (found) return i;
+           }
+         }
+
+         return -1;
+       }
+
+       Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
+         return this.indexOf(val, byteOffset, encoding) !== -1;
+       };
+
+       Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
+         return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
+       };
+
+       Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
+         return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
+       };
+
+       function hexWrite(buf, string, offset, length) {
+         offset = Number(offset) || 0;
+         var remaining = buf.length - offset;
+
+         if (!length) {
+           length = remaining;
+         } else {
+           length = Number(length);
+
+           if (length > remaining) {
+             length = remaining;
+           }
+         } // must be an even number of digits
+
+
+         var strLen = string.length;
+         if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
+
+         if (length > strLen / 2) {
+           length = strLen / 2;
+         }
+
+         for (var i = 0; i < length; ++i) {
+           var parsed = parseInt(string.substr(i * 2, 2), 16);
+           if (isNaN(parsed)) return i;
+           buf[offset + i] = parsed;
+         }
+
+         return i;
+       }
+
+       function utf8Write(buf, string, offset, length) {
+         return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
+       }
+
+       function asciiWrite(buf, string, offset, length) {
+         return blitBuffer(asciiToBytes(string), buf, offset, length);
+       }
+
+       function latin1Write(buf, string, offset, length) {
+         return asciiWrite(buf, string, offset, length);
+       }
+
+       function base64Write(buf, string, offset, length) {
+         return blitBuffer(base64ToBytes(string), buf, offset, length);
+       }
+
+       function ucs2Write(buf, string, offset, length) {
+         return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
+       }
+
+       Buffer.prototype.write = function write(string, offset, length, encoding) {
+         // Buffer#write(string)
+         if (offset === undefined) {
+           encoding = 'utf8';
+           length = this.length;
+           offset = 0; // Buffer#write(string, encoding)
+         } else if (length === undefined && typeof offset === 'string') {
+           encoding = offset;
+           length = this.length;
+           offset = 0; // Buffer#write(string, offset[, length][, encoding])
+         } else if (isFinite(offset)) {
+           offset = offset | 0;
+
+           if (isFinite(length)) {
+             length = length | 0;
+             if (encoding === undefined) encoding = 'utf8';
+           } else {
+             encoding = length;
+             length = undefined;
+           } // legacy write(string, encoding, offset, length) - remove in v0.13
+
+         } else {
+           throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
+         }
+
+         var remaining = this.length - offset;
+         if (length === undefined || length > remaining) length = remaining;
+
+         if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
+           throw new RangeError('Attempt to write outside buffer bounds');
+         }
+
+         if (!encoding) encoding = 'utf8';
+         var loweredCase = false;
+
+         for (;;) {
+           switch (encoding) {
+             case 'hex':
+               return hexWrite(this, string, offset, length);
+
+             case 'utf8':
+             case 'utf-8':
+               return utf8Write(this, string, offset, length);
+
+             case 'ascii':
+               return asciiWrite(this, string, offset, length);
+
+             case 'latin1':
+             case 'binary':
+               return latin1Write(this, string, offset, length);
+
+             case 'base64':
+               // Warning: maxLength not taken into account in base64Write
+               return base64Write(this, string, offset, length);
+
+             case 'ucs2':
+             case 'ucs-2':
+             case 'utf16le':
+             case 'utf-16le':
+               return ucs2Write(this, string, offset, length);
+
+             default:
+               if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
+               encoding = ('' + encoding).toLowerCase();
+               loweredCase = true;
+           }
+         }
+       };
+
+       Buffer.prototype.toJSON = function toJSON() {
+         return {
+           type: 'Buffer',
+           data: Array.prototype.slice.call(this._arr || this, 0)
+         };
+       };
+
+       function base64Slice(buf, start, end) {
+         if (start === 0 && end === buf.length) {
+           return fromByteArray(buf);
+         } else {
+           return fromByteArray(buf.slice(start, end));
+         }
+       }
+
+       function utf8Slice(buf, start, end) {
+         end = Math.min(buf.length, end);
+         var res = [];
+         var i = start;
+
+         while (i < end) {
+           var firstByte = buf[i];
+           var codePoint = null;
+           var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
+
+           if (i + bytesPerSequence <= end) {
+             var secondByte, thirdByte, fourthByte, tempCodePoint;
+
+             switch (bytesPerSequence) {
+               case 1:
+                 if (firstByte < 0x80) {
+                   codePoint = firstByte;
+                 }
+
+                 break;
+
+               case 2:
+                 secondByte = buf[i + 1];
+
+                 if ((secondByte & 0xC0) === 0x80) {
+                   tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
+
+                   if (tempCodePoint > 0x7F) {
+                     codePoint = tempCodePoint;
+                   }
+                 }
+
+                 break;
+
+               case 3:
+                 secondByte = buf[i + 1];
+                 thirdByte = buf[i + 2];
+
+                 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
+                   tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
+
+                   if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
+                     codePoint = tempCodePoint;
+                   }
+                 }
+
+                 break;
+
+               case 4:
+                 secondByte = buf[i + 1];
+                 thirdByte = buf[i + 2];
+                 fourthByte = buf[i + 3];
+
+                 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
+                   tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
+
+                   if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
+                     codePoint = tempCodePoint;
+                   }
+                 }
+
+             }
+           }
+
+           if (codePoint === null) {
+             // we did not generate a valid codePoint so insert a
+             // replacement char (U+FFFD) and advance only 1 byte
+             codePoint = 0xFFFD;
+             bytesPerSequence = 1;
+           } else if (codePoint > 0xFFFF) {
+             // encode to utf16 (surrogate pair dance)
+             codePoint -= 0x10000;
+             res.push(codePoint >>> 10 & 0x3FF | 0xD800);
+             codePoint = 0xDC00 | codePoint & 0x3FF;
+           }
+
+           res.push(codePoint);
+           i += bytesPerSequence;
+         }
+
+         return decodeCodePointsArray(res);
+       } // Based on http://stackoverflow.com/a/22747272/680742, the browser with
+       // the lowest limit is Chrome, with 0x10000 args.
+       // We go 1 magnitude less, for safety
+
+
+       var MAX_ARGUMENTS_LENGTH = 0x1000;
+
+       function decodeCodePointsArray(codePoints) {
+         var len = codePoints.length;
+
+         if (len <= MAX_ARGUMENTS_LENGTH) {
+           return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
+         } // Decode in chunks to avoid "call stack size exceeded".
+
+
+         var res = '';
+         var i = 0;
+
+         while (i < len) {
+           res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
+         }
+
+         return res;
+       }
+
+       function asciiSlice(buf, start, end) {
+         var ret = '';
+         end = Math.min(buf.length, end);
+
+         for (var i = start; i < end; ++i) {
+           ret += String.fromCharCode(buf[i] & 0x7F);
+         }
+
+         return ret;
+       }
+
+       function latin1Slice(buf, start, end) {
+         var ret = '';
+         end = Math.min(buf.length, end);
+
+         for (var i = start; i < end; ++i) {
+           ret += String.fromCharCode(buf[i]);
+         }
+
+         return ret;
+       }
+
+       function hexSlice(buf, start, end) {
+         var len = buf.length;
+         if (!start || start < 0) start = 0;
+         if (!end || end < 0 || end > len) end = len;
+         var out = '';
+
+         for (var i = start; i < end; ++i) {
+           out += toHex(buf[i]);
+         }
+
+         return out;
+       }
+
+       function utf16leSlice(buf, start, end) {
+         var bytes = buf.slice(start, end);
+         var res = '';
+
+         for (var i = 0; i < bytes.length; i += 2) {
+           res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
+         }
+
+         return res;
+       }
+
+       Buffer.prototype.slice = function slice(start, end) {
+         var len = this.length;
+         start = ~~start;
+         end = end === undefined ? len : ~~end;
+
+         if (start < 0) {
+           start += len;
+           if (start < 0) start = 0;
+         } else if (start > len) {
+           start = len;
+         }
+
+         if (end < 0) {
+           end += len;
+           if (end < 0) end = 0;
+         } else if (end > len) {
+           end = len;
+         }
+
+         if (end < start) end = start;
+         var newBuf;
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           newBuf = this.subarray(start, end);
+           newBuf.__proto__ = Buffer.prototype;
+         } else {
+           var sliceLen = end - start;
+           newBuf = new Buffer(sliceLen, undefined);
+
+           for (var i = 0; i < sliceLen; ++i) {
+             newBuf[i] = this[i + start];
+           }
+         }
+
+         return newBuf;
+       };
+       /*
+        * Need to make sure that buffer isn't trying to write out of bounds.
+        */
+
+
+       function checkOffset(offset, ext, length) {
+         if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
+         if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
+       }
+
+       Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+         if (!noAssert) checkOffset(offset, byteLength, this.length);
+         var val = this[offset];
+         var mul = 1;
+         var i = 0;
+
+         while (++i < byteLength && (mul *= 0x100)) {
+           val += this[offset + i] * mul;
+         }
+
+         return val;
+       };
+
+       Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+
+         if (!noAssert) {
+           checkOffset(offset, byteLength, this.length);
+         }
+
+         var val = this[offset + --byteLength];
+         var mul = 1;
+
+         while (byteLength > 0 && (mul *= 0x100)) {
+           val += this[offset + --byteLength] * mul;
+         }
+
+         return val;
+       };
+
+       Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 1, this.length);
+         return this[offset];
+       };
+
+       Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 2, this.length);
+         return this[offset] | this[offset + 1] << 8;
+       };
+
+       Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 2, this.length);
+         return this[offset] << 8 | this[offset + 1];
+       };
+
+       Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 4, this.length);
+         return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
+       };
+
+       Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 4, this.length);
+         return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
+       };
+
+       Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+         if (!noAssert) checkOffset(offset, byteLength, this.length);
+         var val = this[offset];
+         var mul = 1;
+         var i = 0;
+
+         while (++i < byteLength && (mul *= 0x100)) {
+           val += this[offset + i] * mul;
+         }
+
+         mul *= 0x80;
+         if (val >= mul) val -= Math.pow(2, 8 * byteLength);
+         return val;
+       };
+
+       Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+         if (!noAssert) checkOffset(offset, byteLength, this.length);
+         var i = byteLength;
+         var mul = 1;
+         var val = this[offset + --i];
+
+         while (i > 0 && (mul *= 0x100)) {
+           val += this[offset + --i] * mul;
+         }
+
+         mul *= 0x80;
+         if (val >= mul) val -= Math.pow(2, 8 * byteLength);
+         return val;
+       };
+
+       Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 1, this.length);
+         if (!(this[offset] & 0x80)) return this[offset];
+         return (0xff - this[offset] + 1) * -1;
+       };
+
+       Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 2, this.length);
+         var val = this[offset] | this[offset + 1] << 8;
+         return val & 0x8000 ? val | 0xFFFF0000 : val;
+       };
+
+       Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 2, this.length);
+         var val = this[offset + 1] | this[offset] << 8;
+         return val & 0x8000 ? val | 0xFFFF0000 : val;
+       };
+
+       Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 4, this.length);
+         return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
+       };
+
+       Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 4, this.length);
+         return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
+       };
+
+       Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 4, this.length);
+         return read(this, offset, true, 23, 4);
+       };
+
+       Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 4, this.length);
+         return read(this, offset, false, 23, 4);
+       };
+
+       Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 8, this.length);
+         return read(this, offset, true, 52, 8);
+       };
+
+       Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
+         if (!noAssert) checkOffset(offset, 8, this.length);
+         return read(this, offset, false, 52, 8);
+       };
+
+       function checkInt(buf, value, offset, ext, max, min) {
+         if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
+         if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
+         if (offset + ext > buf.length) throw new RangeError('Index out of range');
+       }
+
+       Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+
+         if (!noAssert) {
+           var maxBytes = Math.pow(2, 8 * byteLength) - 1;
+           checkInt(this, value, offset, byteLength, maxBytes, 0);
+         }
+
+         var mul = 1;
+         var i = 0;
+         this[offset] = value & 0xFF;
+
+         while (++i < byteLength && (mul *= 0x100)) {
+           this[offset + i] = value / mul & 0xFF;
+         }
+
+         return offset + byteLength;
+       };
+
+       Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+
+         if (!noAssert) {
+           var maxBytes = Math.pow(2, 8 * byteLength) - 1;
+           checkInt(this, value, offset, byteLength, maxBytes, 0);
+         }
+
+         var i = byteLength - 1;
+         var mul = 1;
+         this[offset + i] = value & 0xFF;
+
+         while (--i >= 0 && (mul *= 0x100)) {
+           this[offset + i] = value / mul & 0xFF;
+         }
+
+         return offset + byteLength;
+       };
+
+       Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
+         if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
+         this[offset] = value & 0xff;
+         return offset + 1;
+       };
+
+       function objectWriteUInt16(buf, value, offset, littleEndian) {
+         if (value < 0) value = 0xffff + value + 1;
+
+         for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
+           buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
+         }
+       }
+
+       Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value & 0xff;
+           this[offset + 1] = value >>> 8;
+         } else {
+           objectWriteUInt16(this, value, offset, true);
+         }
+
+         return offset + 2;
+       };
+
+       Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value >>> 8;
+           this[offset + 1] = value & 0xff;
+         } else {
+           objectWriteUInt16(this, value, offset, false);
+         }
+
+         return offset + 2;
+       };
+
+       function objectWriteUInt32(buf, value, offset, littleEndian) {
+         if (value < 0) value = 0xffffffff + value + 1;
+
+         for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
+           buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
+         }
+       }
+
+       Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           this[offset + 3] = value >>> 24;
+           this[offset + 2] = value >>> 16;
+           this[offset + 1] = value >>> 8;
+           this[offset] = value & 0xff;
+         } else {
+           objectWriteUInt32(this, value, offset, true);
+         }
+
+         return offset + 4;
+       };
+
+       Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value >>> 24;
+           this[offset + 1] = value >>> 16;
+           this[offset + 2] = value >>> 8;
+           this[offset + 3] = value & 0xff;
+         } else {
+           objectWriteUInt32(this, value, offset, false);
+         }
+
+         return offset + 4;
+       };
+
+       Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
+         value = +value;
+         offset = offset | 0;
+
+         if (!noAssert) {
+           var limit = Math.pow(2, 8 * byteLength - 1);
+           checkInt(this, value, offset, byteLength, limit - 1, -limit);
+         }
+
+         var i = 0;
+         var mul = 1;
+         var sub = 0;
+         this[offset] = value & 0xFF;
+
+         while (++i < byteLength && (mul *= 0x100)) {
+           if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+             sub = 1;
+           }
+
+           this[offset + i] = (value / mul >> 0) - sub & 0xFF;
+         }
+
+         return offset + byteLength;
+       };
+
+       Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
+         value = +value;
+         offset = offset | 0;
+
+         if (!noAssert) {
+           var limit = Math.pow(2, 8 * byteLength - 1);
+           checkInt(this, value, offset, byteLength, limit - 1, -limit);
+         }
+
+         var i = byteLength - 1;
+         var mul = 1;
+         var sub = 0;
+         this[offset + i] = value & 0xFF;
+
+         while (--i >= 0 && (mul *= 0x100)) {
+           if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+             sub = 1;
+           }
+
+           this[offset + i] = (value / mul >> 0) - sub & 0xFF;
+         }
+
+         return offset + byteLength;
+       };
+
+       Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
+         if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
+         if (value < 0) value = 0xff + value + 1;
+         this[offset] = value & 0xff;
+         return offset + 1;
+       };
+
+       Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value & 0xff;
+           this[offset + 1] = value >>> 8;
+         } else {
+           objectWriteUInt16(this, value, offset, true);
+         }
+
+         return offset + 2;
+       };
+
+       Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value >>> 8;
+           this[offset + 1] = value & 0xff;
+         } else {
+           objectWriteUInt16(this, value, offset, false);
+         }
+
+         return offset + 2;
+       };
+
+       Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value & 0xff;
+           this[offset + 1] = value >>> 8;
+           this[offset + 2] = value >>> 16;
+           this[offset + 3] = value >>> 24;
+         } else {
+           objectWriteUInt32(this, value, offset, true);
+         }
+
+         return offset + 4;
+       };
+
+       Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
+         if (value < 0) value = 0xffffffff + value + 1;
+
+         if (Buffer.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value >>> 24;
+           this[offset + 1] = value >>> 16;
+           this[offset + 2] = value >>> 8;
+           this[offset + 3] = value & 0xff;
+         } else {
+           objectWriteUInt32(this, value, offset, false);
+         }
+
+         return offset + 4;
+       };
+
+       function checkIEEE754(buf, value, offset, ext, max, min) {
+         if (offset + ext > buf.length) throw new RangeError('Index out of range');
+         if (offset < 0) throw new RangeError('Index out of range');
+       }
+
+       function writeFloat(buf, value, offset, littleEndian, noAssert) {
+         if (!noAssert) {
+           checkIEEE754(buf, value, offset, 4);
+         }
+
+         write(buf, value, offset, littleEndian, 23, 4);
+         return offset + 4;
+       }
+
+       Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
+         return writeFloat(this, value, offset, true, noAssert);
+       };
+
+       Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
+         return writeFloat(this, value, offset, false, noAssert);
+       };
+
+       function writeDouble(buf, value, offset, littleEndian, noAssert) {
+         if (!noAssert) {
+           checkIEEE754(buf, value, offset, 8);
+         }
+
+         write(buf, value, offset, littleEndian, 52, 8);
+         return offset + 8;
+       }
+
+       Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
+         return writeDouble(this, value, offset, true, noAssert);
+       };
+
+       Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
+         return writeDouble(this, value, offset, false, noAssert);
+       }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+
+
+       Buffer.prototype.copy = function copy(target, targetStart, start, end) {
+         if (!start) start = 0;
+         if (!end && end !== 0) end = this.length;
+         if (targetStart >= target.length) targetStart = target.length;
+         if (!targetStart) targetStart = 0;
+         if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done
+
+         if (end === start) return 0;
+         if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions
+
+         if (targetStart < 0) {
+           throw new RangeError('targetStart out of bounds');
+         }
+
+         if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
+         if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?
+
+         if (end > this.length) end = this.length;
+
+         if (target.length - targetStart < end - start) {
+           end = target.length - targetStart + start;
+         }
+
+         var len = end - start;
+         var i;
+
+         if (this === target && start < targetStart && targetStart < end) {
+           // descending copy from end
+           for (i = len - 1; i >= 0; --i) {
+             target[i + targetStart] = this[i + start];
+           }
+         } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
+           // ascending copy from start
+           for (i = 0; i < len; ++i) {
+             target[i + targetStart] = this[i + start];
+           }
+         } else {
+           Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
+         }
+
+         return len;
+       }; // Usage:
+       //    buffer.fill(number[, offset[, end]])
+       //    buffer.fill(buffer[, offset[, end]])
+       //    buffer.fill(string[, offset[, end]][, encoding])
+
+
+       Buffer.prototype.fill = function fill(val, start, end, encoding) {
+         // Handle string cases:
+         if (typeof val === 'string') {
+           if (typeof start === 'string') {
+             encoding = start;
+             start = 0;
+             end = this.length;
+           } else if (typeof end === 'string') {
+             encoding = end;
+             end = this.length;
+           }
+
+           if (val.length === 1) {
+             var code = val.charCodeAt(0);
+
+             if (code < 256) {
+               val = code;
+             }
+           }
+
+           if (encoding !== undefined && typeof encoding !== 'string') {
+             throw new TypeError('encoding must be a string');
+           }
+
+           if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+             throw new TypeError('Unknown encoding: ' + encoding);
+           }
+         } else if (typeof val === 'number') {
+           val = val & 255;
+         } // Invalid ranges are not set to a default, so can range check early.
+
+
+         if (start < 0 || this.length < start || this.length < end) {
+           throw new RangeError('Out of range index');
+         }
+
+         if (end <= start) {
+           return this;
+         }
+
+         start = start >>> 0;
+         end = end === undefined ? this.length : end >>> 0;
+         if (!val) val = 0;
+         var i;
+
+         if (typeof val === 'number') {
+           for (i = start; i < end; ++i) {
+             this[i] = val;
+           }
+         } else {
+           var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());
+           var len = bytes.length;
+
+           for (i = 0; i < end - start; ++i) {
+             this[i + start] = bytes[i % len];
+           }
+         }
+
+         return this;
+       }; // HELPER FUNCTIONS
+       // ================
+
+
+       var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
+
+       function base64clean(str) {
+         // Node strips out invalid characters like \n and \t from the string, base64-js does not
+         str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''
+
+         if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+
+         while (str.length % 4 !== 0) {
+           str = str + '=';
+         }
+
+         return str;
+       }
+
+       function stringtrim(str) {
+         if (str.trim) return str.trim();
+         return str.replace(/^\s+|\s+$/g, '');
+       }
+
+       function toHex(n) {
+         if (n < 16) return '0' + n.toString(16);
+         return n.toString(16);
+       }
+
+       function utf8ToBytes(string, units) {
+         units = units || Infinity;
+         var codePoint;
+         var length = string.length;
+         var leadSurrogate = null;
+         var bytes = [];
+
+         for (var i = 0; i < length; ++i) {
+           codePoint = string.charCodeAt(i); // is surrogate component
+
+           if (codePoint > 0xD7FF && codePoint < 0xE000) {
+             // last char was a lead
+             if (!leadSurrogate) {
+               // no lead yet
+               if (codePoint > 0xDBFF) {
+                 // unexpected trail
+                 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+                 continue;
+               } else if (i + 1 === length) {
+                 // unpaired lead
+                 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+                 continue;
+               } // valid lead
+
+
+               leadSurrogate = codePoint;
+               continue;
+             } // 2 leads in a row
+
+
+             if (codePoint < 0xDC00) {
+               if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+               leadSurrogate = codePoint;
+               continue;
+             } // valid surrogate pair
+
+
+             codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
+           } else if (leadSurrogate) {
+             // valid bmp char, but last char was a lead
+             if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+           }
+
+           leadSurrogate = null; // encode utf8
+
+           if (codePoint < 0x80) {
+             if ((units -= 1) < 0) break;
+             bytes.push(codePoint);
+           } else if (codePoint < 0x800) {
+             if ((units -= 2) < 0) break;
+             bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
+           } else if (codePoint < 0x10000) {
+             if ((units -= 3) < 0) break;
+             bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
+           } else if (codePoint < 0x110000) {
+             if ((units -= 4) < 0) break;
+             bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
+           } else {
+             throw new Error('Invalid code point');
+           }
+         }
+
+         return bytes;
+       }
+
+       function asciiToBytes(str) {
+         var byteArray = [];
+
+         for (var i = 0; i < str.length; ++i) {
+           // Node's code seems to be doing this and not & 0x7F..
+           byteArray.push(str.charCodeAt(i) & 0xFF);
+         }
+
+         return byteArray;
+       }
+
+       function utf16leToBytes(str, units) {
+         var c, hi, lo;
+         var byteArray = [];
+
+         for (var i = 0; i < str.length; ++i) {
+           if ((units -= 2) < 0) break;
+           c = str.charCodeAt(i);
+           hi = c >> 8;
+           lo = c % 256;
+           byteArray.push(lo);
+           byteArray.push(hi);
+         }
+
+         return byteArray;
+       }
+
+       function base64ToBytes(str) {
+         return toByteArray(base64clean(str));
+       }
+
+       function blitBuffer(src, dst, offset, length) {
+         for (var i = 0; i < length; ++i) {
+           if (i + offset >= dst.length || i >= src.length) break;
+           dst[i + offset] = src[i];
+         }
+
+         return i;
+       }
+
+       function isnan(val) {
+         return val !== val; // eslint-disable-line no-self-compare
+       } // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence
+       // The _isBuffer check is for Safari 5-7 support, because it's missing
+       // Object.prototype.constructor. Remove this eventually
+
+
+       function isBuffer(obj) {
+         return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj));
+       }
+
+       function isFastBuffer(obj) {
+         return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
+       } // For Node v0.10 support. Remove this eventually.
+
+
+       function isSlowBuffer(obj) {
+         return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0));
+       }
+
+       // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
+
+       function defaultSetTimout$1() {
+         throw new Error('setTimeout has not been defined');
+       }
+
+       function defaultClearTimeout$1() {
+         throw new Error('clearTimeout has not been defined');
+       }
+
+       var cachedSetTimeout$1 = defaultSetTimout$1;
+       var cachedClearTimeout$1 = defaultClearTimeout$1;
+
+       if (typeof global$2.setTimeout === 'function') {
+         cachedSetTimeout$1 = setTimeout;
+       }
+
+       if (typeof global$2.clearTimeout === 'function') {
+         cachedClearTimeout$1 = clearTimeout;
+       }
+
+       function runTimeout$1(fun) {
+         if (cachedSetTimeout$1 === setTimeout) {
+           //normal enviroments in sane situations
+           return setTimeout(fun, 0);
+         } // if setTimeout wasn't available but was latter defined
+
+
+         if ((cachedSetTimeout$1 === defaultSetTimout$1 || !cachedSetTimeout$1) && setTimeout) {
+           cachedSetTimeout$1 = setTimeout;
+           return setTimeout(fun, 0);
+         }
+
+         try {
+           // when when somebody has screwed with setTimeout but no I.E. maddness
+           return cachedSetTimeout$1(fun, 0);
+         } catch (e) {
+           try {
+             // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+             return cachedSetTimeout$1.call(null, fun, 0);
+           } catch (e) {
+             // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+             return cachedSetTimeout$1.call(this, fun, 0);
+           }
+         }
+       }
+
+       function runClearTimeout$1(marker) {
+         if (cachedClearTimeout$1 === clearTimeout) {
+           //normal enviroments in sane situations
+           return clearTimeout(marker);
+         } // if clearTimeout wasn't available but was latter defined
+
+
+         if ((cachedClearTimeout$1 === defaultClearTimeout$1 || !cachedClearTimeout$1) && clearTimeout) {
+           cachedClearTimeout$1 = clearTimeout;
+           return clearTimeout(marker);
+         }
+
+         try {
+           // when when somebody has screwed with setTimeout but no I.E. maddness
+           return cachedClearTimeout$1(marker);
+         } catch (e) {
+           try {
+             // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
+             return cachedClearTimeout$1.call(null, marker);
+           } catch (e) {
+             // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+             // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+             return cachedClearTimeout$1.call(this, marker);
+           }
+         }
+       }
+
+       var queue$1 = [];
+       var draining$1 = false;
+       var currentQueue$1;
+       var queueIndex$1 = -1;
+
+       function cleanUpNextTick$1() {
+         if (!draining$1 || !currentQueue$1) {
+           return;
+         }
+
+         draining$1 = false;
+
+         if (currentQueue$1.length) {
+           queue$1 = currentQueue$1.concat(queue$1);
+         } else {
+           queueIndex$1 = -1;
+         }
+
+         if (queue$1.length) {
+           drainQueue$1();
+         }
+       }
+
+       function drainQueue$1() {
+         if (draining$1) {
+           return;
+         }
+
+         var timeout = runTimeout$1(cleanUpNextTick$1);
+         draining$1 = true;
+         var len = queue$1.length;
+
+         while (len) {
+           currentQueue$1 = queue$1;
+           queue$1 = [];
+
+           while (++queueIndex$1 < len) {
+             if (currentQueue$1) {
+               currentQueue$1[queueIndex$1].run();
+             }
+           }
+
+           queueIndex$1 = -1;
+           len = queue$1.length;
+         }
+
+         currentQueue$1 = null;
+         draining$1 = false;
+         runClearTimeout$1(timeout);
+       }
+
+       function nextTick$1(fun) {
+         var args = new Array(arguments.length - 1);
+
+         if (arguments.length > 1) {
+           for (var i = 1; i < arguments.length; i++) {
+             args[i - 1] = arguments[i];
+           }
+         }
+
+         queue$1.push(new Item$1(fun, args));
+
+         if (queue$1.length === 1 && !draining$1) {
+           runTimeout$1(drainQueue$1);
+         }
+       } // v8 likes predictible objects
+
+
+       function Item$1(fun, array) {
+         this.fun = fun;
+         this.array = array;
+       }
+
+       Item$1.prototype.run = function () {
+         this.fun.apply(null, this.array);
+       };
+
+
+       var performance$1 = global$2.performance || {};
+
+       var performanceNow$1 = performance$1.now || performance$1.mozNow || performance$1.msNow || performance$1.oNow || performance$1.webkitNow || function () {
+         return new Date().getTime();
+       }; // generate timestamp or delta
+
+       var inherits;
+
+       if (typeof Object.create === 'function') {
+         inherits = function inherits(ctor, superCtor) {
+           // implementation from standard node.js 'util' module
+           ctor.super_ = superCtor;
+           ctor.prototype = Object.create(superCtor.prototype, {
+             constructor: {
+               value: ctor,
+               enumerable: false,
+               writable: true,
+               configurable: true
+             }
+           });
+         };
+       } else {
+         inherits = function inherits(ctor, superCtor) {
+           ctor.super_ = superCtor;
+
+           var TempCtor = function TempCtor() {};
+
+           TempCtor.prototype = superCtor.prototype;
+           ctor.prototype = new TempCtor();
+           ctor.prototype.constructor = ctor;
+         };
+       }
+
+       var inherits$1 = inherits;
+
+       var formatRegExp = /%[sdj%]/g;
+       function format(f) {
+         if (!isString(f)) {
+           var objects = [];
+
+           for (var i = 0; i < arguments.length; i++) {
+             objects.push(inspect(arguments[i]));
+           }
+
+           return objects.join(' ');
+         }
+
+         var i = 1;
+         var args = arguments;
+         var len = args.length;
+         var str = String(f).replace(formatRegExp, function (x) {
+           if (x === '%%') return '%';
+           if (i >= len) return x;
+
+           switch (x) {
+             case '%s':
+               return String(args[i++]);
+
+             case '%d':
+               return Number(args[i++]);
+
+             case '%j':
+               try {
+                 return JSON.stringify(args[i++]);
+               } catch (_) {
+                 return '[Circular]';
+               }
+
+             default:
+               return x;
+           }
+         });
+
+         for (var x = args[i]; i < len; x = args[++i]) {
+           if (isNull(x) || !isObject$1(x)) {
+             str += ' ' + x;
+           } else {
+             str += ' ' + inspect(x);
+           }
+         }
+
+         return str;
+       }
+       // Returns a modified function which warns once by default.
+       // If --no-deprecation is set, then it is a no-op.
+
+       function deprecate(fn, msg) {
+         // Allow for deprecating things in the process of starting up.
+         if (isUndefined(global$2.process)) {
+           return function () {
+             return deprecate(fn, msg).apply(this, arguments);
+           };
+         }
+
+         var warned = false;
+
+         function deprecated() {
+           if (!warned) {
+             {
+               console.error(msg);
+             }
+
+             warned = true;
+           }
+
+           return fn.apply(this, arguments);
+         }
+
+         return deprecated;
+       }
+       var debugs = {};
+       var debugEnviron;
+       function debuglog(set) {
+         if (isUndefined(debugEnviron)) debugEnviron =  '';
+         set = set.toUpperCase();
+
+         if (!debugs[set]) {
+           if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+             var pid = 0;
+
+             debugs[set] = function () {
+               var msg = format.apply(null, arguments);
+               console.error('%s %d: %s', set, pid, msg);
+             };
+           } else {
+             debugs[set] = function () {};
+           }
+         }
+
+         return debugs[set];
+       }
+       /**
+        * Echos the value of a value. Trys to print the value out
+        * in the best way possible given the different types.
+        *
+        * @param {Object} obj The object to print out.
+        * @param {Object} opts Optional options object that alters the output.
+        */
+
+       /* legacy: obj, showHidden, depth, colors*/
+
+       function inspect(obj, opts) {
+         // default options
+         var ctx = {
+           seen: [],
+           stylize: stylizeNoColor
+         }; // legacy...
+
+         if (arguments.length >= 3) ctx.depth = arguments[2];
+         if (arguments.length >= 4) ctx.colors = arguments[3];
+
+         if (isBoolean(opts)) {
+           // legacy...
+           ctx.showHidden = opts;
+         } else if (opts) {
+           // got an "options" object
+           _extend(ctx, opts);
+         } // set default options
+
+
+         if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+         if (isUndefined(ctx.depth)) ctx.depth = 2;
+         if (isUndefined(ctx.colors)) ctx.colors = false;
+         if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+         if (ctx.colors) ctx.stylize = stylizeWithColor;
+         return formatValue(ctx, obj, ctx.depth);
+       } // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+
+       inspect.colors = {
+         'bold': [1, 22],
+         'italic': [3, 23],
+         'underline': [4, 24],
+         'inverse': [7, 27],
+         'white': [37, 39],
+         'grey': [90, 39],
+         'black': [30, 39],
+         'blue': [34, 39],
+         'cyan': [36, 39],
+         'green': [32, 39],
+         'magenta': [35, 39],
+         'red': [31, 39],
+         'yellow': [33, 39]
+       }; // Don't use 'blue' not visible on cmd.exe
+
+       inspect.styles = {
+         'special': 'cyan',
+         'number': 'yellow',
+         'boolean': 'yellow',
+         'undefined': 'grey',
+         'null': 'bold',
+         'string': 'green',
+         'date': 'magenta',
+         // "name": intentionally not styling
+         'regexp': 'red'
+       };
+
+       function stylizeWithColor(str, styleType) {
+         var style = inspect.styles[styleType];
+
+         if (style) {
+           return "\x1B[" + inspect.colors[style][0] + 'm' + str + "\x1B[" + inspect.colors[style][1] + 'm';
+         } else {
+           return str;
+         }
+       }
+
+       function stylizeNoColor(str, styleType) {
+         return str;
+       }
+
+       function arrayToHash(array) {
+         var hash = {};
+         array.forEach(function (val, idx) {
+           hash[val] = true;
+         });
+         return hash;
+       }
+
+       function formatValue(ctx, value, recurseTimes) {
+         // Provide a hook for user-specified inspect functions.
+         // Check that value is an object with an inspect function on it
+         if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special
+         value.inspect !== inspect && // Also filter out any prototype objects using the circular check.
+         !(value.constructor && value.constructor.prototype === value)) {
+           var ret = value.inspect(recurseTimes, ctx);
+
+           if (!isString(ret)) {
+             ret = formatValue(ctx, ret, recurseTimes);
+           }
+
+           return ret;
+         } // Primitive types cannot have properties
+
+
+         var primitive = formatPrimitive(ctx, value);
+
+         if (primitive) {
+           return primitive;
+         } // Look up the keys of the object.
+
+
+         var keys = Object.keys(value);
+         var visibleKeys = arrayToHash(keys);
+
+         if (ctx.showHidden) {
+           keys = Object.getOwnPropertyNames(value);
+         } // IE doesn't make error fields non-enumerable
+         // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
+
+
+         if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
+           return formatError(value);
+         } // Some type of object without properties can be shortcutted.
+
+
+         if (keys.length === 0) {
+           if (isFunction(value)) {
+             var name = value.name ? ': ' + value.name : '';
+             return ctx.stylize('[Function' + name + ']', 'special');
+           }
+
+           if (isRegExp(value)) {
+             return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+           }
+
+           if (isDate(value)) {
+             return ctx.stylize(Date.prototype.toString.call(value), 'date');
+           }
+
+           if (isError(value)) {
+             return formatError(value);
+           }
+         }
+
+         var base = '',
+             array = false,
+             braces = ['{', '}']; // Make Array say that they are Array
+
+         if (isArray$2(value)) {
+           array = true;
+           braces = ['[', ']'];
+         } // Make functions say that they are functions
+
+
+         if (isFunction(value)) {
+           var n = value.name ? ': ' + value.name : '';
+           base = ' [Function' + n + ']';
+         } // Make RegExps say that they are RegExps
+
+
+         if (isRegExp(value)) {
+           base = ' ' + RegExp.prototype.toString.call(value);
+         } // Make dates with properties first say the date
+
+
+         if (isDate(value)) {
+           base = ' ' + Date.prototype.toUTCString.call(value);
+         } // Make error with message first say the error
+
+
+         if (isError(value)) {
+           base = ' ' + formatError(value);
+         }
+
+         if (keys.length === 0 && (!array || value.length == 0)) {
+           return braces[0] + base + braces[1];
+         }
+
+         if (recurseTimes < 0) {
+           if (isRegExp(value)) {
+             return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+           } else {
+             return ctx.stylize('[Object]', 'special');
+           }
+         }
+
+         ctx.seen.push(value);
+         var output;
+
+         if (array) {
+           output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+         } else {
+           output = keys.map(function (key) {
+             return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+           });
+         }
+
+         ctx.seen.pop();
+         return reduceToSingleString(output, base, braces);
+       }
+
+       function formatPrimitive(ctx, value) {
+         if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
+
+         if (isString(value)) {
+           var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\'';
+           return ctx.stylize(simple, 'string');
+         }
+
+         if (isNumber(value)) return ctx.stylize('' + value, 'number');
+         if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); // For some reason typeof null is "object", so special case here.
+
+         if (isNull(value)) return ctx.stylize('null', 'null');
+       }
+
+       function formatError(value) {
+         return '[' + Error.prototype.toString.call(value) + ']';
+       }
+
+       function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+         var output = [];
+
+         for (var i = 0, l = value.length; i < l; ++i) {
+           if (hasOwnProperty$1(value, String(i))) {
+             output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
+           } else {
+             output.push('');
+           }
+         }
+
+         keys.forEach(function (key) {
+           if (!key.match(/^\d+$/)) {
+             output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
+           }
+         });
+         return output;
+       }
+
+       function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+         var name, str, desc;
+         desc = Object.getOwnPropertyDescriptor(value, key) || {
+           value: value[key]
+         };
+
+         if (desc.get) {
+           if (desc.set) {
+             str = ctx.stylize('[Getter/Setter]', 'special');
+           } else {
+             str = ctx.stylize('[Getter]', 'special');
+           }
+         } else {
+           if (desc.set) {
+             str = ctx.stylize('[Setter]', 'special');
+           }
+         }
+
+         if (!hasOwnProperty$1(visibleKeys, key)) {
+           name = '[' + key + ']';
+         }
+
+         if (!str) {
+           if (ctx.seen.indexOf(desc.value) < 0) {
+             if (isNull(recurseTimes)) {
+               str = formatValue(ctx, desc.value, null);
+             } else {
+               str = formatValue(ctx, desc.value, recurseTimes - 1);
+             }
+
+             if (str.indexOf('\n') > -1) {
+               if (array) {
+                 str = str.split('\n').map(function (line) {
+                   return '  ' + line;
+                 }).join('\n').substr(2);
+               } else {
+                 str = '\n' + str.split('\n').map(function (line) {
+                   return '   ' + line;
+                 }).join('\n');
+               }
+             }
+           } else {
+             str = ctx.stylize('[Circular]', 'special');
+           }
+         }
+
+         if (isUndefined(name)) {
+           if (array && key.match(/^\d+$/)) {
+             return str;
+           }
+
+           name = JSON.stringify('' + key);
+
+           if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+             name = name.substr(1, name.length - 2);
+             name = ctx.stylize(name, 'name');
+           } else {
+             name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
+             name = ctx.stylize(name, 'string');
+           }
+         }
+
+         return name + ': ' + str;
+       }
+
+       function reduceToSingleString(output, base, braces) {
+         var length = output.reduce(function (prev, cur) {
+           if (cur.indexOf('\n') >= 0) ;
+           return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+         }, 0);
+
+         if (length > 60) {
+           return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n  ') + ' ' + braces[1];
+         }
+
+         return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+       } // NOTE: These type checking functions intentionally don't use `instanceof`
+       // because it is fragile and can be easily faked with `Object.create()`.
+
+
+       function isArray$2(ar) {
+         return Array.isArray(ar);
+       }
+       function isBoolean(arg) {
+         return typeof arg === 'boolean';
+       }
+       function isNull(arg) {
+         return arg === null;
+       }
+       function isNullOrUndefined(arg) {
+         return arg == null;
+       }
+       function isNumber(arg) {
+         return typeof arg === 'number';
+       }
+       function isString(arg) {
+         return typeof arg === 'string';
+       }
+       function isSymbol$1(arg) {
+         return _typeof(arg) === 'symbol';
+       }
+       function isUndefined(arg) {
+         return arg === void 0;
+       }
+       function isRegExp(re) {
+         return isObject$1(re) && objectToString$1(re) === '[object RegExp]';
+       }
+       function isObject$1(arg) {
+         return _typeof(arg) === 'object' && arg !== null;
+       }
+       function isDate(d) {
+         return isObject$1(d) && objectToString$1(d) === '[object Date]';
+       }
+       function isError(e) {
+         return isObject$1(e) && (objectToString$1(e) === '[object Error]' || e instanceof Error);
+       }
+       function isFunction(arg) {
+         return typeof arg === 'function';
+       }
+       function isPrimitive(arg) {
+         return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || _typeof(arg) === 'symbol' || // ES6 symbol
+         typeof arg === 'undefined';
+       }
+       function isBuffer$1(maybeBuf) {
+         return isBuffer(maybeBuf);
+       }
+
+       function objectToString$1(o) {
+         return Object.prototype.toString.call(o);
+       }
+
+       function pad(n) {
+         return n < 10 ? '0' + n.toString(10) : n.toString(10);
+       }
+
+       var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // 26 Feb 16:19:34
+
+       function timestamp() {
+         var d = new Date();
+         var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':');
+         return [d.getDate(), months[d.getMonth()], time].join(' ');
+       } // log is just a thin wrapper to console.log that prepends a timestamp
+
+
+       function log$1() {
+         console.log('%s - %s', timestamp(), format.apply(null, arguments));
+       }
+       function _extend(origin, add) {
+         // Don't do anything if add isn't an object
+         if (!add || !isObject$1(add)) return origin;
+         var keys = Object.keys(add);
+         var i = keys.length;
+
+         while (i--) {
+           origin[keys[i]] = add[keys[i]];
+         }
+
+         return origin;
+       }
+
+       function hasOwnProperty$1(obj, prop) {
+         return Object.prototype.hasOwnProperty.call(obj, prop);
+       }
+
+       var util = {
+         inherits: inherits$1,
+         _extend: _extend,
+         log: log$1,
+         isBuffer: isBuffer$1,
+         isPrimitive: isPrimitive,
+         isFunction: isFunction,
+         isError: isError,
+         isDate: isDate,
+         isObject: isObject$1,
+         isRegExp: isRegExp,
+         isUndefined: isUndefined,
+         isSymbol: isSymbol$1,
+         isString: isString,
+         isNumber: isNumber,
+         isNullOrUndefined: isNullOrUndefined,
+         isNull: isNull,
+         isBoolean: isBoolean,
+         isArray: isArray$2,
+         inspect: inspect,
+         deprecate: deprecate,
+         format: format,
+         debuglog: debuglog
+       };
+
+       var lookup$1 = [];
+       var revLookup$1 = [];
+       var Arr$1 = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
+       var inited$1 = false;
+
+       function init$1() {
+         inited$1 = true;
+         var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+
+         for (var i = 0, len = code.length; i < len; ++i) {
+           lookup$1[i] = code[i];
+           revLookup$1[code.charCodeAt(i)] = i;
+         }
+
+         revLookup$1['-'.charCodeAt(0)] = 62;
+         revLookup$1['_'.charCodeAt(0)] = 63;
+       }
+
+       function toByteArray$1(b64) {
+         if (!inited$1) {
+           init$1();
+         }
+
+         var i, j, l, tmp, placeHolders, arr;
+         var len = b64.length;
+
+         if (len % 4 > 0) {
+           throw new Error('Invalid string. Length must be a multiple of 4');
+         } // the number of equal signs (place holders)
+         // if there are two placeholders, than the two characters before it
+         // represent one byte
+         // if there is only one, then the three characters before it represent 2 bytes
+         // this is just a cheap hack to not do indexOf twice
+
+
+         placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; // base64 is 4/3 + up to two characters of the original data
+
+         arr = new Arr$1(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars
+
+         l = placeHolders > 0 ? len - 4 : len;
+         var L = 0;
+
+         for (i = 0, j = 0; i < l; i += 4, j += 3) {
+           tmp = revLookup$1[b64.charCodeAt(i)] << 18 | revLookup$1[b64.charCodeAt(i + 1)] << 12 | revLookup$1[b64.charCodeAt(i + 2)] << 6 | revLookup$1[b64.charCodeAt(i + 3)];
+           arr[L++] = tmp >> 16 & 0xFF;
+           arr[L++] = tmp >> 8 & 0xFF;
+           arr[L++] = tmp & 0xFF;
+         }
+
+         if (placeHolders === 2) {
+           tmp = revLookup$1[b64.charCodeAt(i)] << 2 | revLookup$1[b64.charCodeAt(i + 1)] >> 4;
+           arr[L++] = tmp & 0xFF;
+         } else if (placeHolders === 1) {
+           tmp = revLookup$1[b64.charCodeAt(i)] << 10 | revLookup$1[b64.charCodeAt(i + 1)] << 4 | revLookup$1[b64.charCodeAt(i + 2)] >> 2;
+           arr[L++] = tmp >> 8 & 0xFF;
+           arr[L++] = tmp & 0xFF;
+         }
+
+         return arr;
+       }
+
+       function tripletToBase64$1(num) {
+         return lookup$1[num >> 18 & 0x3F] + lookup$1[num >> 12 & 0x3F] + lookup$1[num >> 6 & 0x3F] + lookup$1[num & 0x3F];
+       }
+
+       function encodeChunk$1(uint8, start, end) {
+         var tmp;
+         var output = [];
+
+         for (var i = start; i < end; i += 3) {
+           tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
+           output.push(tripletToBase64$1(tmp));
+         }
+
+         return output.join('');
+       }
+
+       function fromByteArray$1(uint8) {
+         if (!inited$1) {
+           init$1();
+         }
+
+         var tmp;
+         var len = uint8.length;
+         var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
+
+         var output = '';
+         var parts = [];
+         var maxChunkLength = 16383; // must be multiple of 3
+         // go through the array every three bytes, we'll deal with trailing stuff later
+
+         for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+           parts.push(encodeChunk$1(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
+         } // pad the end with zeros, but make sure to not forget the extra bytes
+
+
+         if (extraBytes === 1) {
+           tmp = uint8[len - 1];
+           output += lookup$1[tmp >> 2];
+           output += lookup$1[tmp << 4 & 0x3F];
+           output += '==';
+         } else if (extraBytes === 2) {
+           tmp = (uint8[len - 2] << 8) + uint8[len - 1];
+           output += lookup$1[tmp >> 10];
+           output += lookup$1[tmp >> 4 & 0x3F];
+           output += lookup$1[tmp << 2 & 0x3F];
+           output += '=';
+         }
+
+         parts.push(output);
+         return parts.join('');
+       }
+
+       function read$1(buffer, offset, isLE, mLen, nBytes) {
+         var e, m;
+         var eLen = nBytes * 8 - mLen - 1;
+         var eMax = (1 << eLen) - 1;
+         var eBias = eMax >> 1;
+         var nBits = -7;
+         var i = isLE ? nBytes - 1 : 0;
+         var d = isLE ? -1 : 1;
+         var s = buffer[offset + i];
+         i += d;
+         e = s & (1 << -nBits) - 1;
+         s >>= -nBits;
+         nBits += eLen;
+
+         for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+         m = e & (1 << -nBits) - 1;
+         e >>= -nBits;
+         nBits += mLen;
+
+         for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+         if (e === 0) {
+           e = 1 - eBias;
+         } else if (e === eMax) {
+           return m ? NaN : (s ? -1 : 1) * Infinity;
+         } else {
+           m = m + Math.pow(2, mLen);
+           e = e - eBias;
+         }
+
+         return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
+       }
+
+       function write$1(buffer, value, offset, isLE, mLen, nBytes) {
+         var e, m, c;
+         var eLen = nBytes * 8 - mLen - 1;
+         var eMax = (1 << eLen) - 1;
+         var eBias = eMax >> 1;
+         var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
+         var i = isLE ? 0 : nBytes - 1;
+         var d = isLE ? 1 : -1;
+         var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
+         value = Math.abs(value);
+
+         if (isNaN(value) || value === Infinity) {
+           m = isNaN(value) ? 1 : 0;
+           e = eMax;
+         } else {
+           e = Math.floor(Math.log(value) / Math.LN2);
+
+           if (value * (c = Math.pow(2, -e)) < 1) {
+             e--;
+             c *= 2;
+           }
+
+           if (e + eBias >= 1) {
+             value += rt / c;
+           } else {
+             value += rt * Math.pow(2, 1 - eBias);
+           }
+
+           if (value * c >= 2) {
+             e++;
+             c /= 2;
+           }
+
+           if (e + eBias >= eMax) {
+             m = 0;
+             e = eMax;
+           } else if (e + eBias >= 1) {
+             m = (value * c - 1) * Math.pow(2, mLen);
+             e = e + eBias;
+           } else {
+             m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
+             e = 0;
+           }
+         }
+
+         for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+         e = e << mLen | m;
+         eLen += mLen;
+
+         for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+         buffer[offset + i - d] |= s * 128;
+       }
+
+       var toString$3 = {}.toString;
+
+       var isArray$3 = Array.isArray || function (arr) {
+         return toString$3.call(arr) == '[object Array]';
+       };
+       /*!
+        * The buffer module from node.js, for the browser.
+        *
+        * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
+        * @license  MIT
+        */
+
+
+       var INSPECT_MAX_BYTES$1 = 50;
+       /**
+        * If `Buffer.TYPED_ARRAY_SUPPORT`:
+        *   === true    Use Uint8Array implementation (fastest)
+        *   === false   Use Object implementation (most compatible, even IE6)
+        *
+        * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+        * Opera 11.6+, iOS 4.2+.
+        *
+        * Due to various browser bugs, sometimes the Object implementation will be used even
+        * when the browser supports typed arrays.
+        *
+        * Note:
+        *
+        *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
+        *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+        *
+        *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+        *
+        *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+        *     incorrect length in some situations.
+
+        * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
+        * get the Object implementation, which is slower but behaves correctly.
+        */
+
+       Buffer$1.TYPED_ARRAY_SUPPORT = global$2.TYPED_ARRAY_SUPPORT !== undefined ? global$2.TYPED_ARRAY_SUPPORT : true;
+
+       function kMaxLength$1() {
+         return Buffer$1.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
+       }
+
+       function createBuffer$1(that, length) {
+         if (kMaxLength$1() < length) {
+           throw new RangeError('Invalid typed array length');
+         }
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           // Return an augmented `Uint8Array` instance, for best performance
+           that = new Uint8Array(length);
+           that.__proto__ = Buffer$1.prototype;
+         } else {
+           // Fallback: Return an object instance of the Buffer class
+           if (that === null) {
+             that = new Buffer$1(length);
+           }
+
+           that.length = length;
+         }
+
+         return that;
+       }
+       /**
+        * The Buffer constructor returns instances of `Uint8Array` that have their
+        * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+        * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+        * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+        * returns a single octet.
+        *
+        * The `Uint8Array` prototype remains unmodified.
+        */
+
+
+       function Buffer$1(arg, encodingOrOffset, length) {
+         if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) {
+           return new Buffer$1(arg, encodingOrOffset, length);
+         } // Common case.
+
+
+         if (typeof arg === 'number') {
+           if (typeof encodingOrOffset === 'string') {
+             throw new Error('If encoding is specified then the first argument must be a string');
+           }
+
+           return allocUnsafe$1(this, arg);
+         }
+
+         return from$1(this, arg, encodingOrOffset, length);
+       }
+
+       Buffer$1.poolSize = 8192; // not used by this implementation
+       // TODO: Legacy, not needed anymore. Remove in next major version.
+
+       Buffer$1._augment = function (arr) {
+         arr.__proto__ = Buffer$1.prototype;
+         return arr;
+       };
+
+       function from$1(that, value, encodingOrOffset, length) {
+         if (typeof value === 'number') {
+           throw new TypeError('"value" argument must not be a number');
+         }
+
+         if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+           return fromArrayBuffer$1(that, value, encodingOrOffset, length);
+         }
+
+         if (typeof value === 'string') {
+           return fromString$1(that, value, encodingOrOffset);
+         }
+
+         return fromObject$1(that, value);
+       }
+       /**
+        * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+        * if value is a number.
+        * Buffer.from(str[, encoding])
+        * Buffer.from(array)
+        * Buffer.from(buffer)
+        * Buffer.from(arrayBuffer[, byteOffset[, length]])
+        **/
+
+
+       Buffer$1.from = function (value, encodingOrOffset, length) {
+         return from$1(null, value, encodingOrOffset, length);
+       };
+
+       if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+         Buffer$1.prototype.__proto__ = Uint8Array.prototype;
+         Buffer$1.__proto__ = Uint8Array;
+       }
+
+       function assertSize$1(size) {
+         if (typeof size !== 'number') {
+           throw new TypeError('"size" argument must be a number');
+         } else if (size < 0) {
+           throw new RangeError('"size" argument must not be negative');
+         }
+       }
+
+       function alloc$1(that, size, fill, encoding) {
+         assertSize$1(size);
+
+         if (size <= 0) {
+           return createBuffer$1(that, size);
+         }
+
+         if (fill !== undefined) {
+           // Only pay attention to encoding if it's a string. This
+           // prevents accidentally sending in a number that would
+           // be interpretted as a start offset.
+           return typeof encoding === 'string' ? createBuffer$1(that, size).fill(fill, encoding) : createBuffer$1(that, size).fill(fill);
+         }
+
+         return createBuffer$1(that, size);
+       }
+       /**
+        * Creates a new filled Buffer instance.
+        * alloc(size[, fill[, encoding]])
+        **/
+
+
+       Buffer$1.alloc = function (size, fill, encoding) {
+         return alloc$1(null, size, fill, encoding);
+       };
+
+       function allocUnsafe$1(that, size) {
+         assertSize$1(size);
+         that = createBuffer$1(that, size < 0 ? 0 : checked$1(size) | 0);
+
+         if (!Buffer$1.TYPED_ARRAY_SUPPORT) {
+           for (var i = 0; i < size; ++i) {
+             that[i] = 0;
+           }
+         }
+
+         return that;
+       }
+       /**
+        * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+        * */
+
+
+       Buffer$1.allocUnsafe = function (size) {
+         return allocUnsafe$1(null, size);
+       };
+       /**
+        * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+        */
+
+
+       Buffer$1.allocUnsafeSlow = function (size) {
+         return allocUnsafe$1(null, size);
+       };
+
+       function fromString$1(that, string, encoding) {
+         if (typeof encoding !== 'string' || encoding === '') {
+           encoding = 'utf8';
+         }
+
+         if (!Buffer$1.isEncoding(encoding)) {
+           throw new TypeError('"encoding" must be a valid string encoding');
+         }
+
+         var length = byteLength$1(string, encoding) | 0;
+         that = createBuffer$1(that, length);
+         var actual = that.write(string, encoding);
+
+         if (actual !== length) {
+           // Writing a hex string, for example, that contains invalid characters will
+           // cause everything after the first invalid character to be ignored. (e.g.
+           // 'abxxcd' will be treated as 'ab')
+           that = that.slice(0, actual);
+         }
+
+         return that;
+       }
+
+       function fromArrayLike$1(that, array) {
+         var length = array.length < 0 ? 0 : checked$1(array.length) | 0;
+         that = createBuffer$1(that, length);
+
+         for (var i = 0; i < length; i += 1) {
+           that[i] = array[i] & 255;
+         }
+
+         return that;
+       }
+
+       function fromArrayBuffer$1(that, array, byteOffset, length) {
+         array.byteLength; // this throws if `array` is not a valid ArrayBuffer
+
+         if (byteOffset < 0 || array.byteLength < byteOffset) {
+           throw new RangeError('\'offset\' is out of bounds');
+         }
+
+         if (array.byteLength < byteOffset + (length || 0)) {
+           throw new RangeError('\'length\' is out of bounds');
+         }
+
+         if (byteOffset === undefined && length === undefined) {
+           array = new Uint8Array(array);
+         } else if (length === undefined) {
+           array = new Uint8Array(array, byteOffset);
+         } else {
+           array = new Uint8Array(array, byteOffset, length);
+         }
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           // Return an augmented `Uint8Array` instance, for best performance
+           that = array;
+           that.__proto__ = Buffer$1.prototype;
+         } else {
+           // Fallback: Return an object instance of the Buffer class
+           that = fromArrayLike$1(that, array);
+         }
+
+         return that;
+       }
+
+       function fromObject$1(that, obj) {
+         if (internalIsBuffer$1(obj)) {
+           var len = checked$1(obj.length) | 0;
+           that = createBuffer$1(that, len);
+
+           if (that.length === 0) {
+             return that;
+           }
+
+           obj.copy(that, 0, 0, len);
+           return that;
+         }
+
+         if (obj) {
+           if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
+             if (typeof obj.length !== 'number' || isnan$1(obj.length)) {
+               return createBuffer$1(that, 0);
+             }
+
+             return fromArrayLike$1(that, obj);
+           }
+
+           if (obj.type === 'Buffer' && isArray$3(obj.data)) {
+             return fromArrayLike$1(that, obj.data);
+           }
+         }
+
+         throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
+       }
+
+       function checked$1(length) {
+         // Note: cannot use `length < kMaxLength()` here because that fails when
+         // length is NaN (which is otherwise coerced to zero.)
+         if (length >= kMaxLength$1()) {
+           throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength$1().toString(16) + ' bytes');
+         }
+
+         return length | 0;
+       }
+
+       Buffer$1.isBuffer = isBuffer$2;
+
+       function internalIsBuffer$1(b) {
+         return !!(b != null && b._isBuffer);
+       }
+
+       Buffer$1.compare = function compare(a, b) {
+         if (!internalIsBuffer$1(a) || !internalIsBuffer$1(b)) {
+           throw new TypeError('Arguments must be Buffers');
+         }
+
+         if (a === b) return 0;
+         var x = a.length;
+         var y = b.length;
+
+         for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+           if (a[i] !== b[i]) {
+             x = a[i];
+             y = b[i];
+             break;
+           }
+         }
+
+         if (x < y) return -1;
+         if (y < x) return 1;
+         return 0;
+       };
+
+       Buffer$1.isEncoding = function isEncoding(encoding) {
+         switch (String(encoding).toLowerCase()) {
+           case 'hex':
+           case 'utf8':
+           case 'utf-8':
+           case 'ascii':
+           case 'latin1':
+           case 'binary':
+           case 'base64':
+           case 'ucs2':
+           case 'ucs-2':
+           case 'utf16le':
+           case 'utf-16le':
+             return true;
+
+           default:
+             return false;
+         }
+       };
+
+       Buffer$1.concat = function concat(list, length) {
+         if (!isArray$3(list)) {
+           throw new TypeError('"list" argument must be an Array of Buffers');
+         }
+
+         if (list.length === 0) {
+           return Buffer$1.alloc(0);
+         }
+
+         var i;
+
+         if (length === undefined) {
+           length = 0;
+
+           for (i = 0; i < list.length; ++i) {
+             length += list[i].length;
+           }
+         }
+
+         var buffer = Buffer$1.allocUnsafe(length);
+         var pos = 0;
+
+         for (i = 0; i < list.length; ++i) {
+           var buf = list[i];
+
+           if (!internalIsBuffer$1(buf)) {
+             throw new TypeError('"list" argument must be an Array of Buffers');
+           }
+
+           buf.copy(buffer, pos);
+           pos += buf.length;
+         }
+
+         return buffer;
+       };
+
+       function byteLength$1(string, encoding) {
+         if (internalIsBuffer$1(string)) {
+           return string.length;
+         }
+
+         if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
+           return string.byteLength;
+         }
+
+         if (typeof string !== 'string') {
+           string = '' + string;
+         }
+
+         var len = string.length;
+         if (len === 0) return 0; // Use a for loop to avoid recursion
+
+         var loweredCase = false;
+
+         for (;;) {
+           switch (encoding) {
+             case 'ascii':
+             case 'latin1':
+             case 'binary':
+               return len;
+
+             case 'utf8':
+             case 'utf-8':
+             case undefined:
+               return utf8ToBytes$1(string).length;
+
+             case 'ucs2':
+             case 'ucs-2':
+             case 'utf16le':
+             case 'utf-16le':
+               return len * 2;
+
+             case 'hex':
+               return len >>> 1;
+
+             case 'base64':
+               return base64ToBytes$1(string).length;
+
+             default:
+               if (loweredCase) return utf8ToBytes$1(string).length; // assume utf8
+
+               encoding = ('' + encoding).toLowerCase();
+               loweredCase = true;
+           }
+         }
+       }
+
+       Buffer$1.byteLength = byteLength$1;
+
+       function slowToString$1(encoding, start, end) {
+         var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+         // property of a typed array.
+         // This behaves neither like String nor Uint8Array in that we set start/end
+         // to their upper/lower bounds if the value passed is out of range.
+         // undefined is handled specially as per ECMA-262 6th Edition,
+         // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+
+         if (start === undefined || start < 0) {
+           start = 0;
+         } // Return early if start > this.length. Done here to prevent potential uint32
+         // coercion fail below.
+
+
+         if (start > this.length) {
+           return '';
+         }
+
+         if (end === undefined || end > this.length) {
+           end = this.length;
+         }
+
+         if (end <= 0) {
+           return '';
+         } // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+
+
+         end >>>= 0;
+         start >>>= 0;
+
+         if (end <= start) {
+           return '';
+         }
+
+         if (!encoding) encoding = 'utf8';
+
+         while (true) {
+           switch (encoding) {
+             case 'hex':
+               return hexSlice$1(this, start, end);
+
+             case 'utf8':
+             case 'utf-8':
+               return utf8Slice$1(this, start, end);
+
+             case 'ascii':
+               return asciiSlice$1(this, start, end);
+
+             case 'latin1':
+             case 'binary':
+               return latin1Slice$1(this, start, end);
+
+             case 'base64':
+               return base64Slice$1(this, start, end);
+
+             case 'ucs2':
+             case 'ucs-2':
+             case 'utf16le':
+             case 'utf-16le':
+               return utf16leSlice$1(this, start, end);
+
+             default:
+               if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
+               encoding = (encoding + '').toLowerCase();
+               loweredCase = true;
+           }
+         }
+       } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
+       // Buffer instances.
+
+
+       Buffer$1.prototype._isBuffer = true;
+
+       function swap$1(b, n, m) {
+         var i = b[n];
+         b[n] = b[m];
+         b[m] = i;
+       }
+
+       Buffer$1.prototype.swap16 = function swap16() {
+         var len = this.length;
+
+         if (len % 2 !== 0) {
+           throw new RangeError('Buffer size must be a multiple of 16-bits');
+         }
+
+         for (var i = 0; i < len; i += 2) {
+           swap$1(this, i, i + 1);
+         }
+
+         return this;
+       };
+
+       Buffer$1.prototype.swap32 = function swap32() {
+         var len = this.length;
+
+         if (len % 4 !== 0) {
+           throw new RangeError('Buffer size must be a multiple of 32-bits');
+         }
+
+         for (var i = 0; i < len; i += 4) {
+           swap$1(this, i, i + 3);
+           swap$1(this, i + 1, i + 2);
+         }
+
+         return this;
+       };
+
+       Buffer$1.prototype.swap64 = function swap64() {
+         var len = this.length;
+
+         if (len % 8 !== 0) {
+           throw new RangeError('Buffer size must be a multiple of 64-bits');
+         }
+
+         for (var i = 0; i < len; i += 8) {
+           swap$1(this, i, i + 7);
+           swap$1(this, i + 1, i + 6);
+           swap$1(this, i + 2, i + 5);
+           swap$1(this, i + 3, i + 4);
+         }
+
+         return this;
+       };
+
+       Buffer$1.prototype.toString = function toString() {
+         var length = this.length | 0;
+         if (length === 0) return '';
+         if (arguments.length === 0) return utf8Slice$1(this, 0, length);
+         return slowToString$1.apply(this, arguments);
+       };
+
+       Buffer$1.prototype.equals = function equals(b) {
+         if (!internalIsBuffer$1(b)) throw new TypeError('Argument must be a Buffer');
+         if (this === b) return true;
+         return Buffer$1.compare(this, b) === 0;
+       };
+
+       Buffer$1.prototype.inspect = function inspect() {
+         var str = '';
+         var max = INSPECT_MAX_BYTES$1;
+
+         if (this.length > 0) {
+           str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
+           if (this.length > max) str += ' ... ';
+         }
+
+         return '<Buffer ' + str + '>';
+       };
+
+       Buffer$1.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
+         if (!internalIsBuffer$1(target)) {
+           throw new TypeError('Argument must be a Buffer');
+         }
+
+         if (start === undefined) {
+           start = 0;
+         }
+
+         if (end === undefined) {
+           end = target ? target.length : 0;
+         }
+
+         if (thisStart === undefined) {
+           thisStart = 0;
+         }
+
+         if (thisEnd === undefined) {
+           thisEnd = this.length;
+         }
+
+         if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+           throw new RangeError('out of range index');
+         }
+
+         if (thisStart >= thisEnd && start >= end) {
+           return 0;
+         }
+
+         if (thisStart >= thisEnd) {
+           return -1;
+         }
+
+         if (start >= end) {
+           return 1;
+         }
+
+         start >>>= 0;
+         end >>>= 0;
+         thisStart >>>= 0;
+         thisEnd >>>= 0;
+         if (this === target) return 0;
+         var x = thisEnd - thisStart;
+         var y = end - start;
+         var len = Math.min(x, y);
+         var thisCopy = this.slice(thisStart, thisEnd);
+         var targetCopy = target.slice(start, end);
+
+         for (var i = 0; i < len; ++i) {
+           if (thisCopy[i] !== targetCopy[i]) {
+             x = thisCopy[i];
+             y = targetCopy[i];
+             break;
+           }
+         }
+
+         if (x < y) return -1;
+         if (y < x) return 1;
+         return 0;
+       }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+       // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+       //
+       // Arguments:
+       // - buffer - a Buffer to search
+       // - val - a string, Buffer, or number
+       // - byteOffset - an index into `buffer`; will be clamped to an int32
+       // - encoding - an optional encoding, relevant is val is a string
+       // - dir - true for indexOf, false for lastIndexOf
+
+
+       function bidirectionalIndexOf$1(buffer, val, byteOffset, encoding, dir) {
+         // Empty buffer means no match
+         if (buffer.length === 0) return -1; // Normalize byteOffset
+
+         if (typeof byteOffset === 'string') {
+           encoding = byteOffset;
+           byteOffset = 0;
+         } else if (byteOffset > 0x7fffffff) {
+           byteOffset = 0x7fffffff;
+         } else if (byteOffset < -0x80000000) {
+           byteOffset = -0x80000000;
+         }
+
+         byteOffset = +byteOffset; // Coerce to Number.
+
+         if (isNaN(byteOffset)) {
+           // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+           byteOffset = dir ? 0 : buffer.length - 1;
+         } // Normalize byteOffset: negative offsets start from the end of the buffer
+
+
+         if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
+
+         if (byteOffset >= buffer.length) {
+           if (dir) return -1;else byteOffset = buffer.length - 1;
+         } else if (byteOffset < 0) {
+           if (dir) byteOffset = 0;else return -1;
+         } // Normalize val
+
+
+         if (typeof val === 'string') {
+           val = Buffer$1.from(val, encoding);
+         } // Finally, search either indexOf (if dir is true) or lastIndexOf
+
+
+         if (internalIsBuffer$1(val)) {
+           // Special case: looking for empty string/buffer always fails
+           if (val.length === 0) {
+             return -1;
+           }
+
+           return arrayIndexOf$1(buffer, val, byteOffset, encoding, dir);
+         } else if (typeof val === 'number') {
+           val = val & 0xFF; // Search for a byte value [0-255]
+
+           if (Buffer$1.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
+             if (dir) {
+               return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
+             } else {
+               return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
+             }
+           }
+
+           return arrayIndexOf$1(buffer, [val], byteOffset, encoding, dir);
+         }
+
+         throw new TypeError('val must be string, number or Buffer');
+       }
+
+       function arrayIndexOf$1(arr, val, byteOffset, encoding, dir) {
+         var indexSize = 1;
+         var arrLength = arr.length;
+         var valLength = val.length;
+
+         if (encoding !== undefined) {
+           encoding = String(encoding).toLowerCase();
+
+           if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
+             if (arr.length < 2 || val.length < 2) {
+               return -1;
+             }
+
+             indexSize = 2;
+             arrLength /= 2;
+             valLength /= 2;
+             byteOffset /= 2;
+           }
+         }
+
+         function read(buf, i) {
+           if (indexSize === 1) {
+             return buf[i];
+           } else {
+             return buf.readUInt16BE(i * indexSize);
+           }
+         }
+
+         var i;
+
+         if (dir) {
+           var foundIndex = -1;
+
+           for (i = byteOffset; i < arrLength; i++) {
+             if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+               if (foundIndex === -1) foundIndex = i;
+               if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
+             } else {
+               if (foundIndex !== -1) i -= i - foundIndex;
+               foundIndex = -1;
+             }
+           }
+         } else {
+           if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
+
+           for (i = byteOffset; i >= 0; i--) {
+             var found = true;
+
+             for (var j = 0; j < valLength; j++) {
+               if (read(arr, i + j) !== read(val, j)) {
+                 found = false;
+                 break;
+               }
+             }
+
+             if (found) return i;
+           }
+         }
+
+         return -1;
+       }
+
+       Buffer$1.prototype.includes = function includes(val, byteOffset, encoding) {
+         return this.indexOf(val, byteOffset, encoding) !== -1;
+       };
+
+       Buffer$1.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
+         return bidirectionalIndexOf$1(this, val, byteOffset, encoding, true);
+       };
+
+       Buffer$1.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
+         return bidirectionalIndexOf$1(this, val, byteOffset, encoding, false);
+       };
+
+       function hexWrite$1(buf, string, offset, length) {
+         offset = Number(offset) || 0;
+         var remaining = buf.length - offset;
+
+         if (!length) {
+           length = remaining;
+         } else {
+           length = Number(length);
+
+           if (length > remaining) {
+             length = remaining;
+           }
+         } // must be an even number of digits
+
+
+         var strLen = string.length;
+         if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
+
+         if (length > strLen / 2) {
+           length = strLen / 2;
+         }
+
+         for (var i = 0; i < length; ++i) {
+           var parsed = parseInt(string.substr(i * 2, 2), 16);
+           if (isNaN(parsed)) return i;
+           buf[offset + i] = parsed;
+         }
+
+         return i;
+       }
+
+       function utf8Write$1(buf, string, offset, length) {
+         return blitBuffer$1(utf8ToBytes$1(string, buf.length - offset), buf, offset, length);
+       }
+
+       function asciiWrite$1(buf, string, offset, length) {
+         return blitBuffer$1(asciiToBytes$1(string), buf, offset, length);
+       }
+
+       function latin1Write$1(buf, string, offset, length) {
+         return asciiWrite$1(buf, string, offset, length);
+       }
+
+       function base64Write$1(buf, string, offset, length) {
+         return blitBuffer$1(base64ToBytes$1(string), buf, offset, length);
+       }
+
+       function ucs2Write$1(buf, string, offset, length) {
+         return blitBuffer$1(utf16leToBytes$1(string, buf.length - offset), buf, offset, length);
+       }
+
+       Buffer$1.prototype.write = function write(string, offset, length, encoding) {
+         // Buffer#write(string)
+         if (offset === undefined) {
+           encoding = 'utf8';
+           length = this.length;
+           offset = 0; // Buffer#write(string, encoding)
+         } else if (length === undefined && typeof offset === 'string') {
+           encoding = offset;
+           length = this.length;
+           offset = 0; // Buffer#write(string, offset[, length][, encoding])
+         } else if (isFinite(offset)) {
+           offset = offset | 0;
+
+           if (isFinite(length)) {
+             length = length | 0;
+             if (encoding === undefined) encoding = 'utf8';
+           } else {
+             encoding = length;
+             length = undefined;
+           } // legacy write(string, encoding, offset, length) - remove in v0.13
+
+         } else {
+           throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
+         }
+
+         var remaining = this.length - offset;
+         if (length === undefined || length > remaining) length = remaining;
+
+         if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
+           throw new RangeError('Attempt to write outside buffer bounds');
+         }
+
+         if (!encoding) encoding = 'utf8';
+         var loweredCase = false;
+
+         for (;;) {
+           switch (encoding) {
+             case 'hex':
+               return hexWrite$1(this, string, offset, length);
+
+             case 'utf8':
+             case 'utf-8':
+               return utf8Write$1(this, string, offset, length);
+
+             case 'ascii':
+               return asciiWrite$1(this, string, offset, length);
+
+             case 'latin1':
+             case 'binary':
+               return latin1Write$1(this, string, offset, length);
+
+             case 'base64':
+               // Warning: maxLength not taken into account in base64Write
+               return base64Write$1(this, string, offset, length);
+
+             case 'ucs2':
+             case 'ucs-2':
+             case 'utf16le':
+             case 'utf-16le':
+               return ucs2Write$1(this, string, offset, length);
+
+             default:
+               if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
+               encoding = ('' + encoding).toLowerCase();
+               loweredCase = true;
+           }
+         }
+       };
+
+       Buffer$1.prototype.toJSON = function toJSON() {
+         return {
+           type: 'Buffer',
+           data: Array.prototype.slice.call(this._arr || this, 0)
+         };
+       };
+
+       function base64Slice$1(buf, start, end) {
+         if (start === 0 && end === buf.length) {
+           return fromByteArray$1(buf);
+         } else {
+           return fromByteArray$1(buf.slice(start, end));
+         }
+       }
+
+       function utf8Slice$1(buf, start, end) {
+         end = Math.min(buf.length, end);
+         var res = [];
+         var i = start;
+
+         while (i < end) {
+           var firstByte = buf[i];
+           var codePoint = null;
+           var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
+
+           if (i + bytesPerSequence <= end) {
+             var secondByte, thirdByte, fourthByte, tempCodePoint;
+
+             switch (bytesPerSequence) {
+               case 1:
+                 if (firstByte < 0x80) {
+                   codePoint = firstByte;
+                 }
+
+                 break;
+
+               case 2:
+                 secondByte = buf[i + 1];
+
+                 if ((secondByte & 0xC0) === 0x80) {
+                   tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
+
+                   if (tempCodePoint > 0x7F) {
+                     codePoint = tempCodePoint;
+                   }
+                 }
+
+                 break;
+
+               case 3:
+                 secondByte = buf[i + 1];
+                 thirdByte = buf[i + 2];
+
+                 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
+                   tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
+
+                   if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
+                     codePoint = tempCodePoint;
+                   }
+                 }
+
+                 break;
+
+               case 4:
+                 secondByte = buf[i + 1];
+                 thirdByte = buf[i + 2];
+                 fourthByte = buf[i + 3];
+
+                 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
+                   tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
+
+                   if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
+                     codePoint = tempCodePoint;
+                   }
+                 }
+
+             }
+           }
+
+           if (codePoint === null) {
+             // we did not generate a valid codePoint so insert a
+             // replacement char (U+FFFD) and advance only 1 byte
+             codePoint = 0xFFFD;
+             bytesPerSequence = 1;
+           } else if (codePoint > 0xFFFF) {
+             // encode to utf16 (surrogate pair dance)
+             codePoint -= 0x10000;
+             res.push(codePoint >>> 10 & 0x3FF | 0xD800);
+             codePoint = 0xDC00 | codePoint & 0x3FF;
+           }
+
+           res.push(codePoint);
+           i += bytesPerSequence;
+         }
+
+         return decodeCodePointsArray$1(res);
+       } // Based on http://stackoverflow.com/a/22747272/680742, the browser with
+       // the lowest limit is Chrome, with 0x10000 args.
+       // We go 1 magnitude less, for safety
+
+
+       var MAX_ARGUMENTS_LENGTH$1 = 0x1000;
+
+       function decodeCodePointsArray$1(codePoints) {
+         var len = codePoints.length;
+
+         if (len <= MAX_ARGUMENTS_LENGTH$1) {
+           return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
+         } // Decode in chunks to avoid "call stack size exceeded".
+
+
+         var res = '';
+         var i = 0;
+
+         while (i < len) {
+           res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH$1));
+         }
+
+         return res;
+       }
+
+       function asciiSlice$1(buf, start, end) {
+         var ret = '';
+         end = Math.min(buf.length, end);
+
+         for (var i = start; i < end; ++i) {
+           ret += String.fromCharCode(buf[i] & 0x7F);
+         }
+
+         return ret;
+       }
+
+       function latin1Slice$1(buf, start, end) {
+         var ret = '';
+         end = Math.min(buf.length, end);
+
+         for (var i = start; i < end; ++i) {
+           ret += String.fromCharCode(buf[i]);
+         }
+
+         return ret;
+       }
+
+       function hexSlice$1(buf, start, end) {
+         var len = buf.length;
+         if (!start || start < 0) start = 0;
+         if (!end || end < 0 || end > len) end = len;
+         var out = '';
+
+         for (var i = start; i < end; ++i) {
+           out += toHex$1(buf[i]);
+         }
+
+         return out;
+       }
+
+       function utf16leSlice$1(buf, start, end) {
+         var bytes = buf.slice(start, end);
+         var res = '';
+
+         for (var i = 0; i < bytes.length; i += 2) {
+           res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
+         }
+
+         return res;
+       }
+
+       Buffer$1.prototype.slice = function slice(start, end) {
+         var len = this.length;
+         start = ~~start;
+         end = end === undefined ? len : ~~end;
+
+         if (start < 0) {
+           start += len;
+           if (start < 0) start = 0;
+         } else if (start > len) {
+           start = len;
+         }
+
+         if (end < 0) {
+           end += len;
+           if (end < 0) end = 0;
+         } else if (end > len) {
+           end = len;
+         }
+
+         if (end < start) end = start;
+         var newBuf;
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           newBuf = this.subarray(start, end);
+           newBuf.__proto__ = Buffer$1.prototype;
+         } else {
+           var sliceLen = end - start;
+           newBuf = new Buffer$1(sliceLen, undefined);
+
+           for (var i = 0; i < sliceLen; ++i) {
+             newBuf[i] = this[i + start];
+           }
+         }
+
+         return newBuf;
+       };
+       /*
+        * Need to make sure that buffer isn't trying to write out of bounds.
+        */
+
+
+       function checkOffset$1(offset, ext, length) {
+         if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
+         if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
+       }
+
+       Buffer$1.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+         if (!noAssert) checkOffset$1(offset, byteLength, this.length);
+         var val = this[offset];
+         var mul = 1;
+         var i = 0;
+
+         while (++i < byteLength && (mul *= 0x100)) {
+           val += this[offset + i] * mul;
+         }
+
+         return val;
+       };
+
+       Buffer$1.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+
+         if (!noAssert) {
+           checkOffset$1(offset, byteLength, this.length);
+         }
+
+         var val = this[offset + --byteLength];
+         var mul = 1;
+
+         while (byteLength > 0 && (mul *= 0x100)) {
+           val += this[offset + --byteLength] * mul;
+         }
+
+         return val;
+       };
+
+       Buffer$1.prototype.readUInt8 = function readUInt8(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 1, this.length);
+         return this[offset];
+       };
+
+       Buffer$1.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 2, this.length);
+         return this[offset] | this[offset + 1] << 8;
+       };
+
+       Buffer$1.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 2, this.length);
+         return this[offset] << 8 | this[offset + 1];
+       };
+
+       Buffer$1.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 4, this.length);
+         return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
+       };
+
+       Buffer$1.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 4, this.length);
+         return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
+       };
+
+       Buffer$1.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+         if (!noAssert) checkOffset$1(offset, byteLength, this.length);
+         var val = this[offset];
+         var mul = 1;
+         var i = 0;
+
+         while (++i < byteLength && (mul *= 0x100)) {
+           val += this[offset + i] * mul;
+         }
+
+         mul *= 0x80;
+         if (val >= mul) val -= Math.pow(2, 8 * byteLength);
+         return val;
+       };
+
+       Buffer$1.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+         if (!noAssert) checkOffset$1(offset, byteLength, this.length);
+         var i = byteLength;
+         var mul = 1;
+         var val = this[offset + --i];
+
+         while (i > 0 && (mul *= 0x100)) {
+           val += this[offset + --i] * mul;
+         }
+
+         mul *= 0x80;
+         if (val >= mul) val -= Math.pow(2, 8 * byteLength);
+         return val;
+       };
+
+       Buffer$1.prototype.readInt8 = function readInt8(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 1, this.length);
+         if (!(this[offset] & 0x80)) return this[offset];
+         return (0xff - this[offset] + 1) * -1;
+       };
+
+       Buffer$1.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 2, this.length);
+         var val = this[offset] | this[offset + 1] << 8;
+         return val & 0x8000 ? val | 0xFFFF0000 : val;
+       };
+
+       Buffer$1.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 2, this.length);
+         var val = this[offset + 1] | this[offset] << 8;
+         return val & 0x8000 ? val | 0xFFFF0000 : val;
+       };
+
+       Buffer$1.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 4, this.length);
+         return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
+       };
+
+       Buffer$1.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 4, this.length);
+         return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
+       };
+
+       Buffer$1.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 4, this.length);
+         return read$1(this, offset, true, 23, 4);
+       };
+
+       Buffer$1.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 4, this.length);
+         return read$1(this, offset, false, 23, 4);
+       };
+
+       Buffer$1.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 8, this.length);
+         return read$1(this, offset, true, 52, 8);
+       };
+
+       Buffer$1.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
+         if (!noAssert) checkOffset$1(offset, 8, this.length);
+         return read$1(this, offset, false, 52, 8);
+       };
+
+       function checkInt$1(buf, value, offset, ext, max, min) {
+         if (!internalIsBuffer$1(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
+         if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
+         if (offset + ext > buf.length) throw new RangeError('Index out of range');
+       }
+
+       Buffer$1.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+
+         if (!noAssert) {
+           var maxBytes = Math.pow(2, 8 * byteLength) - 1;
+           checkInt$1(this, value, offset, byteLength, maxBytes, 0);
+         }
+
+         var mul = 1;
+         var i = 0;
+         this[offset] = value & 0xFF;
+
+         while (++i < byteLength && (mul *= 0x100)) {
+           this[offset + i] = value / mul & 0xFF;
+         }
+
+         return offset + byteLength;
+       };
+
+       Buffer$1.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         byteLength = byteLength | 0;
+
+         if (!noAssert) {
+           var maxBytes = Math.pow(2, 8 * byteLength) - 1;
+           checkInt$1(this, value, offset, byteLength, maxBytes, 0);
+         }
+
+         var i = byteLength - 1;
+         var mul = 1;
+         this[offset + i] = value & 0xFF;
+
+         while (--i >= 0 && (mul *= 0x100)) {
+           this[offset + i] = value / mul & 0xFF;
+         }
+
+         return offset + byteLength;
+       };
+
+       Buffer$1.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 1, 0xff, 0);
+         if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
+         this[offset] = value & 0xff;
+         return offset + 1;
+       };
+
+       function objectWriteUInt16$1(buf, value, offset, littleEndian) {
+         if (value < 0) value = 0xffff + value + 1;
+
+         for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
+           buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
+         }
+       }
+
+       Buffer$1.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 2, 0xffff, 0);
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value & 0xff;
+           this[offset + 1] = value >>> 8;
+         } else {
+           objectWriteUInt16$1(this, value, offset, true);
+         }
+
+         return offset + 2;
+       };
+
+       Buffer$1.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 2, 0xffff, 0);
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value >>> 8;
+           this[offset + 1] = value & 0xff;
+         } else {
+           objectWriteUInt16$1(this, value, offset, false);
+         }
+
+         return offset + 2;
+       };
+
+       function objectWriteUInt32$1(buf, value, offset, littleEndian) {
+         if (value < 0) value = 0xffffffff + value + 1;
+
+         for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
+           buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
+         }
+       }
+
+       Buffer$1.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 4, 0xffffffff, 0);
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           this[offset + 3] = value >>> 24;
+           this[offset + 2] = value >>> 16;
+           this[offset + 1] = value >>> 8;
+           this[offset] = value & 0xff;
+         } else {
+           objectWriteUInt32$1(this, value, offset, true);
+         }
+
+         return offset + 4;
+       };
+
+       Buffer$1.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 4, 0xffffffff, 0);
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value >>> 24;
+           this[offset + 1] = value >>> 16;
+           this[offset + 2] = value >>> 8;
+           this[offset + 3] = value & 0xff;
+         } else {
+           objectWriteUInt32$1(this, value, offset, false);
+         }
+
+         return offset + 4;
+       };
+
+       Buffer$1.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
+         value = +value;
+         offset = offset | 0;
+
+         if (!noAssert) {
+           var limit = Math.pow(2, 8 * byteLength - 1);
+           checkInt$1(this, value, offset, byteLength, limit - 1, -limit);
+         }
+
+         var i = 0;
+         var mul = 1;
+         var sub = 0;
+         this[offset] = value & 0xFF;
+
+         while (++i < byteLength && (mul *= 0x100)) {
+           if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+             sub = 1;
+           }
+
+           this[offset + i] = (value / mul >> 0) - sub & 0xFF;
+         }
+
+         return offset + byteLength;
+       };
+
+       Buffer$1.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
+         value = +value;
+         offset = offset | 0;
+
+         if (!noAssert) {
+           var limit = Math.pow(2, 8 * byteLength - 1);
+           checkInt$1(this, value, offset, byteLength, limit - 1, -limit);
+         }
+
+         var i = byteLength - 1;
+         var mul = 1;
+         var sub = 0;
+         this[offset + i] = value & 0xFF;
+
+         while (--i >= 0 && (mul *= 0x100)) {
+           if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+             sub = 1;
+           }
+
+           this[offset + i] = (value / mul >> 0) - sub & 0xFF;
+         }
+
+         return offset + byteLength;
+       };
+
+       Buffer$1.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 1, 0x7f, -0x80);
+         if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
+         if (value < 0) value = 0xff + value + 1;
+         this[offset] = value & 0xff;
+         return offset + 1;
+       };
+
+       Buffer$1.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 2, 0x7fff, -0x8000);
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value & 0xff;
+           this[offset + 1] = value >>> 8;
+         } else {
+           objectWriteUInt16$1(this, value, offset, true);
+         }
+
+         return offset + 2;
+       };
+
+       Buffer$1.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 2, 0x7fff, -0x8000);
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value >>> 8;
+           this[offset + 1] = value & 0xff;
+         } else {
+           objectWriteUInt16$1(this, value, offset, false);
+         }
+
+         return offset + 2;
+       };
+
+       Buffer$1.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 4, 0x7fffffff, -0x80000000);
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value & 0xff;
+           this[offset + 1] = value >>> 8;
+           this[offset + 2] = value >>> 16;
+           this[offset + 3] = value >>> 24;
+         } else {
+           objectWriteUInt32$1(this, value, offset, true);
+         }
+
+         return offset + 4;
+       };
+
+       Buffer$1.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
+         value = +value;
+         offset = offset | 0;
+         if (!noAssert) checkInt$1(this, value, offset, 4, 0x7fffffff, -0x80000000);
+         if (value < 0) value = 0xffffffff + value + 1;
+
+         if (Buffer$1.TYPED_ARRAY_SUPPORT) {
+           this[offset] = value >>> 24;
+           this[offset + 1] = value >>> 16;
+           this[offset + 2] = value >>> 8;
+           this[offset + 3] = value & 0xff;
+         } else {
+           objectWriteUInt32$1(this, value, offset, false);
+         }
+
+         return offset + 4;
+       };
+
+       function checkIEEE754$1(buf, value, offset, ext, max, min) {
+         if (offset + ext > buf.length) throw new RangeError('Index out of range');
+         if (offset < 0) throw new RangeError('Index out of range');
+       }
+
+       function writeFloat$1(buf, value, offset, littleEndian, noAssert) {
+         if (!noAssert) {
+           checkIEEE754$1(buf, value, offset, 4);
+         }
+
+         write$1(buf, value, offset, littleEndian, 23, 4);
+         return offset + 4;
+       }
+
+       Buffer$1.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
+         return writeFloat$1(this, value, offset, true, noAssert);
+       };
+
+       Buffer$1.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
+         return writeFloat$1(this, value, offset, false, noAssert);
+       };
+
+       function writeDouble$1(buf, value, offset, littleEndian, noAssert) {
+         if (!noAssert) {
+           checkIEEE754$1(buf, value, offset, 8);
+         }
+
+         write$1(buf, value, offset, littleEndian, 52, 8);
+         return offset + 8;
+       }
+
+       Buffer$1.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
+         return writeDouble$1(this, value, offset, true, noAssert);
+       };
+
+       Buffer$1.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
+         return writeDouble$1(this, value, offset, false, noAssert);
+       }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+
+
+       Buffer$1.prototype.copy = function copy(target, targetStart, start, end) {
+         if (!start) start = 0;
+         if (!end && end !== 0) end = this.length;
+         if (targetStart >= target.length) targetStart = target.length;
+         if (!targetStart) targetStart = 0;
+         if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done
+
+         if (end === start) return 0;
+         if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions
+
+         if (targetStart < 0) {
+           throw new RangeError('targetStart out of bounds');
+         }
+
+         if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
+         if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?
+
+         if (end > this.length) end = this.length;
+
+         if (target.length - targetStart < end - start) {
+           end = target.length - targetStart + start;
+         }
+
+         var len = end - start;
+         var i;
+
+         if (this === target && start < targetStart && targetStart < end) {
+           // descending copy from end
+           for (i = len - 1; i >= 0; --i) {
+             target[i + targetStart] = this[i + start];
+           }
+         } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) {
+           // ascending copy from start
+           for (i = 0; i < len; ++i) {
+             target[i + targetStart] = this[i + start];
+           }
+         } else {
+           Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
+         }
+
+         return len;
+       }; // Usage:
+       //    buffer.fill(number[, offset[, end]])
+       //    buffer.fill(buffer[, offset[, end]])
+       //    buffer.fill(string[, offset[, end]][, encoding])
+
+
+       Buffer$1.prototype.fill = function fill(val, start, end, encoding) {
+         // Handle string cases:
+         if (typeof val === 'string') {
+           if (typeof start === 'string') {
+             encoding = start;
+             start = 0;
+             end = this.length;
+           } else if (typeof end === 'string') {
+             encoding = end;
+             end = this.length;
+           }
+
+           if (val.length === 1) {
+             var code = val.charCodeAt(0);
+
+             if (code < 256) {
+               val = code;
+             }
+           }
+
+           if (encoding !== undefined && typeof encoding !== 'string') {
+             throw new TypeError('encoding must be a string');
+           }
+
+           if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) {
+             throw new TypeError('Unknown encoding: ' + encoding);
+           }
+         } else if (typeof val === 'number') {
+           val = val & 255;
+         } // Invalid ranges are not set to a default, so can range check early.
+
+
+         if (start < 0 || this.length < start || this.length < end) {
+           throw new RangeError('Out of range index');
+         }
+
+         if (end <= start) {
+           return this;
+         }
+
+         start = start >>> 0;
+         end = end === undefined ? this.length : end >>> 0;
+         if (!val) val = 0;
+         var i;
+
+         if (typeof val === 'number') {
+           for (i = start; i < end; ++i) {
+             this[i] = val;
+           }
+         } else {
+           var bytes = internalIsBuffer$1(val) ? val : utf8ToBytes$1(new Buffer$1(val, encoding).toString());
+           var len = bytes.length;
+
+           for (i = 0; i < end - start; ++i) {
+             this[i + start] = bytes[i % len];
+           }
+         }
+
+         return this;
+       }; // HELPER FUNCTIONS
+       // ================
+
+
+       var INVALID_BASE64_RE$1 = /[^+\/0-9A-Za-z-_]/g;
+
+       function base64clean$1(str) {
+         // Node strips out invalid characters like \n and \t from the string, base64-js does not
+         str = stringtrim$1(str).replace(INVALID_BASE64_RE$1, ''); // Node converts strings with length < 2 to ''
+
+         if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+
+         while (str.length % 4 !== 0) {
+           str = str + '=';
+         }
+
+         return str;
+       }
+
+       function stringtrim$1(str) {
+         if (str.trim) return str.trim();
+         return str.replace(/^\s+|\s+$/g, '');
+       }
+
+       function toHex$1(n) {
+         if (n < 16) return '0' + n.toString(16);
+         return n.toString(16);
+       }
+
+       function utf8ToBytes$1(string, units) {
+         units = units || Infinity;
+         var codePoint;
+         var length = string.length;
+         var leadSurrogate = null;
+         var bytes = [];
+
+         for (var i = 0; i < length; ++i) {
+           codePoint = string.charCodeAt(i); // is surrogate component
+
+           if (codePoint > 0xD7FF && codePoint < 0xE000) {
+             // last char was a lead
+             if (!leadSurrogate) {
+               // no lead yet
+               if (codePoint > 0xDBFF) {
+                 // unexpected trail
+                 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+                 continue;
+               } else if (i + 1 === length) {
+                 // unpaired lead
+                 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+                 continue;
+               } // valid lead
+
+
+               leadSurrogate = codePoint;
+               continue;
+             } // 2 leads in a row
+
+
+             if (codePoint < 0xDC00) {
+               if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+               leadSurrogate = codePoint;
+               continue;
+             } // valid surrogate pair
+
+
+             codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
+           } else if (leadSurrogate) {
+             // valid bmp char, but last char was a lead
+             if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+           }
+
+           leadSurrogate = null; // encode utf8
+
+           if (codePoint < 0x80) {
+             if ((units -= 1) < 0) break;
+             bytes.push(codePoint);
+           } else if (codePoint < 0x800) {
+             if ((units -= 2) < 0) break;
+             bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
+           } else if (codePoint < 0x10000) {
+             if ((units -= 3) < 0) break;
+             bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
+           } else if (codePoint < 0x110000) {
+             if ((units -= 4) < 0) break;
+             bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
+           } else {
+             throw new Error('Invalid code point');
+           }
+         }
+
+         return bytes;
+       }
+
+       function asciiToBytes$1(str) {
+         var byteArray = [];
+
+         for (var i = 0; i < str.length; ++i) {
+           // Node's code seems to be doing this and not & 0x7F..
+           byteArray.push(str.charCodeAt(i) & 0xFF);
+         }
+
+         return byteArray;
+       }
+
+       function utf16leToBytes$1(str, units) {
+         var c, hi, lo;
+         var byteArray = [];
+
+         for (var i = 0; i < str.length; ++i) {
+           if ((units -= 2) < 0) break;
+           c = str.charCodeAt(i);
+           hi = c >> 8;
+           lo = c % 256;
+           byteArray.push(lo);
+           byteArray.push(hi);
+         }
+
+         return byteArray;
+       }
+
+       function base64ToBytes$1(str) {
+         return toByteArray$1(base64clean$1(str));
+       }
+
+       function blitBuffer$1(src, dst, offset, length) {
+         for (var i = 0; i < length; ++i) {
+           if (i + offset >= dst.length || i >= src.length) break;
+           dst[i + offset] = src[i];
+         }
+
+         return i;
+       }
+
+       function isnan$1(val) {
+         return val !== val; // eslint-disable-line no-self-compare
+       } // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence
+       // The _isBuffer check is for Safari 5-7 support, because it's missing
+       // Object.prototype.constructor. Remove this eventually
+
+
+       function isBuffer$2(obj) {
+         return obj != null && (!!obj._isBuffer || isFastBuffer$1(obj) || isSlowBuffer$1(obj));
+       }
+
+       function isFastBuffer$1(obj) {
+         return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
+       } // For Node v0.10 support. Remove this eventually.
+
+
+       function isSlowBuffer$1(obj) {
+         return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer$1(obj.slice(0, 0));
+       }
+
+       function BufferList() {
+         this.head = null;
+         this.tail = null;
+         this.length = 0;
+       }
+
+       BufferList.prototype.push = function (v) {
+         var entry = {
+           data: v,
+           next: null
+         };
+         if (this.length > 0) this.tail.next = entry;else this.head = entry;
+         this.tail = entry;
+         ++this.length;
+       };
+
+       BufferList.prototype.unshift = function (v) {
+         var entry = {
+           data: v,
+           next: this.head
+         };
+         if (this.length === 0) this.tail = entry;
+         this.head = entry;
+         ++this.length;
+       };
+
+       BufferList.prototype.shift = function () {
+         if (this.length === 0) return;
+         var ret = this.head.data;
+         if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+         --this.length;
+         return ret;
+       };
+
+       BufferList.prototype.clear = function () {
+         this.head = this.tail = null;
+         this.length = 0;
+       };
+
+       BufferList.prototype.join = function (s) {
+         if (this.length === 0) return '';
+         var p = this.head;
+         var ret = '' + p.data;
+
+         while (p = p.next) {
+           ret += s + p.data;
+         }
+
+         return ret;
+       };
+
+       BufferList.prototype.concat = function (n) {
+         if (this.length === 0) return Buffer$1.alloc(0);
+         if (this.length === 1) return this.head.data;
+         var ret = Buffer$1.allocUnsafe(n >>> 0);
+         var p = this.head;
+         var i = 0;
+
+         while (p) {
+           p.data.copy(ret, i);
+           i += p.data.length;
+           p = p.next;
+         }
+
+         return ret;
+       };
+
+       var isBufferEncoding = Buffer$1.isEncoding || function (encoding) {
+         switch (encoding && encoding.toLowerCase()) {
+           case 'hex':
+           case 'utf8':
+           case 'utf-8':
+           case 'ascii':
+           case 'binary':
+           case 'base64':
+           case 'ucs2':
+           case 'ucs-2':
+           case 'utf16le':
+           case 'utf-16le':
+           case 'raw':
+             return true;
+
+           default:
+             return false;
+         }
+       };
+
+       function assertEncoding(encoding) {
+         if (encoding && !isBufferEncoding(encoding)) {
+           throw new Error('Unknown encoding: ' + encoding);
+         }
+       } // StringDecoder provides an interface for efficiently splitting a series of
+       // buffers into a series of JS strings without breaking apart multi-byte
+       // characters. CESU-8 is handled as part of the UTF-8 encoding.
+       //
+       // @TODO Handling all encodings inside a single object makes it very difficult
+       // to reason about this code, so it should be split up in the future.
+       // @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
+       // points as used by CESU-8.
+
+
+       function StringDecoder(encoding) {
+         this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
+         assertEncoding(encoding);
+
+         switch (this.encoding) {
+           case 'utf8':
+             // CESU-8 represents each of Surrogate Pair by 3-bytes
+             this.surrogateSize = 3;
+             break;
+
+           case 'ucs2':
+           case 'utf16le':
+             // UTF-16 represents each of Surrogate Pair by 2-bytes
+             this.surrogateSize = 2;
+             this.detectIncompleteChar = utf16DetectIncompleteChar;
+             break;
+
+           case 'base64':
+             // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
+             this.surrogateSize = 3;
+             this.detectIncompleteChar = base64DetectIncompleteChar;
+             break;
+
+           default:
+             this.write = passThroughWrite;
+             return;
+         } // Enough space to store all bytes of a single character. UTF-8 needs 4
+         // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
+
+
+         this.charBuffer = new Buffer$1(6); // Number of bytes received for the current incomplete multi-byte character.
+
+         this.charReceived = 0; // Number of bytes expected for the current incomplete multi-byte character.
+
+         this.charLength = 0;
+       }
+       // guaranteed to not contain any partial multi-byte characters. Any partial
+       // character found at the end of the buffer is buffered up, and will be
+       // returned when calling write again with the remaining bytes.
+       //
+       // Note: Converting a Buffer containing an orphan surrogate to a String
+       // currently works, but converting a String to a Buffer (via `new Buffer`, or
+       // Buffer#write) will replace incomplete surrogates with the unicode
+       // replacement character. See https://codereview.chromium.org/121173009/ .
+
+       StringDecoder.prototype.write = function (buffer) {
+         var charStr = ''; // if our last write ended with an incomplete multibyte character
+
+         while (this.charLength) {
+           // determine how many remaining bytes this buffer has to offer for this char
+           var available = buffer.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : buffer.length; // add the new bytes to the char buffer
+
+           buffer.copy(this.charBuffer, this.charReceived, 0, available);
+           this.charReceived += available;
+
+           if (this.charReceived < this.charLength) {
+             // still not enough chars in this buffer? wait for more ...
+             return '';
+           } // remove bytes belonging to the current character from the buffer
+
+
+           buffer = buffer.slice(available, buffer.length); // get the character that was split
+
+           charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+
+           var charCode = charStr.charCodeAt(charStr.length - 1);
+
+           if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+             this.charLength += this.surrogateSize;
+             charStr = '';
+             continue;
+           }
+
+           this.charReceived = this.charLength = 0; // if there are no more bytes in this buffer, just emit our char
+
+           if (buffer.length === 0) {
+             return charStr;
+           }
+
+           break;
+         } // determine and set charLength / charReceived
+
+
+         this.detectIncompleteChar(buffer);
+         var end = buffer.length;
+
+         if (this.charLength) {
+           // buffer the incomplete character bytes we got
+           buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
+           end -= this.charReceived;
+         }
+
+         charStr += buffer.toString(this.encoding, 0, end);
+         var end = charStr.length - 1;
+         var charCode = charStr.charCodeAt(end); // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+
+         if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+           var size = this.surrogateSize;
+           this.charLength += size;
+           this.charReceived += size;
+           this.charBuffer.copy(this.charBuffer, size, 0, size);
+           buffer.copy(this.charBuffer, 0, 0, size);
+           return charStr.substring(0, end);
+         } // or just emit the charStr
+
+
+         return charStr;
+       }; // detectIncompleteChar determines if there is an incomplete UTF-8 character at
+       // the end of the given buffer. If so, it sets this.charLength to the byte
+       // length that character, and sets this.charReceived to the number of bytes
+       // that are available for this character.
+
+
+       StringDecoder.prototype.detectIncompleteChar = function (buffer) {
+         // determine how many bytes we have to check at the end of this buffer
+         var i = buffer.length >= 3 ? 3 : buffer.length; // Figure out if one of the last i bytes of our buffer announces an
+         // incomplete char.
+
+         for (; i > 0; i--) {
+           var c = buffer[buffer.length - i]; // See http://en.wikipedia.org/wiki/UTF-8#Description
+           // 110XXXXX
+
+           if (i == 1 && c >> 5 == 0x06) {
+             this.charLength = 2;
+             break;
+           } // 1110XXXX
+
+
+           if (i <= 2 && c >> 4 == 0x0E) {
+             this.charLength = 3;
+             break;
+           } // 11110XXX
+
+
+           if (i <= 3 && c >> 3 == 0x1E) {
+             this.charLength = 4;
+             break;
+           }
+         }
+
+         this.charReceived = i;
+       };
+
+       StringDecoder.prototype.end = function (buffer) {
+         var res = '';
+         if (buffer && buffer.length) res = this.write(buffer);
+
+         if (this.charReceived) {
+           var cr = this.charReceived;
+           var buf = this.charBuffer;
+           var enc = this.encoding;
+           res += buf.slice(0, cr).toString(enc);
+         }
+
+         return res;
+       };
+
+       function passThroughWrite(buffer) {
+         return buffer.toString(this.encoding);
+       }
+
+       function utf16DetectIncompleteChar(buffer) {
+         this.charReceived = buffer.length % 2;
+         this.charLength = this.charReceived ? 2 : 0;
+       }
+
+       function base64DetectIncompleteChar(buffer) {
+         this.charReceived = buffer.length % 3;
+         this.charLength = this.charReceived ? 3 : 0;
+       }
+
+       Readable.ReadableState = ReadableState;
+       var debug = debuglog('stream');
+       inherits$1(Readable, EventEmitter);
+
+       function prependListener(emitter, event, fn) {
+         // Sadly this is not cacheable as some libraries bundle their own
+         // event emitter implementation with them.
+         if (typeof emitter.prependListener === 'function') {
+           return emitter.prependListener(event, fn);
+         } else {
+           // This is a hack to make sure that our error handler is attached before any
+           // userland ones.  NEVER DO THIS. This is here only because this code needs
+           // to continue to work with older versions of Node.js that do not include
+           // the prependListener() method. The goal is to eventually remove this hack.
+           if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+         }
+       }
+
+       function listenerCount$1(emitter, type) {
+         return emitter.listeners(type).length;
+       }
+
+       function ReadableState(options, stream) {
+         options = options || {}; // object stream flag. Used to make read(n) ignore n and to
+         // make all the buffer merging and length checks go away
+
+         this.objectMode = !!options.objectMode;
+         if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer
+         // Note: 0 is a valid value, means "don't call _read preemptively ever"
+
+         var hwm = options.highWaterMark;
+         var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+         this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; // cast to ints.
+
+         this.highWaterMark = ~~this.highWaterMark; // A linked list is used to store data chunks instead of an array because the
+         // linked list can remove elements from the beginning faster than
+         // array.shift()
+
+         this.buffer = new BufferList();
+         this.length = 0;
+         this.pipes = null;
+         this.pipesCount = 0;
+         this.flowing = null;
+         this.ended = false;
+         this.endEmitted = false;
+         this.reading = false; // a flag to be able to tell if the onwrite cb is called immediately,
+         // or on a later tick.  We set this to true at first, because any
+         // actions that shouldn't happen until "later" should generally also
+         // not happen before the first write call.
+
+         this.sync = true; // whenever we return null, then we set a flag to say
+         // that we're awaiting a 'readable' event emission.
+
+         this.needReadable = false;
+         this.emittedReadable = false;
+         this.readableListening = false;
+         this.resumeScheduled = false; // Crypto is kind of old and crusty.  Historically, its default string
+         // encoding is 'binary' so we have to make this configurable.
+         // Everything else in the universe uses 'utf8', though.
+
+         this.defaultEncoding = options.defaultEncoding || 'utf8'; // when piping, we only care about 'readable' events that happen
+         // after read()ing all the bytes and not getting any pushback.
+
+         this.ranOut = false; // the number of writers that are awaiting a drain event in .pipe()s
+
+         this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled
+
+         this.readingMore = false;
+         this.decoder = null;
+         this.encoding = null;
+
+         if (options.encoding) {
+           this.decoder = new StringDecoder(options.encoding);
+           this.encoding = options.encoding;
+         }
+       }
+       function Readable(options) {
+         if (!(this instanceof Readable)) return new Readable(options);
+         this._readableState = new ReadableState(options, this); // legacy
+
+         this.readable = true;
+         if (options && typeof options.read === 'function') this._read = options.read;
+         EventEmitter.call(this);
+       } // Manually shove something into the read() buffer.
+       // This returns true if the highWaterMark has not been hit yet,
+       // similar to how Writable.write() returns true if you should
+       // write() some more.
+
+       Readable.prototype.push = function (chunk, encoding) {
+         var state = this._readableState;
+
+         if (!state.objectMode && typeof chunk === 'string') {
+           encoding = encoding || state.defaultEncoding;
+
+           if (encoding !== state.encoding) {
+             chunk = Buffer.from(chunk, encoding);
+             encoding = '';
+           }
+         }
+
+         return readableAddChunk(this, state, chunk, encoding, false);
+       }; // Unshift should *always* be something directly out of read()
+
+
+       Readable.prototype.unshift = function (chunk) {
+         var state = this._readableState;
+         return readableAddChunk(this, state, chunk, '', true);
+       };
+
+       Readable.prototype.isPaused = function () {
+         return this._readableState.flowing === false;
+       };
+
+       function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+         var er = chunkInvalid(state, chunk);
+
+         if (er) {
+           stream.emit('error', er);
+         } else if (chunk === null) {
+           state.reading = false;
+           onEofChunk(stream, state);
+         } else if (state.objectMode || chunk && chunk.length > 0) {
+           if (state.ended && !addToFront) {
+             var e = new Error('stream.push() after EOF');
+             stream.emit('error', e);
+           } else if (state.endEmitted && addToFront) {
+             var _e = new Error('stream.unshift() after end event');
+
+             stream.emit('error', _e);
+           } else {
+             var skipAdd;
+
+             if (state.decoder && !addToFront && !encoding) {
+               chunk = state.decoder.write(chunk);
+               skipAdd = !state.objectMode && chunk.length === 0;
+             }
+
+             if (!addToFront) state.reading = false; // Don't add to the buffer if we've decoded to an empty string chunk and
+             // we're not in object mode
+
+             if (!skipAdd) {
+               // if we want the data now, just emit it.
+               if (state.flowing && state.length === 0 && !state.sync) {
+                 stream.emit('data', chunk);
+                 stream.read(0);
+               } else {
+                 // update the buffer info.
+                 state.length += state.objectMode ? 1 : chunk.length;
+                 if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+                 if (state.needReadable) emitReadable(stream);
+               }
+             }
+
+             maybeReadMore(stream, state);
+           }
+         } else if (!addToFront) {
+           state.reading = false;
+         }
+
+         return needMoreData(state);
+       } // if it's past the high water mark, we can push in some more.
+       // Also, if we have no data yet, we can stand some
+       // more bytes.  This is to work around cases where hwm=0,
+       // such as the repl.  Also, if the push() triggered a
+       // readable event, and the user called read(largeNumber) such that
+       // needReadable was set, then we ought to push more, so that another
+       // 'readable' event will be triggered.
+
+
+       function needMoreData(state) {
+         return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+       } // backwards compatibility.
+
+
+       Readable.prototype.setEncoding = function (enc) {
+         this._readableState.decoder = new StringDecoder(enc);
+         this._readableState.encoding = enc;
+         return this;
+       }; // Don't raise the hwm > 8MB
+
+
+       var MAX_HWM = 0x800000;
+
+       function computeNewHighWaterMark(n) {
+         if (n >= MAX_HWM) {
+           n = MAX_HWM;
+         } else {
+           // Get the next highest power of 2 to prevent increasing hwm excessively in
+           // tiny amounts
+           n--;
+           n |= n >>> 1;
+           n |= n >>> 2;
+           n |= n >>> 4;
+           n |= n >>> 8;
+           n |= n >>> 16;
+           n++;
+         }
+
+         return n;
+       } // This function is designed to be inlinable, so please take care when making
+       // changes to the function body.
+
+
+       function howMuchToRead(n, state) {
+         if (n <= 0 || state.length === 0 && state.ended) return 0;
+         if (state.objectMode) return 1;
+
+         if (n !== n) {
+           // Only flow one buffer at a time
+           if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+         } // If we're asking for more than the current hwm, then raise the hwm.
+
+
+         if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+         if (n <= state.length) return n; // Don't have enough
+
+         if (!state.ended) {
+           state.needReadable = true;
+           return 0;
+         }
+
+         return state.length;
+       } // you can override either this method, or the async _read(n) below.
+
+
+       Readable.prototype.read = function (n) {
+         debug('read', n);
+         n = parseInt(n, 10);
+         var state = this._readableState;
+         var nOrig = n;
+         if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we
+         // already have a bunch of data in the buffer, then just trigger
+         // the 'readable' event and move on.
+
+         if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+           debug('read: emitReadable', state.length, state.ended);
+           if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+           return null;
+         }
+
+         n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.
+
+         if (n === 0 && state.ended) {
+           if (state.length === 0) endReadable(this);
+           return null;
+         } // All the actual chunk generation logic needs to be
+         // *below* the call to _read.  The reason is that in certain
+         // synthetic stream cases, such as passthrough streams, _read
+         // may be a completely synchronous operation which may change
+         // the state of the read buffer, providing enough data when
+         // before there was *not* enough.
+         //
+         // So, the steps are:
+         // 1. Figure out what the state of things will be after we do
+         // a read from the buffer.
+         //
+         // 2. If that resulting state will trigger a _read, then call _read.
+         // Note that this may be asynchronous, or synchronous.  Yes, it is
+         // deeply ugly to write APIs this way, but that still doesn't mean
+         // that the Readable class should behave improperly, as streams are
+         // designed to be sync/async agnostic.
+         // Take note if the _read call is sync or async (ie, if the read call
+         // has returned yet), so that we know whether or not it's safe to emit
+         // 'readable' etc.
+         //
+         // 3. Actually pull the requested chunks out of the buffer and return.
+         // if we need a readable event, then we need to do some reading.
+
+
+         var doRead = state.needReadable;
+         debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some
+
+         if (state.length === 0 || state.length - n < state.highWaterMark) {
+           doRead = true;
+           debug('length less than watermark', doRead);
+         } // however, if we've ended, then there's no point, and if we're already
+         // reading, then it's unnecessary.
+
+
+         if (state.ended || state.reading) {
+           doRead = false;
+           debug('reading or ended', doRead);
+         } else if (doRead) {
+           debug('do read');
+           state.reading = true;
+           state.sync = true; // if the length is currently zero, then we *need* a readable event.
+
+           if (state.length === 0) state.needReadable = true; // call internal read method
+
+           this._read(state.highWaterMark);
+
+           state.sync = false; // If _read pushed data synchronously, then `reading` will be false,
+           // and we need to re-evaluate how much data we can return to the user.
+
+           if (!state.reading) n = howMuchToRead(nOrig, state);
+         }
+
+         var ret;
+         if (n > 0) ret = fromList(n, state);else ret = null;
+
+         if (ret === null) {
+           state.needReadable = true;
+           n = 0;
+         } else {
+           state.length -= n;
+         }
+
+         if (state.length === 0) {
+           // If we have nothing in the buffer, then we want to know
+           // as soon as we *do* get something into the buffer.
+           if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.
+
+           if (nOrig !== n && state.ended) endReadable(this);
+         }
+
+         if (ret !== null) this.emit('data', ret);
+         return ret;
+       };
+
+       function chunkInvalid(state, chunk) {
+         var er = null;
+
+         if (!isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
+           er = new TypeError('Invalid non-string/buffer chunk');
+         }
+
+         return er;
+       }
+
+       function onEofChunk(stream, state) {
+         if (state.ended) return;
+
+         if (state.decoder) {
+           var chunk = state.decoder.end();
+
+           if (chunk && chunk.length) {
+             state.buffer.push(chunk);
+             state.length += state.objectMode ? 1 : chunk.length;
+           }
+         }
+
+         state.ended = true; // emit 'readable' now to make sure it gets picked up.
+
+         emitReadable(stream);
+       } // Don't emit readable right away in sync mode, because this can trigger
+       // another read() call => stack overflow.  This way, it might trigger
+       // a nextTick recursion warning, but that's not so bad.
+
+
+       function emitReadable(stream) {
+         var state = stream._readableState;
+         state.needReadable = false;
+
+         if (!state.emittedReadable) {
+           debug('emitReadable', state.flowing);
+           state.emittedReadable = true;
+           if (state.sync) nextTick$1(emitReadable_, stream);else emitReadable_(stream);
+         }
+       }
+
+       function emitReadable_(stream) {
+         debug('emit readable');
+         stream.emit('readable');
+         flow(stream);
+       } // at this point, the user has presumably seen the 'readable' event,
+       // and called read() to consume some data.  that may have triggered
+       // in turn another _read(n) call, in which case reading = true if
+       // it's in progress.
+       // However, if we're not ended, or reading, and the length < hwm,
+       // then go ahead and try to read some more preemptively.
+
+
+       function maybeReadMore(stream, state) {
+         if (!state.readingMore) {
+           state.readingMore = true;
+           nextTick$1(maybeReadMore_, stream, state);
+         }
+       }
+
+       function maybeReadMore_(stream, state) {
+         var len = state.length;
+
+         while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+           debug('maybeReadMore read 0');
+           stream.read(0);
+           if (len === state.length) // didn't get any data, stop spinning.
+             break;else len = state.length;
+         }
+
+         state.readingMore = false;
+       } // abstract method.  to be overridden in specific implementation classes.
+       // call cb(er, data) where data is <= n in length.
+       // for virtual (non-string, non-buffer) streams, "length" is somewhat
+       // arbitrary, and perhaps not very meaningful.
+
+
+       Readable.prototype._read = function (n) {
+         this.emit('error', new Error('not implemented'));
+       };
+
+       Readable.prototype.pipe = function (dest, pipeOpts) {
+         var src = this;
+         var state = this._readableState;
+
+         switch (state.pipesCount) {
+           case 0:
+             state.pipes = dest;
+             break;
+
+           case 1:
+             state.pipes = [state.pipes, dest];
+             break;
+
+           default:
+             state.pipes.push(dest);
+             break;
+         }
+
+         state.pipesCount += 1;
+         debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+         var doEnd = !pipeOpts || pipeOpts.end !== false;
+         var endFn = doEnd ? onend : cleanup;
+         if (state.endEmitted) nextTick$1(endFn);else src.once('end', endFn);
+         dest.on('unpipe', onunpipe);
+
+         function onunpipe(readable) {
+           debug('onunpipe');
+
+           if (readable === src) {
+             cleanup();
+           }
+         }
+
+         function onend() {
+           debug('onend');
+           dest.end();
+         } // when the dest drains, it reduces the awaitDrain counter
+         // on the source.  This would be more elegant with a .once()
+         // handler in flow(), but adding and removing repeatedly is
+         // too slow.
+
+
+         var ondrain = pipeOnDrain(src);
+         dest.on('drain', ondrain);
+         var cleanedUp = false;
+
+         function cleanup() {
+           debug('cleanup'); // cleanup event handlers once the pipe is broken
+
+           dest.removeListener('close', onclose);
+           dest.removeListener('finish', onfinish);
+           dest.removeListener('drain', ondrain);
+           dest.removeListener('error', onerror);
+           dest.removeListener('unpipe', onunpipe);
+           src.removeListener('end', onend);
+           src.removeListener('end', cleanup);
+           src.removeListener('data', ondata);
+           cleanedUp = true; // if the reader is waiting for a drain event from this
+           // specific writer, then it would cause it to never start
+           // flowing again.
+           // So, if this is awaiting a drain, then we just call it now.
+           // If we don't know, then assume that we are waiting for one.
+
+           if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+         } // If the user pushes more data while we're writing to dest then we'll end up
+         // in ondata again. However, we only want to increase awaitDrain once because
+         // dest will only emit one 'drain' event for the multiple writes.
+         // => Introduce a guard on increasing awaitDrain.
+
+
+         var increasedAwaitDrain = false;
+         src.on('data', ondata);
+
+         function ondata(chunk) {
+           debug('ondata');
+           increasedAwaitDrain = false;
+           var ret = dest.write(chunk);
+
+           if (false === ret && !increasedAwaitDrain) {
+             // If the user unpiped during `dest.write()`, it is possible
+             // to get stuck in a permanently paused state if that write
+             // also returned false.
+             // => Check whether `dest` is still a piping destination.
+             if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf$1(state.pipes, dest) !== -1) && !cleanedUp) {
+               debug('false write response, pause', src._readableState.awaitDrain);
+               src._readableState.awaitDrain++;
+               increasedAwaitDrain = true;
+             }
+
+             src.pause();
+           }
+         } // if the dest has an error, then stop piping into it.
+         // however, don't suppress the throwing behavior for this.
+
+
+         function onerror(er) {
+           debug('onerror', er);
+           unpipe();
+           dest.removeListener('error', onerror);
+           if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);
+         } // Make sure our error handler is attached before userland ones.
+
+
+         prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.
+
+         function onclose() {
+           dest.removeListener('finish', onfinish);
+           unpipe();
+         }
+
+         dest.once('close', onclose);
+
+         function onfinish() {
+           debug('onfinish');
+           dest.removeListener('close', onclose);
+           unpipe();
+         }
+
+         dest.once('finish', onfinish);
+
+         function unpipe() {
+           debug('unpipe');
+           src.unpipe(dest);
+         } // tell the dest that it's being piped to
+
+
+         dest.emit('pipe', src); // start the flow if it hasn't been started already.
+
+         if (!state.flowing) {
+           debug('pipe resume');
+           src.resume();
+         }
+
+         return dest;
+       };
+
+       function pipeOnDrain(src) {
+         return function () {
+           var state = src._readableState;
+           debug('pipeOnDrain', state.awaitDrain);
+           if (state.awaitDrain) state.awaitDrain--;
+
+           if (state.awaitDrain === 0 && src.listeners('data').length) {
+             state.flowing = true;
+             flow(src);
+           }
+         };
+       }
+
+       Readable.prototype.unpipe = function (dest) {
+         var state = this._readableState; // if we're not piping anywhere, then do nothing.
+
+         if (state.pipesCount === 0) return this; // just one destination.  most common case.
+
+         if (state.pipesCount === 1) {
+           // passed in one, but it's not the right one.
+           if (dest && dest !== state.pipes) return this;
+           if (!dest) dest = state.pipes; // got a match.
+
+           state.pipes = null;
+           state.pipesCount = 0;
+           state.flowing = false;
+           if (dest) dest.emit('unpipe', this);
+           return this;
+         } // slow case. multiple pipe destinations.
+
+
+         if (!dest) {
+           // remove all.
+           var dests = state.pipes;
+           var len = state.pipesCount;
+           state.pipes = null;
+           state.pipesCount = 0;
+           state.flowing = false;
+
+           for (var _i = 0; _i < len; _i++) {
+             dests[_i].emit('unpipe', this);
+           }
+
+           return this;
+         } // try to find the right one.
+
+
+         var i = indexOf$1(state.pipes, dest);
+         if (i === -1) return this;
+         state.pipes.splice(i, 1);
+         state.pipesCount -= 1;
+         if (state.pipesCount === 1) state.pipes = state.pipes[0];
+         dest.emit('unpipe', this);
+         return this;
+       }; // set up data events if they are asked for
+       // Ensure readable listeners eventually get something
+
+
+       Readable.prototype.on = function (ev, fn) {
+         var res = EventEmitter.prototype.on.call(this, ev, fn);
+
+         if (ev === 'data') {
+           // Start flowing on next tick if stream isn't explicitly paused
+           if (this._readableState.flowing !== false) this.resume();
+         } else if (ev === 'readable') {
+           var state = this._readableState;
+
+           if (!state.endEmitted && !state.readableListening) {
+             state.readableListening = state.needReadable = true;
+             state.emittedReadable = false;
+
+             if (!state.reading) {
+               nextTick$1(nReadingNextTick, this);
+             } else if (state.length) {
+               emitReadable(this);
+             }
+           }
+         }
+
+         return res;
+       };
+
+       Readable.prototype.addListener = Readable.prototype.on;
+
+       function nReadingNextTick(self) {
+         debug('readable nexttick read 0');
+         self.read(0);
+       } // pause() and resume() are remnants of the legacy readable stream API
+       // If the user uses them, then switch into old mode.
+
+
+       Readable.prototype.resume = function () {
+         var state = this._readableState;
+
+         if (!state.flowing) {
+           debug('resume');
+           state.flowing = true;
+           resume(this, state);
+         }
+
+         return this;
+       };
+
+       function resume(stream, state) {
+         if (!state.resumeScheduled) {
+           state.resumeScheduled = true;
+           nextTick$1(resume_, stream, state);
+         }
+       }
+
+       function resume_(stream, state) {
+         if (!state.reading) {
+           debug('resume read 0');
+           stream.read(0);
+         }
+
+         state.resumeScheduled = false;
+         state.awaitDrain = 0;
+         stream.emit('resume');
+         flow(stream);
+         if (state.flowing && !state.reading) stream.read(0);
+       }
+
+       Readable.prototype.pause = function () {
+         debug('call pause flowing=%j', this._readableState.flowing);
+
+         if (false !== this._readableState.flowing) {
+           debug('pause');
+           this._readableState.flowing = false;
+           this.emit('pause');
+         }
+
+         return this;
+       };
+
+       function flow(stream) {
+         var state = stream._readableState;
+         debug('flow', state.flowing);
+
+         while (state.flowing && stream.read() !== null) {}
+       } // wrap an old-style stream as the async data source.
+       // This is *not* part of the readable stream interface.
+       // It is an ugly unfortunate mess of history.
+
+
+       Readable.prototype.wrap = function (stream) {
+         var state = this._readableState;
+         var paused = false;
+         var self = this;
+         stream.on('end', function () {
+           debug('wrapped end');
+
+           if (state.decoder && !state.ended) {
+             var chunk = state.decoder.end();
+             if (chunk && chunk.length) self.push(chunk);
+           }
+
+           self.push(null);
+         });
+         stream.on('data', function (chunk) {
+           debug('wrapped data');
+           if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode
+
+           if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+           var ret = self.push(chunk);
+
+           if (!ret) {
+             paused = true;
+             stream.pause();
+           }
+         }); // proxy all the other methods.
+         // important when wrapping filters and duplexes.
+
+         for (var i in stream) {
+           if (this[i] === undefined && typeof stream[i] === 'function') {
+             this[i] = function (method) {
+               return function () {
+                 return stream[method].apply(stream, arguments);
+               };
+             }(i);
+           }
+         } // proxy certain important events.
+
+
+         var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+         forEach(events, function (ev) {
+           stream.on(ev, self.emit.bind(self, ev));
+         }); // when we try to consume some more bytes, simply unpause the
+         // underlying stream.
+
+         self._read = function (n) {
+           debug('wrapped _read', n);
+
+           if (paused) {
+             paused = false;
+             stream.resume();
+           }
+         };
+
+         return self;
+       }; // exposed for testing purposes only.
+
+
+       Readable._fromList = fromList; // Pluck off n bytes from an array of buffers.
+       // Length is the combined lengths of all the buffers in the list.
+       // This function is designed to be inlinable, so please take care when making
+       // changes to the function body.
+
+       function fromList(n, state) {
+         // nothing buffered
+         if (state.length === 0) return null;
+         var ret;
+         if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+           // read it all, truncate the list
+           if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+           state.buffer.clear();
+         } else {
+           // read part of list
+           ret = fromListPartial(n, state.buffer, state.decoder);
+         }
+         return ret;
+       } // Extracts only enough buffered data to satisfy the amount requested.
+       // This function is designed to be inlinable, so please take care when making
+       // changes to the function body.
+
+
+       function fromListPartial(n, list, hasStrings) {
+         var ret;
+
+         if (n < list.head.data.length) {
+           // slice is the same for buffers and strings
+           ret = list.head.data.slice(0, n);
+           list.head.data = list.head.data.slice(n);
+         } else if (n === list.head.data.length) {
+           // first chunk is a perfect match
+           ret = list.shift();
+         } else {
+           // result spans more than one buffer
+           ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+         }
+
+         return ret;
+       } // Copies a specified amount of characters from the list of buffered data
+       // chunks.
+       // This function is designed to be inlinable, so please take care when making
+       // changes to the function body.
+
+
+       function copyFromBufferString(n, list) {
+         var p = list.head;
+         var c = 1;
+         var ret = p.data;
+         n -= ret.length;
+
+         while (p = p.next) {
+           var str = p.data;
+           var nb = n > str.length ? str.length : n;
+           if (nb === str.length) ret += str;else ret += str.slice(0, n);
+           n -= nb;
+
+           if (n === 0) {
+             if (nb === str.length) {
+               ++c;
+               if (p.next) list.head = p.next;else list.head = list.tail = null;
+             } else {
+               list.head = p;
+               p.data = str.slice(nb);
+             }
+
+             break;
+           }
+
+           ++c;
+         }
+
+         list.length -= c;
+         return ret;
+       } // Copies a specified amount of bytes from the list of buffered data chunks.
+       // This function is designed to be inlinable, so please take care when making
+       // changes to the function body.
+
+
+       function copyFromBuffer(n, list) {
+         var ret = Buffer.allocUnsafe(n);
+         var p = list.head;
+         var c = 1;
+         p.data.copy(ret);
+         n -= p.data.length;
+
+         while (p = p.next) {
+           var buf = p.data;
+           var nb = n > buf.length ? buf.length : n;
+           buf.copy(ret, ret.length - n, 0, nb);
+           n -= nb;
+
+           if (n === 0) {
+             if (nb === buf.length) {
+               ++c;
+               if (p.next) list.head = p.next;else list.head = list.tail = null;
+             } else {
+               list.head = p;
+               p.data = buf.slice(nb);
+             }
+
+             break;
+           }
+
+           ++c;
+         }
+
+         list.length -= c;
+         return ret;
+       }
+
+       function endReadable(stream) {
+         var state = stream._readableState; // If we get here before consuming all the bytes, then that is a
+         // bug in node.  Should never happen.
+
+         if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+         if (!state.endEmitted) {
+           state.ended = true;
+           nextTick$1(endReadableNT, state, stream);
+         }
+       }
+
+       function endReadableNT(state, stream) {
+         // Check that we didn't get one last unshift.
+         if (!state.endEmitted && state.length === 0) {
+           state.endEmitted = true;
+           stream.readable = false;
+           stream.emit('end');
+         }
+       }
+
+       function forEach(xs, f) {
+         for (var i = 0, l = xs.length; i < l; i++) {
+           f(xs[i], i);
+         }
+       }
+
+       function indexOf$1(xs, x) {
+         for (var i = 0, l = xs.length; i < l; i++) {
+           if (xs[i] === x) return i;
+         }
+
+         return -1;
+       }
+
+       Writable.WritableState = WritableState;
+       inherits$1(Writable, EventEmitter);
+
+       function nop() {}
+
+       function WriteReq(chunk, encoding, cb) {
+         this.chunk = chunk;
+         this.encoding = encoding;
+         this.callback = cb;
+         this.next = null;
+       }
+
+       function WritableState(options, stream) {
+         Object.defineProperty(this, 'buffer', {
+           get: deprecate(function () {
+             return this.getBuffer();
+           }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')
+         });
+         options = options || {}; // object stream flag to indicate whether or not this stream
+         // contains buffers or objects.
+
+         this.objectMode = !!options.objectMode;
+         if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false
+         // Note: 0 is a valid value, means that we always return false if
+         // the entire buffer is not flushed immediately on write()
+
+         var hwm = options.highWaterMark;
+         var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+         this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; // cast to ints.
+
+         this.highWaterMark = ~~this.highWaterMark;
+         this.needDrain = false; // at the start of calling end()
+
+         this.ending = false; // when end() has been called, and returned
+
+         this.ended = false; // when 'finish' is emitted
+
+         this.finished = false; // should we decode strings into buffers before passing to _write?
+         // this is here so that some node-core streams can optimize string
+         // handling at a lower level.
+
+         var noDecode = options.decodeStrings === false;
+         this.decodeStrings = !noDecode; // Crypto is kind of old and crusty.  Historically, its default string
+         // encoding is 'binary' so we have to make this configurable.
+         // Everything else in the universe uses 'utf8', though.
+
+         this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement
+         // of how much we're waiting to get pushed to some underlying
+         // socket or file.
+
+         this.length = 0; // a flag to see when we're in the middle of a write.
+
+         this.writing = false; // when true all writes will be buffered until .uncork() call
+
+         this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,
+         // or on a later tick.  We set this to true at first, because any
+         // actions that shouldn't happen until "later" should generally also
+         // not happen before the first write call.
+
+         this.sync = true; // a flag to know if we're processing previously buffered items, which
+         // may call the _write() callback in the same tick, so that we don't
+         // end up in an overlapped onwrite situation.
+
+         this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)
+
+         this.onwrite = function (er) {
+           onwrite(stream, er);
+         }; // the callback that the user supplies to write(chunk,encoding,cb)
+
+
+         this.writecb = null; // the amount that is being written when _write is called.
+
+         this.writelen = 0;
+         this.bufferedRequest = null;
+         this.lastBufferedRequest = null; // number of pending user-supplied write callbacks
+         // this must be 0 before 'finish' can be emitted
+
+         this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs
+         // This is relevant for synchronous Transform streams
+
+         this.prefinished = false; // True if the error was already emitted and should not be thrown again
+
+         this.errorEmitted = false; // count buffered requests
+
+         this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
+         // one allocated and free to use, and we maintain at most two
+
+         this.corkedRequestsFree = new CorkedRequest(this);
+       }
+
+       WritableState.prototype.getBuffer = function writableStateGetBuffer() {
+         var current = this.bufferedRequest;
+         var out = [];
+
+         while (current) {
+           out.push(current);
+           current = current.next;
+         }
+
+         return out;
+       };
+       function Writable(options) {
+         // Writable ctor is applied to Duplexes, though they're not
+         // instanceof Writable, they're instanceof Readable.
+         if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);
+         this._writableState = new WritableState(options, this); // legacy.
+
+         this.writable = true;
+
+         if (options) {
+           if (typeof options.write === 'function') this._write = options.write;
+           if (typeof options.writev === 'function') this._writev = options.writev;
+         }
+
+         EventEmitter.call(this);
+       } // Otherwise people can pipe Writable streams, which is just wrong.
+
+       Writable.prototype.pipe = function () {
+         this.emit('error', new Error('Cannot pipe, not readable'));
+       };
+
+       function writeAfterEnd(stream, cb) {
+         var er = new Error('write after end'); // TODO: defer error events consistently everywhere, not just the cb
+
+         stream.emit('error', er);
+         nextTick$1(cb, er);
+       } // If we get something that is not a buffer, string, null, or undefined,
+       // and we're not in objectMode, then that's an error.
+       // Otherwise stream chunks are all considered to be of length=1, and the
+       // watermarks determine how many objects to keep in the buffer, rather than
+       // how many bytes or characters.
+
+
+       function validChunk(stream, state, chunk, cb) {
+         var valid = true;
+         var er = false; // Always throw error if a null is written
+         // if we are not in object mode then throw
+         // if it is not a buffer, string, or undefined.
+
+         if (chunk === null) {
+           er = new TypeError('May not write null values to stream');
+         } else if (!Buffer$1.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+           er = new TypeError('Invalid non-string/buffer chunk');
+         }
+
+         if (er) {
+           stream.emit('error', er);
+           nextTick$1(cb, er);
+           valid = false;
+         }
+
+         return valid;
+       }
+
+       Writable.prototype.write = function (chunk, encoding, cb) {
+         var state = this._writableState;
+         var ret = false;
+
+         if (typeof encoding === 'function') {
+           cb = encoding;
+           encoding = null;
+         }
+
+         if (Buffer$1.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+         if (typeof cb !== 'function') cb = nop;
+         if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
+           state.pendingcb++;
+           ret = writeOrBuffer(this, state, chunk, encoding, cb);
+         }
+         return ret;
+       };
+
+       Writable.prototype.cork = function () {
+         var state = this._writableState;
+         state.corked++;
+       };
+
+       Writable.prototype.uncork = function () {
+         var state = this._writableState;
+
+         if (state.corked) {
+           state.corked--;
+           if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+         }
+       };
+
+       Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+         // node::ParseEncoding() requires lower case.
+         if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+         if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+         this._writableState.defaultEncoding = encoding;
+         return this;
+       };
+
+       function decodeChunk(state, chunk, encoding) {
+         if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+           chunk = Buffer$1.from(chunk, encoding);
+         }
+
+         return chunk;
+       } // if we're already writing something, then just put this
+       // in the queue, and wait our turn.  Otherwise, call _write
+       // If we return false, then we need a drain event, so set that flag.
+
+
+       function writeOrBuffer(stream, state, chunk, encoding, cb) {
+         chunk = decodeChunk(state, chunk, encoding);
+         if (Buffer$1.isBuffer(chunk)) encoding = 'buffer';
+         var len = state.objectMode ? 1 : chunk.length;
+         state.length += len;
+         var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.
+
+         if (!ret) state.needDrain = true;
+
+         if (state.writing || state.corked) {
+           var last = state.lastBufferedRequest;
+           state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);
+
+           if (last) {
+             last.next = state.lastBufferedRequest;
+           } else {
+             state.bufferedRequest = state.lastBufferedRequest;
+           }
+
+           state.bufferedRequestCount += 1;
+         } else {
+           doWrite(stream, state, false, len, chunk, encoding, cb);
+         }
+
+         return ret;
+       }
+
+       function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+         state.writelen = len;
+         state.writecb = cb;
+         state.writing = true;
+         state.sync = true;
+         if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+         state.sync = false;
+       }
+
+       function onwriteError(stream, state, sync, er, cb) {
+         --state.pendingcb;
+         if (sync) nextTick$1(cb, er);else cb(er);
+         stream._writableState.errorEmitted = true;
+         stream.emit('error', er);
+       }
+
+       function onwriteStateUpdate(state) {
+         state.writing = false;
+         state.writecb = null;
+         state.length -= state.writelen;
+         state.writelen = 0;
+       }
+
+       function onwrite(stream, er) {
+         var state = stream._writableState;
+         var sync = state.sync;
+         var cb = state.writecb;
+         onwriteStateUpdate(state);
+         if (er) onwriteError(stream, state, sync, er, cb);else {
+           // Check if we're actually ready to finish, but don't emit yet
+           var finished = needFinish(state);
+
+           if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+             clearBuffer(stream, state);
+           }
+
+           if (sync) {
+             /*<replacement>*/
+             nextTick$1(afterWrite, stream, state, finished, cb);
+             /*</replacement>*/
+           } else {
+             afterWrite(stream, state, finished, cb);
+           }
+         }
+       }
+
+       function afterWrite(stream, state, finished, cb) {
+         if (!finished) onwriteDrain(stream, state);
+         state.pendingcb--;
+         cb();
+         finishMaybe(stream, state);
+       } // Must force callback to be called on nextTick, so that we don't
+       // emit 'drain' before the write() consumer gets the 'false' return
+       // value, and has a chance to attach a 'drain' listener.
+
+
+       function onwriteDrain(stream, state) {
+         if (state.length === 0 && state.needDrain) {
+           state.needDrain = false;
+           stream.emit('drain');
+         }
+       } // if there's something in the buffer waiting, then process it
+
+
+       function clearBuffer(stream, state) {
+         state.bufferProcessing = true;
+         var entry = state.bufferedRequest;
+
+         if (stream._writev && entry && entry.next) {
+           // Fast case, write everything using _writev()
+           var l = state.bufferedRequestCount;
+           var buffer = new Array(l);
+           var holder = state.corkedRequestsFree;
+           holder.entry = entry;
+           var count = 0;
+
+           while (entry) {
+             buffer[count] = entry;
+             entry = entry.next;
+             count += 1;
+           }
+
+           doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time
+           // as the hot path ends with doWrite
+
+           state.pendingcb++;
+           state.lastBufferedRequest = null;
+
+           if (holder.next) {
+             state.corkedRequestsFree = holder.next;
+             holder.next = null;
+           } else {
+             state.corkedRequestsFree = new CorkedRequest(state);
+           }
+         } else {
+           // Slow case, write chunks one-by-one
+           while (entry) {
+             var chunk = entry.chunk;
+             var encoding = entry.encoding;
+             var cb = entry.callback;
+             var len = state.objectMode ? 1 : chunk.length;
+             doWrite(stream, state, false, len, chunk, encoding, cb);
+             entry = entry.next; // if we didn't call the onwrite immediately, then
+             // it means that we need to wait until it does.
+             // also, that means that the chunk and cb are currently
+             // being processed, so move the buffer counter past them.
+
+             if (state.writing) {
+               break;
+             }
+           }
+
+           if (entry === null) state.lastBufferedRequest = null;
+         }
+
+         state.bufferedRequestCount = 0;
+         state.bufferedRequest = entry;
+         state.bufferProcessing = false;
+       }
+
+       Writable.prototype._write = function (chunk, encoding, cb) {
+         cb(new Error('not implemented'));
+       };
+
+       Writable.prototype._writev = null;
+
+       Writable.prototype.end = function (chunk, encoding, cb) {
+         var state = this._writableState;
+
+         if (typeof chunk === 'function') {
+           cb = chunk;
+           chunk = null;
+           encoding = null;
+         } else if (typeof encoding === 'function') {
+           cb = encoding;
+           encoding = null;
+         }
+
+         if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks
+
+         if (state.corked) {
+           state.corked = 1;
+           this.uncork();
+         } // ignore unnecessary end() calls.
+
+
+         if (!state.ending && !state.finished) endWritable(this, state, cb);
+       };
+
+       function needFinish(state) {
+         return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+       }
+
+       function prefinish(stream, state) {
+         if (!state.prefinished) {
+           state.prefinished = true;
+           stream.emit('prefinish');
+         }
+       }
+
+       function finishMaybe(stream, state) {
+         var need = needFinish(state);
+
+         if (need) {
+           if (state.pendingcb === 0) {
+             prefinish(stream, state);
+             state.finished = true;
+             stream.emit('finish');
+           } else {
+             prefinish(stream, state);
+           }
+         }
+
+         return need;
+       }
+
+       function endWritable(stream, state, cb) {
+         state.ending = true;
+         finishMaybe(stream, state);
+
+         if (cb) {
+           if (state.finished) nextTick$1(cb);else stream.once('finish', cb);
+         }
+
+         state.ended = true;
+         stream.writable = false;
+       } // It seems a linked list but it is not
+       // there will be only 2 of these for each stream
+
+
+       function CorkedRequest(state) {
+         var _this = this;
+
+         this.next = null;
+         this.entry = null;
+
+         this.finish = function (err) {
+           var entry = _this.entry;
+           _this.entry = null;
+
+           while (entry) {
+             var cb = entry.callback;
+             state.pendingcb--;
+             cb(err);
+             entry = entry.next;
+           }
+
+           if (state.corkedRequestsFree) {
+             state.corkedRequestsFree.next = _this;
+           } else {
+             state.corkedRequestsFree = _this;
+           }
+         };
+       }
+
+       inherits$1(Duplex, Readable);
+       var keys$4 = Object.keys(Writable.prototype);
+
+       for (var v = 0; v < keys$4.length; v++) {
+         var method = keys$4[v];
+         if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+       }
+       function Duplex(options) {
+         if (!(this instanceof Duplex)) return new Duplex(options);
+         Readable.call(this, options);
+         Writable.call(this, options);
+         if (options && options.readable === false) this.readable = false;
+         if (options && options.writable === false) this.writable = false;
+         this.allowHalfOpen = true;
+         if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+         this.once('end', onend);
+       } // the no-half-open enforcer
+
+       function onend() {
+         // if we allow half-open state, or if the writable side ended,
+         // then we're ok.
+         if (this.allowHalfOpen || this._writableState.ended) return; // no more data can be written.
+         // But allow more writes to happen in this tick.
+
+         nextTick$1(onEndNT, this);
+       }
+
+       function onEndNT(self) {
+         self.end();
+       }
+
+       // a transform stream is a readable/writable stream where you do
+       inherits$1(Transform, Duplex);
+
+       function TransformState(stream) {
+         this.afterTransform = function (er, data) {
+           return afterTransform(stream, er, data);
+         };
+
+         this.needTransform = false;
+         this.transforming = false;
+         this.writecb = null;
+         this.writechunk = null;
+         this.writeencoding = null;
+       }
+
+       function afterTransform(stream, er, data) {
+         var ts = stream._transformState;
+         ts.transforming = false;
+         var cb = ts.writecb;
+         if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
+         ts.writechunk = null;
+         ts.writecb = null;
+         if (data !== null && data !== undefined) stream.push(data);
+         cb(er);
+         var rs = stream._readableState;
+         rs.reading = false;
+
+         if (rs.needReadable || rs.length < rs.highWaterMark) {
+           stream._read(rs.highWaterMark);
+         }
+       }
+       function Transform(options) {
+         if (!(this instanceof Transform)) return new Transform(options);
+         Duplex.call(this, options);
+         this._transformState = new TransformState(this); // when the writable side finishes, then flush out anything remaining.
+
+         var stream = this; // start out asking for a readable event once data is transformed.
+
+         this._readableState.needReadable = true; // we have implemented the _read method, and done the other things
+         // that Readable wants before the first _read call, so unset the
+         // sync guard flag.
+
+         this._readableState.sync = false;
+
+         if (options) {
+           if (typeof options.transform === 'function') this._transform = options.transform;
+           if (typeof options.flush === 'function') this._flush = options.flush;
+         }
+
+         this.once('prefinish', function () {
+           if (typeof this._flush === 'function') this._flush(function (er) {
+             done(stream, er);
+           });else done(stream);
+         });
+       }
+
+       Transform.prototype.push = function (chunk, encoding) {
+         this._transformState.needTransform = false;
+         return Duplex.prototype.push.call(this, chunk, encoding);
+       }; // This is the part where you do stuff!
+       // override this function in implementation classes.
+       // 'chunk' is an input chunk.
+       //
+       // Call `push(newChunk)` to pass along transformed output
+       // to the readable side.  You may call 'push' zero or more times.
+       //
+       // Call `cb(err)` when you are done with this chunk.  If you pass
+       // an error, then that'll put the hurt on the whole operation.  If you
+       // never call cb(), then you'll never get another chunk.
+
+
+       Transform.prototype._transform = function (chunk, encoding, cb) {
+         throw new Error('Not implemented');
+       };
+
+       Transform.prototype._write = function (chunk, encoding, cb) {
+         var ts = this._transformState;
+         ts.writecb = cb;
+         ts.writechunk = chunk;
+         ts.writeencoding = encoding;
+
+         if (!ts.transforming) {
+           var rs = this._readableState;
+           if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+         }
+       }; // Doesn't matter what the args are here.
+       // _transform does all the work.
+       // That we got here means that the readable side wants more data.
+
+
+       Transform.prototype._read = function (n) {
+         var ts = this._transformState;
+
+         if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+           ts.transforming = true;
+
+           this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+         } else {
+           // mark that we need a transform, so that any data that comes in
+           // will get processed, now that we've asked for it.
+           ts.needTransform = true;
+         }
+       };
+
+       function done(stream, er) {
+         if (er) return stream.emit('error', er); // if there's nothing in the write buffer, then that means
+         // that nothing more will ever be provided
+
+         var ws = stream._writableState;
+         var ts = stream._transformState;
+         if (ws.length) throw new Error('Calling transform done when ws.length != 0');
+         if (ts.transforming) throw new Error('Calling transform done when still transforming');
+         return stream.push(null);
+       }
+
+       inherits$1(PassThrough, Transform);
+       function PassThrough(options) {
+         if (!(this instanceof PassThrough)) return new PassThrough(options);
+         Transform.call(this, options);
+       }
+
+       PassThrough.prototype._transform = function (chunk, encoding, cb) {
+         cb(null, chunk);
+       };
+
+       inherits$1(Stream, EventEmitter);
+       Stream.Readable = Readable;
+       Stream.Writable = Writable;
+       Stream.Duplex = Duplex;
+       Stream.Transform = Transform;
+       Stream.PassThrough = PassThrough; // Backwards-compat with node 0.4.x
+
+       Stream.Stream = Stream;
+       // part of this class) is overridden in the Readable class.
+
+       function Stream() {
+         EventEmitter.call(this);
+       }
+
+       Stream.prototype.pipe = function (dest, options) {
+         var source = this;
+
+         function ondata(chunk) {
+           if (dest.writable) {
+             if (false === dest.write(chunk) && source.pause) {
+               source.pause();
+             }
+           }
+         }
+
+         source.on('data', ondata);
+
+         function ondrain() {
+           if (source.readable && source.resume) {
+             source.resume();
+           }
+         }
+
+         dest.on('drain', ondrain); // If the 'end' option is not supplied, dest.end() will be called when
+         // source gets the 'end' or 'close' events.  Only dest.end() once.
+
+         if (!dest._isStdio && (!options || options.end !== false)) {
+           source.on('end', onend);
+           source.on('close', onclose);
+         }
+
+         var didOnEnd = false;
+
+         function onend() {
+           if (didOnEnd) return;
+           didOnEnd = true;
+           dest.end();
+         }
+
+         function onclose() {
+           if (didOnEnd) return;
+           didOnEnd = true;
+           if (typeof dest.destroy === 'function') dest.destroy();
+         } // don't leave dangling pipes when there are errors.
+
+
+         function onerror(er) {
+           cleanup();
+
+           if (EventEmitter.listenerCount(this, 'error') === 0) {
+             throw er; // Unhandled stream error in pipe.
+           }
+         }
+
+         source.on('error', onerror);
+         dest.on('error', onerror); // remove all the event listeners that were added.
+
+         function cleanup() {
+           source.removeListener('data', ondata);
+           dest.removeListener('drain', ondrain);
+           source.removeListener('end', onend);
+           source.removeListener('close', onclose);
+           source.removeListener('error', onerror);
+           dest.removeListener('error', onerror);
+           source.removeListener('end', cleanup);
+           source.removeListener('close', cleanup);
+           dest.removeListener('close', cleanup);
+         }
+
+         source.on('end', cleanup);
+         source.on('close', cleanup);
+         dest.on('close', cleanup);
+         dest.emit('pipe', source); // Allow for unix-like usage: A.pipe(B).pipe(C)
+
+         return dest;
+       };
+
+       var WritableStream = Stream.Writable;
+       var inherits$2 = util.inherits;
+       var browserStdout = BrowserStdout;
+       inherits$2(BrowserStdout, WritableStream);
+
+       function BrowserStdout(opts) {
+         if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts);
+         opts = opts || {};
+         WritableStream.call(this, opts);
+         this.label = opts.label !== undefined ? opts.label : 'stdout';
+       }
+
+       BrowserStdout.prototype._write = function (chunks, encoding, cb) {
+         var output = chunks.toString ? chunks.toString() : chunks;
+
+         if (this.label === false) {
+           console.log(output);
+         } else {
+           console.log(this.label + ':', output);
+         }
+
+         nextTick(cb);
+       };
+
+       var parseQuery = function parseQuery(qs) {
+         return qs.replace('?', '').split('&').reduce(function (obj, pair) {
+           var i = pair.indexOf('=');
+           var key = pair.slice(0, i);
+           var val = pair.slice(++i); // Due to how the URLSearchParams API treats spaces
+
+           obj[key] = decodeURIComponent(val.replace(/\+/g, '%20'));
+           return obj;
+         }, {});
+       };
+
+       function highlight(js) {
+         return js.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\/\/(.*)/gm, '<span class="comment">//$1</span>').replace(/('.*?')/gm, '<span class="string">$1</span>').replace(/(\d+\.\d+)/gm, '<span class="number">$1</span>').replace(/(\d+)/gm, '<span class="number">$1</span>').replace(/\bnew[ \t]+(\w+)/gm, '<span class="keyword">new</span> <span class="init">$1</span>').replace(/\b(function|new|throw|return|var|if|else)\b/gm, '<span class="keyword">$1</span>');
+       }
+       /**
+        * Highlight the contents of tag `name`.
+        *
+        * @private
+        * @param {string} name
+        */
+
+
+       var highlightTags = function highlightTags(name) {
+         var code = document.getElementById('mocha').getElementsByTagName(name);
+
+         for (var i = 0, len = code.length; i < len; ++i) {
+           code[i].innerHTML = highlight(code[i].innerHTML);
+         }
+       };
+
+       var nativePromiseConstructor = global_1.Promise;
+
+       // call something on iterator step with safe closing on error
+       var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
+         try {
+           return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
+         // 7.4.6 IteratorClose(iterator, completion)
+         } catch (error) {
+           var returnMethod = iterator['return'];
+           if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
+           throw error;
+         }
+       };
+
+       var iterate_1 = createCommonjsModule(function (module) {
+       var Result = function (stopped, result) {
+         this.stopped = stopped;
+         this.result = result;
+       };
+
+       var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
+         var boundFunction = functionBindContext(fn, that, AS_ENTRIES ? 2 : 1);
+         var iterator, iterFn, index, length, result, next, step;
+
+         if (IS_ITERATOR) {
+           iterator = iterable;
+         } else {
+           iterFn = getIteratorMethod(iterable);
+           if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
+           // optimisation for array iterators
+           if (isArrayIteratorMethod(iterFn)) {
+             for (index = 0, length = toLength(iterable.length); length > index; index++) {
+               result = AS_ENTRIES
+                 ? boundFunction(anObject(step = iterable[index])[0], step[1])
+                 : boundFunction(iterable[index]);
+               if (result && result instanceof Result) return result;
+             } return new Result(false);
+           }
+           iterator = iterFn.call(iterable);
+         }
+
+         next = iterator.next;
+         while (!(step = next.call(iterator)).done) {
+           result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
+           if (typeof result == 'object' && result && result instanceof Result) return result;
+         } return new Result(false);
+       };
+
+       iterate.stop = function (result) {
+         return new Result(true, result);
+       };
+       });
+
+       var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent);
+
+       var location$1 = global_1.location;
+       var set$2 = global_1.setImmediate;
+       var clear = global_1.clearImmediate;
+       var process$2 = global_1.process;
+       var MessageChannel = global_1.MessageChannel;
+       var Dispatch = global_1.Dispatch;
+       var counter = 0;
+       var queue$2 = {};
+       var ONREADYSTATECHANGE = 'onreadystatechange';
+       var defer, channel, port;
+
+       var run = function (id) {
+         // eslint-disable-next-line no-prototype-builtins
+         if (queue$2.hasOwnProperty(id)) {
+           var fn = queue$2[id];
+           delete queue$2[id];
+           fn();
+         }
+       };
+
+       var runner = function (id) {
+         return function () {
+           run(id);
+         };
+       };
+
+       var listener = function (event) {
+         run(event.data);
+       };
+
+       var post = function (id) {
+         // old engines have not location.origin
+         global_1.postMessage(id + '', location$1.protocol + '//' + location$1.host);
+       };
+
+       // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+       if (!set$2 || !clear) {
+         set$2 = function setImmediate(fn) {
+           var args = [];
+           var i = 1;
+           while (arguments.length > i) args.push(arguments[i++]);
+           queue$2[++counter] = function () {
+             // eslint-disable-next-line no-new-func
+             (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
+           };
+           defer(counter);
+           return counter;
+         };
+         clear = function clearImmediate(id) {
+           delete queue$2[id];
+         };
+         // Node.js 0.8-
+         if (classofRaw(process$2) == 'process') {
+           defer = function (id) {
+             process$2.nextTick(runner(id));
+           };
+         // Sphere (JS game engine) Dispatch API
+         } else if (Dispatch && Dispatch.now) {
+           defer = function (id) {
+             Dispatch.now(runner(id));
+           };
+         // Browsers with MessageChannel, includes WebWorkers
+         // except iOS - https://github.com/zloirock/core-js/issues/624
+         } else if (MessageChannel && !engineIsIos) {
+           channel = new MessageChannel();
+           port = channel.port2;
+           channel.port1.onmessage = listener;
+           defer = functionBindContext(port.postMessage, port, 1);
+         // Browsers with postMessage, skip WebWorkers
+         // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
+         } else if (
+           global_1.addEventListener &&
+           typeof postMessage == 'function' &&
+           !global_1.importScripts &&
+           !fails(post) &&
+           location$1.protocol !== 'file:'
+         ) {
+           defer = post;
+           global_1.addEventListener('message', listener, false);
+         // IE8-
+         } else if (ONREADYSTATECHANGE in documentCreateElement('script')) {
+           defer = function (id) {
+             html.appendChild(documentCreateElement('script'))[ONREADYSTATECHANGE] = function () {
+               html.removeChild(this);
+               run(id);
+             };
+           };
+         // Rest old browsers
+         } else {
+           defer = function (id) {
+             setTimeout(runner(id), 0);
+           };
+         }
+       }
+
+       var task = {
+         set: set$2,
+         clear: clear
+       };
+
+       var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
+
+       var macrotask = task.set;
+
+
+       var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
+       var process$3 = global_1.process;
+       var Promise$1 = global_1.Promise;
+       var IS_NODE = classofRaw(process$3) == 'process';
+       // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
+       var queueMicrotaskDescriptor = getOwnPropertyDescriptor$3(global_1, 'queueMicrotask');
+       var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
+
+       var flush, head, last, notify, toggle, node, promise, then;
+
+       // modern engines have queueMicrotask method
+       if (!queueMicrotask) {
+         flush = function () {
+           var parent, fn;
+           if (IS_NODE && (parent = process$3.domain)) parent.exit();
+           while (head) {
+             fn = head.fn;
+             head = head.next;
+             try {
+               fn();
+             } catch (error) {
+               if (head) notify();
+               else last = undefined;
+               throw error;
+             }
+           } last = undefined;
+           if (parent) parent.enter();
+         };
+
+         // Node.js
+         if (IS_NODE) {
+           notify = function () {
+             process$3.nextTick(flush);
+           };
+         // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
+         } else if (MutationObserver && !engineIsIos) {
+           toggle = true;
+           node = document.createTextNode('');
+           new MutationObserver(flush).observe(node, { characterData: true });
+           notify = function () {
+             node.data = toggle = !toggle;
+           };
+         // environments with maybe non-completely correct, but existent Promise
+         } else if (Promise$1 && Promise$1.resolve) {
+           // Promise.resolve without an argument throws an error in LG WebOS 2
+           promise = Promise$1.resolve(undefined);
+           then = promise.then;
+           notify = function () {
+             then.call(promise, flush);
+           };
+         // for other environments - macrotask based on:
+         // - setImmediate
+         // - MessageChannel
+         // - window.postMessag
+         // - onreadystatechange
+         // - setTimeout
+         } else {
+           notify = function () {
+             // strange IE + webpack dev server bug - use .call(global)
+             macrotask.call(global_1, flush);
+           };
+         }
+       }
+
+       var microtask = queueMicrotask || function (fn) {
+         var task = { fn: fn, next: undefined };
+         if (last) last.next = task;
+         if (!head) {
+           head = task;
+           notify();
+         } last = task;
+       };
+
+       var PromiseCapability = function (C) {
+         var resolve, reject;
+         this.promise = new C(function ($$resolve, $$reject) {
+           if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
+           resolve = $$resolve;
+           reject = $$reject;
+         });
+         this.resolve = aFunction$1(resolve);
+         this.reject = aFunction$1(reject);
+       };
+
+       // 25.4.1.5 NewPromiseCapability(C)
+       var f$7 = function (C) {
+         return new PromiseCapability(C);
+       };
+
+       var newPromiseCapability = {
+               f: f$7
+       };
+
+       var promiseResolve = function (C, x) {
+         anObject(C);
+         if (isObject(x) && x.constructor === C) return x;
+         var promiseCapability = newPromiseCapability.f(C);
+         var resolve = promiseCapability.resolve;
+         resolve(x);
+         return promiseCapability.promise;
+       };
+
+       var hostReportErrors = function (a, b) {
+         var console = global_1.console;
+         if (console && console.error) {
+           arguments.length === 1 ? console.error(a) : console.error(a, b);
+         }
+       };
+
+       var perform = function (exec) {
+         try {
+           return { error: false, value: exec() };
+         } catch (error) {
+           return { error: true, value: error };
+         }
+       };
+
+       var task$1 = task.set;
+
+
+
+
+
+
+
+
+
+
+       var SPECIES$6 = wellKnownSymbol('species');
+       var PROMISE = 'Promise';
+       var getInternalState$3 = internalState.get;
+       var setInternalState$4 = internalState.set;
+       var getInternalPromiseState = internalState.getterFor(PROMISE);
+       var PromiseConstructor = nativePromiseConstructor;
+       var TypeError$1 = global_1.TypeError;
+       var document$2 = global_1.document;
+       var process$4 = global_1.process;
+       var $fetch = getBuiltIn('fetch');
+       var newPromiseCapability$1 = newPromiseCapability.f;
+       var newGenericPromiseCapability = newPromiseCapability$1;
+       var IS_NODE$1 = classofRaw(process$4) == 'process';
+       var DISPATCH_EVENT = !!(document$2 && document$2.createEvent && global_1.dispatchEvent);
+       var UNHANDLED_REJECTION = 'unhandledrejection';
+       var REJECTION_HANDLED = 'rejectionhandled';
+       var PENDING = 0;
+       var FULFILLED = 1;
+       var REJECTED = 2;
+       var HANDLED = 1;
+       var UNHANDLED = 2;
+       var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
+
+       var FORCED$7 = isForced_1(PROMISE, function () {
+         var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
+         if (!GLOBAL_CORE_JS_PROMISE) {
+           // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
+           // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
+           // We can't detect it synchronously, so just check versions
+           if (engineV8Version === 66) return true;
+           // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
+           if (!IS_NODE$1 && typeof PromiseRejectionEvent != 'function') return true;
+         }
+         // We can't use @@species feature detection in V8 since it causes
+         // deoptimization and performance degradation
+         // https://github.com/zloirock/core-js/issues/679
+         if (engineV8Version >= 51 && /native code/.test(PromiseConstructor)) return false;
+         // Detect correctness of subclassing with @@species support
+         var promise = PromiseConstructor.resolve(1);
+         var FakePromise = function (exec) {
+           exec(function () { /* empty */ }, function () { /* empty */ });
+         };
+         var constructor = promise.constructor = {};
+         constructor[SPECIES$6] = FakePromise;
+         return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
+       });
+
+       var INCORRECT_ITERATION = FORCED$7 || !checkCorrectnessOfIteration(function (iterable) {
+         PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
+       });
+
+       // helpers
+       var isThenable = function (it) {
+         var then;
+         return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
+       };
+
+       var notify$1 = function (promise, state, isReject) {
+         if (state.notified) return;
+         state.notified = true;
+         var chain = state.reactions;
+         microtask(function () {
+           var value = state.value;
+           var ok = state.state == FULFILLED;
+           var index = 0;
+           // variable length - can't use forEach
+           while (chain.length > index) {
+             var reaction = chain[index++];
+             var handler = ok ? reaction.ok : reaction.fail;
+             var resolve = reaction.resolve;
+             var reject = reaction.reject;
+             var domain = reaction.domain;
+             var result, then, exited;
+             try {
+               if (handler) {
+                 if (!ok) {
+                   if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);
+                   state.rejection = HANDLED;
+                 }
+                 if (handler === true) result = value;
+                 else {
+                   if (domain) domain.enter();
+                   result = handler(value); // can throw
+                   if (domain) {
+                     domain.exit();
+                     exited = true;
+                   }
+                 }
+                 if (result === reaction.promise) {
+                   reject(TypeError$1('Promise-chain cycle'));
+                 } else if (then = isThenable(result)) {
+                   then.call(result, resolve, reject);
+                 } else resolve(result);
+               } else reject(value);
+             } catch (error) {
+               if (domain && !exited) domain.exit();
+               reject(error);
+             }
+           }
+           state.reactions = [];
+           state.notified = false;
+           if (isReject && !state.rejection) onUnhandled(promise, state);
+         });
+       };
+
+       var dispatchEvent = function (name, promise, reason) {
+         var event, handler;
+         if (DISPATCH_EVENT) {
+           event = document$2.createEvent('Event');
+           event.promise = promise;
+           event.reason = reason;
+           event.initEvent(name, false, true);
+           global_1.dispatchEvent(event);
+         } else event = { promise: promise, reason: reason };
+         if (handler = global_1['on' + name]) handler(event);
+         else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
+       };
+
+       var onUnhandled = function (promise, state) {
+         task$1.call(global_1, function () {
+           var value = state.value;
+           var IS_UNHANDLED = isUnhandled(state);
+           var result;
+           if (IS_UNHANDLED) {
+             result = perform(function () {
+               if (IS_NODE$1) {
+                 process$4.emit('unhandledRejection', value, promise);
+               } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
+             });
+             // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
+             state.rejection = IS_NODE$1 || isUnhandled(state) ? UNHANDLED : HANDLED;
+             if (result.error) throw result.value;
+           }
+         });
+       };
+
+       var isUnhandled = function (state) {
+         return state.rejection !== HANDLED && !state.parent;
+       };
+
+       var onHandleUnhandled = function (promise, state) {
+         task$1.call(global_1, function () {
+           if (IS_NODE$1) {
+             process$4.emit('rejectionHandled', promise);
+           } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
+         });
+       };
+
+       var bind = function (fn, promise, state, unwrap) {
+         return function (value) {
+           fn(promise, state, value, unwrap);
+         };
+       };
+
+       var internalReject = function (promise, state, value, unwrap) {
+         if (state.done) return;
+         state.done = true;
+         if (unwrap) state = unwrap;
+         state.value = value;
+         state.state = REJECTED;
+         notify$1(promise, state, true);
+       };
+
+       var internalResolve = function (promise, state, value, unwrap) {
+         if (state.done) return;
+         state.done = true;
+         if (unwrap) state = unwrap;
+         try {
+           if (promise === value) throw TypeError$1("Promise can't be resolved itself");
+           var then = isThenable(value);
+           if (then) {
+             microtask(function () {
+               var wrapper = { done: false };
+               try {
+                 then.call(value,
+                   bind(internalResolve, promise, wrapper, state),
+                   bind(internalReject, promise, wrapper, state)
+                 );
+               } catch (error) {
+                 internalReject(promise, wrapper, error, state);
+               }
+             });
+           } else {
+             state.value = value;
+             state.state = FULFILLED;
+             notify$1(promise, state, false);
+           }
+         } catch (error) {
+           internalReject(promise, { done: false }, error, state);
+         }
+       };
+
+       // constructor polyfill
+       if (FORCED$7) {
+         // 25.4.3.1 Promise(executor)
+         PromiseConstructor = function Promise(executor) {
+           anInstance(this, PromiseConstructor, PROMISE);
+           aFunction$1(executor);
+           Internal.call(this);
+           var state = getInternalState$3(this);
+           try {
+             executor(bind(internalResolve, this, state), bind(internalReject, this, state));
+           } catch (error) {
+             internalReject(this, state, error);
+           }
+         };
+         // eslint-disable-next-line no-unused-vars
+         Internal = function Promise(executor) {
+           setInternalState$4(this, {
+             type: PROMISE,
+             done: false,
+             notified: false,
+             parent: false,
+             reactions: [],
+             rejection: false,
+             state: PENDING,
+             value: undefined
+           });
+         };
+         Internal.prototype = redefineAll(PromiseConstructor.prototype, {
+           // `Promise.prototype.then` method
+           // https://tc39.github.io/ecma262/#sec-promise.prototype.then
+           then: function then(onFulfilled, onRejected) {
+             var state = getInternalPromiseState(this);
+             var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
+             reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+             reaction.fail = typeof onRejected == 'function' && onRejected;
+             reaction.domain = IS_NODE$1 ? process$4.domain : undefined;
+             state.parent = true;
+             state.reactions.push(reaction);
+             if (state.state != PENDING) notify$1(this, state, false);
+             return reaction.promise;
+           },
+           // `Promise.prototype.catch` method
+           // https://tc39.github.io/ecma262/#sec-promise.prototype.catch
+           'catch': function (onRejected) {
+             return this.then(undefined, onRejected);
+           }
+         });
+         OwnPromiseCapability = function () {
+           var promise = new Internal();
+           var state = getInternalState$3(promise);
+           this.promise = promise;
+           this.resolve = bind(internalResolve, promise, state);
+           this.reject = bind(internalReject, promise, state);
+         };
+         newPromiseCapability.f = newPromiseCapability$1 = function (C) {
+           return C === PromiseConstructor || C === PromiseWrapper
+             ? new OwnPromiseCapability(C)
+             : newGenericPromiseCapability(C);
+         };
+
+         if ( typeof nativePromiseConstructor == 'function') {
+           nativeThen = nativePromiseConstructor.prototype.then;
+
+           // wrap native Promise#then for native async functions
+           redefine(nativePromiseConstructor.prototype, 'then', function then(onFulfilled, onRejected) {
+             var that = this;
+             return new PromiseConstructor(function (resolve, reject) {
+               nativeThen.call(that, resolve, reject);
+             }).then(onFulfilled, onRejected);
+           // https://github.com/zloirock/core-js/issues/640
+           }, { unsafe: true });
+
+           // wrap fetch result
+           if (typeof $fetch == 'function') _export({ global: true, enumerable: true, forced: true }, {
+             // eslint-disable-next-line no-unused-vars
+             fetch: function fetch(input /* , init */) {
+               return promiseResolve(PromiseConstructor, $fetch.apply(global_1, arguments));
+             }
+           });
+         }
+       }
+
+       _export({ global: true, wrap: true, forced: FORCED$7 }, {
+         Promise: PromiseConstructor
+       });
+
+       setToStringTag(PromiseConstructor, PROMISE, false);
+       setSpecies(PROMISE);
+
+       PromiseWrapper = getBuiltIn(PROMISE);
+
+       // statics
+       _export({ target: PROMISE, stat: true, forced: FORCED$7 }, {
+         // `Promise.reject` method
+         // https://tc39.github.io/ecma262/#sec-promise.reject
+         reject: function reject(r) {
+           var capability = newPromiseCapability$1(this);
+           capability.reject.call(undefined, r);
+           return capability.promise;
+         }
+       });
+
+       _export({ target: PROMISE, stat: true, forced:  FORCED$7 }, {
+         // `Promise.resolve` method
+         // https://tc39.github.io/ecma262/#sec-promise.resolve
+         resolve: function resolve(x) {
+           return promiseResolve( this, x);
+         }
+       });
+
+       _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
+         // `Promise.all` method
+         // https://tc39.github.io/ecma262/#sec-promise.all
+         all: function all(iterable) {
+           var C = this;
+           var capability = newPromiseCapability$1(C);
+           var resolve = capability.resolve;
+           var reject = capability.reject;
+           var result = perform(function () {
+             var $promiseResolve = aFunction$1(C.resolve);
+             var values = [];
+             var counter = 0;
+             var remaining = 1;
+             iterate_1(iterable, function (promise) {
+               var index = counter++;
+               var alreadyCalled = false;
+               values.push(undefined);
+               remaining++;
+               $promiseResolve.call(C, promise).then(function (value) {
+                 if (alreadyCalled) return;
+                 alreadyCalled = true;
+                 values[index] = value;
+                 --remaining || resolve(values);
+               }, reject);
+             });
+             --remaining || resolve(values);
+           });
+           if (result.error) reject(result.value);
+           return capability.promise;
+         },
+         // `Promise.race` method
+         // https://tc39.github.io/ecma262/#sec-promise.race
+         race: function race(iterable) {
+           var C = this;
+           var capability = newPromiseCapability$1(C);
+           var reject = capability.reject;
+           var result = perform(function () {
+             var $promiseResolve = aFunction$1(C.resolve);
+             iterate_1(iterable, function (promise) {
+               $promiseResolve.call(C, promise).then(capability.resolve, reject);
+             });
+           });
+           if (result.error) reject(result.value);
+           return capability.promise;
+         }
+       });
+
+       // `Symbol.asyncIterator` well-known symbol
+       // https://tc39.github.io/ecma262/#sec-symbol.asynciterator
+       defineWellKnownSymbol('asyncIterator');
+
+       // `Symbol.iterator` well-known symbol
+       // https://tc39.github.io/ecma262/#sec-symbol.iterator
+       defineWellKnownSymbol('iterator');
+
+       // `Symbol.toStringTag` well-known symbol
+       // https://tc39.github.io/ecma262/#sec-symbol.tostringtag
+       defineWellKnownSymbol('toStringTag');
+
+       // JSON[@@toStringTag] property
+       // https://tc39.github.io/ecma262/#sec-json-@@tostringtag
+       setToStringTag(global_1.JSON, 'JSON', true);
+
+       // Math[@@toStringTag] property
+       // https://tc39.github.io/ecma262/#sec-math-@@tostringtag
+       setToStringTag(Math, 'Math', true);
+
+       var charAt$1 = stringMultibyte.charAt;
+
+
+
+       var STRING_ITERATOR = 'String Iterator';
+       var setInternalState$5 = internalState.set;
+       var getInternalState$4 = internalState.getterFor(STRING_ITERATOR);
+
+       // `String.prototype[@@iterator]` method
+       // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
+       defineIterator(String, 'String', function (iterated) {
+         setInternalState$5(this, {
+           type: STRING_ITERATOR,
+           string: String(iterated),
+           index: 0
+         });
+       // `%StringIteratorPrototype%.next` method
+       // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
+       }, function next() {
+         var state = getInternalState$4(this);
+         var string = state.string;
+         var index = state.index;
+         var point;
+         if (index >= string.length) return { value: undefined, done: true };
+         point = charAt$1(string, index);
+         state.index += point.length;
+         return { value: point, done: false };
+       });
+
+       var ITERATOR$6 = wellKnownSymbol('iterator');
+       var TO_STRING_TAG$4 = wellKnownSymbol('toStringTag');
+       var ArrayValues = es_array_iterator.values;
+
+       for (var COLLECTION_NAME$1 in domIterables) {
+         var Collection$1 = global_1[COLLECTION_NAME$1];
+         var CollectionPrototype$1 = Collection$1 && Collection$1.prototype;
+         if (CollectionPrototype$1) {
+           // some Chrome versions have non-configurable methods on DOMTokenList
+           if (CollectionPrototype$1[ITERATOR$6] !== ArrayValues) try {
+             createNonEnumerableProperty(CollectionPrototype$1, ITERATOR$6, ArrayValues);
+           } catch (error) {
+             CollectionPrototype$1[ITERATOR$6] = ArrayValues;
+           }
+           if (!CollectionPrototype$1[TO_STRING_TAG$4]) {
+             createNonEnumerableProperty(CollectionPrototype$1, TO_STRING_TAG$4, COLLECTION_NAME$1);
+           }
+           if (domIterables[COLLECTION_NAME$1]) for (var METHOD_NAME in es_array_iterator) {
+             // some Chrome versions have non-configurable methods on DOMTokenList
+             if (CollectionPrototype$1[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
+               createNonEnumerableProperty(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);
+             } catch (error) {
+               CollectionPrototype$1[METHOD_NAME] = es_array_iterator[METHOD_NAME];
+             }
+           }
+         }
+       }
+
+       var runtime = createCommonjsModule(function (module) {
+         /**
+          * Copyright (c) 2014-present, Facebook, Inc.
+          *
+          * This source code is licensed under the MIT license found in the
+          * LICENSE file in the root directory of this source tree.
+          */
+         !function (global) {
+
+           var Op = Object.prototype;
+           var hasOwn = Op.hasOwnProperty;
+           var undefined$1; // More compressible than void 0.
+
+           var $Symbol = typeof Symbol === "function" ? Symbol : {};
+           var iteratorSymbol = $Symbol.iterator || "@@iterator";
+           var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
+           var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
+           var runtime = global.regeneratorRuntime;
+
+           if (runtime) {
+             {
+               // If regeneratorRuntime is defined globally and we're in a module,
+               // make the exports object identical to regeneratorRuntime.
+               module.exports = runtime;
+             } // Don't bother evaluating the rest of this file if the runtime was
+             // already defined globally.
+
+
+             return;
+           } // Define the runtime globally (as expected by generated code) as either
+           // module.exports (if we're in a module) or a new, empty object.
+
+
+           runtime = global.regeneratorRuntime =  module.exports ;
+
+           function wrap(innerFn, outerFn, self, tryLocsList) {
+             // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
+             var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
+             var generator = Object.create(protoGenerator.prototype);
+             var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
+             // .throw, and .return methods.
+
+             generator._invoke = makeInvokeMethod(innerFn, self, context);
+             return generator;
+           }
+
+           runtime.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
+           // record like context.tryEntries[i].completion. This interface could
+           // have been (and was previously) designed to take a closure to be
+           // invoked without arguments, but in all the cases we care about we
+           // already have an existing method we want to call, so there's no need
+           // to create a new function object. We can even get away with assuming
+           // the method takes exactly one argument, since that happens to be true
+           // in every case, so we don't have to touch the arguments object. The
+           // only additional allocation required is the completion record, which
+           // has a stable shape and so hopefully should be cheap to allocate.
+
+           function tryCatch(fn, obj, arg) {
+             try {
+               return {
+                 type: "normal",
+                 arg: fn.call(obj, arg)
+               };
+             } catch (err) {
+               return {
+                 type: "throw",
+                 arg: err
+               };
+             }
+           }
+
+           var GenStateSuspendedStart = "suspendedStart";
+           var GenStateSuspendedYield = "suspendedYield";
+           var GenStateExecuting = "executing";
+           var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
+           // breaking out of the dispatch switch statement.
+
+           var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
+           // .constructor.prototype properties for functions that return Generator
+           // objects. For full spec compliance, you may wish to configure your
+           // minifier not to mangle the names of these two functions.
+
+           function Generator() {}
+
+           function GeneratorFunction() {}
+
+           function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
+           // don't natively support it.
+
+
+           var IteratorPrototype = {};
+
+           IteratorPrototype[iteratorSymbol] = function () {
+             return this;
+           };
+
+           var getProto = Object.getPrototypeOf;
+           var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
+
+           if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
+             // This environment has a native %IteratorPrototype%; use it instead
+             // of the polyfill.
+             IteratorPrototype = NativeIteratorPrototype;
+           }
+
+           var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
+           GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+           GeneratorFunctionPrototype.constructor = GeneratorFunction;
+           GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
+           // Iterator interface in terms of a single ._invoke method.
+
+           function defineIteratorMethods(prototype) {
+             ["next", "throw", "return"].forEach(function (method) {
+               prototype[method] = function (arg) {
+                 return this._invoke(method, arg);
+               };
+             });
+           }
+
+           runtime.isGeneratorFunction = function (genFun) {
+             var ctor = typeof genFun === "function" && genFun.constructor;
+             return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
+             // do is to check its .name property.
+             (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
+           };
+
+           runtime.mark = function (genFun) {
+             if (Object.setPrototypeOf) {
+               Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+             } else {
+               genFun.__proto__ = GeneratorFunctionPrototype;
+
+               if (!(toStringTagSymbol in genFun)) {
+                 genFun[toStringTagSymbol] = "GeneratorFunction";
+               }
+             }
+
+             genFun.prototype = Object.create(Gp);
+             return genFun;
+           }; // Within the body of any async function, `await x` is transformed to
+           // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+           // `hasOwn.call(value, "__await")` to determine if the yielded value is
+           // meant to be awaited.
+
+
+           runtime.awrap = function (arg) {
+             return {
+               __await: arg
+             };
+           };
+
+           function AsyncIterator(generator) {
+             function invoke(method, arg, resolve, reject) {
+               var record = tryCatch(generator[method], generator, arg);
+
+               if (record.type === "throw") {
+                 reject(record.arg);
+               } else {
+                 var result = record.arg;
+                 var value = result.value;
+
+                 if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) {
+                   return Promise.resolve(value.__await).then(function (value) {
+                     invoke("next", value, resolve, reject);
+                   }, function (err) {
+                     invoke("throw", err, resolve, reject);
+                   });
+                 }
+
+                 return Promise.resolve(value).then(function (unwrapped) {
+                   // When a yielded Promise is resolved, its final value becomes
+                   // the .value of the Promise<{value,done}> result for the
+                   // current iteration. If the Promise is rejected, however, the
+                   // result for this iteration will be rejected with the same
+                   // reason. Note that rejections of yielded Promises are not
+                   // thrown back into the generator function, as is the case
+                   // when an awaited Promise is rejected. This difference in
+                   // behavior between yield and await is important, because it
+                   // allows the consumer to decide what to do with the yielded
+                   // rejection (swallow it and continue, manually .throw it back
+                   // into the generator, abandon iteration, whatever). With
+                   // await, by contrast, there is no opportunity to examine the
+                   // rejection reason outside the generator function, so the
+                   // only option is to throw it from the await expression, and
+                   // let the generator function handle the exception.
+                   result.value = unwrapped;
+                   resolve(result);
+                 }, reject);
+               }
+             }
+
+             var previousPromise;
+
+             function enqueue(method, arg) {
+               function callInvokeWithMethodAndArg() {
+                 return new Promise(function (resolve, reject) {
+                   invoke(method, arg, resolve, reject);
+                 });
+               }
+
+               return previousPromise = // If enqueue has been called before, then we want to wait until
+               // all previous Promises have been resolved before calling invoke,
+               // so that results are always delivered in the correct order. If
+               // enqueue has not been called before, then it is important to
+               // call invoke immediately, without waiting on a callback to fire,
+               // so that the async generator function has the opportunity to do
+               // any necessary setup in a predictable way. This predictability
+               // is why the Promise constructor synchronously invokes its
+               // executor callback, and why async functions synchronously
+               // execute code before the first await. Since we implement simple
+               // async functions in terms of async generators, it is especially
+               // important to get this right, even though it requires care.
+               previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
+               // invocations of the iterator.
+               callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
+             } // Define the unified helper method that is used to implement .next,
+             // .throw, and .return (see defineIteratorMethods).
+
+
+             this._invoke = enqueue;
+           }
+
+           defineIteratorMethods(AsyncIterator.prototype);
+
+           AsyncIterator.prototype[asyncIteratorSymbol] = function () {
+             return this;
+           };
+
+           runtime.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
+           // AsyncIterator objects; they just return a Promise for the value of
+           // the final result produced by the iterator.
+
+           runtime.async = function (innerFn, outerFn, self, tryLocsList) {
+             var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
+             return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
+             : iter.next().then(function (result) {
+               return result.done ? result.value : iter.next();
+             });
+           };
+
+           function makeInvokeMethod(innerFn, self, context) {
+             var state = GenStateSuspendedStart;
+             return function invoke(method, arg) {
+               if (state === GenStateExecuting) {
+                 throw new Error("Generator is already running");
+               }
+
+               if (state === GenStateCompleted) {
+                 if (method === "throw") {
+                   throw arg;
+                 } // Be forgiving, per 25.3.3.3.3 of the spec:
+                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+
+
+                 return doneResult();
+               }
+
+               context.method = method;
+               context.arg = arg;
+
+               while (true) {
+                 var delegate = context.delegate;
+
+                 if (delegate) {
+                   var delegateResult = maybeInvokeDelegate(delegate, context);
+
+                   if (delegateResult) {
+                     if (delegateResult === ContinueSentinel) continue;
+                     return delegateResult;
+                   }
+                 }
+
+                 if (context.method === "next") {
+                   // Setting context._sent for legacy support of Babel's
+                   // function.sent implementation.
+                   context.sent = context._sent = context.arg;
+                 } else if (context.method === "throw") {
+                   if (state === GenStateSuspendedStart) {
+                     state = GenStateCompleted;
+                     throw context.arg;
+                   }
+
+                   context.dispatchException(context.arg);
+                 } else if (context.method === "return") {
+                   context.abrupt("return", context.arg);
+                 }
+
+                 state = GenStateExecuting;
+                 var record = tryCatch(innerFn, self, context);
+
+                 if (record.type === "normal") {
+                   // If an exception is thrown from innerFn, we leave state ===
+                   // GenStateExecuting and loop back for another invocation.
+                   state = context.done ? GenStateCompleted : GenStateSuspendedYield;
+
+                   if (record.arg === ContinueSentinel) {
+                     continue;
+                   }
+
+                   return {
+                     value: record.arg,
+                     done: context.done
+                   };
+                 } else if (record.type === "throw") {
+                   state = GenStateCompleted; // Dispatch the exception by looping back around to the
+                   // context.dispatchException(context.arg) call above.
+
+                   context.method = "throw";
+                   context.arg = record.arg;
+                 }
+               }
+             };
+           } // Call delegate.iterator[context.method](context.arg) and handle the
+           // result, either by returning a { value, done } result from the
+           // delegate iterator, or by modifying context.method and context.arg,
+           // setting context.delegate to null, and returning the ContinueSentinel.
+
+
+           function maybeInvokeDelegate(delegate, context) {
+             var method = delegate.iterator[context.method];
+
+             if (method === undefined$1) {
+               // A .throw or .return when the delegate iterator has no .throw
+               // method always terminates the yield* loop.
+               context.delegate = null;
+
+               if (context.method === "throw") {
+                 if (delegate.iterator["return"]) {
+                   // If the delegate iterator has a return method, give it a
+                   // chance to clean up.
+                   context.method = "return";
+                   context.arg = undefined$1;
+                   maybeInvokeDelegate(delegate, context);
+
+                   if (context.method === "throw") {
+                     // If maybeInvokeDelegate(context) changed context.method from
+                     // "return" to "throw", let that override the TypeError below.
+                     return ContinueSentinel;
+                   }
+                 }
+
+                 context.method = "throw";
+                 context.arg = new TypeError("The iterator does not provide a 'throw' method");
+               }
+
+               return ContinueSentinel;
+             }
+
+             var record = tryCatch(method, delegate.iterator, context.arg);
+
+             if (record.type === "throw") {
+               context.method = "throw";
+               context.arg = record.arg;
+               context.delegate = null;
+               return ContinueSentinel;
+             }
+
+             var info = record.arg;
+
+             if (!info) {
+               context.method = "throw";
+               context.arg = new TypeError("iterator result is not an object");
+               context.delegate = null;
+               return ContinueSentinel;
+             }
+
+             if (info.done) {
+               // Assign the result of the finished delegate to the temporary
+               // variable specified by delegate.resultName (see delegateYield).
+               context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
+
+               context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
+               // exception, let the outer generator proceed normally. If
+               // context.method was "next", forget context.arg since it has been
+               // "consumed" by the delegate iterator. If context.method was
+               // "return", allow the original .return call to continue in the
+               // outer generator.
+
+               if (context.method !== "return") {
+                 context.method = "next";
+                 context.arg = undefined$1;
+               }
+             } else {
+               // Re-yield the result returned by the delegate method.
+               return info;
+             } // The delegate iterator is finished, so forget it and continue with
+             // the outer generator.
+
+
+             context.delegate = null;
+             return ContinueSentinel;
+           } // Define Generator.prototype.{next,throw,return} in terms of the
+           // unified ._invoke helper method.
+
+
+           defineIteratorMethods(Gp);
+           Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
+           // @@iterator function is called on it. Some browsers' implementations of the
+           // iterator prototype chain incorrectly implement this, causing the Generator
+           // object to not be returned from this call. This ensures that doesn't happen.
+           // See https://github.com/facebook/regenerator/issues/274 for more details.
+
+           Gp[iteratorSymbol] = function () {
+             return this;
+           };
+
+           Gp.toString = function () {
+             return "[object Generator]";
+           };
+
+           function pushTryEntry(locs) {
+             var entry = {
+               tryLoc: locs[0]
+             };
+
+             if (1 in locs) {
+               entry.catchLoc = locs[1];
+             }
+
+             if (2 in locs) {
+               entry.finallyLoc = locs[2];
+               entry.afterLoc = locs[3];
+             }
+
+             this.tryEntries.push(entry);
+           }
+
+           function resetTryEntry(entry) {
+             var record = entry.completion || {};
+             record.type = "normal";
+             delete record.arg;
+             entry.completion = record;
+           }
+
+           function Context(tryLocsList) {
+             // The root entry object (effectively a try statement without a catch
+             // or a finally block) gives us a place to store values thrown from
+             // locations where there is no enclosing try statement.
+             this.tryEntries = [{
+               tryLoc: "root"
+             }];
+             tryLocsList.forEach(pushTryEntry, this);
+             this.reset(true);
+           }
+
+           runtime.keys = function (object) {
+             var keys = [];
+
+             for (var key in object) {
+               keys.push(key);
+             }
+
+             keys.reverse(); // Rather than returning an object with a next method, we keep
+             // things simple and return the next function itself.
+
+             return function next() {
+               while (keys.length) {
+                 var key = keys.pop();
+
+                 if (key in object) {
+                   next.value = key;
+                   next.done = false;
+                   return next;
+                 }
+               } // To avoid creating an additional object, we just hang the .value
+               // and .done properties off the next function object itself. This
+               // also ensures that the minifier will not anonymize the function.
+
+
+               next.done = true;
+               return next;
+             };
+           };
+
+           function values(iterable) {
+             if (iterable) {
+               var iteratorMethod = iterable[iteratorSymbol];
+
+               if (iteratorMethod) {
+                 return iteratorMethod.call(iterable);
+               }
+
+               if (typeof iterable.next === "function") {
+                 return iterable;
+               }
+
+               if (!isNaN(iterable.length)) {
+                 var i = -1,
+                     next = function next() {
+                   while (++i < iterable.length) {
+                     if (hasOwn.call(iterable, i)) {
+                       next.value = iterable[i];
+                       next.done = false;
+                       return next;
+                     }
+                   }
+
+                   next.value = undefined$1;
+                   next.done = true;
+                   return next;
+                 };
+
+                 return next.next = next;
+               }
+             } // Return an iterator with no values.
+
+
+             return {
+               next: doneResult
+             };
+           }
+
+           runtime.values = values;
+
+           function doneResult() {
+             return {
+               value: undefined$1,
+               done: true
+             };
+           }
+
+           Context.prototype = {
+             constructor: Context,
+             reset: function reset(skipTempReset) {
+               this.prev = 0;
+               this.next = 0; // Resetting context._sent for legacy support of Babel's
+               // function.sent implementation.
+
+               this.sent = this._sent = undefined$1;
+               this.done = false;
+               this.delegate = null;
+               this.method = "next";
+               this.arg = undefined$1;
+               this.tryEntries.forEach(resetTryEntry);
+
+               if (!skipTempReset) {
+                 for (var name in this) {
+                   // Not sure about the optimal order of these conditions:
+                   if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
+                     this[name] = undefined$1;
+                   }
+                 }
+               }
+             },
+             stop: function stop() {
+               this.done = true;
+               var rootEntry = this.tryEntries[0];
+               var rootRecord = rootEntry.completion;
+
+               if (rootRecord.type === "throw") {
+                 throw rootRecord.arg;
+               }
+
+               return this.rval;
+             },
+             dispatchException: function dispatchException(exception) {
+               if (this.done) {
+                 throw exception;
+               }
+
+               var context = this;
+
+               function handle(loc, caught) {
+                 record.type = "throw";
+                 record.arg = exception;
+                 context.next = loc;
+
+                 if (caught) {
+                   // If the dispatched exception was caught by a catch block,
+                   // then let that catch block handle the exception normally.
+                   context.method = "next";
+                   context.arg = undefined$1;
+                 }
+
+                 return !!caught;
+               }
+
+               for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+                 var entry = this.tryEntries[i];
+                 var record = entry.completion;
+
+                 if (entry.tryLoc === "root") {
+                   // Exception thrown outside of any try block that could handle
+                   // it, so set the completion value of the entire function to
+                   // throw the exception.
+                   return handle("end");
+                 }
+
+                 if (entry.tryLoc <= this.prev) {
+                   var hasCatch = hasOwn.call(entry, "catchLoc");
+                   var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+                   if (hasCatch && hasFinally) {
+                     if (this.prev < entry.catchLoc) {
+                       return handle(entry.catchLoc, true);
+                     } else if (this.prev < entry.finallyLoc) {
+                       return handle(entry.finallyLoc);
+                     }
+                   } else if (hasCatch) {
+                     if (this.prev < entry.catchLoc) {
+                       return handle(entry.catchLoc, true);
+                     }
+                   } else if (hasFinally) {
+                     if (this.prev < entry.finallyLoc) {
+                       return handle(entry.finallyLoc);
+                     }
+                   } else {
+                     throw new Error("try statement without catch or finally");
+                   }
+                 }
+               }
+             },
+             abrupt: function abrupt(type, arg) {
+               for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+                 var entry = this.tryEntries[i];
+
+                 if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
+                   var finallyEntry = entry;
+                   break;
+                 }
+               }
+
+               if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
+                 // Ignore the finally entry if control is not jumping to a
+                 // location outside the try/catch block.
+                 finallyEntry = null;
+               }
+
+               var record = finallyEntry ? finallyEntry.completion : {};
+               record.type = type;
+               record.arg = arg;
+
+               if (finallyEntry) {
+                 this.method = "next";
+                 this.next = finallyEntry.finallyLoc;
+                 return ContinueSentinel;
+               }
+
+               return this.complete(record);
+             },
+             complete: function complete(record, afterLoc) {
+               if (record.type === "throw") {
+                 throw record.arg;
+               }
+
+               if (record.type === "break" || record.type === "continue") {
+                 this.next = record.arg;
+               } else if (record.type === "return") {
+                 this.rval = this.arg = record.arg;
+                 this.method = "return";
+                 this.next = "end";
+               } else if (record.type === "normal" && afterLoc) {
+                 this.next = afterLoc;
+               }
+
+               return ContinueSentinel;
+             },
+             finish: function finish(finallyLoc) {
+               for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+                 var entry = this.tryEntries[i];
+
+                 if (entry.finallyLoc === finallyLoc) {
+                   this.complete(entry.completion, entry.afterLoc);
+                   resetTryEntry(entry);
+                   return ContinueSentinel;
+                 }
+               }
+             },
+             "catch": function _catch(tryLoc) {
+               for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+                 var entry = this.tryEntries[i];
+
+                 if (entry.tryLoc === tryLoc) {
+                   var record = entry.completion;
+
+                   if (record.type === "throw") {
+                     var thrown = record.arg;
+                     resetTryEntry(entry);
+                   }
+
+                   return thrown;
+                 }
+               } // The context.catch method must only be called with a location
+               // argument that corresponds to a known catch block.
+
+
+               throw new Error("illegal catch attempt");
+             },
+             delegateYield: function delegateYield(iterable, resultName, nextLoc) {
+               this.delegate = {
+                 iterator: values(iterable),
+                 resultName: resultName,
+                 nextLoc: nextLoc
+               };
+
+               if (this.method === "next") {
+                 // Deliberately forget the last sent value so that we don't
+                 // accidentally pass it on to the delegate.
+                 this.arg = undefined$1;
+               }
+
+               return ContinueSentinel;
+             }
+           };
+         }( // In sloppy mode, unbound `this` refers to the global object, fallback to
+         // Function constructor if we're in global strict mode. That is sadly a form
+         // of indirect eval which violates Content Security Policy.
+         function () {
+           return this;
+         }() || Function("return this")());
+       });
+
+       var escapeStringRegexp = function escapeStringRegexp(string) {
+         if (typeof string !== 'string') {
+           throw new TypeError('Expected a string');
+         } // Escape characters with special meaning either inside or outside character sets.
+         // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
+
+
+         return string.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
+       };
+
+       // Copyright Joyent, Inc. and other Node contributors.
+       //
+       // Permission is hereby granted, free of charge, to any person obtaining a
+       // copy of this software and associated documentation files (the
+       // "Software"), to deal in the Software without restriction, including
+       // without limitation the rights to use, copy, modify, merge, publish,
+       // distribute, sublicense, and/or sell copies of the Software, and to permit
+       // persons to whom the Software is furnished to do so, subject to the
+       // following conditions:
+       //
+       // The above copyright notice and this permission notice shall be included
+       // in all copies or substantial portions of the Software.
+       //
+       // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+       // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+       // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+       // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+       // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+       // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+       // USE OR OTHER DEALINGS IN THE SOFTWARE.
+       // resolves . and .. elements in a path array with directory names there
+       // must be no slashes, empty elements, or device names (c:\) in the array
+       // (so also no leading and trailing slashes - it does not distinguish
+       // relative and absolute paths)
+       function normalizeArray(parts, allowAboveRoot) {
+         // if the path tries to go above the root, `up` ends up > 0
+         var up = 0;
+
+         for (var i = parts.length - 1; i >= 0; i--) {
+           var last = parts[i];
+
+           if (last === '.') {
+             parts.splice(i, 1);
+           } else if (last === '..') {
+             parts.splice(i, 1);
+             up++;
+           } else if (up) {
+             parts.splice(i, 1);
+             up--;
+           }
+         } // if the path is allowed to go above the root, restore leading ..s
+
+
+         if (allowAboveRoot) {
+           for (; up--; up) {
+             parts.unshift('..');
+           }
+         }
+
+         return parts;
+       } // Split a filename into [root, dir, basename, ext], unix version
+       // 'root' is just a slash, or nothing.
+
+
+       var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
+
+       var splitPath = function splitPath(filename) {
+         return splitPathRe.exec(filename).slice(1);
+       }; // path.resolve([from ...], to)
+       // posix version
+
+
+       function resolve() {
+         var resolvedPath = '',
+             resolvedAbsolute = false;
+
+         for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
+           var path = i >= 0 ? arguments[i] : '/'; // Skip empty and invalid entries
+
+           if (typeof path !== 'string') {
+             throw new TypeError('Arguments to path.resolve must be strings');
+           } else if (!path) {
+             continue;
+           }
+
+           resolvedPath = path + '/' + resolvedPath;
+           resolvedAbsolute = path.charAt(0) === '/';
+         } // At this point the path should be resolved to a full absolute path, but
+         // handle relative paths to be safe (might happen when process.cwd() fails)
+         // Normalize the path
+
+
+         resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) {
+           return !!p;
+         }), !resolvedAbsolute).join('/');
+         return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
+       }
+       // posix version
+
+       function normalize$1(path) {
+         var isPathAbsolute = isAbsolute(path),
+             trailingSlash = substr(path, -1) === '/'; // Normalize the path
+
+         path = normalizeArray(filter(path.split('/'), function (p) {
+           return !!p;
+         }), !isPathAbsolute).join('/');
+
+         if (!path && !isPathAbsolute) {
+           path = '.';
+         }
+
+         if (path && trailingSlash) {
+           path += '/';
+         }
+
+         return (isPathAbsolute ? '/' : '') + path;
+       }
+
+       function isAbsolute(path) {
+         return path.charAt(0) === '/';
+       } // posix version
+
+       function join() {
+         var paths = Array.prototype.slice.call(arguments, 0);
+         return normalize$1(filter(paths, function (p, index) {
+           if (typeof p !== 'string') {
+             throw new TypeError('Arguments to path.join must be strings');
+           }
+
+           return p;
+         }).join('/'));
+       } // path.relative(from, to)
+       // posix version
+
+       function relative(from, to) {
+         from = resolve(from).substr(1);
+         to = resolve(to).substr(1);
+
+         function trim(arr) {
+           var start = 0;
+
+           for (; start < arr.length; start++) {
+             if (arr[start] !== '') break;
+           }
+
+           var end = arr.length - 1;
+
+           for (; end >= 0; end--) {
+             if (arr[end] !== '') break;
+           }
+
+           if (start > end) return [];
+           return arr.slice(start, end - start + 1);
+         }
+
+         var fromParts = trim(from.split('/'));
+         var toParts = trim(to.split('/'));
+         var length = Math.min(fromParts.length, toParts.length);
+         var samePartsLength = length;
+
+         for (var i = 0; i < length; i++) {
+           if (fromParts[i] !== toParts[i]) {
+             samePartsLength = i;
+             break;
+           }
+         }
+
+         var outputParts = [];
+
+         for (var i = samePartsLength; i < fromParts.length; i++) {
+           outputParts.push('..');
+         }
+
+         outputParts = outputParts.concat(toParts.slice(samePartsLength));
+         return outputParts.join('/');
+       }
+       var sep = '/';
+       var delimiter = ':';
+       function dirname(path) {
+         var result = splitPath(path),
+             root = result[0],
+             dir = result[1];
+
+         if (!root && !dir) {
+           // No dirname whatsoever
+           return '.';
+         }
+
+         if (dir) {
+           // It has a dirname, strip trailing slash
+           dir = dir.substr(0, dir.length - 1);
+         }
+
+         return root + dir;
+       }
+       function basename(path, ext) {
+         var f = splitPath(path)[2]; // TODO: make this comparison case-insensitive on windows?
+
+         if (ext && f.substr(-1 * ext.length) === ext) {
+           f = f.substr(0, f.length - ext.length);
+         }
+
+         return f;
+       }
+       function extname(path) {
+         return splitPath(path)[3];
+       }
+       var path$1 = {
+         extname: extname,
+         basename: basename,
+         dirname: dirname,
+         sep: sep,
+         delimiter: delimiter,
+         relative: relative,
+         join: join,
+         isAbsolute: isAbsolute,
+         normalize: normalize$1,
+         resolve: resolve
+       };
+
+       function filter(xs, f) {
+         if (xs.filter) return xs.filter(f);
+         var res = [];
+
+         for (var i = 0; i < xs.length; i++) {
+           if (f(xs[i], i, xs)) res.push(xs[i]);
+         }
+
+         return res;
+       } // String.prototype.substr - negative index don't work in IE8
+
+
+       var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) {
+         return str.substr(start, len);
+       } : function (str, start, len) {
+         if (start < 0) start = str.length + start;
+         return str.substr(start, len);
+       };
+
+       // `Array.from` method implementation
+       // https://tc39.github.io/ecma262/#sec-array.from
+       var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
+         var O = toObject(arrayLike);
+         var C = typeof this == 'function' ? this : Array;
+         var argumentsLength = arguments.length;
+         var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
+         var mapping = mapfn !== undefined;
+         var iteratorMethod = getIteratorMethod(O);
+         var index = 0;
+         var length, result, step, iterator, next, value;
+         if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
+         // if the target is not iterable or it's an array with the default iterator - use a simple case
+         if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
+           iterator = iteratorMethod.call(O);
+           next = iterator.next;
+           result = new C();
+           for (;!(step = next.call(iterator)).done; index++) {
+             value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
+             createProperty(result, index, value);
+           }
+         } else {
+           length = toLength(O.length);
+           result = new C(length);
+           for (;length > index; index++) {
+             value = mapping ? mapfn(O[index], index) : O[index];
+             createProperty(result, index, value);
+           }
+         }
+         result.length = index;
+         return result;
+       };
+
+       var INCORRECT_ITERATION$1 = !checkCorrectnessOfIteration(function (iterable) {
+         Array.from(iterable);
+       });
+
+       // `Array.from` method
+       // https://tc39.github.io/ecma262/#sec-array.from
+       _export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION$1 }, {
+         from: arrayFrom
+       });
+
+       var diff = createCommonjsModule(function (module, exports) {
+         /*!
+         
+          diff v4.0.1
+         
+         Software License Agreement (BSD License)
+         
+         Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
+         
+         All rights reserved.
+         
+         Redistribution and use of this software 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 Kevin Decker 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.
+         @license
+         */
+         (function (global, factory) {
+            factory(exports) ;
+         })(commonjsGlobal, function (exports) {
+
+           function Diff() {}
+
+           Diff.prototype = {
+             diff: function diff(oldString, newString) {
+               var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+               var callback = options.callback;
+
+               if (typeof options === 'function') {
+                 callback = options;
+                 options = {};
+               }
+
+               this.options = options;
+               var self = this;
+
+               function done(value) {
+                 if (callback) {
+                   setTimeout(function () {
+                     callback(undefined, value);
+                   }, 0);
+                   return true;
+                 } else {
+                   return value;
+                 }
+               } // Allow subclasses to massage the input prior to running
+
+
+               oldString = this.castInput(oldString);
+               newString = this.castInput(newString);
+               oldString = this.removeEmpty(this.tokenize(oldString));
+               newString = this.removeEmpty(this.tokenize(newString));
+               var newLen = newString.length,
+                   oldLen = oldString.length;
+               var editLength = 1;
+               var maxEditLength = newLen + oldLen;
+               var bestPath = [{
+                 newPos: -1,
+                 components: []
+               }]; // Seed editLength = 0, i.e. the content starts with the same values
+
+               var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
+
+               if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
+                 // Identity per the equality and tokenizer
+                 return done([{
+                   value: this.join(newString),
+                   count: newString.length
+                 }]);
+               } // Main worker method. checks all permutations of a given edit length for acceptance.
+
+
+               function execEditLength() {
+                 for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
+                   var basePath = void 0;
+
+                   var addPath = bestPath[diagonalPath - 1],
+                       removePath = bestPath[diagonalPath + 1],
+                       _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
+
+                   if (addPath) {
+                     // No one else is going to attempt to use this value, clear it
+                     bestPath[diagonalPath - 1] = undefined;
+                   }
+
+                   var canAdd = addPath && addPath.newPos + 1 < newLen,
+                       canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
+
+                   if (!canAdd && !canRemove) {
+                     // If this path is a terminal then prune
+                     bestPath[diagonalPath] = undefined;
+                     continue;
+                   } // Select the diagonal that we want to branch from. We select the prior
+                   // path whose position in the new string is the farthest from the origin
+                   // and does not pass the bounds of the diff graph
+
+
+                   if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
+                     basePath = clonePath(removePath);
+                     self.pushComponent(basePath.components, undefined, true);
+                   } else {
+                     basePath = addPath; // No need to clone, we've pulled it from the list
+
+                     basePath.newPos++;
+                     self.pushComponent(basePath.components, true, undefined);
+                   }
+
+                   _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
+
+                   if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
+                     return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
+                   } else {
+                     // Otherwise track this path as a potential candidate and continue.
+                     bestPath[diagonalPath] = basePath;
+                   }
+                 }
+
+                 editLength++;
+               } // Performs the length of edit iteration. Is a bit fugly as this has to support the
+               // sync and async mode which is never fun. Loops over execEditLength until a value
+               // is produced.
+
+
+               if (callback) {
+                 (function exec() {
+                   setTimeout(function () {
+                     // This should not happen, but we want to be safe.
+
+                     /* istanbul ignore next */
+                     if (editLength > maxEditLength) {
+                       return callback();
+                     }
+
+                     if (!execEditLength()) {
+                       exec();
+                     }
+                   }, 0);
+                 })();
+               } else {
+                 while (editLength <= maxEditLength) {
+                   var ret = execEditLength();
+
+                   if (ret) {
+                     return ret;
+                   }
+                 }
+               }
+             },
+             pushComponent: function pushComponent(components, added, removed) {
+               var last = components[components.length - 1];
+
+               if (last && last.added === added && last.removed === removed) {
+                 // We need to clone here as the component clone operation is just
+                 // as shallow array clone
+                 components[components.length - 1] = {
+                   count: last.count + 1,
+                   added: added,
+                   removed: removed
+                 };
+               } else {
+                 components.push({
+                   count: 1,
+                   added: added,
+                   removed: removed
+                 });
+               }
+             },
+             extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
+               var newLen = newString.length,
+                   oldLen = oldString.length,
+                   newPos = basePath.newPos,
+                   oldPos = newPos - diagonalPath,
+                   commonCount = 0;
+
+               while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
+                 newPos++;
+                 oldPos++;
+                 commonCount++;
+               }
+
+               if (commonCount) {
+                 basePath.components.push({
+                   count: commonCount
+                 });
+               }
+
+               basePath.newPos = newPos;
+               return oldPos;
+             },
+             equals: function equals(left, right) {
+               if (this.options.comparator) {
+                 return this.options.comparator(left, right);
+               } else {
+                 return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
+               }
+             },
+             removeEmpty: function removeEmpty(array) {
+               var ret = [];
+
+               for (var i = 0; i < array.length; i++) {
+                 if (array[i]) {
+                   ret.push(array[i]);
+                 }
+               }
+
+               return ret;
+             },
+             castInput: function castInput(value) {
+               return value;
+             },
+             tokenize: function tokenize(value) {
+               return value.split('');
+             },
+             join: function join(chars) {
+               return chars.join('');
+             }
+           };
+
+           function buildValues(diff, components, newString, oldString, useLongestToken) {
+             var componentPos = 0,
+                 componentLen = components.length,
+                 newPos = 0,
+                 oldPos = 0;
+
+             for (; componentPos < componentLen; componentPos++) {
+               var component = components[componentPos];
+
+               if (!component.removed) {
+                 if (!component.added && useLongestToken) {
+                   var value = newString.slice(newPos, newPos + component.count);
+                   value = value.map(function (value, i) {
+                     var oldValue = oldString[oldPos + i];
+                     return oldValue.length > value.length ? oldValue : value;
+                   });
+                   component.value = diff.join(value);
+                 } else {
+                   component.value = diff.join(newString.slice(newPos, newPos + component.count));
+                 }
+
+                 newPos += component.count; // Common case
+
+                 if (!component.added) {
+                   oldPos += component.count;
+                 }
+               } else {
+                 component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
+                 oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
+                 // The diffing algorithm is tied to add then remove output and this is the simplest
+                 // route to get the desired output with minimal overhead.
+
+                 if (componentPos && components[componentPos - 1].added) {
+                   var tmp = components[componentPos - 1];
+                   components[componentPos - 1] = components[componentPos];
+                   components[componentPos] = tmp;
+                 }
+               }
+             } // Special case handle for when one terminal is ignored (i.e. whitespace).
+             // For this case we merge the terminal into the prior string and drop the change.
+             // This is only available for string mode.
+
+
+             var lastComponent = components[componentLen - 1];
+
+             if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
+               components[componentLen - 2].value += lastComponent.value;
+               components.pop();
+             }
+
+             return components;
+           }
+
+           function clonePath(path) {
+             return {
+               newPos: path.newPos,
+               components: path.components.slice(0)
+             };
+           }
+
+           var characterDiff = new Diff();
+
+           function diffChars(oldStr, newStr, options) {
+             return characterDiff.diff(oldStr, newStr, options);
+           }
+
+           function generateOptions(options, defaults) {
+             if (typeof options === 'function') {
+               defaults.callback = options;
+             } else if (options) {
+               for (var name in options) {
+                 /* istanbul ignore else */
+                 if (options.hasOwnProperty(name)) {
+                   defaults[name] = options[name];
+                 }
+               }
+             }
+
+             return defaults;
+           } //
+           // Ranges and exceptions:
+           // Latin-1 Supplement, 0080–00FF
+           //  - U+00D7  × Multiplication sign
+           //  - U+00F7  ÷ Division sign
+           // Latin Extended-A, 0100–017F
+           // Latin Extended-B, 0180–024F
+           // IPA Extensions, 0250–02AF
+           // Spacing Modifier Letters, 02B0–02FF
+           //  - U+02C7  ˇ &#711;  Caron
+           //  - U+02D8  ˘ &#728;  Breve
+           //  - U+02D9  ˙ &#729;  Dot Above
+           //  - U+02DA  ˚ &#730;  Ring Above
+           //  - U+02DB  ˛ &#731;  Ogonek
+           //  - U+02DC  ˜ &#732;  Small Tilde
+           //  - U+02DD  ˝ &#733;  Double Acute Accent
+           // Latin Extended Additional, 1E00–1EFF
+
+
+           var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
+           var reWhitespace = /\S/;
+           var wordDiff = new Diff();
+
+           wordDiff.equals = function (left, right) {
+             if (this.options.ignoreCase) {
+               left = left.toLowerCase();
+               right = right.toLowerCase();
+             }
+
+             return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
+           };
+
+           wordDiff.tokenize = function (value) {
+             var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
+
+             for (var i = 0; i < tokens.length - 1; i++) {
+               // If we have an empty string in the next field and we have only word chars before and after, merge
+               if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
+                 tokens[i] += tokens[i + 2];
+                 tokens.splice(i + 1, 2);
+                 i--;
+               }
+             }
+
+             return tokens;
+           };
+
+           function diffWords(oldStr, newStr, options) {
+             options = generateOptions(options, {
+               ignoreWhitespace: true
+             });
+             return wordDiff.diff(oldStr, newStr, options);
+           }
+
+           function diffWordsWithSpace(oldStr, newStr, options) {
+             return wordDiff.diff(oldStr, newStr, options);
+           }
+
+           var lineDiff = new Diff();
+
+           lineDiff.tokenize = function (value) {
+             var retLines = [],
+                 linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
+
+             if (!linesAndNewlines[linesAndNewlines.length - 1]) {
+               linesAndNewlines.pop();
+             } // Merge the content and line separators into single tokens
+
+
+             for (var i = 0; i < linesAndNewlines.length; i++) {
+               var line = linesAndNewlines[i];
+
+               if (i % 2 && !this.options.newlineIsToken) {
+                 retLines[retLines.length - 1] += line;
+               } else {
+                 if (this.options.ignoreWhitespace) {
+                   line = line.trim();
+                 }
+
+                 retLines.push(line);
+               }
+             }
+
+             return retLines;
+           };
+
+           function diffLines(oldStr, newStr, callback) {
+             return lineDiff.diff(oldStr, newStr, callback);
+           }
+
+           function diffTrimmedLines(oldStr, newStr, callback) {
+             var options = generateOptions(callback, {
+               ignoreWhitespace: true
+             });
+             return lineDiff.diff(oldStr, newStr, options);
+           }
+
+           var sentenceDiff = new Diff();
+
+           sentenceDiff.tokenize = function (value) {
+             return value.split(/(\S.+?[.!?])(?=\s+|$)/);
+           };
+
+           function diffSentences(oldStr, newStr, callback) {
+             return sentenceDiff.diff(oldStr, newStr, callback);
+           }
+
+           var cssDiff = new Diff();
+
+           cssDiff.tokenize = function (value) {
+             return value.split(/([{}:;,]|\s+)/);
+           };
+
+           function diffCss(oldStr, newStr, callback) {
+             return cssDiff.diff(oldStr, newStr, callback);
+           }
+
+           function _typeof$1(obj) {
+             if (typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol") {
+               _typeof$1 = function _typeof$1(obj) {
+                 return _typeof(obj);
+               };
+             } else {
+               _typeof$1 = function _typeof$1(obj) {
+                 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
+               };
+             }
+
+             return _typeof$1(obj);
+           }
+
+           function _toConsumableArray(arr) {
+             return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
+           }
+
+           function _arrayWithoutHoles(arr) {
+             if (Array.isArray(arr)) {
+               for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
+                 arr2[i] = arr[i];
+               }
+
+               return arr2;
+             }
+           }
+
+           function _iterableToArray(iter) {
+             if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
+           }
+
+           function _nonIterableSpread() {
+             throw new TypeError("Invalid attempt to spread non-iterable instance");
+           }
+
+           var objectPrototypeToString = Object.prototype.toString;
+           var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
+           // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
+
+           jsonDiff.useLongestToken = true;
+           jsonDiff.tokenize = lineDiff.tokenize;
+
+           jsonDiff.castInput = function (value) {
+             var _this$options = this.options,
+                 undefinedReplacement = _this$options.undefinedReplacement,
+                 _this$options$stringi = _this$options.stringifyReplacer,
+                 stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
+               return typeof v === 'undefined' ? undefinedReplacement : v;
+             } : _this$options$stringi;
+             return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, '  ');
+           };
+
+           jsonDiff.equals = function (left, right) {
+             return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
+           };
+
+           function diffJson(oldObj, newObj, options) {
+             return jsonDiff.diff(oldObj, newObj, options);
+           } // This function handles the presence of circular references by bailing out when encountering an
+           // object that is already on the "stack" of items being processed. Accepts an optional replacer
+
+
+           function canonicalize(obj, stack, replacementStack, replacer, key) {
+             stack = stack || [];
+             replacementStack = replacementStack || [];
+
+             if (replacer) {
+               obj = replacer(key, obj);
+             }
+
+             var i;
+
+             for (i = 0; i < stack.length; i += 1) {
+               if (stack[i] === obj) {
+                 return replacementStack[i];
+               }
+             }
+
+             var canonicalizedObj;
+
+             if ('[object Array]' === objectPrototypeToString.call(obj)) {
+               stack.push(obj);
+               canonicalizedObj = new Array(obj.length);
+               replacementStack.push(canonicalizedObj);
+
+               for (i = 0; i < obj.length; i += 1) {
+                 canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
+               }
+
+               stack.pop();
+               replacementStack.pop();
+               return canonicalizedObj;
+             }
+
+             if (obj && obj.toJSON) {
+               obj = obj.toJSON();
+             }
+
+             if (_typeof$1(obj) === 'object' && obj !== null) {
+               stack.push(obj);
+               canonicalizedObj = {};
+               replacementStack.push(canonicalizedObj);
+
+               var sortedKeys = [],
+                   _key;
+
+               for (_key in obj) {
+                 /* istanbul ignore else */
+                 if (obj.hasOwnProperty(_key)) {
+                   sortedKeys.push(_key);
+                 }
+               }
+
+               sortedKeys.sort();
+
+               for (i = 0; i < sortedKeys.length; i += 1) {
+                 _key = sortedKeys[i];
+                 canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
+               }
+
+               stack.pop();
+               replacementStack.pop();
+             } else {
+               canonicalizedObj = obj;
+             }
+
+             return canonicalizedObj;
+           }
+
+           var arrayDiff = new Diff();
+
+           arrayDiff.tokenize = function (value) {
+             return value.slice();
+           };
+
+           arrayDiff.join = arrayDiff.removeEmpty = function (value) {
+             return value;
+           };
+
+           function diffArrays(oldArr, newArr, callback) {
+             return arrayDiff.diff(oldArr, newArr, callback);
+           }
+
+           function parsePatch(uniDiff) {
+             var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+             var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
+                 delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
+                 list = [],
+                 i = 0;
+
+             function parseIndex() {
+               var index = {};
+               list.push(index); // Parse diff metadata
+
+               while (i < diffstr.length) {
+                 var line = diffstr[i]; // File header found, end parsing diff metadata
+
+                 if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
+                   break;
+                 } // Diff index
+
+
+                 var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
+
+                 if (header) {
+                   index.index = header[1];
+                 }
+
+                 i++;
+               } // Parse file headers if they are defined. Unified diff requires them, but
+               // there's no technical issues to have an isolated hunk without file header
+
+
+               parseFileHeader(index);
+               parseFileHeader(index); // Parse hunks
+
+               index.hunks = [];
+
+               while (i < diffstr.length) {
+                 var _line = diffstr[i];
+
+                 if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
+                   break;
+                 } else if (/^@@/.test(_line)) {
+                   index.hunks.push(parseHunk());
+                 } else if (_line && options.strict) {
+                   // Ignore unexpected content unless in strict mode
+                   throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
+                 } else {
+                   i++;
+                 }
+               }
+             } // Parses the --- and +++ headers, if none are found, no lines
+             // are consumed.
+
+
+             function parseFileHeader(index) {
+               var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
+
+               if (fileHeader) {
+                 var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
+                 var data = fileHeader[2].split('\t', 2);
+                 var fileName = data[0].replace(/\\\\/g, '\\');
+
+                 if (/^".*"$/.test(fileName)) {
+                   fileName = fileName.substr(1, fileName.length - 2);
+                 }
+
+                 index[keyPrefix + 'FileName'] = fileName;
+                 index[keyPrefix + 'Header'] = (data[1] || '').trim();
+                 i++;
+               }
+             } // Parses a hunk
+             // This assumes that we are at the start of a hunk.
+
+
+             function parseHunk() {
+               var chunkHeaderIndex = i,
+                   chunkHeaderLine = diffstr[i++],
+                   chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
+               var hunk = {
+                 oldStart: +chunkHeader[1],
+                 oldLines: +chunkHeader[2] || 1,
+                 newStart: +chunkHeader[3],
+                 newLines: +chunkHeader[4] || 1,
+                 lines: [],
+                 linedelimiters: []
+               };
+               var addCount = 0,
+                   removeCount = 0;
+
+               for (; i < diffstr.length; i++) {
+                 // Lines starting with '---' could be mistaken for the "remove line" operation
+                 // But they could be the header for the next file. Therefore prune such cases out.
+                 if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
+                   break;
+                 }
+
+                 var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
+
+                 if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
+                   hunk.lines.push(diffstr[i]);
+                   hunk.linedelimiters.push(delimiters[i] || '\n');
+
+                   if (operation === '+') {
+                     addCount++;
+                   } else if (operation === '-') {
+                     removeCount++;
+                   } else if (operation === ' ') {
+                     addCount++;
+                     removeCount++;
+                   }
+                 } else {
+                   break;
+                 }
+               } // Handle the empty block count case
+
+
+               if (!addCount && hunk.newLines === 1) {
+                 hunk.newLines = 0;
+               }
+
+               if (!removeCount && hunk.oldLines === 1) {
+                 hunk.oldLines = 0;
+               } // Perform optional sanity checking
+
+
+               if (options.strict) {
+                 if (addCount !== hunk.newLines) {
+                   throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
+                 }
+
+                 if (removeCount !== hunk.oldLines) {
+                   throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
+                 }
+               }
+
+               return hunk;
+             }
+
+             while (i < diffstr.length) {
+               parseIndex();
+             }
+
+             return list;
+           } // Iterator that traverses in the range of [min, max], stepping
+           // by distance from a given start position. I.e. for [0, 4], with
+           // start of 2, this will iterate 2, 3, 1, 4, 0.
+
+
+           function distanceIterator(start, minLine, maxLine) {
+             var wantForward = true,
+                 backwardExhausted = false,
+                 forwardExhausted = false,
+                 localOffset = 1;
+             return function iterator() {
+               if (wantForward && !forwardExhausted) {
+                 if (backwardExhausted) {
+                   localOffset++;
+                 } else {
+                   wantForward = false;
+                 } // Check if trying to fit beyond text length, and if not, check it fits
+                 // after offset location (or desired location on first iteration)
+
+
+                 if (start + localOffset <= maxLine) {
+                   return localOffset;
+                 }
+
+                 forwardExhausted = true;
+               }
+
+               if (!backwardExhausted) {
+                 if (!forwardExhausted) {
+                   wantForward = true;
+                 } // Check if trying to fit before text beginning, and if not, check it fits
+                 // before offset location
+
+
+                 if (minLine <= start - localOffset) {
+                   return -localOffset++;
+                 }
+
+                 backwardExhausted = true;
+                 return iterator();
+               } // We tried to fit hunk before text beginning and beyond text length, then
+               // hunk can't fit on the text. Return undefined
+
+             };
+           }
+
+           function applyPatch(source, uniDiff) {
+             var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+             if (typeof uniDiff === 'string') {
+               uniDiff = parsePatch(uniDiff);
+             }
+
+             if (Array.isArray(uniDiff)) {
+               if (uniDiff.length > 1) {
+                 throw new Error('applyPatch only works with a single input.');
+               }
+
+               uniDiff = uniDiff[0];
+             } // Apply the diff to the input
+
+
+             var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
+                 delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
+                 hunks = uniDiff.hunks,
+                 compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {
+               return line === patchContent;
+             },
+                 errorCount = 0,
+                 fuzzFactor = options.fuzzFactor || 0,
+                 minLine = 0,
+                 offset = 0,
+                 removeEOFNL,
+                 addEOFNL;
+             /**
+              * Checks if the hunk exactly fits on the provided location
+              */
+
+
+             function hunkFits(hunk, toPos) {
+               for (var j = 0; j < hunk.lines.length; j++) {
+                 var line = hunk.lines[j],
+                     operation = line.length > 0 ? line[0] : ' ',
+                     content = line.length > 0 ? line.substr(1) : line;
+
+                 if (operation === ' ' || operation === '-') {
+                   // Context sanity check
+                   if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
+                     errorCount++;
+
+                     if (errorCount > fuzzFactor) {
+                       return false;
+                     }
+                   }
+
+                   toPos++;
+                 }
+               }
+
+               return true;
+             } // Search best fit offsets for each hunk based on the previous ones
+
+
+             for (var i = 0; i < hunks.length; i++) {
+               var hunk = hunks[i],
+                   maxLine = lines.length - hunk.oldLines,
+                   localOffset = 0,
+                   toPos = offset + hunk.oldStart - 1;
+               var iterator = distanceIterator(toPos, minLine, maxLine);
+
+               for (; localOffset !== undefined; localOffset = iterator()) {
+                 if (hunkFits(hunk, toPos + localOffset)) {
+                   hunk.offset = offset += localOffset;
+                   break;
+                 }
+               }
+
+               if (localOffset === undefined) {
+                 return false;
+               } // Set lower text limit to end of the current hunk, so next ones don't try
+               // to fit over already patched text
+
+
+               minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
+             } // Apply patch hunks
+
+
+             var diffOffset = 0;
+
+             for (var _i = 0; _i < hunks.length; _i++) {
+               var _hunk = hunks[_i],
+                   _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
+
+               diffOffset += _hunk.newLines - _hunk.oldLines;
+
+               if (_toPos < 0) {
+                 // Creating a new file
+                 _toPos = 0;
+               }
+
+               for (var j = 0; j < _hunk.lines.length; j++) {
+                 var line = _hunk.lines[j],
+                     operation = line.length > 0 ? line[0] : ' ',
+                     content = line.length > 0 ? line.substr(1) : line,
+                     delimiter = _hunk.linedelimiters[j];
+
+                 if (operation === ' ') {
+                   _toPos++;
+                 } else if (operation === '-') {
+                   lines.splice(_toPos, 1);
+                   delimiters.splice(_toPos, 1);
+                   /* istanbul ignore else */
+                 } else if (operation === '+') {
+                   lines.splice(_toPos, 0, content);
+                   delimiters.splice(_toPos, 0, delimiter);
+                   _toPos++;
+                 } else if (operation === '\\') {
+                   var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
+
+                   if (previousOperation === '+') {
+                     removeEOFNL = true;
+                   } else if (previousOperation === '-') {
+                     addEOFNL = true;
+                   }
+                 }
+               }
+             } // Handle EOFNL insertion/removal
+
+
+             if (removeEOFNL) {
+               while (!lines[lines.length - 1]) {
+                 lines.pop();
+                 delimiters.pop();
+               }
+             } else if (addEOFNL) {
+               lines.push('');
+               delimiters.push('\n');
+             }
+
+             for (var _k = 0; _k < lines.length - 1; _k++) {
+               lines[_k] = lines[_k] + delimiters[_k];
+             }
+
+             return lines.join('');
+           } // Wrapper that supports multiple file patches via callbacks.
+
+
+           function applyPatches(uniDiff, options) {
+             if (typeof uniDiff === 'string') {
+               uniDiff = parsePatch(uniDiff);
+             }
+
+             var currentIndex = 0;
+
+             function processIndex() {
+               var index = uniDiff[currentIndex++];
+
+               if (!index) {
+                 return options.complete();
+               }
+
+               options.loadFile(index, function (err, data) {
+                 if (err) {
+                   return options.complete(err);
+                 }
+
+                 var updatedContent = applyPatch(data, index, options);
+                 options.patched(index, updatedContent, function (err) {
+                   if (err) {
+                     return options.complete(err);
+                   }
+
+                   processIndex();
+                 });
+               });
+             }
+
+             processIndex();
+           }
+
+           function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
+             if (!options) {
+               options = {};
+             }
+
+             if (typeof options.context === 'undefined') {
+               options.context = 4;
+             }
+
+             var diff = diffLines(oldStr, newStr, options);
+             diff.push({
+               value: '',
+               lines: []
+             }); // Append an empty value to make cleanup easier
+
+             function contextLines(lines) {
+               return lines.map(function (entry) {
+                 return ' ' + entry;
+               });
+             }
+
+             var hunks = [];
+             var oldRangeStart = 0,
+                 newRangeStart = 0,
+                 curRange = [],
+                 oldLine = 1,
+                 newLine = 1;
+
+             var _loop = function _loop(i) {
+               var current = diff[i],
+                   lines = current.lines || current.value.replace(/\n$/, '').split('\n');
+               current.lines = lines;
+
+               if (current.added || current.removed) {
+                 var _curRange; // If we have previous context, start with that
+
+
+                 if (!oldRangeStart) {
+                   var prev = diff[i - 1];
+                   oldRangeStart = oldLine;
+                   newRangeStart = newLine;
+
+                   if (prev) {
+                     curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
+                     oldRangeStart -= curRange.length;
+                     newRangeStart -= curRange.length;
+                   }
+                 } // Output our changes
+
+
+                 (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {
+                   return (current.added ? '+' : '-') + entry;
+                 }))); // Track the updated file position
+
+
+                 if (current.added) {
+                   newLine += lines.length;
+                 } else {
+                   oldLine += lines.length;
+                 }
+               } else {
+                 // Identical context lines. Track line changes
+                 if (oldRangeStart) {
+                   // Close out any changes that have been output (or join overlapping)
+                   if (lines.length <= options.context * 2 && i < diff.length - 2) {
+                     var _curRange2; // Overlapping
+
+
+                     (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
+                   } else {
+                     var _curRange3; // end the range and output
+
+
+                     var contextSize = Math.min(lines.length, options.context);
+
+                     (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
+
+                     var hunk = {
+                       oldStart: oldRangeStart,
+                       oldLines: oldLine - oldRangeStart + contextSize,
+                       newStart: newRangeStart,
+                       newLines: newLine - newRangeStart + contextSize,
+                       lines: curRange
+                     };
+
+                     if (i >= diff.length - 2 && lines.length <= options.context) {
+                       // EOF is inside this hunk
+                       var oldEOFNewline = /\n$/.test(oldStr);
+                       var newEOFNewline = /\n$/.test(newStr);
+                       var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
+
+                       if (!oldEOFNewline && noNlBeforeAdds) {
+                         // special case: old has no eol and no trailing context; no-nl can end up before adds
+                         curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
+                       }
+
+                       if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
+                         curRange.push('\\ No newline at end of file');
+                       }
+                     }
+
+                     hunks.push(hunk);
+                     oldRangeStart = 0;
+                     newRangeStart = 0;
+                     curRange = [];
+                   }
+                 }
+
+                 oldLine += lines.length;
+                 newLine += lines.length;
+               }
+             };
+
+             for (var i = 0; i < diff.length; i++) {
+               _loop(i);
+             }
+
+             return {
+               oldFileName: oldFileName,
+               newFileName: newFileName,
+               oldHeader: oldHeader,
+               newHeader: newHeader,
+               hunks: hunks
+             };
+           }
+
+           function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
+             var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
+             var ret = [];
+
+             if (oldFileName == newFileName) {
+               ret.push('Index: ' + oldFileName);
+             }
+
+             ret.push('===================================================================');
+             ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
+             ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
+
+             for (var i = 0; i < diff.hunks.length; i++) {
+               var hunk = diff.hunks[i];
+               ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
+               ret.push.apply(ret, hunk.lines);
+             }
+
+             return ret.join('\n') + '\n';
+           }
+
+           function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
+             return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
+           }
+
+           function arrayEqual(a, b) {
+             if (a.length !== b.length) {
+               return false;
+             }
+
+             return arrayStartsWith(a, b);
+           }
+
+           function arrayStartsWith(array, start) {
+             if (start.length > array.length) {
+               return false;
+             }
+
+             for (var i = 0; i < start.length; i++) {
+               if (start[i] !== array[i]) {
+                 return false;
+               }
+             }
+
+             return true;
+           }
+
+           function calcLineCount(hunk) {
+             var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),
+                 oldLines = _calcOldNewLineCount.oldLines,
+                 newLines = _calcOldNewLineCount.newLines;
+
+             if (oldLines !== undefined) {
+               hunk.oldLines = oldLines;
+             } else {
+               delete hunk.oldLines;
+             }
+
+             if (newLines !== undefined) {
+               hunk.newLines = newLines;
+             } else {
+               delete hunk.newLines;
+             }
+           }
+
+           function merge(mine, theirs, base) {
+             mine = loadPatch(mine, base);
+             theirs = loadPatch(theirs, base);
+             var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
+             // Leaving sanity checks on this to the API consumer that may know more about the
+             // meaning in their own context.
+
+             if (mine.index || theirs.index) {
+               ret.index = mine.index || theirs.index;
+             }
+
+             if (mine.newFileName || theirs.newFileName) {
+               if (!fileNameChanged(mine)) {
+                 // No header or no change in ours, use theirs (and ours if theirs does not exist)
+                 ret.oldFileName = theirs.oldFileName || mine.oldFileName;
+                 ret.newFileName = theirs.newFileName || mine.newFileName;
+                 ret.oldHeader = theirs.oldHeader || mine.oldHeader;
+                 ret.newHeader = theirs.newHeader || mine.newHeader;
+               } else if (!fileNameChanged(theirs)) {
+                 // No header or no change in theirs, use ours
+                 ret.oldFileName = mine.oldFileName;
+                 ret.newFileName = mine.newFileName;
+                 ret.oldHeader = mine.oldHeader;
+                 ret.newHeader = mine.newHeader;
+               } else {
+                 // Both changed... figure it out
+                 ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
+                 ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
+                 ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
+                 ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
+               }
+             }
+
+             ret.hunks = [];
+             var mineIndex = 0,
+                 theirsIndex = 0,
+                 mineOffset = 0,
+                 theirsOffset = 0;
+
+             while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
+               var mineCurrent = mine.hunks[mineIndex] || {
+                 oldStart: Infinity
+               },
+                   theirsCurrent = theirs.hunks[theirsIndex] || {
+                 oldStart: Infinity
+               };
+
+               if (hunkBefore(mineCurrent, theirsCurrent)) {
+                 // This patch does not overlap with any of the others, yay.
+                 ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
+                 mineIndex++;
+                 theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
+               } else if (hunkBefore(theirsCurrent, mineCurrent)) {
+                 // This patch does not overlap with any of the others, yay.
+                 ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
+                 theirsIndex++;
+                 mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
+               } else {
+                 // Overlap, merge as best we can
+                 var mergedHunk = {
+                   oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
+                   oldLines: 0,
+                   newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
+                   newLines: 0,
+                   lines: []
+                 };
+                 mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
+                 theirsIndex++;
+                 mineIndex++;
+                 ret.hunks.push(mergedHunk);
+               }
+             }
+
+             return ret;
+           }
+
+           function loadPatch(param, base) {
+             if (typeof param === 'string') {
+               if (/^@@/m.test(param) || /^Index:/m.test(param)) {
+                 return parsePatch(param)[0];
+               }
+
+               if (!base) {
+                 throw new Error('Must provide a base reference or pass in a patch');
+               }
+
+               return structuredPatch(undefined, undefined, base, param);
+             }
+
+             return param;
+           }
+
+           function fileNameChanged(patch) {
+             return patch.newFileName && patch.newFileName !== patch.oldFileName;
+           }
+
+           function selectField(index, mine, theirs) {
+             if (mine === theirs) {
+               return mine;
+             } else {
+               index.conflict = true;
+               return {
+                 mine: mine,
+                 theirs: theirs
+               };
+             }
+           }
+
+           function hunkBefore(test, check) {
+             return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
+           }
+
+           function cloneHunk(hunk, offset) {
+             return {
+               oldStart: hunk.oldStart,
+               oldLines: hunk.oldLines,
+               newStart: hunk.newStart + offset,
+               newLines: hunk.newLines,
+               lines: hunk.lines
+             };
+           }
+
+           function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
+             // This will generally result in a conflicted hunk, but there are cases where the context
+             // is the only overlap where we can successfully merge the content here.
+             var mine = {
+               offset: mineOffset,
+               lines: mineLines,
+               index: 0
+             },
+                 their = {
+               offset: theirOffset,
+               lines: theirLines,
+               index: 0
+             }; // Handle any leading content
+
+             insertLeading(hunk, mine, their);
+             insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
+
+             while (mine.index < mine.lines.length && their.index < their.lines.length) {
+               var mineCurrent = mine.lines[mine.index],
+                   theirCurrent = their.lines[their.index];
+
+               if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
+                 // Both modified ...
+                 mutualChange(hunk, mine, their);
+               } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
+                 var _hunk$lines; // Mine inserted
+
+
+                 (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));
+               } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
+                 var _hunk$lines2; // Theirs inserted
+
+
+                 (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));
+               } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
+                 // Mine removed or edited
+                 removal(hunk, mine, their);
+               } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
+                 // Their removed or edited
+                 removal(hunk, their, mine, true);
+               } else if (mineCurrent === theirCurrent) {
+                 // Context identity
+                 hunk.lines.push(mineCurrent);
+                 mine.index++;
+                 their.index++;
+               } else {
+                 // Context mismatch
+                 conflict(hunk, collectChange(mine), collectChange(their));
+               }
+             } // Now push anything that may be remaining
+
+
+             insertTrailing(hunk, mine);
+             insertTrailing(hunk, their);
+             calcLineCount(hunk);
+           }
+
+           function mutualChange(hunk, mine, their) {
+             var myChanges = collectChange(mine),
+                 theirChanges = collectChange(their);
+
+             if (allRemoves(myChanges) && allRemoves(theirChanges)) {
+               // Special case for remove changes that are supersets of one another
+               if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
+                 var _hunk$lines3;
+
+                 (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));
+
+                 return;
+               } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
+                 var _hunk$lines4;
+
+                 (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));
+
+                 return;
+               }
+             } else if (arrayEqual(myChanges, theirChanges)) {
+               var _hunk$lines5;
+
+               (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));
+
+               return;
+             }
+
+             conflict(hunk, myChanges, theirChanges);
+           }
+
+           function removal(hunk, mine, their, swap) {
+             var myChanges = collectChange(mine),
+                 theirChanges = collectContext(their, myChanges);
+
+             if (theirChanges.merged) {
+               var _hunk$lines6;
+
+               (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));
+             } else {
+               conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
+             }
+           }
+
+           function conflict(hunk, mine, their) {
+             hunk.conflict = true;
+             hunk.lines.push({
+               conflict: true,
+               mine: mine,
+               theirs: their
+             });
+           }
+
+           function insertLeading(hunk, insert, their) {
+             while (insert.offset < their.offset && insert.index < insert.lines.length) {
+               var line = insert.lines[insert.index++];
+               hunk.lines.push(line);
+               insert.offset++;
+             }
+           }
+
+           function insertTrailing(hunk, insert) {
+             while (insert.index < insert.lines.length) {
+               var line = insert.lines[insert.index++];
+               hunk.lines.push(line);
+             }
+           }
+
+           function collectChange(state) {
+             var ret = [],
+                 operation = state.lines[state.index][0];
+
+             while (state.index < state.lines.length) {
+               var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
+
+               if (operation === '-' && line[0] === '+') {
+                 operation = '+';
+               }
+
+               if (operation === line[0]) {
+                 ret.push(line);
+                 state.index++;
+               } else {
+                 break;
+               }
+             }
+
+             return ret;
+           }
+
+           function collectContext(state, matchChanges) {
+             var changes = [],
+                 merged = [],
+                 matchIndex = 0,
+                 contextChanges = false,
+                 conflicted = false;
+
+             while (matchIndex < matchChanges.length && state.index < state.lines.length) {
+               var change = state.lines[state.index],
+                   match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
+
+               if (match[0] === '+') {
+                 break;
+               }
+
+               contextChanges = contextChanges || change[0] !== ' ';
+               merged.push(match);
+               matchIndex++; // Consume any additions in the other block as a conflict to attempt
+               // to pull in the remaining context after this
+
+               if (change[0] === '+') {
+                 conflicted = true;
+
+                 while (change[0] === '+') {
+                   changes.push(change);
+                   change = state.lines[++state.index];
+                 }
+               }
+
+               if (match.substr(1) === change.substr(1)) {
+                 changes.push(change);
+                 state.index++;
+               } else {
+                 conflicted = true;
+               }
+             }
+
+             if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
+               conflicted = true;
+             }
+
+             if (conflicted) {
+               return changes;
+             }
+
+             while (matchIndex < matchChanges.length) {
+               merged.push(matchChanges[matchIndex++]);
+             }
+
+             return {
+               merged: merged,
+               changes: changes
+             };
+           }
+
+           function allRemoves(changes) {
+             return changes.reduce(function (prev, change) {
+               return prev && change[0] === '-';
+             }, true);
+           }
+
+           function skipRemoveSuperset(state, removeChanges, delta) {
+             for (var i = 0; i < delta; i++) {
+               var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
+
+               if (state.lines[state.index + i] !== ' ' + changeContent) {
+                 return false;
+               }
+             }
+
+             state.index += delta;
+             return true;
+           }
+
+           function calcOldNewLineCount(lines) {
+             var oldLines = 0;
+             var newLines = 0;
+             lines.forEach(function (line) {
+               if (typeof line !== 'string') {
+                 var myCount = calcOldNewLineCount(line.mine);
+                 var theirCount = calcOldNewLineCount(line.theirs);
+
+                 if (oldLines !== undefined) {
+                   if (myCount.oldLines === theirCount.oldLines) {
+                     oldLines += myCount.oldLines;
+                   } else {
+                     oldLines = undefined;
+                   }
+                 }
+
+                 if (newLines !== undefined) {
+                   if (myCount.newLines === theirCount.newLines) {
+                     newLines += myCount.newLines;
+                   } else {
+                     newLines = undefined;
+                   }
+                 }
+               } else {
+                 if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
+                   newLines++;
+                 }
+
+                 if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
+                   oldLines++;
+                 }
+               }
+             });
+             return {
+               oldLines: oldLines,
+               newLines: newLines
+             };
+           } // See: http://code.google.com/p/google-diff-match-patch/wiki/API
+
+
+           function convertChangesToDMP(changes) {
+             var ret = [],
+                 change,
+                 operation;
+
+             for (var i = 0; i < changes.length; i++) {
+               change = changes[i];
+
+               if (change.added) {
+                 operation = 1;
+               } else if (change.removed) {
+                 operation = -1;
+               } else {
+                 operation = 0;
+               }
+
+               ret.push([operation, change.value]);
+             }
+
+             return ret;
+           }
+
+           function convertChangesToXML(changes) {
+             var ret = [];
+
+             for (var i = 0; i < changes.length; i++) {
+               var change = changes[i];
+
+               if (change.added) {
+                 ret.push('<ins>');
+               } else if (change.removed) {
+                 ret.push('<del>');
+               }
+
+               ret.push(escapeHTML(change.value));
+
+               if (change.added) {
+                 ret.push('</ins>');
+               } else if (change.removed) {
+                 ret.push('</del>');
+               }
+             }
+
+             return ret.join('');
+           }
+
+           function escapeHTML(s) {
+             var n = s;
+             n = n.replace(/&/g, '&amp;');
+             n = n.replace(/</g, '&lt;');
+             n = n.replace(/>/g, '&gt;');
+             n = n.replace(/"/g, '&quot;');
+             return n;
+           }
+           /* See LICENSE file for terms of use */
+
+
+           exports.Diff = Diff;
+           exports.diffChars = diffChars;
+           exports.diffWords = diffWords;
+           exports.diffWordsWithSpace = diffWordsWithSpace;
+           exports.diffLines = diffLines;
+           exports.diffTrimmedLines = diffTrimmedLines;
+           exports.diffSentences = diffSentences;
+           exports.diffCss = diffCss;
+           exports.diffJson = diffJson;
+           exports.diffArrays = diffArrays;
+           exports.structuredPatch = structuredPatch;
+           exports.createTwoFilesPatch = createTwoFilesPatch;
+           exports.createPatch = createPatch;
+           exports.applyPatch = applyPatch;
+           exports.applyPatches = applyPatches;
+           exports.parsePatch = parsePatch;
+           exports.merge = merge;
+           exports.convertChangesToDMP = convertChangesToDMP;
+           exports.convertChangesToXML = convertChangesToXML;
+           exports.canonicalize = canonicalize;
+           Object.defineProperty(exports, '__esModule', {
+             value: true
+           });
+         });
+       });
+
+       /**
+        * Helpers.
+        */
+       var s = 1000;
+       var m = s * 60;
+       var h = m * 60;
+       var d = h * 24;
+       var w = d * 7;
+       var y = d * 365.25;
+       /**
+        * Parse or format the given `val`.
+        *
+        * Options:
+        *
+        *  - `long` verbose formatting [false]
+        *
+        * @param {String|Number} val
+        * @param {Object} [options]
+        * @throws {Error} throw an error if val is not a non-empty string or a number
+        * @return {String|Number}
+        * @api public
+        */
+
+       var ms = function ms(val, options) {
+         options = options || {};
+
+         var type = _typeof(val);
+
+         if (type === 'string' && val.length > 0) {
+           return parse(val);
+         } else if (type === 'number' && isFinite(val)) {
+           return options["long"] ? fmtLong(val) : fmtShort(val);
+         }
+
+         throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
+       };
+       /**
+        * Parse the given `str` and return milliseconds.
+        *
+        * @param {String} str
+        * @return {Number}
+        * @api private
+        */
+
+
+       function parse(str) {
+         str = String(str);
+
+         if (str.length > 100) {
+           return;
+         }
+
+         var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
+
+         if (!match) {
+           return;
+         }
+
+         var n = parseFloat(match[1]);
+         var type = (match[2] || 'ms').toLowerCase();
+
+         switch (type) {
+           case 'years':
+           case 'year':
+           case 'yrs':
+           case 'yr':
+           case 'y':
+             return n * y;
+
+           case 'weeks':
+           case 'week':
+           case 'w':
+             return n * w;
+
+           case 'days':
+           case 'day':
+           case 'd':
+             return n * d;
+
+           case 'hours':
+           case 'hour':
+           case 'hrs':
+           case 'hr':
+           case 'h':
+             return n * h;
+
+           case 'minutes':
+           case 'minute':
+           case 'mins':
+           case 'min':
+           case 'm':
+             return n * m;
+
+           case 'seconds':
+           case 'second':
+           case 'secs':
+           case 'sec':
+           case 's':
+             return n * s;
+
+           case 'milliseconds':
+           case 'millisecond':
+           case 'msecs':
+           case 'msec':
+           case 'ms':
+             return n;
+
+           default:
+             return undefined;
+         }
+       }
+       /**
+        * Short format for `ms`.
+        *
+        * @param {Number} ms
+        * @return {String}
+        * @api private
+        */
+
+
+       function fmtShort(ms) {
+         var msAbs = Math.abs(ms);
+
+         if (msAbs >= d) {
+           return Math.round(ms / d) + 'd';
+         }
+
+         if (msAbs >= h) {
+           return Math.round(ms / h) + 'h';
+         }
+
+         if (msAbs >= m) {
+           return Math.round(ms / m) + 'm';
+         }
+
+         if (msAbs >= s) {
+           return Math.round(ms / s) + 's';
+         }
+
+         return ms + 'ms';
+       }
+       /**
+        * Long format for `ms`.
+        *
+        * @param {Number} ms
+        * @return {String}
+        * @api private
+        */
+
+
+       function fmtLong(ms) {
+         var msAbs = Math.abs(ms);
+
+         if (msAbs >= d) {
+           return plural(ms, msAbs, d, 'day');
+         }
+
+         if (msAbs >= h) {
+           return plural(ms, msAbs, h, 'hour');
+         }
+
+         if (msAbs >= m) {
+           return plural(ms, msAbs, m, 'minute');
+         }
+
+         if (msAbs >= s) {
+           return plural(ms, msAbs, s, 'second');
+         }
+
+         return ms + ' ms';
+       }
+       /**
+        * Pluralization helper.
+        */
+
+
+       function plural(ms, msAbs, n, name) {
+         var isPlural = msAbs >= n * 1.5;
+         return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+       }
+
+       var freezing = !fails(function () {
+         return Object.isExtensible(Object.preventExtensions({}));
+       });
+
+       var internalMetadata = createCommonjsModule(function (module) {
+       var defineProperty = objectDefineProperty.f;
+
+
+
+       var METADATA = uid('meta');
+       var id = 0;
+
+       var isExtensible = Object.isExtensible || function () {
+         return true;
+       };
+
+       var setMetadata = function (it) {
+         defineProperty(it, METADATA, { value: {
+           objectID: 'O' + ++id, // object ID
+           weakData: {}          // weak collections IDs
+         } });
+       };
+
+       var fastKey = function (it, create) {
+         // return a primitive with prefix
+         if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+         if (!has(it, METADATA)) {
+           // can't set metadata to uncaught frozen object
+           if (!isExtensible(it)) return 'F';
+           // not necessary to add metadata
+           if (!create) return 'E';
+           // add missing metadata
+           setMetadata(it);
+         // return object ID
+         } return it[METADATA].objectID;
+       };
+
+       var getWeakData = function (it, create) {
+         if (!has(it, METADATA)) {
+           // can't set metadata to uncaught frozen object
+           if (!isExtensible(it)) return true;
+           // not necessary to add metadata
+           if (!create) return false;
+           // add missing metadata
+           setMetadata(it);
+         // return the store of weak collections IDs
+         } return it[METADATA].weakData;
+       };
+
+       // add metadata on freeze-family methods calling
+       var onFreeze = function (it) {
+         if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
+         return it;
+       };
+
+       var meta = module.exports = {
+         REQUIRED: false,
+         fastKey: fastKey,
+         getWeakData: getWeakData,
+         onFreeze: onFreeze
+       };
+
+       hiddenKeys[METADATA] = true;
+       });
+
+       var onFreeze = internalMetadata.onFreeze;
+
+       var nativeFreeze = Object.freeze;
+       var FAILS_ON_PRIMITIVES$4 = fails(function () { nativeFreeze(1); });
+
+       // `Object.freeze` method
+       // https://tc39.github.io/ecma262/#sec-object.freeze
+       _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4, sham: !freezing }, {
+         freeze: function freeze(it) {
+           return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
+         }
+       });
+
+       var collection = function (CONSTRUCTOR_NAME, wrapper, common) {
+         var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
+         var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
+         var ADDER = IS_MAP ? 'set' : 'add';
+         var NativeConstructor = global_1[CONSTRUCTOR_NAME];
+         var NativePrototype = NativeConstructor && NativeConstructor.prototype;
+         var Constructor = NativeConstructor;
+         var exported = {};
+
+         var fixMethod = function (KEY) {
+           var nativeMethod = NativePrototype[KEY];
+           redefine(NativePrototype, KEY,
+             KEY == 'add' ? function add(value) {
+               nativeMethod.call(this, value === 0 ? 0 : value);
+               return this;
+             } : KEY == 'delete' ? function (key) {
+               return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
+             } : KEY == 'get' ? function get(key) {
+               return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
+             } : KEY == 'has' ? function has(key) {
+               return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
+             } : function set(key, value) {
+               nativeMethod.call(this, key === 0 ? 0 : key, value);
+               return this;
+             }
+           );
+         };
+
+         // eslint-disable-next-line max-len
+         if (isForced_1(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
+           new NativeConstructor().entries().next();
+         })))) {
+           // create collection constructor
+           Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
+           internalMetadata.REQUIRED = true;
+         } else if (isForced_1(CONSTRUCTOR_NAME, true)) {
+           var instance = new Constructor();
+           // early implementations not supports chaining
+           var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
+           // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
+           var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
+           // most early implementations doesn't supports iterables, most modern - not close it correctly
+           // eslint-disable-next-line no-new
+           var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
+           // for early implementations -0 and +0 not the same
+           var BUGGY_ZERO = !IS_WEAK && fails(function () {
+             // V8 ~ Chromium 42- fails only with 5+ elements
+             var $instance = new NativeConstructor();
+             var index = 5;
+             while (index--) $instance[ADDER](index, index);
+             return !$instance.has(-0);
+           });
+
+           if (!ACCEPT_ITERABLES) {
+             Constructor = wrapper(function (dummy, iterable) {
+               anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
+               var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
+               if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);
+               return that;
+             });
+             Constructor.prototype = NativePrototype;
+             NativePrototype.constructor = Constructor;
+           }
+
+           if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
+             fixMethod('delete');
+             fixMethod('has');
+             IS_MAP && fixMethod('get');
+           }
+
+           if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
+
+           // weak collections should not contains .clear method
+           if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
+         }
+
+         exported[CONSTRUCTOR_NAME] = Constructor;
+         _export({ global: true, forced: Constructor != NativeConstructor }, exported);
+
+         setToStringTag(Constructor, CONSTRUCTOR_NAME);
+
+         if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
+
+         return Constructor;
+       };
+
+       var defineProperty$a = objectDefineProperty.f;
+
+
+
+
+
+
+
+
+       var fastKey = internalMetadata.fastKey;
+
+
+       var setInternalState$6 = internalState.set;
+       var internalStateGetterFor = internalState.getterFor;
+
+       var collectionStrong = {
+         getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
+           var C = wrapper(function (that, iterable) {
+             anInstance(that, C, CONSTRUCTOR_NAME);
+             setInternalState$6(that, {
+               type: CONSTRUCTOR_NAME,
+               index: objectCreate(null),
+               first: undefined,
+               last: undefined,
+               size: 0
+             });
+             if (!descriptors) that.size = 0;
+             if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);
+           });
+
+           var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
+
+           var define = function (that, key, value) {
+             var state = getInternalState(that);
+             var entry = getEntry(that, key);
+             var previous, index;
+             // change existing entry
+             if (entry) {
+               entry.value = value;
+             // create new entry
+             } else {
+               state.last = entry = {
+                 index: index = fastKey(key, true),
+                 key: key,
+                 value: value,
+                 previous: previous = state.last,
+                 next: undefined,
+                 removed: false
+               };
+               if (!state.first) state.first = entry;
+               if (previous) previous.next = entry;
+               if (descriptors) state.size++;
+               else that.size++;
+               // add to index
+               if (index !== 'F') state.index[index] = entry;
+             } return that;
+           };
+
+           var getEntry = function (that, key) {
+             var state = getInternalState(that);
+             // fast case
+             var index = fastKey(key);
+             var entry;
+             if (index !== 'F') return state.index[index];
+             // frozen object case
+             for (entry = state.first; entry; entry = entry.next) {
+               if (entry.key == key) return entry;
+             }
+           };
+
+           redefineAll(C.prototype, {
+             // 23.1.3.1 Map.prototype.clear()
+             // 23.2.3.2 Set.prototype.clear()
+             clear: function clear() {
+               var that = this;
+               var state = getInternalState(that);
+               var data = state.index;
+               var entry = state.first;
+               while (entry) {
+                 entry.removed = true;
+                 if (entry.previous) entry.previous = entry.previous.next = undefined;
+                 delete data[entry.index];
+                 entry = entry.next;
+               }
+               state.first = state.last = undefined;
+               if (descriptors) state.size = 0;
+               else that.size = 0;
+             },
+             // 23.1.3.3 Map.prototype.delete(key)
+             // 23.2.3.4 Set.prototype.delete(value)
+             'delete': function (key) {
+               var that = this;
+               var state = getInternalState(that);
+               var entry = getEntry(that, key);
+               if (entry) {
+                 var next = entry.next;
+                 var prev = entry.previous;
+                 delete state.index[entry.index];
+                 entry.removed = true;
+                 if (prev) prev.next = next;
+                 if (next) next.previous = prev;
+                 if (state.first == entry) state.first = next;
+                 if (state.last == entry) state.last = prev;
+                 if (descriptors) state.size--;
+                 else that.size--;
+               } return !!entry;
+             },
+             // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
+             // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
+             forEach: function forEach(callbackfn /* , that = undefined */) {
+               var state = getInternalState(this);
+               var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
+               var entry;
+               while (entry = entry ? entry.next : state.first) {
+                 boundFunction(entry.value, entry.key, this);
+                 // revert to the last existing entry
+                 while (entry && entry.removed) entry = entry.previous;
+               }
+             },
+             // 23.1.3.7 Map.prototype.has(key)
+             // 23.2.3.7 Set.prototype.has(value)
+             has: function has(key) {
+               return !!getEntry(this, key);
+             }
+           });
+
+           redefineAll(C.prototype, IS_MAP ? {
+             // 23.1.3.6 Map.prototype.get(key)
+             get: function get(key) {
+               var entry = getEntry(this, key);
+               return entry && entry.value;
+             },
+             // 23.1.3.9 Map.prototype.set(key, value)
+             set: function set(key, value) {
+               return define(this, key === 0 ? 0 : key, value);
+             }
+           } : {
+             // 23.2.3.1 Set.prototype.add(value)
+             add: function add(value) {
+               return define(this, value = value === 0 ? 0 : value, value);
+             }
+           });
+           if (descriptors) defineProperty$a(C.prototype, 'size', {
+             get: function () {
+               return getInternalState(this).size;
+             }
+           });
+           return C;
+         },
+         setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
+           var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
+           var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
+           var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
+           // add .keys, .values, .entries, [@@iterator]
+           // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
+           defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
+             setInternalState$6(this, {
+               type: ITERATOR_NAME,
+               target: iterated,
+               state: getInternalCollectionState(iterated),
+               kind: kind,
+               last: undefined
+             });
+           }, function () {
+             var state = getInternalIteratorState(this);
+             var kind = state.kind;
+             var entry = state.last;
+             // revert to the last existing entry
+             while (entry && entry.removed) entry = entry.previous;
+             // get next entry
+             if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
+               // or finish the iteration
+               state.target = undefined;
+               return { value: undefined, done: true };
+             }
+             // return step by kind
+             if (kind == 'keys') return { value: entry.key, done: false };
+             if (kind == 'values') return { value: entry.value, done: false };
+             return { value: [entry.key, entry.value], done: false };
+           }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
+
+           // add [@@species], 23.1.2.2, 23.2.2.2
+           setSpecies(CONSTRUCTOR_NAME);
+         }
+       };
+
+       // `Set` constructor
+       // https://tc39.github.io/ecma262/#sec-set-objects
+       var es_set = collection('Set', function (init) {
+         return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
+       }, collectionStrong);
+
+       var browser$1 = true;
+
+       // This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped
+       // optimize the gzip compression for this alphabet.
+       var urlAlphabet = 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW';
+
+       var customAlphabet = function customAlphabet(alphabet, size) {
+         return function () {
+           var id = ''; // A compact alternative for `for (var i = 0; i < step; i++)`.
+
+           var i = size;
+
+           while (i--) {
+             // `| 0` is more compact and faster than `Math.floor()`.
+             id += alphabet[Math.random() * alphabet.length | 0];
+           }
+
+           return id;
+         };
+       };
+
+       var nanoid = function nanoid() {
+         var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
+         var id = ''; // A compact alternative for `for (var i = 0; i < step; i++)`.
+
+         var i = size;
+
+         while (i--) {
+           // `| 0` is more compact and faster than `Math.floor()`.
+           id += urlAlphabet[Math.random() * 64 | 0];
+         }
+
+         return id;
+       };
+
+       var nonSecure = /*#__PURE__*/Object.freeze({
+               __proto__: null,
+               nanoid: nanoid,
+               customAlphabet: customAlphabet
+       });
+
+       var he = createCommonjsModule(function (module, exports) {
+
+         (function (root) {
+           // Detect free variables `exports`.
+           var freeExports =  exports; // Detect free variable `module`.
+
+           var freeModule =  module && module.exports == freeExports && module; // Detect free variable `global`, from Node.js or Browserified code,
+           // and use it as `root`.
+
+           var freeGlobal = _typeof(commonjsGlobal) == 'object' && commonjsGlobal;
+
+           if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
+             root = freeGlobal;
+           }
+           /*--------------------------------------------------------------------------*/
+           // All astral symbols.
+
+
+           var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; // All ASCII symbols (not just printable ASCII) except those listed in the
+           // first column of the overrides table.
+           // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides
+
+           var regexAsciiWhitelist = /[\x01-\x7F]/g; // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
+           // code points listed in the first column of the overrides table on
+           // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.
+
+           var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
+           var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;
+           var encodeMap = {
+             '\xAD': 'shy',
+             "\u200C": 'zwnj',
+             "\u200D": 'zwj',
+             "\u200E": 'lrm',
+             "\u2063": 'ic',
+             "\u2062": 'it',
+             "\u2061": 'af',
+             "\u200F": 'rlm',
+             "\u200B": 'ZeroWidthSpace',
+             "\u2060": 'NoBreak',
+             "\u0311": 'DownBreve',
+             "\u20DB": 'tdot',
+             "\u20DC": 'DotDot',
+             '\t': 'Tab',
+             '\n': 'NewLine',
+             "\u2008": 'puncsp',
+             "\u205F": 'MediumSpace',
+             "\u2009": 'thinsp',
+             "\u200A": 'hairsp',
+             "\u2004": 'emsp13',
+             "\u2002": 'ensp',
+             "\u2005": 'emsp14',
+             "\u2003": 'emsp',
+             "\u2007": 'numsp',
+             '\xA0': 'nbsp',
+             "\u205F\u200A": 'ThickSpace',
+             "\u203E": 'oline',
+             '_': 'lowbar',
+             "\u2010": 'dash',
+             "\u2013": 'ndash',
+             "\u2014": 'mdash',
+             "\u2015": 'horbar',
+             ',': 'comma',
+             ';': 'semi',
+             "\u204F": 'bsemi',
+             ':': 'colon',
+             "\u2A74": 'Colone',
+             '!': 'excl',
+             '\xA1': 'iexcl',
+             '?': 'quest',
+             '\xBF': 'iquest',
+             '.': 'period',
+             "\u2025": 'nldr',
+             "\u2026": 'mldr',
+             '\xB7': 'middot',
+             '\'': 'apos',
+             "\u2018": 'lsquo',
+             "\u2019": 'rsquo',
+             "\u201A": 'sbquo',
+             "\u2039": 'lsaquo',
+             "\u203A": 'rsaquo',
+             '"': 'quot',
+             "\u201C": 'ldquo',
+             "\u201D": 'rdquo',
+             "\u201E": 'bdquo',
+             '\xAB': 'laquo',
+             '\xBB': 'raquo',
+             '(': 'lpar',
+             ')': 'rpar',
+             '[': 'lsqb',
+             ']': 'rsqb',
+             '{': 'lcub',
+             '}': 'rcub',
+             "\u2308": 'lceil',
+             "\u2309": 'rceil',
+             "\u230A": 'lfloor',
+             "\u230B": 'rfloor',
+             "\u2985": 'lopar',
+             "\u2986": 'ropar',
+             "\u298B": 'lbrke',
+             "\u298C": 'rbrke',
+             "\u298D": 'lbrkslu',
+             "\u298E": 'rbrksld',
+             "\u298F": 'lbrksld',
+             "\u2990": 'rbrkslu',
+             "\u2991": 'langd',
+             "\u2992": 'rangd',
+             "\u2993": 'lparlt',
+             "\u2994": 'rpargt',
+             "\u2995": 'gtlPar',
+             "\u2996": 'ltrPar',
+             "\u27E6": 'lobrk',
+             "\u27E7": 'robrk',
+             "\u27E8": 'lang',
+             "\u27E9": 'rang',
+             "\u27EA": 'Lang',
+             "\u27EB": 'Rang',
+             "\u27EC": 'loang',
+             "\u27ED": 'roang',
+             "\u2772": 'lbbrk',
+             "\u2773": 'rbbrk',
+             "\u2016": 'Vert',
+             '\xA7': 'sect',
+             '\xB6': 'para',
+             '@': 'commat',
+             '*': 'ast',
+             '/': 'sol',
+             'undefined': null,
+             '&': 'amp',
+             '#': 'num',
+             '%': 'percnt',
+             "\u2030": 'permil',
+             "\u2031": 'pertenk',
+             "\u2020": 'dagger',
+             "\u2021": 'Dagger',
+             "\u2022": 'bull',
+             "\u2043": 'hybull',
+             "\u2032": 'prime',
+             "\u2033": 'Prime',
+             "\u2034": 'tprime',
+             "\u2057": 'qprime',
+             "\u2035": 'bprime',
+             "\u2041": 'caret',
+             '`': 'grave',
+             '\xB4': 'acute',
+             "\u02DC": 'tilde',
+             '^': 'Hat',
+             '\xAF': 'macr',
+             "\u02D8": 'breve',
+             "\u02D9": 'dot',
+             '\xA8': 'die',
+             "\u02DA": 'ring',
+             "\u02DD": 'dblac',
+             '\xB8': 'cedil',
+             "\u02DB": 'ogon',
+             "\u02C6": 'circ',
+             "\u02C7": 'caron',
+             '\xB0': 'deg',
+             '\xA9': 'copy',
+             '\xAE': 'reg',
+             "\u2117": 'copysr',
+             "\u2118": 'wp',
+             "\u211E": 'rx',
+             "\u2127": 'mho',
+             "\u2129": 'iiota',
+             "\u2190": 'larr',
+             "\u219A": 'nlarr',
+             "\u2192": 'rarr',
+             "\u219B": 'nrarr',
+             "\u2191": 'uarr',
+             "\u2193": 'darr',
+             "\u2194": 'harr',
+             "\u21AE": 'nharr',
+             "\u2195": 'varr',
+             "\u2196": 'nwarr',
+             "\u2197": 'nearr',
+             "\u2198": 'searr',
+             "\u2199": 'swarr',
+             "\u219D": 'rarrw',
+             "\u219D\u0338": 'nrarrw',
+             "\u219E": 'Larr',
+             "\u219F": 'Uarr',
+             "\u21A0": 'Rarr',
+             "\u21A1": 'Darr',
+             "\u21A2": 'larrtl',
+             "\u21A3": 'rarrtl',
+             "\u21A4": 'mapstoleft',
+             "\u21A5": 'mapstoup',
+             "\u21A6": 'map',
+             "\u21A7": 'mapstodown',
+             "\u21A9": 'larrhk',
+             "\u21AA": 'rarrhk',
+             "\u21AB": 'larrlp',
+             "\u21AC": 'rarrlp',
+             "\u21AD": 'harrw',
+             "\u21B0": 'lsh',
+             "\u21B1": 'rsh',
+             "\u21B2": 'ldsh',
+             "\u21B3": 'rdsh',
+             "\u21B5": 'crarr',
+             "\u21B6": 'cularr',
+             "\u21B7": 'curarr',
+             "\u21BA": 'olarr',
+             "\u21BB": 'orarr',
+             "\u21BC": 'lharu',
+             "\u21BD": 'lhard',
+             "\u21BE": 'uharr',
+             "\u21BF": 'uharl',
+             "\u21C0": 'rharu',
+             "\u21C1": 'rhard',
+             "\u21C2": 'dharr',
+             "\u21C3": 'dharl',
+             "\u21C4": 'rlarr',
+             "\u21C5": 'udarr',
+             "\u21C6": 'lrarr',
+             "\u21C7": 'llarr',
+             "\u21C8": 'uuarr',
+             "\u21C9": 'rrarr',
+             "\u21CA": 'ddarr',
+             "\u21CB": 'lrhar',
+             "\u21CC": 'rlhar',
+             "\u21D0": 'lArr',
+             "\u21CD": 'nlArr',
+             "\u21D1": 'uArr',
+             "\u21D2": 'rArr',
+             "\u21CF": 'nrArr',
+             "\u21D3": 'dArr',
+             "\u21D4": 'iff',
+             "\u21CE": 'nhArr',
+             "\u21D5": 'vArr',
+             "\u21D6": 'nwArr',
+             "\u21D7": 'neArr',
+             "\u21D8": 'seArr',
+             "\u21D9": 'swArr',
+             "\u21DA": 'lAarr',
+             "\u21DB": 'rAarr',
+             "\u21DD": 'zigrarr',
+             "\u21E4": 'larrb',
+             "\u21E5": 'rarrb',
+             "\u21F5": 'duarr',
+             "\u21FD": 'loarr',
+             "\u21FE": 'roarr',
+             "\u21FF": 'hoarr',
+             "\u2200": 'forall',
+             "\u2201": 'comp',
+             "\u2202": 'part',
+             "\u2202\u0338": 'npart',
+             "\u2203": 'exist',
+             "\u2204": 'nexist',
+             "\u2205": 'empty',
+             "\u2207": 'Del',
+             "\u2208": 'in',
+             "\u2209": 'notin',
+             "\u220B": 'ni',
+             "\u220C": 'notni',
+             "\u03F6": 'bepsi',
+             "\u220F": 'prod',
+             "\u2210": 'coprod',
+             "\u2211": 'sum',
+             '+': 'plus',
+             '\xB1': 'pm',
+             '\xF7': 'div',
+             '\xD7': 'times',
+             '<': 'lt',
+             "\u226E": 'nlt',
+             "<\u20D2": 'nvlt',
+             '=': 'equals',
+             "\u2260": 'ne',
+             "=\u20E5": 'bne',
+             "\u2A75": 'Equal',
+             '>': 'gt',
+             "\u226F": 'ngt',
+             ">\u20D2": 'nvgt',
+             '\xAC': 'not',
+             '|': 'vert',
+             '\xA6': 'brvbar',
+             "\u2212": 'minus',
+             "\u2213": 'mp',
+             "\u2214": 'plusdo',
+             "\u2044": 'frasl',
+             "\u2216": 'setmn',
+             "\u2217": 'lowast',
+             "\u2218": 'compfn',
+             "\u221A": 'Sqrt',
+             "\u221D": 'prop',
+             "\u221E": 'infin',
+             "\u221F": 'angrt',
+             "\u2220": 'ang',
+             "\u2220\u20D2": 'nang',
+             "\u2221": 'angmsd',
+             "\u2222": 'angsph',
+             "\u2223": 'mid',
+             "\u2224": 'nmid',
+             "\u2225": 'par',
+             "\u2226": 'npar',
+             "\u2227": 'and',
+             "\u2228": 'or',
+             "\u2229": 'cap',
+             "\u2229\uFE00": 'caps',
+             "\u222A": 'cup',
+             "\u222A\uFE00": 'cups',
+             "\u222B": 'int',
+             "\u222C": 'Int',
+             "\u222D": 'tint',
+             "\u2A0C": 'qint',
+             "\u222E": 'oint',
+             "\u222F": 'Conint',
+             "\u2230": 'Cconint',
+             "\u2231": 'cwint',
+             "\u2232": 'cwconint',
+             "\u2233": 'awconint',
+             "\u2234": 'there4',
+             "\u2235": 'becaus',
+             "\u2236": 'ratio',
+             "\u2237": 'Colon',
+             "\u2238": 'minusd',
+             "\u223A": 'mDDot',
+             "\u223B": 'homtht',
+             "\u223C": 'sim',
+             "\u2241": 'nsim',
+             "\u223C\u20D2": 'nvsim',
+             "\u223D": 'bsim',
+             "\u223D\u0331": 'race',
+             "\u223E": 'ac',
+             "\u223E\u0333": 'acE',
+             "\u223F": 'acd',
+             "\u2240": 'wr',
+             "\u2242": 'esim',
+             "\u2242\u0338": 'nesim',
+             "\u2243": 'sime',
+             "\u2244": 'nsime',
+             "\u2245": 'cong',
+             "\u2247": 'ncong',
+             "\u2246": 'simne',
+             "\u2248": 'ap',
+             "\u2249": 'nap',
+             "\u224A": 'ape',
+             "\u224B": 'apid',
+             "\u224B\u0338": 'napid',
+             "\u224C": 'bcong',
+             "\u224D": 'CupCap',
+             "\u226D": 'NotCupCap',
+             "\u224D\u20D2": 'nvap',
+             "\u224E": 'bump',
+             "\u224E\u0338": 'nbump',
+             "\u224F": 'bumpe',
+             "\u224F\u0338": 'nbumpe',
+             "\u2250": 'doteq',
+             "\u2250\u0338": 'nedot',
+             "\u2251": 'eDot',
+             "\u2252": 'efDot',
+             "\u2253": 'erDot',
+             "\u2254": 'colone',
+             "\u2255": 'ecolon',
+             "\u2256": 'ecir',
+             "\u2257": 'cire',
+             "\u2259": 'wedgeq',
+             "\u225A": 'veeeq',
+             "\u225C": 'trie',
+             "\u225F": 'equest',
+             "\u2261": 'equiv',
+             "\u2262": 'nequiv',
+             "\u2261\u20E5": 'bnequiv',
+             "\u2264": 'le',
+             "\u2270": 'nle',
+             "\u2264\u20D2": 'nvle',
+             "\u2265": 'ge',
+             "\u2271": 'nge',
+             "\u2265\u20D2": 'nvge',
+             "\u2266": 'lE',
+             "\u2266\u0338": 'nlE',
+             "\u2267": 'gE',
+             "\u2267\u0338": 'ngE',
+             "\u2268\uFE00": 'lvnE',
+             "\u2268": 'lnE',
+             "\u2269": 'gnE',
+             "\u2269\uFE00": 'gvnE',
+             "\u226A": 'll',
+             "\u226A\u0338": 'nLtv',
+             "\u226A\u20D2": 'nLt',
+             "\u226B": 'gg',
+             "\u226B\u0338": 'nGtv',
+             "\u226B\u20D2": 'nGt',
+             "\u226C": 'twixt',
+             "\u2272": 'lsim',
+             "\u2274": 'nlsim',
+             "\u2273": 'gsim',
+             "\u2275": 'ngsim',
+             "\u2276": 'lg',
+             "\u2278": 'ntlg',
+             "\u2277": 'gl',
+             "\u2279": 'ntgl',
+             "\u227A": 'pr',
+             "\u2280": 'npr',
+             "\u227B": 'sc',
+             "\u2281": 'nsc',
+             "\u227C": 'prcue',
+             "\u22E0": 'nprcue',
+             "\u227D": 'sccue',
+             "\u22E1": 'nsccue',
+             "\u227E": 'prsim',
+             "\u227F": 'scsim',
+             "\u227F\u0338": 'NotSucceedsTilde',
+             "\u2282": 'sub',
+             "\u2284": 'nsub',
+             "\u2282\u20D2": 'vnsub',
+             "\u2283": 'sup',
+             "\u2285": 'nsup',
+             "\u2283\u20D2": 'vnsup',
+             "\u2286": 'sube',
+             "\u2288": 'nsube',
+             "\u2287": 'supe',
+             "\u2289": 'nsupe',
+             "\u228A\uFE00": 'vsubne',
+             "\u228A": 'subne',
+             "\u228B\uFE00": 'vsupne',
+             "\u228B": 'supne',
+             "\u228D": 'cupdot',
+             "\u228E": 'uplus',
+             "\u228F": 'sqsub',
+             "\u228F\u0338": 'NotSquareSubset',
+             "\u2290": 'sqsup',
+             "\u2290\u0338": 'NotSquareSuperset',
+             "\u2291": 'sqsube',
+             "\u22E2": 'nsqsube',
+             "\u2292": 'sqsupe',
+             "\u22E3": 'nsqsupe',
+             "\u2293": 'sqcap',
+             "\u2293\uFE00": 'sqcaps',
+             "\u2294": 'sqcup',
+             "\u2294\uFE00": 'sqcups',
+             "\u2295": 'oplus',
+             "\u2296": 'ominus',
+             "\u2297": 'otimes',
+             "\u2298": 'osol',
+             "\u2299": 'odot',
+             "\u229A": 'ocir',
+             "\u229B": 'oast',
+             "\u229D": 'odash',
+             "\u229E": 'plusb',
+             "\u229F": 'minusb',
+             "\u22A0": 'timesb',
+             "\u22A1": 'sdotb',
+             "\u22A2": 'vdash',
+             "\u22AC": 'nvdash',
+             "\u22A3": 'dashv',
+             "\u22A4": 'top',
+             "\u22A5": 'bot',
+             "\u22A7": 'models',
+             "\u22A8": 'vDash',
+             "\u22AD": 'nvDash',
+             "\u22A9": 'Vdash',
+             "\u22AE": 'nVdash',
+             "\u22AA": 'Vvdash',
+             "\u22AB": 'VDash',
+             "\u22AF": 'nVDash',
+             "\u22B0": 'prurel',
+             "\u22B2": 'vltri',
+             "\u22EA": 'nltri',
+             "\u22B3": 'vrtri',
+             "\u22EB": 'nrtri',
+             "\u22B4": 'ltrie',
+             "\u22EC": 'nltrie',
+             "\u22B4\u20D2": 'nvltrie',
+             "\u22B5": 'rtrie',
+             "\u22ED": 'nrtrie',
+             "\u22B5\u20D2": 'nvrtrie',
+             "\u22B6": 'origof',
+             "\u22B7": 'imof',
+             "\u22B8": 'mumap',
+             "\u22B9": 'hercon',
+             "\u22BA": 'intcal',
+             "\u22BB": 'veebar',
+             "\u22BD": 'barvee',
+             "\u22BE": 'angrtvb',
+             "\u22BF": 'lrtri',
+             "\u22C0": 'Wedge',
+             "\u22C1": 'Vee',
+             "\u22C2": 'xcap',
+             "\u22C3": 'xcup',
+             "\u22C4": 'diam',
+             "\u22C5": 'sdot',
+             "\u22C6": 'Star',
+             "\u22C7": 'divonx',
+             "\u22C8": 'bowtie',
+             "\u22C9": 'ltimes',
+             "\u22CA": 'rtimes',
+             "\u22CB": 'lthree',
+             "\u22CC": 'rthree',
+             "\u22CD": 'bsime',
+             "\u22CE": 'cuvee',
+             "\u22CF": 'cuwed',
+             "\u22D0": 'Sub',
+             "\u22D1": 'Sup',
+             "\u22D2": 'Cap',
+             "\u22D3": 'Cup',
+             "\u22D4": 'fork',
+             "\u22D5": 'epar',
+             "\u22D6": 'ltdot',
+             "\u22D7": 'gtdot',
+             "\u22D8": 'Ll',
+             "\u22D8\u0338": 'nLl',
+             "\u22D9": 'Gg',
+             "\u22D9\u0338": 'nGg',
+             "\u22DA\uFE00": 'lesg',
+             "\u22DA": 'leg',
+             "\u22DB": 'gel',
+             "\u22DB\uFE00": 'gesl',
+             "\u22DE": 'cuepr',
+             "\u22DF": 'cuesc',
+             "\u22E6": 'lnsim',
+             "\u22E7": 'gnsim',
+             "\u22E8": 'prnsim',
+             "\u22E9": 'scnsim',
+             "\u22EE": 'vellip',
+             "\u22EF": 'ctdot',
+             "\u22F0": 'utdot',
+             "\u22F1": 'dtdot',
+             "\u22F2": 'disin',
+             "\u22F3": 'isinsv',
+             "\u22F4": 'isins',
+             "\u22F5": 'isindot',
+             "\u22F5\u0338": 'notindot',
+             "\u22F6": 'notinvc',
+             "\u22F7": 'notinvb',
+             "\u22F9": 'isinE',
+             "\u22F9\u0338": 'notinE',
+             "\u22FA": 'nisd',
+             "\u22FB": 'xnis',
+             "\u22FC": 'nis',
+             "\u22FD": 'notnivc',
+             "\u22FE": 'notnivb',
+             "\u2305": 'barwed',
+             "\u2306": 'Barwed',
+             "\u230C": 'drcrop',
+             "\u230D": 'dlcrop',
+             "\u230E": 'urcrop',
+             "\u230F": 'ulcrop',
+             "\u2310": 'bnot',
+             "\u2312": 'profline',
+             "\u2313": 'profsurf',
+             "\u2315": 'telrec',
+             "\u2316": 'target',
+             "\u231C": 'ulcorn',
+             "\u231D": 'urcorn',
+             "\u231E": 'dlcorn',
+             "\u231F": 'drcorn',
+             "\u2322": 'frown',
+             "\u2323": 'smile',
+             "\u232D": 'cylcty',
+             "\u232E": 'profalar',
+             "\u2336": 'topbot',
+             "\u233D": 'ovbar',
+             "\u233F": 'solbar',
+             "\u237C": 'angzarr',
+             "\u23B0": 'lmoust',
+             "\u23B1": 'rmoust',
+             "\u23B4": 'tbrk',
+             "\u23B5": 'bbrk',
+             "\u23B6": 'bbrktbrk',
+             "\u23DC": 'OverParenthesis',
+             "\u23DD": 'UnderParenthesis',
+             "\u23DE": 'OverBrace',
+             "\u23DF": 'UnderBrace',
+             "\u23E2": 'trpezium',
+             "\u23E7": 'elinters',
+             "\u2423": 'blank',
+             "\u2500": 'boxh',
+             "\u2502": 'boxv',
+             "\u250C": 'boxdr',
+             "\u2510": 'boxdl',
+             "\u2514": 'boxur',
+             "\u2518": 'boxul',
+             "\u251C": 'boxvr',
+             "\u2524": 'boxvl',
+             "\u252C": 'boxhd',
+             "\u2534": 'boxhu',
+             "\u253C": 'boxvh',
+             "\u2550": 'boxH',
+             "\u2551": 'boxV',
+             "\u2552": 'boxdR',
+             "\u2553": 'boxDr',
+             "\u2554": 'boxDR',
+             "\u2555": 'boxdL',
+             "\u2556": 'boxDl',
+             "\u2557": 'boxDL',
+             "\u2558": 'boxuR',
+             "\u2559": 'boxUr',
+             "\u255A": 'boxUR',
+             "\u255B": 'boxuL',
+             "\u255C": 'boxUl',
+             "\u255D": 'boxUL',
+             "\u255E": 'boxvR',
+             "\u255F": 'boxVr',
+             "\u2560": 'boxVR',
+             "\u2561": 'boxvL',
+             "\u2562": 'boxVl',
+             "\u2563": 'boxVL',
+             "\u2564": 'boxHd',
+             "\u2565": 'boxhD',
+             "\u2566": 'boxHD',
+             "\u2567": 'boxHu',
+             "\u2568": 'boxhU',
+             "\u2569": 'boxHU',
+             "\u256A": 'boxvH',
+             "\u256B": 'boxVh',
+             "\u256C": 'boxVH',
+             "\u2580": 'uhblk',
+             "\u2584": 'lhblk',
+             "\u2588": 'block',
+             "\u2591": 'blk14',
+             "\u2592": 'blk12',
+             "\u2593": 'blk34',
+             "\u25A1": 'squ',
+             "\u25AA": 'squf',
+             "\u25AB": 'EmptyVerySmallSquare',
+             "\u25AD": 'rect',
+             "\u25AE": 'marker',
+             "\u25B1": 'fltns',
+             "\u25B3": 'xutri',
+             "\u25B4": 'utrif',
+             "\u25B5": 'utri',
+             "\u25B8": 'rtrif',
+             "\u25B9": 'rtri',
+             "\u25BD": 'xdtri',
+             "\u25BE": 'dtrif',
+             "\u25BF": 'dtri',
+             "\u25C2": 'ltrif',
+             "\u25C3": 'ltri',
+             "\u25CA": 'loz',
+             "\u25CB": 'cir',
+             "\u25EC": 'tridot',
+             "\u25EF": 'xcirc',
+             "\u25F8": 'ultri',
+             "\u25F9": 'urtri',
+             "\u25FA": 'lltri',
+             "\u25FB": 'EmptySmallSquare',
+             "\u25FC": 'FilledSmallSquare',
+             "\u2605": 'starf',
+             "\u2606": 'star',
+             "\u260E": 'phone',
+             "\u2640": 'female',
+             "\u2642": 'male',
+             "\u2660": 'spades',
+             "\u2663": 'clubs',
+             "\u2665": 'hearts',
+             "\u2666": 'diams',
+             "\u266A": 'sung',
+             "\u2713": 'check',
+             "\u2717": 'cross',
+             "\u2720": 'malt',
+             "\u2736": 'sext',
+             "\u2758": 'VerticalSeparator',
+             "\u27C8": 'bsolhsub',
+             "\u27C9": 'suphsol',
+             "\u27F5": 'xlarr',
+             "\u27F6": 'xrarr',
+             "\u27F7": 'xharr',
+             "\u27F8": 'xlArr',
+             "\u27F9": 'xrArr',
+             "\u27FA": 'xhArr',
+             "\u27FC": 'xmap',
+             "\u27FF": 'dzigrarr',
+             "\u2902": 'nvlArr',
+             "\u2903": 'nvrArr',
+             "\u2904": 'nvHarr',
+             "\u2905": 'Map',
+             "\u290C": 'lbarr',
+             "\u290D": 'rbarr',
+             "\u290E": 'lBarr',
+             "\u290F": 'rBarr',
+             "\u2910": 'RBarr',
+             "\u2911": 'DDotrahd',
+             "\u2912": 'UpArrowBar',
+             "\u2913": 'DownArrowBar',
+             "\u2916": 'Rarrtl',
+             "\u2919": 'latail',
+             "\u291A": 'ratail',
+             "\u291B": 'lAtail',
+             "\u291C": 'rAtail',
+             "\u291D": 'larrfs',
+             "\u291E": 'rarrfs',
+             "\u291F": 'larrbfs',
+             "\u2920": 'rarrbfs',
+             "\u2923": 'nwarhk',
+             "\u2924": 'nearhk',
+             "\u2925": 'searhk',
+             "\u2926": 'swarhk',
+             "\u2927": 'nwnear',
+             "\u2928": 'toea',
+             "\u2929": 'tosa',
+             "\u292A": 'swnwar',
+             "\u2933": 'rarrc',
+             "\u2933\u0338": 'nrarrc',
+             "\u2935": 'cudarrr',
+             "\u2936": 'ldca',
+             "\u2937": 'rdca',
+             "\u2938": 'cudarrl',
+             "\u2939": 'larrpl',
+             "\u293C": 'curarrm',
+             "\u293D": 'cularrp',
+             "\u2945": 'rarrpl',
+             "\u2948": 'harrcir',
+             "\u2949": 'Uarrocir',
+             "\u294A": 'lurdshar',
+             "\u294B": 'ldrushar',
+             "\u294E": 'LeftRightVector',
+             "\u294F": 'RightUpDownVector',
+             "\u2950": 'DownLeftRightVector',
+             "\u2951": 'LeftUpDownVector',
+             "\u2952": 'LeftVectorBar',
+             "\u2953": 'RightVectorBar',
+             "\u2954": 'RightUpVectorBar',
+             "\u2955": 'RightDownVectorBar',
+             "\u2956": 'DownLeftVectorBar',
+             "\u2957": 'DownRightVectorBar',
+             "\u2958": 'LeftUpVectorBar',
+             "\u2959": 'LeftDownVectorBar',
+             "\u295A": 'LeftTeeVector',
+             "\u295B": 'RightTeeVector',
+             "\u295C": 'RightUpTeeVector',
+             "\u295D": 'RightDownTeeVector',
+             "\u295E": 'DownLeftTeeVector',
+             "\u295F": 'DownRightTeeVector',
+             "\u2960": 'LeftUpTeeVector',
+             "\u2961": 'LeftDownTeeVector',
+             "\u2962": 'lHar',
+             "\u2963": 'uHar',
+             "\u2964": 'rHar',
+             "\u2965": 'dHar',
+             "\u2966": 'luruhar',
+             "\u2967": 'ldrdhar',
+             "\u2968": 'ruluhar',
+             "\u2969": 'rdldhar',
+             "\u296A": 'lharul',
+             "\u296B": 'llhard',
+             "\u296C": 'rharul',
+             "\u296D": 'lrhard',
+             "\u296E": 'udhar',
+             "\u296F": 'duhar',
+             "\u2970": 'RoundImplies',
+             "\u2971": 'erarr',
+             "\u2972": 'simrarr',
+             "\u2973": 'larrsim',
+             "\u2974": 'rarrsim',
+             "\u2975": 'rarrap',
+             "\u2976": 'ltlarr',
+             "\u2978": 'gtrarr',
+             "\u2979": 'subrarr',
+             "\u297B": 'suplarr',
+             "\u297C": 'lfisht',
+             "\u297D": 'rfisht',
+             "\u297E": 'ufisht',
+             "\u297F": 'dfisht',
+             "\u299A": 'vzigzag',
+             "\u299C": 'vangrt',
+             "\u299D": 'angrtvbd',
+             "\u29A4": 'ange',
+             "\u29A5": 'range',
+             "\u29A6": 'dwangle',
+             "\u29A7": 'uwangle',
+             "\u29A8": 'angmsdaa',
+             "\u29A9": 'angmsdab',
+             "\u29AA": 'angmsdac',
+             "\u29AB": 'angmsdad',
+             "\u29AC": 'angmsdae',
+             "\u29AD": 'angmsdaf',
+             "\u29AE": 'angmsdag',
+             "\u29AF": 'angmsdah',
+             "\u29B0": 'bemptyv',
+             "\u29B1": 'demptyv',
+             "\u29B2": 'cemptyv',
+             "\u29B3": 'raemptyv',
+             "\u29B4": 'laemptyv',
+             "\u29B5": 'ohbar',
+             "\u29B6": 'omid',
+             "\u29B7": 'opar',
+             "\u29B9": 'operp',
+             "\u29BB": 'olcross',
+             "\u29BC": 'odsold',
+             "\u29BE": 'olcir',
+             "\u29BF": 'ofcir',
+             "\u29C0": 'olt',
+             "\u29C1": 'ogt',
+             "\u29C2": 'cirscir',
+             "\u29C3": 'cirE',
+             "\u29C4": 'solb',
+             "\u29C5": 'bsolb',
+             "\u29C9": 'boxbox',
+             "\u29CD": 'trisb',
+             "\u29CE": 'rtriltri',
+             "\u29CF": 'LeftTriangleBar',
+             "\u29CF\u0338": 'NotLeftTriangleBar',
+             "\u29D0": 'RightTriangleBar',
+             "\u29D0\u0338": 'NotRightTriangleBar',
+             "\u29DC": 'iinfin',
+             "\u29DD": 'infintie',
+             "\u29DE": 'nvinfin',
+             "\u29E3": 'eparsl',
+             "\u29E4": 'smeparsl',
+             "\u29E5": 'eqvparsl',
+             "\u29EB": 'lozf',
+             "\u29F4": 'RuleDelayed',
+             "\u29F6": 'dsol',
+             "\u2A00": 'xodot',
+             "\u2A01": 'xoplus',
+             "\u2A02": 'xotime',
+             "\u2A04": 'xuplus',
+             "\u2A06": 'xsqcup',
+             "\u2A0D": 'fpartint',
+             "\u2A10": 'cirfnint',
+             "\u2A11": 'awint',
+             "\u2A12": 'rppolint',
+             "\u2A13": 'scpolint',
+             "\u2A14": 'npolint',
+             "\u2A15": 'pointint',
+             "\u2A16": 'quatint',
+             "\u2A17": 'intlarhk',
+             "\u2A22": 'pluscir',
+             "\u2A23": 'plusacir',
+             "\u2A24": 'simplus',
+             "\u2A25": 'plusdu',
+             "\u2A26": 'plussim',
+             "\u2A27": 'plustwo',
+             "\u2A29": 'mcomma',
+             "\u2A2A": 'minusdu',
+             "\u2A2D": 'loplus',
+             "\u2A2E": 'roplus',
+             "\u2A2F": 'Cross',
+             "\u2A30": 'timesd',
+             "\u2A31": 'timesbar',
+             "\u2A33": 'smashp',
+             "\u2A34": 'lotimes',
+             "\u2A35": 'rotimes',
+             "\u2A36": 'otimesas',
+             "\u2A37": 'Otimes',
+             "\u2A38": 'odiv',
+             "\u2A39": 'triplus',
+             "\u2A3A": 'triminus',
+             "\u2A3B": 'tritime',
+             "\u2A3C": 'iprod',
+             "\u2A3F": 'amalg',
+             "\u2A40": 'capdot',
+             "\u2A42": 'ncup',
+             "\u2A43": 'ncap',
+             "\u2A44": 'capand',
+             "\u2A45": 'cupor',
+             "\u2A46": 'cupcap',
+             "\u2A47": 'capcup',
+             "\u2A48": 'cupbrcap',
+             "\u2A49": 'capbrcup',
+             "\u2A4A": 'cupcup',
+             "\u2A4B": 'capcap',
+             "\u2A4C": 'ccups',
+             "\u2A4D": 'ccaps',
+             "\u2A50": 'ccupssm',
+             "\u2A53": 'And',
+             "\u2A54": 'Or',
+             "\u2A55": 'andand',
+             "\u2A56": 'oror',
+             "\u2A57": 'orslope',
+             "\u2A58": 'andslope',
+             "\u2A5A": 'andv',
+             "\u2A5B": 'orv',
+             "\u2A5C": 'andd',
+             "\u2A5D": 'ord',
+             "\u2A5F": 'wedbar',
+             "\u2A66": 'sdote',
+             "\u2A6A": 'simdot',
+             "\u2A6D": 'congdot',
+             "\u2A6D\u0338": 'ncongdot',
+             "\u2A6E": 'easter',
+             "\u2A6F": 'apacir',
+             "\u2A70": 'apE',
+             "\u2A70\u0338": 'napE',
+             "\u2A71": 'eplus',
+             "\u2A72": 'pluse',
+             "\u2A73": 'Esim',
+             "\u2A77": 'eDDot',
+             "\u2A78": 'equivDD',
+             "\u2A79": 'ltcir',
+             "\u2A7A": 'gtcir',
+             "\u2A7B": 'ltquest',
+             "\u2A7C": 'gtquest',
+             "\u2A7D": 'les',
+             "\u2A7D\u0338": 'nles',
+             "\u2A7E": 'ges',
+             "\u2A7E\u0338": 'nges',
+             "\u2A7F": 'lesdot',
+             "\u2A80": 'gesdot',
+             "\u2A81": 'lesdoto',
+             "\u2A82": 'gesdoto',
+             "\u2A83": 'lesdotor',
+             "\u2A84": 'gesdotol',
+             "\u2A85": 'lap',
+             "\u2A86": 'gap',
+             "\u2A87": 'lne',
+             "\u2A88": 'gne',
+             "\u2A89": 'lnap',
+             "\u2A8A": 'gnap',
+             "\u2A8B": 'lEg',
+             "\u2A8C": 'gEl',
+             "\u2A8D": 'lsime',
+             "\u2A8E": 'gsime',
+             "\u2A8F": 'lsimg',
+             "\u2A90": 'gsiml',
+             "\u2A91": 'lgE',
+             "\u2A92": 'glE',
+             "\u2A93": 'lesges',
+             "\u2A94": 'gesles',
+             "\u2A95": 'els',
+             "\u2A96": 'egs',
+             "\u2A97": 'elsdot',
+             "\u2A98": 'egsdot',
+             "\u2A99": 'el',
+             "\u2A9A": 'eg',
+             "\u2A9D": 'siml',
+             "\u2A9E": 'simg',
+             "\u2A9F": 'simlE',
+             "\u2AA0": 'simgE',
+             "\u2AA1": 'LessLess',
+             "\u2AA1\u0338": 'NotNestedLessLess',
+             "\u2AA2": 'GreaterGreater',
+             "\u2AA2\u0338": 'NotNestedGreaterGreater',
+             "\u2AA4": 'glj',
+             "\u2AA5": 'gla',
+             "\u2AA6": 'ltcc',
+             "\u2AA7": 'gtcc',
+             "\u2AA8": 'lescc',
+             "\u2AA9": 'gescc',
+             "\u2AAA": 'smt',
+             "\u2AAB": 'lat',
+             "\u2AAC": 'smte',
+             "\u2AAC\uFE00": 'smtes',
+             "\u2AAD": 'late',
+             "\u2AAD\uFE00": 'lates',
+             "\u2AAE": 'bumpE',
+             "\u2AAF": 'pre',
+             "\u2AAF\u0338": 'npre',
+             "\u2AB0": 'sce',
+             "\u2AB0\u0338": 'nsce',
+             "\u2AB3": 'prE',
+             "\u2AB4": 'scE',
+             "\u2AB5": 'prnE',
+             "\u2AB6": 'scnE',
+             "\u2AB7": 'prap',
+             "\u2AB8": 'scap',
+             "\u2AB9": 'prnap',
+             "\u2ABA": 'scnap',
+             "\u2ABB": 'Pr',
+             "\u2ABC": 'Sc',
+             "\u2ABD": 'subdot',
+             "\u2ABE": 'supdot',
+             "\u2ABF": 'subplus',
+             "\u2AC0": 'supplus',
+             "\u2AC1": 'submult',
+             "\u2AC2": 'supmult',
+             "\u2AC3": 'subedot',
+             "\u2AC4": 'supedot',
+             "\u2AC5": 'subE',
+             "\u2AC5\u0338": 'nsubE',
+             "\u2AC6": 'supE',
+             "\u2AC6\u0338": 'nsupE',
+             "\u2AC7": 'subsim',
+             "\u2AC8": 'supsim',
+             "\u2ACB\uFE00": 'vsubnE',
+             "\u2ACB": 'subnE',
+             "\u2ACC\uFE00": 'vsupnE',
+             "\u2ACC": 'supnE',
+             "\u2ACF": 'csub',
+             "\u2AD0": 'csup',
+             "\u2AD1": 'csube',
+             "\u2AD2": 'csupe',
+             "\u2AD3": 'subsup',
+             "\u2AD4": 'supsub',
+             "\u2AD5": 'subsub',
+             "\u2AD6": 'supsup',
+             "\u2AD7": 'suphsub',
+             "\u2AD8": 'supdsub',
+             "\u2AD9": 'forkv',
+             "\u2ADA": 'topfork',
+             "\u2ADB": 'mlcp',
+             "\u2AE4": 'Dashv',
+             "\u2AE6": 'Vdashl',
+             "\u2AE7": 'Barv',
+             "\u2AE8": 'vBar',
+             "\u2AE9": 'vBarv',
+             "\u2AEB": 'Vbar',
+             "\u2AEC": 'Not',
+             "\u2AED": 'bNot',
+             "\u2AEE": 'rnmid',
+             "\u2AEF": 'cirmid',
+             "\u2AF0": 'midcir',
+             "\u2AF1": 'topcir',
+             "\u2AF2": 'nhpar',
+             "\u2AF3": 'parsim',
+             "\u2AFD": 'parsl',
+             "\u2AFD\u20E5": 'nparsl',
+             "\u266D": 'flat',
+             "\u266E": 'natur',
+             "\u266F": 'sharp',
+             '\xA4': 'curren',
+             '\xA2': 'cent',
+             '$': 'dollar',
+             '\xA3': 'pound',
+             '\xA5': 'yen',
+             "\u20AC": 'euro',
+             '\xB9': 'sup1',
+             '\xBD': 'half',
+             "\u2153": 'frac13',
+             '\xBC': 'frac14',
+             "\u2155": 'frac15',
+             "\u2159": 'frac16',
+             "\u215B": 'frac18',
+             '\xB2': 'sup2',
+             "\u2154": 'frac23',
+             "\u2156": 'frac25',
+             '\xB3': 'sup3',
+             '\xBE': 'frac34',
+             "\u2157": 'frac35',
+             "\u215C": 'frac38',
+             "\u2158": 'frac45',
+             "\u215A": 'frac56',
+             "\u215D": 'frac58',
+             "\u215E": 'frac78',
+             "\uD835\uDCB6": 'ascr',
+             "\uD835\uDD52": 'aopf',
+             "\uD835\uDD1E": 'afr',
+             "\uD835\uDD38": 'Aopf',
+             "\uD835\uDD04": 'Afr',
+             "\uD835\uDC9C": 'Ascr',
+             '\xAA': 'ordf',
+             '\xE1': 'aacute',
+             '\xC1': 'Aacute',
+             '\xE0': 'agrave',
+             '\xC0': 'Agrave',
+             "\u0103": 'abreve',
+             "\u0102": 'Abreve',
+             '\xE2': 'acirc',
+             '\xC2': 'Acirc',
+             '\xE5': 'aring',
+             '\xC5': 'angst',
+             '\xE4': 'auml',
+             '\xC4': 'Auml',
+             '\xE3': 'atilde',
+             '\xC3': 'Atilde',
+             "\u0105": 'aogon',
+             "\u0104": 'Aogon',
+             "\u0101": 'amacr',
+             "\u0100": 'Amacr',
+             '\xE6': 'aelig',
+             '\xC6': 'AElig',
+             "\uD835\uDCB7": 'bscr',
+             "\uD835\uDD53": 'bopf',
+             "\uD835\uDD1F": 'bfr',
+             "\uD835\uDD39": 'Bopf',
+             "\u212C": 'Bscr',
+             "\uD835\uDD05": 'Bfr',
+             "\uD835\uDD20": 'cfr',
+             "\uD835\uDCB8": 'cscr',
+             "\uD835\uDD54": 'copf',
+             "\u212D": 'Cfr',
+             "\uD835\uDC9E": 'Cscr',
+             "\u2102": 'Copf',
+             "\u0107": 'cacute',
+             "\u0106": 'Cacute',
+             "\u0109": 'ccirc',
+             "\u0108": 'Ccirc',
+             "\u010D": 'ccaron',
+             "\u010C": 'Ccaron',
+             "\u010B": 'cdot',
+             "\u010A": 'Cdot',
+             '\xE7': 'ccedil',
+             '\xC7': 'Ccedil',
+             "\u2105": 'incare',
+             "\uD835\uDD21": 'dfr',
+             "\u2146": 'dd',
+             "\uD835\uDD55": 'dopf',
+             "\uD835\uDCB9": 'dscr',
+             "\uD835\uDC9F": 'Dscr',
+             "\uD835\uDD07": 'Dfr',
+             "\u2145": 'DD',
+             "\uD835\uDD3B": 'Dopf',
+             "\u010F": 'dcaron',
+             "\u010E": 'Dcaron',
+             "\u0111": 'dstrok',
+             "\u0110": 'Dstrok',
+             '\xF0': 'eth',
+             '\xD0': 'ETH',
+             "\u2147": 'ee',
+             "\u212F": 'escr',
+             "\uD835\uDD22": 'efr',
+             "\uD835\uDD56": 'eopf',
+             "\u2130": 'Escr',
+             "\uD835\uDD08": 'Efr',
+             "\uD835\uDD3C": 'Eopf',
+             '\xE9': 'eacute',
+             '\xC9': 'Eacute',
+             '\xE8': 'egrave',
+             '\xC8': 'Egrave',
+             '\xEA': 'ecirc',
+             '\xCA': 'Ecirc',
+             "\u011B": 'ecaron',
+             "\u011A": 'Ecaron',
+             '\xEB': 'euml',
+             '\xCB': 'Euml',
+             "\u0117": 'edot',
+             "\u0116": 'Edot',
+             "\u0119": 'eogon',
+             "\u0118": 'Eogon',
+             "\u0113": 'emacr',
+             "\u0112": 'Emacr',
+             "\uD835\uDD23": 'ffr',
+             "\uD835\uDD57": 'fopf',
+             "\uD835\uDCBB": 'fscr',
+             "\uD835\uDD09": 'Ffr',
+             "\uD835\uDD3D": 'Fopf',
+             "\u2131": 'Fscr',
+             "\uFB00": 'fflig',
+             "\uFB03": 'ffilig',
+             "\uFB04": 'ffllig',
+             "\uFB01": 'filig',
+             'fj': 'fjlig',
+             "\uFB02": 'fllig',
+             "\u0192": 'fnof',
+             "\u210A": 'gscr',
+             "\uD835\uDD58": 'gopf',
+             "\uD835\uDD24": 'gfr',
+             "\uD835\uDCA2": 'Gscr',
+             "\uD835\uDD3E": 'Gopf',
+             "\uD835\uDD0A": 'Gfr',
+             "\u01F5": 'gacute',
+             "\u011F": 'gbreve',
+             "\u011E": 'Gbreve',
+             "\u011D": 'gcirc',
+             "\u011C": 'Gcirc',
+             "\u0121": 'gdot',
+             "\u0120": 'Gdot',
+             "\u0122": 'Gcedil',
+             "\uD835\uDD25": 'hfr',
+             "\u210E": 'planckh',
+             "\uD835\uDCBD": 'hscr',
+             "\uD835\uDD59": 'hopf',
+             "\u210B": 'Hscr',
+             "\u210C": 'Hfr',
+             "\u210D": 'Hopf',
+             "\u0125": 'hcirc',
+             "\u0124": 'Hcirc',
+             "\u210F": 'hbar',
+             "\u0127": 'hstrok',
+             "\u0126": 'Hstrok',
+             "\uD835\uDD5A": 'iopf',
+             "\uD835\uDD26": 'ifr',
+             "\uD835\uDCBE": 'iscr',
+             "\u2148": 'ii',
+             "\uD835\uDD40": 'Iopf',
+             "\u2110": 'Iscr',
+             "\u2111": 'Im',
+             '\xED': 'iacute',
+             '\xCD': 'Iacute',
+             '\xEC': 'igrave',
+             '\xCC': 'Igrave',
+             '\xEE': 'icirc',
+             '\xCE': 'Icirc',
+             '\xEF': 'iuml',
+             '\xCF': 'Iuml',
+             "\u0129": 'itilde',
+             "\u0128": 'Itilde',
+             "\u0130": 'Idot',
+             "\u012F": 'iogon',
+             "\u012E": 'Iogon',
+             "\u012B": 'imacr',
+             "\u012A": 'Imacr',
+             "\u0133": 'ijlig',
+             "\u0132": 'IJlig',
+             "\u0131": 'imath',
+             "\uD835\uDCBF": 'jscr',
+             "\uD835\uDD5B": 'jopf',
+             "\uD835\uDD27": 'jfr',
+             "\uD835\uDCA5": 'Jscr',
+             "\uD835\uDD0D": 'Jfr',
+             "\uD835\uDD41": 'Jopf',
+             "\u0135": 'jcirc',
+             "\u0134": 'Jcirc',
+             "\u0237": 'jmath',
+             "\uD835\uDD5C": 'kopf',
+             "\uD835\uDCC0": 'kscr',
+             "\uD835\uDD28": 'kfr',
+             "\uD835\uDCA6": 'Kscr',
+             "\uD835\uDD42": 'Kopf',
+             "\uD835\uDD0E": 'Kfr',
+             "\u0137": 'kcedil',
+             "\u0136": 'Kcedil',
+             "\uD835\uDD29": 'lfr',
+             "\uD835\uDCC1": 'lscr',
+             "\u2113": 'ell',
+             "\uD835\uDD5D": 'lopf',
+             "\u2112": 'Lscr',
+             "\uD835\uDD0F": 'Lfr',
+             "\uD835\uDD43": 'Lopf',
+             "\u013A": 'lacute',
+             "\u0139": 'Lacute',
+             "\u013E": 'lcaron',
+             "\u013D": 'Lcaron',
+             "\u013C": 'lcedil',
+             "\u013B": 'Lcedil',
+             "\u0142": 'lstrok',
+             "\u0141": 'Lstrok',
+             "\u0140": 'lmidot',
+             "\u013F": 'Lmidot',
+             "\uD835\uDD2A": 'mfr',
+             "\uD835\uDD5E": 'mopf',
+             "\uD835\uDCC2": 'mscr',
+             "\uD835\uDD10": 'Mfr',
+             "\uD835\uDD44": 'Mopf',
+             "\u2133": 'Mscr',
+             "\uD835\uDD2B": 'nfr',
+             "\uD835\uDD5F": 'nopf',
+             "\uD835\uDCC3": 'nscr',
+             "\u2115": 'Nopf',
+             "\uD835\uDCA9": 'Nscr',
+             "\uD835\uDD11": 'Nfr',
+             "\u0144": 'nacute',
+             "\u0143": 'Nacute',
+             "\u0148": 'ncaron',
+             "\u0147": 'Ncaron',
+             '\xF1': 'ntilde',
+             '\xD1': 'Ntilde',
+             "\u0146": 'ncedil',
+             "\u0145": 'Ncedil',
+             "\u2116": 'numero',
+             "\u014B": 'eng',
+             "\u014A": 'ENG',
+             "\uD835\uDD60": 'oopf',
+             "\uD835\uDD2C": 'ofr',
+             "\u2134": 'oscr',
+             "\uD835\uDCAA": 'Oscr',
+             "\uD835\uDD12": 'Ofr',
+             "\uD835\uDD46": 'Oopf',
+             '\xBA': 'ordm',
+             '\xF3': 'oacute',
+             '\xD3': 'Oacute',
+             '\xF2': 'ograve',
+             '\xD2': 'Ograve',
+             '\xF4': 'ocirc',
+             '\xD4': 'Ocirc',
+             '\xF6': 'ouml',
+             '\xD6': 'Ouml',
+             "\u0151": 'odblac',
+             "\u0150": 'Odblac',
+             '\xF5': 'otilde',
+             '\xD5': 'Otilde',
+             '\xF8': 'oslash',
+             '\xD8': 'Oslash',
+             "\u014D": 'omacr',
+             "\u014C": 'Omacr',
+             "\u0153": 'oelig',
+             "\u0152": 'OElig',
+             "\uD835\uDD2D": 'pfr',
+             "\uD835\uDCC5": 'pscr',
+             "\uD835\uDD61": 'popf',
+             "\u2119": 'Popf',
+             "\uD835\uDD13": 'Pfr',
+             "\uD835\uDCAB": 'Pscr',
+             "\uD835\uDD62": 'qopf',
+             "\uD835\uDD2E": 'qfr',
+             "\uD835\uDCC6": 'qscr',
+             "\uD835\uDCAC": 'Qscr',
+             "\uD835\uDD14": 'Qfr',
+             "\u211A": 'Qopf',
+             "\u0138": 'kgreen',
+             "\uD835\uDD2F": 'rfr',
+             "\uD835\uDD63": 'ropf',
+             "\uD835\uDCC7": 'rscr',
+             "\u211B": 'Rscr',
+             "\u211C": 'Re',
+             "\u211D": 'Ropf',
+             "\u0155": 'racute',
+             "\u0154": 'Racute',
+             "\u0159": 'rcaron',
+             "\u0158": 'Rcaron',
+             "\u0157": 'rcedil',
+             "\u0156": 'Rcedil',
+             "\uD835\uDD64": 'sopf',
+             "\uD835\uDCC8": 'sscr',
+             "\uD835\uDD30": 'sfr',
+             "\uD835\uDD4A": 'Sopf',
+             "\uD835\uDD16": 'Sfr',
+             "\uD835\uDCAE": 'Sscr',
+             "\u24C8": 'oS',
+             "\u015B": 'sacute',
+             "\u015A": 'Sacute',
+             "\u015D": 'scirc',
+             "\u015C": 'Scirc',
+             "\u0161": 'scaron',
+             "\u0160": 'Scaron',
+             "\u015F": 'scedil',
+             "\u015E": 'Scedil',
+             '\xDF': 'szlig',
+             "\uD835\uDD31": 'tfr',
+             "\uD835\uDCC9": 'tscr',
+             "\uD835\uDD65": 'topf',
+             "\uD835\uDCAF": 'Tscr',
+             "\uD835\uDD17": 'Tfr',
+             "\uD835\uDD4B": 'Topf',
+             "\u0165": 'tcaron',
+             "\u0164": 'Tcaron',
+             "\u0163": 'tcedil',
+             "\u0162": 'Tcedil',
+             "\u2122": 'trade',
+             "\u0167": 'tstrok',
+             "\u0166": 'Tstrok',
+             "\uD835\uDCCA": 'uscr',
+             "\uD835\uDD66": 'uopf',
+             "\uD835\uDD32": 'ufr',
+             "\uD835\uDD4C": 'Uopf',
+             "\uD835\uDD18": 'Ufr',
+             "\uD835\uDCB0": 'Uscr',
+             '\xFA': 'uacute',
+             '\xDA': 'Uacute',
+             '\xF9': 'ugrave',
+             '\xD9': 'Ugrave',
+             "\u016D": 'ubreve',
+             "\u016C": 'Ubreve',
+             '\xFB': 'ucirc',
+             '\xDB': 'Ucirc',
+             "\u016F": 'uring',
+             "\u016E": 'Uring',
+             '\xFC': 'uuml',
+             '\xDC': 'Uuml',
+             "\u0171": 'udblac',
+             "\u0170": 'Udblac',
+             "\u0169": 'utilde',
+             "\u0168": 'Utilde',
+             "\u0173": 'uogon',
+             "\u0172": 'Uogon',
+             "\u016B": 'umacr',
+             "\u016A": 'Umacr',
+             "\uD835\uDD33": 'vfr',
+             "\uD835\uDD67": 'vopf',
+             "\uD835\uDCCB": 'vscr',
+             "\uD835\uDD19": 'Vfr',
+             "\uD835\uDD4D": 'Vopf',
+             "\uD835\uDCB1": 'Vscr',
+             "\uD835\uDD68": 'wopf',
+             "\uD835\uDCCC": 'wscr',
+             "\uD835\uDD34": 'wfr',
+             "\uD835\uDCB2": 'Wscr',
+             "\uD835\uDD4E": 'Wopf',
+             "\uD835\uDD1A": 'Wfr',
+             "\u0175": 'wcirc',
+             "\u0174": 'Wcirc',
+             "\uD835\uDD35": 'xfr',
+             "\uD835\uDCCD": 'xscr',
+             "\uD835\uDD69": 'xopf',
+             "\uD835\uDD4F": 'Xopf',
+             "\uD835\uDD1B": 'Xfr',
+             "\uD835\uDCB3": 'Xscr',
+             "\uD835\uDD36": 'yfr',
+             "\uD835\uDCCE": 'yscr',
+             "\uD835\uDD6A": 'yopf',
+             "\uD835\uDCB4": 'Yscr',
+             "\uD835\uDD1C": 'Yfr',
+             "\uD835\uDD50": 'Yopf',
+             '\xFD': 'yacute',
+             '\xDD': 'Yacute',
+             "\u0177": 'ycirc',
+             "\u0176": 'Ycirc',
+             '\xFF': 'yuml',
+             "\u0178": 'Yuml',
+             "\uD835\uDCCF": 'zscr',
+             "\uD835\uDD37": 'zfr',
+             "\uD835\uDD6B": 'zopf',
+             "\u2128": 'Zfr',
+             "\u2124": 'Zopf',
+             "\uD835\uDCB5": 'Zscr',
+             "\u017A": 'zacute',
+             "\u0179": 'Zacute',
+             "\u017E": 'zcaron',
+             "\u017D": 'Zcaron',
+             "\u017C": 'zdot',
+             "\u017B": 'Zdot',
+             "\u01B5": 'imped',
+             '\xFE': 'thorn',
+             '\xDE': 'THORN',
+             "\u0149": 'napos',
+             "\u03B1": 'alpha',
+             "\u0391": 'Alpha',
+             "\u03B2": 'beta',
+             "\u0392": 'Beta',
+             "\u03B3": 'gamma',
+             "\u0393": 'Gamma',
+             "\u03B4": 'delta',
+             "\u0394": 'Delta',
+             "\u03B5": 'epsi',
+             "\u03F5": 'epsiv',
+             "\u0395": 'Epsilon',
+             "\u03DD": 'gammad',
+             "\u03DC": 'Gammad',
+             "\u03B6": 'zeta',
+             "\u0396": 'Zeta',
+             "\u03B7": 'eta',
+             "\u0397": 'Eta',
+             "\u03B8": 'theta',
+             "\u03D1": 'thetav',
+             "\u0398": 'Theta',
+             "\u03B9": 'iota',
+             "\u0399": 'Iota',
+             "\u03BA": 'kappa',
+             "\u03F0": 'kappav',
+             "\u039A": 'Kappa',
+             "\u03BB": 'lambda',
+             "\u039B": 'Lambda',
+             "\u03BC": 'mu',
+             '\xB5': 'micro',
+             "\u039C": 'Mu',
+             "\u03BD": 'nu',
+             "\u039D": 'Nu',
+             "\u03BE": 'xi',
+             "\u039E": 'Xi',
+             "\u03BF": 'omicron',
+             "\u039F": 'Omicron',
+             "\u03C0": 'pi',
+             "\u03D6": 'piv',
+             "\u03A0": 'Pi',
+             "\u03C1": 'rho',
+             "\u03F1": 'rhov',
+             "\u03A1": 'Rho',
+             "\u03C3": 'sigma',
+             "\u03A3": 'Sigma',
+             "\u03C2": 'sigmaf',
+             "\u03C4": 'tau',
+             "\u03A4": 'Tau',
+             "\u03C5": 'upsi',
+             "\u03A5": 'Upsilon',
+             "\u03D2": 'Upsi',
+             "\u03C6": 'phi',
+             "\u03D5": 'phiv',
+             "\u03A6": 'Phi',
+             "\u03C7": 'chi',
+             "\u03A7": 'Chi',
+             "\u03C8": 'psi',
+             "\u03A8": 'Psi',
+             "\u03C9": 'omega',
+             "\u03A9": 'ohm',
+             "\u0430": 'acy',
+             "\u0410": 'Acy',
+             "\u0431": 'bcy',
+             "\u0411": 'Bcy',
+             "\u0432": 'vcy',
+             "\u0412": 'Vcy',
+             "\u0433": 'gcy',
+             "\u0413": 'Gcy',
+             "\u0453": 'gjcy',
+             "\u0403": 'GJcy',
+             "\u0434": 'dcy',
+             "\u0414": 'Dcy',
+             "\u0452": 'djcy',
+             "\u0402": 'DJcy',
+             "\u0435": 'iecy',
+             "\u0415": 'IEcy',
+             "\u0451": 'iocy',
+             "\u0401": 'IOcy',
+             "\u0454": 'jukcy',
+             "\u0404": 'Jukcy',
+             "\u0436": 'zhcy',
+             "\u0416": 'ZHcy',
+             "\u0437": 'zcy',
+             "\u0417": 'Zcy',
+             "\u0455": 'dscy',
+             "\u0405": 'DScy',
+             "\u0438": 'icy',
+             "\u0418": 'Icy',
+             "\u0456": 'iukcy',
+             "\u0406": 'Iukcy',
+             "\u0457": 'yicy',
+             "\u0407": 'YIcy',
+             "\u0439": 'jcy',
+             "\u0419": 'Jcy',
+             "\u0458": 'jsercy',
+             "\u0408": 'Jsercy',
+             "\u043A": 'kcy',
+             "\u041A": 'Kcy',
+             "\u045C": 'kjcy',
+             "\u040C": 'KJcy',
+             "\u043B": 'lcy',
+             "\u041B": 'Lcy',
+             "\u0459": 'ljcy',
+             "\u0409": 'LJcy',
+             "\u043C": 'mcy',
+             "\u041C": 'Mcy',
+             "\u043D": 'ncy',
+             "\u041D": 'Ncy',
+             "\u045A": 'njcy',
+             "\u040A": 'NJcy',
+             "\u043E": 'ocy',
+             "\u041E": 'Ocy',
+             "\u043F": 'pcy',
+             "\u041F": 'Pcy',
+             "\u0440": 'rcy',
+             "\u0420": 'Rcy',
+             "\u0441": 'scy',
+             "\u0421": 'Scy',
+             "\u0442": 'tcy',
+             "\u0422": 'Tcy',
+             "\u045B": 'tshcy',
+             "\u040B": 'TSHcy',
+             "\u0443": 'ucy',
+             "\u0423": 'Ucy',
+             "\u045E": 'ubrcy',
+             "\u040E": 'Ubrcy',
+             "\u0444": 'fcy',
+             "\u0424": 'Fcy',
+             "\u0445": 'khcy',
+             "\u0425": 'KHcy',
+             "\u0446": 'tscy',
+             "\u0426": 'TScy',
+             "\u0447": 'chcy',
+             "\u0427": 'CHcy',
+             "\u045F": 'dzcy',
+             "\u040F": 'DZcy',
+             "\u0448": 'shcy',
+             "\u0428": 'SHcy',
+             "\u0449": 'shchcy',
+             "\u0429": 'SHCHcy',
+             "\u044A": 'hardcy',
+             "\u042A": 'HARDcy',
+             "\u044B": 'ycy',
+             "\u042B": 'Ycy',
+             "\u044C": 'softcy',
+             "\u042C": 'SOFTcy',
+             "\u044D": 'ecy',
+             "\u042D": 'Ecy',
+             "\u044E": 'yucy',
+             "\u042E": 'YUcy',
+             "\u044F": 'yacy',
+             "\u042F": 'YAcy',
+             "\u2135": 'aleph',
+             "\u2136": 'beth',
+             "\u2137": 'gimel',
+             "\u2138": 'daleth'
+           };
+           var regexEscape = /["&'<>`]/g;
+           var escapeMap = {
+             '"': '&quot;',
+             '&': '&amp;',
+             '\'': '&#x27;',
+             '<': '&lt;',
+             // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
+             // following is not strictly necessary unless it’s part of a tag or an
+             // unquoted attribute value. We’re only escaping it to support those
+             // situations, and for XML support.
+             '>': '&gt;',
+             // In Internet Explorer ≤ 8, the backtick character can be used
+             // to break out of (un)quoted attribute values or HTML comments.
+             // See http://html5sec.org/#102, http://html5sec.org/#108, and
+             // http://html5sec.org/#133.
+             '`': '&#x60;'
+           };
+           var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
+           var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+           var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;
+           var decodeMap = {
+             'aacute': '\xE1',
+             'Aacute': '\xC1',
+             'abreve': "\u0103",
+             'Abreve': "\u0102",
+             'ac': "\u223E",
+             'acd': "\u223F",
+             'acE': "\u223E\u0333",
+             'acirc': '\xE2',
+             'Acirc': '\xC2',
+             'acute': '\xB4',
+             'acy': "\u0430",
+             'Acy': "\u0410",
+             'aelig': '\xE6',
+             'AElig': '\xC6',
+             'af': "\u2061",
+             'afr': "\uD835\uDD1E",
+             'Afr': "\uD835\uDD04",
+             'agrave': '\xE0',
+             'Agrave': '\xC0',
+             'alefsym': "\u2135",
+             'aleph': "\u2135",
+             'alpha': "\u03B1",
+             'Alpha': "\u0391",
+             'amacr': "\u0101",
+             'Amacr': "\u0100",
+             'amalg': "\u2A3F",
+             'amp': '&',
+             'AMP': '&',
+             'and': "\u2227",
+             'And': "\u2A53",
+             'andand': "\u2A55",
+             'andd': "\u2A5C",
+             'andslope': "\u2A58",
+             'andv': "\u2A5A",
+             'ang': "\u2220",
+             'ange': "\u29A4",
+             'angle': "\u2220",
+             'angmsd': "\u2221",
+             'angmsdaa': "\u29A8",
+             'angmsdab': "\u29A9",
+             'angmsdac': "\u29AA",
+             'angmsdad': "\u29AB",
+             'angmsdae': "\u29AC",
+             'angmsdaf': "\u29AD",
+             'angmsdag': "\u29AE",
+             'angmsdah': "\u29AF",
+             'angrt': "\u221F",
+             'angrtvb': "\u22BE",
+             'angrtvbd': "\u299D",
+             'angsph': "\u2222",
+             'angst': '\xC5',
+             'angzarr': "\u237C",
+             'aogon': "\u0105",
+             'Aogon': "\u0104",
+             'aopf': "\uD835\uDD52",
+             'Aopf': "\uD835\uDD38",
+             'ap': "\u2248",
+             'apacir': "\u2A6F",
+             'ape': "\u224A",
+             'apE': "\u2A70",
+             'apid': "\u224B",
+             'apos': '\'',
+             'ApplyFunction': "\u2061",
+             'approx': "\u2248",
+             'approxeq': "\u224A",
+             'aring': '\xE5',
+             'Aring': '\xC5',
+             'ascr': "\uD835\uDCB6",
+             'Ascr': "\uD835\uDC9C",
+             'Assign': "\u2254",
+             'ast': '*',
+             'asymp': "\u2248",
+             'asympeq': "\u224D",
+             'atilde': '\xE3',
+             'Atilde': '\xC3',
+             'auml': '\xE4',
+             'Auml': '\xC4',
+             'awconint': "\u2233",
+             'awint': "\u2A11",
+             'backcong': "\u224C",
+             'backepsilon': "\u03F6",
+             'backprime': "\u2035",
+             'backsim': "\u223D",
+             'backsimeq': "\u22CD",
+             'Backslash': "\u2216",
+             'Barv': "\u2AE7",
+             'barvee': "\u22BD",
+             'barwed': "\u2305",
+             'Barwed': "\u2306",
+             'barwedge': "\u2305",
+             'bbrk': "\u23B5",
+             'bbrktbrk': "\u23B6",
+             'bcong': "\u224C",
+             'bcy': "\u0431",
+             'Bcy': "\u0411",
+             'bdquo': "\u201E",
+             'becaus': "\u2235",
+             'because': "\u2235",
+             'Because': "\u2235",
+             'bemptyv': "\u29B0",
+             'bepsi': "\u03F6",
+             'bernou': "\u212C",
+             'Bernoullis': "\u212C",
+             'beta': "\u03B2",
+             'Beta': "\u0392",
+             'beth': "\u2136",
+             'between': "\u226C",
+             'bfr': "\uD835\uDD1F",
+             'Bfr': "\uD835\uDD05",
+             'bigcap': "\u22C2",
+             'bigcirc': "\u25EF",
+             'bigcup': "\u22C3",
+             'bigodot': "\u2A00",
+             'bigoplus': "\u2A01",
+             'bigotimes': "\u2A02",
+             'bigsqcup': "\u2A06",
+             'bigstar': "\u2605",
+             'bigtriangledown': "\u25BD",
+             'bigtriangleup': "\u25B3",
+             'biguplus': "\u2A04",
+             'bigvee': "\u22C1",
+             'bigwedge': "\u22C0",
+             'bkarow': "\u290D",
+             'blacklozenge': "\u29EB",
+             'blacksquare': "\u25AA",
+             'blacktriangle': "\u25B4",
+             'blacktriangledown': "\u25BE",
+             'blacktriangleleft': "\u25C2",
+             'blacktriangleright': "\u25B8",
+             'blank': "\u2423",
+             'blk12': "\u2592",
+             'blk14': "\u2591",
+             'blk34': "\u2593",
+             'block': "\u2588",
+             'bne': "=\u20E5",
+             'bnequiv': "\u2261\u20E5",
+             'bnot': "\u2310",
+             'bNot': "\u2AED",
+             'bopf': "\uD835\uDD53",
+             'Bopf': "\uD835\uDD39",
+             'bot': "\u22A5",
+             'bottom': "\u22A5",
+             'bowtie': "\u22C8",
+             'boxbox': "\u29C9",
+             'boxdl': "\u2510",
+             'boxdL': "\u2555",
+             'boxDl': "\u2556",
+             'boxDL': "\u2557",
+             'boxdr': "\u250C",
+             'boxdR': "\u2552",
+             'boxDr': "\u2553",
+             'boxDR': "\u2554",
+             'boxh': "\u2500",
+             'boxH': "\u2550",
+             'boxhd': "\u252C",
+             'boxhD': "\u2565",
+             'boxHd': "\u2564",
+             'boxHD': "\u2566",
+             'boxhu': "\u2534",
+             'boxhU': "\u2568",
+             'boxHu': "\u2567",
+             'boxHU': "\u2569",
+             'boxminus': "\u229F",
+             'boxplus': "\u229E",
+             'boxtimes': "\u22A0",
+             'boxul': "\u2518",
+             'boxuL': "\u255B",
+             'boxUl': "\u255C",
+             'boxUL': "\u255D",
+             'boxur': "\u2514",
+             'boxuR': "\u2558",
+             'boxUr': "\u2559",
+             'boxUR': "\u255A",
+             'boxv': "\u2502",
+             'boxV': "\u2551",
+             'boxvh': "\u253C",
+             'boxvH': "\u256A",
+             'boxVh': "\u256B",
+             'boxVH': "\u256C",
+             'boxvl': "\u2524",
+             'boxvL': "\u2561",
+             'boxVl': "\u2562",
+             'boxVL': "\u2563",
+             'boxvr': "\u251C",
+             'boxvR': "\u255E",
+             'boxVr': "\u255F",
+             'boxVR': "\u2560",
+             'bprime': "\u2035",
+             'breve': "\u02D8",
+             'Breve': "\u02D8",
+             'brvbar': '\xA6',
+             'bscr': "\uD835\uDCB7",
+             'Bscr': "\u212C",
+             'bsemi': "\u204F",
+             'bsim': "\u223D",
+             'bsime': "\u22CD",
+             'bsol': '\\',
+             'bsolb': "\u29C5",
+             'bsolhsub': "\u27C8",
+             'bull': "\u2022",
+             'bullet': "\u2022",
+             'bump': "\u224E",
+             'bumpe': "\u224F",
+             'bumpE': "\u2AAE",
+             'bumpeq': "\u224F",
+             'Bumpeq': "\u224E",
+             'cacute': "\u0107",
+             'Cacute': "\u0106",
+             'cap': "\u2229",
+             'Cap': "\u22D2",
+             'capand': "\u2A44",
+             'capbrcup': "\u2A49",
+             'capcap': "\u2A4B",
+             'capcup': "\u2A47",
+             'capdot': "\u2A40",
+             'CapitalDifferentialD': "\u2145",
+             'caps': "\u2229\uFE00",
+             'caret': "\u2041",
+             'caron': "\u02C7",
+             'Cayleys': "\u212D",
+             'ccaps': "\u2A4D",
+             'ccaron': "\u010D",
+             'Ccaron': "\u010C",
+             'ccedil': '\xE7',
+             'Ccedil': '\xC7',
+             'ccirc': "\u0109",
+             'Ccirc': "\u0108",
+             'Cconint': "\u2230",
+             'ccups': "\u2A4C",
+             'ccupssm': "\u2A50",
+             'cdot': "\u010B",
+             'Cdot': "\u010A",
+             'cedil': '\xB8',
+             'Cedilla': '\xB8',
+             'cemptyv': "\u29B2",
+             'cent': '\xA2',
+             'centerdot': '\xB7',
+             'CenterDot': '\xB7',
+             'cfr': "\uD835\uDD20",
+             'Cfr': "\u212D",
+             'chcy': "\u0447",
+             'CHcy': "\u0427",
+             'check': "\u2713",
+             'checkmark': "\u2713",
+             'chi': "\u03C7",
+             'Chi': "\u03A7",
+             'cir': "\u25CB",
+             'circ': "\u02C6",
+             'circeq': "\u2257",
+             'circlearrowleft': "\u21BA",
+             'circlearrowright': "\u21BB",
+             'circledast': "\u229B",
+             'circledcirc': "\u229A",
+             'circleddash': "\u229D",
+             'CircleDot': "\u2299",
+             'circledR': '\xAE',
+             'circledS': "\u24C8",
+             'CircleMinus': "\u2296",
+             'CirclePlus': "\u2295",
+             'CircleTimes': "\u2297",
+             'cire': "\u2257",
+             'cirE': "\u29C3",
+             'cirfnint': "\u2A10",
+             'cirmid': "\u2AEF",
+             'cirscir': "\u29C2",
+             'ClockwiseContourIntegral': "\u2232",
+             'CloseCurlyDoubleQuote': "\u201D",
+             'CloseCurlyQuote': "\u2019",
+             'clubs': "\u2663",
+             'clubsuit': "\u2663",
+             'colon': ':',
+             'Colon': "\u2237",
+             'colone': "\u2254",
+             'Colone': "\u2A74",
+             'coloneq': "\u2254",
+             'comma': ',',
+             'commat': '@',
+             'comp': "\u2201",
+             'compfn': "\u2218",
+             'complement': "\u2201",
+             'complexes': "\u2102",
+             'cong': "\u2245",
+             'congdot': "\u2A6D",
+             'Congruent': "\u2261",
+             'conint': "\u222E",
+             'Conint': "\u222F",
+             'ContourIntegral': "\u222E",
+             'copf': "\uD835\uDD54",
+             'Copf': "\u2102",
+             'coprod': "\u2210",
+             'Coproduct': "\u2210",
+             'copy': '\xA9',
+             'COPY': '\xA9',
+             'copysr': "\u2117",
+             'CounterClockwiseContourIntegral': "\u2233",
+             'crarr': "\u21B5",
+             'cross': "\u2717",
+             'Cross': "\u2A2F",
+             'cscr': "\uD835\uDCB8",
+             'Cscr': "\uD835\uDC9E",
+             'csub': "\u2ACF",
+             'csube': "\u2AD1",
+             'csup': "\u2AD0",
+             'csupe': "\u2AD2",
+             'ctdot': "\u22EF",
+             'cudarrl': "\u2938",
+             'cudarrr': "\u2935",
+             'cuepr': "\u22DE",
+             'cuesc': "\u22DF",
+             'cularr': "\u21B6",
+             'cularrp': "\u293D",
+             'cup': "\u222A",
+             'Cup': "\u22D3",
+             'cupbrcap': "\u2A48",
+             'cupcap': "\u2A46",
+             'CupCap': "\u224D",
+             'cupcup': "\u2A4A",
+             'cupdot': "\u228D",
+             'cupor': "\u2A45",
+             'cups': "\u222A\uFE00",
+             'curarr': "\u21B7",
+             'curarrm': "\u293C",
+             'curlyeqprec': "\u22DE",
+             'curlyeqsucc': "\u22DF",
+             'curlyvee': "\u22CE",
+             'curlywedge': "\u22CF",
+             'curren': '\xA4',
+             'curvearrowleft': "\u21B6",
+             'curvearrowright': "\u21B7",
+             'cuvee': "\u22CE",
+             'cuwed': "\u22CF",
+             'cwconint': "\u2232",
+             'cwint': "\u2231",
+             'cylcty': "\u232D",
+             'dagger': "\u2020",
+             'Dagger': "\u2021",
+             'daleth': "\u2138",
+             'darr': "\u2193",
+             'dArr': "\u21D3",
+             'Darr': "\u21A1",
+             'dash': "\u2010",
+             'dashv': "\u22A3",
+             'Dashv': "\u2AE4",
+             'dbkarow': "\u290F",
+             'dblac': "\u02DD",
+             'dcaron': "\u010F",
+             'Dcaron': "\u010E",
+             'dcy': "\u0434",
+             'Dcy': "\u0414",
+             'dd': "\u2146",
+             'DD': "\u2145",
+             'ddagger': "\u2021",
+             'ddarr': "\u21CA",
+             'DDotrahd': "\u2911",
+             'ddotseq': "\u2A77",
+             'deg': '\xB0',
+             'Del': "\u2207",
+             'delta': "\u03B4",
+             'Delta': "\u0394",
+             'demptyv': "\u29B1",
+             'dfisht': "\u297F",
+             'dfr': "\uD835\uDD21",
+             'Dfr': "\uD835\uDD07",
+             'dHar': "\u2965",
+             'dharl': "\u21C3",
+             'dharr': "\u21C2",
+             'DiacriticalAcute': '\xB4',
+             'DiacriticalDot': "\u02D9",
+             'DiacriticalDoubleAcute': "\u02DD",
+             'DiacriticalGrave': '`',
+             'DiacriticalTilde': "\u02DC",
+             'diam': "\u22C4",
+             'diamond': "\u22C4",
+             'Diamond': "\u22C4",
+             'diamondsuit': "\u2666",
+             'diams': "\u2666",
+             'die': '\xA8',
+             'DifferentialD': "\u2146",
+             'digamma': "\u03DD",
+             'disin': "\u22F2",
+             'div': '\xF7',
+             'divide': '\xF7',
+             'divideontimes': "\u22C7",
+             'divonx': "\u22C7",
+             'djcy': "\u0452",
+             'DJcy': "\u0402",
+             'dlcorn': "\u231E",
+             'dlcrop': "\u230D",
+             'dollar': '$',
+             'dopf': "\uD835\uDD55",
+             'Dopf': "\uD835\uDD3B",
+             'dot': "\u02D9",
+             'Dot': '\xA8',
+             'DotDot': "\u20DC",
+             'doteq': "\u2250",
+             'doteqdot': "\u2251",
+             'DotEqual': "\u2250",
+             'dotminus': "\u2238",
+             'dotplus': "\u2214",
+             'dotsquare': "\u22A1",
+             'doublebarwedge': "\u2306",
+             'DoubleContourIntegral': "\u222F",
+             'DoubleDot': '\xA8',
+             'DoubleDownArrow': "\u21D3",
+             'DoubleLeftArrow': "\u21D0",
+             'DoubleLeftRightArrow': "\u21D4",
+             'DoubleLeftTee': "\u2AE4",
+             'DoubleLongLeftArrow': "\u27F8",
+             'DoubleLongLeftRightArrow': "\u27FA",
+             'DoubleLongRightArrow': "\u27F9",
+             'DoubleRightArrow': "\u21D2",
+             'DoubleRightTee': "\u22A8",
+             'DoubleUpArrow': "\u21D1",
+             'DoubleUpDownArrow': "\u21D5",
+             'DoubleVerticalBar': "\u2225",
+             'downarrow': "\u2193",
+             'Downarrow': "\u21D3",
+             'DownArrow': "\u2193",
+             'DownArrowBar': "\u2913",
+             'DownArrowUpArrow': "\u21F5",
+             'DownBreve': "\u0311",
+             'downdownarrows': "\u21CA",
+             'downharpoonleft': "\u21C3",
+             'downharpoonright': "\u21C2",
+             'DownLeftRightVector': "\u2950",
+             'DownLeftTeeVector': "\u295E",
+             'DownLeftVector': "\u21BD",
+             'DownLeftVectorBar': "\u2956",
+             'DownRightTeeVector': "\u295F",
+             'DownRightVector': "\u21C1",
+             'DownRightVectorBar': "\u2957",
+             'DownTee': "\u22A4",
+             'DownTeeArrow': "\u21A7",
+             'drbkarow': "\u2910",
+             'drcorn': "\u231F",
+             'drcrop': "\u230C",
+             'dscr': "\uD835\uDCB9",
+             'Dscr': "\uD835\uDC9F",
+             'dscy': "\u0455",
+             'DScy': "\u0405",
+             'dsol': "\u29F6",
+             'dstrok': "\u0111",
+             'Dstrok': "\u0110",
+             'dtdot': "\u22F1",
+             'dtri': "\u25BF",
+             'dtrif': "\u25BE",
+             'duarr': "\u21F5",
+             'duhar': "\u296F",
+             'dwangle': "\u29A6",
+             'dzcy': "\u045F",
+             'DZcy': "\u040F",
+             'dzigrarr': "\u27FF",
+             'eacute': '\xE9',
+             'Eacute': '\xC9',
+             'easter': "\u2A6E",
+             'ecaron': "\u011B",
+             'Ecaron': "\u011A",
+             'ecir': "\u2256",
+             'ecirc': '\xEA',
+             'Ecirc': '\xCA',
+             'ecolon': "\u2255",
+             'ecy': "\u044D",
+             'Ecy': "\u042D",
+             'eDDot': "\u2A77",
+             'edot': "\u0117",
+             'eDot': "\u2251",
+             'Edot': "\u0116",
+             'ee': "\u2147",
+             'efDot': "\u2252",
+             'efr': "\uD835\uDD22",
+             'Efr': "\uD835\uDD08",
+             'eg': "\u2A9A",
+             'egrave': '\xE8',
+             'Egrave': '\xC8',
+             'egs': "\u2A96",
+             'egsdot': "\u2A98",
+             'el': "\u2A99",
+             'Element': "\u2208",
+             'elinters': "\u23E7",
+             'ell': "\u2113",
+             'els': "\u2A95",
+             'elsdot': "\u2A97",
+             'emacr': "\u0113",
+             'Emacr': "\u0112",
+             'empty': "\u2205",
+             'emptyset': "\u2205",
+             'EmptySmallSquare': "\u25FB",
+             'emptyv': "\u2205",
+             'EmptyVerySmallSquare': "\u25AB",
+             'emsp': "\u2003",
+             'emsp13': "\u2004",
+             'emsp14': "\u2005",
+             'eng': "\u014B",
+             'ENG': "\u014A",
+             'ensp': "\u2002",
+             'eogon': "\u0119",
+             'Eogon': "\u0118",
+             'eopf': "\uD835\uDD56",
+             'Eopf': "\uD835\uDD3C",
+             'epar': "\u22D5",
+             'eparsl': "\u29E3",
+             'eplus': "\u2A71",
+             'epsi': "\u03B5",
+             'epsilon': "\u03B5",
+             'Epsilon': "\u0395",
+             'epsiv': "\u03F5",
+             'eqcirc': "\u2256",
+             'eqcolon': "\u2255",
+             'eqsim': "\u2242",
+             'eqslantgtr': "\u2A96",
+             'eqslantless': "\u2A95",
+             'Equal': "\u2A75",
+             'equals': '=',
+             'EqualTilde': "\u2242",
+             'equest': "\u225F",
+             'Equilibrium': "\u21CC",
+             'equiv': "\u2261",
+             'equivDD': "\u2A78",
+             'eqvparsl': "\u29E5",
+             'erarr': "\u2971",
+             'erDot': "\u2253",
+             'escr': "\u212F",
+             'Escr': "\u2130",
+             'esdot': "\u2250",
+             'esim': "\u2242",
+             'Esim': "\u2A73",
+             'eta': "\u03B7",
+             'Eta': "\u0397",
+             'eth': '\xF0',
+             'ETH': '\xD0',
+             'euml': '\xEB',
+             'Euml': '\xCB',
+             'euro': "\u20AC",
+             'excl': '!',
+             'exist': "\u2203",
+             'Exists': "\u2203",
+             'expectation': "\u2130",
+             'exponentiale': "\u2147",
+             'ExponentialE': "\u2147",
+             'fallingdotseq': "\u2252",
+             'fcy': "\u0444",
+             'Fcy': "\u0424",
+             'female': "\u2640",
+             'ffilig': "\uFB03",
+             'fflig': "\uFB00",
+             'ffllig': "\uFB04",
+             'ffr': "\uD835\uDD23",
+             'Ffr': "\uD835\uDD09",
+             'filig': "\uFB01",
+             'FilledSmallSquare': "\u25FC",
+             'FilledVerySmallSquare': "\u25AA",
+             'fjlig': 'fj',
+             'flat': "\u266D",
+             'fllig': "\uFB02",
+             'fltns': "\u25B1",
+             'fnof': "\u0192",
+             'fopf': "\uD835\uDD57",
+             'Fopf': "\uD835\uDD3D",
+             'forall': "\u2200",
+             'ForAll': "\u2200",
+             'fork': "\u22D4",
+             'forkv': "\u2AD9",
+             'Fouriertrf': "\u2131",
+             'fpartint': "\u2A0D",
+             'frac12': '\xBD',
+             'frac13': "\u2153",
+             'frac14': '\xBC',
+             'frac15': "\u2155",
+             'frac16': "\u2159",
+             'frac18': "\u215B",
+             'frac23': "\u2154",
+             'frac25': "\u2156",
+             'frac34': '\xBE',
+             'frac35': "\u2157",
+             'frac38': "\u215C",
+             'frac45': "\u2158",
+             'frac56': "\u215A",
+             'frac58': "\u215D",
+             'frac78': "\u215E",
+             'frasl': "\u2044",
+             'frown': "\u2322",
+             'fscr': "\uD835\uDCBB",
+             'Fscr': "\u2131",
+             'gacute': "\u01F5",
+             'gamma': "\u03B3",
+             'Gamma': "\u0393",
+             'gammad': "\u03DD",
+             'Gammad': "\u03DC",
+             'gap': "\u2A86",
+             'gbreve': "\u011F",
+             'Gbreve': "\u011E",
+             'Gcedil': "\u0122",
+             'gcirc': "\u011D",
+             'Gcirc': "\u011C",
+             'gcy': "\u0433",
+             'Gcy': "\u0413",
+             'gdot': "\u0121",
+             'Gdot': "\u0120",
+             'ge': "\u2265",
+             'gE': "\u2267",
+             'gel': "\u22DB",
+             'gEl': "\u2A8C",
+             'geq': "\u2265",
+             'geqq': "\u2267",
+             'geqslant': "\u2A7E",
+             'ges': "\u2A7E",
+             'gescc': "\u2AA9",
+             'gesdot': "\u2A80",
+             'gesdoto': "\u2A82",
+             'gesdotol': "\u2A84",
+             'gesl': "\u22DB\uFE00",
+             'gesles': "\u2A94",
+             'gfr': "\uD835\uDD24",
+             'Gfr': "\uD835\uDD0A",
+             'gg': "\u226B",
+             'Gg': "\u22D9",
+             'ggg': "\u22D9",
+             'gimel': "\u2137",
+             'gjcy': "\u0453",
+             'GJcy': "\u0403",
+             'gl': "\u2277",
+             'gla': "\u2AA5",
+             'glE': "\u2A92",
+             'glj': "\u2AA4",
+             'gnap': "\u2A8A",
+             'gnapprox': "\u2A8A",
+             'gne': "\u2A88",
+             'gnE': "\u2269",
+             'gneq': "\u2A88",
+             'gneqq': "\u2269",
+             'gnsim': "\u22E7",
+             'gopf': "\uD835\uDD58",
+             'Gopf': "\uD835\uDD3E",
+             'grave': '`',
+             'GreaterEqual': "\u2265",
+             'GreaterEqualLess': "\u22DB",
+             'GreaterFullEqual': "\u2267",
+             'GreaterGreater': "\u2AA2",
+             'GreaterLess': "\u2277",
+             'GreaterSlantEqual': "\u2A7E",
+             'GreaterTilde': "\u2273",
+             'gscr': "\u210A",
+             'Gscr': "\uD835\uDCA2",
+             'gsim': "\u2273",
+             'gsime': "\u2A8E",
+             'gsiml': "\u2A90",
+             'gt': '>',
+             'Gt': "\u226B",
+             'GT': '>',
+             'gtcc': "\u2AA7",
+             'gtcir': "\u2A7A",
+             'gtdot': "\u22D7",
+             'gtlPar': "\u2995",
+             'gtquest': "\u2A7C",
+             'gtrapprox': "\u2A86",
+             'gtrarr': "\u2978",
+             'gtrdot': "\u22D7",
+             'gtreqless': "\u22DB",
+             'gtreqqless': "\u2A8C",
+             'gtrless': "\u2277",
+             'gtrsim': "\u2273",
+             'gvertneqq': "\u2269\uFE00",
+             'gvnE': "\u2269\uFE00",
+             'Hacek': "\u02C7",
+             'hairsp': "\u200A",
+             'half': '\xBD',
+             'hamilt': "\u210B",
+             'hardcy': "\u044A",
+             'HARDcy': "\u042A",
+             'harr': "\u2194",
+             'hArr': "\u21D4",
+             'harrcir': "\u2948",
+             'harrw': "\u21AD",
+             'Hat': '^',
+             'hbar': "\u210F",
+             'hcirc': "\u0125",
+             'Hcirc': "\u0124",
+             'hearts': "\u2665",
+             'heartsuit': "\u2665",
+             'hellip': "\u2026",
+             'hercon': "\u22B9",
+             'hfr': "\uD835\uDD25",
+             'Hfr': "\u210C",
+             'HilbertSpace': "\u210B",
+             'hksearow': "\u2925",
+             'hkswarow': "\u2926",
+             'hoarr': "\u21FF",
+             'homtht': "\u223B",
+             'hookleftarrow': "\u21A9",
+             'hookrightarrow': "\u21AA",
+             'hopf': "\uD835\uDD59",
+             'Hopf': "\u210D",
+             'horbar': "\u2015",
+             'HorizontalLine': "\u2500",
+             'hscr': "\uD835\uDCBD",
+             'Hscr': "\u210B",
+             'hslash': "\u210F",
+             'hstrok': "\u0127",
+             'Hstrok': "\u0126",
+             'HumpDownHump': "\u224E",
+             'HumpEqual': "\u224F",
+             'hybull': "\u2043",
+             'hyphen': "\u2010",
+             'iacute': '\xED',
+             'Iacute': '\xCD',
+             'ic': "\u2063",
+             'icirc': '\xEE',
+             'Icirc': '\xCE',
+             'icy': "\u0438",
+             'Icy': "\u0418",
+             'Idot': "\u0130",
+             'iecy': "\u0435",
+             'IEcy': "\u0415",
+             'iexcl': '\xA1',
+             'iff': "\u21D4",
+             'ifr': "\uD835\uDD26",
+             'Ifr': "\u2111",
+             'igrave': '\xEC',
+             'Igrave': '\xCC',
+             'ii': "\u2148",
+             'iiiint': "\u2A0C",
+             'iiint': "\u222D",
+             'iinfin': "\u29DC",
+             'iiota': "\u2129",
+             'ijlig': "\u0133",
+             'IJlig': "\u0132",
+             'Im': "\u2111",
+             'imacr': "\u012B",
+             'Imacr': "\u012A",
+             'image': "\u2111",
+             'ImaginaryI': "\u2148",
+             'imagline': "\u2110",
+             'imagpart': "\u2111",
+             'imath': "\u0131",
+             'imof': "\u22B7",
+             'imped': "\u01B5",
+             'Implies': "\u21D2",
+             'in': "\u2208",
+             'incare': "\u2105",
+             'infin': "\u221E",
+             'infintie': "\u29DD",
+             'inodot': "\u0131",
+             'int': "\u222B",
+             'Int': "\u222C",
+             'intcal': "\u22BA",
+             'integers': "\u2124",
+             'Integral': "\u222B",
+             'intercal': "\u22BA",
+             'Intersection': "\u22C2",
+             'intlarhk': "\u2A17",
+             'intprod': "\u2A3C",
+             'InvisibleComma': "\u2063",
+             'InvisibleTimes': "\u2062",
+             'iocy': "\u0451",
+             'IOcy': "\u0401",
+             'iogon': "\u012F",
+             'Iogon': "\u012E",
+             'iopf': "\uD835\uDD5A",
+             'Iopf': "\uD835\uDD40",
+             'iota': "\u03B9",
+             'Iota': "\u0399",
+             'iprod': "\u2A3C",
+             'iquest': '\xBF',
+             'iscr': "\uD835\uDCBE",
+             'Iscr': "\u2110",
+             'isin': "\u2208",
+             'isindot': "\u22F5",
+             'isinE': "\u22F9",
+             'isins': "\u22F4",
+             'isinsv': "\u22F3",
+             'isinv': "\u2208",
+             'it': "\u2062",
+             'itilde': "\u0129",
+             'Itilde': "\u0128",
+             'iukcy': "\u0456",
+             'Iukcy': "\u0406",
+             'iuml': '\xEF',
+             'Iuml': '\xCF',
+             'jcirc': "\u0135",
+             'Jcirc': "\u0134",
+             'jcy': "\u0439",
+             'Jcy': "\u0419",
+             'jfr': "\uD835\uDD27",
+             'Jfr': "\uD835\uDD0D",
+             'jmath': "\u0237",
+             'jopf': "\uD835\uDD5B",
+             'Jopf': "\uD835\uDD41",
+             'jscr': "\uD835\uDCBF",
+             'Jscr': "\uD835\uDCA5",
+             'jsercy': "\u0458",
+             'Jsercy': "\u0408",
+             'jukcy': "\u0454",
+             'Jukcy': "\u0404",
+             'kappa': "\u03BA",
+             'Kappa': "\u039A",
+             'kappav': "\u03F0",
+             'kcedil': "\u0137",
+             'Kcedil': "\u0136",
+             'kcy': "\u043A",
+             'Kcy': "\u041A",
+             'kfr': "\uD835\uDD28",
+             'Kfr': "\uD835\uDD0E",
+             'kgreen': "\u0138",
+             'khcy': "\u0445",
+             'KHcy': "\u0425",
+             'kjcy': "\u045C",
+             'KJcy': "\u040C",
+             'kopf': "\uD835\uDD5C",
+             'Kopf': "\uD835\uDD42",
+             'kscr': "\uD835\uDCC0",
+             'Kscr': "\uD835\uDCA6",
+             'lAarr': "\u21DA",
+             'lacute': "\u013A",
+             'Lacute': "\u0139",
+             'laemptyv': "\u29B4",
+             'lagran': "\u2112",
+             'lambda': "\u03BB",
+             'Lambda': "\u039B",
+             'lang': "\u27E8",
+             'Lang': "\u27EA",
+             'langd': "\u2991",
+             'langle': "\u27E8",
+             'lap': "\u2A85",
+             'Laplacetrf': "\u2112",
+             'laquo': '\xAB',
+             'larr': "\u2190",
+             'lArr': "\u21D0",
+             'Larr': "\u219E",
+             'larrb': "\u21E4",
+             'larrbfs': "\u291F",
+             'larrfs': "\u291D",
+             'larrhk': "\u21A9",
+             'larrlp': "\u21AB",
+             'larrpl': "\u2939",
+             'larrsim': "\u2973",
+             'larrtl': "\u21A2",
+             'lat': "\u2AAB",
+             'latail': "\u2919",
+             'lAtail': "\u291B",
+             'late': "\u2AAD",
+             'lates': "\u2AAD\uFE00",
+             'lbarr': "\u290C",
+             'lBarr': "\u290E",
+             'lbbrk': "\u2772",
+             'lbrace': '{',
+             'lbrack': '[',
+             'lbrke': "\u298B",
+             'lbrksld': "\u298F",
+             'lbrkslu': "\u298D",
+             'lcaron': "\u013E",
+             'Lcaron': "\u013D",
+             'lcedil': "\u013C",
+             'Lcedil': "\u013B",
+             'lceil': "\u2308",
+             'lcub': '{',
+             'lcy': "\u043B",
+             'Lcy': "\u041B",
+             'ldca': "\u2936",
+             'ldquo': "\u201C",
+             'ldquor': "\u201E",
+             'ldrdhar': "\u2967",
+             'ldrushar': "\u294B",
+             'ldsh': "\u21B2",
+             'le': "\u2264",
+             'lE': "\u2266",
+             'LeftAngleBracket': "\u27E8",
+             'leftarrow': "\u2190",
+             'Leftarrow': "\u21D0",
+             'LeftArrow': "\u2190",
+             'LeftArrowBar': "\u21E4",
+             'LeftArrowRightArrow': "\u21C6",
+             'leftarrowtail': "\u21A2",
+             'LeftCeiling': "\u2308",
+             'LeftDoubleBracket': "\u27E6",
+             'LeftDownTeeVector': "\u2961",
+             'LeftDownVector': "\u21C3",
+             'LeftDownVectorBar': "\u2959",
+             'LeftFloor': "\u230A",
+             'leftharpoondown': "\u21BD",
+             'leftharpoonup': "\u21BC",
+             'leftleftarrows': "\u21C7",
+             'leftrightarrow': "\u2194",
+             'Leftrightarrow': "\u21D4",
+             'LeftRightArrow': "\u2194",
+             'leftrightarrows': "\u21C6",
+             'leftrightharpoons': "\u21CB",
+             'leftrightsquigarrow': "\u21AD",
+             'LeftRightVector': "\u294E",
+             'LeftTee': "\u22A3",
+             'LeftTeeArrow': "\u21A4",
+             'LeftTeeVector': "\u295A",
+             'leftthreetimes': "\u22CB",
+             'LeftTriangle': "\u22B2",
+             'LeftTriangleBar': "\u29CF",
+             'LeftTriangleEqual': "\u22B4",
+             'LeftUpDownVector': "\u2951",
+             'LeftUpTeeVector': "\u2960",
+             'LeftUpVector': "\u21BF",
+             'LeftUpVectorBar': "\u2958",
+             'LeftVector': "\u21BC",
+             'LeftVectorBar': "\u2952",
+             'leg': "\u22DA",
+             'lEg': "\u2A8B",
+             'leq': "\u2264",
+             'leqq': "\u2266",
+             'leqslant': "\u2A7D",
+             'les': "\u2A7D",
+             'lescc': "\u2AA8",
+             'lesdot': "\u2A7F",
+             'lesdoto': "\u2A81",
+             'lesdotor': "\u2A83",
+             'lesg': "\u22DA\uFE00",
+             'lesges': "\u2A93",
+             'lessapprox': "\u2A85",
+             'lessdot': "\u22D6",
+             'lesseqgtr': "\u22DA",
+             'lesseqqgtr': "\u2A8B",
+             'LessEqualGreater': "\u22DA",
+             'LessFullEqual': "\u2266",
+             'LessGreater': "\u2276",
+             'lessgtr': "\u2276",
+             'LessLess': "\u2AA1",
+             'lesssim': "\u2272",
+             'LessSlantEqual': "\u2A7D",
+             'LessTilde': "\u2272",
+             'lfisht': "\u297C",
+             'lfloor': "\u230A",
+             'lfr': "\uD835\uDD29",
+             'Lfr': "\uD835\uDD0F",
+             'lg': "\u2276",
+             'lgE': "\u2A91",
+             'lHar': "\u2962",
+             'lhard': "\u21BD",
+             'lharu': "\u21BC",
+             'lharul': "\u296A",
+             'lhblk': "\u2584",
+             'ljcy': "\u0459",
+             'LJcy': "\u0409",
+             'll': "\u226A",
+             'Ll': "\u22D8",
+             'llarr': "\u21C7",
+             'llcorner': "\u231E",
+             'Lleftarrow': "\u21DA",
+             'llhard': "\u296B",
+             'lltri': "\u25FA",
+             'lmidot': "\u0140",
+             'Lmidot': "\u013F",
+             'lmoust': "\u23B0",
+             'lmoustache': "\u23B0",
+             'lnap': "\u2A89",
+             'lnapprox': "\u2A89",
+             'lne': "\u2A87",
+             'lnE': "\u2268",
+             'lneq': "\u2A87",
+             'lneqq': "\u2268",
+             'lnsim': "\u22E6",
+             'loang': "\u27EC",
+             'loarr': "\u21FD",
+             'lobrk': "\u27E6",
+             'longleftarrow': "\u27F5",
+             'Longleftarrow': "\u27F8",
+             'LongLeftArrow': "\u27F5",
+             'longleftrightarrow': "\u27F7",
+             'Longleftrightarrow': "\u27FA",
+             'LongLeftRightArrow': "\u27F7",
+             'longmapsto': "\u27FC",
+             'longrightarrow': "\u27F6",
+             'Longrightarrow': "\u27F9",
+             'LongRightArrow': "\u27F6",
+             'looparrowleft': "\u21AB",
+             'looparrowright': "\u21AC",
+             'lopar': "\u2985",
+             'lopf': "\uD835\uDD5D",
+             'Lopf': "\uD835\uDD43",
+             'loplus': "\u2A2D",
+             'lotimes': "\u2A34",
+             'lowast': "\u2217",
+             'lowbar': '_',
+             'LowerLeftArrow': "\u2199",
+             'LowerRightArrow': "\u2198",
+             'loz': "\u25CA",
+             'lozenge': "\u25CA",
+             'lozf': "\u29EB",
+             'lpar': '(',
+             'lparlt': "\u2993",
+             'lrarr': "\u21C6",
+             'lrcorner': "\u231F",
+             'lrhar': "\u21CB",
+             'lrhard': "\u296D",
+             'lrm': "\u200E",
+             'lrtri': "\u22BF",
+             'lsaquo': "\u2039",
+             'lscr': "\uD835\uDCC1",
+             'Lscr': "\u2112",
+             'lsh': "\u21B0",
+             'Lsh': "\u21B0",
+             'lsim': "\u2272",
+             'lsime': "\u2A8D",
+             'lsimg': "\u2A8F",
+             'lsqb': '[',
+             'lsquo': "\u2018",
+             'lsquor': "\u201A",
+             'lstrok': "\u0142",
+             'Lstrok': "\u0141",
+             'lt': '<',
+             'Lt': "\u226A",
+             'LT': '<',
+             'ltcc': "\u2AA6",
+             'ltcir': "\u2A79",
+             'ltdot': "\u22D6",
+             'lthree': "\u22CB",
+             'ltimes': "\u22C9",
+             'ltlarr': "\u2976",
+             'ltquest': "\u2A7B",
+             'ltri': "\u25C3",
+             'ltrie': "\u22B4",
+             'ltrif': "\u25C2",
+             'ltrPar': "\u2996",
+             'lurdshar': "\u294A",
+             'luruhar': "\u2966",
+             'lvertneqq': "\u2268\uFE00",
+             'lvnE': "\u2268\uFE00",
+             'macr': '\xAF',
+             'male': "\u2642",
+             'malt': "\u2720",
+             'maltese': "\u2720",
+             'map': "\u21A6",
+             'Map': "\u2905",
+             'mapsto': "\u21A6",
+             'mapstodown': "\u21A7",
+             'mapstoleft': "\u21A4",
+             'mapstoup': "\u21A5",
+             'marker': "\u25AE",
+             'mcomma': "\u2A29",
+             'mcy': "\u043C",
+             'Mcy': "\u041C",
+             'mdash': "\u2014",
+             'mDDot': "\u223A",
+             'measuredangle': "\u2221",
+             'MediumSpace': "\u205F",
+             'Mellintrf': "\u2133",
+             'mfr': "\uD835\uDD2A",
+             'Mfr': "\uD835\uDD10",
+             'mho': "\u2127",
+             'micro': '\xB5',
+             'mid': "\u2223",
+             'midast': '*',
+             'midcir': "\u2AF0",
+             'middot': '\xB7',
+             'minus': "\u2212",
+             'minusb': "\u229F",
+             'minusd': "\u2238",
+             'minusdu': "\u2A2A",
+             'MinusPlus': "\u2213",
+             'mlcp': "\u2ADB",
+             'mldr': "\u2026",
+             'mnplus': "\u2213",
+             'models': "\u22A7",
+             'mopf': "\uD835\uDD5E",
+             'Mopf': "\uD835\uDD44",
+             'mp': "\u2213",
+             'mscr': "\uD835\uDCC2",
+             'Mscr': "\u2133",
+             'mstpos': "\u223E",
+             'mu': "\u03BC",
+             'Mu': "\u039C",
+             'multimap': "\u22B8",
+             'mumap': "\u22B8",
+             'nabla': "\u2207",
+             'nacute': "\u0144",
+             'Nacute': "\u0143",
+             'nang': "\u2220\u20D2",
+             'nap': "\u2249",
+             'napE': "\u2A70\u0338",
+             'napid': "\u224B\u0338",
+             'napos': "\u0149",
+             'napprox': "\u2249",
+             'natur': "\u266E",
+             'natural': "\u266E",
+             'naturals': "\u2115",
+             'nbsp': '\xA0',
+             'nbump': "\u224E\u0338",
+             'nbumpe': "\u224F\u0338",
+             'ncap': "\u2A43",
+             'ncaron': "\u0148",
+             'Ncaron': "\u0147",
+             'ncedil': "\u0146",
+             'Ncedil': "\u0145",
+             'ncong': "\u2247",
+             'ncongdot': "\u2A6D\u0338",
+             'ncup': "\u2A42",
+             'ncy': "\u043D",
+             'Ncy': "\u041D",
+             'ndash': "\u2013",
+             'ne': "\u2260",
+             'nearhk': "\u2924",
+             'nearr': "\u2197",
+             'neArr': "\u21D7",
+             'nearrow': "\u2197",
+             'nedot': "\u2250\u0338",
+             'NegativeMediumSpace': "\u200B",
+             'NegativeThickSpace': "\u200B",
+             'NegativeThinSpace': "\u200B",
+             'NegativeVeryThinSpace': "\u200B",
+             'nequiv': "\u2262",
+             'nesear': "\u2928",
+             'nesim': "\u2242\u0338",
+             'NestedGreaterGreater': "\u226B",
+             'NestedLessLess': "\u226A",
+             'NewLine': '\n',
+             'nexist': "\u2204",
+             'nexists': "\u2204",
+             'nfr': "\uD835\uDD2B",
+             'Nfr': "\uD835\uDD11",
+             'nge': "\u2271",
+             'ngE': "\u2267\u0338",
+             'ngeq': "\u2271",
+             'ngeqq': "\u2267\u0338",
+             'ngeqslant': "\u2A7E\u0338",
+             'nges': "\u2A7E\u0338",
+             'nGg': "\u22D9\u0338",
+             'ngsim': "\u2275",
+             'ngt': "\u226F",
+             'nGt': "\u226B\u20D2",
+             'ngtr': "\u226F",
+             'nGtv': "\u226B\u0338",
+             'nharr': "\u21AE",
+             'nhArr': "\u21CE",
+             'nhpar': "\u2AF2",
+             'ni': "\u220B",
+             'nis': "\u22FC",
+             'nisd': "\u22FA",
+             'niv': "\u220B",
+             'njcy': "\u045A",
+             'NJcy': "\u040A",
+             'nlarr': "\u219A",
+             'nlArr': "\u21CD",
+             'nldr': "\u2025",
+             'nle': "\u2270",
+             'nlE': "\u2266\u0338",
+             'nleftarrow': "\u219A",
+             'nLeftarrow': "\u21CD",
+             'nleftrightarrow': "\u21AE",
+             'nLeftrightarrow': "\u21CE",
+             'nleq': "\u2270",
+             'nleqq': "\u2266\u0338",
+             'nleqslant': "\u2A7D\u0338",
+             'nles': "\u2A7D\u0338",
+             'nless': "\u226E",
+             'nLl': "\u22D8\u0338",
+             'nlsim': "\u2274",
+             'nlt': "\u226E",
+             'nLt': "\u226A\u20D2",
+             'nltri': "\u22EA",
+             'nltrie': "\u22EC",
+             'nLtv': "\u226A\u0338",
+             'nmid': "\u2224",
+             'NoBreak': "\u2060",
+             'NonBreakingSpace': '\xA0',
+             'nopf': "\uD835\uDD5F",
+             'Nopf': "\u2115",
+             'not': '\xAC',
+             'Not': "\u2AEC",
+             'NotCongruent': "\u2262",
+             'NotCupCap': "\u226D",
+             'NotDoubleVerticalBar': "\u2226",
+             'NotElement': "\u2209",
+             'NotEqual': "\u2260",
+             'NotEqualTilde': "\u2242\u0338",
+             'NotExists': "\u2204",
+             'NotGreater': "\u226F",
+             'NotGreaterEqual': "\u2271",
+             'NotGreaterFullEqual': "\u2267\u0338",
+             'NotGreaterGreater': "\u226B\u0338",
+             'NotGreaterLess': "\u2279",
+             'NotGreaterSlantEqual': "\u2A7E\u0338",
+             'NotGreaterTilde': "\u2275",
+             'NotHumpDownHump': "\u224E\u0338",
+             'NotHumpEqual': "\u224F\u0338",
+             'notin': "\u2209",
+             'notindot': "\u22F5\u0338",
+             'notinE': "\u22F9\u0338",
+             'notinva': "\u2209",
+             'notinvb': "\u22F7",
+             'notinvc': "\u22F6",
+             'NotLeftTriangle': "\u22EA",
+             'NotLeftTriangleBar': "\u29CF\u0338",
+             'NotLeftTriangleEqual': "\u22EC",
+             'NotLess': "\u226E",
+             'NotLessEqual': "\u2270",
+             'NotLessGreater': "\u2278",
+             'NotLessLess': "\u226A\u0338",
+             'NotLessSlantEqual': "\u2A7D\u0338",
+             'NotLessTilde': "\u2274",
+             'NotNestedGreaterGreater': "\u2AA2\u0338",
+             'NotNestedLessLess': "\u2AA1\u0338",
+             'notni': "\u220C",
+             'notniva': "\u220C",
+             'notnivb': "\u22FE",
+             'notnivc': "\u22FD",
+             'NotPrecedes': "\u2280",
+             'NotPrecedesEqual': "\u2AAF\u0338",
+             'NotPrecedesSlantEqual': "\u22E0",
+             'NotReverseElement': "\u220C",
+             'NotRightTriangle': "\u22EB",
+             'NotRightTriangleBar': "\u29D0\u0338",
+             'NotRightTriangleEqual': "\u22ED",
+             'NotSquareSubset': "\u228F\u0338",
+             'NotSquareSubsetEqual': "\u22E2",
+             'NotSquareSuperset': "\u2290\u0338",
+             'NotSquareSupersetEqual': "\u22E3",
+             'NotSubset': "\u2282\u20D2",
+             'NotSubsetEqual': "\u2288",
+             'NotSucceeds': "\u2281",
+             'NotSucceedsEqual': "\u2AB0\u0338",
+             'NotSucceedsSlantEqual': "\u22E1",
+             'NotSucceedsTilde': "\u227F\u0338",
+             'NotSuperset': "\u2283\u20D2",
+             'NotSupersetEqual': "\u2289",
+             'NotTilde': "\u2241",
+             'NotTildeEqual': "\u2244",
+             'NotTildeFullEqual': "\u2247",
+             'NotTildeTilde': "\u2249",
+             'NotVerticalBar': "\u2224",
+             'npar': "\u2226",
+             'nparallel': "\u2226",
+             'nparsl': "\u2AFD\u20E5",
+             'npart': "\u2202\u0338",
+             'npolint': "\u2A14",
+             'npr': "\u2280",
+             'nprcue': "\u22E0",
+             'npre': "\u2AAF\u0338",
+             'nprec': "\u2280",
+             'npreceq': "\u2AAF\u0338",
+             'nrarr': "\u219B",
+             'nrArr': "\u21CF",
+             'nrarrc': "\u2933\u0338",
+             'nrarrw': "\u219D\u0338",
+             'nrightarrow': "\u219B",
+             'nRightarrow': "\u21CF",
+             'nrtri': "\u22EB",
+             'nrtrie': "\u22ED",
+             'nsc': "\u2281",
+             'nsccue': "\u22E1",
+             'nsce': "\u2AB0\u0338",
+             'nscr': "\uD835\uDCC3",
+             'Nscr': "\uD835\uDCA9",
+             'nshortmid': "\u2224",
+             'nshortparallel': "\u2226",
+             'nsim': "\u2241",
+             'nsime': "\u2244",
+             'nsimeq': "\u2244",
+             'nsmid': "\u2224",
+             'nspar': "\u2226",
+             'nsqsube': "\u22E2",
+             'nsqsupe': "\u22E3",
+             'nsub': "\u2284",
+             'nsube': "\u2288",
+             'nsubE': "\u2AC5\u0338",
+             'nsubset': "\u2282\u20D2",
+             'nsubseteq': "\u2288",
+             'nsubseteqq': "\u2AC5\u0338",
+             'nsucc': "\u2281",
+             'nsucceq': "\u2AB0\u0338",
+             'nsup': "\u2285",
+             'nsupe': "\u2289",
+             'nsupE': "\u2AC6\u0338",
+             'nsupset': "\u2283\u20D2",
+             'nsupseteq': "\u2289",
+             'nsupseteqq': "\u2AC6\u0338",
+             'ntgl': "\u2279",
+             'ntilde': '\xF1',
+             'Ntilde': '\xD1',
+             'ntlg': "\u2278",
+             'ntriangleleft': "\u22EA",
+             'ntrianglelefteq': "\u22EC",
+             'ntriangleright': "\u22EB",
+             'ntrianglerighteq': "\u22ED",
+             'nu': "\u03BD",
+             'Nu': "\u039D",
+             'num': '#',
+             'numero': "\u2116",
+             'numsp': "\u2007",
+             'nvap': "\u224D\u20D2",
+             'nvdash': "\u22AC",
+             'nvDash': "\u22AD",
+             'nVdash': "\u22AE",
+             'nVDash': "\u22AF",
+             'nvge': "\u2265\u20D2",
+             'nvgt': ">\u20D2",
+             'nvHarr': "\u2904",
+             'nvinfin': "\u29DE",
+             'nvlArr': "\u2902",
+             'nvle': "\u2264\u20D2",
+             'nvlt': "<\u20D2",
+             'nvltrie': "\u22B4\u20D2",
+             'nvrArr': "\u2903",
+             'nvrtrie': "\u22B5\u20D2",
+             'nvsim': "\u223C\u20D2",
+             'nwarhk': "\u2923",
+             'nwarr': "\u2196",
+             'nwArr': "\u21D6",
+             'nwarrow': "\u2196",
+             'nwnear': "\u2927",
+             'oacute': '\xF3',
+             'Oacute': '\xD3',
+             'oast': "\u229B",
+             'ocir': "\u229A",
+             'ocirc': '\xF4',
+             'Ocirc': '\xD4',
+             'ocy': "\u043E",
+             'Ocy': "\u041E",
+             'odash': "\u229D",
+             'odblac': "\u0151",
+             'Odblac': "\u0150",
+             'odiv': "\u2A38",
+             'odot': "\u2299",
+             'odsold': "\u29BC",
+             'oelig': "\u0153",
+             'OElig': "\u0152",
+             'ofcir': "\u29BF",
+             'ofr': "\uD835\uDD2C",
+             'Ofr': "\uD835\uDD12",
+             'ogon': "\u02DB",
+             'ograve': '\xF2',
+             'Ograve': '\xD2',
+             'ogt': "\u29C1",
+             'ohbar': "\u29B5",
+             'ohm': "\u03A9",
+             'oint': "\u222E",
+             'olarr': "\u21BA",
+             'olcir': "\u29BE",
+             'olcross': "\u29BB",
+             'oline': "\u203E",
+             'olt': "\u29C0",
+             'omacr': "\u014D",
+             'Omacr': "\u014C",
+             'omega': "\u03C9",
+             'Omega': "\u03A9",
+             'omicron': "\u03BF",
+             'Omicron': "\u039F",
+             'omid': "\u29B6",
+             'ominus': "\u2296",
+             'oopf': "\uD835\uDD60",
+             'Oopf': "\uD835\uDD46",
+             'opar': "\u29B7",
+             'OpenCurlyDoubleQuote': "\u201C",
+             'OpenCurlyQuote': "\u2018",
+             'operp': "\u29B9",
+             'oplus': "\u2295",
+             'or': "\u2228",
+             'Or': "\u2A54",
+             'orarr': "\u21BB",
+             'ord': "\u2A5D",
+             'order': "\u2134",
+             'orderof': "\u2134",
+             'ordf': '\xAA',
+             'ordm': '\xBA',
+             'origof': "\u22B6",
+             'oror': "\u2A56",
+             'orslope': "\u2A57",
+             'orv': "\u2A5B",
+             'oS': "\u24C8",
+             'oscr': "\u2134",
+             'Oscr': "\uD835\uDCAA",
+             'oslash': '\xF8',
+             'Oslash': '\xD8',
+             'osol': "\u2298",
+             'otilde': '\xF5',
+             'Otilde': '\xD5',
+             'otimes': "\u2297",
+             'Otimes': "\u2A37",
+             'otimesas': "\u2A36",
+             'ouml': '\xF6',
+             'Ouml': '\xD6',
+             'ovbar': "\u233D",
+             'OverBar': "\u203E",
+             'OverBrace': "\u23DE",
+             'OverBracket': "\u23B4",
+             'OverParenthesis': "\u23DC",
+             'par': "\u2225",
+             'para': '\xB6',
+             'parallel': "\u2225",
+             'parsim': "\u2AF3",
+             'parsl': "\u2AFD",
+             'part': "\u2202",
+             'PartialD': "\u2202",
+             'pcy': "\u043F",
+             'Pcy': "\u041F",
+             'percnt': '%',
+             'period': '.',
+             'permil': "\u2030",
+             'perp': "\u22A5",
+             'pertenk': "\u2031",
+             'pfr': "\uD835\uDD2D",
+             'Pfr': "\uD835\uDD13",
+             'phi': "\u03C6",
+             'Phi': "\u03A6",
+             'phiv': "\u03D5",
+             'phmmat': "\u2133",
+             'phone': "\u260E",
+             'pi': "\u03C0",
+             'Pi': "\u03A0",
+             'pitchfork': "\u22D4",
+             'piv': "\u03D6",
+             'planck': "\u210F",
+             'planckh': "\u210E",
+             'plankv': "\u210F",
+             'plus': '+',
+             'plusacir': "\u2A23",
+             'plusb': "\u229E",
+             'pluscir': "\u2A22",
+             'plusdo': "\u2214",
+             'plusdu': "\u2A25",
+             'pluse': "\u2A72",
+             'PlusMinus': '\xB1',
+             'plusmn': '\xB1',
+             'plussim': "\u2A26",
+             'plustwo': "\u2A27",
+             'pm': '\xB1',
+             'Poincareplane': "\u210C",
+             'pointint': "\u2A15",
+             'popf': "\uD835\uDD61",
+             'Popf': "\u2119",
+             'pound': '\xA3',
+             'pr': "\u227A",
+             'Pr': "\u2ABB",
+             'prap': "\u2AB7",
+             'prcue': "\u227C",
+             'pre': "\u2AAF",
+             'prE': "\u2AB3",
+             'prec': "\u227A",
+             'precapprox': "\u2AB7",
+             'preccurlyeq': "\u227C",
+             'Precedes': "\u227A",
+             'PrecedesEqual': "\u2AAF",
+             'PrecedesSlantEqual': "\u227C",
+             'PrecedesTilde': "\u227E",
+             'preceq': "\u2AAF",
+             'precnapprox': "\u2AB9",
+             'precneqq': "\u2AB5",
+             'precnsim': "\u22E8",
+             'precsim': "\u227E",
+             'prime': "\u2032",
+             'Prime': "\u2033",
+             'primes': "\u2119",
+             'prnap': "\u2AB9",
+             'prnE': "\u2AB5",
+             'prnsim': "\u22E8",
+             'prod': "\u220F",
+             'Product': "\u220F",
+             'profalar': "\u232E",
+             'profline': "\u2312",
+             'profsurf': "\u2313",
+             'prop': "\u221D",
+             'Proportion': "\u2237",
+             'Proportional': "\u221D",
+             'propto': "\u221D",
+             'prsim': "\u227E",
+             'prurel': "\u22B0",
+             'pscr': "\uD835\uDCC5",
+             'Pscr': "\uD835\uDCAB",
+             'psi': "\u03C8",
+             'Psi': "\u03A8",
+             'puncsp': "\u2008",
+             'qfr': "\uD835\uDD2E",
+             'Qfr': "\uD835\uDD14",
+             'qint': "\u2A0C",
+             'qopf': "\uD835\uDD62",
+             'Qopf': "\u211A",
+             'qprime': "\u2057",
+             'qscr': "\uD835\uDCC6",
+             'Qscr': "\uD835\uDCAC",
+             'quaternions': "\u210D",
+             'quatint': "\u2A16",
+             'quest': '?',
+             'questeq': "\u225F",
+             'quot': '"',
+             'QUOT': '"',
+             'rAarr': "\u21DB",
+             'race': "\u223D\u0331",
+             'racute': "\u0155",
+             'Racute': "\u0154",
+             'radic': "\u221A",
+             'raemptyv': "\u29B3",
+             'rang': "\u27E9",
+             'Rang': "\u27EB",
+             'rangd': "\u2992",
+             'range': "\u29A5",
+             'rangle': "\u27E9",
+             'raquo': '\xBB',
+             'rarr': "\u2192",
+             'rArr': "\u21D2",
+             'Rarr': "\u21A0",
+             'rarrap': "\u2975",
+             'rarrb': "\u21E5",
+             'rarrbfs': "\u2920",
+             'rarrc': "\u2933",
+             'rarrfs': "\u291E",
+             'rarrhk': "\u21AA",
+             'rarrlp': "\u21AC",
+             'rarrpl': "\u2945",
+             'rarrsim': "\u2974",
+             'rarrtl': "\u21A3",
+             'Rarrtl': "\u2916",
+             'rarrw': "\u219D",
+             'ratail': "\u291A",
+             'rAtail': "\u291C",
+             'ratio': "\u2236",
+             'rationals': "\u211A",
+             'rbarr': "\u290D",
+             'rBarr': "\u290F",
+             'RBarr': "\u2910",
+             'rbbrk': "\u2773",
+             'rbrace': '}',
+             'rbrack': ']',
+             'rbrke': "\u298C",
+             'rbrksld': "\u298E",
+             'rbrkslu': "\u2990",
+             'rcaron': "\u0159",
+             'Rcaron': "\u0158",
+             'rcedil': "\u0157",
+             'Rcedil': "\u0156",
+             'rceil': "\u2309",
+             'rcub': '}',
+             'rcy': "\u0440",
+             'Rcy': "\u0420",
+             'rdca': "\u2937",
+             'rdldhar': "\u2969",
+             'rdquo': "\u201D",
+             'rdquor': "\u201D",
+             'rdsh': "\u21B3",
+             'Re': "\u211C",
+             'real': "\u211C",
+             'realine': "\u211B",
+             'realpart': "\u211C",
+             'reals': "\u211D",
+             'rect': "\u25AD",
+             'reg': '\xAE',
+             'REG': '\xAE',
+             'ReverseElement': "\u220B",
+             'ReverseEquilibrium': "\u21CB",
+             'ReverseUpEquilibrium': "\u296F",
+             'rfisht': "\u297D",
+             'rfloor': "\u230B",
+             'rfr': "\uD835\uDD2F",
+             'Rfr': "\u211C",
+             'rHar': "\u2964",
+             'rhard': "\u21C1",
+             'rharu': "\u21C0",
+             'rharul': "\u296C",
+             'rho': "\u03C1",
+             'Rho': "\u03A1",
+             'rhov': "\u03F1",
+             'RightAngleBracket': "\u27E9",
+             'rightarrow': "\u2192",
+             'Rightarrow': "\u21D2",
+             'RightArrow': "\u2192",
+             'RightArrowBar': "\u21E5",
+             'RightArrowLeftArrow': "\u21C4",
+             'rightarrowtail': "\u21A3",
+             'RightCeiling': "\u2309",
+             'RightDoubleBracket': "\u27E7",
+             'RightDownTeeVector': "\u295D",
+             'RightDownVector': "\u21C2",
+             'RightDownVectorBar': "\u2955",
+             'RightFloor': "\u230B",
+             'rightharpoondown': "\u21C1",
+             'rightharpoonup': "\u21C0",
+             'rightleftarrows': "\u21C4",
+             'rightleftharpoons': "\u21CC",
+             'rightrightarrows': "\u21C9",
+             'rightsquigarrow': "\u219D",
+             'RightTee': "\u22A2",
+             'RightTeeArrow': "\u21A6",
+             'RightTeeVector': "\u295B",
+             'rightthreetimes': "\u22CC",
+             'RightTriangle': "\u22B3",
+             'RightTriangleBar': "\u29D0",
+             'RightTriangleEqual': "\u22B5",
+             'RightUpDownVector': "\u294F",
+             'RightUpTeeVector': "\u295C",
+             'RightUpVector': "\u21BE",
+             'RightUpVectorBar': "\u2954",
+             'RightVector': "\u21C0",
+             'RightVectorBar': "\u2953",
+             'ring': "\u02DA",
+             'risingdotseq': "\u2253",
+             'rlarr': "\u21C4",
+             'rlhar': "\u21CC",
+             'rlm': "\u200F",
+             'rmoust': "\u23B1",
+             'rmoustache': "\u23B1",
+             'rnmid': "\u2AEE",
+             'roang': "\u27ED",
+             'roarr': "\u21FE",
+             'robrk': "\u27E7",
+             'ropar': "\u2986",
+             'ropf': "\uD835\uDD63",
+             'Ropf': "\u211D",
+             'roplus': "\u2A2E",
+             'rotimes': "\u2A35",
+             'RoundImplies': "\u2970",
+             'rpar': ')',
+             'rpargt': "\u2994",
+             'rppolint': "\u2A12",
+             'rrarr': "\u21C9",
+             'Rrightarrow': "\u21DB",
+             'rsaquo': "\u203A",
+             'rscr': "\uD835\uDCC7",
+             'Rscr': "\u211B",
+             'rsh': "\u21B1",
+             'Rsh': "\u21B1",
+             'rsqb': ']',
+             'rsquo': "\u2019",
+             'rsquor': "\u2019",
+             'rthree': "\u22CC",
+             'rtimes': "\u22CA",
+             'rtri': "\u25B9",
+             'rtrie': "\u22B5",
+             'rtrif': "\u25B8",
+             'rtriltri': "\u29CE",
+             'RuleDelayed': "\u29F4",
+             'ruluhar': "\u2968",
+             'rx': "\u211E",
+             'sacute': "\u015B",
+             'Sacute': "\u015A",
+             'sbquo': "\u201A",
+             'sc': "\u227B",
+             'Sc': "\u2ABC",
+             'scap': "\u2AB8",
+             'scaron': "\u0161",
+             'Scaron': "\u0160",
+             'sccue': "\u227D",
+             'sce': "\u2AB0",
+             'scE': "\u2AB4",
+             'scedil': "\u015F",
+             'Scedil': "\u015E",
+             'scirc': "\u015D",
+             'Scirc': "\u015C",
+             'scnap': "\u2ABA",
+             'scnE': "\u2AB6",
+             'scnsim': "\u22E9",
+             'scpolint': "\u2A13",
+             'scsim': "\u227F",
+             'scy': "\u0441",
+             'Scy': "\u0421",
+             'sdot': "\u22C5",
+             'sdotb': "\u22A1",
+             'sdote': "\u2A66",
+             'searhk': "\u2925",
+             'searr': "\u2198",
+             'seArr': "\u21D8",
+             'searrow': "\u2198",
+             'sect': '\xA7',
+             'semi': ';',
+             'seswar': "\u2929",
+             'setminus': "\u2216",
+             'setmn': "\u2216",
+             'sext': "\u2736",
+             'sfr': "\uD835\uDD30",
+             'Sfr': "\uD835\uDD16",
+             'sfrown': "\u2322",
+             'sharp': "\u266F",
+             'shchcy': "\u0449",
+             'SHCHcy': "\u0429",
+             'shcy': "\u0448",
+             'SHcy': "\u0428",
+             'ShortDownArrow': "\u2193",
+             'ShortLeftArrow': "\u2190",
+             'shortmid': "\u2223",
+             'shortparallel': "\u2225",
+             'ShortRightArrow': "\u2192",
+             'ShortUpArrow': "\u2191",
+             'shy': '\xAD',
+             'sigma': "\u03C3",
+             'Sigma': "\u03A3",
+             'sigmaf': "\u03C2",
+             'sigmav': "\u03C2",
+             'sim': "\u223C",
+             'simdot': "\u2A6A",
+             'sime': "\u2243",
+             'simeq': "\u2243",
+             'simg': "\u2A9E",
+             'simgE': "\u2AA0",
+             'siml': "\u2A9D",
+             'simlE': "\u2A9F",
+             'simne': "\u2246",
+             'simplus': "\u2A24",
+             'simrarr': "\u2972",
+             'slarr': "\u2190",
+             'SmallCircle': "\u2218",
+             'smallsetminus': "\u2216",
+             'smashp': "\u2A33",
+             'smeparsl': "\u29E4",
+             'smid': "\u2223",
+             'smile': "\u2323",
+             'smt': "\u2AAA",
+             'smte': "\u2AAC",
+             'smtes': "\u2AAC\uFE00",
+             'softcy': "\u044C",
+             'SOFTcy': "\u042C",
+             'sol': '/',
+             'solb': "\u29C4",
+             'solbar': "\u233F",
+             'sopf': "\uD835\uDD64",
+             'Sopf': "\uD835\uDD4A",
+             'spades': "\u2660",
+             'spadesuit': "\u2660",
+             'spar': "\u2225",
+             'sqcap': "\u2293",
+             'sqcaps': "\u2293\uFE00",
+             'sqcup': "\u2294",
+             'sqcups': "\u2294\uFE00",
+             'Sqrt': "\u221A",
+             'sqsub': "\u228F",
+             'sqsube': "\u2291",
+             'sqsubset': "\u228F",
+             'sqsubseteq': "\u2291",
+             'sqsup': "\u2290",
+             'sqsupe': "\u2292",
+             'sqsupset': "\u2290",
+             'sqsupseteq': "\u2292",
+             'squ': "\u25A1",
+             'square': "\u25A1",
+             'Square': "\u25A1",
+             'SquareIntersection': "\u2293",
+             'SquareSubset': "\u228F",
+             'SquareSubsetEqual': "\u2291",
+             'SquareSuperset': "\u2290",
+             'SquareSupersetEqual': "\u2292",
+             'SquareUnion': "\u2294",
+             'squarf': "\u25AA",
+             'squf': "\u25AA",
+             'srarr': "\u2192",
+             'sscr': "\uD835\uDCC8",
+             'Sscr': "\uD835\uDCAE",
+             'ssetmn': "\u2216",
+             'ssmile': "\u2323",
+             'sstarf': "\u22C6",
+             'star': "\u2606",
+             'Star': "\u22C6",
+             'starf': "\u2605",
+             'straightepsilon': "\u03F5",
+             'straightphi': "\u03D5",
+             'strns': '\xAF',
+             'sub': "\u2282",
+             'Sub': "\u22D0",
+             'subdot': "\u2ABD",
+             'sube': "\u2286",
+             'subE': "\u2AC5",
+             'subedot': "\u2AC3",
+             'submult': "\u2AC1",
+             'subne': "\u228A",
+             'subnE': "\u2ACB",
+             'subplus': "\u2ABF",
+             'subrarr': "\u2979",
+             'subset': "\u2282",
+             'Subset': "\u22D0",
+             'subseteq': "\u2286",
+             'subseteqq': "\u2AC5",
+             'SubsetEqual': "\u2286",
+             'subsetneq': "\u228A",
+             'subsetneqq': "\u2ACB",
+             'subsim': "\u2AC7",
+             'subsub': "\u2AD5",
+             'subsup': "\u2AD3",
+             'succ': "\u227B",
+             'succapprox': "\u2AB8",
+             'succcurlyeq': "\u227D",
+             'Succeeds': "\u227B",
+             'SucceedsEqual': "\u2AB0",
+             'SucceedsSlantEqual': "\u227D",
+             'SucceedsTilde': "\u227F",
+             'succeq': "\u2AB0",
+             'succnapprox': "\u2ABA",
+             'succneqq': "\u2AB6",
+             'succnsim': "\u22E9",
+             'succsim': "\u227F",
+             'SuchThat': "\u220B",
+             'sum': "\u2211",
+             'Sum': "\u2211",
+             'sung': "\u266A",
+             'sup': "\u2283",
+             'Sup': "\u22D1",
+             'sup1': '\xB9',
+             'sup2': '\xB2',
+             'sup3': '\xB3',
+             'supdot': "\u2ABE",
+             'supdsub': "\u2AD8",
+             'supe': "\u2287",
+             'supE': "\u2AC6",
+             'supedot': "\u2AC4",
+             'Superset': "\u2283",
+             'SupersetEqual': "\u2287",
+             'suphsol': "\u27C9",
+             'suphsub': "\u2AD7",
+             'suplarr': "\u297B",
+             'supmult': "\u2AC2",
+             'supne': "\u228B",
+             'supnE': "\u2ACC",
+             'supplus': "\u2AC0",
+             'supset': "\u2283",
+             'Supset': "\u22D1",
+             'supseteq': "\u2287",
+             'supseteqq': "\u2AC6",
+             'supsetneq': "\u228B",
+             'supsetneqq': "\u2ACC",
+             'supsim': "\u2AC8",
+             'supsub': "\u2AD4",
+             'supsup': "\u2AD6",
+             'swarhk': "\u2926",
+             'swarr': "\u2199",
+             'swArr': "\u21D9",
+             'swarrow': "\u2199",
+             'swnwar': "\u292A",
+             'szlig': '\xDF',
+             'Tab': '\t',
+             'target': "\u2316",
+             'tau': "\u03C4",
+             'Tau': "\u03A4",
+             'tbrk': "\u23B4",
+             'tcaron': "\u0165",
+             'Tcaron': "\u0164",
+             'tcedil': "\u0163",
+             'Tcedil': "\u0162",
+             'tcy': "\u0442",
+             'Tcy': "\u0422",
+             'tdot': "\u20DB",
+             'telrec': "\u2315",
+             'tfr': "\uD835\uDD31",
+             'Tfr': "\uD835\uDD17",
+             'there4': "\u2234",
+             'therefore': "\u2234",
+             'Therefore': "\u2234",
+             'theta': "\u03B8",
+             'Theta': "\u0398",
+             'thetasym': "\u03D1",
+             'thetav': "\u03D1",
+             'thickapprox': "\u2248",
+             'thicksim': "\u223C",
+             'ThickSpace': "\u205F\u200A",
+             'thinsp': "\u2009",
+             'ThinSpace': "\u2009",
+             'thkap': "\u2248",
+             'thksim': "\u223C",
+             'thorn': '\xFE',
+             'THORN': '\xDE',
+             'tilde': "\u02DC",
+             'Tilde': "\u223C",
+             'TildeEqual': "\u2243",
+             'TildeFullEqual': "\u2245",
+             'TildeTilde': "\u2248",
+             'times': '\xD7',
+             'timesb': "\u22A0",
+             'timesbar': "\u2A31",
+             'timesd': "\u2A30",
+             'tint': "\u222D",
+             'toea': "\u2928",
+             'top': "\u22A4",
+             'topbot': "\u2336",
+             'topcir': "\u2AF1",
+             'topf': "\uD835\uDD65",
+             'Topf': "\uD835\uDD4B",
+             'topfork': "\u2ADA",
+             'tosa': "\u2929",
+             'tprime': "\u2034",
+             'trade': "\u2122",
+             'TRADE': "\u2122",
+             'triangle': "\u25B5",
+             'triangledown': "\u25BF",
+             'triangleleft': "\u25C3",
+             'trianglelefteq': "\u22B4",
+             'triangleq': "\u225C",
+             'triangleright': "\u25B9",
+             'trianglerighteq': "\u22B5",
+             'tridot': "\u25EC",
+             'trie': "\u225C",
+             'triminus': "\u2A3A",
+             'TripleDot': "\u20DB",
+             'triplus': "\u2A39",
+             'trisb': "\u29CD",
+             'tritime': "\u2A3B",
+             'trpezium': "\u23E2",
+             'tscr': "\uD835\uDCC9",
+             'Tscr': "\uD835\uDCAF",
+             'tscy': "\u0446",
+             'TScy': "\u0426",
+             'tshcy': "\u045B",
+             'TSHcy': "\u040B",
+             'tstrok': "\u0167",
+             'Tstrok': "\u0166",
+             'twixt': "\u226C",
+             'twoheadleftarrow': "\u219E",
+             'twoheadrightarrow': "\u21A0",
+             'uacute': '\xFA',
+             'Uacute': '\xDA',
+             'uarr': "\u2191",
+             'uArr': "\u21D1",
+             'Uarr': "\u219F",
+             'Uarrocir': "\u2949",
+             'ubrcy': "\u045E",
+             'Ubrcy': "\u040E",
+             'ubreve': "\u016D",
+             'Ubreve': "\u016C",
+             'ucirc': '\xFB',
+             'Ucirc': '\xDB',
+             'ucy': "\u0443",
+             'Ucy': "\u0423",
+             'udarr': "\u21C5",
+             'udblac': "\u0171",
+             'Udblac': "\u0170",
+             'udhar': "\u296E",
+             'ufisht': "\u297E",
+             'ufr': "\uD835\uDD32",
+             'Ufr': "\uD835\uDD18",
+             'ugrave': '\xF9',
+             'Ugrave': '\xD9',
+             'uHar': "\u2963",
+             'uharl': "\u21BF",
+             'uharr': "\u21BE",
+             'uhblk': "\u2580",
+             'ulcorn': "\u231C",
+             'ulcorner': "\u231C",
+             'ulcrop': "\u230F",
+             'ultri': "\u25F8",
+             'umacr': "\u016B",
+             'Umacr': "\u016A",
+             'uml': '\xA8',
+             'UnderBar': '_',
+             'UnderBrace': "\u23DF",
+             'UnderBracket': "\u23B5",
+             'UnderParenthesis': "\u23DD",
+             'Union': "\u22C3",
+             'UnionPlus': "\u228E",
+             'uogon': "\u0173",
+             'Uogon': "\u0172",
+             'uopf': "\uD835\uDD66",
+             'Uopf': "\uD835\uDD4C",
+             'uparrow': "\u2191",
+             'Uparrow': "\u21D1",
+             'UpArrow': "\u2191",
+             'UpArrowBar': "\u2912",
+             'UpArrowDownArrow': "\u21C5",
+             'updownarrow': "\u2195",
+             'Updownarrow': "\u21D5",
+             'UpDownArrow': "\u2195",
+             'UpEquilibrium': "\u296E",
+             'upharpoonleft': "\u21BF",
+             'upharpoonright': "\u21BE",
+             'uplus': "\u228E",
+             'UpperLeftArrow': "\u2196",
+             'UpperRightArrow': "\u2197",
+             'upsi': "\u03C5",
+             'Upsi': "\u03D2",
+             'upsih': "\u03D2",
+             'upsilon': "\u03C5",
+             'Upsilon': "\u03A5",
+             'UpTee': "\u22A5",
+             'UpTeeArrow': "\u21A5",
+             'upuparrows': "\u21C8",
+             'urcorn': "\u231D",
+             'urcorner': "\u231D",
+             'urcrop': "\u230E",
+             'uring': "\u016F",
+             'Uring': "\u016E",
+             'urtri': "\u25F9",
+             'uscr': "\uD835\uDCCA",
+             'Uscr': "\uD835\uDCB0",
+             'utdot': "\u22F0",
+             'utilde': "\u0169",
+             'Utilde': "\u0168",
+             'utri': "\u25B5",
+             'utrif': "\u25B4",
+             'uuarr': "\u21C8",
+             'uuml': '\xFC',
+             'Uuml': '\xDC',
+             'uwangle': "\u29A7",
+             'vangrt': "\u299C",
+             'varepsilon': "\u03F5",
+             'varkappa': "\u03F0",
+             'varnothing': "\u2205",
+             'varphi': "\u03D5",
+             'varpi': "\u03D6",
+             'varpropto': "\u221D",
+             'varr': "\u2195",
+             'vArr': "\u21D5",
+             'varrho': "\u03F1",
+             'varsigma': "\u03C2",
+             'varsubsetneq': "\u228A\uFE00",
+             'varsubsetneqq': "\u2ACB\uFE00",
+             'varsupsetneq': "\u228B\uFE00",
+             'varsupsetneqq': "\u2ACC\uFE00",
+             'vartheta': "\u03D1",
+             'vartriangleleft': "\u22B2",
+             'vartriangleright': "\u22B3",
+             'vBar': "\u2AE8",
+             'Vbar': "\u2AEB",
+             'vBarv': "\u2AE9",
+             'vcy': "\u0432",
+             'Vcy': "\u0412",
+             'vdash': "\u22A2",
+             'vDash': "\u22A8",
+             'Vdash': "\u22A9",
+             'VDash': "\u22AB",
+             'Vdashl': "\u2AE6",
+             'vee': "\u2228",
+             'Vee': "\u22C1",
+             'veebar': "\u22BB",
+             'veeeq': "\u225A",
+             'vellip': "\u22EE",
+             'verbar': '|',
+             'Verbar': "\u2016",
+             'vert': '|',
+             'Vert': "\u2016",
+             'VerticalBar': "\u2223",
+             'VerticalLine': '|',
+             'VerticalSeparator': "\u2758",
+             'VerticalTilde': "\u2240",
+             'VeryThinSpace': "\u200A",
+             'vfr': "\uD835\uDD33",
+             'Vfr': "\uD835\uDD19",
+             'vltri': "\u22B2",
+             'vnsub': "\u2282\u20D2",
+             'vnsup': "\u2283\u20D2",
+             'vopf': "\uD835\uDD67",
+             'Vopf': "\uD835\uDD4D",
+             'vprop': "\u221D",
+             'vrtri': "\u22B3",
+             'vscr': "\uD835\uDCCB",
+             'Vscr': "\uD835\uDCB1",
+             'vsubne': "\u228A\uFE00",
+             'vsubnE': "\u2ACB\uFE00",
+             'vsupne': "\u228B\uFE00",
+             'vsupnE': "\u2ACC\uFE00",
+             'Vvdash': "\u22AA",
+             'vzigzag': "\u299A",
+             'wcirc': "\u0175",
+             'Wcirc': "\u0174",
+             'wedbar': "\u2A5F",
+             'wedge': "\u2227",
+             'Wedge': "\u22C0",
+             'wedgeq': "\u2259",
+             'weierp': "\u2118",
+             'wfr': "\uD835\uDD34",
+             'Wfr': "\uD835\uDD1A",
+             'wopf': "\uD835\uDD68",
+             'Wopf': "\uD835\uDD4E",
+             'wp': "\u2118",
+             'wr': "\u2240",
+             'wreath': "\u2240",
+             'wscr': "\uD835\uDCCC",
+             'Wscr': "\uD835\uDCB2",
+             'xcap': "\u22C2",
+             'xcirc': "\u25EF",
+             'xcup': "\u22C3",
+             'xdtri': "\u25BD",
+             'xfr': "\uD835\uDD35",
+             'Xfr': "\uD835\uDD1B",
+             'xharr': "\u27F7",
+             'xhArr': "\u27FA",
+             'xi': "\u03BE",
+             'Xi': "\u039E",
+             'xlarr': "\u27F5",
+             'xlArr': "\u27F8",
+             'xmap': "\u27FC",
+             'xnis': "\u22FB",
+             'xodot': "\u2A00",
+             'xopf': "\uD835\uDD69",
+             'Xopf': "\uD835\uDD4F",
+             'xoplus': "\u2A01",
+             'xotime': "\u2A02",
+             'xrarr': "\u27F6",
+             'xrArr': "\u27F9",
+             'xscr': "\uD835\uDCCD",
+             'Xscr': "\uD835\uDCB3",
+             'xsqcup': "\u2A06",
+             'xuplus': "\u2A04",
+             'xutri': "\u25B3",
+             'xvee': "\u22C1",
+             'xwedge': "\u22C0",
+             'yacute': '\xFD',
+             'Yacute': '\xDD',
+             'yacy': "\u044F",
+             'YAcy': "\u042F",
+             'ycirc': "\u0177",
+             'Ycirc': "\u0176",
+             'ycy': "\u044B",
+             'Ycy': "\u042B",
+             'yen': '\xA5',
+             'yfr': "\uD835\uDD36",
+             'Yfr': "\uD835\uDD1C",
+             'yicy': "\u0457",
+             'YIcy': "\u0407",
+             'yopf': "\uD835\uDD6A",
+             'Yopf': "\uD835\uDD50",
+             'yscr': "\uD835\uDCCE",
+             'Yscr': "\uD835\uDCB4",
+             'yucy': "\u044E",
+             'YUcy': "\u042E",
+             'yuml': '\xFF',
+             'Yuml': "\u0178",
+             'zacute': "\u017A",
+             'Zacute': "\u0179",
+             'zcaron': "\u017E",
+             'Zcaron': "\u017D",
+             'zcy': "\u0437",
+             'Zcy': "\u0417",
+             'zdot': "\u017C",
+             'Zdot': "\u017B",
+             'zeetrf': "\u2128",
+             'ZeroWidthSpace': "\u200B",
+             'zeta': "\u03B6",
+             'Zeta': "\u0396",
+             'zfr': "\uD835\uDD37",
+             'Zfr': "\u2128",
+             'zhcy': "\u0436",
+             'ZHcy': "\u0416",
+             'zigrarr': "\u21DD",
+             'zopf': "\uD835\uDD6B",
+             'Zopf': "\u2124",
+             'zscr': "\uD835\uDCCF",
+             'Zscr': "\uD835\uDCB5",
+             'zwj': "\u200D",
+             'zwnj': "\u200C"
+           };
+           var decodeMapLegacy = {
+             'aacute': '\xE1',
+             'Aacute': '\xC1',
+             'acirc': '\xE2',
+             'Acirc': '\xC2',
+             'acute': '\xB4',
+             'aelig': '\xE6',
+             'AElig': '\xC6',
+             'agrave': '\xE0',
+             'Agrave': '\xC0',
+             'amp': '&',
+             'AMP': '&',
+             'aring': '\xE5',
+             'Aring': '\xC5',
+             'atilde': '\xE3',
+             'Atilde': '\xC3',
+             'auml': '\xE4',
+             'Auml': '\xC4',
+             'brvbar': '\xA6',
+             'ccedil': '\xE7',
+             'Ccedil': '\xC7',
+             'cedil': '\xB8',
+             'cent': '\xA2',
+             'copy': '\xA9',
+             'COPY': '\xA9',
+             'curren': '\xA4',
+             'deg': '\xB0',
+             'divide': '\xF7',
+             'eacute': '\xE9',
+             'Eacute': '\xC9',
+             'ecirc': '\xEA',
+             'Ecirc': '\xCA',
+             'egrave': '\xE8',
+             'Egrave': '\xC8',
+             'eth': '\xF0',
+             'ETH': '\xD0',
+             'euml': '\xEB',
+             'Euml': '\xCB',
+             'frac12': '\xBD',
+             'frac14': '\xBC',
+             'frac34': '\xBE',
+             'gt': '>',
+             'GT': '>',
+             'iacute': '\xED',
+             'Iacute': '\xCD',
+             'icirc': '\xEE',
+             'Icirc': '\xCE',
+             'iexcl': '\xA1',
+             'igrave': '\xEC',
+             'Igrave': '\xCC',
+             'iquest': '\xBF',
+             'iuml': '\xEF',
+             'Iuml': '\xCF',
+             'laquo': '\xAB',
+             'lt': '<',
+             'LT': '<',
+             'macr': '\xAF',
+             'micro': '\xB5',
+             'middot': '\xB7',
+             'nbsp': '\xA0',
+             'not': '\xAC',
+             'ntilde': '\xF1',
+             'Ntilde': '\xD1',
+             'oacute': '\xF3',
+             'Oacute': '\xD3',
+             'ocirc': '\xF4',
+             'Ocirc': '\xD4',
+             'ograve': '\xF2',
+             'Ograve': '\xD2',
+             'ordf': '\xAA',
+             'ordm': '\xBA',
+             'oslash': '\xF8',
+             'Oslash': '\xD8',
+             'otilde': '\xF5',
+             'Otilde': '\xD5',
+             'ouml': '\xF6',
+             'Ouml': '\xD6',
+             'para': '\xB6',
+             'plusmn': '\xB1',
+             'pound': '\xA3',
+             'quot': '"',
+             'QUOT': '"',
+             'raquo': '\xBB',
+             'reg': '\xAE',
+             'REG': '\xAE',
+             'sect': '\xA7',
+             'shy': '\xAD',
+             'sup1': '\xB9',
+             'sup2': '\xB2',
+             'sup3': '\xB3',
+             'szlig': '\xDF',
+             'thorn': '\xFE',
+             'THORN': '\xDE',
+             'times': '\xD7',
+             'uacute': '\xFA',
+             'Uacute': '\xDA',
+             'ucirc': '\xFB',
+             'Ucirc': '\xDB',
+             'ugrave': '\xF9',
+             'Ugrave': '\xD9',
+             'uml': '\xA8',
+             'uuml': '\xFC',
+             'Uuml': '\xDC',
+             'yacute': '\xFD',
+             'Yacute': '\xDD',
+             'yen': '\xA5',
+             'yuml': '\xFF'
+           };
+           var decodeMapNumeric = {
+             '0': "\uFFFD",
+             '128': "\u20AC",
+             '130': "\u201A",
+             '131': "\u0192",
+             '132': "\u201E",
+             '133': "\u2026",
+             '134': "\u2020",
+             '135': "\u2021",
+             '136': "\u02C6",
+             '137': "\u2030",
+             '138': "\u0160",
+             '139': "\u2039",
+             '140': "\u0152",
+             '142': "\u017D",
+             '145': "\u2018",
+             '146': "\u2019",
+             '147': "\u201C",
+             '148': "\u201D",
+             '149': "\u2022",
+             '150': "\u2013",
+             '151': "\u2014",
+             '152': "\u02DC",
+             '153': "\u2122",
+             '154': "\u0161",
+             '155': "\u203A",
+             '156': "\u0153",
+             '158': "\u017E",
+             '159': "\u0178"
+           };
+           var invalidReferenceCodePoints = [1, 2, 3, 4, 5, 6, 7, 8, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 64976, 64977, 64978, 64979, 64980, 64981, 64982, 64983, 64984, 64985, 64986, 64987, 64988, 64989, 64990, 64991, 64992, 64993, 64994, 64995, 64996, 64997, 64998, 64999, 65000, 65001, 65002, 65003, 65004, 65005, 65006, 65007, 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, 1048575, 1114110, 1114111];
+           /*--------------------------------------------------------------------------*/
+
+           var stringFromCharCode = String.fromCharCode;
+           var object = {};
+           var hasOwnProperty = object.hasOwnProperty;
+
+           var has = function has(object, propertyName) {
+             return hasOwnProperty.call(object, propertyName);
+           };
+
+           var contains = function contains(array, value) {
+             var index = -1;
+             var length = array.length;
+
+             while (++index < length) {
+               if (array[index] == value) {
+                 return true;
+               }
+             }
+
+             return false;
+           };
+
+           var merge = function merge(options, defaults) {
+             if (!options) {
+               return defaults;
+             }
+
+             var result = {};
+             var key;
+
+             for (key in defaults) {
+               // A `hasOwnProperty` check is not needed here, since only recognized
+               // option names are used anyway. Any others are ignored.
+               result[key] = has(options, key) ? options[key] : defaults[key];
+             }
+
+             return result;
+           }; // Modified version of `ucs2encode`; see https://mths.be/punycode.
+
+
+           var codePointToSymbol = function codePointToSymbol(codePoint, strict) {
+             var output = '';
+
+             if (codePoint >= 0xD800 && codePoint <= 0xDFFF || codePoint > 0x10FFFF) {
+               // See issue #4:
+               // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
+               // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
+               // REPLACEMENT CHARACTER.”
+               if (strict) {
+                 parseError('character reference outside the permissible Unicode range');
+               }
+
+               return "\uFFFD";
+             }
+
+             if (has(decodeMapNumeric, codePoint)) {
+               if (strict) {
+                 parseError('disallowed character reference');
+               }
+
+               return decodeMapNumeric[codePoint];
+             }
+
+             if (strict && contains(invalidReferenceCodePoints, codePoint)) {
+               parseError('disallowed character reference');
+             }
+
+             if (codePoint > 0xFFFF) {
+               codePoint -= 0x10000;
+               output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
+               codePoint = 0xDC00 | codePoint & 0x3FF;
+             }
+
+             output += stringFromCharCode(codePoint);
+             return output;
+           };
+
+           var hexEscape = function hexEscape(codePoint) {
+             return '&#x' + codePoint.toString(16).toUpperCase() + ';';
+           };
+
+           var decEscape = function decEscape(codePoint) {
+             return '&#' + codePoint + ';';
+           };
+
+           var parseError = function parseError(message) {
+             throw Error('Parse error: ' + message);
+           };
+           /*--------------------------------------------------------------------------*/
+
+
+           var encode = function encode(string, options) {
+             options = merge(options, encode.options);
+             var strict = options.strict;
+
+             if (strict && regexInvalidRawCodePoint.test(string)) {
+               parseError('forbidden code point');
+             }
+
+             var encodeEverything = options.encodeEverything;
+             var useNamedReferences = options.useNamedReferences;
+             var allowUnsafeSymbols = options.allowUnsafeSymbols;
+             var escapeCodePoint = options.decimal ? decEscape : hexEscape;
+
+             var escapeBmpSymbol = function escapeBmpSymbol(symbol) {
+               return escapeCodePoint(symbol.charCodeAt(0));
+             };
+
+             if (encodeEverything) {
+               // Encode ASCII symbols.
+               string = string.replace(regexAsciiWhitelist, function (symbol) {
+                 // Use named references if requested & possible.
+                 if (useNamedReferences && has(encodeMap, symbol)) {
+                   return '&' + encodeMap[symbol] + ';';
+                 }
+
+                 return escapeBmpSymbol(symbol);
+               }); // Shorten a few escapes that represent two symbols, of which at least one
+               // is within the ASCII range.
+
+               if (useNamedReferences) {
+                 string = string.replace(/&gt;\u20D2/g, '&nvgt;').replace(/&lt;\u20D2/g, '&nvlt;').replace(/&#x66;&#x6A;/g, '&fjlig;');
+               } // Encode non-ASCII symbols.
+
+
+               if (useNamedReferences) {
+                 // Encode non-ASCII symbols that can be replaced with a named reference.
+                 string = string.replace(regexEncodeNonAscii, function (string) {
+                   // Note: there is no need to check `has(encodeMap, string)` here.
+                   return '&' + encodeMap[string] + ';';
+                 });
+               } // Note: any remaining non-ASCII symbols are handled outside of the `if`.
+
+             } else if (useNamedReferences) {
+               // Apply named character references.
+               // Encode `<>"'&` using named character references.
+               if (!allowUnsafeSymbols) {
+                 string = string.replace(regexEscape, function (string) {
+                   return '&' + encodeMap[string] + ';'; // no need to check `has()` here
+                 });
+               } // Shorten escapes that represent two symbols, of which at least one is
+               // `<>"'&`.
+
+
+               string = string.replace(/&gt;\u20D2/g, '&nvgt;').replace(/&lt;\u20D2/g, '&nvlt;'); // Encode non-ASCII symbols that can be replaced with a named reference.
+
+               string = string.replace(regexEncodeNonAscii, function (string) {
+                 // Note: there is no need to check `has(encodeMap, string)` here.
+                 return '&' + encodeMap[string] + ';';
+               });
+             } else if (!allowUnsafeSymbols) {
+               // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
+               // using named character references.
+               string = string.replace(regexEscape, escapeBmpSymbol);
+             }
+
+             return string // Encode astral symbols.
+             .replace(regexAstralSymbols, function ($0) {
+               // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+               var high = $0.charCodeAt(0);
+               var low = $0.charCodeAt(1);
+               var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
+               return escapeCodePoint(codePoint);
+             }) // Encode any remaining BMP symbols that are not printable ASCII symbols
+             // using a hexadecimal escape.
+             .replace(regexBmpWhitelist, escapeBmpSymbol);
+           }; // Expose default options (so they can be overridden globally).
+
+
+           encode.options = {
+             'allowUnsafeSymbols': false,
+             'encodeEverything': false,
+             'strict': false,
+             'useNamedReferences': false,
+             'decimal': false
+           };
+
+           var decode = function decode(html, options) {
+             options = merge(options, decode.options);
+             var strict = options.strict;
+
+             if (strict && regexInvalidEntity.test(html)) {
+               parseError('malformed character reference');
+             }
+
+             return html.replace(regexDecode, function ($0, $1, $2, $3, $4, $5, $6, $7, $8) {
+               var codePoint;
+               var semicolon;
+               var decDigits;
+               var hexDigits;
+               var reference;
+               var next;
+
+               if ($1) {
+                 reference = $1; // Note: there is no need to check `has(decodeMap, reference)`.
+
+                 return decodeMap[reference];
+               }
+
+               if ($2) {
+                 // Decode named character references without trailing `;`, e.g. `&amp`.
+                 // This is only a parse error if it gets converted to `&`, or if it is
+                 // followed by `=` in an attribute context.
+                 reference = $2;
+                 next = $3;
+
+                 if (next && options.isAttributeValue) {
+                   if (strict && next == '=') {
+                     parseError('`&` did not start a character reference');
+                   }
+
+                   return $0;
+                 } else {
+                   if (strict) {
+                     parseError('named character reference was not terminated by a semicolon');
+                   } // Note: there is no need to check `has(decodeMapLegacy, reference)`.
+
+
+                   return decodeMapLegacy[reference] + (next || '');
+                 }
+               }
+
+               if ($4) {
+                 // Decode decimal escapes, e.g. `&#119558;`.
+                 decDigits = $4;
+                 semicolon = $5;
+
+                 if (strict && !semicolon) {
+                   parseError('character reference was not terminated by a semicolon');
+                 }
+
+                 codePoint = parseInt(decDigits, 10);
+                 return codePointToSymbol(codePoint, strict);
+               }
+
+               if ($6) {
+                 // Decode hexadecimal escapes, e.g. `&#x1D306;`.
+                 hexDigits = $6;
+                 semicolon = $7;
+
+                 if (strict && !semicolon) {
+                   parseError('character reference was not terminated by a semicolon');
+                 }
+
+                 codePoint = parseInt(hexDigits, 16);
+                 return codePointToSymbol(codePoint, strict);
+               } // If we’re still here, `if ($7)` is implied; it’s an ambiguous
+               // ampersand for sure. https://mths.be/notes/ambiguous-ampersands
+
+
+               if (strict) {
+                 parseError('named character reference was not terminated by a semicolon');
+               }
+
+               return $0;
+             });
+           }; // Expose default options (so they can be overridden globally).
+
+
+           decode.options = {
+             'isAttributeValue': false,
+             'strict': false
+           };
+
+           var escape = function escape(string) {
+             return string.replace(regexEscape, function ($0) {
+               // Note: there is no need to check `has(escapeMap, $0)` here.
+               return escapeMap[$0];
+             });
+           };
+           /*--------------------------------------------------------------------------*/
+
+
+           var he = {
+             'version': '1.2.0',
+             'encode': encode,
+             'decode': decode,
+             'escape': escape,
+             'unescape': decode
+           }; // Some AMD build optimizers, like r.js, check for specific condition patterns
+           // like the following:
+
+           if (freeExports && !freeExports.nodeType) {
+             if (freeModule) {
+               // in Node.js, io.js, or RingoJS v0.8.0+
+               freeModule.exports = he;
+             } else {
+               // in Narwhal or RingoJS v0.7.0-
+               for (var key in he) {
+                 has(he, key) && (freeExports[key] = he[key]);
+               }
+             }
+           } else {
+             // in Rhino or a web browser
+             root.he = he;
+           }
+         })(commonjsGlobal);
+       });
+
+       var propertyIsEnumerable = objectPropertyIsEnumerable.f;
+
+       // `Object.{ entries, values }` methods implementation
+       var createMethod$5 = function (TO_ENTRIES) {
+         return function (it) {
+           var O = toIndexedObject(it);
+           var keys = objectKeys(O);
+           var length = keys.length;
+           var i = 0;
+           var result = [];
+           var key;
+           while (length > i) {
+             key = keys[i++];
+             if (!descriptors || propertyIsEnumerable.call(O, key)) {
+               result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
+             }
+           }
+           return result;
+         };
+       };
+
+       var objectToArray = {
+         // `Object.entries` method
+         // https://tc39.github.io/ecma262/#sec-object.entries
+         entries: createMethod$5(true),
+         // `Object.values` method
+         // https://tc39.github.io/ecma262/#sec-object.values
+         values: createMethod$5(false)
+       };
+
+       var $values = objectToArray.values;
+
+       // `Object.values` method
+       // https://tc39.github.io/ecma262/#sec-object.values
+       _export({ target: 'Object', stat: true }, {
+         values: function values(O) {
+           return $values(O);
+         }
+       });
+
+       var format$1 = util.format;
+       /**
+        * Contains error codes, factory functions to create throwable error objects,
+        * and warning/deprecation functions.
+        * @module
+        */
+
+       /**
+        * process.emitWarning or a polyfill
+        * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options
+        * @ignore
+        */
+
+       var emitWarning$1 = function emitWarning(msg, type) {
+         if (process$1.emitWarning) {
+           process$1.emitWarning(msg, type);
+         } else {
+           nextTick(function () {
+             console.warn(type + ': ' + msg);
+           });
+         }
+       };
+       /**
+        * Show a deprecation warning. Each distinct message is only displayed once.
+        * Ignores empty messages.
+        *
+        * @param {string} [msg] - Warning to print
+        * @private
+        */
+
+
+       var deprecate$1 = function deprecate(msg) {
+         msg = String(msg);
+
+         if (msg && !deprecate.cache[msg]) {
+           deprecate.cache[msg] = true;
+           emitWarning$1(msg, 'DeprecationWarning');
+         }
+       };
+
+       deprecate$1.cache = {};
+       /**
+        * Show a generic warning.
+        * Ignores empty messages.
+        *
+        * @param {string} [msg] - Warning to print
+        * @private
+        */
+
+       var warn = function warn(msg) {
+         if (msg) {
+           emitWarning$1(msg);
+         }
+       };
+       /**
+        * When Mocha throw exceptions (or otherwise errors), it attempts to assign a
+        * `code` property to the `Error` object, for easier handling.  These are the
+        * potential values of `code`.
+        */
+
+
+       var constants = {
+         /**
+          * An unrecoverable error.
+          */
+         FATAL: 'ERR_MOCHA_FATAL',
+
+         /**
+          * The type of an argument to a function call is invalid
+          */
+         INVALID_ARG_TYPE: 'ERR_MOCHA_INVALID_ARG_TYPE',
+
+         /**
+          * The value of an argument to a function call is invalid
+          */
+         INVALID_ARG_VALUE: 'ERR_MOCHA_INVALID_ARG_VALUE',
+
+         /**
+          * Something was thrown, but it wasn't an `Error`
+          */
+         INVALID_EXCEPTION: 'ERR_MOCHA_INVALID_EXCEPTION',
+
+         /**
+          * An interface (e.g., `Mocha.interfaces`) is unknown or invalid
+          */
+         INVALID_INTERFACE: 'ERR_MOCHA_INVALID_INTERFACE',
+
+         /**
+          * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid
+          */
+         INVALID_REPORTER: 'ERR_MOCHA_INVALID_REPORTER',
+
+         /**
+          * `done()` was called twice in a `Test` or `Hook` callback
+          */
+         MULTIPLE_DONE: 'ERR_MOCHA_MULTIPLE_DONE',
+
+         /**
+          * No files matched the pattern provided by the user
+          */
+         NO_FILES_MATCH_PATTERN: 'ERR_MOCHA_NO_FILES_MATCH_PATTERN',
+
+         /**
+          * Known, but unsupported behavior of some kind
+          */
+         UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED',
+
+         /**
+          * Invalid state transition occurring in `Mocha` instance
+          */
+         INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING',
+
+         /**
+          * Invalid state transition occurring in `Mocha` instance
+          */
+         INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED',
+
+         /**
+          * Use of `only()` w/ `--forbid-only` results in this error.
+          */
+         FORBIDDEN_EXCLUSIVITY: 'ERR_MOCHA_FORBIDDEN_EXCLUSIVITY',
+
+         /**
+          * To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid
+          */
+         INVALID_PLUGIN_IMPLEMENTATION: 'ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION',
+
+         /**
+          * To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid
+          */
+         INVALID_PLUGIN_DEFINITION: 'ERR_MOCHA_INVALID_PLUGIN_DEFINITION'
+       };
+       var MOCHA_ERRORS = new Set(Object.values(constants));
+       /**
+        * Creates an error object to be thrown when no files to be tested could be found using specified pattern.
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @param {string} pattern - User-specified argument value.
+        * @returns {Error} instance detailing the error condition
+        */
+
+       function createNoFilesMatchPatternError(message, pattern) {
+         var err = new Error(message);
+         err.code = constants.NO_FILES_MATCH_PATTERN;
+         err.pattern = pattern;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when the reporter specified in the options was not found.
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @param {string} reporter - User-specified reporter value.
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createInvalidReporterError(message, reporter) {
+         var err = new TypeError(message);
+         err.code = constants.INVALID_REPORTER;
+         err.reporter = reporter;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when the interface specified in the options was not found.
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @param {string} ui - User-specified interface value.
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createInvalidInterfaceError(message, ui) {
+         var err = new Error(message);
+         err.code = constants.INVALID_INTERFACE;
+         err["interface"] = ui;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when a behavior, option, or parameter is unsupported.
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createUnsupportedError(message) {
+         var err = new Error(message);
+         err.code = constants.UNSUPPORTED;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when an argument is missing.
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @param {string} argument - Argument name.
+        * @param {string} expected - Expected argument datatype.
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createMissingArgumentError(message, argument, expected) {
+         return createInvalidArgumentTypeError(message, argument, expected);
+       }
+       /**
+        * Creates an error object to be thrown when an argument did not use the supported type
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @param {string} argument - Argument name.
+        * @param {string} expected - Expected argument datatype.
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createInvalidArgumentTypeError(message, argument, expected) {
+         var err = new TypeError(message);
+         err.code = constants.INVALID_ARG_TYPE;
+         err.argument = argument;
+         err.expected = expected;
+         err.actual = _typeof(argument);
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when an argument did not use the supported value
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @param {string} argument - Argument name.
+        * @param {string} value - Argument value.
+        * @param {string} [reason] - Why value is invalid.
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createInvalidArgumentValueError(message, argument, value, reason) {
+         var err = new TypeError(message);
+         err.code = constants.INVALID_ARG_VALUE;
+         err.argument = argument;
+         err.value = value;
+         err.reason = typeof reason !== 'undefined' ? reason : 'is invalid';
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined.
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createInvalidExceptionError(message, value) {
+         var err = new Error(message);
+         err.code = constants.INVALID_EXCEPTION;
+         err.valueType = _typeof(value);
+         err.value = value;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when an unrecoverable error occurs.
+        *
+        * @public
+        * @param {string} message - Error message to be displayed.
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createFatalError(message, value) {
+         var err = new Error(message);
+         err.code = constants.FATAL;
+         err.valueType = _typeof(value);
+         err.value = value;
+         return err;
+       }
+       /**
+        * Dynamically creates a plugin-type-specific error based on plugin type
+        * @param {string} message - Error message
+        * @param {"reporter"|"interface"} pluginType - Plugin type. Future: expand as needed
+        * @param {string} [pluginId] - Name/path of plugin, if any
+        * @throws When `pluginType` is not known
+        * @public
+        * @returns {Error}
+        */
+
+
+       function createInvalidLegacyPluginError(message, pluginType, pluginId) {
+         switch (pluginType) {
+           case 'reporter':
+             return createInvalidReporterError(message, pluginId);
+
+           case 'interface':
+             return createInvalidInterfaceError(message, pluginId);
+
+           default:
+             throw new Error('unknown pluginType "' + pluginType + '"');
+         }
+       }
+       /**
+        * **DEPRECATED**.  Use {@link createInvalidLegacyPluginError} instead  Dynamically creates a plugin-type-specific error based on plugin type
+        * @deprecated
+        * @param {string} message - Error message
+        * @param {"reporter"|"interface"} pluginType - Plugin type. Future: expand as needed
+        * @param {string} [pluginId] - Name/path of plugin, if any
+        * @throws When `pluginType` is not known
+        * @public
+        * @returns {Error}
+        */
+
+
+       function createInvalidPluginError() {
+         deprecate$1('Use createInvalidLegacyPluginError() instead');
+         return createInvalidLegacyPluginError.apply(void 0, arguments);
+       }
+       /**
+        * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed.
+        * @param {string} message The error message to be displayed.
+        * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun`
+        * @param {Mocha} instance the mocha instance that throw this error
+        */
+
+
+       function createMochaInstanceAlreadyDisposedError(message, cleanReferencesAfterRun, instance) {
+         var err = new Error(message);
+         err.code = constants.INSTANCE_ALREADY_DISPOSED;
+         err.cleanReferencesAfterRun = cleanReferencesAfterRun;
+         err.instance = instance;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress.
+        * @param {string} message The error message to be displayed.
+        */
+
+
+       function createMochaInstanceAlreadyRunningError(message, instance) {
+         var err = new Error(message);
+         err.code = constants.INSTANCE_ALREADY_RUNNING;
+         err.instance = instance;
+         return err;
+       }
+       /*
+        * Creates an error object to be thrown when done() is called multiple times in a test
+        *
+        * @public
+        * @param {Runnable} runnable - Original runnable
+        * @param {Error} [originalErr] - Original error, if any
+        * @returns {Error} instance detailing the error condition
+        */
+
+
+       function createMultipleDoneError(runnable, originalErr) {
+         var title;
+
+         try {
+           title = format$1('<%s>', runnable.fullTitle());
+
+           if (runnable.parent.root) {
+             title += ' (of root suite)';
+           }
+         } catch (ignored) {
+           title = format$1('<%s> (of unknown suite)', runnable.title);
+         }
+
+         var message = format$1('done() called multiple times in %s %s', runnable.type ? runnable.type : 'unknown runnable', title);
+
+         if (runnable.file) {
+           message += format$1(' of file %s', runnable.file);
+         }
+
+         if (originalErr) {
+           message += format$1('; in addition, done() received error: %s', originalErr);
+         }
+
+         var err = new Error(message);
+         err.code = constants.MULTIPLE_DONE;
+         err.valueType = _typeof(originalErr);
+         err.value = originalErr;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when `.only()` is used with
+        * `--forbid-only`.
+        * @public
+        * @param {Mocha} mocha - Mocha instance
+        * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY}
+        */
+
+
+       function createForbiddenExclusivityError(mocha) {
+         var err = new Error(mocha.isWorker ? '`.only` is not supported in parallel mode' : '`.only` forbidden by --forbid-only');
+         err.code = constants.FORBIDDEN_EXCLUSIVITY;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when a plugin definition is invalid
+        * @param {string} msg - Error message
+        * @param {PluginDefinition} [pluginDef] - Problematic plugin definition
+        * @public
+        * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}
+        */
+
+
+       function createInvalidPluginDefinitionError(msg, pluginDef) {
+         var err = new Error(msg);
+         err.code = constants.INVALID_PLUGIN_DEFINITION;
+         err.pluginDef = pluginDef;
+         return err;
+       }
+       /**
+        * Creates an error object to be thrown when a plugin implementation (user code) is invalid
+        * @param {string} msg - Error message
+        * @param {Object} [opts] - Plugin definition and user-supplied implementation
+        * @param {PluginDefinition} [opts.pluginDef] - Plugin Definition
+        * @param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied)
+        * @public
+        * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}
+        */
+
+
+       function createInvalidPluginImplementationError(msg) {
+         var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+             pluginDef = _ref.pluginDef,
+             pluginImpl = _ref.pluginImpl;
+
+         var err = new Error(msg);
+         err.code = constants.INVALID_PLUGIN_IMPLEMENTATION;
+         err.pluginDef = pluginDef;
+         err.pluginImpl = pluginImpl;
+         return err;
+       }
+       /**
+        * Returns `true` if an error came out of Mocha.
+        * _Can suffer from false negatives, but not false positives._
+        * @public
+        * @param {*} err - Error, or anything
+        * @returns {boolean}
+        */
+
+
+       var isMochaError = function isMochaError(err) {
+         return Boolean(err && _typeof(err) === 'object' && MOCHA_ERRORS.has(err.code));
+       };
+
+       var errors = {
+         constants: constants,
+         createFatalError: createFatalError,
+         createForbiddenExclusivityError: createForbiddenExclusivityError,
+         createInvalidArgumentTypeError: createInvalidArgumentTypeError,
+         createInvalidArgumentValueError: createInvalidArgumentValueError,
+         createInvalidExceptionError: createInvalidExceptionError,
+         createInvalidInterfaceError: createInvalidInterfaceError,
+         createInvalidLegacyPluginError: createInvalidLegacyPluginError,
+         createInvalidPluginDefinitionError: createInvalidPluginDefinitionError,
+         createInvalidPluginError: createInvalidPluginError,
+         createInvalidPluginImplementationError: createInvalidPluginImplementationError,
+         createInvalidReporterError: createInvalidReporterError,
+         createMissingArgumentError: createMissingArgumentError,
+         createMochaInstanceAlreadyDisposedError: createMochaInstanceAlreadyDisposedError,
+         createMochaInstanceAlreadyRunningError: createMochaInstanceAlreadyRunningError,
+         createMultipleDoneError: createMultipleDoneError,
+         createNoFilesMatchPatternError: createNoFilesMatchPatternError,
+         createUnsupportedError: createUnsupportedError,
+         deprecate: deprecate$1,
+         isMochaError: isMochaError,
+         warn: warn
+       };
+
+       var _nodeResolve_empty = {};
+
+       var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
+               __proto__: null,
+               'default': _nodeResolve_empty
+       });
+
+       var require$$11 = getCjsExportFromNamespace(_nodeResolve_empty$1);
+
+       var utils = createCommonjsModule(function (module, exports) {
+         /**
+          * Various utility functions used throughout Mocha's codebase.
+          * @module utils
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var nanoid = nonSecure.nanoid;
+         var MOCHA_ID_PROP_NAME = '__mocha_id__';
+         /**
+          * Inherit the prototype methods from one constructor into another.
+          *
+          * @param {function} ctor - Constructor function which needs to inherit the
+          *     prototype.
+          * @param {function} superCtor - Constructor function to inherit prototype from.
+          * @throws {TypeError} if either constructor is null, or if super constructor
+          *     lacks a prototype.
+          */
+
+         exports.inherits = util.inherits;
+         /**
+          * Escape special characters in the given string of html.
+          *
+          * @private
+          * @param  {string} html
+          * @return {string}
+          */
+
+         exports.escape = function (html) {
+           return he.encode(String(html), {
+             useNamedReferences: false
+           });
+         };
+         /**
+          * Test if the given obj is type of string.
+          *
+          * @private
+          * @param {Object} obj
+          * @return {boolean}
+          */
+
+
+         exports.isString = function (obj) {
+           return typeof obj === 'string';
+         };
+         /**
+          * Compute a slug from the given `str`.
+          *
+          * @private
+          * @param {string} str
+          * @return {string}
+          */
+
+
+         exports.slug = function (str) {
+           return str.toLowerCase().replace(/\s+/g, '-').replace(/[^-\w]/g, '').replace(/-{2,}/g, '-');
+         };
+         /**
+          * Strip the function definition from `str`, and re-indent for pre whitespace.
+          *
+          * @param {string} str
+          * @return {string}
+          */
+
+
+         exports.clean = function (str) {
+           str = str.replace(/\r\n?|[\n\u2028\u2029]/g, '\n').replace(/^\uFEFF/, '') // (traditional)->  space/name     parameters    body     (lambda)-> parameters       body   multi-statement/single          keep body content
+           .replace(/^function(?:\s*|\s+[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\s*\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\s*\}|((?:.|\n)*))$/, '$1$2$3');
+           var spaces = str.match(/^\n?( *)/)[1].length;
+           var tabs = str.match(/^\n?(\t*)/)[1].length;
+           var re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs || spaces) + '}', 'gm');
+           str = str.replace(re, '');
+           return str.trim();
+         };
+         /**
+          * If a value could have properties, and has none, this function is called,
+          * which returns a string representation of the empty value.
+          *
+          * Functions w/ no properties return `'[Function]'`
+          * Arrays w/ length === 0 return `'[]'`
+          * Objects w/ no properties return `'{}'`
+          * All else: return result of `value.toString()`
+          *
+          * @private
+          * @param {*} value The value to inspect.
+          * @param {string} typeHint The type of the value
+          * @returns {string}
+          */
+
+
+         function emptyRepresentation(value, typeHint) {
+           switch (typeHint) {
+             case 'function':
+               return '[Function]';
+
+             case 'object':
+               return '{}';
+
+             case 'array':
+               return '[]';
+
+             default:
+               return value.toString();
+           }
+         }
+         /**
+          * Takes some variable and asks `Object.prototype.toString()` what it thinks it
+          * is.
+          *
+          * @private
+          * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString
+          * @param {*} value The value to test.
+          * @returns {string} Computed type
+          * @example
+          * canonicalType({}) // 'object'
+          * canonicalType([]) // 'array'
+          * canonicalType(1) // 'number'
+          * canonicalType(false) // 'boolean'
+          * canonicalType(Infinity) // 'number'
+          * canonicalType(null) // 'null'
+          * canonicalType(new Date()) // 'date'
+          * canonicalType(/foo/) // 'regexp'
+          * canonicalType('type') // 'string'
+          * canonicalType(global) // 'global'
+          * canonicalType(new String('foo') // 'object'
+          * canonicalType(async function() {}) // 'asyncfunction'
+          * canonicalType(await import(name)) // 'module'
+          */
+
+
+         var canonicalType = exports.canonicalType = function canonicalType(value) {
+           if (value === undefined) {
+             return 'undefined';
+           } else if (value === null) {
+             return 'null';
+           } else if (isBuffer(value)) {
+             return 'buffer';
+           }
+
+           return Object.prototype.toString.call(value).replace(/^\[.+\s(.+?)]$/, '$1').toLowerCase();
+         };
+         /**
+          *
+          * Returns a general type or data structure of a variable
+          * @private
+          * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures
+          * @param {*} value The value to test.
+          * @returns {string} One of undefined, boolean, number, string, bigint, symbol, object
+          * @example
+          * type({}) // 'object'
+          * type([]) // 'array'
+          * type(1) // 'number'
+          * type(false) // 'boolean'
+          * type(Infinity) // 'number'
+          * type(null) // 'null'
+          * type(new Date()) // 'object'
+          * type(/foo/) // 'object'
+          * type('type') // 'string'
+          * type(global) // 'object'
+          * type(new String('foo') // 'string'
+          */
+
+
+         exports.type = function type(value) {
+           // Null is special
+           if (value === null) return 'null';
+           var primitives = new Set(['undefined', 'boolean', 'number', 'string', 'bigint', 'symbol']);
+
+           var _type = _typeof(value);
+
+           if (_type === 'function') return _type;
+           if (primitives.has(_type)) return _type;
+           if (value instanceof String) return 'string';
+           if (value instanceof Error) return 'error';
+           if (Array.isArray(value)) return 'array';
+           return _type;
+         };
+         /**
+          * Stringify `value`. Different behavior depending on type of value:
+          *
+          * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively.
+          * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes.
+          * - If `value` is an *empty* object, function, or array, return result of function
+          *   {@link emptyRepresentation}.
+          * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of
+          *   JSON.stringify().
+          *
+          * @private
+          * @see exports.type
+          * @param {*} value
+          * @return {string}
+          */
+
+
+         exports.stringify = function (value) {
+           var typeHint = canonicalType(value);
+
+           if (!~['object', 'array', 'function'].indexOf(typeHint)) {
+             if (typeHint === 'buffer') {
+               var json = Buffer.prototype.toJSON.call(value); // Based on the toJSON result
+
+               return jsonStringify(json.data && json.type ? json.data : json, 2).replace(/,(\n|$)/g, '$1');
+             } // IE7/IE8 has a bizarre String constructor; needs to be coerced
+             // into an array and back to obj.
+
+
+             if (typeHint === 'string' && _typeof(value) === 'object') {
+               value = value.split('').reduce(function (acc, _char, idx) {
+                 acc[idx] = _char;
+                 return acc;
+               }, {});
+               typeHint = 'object';
+             } else {
+               return jsonStringify(value);
+             }
+           }
+
+           for (var prop in value) {
+             if (Object.prototype.hasOwnProperty.call(value, prop)) {
+               return jsonStringify(exports.canonicalize(value, null, typeHint), 2).replace(/,(\n|$)/g, '$1');
+             }
+           }
+
+           return emptyRepresentation(value, typeHint);
+         };
+         /**
+          * like JSON.stringify but more sense.
+          *
+          * @private
+          * @param {Object}  object
+          * @param {number=} spaces
+          * @param {number=} depth
+          * @returns {*}
+          */
+
+
+         function jsonStringify(object, spaces, depth) {
+           if (typeof spaces === 'undefined') {
+             // primitive types
+             return _stringify(object);
+           }
+
+           depth = depth || 1;
+           var space = spaces * depth;
+           var str = Array.isArray(object) ? '[' : '{';
+           var end = Array.isArray(object) ? ']' : '}';
+           var length = typeof object.length === 'number' ? object.length : Object.keys(object).length; // `.repeat()` polyfill
+
+           function repeat(s, n) {
+             return new Array(n).join(s);
+           }
+
+           function _stringify(val) {
+             switch (canonicalType(val)) {
+               case 'null':
+               case 'undefined':
+                 val = '[' + val + ']';
+                 break;
+
+               case 'array':
+               case 'object':
+                 val = jsonStringify(val, spaces, depth + 1);
+                 break;
+
+               case 'boolean':
+               case 'regexp':
+               case 'symbol':
+               case 'number':
+                 val = val === 0 && 1 / val === -Infinity // `-0`
+                 ? '-0' : val.toString();
+                 break;
+
+               case 'date':
+                 var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString();
+                 val = '[Date: ' + sDate + ']';
+                 break;
+
+               case 'buffer':
+                 var json = val.toJSON(); // Based on the toJSON result
+
+                 json = json.data && json.type ? json.data : json;
+                 val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';
+                 break;
+
+               default:
+                 val = val === '[Function]' || val === '[Circular]' ? val : JSON.stringify(val);
+               // string
+             }
+
+             return val;
+           }
+
+           for (var i in object) {
+             if (!Object.prototype.hasOwnProperty.call(object, i)) {
+               continue; // not my business
+             }
+
+             --length;
+             str += '\n ' + repeat(' ', space) + (Array.isArray(object) ? '' : '"' + i + '": ') + // key
+             _stringify(object[i]) + ( // value
+             length ? ',' : ''); // comma
+           }
+
+           return str + ( // [], {}
+           str.length !== 1 ? '\n' + repeat(' ', --space) + end : end);
+         }
+         /**
+          * Return a new Thing that has the keys in sorted order. Recursive.
+          *
+          * If the Thing...
+          * - has already been seen, return string `'[Circular]'`
+          * - is `undefined`, return string `'[undefined]'`
+          * - is `null`, return value `null`
+          * - is some other primitive, return the value
+          * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method
+          * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again.
+          * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()`
+          *
+          * @private
+          * @see {@link exports.stringify}
+          * @param {*} value Thing to inspect.  May or may not have properties.
+          * @param {Array} [stack=[]] Stack of seen values
+          * @param {string} [typeHint] Type hint
+          * @return {(Object|Array|Function|string|undefined)}
+          */
+
+
+         exports.canonicalize = function canonicalize(value, stack, typeHint) {
+           var canonicalizedObj;
+           /* eslint-disable no-unused-vars */
+
+           var prop;
+           /* eslint-enable no-unused-vars */
+
+           typeHint = typeHint || canonicalType(value);
+
+           function withStack(value, fn) {
+             stack.push(value);
+             fn();
+             stack.pop();
+           }
+
+           stack = stack || [];
+
+           if (stack.indexOf(value) !== -1) {
+             return '[Circular]';
+           }
+
+           switch (typeHint) {
+             case 'undefined':
+             case 'buffer':
+             case 'null':
+               canonicalizedObj = value;
+               break;
+
+             case 'array':
+               withStack(value, function () {
+                 canonicalizedObj = value.map(function (item) {
+                   return exports.canonicalize(item, stack);
+                 });
+               });
+               break;
+
+             case 'function':
+               /* eslint-disable-next-line no-unused-vars */
+               for (prop in value) {
+                 canonicalizedObj = {};
+                 break;
+               }
+               /* eslint-enable guard-for-in */
+
+
+               if (!canonicalizedObj) {
+                 canonicalizedObj = emptyRepresentation(value, typeHint);
+                 break;
+               }
+
+             /* falls through */
+
+             case 'object':
+               canonicalizedObj = canonicalizedObj || {};
+               withStack(value, function () {
+                 Object.keys(value).sort().forEach(function (key) {
+                   canonicalizedObj[key] = exports.canonicalize(value[key], stack);
+                 });
+               });
+               break;
+
+             case 'date':
+             case 'number':
+             case 'regexp':
+             case 'boolean':
+             case 'symbol':
+               canonicalizedObj = value;
+               break;
+
+             default:
+               canonicalizedObj = value + '';
+           }
+
+           return canonicalizedObj;
+         };
+         /**
+          * @summary
+          * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`)
+          * @description
+          * When invoking this function you get a filter function that get the Error.stack as an input,
+          * and return a prettify output.
+          * (i.e: strip Mocha and internal node functions from stack trace).
+          * @returns {Function}
+          */
+
+
+         exports.stackTraceFilter = function () {
+           // TODO: Replace with `process.browser`
+           var is = typeof document === 'undefined' ? {
+             node: true
+           } : {
+             browser: true
+           };
+           var slash = path$1.sep;
+           var cwd;
+
+           if (is.node) {
+             cwd = exports.cwd() + slash;
+           } else {
+             cwd = (typeof location === 'undefined' ? window.location : location).href.replace(/\/[^/]*$/, '/');
+             slash = '/';
+           }
+
+           function isMochaInternal(line) {
+             return ~line.indexOf('node_modules' + slash + 'mocha' + slash) || ~line.indexOf(slash + 'mocha.js') || ~line.indexOf(slash + 'mocha.min.js');
+           }
+
+           function isNodeInternal(line) {
+             return ~line.indexOf('(timers.js:') || ~line.indexOf('(events.js:') || ~line.indexOf('(node.js:') || ~line.indexOf('(module.js:') || ~line.indexOf('GeneratorFunctionPrototype.next (native)') || false;
+           }
+
+           return function (stack) {
+             stack = stack.split('\n');
+             stack = stack.reduce(function (list, line) {
+               if (isMochaInternal(line)) {
+                 return list;
+               }
+
+               if (is.node && isNodeInternal(line)) {
+                 return list;
+               } // Clean up cwd(absolute)
+
+
+               if (/:\d+:\d+\)?$/.test(line)) {
+                 line = line.replace('(' + cwd, '(');
+               }
+
+               list.push(line);
+               return list;
+             }, []);
+             return stack.join('\n');
+           };
+         };
+         /**
+          * Crude, but effective.
+          * @public
+          * @param {*} value
+          * @returns {boolean} Whether or not `value` is a Promise
+          */
+
+
+         exports.isPromise = function isPromise(value) {
+           return _typeof(value) === 'object' && value !== null && typeof value.then === 'function';
+         };
+         /**
+          * Clamps a numeric value to an inclusive range.
+          *
+          * @param {number} value - Value to be clamped.
+          * @param {number[]} range - Two element array specifying [min, max] range.
+          * @returns {number} clamped value
+          */
+
+
+         exports.clamp = function clamp(value, range) {
+           return Math.min(Math.max(value, range[0]), range[1]);
+         };
+         /**
+          * Single quote text by combining with undirectional ASCII quotation marks.
+          *
+          * @description
+          * Provides a simple means of markup for quoting text to be used in output.
+          * Use this to quote names of variables, methods, and packages.
+          *
+          * <samp>package 'foo' cannot be found</samp>
+          *
+          * @private
+          * @param {string} str - Value to be quoted.
+          * @returns {string} quoted value
+          * @example
+          * sQuote('n') // => 'n'
+          */
+
+
+         exports.sQuote = function (str) {
+           return "'" + str + "'";
+         };
+         /**
+          * Double quote text by combining with undirectional ASCII quotation marks.
+          *
+          * @description
+          * Provides a simple means of markup for quoting text to be used in output.
+          * Use this to quote names of datatypes, classes, pathnames, and strings.
+          *
+          * <samp>argument 'value' must be "string" or "number"</samp>
+          *
+          * @private
+          * @param {string} str - Value to be quoted.
+          * @returns {string} quoted value
+          * @example
+          * dQuote('number') // => "number"
+          */
+
+
+         exports.dQuote = function (str) {
+           return '"' + str + '"';
+         };
+         /**
+          * It's a noop.
+          * @public
+          */
+
+
+         exports.noop = function () {};
+         /**
+          * Creates a map-like object.
+          *
+          * @description
+          * A "map" is an object with no prototype, for our purposes. In some cases
+          * this would be more appropriate than a `Map`, especially if your environment
+          * doesn't support it. Recommended for use in Mocha's public APIs.
+          *
+          * @public
+          * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Custom_and_Null_objects|MDN:Map}
+          * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects}
+          * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Custom_and_Null_objects|MDN:Object.assign}
+          * @param {...*} [obj] - Arguments to `Object.assign()`.
+          * @returns {Object} An object with no prototype, having `...obj` properties
+          */
+
+
+         exports.createMap = function (obj) {
+           return Object.assign.apply(null, [Object.create(null)].concat(Array.prototype.slice.call(arguments)));
+         };
+         /**
+          * Creates a read-only map-like object.
+          *
+          * @description
+          * This differs from {@link module:utils.createMap createMap} only in that
+          * the argument must be non-empty, because the result is frozen.
+          *
+          * @see {@link module:utils.createMap createMap}
+          * @param {...*} [obj] - Arguments to `Object.assign()`.
+          * @returns {Object} A frozen object with no prototype, having `...obj` properties
+          * @throws {TypeError} if argument is not a non-empty object.
+          */
+
+
+         exports.defineConstants = function (obj) {
+           if (canonicalType(obj) !== 'object' || !Object.keys(obj).length) {
+             throw new TypeError('Invalid argument; expected a non-empty object');
+           }
+
+           return Object.freeze(exports.createMap(obj));
+         };
+         /**
+          * Whether current version of Node support ES modules
+          *
+          * @description
+          * Versions prior to 10 did not support ES Modules, and version 10 has an old incompatible version of ESM.
+          * This function returns whether Node.JS has ES Module supports that is compatible with Mocha's needs,
+          * which is version >=12.11.
+          *
+          * @param {partialSupport} whether the full Node.js ESM support is available (>= 12) or just something that supports the runtime (>= 10)
+          *
+          * @returns {Boolean} whether the current version of Node.JS supports ES Modules in a way that is compatible with Mocha
+          */
+
+
+         exports.supportsEsModules = function (partialSupport) {
+           if (!exports.isBrowser() && process$1.versions && process$1.versions.node) {
+             var versionFields = process$1.versions.node.split('.');
+             var major = +versionFields[0];
+             var minor = +versionFields[1];
+
+             if (!partialSupport) {
+               return major >= 13 || major === 12 && minor >= 11;
+             } else {
+               return major >= 10;
+             }
+           }
+         };
+         /**
+          * Returns current working directory
+          *
+          * Wrapper around `process.cwd()` for isolation
+          * @private
+          */
+
+
+         exports.cwd = function cwd() {
+           return process$1.cwd();
+         };
+         /**
+          * Returns `true` if Mocha is running in a browser.
+          * Checks for `process.browser`.
+          * @returns {boolean}
+          * @private
+          */
+
+
+         exports.isBrowser = function isBrowser() {
+           return Boolean(browser$1);
+         };
+         /**
+          * Lookup file names at the given `path`.
+          *
+          * @description
+          * Filenames are returned in _traversal_ order by the OS/filesystem.
+          * **Make no assumption that the names will be sorted in any fashion.**
+          *
+          * @public
+          * @alias module:lib/cli.lookupFiles
+          * @param {string} filepath - Base path to start searching from.
+          * @param {string[]} [extensions=[]] - File extensions to look for.
+          * @param {boolean} [recursive=false] - Whether to recurse into subdirectories.
+          * @return {string[]} An array of paths.
+          * @throws {Error} if no files match pattern.
+          * @throws {TypeError} if `filepath` is directory and `extensions` not provided.
+          * @deprecated Moved to {@link module:lib/cli.lookupFiles}
+          */
+
+
+         exports.lookupFiles = function () {
+           if (exports.isBrowser()) {
+             throw errors.createUnsupportedError('lookupFiles() is only supported in Node.js!');
+           }
+
+           errors.deprecate('`lookupFiles()` in module `mocha/lib/utils` has moved to module `mocha/lib/cli` and will be removed in the next major revision of Mocha');
+           return require$$11.lookupFiles.apply(require$$11, arguments);
+         };
+         /*
+          * Casts `value` to an array; useful for optionally accepting array parameters
+          *
+          * It follows these rules, depending on `value`.  If `value` is...
+          * 1. `undefined`: return an empty Array
+          * 2. `null`: return an array with a single `null` element
+          * 3. Any other object: return the value of `Array.from()` _if_ the object is iterable
+          * 4. otherwise: return an array with a single element, `value`
+          * @param {*} value - Something to cast to an Array
+          * @returns {Array<*>}
+          */
+
+
+         exports.castArray = function castArray(value) {
+           if (value === undefined) {
+             return [];
+           }
+
+           if (value === null) {
+             return [null];
+           }
+
+           if (_typeof(value) === 'object' && (typeof value[Symbol.iterator] === 'function' || value.length !== undefined)) {
+             return Array.from(value);
+           }
+
+           return [value];
+         };
+
+         exports.constants = exports.defineConstants({
+           MOCHA_ID_PROP_NAME: MOCHA_ID_PROP_NAME
+         });
+         /**
+          * Creates a new unique identifier
+          * @returns {string} Unique identifier
+          */
+
+         exports.uniqueID = function () {
+           return nanoid();
+         };
+
+         exports.assignNewMochaID = function (obj) {
+           var id = exports.uniqueID();
+           Object.defineProperty(obj, MOCHA_ID_PROP_NAME, {
+             get: function get() {
+               return id;
+             }
+           });
+           return obj;
+         };
+         /**
+          * Retrieves a Mocha ID from an object, if present.
+          * @param {*} [obj] - Object
+          * @returns {string|void}
+          */
+
+
+         exports.getMochaID = function (obj) {
+           return obj && _typeof(obj) === 'object' ? obj[MOCHA_ID_PROP_NAME] : undefined;
+         };
+       });
+
+       // `Map` constructor
+       // https://tc39.github.io/ecma262/#sec-map-objects
+       var es_map = collection('Map', function (init) {
+         return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
+       }, collectionStrong);
+
+       /**
+        @module Pending
+       */
+
+       var pending = Pending;
+       /**
+        * Initialize a new `Pending` error with the given message.
+        *
+        * @param {string} message
+        */
+
+       function Pending(message) {
+         this.message = message;
+       }
+
+       /**
+        * This is the common logic for both the Node.js and web browser
+        * implementations of `debug()`.
+        */
+
+       function setup(env) {
+         createDebug.debug = createDebug;
+         createDebug["default"] = createDebug;
+         createDebug.coerce = coerce;
+         createDebug.disable = disable;
+         createDebug.enable = enable;
+         createDebug.enabled = enabled;
+         createDebug.humanize = ms;
+         Object.keys(env).forEach(function (key) {
+           createDebug[key] = env[key];
+         });
+         /**
+         * Active `debug` instances.
+         */
+
+         createDebug.instances = [];
+         /**
+         * The currently active debug mode names, and names to skip.
+         */
+
+         createDebug.names = [];
+         createDebug.skips = [];
+         /**
+         * Map of special "%n" handling functions, for the debug "format" argument.
+         *
+         * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+         */
+
+         createDebug.formatters = {};
+         /**
+         * Selects a color for a debug namespace
+         * @param {String} namespace The namespace string for the for the debug instance to be colored
+         * @return {Number|String} An ANSI color code for the given namespace
+         * @api private
+         */
+
+         function selectColor(namespace) {
+           var hash = 0;
+
+           for (var i = 0; i < namespace.length; i++) {
+             hash = (hash << 5) - hash + namespace.charCodeAt(i);
+             hash |= 0; // Convert to 32bit integer
+           }
+
+           return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+         }
+
+         createDebug.selectColor = selectColor;
+         /**
+         * Create a debugger with the given `namespace`.
+         *
+         * @param {String} namespace
+         * @return {Function}
+         * @api public
+         */
+
+         function createDebug(namespace) {
+           var prevTime;
+
+           function debug() {
+             for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+               args[_key] = arguments[_key];
+             }
+
+             // Disabled?
+             if (!debug.enabled) {
+               return;
+             }
+
+             var self = debug; // Set `diff` timestamp
+
+             var curr = Number(new Date());
+             var ms = curr - (prevTime || curr);
+             self.diff = ms;
+             self.prev = prevTime;
+             self.curr = curr;
+             prevTime = curr;
+             args[0] = createDebug.coerce(args[0]);
+
+             if (typeof args[0] !== 'string') {
+               // Anything else let's inspect with %O
+               args.unshift('%O');
+             } // Apply any `formatters` transformations
+
+
+             var index = 0;
+             args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
+               // If we encounter an escaped % then don't increase the array index
+               if (match === '%%') {
+                 return match;
+               }
+
+               index++;
+               var formatter = createDebug.formatters[format];
+
+               if (typeof formatter === 'function') {
+                 var val = args[index];
+                 match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
+
+                 args.splice(index, 1);
+                 index--;
+               }
+
+               return match;
+             }); // Apply env-specific formatting (colors, etc.)
+
+             createDebug.formatArgs.call(self, args);
+             var logFn = self.log || createDebug.log;
+             logFn.apply(self, args);
+           }
+
+           debug.namespace = namespace;
+           debug.enabled = createDebug.enabled(namespace);
+           debug.useColors = createDebug.useColors();
+           debug.color = createDebug.selectColor(namespace);
+           debug.destroy = destroy;
+           debug.extend = extend; // Env-specific initialization logic for debug instances
+
+           if (typeof createDebug.init === 'function') {
+             createDebug.init(debug);
+           }
+
+           createDebug.instances.push(debug);
+           return debug;
+         }
+
+         function destroy() {
+           var index = createDebug.instances.indexOf(this);
+
+           if (index !== -1) {
+             createDebug.instances.splice(index, 1);
+             return true;
+           }
+
+           return false;
+         }
+
+         function extend(namespace, delimiter) {
+           var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+           newDebug.log = this.log;
+           return newDebug;
+         }
+         /**
+         * Enables a debug mode by namespaces. This can include modes
+         * separated by a colon and wildcards.
+         *
+         * @param {String} namespaces
+         * @api public
+         */
+
+
+         function enable(namespaces) {
+           createDebug.save(namespaces);
+           createDebug.names = [];
+           createDebug.skips = [];
+           var i;
+           var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+           var len = split.length;
+
+           for (i = 0; i < len; i++) {
+             if (!split[i]) {
+               // ignore empty strings
+               continue;
+             }
+
+             namespaces = split[i].replace(/\*/g, '.*?');
+
+             if (namespaces[0] === '-') {
+               createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+             } else {
+               createDebug.names.push(new RegExp('^' + namespaces + '$'));
+             }
+           }
+
+           for (i = 0; i < createDebug.instances.length; i++) {
+             var instance = createDebug.instances[i];
+             instance.enabled = createDebug.enabled(instance.namespace);
+           }
+         }
+         /**
+         * Disable debug output.
+         *
+         * @return {String} namespaces
+         * @api public
+         */
+
+
+         function disable() {
+           var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
+             return '-' + namespace;
+           }))).join(',');
+           createDebug.enable('');
+           return namespaces;
+         }
+         /**
+         * Returns true if the given mode name is enabled, false otherwise.
+         *
+         * @param {String} name
+         * @return {Boolean}
+         * @api public
+         */
+
+
+         function enabled(name) {
+           if (name[name.length - 1] === '*') {
+             return true;
+           }
+
+           var i;
+           var len;
+
+           for (i = 0, len = createDebug.skips.length; i < len; i++) {
+             if (createDebug.skips[i].test(name)) {
+               return false;
+             }
+           }
+
+           for (i = 0, len = createDebug.names.length; i < len; i++) {
+             if (createDebug.names[i].test(name)) {
+               return true;
+             }
+           }
+
+           return false;
+         }
+         /**
+         * Convert regexp to namespace
+         *
+         * @param {RegExp} regxep
+         * @return {String} namespace
+         * @api private
+         */
+
+
+         function toNamespace(regexp) {
+           return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
+         }
+         /**
+         * Coerce `val`.
+         *
+         * @param {Mixed} val
+         * @return {Mixed}
+         * @api private
+         */
+
+
+         function coerce(val) {
+           if (val instanceof Error) {
+             return val.stack || val.message;
+           }
+
+           return val;
+         }
+
+         createDebug.enable(createDebug.load());
+         return createDebug;
+       }
+
+       var common = setup;
+
+       var browser$2 = createCommonjsModule(function (module, exports) {
+         /* eslint-env browser */
+
+         /**
+          * This is the web browser implementation of `debug()`.
+          */
+         exports.formatArgs = formatArgs;
+         exports.save = save;
+         exports.load = load;
+         exports.useColors = useColors;
+         exports.storage = localstorage();
+         /**
+          * Colors.
+          */
+
+         exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
+         /**
+          * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+          * and the Firebug extension (any Firefox version) are known
+          * to support "%c" CSS customizations.
+          *
+          * TODO: add a `localStorage` variable to explicitly enable/disable colors
+          */
+         // eslint-disable-next-line complexity
+
+         function useColors() {
+           // NB: In an Electron preload script, document will be defined but not fully
+           // initialized. Since we know we're in Chrome, we'll just detect this case
+           // explicitly
+           if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+             return true;
+           } // Internet Explorer and Edge do not support colors.
+
+
+           if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+             return false;
+           } // Is webkit? http://stackoverflow.com/a/16459606/376773
+           // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+
+
+           return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
+           typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
+           // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+           typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
+           typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
+         }
+         /**
+          * Colorize log arguments if enabled.
+          *
+          * @api public
+          */
+
+
+         function formatArgs(args) {
+           args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
+
+           if (!this.useColors) {
+             return;
+           }
+
+           var c = 'color: ' + this.color;
+           args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
+           // arguments passed either before or after the %c, so we need to
+           // figure out the correct index to insert the CSS into
+
+           var index = 0;
+           var lastC = 0;
+           args[0].replace(/%[a-zA-Z%]/g, function (match) {
+             if (match === '%%') {
+               return;
+             }
+
+             index++;
+
+             if (match === '%c') {
+               // We only are interested in the *last* %c
+               // (the user may have provided their own)
+               lastC = index;
+             }
+           });
+           args.splice(lastC, 0, c);
+         }
+         /**
+          * Invokes `console.debug()` when available.
+          * No-op when `console.debug` is not a "function".
+          * If `console.debug` is not available, falls back
+          * to `console.log`.
+          *
+          * @api public
+          */
+
+
+         exports.log = console.debug || console.log || function () {};
+         /**
+          * Save `namespaces`.
+          *
+          * @param {String} namespaces
+          * @api private
+          */
+
+
+         function save(namespaces) {
+           try {
+             if (namespaces) {
+               exports.storage.setItem('debug', namespaces);
+             } else {
+               exports.storage.removeItem('debug');
+             }
+           } catch (error) {// Swallow
+             // XXX (@Qix-) should we be logging these?
+           }
+         }
+         /**
+          * Load `namespaces`.
+          *
+          * @return {String} returns the previously persisted debug modes
+          * @api private
+          */
+
+
+         function load() {
+           var r;
+
+           try {
+             r = exports.storage.getItem('debug');
+           } catch (error) {// Swallow
+             // XXX (@Qix-) should we be logging these?
+           } // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+
+
+           if (!r && typeof process$1 !== 'undefined' && 'env' in process$1) {
+             r = process$1.env.DEBUG;
+           }
+
+           return r;
+         }
+         /**
+          * Localstorage attempts to return the localstorage.
+          *
+          * This is necessary because safari throws
+          * when a user disables cookies/localstorage
+          * and you attempt to access it.
+          *
+          * @return {LocalStorage}
+          * @api private
+          */
+
+
+         function localstorage() {
+           try {
+             // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+             // The Browser also has localStorage in the global context.
+             return localStorage;
+           } catch (error) {// Swallow
+             // XXX (@Qix-) should we be logging these?
+           }
+         }
+
+         module.exports = common(exports);
+         var formatters = module.exports.formatters;
+         /**
+          * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+          */
+
+         formatters.j = function (v) {
+           try {
+             return JSON.stringify(v);
+           } catch (error) {
+             return '[UnexpectedJSONParseError]: ' + error.message;
+           }
+         };
+       });
+
+       var EventEmitter$1 = EventEmitter.EventEmitter;
+       var debug$1 = browser$2('mocha:runnable');
+       var createInvalidExceptionError$1 = errors.createInvalidExceptionError;
+       var createMultipleDoneError$1 = errors.createMultipleDoneError;
+       /**
+        * Save timer references to avoid Sinon interfering (see GH-237).
+        * @private
+        */
+
+       var Date$1 = commonjsGlobal.Date;
+       var setTimeout$1 = commonjsGlobal.setTimeout;
+       var clearTimeout$1 = commonjsGlobal.clearTimeout;
+       var toString$4 = Object.prototype.toString;
+       var runnable = Runnable;
+       /**
+        * Initialize a new `Runnable` with the given `title` and callback `fn`.
+        *
+        * @class
+        * @extends external:EventEmitter
+        * @public
+        * @param {String} title
+        * @param {Function} fn
+        */
+
+       function Runnable(title, fn) {
+         this.title = title;
+         this.fn = fn;
+         this.body = (fn || '').toString();
+         this.async = fn && fn.length;
+         this.sync = !this.async;
+         this._timeout = 2000;
+         this._slow = 75;
+         this._retries = -1;
+         utils.assignNewMochaID(this);
+         Object.defineProperty(this, 'id', {
+           get: function get() {
+             return utils.getMochaID(this);
+           }
+         });
+         this.reset();
+       }
+       /**
+        * Inherit from `EventEmitter.prototype`.
+        */
+
+
+       utils.inherits(Runnable, EventEmitter$1);
+       /**
+        * Resets the state initially or for a next run.
+        */
+
+       Runnable.prototype.reset = function () {
+         this.timedOut = false;
+         this._currentRetry = 0;
+         this.pending = false;
+         delete this.state;
+         delete this.err;
+       };
+       /**
+        * Get current timeout value in msecs.
+        *
+        * @private
+        * @returns {number} current timeout threshold value
+        */
+
+       /**
+        * @summary
+        * Set timeout threshold value (msecs).
+        *
+        * @description
+        * A string argument can use shorthand (e.g., "2s") and will be converted.
+        * The value will be clamped to range [<code>0</code>, <code>2^<sup>31</sup>-1</code>].
+        * If clamped value matches either range endpoint, timeouts will be disabled.
+        *
+        * @private
+        * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value}
+        * @param {number|string} ms - Timeout threshold value.
+        * @returns {Runnable} this
+        * @chainable
+        */
+
+
+       Runnable.prototype.timeout = function (ms$1) {
+         if (!arguments.length) {
+           return this._timeout;
+         }
+
+         if (typeof ms$1 === 'string') {
+           ms$1 = ms(ms$1);
+         } // Clamp to range
+
+
+         var INT_MAX = Math.pow(2, 31) - 1;
+         var range = [0, INT_MAX];
+         ms$1 = utils.clamp(ms$1, range); // see #1652 for reasoning
+
+         if (ms$1 === range[0] || ms$1 === range[1]) {
+           this._timeout = 0;
+         } else {
+           this._timeout = ms$1;
+         }
+
+         debug$1('timeout %d', this._timeout);
+
+         if (this.timer) {
+           this.resetTimeout();
+         }
+
+         return this;
+       };
+       /**
+        * Set or get slow `ms`.
+        *
+        * @private
+        * @param {number|string} ms
+        * @return {Runnable|number} ms or Runnable instance.
+        */
+
+
+       Runnable.prototype.slow = function (ms$1) {
+         if (!arguments.length || typeof ms$1 === 'undefined') {
+           return this._slow;
+         }
+
+         if (typeof ms$1 === 'string') {
+           ms$1 = ms(ms$1);
+         }
+
+         debug$1('slow %d', ms$1);
+         this._slow = ms$1;
+         return this;
+       };
+       /**
+        * Halt and mark as pending.
+        *
+        * @memberof Mocha.Runnable
+        * @public
+        */
+
+
+       Runnable.prototype.skip = function () {
+         this.pending = true;
+         throw new pending('sync skip; aborting execution');
+       };
+       /**
+        * Check if this runnable or its parent suite is marked as pending.
+        *
+        * @private
+        */
+
+
+       Runnable.prototype.isPending = function () {
+         return this.pending || this.parent && this.parent.isPending();
+       };
+       /**
+        * Return `true` if this Runnable has failed.
+        * @return {boolean}
+        * @private
+        */
+
+
+       Runnable.prototype.isFailed = function () {
+         return !this.isPending() && this.state === constants$1.STATE_FAILED;
+       };
+       /**
+        * Return `true` if this Runnable has passed.
+        * @return {boolean}
+        * @private
+        */
+
+
+       Runnable.prototype.isPassed = function () {
+         return !this.isPending() && this.state === constants$1.STATE_PASSED;
+       };
+       /**
+        * Set or get number of retries.
+        *
+        * @private
+        */
+
+
+       Runnable.prototype.retries = function (n) {
+         if (!arguments.length) {
+           return this._retries;
+         }
+
+         this._retries = n;
+       };
+       /**
+        * Set or get current retry
+        *
+        * @private
+        */
+
+
+       Runnable.prototype.currentRetry = function (n) {
+         if (!arguments.length) {
+           return this._currentRetry;
+         }
+
+         this._currentRetry = n;
+       };
+       /**
+        * Return the full title generated by recursively concatenating the parent's
+        * full title.
+        *
+        * @memberof Mocha.Runnable
+        * @public
+        * @return {string}
+        */
+
+
+       Runnable.prototype.fullTitle = function () {
+         return this.titlePath().join(' ');
+       };
+       /**
+        * Return the title path generated by concatenating the parent's title path with the title.
+        *
+        * @memberof Mocha.Runnable
+        * @public
+        * @return {string}
+        */
+
+
+       Runnable.prototype.titlePath = function () {
+         return this.parent.titlePath().concat([this.title]);
+       };
+       /**
+        * Clear the timeout.
+        *
+        * @private
+        */
+
+
+       Runnable.prototype.clearTimeout = function () {
+         clearTimeout$1(this.timer);
+       };
+       /**
+        * Reset the timeout.
+        *
+        * @private
+        */
+
+
+       Runnable.prototype.resetTimeout = function () {
+         var self = this;
+         var ms = this.timeout();
+
+         if (ms === 0) {
+           return;
+         }
+
+         this.clearTimeout();
+         this.timer = setTimeout$1(function () {
+           if (self.timeout() === 0) {
+             return;
+           }
+
+           self.callback(self._timeoutError(ms));
+           self.timedOut = true;
+         }, ms);
+       };
+       /**
+        * Set or get a list of whitelisted globals for this test run.
+        *
+        * @private
+        * @param {string[]} globals
+        */
+
+
+       Runnable.prototype.globals = function (globals) {
+         if (!arguments.length) {
+           return this._allowedGlobals;
+         }
+
+         this._allowedGlobals = globals;
+       };
+       /**
+        * Run the test and invoke `fn(err)`.
+        *
+        * @param {Function} fn
+        * @private
+        */
+
+
+       Runnable.prototype.run = function (fn) {
+         var self = this;
+         var start = new Date$1();
+         var ctx = this.ctx;
+         var finished;
+         var errorWasHandled = false;
+         if (this.isPending()) return fn(); // Sometimes the ctx exists, but it is not runnable
+
+         if (ctx && ctx.runnable) {
+           ctx.runnable(this);
+         } // called multiple times
+
+
+         function multiple(err) {
+           if (errorWasHandled) {
+             return;
+           }
+
+           errorWasHandled = true;
+           self.emit('error', createMultipleDoneError$1(self, err));
+         } // finished
+
+
+         function done(err) {
+           var ms = self.timeout();
+
+           if (self.timedOut) {
+             return;
+           }
+
+           if (finished) {
+             return multiple(err);
+           }
+
+           self.clearTimeout();
+           self.duration = new Date$1() - start;
+           finished = true;
+
+           if (!err && self.duration > ms && ms > 0) {
+             err = self._timeoutError(ms);
+           }
+
+           fn(err);
+         } // for .resetTimeout() and Runner#uncaught()
+
+
+         this.callback = done;
+
+         if (this.fn && typeof this.fn.call !== 'function') {
+           done(new TypeError('A runnable must be passed a function as its second argument.'));
+           return;
+         } // explicit async with `done` argument
+
+
+         if (this.async) {
+           this.resetTimeout(); // allows skip() to be used in an explicit async context
+
+           this.skip = function asyncSkip() {
+             this.pending = true;
+             done(); // halt execution, the uncaught handler will ignore the failure.
+
+             throw new pending('async skip; aborting execution');
+           };
+
+           try {
+             callFnAsync(this.fn);
+           } catch (err) {
+             // handles async runnables which actually run synchronously
+             errorWasHandled = true;
+
+             if (err instanceof pending) {
+               return; // done() is already called in this.skip()
+             } else if (this.allowUncaught) {
+               throw err;
+             }
+
+             done(Runnable.toValueOrError(err));
+           }
+
+           return;
+         } // sync or promise-returning
+
+
+         try {
+           callFn(this.fn);
+         } catch (err) {
+           errorWasHandled = true;
+
+           if (err instanceof pending) {
+             return done();
+           } else if (this.allowUncaught) {
+             throw err;
+           }
+
+           done(Runnable.toValueOrError(err));
+         }
+
+         function callFn(fn) {
+           var result = fn.call(ctx);
+
+           if (result && typeof result.then === 'function') {
+             self.resetTimeout();
+             result.then(function () {
+               done(); // Return null so libraries like bluebird do not warn about
+               // subsequently constructed Promises.
+
+               return null;
+             }, function (reason) {
+               done(reason || new Error('Promise rejected with no or falsy reason'));
+             });
+           } else {
+             if (self.asyncOnly) {
+               return done(new Error('--async-only option in use without declaring `done()` or returning a promise'));
+             }
+
+             done();
+           }
+         }
+
+         function callFnAsync(fn) {
+           var result = fn.call(ctx, function (err) {
+             if (err instanceof Error || toString$4.call(err) === '[object Error]') {
+               return done(err);
+             }
+
+             if (err) {
+               if (Object.prototype.toString.call(err) === '[object Object]') {
+                 return done(new Error('done() invoked with non-Error: ' + JSON.stringify(err)));
+               }
+
+               return done(new Error('done() invoked with non-Error: ' + err));
+             }
+
+             if (result && utils.isPromise(result)) {
+               return done(new Error('Resolution method is overspecified. Specify a callback *or* return a Promise; not both.'));
+             }
+
+             done();
+           });
+         }
+       };
+       /**
+        * Instantiates a "timeout" error
+        *
+        * @param {number} ms - Timeout (in milliseconds)
+        * @returns {Error} a "timeout" error
+        * @private
+        */
+
+
+       Runnable.prototype._timeoutError = function (ms) {
+         var msg = 'Timeout of ' + ms + 'ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.';
+
+         if (this.file) {
+           msg += ' (' + this.file + ')';
+         }
+
+         return new Error(msg);
+       };
+
+       var constants$1 = utils.defineConstants(
+       /**
+        * {@link Runnable}-related constants.
+        * @public
+        * @memberof Runnable
+        * @readonly
+        * @static
+        * @alias constants
+        * @enum {string}
+        */
+       {
+         /**
+          * Value of `state` prop when a `Runnable` has failed
+          */
+         STATE_FAILED: 'failed',
+
+         /**
+          * Value of `state` prop when a `Runnable` has passed
+          */
+         STATE_PASSED: 'passed',
+
+         /**
+          * Value of `state` prop when a `Runnable` has been skipped by user
+          */
+         STATE_PENDING: 'pending'
+       });
+       /**
+        * Given `value`, return identity if truthy, otherwise create an "invalid exception" error and return that.
+        * @param {*} [value] - Value to return, if present
+        * @returns {*|Error} `value`, otherwise an `Error`
+        * @private
+        */
+
+       Runnable.toValueOrError = function (value) {
+         return value || createInvalidExceptionError$1('Runnable failed with falsy or undefined exception. Please throw an Error instead.', value);
+       };
+
+       Runnable.constants = constants$1;
+
+       var $some$1 = arrayIteration.some;
+
+
+
+       var STRICT_METHOD$5 = arrayMethodIsStrict('some');
+       var USES_TO_LENGTH$9 = arrayMethodUsesToLength('some');
+
+       // `Array.prototype.some` method
+       // https://tc39.github.io/ecma262/#sec-array.prototype.some
+       _export({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9 }, {
+         some: function some(callbackfn /* , thisArg */) {
+           return $some$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+         }
+       });
+
+       var inherits$3 = utils.inherits,
+           constants$2 = utils.constants;
+       var MOCHA_ID_PROP_NAME = constants$2.MOCHA_ID_PROP_NAME;
+       /**
+        * Expose `Hook`.
+        */
+
+       var hook = Hook;
+       /**
+        * Initialize a new `Hook` with the given `title` and callback `fn`
+        *
+        * @class
+        * @extends Runnable
+        * @param {String} title
+        * @param {Function} fn
+        */
+
+       function Hook(title, fn) {
+         runnable.call(this, title, fn);
+         this.type = 'hook';
+       }
+       /**
+        * Inherit from `Runnable.prototype`.
+        */
+
+
+       inherits$3(Hook, runnable);
+       /**
+        * Resets the state for a next run.
+        */
+
+       Hook.prototype.reset = function () {
+         runnable.prototype.reset.call(this);
+         delete this._error;
+       };
+       /**
+        * Get or set the test `err`.
+        *
+        * @memberof Hook
+        * @public
+        * @param {Error} err
+        * @return {Error}
+        */
+
+
+       Hook.prototype.error = function (err) {
+         if (!arguments.length) {
+           err = this._error;
+           this._error = null;
+           return err;
+         }
+
+         this._error = err;
+       };
+       /**
+        * Returns an object suitable for IPC.
+        * Functions are represented by keys beginning with `$$`.
+        * @private
+        * @returns {Object}
+        */
+
+
+       Hook.prototype.serialize = function serialize() {
+         return _defineProperty({
+           $$isPending: this.isPending(),
+           $$titlePath: this.titlePath(),
+           ctx: this.ctx && this.ctx.currentTest ? {
+             currentTest: _defineProperty({
+               title: this.ctx.currentTest.title
+             }, MOCHA_ID_PROP_NAME, this.ctx.currentTest.id)
+           } : {},
+           parent: _defineProperty({}, MOCHA_ID_PROP_NAME, this.parent.id),
+           title: this.title,
+           type: this.type
+         }, MOCHA_ID_PROP_NAME, this.id);
+       };
+
+       var suite = createCommonjsModule(function (module, exports) {
+         /**
+          * Module dependencies.
+          * @private
+          */
+
+         var EventEmitter$1 = EventEmitter.EventEmitter;
+         var assignNewMochaID = utils.assignNewMochaID,
+             clamp = utils.clamp,
+             utilsConstants = utils.constants,
+             createMap = utils.createMap,
+             defineConstants = utils.defineConstants,
+             getMochaID = utils.getMochaID,
+             inherits = utils.inherits,
+             isString = utils.isString;
+         var debug = browser$2('mocha:suite');
+         var MOCHA_ID_PROP_NAME = utilsConstants.MOCHA_ID_PROP_NAME;
+         /**
+          * Expose `Suite`.
+          */
+
+         exports = module.exports = Suite;
+         /**
+          * Create a new `Suite` with the given `title` and parent `Suite`.
+          *
+          * @public
+          * @param {Suite} parent - Parent suite (required!)
+          * @param {string} title - Title
+          * @return {Suite}
+          */
+
+         Suite.create = function (parent, title) {
+           var suite = new Suite(title, parent.ctx);
+           suite.parent = parent;
+           title = suite.fullTitle();
+           parent.addSuite(suite);
+           return suite;
+         };
+         /**
+          * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`.
+          *
+          * @public
+          * @class
+          * @extends EventEmitter
+          * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter}
+          * @param {string} title - Suite title.
+          * @param {Context} parentContext - Parent context instance.
+          * @param {boolean} [isRoot=false] - Whether this is the root suite.
+          */
+
+
+         function Suite(title, parentContext, isRoot) {
+           if (!isString(title)) {
+             throw errors.createInvalidArgumentTypeError('Suite argument "title" must be a string. Received type "' + _typeof(title) + '"', 'title', 'string');
+           }
+
+           this.title = title;
+
+           function Context() {}
+
+           Context.prototype = parentContext;
+           this.ctx = new Context();
+           this.suites = [];
+           this.tests = [];
+           this.root = isRoot === true;
+           this.pending = false;
+           this._retries = -1;
+           this._beforeEach = [];
+           this._beforeAll = [];
+           this._afterEach = [];
+           this._afterAll = [];
+           this._timeout = 2000;
+           this._slow = 75;
+           this._bail = false;
+           this._onlyTests = [];
+           this._onlySuites = [];
+           assignNewMochaID(this);
+           Object.defineProperty(this, 'id', {
+             get: function get() {
+               return getMochaID(this);
+             }
+           });
+           this.reset();
+           this.on('newListener', function (event) {
+             if (deprecatedEvents[event]) {
+               errors.deprecate('Event "' + event + '" is deprecated.  Please let the Mocha team know about your use case: https://git.io/v6Lwm');
+             }
+           });
+         }
+         /**
+          * Inherit from `EventEmitter.prototype`.
+          */
+
+
+         inherits(Suite, EventEmitter$1);
+         /**
+          * Resets the state initially or for a next run.
+          */
+
+         Suite.prototype.reset = function () {
+           this.delayed = false;
+
+           function doReset(thingToReset) {
+             thingToReset.reset();
+           }
+
+           this.suites.forEach(doReset);
+           this.tests.forEach(doReset);
+
+           this._beforeEach.forEach(doReset);
+
+           this._afterEach.forEach(doReset);
+
+           this._beforeAll.forEach(doReset);
+
+           this._afterAll.forEach(doReset);
+         };
+         /**
+          * Return a clone of this `Suite`.
+          *
+          * @private
+          * @return {Suite}
+          */
+
+
+         Suite.prototype.clone = function () {
+           var suite = new Suite(this.title);
+           debug('clone');
+           suite.ctx = this.ctx;
+           suite.root = this.root;
+           suite.timeout(this.timeout());
+           suite.retries(this.retries());
+           suite.slow(this.slow());
+           suite.bail(this.bail());
+           return suite;
+         };
+         /**
+          * Set or get timeout `ms` or short-hand such as "2s".
+          *
+          * @private
+          * @todo Do not attempt to set value if `ms` is undefined
+          * @param {number|string} ms
+          * @return {Suite|number} for chaining
+          */
+
+
+         Suite.prototype.timeout = function (ms$1) {
+           if (!arguments.length) {
+             return this._timeout;
+           }
+
+           if (typeof ms$1 === 'string') {
+             ms$1 = ms(ms$1);
+           } // Clamp to range
+
+
+           var INT_MAX = Math.pow(2, 31) - 1;
+           var range = [0, INT_MAX];
+           ms$1 = clamp(ms$1, range);
+           debug('timeout %d', ms$1);
+           this._timeout = parseInt(ms$1, 10);
+           return this;
+         };
+         /**
+          * Set or get number of times to retry a failed test.
+          *
+          * @private
+          * @param {number|string} n
+          * @return {Suite|number} for chaining
+          */
+
+
+         Suite.prototype.retries = function (n) {
+           if (!arguments.length) {
+             return this._retries;
+           }
+
+           debug('retries %d', n);
+           this._retries = parseInt(n, 10) || 0;
+           return this;
+         };
+         /**
+          * Set or get slow `ms` or short-hand such as "2s".
+          *
+          * @private
+          * @param {number|string} ms
+          * @return {Suite|number} for chaining
+          */
+
+
+         Suite.prototype.slow = function (ms$1) {
+           if (!arguments.length) {
+             return this._slow;
+           }
+
+           if (typeof ms$1 === 'string') {
+             ms$1 = ms(ms$1);
+           }
+
+           debug('slow %d', ms$1);
+           this._slow = ms$1;
+           return this;
+         };
+         /**
+          * Set or get whether to bail after first error.
+          *
+          * @private
+          * @param {boolean} bail
+          * @return {Suite|number} for chaining
+          */
+
+
+         Suite.prototype.bail = function (bail) {
+           if (!arguments.length) {
+             return this._bail;
+           }
+
+           debug('bail %s', bail);
+           this._bail = bail;
+           return this;
+         };
+         /**
+          * Check if this suite or its parent suite is marked as pending.
+          *
+          * @private
+          */
+
+
+         Suite.prototype.isPending = function () {
+           return this.pending || this.parent && this.parent.isPending();
+         };
+         /**
+          * Generic hook-creator.
+          * @private
+          * @param {string} title - Title of hook
+          * @param {Function} fn - Hook callback
+          * @returns {Hook} A new hook
+          */
+
+
+         Suite.prototype._createHook = function (title, fn) {
+           var hook$1 = new hook(title, fn);
+           hook$1.parent = this;
+           hook$1.timeout(this.timeout());
+           hook$1.retries(this.retries());
+           hook$1.slow(this.slow());
+           hook$1.ctx = this.ctx;
+           hook$1.file = this.file;
+           return hook$1;
+         };
+         /**
+          * Run `fn(test[, done])` before running tests.
+          *
+          * @private
+          * @param {string} title
+          * @param {Function} fn
+          * @return {Suite} for chaining
+          */
+
+
+         Suite.prototype.beforeAll = function (title, fn) {
+           if (this.isPending()) {
+             return this;
+           }
+
+           if (typeof title === 'function') {
+             fn = title;
+             title = fn.name;
+           }
+
+           title = '"before all" hook' + (title ? ': ' + title : '');
+
+           var hook = this._createHook(title, fn);
+
+           this._beforeAll.push(hook);
+
+           this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook);
+           return this;
+         };
+         /**
+          * Run `fn(test[, done])` after running tests.
+          *
+          * @private
+          * @param {string} title
+          * @param {Function} fn
+          * @return {Suite} for chaining
+          */
+
+
+         Suite.prototype.afterAll = function (title, fn) {
+           if (this.isPending()) {
+             return this;
+           }
+
+           if (typeof title === 'function') {
+             fn = title;
+             title = fn.name;
+           }
+
+           title = '"after all" hook' + (title ? ': ' + title : '');
+
+           var hook = this._createHook(title, fn);
+
+           this._afterAll.push(hook);
+
+           this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook);
+           return this;
+         };
+         /**
+          * Run `fn(test[, done])` before each test case.
+          *
+          * @private
+          * @param {string} title
+          * @param {Function} fn
+          * @return {Suite} for chaining
+          */
+
+
+         Suite.prototype.beforeEach = function (title, fn) {
+           if (this.isPending()) {
+             return this;
+           }
+
+           if (typeof title === 'function') {
+             fn = title;
+             title = fn.name;
+           }
+
+           title = '"before each" hook' + (title ? ': ' + title : '');
+
+           var hook = this._createHook(title, fn);
+
+           this._beforeEach.push(hook);
+
+           this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook);
+           return this;
+         };
+         /**
+          * Run `fn(test[, done])` after each test case.
+          *
+          * @private
+          * @param {string} title
+          * @param {Function} fn
+          * @return {Suite} for chaining
+          */
+
+
+         Suite.prototype.afterEach = function (title, fn) {
+           if (this.isPending()) {
+             return this;
+           }
+
+           if (typeof title === 'function') {
+             fn = title;
+             title = fn.name;
+           }
+
+           title = '"after each" hook' + (title ? ': ' + title : '');
+
+           var hook = this._createHook(title, fn);
+
+           this._afterEach.push(hook);
+
+           this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook);
+           return this;
+         };
+         /**
+          * Add a test `suite`.
+          *
+          * @private
+          * @param {Suite} suite
+          * @return {Suite} for chaining
+          */
+
+
+         Suite.prototype.addSuite = function (suite) {
+           suite.parent = this;
+           suite.root = false;
+           suite.timeout(this.timeout());
+           suite.retries(this.retries());
+           suite.slow(this.slow());
+           suite.bail(this.bail());
+           this.suites.push(suite);
+           this.emit(constants.EVENT_SUITE_ADD_SUITE, suite);
+           return this;
+         };
+         /**
+          * Add a `test` to this suite.
+          *
+          * @private
+          * @param {Test} test
+          * @return {Suite} for chaining
+          */
+
+
+         Suite.prototype.addTest = function (test) {
+           test.parent = this;
+           test.timeout(this.timeout());
+           test.retries(this.retries());
+           test.slow(this.slow());
+           test.ctx = this.ctx;
+           this.tests.push(test);
+           this.emit(constants.EVENT_SUITE_ADD_TEST, test);
+           return this;
+         };
+         /**
+          * Return the full title generated by recursively concatenating the parent's
+          * full title.
+          *
+          * @memberof Suite
+          * @public
+          * @return {string}
+          */
+
+
+         Suite.prototype.fullTitle = function () {
+           return this.titlePath().join(' ');
+         };
+         /**
+          * Return the title path generated by recursively concatenating the parent's
+          * title path.
+          *
+          * @memberof Suite
+          * @public
+          * @return {string}
+          */
+
+
+         Suite.prototype.titlePath = function () {
+           var result = [];
+
+           if (this.parent) {
+             result = result.concat(this.parent.titlePath());
+           }
+
+           if (!this.root) {
+             result.push(this.title);
+           }
+
+           return result;
+         };
+         /**
+          * Return the total number of tests.
+          *
+          * @memberof Suite
+          * @public
+          * @return {number}
+          */
+
+
+         Suite.prototype.total = function () {
+           return this.suites.reduce(function (sum, suite) {
+             return sum + suite.total();
+           }, 0) + this.tests.length;
+         };
+         /**
+          * Iterates through each suite recursively to find all tests. Applies a
+          * function in the format `fn(test)`.
+          *
+          * @private
+          * @param {Function} fn
+          * @return {Suite}
+          */
+
+
+         Suite.prototype.eachTest = function (fn) {
+           this.tests.forEach(fn);
+           this.suites.forEach(function (suite) {
+             suite.eachTest(fn);
+           });
+           return this;
+         };
+         /**
+          * This will run the root suite if we happen to be running in delayed mode.
+          * @private
+          */
+
+
+         Suite.prototype.run = function run() {
+           if (this.root) {
+             this.emit(constants.EVENT_ROOT_SUITE_RUN);
+           }
+         };
+         /**
+          * Determines whether a suite has an `only` test or suite as a descendant.
+          *
+          * @private
+          * @returns {Boolean}
+          */
+
+
+         Suite.prototype.hasOnly = function hasOnly() {
+           return this._onlyTests.length > 0 || this._onlySuites.length > 0 || this.suites.some(function (suite) {
+             return suite.hasOnly();
+           });
+         };
+         /**
+          * Filter suites based on `isOnly` logic.
+          *
+          * @private
+          * @returns {Boolean}
+          */
+
+
+         Suite.prototype.filterOnly = function filterOnly() {
+           if (this._onlyTests.length) {
+             // If the suite contains `only` tests, run those and ignore any nested suites.
+             this.tests = this._onlyTests;
+             this.suites = [];
+           } else {
+             // Otherwise, do not run any of the tests in this suite.
+             this.tests = [];
+
+             this._onlySuites.forEach(function (onlySuite) {
+               // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite.
+               // Otherwise, all of the tests on this `only` suite should be run, so don't filter it.
+               if (onlySuite.hasOnly()) {
+                 onlySuite.filterOnly();
+               }
+             }); // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants.
+
+
+             var onlySuites = this._onlySuites;
+             this.suites = this.suites.filter(function (childSuite) {
+               return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly();
+             });
+           } // Keep the suite only if there is something to run
+
+
+           return this.tests.length > 0 || this.suites.length > 0;
+         };
+         /**
+          * Adds a suite to the list of subsuites marked `only`.
+          *
+          * @private
+          * @param {Suite} suite
+          */
+
+
+         Suite.prototype.appendOnlySuite = function (suite) {
+           this._onlySuites.push(suite);
+         };
+         /**
+          * Marks a suite to be `only`.
+          *
+          * @private
+          */
+
+
+         Suite.prototype.markOnly = function () {
+           this.parent && this.parent.appendOnlySuite(this);
+         };
+         /**
+          * Adds a test to the list of tests marked `only`.
+          *
+          * @private
+          * @param {Test} test
+          */
+
+
+         Suite.prototype.appendOnlyTest = function (test) {
+           this._onlyTests.push(test);
+         };
+         /**
+          * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants.
+          * @private
+          */
+
+
+         Suite.prototype.getHooks = function getHooks(name) {
+           return this['_' + name];
+         };
+         /**
+          * cleans all references from this suite and all child suites.
+          */
+
+
+         Suite.prototype.dispose = function () {
+           this.suites.forEach(function (suite) {
+             suite.dispose();
+           });
+           this.cleanReferences();
+         };
+         /**
+          * Cleans up the references to all the deferred functions
+          * (before/after/beforeEach/afterEach) and tests of a Suite.
+          * These must be deleted otherwise a memory leak can happen,
+          * as those functions may reference variables from closures,
+          * thus those variables can never be garbage collected as long
+          * as the deferred functions exist.
+          *
+          * @private
+          */
+
+
+         Suite.prototype.cleanReferences = function cleanReferences() {
+           function cleanArrReferences(arr) {
+             for (var i = 0; i < arr.length; i++) {
+               delete arr[i].fn;
+             }
+           }
+
+           if (Array.isArray(this._beforeAll)) {
+             cleanArrReferences(this._beforeAll);
+           }
+
+           if (Array.isArray(this._beforeEach)) {
+             cleanArrReferences(this._beforeEach);
+           }
+
+           if (Array.isArray(this._afterAll)) {
+             cleanArrReferences(this._afterAll);
+           }
+
+           if (Array.isArray(this._afterEach)) {
+             cleanArrReferences(this._afterEach);
+           }
+
+           for (var i = 0; i < this.tests.length; i++) {
+             delete this.tests[i].fn;
+           }
+         };
+         /**
+          * Returns an object suitable for IPC.
+          * Functions are represented by keys beginning with `$$`.
+          * @private
+          * @returns {Object}
+          */
+
+
+         Suite.prototype.serialize = function serialize() {
+           return {
+             _bail: this._bail,
+             $$fullTitle: this.fullTitle(),
+             $$isPending: this.isPending(),
+             root: this.root,
+             title: this.title,
+             id: this.id,
+             parent: this.parent ? _defineProperty({}, MOCHA_ID_PROP_NAME, this.parent.id) : null
+           };
+         };
+
+         var constants = defineConstants(
+         /**
+          * {@link Suite}-related constants.
+          * @public
+          * @memberof Suite
+          * @alias constants
+          * @readonly
+          * @static
+          * @enum {string}
+          */
+         {
+           /**
+            * Event emitted after a test file has been loaded Not emitted in browser.
+            */
+           EVENT_FILE_POST_REQUIRE: 'post-require',
+
+           /**
+            * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected.
+            */
+           EVENT_FILE_PRE_REQUIRE: 'pre-require',
+
+           /**
+            * Event emitted immediately after a test file has been loaded. Not emitted in browser.
+            */
+           EVENT_FILE_REQUIRE: 'require',
+
+           /**
+            * Event emitted when `global.run()` is called (use with `delay` option)
+            */
+           EVENT_ROOT_SUITE_RUN: 'run',
+
+           /**
+            * Namespace for collection of a `Suite`'s "after all" hooks
+            */
+           HOOK_TYPE_AFTER_ALL: 'afterAll',
+
+           /**
+            * Namespace for collection of a `Suite`'s "after each" hooks
+            */
+           HOOK_TYPE_AFTER_EACH: 'afterEach',
+
+           /**
+            * Namespace for collection of a `Suite`'s "before all" hooks
+            */
+           HOOK_TYPE_BEFORE_ALL: 'beforeAll',
+
+           /**
+            * Namespace for collection of a `Suite`'s "before all" hooks
+            */
+           HOOK_TYPE_BEFORE_EACH: 'beforeEach',
+           // the following events are all deprecated
+
+           /**
+            * Emitted after an "after all" `Hook` has been added to a `Suite`. Deprecated
+            */
+           EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll',
+
+           /**
+            * Emitted after an "after each" `Hook` has been added to a `Suite` Deprecated
+            */
+           EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach',
+
+           /**
+            * Emitted after an "before all" `Hook` has been added to a `Suite` Deprecated
+            */
+           EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll',
+
+           /**
+            * Emitted after an "before each" `Hook` has been added to a `Suite` Deprecated
+            */
+           EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach',
+
+           /**
+            * Emitted after a child `Suite` has been added to a `Suite`. Deprecated
+            */
+           EVENT_SUITE_ADD_SUITE: 'suite',
+
+           /**
+            * Emitted after a `Test` has been added to a `Suite`. Deprecated
+            */
+           EVENT_SUITE_ADD_TEST: 'test'
+         });
+         /**
+          * @summary There are no known use cases for these events.
+          * @desc This is a `Set`-like object having all keys being the constant's string value and the value being `true`.
+          * @todo Remove eventually
+          * @type {Object<string,boolean>}
+          * @ignore
+          */
+
+         var deprecatedEvents = Object.keys(constants).filter(function (constant) {
+           return constant.substring(0, 15) === 'EVENT_SUITE_ADD';
+         }).reduce(function (acc, constant) {
+           acc[constants[constant]] = true;
+           return acc;
+         }, createMap());
+         Suite.constants = constants;
+       });
+
+       /**
+        * Module dependencies.
+        * @private
+        */
+
+
+       var EventEmitter$2 = EventEmitter.EventEmitter;
+       var debug$2 = browser$2('mocha:runner');
+       var HOOK_TYPE_BEFORE_EACH = suite.constants.HOOK_TYPE_BEFORE_EACH;
+       var HOOK_TYPE_AFTER_EACH = suite.constants.HOOK_TYPE_AFTER_EACH;
+       var HOOK_TYPE_AFTER_ALL = suite.constants.HOOK_TYPE_AFTER_ALL;
+       var HOOK_TYPE_BEFORE_ALL = suite.constants.HOOK_TYPE_BEFORE_ALL;
+       var EVENT_ROOT_SUITE_RUN = suite.constants.EVENT_ROOT_SUITE_RUN;
+       var STATE_FAILED = runnable.constants.STATE_FAILED;
+       var STATE_PASSED = runnable.constants.STATE_PASSED;
+       var STATE_PENDING = runnable.constants.STATE_PENDING;
+       var dQuote = utils.dQuote;
+       var sQuote = utils.sQuote;
+       var stackFilter = utils.stackTraceFilter();
+       var stringify = utils.stringify;
+       var createInvalidExceptionError$2 = errors.createInvalidExceptionError,
+           createUnsupportedError$1 = errors.createUnsupportedError,
+           createFatalError$1 = errors.createFatalError,
+           isMochaError$1 = errors.isMochaError,
+           errorConstants = errors.constants;
+       /**
+        * Non-enumerable globals.
+        * @private
+        * @readonly
+        */
+
+       var globals = ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'XMLHttpRequest', 'Date', 'setImmediate', 'clearImmediate'];
+       var constants$3 = utils.defineConstants(
+       /**
+        * {@link Runner}-related constants.
+        * @public
+        * @memberof Runner
+        * @readonly
+        * @alias constants
+        * @static
+        * @enum {string}
+        */
+       {
+         /**
+          * Emitted when {@link Hook} execution begins
+          */
+         EVENT_HOOK_BEGIN: 'hook',
+
+         /**
+          * Emitted when {@link Hook} execution ends
+          */
+         EVENT_HOOK_END: 'hook end',
+
+         /**
+          * Emitted when Root {@link Suite} execution begins (all files have been parsed and hooks/tests are ready for execution)
+          */
+         EVENT_RUN_BEGIN: 'start',
+
+         /**
+          * Emitted when Root {@link Suite} execution has been delayed via `delay` option
+          */
+         EVENT_DELAY_BEGIN: 'waiting',
+
+         /**
+          * Emitted when delayed Root {@link Suite} execution is triggered by user via `global.run()`
+          */
+         EVENT_DELAY_END: 'ready',
+
+         /**
+          * Emitted when Root {@link Suite} execution ends
+          */
+         EVENT_RUN_END: 'end',
+
+         /**
+          * Emitted when {@link Suite} execution begins
+          */
+         EVENT_SUITE_BEGIN: 'suite',
+
+         /**
+          * Emitted when {@link Suite} execution ends
+          */
+         EVENT_SUITE_END: 'suite end',
+
+         /**
+          * Emitted when {@link Test} execution begins
+          */
+         EVENT_TEST_BEGIN: 'test',
+
+         /**
+          * Emitted when {@link Test} execution ends
+          */
+         EVENT_TEST_END: 'test end',
+
+         /**
+          * Emitted when {@link Test} execution fails
+          */
+         EVENT_TEST_FAIL: 'fail',
+
+         /**
+          * Emitted when {@link Test} execution succeeds
+          */
+         EVENT_TEST_PASS: 'pass',
+
+         /**
+          * Emitted when {@link Test} becomes pending
+          */
+         EVENT_TEST_PENDING: 'pending',
+
+         /**
+          * Emitted when {@link Test} execution has failed, but will retry
+          */
+         EVENT_TEST_RETRY: 'retry',
+
+         /**
+          * Initial state of Runner
+          */
+         STATE_IDLE: 'idle',
+
+         /**
+          * State set to this value when the Runner has started running
+          */
+         STATE_RUNNING: 'running',
+
+         /**
+          * State set to this value when the Runner has stopped
+          */
+         STATE_STOPPED: 'stopped'
+       });
+
+       var Runner = /*#__PURE__*/function (_EventEmitter) {
+         _inherits(Runner, _EventEmitter);
+
+         var _super = _createSuper(Runner);
+
+         /**
+          * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}.
+          *
+          * @extends external:EventEmitter
+          * @public
+          * @class
+          * @param {Suite} suite - Root suite
+          * @param {Object|boolean} [opts] - Options. If `boolean`, whether or not to delay execution of root suite until ready (for backwards compatibility).
+          * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready.
+          * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done.
+          */
+         function Runner(suite, opts) {
+           var _this;
+
+           _classCallCheck(this, Runner);
+
+           _this = _super.call(this);
+
+           if (opts === undefined) {
+             opts = {};
+           }
+
+           if (typeof opts === 'boolean') {
+             // TODO: deprecate this
+             _this._delay = opts;
+             opts = {};
+           } else {
+             _this._delay = opts.delay;
+           }
+
+           var self = _assertThisInitialized(_this);
+
+           _this._globals = [];
+           _this._abort = false;
+           _this.suite = suite;
+           _this._opts = opts;
+           _this.state = constants$3.STATE_IDLE;
+           _this.total = suite.total();
+           _this.failures = 0;
+           /**
+            * @type {Map<EventEmitter,Map<string,Set<EventListener>>>}
+            */
+
+           _this._eventListeners = new Map();
+
+           _this.on(constants$3.EVENT_TEST_END, function (test) {
+             if (test.type === 'test' && test.retriedTest() && test.parent) {
+               var idx = test.parent.tests && test.parent.tests.indexOf(test.retriedTest());
+               if (idx > -1) test.parent.tests[idx] = test;
+             }
+
+             self.checkGlobals(test);
+           });
+
+           _this.on(constants$3.EVENT_HOOK_END, function (hook) {
+             self.checkGlobals(hook);
+           });
+
+           _this._defaultGrep = /.*/;
+
+           _this.grep(_this._defaultGrep);
+
+           _this.globals(_this.globalProps());
+
+           _this.uncaught = _this._uncaught.bind(_assertThisInitialized(_this));
+
+           _this.unhandled = function (reason, promise) {
+             if (isMochaError$1(reason)) {
+               debug$2('trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:', reason);
+
+               _this.uncaught(reason);
+             } else {
+               debug$2('trapped unhandled rejection from (probably) user code; re-emitting on process');
+
+               _this._removeEventListener(process$1, 'unhandledRejection', _this.unhandled);
+
+               try {
+                 process$1.emit('unhandledRejection', reason, promise);
+               } finally {
+                 _this._addEventListener(process$1, 'unhandledRejection', _this.unhandled);
+               }
+             }
+           };
+
+           return _this;
+         }
+
+         return Runner;
+       }(EventEmitter$2);
+       /**
+        * Wrapper for setImmediate, process.nextTick, or browser polyfill.
+        *
+        * @param {Function} fn
+        * @private
+        */
+
+
+       Runner.immediately = commonjsGlobal.setImmediate || nextTick;
+       /**
+        * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed.
+        * @param {EventEmitter} target - The `EventEmitter`
+        * @param {string} eventName - The event name
+        * @param {string} fn - Listener function
+        * @private
+        */
+
+       Runner.prototype._addEventListener = function (target, eventName, listener) {
+         debug$2('_addEventListener(): adding for event %s; %d current listeners', eventName, target.listenerCount(eventName));
+         /* istanbul ignore next */
+
+         if (this._eventListeners.has(target) && this._eventListeners.get(target).has(eventName) && this._eventListeners.get(target).get(eventName).has(listener)) {
+           debug$2('warning: tried to attach duplicate event listener for %s', eventName);
+           return;
+         }
+
+         target.on(eventName, listener);
+         var targetListeners = this._eventListeners.has(target) ? this._eventListeners.get(target) : new Map();
+         var targetEventListeners = targetListeners.has(eventName) ? targetListeners.get(eventName) : new Set();
+         targetEventListeners.add(listener);
+         targetListeners.set(eventName, targetEventListeners);
+
+         this._eventListeners.set(target, targetListeners);
+       };
+       /**
+        * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping.
+        * @param {EventEmitter} target - The `EventEmitter`
+        * @param {string} eventName - The event name
+        * @param {function} listener - Listener function
+        * @private
+        */
+
+
+       Runner.prototype._removeEventListener = function (target, eventName, listener) {
+         target.removeListener(eventName, listener);
+
+         if (this._eventListeners.has(target)) {
+           var targetListeners = this._eventListeners.get(target);
+
+           if (targetListeners.has(eventName)) {
+             var targetEventListeners = targetListeners.get(eventName);
+             targetEventListeners["delete"](listener);
+
+             if (!targetEventListeners.size) {
+               targetListeners["delete"](eventName);
+             }
+           }
+
+           if (!targetListeners.size) {
+             this._eventListeners["delete"](target);
+           }
+         } else {
+           debug$2('trying to remove listener for untracked object %s', target);
+         }
+       };
+       /**
+        * Removes all event handlers set during a run on this instance.
+        * Remark: this does _not_ clean/dispose the tests or suites themselves.
+        */
+
+
+       Runner.prototype.dispose = function () {
+         this.removeAllListeners();
+
+         this._eventListeners.forEach(function (targetListeners, target) {
+           targetListeners.forEach(function (targetEventListeners, eventName) {
+             targetEventListeners.forEach(function (listener) {
+               target.removeListener(eventName, listener);
+             });
+           });
+         });
+
+         this._eventListeners.clear();
+       };
+       /**
+        * Run tests with full titles matching `re`. Updates runner.total
+        * with number of tests matched.
+        *
+        * @public
+        * @memberof Runner
+        * @param {RegExp} re
+        * @param {boolean} invert
+        * @return {Runner} Runner instance.
+        */
+
+
+       Runner.prototype.grep = function (re, invert) {
+         debug$2('grep(): setting to %s', re);
+         this._grep = re;
+         this._invert = invert;
+         this.total = this.grepTotal(this.suite);
+         return this;
+       };
+       /**
+        * Returns the number of tests matching the grep search for the
+        * given suite.
+        *
+        * @memberof Runner
+        * @public
+        * @param {Suite} suite
+        * @return {number}
+        */
+
+
+       Runner.prototype.grepTotal = function (suite) {
+         var self = this;
+         var total = 0;
+         suite.eachTest(function (test) {
+           var match = self._grep.test(test.fullTitle());
+
+           if (self._invert) {
+             match = !match;
+           }
+
+           if (match) {
+             total++;
+           }
+         });
+         return total;
+       };
+       /**
+        * Return a list of global properties.
+        *
+        * @return {Array}
+        * @private
+        */
+
+
+       Runner.prototype.globalProps = function () {
+         var props = Object.keys(commonjsGlobal); // non-enumerables
+
+         for (var i = 0; i < globals.length; ++i) {
+           if (~props.indexOf(globals[i])) {
+             continue;
+           }
+
+           props.push(globals[i]);
+         }
+
+         return props;
+       };
+       /**
+        * Allow the given `arr` of globals.
+        *
+        * @public
+        * @memberof Runner
+        * @param {Array} arr
+        * @return {Runner} Runner instance.
+        */
+
+
+       Runner.prototype.globals = function (arr) {
+         if (!arguments.length) {
+           return this._globals;
+         }
+
+         debug$2('globals(): setting to %O', arr);
+         this._globals = this._globals.concat(arr);
+         return this;
+       };
+       /**
+        * Check for global variable leaks.
+        *
+        * @private
+        */
+
+
+       Runner.prototype.checkGlobals = function (test) {
+         if (!this.checkLeaks) {
+           return;
+         }
+
+         var ok = this._globals;
+         var globals = this.globalProps();
+         var leaks;
+
+         if (test) {
+           ok = ok.concat(test._allowedGlobals || []);
+         }
+
+         if (this.prevGlobalsLength === globals.length) {
+           return;
+         }
+
+         this.prevGlobalsLength = globals.length;
+         leaks = filterLeaks(ok, globals);
+         this._globals = this._globals.concat(leaks);
+
+         if (leaks.length) {
+           var msg = 'global leak(s) detected: %s';
+           var error = new Error(util.format(msg, leaks.map(sQuote).join(', ')));
+           this.fail(test, error);
+         }
+       };
+       /**
+        * Fail the given `test`.
+        *
+        * If `test` is a hook, failures work in the following pattern:
+        * - If bail, run corresponding `after each` and `after` hooks,
+        *   then exit
+        * - Failed `before` hook skips all tests in a suite and subsuites,
+        *   but jumps to corresponding `after` hook
+        * - Failed `before each` hook skips remaining tests in a
+        *   suite and jumps to corresponding `after each` hook,
+        *   which is run only once
+        * - Failed `after` hook does not alter execution order
+        * - Failed `after each` hook skips remaining tests in a
+        *   suite and subsuites, but executes other `after each`
+        *   hooks
+        *
+        * @private
+        * @param {Runnable} test
+        * @param {Error} err
+        * @param {boolean} [force=false] - Whether to fail a pending test.
+        */
+
+
+       Runner.prototype.fail = function (test, err, force) {
+         force = force === true;
+
+         if (test.isPending() && !force) {
+           return;
+         }
+
+         if (this.state === constants$3.STATE_STOPPED) {
+           if (err.code === errorConstants.MULTIPLE_DONE) {
+             throw err;
+           }
+
+           throw createFatalError$1('Test failed after root suite execution completed!', err);
+         }
+
+         ++this.failures;
+         debug$2('total number of failures: %d', this.failures);
+         test.state = STATE_FAILED;
+
+         if (!isError$1(err)) {
+           err = thrown2Error(err);
+         }
+
+         try {
+           err.stack = this.fullStackTrace || !err.stack ? err.stack : stackFilter(err.stack);
+         } catch (ignore) {// some environments do not take kindly to monkeying with the stack
+         }
+
+         this.emit(constants$3.EVENT_TEST_FAIL, test, err);
+       };
+       /**
+        * Run hook `name` callbacks and then invoke `fn()`.
+        *
+        * @private
+        * @param {string} name
+        * @param {Function} fn
+        */
+
+
+       Runner.prototype.hook = function (name, fn) {
+         var suite = this.suite;
+         var hooks = suite.getHooks(name);
+         var self = this;
+
+         function next(i) {
+           var hook = hooks[i];
+
+           if (!hook) {
+             return fn();
+           }
+
+           self.currentRunnable = hook;
+
+           if (name === HOOK_TYPE_BEFORE_ALL) {
+             hook.ctx.currentTest = hook.parent.tests[0];
+           } else if (name === HOOK_TYPE_AFTER_ALL) {
+             hook.ctx.currentTest = hook.parent.tests[hook.parent.tests.length - 1];
+           } else {
+             hook.ctx.currentTest = self.test;
+           }
+
+           setHookTitle(hook);
+           hook.allowUncaught = self.allowUncaught;
+           self.emit(constants$3.EVENT_HOOK_BEGIN, hook);
+
+           if (!hook.listeners('error').length) {
+             self._addEventListener(hook, 'error', function (err) {
+               self.fail(hook, err);
+             });
+           }
+
+           hook.run(function cbHookRun(err) {
+             var testError = hook.error();
+
+             if (testError) {
+               self.fail(self.test, testError);
+             } // conditional skip
+
+
+             if (hook.pending) {
+               if (name === HOOK_TYPE_AFTER_EACH) {
+                 // TODO define and implement use case
+                 if (self.test) {
+                   self.test.pending = true;
+                 }
+               } else if (name === HOOK_TYPE_BEFORE_EACH) {
+                 if (self.test) {
+                   self.test.pending = true;
+                 }
+
+                 self.emit(constants$3.EVENT_HOOK_END, hook);
+                 hook.pending = false; // activates hook for next test
+
+                 return fn(new Error('abort hookDown'));
+               } else if (name === HOOK_TYPE_BEFORE_ALL) {
+                 suite.tests.forEach(function (test) {
+                   test.pending = true;
+                 });
+                 suite.suites.forEach(function (suite) {
+                   suite.pending = true;
+                 });
+                 hooks = [];
+               } else {
+                 hook.pending = false;
+                 var errForbid = createUnsupportedError$1('`this.skip` forbidden');
+                 self.fail(hook, errForbid);
+                 return fn(errForbid);
+               }
+             } else if (err) {
+               self.fail(hook, err); // stop executing hooks, notify callee of hook err
+
+               return fn(err);
+             }
+
+             self.emit(constants$3.EVENT_HOOK_END, hook);
+             delete hook.ctx.currentTest;
+             setHookTitle(hook);
+             next(++i);
+           });
+
+           function setHookTitle(hook) {
+             hook.originalTitle = hook.originalTitle || hook.title;
+
+             if (hook.ctx && hook.ctx.currentTest) {
+               hook.title = hook.originalTitle + ' for ' + dQuote(hook.ctx.currentTest.title);
+             } else {
+               var parentTitle;
+
+               if (hook.parent.title) {
+                 parentTitle = hook.parent.title;
+               } else {
+                 parentTitle = hook.parent.root ? '{root}' : '';
+               }
+
+               hook.title = hook.originalTitle + ' in ' + dQuote(parentTitle);
+             }
+           }
+         }
+
+         Runner.immediately(function () {
+           next(0);
+         });
+       };
+       /**
+        * Run hook `name` for the given array of `suites`
+        * in order, and callback `fn(err, errSuite)`.
+        *
+        * @private
+        * @param {string} name
+        * @param {Array} suites
+        * @param {Function} fn
+        */
+
+
+       Runner.prototype.hooks = function (name, suites, fn) {
+         var self = this;
+         var orig = this.suite;
+
+         function next(suite) {
+           self.suite = suite;
+
+           if (!suite) {
+             self.suite = orig;
+             return fn();
+           }
+
+           self.hook(name, function (err) {
+             if (err) {
+               var errSuite = self.suite;
+               self.suite = orig;
+               return fn(err, errSuite);
+             }
+
+             next(suites.pop());
+           });
+         }
+
+         next(suites.pop());
+       };
+       /**
+        * Run hooks from the top level down.
+        *
+        * @param {String} name
+        * @param {Function} fn
+        * @private
+        */
+
+
+       Runner.prototype.hookUp = function (name, fn) {
+         var suites = [this.suite].concat(this.parents()).reverse();
+         this.hooks(name, suites, fn);
+       };
+       /**
+        * Run hooks from the bottom up.
+        *
+        * @param {String} name
+        * @param {Function} fn
+        * @private
+        */
+
+
+       Runner.prototype.hookDown = function (name, fn) {
+         var suites = [this.suite].concat(this.parents());
+         this.hooks(name, suites, fn);
+       };
+       /**
+        * Return an array of parent Suites from
+        * closest to furthest.
+        *
+        * @return {Array}
+        * @private
+        */
+
+
+       Runner.prototype.parents = function () {
+         var suite = this.suite;
+         var suites = [];
+
+         while (suite.parent) {
+           suite = suite.parent;
+           suites.push(suite);
+         }
+
+         return suites;
+       };
+       /**
+        * Run the current test and callback `fn(err)`.
+        *
+        * @param {Function} fn
+        * @private
+        */
+
+
+       Runner.prototype.runTest = function (fn) {
+         var self = this;
+         var test = this.test;
+
+         if (!test) {
+           return;
+         }
+
+         if (this.asyncOnly) {
+           test.asyncOnly = true;
+         }
+
+         this._addEventListener(test, 'error', function (err) {
+           self.fail(test, err);
+         });
+
+         if (this.allowUncaught) {
+           test.allowUncaught = true;
+           return test.run(fn);
+         }
+
+         try {
+           test.run(fn);
+         } catch (err) {
+           fn(err);
+         }
+       };
+       /**
+        * Run tests in the given `suite` and invoke the callback `fn()` when complete.
+        *
+        * @private
+        * @param {Suite} suite
+        * @param {Function} fn
+        */
+
+
+       Runner.prototype.runTests = function (suite, fn) {
+         var self = this;
+         var tests = suite.tests.slice();
+         var test;
+
+         function hookErr(_, errSuite, after) {
+           // before/after Each hook for errSuite failed:
+           var orig = self.suite; // for failed 'after each' hook start from errSuite parent,
+           // otherwise start from errSuite itself
+
+           self.suite = after ? errSuite.parent : errSuite;
+
+           if (self.suite) {
+             // call hookUp afterEach
+             self.hookUp(HOOK_TYPE_AFTER_EACH, function (err2, errSuite2) {
+               self.suite = orig; // some hooks may fail even now
+
+               if (err2) {
+                 return hookErr(err2, errSuite2, true);
+               } // report error suite
+
+
+               fn(errSuite);
+             });
+           } else {
+             // there is no need calling other 'after each' hooks
+             self.suite = orig;
+             fn(errSuite);
+           }
+         }
+
+         function next(err, errSuite) {
+           // if we bail after first err
+           if (self.failures && suite._bail) {
+             tests = [];
+           }
+
+           if (self._abort) {
+             return fn();
+           }
+
+           if (err) {
+             return hookErr(err, errSuite, true);
+           } // next test
+
+
+           test = tests.shift(); // all done
+
+           if (!test) {
+             return fn();
+           } // grep
+
+
+           var match = self._grep.test(test.fullTitle());
+
+           if (self._invert) {
+             match = !match;
+           }
+
+           if (!match) {
+             // Run immediately only if we have defined a grep. When we
+             // define a grep — It can cause maximum callstack error if
+             // the grep is doing a large recursive loop by neglecting
+             // all tests. The run immediately function also comes with
+             // a performance cost. So we don't want to run immediately
+             // if we run the whole test suite, because running the whole
+             // test suite don't do any immediate recursive loops. Thus,
+             // allowing a JS runtime to breathe.
+             if (self._grep !== self._defaultGrep) {
+               Runner.immediately(next);
+             } else {
+               next();
+             }
+
+             return;
+           } // static skip, no hooks are executed
+
+
+           if (test.isPending()) {
+             if (self.forbidPending) {
+               self.fail(test, new Error('Pending test forbidden'), true);
+             } else {
+               test.state = STATE_PENDING;
+               self.emit(constants$3.EVENT_TEST_PENDING, test);
+             }
+
+             self.emit(constants$3.EVENT_TEST_END, test);
+             return next();
+           } // execute test and hook(s)
+
+
+           self.emit(constants$3.EVENT_TEST_BEGIN, self.test = test);
+           self.hookDown(HOOK_TYPE_BEFORE_EACH, function (err, errSuite) {
+             // conditional skip within beforeEach
+             if (test.isPending()) {
+               if (self.forbidPending) {
+                 self.fail(test, new Error('Pending test forbidden'), true);
+               } else {
+                 test.state = STATE_PENDING;
+                 self.emit(constants$3.EVENT_TEST_PENDING, test);
+               }
+
+               self.emit(constants$3.EVENT_TEST_END, test); // skip inner afterEach hooks below errSuite level
+
+               var origSuite = self.suite;
+               self.suite = errSuite || self.suite;
+               return self.hookUp(HOOK_TYPE_AFTER_EACH, function (e, eSuite) {
+                 self.suite = origSuite;
+                 next(e, eSuite);
+               });
+             }
+
+             if (err) {
+               return hookErr(err, errSuite, false);
+             }
+
+             self.currentRunnable = self.test;
+             self.runTest(function (err) {
+               test = self.test; // conditional skip within it
+
+               if (test.pending) {
+                 if (self.forbidPending) {
+                   self.fail(test, new Error('Pending test forbidden'), true);
+                 } else {
+                   test.state = STATE_PENDING;
+                   self.emit(constants$3.EVENT_TEST_PENDING, test);
+                 }
+
+                 self.emit(constants$3.EVENT_TEST_END, test);
+                 return self.hookUp(HOOK_TYPE_AFTER_EACH, next);
+               } else if (err) {
+                 var retry = test.currentRetry();
+
+                 if (retry < test.retries()) {
+                   var clonedTest = test.clone();
+                   clonedTest.currentRetry(retry + 1);
+                   tests.unshift(clonedTest);
+                   self.emit(constants$3.EVENT_TEST_RETRY, test, err); // Early return + hook trigger so that it doesn't
+                   // increment the count wrong
+
+                   return self.hookUp(HOOK_TYPE_AFTER_EACH, next);
+                 } else {
+                   self.fail(test, err);
+                 }
+
+                 self.emit(constants$3.EVENT_TEST_END, test);
+                 return self.hookUp(HOOK_TYPE_AFTER_EACH, next);
+               }
+
+               test.state = STATE_PASSED;
+               self.emit(constants$3.EVENT_TEST_PASS, test);
+               self.emit(constants$3.EVENT_TEST_END, test);
+               self.hookUp(HOOK_TYPE_AFTER_EACH, next);
+             });
+           });
+         }
+
+         this.next = next;
+         this.hookErr = hookErr;
+         next();
+       };
+       /**
+        * Run the given `suite` and invoke the callback `fn()` when complete.
+        *
+        * @private
+        * @param {Suite} suite
+        * @param {Function} fn
+        */
+
+
+       Runner.prototype.runSuite = function (suite, fn) {
+         var i = 0;
+         var self = this;
+         var total = this.grepTotal(suite);
+         debug$2('runSuite(): running %s', suite.fullTitle());
+
+         if (!total || self.failures && suite._bail) {
+           debug$2('runSuite(): bailing');
+           return fn();
+         }
+
+         this.emit(constants$3.EVENT_SUITE_BEGIN, this.suite = suite);
+
+         function next(errSuite) {
+           if (errSuite) {
+             // current suite failed on a hook from errSuite
+             if (errSuite === suite) {
+               // if errSuite is current suite
+               // continue to the next sibling suite
+               return done();
+             } // errSuite is among the parents of current suite
+             // stop execution of errSuite and all sub-suites
+
+
+             return done(errSuite);
+           }
+
+           if (self._abort) {
+             return done();
+           }
+
+           var curr = suite.suites[i++];
+
+           if (!curr) {
+             return done();
+           } // Avoid grep neglecting large number of tests causing a
+           // huge recursive loop and thus a maximum call stack error.
+           // See comment in `this.runTests()` for more information.
+
+
+           if (self._grep !== self._defaultGrep) {
+             Runner.immediately(function () {
+               self.runSuite(curr, next);
+             });
+           } else {
+             self.runSuite(curr, next);
+           }
+         }
+
+         function done(errSuite) {
+           self.suite = suite;
+           self.nextSuite = next; // remove reference to test
+
+           delete self.test;
+           self.hook(HOOK_TYPE_AFTER_ALL, function () {
+             self.emit(constants$3.EVENT_SUITE_END, suite);
+             fn(errSuite);
+           });
+         }
+
+         this.nextSuite = next;
+         this.hook(HOOK_TYPE_BEFORE_ALL, function (err) {
+           if (err) {
+             return done();
+           }
+
+           self.runTests(suite, next);
+         });
+       };
+       /**
+        * Handle uncaught exceptions within runner.
+        *
+        * This function is bound to the instance as `Runner#uncaught` at instantiation
+        * time. It's intended to be listening on the `Process.uncaughtException` event.
+        * In order to not leak EE listeners, we need to ensure no more than a single
+        * `uncaughtException` listener exists per `Runner`.  The only way to do
+        * this--because this function needs the context (and we don't have lambdas)--is
+        * to use `Function.prototype.bind`. We need strict equality to unregister and
+        * _only_ unregister the _one_ listener we set from the
+        * `Process.uncaughtException` event; would be poor form to just remove
+        * everything. See {@link Runner#run} for where the event listener is registered
+        * and unregistered.
+        * @param {Error} err - Some uncaught error
+        * @private
+        */
+
+
+       Runner.prototype._uncaught = function (err) {
+         // this is defensive to prevent future developers from mis-calling this function.
+         // it's more likely that it'd be called with the incorrect context--say, the global
+         // `process` object--than it would to be called with a context that is not a "subclass"
+         // of `Runner`.
+         if (!(this instanceof Runner)) {
+           throw createFatalError$1('Runner#uncaught() called with invalid context', this);
+         }
+
+         if (err instanceof pending) {
+           debug$2('uncaught(): caught a Pending');
+           return;
+         } // browser does not exit script when throwing in global.onerror()
+
+
+         if (this.allowUncaught && !utils.isBrowser()) {
+           debug$2('uncaught(): bubbling exception due to --allow-uncaught');
+           throw err;
+         }
+
+         if (this.state === constants$3.STATE_STOPPED) {
+           debug$2('uncaught(): throwing after run has completed!');
+           throw err;
+         }
+
+         if (err) {
+           debug$2('uncaught(): got truthy exception %O', err);
+         } else {
+           debug$2('uncaught(): undefined/falsy exception');
+           err = createInvalidExceptionError$2('Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger', err);
+         }
+
+         if (!isError$1(err)) {
+           err = thrown2Error(err);
+           debug$2('uncaught(): converted "error" %o to Error', err);
+         }
+
+         err.uncaught = true;
+         var runnable$1 = this.currentRunnable;
+
+         if (!runnable$1) {
+           runnable$1 = new runnable('Uncaught error outside test suite');
+           debug$2('uncaught(): no current Runnable; created a phony one');
+           runnable$1.parent = this.suite;
+
+           if (this.state === constants$3.STATE_RUNNING) {
+             debug$2('uncaught(): failing gracefully');
+             this.fail(runnable$1, err);
+           } else {
+             // Can't recover from this failure
+             debug$2('uncaught(): test run has not yet started; unrecoverable');
+             this.emit(constants$3.EVENT_RUN_BEGIN);
+             this.fail(runnable$1, err);
+             this.emit(constants$3.EVENT_RUN_END);
+           }
+
+           return;
+         }
+
+         runnable$1.clearTimeout();
+
+         if (runnable$1.isFailed()) {
+           debug$2('uncaught(): Runnable has already failed'); // Ignore error if already failed
+
+           return;
+         } else if (runnable$1.isPending()) {
+           debug$2('uncaught(): pending Runnable wound up failing!'); // report 'pending test' retrospectively as failed
+
+           this.fail(runnable$1, err, true);
+           return;
+         } // we cannot recover gracefully if a Runnable has already passed
+         // then fails asynchronously
+
+
+         if (runnable$1.isPassed()) {
+           debug$2('uncaught(): Runnable has already passed; bailing gracefully');
+           this.fail(runnable$1, err);
+           this.abort();
+         } else {
+           debug$2('uncaught(): forcing Runnable to complete with Error');
+           return runnable$1.callback(err);
+         }
+       };
+       /**
+        * Run the root suite and invoke `fn(failures)`
+        * on completion.
+        *
+        * @public
+        * @memberof Runner
+        * @param {Function} fn - Callback when finished
+        * @param {{files: string[], options: Options}} [opts] - For subclasses
+        * @returns {Runner} Runner instance.
+        */
+
+
+       Runner.prototype.run = function (fn) {
+         var _this2 = this;
+
+         var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+         var rootSuite = this.suite;
+         var options = opts.options || {};
+         debug$2('run(): got options: %O', options);
+
+         fn = fn || function () {};
+
+         var end = function end() {
+           debug$2('run(): root suite completed; emitting %s', constants$3.EVENT_RUN_END);
+
+           _this2.emit(constants$3.EVENT_RUN_END);
+         };
+
+         var begin = function begin() {
+           debug$2('run(): emitting %s', constants$3.EVENT_RUN_BEGIN);
+
+           _this2.emit(constants$3.EVENT_RUN_BEGIN);
+
+           debug$2('run(): emitted %s', constants$3.EVENT_RUN_BEGIN);
+
+           _this2.runSuite(rootSuite, end);
+         };
+
+         var prepare = function prepare() {
+           debug$2('run(): starting'); // If there is an `only` filter
+
+           if (rootSuite.hasOnly()) {
+             rootSuite.filterOnly();
+             debug$2('run(): filtered exclusive Runnables');
+           }
+
+           _this2.state = constants$3.STATE_RUNNING;
+
+           if (_this2._delay) {
+             _this2.emit(constants$3.EVENT_DELAY_END);
+
+             debug$2('run(): "delay" ended');
+           }
+
+           return begin();
+         }; // references cleanup to avoid memory leaks
+
+
+         if (this._opts.cleanReferencesAfterRun) {
+           this.on(constants$3.EVENT_SUITE_END, function (suite) {
+             suite.cleanReferences();
+           });
+         } // callback
+
+
+         this.on(constants$3.EVENT_RUN_END, function () {
+           this.state = constants$3.STATE_STOPPED;
+           debug$2('run(): emitted %s', constants$3.EVENT_RUN_END);
+           fn(this.failures);
+         });
+
+         this._removeEventListener(process$1, 'uncaughtException', this.uncaught);
+
+         this._removeEventListener(process$1, 'unhandledRejection', this.unhandled);
+
+         this._addEventListener(process$1, 'uncaughtException', this.uncaught);
+
+         this._addEventListener(process$1, 'unhandledRejection', this.unhandled);
+
+         if (this._delay) {
+           // for reporters, I guess.
+           // might be nice to debounce some dots while we wait.
+           this.emit(constants$3.EVENT_DELAY_BEGIN, rootSuite);
+           rootSuite.once(EVENT_ROOT_SUITE_RUN, prepare);
+           debug$2('run(): waiting for green light due to --delay');
+         } else {
+           Runner.immediately(prepare);
+         }
+
+         return this;
+       };
+       /**
+        * Toggle partial object linking behavior; used for building object references from
+        * unique ID's. Does nothing in serial mode, because the object references already exist.
+        * Subclasses can implement this (e.g., `ParallelBufferedRunner`)
+        * @abstract
+        * @param {boolean} [value] - If `true`, enable partial object linking, otherwise disable
+        * @returns {Runner}
+        * @chainable
+        * @public
+        * @example
+        * // this reporter needs proper object references when run in parallel mode
+        * class MyReporter() {
+        *   constructor(runner) {
+        *     this.runner.linkPartialObjects(true)
+        *       .on(EVENT_SUITE_BEGIN, suite => {
+                  // this Suite may be the same object...
+        *       })
+        *       .on(EVENT_TEST_BEGIN, test => {
+        *         // ...as the `test.parent` property
+        *       });
+        *   }
+        * }
+        */
+
+
+       Runner.prototype.linkPartialObjects = function (value) {
+         return this;
+       };
+       /*
+        * Like {@link Runner#run}, but does not accept a callback and returns a `Promise` instead of a `Runner`.
+        * This function cannot reject; an `unhandledRejection` event will bubble up to the `process` object instead.
+        * @public
+        * @memberof Runner
+        * @param {Object} [opts] - Options for {@link Runner#run}
+        * @returns {Promise<number>} Failure count
+        */
+
+
+       Runner.prototype.runAsync = /*#__PURE__*/function () {
+         var _runAsync = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
+           var _this3 = this;
+
+           var opts,
+               _args = arguments;
+           return regeneratorRuntime.wrap(function _callee$(_context) {
+             while (1) {
+               switch (_context.prev = _context.next) {
+                 case 0:
+                   opts = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
+                   return _context.abrupt("return", new Promise(function (resolve) {
+                     _this3.run(resolve, opts);
+                   }));
+
+                 case 2:
+                 case "end":
+                   return _context.stop();
+               }
+             }
+           }, _callee);
+         }));
+
+         function runAsync() {
+           return _runAsync.apply(this, arguments);
+         }
+
+         return runAsync;
+       }();
+       /**
+        * Cleanly abort execution.
+        *
+        * @memberof Runner
+        * @public
+        * @return {Runner} Runner instance.
+        */
+
+
+       Runner.prototype.abort = function () {
+         debug$2('abort(): aborting');
+         this._abort = true;
+         return this;
+       };
+       /**
+        * Returns `true` if Mocha is running in parallel mode.  For reporters.
+        *
+        * Subclasses should return an appropriate value.
+        * @public
+        * @returns {false}
+        */
+
+
+       Runner.prototype.isParallelMode = function isParallelMode() {
+         return false;
+       };
+       /**
+        * Configures an alternate reporter for worker processes to use. Subclasses
+        * using worker processes should implement this.
+        * @public
+        * @param {string} path - Absolute path to alternate reporter for worker processes to use
+        * @returns {Runner}
+        * @throws When in serial mode
+        * @chainable
+        * @abstract
+        */
+
+
+       Runner.prototype.workerReporter = function () {
+         throw createUnsupportedError$1('workerReporter() not supported in serial mode');
+       };
+       /**
+        * Filter leaks with the given globals flagged as `ok`.
+        *
+        * @private
+        * @param {Array} ok
+        * @param {Array} globals
+        * @return {Array}
+        */
+
+
+       function filterLeaks(ok, globals) {
+         return globals.filter(function (key) {
+           // Firefox and Chrome exposes iframes as index inside the window object
+           if (/^\d+/.test(key)) {
+             return false;
+           } // in firefox
+           // if runner runs in an iframe, this iframe's window.getInterface method
+           // not init at first it is assigned in some seconds
+
+
+           if (commonjsGlobal.navigator && /^getInterface/.test(key)) {
+             return false;
+           } // an iframe could be approached by window[iframeIndex]
+           // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak
+
+
+           if (commonjsGlobal.navigator && /^\d+/.test(key)) {
+             return false;
+           } // Opera and IE expose global variables for HTML element IDs (issue #243)
+
+
+           if (/^mocha-/.test(key)) {
+             return false;
+           }
+
+           var matched = ok.filter(function (ok) {
+             if (~ok.indexOf('*')) {
+               return key.indexOf(ok.split('*')[0]) === 0;
+             }
+
+             return key === ok;
+           });
+           return !matched.length && (!commonjsGlobal.navigator || key !== 'onerror');
+         });
+       }
+       /**
+        * Check if argument is an instance of Error object or a duck-typed equivalent.
+        *
+        * @private
+        * @param {Object} err - object to check
+        * @param {string} err.message - error message
+        * @returns {boolean}
+        */
+
+
+       function isError$1(err) {
+         return err instanceof Error || err && typeof err.message === 'string';
+       }
+       /**
+        *
+        * Converts thrown non-extensible type into proper Error.
+        *
+        * @private
+        * @param {*} thrown - Non-extensible type thrown by code
+        * @return {Error}
+        */
+
+
+       function thrown2Error(err) {
+         return new Error("the ".concat(utils.canonicalType(err), " ").concat(stringify(err), " was thrown, throw an Error :)"));
+       }
+
+       Runner.constants = constants$3;
+       /**
+        * Node.js' `EventEmitter`
+        * @external EventEmitter
+        * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter}
+        */
+
+       var runner$1 = Runner;
+
+       var base = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Base
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var isBrowser = utils.isBrowser();
+
+         function getBrowserWindowSize() {
+           if ('innerHeight' in commonjsGlobal) {
+             return [commonjsGlobal.innerHeight, commonjsGlobal.innerWidth];
+           } // In a Web Worker, the DOM Window is not available.
+
+
+           return [640, 480];
+         }
+         /**
+          * Expose `Base`.
+          */
+
+
+         exports = module.exports = Base;
+         /**
+          * Check if both stdio streams are associated with a tty.
+          */
+
+         var isatty = isBrowser || process$1.stdout.isTTY && process$1.stderr.isTTY;
+         /**
+          * Save log references to avoid tests interfering (see GH-3604).
+          */
+
+         var consoleLog = console.log;
+         /**
+          * Enable coloring by default, except in the browser interface.
+          */
+
+         exports.useColors = !isBrowser && (require$$11.stdout || process$1.env.MOCHA_COLORS !== undefined);
+         /**
+          * Inline diffs instead of +/-
+          */
+
+         exports.inlineDiffs = false;
+         /**
+          * Default color map.
+          */
+
+         exports.colors = {
+           pass: 90,
+           fail: 31,
+           'bright pass': 92,
+           'bright fail': 91,
+           'bright yellow': 93,
+           pending: 36,
+           suite: 0,
+           'error title': 0,
+           'error message': 31,
+           'error stack': 90,
+           checkmark: 32,
+           fast: 90,
+           medium: 33,
+           slow: 31,
+           green: 32,
+           light: 90,
+           'diff gutter': 90,
+           'diff added': 32,
+           'diff removed': 31,
+           'diff added inline': '30;42',
+           'diff removed inline': '30;41'
+         };
+         /**
+          * Default symbol map.
+          */
+
+         exports.symbols = {
+           ok: '✓',
+           err: '✖',
+           dot: '․',
+           comma: ',',
+           bang: '!'
+         }; // With node.js on Windows: use symbols available in terminal default fonts
+
+         if (process$1.platform === 'win32') {
+           exports.symbols.ok = "\u221A";
+           exports.symbols.err = "\xD7";
+           exports.symbols.dot = '.';
+         }
+         /**
+          * Color `str` with the given `type`,
+          * allowing colors to be disabled,
+          * as well as user-defined color
+          * schemes.
+          *
+          * @private
+          * @param {string} type
+          * @param {string} str
+          * @return {string}
+          */
+
+
+         var color = exports.color = function (type, str) {
+           if (!exports.useColors) {
+             return String(str);
+           }
+
+           return "\x1B[" + exports.colors[type] + 'm' + str + "\x1B[0m";
+         };
+         /**
+          * Expose term window size, with some defaults for when stderr is not a tty.
+          */
+
+
+         exports.window = {
+           width: 75
+         };
+
+         if (isatty) {
+           if (isBrowser) {
+             exports.window.width = getBrowserWindowSize()[1];
+           } else {
+             exports.window.width = process$1.stdout.getWindowSize(1)[0];
+           }
+         }
+         /**
+          * Expose some basic cursor interactions that are common among reporters.
+          */
+
+
+         exports.cursor = {
+           hide: function hide() {
+             isatty && process$1.stdout.write("\x1B[?25l");
+           },
+           show: function show() {
+             isatty && process$1.stdout.write("\x1B[?25h");
+           },
+           deleteLine: function deleteLine() {
+             isatty && process$1.stdout.write("\x1B[2K");
+           },
+           beginningOfLine: function beginningOfLine() {
+             isatty && process$1.stdout.write("\x1B[0G");
+           },
+           CR: function CR() {
+             if (isatty) {
+               exports.cursor.deleteLine();
+               exports.cursor.beginningOfLine();
+             } else {
+               process$1.stdout.write('\r');
+             }
+           }
+         };
+
+         var showDiff = exports.showDiff = function (err) {
+           return err && err.showDiff !== false && sameType(err.actual, err.expected) && err.expected !== undefined;
+         };
+
+         function stringifyDiffObjs(err) {
+           if (!utils.isString(err.actual) || !utils.isString(err.expected)) {
+             err.actual = utils.stringify(err.actual);
+             err.expected = utils.stringify(err.expected);
+           }
+         }
+         /**
+          * Returns a diff between 2 strings with coloured ANSI output.
+          *
+          * @description
+          * The diff will be either inline or unified dependent on the value
+          * of `Base.inlineDiff`.
+          *
+          * @param {string} actual
+          * @param {string} expected
+          * @return {string} Diff
+          */
+
+
+         var generateDiff = exports.generateDiff = function (actual, expected) {
+           try {
+             return exports.inlineDiffs ? inlineDiff(actual, expected) : unifiedDiff(actual, expected);
+           } catch (err) {
+             var msg = '\n      ' + color('diff added', '+ expected') + ' ' + color('diff removed', '- actual:  failed to generate Mocha diff') + '\n';
+             return msg;
+           }
+         };
+         /**
+          * Outputs the given `failures` as a list.
+          *
+          * @public
+          * @memberof Mocha.reporters.Base
+          * @variation 1
+          * @param {Object[]} failures - Each is Test instance with corresponding
+          *     Error property
+          */
+
+
+         exports.list = function (failures) {
+           var multipleErr, multipleTest;
+           Base.consoleLog();
+           failures.forEach(function (test, i) {
+             // format
+             var fmt = color('error title', '  %s) %s:\n') + color('error message', '     %s') + color('error stack', '\n%s\n'); // msg
+
+             var msg;
+             var err;
+
+             if (test.err && test.err.multiple) {
+               if (multipleTest !== test) {
+                 multipleTest = test;
+                 multipleErr = [test.err].concat(test.err.multiple);
+               }
+
+               err = multipleErr.shift();
+             } else {
+               err = test.err;
+             }
+
+             var message;
+
+             if (err.message && typeof err.message.toString === 'function') {
+               message = err.message + '';
+             } else if (typeof err.inspect === 'function') {
+               message = err.inspect() + '';
+             } else {
+               message = '';
+             }
+
+             var stack = err.stack || message;
+             var index = message ? stack.indexOf(message) : -1;
+
+             if (index === -1) {
+               msg = message;
+             } else {
+               index += message.length;
+               msg = stack.slice(0, index); // remove msg from stack
+
+               stack = stack.slice(index + 1);
+             } // uncaught
+
+
+             if (err.uncaught) {
+               msg = 'Uncaught ' + msg;
+             } // explicitly show diff
+
+
+             if (!exports.hideDiff && showDiff(err)) {
+               stringifyDiffObjs(err);
+               fmt = color('error title', '  %s) %s:\n%s') + color('error stack', '\n%s\n');
+               var match = message.match(/^([^:]+): expected/);
+               msg = '\n      ' + color('error message', match ? match[1] : msg);
+               msg += generateDiff(err.actual, err.expected);
+             } // indent stack trace
+
+
+             stack = stack.replace(/^/gm, '  '); // indented test title
+
+             var testTitle = '';
+             test.titlePath().forEach(function (str, index) {
+               if (index !== 0) {
+                 testTitle += '\n     ';
+               }
+
+               for (var i = 0; i < index; i++) {
+                 testTitle += '  ';
+               }
+
+               testTitle += str;
+             });
+             Base.consoleLog(fmt, i + 1, testTitle, msg, stack);
+           });
+         };
+         /**
+          * Constructs a new `Base` reporter instance.
+          *
+          * @description
+          * All other reporters generally inherit from this reporter.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+
+         function Base(runner, options) {
+           var failures = this.failures = [];
+
+           if (!runner) {
+             throw new TypeError('Missing runner argument');
+           }
+
+           this.options = options || {};
+           this.runner = runner;
+           this.stats = runner.stats; // assigned so Reporters keep a closer reference
+
+           runner.on(EVENT_TEST_PASS, function (test) {
+             if (test.duration > test.slow()) {
+               test.speed = 'slow';
+             } else if (test.duration > test.slow() / 2) {
+               test.speed = 'medium';
+             } else {
+               test.speed = 'fast';
+             }
+           });
+           runner.on(EVENT_TEST_FAIL, function (test, err) {
+             if (showDiff(err)) {
+               stringifyDiffObjs(err);
+             } // more than one error per test
+
+
+             if (test.err && err instanceof Error) {
+               test.err.multiple = (test.err.multiple || []).concat(err);
+             } else {
+               test.err = err;
+             }
+
+             failures.push(test);
+           });
+         }
+         /**
+          * Outputs common epilogue used by many of the bundled reporters.
+          *
+          * @public
+          * @memberof Mocha.reporters
+          */
+
+
+         Base.prototype.epilogue = function () {
+           var stats = this.stats;
+           var fmt;
+           Base.consoleLog(); // passes
+
+           fmt = color('bright pass', ' ') + color('green', ' %d passing') + color('light', ' (%s)');
+           Base.consoleLog(fmt, stats.passes || 0, ms(stats.duration)); // pending
+
+           if (stats.pending) {
+             fmt = color('pending', ' ') + color('pending', ' %d pending');
+             Base.consoleLog(fmt, stats.pending);
+           } // failures
+
+
+           if (stats.failures) {
+             fmt = color('fail', '  %d failing');
+             Base.consoleLog(fmt, stats.failures);
+             Base.list(this.failures);
+             Base.consoleLog();
+           }
+
+           Base.consoleLog();
+         };
+         /**
+          * Pads the given `str` to `len`.
+          *
+          * @private
+          * @param {string} str
+          * @param {string} len
+          * @return {string}
+          */
+
+
+         function pad(str, len) {
+           str = String(str);
+           return Array(len - str.length + 1).join(' ') + str;
+         }
+         /**
+          * Returns inline diff between 2 strings with coloured ANSI output.
+          *
+          * @private
+          * @param {String} actual
+          * @param {String} expected
+          * @return {string} Diff
+          */
+
+
+         function inlineDiff(actual, expected) {
+           var msg = errorDiff(actual, expected); // linenos
+
+           var lines = msg.split('\n');
+
+           if (lines.length > 4) {
+             var width = String(lines.length).length;
+             msg = lines.map(function (str, i) {
+               return pad(++i, width) + ' |' + ' ' + str;
+             }).join('\n');
+           } // legend
+
+
+           msg = '\n' + color('diff removed inline', 'actual') + ' ' + color('diff added inline', 'expected') + '\n\n' + msg + '\n'; // indent
+
+           msg = msg.replace(/^/gm, '      ');
+           return msg;
+         }
+         /**
+          * Returns unified diff between two strings with coloured ANSI output.
+          *
+          * @private
+          * @param {String} actual
+          * @param {String} expected
+          * @return {string} The diff.
+          */
+
+
+         function unifiedDiff(actual, expected) {
+           var indent = '      ';
+
+           function cleanUp(line) {
+             if (line[0] === '+') {
+               return indent + colorLines('diff added', line);
+             }
+
+             if (line[0] === '-') {
+               return indent + colorLines('diff removed', line);
+             }
+
+             if (line.match(/@@/)) {
+               return '--';
+             }
+
+             if (line.match(/\\ No newline/)) {
+               return null;
+             }
+
+             return indent + line;
+           }
+
+           function notBlank(line) {
+             return typeof line !== 'undefined' && line !== null;
+           }
+
+           var msg = diff.createPatch('string', actual, expected);
+           var lines = msg.split('\n').splice(5);
+           return '\n      ' + colorLines('diff added', '+ expected') + ' ' + colorLines('diff removed', '- actual') + '\n\n' + lines.map(cleanUp).filter(notBlank).join('\n');
+         }
+         /**
+          * Returns character diff for `err`.
+          *
+          * @private
+          * @param {String} actual
+          * @param {String} expected
+          * @return {string} the diff
+          */
+
+
+         function errorDiff(actual, expected) {
+           return diff.diffWordsWithSpace(actual, expected).map(function (str) {
+             if (str.added) {
+               return colorLines('diff added inline', str.value);
+             }
+
+             if (str.removed) {
+               return colorLines('diff removed inline', str.value);
+             }
+
+             return str.value;
+           }).join('');
+         }
+         /**
+          * Colors lines for `str`, using the color `name`.
+          *
+          * @private
+          * @param {string} name
+          * @param {string} str
+          * @return {string}
+          */
+
+
+         function colorLines(name, str) {
+           return str.split('\n').map(function (str) {
+             return color(name, str);
+           }).join('\n');
+         }
+         /**
+          * Object#toString reference.
+          */
+
+
+         var objToString = Object.prototype.toString;
+         /**
+          * Checks that a / b have the same type.
+          *
+          * @private
+          * @param {Object} a
+          * @param {Object} b
+          * @return {boolean}
+          */
+
+         function sameType(a, b) {
+           return objToString.call(a) === objToString.call(b);
+         }
+
+         Base.consoleLog = consoleLog;
+         Base["abstract"] = true;
+       });
+
+       var dot = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Dot
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var inherits = utils.inherits;
+         var constants = runner$1.constants;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         /**
+          * Expose `Dot`.
+          */
+
+         exports = module.exports = Dot;
+         /**
+          * Constructs a new `Dot` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function Dot(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var width = base.window.width * 0.75 | 0;
+           var n = -1;
+           runner.on(EVENT_RUN_BEGIN, function () {
+             process$1.stdout.write('\n');
+           });
+           runner.on(EVENT_TEST_PENDING, function () {
+             if (++n % width === 0) {
+               process$1.stdout.write('\n  ');
+             }
+
+             process$1.stdout.write(base.color('pending', base.symbols.comma));
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             if (++n % width === 0) {
+               process$1.stdout.write('\n  ');
+             }
+
+             if (test.speed === 'slow') {
+               process$1.stdout.write(base.color('bright yellow', base.symbols.dot));
+             } else {
+               process$1.stdout.write(base.color(test.speed, base.symbols.dot));
+             }
+           });
+           runner.on(EVENT_TEST_FAIL, function () {
+             if (++n % width === 0) {
+               process$1.stdout.write('\n  ');
+             }
+
+             process$1.stdout.write(base.color('fail', base.symbols.bang));
+           });
+           runner.once(EVENT_RUN_END, function () {
+             process$1.stdout.write('\n');
+             self.epilogue();
+           });
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(Dot, base);
+         Dot.description = 'dot matrix representation';
+       });
+
+       var doc = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Doc
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;
+         var EVENT_SUITE_END = constants.EVENT_SUITE_END;
+         /**
+          * Expose `Doc`.
+          */
+
+         exports = module.exports = Doc;
+         /**
+          * Constructs a new `Doc` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function Doc(runner, options) {
+           base.call(this, runner, options);
+           var indents = 2;
+
+           function indent() {
+             return Array(indents).join('  ');
+           }
+
+           runner.on(EVENT_SUITE_BEGIN, function (suite) {
+             if (suite.root) {
+               return;
+             }
+
+             ++indents;
+             base.consoleLog('%s<section class="suite">', indent());
+             ++indents;
+             base.consoleLog('%s<h1>%s</h1>', indent(), utils.escape(suite.title));
+             base.consoleLog('%s<dl>', indent());
+           });
+           runner.on(EVENT_SUITE_END, function (suite) {
+             if (suite.root) {
+               return;
+             }
+
+             base.consoleLog('%s</dl>', indent());
+             --indents;
+             base.consoleLog('%s</section>', indent());
+             --indents;
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             base.consoleLog('%s  <dt>%s</dt>', indent(), utils.escape(test.title));
+             base.consoleLog('%s  <dt>%s</dt>', indent(), utils.escape(test.file));
+             var code = utils.escape(utils.clean(test.body));
+             base.consoleLog('%s  <dd><pre><code>%s</code></pre></dd>', indent(), code);
+           });
+           runner.on(EVENT_TEST_FAIL, function (test, err) {
+             base.consoleLog('%s  <dt class="error">%s</dt>', indent(), utils.escape(test.title));
+             base.consoleLog('%s  <dt class="error">%s</dt>', indent(), utils.escape(test.file));
+             var code = utils.escape(utils.clean(test.body));
+             base.consoleLog('%s  <dd class="error"><pre><code>%s</code></pre></dd>', indent(), code);
+             base.consoleLog('%s  <dd class="error">%s</dd>', indent(), utils.escape(err));
+           });
+         }
+
+         Doc.description = 'HTML documentation';
+       });
+
+       var tap = createCommonjsModule(function (module, exports) {
+         /**
+          * @module TAP
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;
+         var EVENT_TEST_END = constants.EVENT_TEST_END;
+         var inherits = utils.inherits;
+         var sprintf = util.format;
+         /**
+          * Expose `TAP`.
+          */
+
+         exports = module.exports = TAP;
+         /**
+          * Constructs a new `TAP` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function TAP(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var n = 1;
+           var tapVersion = '12';
+
+           if (options && options.reporterOptions) {
+             if (options.reporterOptions.tapVersion) {
+               tapVersion = options.reporterOptions.tapVersion.toString();
+             }
+           }
+
+           this._producer = createProducer(tapVersion);
+           runner.once(EVENT_RUN_BEGIN, function () {
+             self._producer.writeVersion();
+           });
+           runner.on(EVENT_TEST_END, function () {
+             ++n;
+           });
+           runner.on(EVENT_TEST_PENDING, function (test) {
+             self._producer.writePending(n, test);
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             self._producer.writePass(n, test);
+           });
+           runner.on(EVENT_TEST_FAIL, function (test, err) {
+             self._producer.writeFail(n, test, err);
+           });
+           runner.once(EVENT_RUN_END, function () {
+             self._producer.writeEpilogue(runner.stats);
+           });
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(TAP, base);
+         /**
+          * Returns a TAP-safe title of `test`.
+          *
+          * @private
+          * @param {Test} test - Test instance.
+          * @return {String} title with any hash character removed
+          */
+
+         function title(test) {
+           return test.fullTitle().replace(/#/g, '');
+         }
+         /**
+          * Writes newline-terminated formatted string to reporter output stream.
+          *
+          * @private
+          * @param {string} format - `printf`-like format string
+          * @param {...*} [varArgs] - Format string arguments
+          */
+
+
+         function println(format, varArgs) {
+           var vargs = Array.from(arguments);
+           vargs[0] += '\n';
+           process$1.stdout.write(sprintf.apply(null, vargs));
+         }
+         /**
+          * Returns a `tapVersion`-appropriate TAP producer instance, if possible.
+          *
+          * @private
+          * @param {string} tapVersion - Version of TAP specification to produce.
+          * @returns {TAPProducer} specification-appropriate instance
+          * @throws {Error} if specification version has no associated producer.
+          */
+
+
+         function createProducer(tapVersion) {
+           var producers = {
+             '12': new TAP12Producer(),
+             '13': new TAP13Producer()
+           };
+           var producer = producers[tapVersion];
+
+           if (!producer) {
+             throw new Error('invalid or unsupported TAP version: ' + JSON.stringify(tapVersion));
+           }
+
+           return producer;
+         }
+         /**
+          * @summary
+          * Constructs a new TAPProducer.
+          *
+          * @description
+          * <em>Only</em> to be used as an abstract base class.
+          *
+          * @private
+          * @constructor
+          */
+
+
+         function TAPProducer() {}
+         /**
+          * Writes the TAP version to reporter output stream.
+          *
+          * @abstract
+          */
+
+
+         TAPProducer.prototype.writeVersion = function () {};
+         /**
+          * Writes the plan to reporter output stream.
+          *
+          * @abstract
+          * @param {number} ntests - Number of tests that are planned to run.
+          */
+
+
+         TAPProducer.prototype.writePlan = function (ntests) {
+           println('%d..%d', 1, ntests);
+         };
+         /**
+          * Writes that test passed to reporter output stream.
+          *
+          * @abstract
+          * @param {number} n - Index of test that passed.
+          * @param {Test} test - Instance containing test information.
+          */
+
+
+         TAPProducer.prototype.writePass = function (n, test) {
+           println('ok %d %s', n, title(test));
+         };
+         /**
+          * Writes that test was skipped to reporter output stream.
+          *
+          * @abstract
+          * @param {number} n - Index of test that was skipped.
+          * @param {Test} test - Instance containing test information.
+          */
+
+
+         TAPProducer.prototype.writePending = function (n, test) {
+           println('ok %d %s # SKIP -', n, title(test));
+         };
+         /**
+          * Writes that test failed to reporter output stream.
+          *
+          * @abstract
+          * @param {number} n - Index of test that failed.
+          * @param {Test} test - Instance containing test information.
+          * @param {Error} err - Reason the test failed.
+          */
+
+
+         TAPProducer.prototype.writeFail = function (n, test, err) {
+           println('not ok %d %s', n, title(test));
+         };
+         /**
+          * Writes the summary epilogue to reporter output stream.
+          *
+          * @abstract
+          * @param {Object} stats - Object containing run statistics.
+          */
+
+
+         TAPProducer.prototype.writeEpilogue = function (stats) {
+           // :TBD: Why is this not counting pending tests?
+           println('# tests ' + (stats.passes + stats.failures));
+           println('# pass ' + stats.passes); // :TBD: Why are we not showing pending results?
+
+           println('# fail ' + stats.failures);
+           this.writePlan(stats.passes + stats.failures + stats.pending);
+         };
+         /**
+          * @summary
+          * Constructs a new TAP12Producer.
+          *
+          * @description
+          * Produces output conforming to the TAP12 specification.
+          *
+          * @private
+          * @constructor
+          * @extends TAPProducer
+          * @see {@link https://testanything.org/tap-specification.html|Specification}
+          */
+
+
+         function TAP12Producer() {
+           /**
+            * Writes that test failed to reporter output stream, with error formatting.
+            * @override
+            */
+           this.writeFail = function (n, test, err) {
+             TAPProducer.prototype.writeFail.call(this, n, test, err);
+
+             if (err.message) {
+               println(err.message.replace(/^/gm, '  '));
+             }
+
+             if (err.stack) {
+               println(err.stack.replace(/^/gm, '  '));
+             }
+           };
+         }
+         /**
+          * Inherit from `TAPProducer.prototype`.
+          */
+
+
+         inherits(TAP12Producer, TAPProducer);
+         /**
+          * @summary
+          * Constructs a new TAP13Producer.
+          *
+          * @description
+          * Produces output conforming to the TAP13 specification.
+          *
+          * @private
+          * @constructor
+          * @extends TAPProducer
+          * @see {@link https://testanything.org/tap-version-13-specification.html|Specification}
+          */
+
+         function TAP13Producer() {
+           /**
+            * Writes the TAP version to reporter output stream.
+            * @override
+            */
+           this.writeVersion = function () {
+             println('TAP version 13');
+           };
+           /**
+            * Writes that test failed to reporter output stream, with error formatting.
+            * @override
+            */
+
+
+           this.writeFail = function (n, test, err) {
+             TAPProducer.prototype.writeFail.call(this, n, test, err);
+             var emitYamlBlock = err.message != null || err.stack != null;
+
+             if (emitYamlBlock) {
+               println(indent(1) + '---');
+
+               if (err.message) {
+                 println(indent(2) + 'message: |-');
+                 println(err.message.replace(/^/gm, indent(3)));
+               }
+
+               if (err.stack) {
+                 println(indent(2) + 'stack: |-');
+                 println(err.stack.replace(/^/gm, indent(3)));
+               }
+
+               println(indent(1) + '...');
+             }
+           };
+
+           function indent(level) {
+             return Array(level + 1).join('  ');
+           }
+         }
+         /**
+          * Inherit from `TAPProducer.prototype`.
+          */
+
+
+         inherits(TAP13Producer, TAPProducer);
+         TAP.description = 'TAP-compatible output';
+       });
+
+       var json = createCommonjsModule(function (module, exports) {
+         /**
+          * @module JSON
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_TEST_END = constants.EVENT_TEST_END;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;
+         /**
+          * Expose `JSON`.
+          */
+
+         exports = module.exports = JSONReporter;
+         /**
+          * Constructs a new `JSON` reporter instance.
+          *
+          * @public
+          * @class JSON
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function JSONReporter(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var tests = [];
+           var pending = [];
+           var failures = [];
+           var passes = [];
+           runner.on(EVENT_TEST_END, function (test) {
+             tests.push(test);
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             passes.push(test);
+           });
+           runner.on(EVENT_TEST_FAIL, function (test) {
+             failures.push(test);
+           });
+           runner.on(EVENT_TEST_PENDING, function (test) {
+             pending.push(test);
+           });
+           runner.once(EVENT_RUN_END, function () {
+             var obj = {
+               stats: self.stats,
+               tests: tests.map(clean),
+               pending: pending.map(clean),
+               failures: failures.map(clean),
+               passes: passes.map(clean)
+             };
+             runner.testResults = obj;
+             process$1.stdout.write(JSON.stringify(obj, null, 2));
+           });
+         }
+         /**
+          * Return a plain-object representation of `test`
+          * free of cyclic properties etc.
+          *
+          * @private
+          * @param {Object} test
+          * @return {Object}
+          */
+
+
+         function clean(test) {
+           var err = test.err || {};
+
+           if (err instanceof Error) {
+             err = errorJSON(err);
+           }
+
+           return {
+             title: test.title,
+             fullTitle: test.fullTitle(),
+             file: test.file,
+             duration: test.duration,
+             currentRetry: test.currentRetry(),
+             speed: test.speed,
+             err: cleanCycles(err)
+           };
+         }
+         /**
+          * Replaces any circular references inside `obj` with '[object Object]'
+          *
+          * @private
+          * @param {Object} obj
+          * @return {Object}
+          */
+
+
+         function cleanCycles(obj) {
+           var cache = [];
+           return JSON.parse(JSON.stringify(obj, function (key, value) {
+             if (_typeof(value) === 'object' && value !== null) {
+               if (cache.indexOf(value) !== -1) {
+                 // Instead of going in a circle, we'll print [object Object]
+                 return '' + value;
+               }
+
+               cache.push(value);
+             }
+
+             return value;
+           }));
+         }
+         /**
+          * Transform an Error object into a JSON object.
+          *
+          * @private
+          * @param {Error} err
+          * @return {Object}
+          */
+
+
+         function errorJSON(err) {
+           var res = {};
+           Object.getOwnPropertyNames(err).forEach(function (key) {
+             res[key] = err[key];
+           }, err);
+           return res;
+         }
+
+         JSONReporter.description = 'single JSON object';
+       });
+
+       // `thisNumberValue` abstract operation
+       // https://tc39.github.io/ecma262/#sec-thisnumbervalue
+       var thisNumberValue = function (value) {
+         if (typeof value != 'number' && classofRaw(value) != 'Number') {
+           throw TypeError('Incorrect invocation');
+         }
+         return +value;
+       };
+
+       // `String.prototype.repeat` method implementation
+       // https://tc39.github.io/ecma262/#sec-string.prototype.repeat
+       var stringRepeat = ''.repeat || function repeat(count) {
+         var str = String(requireObjectCoercible(this));
+         var result = '';
+         var n = toInteger(count);
+         if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
+         for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
+         return result;
+       };
+
+       var nativeToFixed = 1.0.toFixed;
+       var floor$4 = Math.floor;
+
+       var pow$1 = function (x, n, acc) {
+         return n === 0 ? acc : n % 2 === 1 ? pow$1(x, n - 1, acc * x) : pow$1(x * x, n / 2, acc);
+       };
+
+       var log$2 = function (x) {
+         var n = 0;
+         var x2 = x;
+         while (x2 >= 4096) {
+           n += 12;
+           x2 /= 4096;
+         }
+         while (x2 >= 2) {
+           n += 1;
+           x2 /= 2;
+         } return n;
+       };
+
+       var FORCED$8 = nativeToFixed && (
+         0.00008.toFixed(3) !== '0.000' ||
+         0.9.toFixed(0) !== '1' ||
+         1.255.toFixed(2) !== '1.25' ||
+         1000000000000000128.0.toFixed(0) !== '1000000000000000128'
+       ) || !fails(function () {
+         // V8 ~ Android 4.3-
+         nativeToFixed.call({});
+       });
+
+       // `Number.prototype.toFixed` method
+       // https://tc39.github.io/ecma262/#sec-number.prototype.tofixed
+       _export({ target: 'Number', proto: true, forced: FORCED$8 }, {
+         // eslint-disable-next-line max-statements
+         toFixed: function toFixed(fractionDigits) {
+           var number = thisNumberValue(this);
+           var fractDigits = toInteger(fractionDigits);
+           var data = [0, 0, 0, 0, 0, 0];
+           var sign = '';
+           var result = '0';
+           var e, z, j, k;
+
+           var multiply = function (n, c) {
+             var index = -1;
+             var c2 = c;
+             while (++index < 6) {
+               c2 += n * data[index];
+               data[index] = c2 % 1e7;
+               c2 = floor$4(c2 / 1e7);
+             }
+           };
+
+           var divide = function (n) {
+             var index = 6;
+             var c = 0;
+             while (--index >= 0) {
+               c += data[index];
+               data[index] = floor$4(c / n);
+               c = (c % n) * 1e7;
+             }
+           };
+
+           var dataToString = function () {
+             var index = 6;
+             var s = '';
+             while (--index >= 0) {
+               if (s !== '' || index === 0 || data[index] !== 0) {
+                 var t = String(data[index]);
+                 s = s === '' ? t : s + stringRepeat.call('0', 7 - t.length) + t;
+               }
+             } return s;
+           };
+
+           if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');
+           // eslint-disable-next-line no-self-compare
+           if (number != number) return 'NaN';
+           if (number <= -1e21 || number >= 1e21) return String(number);
+           if (number < 0) {
+             sign = '-';
+             number = -number;
+           }
+           if (number > 1e-21) {
+             e = log$2(number * pow$1(2, 69, 1)) - 69;
+             z = e < 0 ? number * pow$1(2, -e, 1) : number / pow$1(2, e, 1);
+             z *= 0x10000000000000;
+             e = 52 - e;
+             if (e > 0) {
+               multiply(0, z);
+               j = fractDigits;
+               while (j >= 7) {
+                 multiply(1e7, 0);
+                 j -= 7;
+               }
+               multiply(pow$1(10, j, 1), 0);
+               j = e - 1;
+               while (j >= 23) {
+                 divide(1 << 23);
+                 j -= 23;
+               }
+               divide(1 << j);
+               multiply(1, 1);
+               divide(2);
+               result = dataToString();
+             } else {
+               multiply(0, z);
+               multiply(1 << -e, 0);
+               result = dataToString() + stringRepeat.call('0', fractDigits);
+             }
+           }
+           if (fractDigits > 0) {
+             k = result.length;
+             result = sign + (k <= fractDigits
+               ? '0.' + stringRepeat.call('0', fractDigits - k) + result
+               : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));
+           } else {
+             result = sign + result;
+           } return result;
+         }
+       });
+
+       /**
+        @module browser/Progress
+       */
+
+       /**
+        * Expose `Progress`.
+        */
+
+       var progress = Progress;
+       /**
+        * Initialize a new `Progress` indicator.
+        */
+
+       function Progress() {
+         this.percent = 0;
+         this.size(0);
+         this.fontSize(11);
+         this.font('helvetica, arial, sans-serif');
+       }
+       /**
+        * Set progress size to `size`.
+        *
+        * @public
+        * @param {number} size
+        * @return {Progress} Progress instance.
+        */
+
+
+       Progress.prototype.size = function (size) {
+         this._size = size;
+         return this;
+       };
+       /**
+        * Set text to `text`.
+        *
+        * @public
+        * @param {string} text
+        * @return {Progress} Progress instance.
+        */
+
+
+       Progress.prototype.text = function (text) {
+         this._text = text;
+         return this;
+       };
+       /**
+        * Set font size to `size`.
+        *
+        * @public
+        * @param {number} size
+        * @return {Progress} Progress instance.
+        */
+
+
+       Progress.prototype.fontSize = function (size) {
+         this._fontSize = size;
+         return this;
+       };
+       /**
+        * Set font to `family`.
+        *
+        * @param {string} family
+        * @return {Progress} Progress instance.
+        */
+
+
+       Progress.prototype.font = function (family) {
+         this._font = family;
+         return this;
+       };
+       /**
+        * Update percentage to `n`.
+        *
+        * @param {number} n
+        * @return {Progress} Progress instance.
+        */
+
+
+       Progress.prototype.update = function (n) {
+         this.percent = n;
+         return this;
+       };
+       /**
+        * Draw on `ctx`.
+        *
+        * @param {CanvasRenderingContext2d} ctx
+        * @return {Progress} Progress instance.
+        */
+
+
+       Progress.prototype.draw = function (ctx) {
+         try {
+           var percent = Math.min(this.percent, 100);
+           var size = this._size;
+           var half = size / 2;
+           var x = half;
+           var y = half;
+           var rad = half - 1;
+           var fontSize = this._fontSize;
+           ctx.font = fontSize + 'px ' + this._font;
+           var angle = Math.PI * 2 * (percent / 100);
+           ctx.clearRect(0, 0, size, size); // outer circle
+
+           ctx.strokeStyle = '#9f9f9f';
+           ctx.beginPath();
+           ctx.arc(x, y, rad, 0, angle, false);
+           ctx.stroke(); // inner circle
+
+           ctx.strokeStyle = '#eee';
+           ctx.beginPath();
+           ctx.arc(x, y, rad - 1, 0, angle, true);
+           ctx.stroke(); // text
+
+           var text = this._text || (percent | 0) + '%';
+           var w = ctx.measureText(text).width;
+           ctx.fillText(text, x - w / 2 + 1, y + fontSize / 2 - 1);
+         } catch (ignore) {// don't fail if we can't render progress
+         }
+
+         return this;
+       };
+
+       var html$1 = createCommonjsModule(function (module, exports) {
+         /* eslint-env browser */
+
+         /**
+          * @module HTML
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;
+         var EVENT_SUITE_END = constants.EVENT_SUITE_END;
+         var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;
+         var escape = utils.escape;
+         /**
+          * Save timer references to avoid Sinon interfering (see GH-237).
+          */
+
+         var Date = commonjsGlobal.Date;
+         /**
+          * Expose `HTML`.
+          */
+
+         exports = module.exports = HTML;
+         /**
+          * Stats template.
+          */
+
+         var statsTemplate = '<ul id="mocha-stats">' + '<li class="progress"><canvas width="40" height="40"></canvas></li>' + '<li class="passes"><a href="javascript:void(0);">passes:</a> <em>0</em></li>' + '<li class="failures"><a href="javascript:void(0);">failures:</a> <em>0</em></li>' + '<li class="duration">duration: <em>0</em>s</li>' + '</ul>';
+         var playIcon = '&#x2023;';
+         /**
+          * Constructs a new `HTML` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function HTML(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var stats = this.stats;
+           var stat = fragment(statsTemplate);
+           var items = stat.getElementsByTagName('li');
+           var passes = items[1].getElementsByTagName('em')[0];
+           var passesLink = items[1].getElementsByTagName('a')[0];
+           var failures = items[2].getElementsByTagName('em')[0];
+           var failuresLink = items[2].getElementsByTagName('a')[0];
+           var duration = items[3].getElementsByTagName('em')[0];
+           var canvas = stat.getElementsByTagName('canvas')[0];
+           var report = fragment('<ul id="mocha-report"></ul>');
+           var stack = [report];
+           var progress$1;
+           var ctx;
+           var root = document.getElementById('mocha');
+
+           if (canvas.getContext) {
+             var ratio = window.devicePixelRatio || 1;
+             canvas.style.width = canvas.width;
+             canvas.style.height = canvas.height;
+             canvas.width *= ratio;
+             canvas.height *= ratio;
+             ctx = canvas.getContext('2d');
+             ctx.scale(ratio, ratio);
+             progress$1 = new progress();
+           }
+
+           if (!root) {
+             return error('#mocha div missing, add it to your document');
+           } // pass toggle
+
+
+           on(passesLink, 'click', function (evt) {
+             evt.preventDefault();
+             unhide();
+             var name = /pass/.test(report.className) ? '' : ' pass';
+             report.className = report.className.replace(/fail|pass/g, '') + name;
+
+             if (report.className.trim()) {
+               hideSuitesWithout('test pass');
+             }
+           }); // failure toggle
+
+           on(failuresLink, 'click', function (evt) {
+             evt.preventDefault();
+             unhide();
+             var name = /fail/.test(report.className) ? '' : ' fail';
+             report.className = report.className.replace(/fail|pass/g, '') + name;
+
+             if (report.className.trim()) {
+               hideSuitesWithout('test fail');
+             }
+           });
+           root.appendChild(stat);
+           root.appendChild(report);
+
+           if (progress$1) {
+             progress$1.size(40);
+           }
+
+           runner.on(EVENT_SUITE_BEGIN, function (suite) {
+             if (suite.root) {
+               return;
+             } // suite
+
+
+             var url = self.suiteURL(suite);
+             var el = fragment('<li class="suite"><h1><a href="%s">%s</a></h1></li>', url, escape(suite.title)); // container
+
+             stack[0].appendChild(el);
+             stack.unshift(document.createElement('ul'));
+             el.appendChild(stack[0]);
+           });
+           runner.on(EVENT_SUITE_END, function (suite) {
+             if (suite.root) {
+               updateStats();
+               return;
+             }
+
+             stack.shift();
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             var url = self.testURL(test);
+             var markup = '<li class="test pass %e"><h2>%e<span class="duration">%ems</span> ' + '<a href="%s" class="replay">' + playIcon + '</a></h2></li>';
+             var el = fragment(markup, test.speed, test.title, test.duration, url);
+             self.addCodeToggle(el, test.body);
+             appendToStack(el);
+             updateStats();
+           });
+           runner.on(EVENT_TEST_FAIL, function (test) {
+             var el = fragment('<li class="test fail"><h2>%e <a href="%e" class="replay">' + playIcon + '</a></h2></li>', test.title, self.testURL(test));
+             var stackString; // Note: Includes leading newline
+
+             var message = test.err.toString(); // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we
+             // check for the result of the stringifying.
+
+             if (message === '[object Error]') {
+               message = test.err.message;
+             }
+
+             if (test.err.stack) {
+               var indexOfMessage = test.err.stack.indexOf(test.err.message);
+
+               if (indexOfMessage === -1) {
+                 stackString = test.err.stack;
+               } else {
+                 stackString = test.err.stack.substr(test.err.message.length + indexOfMessage);
+               }
+             } else if (test.err.sourceURL && test.err.line !== undefined) {
+               // Safari doesn't give you a stack. Let's at least provide a source line.
+               stackString = '\n(' + test.err.sourceURL + ':' + test.err.line + ')';
+             }
+
+             stackString = stackString || '';
+
+             if (test.err.htmlMessage && stackString) {
+               el.appendChild(fragment('<div class="html-error">%s\n<pre class="error">%e</pre></div>', test.err.htmlMessage, stackString));
+             } else if (test.err.htmlMessage) {
+               el.appendChild(fragment('<div class="html-error">%s</div>', test.err.htmlMessage));
+             } else {
+               el.appendChild(fragment('<pre class="error">%e%e</pre>', message, stackString));
+             }
+
+             self.addCodeToggle(el, test.body);
+             appendToStack(el);
+             updateStats();
+           });
+           runner.on(EVENT_TEST_PENDING, function (test) {
+             var el = fragment('<li class="test pass pending"><h2>%e</h2></li>', test.title);
+             appendToStack(el);
+             updateStats();
+           });
+
+           function appendToStack(el) {
+             // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack.
+             if (stack[0]) {
+               stack[0].appendChild(el);
+             }
+           }
+
+           function updateStats() {
+             // TODO: add to stats
+             var percent = stats.tests / runner.total * 100 | 0;
+
+             if (progress$1) {
+               progress$1.update(percent).draw(ctx);
+             } // update stats
+
+
+             var ms = new Date() - stats.start;
+             text(passes, stats.passes);
+             text(failures, stats.failures);
+             text(duration, (ms / 1000).toFixed(2));
+           }
+         }
+         /**
+          * Makes a URL, preserving querystring ("search") parameters.
+          *
+          * @param {string} s
+          * @return {string} A new URL.
+          */
+
+
+         function makeUrl(s) {
+           var search = window.location.search; // Remove previous grep query parameter if present
+
+           if (search) {
+             search = search.replace(/[?&]grep=[^&\s]*/g, '').replace(/^&/, '?');
+           }
+
+           return window.location.pathname + (search ? search + '&' : '?') + 'grep=' + encodeURIComponent(escapeStringRegexp(s));
+         }
+         /**
+          * Provide suite URL.
+          *
+          * @param {Object} [suite]
+          */
+
+
+         HTML.prototype.suiteURL = function (suite) {
+           return makeUrl(suite.fullTitle());
+         };
+         /**
+          * Provide test URL.
+          *
+          * @param {Object} [test]
+          */
+
+
+         HTML.prototype.testURL = function (test) {
+           return makeUrl(test.fullTitle());
+         };
+         /**
+          * Adds code toggle functionality for the provided test's list element.
+          *
+          * @param {HTMLLIElement} el
+          * @param {string} contents
+          */
+
+
+         HTML.prototype.addCodeToggle = function (el, contents) {
+           var h2 = el.getElementsByTagName('h2')[0];
+           on(h2, 'click', function () {
+             pre.style.display = pre.style.display === 'none' ? 'block' : 'none';
+           });
+           var pre = fragment('<pre><code>%e</code></pre>', utils.clean(contents));
+           el.appendChild(pre);
+           pre.style.display = 'none';
+         };
+         /**
+          * Display error `msg`.
+          *
+          * @param {string} msg
+          */
+
+
+         function error(msg) {
+           document.body.appendChild(fragment('<div id="mocha-error">%s</div>', msg));
+         }
+         /**
+          * Return a DOM fragment from `html`.
+          *
+          * @param {string} html
+          */
+
+
+         function fragment(html) {
+           var args = arguments;
+           var div = document.createElement('div');
+           var i = 1;
+           div.innerHTML = html.replace(/%([se])/g, function (_, type) {
+             switch (type) {
+               case 's':
+                 return String(args[i++]);
+
+               case 'e':
+                 return escape(args[i++]);
+               // no default
+             }
+           });
+           return div.firstChild;
+         }
+         /**
+          * Check for suites that do not have elements
+          * with `classname`, and hide them.
+          *
+          * @param {text} classname
+          */
+
+
+         function hideSuitesWithout(classname) {
+           var suites = document.getElementsByClassName('suite');
+
+           for (var i = 0; i < suites.length; i++) {
+             var els = suites[i].getElementsByClassName(classname);
+
+             if (!els.length) {
+               suites[i].className += ' hidden';
+             }
+           }
+         }
+         /**
+          * Unhide .hidden suites.
+          */
+
+
+         function unhide() {
+           var els = document.getElementsByClassName('suite hidden');
+
+           while (els.length > 0) {
+             els[0].className = els[0].className.replace('suite hidden', 'suite');
+           }
+         }
+         /**
+          * Set an element's text contents.
+          *
+          * @param {HTMLElement} el
+          * @param {string} contents
+          */
+
+
+         function text(el, contents) {
+           if (el.textContent) {
+             el.textContent = contents;
+           } else {
+             el.innerText = contents;
+           }
+         }
+         /**
+          * Listen on `event` with callback `fn`.
+          */
+
+
+         function on(el, event, fn) {
+           if (el.addEventListener) {
+             el.addEventListener(event, fn, false);
+           } else {
+             el.attachEvent('on' + event, fn);
+           }
+         }
+
+         HTML.browserOnly = true;
+       });
+
+       var list = createCommonjsModule(function (module, exports) {
+         /**
+          * @module List
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var inherits = utils.inherits;
+         var constants = runner$1.constants;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_TEST_BEGIN = constants.EVENT_TEST_BEGIN;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;
+         var color = base.color;
+         var cursor = base.cursor;
+         /**
+          * Expose `List`.
+          */
+
+         exports = module.exports = List;
+         /**
+          * Constructs a new `List` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function List(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var n = 0;
+           runner.on(EVENT_RUN_BEGIN, function () {
+             base.consoleLog();
+           });
+           runner.on(EVENT_TEST_BEGIN, function (test) {
+             process$1.stdout.write(color('pass', '    ' + test.fullTitle() + ': '));
+           });
+           runner.on(EVENT_TEST_PENDING, function (test) {
+             var fmt = color('checkmark', '  -') + color('pending', ' %s');
+             base.consoleLog(fmt, test.fullTitle());
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             var fmt = color('checkmark', '  ' + base.symbols.ok) + color('pass', ' %s: ') + color(test.speed, '%dms');
+             cursor.CR();
+             base.consoleLog(fmt, test.fullTitle(), test.duration);
+           });
+           runner.on(EVENT_TEST_FAIL, function (test) {
+             cursor.CR();
+             base.consoleLog(color('fail', '  %d) %s'), ++n, test.fullTitle());
+           });
+           runner.once(EVENT_RUN_END, self.epilogue.bind(self));
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(List, base);
+         List.description = 'like "spec" reporter but flat';
+       });
+
+       var min$7 = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Min
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var inherits = utils.inherits;
+         var constants = runner$1.constants;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         /**
+          * Expose `Min`.
+          */
+
+         exports = module.exports = Min;
+         /**
+          * Constructs a new `Min` reporter instance.
+          *
+          * @description
+          * This minimal test reporter is best used with '--watch'.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function Min(runner, options) {
+           base.call(this, runner, options);
+           runner.on(EVENT_RUN_BEGIN, function () {
+             // clear screen
+             process$1.stdout.write("\x1B[2J"); // set cursor position
+
+             process$1.stdout.write("\x1B[1;3H");
+           });
+           runner.once(EVENT_RUN_END, this.epilogue.bind(this));
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(Min, base);
+         Min.description = 'essentially just a summary';
+       });
+
+       var spec = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Spec
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;
+         var EVENT_SUITE_END = constants.EVENT_SUITE_END;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;
+         var inherits = utils.inherits;
+         var color = base.color;
+         /**
+          * Expose `Spec`.
+          */
+
+         exports = module.exports = Spec;
+         /**
+          * Constructs a new `Spec` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function Spec(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var indents = 0;
+           var n = 0;
+
+           function indent() {
+             return Array(indents).join('  ');
+           }
+
+           runner.on(EVENT_RUN_BEGIN, function () {
+             base.consoleLog();
+           });
+           runner.on(EVENT_SUITE_BEGIN, function (suite) {
+             ++indents;
+             base.consoleLog(color('suite', '%s%s'), indent(), suite.title);
+           });
+           runner.on(EVENT_SUITE_END, function () {
+             --indents;
+
+             if (indents === 1) {
+               base.consoleLog();
+             }
+           });
+           runner.on(EVENT_TEST_PENDING, function (test) {
+             var fmt = indent() + color('pending', '  - %s');
+             base.consoleLog(fmt, test.title);
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             var fmt;
+
+             if (test.speed === 'fast') {
+               fmt = indent() + color('checkmark', '  ' + base.symbols.ok) + color('pass', ' %s');
+               base.consoleLog(fmt, test.title);
+             } else {
+               fmt = indent() + color('checkmark', '  ' + base.symbols.ok) + color('pass', ' %s') + color(test.speed, ' (%dms)');
+               base.consoleLog(fmt, test.title, test.duration);
+             }
+           });
+           runner.on(EVENT_TEST_FAIL, function (test) {
+             base.consoleLog(indent() + color('fail', '  %d) %s'), ++n, test.title);
+           });
+           runner.once(EVENT_RUN_END, self.epilogue.bind(self));
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(Spec, base);
+         Spec.description = 'hierarchical & verbose [default]';
+       });
+
+       var nyan = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Nyan
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var inherits = utils.inherits;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         /**
+          * Expose `Dot`.
+          */
+
+         exports = module.exports = NyanCat;
+         /**
+          * Constructs a new `Nyan` reporter instance.
+          *
+          * @public
+          * @class Nyan
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function NyanCat(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var width = base.window.width * 0.75 | 0;
+           var nyanCatWidth = this.nyanCatWidth = 11;
+           this.colorIndex = 0;
+           this.numberOfLines = 4;
+           this.rainbowColors = self.generateColors();
+           this.scoreboardWidth = 5;
+           this.tick = 0;
+           this.trajectories = [[], [], [], []];
+           this.trajectoryWidthMax = width - nyanCatWidth;
+           runner.on(EVENT_RUN_BEGIN, function () {
+             base.cursor.hide();
+             self.draw();
+           });
+           runner.on(EVENT_TEST_PENDING, function () {
+             self.draw();
+           });
+           runner.on(EVENT_TEST_PASS, function () {
+             self.draw();
+           });
+           runner.on(EVENT_TEST_FAIL, function () {
+             self.draw();
+           });
+           runner.once(EVENT_RUN_END, function () {
+             base.cursor.show();
+
+             for (var i = 0; i < self.numberOfLines; i++) {
+               write('\n');
+             }
+
+             self.epilogue();
+           });
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(NyanCat, base);
+         /**
+          * Draw the nyan cat
+          *
+          * @private
+          */
+
+         NyanCat.prototype.draw = function () {
+           this.appendRainbow();
+           this.drawScoreboard();
+           this.drawRainbow();
+           this.drawNyanCat();
+           this.tick = !this.tick;
+         };
+         /**
+          * Draw the "scoreboard" showing the number
+          * of passes, failures and pending tests.
+          *
+          * @private
+          */
+
+
+         NyanCat.prototype.drawScoreboard = function () {
+           var stats = this.stats;
+
+           function draw(type, n) {
+             write(' ');
+             write(base.color(type, n));
+             write('\n');
+           }
+
+           draw('green', stats.passes);
+           draw('fail', stats.failures);
+           draw('pending', stats.pending);
+           write('\n');
+           this.cursorUp(this.numberOfLines);
+         };
+         /**
+          * Append the rainbow.
+          *
+          * @private
+          */
+
+
+         NyanCat.prototype.appendRainbow = function () {
+           var segment = this.tick ? '_' : '-';
+           var rainbowified = this.rainbowify(segment);
+
+           for (var index = 0; index < this.numberOfLines; index++) {
+             var trajectory = this.trajectories[index];
+
+             if (trajectory.length >= this.trajectoryWidthMax) {
+               trajectory.shift();
+             }
+
+             trajectory.push(rainbowified);
+           }
+         };
+         /**
+          * Draw the rainbow.
+          *
+          * @private
+          */
+
+
+         NyanCat.prototype.drawRainbow = function () {
+           var self = this;
+           this.trajectories.forEach(function (line) {
+             write("\x1B[" + self.scoreboardWidth + 'C');
+             write(line.join(''));
+             write('\n');
+           });
+           this.cursorUp(this.numberOfLines);
+         };
+         /**
+          * Draw the nyan cat
+          *
+          * @private
+          */
+
+
+         NyanCat.prototype.drawNyanCat = function () {
+           var self = this;
+           var startWidth = this.scoreboardWidth + this.trajectories[0].length;
+           var dist = "\x1B[" + startWidth + 'C';
+           var padding = '';
+           write(dist);
+           write('_,------,');
+           write('\n');
+           write(dist);
+           padding = self.tick ? '  ' : '   ';
+           write('_|' + padding + '/\\_/\\ ');
+           write('\n');
+           write(dist);
+           padding = self.tick ? '_' : '__';
+           var tail = self.tick ? '~' : '^';
+           write(tail + '|' + padding + this.face() + ' ');
+           write('\n');
+           write(dist);
+           padding = self.tick ? ' ' : '  ';
+           write(padding + '""  "" ');
+           write('\n');
+           this.cursorUp(this.numberOfLines);
+         };
+         /**
+          * Draw nyan cat face.
+          *
+          * @private
+          * @return {string}
+          */
+
+
+         NyanCat.prototype.face = function () {
+           var stats = this.stats;
+
+           if (stats.failures) {
+             return '( x .x)';
+           } else if (stats.pending) {
+             return '( o .o)';
+           } else if (stats.passes) {
+             return '( ^ .^)';
+           }
+
+           return '( - .-)';
+         };
+         /**
+          * Move cursor up `n`.
+          *
+          * @private
+          * @param {number} n
+          */
+
+
+         NyanCat.prototype.cursorUp = function (n) {
+           write("\x1B[" + n + 'A');
+         };
+         /**
+          * Move cursor down `n`.
+          *
+          * @private
+          * @param {number} n
+          */
+
+
+         NyanCat.prototype.cursorDown = function (n) {
+           write("\x1B[" + n + 'B');
+         };
+         /**
+          * Generate rainbow colors.
+          *
+          * @private
+          * @return {Array}
+          */
+
+
+         NyanCat.prototype.generateColors = function () {
+           var colors = [];
+
+           for (var i = 0; i < 6 * 7; i++) {
+             var pi3 = Math.floor(Math.PI / 3);
+             var n = i * (1.0 / 6);
+             var r = Math.floor(3 * Math.sin(n) + 3);
+             var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3);
+             var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3);
+             colors.push(36 * r + 6 * g + b + 16);
+           }
+
+           return colors;
+         };
+         /**
+          * Apply rainbow to the given `str`.
+          *
+          * @private
+          * @param {string} str
+          * @return {string}
+          */
+
+
+         NyanCat.prototype.rainbowify = function (str) {
+           if (!base.useColors) {
+             return str;
+           }
+
+           var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length];
+           this.colorIndex += 1;
+           return "\x1B[38;5;" + color + 'm' + str + "\x1B[0m";
+         };
+         /**
+          * Stdout helper.
+          *
+          * @param {string} string A message to write to stdout.
+          */
+
+
+         function write(string) {
+           process$1.stdout.write(string);
+         }
+
+         NyanCat.description = '"nyan cat"';
+       });
+
+       var fs = {};
+
+       var xunit = createCommonjsModule(function (module, exports) {
+         /**
+          * @module XUnit
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var createUnsupportedError = errors.createUnsupportedError;
+         var constants = runner$1.constants;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;
+         var STATE_FAILED = runnable.constants.STATE_FAILED;
+         var inherits = utils.inherits;
+         var escape = utils.escape;
+         /**
+          * Save timer references to avoid Sinon interfering (see GH-237).
+          */
+
+         var Date = commonjsGlobal.Date;
+         /**
+          * Expose `XUnit`.
+          */
+
+         exports = module.exports = XUnit;
+         /**
+          * Constructs a new `XUnit` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function XUnit(runner, options) {
+           base.call(this, runner, options);
+           var stats = this.stats;
+           var tests = [];
+           var self = this; // the name of the test suite, as it will appear in the resulting XML file
+
+           var suiteName; // the default name of the test suite if none is provided
+
+           var DEFAULT_SUITE_NAME = 'Mocha Tests';
+
+           if (options && options.reporterOptions) {
+             if (options.reporterOptions.output) {
+               if (!fs.createWriteStream) {
+                 throw createUnsupportedError('file output not supported in browser');
+               }
+
+               fs.mkdirSync(path$1.dirname(options.reporterOptions.output), {
+                 recursive: true
+               });
+               self.fileStream = fs.createWriteStream(options.reporterOptions.output);
+             } // get the suite name from the reporter options (if provided)
+
+
+             suiteName = options.reporterOptions.suiteName;
+           } // fall back to the default suite name
+
+
+           suiteName = suiteName || DEFAULT_SUITE_NAME;
+           runner.on(EVENT_TEST_PENDING, function (test) {
+             tests.push(test);
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             tests.push(test);
+           });
+           runner.on(EVENT_TEST_FAIL, function (test) {
+             tests.push(test);
+           });
+           runner.once(EVENT_RUN_END, function () {
+             self.write(tag('testsuite', {
+               name: suiteName,
+               tests: stats.tests,
+               failures: 0,
+               errors: stats.failures,
+               skipped: stats.tests - stats.failures - stats.passes,
+               timestamp: new Date().toUTCString(),
+               time: stats.duration / 1000 || 0
+             }, false));
+             tests.forEach(function (t) {
+               self.test(t);
+             });
+             self.write('</testsuite>');
+           });
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(XUnit, base);
+         /**
+          * Override done to close the stream (if it's a file).
+          *
+          * @param failures
+          * @param {Function} fn
+          */
+
+         XUnit.prototype.done = function (failures, fn) {
+           if (this.fileStream) {
+             this.fileStream.end(function () {
+               fn(failures);
+             });
+           } else {
+             fn(failures);
+           }
+         };
+         /**
+          * Write out the given line.
+          *
+          * @param {string} line
+          */
+
+
+         XUnit.prototype.write = function (line) {
+           if (this.fileStream) {
+             this.fileStream.write(line + '\n');
+           } else if (_typeof(process$1) === 'object' && process$1.stdout) {
+             process$1.stdout.write(line + '\n');
+           } else {
+             base.consoleLog(line);
+           }
+         };
+         /**
+          * Output tag for the given `test.`
+          *
+          * @param {Test} test
+          */
+
+
+         XUnit.prototype.test = function (test) {
+           base.useColors = false;
+           var attrs = {
+             classname: test.parent.fullTitle(),
+             name: test.title,
+             time: test.duration / 1000 || 0
+           };
+
+           if (test.state === STATE_FAILED) {
+             var err = test.err;
+             var diff = !base.hideDiff && base.showDiff(err) ? '\n' + base.generateDiff(err.actual, err.expected) : '';
+             this.write(tag('testcase', attrs, false, tag('failure', {}, false, escape(err.message) + escape(diff) + '\n' + escape(err.stack))));
+           } else if (test.isPending()) {
+             this.write(tag('testcase', attrs, false, tag('skipped', {}, true)));
+           } else {
+             this.write(tag('testcase', attrs, true));
+           }
+         };
+         /**
+          * HTML tag helper.
+          *
+          * @param name
+          * @param attrs
+          * @param close
+          * @param content
+          * @return {string}
+          */
+
+
+         function tag(name, attrs, close, content) {
+           var end = close ? '/>' : '>';
+           var pairs = [];
+           var tag;
+
+           for (var key in attrs) {
+             if (Object.prototype.hasOwnProperty.call(attrs, key)) {
+               pairs.push(key + '="' + escape(attrs[key]) + '"');
+             }
+           }
+
+           tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end;
+
+           if (content) {
+             tag += content + '</' + name + end;
+           }
+
+           return tag;
+         }
+
+         XUnit.description = 'XUnit-compatible XML output';
+       });
+
+       var markdown = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Markdown
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;
+         var EVENT_SUITE_END = constants.EVENT_SUITE_END;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         /**
+          * Constants
+          */
+
+         var SUITE_PREFIX = '$';
+         /**
+          * Expose `Markdown`.
+          */
+
+         exports = module.exports = Markdown;
+         /**
+          * Constructs a new `Markdown` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function Markdown(runner, options) {
+           base.call(this, runner, options);
+           var level = 0;
+           var buf = '';
+
+           function title(str) {
+             return Array(level).join('#') + ' ' + str;
+           }
+
+           function mapTOC(suite, obj) {
+             var ret = obj;
+             var key = SUITE_PREFIX + suite.title;
+             obj = obj[key] = obj[key] || {
+               suite: suite
+             };
+             suite.suites.forEach(function (suite) {
+               mapTOC(suite, obj);
+             });
+             return ret;
+           }
+
+           function stringifyTOC(obj, level) {
+             ++level;
+             var buf = '';
+             var link;
+
+             for (var key in obj) {
+               if (key === 'suite') {
+                 continue;
+               }
+
+               if (key !== SUITE_PREFIX) {
+                 link = ' - [' + key.substring(1) + ']';
+                 link += '(#' + utils.slug(obj[key].suite.fullTitle()) + ')\n';
+                 buf += Array(level).join('  ') + link;
+               }
+
+               buf += stringifyTOC(obj[key], level);
+             }
+
+             return buf;
+           }
+
+           function generateTOC(suite) {
+             var obj = mapTOC(suite, {});
+             return stringifyTOC(obj, 0);
+           }
+
+           generateTOC(runner.suite);
+           runner.on(EVENT_SUITE_BEGIN, function (suite) {
+             ++level;
+             var slug = utils.slug(suite.fullTitle());
+             buf += '<a name="' + slug + '"></a>' + '\n';
+             buf += title(suite.title) + '\n';
+           });
+           runner.on(EVENT_SUITE_END, function () {
+             --level;
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             var code = utils.clean(test.body);
+             buf += test.title + '.\n';
+             buf += '\n```js\n';
+             buf += code + '\n';
+             buf += '```\n\n';
+           });
+           runner.once(EVENT_RUN_END, function () {
+             process$1.stdout.write('# TOC\n');
+             process$1.stdout.write(generateTOC(runner.suite));
+             process$1.stdout.write(buf);
+           });
+         }
+
+         Markdown.description = 'GitHub Flavored Markdown';
+       });
+
+       var progress$1 = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Progress
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         var EVENT_TEST_END = constants.EVENT_TEST_END;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var inherits = utils.inherits;
+         var color = base.color;
+         var cursor = base.cursor;
+         /**
+          * Expose `Progress`.
+          */
+
+         exports = module.exports = Progress;
+         /**
+          * General progress bar color.
+          */
+
+         base.colors.progress = 90;
+         /**
+          * Constructs a new `Progress` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function Progress(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var width = base.window.width * 0.5 | 0;
+           var total = runner.total;
+           var complete = 0;
+           var lastN = -1; // default chars
+
+           options = options || {};
+           var reporterOptions = options.reporterOptions || {};
+           options.open = reporterOptions.open || '[';
+           options.complete = reporterOptions.complete || '▬';
+           options.incomplete = reporterOptions.incomplete || base.symbols.dot;
+           options.close = reporterOptions.close || ']';
+           options.verbose = reporterOptions.verbose || false; // tests started
+
+           runner.on(EVENT_RUN_BEGIN, function () {
+             process$1.stdout.write('\n');
+             cursor.hide();
+           }); // tests complete
+
+           runner.on(EVENT_TEST_END, function () {
+             complete++;
+             var percent = complete / total;
+             var n = width * percent | 0;
+             var i = width - n;
+
+             if (n === lastN && !options.verbose) {
+               // Don't re-render the line if it hasn't changed
+               return;
+             }
+
+             lastN = n;
+             cursor.CR();
+             process$1.stdout.write("\x1B[J");
+             process$1.stdout.write(color('progress', '  ' + options.open));
+             process$1.stdout.write(Array(n).join(options.complete));
+             process$1.stdout.write(Array(i).join(options.incomplete));
+             process$1.stdout.write(color('progress', options.close));
+
+             if (options.verbose) {
+               process$1.stdout.write(color('progress', ' ' + complete + ' of ' + total));
+             }
+           }); // tests are complete, output some stats
+           // and the failures if any
+
+           runner.once(EVENT_RUN_END, function () {
+             cursor.show();
+             process$1.stdout.write('\n');
+             self.epilogue();
+           });
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(Progress, base);
+         Progress.description = 'a progress bar';
+       });
+
+       var landing = createCommonjsModule(function (module, exports) {
+         /**
+          * @module Landing
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var inherits = utils.inherits;
+         var constants = runner$1.constants;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         var EVENT_TEST_END = constants.EVENT_TEST_END;
+         var STATE_FAILED = runnable.constants.STATE_FAILED;
+         var cursor = base.cursor;
+         var color = base.color;
+         /**
+          * Expose `Landing`.
+          */
+
+         exports = module.exports = Landing;
+         /**
+          * Airplane color.
+          */
+
+         base.colors.plane = 0;
+         /**
+          * Airplane crash color.
+          */
+
+         base.colors['plane crash'] = 31;
+         /**
+          * Runway color.
+          */
+
+         base.colors.runway = 90;
+         /**
+          * Constructs a new `Landing` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function Landing(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var width = base.window.width * 0.75 | 0;
+           var stream = process$1.stdout;
+           var plane = color('plane', '✈');
+           var crashed = -1;
+           var n = 0;
+           var total = 0;
+
+           function runway() {
+             var buf = Array(width).join('-');
+             return '  ' + color('runway', buf);
+           }
+
+           runner.on(EVENT_RUN_BEGIN, function () {
+             stream.write('\n\n\n  ');
+             cursor.hide();
+           });
+           runner.on(EVENT_TEST_END, function (test) {
+             // check if the plane crashed
+             var col = crashed === -1 ? width * ++n / ++total | 0 : crashed; // show the crash
+
+             if (test.state === STATE_FAILED) {
+               plane = color('plane crash', '✈');
+               crashed = col;
+             } // render landing strip
+
+
+             stream.write("\x1B[" + (width + 1) + "D\x1B[2A");
+             stream.write(runway());
+             stream.write('\n  ');
+             stream.write(color('runway', Array(col).join('⋅')));
+             stream.write(plane);
+             stream.write(color('runway', Array(width - col).join('⋅') + '\n'));
+             stream.write(runway());
+             stream.write("\x1B[0m");
+           });
+           runner.once(EVENT_RUN_END, function () {
+             cursor.show();
+             process$1.stdout.write('\n');
+             self.epilogue();
+           }); // if cursor is hidden when we ctrl-C, then it will remain hidden unless...
+
+           process$1.once('SIGINT', function () {
+             cursor.show();
+             nextTick(function () {
+               process$1.kill(process$1.pid, 'SIGINT');
+             });
+           });
+         }
+         /**
+          * Inherit from `Base.prototype`.
+          */
+
+
+         inherits(Landing, base);
+         Landing.description = 'Unicode landing strip';
+       });
+
+       var jsonStream = createCommonjsModule(function (module, exports) {
+         /**
+          * @module JSONStream
+          */
+
+         /**
+          * Module dependencies.
+          */
+
+         var constants = runner$1.constants;
+         var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
+         var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
+         var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;
+         var EVENT_RUN_END = constants.EVENT_RUN_END;
+         /**
+          * Expose `JSONStream`.
+          */
+
+         exports = module.exports = JSONStream;
+         /**
+          * Constructs a new `JSONStream` reporter instance.
+          *
+          * @public
+          * @class
+          * @memberof Mocha.reporters
+          * @extends Mocha.reporters.Base
+          * @param {Runner} runner - Instance triggers reporter actions.
+          * @param {Object} [options] - runner options
+          */
+
+         function JSONStream(runner, options) {
+           base.call(this, runner, options);
+           var self = this;
+           var total = runner.total;
+           runner.once(EVENT_RUN_BEGIN, function () {
+             writeEvent(['start', {
+               total: total
+             }]);
+           });
+           runner.on(EVENT_TEST_PASS, function (test) {
+             writeEvent(['pass', clean(test)]);
+           });
+           runner.on(EVENT_TEST_FAIL, function (test, err) {
+             test = clean(test);
+             test.err = err.message;
+             test.stack = err.stack || null;
+             writeEvent(['fail', test]);
+           });
+           runner.once(EVENT_RUN_END, function () {
+             writeEvent(['end', self.stats]);
+           });
+         }
+         /**
+          * Mocha event to be written to the output stream.
+          * @typedef {Array} JSONStream~MochaEvent
+          */
+
+         /**
+          * Writes Mocha event to reporter output stream.
+          *
+          * @private
+          * @param {JSONStream~MochaEvent} event - Mocha event to be output.
+          */
+
+
+         function writeEvent(event) {
+           process$1.stdout.write(JSON.stringify(event) + '\n');
+         }
+         /**
+          * Returns an object literal representation of `test`
+          * free of cyclic properties, etc.
+          *
+          * @private
+          * @param {Test} test - Instance used as data source.
+          * @return {Object} object containing pared-down test instance data
+          */
+
+
+         function clean(test) {
+           return {
+             title: test.title,
+             fullTitle: test.fullTitle(),
+             file: test.file,
+             duration: test.duration,
+             currentRetry: test.currentRetry(),
+             speed: test.speed
+           };
+         }
+
+         JSONStream.description = 'newline delimited JSON events';
+       });
+
+       var reporters = createCommonjsModule(function (module, exports) {
+         // for dynamic (try/catch) requires, which Browserify doesn't handle.
+
+         exports.Base = exports.base = base;
+         exports.Dot = exports.dot = dot;
+         exports.Doc = exports.doc = doc;
+         exports.TAP = exports.tap = tap;
+         exports.JSON = exports.json = json;
+         exports.HTML = exports.html = html$1;
+         exports.List = exports.list = list;
+         exports.Min = exports.min = min$7;
+         exports.Spec = exports.spec = spec;
+         exports.Nyan = exports.nyan = nyan;
+         exports.XUnit = exports.xunit = xunit;
+         exports.Markdown = exports.markdown = markdown;
+         exports.Progress = exports.progress = progress$1;
+         exports.Landing = exports.landing = landing;
+         exports.JSONStream = exports['json-stream'] = jsonStream;
+       });
+
+       var name = "mocha";
+       var version$2 = "8.2.1";
+       var homepage = "https://mochajs.org/";
+       var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
+       var _package = {
+               name: name,
+               version: version$2,
+               homepage: homepage,
+               notifyLogo: notifyLogo
+       };
+
+       var _package$1 = /*#__PURE__*/Object.freeze({
+               __proto__: null,
+               name: name,
+               version: version$2,
+               homepage: homepage,
+               notifyLogo: notifyLogo,
+               'default': _package
+       });
+
+       var require$$10 = getCjsExportFromNamespace(_package$1);
+
+       /**
+        * Web Notifications module.
+        * @module Growl
+        */
+
+       /**
+        * Save timer references to avoid Sinon interfering (see GH-237).
+        */
+
+
+       var Date$2 = commonjsGlobal.Date;
+       var setTimeout$2 = commonjsGlobal.setTimeout;
+       var EVENT_RUN_END = runner$1.constants.EVENT_RUN_END;
+       var isBrowser = utils.isBrowser;
+       /**
+        * Checks if browser notification support exists.
+        *
+        * @public
+        * @see {@link https://caniuse.com/#feat=notifications|Browser support (notifications)}
+        * @see {@link https://caniuse.com/#feat=promises|Browser support (promises)}
+        * @see {@link Mocha#growl}
+        * @see {@link Mocha#isGrowlCapable}
+        * @return {boolean} whether browser notification support exists
+        */
+
+       var isCapable = function isCapable() {
+         var hasNotificationSupport = ('Notification' in window);
+         var hasPromiseSupport = typeof Promise === 'function';
+         return isBrowser() && hasNotificationSupport && hasPromiseSupport;
+       };
+       /**
+        * Implements browser notifications as a pseudo-reporter.
+        *
+        * @public
+        * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/notification|Notification API}
+        * @see {@link https://developers.google.com/web/fundamentals/push-notifications/display-a-notification|Displaying a Notification}
+        * @see {@link Growl#isPermitted}
+        * @see {@link Mocha#_growl}
+        * @param {Runner} runner - Runner instance.
+        */
+
+
+       var notify$2 = function notify(runner) {
+         var promise = isPermitted();
+         /**
+          * Attempt notification.
+          */
+
+         var sendNotification = function sendNotification() {
+           // If user hasn't responded yet... "No notification for you!" (Seinfeld)
+           Promise.race([promise, Promise.resolve(undefined)]).then(canNotify).then(function () {
+             display(runner);
+           })["catch"](notPermitted);
+         };
+
+         runner.once(EVENT_RUN_END, sendNotification);
+       };
+       /**
+        * Checks if browser notification is permitted by user.
+        *
+        * @private
+        * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission|Notification.permission}
+        * @see {@link Mocha#growl}
+        * @see {@link Mocha#isGrowlPermitted}
+        * @returns {Promise<boolean>} promise determining if browser notification
+        *     permissible when fulfilled.
+        */
+
+
+       function isPermitted() {
+         var permitted = {
+           granted: function allow() {
+             return Promise.resolve(true);
+           },
+           denied: function deny() {
+             return Promise.resolve(false);
+           },
+           "default": function ask() {
+             return Notification.requestPermission().then(function (permission) {
+               return permission === 'granted';
+             });
+           }
+         };
+         return permitted[Notification.permission]();
+       }
+       /**
+        * @summary
+        * Determines if notification should proceed.
+        *
+        * @description
+        * Notification shall <strong>not</strong> proceed unless `value` is true.
+        *
+        * `value` will equal one of:
+        * <ul>
+        *   <li><code>true</code> (from `isPermitted`)</li>
+        *   <li><code>false</code> (from `isPermitted`)</li>
+        *   <li><code>undefined</code> (from `Promise.race`)</li>
+        * </ul>
+        *
+        * @private
+        * @param {boolean|undefined} value - Determines if notification permissible.
+        * @returns {Promise<undefined>} Notification can proceed
+        */
+
+
+       function canNotify(value) {
+         if (!value) {
+           var why = value === false ? 'blocked' : 'unacknowledged';
+           var reason = 'not permitted by user (' + why + ')';
+           return Promise.reject(new Error(reason));
+         }
+
+         return Promise.resolve();
+       }
+       /**
+        * Displays the notification.
+        *
+        * @private
+        * @param {Runner} runner - Runner instance.
+        */
+
+
+       function display(runner) {
+         var stats = runner.stats;
+         var symbol = {
+           cross: "\u274C",
+           tick: "\u2705"
+         };
+         var logo = require$$10.notifyLogo;
+
+         var _message;
+
+         var message;
+         var title;
+
+         if (stats.failures) {
+           _message = stats.failures + ' of ' + stats.tests + ' tests failed';
+           message = symbol.cross + ' ' + _message;
+           title = 'Failed';
+         } else {
+           _message = stats.passes + ' tests passed in ' + stats.duration + 'ms';
+           message = symbol.tick + ' ' + _message;
+           title = 'Passed';
+         } // Send notification
+
+
+         var options = {
+           badge: logo,
+           body: message,
+           dir: 'ltr',
+           icon: logo,
+           lang: 'en-US',
+           name: 'mocha',
+           requireInteraction: false,
+           timestamp: Date$2.now()
+         };
+         var notification = new Notification(title, options); // Autoclose after brief delay (makes various browsers act same)
+
+         var FORCE_DURATION = 4000;
+         setTimeout$2(notification.close.bind(notification), FORCE_DURATION);
+       }
+       /**
+        * As notifications are tangential to our purpose, just log the error.
+        *
+        * @private
+        * @param {Error} err - Why notification didn't happen.
+        */
+
+
+       function notPermitted(err) {
+         console.error('notification error:', err.message);
+       }
+
+       var growl = {
+         isCapable: isCapable,
+         notify: notify$2
+       };
+
+       var diff$1 = true;
+       var extension = [
+               "js",
+               "cjs",
+               "mjs"
+       ];
+       var reporter = "spec";
+       var slow = 75;
+       var timeout = 2000;
+       var ui = "bdd";
+       var mocharc = {
+               diff: diff$1,
+               extension: extension,
+               "package": "./package.json",
+               reporter: reporter,
+               slow: slow,
+               timeout: timeout,
+               ui: ui,
+               "watch-ignore": [
+               "node_modules",
+               ".git"
+       ]
+       };
+
+       var mocharc$1 = /*#__PURE__*/Object.freeze({
+               __proto__: null,
+               diff: diff$1,
+               extension: extension,
+               reporter: reporter,
+               slow: slow,
+               timeout: timeout,
+               ui: ui,
+               'default': mocharc
+       });
+
+       /**
+        * Provides a factory function for a {@link StatsCollector} object.
+        * @module
+        */
+
+
+       var constants$4 = runner$1.constants;
+       var EVENT_TEST_PASS = constants$4.EVENT_TEST_PASS;
+       var EVENT_TEST_FAIL = constants$4.EVENT_TEST_FAIL;
+       var EVENT_SUITE_BEGIN = constants$4.EVENT_SUITE_BEGIN;
+       var EVENT_RUN_BEGIN = constants$4.EVENT_RUN_BEGIN;
+       var EVENT_TEST_PENDING = constants$4.EVENT_TEST_PENDING;
+       var EVENT_RUN_END$1 = constants$4.EVENT_RUN_END;
+       var EVENT_TEST_END = constants$4.EVENT_TEST_END;
+       /**
+        * Test statistics collector.
+        *
+        * @public
+        * @typedef {Object} StatsCollector
+        * @property {number} suites - integer count of suites run.
+        * @property {number} tests - integer count of tests run.
+        * @property {number} passes - integer count of passing tests.
+        * @property {number} pending - integer count of pending tests.
+        * @property {number} failures - integer count of failed tests.
+        * @property {Date} start - time when testing began.
+        * @property {Date} end - time when testing concluded.
+        * @property {number} duration - number of msecs that testing took.
+        */
+
+       var Date$3 = commonjsGlobal.Date;
+       /**
+        * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`.
+        *
+        * @private
+        * @param {Runner} runner - Runner instance
+        * @throws {TypeError} If falsy `runner`
+        */
+
+       function createStatsCollector(runner) {
+         /**
+          * @type StatsCollector
+          */
+         var stats = {
+           suites: 0,
+           tests: 0,
+           passes: 0,
+           pending: 0,
+           failures: 0
+         };
+
+         if (!runner) {
+           throw new TypeError('Missing runner argument');
+         }
+
+         runner.stats = stats;
+         runner.once(EVENT_RUN_BEGIN, function () {
+           stats.start = new Date$3();
+         });
+         runner.on(EVENT_SUITE_BEGIN, function (suite) {
+           suite.root || stats.suites++;
+         });
+         runner.on(EVENT_TEST_PASS, function () {
+           stats.passes++;
+         });
+         runner.on(EVENT_TEST_FAIL, function () {
+           stats.failures++;
+         });
+         runner.on(EVENT_TEST_PENDING, function () {
+           stats.pending++;
+         });
+         runner.on(EVENT_TEST_END, function () {
+           stats.tests++;
+         });
+         runner.once(EVENT_RUN_END$1, function () {
+           stats.end = new Date$3();
+           stats.duration = stats.end - stats.start;
+         });
+       }
+
+       var statsCollector = createStatsCollector;
+
+       var createInvalidArgumentTypeError$1 = errors.createInvalidArgumentTypeError;
+       var isString$1 = utils.isString;
+       var MOCHA_ID_PROP_NAME$1 = utils.constants.MOCHA_ID_PROP_NAME;
+       var test$1 = Test;
+       /**
+        * Initialize a new `Test` with the given `title` and callback `fn`.
+        *
+        * @public
+        * @class
+        * @extends Runnable
+        * @param {String} title - Test title (required)
+        * @param {Function} [fn] - Test callback.  If omitted, the Test is considered "pending"
+        */
+
+       function Test(title, fn) {
+         if (!isString$1(title)) {
+           throw createInvalidArgumentTypeError$1('Test argument "title" should be a string. Received type "' + _typeof(title) + '"', 'title', 'string');
+         }
+
+         this.type = 'test';
+         runnable.call(this, title, fn);
+         this.reset();
+       }
+       /**
+        * Inherit from `Runnable.prototype`.
+        */
+
+
+       utils.inherits(Test, runnable);
+       /**
+        * Resets the state initially or for a next run.
+        */
+
+       Test.prototype.reset = function () {
+         runnable.prototype.reset.call(this);
+         this.pending = !this.fn;
+         delete this.state;
+       };
+       /**
+        * Set or get retried test
+        *
+        * @private
+        */
+
+
+       Test.prototype.retriedTest = function (n) {
+         if (!arguments.length) {
+           return this._retriedTest;
+         }
+
+         this._retriedTest = n;
+       };
+       /**
+        * Add test to the list of tests marked `only`.
+        *
+        * @private
+        */
+
+
+       Test.prototype.markOnly = function () {
+         this.parent.appendOnlyTest(this);
+       };
+
+       Test.prototype.clone = function () {
+         var test = new Test(this.title, this.fn);
+         test.timeout(this.timeout());
+         test.slow(this.slow());
+         test.retries(this.retries());
+         test.currentRetry(this.currentRetry());
+         test.retriedTest(this.retriedTest() || this);
+         test.globals(this.globals());
+         test.parent = this.parent;
+         test.file = this.file;
+         test.ctx = this.ctx;
+         return test;
+       };
+       /**
+        * Returns an minimal object suitable for transmission over IPC.
+        * Functions are represented by keys beginning with `$$`.
+        * @private
+        * @returns {Object}
+        */
+
+
+       Test.prototype.serialize = function serialize() {
+         return _defineProperty({
+           $$currentRetry: this._currentRetry,
+           $$fullTitle: this.fullTitle(),
+           $$isPending: this.pending,
+           $$retriedTest: this._retriedTest || null,
+           $$slow: this._slow,
+           $$titlePath: this.titlePath(),
+           body: this.body,
+           duration: this.duration,
+           err: this.err,
+           parent: _defineProperty({
+             $$fullTitle: this.parent.fullTitle()
+           }, MOCHA_ID_PROP_NAME$1, this.parent.id),
+           speed: this.speed,
+           state: this.state,
+           title: this.title,
+           type: this.type,
+           file: this.file
+         }, MOCHA_ID_PROP_NAME$1, this.id);
+       };
+
+       /**
+        @module interfaces/common
+       */
+
+
+       var createMissingArgumentError$1 = errors.createMissingArgumentError;
+       var createUnsupportedError$2 = errors.createUnsupportedError;
+       var createForbiddenExclusivityError$1 = errors.createForbiddenExclusivityError;
+       /**
+        * Functions common to more than one interface.
+        *
+        * @private
+        * @param {Suite[]} suites
+        * @param {Context} context
+        * @param {Mocha} mocha
+        * @return {Object} An object containing common functions.
+        */
+
+       var common$1 = function common(suites, context, mocha) {
+         /**
+          * Check if the suite should be tested.
+          *
+          * @private
+          * @param {Suite} suite - suite to check
+          * @returns {boolean}
+          */
+         function shouldBeTested(suite) {
+           return !mocha.options.grep || mocha.options.grep && mocha.options.grep.test(suite.fullTitle()) && !mocha.options.invert;
+         }
+
+         return {
+           /**
+            * This is only present if flag --delay is passed into Mocha. It triggers
+            * root suite execution.
+            *
+            * @param {Suite} suite The root suite.
+            * @return {Function} A function which runs the root suite
+            */
+           runWithSuite: function runWithSuite(suite) {
+             return function run() {
+               suite.run();
+             };
+           },
+
+           /**
+            * Execute before running tests.
+            *
+            * @param {string} name
+            * @param {Function} fn
+            */
+           before: function before(name, fn) {
+             suites[0].beforeAll(name, fn);
+           },
+
+           /**
+            * Execute after running tests.
+            *
+            * @param {string} name
+            * @param {Function} fn
+            */
+           after: function after(name, fn) {
+             suites[0].afterAll(name, fn);
+           },
+
+           /**
+            * Execute before each test case.
+            *
+            * @param {string} name
+            * @param {Function} fn
+            */
+           beforeEach: function beforeEach(name, fn) {
+             suites[0].beforeEach(name, fn);
+           },
+
+           /**
+            * Execute after each test case.
+            *
+            * @param {string} name
+            * @param {Function} fn
+            */
+           afterEach: function afterEach(name, fn) {
+             suites[0].afterEach(name, fn);
+           },
+           suite: {
+             /**
+              * Create an exclusive Suite; convenience function
+              * See docstring for create() below.
+              *
+              * @param {Object} opts
+              * @returns {Suite}
+              */
+             only: function only(opts) {
+               if (mocha.options.forbidOnly) {
+                 throw createForbiddenExclusivityError$1(mocha);
+               }
+
+               opts.isOnly = true;
+               return this.create(opts);
+             },
+
+             /**
+              * Create a Suite, but skip it; convenience function
+              * See docstring for create() below.
+              *
+              * @param {Object} opts
+              * @returns {Suite}
+              */
+             skip: function skip(opts) {
+               opts.pending = true;
+               return this.create(opts);
+             },
+
+             /**
+              * Creates a suite.
+              *
+              * @param {Object} opts Options
+              * @param {string} opts.title Title of Suite
+              * @param {Function} [opts.fn] Suite Function (not always applicable)
+              * @param {boolean} [opts.pending] Is Suite pending?
+              * @param {string} [opts.file] Filepath where this Suite resides
+              * @param {boolean} [opts.isOnly] Is Suite exclusive?
+              * @returns {Suite}
+              */
+             create: function create(opts) {
+               var suite$1 = suite.create(suites[0], opts.title);
+               suite$1.pending = Boolean(opts.pending);
+               suite$1.file = opts.file;
+               suites.unshift(suite$1);
+
+               if (opts.isOnly) {
+                 suite$1.markOnly();
+               }
+
+               if (suite$1.pending && mocha.options.forbidPending && shouldBeTested(suite$1)) {
+                 throw createUnsupportedError$2('Pending test forbidden');
+               }
+
+               if (typeof opts.fn === 'function') {
+                 opts.fn.call(suite$1);
+                 suites.shift();
+               } else if (typeof opts.fn === 'undefined' && !suite$1.pending) {
+                 throw createMissingArgumentError$1('Suite "' + suite$1.fullTitle() + '" was defined but no callback was supplied. ' + 'Supply a callback or explicitly skip the suite.', 'callback', 'function');
+               } else if (!opts.fn && suite$1.pending) {
+                 suites.shift();
+               }
+
+               return suite$1;
+             }
+           },
+           test: {
+             /**
+              * Exclusive test-case.
+              *
+              * @param {Object} mocha
+              * @param {Function} test
+              * @returns {*}
+              */
+             only: function only(mocha, test) {
+               if (mocha.options.forbidOnly) {
+                 throw createForbiddenExclusivityError$1(mocha);
+               }
+
+               test.markOnly();
+               return test;
+             },
+
+             /**
+              * Pending test case.
+              *
+              * @param {string} title
+              */
+             skip: function skip(title) {
+               context.test(title);
+             },
+
+             /**
+              * Number of retry attempts
+              *
+              * @param {number} n
+              */
+             retries: function retries(n) {
+               context.retries(n);
+             }
+           }
+         };
+       };
+
+       var EVENT_FILE_PRE_REQUIRE = suite.constants.EVENT_FILE_PRE_REQUIRE;
+       /**
+        * BDD-style interface:
+        *
+        *      describe('Array', function() {
+        *        describe('#indexOf()', function() {
+        *          it('should return -1 when not present', function() {
+        *            // ...
+        *          });
+        *
+        *          it('should return the index when present', function() {
+        *            // ...
+        *          });
+        *        });
+        *      });
+        *
+        * @param {Suite} suite Root suite.
+        */
+
+       var bdd = function bddInterface(suite) {
+         var suites = [suite];
+         suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) {
+           var common = common$1(suites, context, mocha);
+           context.before = common.before;
+           context.after = common.after;
+           context.beforeEach = common.beforeEach;
+           context.afterEach = common.afterEach;
+           context.run = mocha.options.delay && common.runWithSuite(suite);
+           /**
+            * Describe a "suite" with the given `title`
+            * and callback `fn` containing nested suites
+            * and/or tests.
+            */
+
+           context.describe = context.context = function (title, fn) {
+             return common.suite.create({
+               title: title,
+               file: file,
+               fn: fn
+             });
+           };
+           /**
+            * Pending describe.
+            */
+
+
+           context.xdescribe = context.xcontext = context.describe.skip = function (title, fn) {
+             return common.suite.skip({
+               title: title,
+               file: file,
+               fn: fn
+             });
+           };
+           /**
+            * Exclusive suite.
+            */
+
+
+           context.describe.only = function (title, fn) {
+             return common.suite.only({
+               title: title,
+               file: file,
+               fn: fn
+             });
+           };
+           /**
+            * Describe a specification or test-case
+            * with the given `title` and callback `fn`
+            * acting as a thunk.
+            */
+
+
+           context.it = context.specify = function (title, fn) {
+             var suite = suites[0];
+
+             if (suite.isPending()) {
+               fn = null;
+             }
+
+             var test = new test$1(title, fn);
+             test.file = file;
+             suite.addTest(test);
+             return test;
+           };
+           /**
+            * Exclusive test-case.
+            */
+
+
+           context.it.only = function (title, fn) {
+             return common.test.only(mocha, context.it(title, fn));
+           };
+           /**
+            * Pending test case.
+            */
+
+
+           context.xit = context.xspecify = context.it.skip = function (title) {
+             return context.it(title);
+           };
+           /**
+            * Number of attempts to retry.
+            */
+
+
+           context.it.retries = function (n) {
+             context.retries(n);
+           };
+         });
+       };
+
+       var description = 'BDD or RSpec style [default]';
+       bdd.description = description;
+
+       var EVENT_FILE_PRE_REQUIRE$1 = suite.constants.EVENT_FILE_PRE_REQUIRE;
+       /**
+        * TDD-style interface:
+        *
+        *      suite('Array', function() {
+        *        suite('#indexOf()', function() {
+        *          suiteSetup(function() {
+        *
+        *          });
+        *
+        *          test('should return -1 when not present', function() {
+        *
+        *          });
+        *
+        *          test('should return the index when present', function() {
+        *
+        *          });
+        *
+        *          suiteTeardown(function() {
+        *
+        *          });
+        *        });
+        *      });
+        *
+        * @param {Suite} suite Root suite.
+        */
+
+       var tdd = function tdd(suite) {
+         var suites = [suite];
+         suite.on(EVENT_FILE_PRE_REQUIRE$1, function (context, file, mocha) {
+           var common = common$1(suites, context, mocha);
+           context.setup = common.beforeEach;
+           context.teardown = common.afterEach;
+           context.suiteSetup = common.before;
+           context.suiteTeardown = common.after;
+           context.run = mocha.options.delay && common.runWithSuite(suite);
+           /**
+            * Describe a "suite" with the given `title` and callback `fn` containing
+            * nested suites and/or tests.
+            */
+
+           context.suite = function (title, fn) {
+             return common.suite.create({
+               title: title,
+               file: file,
+               fn: fn
+             });
+           };
+           /**
+            * Pending suite.
+            */
+
+
+           context.suite.skip = function (title, fn) {
+             return common.suite.skip({
+               title: title,
+               file: file,
+               fn: fn
+             });
+           };
+           /**
+            * Exclusive test-case.
+            */
+
+
+           context.suite.only = function (title, fn) {
+             return common.suite.only({
+               title: title,
+               file: file,
+               fn: fn
+             });
+           };
+           /**
+            * Describe a specification or test-case with the given `title` and
+            * callback `fn` acting as a thunk.
+            */
+
+
+           context.test = function (title, fn) {
+             var suite = suites[0];
+
+             if (suite.isPending()) {
+               fn = null;
+             }
+
+             var test = new test$1(title, fn);
+             test.file = file;
+             suite.addTest(test);
+             return test;
+           };
+           /**
+            * Exclusive test-case.
+            */
+
+
+           context.test.only = function (title, fn) {
+             return common.test.only(mocha, context.test(title, fn));
+           };
+
+           context.test.skip = common.test.skip;
+           context.test.retries = common.test.retries;
+         });
+       };
+
+       var description$1 = 'traditional "suite"/"test" instead of BDD\'s "describe"/"it"';
+       tdd.description = description$1;
+
+       var EVENT_FILE_PRE_REQUIRE$2 = suite.constants.EVENT_FILE_PRE_REQUIRE;
+       /**
+        * QUnit-style interface:
+        *
+        *     suite('Array');
+        *
+        *     test('#length', function() {
+        *       var arr = [1,2,3];
+        *       ok(arr.length == 3);
+        *     });
+        *
+        *     test('#indexOf()', function() {
+        *       var arr = [1,2,3];
+        *       ok(arr.indexOf(1) == 0);
+        *       ok(arr.indexOf(2) == 1);
+        *       ok(arr.indexOf(3) == 2);
+        *     });
+        *
+        *     suite('String');
+        *
+        *     test('#length', function() {
+        *       ok('foo'.length == 3);
+        *     });
+        *
+        * @param {Suite} suite Root suite.
+        */
+
+       var qunit = function qUnitInterface(suite) {
+         var suites = [suite];
+         suite.on(EVENT_FILE_PRE_REQUIRE$2, function (context, file, mocha) {
+           var common = common$1(suites, context, mocha);
+           context.before = common.before;
+           context.after = common.after;
+           context.beforeEach = common.beforeEach;
+           context.afterEach = common.afterEach;
+           context.run = mocha.options.delay && common.runWithSuite(suite);
+           /**
+            * Describe a "suite" with the given `title`.
+            */
+
+           context.suite = function (title) {
+             if (suites.length > 1) {
+               suites.shift();
+             }
+
+             return common.suite.create({
+               title: title,
+               file: file,
+               fn: false
+             });
+           };
+           /**
+            * Exclusive Suite.
+            */
+
+
+           context.suite.only = function (title) {
+             if (suites.length > 1) {
+               suites.shift();
+             }
+
+             return common.suite.only({
+               title: title,
+               file: file,
+               fn: false
+             });
+           };
+           /**
+            * Describe a specification or test-case
+            * with the given `title` and callback `fn`
+            * acting as a thunk.
+            */
+
+
+           context.test = function (title, fn) {
+             var test = new test$1(title, fn);
+             test.file = file;
+             suites[0].addTest(test);
+             return test;
+           };
+           /**
+            * Exclusive test-case.
+            */
+
+
+           context.test.only = function (title, fn) {
+             return common.test.only(mocha, context.test(title, fn));
+           };
+
+           context.test.skip = common.test.skip;
+           context.test.retries = common.test.retries;
+         });
+       };
+
+       var description$2 = 'QUnit style';
+       qunit.description = description$2;
+
+       /**
+        * Exports-style (as Node.js module) interface:
+        *
+        *     exports.Array = {
+        *       '#indexOf()': {
+        *         'should return -1 when the value is not present': function() {
+        *
+        *         },
+        *
+        *         'should return the correct index when the value is present': function() {
+        *
+        *         }
+        *       }
+        *     };
+        *
+        * @param {Suite} suite Root suite.
+        */
+
+
+       var exports$1 = function exports(suite$1) {
+         var suites = [suite$1];
+         suite$1.on(suite.constants.EVENT_FILE_REQUIRE, visit);
+
+         function visit(obj, file) {
+           var suite$1;
+
+           for (var key in obj) {
+             if (typeof obj[key] === 'function') {
+               var fn = obj[key];
+
+               switch (key) {
+                 case 'before':
+                   suites[0].beforeAll(fn);
+                   break;
+
+                 case 'after':
+                   suites[0].afterAll(fn);
+                   break;
+
+                 case 'beforeEach':
+                   suites[0].beforeEach(fn);
+                   break;
+
+                 case 'afterEach':
+                   suites[0].afterEach(fn);
+                   break;
+
+                 default:
+                   var test = new test$1(key, fn);
+                   test.file = file;
+                   suites[0].addTest(test);
+               }
+             } else {
+               suite$1 = suite.create(suites[0], key);
+               suites.unshift(suite$1);
+               visit(obj[key], file);
+               suites.shift();
+             }
+           }
+         }
+       };
+
+       var description$3 = 'Node.js module ("exports") style';
+       exports$1.description = description$3;
+
+       var bdd$1 = bdd;
+       var tdd$1 = tdd;
+       var qunit$1 = qunit;
+       var exports$2 = exports$1;
+       var interfaces = {
+         bdd: bdd$1,
+         tdd: tdd$1,
+         qunit: qunit$1,
+         exports: exports$2
+       };
+
+       /**
+        * @module Context
+        */
+
+       /**
+        * Expose `Context`.
+        */
+
+       var context = Context;
+       /**
+        * Initialize a new `Context`.
+        *
+        * @private
+        */
+
+       function Context() {}
+       /**
+        * Set or get the context `Runnable` to `runnable`.
+        *
+        * @private
+        * @param {Runnable} runnable
+        * @return {Context} context
+        */
+
+
+       Context.prototype.runnable = function (runnable) {
+         if (!arguments.length) {
+           return this._runnable;
+         }
+
+         this.test = this._runnable = runnable;
+         return this;
+       };
+       /**
+        * Set or get test timeout `ms`.
+        *
+        * @private
+        * @param {number} ms
+        * @return {Context} self
+        */
+
+
+       Context.prototype.timeout = function (ms) {
+         if (!arguments.length) {
+           return this.runnable().timeout();
+         }
+
+         this.runnable().timeout(ms);
+         return this;
+       };
+       /**
+        * Set or get test slowness threshold `ms`.
+        *
+        * @private
+        * @param {number} ms
+        * @return {Context} self
+        */
+
+
+       Context.prototype.slow = function (ms) {
+         if (!arguments.length) {
+           return this.runnable().slow();
+         }
+
+         this.runnable().slow(ms);
+         return this;
+       };
+       /**
+        * Mark a test as skipped.
+        *
+        * @private
+        * @throws Pending
+        */
+
+
+       Context.prototype.skip = function () {
+         this.runnable().skip();
+       };
+       /**
+        * Set or get a number of allowed retries on failed tests
+        *
+        * @private
+        * @param {number} n
+        * @return {Context} self
+        */
+
+
+       Context.prototype.retries = function (n) {
+         if (!arguments.length) {
+           return this.runnable().retries();
+         }
+
+         this.runnable().retries(n);
+         return this;
+       };
+
+       var mocharc$2 = getCjsExportFromNamespace(mocharc$1);
+
+       var mocha = createCommonjsModule(function (module, exports) {
+         /*!
+          * mocha
+          * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+          * MIT Licensed
+          */
+
+         var esmUtils = utils.supportsEsModules(true) ? require$$11 : undefined;
+         var warn = errors.warn,
+             createInvalidReporterError = errors.createInvalidReporterError,
+             createInvalidInterfaceError = errors.createInvalidInterfaceError,
+             createMochaInstanceAlreadyDisposedError = errors.createMochaInstanceAlreadyDisposedError,
+             createMochaInstanceAlreadyRunningError = errors.createMochaInstanceAlreadyRunningError,
+             createUnsupportedError = errors.createUnsupportedError;
+         var _Suite$constants = suite.constants,
+             EVENT_FILE_PRE_REQUIRE = _Suite$constants.EVENT_FILE_PRE_REQUIRE,
+             EVENT_FILE_POST_REQUIRE = _Suite$constants.EVENT_FILE_POST_REQUIRE,
+             EVENT_FILE_REQUIRE = _Suite$constants.EVENT_FILE_REQUIRE;
+         var sQuote = utils.sQuote;
+         var debug = browser$2('mocha:mocha');
+         exports = module.exports = Mocha;
+         /**
+          * A Mocha instance is a finite state machine.
+          * These are the states it can be in.
+          * @private
+          */
+
+         var mochaStates = utils.defineConstants({
+           /**
+            * Initial state of the mocha instance
+            * @private
+            */
+           INIT: 'init',
+
+           /**
+            * Mocha instance is running tests
+            * @private
+            */
+           RUNNING: 'running',
+
+           /**
+            * Mocha instance is done running tests and references to test functions and hooks are cleaned.
+            * You can reset this state by unloading the test files.
+            * @private
+            */
+           REFERENCES_CLEANED: 'referencesCleaned',
+
+           /**
+            * Mocha instance is disposed and can no longer be used.
+            * @private
+            */
+           DISPOSED: 'disposed'
+         });
+         /**
+          * To require local UIs and reporters when running in node.
+          */
+
+         if (!utils.isBrowser() && typeof module.paths !== 'undefined') {
+           var cwd = utils.cwd();
+           module.paths.push(cwd, path$1.join(cwd, 'node_modules'));
+         }
+         /**
+          * Expose internals.
+          * @private
+          */
+
+
+         exports.utils = utils;
+         exports.interfaces = interfaces;
+         /**
+          * @public
+          * @memberof Mocha
+          */
+
+         exports.reporters = reporters;
+         exports.Runnable = runnable;
+         exports.Context = context;
+         /**
+          *
+          * @memberof Mocha
+          */
+
+         exports.Runner = runner$1;
+         exports.Suite = suite;
+         exports.Hook = hook;
+         exports.Test = test$1;
+         /**
+          * Constructs a new Mocha instance with `options`.
+          *
+          * @public
+          * @class Mocha
+          * @param {Object} [options] - Settings object.
+          * @param {boolean} [options.allowUncaught] - Propagate uncaught errors?
+          * @param {boolean} [options.asyncOnly] - Force `done` callback or promise?
+          * @param {boolean} [options.bail] - Bail after first test failure?
+          * @param {boolean} [options.checkLeaks] - Check for global variable leaks?
+          * @param {boolean} [options.color] - Color TTY output from reporter?
+          * @param {boolean} [options.delay] - Delay root suite execution?
+          * @param {boolean} [options.diff] - Show diff on failure?
+          * @param {string} [options.fgrep] - Test filter given string.
+          * @param {boolean} [options.forbidOnly] - Tests marked `only` fail the suite?
+          * @param {boolean} [options.forbidPending] - Pending tests fail the suite?
+          * @param {boolean} [options.fullTrace] - Full stacktrace upon failure?
+          * @param {string[]} [options.global] - Variables expected in global scope.
+          * @param {RegExp|string} [options.grep] - Test filter given regular expression.
+          * @param {boolean} [options.growl] - Enable desktop notifications?
+          * @param {boolean} [options.inlineDiffs] - Display inline diffs?
+          * @param {boolean} [options.invert] - Invert test filter matches?
+          * @param {boolean} [options.noHighlighting] - Disable syntax highlighting?
+          * @param {string|constructor} [options.reporter] - Reporter name or constructor.
+          * @param {Object} [options.reporterOption] - Reporter settings object.
+          * @param {number} [options.retries] - Number of times to retry failed tests.
+          * @param {number} [options.slow] - Slow threshold value.
+          * @param {number|string} [options.timeout] - Timeout threshold value.
+          * @param {string} [options.ui] - Interface name.
+          * @param {boolean} [options.parallel] - Run jobs in parallel
+          * @param {number} [options.jobs] - Max number of worker processes for parallel runs
+          * @param {MochaRootHookObject} [options.rootHooks] - Hooks to bootstrap the root
+          * suite with
+          * @param {boolean} [options.isWorker] - Should be `true` if `Mocha` process is running in a worker process.
+          */
+
+         function Mocha() {
+           var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+           options = _objectSpread2(_objectSpread2({}, mocharc$2), options);
+           this.files = [];
+           this.options = options; // root suite
+
+           this.suite = new exports.Suite('', new exports.Context(), true);
+           this._cleanReferencesAfterRun = true;
+           this._state = mochaStates.INIT;
+           this.grep(options.grep).fgrep(options.fgrep).ui(options.ui).reporter(options.reporter, options.reporterOption || options.reporterOptions // reporterOptions was previously the only way to specify options to reporter
+           ).slow(options.slow).global(options.global); // this guard exists because Suite#timeout does not consider `undefined` to be valid input
+
+           if (typeof options.timeout !== 'undefined') {
+             this.timeout(options.timeout === false ? 0 : options.timeout);
+           }
+
+           if ('retries' in options) {
+             this.retries(options.retries);
+           }
+
+           ['allowUncaught', 'asyncOnly', 'bail', 'checkLeaks', 'color', 'delay', 'diff', 'forbidOnly', 'forbidPending', 'fullTrace', 'growl', 'inlineDiffs', 'invert'].forEach(function (opt) {
+             if (options[opt]) {
+               this[opt]();
+             }
+           }, this);
+
+           if (options.rootHooks) {
+             this.rootHooks(options.rootHooks);
+           }
+           /**
+            * The class which we'll instantiate in {@link Mocha#run}.  Defaults to
+            * {@link Runner} in serial mode; changes in parallel mode.
+            * @memberof Mocha
+            * @private
+            */
+
+
+           this._runnerClass = exports.Runner;
+           /**
+            * Whether or not to call {@link Mocha#loadFiles} implicitly when calling
+            * {@link Mocha#run}.  If this is `true`, then it's up to the consumer to call
+            * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}.
+            * @private
+            * @memberof Mocha
+            */
+
+           this._lazyLoadFiles = false;
+           /**
+            * It's useful for a Mocha instance to know if it's running in a worker process.
+            * We could derive this via other means, but it's helpful to have a flag to refer to.
+            * @memberof Mocha
+            * @private
+            */
+
+           this.isWorker = Boolean(options.isWorker);
+           this.globalSetup(options.globalSetup).globalTeardown(options.globalTeardown).enableGlobalSetup(options.enableGlobalSetup).enableGlobalTeardown(options.enableGlobalTeardown);
+
+           if (options.parallel && (typeof options.jobs === 'undefined' || options.jobs > 1)) {
+             debug('attempting to enable parallel mode');
+             this.parallelMode(true);
+           }
+         }
+         /**
+          * Enables or disables bailing on the first failure.
+          *
+          * @public
+          * @see [CLI option](../#-bail-b)
+          * @param {boolean} [bail=true] - Whether to bail on first error.
+          * @returns {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.bail = function (bail) {
+           this.suite.bail(bail !== false);
+           return this;
+         };
+         /**
+          * @summary
+          * Adds `file` to be loaded for execution.
+          *
+          * @description
+          * Useful for generic setup code that must be included within test suite.
+          *
+          * @public
+          * @see [CLI option](../#-file-filedirectoryglob)
+          * @param {string} file - Pathname of file to be loaded.
+          * @returns {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.addFile = function (file) {
+           this.files.push(file);
+           return this;
+         };
+         /**
+          * Sets reporter to `reporter`, defaults to "spec".
+          *
+          * @public
+          * @see [CLI option](../#-reporter-name-r-name)
+          * @see [Reporters](../#reporters)
+          * @param {String|Function} reporterName - Reporter name or constructor.
+          * @param {Object} [reporterOptions] - Options used to configure the reporter.
+          * @returns {Mocha} this
+          * @chainable
+          * @throws {Error} if requested reporter cannot be loaded
+          * @example
+          *
+          * // Use XUnit reporter and direct its output to file
+          * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' });
+          */
+
+
+         Mocha.prototype.reporter = function (reporterName, reporterOptions) {
+           if (typeof reporterName === 'function') {
+             this._reporter = reporterName;
+           } else {
+             reporterName = reporterName || 'spec';
+             var reporter; // Try to load a built-in reporter.
+
+             if (reporters[reporterName]) {
+               reporter = reporters[reporterName];
+             } // Try to load reporters from process.cwd() and node_modules
+
+
+             if (!reporter) {
+               try {
+                 reporter = commonjsRequire(reporterName);
+               } catch (err) {
+                 if (err.code === 'MODULE_NOT_FOUND') {
+                   // Try to load reporters from a path (absolute or relative)
+                   try {
+                     reporter = commonjsRequire(path$1.resolve(utils.cwd(), reporterName));
+                   } catch (_err) {
+                     _err.code === 'MODULE_NOT_FOUND' ? warn(sQuote(reporterName) + ' reporter not found') : warn(sQuote(reporterName) + ' reporter blew up with error:\n' + err.stack);
+                   }
+                 } else {
+                   warn(sQuote(reporterName) + ' reporter blew up with error:\n' + err.stack);
+                 }
+               }
+             }
+
+             if (!reporter) {
+               throw createInvalidReporterError('invalid reporter ' + sQuote(reporterName), reporterName);
+             }
+
+             this._reporter = reporter;
+           }
+
+           this.options.reporterOption = reporterOptions; // alias option name is used in public reporters xunit/tap/progress
+
+           this.options.reporterOptions = reporterOptions;
+           return this;
+         };
+         /**
+          * Sets test UI `name`, defaults to "bdd".
+          *
+          * @public
+          * @see [CLI option](../#-ui-name-u-name)
+          * @see [Interface DSLs](../#interfaces)
+          * @param {string|Function} [ui=bdd] - Interface name or class.
+          * @returns {Mocha} this
+          * @chainable
+          * @throws {Error} if requested interface cannot be loaded
+          */
+
+
+         Mocha.prototype.ui = function (ui) {
+           var bindInterface;
+
+           if (typeof ui === 'function') {
+             bindInterface = ui;
+           } else {
+             ui = ui || 'bdd';
+             bindInterface = exports.interfaces[ui];
+
+             if (!bindInterface) {
+               try {
+                 bindInterface = commonjsRequire(ui);
+               } catch (err) {
+                 throw createInvalidInterfaceError('invalid interface ' + sQuote(ui), ui);
+               }
+             }
+           }
+
+           bindInterface(this.suite);
+           this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) {
+             exports.afterEach = context.afterEach || context.teardown;
+             exports.after = context.after || context.suiteTeardown;
+             exports.beforeEach = context.beforeEach || context.setup;
+             exports.before = context.before || context.suiteSetup;
+             exports.describe = context.describe || context.suite;
+             exports.it = context.it || context.test;
+             exports.xit = context.xit || context.test && context.test.skip;
+             exports.setup = context.setup || context.beforeEach;
+             exports.suiteSetup = context.suiteSetup || context.before;
+             exports.suiteTeardown = context.suiteTeardown || context.after;
+             exports.suite = context.suite || context.describe;
+             exports.teardown = context.teardown || context.afterEach;
+             exports.test = context.test || context.it;
+             exports.run = context.run;
+           });
+           return this;
+         };
+         /**
+          * Loads `files` prior to execution. Does not support ES Modules.
+          *
+          * @description
+          * The implementation relies on Node's `require` to execute
+          * the test interface functions and will be subject to its cache.
+          * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync.
+          *
+          * @private
+          * @see {@link Mocha#addFile}
+          * @see {@link Mocha#run}
+          * @see {@link Mocha#unloadFiles}
+          * @see {@link Mocha#loadFilesAsync}
+          * @param {Function} [fn] - Callback invoked upon completion.
+          */
+
+
+         Mocha.prototype.loadFiles = function (fn) {
+           var self = this;
+           var suite = this.suite;
+           this.files.forEach(function (file) {
+             file = path$1.resolve(file);
+             suite.emit(EVENT_FILE_PRE_REQUIRE, commonjsGlobal, file, self);
+             suite.emit(EVENT_FILE_REQUIRE, commonjsRequire(), file, self);
+             suite.emit(EVENT_FILE_POST_REQUIRE, commonjsGlobal, file, self);
+           });
+           fn && fn();
+         };
+         /**
+          * Loads `files` prior to execution. Supports Node ES Modules.
+          *
+          * @description
+          * The implementation relies on Node's `require` and `import` to execute
+          * the test interface functions and will be subject to its cache.
+          * Supports both CJS and ESM modules.
+          *
+          * @public
+          * @see {@link Mocha#addFile}
+          * @see {@link Mocha#run}
+          * @see {@link Mocha#unloadFiles}
+          * @returns {Promise}
+          * @example
+          *
+          * // loads ESM (and CJS) test files asynchronously, then runs root suite
+          * mocha.loadFilesAsync()
+          *   .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0))
+          *   .catch(() => process.exitCode = 1);
+          */
+
+
+         Mocha.prototype.loadFilesAsync = function () {
+           var self = this;
+           var suite = this.suite;
+           this.lazyLoadFiles(true);
+
+           if (!esmUtils) {
+             return new Promise(function (resolve) {
+               self.loadFiles(resolve);
+             });
+           }
+
+           return esmUtils.loadFilesAsync(this.files, function (file) {
+             suite.emit(EVENT_FILE_PRE_REQUIRE, commonjsGlobal, file, self);
+           }, function (file, resultModule) {
+             suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self);
+             suite.emit(EVENT_FILE_POST_REQUIRE, commonjsGlobal, file, self);
+           });
+         };
+         /**
+          * Removes a previously loaded file from Node's `require` cache.
+          *
+          * @private
+          * @static
+          * @see {@link Mocha#unloadFiles}
+          * @param {string} file - Pathname of file to be unloaded.
+          */
+
+
+         Mocha.unloadFile = function (file) {
+           if (utils.isBrowser()) {
+             throw createUnsupportedError('unloadFile() is only suported in a Node.js environment');
+           }
+
+           return require$$11.unloadFile(file);
+         };
+         /**
+          * Unloads `files` from Node's `require` cache.
+          *
+          * @description
+          * This allows required files to be "freshly" reloaded, providing the ability
+          * to reuse a Mocha instance programmatically.
+          * Note: does not clear ESM module files from the cache
+          *
+          * <strong>Intended for consumers &mdash; not used internally</strong>
+          *
+          * @public
+          * @see {@link Mocha#run}
+          * @returns {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.unloadFiles = function () {
+           if (this._state === mochaStates.DISPOSED) {
+             throw createMochaInstanceAlreadyDisposedError('Mocha instance is already disposed, it cannot be used again.', this._cleanReferencesAfterRun, this);
+           }
+
+           this.files.forEach(function (file) {
+             Mocha.unloadFile(file);
+           });
+           this._state = mochaStates.INIT;
+           return this;
+         };
+         /**
+          * Sets `grep` filter after escaping RegExp special characters.
+          *
+          * @public
+          * @see {@link Mocha#grep}
+          * @param {string} str - Value to be converted to a regexp.
+          * @returns {Mocha} this
+          * @chainable
+          * @example
+          *
+          * // Select tests whose full title begins with `"foo"` followed by a period
+          * mocha.fgrep('foo.');
+          */
+
+
+         Mocha.prototype.fgrep = function (str) {
+           if (!str) {
+             return this;
+           }
+
+           return this.grep(new RegExp(escapeStringRegexp(str)));
+         };
+         /**
+          * @summary
+          * Sets `grep` filter used to select specific tests for execution.
+          *
+          * @description
+          * If `re` is a regexp-like string, it will be converted to regexp.
+          * The regexp is tested against the full title of each test (i.e., the
+          * name of the test preceded by titles of each its ancestral suites).
+          * As such, using an <em>exact-match</em> fixed pattern against the
+          * test name itself will not yield any matches.
+          * <br>
+          * <strong>Previous filter value will be overwritten on each call!</strong>
+          *
+          * @public
+          * @see [CLI option](../#-grep-regexp-g-regexp)
+          * @see {@link Mocha#fgrep}
+          * @see {@link Mocha#invert}
+          * @param {RegExp|String} re - Regular expression used to select tests.
+          * @return {Mocha} this
+          * @chainable
+          * @example
+          *
+          * // Select tests whose full title contains `"match"`, ignoring case
+          * mocha.grep(/match/i);
+          * @example
+          *
+          * // Same as above but with regexp-like string argument
+          * mocha.grep('/match/i');
+          * @example
+          *
+          * // ## Anti-example
+          * // Given embedded test `it('only-this-test')`...
+          * mocha.grep('/^only-this-test$/');    // NO! Use `.only()` to do this!
+          */
+
+
+         Mocha.prototype.grep = function (re) {
+           if (utils.isString(re)) {
+             // extract args if it's regex-like, i.e: [string, pattern, flag]
+             var arg = re.match(/^\/(.*)\/(g|i|)$|.*/);
+             this.options.grep = new RegExp(arg[1] || arg[0], arg[2]);
+           } else {
+             this.options.grep = re;
+           }
+
+           return this;
+         };
+         /**
+          * Inverts `grep` matches.
+          *
+          * @public
+          * @see {@link Mocha#grep}
+          * @return {Mocha} this
+          * @chainable
+          * @example
+          *
+          * // Select tests whose full title does *not* contain `"match"`, ignoring case
+          * mocha.grep(/match/i).invert();
+          */
+
+
+         Mocha.prototype.invert = function () {
+           this.options.invert = true;
+           return this;
+         };
+         /**
+          * Enables or disables checking for global variables leaked while running tests.
+          *
+          * @public
+          * @see [CLI option](../#-check-leaks)
+          * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks.
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.checkLeaks = function (checkLeaks) {
+           this.options.checkLeaks = checkLeaks !== false;
+           return this;
+         };
+         /**
+          * Enables or disables whether or not to dispose after each test run.
+          * Disable this to ensure you can run the test suite multiple times.
+          * If disabled, be sure to dispose mocha when you're done to prevent memory leaks.
+          * @public
+          * @see {@link Mocha#dispose}
+          * @param {boolean} cleanReferencesAfterRun
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.cleanReferencesAfterRun = function (cleanReferencesAfterRun) {
+           this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false;
+           return this;
+         };
+         /**
+          * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests.
+          * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector.
+          * @public
+          */
+
+
+         Mocha.prototype.dispose = function () {
+           if (this._state === mochaStates.RUNNING) {
+             throw createMochaInstanceAlreadyRunningError('Cannot dispose while the mocha instance is still running tests.');
+           }
+
+           this.unloadFiles();
+           this._previousRunner && this._previousRunner.dispose();
+           this.suite.dispose();
+           this._state = mochaStates.DISPOSED;
+         };
+         /**
+          * Displays full stack trace upon test failure.
+          *
+          * @public
+          * @see [CLI option](../#-full-trace)
+          * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure.
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.fullTrace = function (fullTrace) {
+           this.options.fullTrace = fullTrace !== false;
+           return this;
+         };
+         /**
+          * Enables desktop notification support if prerequisite software installed.
+          *
+          * @public
+          * @see [CLI option](../#-growl-g)
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.growl = function () {
+           this.options.growl = this.isGrowlCapable();
+
+           if (!this.options.growl) {
+             var detail = utils.isBrowser() ? 'notification support not available in this browser...' : 'notification support prerequisites not installed...';
+             console.error(detail + ' cannot enable!');
+           }
+
+           return this;
+         };
+         /**
+          * @summary
+          * Determines if Growl support seems likely.
+          *
+          * @description
+          * <strong>Not available when run in browser.</strong>
+          *
+          * @private
+          * @see {@link Growl#isCapable}
+          * @see {@link Mocha#growl}
+          * @return {boolean} whether Growl support can be expected
+          */
+
+
+         Mocha.prototype.isGrowlCapable = growl.isCapable;
+         /**
+          * Implements desktop notifications using a pseudo-reporter.
+          *
+          * @private
+          * @see {@link Mocha#growl}
+          * @see {@link Growl#notify}
+          * @param {Runner} runner - Runner instance.
+          */
+
+         Mocha.prototype._growl = growl.notify;
+         /**
+          * Specifies whitelist of variable names to be expected in global scope.
+          *
+          * @public
+          * @see [CLI option](../#-global-variable-name)
+          * @see {@link Mocha#checkLeaks}
+          * @param {String[]|String} global - Accepted global variable name(s).
+          * @return {Mocha} this
+          * @chainable
+          * @example
+          *
+          * // Specify variables to be expected in global scope
+          * mocha.global(['jQuery', 'MyLib']);
+          */
+
+         Mocha.prototype.global = function (global) {
+           this.options.global = (this.options.global || []).concat(global).filter(Boolean).filter(function (elt, idx, arr) {
+             return arr.indexOf(elt) === idx;
+           });
+           return this;
+         }; // for backwards compability, 'globals' is an alias of 'global'
+
+
+         Mocha.prototype.globals = Mocha.prototype.global;
+         /**
+          * Enables or disables TTY color output by screen-oriented reporters.
+          *
+          * @public
+          * @see [CLI option](../#-color-c-colors)
+          * @param {boolean} [color=true] - Whether to enable color output.
+          * @return {Mocha} this
+          * @chainable
+          */
+
+         Mocha.prototype.color = function (color) {
+           this.options.color = color !== false;
+           return this;
+         };
+         /**
+          * Enables or disables reporter to use inline diffs (rather than +/-)
+          * in test failure output.
+          *
+          * @public
+          * @see [CLI option](../#-inline-diffs)
+          * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs.
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.inlineDiffs = function (inlineDiffs) {
+           this.options.inlineDiffs = inlineDiffs !== false;
+           return this;
+         };
+         /**
+          * Enables or disables reporter to include diff in test failure output.
+          *
+          * @public
+          * @see [CLI option](../#-diff)
+          * @param {boolean} [diff=true] - Whether to show diff on failure.
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.diff = function (diff) {
+           this.options.diff = diff !== false;
+           return this;
+         };
+         /**
+          * @summary
+          * Sets timeout threshold value.
+          *
+          * @description
+          * A string argument can use shorthand (such as "2s") and will be converted.
+          * If the value is `0`, timeouts will be disabled.
+          *
+          * @public
+          * @see [CLI option](../#-timeout-ms-t-ms)
+          * @see [Timeouts](../#timeouts)
+          * @param {number|string} msecs - Timeout threshold value.
+          * @return {Mocha} this
+          * @chainable
+          * @example
+          *
+          * // Sets timeout to one second
+          * mocha.timeout(1000);
+          * @example
+          *
+          * // Same as above but using string argument
+          * mocha.timeout('1s');
+          */
+
+
+         Mocha.prototype.timeout = function (msecs) {
+           this.suite.timeout(msecs);
+           return this;
+         };
+         /**
+          * Sets the number of times to retry failed tests.
+          *
+          * @public
+          * @see [CLI option](../#-retries-n)
+          * @see [Retry Tests](../#retry-tests)
+          * @param {number} retry - Number of times to retry failed tests.
+          * @return {Mocha} this
+          * @chainable
+          * @example
+          *
+          * // Allow any failed test to retry one more time
+          * mocha.retries(1);
+          */
+
+
+         Mocha.prototype.retries = function (retry) {
+           this.suite.retries(retry);
+           return this;
+         };
+         /**
+          * Sets slowness threshold value.
+          *
+          * @public
+          * @see [CLI option](../#-slow-ms-s-ms)
+          * @param {number} msecs - Slowness threshold value.
+          * @return {Mocha} this
+          * @chainable
+          * @example
+          *
+          * // Sets "slow" threshold to half a second
+          * mocha.slow(500);
+          * @example
+          *
+          * // Same as above but using string argument
+          * mocha.slow('0.5s');
+          */
+
+
+         Mocha.prototype.slow = function (msecs) {
+           this.suite.slow(msecs);
+           return this;
+         };
+         /**
+          * Forces all tests to either accept a `done` callback or return a promise.
+          *
+          * @public
+          * @see [CLI option](../#-async-only-a)
+          * @param {boolean} [asyncOnly=true] - Whether to force `done` callback or promise.
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.asyncOnly = function (asyncOnly) {
+           this.options.asyncOnly = asyncOnly !== false;
+           return this;
+         };
+         /**
+          * Disables syntax highlighting (in browser).
+          *
+          * @public
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.noHighlighting = function () {
+           this.options.noHighlighting = true;
+           return this;
+         };
+         /**
+          * Enables or disables uncaught errors to propagate.
+          *
+          * @public
+          * @see [CLI option](../#-allow-uncaught)
+          * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors.
+          * @return {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.allowUncaught = function (allowUncaught) {
+           this.options.allowUncaught = allowUncaught !== false;
+           return this;
+         };
+         /**
+          * @summary
+          * Delays root suite execution.
+          *
+          * @description
+          * Used to perform async operations before any suites are run.
+          *
+          * @public
+          * @see [delayed root suite](../#delayed-root-suite)
+          * @returns {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.delay = function delay() {
+           this.options.delay = true;
+           return this;
+         };
+         /**
+          * Causes tests marked `only` to fail the suite.
+          *
+          * @public
+          * @see [CLI option](../#-forbid-only)
+          * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite.
+          * @returns {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.forbidOnly = function (forbidOnly) {
+           this.options.forbidOnly = forbidOnly !== false;
+           return this;
+         };
+         /**
+          * Causes pending tests and tests marked `skip` to fail the suite.
+          *
+          * @public
+          * @see [CLI option](../#-forbid-pending)
+          * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite.
+          * @returns {Mocha} this
+          * @chainable
+          */
+
+
+         Mocha.prototype.forbidPending = function (forbidPending) {
+           this.options.forbidPending = forbidPending !== false;
+           return this;
+         };
+         /**
+          * Throws an error if mocha is in the wrong state to be able to transition to a "running" state.
+          * @private
+          */
+
+
+         Mocha.prototype._guardRunningStateTransition = function () {
+           if (this._state === mochaStates.RUNNING) {
+             throw createMochaInstanceAlreadyRunningError('Mocha instance is currently running tests, cannot start a next test run until this one is done', this);
+           }
+
+           if (this._state === mochaStates.DISPOSED || this._state === mochaStates.REFERENCES_CLEANED) {
+             throw createMochaInstanceAlreadyDisposedError('Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.', this._cleanReferencesAfterRun, this);
+           }
+         };
+         /**
+          * Mocha version as specified by "package.json".
+          *
+          * @name Mocha#version
+          * @type string
+          * @readonly
+          */
+
+
+         Object.defineProperty(Mocha.prototype, 'version', {
+           value: require$$10.version,
+           configurable: false,
+           enumerable: true,
+           writable: false
+         });
+         /**
+          * Callback to be invoked when test execution is complete.
+          *
+          * @private
+          * @callback DoneCB
+          * @param {number} failures - Number of failures that occurred.
+          */
+
+         /**
+          * Runs root suite and invokes `fn()` when complete.
+          *
+          * @description
+          * To run tests multiple times (or to run tests in files that are
+          * already in the `require` cache), make sure to clear them from
+          * the cache first!
+          *
+          * @public
+          * @see {@link Mocha#unloadFiles}
+          * @see {@link Runner#run}
+          * @param {DoneCB} [fn] - Callback invoked when test execution completed.
+          * @returns {Runner} runner instance
+          * @example
+          *
+          * // exit with non-zero status if there were test failures
+          * mocha.run(failures => process.exitCode = failures ? 1 : 0);
+          */
+
+         Mocha.prototype.run = function (fn) {
+           var _this = this;
+
+           this._guardRunningStateTransition();
+
+           this._state = mochaStates.RUNNING;
+
+           if (this._previousRunner) {
+             this._previousRunner.dispose();
+
+             this.suite.reset();
+           }
+
+           if (this.files.length && !this._lazyLoadFiles) {
+             this.loadFiles();
+           }
+
+           var suite = this.suite;
+           var options = this.options;
+           options.files = this.files;
+           var runner = new this._runnerClass(suite, {
+             delay: options.delay,
+             cleanReferencesAfterRun: this._cleanReferencesAfterRun
+           });
+           statsCollector(runner);
+           var reporter = new this._reporter(runner, options);
+           runner.checkLeaks = options.checkLeaks === true;
+           runner.fullStackTrace = options.fullTrace;
+           runner.asyncOnly = options.asyncOnly;
+           runner.allowUncaught = options.allowUncaught;
+           runner.forbidOnly = options.forbidOnly;
+           runner.forbidPending = options.forbidPending;
+
+           if (options.grep) {
+             runner.grep(options.grep, options.invert);
+           }
+
+           if (options.global) {
+             runner.globals(options.global);
+           }
+
+           if (options.growl) {
+             this._growl(runner);
+           }
+
+           if (options.color !== undefined) {
+             exports.reporters.Base.useColors = options.color;
+           }
+
+           exports.reporters.Base.inlineDiffs = options.inlineDiffs;
+           exports.reporters.Base.hideDiff = !options.diff;
+
+           var done = function done(failures) {
+             _this._previousRunner = runner;
+             _this._state = _this._cleanReferencesAfterRun ? mochaStates.REFERENCES_CLEANED : mochaStates.INIT;
+             fn = fn || utils.noop;
+
+             if (typeof reporter.done === 'function') {
+               reporter.done(failures, fn);
+             } else {
+               fn(failures);
+             }
+           };
+
+           var runAsync = /*#__PURE__*/function () {
+             var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(runner) {
+               var context, failureCount;
+               return regeneratorRuntime.wrap(function _callee$(_context) {
+                 while (1) {
+                   switch (_context.prev = _context.next) {
+                     case 0:
+                       if (!(_this.options.enableGlobalSetup && _this.hasGlobalSetupFixtures())) {
+                         _context.next = 6;
+                         break;
+                       }
+
+                       _context.next = 3;
+                       return _this.runGlobalSetup(runner);
+
+                     case 3:
+                       _context.t0 = _context.sent;
+                       _context.next = 7;
+                       break;
+
+                     case 6:
+                       _context.t0 = {};
+
+                     case 7:
+                       context = _context.t0;
+                       _context.next = 10;
+                       return runner.runAsync({
+                         files: _this.files,
+                         options: options
+                       });
+
+                     case 10:
+                       failureCount = _context.sent;
+
+                       if (!(_this.options.enableGlobalTeardown && _this.hasGlobalTeardownFixtures())) {
+                         _context.next = 14;
+                         break;
+                       }
+
+                       _context.next = 14;
+                       return _this.runGlobalTeardown(runner, {
+                         context: context
+                       });
+
+                     case 14:
+                       return _context.abrupt("return", failureCount);
+
+                     case 15:
+                     case "end":
+                       return _context.stop();
+                   }
+                 }
+               }, _callee);
+             }));
+
+             return function runAsync(_x) {
+               return _ref.apply(this, arguments);
+             };
+           }(); // no "catch" here is intentional. errors coming out of
+           // Runner#run are considered uncaught/unhandled and caught
+           // by the `process` event listeners.
+           // also: returning anything other than `runner` would be a breaking
+           // change
+
+
+           runAsync(runner).then(done);
+           return runner;
+         };
+         /**
+          * Assigns hooks to the root suite
+          * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite
+          * @chainable
+          */
+
+
+         Mocha.prototype.rootHooks = function rootHooks() {
+           var _this2 = this;
+
+           var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
+               _ref2$beforeAll = _ref2.beforeAll,
+               beforeAll = _ref2$beforeAll === void 0 ? [] : _ref2$beforeAll,
+               _ref2$beforeEach = _ref2.beforeEach,
+               beforeEach = _ref2$beforeEach === void 0 ? [] : _ref2$beforeEach,
+               _ref2$afterAll = _ref2.afterAll,
+               afterAll = _ref2$afterAll === void 0 ? [] : _ref2$afterAll,
+               _ref2$afterEach = _ref2.afterEach,
+               afterEach = _ref2$afterEach === void 0 ? [] : _ref2$afterEach;
+
+           beforeAll = utils.castArray(beforeAll);
+           beforeEach = utils.castArray(beforeEach);
+           afterAll = utils.castArray(afterAll);
+           afterEach = utils.castArray(afterEach);
+           beforeAll.forEach(function (hook) {
+             _this2.suite.beforeAll(hook);
+           });
+           beforeEach.forEach(function (hook) {
+             _this2.suite.beforeEach(hook);
+           });
+           afterAll.forEach(function (hook) {
+             _this2.suite.afterAll(hook);
+           });
+           afterEach.forEach(function (hook) {
+             _this2.suite.afterEach(hook);
+           });
+           return this;
+         };
+         /**
+          * Toggles parallel mode.
+          *
+          * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to
+          * use; also enables lazy file loading if not already done so.
+          *
+          * Warning: when passed `false` and lazy loading has been enabled _via any means_ (including calling `parallelMode(true)`), this method will _not_ disable lazy loading. Lazy loading is a prerequisite for parallel
+          * mode, but parallel mode is _not_ a prerequisite for lazy loading!
+          * @param {boolean} [enable] - If `true`, enable; otherwise disable.
+          * @throws If run in browser
+          * @throws If Mocha not in `INIT` state
+          * @returns {Mocha}
+          * @chainable
+          * @public
+          */
+
+
+         Mocha.prototype.parallelMode = function parallelMode() {
+           var enable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
+
+           if (utils.isBrowser()) {
+             throw createUnsupportedError('parallel mode is only supported in Node.js');
+           }
+
+           var parallel = Boolean(enable);
+
+           if (parallel === this.options.parallel && this._lazyLoadFiles && this._runnerClass !== exports.Runner) {
+             return this;
+           }
+
+           if (this._state !== mochaStates.INIT) {
+             throw createUnsupportedError('cannot change parallel mode after having called run()');
+           }
+
+           this.options.parallel = parallel; // swap Runner class
+
+           this._runnerClass = parallel ? require$$11 : exports.Runner; // lazyLoadFiles may have been set `true` otherwise (for ESM loading),
+           // so keep `true` if so.
+
+           return this.lazyLoadFiles(this._lazyLoadFiles || parallel);
+         };
+         /**
+          * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This
+          * setting is used by watch mode, parallel mode, and for loading ESM files.
+          * @todo This should throw if we've already loaded files; such behavior
+          * necessitates adding a new state.
+          * @param {boolean} [enable] - If `true`, disable eager loading of files in
+          * {@link Mocha#run}
+          * @chainable
+          * @public
+          */
+
+
+         Mocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) {
+           this._lazyLoadFiles = enable === true;
+           debug('set lazy load to %s', enable);
+           return this;
+         };
+         /**
+          * Configures one or more global setup fixtures.
+          *
+          * If given no parameters, _unsets_ any previously-set fixtures.
+          * @chainable
+          * @public
+          * @param {MochaGlobalFixture|MochaGlobalFixture[]} [setupFns] - Global setup fixture(s)
+          * @returns {Mocha}
+          */
+
+
+         Mocha.prototype.globalSetup = function globalSetup() {
+           var setupFns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+           setupFns = utils.castArray(setupFns);
+           this.options.globalSetup = setupFns;
+           debug('configured %d global setup functions', setupFns.length);
+           return this;
+         };
+         /**
+          * Configures one or more global teardown fixtures.
+          *
+          * If given no parameters, _unsets_ any previously-set fixtures.
+          * @chainable
+          * @public
+          * @param {MochaGlobalFixture|MochaGlobalFixture[]} [teardownFns] - Global teardown fixture(s)
+          * @returns {Mocha}
+          */
+
+
+         Mocha.prototype.globalTeardown = function globalTeardown() {
+           var teardownFns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+           teardownFns = utils.castArray(teardownFns);
+           this.options.globalTeardown = teardownFns;
+           debug('configured %d global teardown functions', teardownFns.length);
+           return this;
+         };
+         /**
+          * Run any global setup fixtures sequentially, if any.
+          *
+          * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalSetup` option is `false`; see {@link Mocha#enableGlobalSetup}.
+          *
+          * The context object this function resolves with should be consumed by {@link Mocha#runGlobalTeardown}.
+          * @param {object} [context] - Context object if already have one
+          * @public
+          * @returns {Promise<object>} Context object
+          */
+
+
+         Mocha.prototype.runGlobalSetup = /*#__PURE__*/function () {
+           var _runGlobalSetup = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
+             var context,
+                 globalSetup,
+                 _args2 = arguments;
+             return regeneratorRuntime.wrap(function _callee2$(_context2) {
+               while (1) {
+                 switch (_context2.prev = _context2.next) {
+                   case 0:
+                     context = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
+                     globalSetup = this.options.globalSetup;
+
+                     if (!(globalSetup && globalSetup.length)) {
+                       _context2.next = 7;
+                       break;
+                     }
+
+                     debug('run(): global setup starting');
+                     _context2.next = 6;
+                     return this._runGlobalFixtures(globalSetup, context);
+
+                   case 6:
+                     debug('run(): global setup complete');
+
+                   case 7:
+                     return _context2.abrupt("return", context);
+
+                   case 8:
+                   case "end":
+                     return _context2.stop();
+                 }
+               }
+             }, _callee2, this);
+           }));
+
+           function runGlobalSetup() {
+             return _runGlobalSetup.apply(this, arguments);
+           }
+
+           return runGlobalSetup;
+         }();
+         /**
+          * Run any global teardown fixtures sequentially, if any.
+          *
+          * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalTeardown` option is `false`; see {@link Mocha#enableGlobalTeardown}.
+          *
+          * Should be called with context object returned by {@link Mocha#runGlobalSetup}, if applicable.
+          * @param {object} [context] - Context object if already have one
+          * @public
+          * @returns {Promise<object>} Context object
+          */
+
+
+         Mocha.prototype.runGlobalTeardown = /*#__PURE__*/function () {
+           var _runGlobalTeardown = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
+             var context,
+                 globalTeardown,
+                 _args3 = arguments;
+             return regeneratorRuntime.wrap(function _callee3$(_context3) {
+               while (1) {
+                 switch (_context3.prev = _context3.next) {
+                   case 0:
+                     context = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
+                     globalTeardown = this.options.globalTeardown;
+
+                     if (!(globalTeardown && globalTeardown.length)) {
+                       _context3.next = 6;
+                       break;
+                     }
+
+                     debug('run(): global teardown starting');
+                     _context3.next = 6;
+                     return this._runGlobalFixtures(globalTeardown, context);
+
+                   case 6:
+                     debug('run(): global teardown complete');
+                     return _context3.abrupt("return", context);
+
+                   case 8:
+                   case "end":
+                     return _context3.stop();
+                 }
+               }
+             }, _callee3, this);
+           }));
+
+           function runGlobalTeardown() {
+             return _runGlobalTeardown.apply(this, arguments);
+           }
+
+           return runGlobalTeardown;
+         }();
+         /**
+          * Run global fixtures sequentially with context `context`
+          * @private
+          * @param {MochaGlobalFixture[]} [fixtureFns] - Fixtures to run
+          * @param {object} [context] - context object
+          * @returns {Promise<object>} context object
+          */
+
+
+         Mocha.prototype._runGlobalFixtures = /*#__PURE__*/function () {
+           var _runGlobalFixtures2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
+             var fixtureFns,
+                 context,
+                 _iteratorNormalCompletion,
+                 _didIteratorError,
+                 _iteratorError,
+                 _iterator,
+                 _step,
+                 _value,
+                 fixtureFn,
+                 _args4 = arguments;
+
+             return regeneratorRuntime.wrap(function _callee4$(_context4) {
+               while (1) {
+                 switch (_context4.prev = _context4.next) {
+                   case 0:
+                     fixtureFns = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : [];
+                     context = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
+                     _iteratorNormalCompletion = true;
+                     _didIteratorError = false;
+                     _context4.prev = 4;
+                     _iterator = _asyncIterator(fixtureFns);
+
+                   case 6:
+                     _context4.next = 8;
+                     return _iterator.next();
+
+                   case 8:
+                     _step = _context4.sent;
+                     _iteratorNormalCompletion = _step.done;
+                     _context4.next = 12;
+                     return _step.value;
+
+                   case 12:
+                     _value = _context4.sent;
+
+                     if (_iteratorNormalCompletion) {
+                       _context4.next = 20;
+                       break;
+                     }
+
+                     fixtureFn = _value;
+                     _context4.next = 17;
+                     return fixtureFn.call(context);
+
+                   case 17:
+                     _iteratorNormalCompletion = true;
+                     _context4.next = 6;
+                     break;
+
+                   case 20:
+                     _context4.next = 26;
+                     break;
+
+                   case 22:
+                     _context4.prev = 22;
+                     _context4.t0 = _context4["catch"](4);
+                     _didIteratorError = true;
+                     _iteratorError = _context4.t0;
+
+                   case 26:
+                     _context4.prev = 26;
+                     _context4.prev = 27;
+
+                     if (!(!_iteratorNormalCompletion && _iterator["return"] != null)) {
+                       _context4.next = 31;
+                       break;
+                     }
+
+                     _context4.next = 31;
+                     return _iterator["return"]();
+
+                   case 31:
+                     _context4.prev = 31;
+
+                     if (!_didIteratorError) {
+                       _context4.next = 34;
+                       break;
+                     }
+
+                     throw _iteratorError;
+
+                   case 34:
+                     return _context4.finish(31);
+
+                   case 35:
+                     return _context4.finish(26);
+
+                   case 36:
+                     return _context4.abrupt("return", context);
+
+                   case 37:
+                   case "end":
+                     return _context4.stop();
+                 }
+               }
+             }, _callee4, null, [[4, 22, 26, 36], [27,, 31, 35]]);
+           }));
+
+           function _runGlobalFixtures() {
+             return _runGlobalFixtures2.apply(this, arguments);
+           }
+
+           return _runGlobalFixtures;
+         }();
+         /**
+          * Toggle execution of any global setup fixture(s)
+          *
+          * @chainable
+          * @public
+          * @param {boolean } [enabled=true] - If `false`, do not run global setup fixture
+          * @returns {Mocha}
+          */
+
+
+         Mocha.prototype.enableGlobalSetup = function enableGlobalSetup() {
+           var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
+           this.options.enableGlobalSetup = Boolean(enabled);
+           return this;
+         };
+         /**
+          * Toggle execution of any global teardown fixture(s)
+          *
+          * @chainable
+          * @public
+          * @param {boolean } [enabled=true] - If `false`, do not run global teardown fixture
+          * @returns {Mocha}
+          */
+
+
+         Mocha.prototype.enableGlobalTeardown = function enableGlobalTeardown() {
+           var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
+           this.options.enableGlobalTeardown = Boolean(enabled);
+           return this;
+         };
+         /**
+          * Returns `true` if one or more global setup fixtures have been supplied.
+          * @public
+          * @returns {boolean}
+          */
+
+
+         Mocha.prototype.hasGlobalSetupFixtures = function hasGlobalSetupFixtures() {
+           return Boolean(this.options.globalSetup.length);
+         };
+         /**
+          * Returns `true` if one or more global teardown fixtures have been supplied.
+          * @public
+          * @returns {boolean}
+          */
+
+
+         Mocha.prototype.hasGlobalTeardownFixtures = function hasGlobalTeardownFixtures() {
+           return Boolean(this.options.globalTeardown.length);
+         };
+         /**
+          * An alternative way to define root hooks that works with parallel runs.
+          * @typedef {Object} MochaRootHookObject
+          * @property {Function|Function[]} [beforeAll] - "Before all" hook(s)
+          * @property {Function|Function[]} [beforeEach] - "Before each" hook(s)
+          * @property {Function|Function[]} [afterAll] - "After all" hook(s)
+          * @property {Function|Function[]} [afterEach] - "After each" hook(s)
+          */
+
+         /**
+          * An function that returns a {@link MochaRootHookObject}, either sync or async.
+            @callback MochaRootHookFunction
+          * @returns {MochaRootHookObject|Promise<MochaRootHookObject>}
+          */
+
+         /**
+          * A function that's invoked _once_ which is either sync or async.
+          * Can be a "teardown" or "setup".  These will all share the same context.
+          * @callback MochaGlobalFixture
+          * @returns {void|Promise<void>}
+          */
+
+         /**
+          * An object making up all necessary parts of a plugin loader and aggregator
+          * @typedef {Object} PluginDefinition
+          * @property {string} exportName - Named export to use
+          * @property {string} [optionName] - Option name for Mocha constructor (use `exportName` if omitted)
+          * @property {PluginValidator} [validate] - Validator function
+          * @property {PluginFinalizer} [finalize] - Finalizer/aggregator function
+          */
+
+         /**
+          * A (sync) function to assert a user-supplied plugin implementation is valid.
+          *
+          * Defined in a {@link PluginDefinition}.
+          
+          * @callback PluginValidator
+          * @param {*} value - Value to check
+          * @this {PluginDefinition}
+          * @returns {void}
+          */
+
+         /**
+          * A function to finalize plugins impls of a particular ilk
+          * @callback PluginFinalizer
+          * @param {Array<*>} impls - User-supplied implementations
+          * @returns {Promise<*>|*}
+          */
+
+       });
+
+       /* eslint no-unused-vars: off */
+
+       /* eslint-env commonjs */
+
+       /**
+        * Shim process.stdout.
+        */
+
+
+       process$1.stdout = browserStdout({
+         label: false
+       });
+       /**
+        * Create a Mocha instance.
+        *
+        * @return {undefined}
+        */
+
+       var mocha$1 = new mocha({
+         reporter: 'html'
+       });
+       /**
+        * Save timer references to avoid Sinon interfering (see GH-237).
+        */
+
+       var Date$4 = commonjsGlobal.Date;
+       var setTimeout$3 = commonjsGlobal.setTimeout;
+       var uncaughtExceptionHandlers = [];
+       var originalOnerrorHandler = commonjsGlobal.onerror;
+       /**
+        * Remove uncaughtException listener.
+        * Revert to original onerror handler if previously defined.
+        */
+
+       process$1.removeListener = function (e, fn) {
+         if (e === 'uncaughtException') {
+           if (originalOnerrorHandler) {
+             commonjsGlobal.onerror = originalOnerrorHandler;
+           } else {
+             commonjsGlobal.onerror = function () {};
+           }
+
+           var i = uncaughtExceptionHandlers.indexOf(fn);
+
+           if (i !== -1) {
+             uncaughtExceptionHandlers.splice(i, 1);
+           }
+         }
+       };
+       /**
+        * Implements listenerCount for 'uncaughtException'.
+        */
+
+
+       process$1.listenerCount = function (name) {
+         if (name === 'uncaughtException') {
+           return uncaughtExceptionHandlers.length;
+         }
+
+         return 0;
+       };
+       /**
+        * Implements uncaughtException listener.
+        */
+
+
+       process$1.on = function (e, fn) {
+         if (e === 'uncaughtException') {
+           commonjsGlobal.onerror = function (err, url, line) {
+             fn(new Error(err + ' (' + url + ':' + line + ')'));
+             return !mocha$1.options.allowUncaught;
+           };
+
+           uncaughtExceptionHandlers.push(fn);
+         }
+       };
+
+       process$1.listeners = function (e) {
+         if (e === 'uncaughtException') {
+           return uncaughtExceptionHandlers;
+         }
+
+         return [];
+       }; // The BDD UI is registered by default, but no UI will be functional in the
+       // browser without an explicit call to the overridden `mocha.ui` (see below).
+       // Ensure that this default UI does not expose its methods to the global scope.
+
+
+       mocha$1.suite.removeAllListeners('pre-require');
+       var immediateQueue = [];
+       var immediateTimeout;
+
+       function timeslice() {
+         var immediateStart = new Date$4().getTime();
+
+         while (immediateQueue.length && new Date$4().getTime() - immediateStart < 100) {
+           immediateQueue.shift()();
+         }
+
+         if (immediateQueue.length) {
+           immediateTimeout = setTimeout$3(timeslice, 0);
+         } else {
+           immediateTimeout = null;
+         }
+       }
+       /**
+        * High-performance override of Runner.immediately.
+        */
+
+
+       mocha.Runner.immediately = function (callback) {
+         immediateQueue.push(callback);
+
+         if (!immediateTimeout) {
+           immediateTimeout = setTimeout$3(timeslice, 0);
+         }
+       };
+       /**
+        * Function to allow assertion libraries to throw errors directly into mocha.
+        * This is useful when running tests in a browser because window.onerror will
+        * only receive the 'message' attribute of the Error.
+        */
+
+
+       mocha$1.throwError = function (err) {
+         uncaughtExceptionHandlers.forEach(function (fn) {
+           fn(err);
+         });
+         throw err;
+       };
+       /**
+        * Override ui to ensure that the ui functions are initialized.
+        * Normally this would happen in Mocha.prototype.loadFiles.
+        */
+
+
+       mocha$1.ui = function (ui) {
+         mocha.prototype.ui.call(this, ui);
+         this.suite.emit('pre-require', commonjsGlobal, null, this);
+         return this;
+       };
+       /**
+        * Setup mocha with the given setting options.
+        */
+
+
+       mocha$1.setup = function (opts) {
+         if (typeof opts === 'string') {
+           opts = {
+             ui: opts
+           };
+         }
+
+         if (opts.delay === true) {
+           this.delay();
+         }
+
+         var self = this;
+         Object.keys(opts).filter(function (opt) {
+           return opt !== 'delay';
+         }).forEach(function (opt) {
+           if (Object.prototype.hasOwnProperty.call(opts, opt)) {
+             self[opt](opts[opt]);
+           }
+         });
+         return this;
+       };
+       /**
+        * Run mocha, returning the Runner.
+        */
+
+
+       mocha$1.run = function (fn) {
+         var options = mocha$1.options;
+         mocha$1.globals('location');
+         var query = parseQuery(commonjsGlobal.location.search || '');
+
+         if (query.grep) {
+           mocha$1.grep(query.grep);
+         }
+
+         if (query.fgrep) {
+           mocha$1.fgrep(query.fgrep);
+         }
+
+         if (query.invert) {
+           mocha$1.invert();
+         }
+
+         return mocha.prototype.run.call(mocha$1, function (err) {
+           // The DOM Document is not available in Web Workers.
+           var document = commonjsGlobal.document;
+
+           if (document && document.getElementById('mocha') && options.noHighlighting !== true) {
+             highlightTags('code');
+           }
+
+           if (fn) {
+             fn(err);
+           }
+         });
+       };
+       /**
+        * Expose the process shim.
+        * https://github.com/mochajs/mocha/pull/916
+        */
+
+
+       mocha.process = process$1;
+       /**
+        * Expose mocha.
+        */
+
+       commonjsGlobal.Mocha = mocha;
+       commonjsGlobal.mocha = mocha$1; // this allows test/acceptance/required-tokens.js to pass; thus,
+       // you can now do `const describe = require('mocha').describe` in a
+       // browser context (assuming browserification).  should fix #880
+
+       var browserEntry = Object.assign(mocha$1, commonjsGlobal);
+
+       return browserEntry;
+
+})));
+//# sourceMappingURL=mocha.js.map
diff --git a/lwnode/apps/sqlite3/sample/script/lib/mocha.js.map b/lwnode/apps/sqlite3/sample/script/lib/mocha.js.map
new file mode 100644 (file)
index 0000000..80acb9d
--- /dev/null
@@ -0,0 +1 @@
+{"version":3,"file":"mocha.js","sources":["node_modules/core-js/internals/global.js","node_modules/core-js/internals/fails.js","node_modules/core-js/internals/descriptors.js","node_modules/core-js/internals/object-property-is-enumerable.js","node_modules/core-js/internals/create-property-descriptor.js","node_modules/core-js/internals/classof-raw.js","node_modules/core-js/internals/indexed-object.js","node_modules/core-js/internals/require-object-coercible.js","node_modules/core-js/internals/to-indexed-object.js","node_modules/core-js/internals/is-object.js","node_modules/core-js/internals/to-primitive.js","node_modules/core-js/internals/has.js","node_modules/core-js/internals/document-create-element.js","node_modules/core-js/internals/ie8-dom-define.js","node_modules/core-js/internals/object-get-own-property-descriptor.js","node_modules/core-js/internals/an-object.js","node_modules/core-js/internals/object-define-property.js","node_modules/core-js/internals/create-non-enumerable-property.js","node_modules/core-js/internals/set-global.js","node_modules/core-js/internals/shared-store.js","node_modules/core-js/internals/inspect-source.js","node_modules/core-js/internals/native-weak-map.js","node_modules/core-js/internals/shared.js","node_modules/core-js/internals/uid.js","node_modules/core-js/internals/shared-key.js","node_modules/core-js/internals/hidden-keys.js","node_modules/core-js/internals/internal-state.js","node_modules/core-js/internals/redefine.js","node_modules/core-js/internals/path.js","node_modules/core-js/internals/get-built-in.js","node_modules/core-js/internals/to-integer.js","node_modules/core-js/internals/to-length.js","node_modules/core-js/internals/to-absolute-index.js","node_modules/core-js/internals/array-includes.js","node_modules/core-js/internals/object-keys-internal.js","node_modules/core-js/internals/enum-bug-keys.js","node_modules/core-js/internals/object-get-own-property-names.js","node_modules/core-js/internals/object-get-own-property-symbols.js","node_modules/core-js/internals/own-keys.js","node_modules/core-js/internals/copy-constructor-properties.js","node_modules/core-js/internals/is-forced.js","node_modules/core-js/internals/export.js","node_modules/core-js/internals/a-function.js","node_modules/core-js/internals/function-bind-context.js","node_modules/core-js/internals/to-object.js","node_modules/core-js/internals/is-array.js","node_modules/core-js/internals/native-symbol.js","node_modules/core-js/internals/use-symbol-as-uid.js","node_modules/core-js/internals/well-known-symbol.js","node_modules/core-js/internals/array-species-create.js","node_modules/core-js/internals/array-iteration.js","node_modules/core-js/internals/engine-user-agent.js","node_modules/core-js/internals/engine-v8-version.js","node_modules/core-js/internals/array-method-has-species-support.js","node_modules/core-js/internals/array-method-uses-to-length.js","node_modules/core-js/modules/es.array.filter.js","node_modules/core-js/internals/array-method-is-strict.js","node_modules/core-js/internals/array-for-each.js","node_modules/core-js/modules/es.array.for-each.js","node_modules/core-js/modules/es.array.index-of.js","node_modules/core-js/internals/create-property.js","node_modules/core-js/modules/es.array.splice.js","node_modules/core-js/internals/object-keys.js","node_modules/core-js/internals/object-assign.js","node_modules/core-js/modules/es.object.assign.js","node_modules/core-js/modules/es.object.keys.js","node_modules/core-js/internals/regexp-flags.js","node_modules/core-js/internals/regexp-sticky-helpers.js","node_modules/core-js/internals/regexp-exec.js","node_modules/core-js/modules/es.regexp.exec.js","node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","node_modules/core-js/internals/same-value.js","node_modules/core-js/internals/regexp-exec-abstract.js","node_modules/core-js/modules/es.string.search.js","node_modules/core-js/internals/dom-iterables.js","node_modules/core-js/modules/web.dom-collections.for-each.js","node_modules/core-js/modules/es.array.concat.js","node_modules/rollup-plugin-node-polyfills/polyfills/global.js","node_modules/rollup-plugin-node-globals/src/global.js","node_modules/process-es6/browser.js","node_modules/core-js/internals/to-string-tag-support.js","node_modules/core-js/internals/classof.js","node_modules/core-js/internals/object-to-string.js","node_modules/core-js/modules/es.object.to-string.js","node_modules/core-js/modules/es.regexp.to-string.js","node_modules/core-js/modules/es.function.name.js","node_modules/core-js/internals/correct-prototype-getter.js","node_modules/core-js/internals/object-get-prototype-of.js","node_modules/core-js/modules/es.object.get-prototype-of.js","node_modules/core-js/modules/es.reflect.own-keys.js","node_modules/rollup-plugin-node-polyfills/polyfills/events.js","node_modules/core-js/modules/es.array.join.js","node_modules/core-js/modules/es.array.map.js","node_modules/core-js/internals/array-reduce.js","node_modules/core-js/modules/es.array.reduce.js","node_modules/core-js/internals/a-possible-prototype.js","node_modules/core-js/internals/object-set-prototype-of.js","node_modules/core-js/internals/inherit-if-required.js","node_modules/core-js/internals/object-define-properties.js","node_modules/core-js/internals/html.js","node_modules/core-js/internals/object-create.js","node_modules/core-js/internals/whitespaces.js","node_modules/core-js/internals/string-trim.js","node_modules/core-js/modules/es.number.constructor.js","node_modules/core-js/modules/es.object.get-own-property-descriptor.js","node_modules/core-js/internals/object-get-own-property-names-external.js","node_modules/core-js/modules/es.object.get-own-property-names.js","node_modules/core-js/internals/is-regexp.js","node_modules/core-js/internals/set-species.js","node_modules/core-js/modules/es.regexp.constructor.js","node_modules/core-js/internals/string-multibyte.js","node_modules/core-js/internals/advance-string-index.js","node_modules/core-js/modules/es.string.match.js","node_modules/core-js/modules/es.string.replace.js","node_modules/core-js/internals/species-constructor.js","node_modules/core-js/modules/es.string.split.js","node_modules/core-js/internals/well-known-symbol-wrapped.js","node_modules/core-js/internals/define-well-known-symbol.js","node_modules/core-js/internals/set-to-string-tag.js","node_modules/core-js/modules/es.symbol.js","node_modules/core-js/modules/es.symbol.description.js","node_modules/core-js/modules/es.symbol.species.js","node_modules/core-js/internals/array-fill.js","node_modules/core-js/internals/add-to-unscopables.js","node_modules/core-js/modules/es.array.fill.js","node_modules/core-js/modules/es.array.includes.js","node_modules/core-js/internals/iterators.js","node_modules/core-js/internals/iterators-core.js","node_modules/core-js/internals/create-iterator-constructor.js","node_modules/core-js/internals/define-iterator.js","node_modules/core-js/modules/es.array.iterator.js","node_modules/core-js/internals/array-last-index-of.js","node_modules/core-js/modules/es.array.last-index-of.js","node_modules/core-js/modules/es.array.slice.js","node_modules/core-js/modules/es.array.species.js","node_modules/core-js/internals/array-buffer-native.js","node_modules/core-js/internals/redefine-all.js","node_modules/core-js/internals/an-instance.js","node_modules/core-js/internals/to-index.js","node_modules/core-js/internals/ieee754.js","node_modules/core-js/internals/array-buffer.js","node_modules/core-js/modules/es.array-buffer.constructor.js","node_modules/core-js/internals/not-a-regexp.js","node_modules/core-js/internals/correct-is-regexp-logic.js","node_modules/core-js/modules/es.string.includes.js","node_modules/core-js/internals/string-trim-forced.js","node_modules/core-js/modules/es.string.trim.js","node_modules/core-js/internals/check-correctness-of-iteration.js","node_modules/core-js/internals/array-buffer-view-core.js","node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","node_modules/core-js/internals/to-positive-integer.js","node_modules/core-js/internals/to-offset.js","node_modules/core-js/internals/get-iterator-method.js","node_modules/core-js/internals/is-array-iterator-method.js","node_modules/core-js/internals/typed-array-from.js","node_modules/core-js/internals/typed-array-constructor.js","node_modules/core-js/modules/es.typed-array.uint8-array.js","node_modules/core-js/internals/array-copy-within.js","node_modules/core-js/modules/es.typed-array.copy-within.js","node_modules/core-js/modules/es.typed-array.every.js","node_modules/core-js/modules/es.typed-array.fill.js","node_modules/core-js/modules/es.typed-array.filter.js","node_modules/core-js/modules/es.typed-array.find.js","node_modules/core-js/modules/es.typed-array.find-index.js","node_modules/core-js/modules/es.typed-array.for-each.js","node_modules/core-js/modules/es.typed-array.includes.js","node_modules/core-js/modules/es.typed-array.index-of.js","node_modules/core-js/modules/es.typed-array.iterator.js","node_modules/core-js/modules/es.typed-array.join.js","node_modules/core-js/modules/es.typed-array.last-index-of.js","node_modules/core-js/modules/es.typed-array.map.js","node_modules/core-js/modules/es.typed-array.reduce.js","node_modules/core-js/modules/es.typed-array.reduce-right.js","node_modules/core-js/modules/es.typed-array.reverse.js","node_modules/core-js/modules/es.typed-array.set.js","node_modules/core-js/modules/es.typed-array.slice.js","node_modules/core-js/modules/es.typed-array.some.js","node_modules/core-js/modules/es.typed-array.sort.js","node_modules/core-js/modules/es.typed-array.subarray.js","node_modules/core-js/modules/es.typed-array.to-locale-string.js","node_modules/core-js/modules/es.typed-array.to-string.js","node_modules/core-js/modules/web.url.to-json.js","node_modules/buffer-es6/base64.js","node_modules/buffer-es6/ieee754.js","node_modules/buffer-es6/isArray.js","node_modules/buffer-es6/index.js","node_modules/rollup-plugin-node-polyfills/polyfills/process-es6.js","node_modules/rollup-plugin-node-polyfills/polyfills/inherits.js","node_modules/rollup-plugin-node-polyfills/polyfills/util.js","node_modules/rollup-plugin-node-polyfills/polyfills/buffer-es6.js","node_modules/rollup-plugin-node-polyfills/polyfills/readable-stream/buffer-list.js","node_modules/rollup-plugin-node-polyfills/polyfills/string-decoder.js","node_modules/rollup-plugin-node-polyfills/polyfills/readable-stream/readable.js","node_modules/rollup-plugin-node-polyfills/polyfills/readable-stream/writable.js","node_modules/rollup-plugin-node-polyfills/polyfills/readable-stream/duplex.js","node_modules/rollup-plugin-node-polyfills/polyfills/readable-stream/transform.js","node_modules/rollup-plugin-node-polyfills/polyfills/readable-stream/passthrough.js","node_modules/rollup-plugin-node-polyfills/polyfills/stream.js","node_modules/browser-stdout/index.js","lib/browser/parse-query.js","lib/browser/highlight-tags.js","node_modules/core-js/internals/native-promise-constructor.js","node_modules/core-js/internals/call-with-safe-iteration-closing.js","node_modules/core-js/internals/iterate.js","node_modules/core-js/internals/engine-is-ios.js","node_modules/core-js/internals/task.js","node_modules/core-js/internals/microtask.js","node_modules/core-js/internals/new-promise-capability.js","node_modules/core-js/internals/promise-resolve.js","node_modules/core-js/internals/host-report-errors.js","node_modules/core-js/internals/perform.js","node_modules/core-js/modules/es.promise.js","node_modules/core-js/modules/es.symbol.async-iterator.js","node_modules/core-js/modules/es.symbol.iterator.js","node_modules/core-js/modules/es.symbol.to-string-tag.js","node_modules/core-js/modules/es.json.to-string-tag.js","node_modules/core-js/modules/es.math.to-string-tag.js","node_modules/core-js/modules/es.string.iterator.js","node_modules/core-js/modules/web.dom-collections.iterator.js","node_modules/regenerator-runtime/runtime.js","node_modules/escape-string-regexp/index.js","node_modules/rollup-plugin-node-polyfills/polyfills/path.js","node_modules/core-js/internals/array-from.js","node_modules/core-js/modules/es.array.from.js","node_modules/diff/dist/diff.js","node_modules/ms/index.js","node_modules/core-js/internals/freezing.js","node_modules/core-js/internals/internal-metadata.js","node_modules/core-js/modules/es.object.freeze.js","node_modules/core-js/internals/collection.js","node_modules/core-js/internals/collection-strong.js","node_modules/core-js/modules/es.set.js","node_modules/rollup-plugin-node-globals/src/browser.js","node_modules/nanoid/non-secure/index.js","node_modules/he/he.js","node_modules/core-js/internals/object-to-array.js","node_modules/core-js/modules/es.object.values.js","lib/errors.js","lib/utils.js","node_modules/core-js/modules/es.map.js","lib/pending.js","node_modules/debug/src/common.js","node_modules/debug/src/browser.js","lib/runnable.js","node_modules/core-js/modules/es.array.some.js","lib/hook.js","lib/suite.js","lib/runner.js","lib/reporters/base.js","lib/reporters/dot.js","lib/reporters/doc.js","lib/reporters/tap.js","lib/reporters/json.js","node_modules/core-js/internals/this-number-value.js","node_modules/core-js/internals/string-repeat.js","node_modules/core-js/modules/es.number.to-fixed.js","lib/browser/progress.js","lib/reporters/html.js","lib/reporters/list.js","lib/reporters/min.js","lib/reporters/spec.js","lib/reporters/nyan.js","node_modules/rollup-plugin-node-polyfills/polyfills/empty.js","lib/reporters/xunit.js","lib/reporters/markdown.js","lib/reporters/progress.js","lib/reporters/landing.js","lib/reporters/json-stream.js","lib/reporters/index.js","lib/browser/growl.js","lib/stats-collector.js","lib/test.js","lib/interfaces/common.js","lib/interfaces/bdd.js","lib/interfaces/tdd.js","lib/interfaces/qunit.js","lib/interfaces/exports.js","lib/interfaces/index.js","lib/context.js","lib/mocha.js","browser-entry.js"],"sourcesContent":["var check = function (it) {\n  return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n  // eslint-disable-next-line no-undef\n  check(typeof globalThis == 'object' && globalThis) ||\n  check(typeof window == 'object' && window) ||\n  check(typeof self == 'object' && self) ||\n  check(typeof global == 'object' && global) ||\n  // eslint-disable-next-line no-new-func\n  Function('return this')();\n","module.exports = function (exec) {\n  try {\n    return !!exec();\n  } catch (error) {\n    return true;\n  }\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n  var descriptor = getOwnPropertyDescriptor(this, V);\n  return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n  return {\n    enumerable: !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable: !(bitmap & 4),\n    value: value\n  };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n  return toString.call(it).slice(8, -1);\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n  // eslint-disable-next-line no-prototype-builtins\n  return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n  return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n  if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n  return it;\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n  return IndexedObject(requireObjectCoercible(it));\n};\n","module.exports = function (it) {\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n  if (!isObject(input)) return input;\n  var fn, val;\n  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n  return hasOwnProperty.call(it, key);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n  return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n  return Object.defineProperty(createElement('div'), 'a', {\n    get: function () { return 7; }\n  }).a != 7;\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n  O = toIndexedObject(O);\n  P = toPrimitive(P, true);\n  if (IE8_DOM_DEFINE) try {\n    return nativeGetOwnPropertyDescriptor(O, P);\n  } catch (error) { /* empty */ }\n  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n  if (!isObject(it)) {\n    throw TypeError(String(it) + ' is not an object');\n  } return it;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return nativeDefineProperty(O, P, Attributes);\n  } catch (error) { /* empty */ }\n  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n  object[key] = value;\n  return object;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n  try {\n    createNonEnumerableProperty(global, key, value);\n  } catch (error) {\n    global[key] = value;\n  } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n  store.inspectSource = function (it) {\n    return functionToString.call(it);\n  };\n}\n\nmodule.exports = store.inspectSource;\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n  return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n  version: '3.6.5',\n  mode: IS_PURE ? 'pure' : 'global',\n  copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n  return keys[key] || (keys[key] = uid(key));\n};\n","module.exports = {};\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n  return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n  return function (it) {\n    var state;\n    if (!isObject(it) || (state = get(it)).type !== TYPE) {\n      throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n    } return state;\n  };\n};\n\nif (NATIVE_WEAK_MAP) {\n  var store = new WeakMap();\n  var wmget = store.get;\n  var wmhas = store.has;\n  var wmset = store.set;\n  set = function (it, metadata) {\n    wmset.call(store, it, metadata);\n    return metadata;\n  };\n  get = function (it) {\n    return wmget.call(store, it) || {};\n  };\n  has = function (it) {\n    return wmhas.call(store, it);\n  };\n} else {\n  var STATE = sharedKey('state');\n  hiddenKeys[STATE] = true;\n  set = function (it, metadata) {\n    createNonEnumerableProperty(it, STATE, metadata);\n    return metadata;\n  };\n  get = function (it) {\n    return objectHas(it, STATE) ? it[STATE] : {};\n  };\n  has = function (it) {\n    return objectHas(it, STATE);\n  };\n}\n\nmodule.exports = {\n  set: set,\n  get: get,\n  has: has,\n  enforce: enforce,\n  getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n  var unsafe = options ? !!options.unsafe : false;\n  var simple = options ? !!options.enumerable : false;\n  var noTargetGet = options ? !!options.noTargetGet : false;\n  if (typeof value == 'function') {\n    if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n    enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n  }\n  if (O === global) {\n    if (simple) O[key] = value;\n    else setGlobal(key, value);\n    return;\n  } else if (!unsafe) {\n    delete O[key];\n  } else if (!noTargetGet && O[key]) {\n    simple = true;\n  }\n  if (simple) O[key] = value;\n  else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n  return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n  return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n  var integer = toInteger(index);\n  return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n  return function ($this, el, fromIndex) {\n    var O = toIndexedObject($this);\n    var length = toLength(O.length);\n    var index = toAbsoluteIndex(fromIndex, length);\n    var value;\n    // Array#includes uses SameValueZero equality algorithm\n    // eslint-disable-next-line no-self-compare\n    if (IS_INCLUDES && el != el) while (length > index) {\n      value = O[index++];\n      // eslint-disable-next-line no-self-compare\n      if (value != value) return true;\n    // Array#indexOf ignores holes, Array#includes - not\n    } else for (;length > index; index++) {\n      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n    } return !IS_INCLUDES && -1;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.includes` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n  includes: createMethod(true),\n  // `Array.prototype.indexOf` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n  indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n  var O = toIndexedObject(object);\n  var i = 0;\n  var result = [];\n  var key;\n  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n  // Don't enum bug & hidden keys\n  while (names.length > i) if (has(O, key = names[i++])) {\n    ~indexOf(result, key) || result.push(key);\n  }\n  return result;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n  'constructor',\n  'hasOwnProperty',\n  'isPrototypeOf',\n  'propertyIsEnumerable',\n  'toLocaleString',\n  'toString',\n  'valueOf'\n];\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n  return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n  var keys = getOwnPropertyNamesModule.f(anObject(it));\n  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n  var keys = ownKeys(source);\n  var defineProperty = definePropertyModule.f;\n  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i];\n    if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n  }\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n  var value = data[normalize(feature)];\n  return value == POLYFILL ? true\n    : value == NATIVE ? false\n    : typeof detection == 'function' ? fails(detection)\n    : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n  return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n  options.target      - name of the target object\n  options.global      - target is the global object\n  options.stat        - export as static methods of target\n  options.proto       - export as prototype methods of target\n  options.real        - real prototype method for the `pure` version\n  options.forced      - export even if the native feature is available\n  options.bind        - bind methods to the target, required for the `pure` version\n  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version\n  options.unsafe      - use the simple assignment of property instead of delete + defineProperty\n  options.sham        - add a flag to not completely full polyfills\n  options.enumerable  - export as enumerable property\n  options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n  var TARGET = options.target;\n  var GLOBAL = options.global;\n  var STATIC = options.stat;\n  var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n  if (GLOBAL) {\n    target = global;\n  } else if (STATIC) {\n    target = global[TARGET] || setGlobal(TARGET, {});\n  } else {\n    target = (global[TARGET] || {}).prototype;\n  }\n  if (target) for (key in source) {\n    sourceProperty = source[key];\n    if (options.noTargetGet) {\n      descriptor = getOwnPropertyDescriptor(target, key);\n      targetProperty = descriptor && descriptor.value;\n    } else targetProperty = target[key];\n    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n    // contained in target\n    if (!FORCED && targetProperty !== undefined) {\n      if (typeof sourceProperty === typeof targetProperty) continue;\n      copyConstructorProperties(sourceProperty, targetProperty);\n    }\n    // add a flag to not completely full polyfills\n    if (options.sham || (targetProperty && targetProperty.sham)) {\n      createNonEnumerableProperty(sourceProperty, 'sham', true);\n    }\n    // extend global\n    redefine(target, key, sourceProperty, options);\n  }\n};\n","module.exports = function (it) {\n  if (typeof it != 'function') {\n    throw TypeError(String(it) + ' is not a function');\n  } return it;\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n  aFunction(fn);\n  if (that === undefined) return fn;\n  switch (length) {\n    case 0: return function () {\n      return fn.call(that);\n    };\n    case 1: return function (a) {\n      return fn.call(that, a);\n    };\n    case 2: return function (a, b) {\n      return fn.call(that, a, b);\n    };\n    case 3: return function (a, b, c) {\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function (/* ...args */) {\n    return fn.apply(that, arguments);\n  };\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n  return Object(requireObjectCoercible(argument));\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.github.io/ecma262/#sec-isarray\nmodule.exports = Array.isArray || function isArray(arg) {\n  return classof(arg) == 'Array';\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n  // Chrome 38 Symbol has incorrect toString conversion\n  // eslint-disable-next-line no-undef\n  return !String(Symbol());\n});\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n  // eslint-disable-next-line no-undef\n  && !Symbol.sham\n  // eslint-disable-next-line no-undef\n  && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n  if (!has(WellKnownSymbolsStore, name)) {\n    if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n    else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n  } return WellKnownSymbolsStore[name];\n};\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.github.io/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n  var C;\n  if (isArray(originalArray)) {\n    C = originalArray.constructor;\n    // cross-realm fallback\n    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n    else if (isObject(C)) {\n      C = C[SPECIES];\n      if (C === null) C = undefined;\n    }\n  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation\nvar createMethod = function (TYPE) {\n  var IS_MAP = TYPE == 1;\n  var IS_FILTER = TYPE == 2;\n  var IS_SOME = TYPE == 3;\n  var IS_EVERY = TYPE == 4;\n  var IS_FIND_INDEX = TYPE == 6;\n  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n  return function ($this, callbackfn, that, specificCreate) {\n    var O = toObject($this);\n    var self = IndexedObject(O);\n    var boundFunction = bind(callbackfn, that, 3);\n    var length = toLength(self.length);\n    var index = 0;\n    var create = specificCreate || arraySpeciesCreate;\n    var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n    var value, result;\n    for (;length > index; index++) if (NO_HOLES || index in self) {\n      value = self[index];\n      result = boundFunction(value, index, O);\n      if (TYPE) {\n        if (IS_MAP) target[index] = result; // map\n        else if (result) switch (TYPE) {\n          case 3: return true;              // some\n          case 5: return value;             // find\n          case 6: return index;             // findIndex\n          case 2: push.call(target, value); // filter\n        } else if (IS_EVERY) return false;  // every\n      }\n    }\n    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.forEach` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n  forEach: createMethod(0),\n  // `Array.prototype.map` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.map\n  map: createMethod(1),\n  // `Array.prototype.filter` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n  filter: createMethod(2),\n  // `Array.prototype.some` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.some\n  some: createMethod(3),\n  // `Array.prototype.every` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.every\n  every: createMethod(4),\n  // `Array.prototype.find` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.find\n  find: createMethod(5),\n  // `Array.prototype.findIndex` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n  findIndex: createMethod(6)\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n  match = v8.split('.');\n  version = match[0] + match[1];\n} else if (userAgent) {\n  match = userAgent.match(/Edge\\/(\\d+)/);\n  if (!match || match[1] >= 74) {\n    match = userAgent.match(/Chrome\\/(\\d+)/);\n    if (match) version = match[1];\n  }\n}\n\nmodule.exports = version && +version;\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n  // We can't use this feature detection in V8 since it causes\n  // deoptimization and serious performance degradation\n  // https://github.com/zloirock/core-js/issues/677\n  return V8_VERSION >= 51 || !fails(function () {\n    var array = [];\n    var constructor = array.constructor = {};\n    constructor[SPECIES] = function () {\n      return { foo: 1 };\n    };\n    return array[METHOD_NAME](Boolean).foo !== 1;\n  });\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\n\nvar defineProperty = Object.defineProperty;\nvar cache = {};\n\nvar thrower = function (it) { throw it; };\n\nmodule.exports = function (METHOD_NAME, options) {\n  if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];\n  if (!options) options = {};\n  var method = [][METHOD_NAME];\n  var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;\n  var argument0 = has(options, 0) ? options[0] : thrower;\n  var argument1 = has(options, 1) ? options[1] : undefined;\n\n  return cache[METHOD_NAME] = !!method && !fails(function () {\n    if (ACCESSORS && !DESCRIPTORS) return true;\n    var O = { length: -1 };\n\n    if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });\n    else O[1] = 1;\n\n    method.call(O, argument0, argument1);\n  });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n// Edge 14- issue\nvar USES_TO_LENGTH = arrayMethodUsesToLength('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n  filter: function filter(callbackfn /* , thisArg */) {\n    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n  var method = [][METHOD_NAME];\n  return !!method && fails(function () {\n    // eslint-disable-next-line no-useless-call,no-throw-literal\n    method.call(null, argument || function () { throw 1; }, 1);\n  });\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\nmodule.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {\n  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n","'use strict';\nvar $ = require('../internals/export');\nvar forEach = require('../internals/array-for-each');\n\n// `Array.prototype.forEach` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n  forEach: forEach\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\n\n// `Array.prototype.indexOf` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH }, {\n  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n    return NEGATIVE_ZERO\n      // convert -0 to +0\n      ? nativeIndexOf.apply(this, arguments) || 0\n      : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n  var propertyKey = toPrimitive(key);\n  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n  else object[propertyKey] = value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n  splice: function splice(start, deleteCount /* , ...items */) {\n    var O = toObject(this);\n    var len = toLength(O.length);\n    var actualStart = toAbsoluteIndex(start, len);\n    var argumentsLength = arguments.length;\n    var insertCount, actualDeleteCount, A, k, from, to;\n    if (argumentsLength === 0) {\n      insertCount = actualDeleteCount = 0;\n    } else if (argumentsLength === 1) {\n      insertCount = 0;\n      actualDeleteCount = len - actualStart;\n    } else {\n      insertCount = argumentsLength - 2;\n      actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n    }\n    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n      throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n    }\n    A = arraySpeciesCreate(O, actualDeleteCount);\n    for (k = 0; k < actualDeleteCount; k++) {\n      from = actualStart + k;\n      if (from in O) createProperty(A, k, O[from]);\n    }\n    A.length = actualDeleteCount;\n    if (insertCount < actualDeleteCount) {\n      for (k = actualStart; k < len - actualDeleteCount; k++) {\n        from = k + actualDeleteCount;\n        to = k + insertCount;\n        if (from in O) O[to] = O[from];\n        else delete O[to];\n      }\n      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n    } else if (insertCount > actualDeleteCount) {\n      for (k = len - actualDeleteCount; k > actualStart; k--) {\n        from = k + actualDeleteCount - 1;\n        to = k + insertCount - 1;\n        if (from in O) O[to] = O[from];\n        else delete O[to];\n      }\n    }\n    for (k = 0; k < insertCount; k++) {\n      O[k + actualStart] = arguments[k + 2];\n    }\n    O.length = len - actualDeleteCount + insertCount;\n    return A;\n  }\n});\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n  return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\nvar nativeAssign = Object.assign;\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\nmodule.exports = !nativeAssign || fails(function () {\n  // should have correct order of operations (Edge bug)\n  if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {\n    enumerable: true,\n    get: function () {\n      defineProperty(this, 'b', {\n        value: 3,\n        enumerable: false\n      });\n    }\n  }), { b: 2 })).b !== 1) return true;\n  // should work with symbols and should have deterministic property order (V8 bug)\n  var A = {};\n  var B = {};\n  // eslint-disable-next-line no-undef\n  var symbol = Symbol();\n  var alphabet = 'abcdefghijklmnopqrst';\n  A[symbol] = 7;\n  alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n  return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n  var T = toObject(target);\n  var argumentsLength = arguments.length;\n  var index = 1;\n  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n  var propertyIsEnumerable = propertyIsEnumerableModule.f;\n  while (argumentsLength > index) {\n    var S = IndexedObject(arguments[index++]);\n    var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n    var length = keys.length;\n    var j = 0;\n    var key;\n    while (length > j) {\n      key = keys[j++];\n      if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n    }\n  } return T;\n} : nativeAssign;\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n  assign: assign\n});\n","var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n  keys: function keys(it) {\n    return nativeKeys(toObject(it));\n  }\n});\n","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n  var that = anObject(this);\n  var result = '';\n  if (that.global) result += 'g';\n  if (that.ignoreCase) result += 'i';\n  if (that.multiline) result += 'm';\n  if (that.dotAll) result += 's';\n  if (that.unicode) result += 'u';\n  if (that.sticky) result += 'y';\n  return result;\n};\n","'use strict';\n\nvar fails = require('./fails');\n\n// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,\n// so we use an intermediate function.\nfunction RE(s, f) {\n  return RegExp(s, f);\n}\n\nexports.UNSUPPORTED_Y = fails(function () {\n  // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\n  var re = RE('a', 'y');\n  re.lastIndex = 2;\n  return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n  var re = RE('^r', 'gy');\n  re.lastIndex = 2;\n  return re.exec('str') != null;\n});\n","'use strict';\nvar regexpFlags = require('./regexp-flags');\nvar stickyHelpers = require('./regexp-sticky-helpers');\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n  var re1 = /a/;\n  var re2 = /b*/g;\n  nativeExec.call(re1, 'a');\n  nativeExec.call(re2, 'a');\n  return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;\n\nif (PATCH) {\n  patchedExec = function exec(str) {\n    var re = this;\n    var lastIndex, reCopy, match, i;\n    var sticky = UNSUPPORTED_Y && re.sticky;\n    var flags = regexpFlags.call(re);\n    var source = re.source;\n    var charsAdded = 0;\n    var strCopy = str;\n\n    if (sticky) {\n      flags = flags.replace('y', '');\n      if (flags.indexOf('g') === -1) {\n        flags += 'g';\n      }\n\n      strCopy = String(str).slice(re.lastIndex);\n      // Support anchored sticky behavior.\n      if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\\n')) {\n        source = '(?: ' + source + ')';\n        strCopy = ' ' + strCopy;\n        charsAdded++;\n      }\n      // ^(? + rx + ) is needed, in combination with some str slicing, to\n      // simulate the 'y' flag.\n      reCopy = new RegExp('^(?:' + source + ')', flags);\n    }\n\n    if (NPCG_INCLUDED) {\n      reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n    }\n    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n    match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n    if (sticky) {\n      if (match) {\n        match.input = match.input.slice(charsAdded);\n        match[0] = match[0].slice(charsAdded);\n        match.index = re.lastIndex;\n        re.lastIndex += match[0].length;\n      } else re.lastIndex = 0;\n    } else if (UPDATES_LAST_INDEX_WRONG && match) {\n      re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n    }\n    if (NPCG_INCLUDED && match && match.length > 1) {\n      // Fix browsers whose `exec` methods don't consistently return `undefined`\n      // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n      nativeReplace.call(match[0], reCopy, function () {\n        for (i = 1; i < arguments.length - 2; i++) {\n          if (arguments[i] === undefined) match[i] = undefined;\n        }\n      });\n    }\n\n    return match;\n  };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n  exec: exec\n});\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar regexpExec = require('../internals/regexp-exec');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n  // #replace needs built-in support for named groups.\n  // #match works fine because it just return the exec results, even if it has\n  // a \"grops\" property.\n  var re = /./;\n  re.exec = function () {\n    var result = [];\n    result.groups = { a: '7' };\n    return result;\n  };\n  return ''.replace(re, '$<a>') !== '7';\n});\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n  return 'a'.replace(/./, '$0') === '$0';\n})();\n\nvar REPLACE = wellKnownSymbol('replace');\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n  if (/./[REPLACE]) {\n    return /./[REPLACE]('a', '$0') === '';\n  }\n  return false;\n})();\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n  var re = /(?:)/;\n  var originalExec = re.exec;\n  re.exec = function () { return originalExec.apply(this, arguments); };\n  var result = 'ab'.split(re);\n  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n  var SYMBOL = wellKnownSymbol(KEY);\n\n  var DELEGATES_TO_SYMBOL = !fails(function () {\n    // String methods call symbol-named RegEp methods\n    var O = {};\n    O[SYMBOL] = function () { return 7; };\n    return ''[KEY](O) != 7;\n  });\n\n  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n    // Symbol-named RegExp methods call .exec\n    var execCalled = false;\n    var re = /a/;\n\n    if (KEY === 'split') {\n      // We can't use real regex here since it causes deoptimization\n      // and serious performance degradation in V8\n      // https://github.com/zloirock/core-js/issues/306\n      re = {};\n      // RegExp[@@split] doesn't call the regex's exec method, but first creates\n      // a new one. We need to return the patched regex when creating the new one.\n      re.constructor = {};\n      re.constructor[SPECIES] = function () { return re; };\n      re.flags = '';\n      re[SYMBOL] = /./[SYMBOL];\n    }\n\n    re.exec = function () { execCalled = true; return null; };\n\n    re[SYMBOL]('');\n    return !execCalled;\n  });\n\n  if (\n    !DELEGATES_TO_SYMBOL ||\n    !DELEGATES_TO_EXEC ||\n    (KEY === 'replace' && !(\n      REPLACE_SUPPORTS_NAMED_GROUPS &&\n      REPLACE_KEEPS_$0 &&\n      !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n    )) ||\n    (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n  ) {\n    var nativeRegExpMethod = /./[SYMBOL];\n    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n      if (regexp.exec === regexpExec) {\n        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n          // The native String method already delegates to @@method (this\n          // polyfilled function), leasing to infinite recursion.\n          // We avoid it by directly calling the native @@method method.\n          return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n        }\n        return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n      }\n      return { done: false };\n    }, {\n      REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,\n      REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n    });\n    var stringMethod = methods[0];\n    var regexMethod = methods[1];\n\n    redefine(String.prototype, KEY, stringMethod);\n    redefine(RegExp.prototype, SYMBOL, length == 2\n      // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n      // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n      ? function (string, arg) { return regexMethod.call(string, this, arg); }\n      // 21.2.5.6 RegExp.prototype[@@match](string)\n      // 21.2.5.9 RegExp.prototype[@@search](string)\n      : function (string) { return regexMethod.call(string, this); }\n    );\n  }\n\n  if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);\n};\n","// `SameValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-samevalue\nmodule.exports = Object.is || function is(x, y) {\n  // eslint-disable-next-line no-self-compare\n  return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n  var exec = R.exec;\n  if (typeof exec === 'function') {\n    var result = exec.call(R, S);\n    if (typeof result !== 'object') {\n      throw TypeError('RegExp exec method returned something other than an Object or null');\n    }\n    return result;\n  }\n\n  if (classof(R) !== 'RegExp') {\n    throw TypeError('RegExp#exec called on incompatible receiver');\n  }\n\n  return regexpExec.call(R, S);\n};\n\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n  return [\n    // `String.prototype.search` method\n    // https://tc39.github.io/ecma262/#sec-string.prototype.search\n    function search(regexp) {\n      var O = requireObjectCoercible(this);\n      var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n      return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n    },\n    // `RegExp.prototype[@@search]` method\n    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search\n    function (regexp) {\n      var res = maybeCallNative(nativeSearch, regexp, this);\n      if (res.done) return res.value;\n\n      var rx = anObject(regexp);\n      var S = String(this);\n\n      var previousLastIndex = rx.lastIndex;\n      if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n      var result = regExpExec(rx, S);\n      if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n      return result === null ? -1 : result.index;\n    }\n  ];\n});\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n  CSSRuleList: 0,\n  CSSStyleDeclaration: 0,\n  CSSValueList: 0,\n  ClientRectList: 0,\n  DOMRectList: 0,\n  DOMStringList: 0,\n  DOMTokenList: 1,\n  DataTransferItemList: 0,\n  FileList: 0,\n  HTMLAllCollection: 0,\n  HTMLCollection: 0,\n  HTMLFormElement: 0,\n  HTMLSelectElement: 0,\n  MediaList: 0,\n  MimeTypeArray: 0,\n  NamedNodeMap: 0,\n  NodeList: 1,\n  PaintRequestList: 0,\n  Plugin: 0,\n  PluginArray: 0,\n  SVGLengthList: 0,\n  SVGNumberList: 0,\n  SVGPathSegList: 0,\n  SVGPointList: 0,\n  SVGStringList: 0,\n  SVGTransformList: 0,\n  SourceBufferList: 0,\n  StyleSheetList: 0,\n  TextTrackCueList: 0,\n  TextTrackList: 0,\n  TouchList: 0\n};\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n  var Collection = global[COLLECTION_NAME];\n  var CollectionPrototype = Collection && Collection.prototype;\n  // some Chrome versions have non-configurable methods on DOMTokenList\n  if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n    createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n  } catch (error) {\n    CollectionPrototype.forEach = forEach;\n  }\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n  var array = [];\n  array[IS_CONCAT_SPREADABLE] = false;\n  return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n  if (!isObject(O)) return false;\n  var spreadable = O[IS_CONCAT_SPREADABLE];\n  return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n  concat: function concat(arg) { // eslint-disable-line no-unused-vars\n    var O = toObject(this);\n    var A = arraySpeciesCreate(O, 0);\n    var n = 0;\n    var i, k, length, len, E;\n    for (i = -1, length = arguments.length; i < length; i++) {\n      E = i === -1 ? O : arguments[i];\n      if (isConcatSpreadable(E)) {\n        len = toLength(E.length);\n        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n      } else {\n        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n        createProperty(A, n++, E);\n      }\n    }\n    A.length = n;\n    return A;\n  }\n});\n","export default (typeof global !== \"undefined\" ? global :\n  typeof self !== \"undefined\" ? self :\n  typeof window !== \"undefined\" ? window : {});","export default (typeof global !== \"undefined\" ? global :\n            typeof self !== \"undefined\" ? self :\n            typeof window !== \"undefined\" ? window : {});\n","// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n    cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n    cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\nexport function nextTick(fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nexport var title = 'browser';\nexport var platform = 'browser';\nexport var browser = true;\nexport var env = {};\nexport var argv = [];\nexport var version = ''; // empty string to avoid regexp issues\nexport var versions = {};\nexport var release = {};\nexport var config = {};\n\nfunction noop() {}\n\nexport var on = noop;\nexport var addListener = noop;\nexport var once = noop;\nexport var off = noop;\nexport var removeListener = noop;\nexport var removeAllListeners = noop;\nexport var emit = noop;\n\nexport function binding(name) {\n    throw new Error('process.binding is not supported');\n}\n\nexport function cwd () { return '/' }\nexport function chdir (dir) {\n    throw new Error('process.chdir is not supported');\n};\nexport function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {}\nvar performanceNow =\n  performance.now        ||\n  performance.mozNow     ||\n  performance.msNow      ||\n  performance.oNow       ||\n  performance.webkitNow  ||\n  function(){ return (new Date()).getTime() }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nexport function hrtime(previousTimestamp){\n  var clocktime = performanceNow.call(performance)*1e-3\n  var seconds = Math.floor(clocktime)\n  var nanoseconds = Math.floor((clocktime%1)*1e9)\n  if (previousTimestamp) {\n    seconds = seconds - previousTimestamp[0]\n    nanoseconds = nanoseconds - previousTimestamp[1]\n    if (nanoseconds<0) {\n      seconds--\n      nanoseconds += 1e9\n    }\n  }\n  return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nexport function uptime() {\n  var currentTime = new Date();\n  var dif = currentTime - startTime;\n  return dif / 1000;\n}\n\nexport default {\n  nextTick: nextTick,\n  title: title,\n  browser: browser,\n  env: env,\n  argv: argv,\n  version: version,\n  versions: versions,\n  on: on,\n  addListener: addListener,\n  once: once,\n  off: off,\n  removeListener: removeListener,\n  removeAllListeners: removeAllListeners,\n  emit: emit,\n  binding: binding,\n  cwd: cwd,\n  chdir: chdir,\n  umask: umask,\n  hrtime: hrtime,\n  platform: platform,\n  release: release,\n  config: config,\n  uptime: uptime\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n  try {\n    return it[key];\n  } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n  var O, tag, result;\n  return it === undefined ? 'Undefined' : it === null ? 'Null'\n    // @@toStringTag case\n    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n    // builtinTag case\n    : CORRECT_ARGUMENTS ? classofRaw(O)\n    // ES3 arguments fallback\n    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n  return '[object ' + classof(this) + ']';\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar redefine = require('../internals/redefine');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n  redefine(Object.prototype, 'toString', toString, { unsafe: true });\n}\n","'use strict';\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n  redefine(RegExp.prototype, TO_STRING, function toString() {\n    var R = anObject(this);\n    var p = String(R.source);\n    var rf = R.flags;\n    var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n    return '/' + p + '/' + f;\n  }, { unsafe: true });\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.github.io/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n  defineProperty(FunctionPrototype, NAME, {\n    configurable: true,\n    get: function () {\n      try {\n        return FunctionPrototypeToString.call(this).match(nameRE)[1];\n      } catch (error) {\n        return '';\n      }\n    }\n  });\n}\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  function F() { /* empty */ }\n  F.prototype.constructor = null;\n  return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n  O = toObject(O);\n  if (has(O, IE_PROTO)) return O[IE_PROTO];\n  if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n    return O.constructor.prototype;\n  } return O instanceof Object ? ObjectPrototype : null;\n};\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n  getPrototypeOf: function getPrototypeOf(it) {\n    return nativeGetPrototypeOf(toObject(it));\n  }\n});\n\n","var $ = require('../internals/export');\nvar ownKeys = require('../internals/own-keys');\n\n// `Reflect.ownKeys` method\n// https://tc39.github.io/ecma262/#sec-reflect.ownkeys\n$({ target: 'Reflect', stat: true }, {\n  ownKeys: ownKeys\n});\n","'use strict';\n\nvar domain;\n\n// This constructor is used to store event handlers. Instantiating this is\n// faster than explicitly calling `Object.create(null)` to get a \"clean\" empty\n// object (tested with v8 v4.9).\nfunction EventHandlers() {}\nEventHandlers.prototype = Object.create(null);\n\nfunction EventEmitter() {\n  EventEmitter.init.call(this);\n}\nexport default EventEmitter;\nexport {EventEmitter};\n\n// nodejs oddity\n// require('events') === require('events').EventEmitter\nEventEmitter.EventEmitter = EventEmitter\n\nEventEmitter.usingDomains = false;\n\nEventEmitter.prototype.domain = undefined;\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\nEventEmitter.init = function() {\n  this.domain = null;\n  if (EventEmitter.usingDomains) {\n    // if there is an active domain, then attach to it.\n    if (domain.active && !(this instanceof domain.Domain)) {\n      this.domain = domain.active;\n    }\n  }\n\n  if (!this._events || this._events === Object.getPrototypeOf(this)._events) {\n    this._events = new EventHandlers();\n    this._eventsCount = 0;\n  }\n\n  this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n  if (typeof n !== 'number' || n < 0 || isNaN(n))\n    throw new TypeError('\"n\" argument must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nfunction $getMaxListeners(that) {\n  if (that._maxListeners === undefined)\n    return EventEmitter.defaultMaxListeners;\n  return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n  return $getMaxListeners(this);\n};\n\n// These standalone emit* functions are used to optimize calling of event\n// handlers for fast cases because emit() itself often has a variable number of\n// arguments and can be deoptimized because of that. These functions always have\n// the same number of arguments and thus do not get deoptimized, so the code\n// inside them can execute faster.\nfunction emitNone(handler, isFn, self) {\n  if (isFn)\n    handler.call(self);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].call(self);\n  }\n}\nfunction emitOne(handler, isFn, self, arg1) {\n  if (isFn)\n    handler.call(self, arg1);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].call(self, arg1);\n  }\n}\nfunction emitTwo(handler, isFn, self, arg1, arg2) {\n  if (isFn)\n    handler.call(self, arg1, arg2);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].call(self, arg1, arg2);\n  }\n}\nfunction emitThree(handler, isFn, self, arg1, arg2, arg3) {\n  if (isFn)\n    handler.call(self, arg1, arg2, arg3);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].call(self, arg1, arg2, arg3);\n  }\n}\n\nfunction emitMany(handler, isFn, self, args) {\n  if (isFn)\n    handler.apply(self, args);\n  else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      listeners[i].apply(self, args);\n  }\n}\n\nEventEmitter.prototype.emit = function emit(type) {\n  var er, handler, len, args, i, events, domain;\n  var needDomainExit = false;\n  var doError = (type === 'error');\n\n  events = this._events;\n  if (events)\n    doError = (doError && events.error == null);\n  else if (!doError)\n    return false;\n\n  domain = this.domain;\n\n  // If there is no 'error' event listener then throw.\n  if (doError) {\n    er = arguments[1];\n    if (domain) {\n      if (!er)\n        er = new Error('Uncaught, unspecified \"error\" event');\n      er.domainEmitter = this;\n      er.domain = domain;\n      er.domainThrown = false;\n      domain.emit('error', er);\n    } else if (er instanceof Error) {\n      throw er; // Unhandled 'error' event\n    } else {\n      // At least give some kind of context to the user\n      var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n      err.context = er;\n      throw err;\n    }\n    return false;\n  }\n\n  handler = events[type];\n\n  if (!handler)\n    return false;\n\n  var isFn = typeof handler === 'function';\n  len = arguments.length;\n  switch (len) {\n    // fast cases\n    case 1:\n      emitNone(handler, isFn, this);\n      break;\n    case 2:\n      emitOne(handler, isFn, this, arguments[1]);\n      break;\n    case 3:\n      emitTwo(handler, isFn, this, arguments[1], arguments[2]);\n      break;\n    case 4:\n      emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);\n      break;\n    // slower\n    default:\n      args = new Array(len - 1);\n      for (i = 1; i < len; i++)\n        args[i - 1] = arguments[i];\n      emitMany(handler, isFn, this, args);\n  }\n\n  if (needDomainExit)\n    domain.exit();\n\n  return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n  var m;\n  var events;\n  var existing;\n\n  if (typeof listener !== 'function')\n    throw new TypeError('\"listener\" argument must be a function');\n\n  events = target._events;\n  if (!events) {\n    events = target._events = new EventHandlers();\n    target._eventsCount = 0;\n  } else {\n    // To avoid recursion in the case that type === \"newListener\"! Before\n    // adding it to the listeners, first emit \"newListener\".\n    if (events.newListener) {\n      target.emit('newListener', type,\n                  listener.listener ? listener.listener : listener);\n\n      // Re-assign `events` because a newListener handler could have caused the\n      // this._events to be assigned to a new object\n      events = target._events;\n    }\n    existing = events[type];\n  }\n\n  if (!existing) {\n    // Optimize the case of one listener. Don't need the extra array object.\n    existing = events[type] = listener;\n    ++target._eventsCount;\n  } else {\n    if (typeof existing === 'function') {\n      // Adding the second element, need to change to array.\n      existing = events[type] = prepend ? [listener, existing] :\n                                          [existing, listener];\n    } else {\n      // If we've already got an array, just append.\n      if (prepend) {\n        existing.unshift(listener);\n      } else {\n        existing.push(listener);\n      }\n    }\n\n    // Check for listener leak\n    if (!existing.warned) {\n      m = $getMaxListeners(target);\n      if (m && m > 0 && existing.length > m) {\n        existing.warned = true;\n        var w = new Error('Possible EventEmitter memory leak detected. ' +\n                            existing.length + ' ' + type + ' listeners added. ' +\n                            'Use emitter.setMaxListeners() to increase limit');\n        w.name = 'MaxListenersExceededWarning';\n        w.emitter = target;\n        w.type = type;\n        w.count = existing.length;\n        emitWarning(w);\n      }\n    }\n  }\n\n  return target;\n}\nfunction emitWarning(e) {\n  typeof console.warn === 'function' ? console.warn(e) : console.log(e);\n}\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n  return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n    function prependListener(type, listener) {\n      return _addListener(this, type, listener, true);\n    };\n\nfunction _onceWrap(target, type, listener) {\n  var fired = false;\n  function g() {\n    target.removeListener(type, g);\n    if (!fired) {\n      fired = true;\n      listener.apply(target, arguments);\n    }\n  }\n  g.listener = listener;\n  return g;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n  if (typeof listener !== 'function')\n    throw new TypeError('\"listener\" argument must be a function');\n  this.on(type, _onceWrap(this, type, listener));\n  return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n    function prependOnceListener(type, listener) {\n      if (typeof listener !== 'function')\n        throw new TypeError('\"listener\" argument must be a function');\n      this.prependListener(type, _onceWrap(this, type, listener));\n      return this;\n    };\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener =\n    function removeListener(type, listener) {\n      var list, events, position, i, originalListener;\n\n      if (typeof listener !== 'function')\n        throw new TypeError('\"listener\" argument must be a function');\n\n      events = this._events;\n      if (!events)\n        return this;\n\n      list = events[type];\n      if (!list)\n        return this;\n\n      if (list === listener || (list.listener && list.listener === listener)) {\n        if (--this._eventsCount === 0)\n          this._events = new EventHandlers();\n        else {\n          delete events[type];\n          if (events.removeListener)\n            this.emit('removeListener', type, list.listener || listener);\n        }\n      } else if (typeof list !== 'function') {\n        position = -1;\n\n        for (i = list.length; i-- > 0;) {\n          if (list[i] === listener ||\n              (list[i].listener && list[i].listener === listener)) {\n            originalListener = list[i].listener;\n            position = i;\n            break;\n          }\n        }\n\n        if (position < 0)\n          return this;\n\n        if (list.length === 1) {\n          list[0] = undefined;\n          if (--this._eventsCount === 0) {\n            this._events = new EventHandlers();\n            return this;\n          } else {\n            delete events[type];\n          }\n        } else {\n          spliceOne(list, position);\n        }\n\n        if (events.removeListener)\n          this.emit('removeListener', type, originalListener || listener);\n      }\n\n      return this;\n    };\n\nEventEmitter.prototype.removeAllListeners =\n    function removeAllListeners(type) {\n      var listeners, events;\n\n      events = this._events;\n      if (!events)\n        return this;\n\n      // not listening for removeListener, no need to emit\n      if (!events.removeListener) {\n        if (arguments.length === 0) {\n          this._events = new EventHandlers();\n          this._eventsCount = 0;\n        } else if (events[type]) {\n          if (--this._eventsCount === 0)\n            this._events = new EventHandlers();\n          else\n            delete events[type];\n        }\n        return this;\n      }\n\n      // emit removeListener for all listeners on all events\n      if (arguments.length === 0) {\n        var keys = Object.keys(events);\n        for (var i = 0, key; i < keys.length; ++i) {\n          key = keys[i];\n          if (key === 'removeListener') continue;\n          this.removeAllListeners(key);\n        }\n        this.removeAllListeners('removeListener');\n        this._events = new EventHandlers();\n        this._eventsCount = 0;\n        return this;\n      }\n\n      listeners = events[type];\n\n      if (typeof listeners === 'function') {\n        this.removeListener(type, listeners);\n      } else if (listeners) {\n        // LIFO order\n        do {\n          this.removeListener(type, listeners[listeners.length - 1]);\n        } while (listeners[0]);\n      }\n\n      return this;\n    };\n\nEventEmitter.prototype.listeners = function listeners(type) {\n  var evlistener;\n  var ret;\n  var events = this._events;\n\n  if (!events)\n    ret = [];\n  else {\n    evlistener = events[type];\n    if (!evlistener)\n      ret = [];\n    else if (typeof evlistener === 'function')\n      ret = [evlistener.listener || evlistener];\n    else\n      ret = unwrapListeners(evlistener);\n  }\n\n  return ret;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  if (typeof emitter.listenerCount === 'function') {\n    return emitter.listenerCount(type);\n  } else {\n    return listenerCount.call(emitter, type);\n  }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n  var events = this._events;\n\n  if (events) {\n    var evlistener = events[type];\n\n    if (typeof evlistener === 'function') {\n      return 1;\n    } else if (evlistener) {\n      return evlistener.length;\n    }\n  }\n\n  return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n  return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];\n};\n\n// About 1.5x faster than the two-arg version of Array#splice().\nfunction spliceOne(list, index) {\n  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n    list[i] = list[k];\n  list.pop();\n}\n\nfunction arrayClone(arr, i) {\n  var copy = new Array(i);\n  while (i--)\n    copy[i] = arr[i];\n  return copy;\n}\n\nfunction unwrapListeners(arr) {\n  var ret = new Array(arr.length);\n  for (var i = 0; i < ret.length; ++i) {\n    ret[i] = arr[i].listener || arr[i];\n  }\n  return ret;\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = [].join;\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar STRICT_METHOD = arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {\n  join: function join(separator) {\n    return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n  }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n// FF49- issue\nvar USES_TO_LENGTH = arrayMethodUsesToLength('map');\n\n// `Array.prototype.map` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n  map: function map(callbackfn /* , thisArg */) {\n    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n  return function (that, callbackfn, argumentsLength, memo) {\n    aFunction(callbackfn);\n    var O = toObject(that);\n    var self = IndexedObject(O);\n    var length = toLength(O.length);\n    var index = IS_RIGHT ? length - 1 : 0;\n    var i = IS_RIGHT ? -1 : 1;\n    if (argumentsLength < 2) while (true) {\n      if (index in self) {\n        memo = self[index];\n        index += i;\n        break;\n      }\n      index += i;\n      if (IS_RIGHT ? index < 0 : length <= index) {\n        throw TypeError('Reduce of empty array with no initial value');\n      }\n    }\n    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n      memo = callbackfn(memo, self[index], index, O);\n    }\n    return memo;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.reduce` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n  left: createMethod(false),\n  // `Array.prototype.reduceRight` method\n  // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright\n  right: createMethod(true)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });\n\n// `Array.prototype.reduce` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {\n  reduce: function reduce(callbackfn /* , initialValue */) {\n    return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n  if (!isObject(it) && it !== null) {\n    throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n  } return it;\n};\n","var anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n  var CORRECT_SETTER = false;\n  var test = {};\n  var setter;\n  try {\n    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n    setter.call(test, []);\n    CORRECT_SETTER = test instanceof Array;\n  } catch (error) { /* empty */ }\n  return function setPrototypeOf(O, proto) {\n    anObject(O);\n    aPossiblePrototype(proto);\n    if (CORRECT_SETTER) setter.call(O, proto);\n    else O.__proto__ = proto;\n    return O;\n  };\n}() : undefined);\n","var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n  var NewTarget, NewTargetPrototype;\n  if (\n    // it can work only with native `setPrototypeOf`\n    setPrototypeOf &&\n    // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n    typeof (NewTarget = dummy.constructor) == 'function' &&\n    NewTarget !== Wrapper &&\n    isObject(NewTargetPrototype = NewTarget.prototype) &&\n    NewTargetPrototype !== Wrapper.prototype\n  ) setPrototypeOf($this, NewTargetPrototype);\n  return $this;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n  anObject(O);\n  var keys = objectKeys(Properties);\n  var length = keys.length;\n  var index = 0;\n  var key;\n  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n  return O;\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n  activeXDocument.write(scriptTag(''));\n  activeXDocument.close();\n  var temp = activeXDocument.parentWindow.Object;\n  activeXDocument = null; // avoid memory leak\n  return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n  // Thrash, waste and sodomy: IE GC bug\n  var iframe = documentCreateElement('iframe');\n  var JS = 'java' + SCRIPT + ':';\n  var iframeDocument;\n  iframe.style.display = 'none';\n  html.appendChild(iframe);\n  // https://github.com/zloirock/core-js/issues/475\n  iframe.src = String(JS);\n  iframeDocument = iframe.contentWindow.document;\n  iframeDocument.open();\n  iframeDocument.write(scriptTag('document.F=Object'));\n  iframeDocument.close();\n  return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n  try {\n    /* global ActiveXObject */\n    activeXDocument = document.domain && new ActiveXObject('htmlfile');\n  } catch (error) { /* ignore */ }\n  NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n  var length = enumBugKeys.length;\n  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n  return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n  var result;\n  if (O !== null) {\n    EmptyConstructor[PROTOTYPE] = anObject(O);\n    result = new EmptyConstructor();\n    EmptyConstructor[PROTOTYPE] = null;\n    // add \"__proto__\" for Object.getPrototypeOf polyfill\n    result[IE_PROTO] = O;\n  } else result = NullProtoObject();\n  return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n  return function ($this) {\n    var string = String(requireObjectCoercible($this));\n    if (TYPE & 1) string = string.replace(ltrim, '');\n    if (TYPE & 2) string = string.replace(rtrim, '');\n    return string;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.{ trimLeft, trimStart }` methods\n  // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart\n  start: createMethod(1),\n  // `String.prototype.{ trimRight, trimEnd }` methods\n  // https://tc39.github.io/ecma262/#sec-string.prototype.trimend\n  end: createMethod(2),\n  // `String.prototype.trim` method\n  // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n  trim: createMethod(3)\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.github.io/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n  var it = toPrimitive(argument, false);\n  var first, third, radix, maxCode, digits, length, index, code;\n  if (typeof it == 'string' && it.length > 2) {\n    it = trim(it);\n    first = it.charCodeAt(0);\n    if (first === 43 || first === 45) {\n      third = it.charCodeAt(2);\n      if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n    } else if (first === 48) {\n      switch (it.charCodeAt(1)) {\n        case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n        case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n        default: return +it;\n      }\n      digits = it.slice(2);\n      length = digits.length;\n      for (index = 0; index < length; index++) {\n        code = digits.charCodeAt(index);\n        // parseInt parses a string to a first unavailable symbol\n        // but ToNumber should return NaN if a string contains unavailable symbols\n        if (code < 48 || code > maxCode) return NaN;\n      } return parseInt(digits, radix);\n    }\n  } return +it;\n};\n\n// `Number` constructor\n// https://tc39.github.io/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n  var NumberWrapper = function Number(value) {\n    var it = arguments.length < 1 ? 0 : value;\n    var dummy = this;\n    return dummy instanceof NumberWrapper\n      // check on 1..constructor(foo) case\n      && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n        ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n  };\n  for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n    // ES3:\n    'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n    // ES2015 (in case, if modules with ES2015 Number statics required before):\n    'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n    'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n  ).split(','), j = 0, key; keys.length > j; j++) {\n    if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n      defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n    }\n  }\n  NumberWrapper.prototype = NumberPrototype;\n  NumberPrototype.constructor = NumberWrapper;\n  redefine(global, NUMBER, NumberWrapper);\n}\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });\nvar FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\n$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n    return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n  }\n});\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n  ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n  try {\n    return nativeGetOwnPropertyNames(it);\n  } catch (error) {\n    return windowNames.slice();\n  }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n  return windowNames && toString.call(it) == '[object Window]'\n    ? getWindowNames(it)\n    : nativeGetOwnPropertyNames(toIndexedObject(it));\n};\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names-external').f;\n\nvar FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n  getOwnPropertyNames: nativeGetOwnPropertyNames\n});\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.github.io/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n  var isRegExp;\n  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n  var defineProperty = definePropertyModule.f;\n\n  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n    defineProperty(Constructor, SPECIES, {\n      configurable: true,\n      get: function () { return this; }\n    });\n  }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar setInternalState = require('../internals/internal-state').set;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {\n  re2[MATCH] = false;\n  // RegExp constructor can alter flags and IsRegExp works correct with @@match\n  return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.github.io/ecma262/#sec-regexp-constructor\nif (FORCED) {\n  var RegExpWrapper = function RegExp(pattern, flags) {\n    var thisIsRegExp = this instanceof RegExpWrapper;\n    var patternIsRegExp = isRegExp(pattern);\n    var flagsAreUndefined = flags === undefined;\n    var sticky;\n\n    if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {\n      return pattern;\n    }\n\n    if (CORRECT_NEW) {\n      if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;\n    } else if (pattern instanceof RegExpWrapper) {\n      if (flagsAreUndefined) flags = getFlags.call(pattern);\n      pattern = pattern.source;\n    }\n\n    if (UNSUPPORTED_Y) {\n      sticky = !!flags && flags.indexOf('y') > -1;\n      if (sticky) flags = flags.replace(/y/g, '');\n    }\n\n    var result = inheritIfRequired(\n      CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),\n      thisIsRegExp ? this : RegExpPrototype,\n      RegExpWrapper\n    );\n\n    if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });\n\n    return result;\n  };\n  var proxy = function (key) {\n    key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n      configurable: true,\n      get: function () { return NativeRegExp[key]; },\n      set: function (it) { NativeRegExp[key] = it; }\n    });\n  };\n  var keys = getOwnPropertyNames(NativeRegExp);\n  var index = 0;\n  while (keys.length > index) proxy(keys[index++]);\n  RegExpPrototype.constructor = RegExpWrapper;\n  RegExpWrapper.prototype = RegExpPrototype;\n  redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.github.io/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n  return function ($this, pos) {\n    var S = String(requireObjectCoercible($this));\n    var position = toInteger(pos);\n    var size = S.length;\n    var first, second;\n    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n    first = S.charCodeAt(position);\n    return first < 0xD800 || first > 0xDBFF || position + 1 === size\n      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n        ? CONVERT_TO_STRING ? S.charAt(position) : first\n        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.codePointAt` method\n  // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n  codeAt: createMethod(false),\n  // `String.prototype.at` method\n  // https://github.com/mathiasbynens/String.prototype.at\n  charAt: createMethod(true)\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n  return index + (unicode ? charAt(S, index).length : 1);\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n  return [\n    // `String.prototype.match` method\n    // https://tc39.github.io/ecma262/#sec-string.prototype.match\n    function match(regexp) {\n      var O = requireObjectCoercible(this);\n      var matcher = regexp == undefined ? undefined : regexp[MATCH];\n      return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n    },\n    // `RegExp.prototype[@@match]` method\n    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n    function (regexp) {\n      var res = maybeCallNative(nativeMatch, regexp, this);\n      if (res.done) return res.value;\n\n      var rx = anObject(regexp);\n      var S = String(this);\n\n      if (!rx.global) return regExpExec(rx, S);\n\n      var fullUnicode = rx.unicode;\n      rx.lastIndex = 0;\n      var A = [];\n      var n = 0;\n      var result;\n      while ((result = regExpExec(rx, S)) !== null) {\n        var matchStr = String(result[0]);\n        A[n] = matchStr;\n        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n        n++;\n      }\n      return n === 0 ? null : A;\n    }\n  ];\n});\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n  return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {\n  var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;\n  var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;\n  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n  return [\n    // `String.prototype.replace` method\n    // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n    function replace(searchValue, replaceValue) {\n      var O = requireObjectCoercible(this);\n      var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n      return replacer !== undefined\n        ? replacer.call(searchValue, O, replaceValue)\n        : nativeReplace.call(String(O), searchValue, replaceValue);\n    },\n    // `RegExp.prototype[@@replace]` method\n    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n    function (regexp, replaceValue) {\n      if (\n        (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||\n        (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)\n      ) {\n        var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n        if (res.done) return res.value;\n      }\n\n      var rx = anObject(regexp);\n      var S = String(this);\n\n      var functionalReplace = typeof replaceValue === 'function';\n      if (!functionalReplace) replaceValue = String(replaceValue);\n\n      var global = rx.global;\n      if (global) {\n        var fullUnicode = rx.unicode;\n        rx.lastIndex = 0;\n      }\n      var results = [];\n      while (true) {\n        var result = regExpExec(rx, S);\n        if (result === null) break;\n\n        results.push(result);\n        if (!global) break;\n\n        var matchStr = String(result[0]);\n        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n      }\n\n      var accumulatedResult = '';\n      var nextSourcePosition = 0;\n      for (var i = 0; i < results.length; i++) {\n        result = results[i];\n\n        var matched = String(result[0]);\n        var position = max(min(toInteger(result.index), S.length), 0);\n        var captures = [];\n        // NOTE: This is equivalent to\n        //   captures = result.slice(1).map(maybeToString)\n        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n        // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n        for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n        var namedCaptures = result.groups;\n        if (functionalReplace) {\n          var replacerArgs = [matched].concat(captures, position, S);\n          if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n          var replacement = String(replaceValue.apply(undefined, replacerArgs));\n        } else {\n          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n        }\n        if (position >= nextSourcePosition) {\n          accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n          nextSourcePosition = position + matched.length;\n        }\n      }\n      return accumulatedResult + S.slice(nextSourcePosition);\n    }\n  ];\n\n  // https://tc39.github.io/ecma262/#sec-getsubstitution\n  function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n    var tailPos = position + matched.length;\n    var m = captures.length;\n    var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n    if (namedCaptures !== undefined) {\n      namedCaptures = toObject(namedCaptures);\n      symbols = SUBSTITUTION_SYMBOLS;\n    }\n    return nativeReplace.call(replacement, symbols, function (match, ch) {\n      var capture;\n      switch (ch.charAt(0)) {\n        case '$': return '$';\n        case '&': return matched;\n        case '`': return str.slice(0, position);\n        case \"'\": return str.slice(tailPos);\n        case '<':\n          capture = namedCaptures[ch.slice(1, -1)];\n          break;\n        default: // \\d\\d?\n          var n = +ch;\n          if (n === 0) return match;\n          if (n > m) {\n            var f = floor(n / 10);\n            if (f === 0) return match;\n            if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n            return match;\n          }\n          capture = captures[n - 1];\n      }\n      return capture === undefined ? '' : capture;\n    });\n  }\n});\n","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n  var C = anObject(O).constructor;\n  var S;\n  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\n\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n  var internalSplit;\n  if (\n    'abbc'.split(/(b)*/)[1] == 'c' ||\n    'test'.split(/(?:)/, -1).length != 4 ||\n    'ab'.split(/(?:ab)*/).length != 2 ||\n    '.'.split(/(.?)(.?)/).length != 4 ||\n    '.'.split(/()()/).length > 1 ||\n    ''.split(/.?/).length\n  ) {\n    // based on es5-shim implementation, need to rework it\n    internalSplit = function (separator, limit) {\n      var string = String(requireObjectCoercible(this));\n      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n      if (lim === 0) return [];\n      if (separator === undefined) return [string];\n      // If `separator` is not a regex, use native split\n      if (!isRegExp(separator)) {\n        return nativeSplit.call(string, separator, lim);\n      }\n      var output = [];\n      var flags = (separator.ignoreCase ? 'i' : '') +\n                  (separator.multiline ? 'm' : '') +\n                  (separator.unicode ? 'u' : '') +\n                  (separator.sticky ? 'y' : '');\n      var lastLastIndex = 0;\n      // Make `global` and avoid `lastIndex` issues by working with a copy\n      var separatorCopy = new RegExp(separator.source, flags + 'g');\n      var match, lastIndex, lastLength;\n      while (match = regexpExec.call(separatorCopy, string)) {\n        lastIndex = separatorCopy.lastIndex;\n        if (lastIndex > lastLastIndex) {\n          output.push(string.slice(lastLastIndex, match.index));\n          if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n          lastLength = match[0].length;\n          lastLastIndex = lastIndex;\n          if (output.length >= lim) break;\n        }\n        if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n      }\n      if (lastLastIndex === string.length) {\n        if (lastLength || !separatorCopy.test('')) output.push('');\n      } else output.push(string.slice(lastLastIndex));\n      return output.length > lim ? output.slice(0, lim) : output;\n    };\n  // Chakra, V8\n  } else if ('0'.split(undefined, 0).length) {\n    internalSplit = function (separator, limit) {\n      return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n    };\n  } else internalSplit = nativeSplit;\n\n  return [\n    // `String.prototype.split` method\n    // https://tc39.github.io/ecma262/#sec-string.prototype.split\n    function split(separator, limit) {\n      var O = requireObjectCoercible(this);\n      var splitter = separator == undefined ? undefined : separator[SPLIT];\n      return splitter !== undefined\n        ? splitter.call(separator, O, limit)\n        : internalSplit.call(String(O), separator, limit);\n    },\n    // `RegExp.prototype[@@split]` method\n    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n    //\n    // NOTE: This cannot be properly polyfilled in engines that don't support\n    // the 'y' flag.\n    function (regexp, limit) {\n      var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n      if (res.done) return res.value;\n\n      var rx = anObject(regexp);\n      var S = String(this);\n      var C = speciesConstructor(rx, RegExp);\n\n      var unicodeMatching = rx.unicode;\n      var flags = (rx.ignoreCase ? 'i' : '') +\n                  (rx.multiline ? 'm' : '') +\n                  (rx.unicode ? 'u' : '') +\n                  (SUPPORTS_Y ? 'y' : 'g');\n\n      // ^(? + rx + ) is needed, in combination with some S slicing, to\n      // simulate the 'y' flag.\n      var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n      if (lim === 0) return [];\n      if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n      var p = 0;\n      var q = 0;\n      var A = [];\n      while (q < S.length) {\n        splitter.lastIndex = SUPPORTS_Y ? q : 0;\n        var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n        var e;\n        if (\n          z === null ||\n          (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n        ) {\n          q = advanceStringIndex(S, q, unicodeMatching);\n        } else {\n          A.push(S.slice(p, q));\n          if (A.length === lim) return A;\n          for (var i = 1; i <= z.length - 1; i++) {\n            A.push(z[i]);\n            if (A.length === lim) return A;\n          }\n          q = p = e;\n        }\n      }\n      A.push(S.slice(p));\n      return A;\n    }\n  ];\n}, !SUPPORTS_Y);\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n","var path = require('../internals/path');\nvar has = require('../internals/has');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n  var Symbol = path.Symbol || (path.Symbol = {});\n  if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n    value: wrappedWellKnownSymbolModule.f(NAME)\n  });\n};\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n  if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n  }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n  return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n    get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n  })).a != 7;\n}) ? function (O, P, Attributes) {\n  var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n  if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n  nativeDefineProperty(O, P, Attributes);\n  if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n    nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n  }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n  var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n  setInternalState(symbol, {\n    type: SYMBOL,\n    tag: tag,\n    description: description\n  });\n  if (!DESCRIPTORS) symbol.description = description;\n  return symbol;\n};\n\nvar isSymbol = USE_SYMBOL_AS_UID ? function (it) {\n  return typeof it == 'symbol';\n} : function (it) {\n  return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n  if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n  anObject(O);\n  var key = toPrimitive(P, true);\n  anObject(Attributes);\n  if (has(AllSymbols, key)) {\n    if (!Attributes.enumerable) {\n      if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n      O[HIDDEN][key] = true;\n    } else {\n      if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n      Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n    } return setSymbolDescriptor(O, key, Attributes);\n  } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n  anObject(O);\n  var properties = toIndexedObject(Properties);\n  var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n  $forEach(keys, function (key) {\n    if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n  });\n  return O;\n};\n\nvar $create = function create(O, Properties) {\n  return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n  var P = toPrimitive(V, true);\n  var enumerable = nativePropertyIsEnumerable.call(this, P);\n  if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n  return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n  var it = toIndexedObject(O);\n  var key = toPrimitive(P, true);\n  if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n  var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n  if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n    descriptor.enumerable = true;\n  }\n  return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n  var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n  var result = [];\n  $forEach(names, function (key) {\n    if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n  });\n  return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n  var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n  var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n  var result = [];\n  $forEach(names, function (key) {\n    if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n      result.push(AllSymbols[key]);\n    }\n  });\n  return result;\n};\n\n// `Symbol` constructor\n// https://tc39.github.io/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n  $Symbol = function Symbol() {\n    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n    var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n    var tag = uid(description);\n    var setter = function (value) {\n      if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n      setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n    };\n    if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n    return wrap(tag, description);\n  };\n\n  redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n    return getInternalState(this).tag;\n  });\n\n  redefine($Symbol, 'withoutSetter', function (description) {\n    return wrap(uid(description), description);\n  });\n\n  propertyIsEnumerableModule.f = $propertyIsEnumerable;\n  definePropertyModule.f = $defineProperty;\n  getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n  getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n  getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n  wrappedWellKnownSymbolModule.f = function (name) {\n    return wrap(wellKnownSymbol(name), name);\n  };\n\n  if (DESCRIPTORS) {\n    // https://github.com/tc39/proposal-Symbol-description\n    nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n      configurable: true,\n      get: function description() {\n        return getInternalState(this).description;\n      }\n    });\n    if (!IS_PURE) {\n      redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n    }\n  }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n  Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n  defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n  // `Symbol.for` method\n  // https://tc39.github.io/ecma262/#sec-symbol.for\n  'for': function (key) {\n    var string = String(key);\n    if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n    var symbol = $Symbol(string);\n    StringToSymbolRegistry[string] = symbol;\n    SymbolToStringRegistry[symbol] = string;\n    return symbol;\n  },\n  // `Symbol.keyFor` method\n  // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n  keyFor: function keyFor(sym) {\n    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n    if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n  },\n  useSetter: function () { USE_SETTER = true; },\n  useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n  // `Object.create` method\n  // https://tc39.github.io/ecma262/#sec-object.create\n  create: $create,\n  // `Object.defineProperty` method\n  // https://tc39.github.io/ecma262/#sec-object.defineproperty\n  defineProperty: $defineProperty,\n  // `Object.defineProperties` method\n  // https://tc39.github.io/ecma262/#sec-object.defineproperties\n  defineProperties: $defineProperties,\n  // `Object.getOwnPropertyDescriptor` method\n  // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n  getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n  // `Object.getOwnPropertyNames` method\n  // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n  getOwnPropertyNames: $getOwnPropertyNames,\n  // `Object.getOwnPropertySymbols` method\n  // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n  getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n  getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n    return getOwnPropertySymbolsModule.f(toObject(it));\n  }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.github.io/ecma262/#sec-json.stringify\nif ($stringify) {\n  var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n    var symbol = $Symbol();\n    // MS Edge converts symbol values to JSON as {}\n    return $stringify([symbol]) != '[null]'\n      // WebKit converts symbol values to JSON as null\n      || $stringify({ a: symbol }) != '{}'\n      // V8 throws on boxed symbols\n      || $stringify(Object(symbol)) != '{}';\n  });\n\n  $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n    // eslint-disable-next-line no-unused-vars\n    stringify: function stringify(it, replacer, space) {\n      var args = [it];\n      var index = 1;\n      var $replacer;\n      while (arguments.length > index) args.push(arguments[index++]);\n      $replacer = replacer;\n      if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n      if (!isArray(replacer)) replacer = function (key, value) {\n        if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n        if (!isSymbol(value)) return value;\n      };\n      args[1] = replacer;\n      return $stringify.apply(null, args);\n    }\n  });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {\n  createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","// `Symbol.prototype.description` getter\n// https://tc39.github.io/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n  // Safari 12 bug\n  NativeSymbol().description !== undefined\n)) {\n  var EmptyStringDescriptionStore = {};\n  // wrap Symbol constructor for correct work with undefined description\n  var SymbolWrapper = function Symbol() {\n    var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n    var result = this instanceof SymbolWrapper\n      ? new NativeSymbol(description)\n      // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n      : description === undefined ? NativeSymbol() : NativeSymbol(description);\n    if (description === '') EmptyStringDescriptionStore[result] = true;\n    return result;\n  };\n  copyConstructorProperties(SymbolWrapper, NativeSymbol);\n  var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n  symbolPrototype.constructor = SymbolWrapper;\n\n  var symbolToString = symbolPrototype.toString;\n  var native = String(NativeSymbol('test')) == 'Symbol(test)';\n  var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n  defineProperty(symbolPrototype, 'description', {\n    configurable: true,\n    get: function description() {\n      var symbol = isObject(this) ? this.valueOf() : this;\n      var string = symbolToString.call(symbol);\n      if (has(EmptyStringDescriptionStore, symbol)) return '';\n      var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n      return desc === '' ? undefined : desc;\n    }\n  });\n\n  $({ global: true, forced: true }, {\n    Symbol: SymbolWrapper\n  });\n}\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.species` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.species\ndefineWellKnownSymbol('species');\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n  var O = toObject(this);\n  var length = toLength(O.length);\n  var argumentsLength = arguments.length;\n  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n  var end = argumentsLength > 2 ? arguments[2] : undefined;\n  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n  while (endPos > index) O[index++] = value;\n  return O;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n    configurable: true,\n    value: create(null)\n  });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n  ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var $ = require('../internals/export');\nvar fill = require('../internals/array-fill');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.fill` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.fill\n$({ target: 'Array', proto: true }, {\n  fill: fill\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('fill');\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\n\n// `Array.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: !USES_TO_LENGTH }, {\n  includes: function includes(el /* , fromIndex = 0 */) {\n    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","module.exports = {};\n","'use strict';\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n  arrayIterator = [].keys();\n  // Safari 8 has buggy iterators w/o `next`\n  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n  else {\n    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n  }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {\n  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n  IteratorPrototype: IteratorPrototype,\n  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n  var TO_STRING_TAG = NAME + ' Iterator';\n  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n  Iterators[TO_STRING_TAG] = returnThis;\n  return IteratorConstructor;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n  createIteratorConstructor(IteratorConstructor, NAME, next);\n\n  var getIterationMethod = function (KIND) {\n    if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n    switch (KIND) {\n      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n    } return function () { return new IteratorConstructor(this); };\n  };\n\n  var TO_STRING_TAG = NAME + ' Iterator';\n  var INCORRECT_VALUES_NAME = false;\n  var IterablePrototype = Iterable.prototype;\n  var nativeIterator = IterablePrototype[ITERATOR]\n    || IterablePrototype['@@iterator']\n    || DEFAULT && IterablePrototype[DEFAULT];\n  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n  var CurrentIteratorPrototype, methods, KEY;\n\n  // fix native\n  if (anyNativeIterator) {\n    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n        if (setPrototypeOf) {\n          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n          createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n        }\n      }\n      // Set @@toStringTag to native iterators\n      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n    }\n  }\n\n  // fix Array#{values, @@iterator}.name in V8 / FF\n  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n    INCORRECT_VALUES_NAME = true;\n    defaultIterator = function values() { return nativeIterator.call(this); };\n  }\n\n  // define iterator\n  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n    createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n  }\n  Iterators[NAME] = defaultIterator;\n\n  // export additional methods\n  if (DEFAULT) {\n    methods = {\n      values: getIterationMethod(VALUES),\n      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n      entries: getIterationMethod(ENTRIES)\n    };\n    if (FORCED) for (KEY in methods) {\n      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n        redefine(IterablePrototype, KEY, methods[KEY]);\n      }\n    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n  }\n\n  return methods;\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n  setInternalState(this, {\n    type: ARRAY_ITERATOR,\n    target: toIndexedObject(iterated), // target\n    index: 0,                          // next index\n    kind: kind                         // kind\n  });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n  var state = getInternalState(this);\n  var target = state.target;\n  var kind = state.kind;\n  var index = state.index++;\n  if (!target || index >= target.length) {\n    state.target = undefined;\n    return { value: undefined, done: true };\n  }\n  if (kind == 'keys') return { value: index, done: false };\n  if (kind == 'values') return { value: target[index], done: false };\n  return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar min = Math.min;\nvar nativeLastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\n// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n  // convert -0 to +0\n  if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;\n  var O = toIndexedObject(this);\n  var length = toLength(O.length);\n  var index = length - 1;\n  if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n  if (index < 0) index = length + index;\n  for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n  return -1;\n} : nativeLastIndexOf;\n","var $ = require('../internals/export');\nvar lastIndexOf = require('../internals/array-last-index-of');\n\n// `Array.prototype.lastIndexOf` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof\n$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {\n  lastIndexOf: lastIndexOf\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n  slice: function slice(start, end) {\n    var O = toIndexedObject(this);\n    var length = toLength(O.length);\n    var k = toAbsoluteIndex(start, length);\n    var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n    var Constructor, result, n;\n    if (isArray(O)) {\n      Constructor = O.constructor;\n      // cross-realm fallback\n      if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n        Constructor = undefined;\n      } else if (isObject(Constructor)) {\n        Constructor = Constructor[SPECIES];\n        if (Constructor === null) Constructor = undefined;\n      }\n      if (Constructor === Array || Constructor === undefined) {\n        return nativeSlice.call(O, k, fin);\n      }\n    }\n    result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n    result.length = n;\n    return result;\n  }\n});\n","var setSpecies = require('../internals/set-species');\n\n// `Array[@@species]` getter\n// https://tc39.github.io/ecma262/#sec-get-array-@@species\nsetSpecies('Array');\n","module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n  for (var key in src) redefine(target, key, src[key], options);\n  return target;\n};\n","module.exports = function (it, Constructor, name) {\n  if (!(it instanceof Constructor)) {\n    throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n  } return it;\n};\n","var toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\n\n// `ToIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-toindex\nmodule.exports = function (it) {\n  if (it === undefined) return 0;\n  var number = toInteger(it);\n  var length = toLength(number);\n  if (number !== length) throw RangeError('Wrong length or index');\n  return length;\n};\n","// IEEE754 conversions based on https://github.com/feross/ieee754\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = 1 / 0;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n  var buffer = new Array(bytes);\n  var exponentLength = bytes * 8 - mantissaLength - 1;\n  var eMax = (1 << exponentLength) - 1;\n  var eBias = eMax >> 1;\n  var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n  var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n  var index = 0;\n  var exponent, mantissa, c;\n  number = abs(number);\n  // eslint-disable-next-line no-self-compare\n  if (number != number || number === Infinity) {\n    // eslint-disable-next-line no-self-compare\n    mantissa = number != number ? 1 : 0;\n    exponent = eMax;\n  } else {\n    exponent = floor(log(number) / LN2);\n    if (number * (c = pow(2, -exponent)) < 1) {\n      exponent--;\n      c *= 2;\n    }\n    if (exponent + eBias >= 1) {\n      number += rt / c;\n    } else {\n      number += rt * pow(2, 1 - eBias);\n    }\n    if (number * c >= 2) {\n      exponent++;\n      c /= 2;\n    }\n    if (exponent + eBias >= eMax) {\n      mantissa = 0;\n      exponent = eMax;\n    } else if (exponent + eBias >= 1) {\n      mantissa = (number * c - 1) * pow(2, mantissaLength);\n      exponent = exponent + eBias;\n    } else {\n      mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n      exponent = 0;\n    }\n  }\n  for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n  exponent = exponent << mantissaLength | mantissa;\n  exponentLength += mantissaLength;\n  for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n  buffer[--index] |= sign * 128;\n  return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n  var bytes = buffer.length;\n  var exponentLength = bytes * 8 - mantissaLength - 1;\n  var eMax = (1 << exponentLength) - 1;\n  var eBias = eMax >> 1;\n  var nBits = exponentLength - 7;\n  var index = bytes - 1;\n  var sign = buffer[index--];\n  var exponent = sign & 127;\n  var mantissa;\n  sign >>= 7;\n  for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n  mantissa = exponent & (1 << -nBits) - 1;\n  exponent >>= -nBits;\n  nBits += mantissaLength;\n  for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n  if (exponent === 0) {\n    exponent = 1 - eBias;\n  } else if (exponent === eMax) {\n    return mantissa ? NaN : sign ? -Infinity : Infinity;\n  } else {\n    mantissa = mantissa + pow(2, mantissaLength);\n    exponent = exponent - eBias;\n  } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n  pack: pack,\n  unpack: unpack\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n  return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n  return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n  return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n  return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n  return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n  return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n  defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n  var intIndex = toIndex(index);\n  var store = getInternalState(view);\n  if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n  var bytes = getInternalState(store.buffer).bytes;\n  var start = intIndex + store.byteOffset;\n  var pack = bytes.slice(start, start + count);\n  return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n  var intIndex = toIndex(index);\n  var store = getInternalState(view);\n  if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n  var bytes = getInternalState(store.buffer).bytes;\n  var start = intIndex + store.byteOffset;\n  var pack = conversion(+value);\n  for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n  $ArrayBuffer = function ArrayBuffer(length) {\n    anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n    var byteLength = toIndex(length);\n    setInternalState(this, {\n      bytes: arrayFill.call(new Array(byteLength), 0),\n      byteLength: byteLength\n    });\n    if (!DESCRIPTORS) this.byteLength = byteLength;\n  };\n\n  $DataView = function DataView(buffer, byteOffset, byteLength) {\n    anInstance(this, $DataView, DATA_VIEW);\n    anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n    var bufferLength = getInternalState(buffer).byteLength;\n    var offset = toInteger(byteOffset);\n    if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n    byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n    if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n    setInternalState(this, {\n      buffer: buffer,\n      byteLength: byteLength,\n      byteOffset: offset\n    });\n    if (!DESCRIPTORS) {\n      this.buffer = buffer;\n      this.byteLength = byteLength;\n      this.byteOffset = offset;\n    }\n  };\n\n  if (DESCRIPTORS) {\n    addGetter($ArrayBuffer, 'byteLength');\n    addGetter($DataView, 'buffer');\n    addGetter($DataView, 'byteLength');\n    addGetter($DataView, 'byteOffset');\n  }\n\n  redefineAll($DataView[PROTOTYPE], {\n    getInt8: function getInt8(byteOffset) {\n      return get(this, 1, byteOffset)[0] << 24 >> 24;\n    },\n    getUint8: function getUint8(byteOffset) {\n      return get(this, 1, byteOffset)[0];\n    },\n    getInt16: function getInt16(byteOffset /* , littleEndian */) {\n      var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n      return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n    },\n    getUint16: function getUint16(byteOffset /* , littleEndian */) {\n      var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n      return bytes[1] << 8 | bytes[0];\n    },\n    getInt32: function getInt32(byteOffset /* , littleEndian */) {\n      return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n    },\n    getUint32: function getUint32(byteOffset /* , littleEndian */) {\n      return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n    },\n    getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n      return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n    },\n    getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n      return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n    },\n    setInt8: function setInt8(byteOffset, value) {\n      set(this, 1, byteOffset, packInt8, value);\n    },\n    setUint8: function setUint8(byteOffset, value) {\n      set(this, 1, byteOffset, packInt8, value);\n    },\n    setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n      set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n    },\n    setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n      set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n    },\n    setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n      set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n    },\n    setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n      set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n    },\n    setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n      set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n    },\n    setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n      set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n    }\n  });\n} else {\n  if (!fails(function () {\n    NativeArrayBuffer(1);\n  }) || !fails(function () {\n    new NativeArrayBuffer(-1); // eslint-disable-line no-new\n  }) || fails(function () {\n    new NativeArrayBuffer(); // eslint-disable-line no-new\n    new NativeArrayBuffer(1.5); // eslint-disable-line no-new\n    new NativeArrayBuffer(NaN); // eslint-disable-line no-new\n    return NativeArrayBuffer.name != ARRAY_BUFFER;\n  })) {\n    $ArrayBuffer = function ArrayBuffer(length) {\n      anInstance(this, $ArrayBuffer);\n      return new NativeArrayBuffer(toIndex(length));\n    };\n    var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n    for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n      if (!((key = keys[j++]) in $ArrayBuffer)) {\n        createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n      }\n    }\n    ArrayBufferPrototype.constructor = $ArrayBuffer;\n  }\n\n  // WebKit bug - the same parent prototype for typed arrays and data view\n  if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n    setPrototypeOf($DataViewPrototype, ObjectPrototype);\n  }\n\n  // iOS Safari 7.x bug\n  var testView = new $DataView(new $ArrayBuffer(2));\n  var nativeSetInt8 = $DataViewPrototype.setInt8;\n  testView.setInt8(0, 2147483648);\n  testView.setInt8(1, 2147483649);\n  if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n    setInt8: function setInt8(byteOffset, value) {\n      nativeSetInt8.call(this, byteOffset, value << 24 >> 24);\n    },\n    setUint8: function setUint8(byteOffset, value) {\n      nativeSetInt8.call(this, byteOffset, value << 24 >> 24);\n    }\n  }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n  ArrayBuffer: $ArrayBuffer,\n  DataView: $DataView\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar arrayBufferModule = require('../internals/array-buffer');\nvar setSpecies = require('../internals/set-species');\n\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\n\n// `ArrayBuffer` constructor\n// https://tc39.github.io/ecma262/#sec-arraybuffer-constructor\n$({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, {\n  ArrayBuffer: ArrayBuffer\n});\n\nsetSpecies(ARRAY_BUFFER);\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n  if (isRegExp(it)) {\n    throw TypeError(\"The method doesn't accept regular expressions\");\n  } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n  var regexp = /./;\n  try {\n    '/./'[METHOD_NAME](regexp);\n  } catch (e) {\n    try {\n      regexp[MATCH] = false;\n      return '/./'[METHOD_NAME](regexp);\n    } catch (f) { /* empty */ }\n  } return false;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n  includes: function includes(searchString /* , position = 0 */) {\n    return !!~String(requireObjectCoercible(this))\n      .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n  return fails(function () {\n    return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n  });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n  trim: function trim() {\n    return $trim(this);\n  }\n});\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n  var called = 0;\n  var iteratorWithReturn = {\n    next: function () {\n      return { done: !!called++ };\n    },\n    'return': function () {\n      SAFE_CLOSING = true;\n    }\n  };\n  iteratorWithReturn[ITERATOR] = function () {\n    return this;\n  };\n  // eslint-disable-next-line no-throw-literal\n  Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n  var ITERATION_SUPPORT = false;\n  try {\n    var object = {};\n    object[ITERATOR] = function () {\n      return {\n        next: function () {\n          return { done: ITERATION_SUPPORT = true };\n        }\n      };\n    };\n    exec(object);\n  } catch (error) { /* empty */ }\n  return ITERATION_SUPPORT;\n};\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\n\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar isPrototypeOf = ObjectPrototype.isPrototypeOf;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQIRED = false;\nvar NAME;\n\nvar TypedArrayConstructorsList = {\n  Int8Array: 1,\n  Uint8Array: 1,\n  Uint8ClampedArray: 1,\n  Int16Array: 2,\n  Uint16Array: 2,\n  Int32Array: 4,\n  Uint32Array: 4,\n  Float32Array: 4,\n  Float64Array: 8\n};\n\nvar isView = function isView(it) {\n  var klass = classof(it);\n  return klass === 'DataView' || has(TypedArrayConstructorsList, klass);\n};\n\nvar isTypedArray = function (it) {\n  return isObject(it) && has(TypedArrayConstructorsList, classof(it));\n};\n\nvar aTypedArray = function (it) {\n  if (isTypedArray(it)) return it;\n  throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n  if (setPrototypeOf) {\n    if (isPrototypeOf.call(TypedArray, C)) return C;\n  } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {\n    var TypedArrayConstructor = global[ARRAY];\n    if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {\n      return C;\n    }\n  } throw TypeError('Target is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced) {\n  if (!DESCRIPTORS) return;\n  if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n    var TypedArrayConstructor = global[ARRAY];\n    if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {\n      delete TypedArrayConstructor.prototype[KEY];\n    }\n  }\n  if (!TypedArrayPrototype[KEY] || forced) {\n    redefine(TypedArrayPrototype, KEY, forced ? property\n      : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);\n  }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n  var ARRAY, TypedArrayConstructor;\n  if (!DESCRIPTORS) return;\n  if (setPrototypeOf) {\n    if (forced) for (ARRAY in TypedArrayConstructorsList) {\n      TypedArrayConstructor = global[ARRAY];\n      if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {\n        delete TypedArrayConstructor[KEY];\n      }\n    }\n    if (!TypedArray[KEY] || forced) {\n      // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n      try {\n        return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);\n      } catch (error) { /* empty */ }\n    } else return;\n  }\n  for (ARRAY in TypedArrayConstructorsList) {\n    TypedArrayConstructor = global[ARRAY];\n    if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n      redefine(TypedArrayConstructor, KEY, property);\n    }\n  }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n  if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {\n  // eslint-disable-next-line no-shadow\n  TypedArray = function TypedArray() {\n    throw TypeError('Incorrect invocation');\n  };\n  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n    if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n  }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n  TypedArrayPrototype = TypedArray.prototype;\n  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n    if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n  }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n  setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {\n  TYPED_ARRAY_TAG_REQIRED = true;\n  defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n    return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n  } });\n  for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n    createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n  }\n}\n\nmodule.exports = {\n  NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n  TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,\n  aTypedArray: aTypedArray,\n  aTypedArrayConstructor: aTypedArrayConstructor,\n  exportTypedArrayMethod: exportTypedArrayMethod,\n  exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n  isView: isView,\n  isTypedArray: isTypedArray,\n  TypedArray: TypedArray,\n  TypedArrayPrototype: TypedArrayPrototype\n};\n","/* eslint-disable no-new */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n  Int8Array(1);\n}) || !fails(function () {\n  new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n  new Int8Array();\n  new Int8Array(null);\n  new Int8Array(1.5);\n  new Int8Array(iterable);\n}, true) || fails(function () {\n  // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n  return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","var toInteger = require('../internals/to-integer');\n\nmodule.exports = function (it) {\n  var result = toInteger(it);\n  if (result < 0) throw RangeError(\"The argument can't be less than 0\");\n  return result;\n};\n","var toPositiveInteger = require('../internals/to-positive-integer');\n\nmodule.exports = function (it, BYTES) {\n  var offset = toPositiveInteger(it);\n  if (offset % BYTES) throw RangeError('Wrong offset');\n  return offset;\n};\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n  if (it != undefined) return it[ITERATOR]\n    || it['@@iterator']\n    || Iterators[classof(it)];\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar bind = require('../internals/function-bind-context');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n  var O = toObject(source);\n  var argumentsLength = arguments.length;\n  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n  var mapping = mapfn !== undefined;\n  var iteratorMethod = getIteratorMethod(O);\n  var i, length, result, step, iterator, next;\n  if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {\n    iterator = iteratorMethod.call(O);\n    next = iterator.next;\n    O = [];\n    while (!(step = next.call(iterator)).done) {\n      O.push(step.value);\n    }\n  }\n  if (mapping && argumentsLength > 2) {\n    mapfn = bind(mapfn, arguments[2], 2);\n  }\n  length = toLength(O.length);\n  result = new (aTypedArrayConstructor(this))(length);\n  for (i = 0; length > i; i++) {\n    result[i] = mapping ? mapfn(O[i], i) : O[i];\n  }\n  return result;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n  var index = 0;\n  var length = list.length;\n  var result = new (aTypedArrayConstructor(C))(length);\n  while (length > index) result[index] = list[index++];\n  return result;\n};\n\nvar addGetter = function (it, key) {\n  nativeDefineProperty(it, key, { get: function () {\n    return getInternalState(this)[key];\n  } });\n};\n\nvar isArrayBuffer = function (it) {\n  var klass;\n  return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n  return isTypedArray(target)\n    && typeof key != 'symbol'\n    && key in target\n    && String(+key) == String(key);\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n  return isTypedArrayIndex(target, key = toPrimitive(key, true))\n    ? createPropertyDescriptor(2, target[key])\n    : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n  if (isTypedArrayIndex(target, key = toPrimitive(key, true))\n    && isObject(descriptor)\n    && has(descriptor, 'value')\n    && !has(descriptor, 'get')\n    && !has(descriptor, 'set')\n    // TODO: add validation descriptor w/o calling accessors\n    && !descriptor.configurable\n    && (!has(descriptor, 'writable') || descriptor.writable)\n    && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n  ) {\n    target[key] = descriptor.value;\n    return target;\n  } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n  if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n    getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n    definePropertyModule.f = wrappedDefineProperty;\n    addGetter(TypedArrayPrototype, 'buffer');\n    addGetter(TypedArrayPrototype, 'byteOffset');\n    addGetter(TypedArrayPrototype, 'byteLength');\n    addGetter(TypedArrayPrototype, 'length');\n  }\n\n  $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n    getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n    defineProperty: wrappedDefineProperty\n  });\n\n  module.exports = function (TYPE, wrapper, CLAMPED) {\n    var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n    var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n    var GETTER = 'get' + TYPE;\n    var SETTER = 'set' + TYPE;\n    var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n    var TypedArrayConstructor = NativeTypedArrayConstructor;\n    var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n    var exported = {};\n\n    var getter = function (that, index) {\n      var data = getInternalState(that);\n      return data.view[GETTER](index * BYTES + data.byteOffset, true);\n    };\n\n    var setter = function (that, index, value) {\n      var data = getInternalState(that);\n      if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n      data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n    };\n\n    var addElement = function (that, index) {\n      nativeDefineProperty(that, index, {\n        get: function () {\n          return getter(this, index);\n        },\n        set: function (value) {\n          return setter(this, index, value);\n        },\n        enumerable: true\n      });\n    };\n\n    if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n      TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n        anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n        var index = 0;\n        var byteOffset = 0;\n        var buffer, byteLength, length;\n        if (!isObject(data)) {\n          length = toIndex(data);\n          byteLength = length * BYTES;\n          buffer = new ArrayBuffer(byteLength);\n        } else if (isArrayBuffer(data)) {\n          buffer = data;\n          byteOffset = toOffset(offset, BYTES);\n          var $len = data.byteLength;\n          if ($length === undefined) {\n            if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n            byteLength = $len - byteOffset;\n            if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n          } else {\n            byteLength = toLength($length) * BYTES;\n            if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n          }\n          length = byteLength / BYTES;\n        } else if (isTypedArray(data)) {\n          return fromList(TypedArrayConstructor, data);\n        } else {\n          return typedArrayFrom.call(TypedArrayConstructor, data);\n        }\n        setInternalState(that, {\n          buffer: buffer,\n          byteOffset: byteOffset,\n          byteLength: byteLength,\n          length: length,\n          view: new DataView(buffer)\n        });\n        while (index < length) addElement(that, index++);\n      });\n\n      if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n      TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n    } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n      TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n        anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n        return inheritIfRequired(function () {\n          if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n          if (isArrayBuffer(data)) return $length !== undefined\n            ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n            : typedArrayOffset !== undefined\n              ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n              : new NativeTypedArrayConstructor(data);\n          if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n          return typedArrayFrom.call(TypedArrayConstructor, data);\n        }(), dummy, TypedArrayConstructor);\n      });\n\n      if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n      forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n        if (!(key in TypedArrayConstructor)) {\n          createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n        }\n      });\n      TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n    }\n\n    if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n      createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n    }\n\n    if (TYPED_ARRAY_TAG) {\n      createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n    }\n\n    exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n    $({\n      global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n    }, exported);\n\n    if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n      createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n    }\n\n    if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n      createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n    }\n\n    setSpecies(CONSTRUCTOR_NAME);\n  };\n} else module.exports = function () { /* empty */ };\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n  return function Uint8Array(data, byteOffset, length) {\n    return init(this, data, byteOffset, length);\n  };\n});\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n  var O = toObject(this);\n  var len = toLength(O.length);\n  var to = toAbsoluteIndex(target, len);\n  var from = toAbsoluteIndex(start, len);\n  var end = arguments.length > 2 ? arguments[2] : undefined;\n  var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n  var inc = 1;\n  if (from < to && to < from + count) {\n    inc = -1;\n    from += count - 1;\n    to += count - 1;\n  }\n  while (count-- > 0) {\n    if (from in O) O[to] = O[from];\n    else delete O[to];\n    to += inc;\n    from += inc;\n  } return O;\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $copyWithin = require('../internals/array-copy-within');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.copyWithin` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.copywithin\nexportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {\n  return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $every = require('../internals/array-iteration').every;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.every` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every\nexportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {\n  return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.fill\n// eslint-disable-next-line no-unused-vars\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n  return $fill.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n  var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  var C = speciesConstructor(this, this.constructor);\n  var index = 0;\n  var length = list.length;\n  var result = new (aTypedArrayConstructor(C))(length);\n  while (length > index) result[index] = list[index++];\n  return result;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $find = require('../internals/array-iteration').find;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.find` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find\nexportTypedArrayMethod('find', function find(predicate /* , thisArg */) {\n  return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findIndex = require('../internals/array-iteration').findIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findIndex` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findindex\nexportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {\n  return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.forEach` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.foreach\nexportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {\n  $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $includes = require('../internals/array-includes').includes;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.includes\nexportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {\n  return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $indexOf = require('../internals/array-includes').indexOf;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.indexOf` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.indexof\nexportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {\n  return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = ArrayIterators.values;\nvar arrayKeys = ArrayIterators.keys;\nvar arrayEntries = ArrayIterators.entries;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];\n\nvar CORRECT_ITER_NAME = !!nativeTypedArrayIterator\n  && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);\n\nvar typedArrayValues = function values() {\n  return arrayValues.call(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n  return arrayEntries.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n  return arrayKeys.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = [].join;\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join\n// eslint-disable-next-line no-unused-vars\nexportTypedArrayMethod('join', function join(separator) {\n  return $join.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $lastIndexOf = require('../internals/array-last-index-of');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.lastIndexOf` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.lastindexof\n// eslint-disable-next-line no-unused-vars\nexportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {\n  return $lastIndexOf.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n  return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n    return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);\n  });\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduce = require('../internals/array-reduce').left;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduce` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce\nexportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {\n  return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduceRight = require('../internals/array-reduce').right;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduceRicht` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright\nexportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {\n  return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n  var that = this;\n  var length = aTypedArray(that).length;\n  var middle = floor(length / 2);\n  var index = 0;\n  var value;\n  while (index < middle) {\n    value = that[index];\n    that[index++] = that[--length];\n    that[length] = value;\n  } return that;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toOffset = require('../internals/to-offset');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n  // eslint-disable-next-line no-undef\n  new Int8Array(1).set({});\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n  aTypedArray(this);\n  var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n  var length = this.length;\n  var src = toObject(arrayLike);\n  var len = toLength(src.length);\n  var index = 0;\n  if (len + offset > length) throw RangeError('Wrong length');\n  while (index < len) this[offset + index] = src[index++];\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $slice = [].slice;\n\nvar FORCED = fails(function () {\n  // eslint-disable-next-line no-undef\n  new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n  var list = $slice.call(aTypedArray(this), start, end);\n  var C = speciesConstructor(this, this.constructor);\n  var index = 0;\n  var length = list.length;\n  var result = new (aTypedArrayConstructor(C))(length);\n  while (length > index) result[index] = list[index++];\n  return result;\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $some = require('../internals/array-iteration').some;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.some` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some\nexportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {\n  return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $sort = [].sort;\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n  return $sort.call(aTypedArray(this), comparefn);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.subarray` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.subarray\nexportTypedArrayMethod('subarray', function subarray(begin, end) {\n  var O = aTypedArray(this);\n  var length = O.length;\n  var beginIndex = toAbsoluteIndex(begin, length);\n  return new (speciesConstructor(O, O.constructor))(\n    O.buffer,\n    O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,\n    toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)\n  );\n});\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\nvar $slice = [].slice;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n  $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n  return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n  Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n  return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);\n}, FORCED);\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n  arrayToString = function toString() {\n    return arrayJoin.call(this);\n  };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","'use strict';\nvar $ = require('../internals/export');\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\n$({ target: 'URL', proto: true, enumerable: true }, {\n  toJSON: function toJSON() {\n    return URL.prototype.toString.call(this);\n  }\n});\n","\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\nvar inited = false;\nfunction init () {\n  inited = true;\n  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n  for (var i = 0, len = code.length; i < len; ++i) {\n    lookup[i] = code[i]\n    revLookup[code.charCodeAt(i)] = i\n  }\n\n  revLookup['-'.charCodeAt(0)] = 62\n  revLookup['_'.charCodeAt(0)] = 63\n}\n\nexport function toByteArray (b64) {\n  if (!inited) {\n    init();\n  }\n  var i, j, l, tmp, placeHolders, arr\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // the number of equal signs (place holders)\n  // if there are two placeholders, than the two characters before it\n  // represent one byte\n  // if there is only one, then the three characters before it represent 2 bytes\n  // this is just a cheap hack to not do indexOf twice\n  placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n  // base64 is 4/3 + up to two characters of the original data\n  arr = new Arr(len * 3 / 4 - placeHolders)\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  l = placeHolders > 0 ? len - 4 : len\n\n  var L = 0\n\n  for (i = 0, j = 0; i < l; i += 4, j += 3) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n    arr[L++] = (tmp >> 16) & 0xFF\n    arr[L++] = (tmp >> 8) & 0xFF\n    arr[L++] = tmp & 0xFF\n  }\n\n  if (placeHolders === 2) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[L++] = tmp & 0xFF\n  } else if (placeHolders === 1) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[L++] = (tmp >> 8) & 0xFF\n    arr[L++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nexport function fromByteArray (uint8) {\n  if (!inited) {\n    init();\n  }\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var output = ''\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    output += lookup[tmp >> 2]\n    output += lookup[(tmp << 4) & 0x3F]\n    output += '=='\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n    output += lookup[tmp >> 10]\n    output += lookup[(tmp >> 4) & 0x3F]\n    output += lookup[(tmp << 2) & 0x3F]\n    output += '='\n  }\n\n  parts.push(output)\n\n  return parts.join('')\n}\n","\nexport function read (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = nBytes * 8 - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexport function write (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = nBytes * 8 - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = (value * c - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nexport default Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n\nimport * as base64 from './base64'\nimport * as ieee754 from './ieee754'\nimport isArray from './isArray'\n\nexport var INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : true\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nvar _kMaxLength = kMaxLength()\nexport {_kMaxLength as kMaxLength};\nfunction typedArraySupport () {\n  return true;\n  // rollup issues\n  // try {\n  //   var arr = new Uint8Array(1)\n  //   arr.__proto__ = {\n  //     __proto__: Uint8Array.prototype,\n  //     foo: function () { return 42 }\n  //   }\n  //   return arr.foo() === 42 && // typed array instances can be augmented\n  //       typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n  //       arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  // } catch (e) {\n  //   return false\n  // }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nexport function Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    // Object.defineProperty(Buffer, Symbol.species, {\n    //   value: null,\n    //   configurable: true\n    // })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (internalIsBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nexport function SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!internalIsBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (internalIsBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!internalIsBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (internalIsBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = internalIsBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nexport function isBuffer(obj) {\n  return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n  return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n  return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n","// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n    cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n    cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\nfunction nextTick(fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nvar title = 'browser';\nvar platform = 'browser';\nvar browser = true;\nvar env = {};\nvar argv = [];\nvar version = ''; // empty string to avoid regexp issues\nvar versions = {};\nvar release = {};\nvar config = {};\n\nfunction noop() {}\n\nvar on = noop;\nvar addListener = noop;\nvar once = noop;\nvar off = noop;\nvar removeListener = noop;\nvar removeAllListeners = noop;\nvar emit = noop;\n\nfunction binding(name) {\n    throw new Error('process.binding is not supported');\n}\n\nfunction cwd () { return '/' }\nfunction chdir (dir) {\n    throw new Error('process.chdir is not supported');\n}function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {};\nvar performanceNow =\n  performance.now        ||\n  performance.mozNow     ||\n  performance.msNow      ||\n  performance.oNow       ||\n  performance.webkitNow  ||\n  function(){ return (new Date()).getTime() };\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nfunction hrtime(previousTimestamp){\n  var clocktime = performanceNow.call(performance)*1e-3;\n  var seconds = Math.floor(clocktime);\n  var nanoseconds = Math.floor((clocktime%1)*1e9);\n  if (previousTimestamp) {\n    seconds = seconds - previousTimestamp[0];\n    nanoseconds = nanoseconds - previousTimestamp[1];\n    if (nanoseconds<0) {\n      seconds--;\n      nanoseconds += 1e9;\n    }\n  }\n  return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nfunction uptime() {\n  var currentTime = new Date();\n  var dif = currentTime - startTime;\n  return dif / 1000;\n}\n\nvar browser$1 = {\n  nextTick: nextTick,\n  title: title,\n  browser: browser,\n  env: env,\n  argv: argv,\n  version: version,\n  versions: versions,\n  on: on,\n  addListener: addListener,\n  once: once,\n  off: off,\n  removeListener: removeListener,\n  removeAllListeners: removeAllListeners,\n  emit: emit,\n  binding: binding,\n  cwd: cwd,\n  chdir: chdir,\n  umask: umask,\n  hrtime: hrtime,\n  platform: platform,\n  release: release,\n  config: config,\n  uptime: uptime\n};\n\nexport default browser$1;\nexport { addListener, argv, binding, browser, chdir, config, cwd, emit, env, hrtime, nextTick, off, on, once, platform, release, removeAllListeners, removeListener, title, umask, uptime, version, versions };\n","\nvar inherits;\nif (typeof Object.create === 'function'){\n  inherits = function inherits(ctor, superCtor) {\n    // implementation from standard node.js 'util' module\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  inherits = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\nexport default inherits;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\nimport process from 'process';\nvar formatRegExp = /%[sdj%]/g;\nexport function format(f) {\n  if (!isString(f)) {\n    var objects = [];\n    for (var i = 0; i < arguments.length; i++) {\n      objects.push(inspect(arguments[i]));\n    }\n    return objects.join(' ');\n  }\n\n  var i = 1;\n  var args = arguments;\n  var len = args.length;\n  var str = String(f).replace(formatRegExp, function(x) {\n    if (x === '%%') return '%';\n    if (i >= len) return x;\n    switch (x) {\n      case '%s': return String(args[i++]);\n      case '%d': return Number(args[i++]);\n      case '%j':\n        try {\n          return JSON.stringify(args[i++]);\n        } catch (_) {\n          return '[Circular]';\n        }\n      default:\n        return x;\n    }\n  });\n  for (var x = args[i]; i < len; x = args[++i]) {\n    if (isNull(x) || !isObject(x)) {\n      str += ' ' + x;\n    } else {\n      str += ' ' + inspect(x);\n    }\n  }\n  return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexport function deprecate(fn, msg) {\n  // Allow for deprecating things in the process of starting up.\n  if (isUndefined(global.process)) {\n    return function() {\n      return deprecate(fn, msg).apply(this, arguments);\n    };\n  }\n\n  if (process.noDeprecation === true) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (process.throwDeprecation) {\n        throw new Error(msg);\n      } else if (process.traceDeprecation) {\n        console.trace(msg);\n      } else {\n        console.error(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexport function debuglog(set) {\n  if (isUndefined(debugEnviron))\n    debugEnviron = process.env.NODE_DEBUG || '';\n  set = set.toUpperCase();\n  if (!debugs[set]) {\n    if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n      var pid = 0;\n      debugs[set] = function() {\n        var msg = format.apply(null, arguments);\n        console.error('%s %d: %s', set, pid, msg);\n      };\n    } else {\n      debugs[set] = function() {};\n    }\n  }\n  return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nexport function inspect(obj, opts) {\n  // default options\n  var ctx = {\n    seen: [],\n    stylize: stylizeNoColor\n  };\n  // legacy...\n  if (arguments.length >= 3) ctx.depth = arguments[2];\n  if (arguments.length >= 4) ctx.colors = arguments[3];\n  if (isBoolean(opts)) {\n    // legacy...\n    ctx.showHidden = opts;\n  } else if (opts) {\n    // got an \"options\" object\n    _extend(ctx, opts);\n  }\n  // set default options\n  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n  if (isUndefined(ctx.depth)) ctx.depth = 2;\n  if (isUndefined(ctx.colors)) ctx.colors = false;\n  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n  if (ctx.colors) ctx.stylize = stylizeWithColor;\n  return formatValue(ctx, obj, ctx.depth);\n}\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n  'bold' : [1, 22],\n  'italic' : [3, 23],\n  'underline' : [4, 24],\n  'inverse' : [7, 27],\n  'white' : [37, 39],\n  'grey' : [90, 39],\n  'black' : [30, 39],\n  'blue' : [34, 39],\n  'cyan' : [36, 39],\n  'green' : [32, 39],\n  'magenta' : [35, 39],\n  'red' : [31, 39],\n  'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n  'special': 'cyan',\n  'number': 'yellow',\n  'boolean': 'yellow',\n  'undefined': 'grey',\n  'null': 'bold',\n  'string': 'green',\n  'date': 'magenta',\n  // \"name\": intentionally not styling\n  'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n  var style = inspect.styles[styleType];\n\n  if (style) {\n    return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n           '\\u001b[' + inspect.colors[style][1] + 'm';\n  } else {\n    return str;\n  }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n  return str;\n}\n\n\nfunction arrayToHash(array) {\n  var hash = {};\n\n  array.forEach(function(val, idx) {\n    hash[val] = true;\n  });\n\n  return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n  // Provide a hook for user-specified inspect functions.\n  // Check that value is an object with an inspect function on it\n  if (ctx.customInspect &&\n      value &&\n      isFunction(value.inspect) &&\n      // Filter out the util module, it's inspect function is special\n      value.inspect !== inspect &&\n      // Also filter out any prototype objects using the circular check.\n      !(value.constructor && value.constructor.prototype === value)) {\n    var ret = value.inspect(recurseTimes, ctx);\n    if (!isString(ret)) {\n      ret = formatValue(ctx, ret, recurseTimes);\n    }\n    return ret;\n  }\n\n  // Primitive types cannot have properties\n  var primitive = formatPrimitive(ctx, value);\n  if (primitive) {\n    return primitive;\n  }\n\n  // Look up the keys of the object.\n  var keys = Object.keys(value);\n  var visibleKeys = arrayToHash(keys);\n\n  if (ctx.showHidden) {\n    keys = Object.getOwnPropertyNames(value);\n  }\n\n  // IE doesn't make error fields non-enumerable\n  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n  if (isError(value)\n      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n    return formatError(value);\n  }\n\n  // Some type of object without properties can be shortcutted.\n  if (keys.length === 0) {\n    if (isFunction(value)) {\n      var name = value.name ? ': ' + value.name : '';\n      return ctx.stylize('[Function' + name + ']', 'special');\n    }\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    }\n    if (isDate(value)) {\n      return ctx.stylize(Date.prototype.toString.call(value), 'date');\n    }\n    if (isError(value)) {\n      return formatError(value);\n    }\n  }\n\n  var base = '', array = false, braces = ['{', '}'];\n\n  // Make Array say that they are Array\n  if (isArray(value)) {\n    array = true;\n    braces = ['[', ']'];\n  }\n\n  // Make functions say that they are functions\n  if (isFunction(value)) {\n    var n = value.name ? ': ' + value.name : '';\n    base = ' [Function' + n + ']';\n  }\n\n  // Make RegExps say that they are RegExps\n  if (isRegExp(value)) {\n    base = ' ' + RegExp.prototype.toString.call(value);\n  }\n\n  // Make dates with properties first say the date\n  if (isDate(value)) {\n    base = ' ' + Date.prototype.toUTCString.call(value);\n  }\n\n  // Make error with message first say the error\n  if (isError(value)) {\n    base = ' ' + formatError(value);\n  }\n\n  if (keys.length === 0 && (!array || value.length == 0)) {\n    return braces[0] + base + braces[1];\n  }\n\n  if (recurseTimes < 0) {\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    } else {\n      return ctx.stylize('[Object]', 'special');\n    }\n  }\n\n  ctx.seen.push(value);\n\n  var output;\n  if (array) {\n    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n  } else {\n    output = keys.map(function(key) {\n      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n    });\n  }\n\n  ctx.seen.pop();\n\n  return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n  if (isUndefined(value))\n    return ctx.stylize('undefined', 'undefined');\n  if (isString(value)) {\n    var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n                                             .replace(/'/g, \"\\\\'\")\n                                             .replace(/\\\\\"/g, '\"') + '\\'';\n    return ctx.stylize(simple, 'string');\n  }\n  if (isNumber(value))\n    return ctx.stylize('' + value, 'number');\n  if (isBoolean(value))\n    return ctx.stylize('' + value, 'boolean');\n  // For some reason typeof null is \"object\", so special case here.\n  if (isNull(value))\n    return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n  return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n  var output = [];\n  for (var i = 0, l = value.length; i < l; ++i) {\n    if (hasOwnProperty(value, String(i))) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          String(i), true));\n    } else {\n      output.push('');\n    }\n  }\n  keys.forEach(function(key) {\n    if (!key.match(/^\\d+$/)) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          key, true));\n    }\n  });\n  return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n  var name, str, desc;\n  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n  if (desc.get) {\n    if (desc.set) {\n      str = ctx.stylize('[Getter/Setter]', 'special');\n    } else {\n      str = ctx.stylize('[Getter]', 'special');\n    }\n  } else {\n    if (desc.set) {\n      str = ctx.stylize('[Setter]', 'special');\n    }\n  }\n  if (!hasOwnProperty(visibleKeys, key)) {\n    name = '[' + key + ']';\n  }\n  if (!str) {\n    if (ctx.seen.indexOf(desc.value) < 0) {\n      if (isNull(recurseTimes)) {\n        str = formatValue(ctx, desc.value, null);\n      } else {\n        str = formatValue(ctx, desc.value, recurseTimes - 1);\n      }\n      if (str.indexOf('\\n') > -1) {\n        if (array) {\n          str = str.split('\\n').map(function(line) {\n            return '  ' + line;\n          }).join('\\n').substr(2);\n        } else {\n          str = '\\n' + str.split('\\n').map(function(line) {\n            return '   ' + line;\n          }).join('\\n');\n        }\n      }\n    } else {\n      str = ctx.stylize('[Circular]', 'special');\n    }\n  }\n  if (isUndefined(name)) {\n    if (array && key.match(/^\\d+$/)) {\n      return str;\n    }\n    name = JSON.stringify('' + key);\n    if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n      name = name.substr(1, name.length - 2);\n      name = ctx.stylize(name, 'name');\n    } else {\n      name = name.replace(/'/g, \"\\\\'\")\n                 .replace(/\\\\\"/g, '\"')\n                 .replace(/(^\"|\"$)/g, \"'\");\n      name = ctx.stylize(name, 'string');\n    }\n  }\n\n  return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n  var numLinesEst = 0;\n  var length = output.reduce(function(prev, cur) {\n    numLinesEst++;\n    if (cur.indexOf('\\n') >= 0) numLinesEst++;\n    return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n  }, 0);\n\n  if (length > 60) {\n    return braces[0] +\n           (base === '' ? '' : base + '\\n ') +\n           ' ' +\n           output.join(',\\n  ') +\n           ' ' +\n           braces[1];\n  }\n\n  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexport function isArray(ar) {\n  return Array.isArray(ar);\n}\n\nexport function isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\n\nexport function isNull(arg) {\n  return arg === null;\n}\n\nexport function isNullOrUndefined(arg) {\n  return arg == null;\n}\n\nexport function isNumber(arg) {\n  return typeof arg === 'number';\n}\n\nexport function isString(arg) {\n  return typeof arg === 'string';\n}\n\nexport function isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\n\nexport function isUndefined(arg) {\n  return arg === void 0;\n}\n\nexport function isRegExp(re) {\n  return isObject(re) && objectToString(re) === '[object RegExp]';\n}\n\nexport function isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nexport function isDate(d) {\n  return isObject(d) && objectToString(d) === '[object Date]';\n}\n\nexport function isError(e) {\n  return isObject(e) &&\n      (objectToString(e) === '[object Error]' || e instanceof Error);\n}\n\nexport function isFunction(arg) {\n  return typeof arg === 'function';\n}\n\nexport function isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\n\nexport function isBuffer(maybeBuf) {\n  return Buffer.isBuffer(maybeBuf);\n}\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n  return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n              'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n  var d = new Date();\n  var time = [pad(d.getHours()),\n              pad(d.getMinutes()),\n              pad(d.getSeconds())].join(':');\n  return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexport function log() {\n  console.log('%s - %s', timestamp(), format.apply(null, arguments));\n}\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n *     prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nimport inherits from './inherits';\nexport {inherits}\n\nexport function _extend(origin, add) {\n  // Don't do anything if add isn't an object\n  if (!add || !isObject(add)) return origin;\n\n  var keys = Object.keys(add);\n  var i = keys.length;\n  while (i--) {\n    origin[keys[i]] = add[keys[i]];\n  }\n  return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport default {\n  inherits: inherits,\n  _extend: _extend,\n  log: log,\n  isBuffer: isBuffer,\n  isPrimitive: isPrimitive,\n  isFunction: isFunction,\n  isError: isError,\n  isDate: isDate,\n  isObject: isObject,\n  isRegExp: isRegExp,\n  isUndefined: isUndefined,\n  isSymbol: isSymbol,\n  isString: isString,\n  isNumber: isNumber,\n  isNullOrUndefined: isNullOrUndefined,\n  isNull: isNull,\n  isBoolean: isBoolean,\n  isArray: isArray,\n  inspect: inspect,\n  deprecate: deprecate,\n  format: format,\n  debuglog: debuglog\n}\n","var lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar inited = false;\nfunction init () {\n  inited = true;\n  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n  for (var i = 0, len = code.length; i < len; ++i) {\n    lookup[i] = code[i];\n    revLookup[code.charCodeAt(i)] = i;\n  }\n\n  revLookup['-'.charCodeAt(0)] = 62;\n  revLookup['_'.charCodeAt(0)] = 63;\n}\n\nfunction toByteArray (b64) {\n  if (!inited) {\n    init();\n  }\n  var i, j, l, tmp, placeHolders, arr;\n  var len = b64.length;\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // the number of equal signs (place holders)\n  // if there are two placeholders, than the two characters before it\n  // represent one byte\n  // if there is only one, then the three characters before it represent 2 bytes\n  // this is just a cheap hack to not do indexOf twice\n  placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;\n\n  // base64 is 4/3 + up to two characters of the original data\n  arr = new Arr(len * 3 / 4 - placeHolders);\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  l = placeHolders > 0 ? len - 4 : len;\n\n  var L = 0;\n\n  for (i = 0, j = 0; i < l; i += 4, j += 3) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)];\n    arr[L++] = (tmp >> 16) & 0xFF;\n    arr[L++] = (tmp >> 8) & 0xFF;\n    arr[L++] = tmp & 0xFF;\n  }\n\n  if (placeHolders === 2) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4);\n    arr[L++] = tmp & 0xFF;\n  } else if (placeHolders === 1) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2);\n    arr[L++] = (tmp >> 8) & 0xFF;\n    arr[L++] = tmp & 0xFF;\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp;\n  var output = [];\n  for (var i = start; i < end; i += 3) {\n    tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);\n    output.push(tripletToBase64(tmp));\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  if (!inited) {\n    init();\n  }\n  var tmp;\n  var len = uint8.length;\n  var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n  var output = '';\n  var parts = [];\n  var maxChunkLength = 16383; // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1];\n    output += lookup[tmp >> 2];\n    output += lookup[(tmp << 4) & 0x3F];\n    output += '==';\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + (uint8[len - 1]);\n    output += lookup[tmp >> 10];\n    output += lookup[(tmp >> 4) & 0x3F];\n    output += lookup[(tmp << 2) & 0x3F];\n    output += '=';\n  }\n\n  parts.push(output);\n\n  return parts.join('')\n}\n\nfunction read (buffer, offset, isLE, mLen, nBytes) {\n  var e, m;\n  var eLen = nBytes * 8 - mLen - 1;\n  var eMax = (1 << eLen) - 1;\n  var eBias = eMax >> 1;\n  var nBits = -7;\n  var i = isLE ? (nBytes - 1) : 0;\n  var d = isLE ? -1 : 1;\n  var s = buffer[offset + i];\n\n  i += d;\n\n  e = s & ((1 << (-nBits)) - 1);\n  s >>= (-nBits);\n  nBits += eLen;\n  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1);\n  e >>= (-nBits);\n  nBits += mLen;\n  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias;\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen);\n    e = e - eBias;\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nfunction write (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c;\n  var eLen = nBytes * 8 - mLen - 1;\n  var eMax = (1 << eLen) - 1;\n  var eBias = eMax >> 1;\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n  var i = isLE ? 0 : (nBytes - 1);\n  var d = isLE ? 1 : -1;\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n  value = Math.abs(value);\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0;\n    e = eMax;\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2);\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--;\n      c *= 2;\n    }\n    if (e + eBias >= 1) {\n      value += rt / c;\n    } else {\n      value += rt * Math.pow(2, 1 - eBias);\n    }\n    if (value * c >= 2) {\n      e++;\n      c /= 2;\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0;\n      e = eMax;\n    } else if (e + eBias >= 1) {\n      m = (value * c - 1) * Math.pow(2, mLen);\n      e = e + eBias;\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n      e = 0;\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m;\n  eLen += mLen;\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128;\n}\n\nvar toString = {}.toString;\n\nvar isArray = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\n\nvar INSPECT_MAX_BYTES = 50;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : true;\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nvar _kMaxLength = kMaxLength();\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length);\n    that.__proto__ = Buffer.prototype;\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length);\n    }\n    that.length = length;\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype;\n  return arr\n};\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n};\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype;\n  Buffer.__proto__ = Uint8Array;\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size);\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n};\n\nfunction allocUnsafe (that, size) {\n  assertSize(size);\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0;\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n};\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8';\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0;\n  that = createBuffer(that, length);\n\n  var actual = that.write(string, encoding);\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual);\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0;\n  that = createBuffer(that, length);\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255;\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array);\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset);\n  } else {\n    array = new Uint8Array(array, byteOffset, length);\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array;\n    that.__proto__ = Buffer.prototype;\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array);\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (internalIsBuffer(obj)) {\n    var len = checked(obj.length) | 0;\n    that = createBuffer(that, len);\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len);\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0;\n  }\n  return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length;\n  var y = b.length;\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i];\n      y = b[i];\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n};\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n};\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i;\n  if (length === undefined) {\n    length = 0;\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length;\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length);\n  var pos = 0;\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i];\n    if (!internalIsBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos);\n    pos += buf.length;\n  }\n  return buffer\n};\n\nfunction byteLength (string, encoding) {\n  if (internalIsBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string;\n  }\n\n  var len = string.length;\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false;\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase();\n        loweredCase = true;\n    }\n  }\n}\nBuffer.byteLength = byteLength;\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false;\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0;\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length;\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0;\n  start >>>= 0;\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8';\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase();\n        loweredCase = true;\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true;\n\nfunction swap (b, n, m) {\n  var i = b[n];\n  b[n] = b[m];\n  b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length;\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1);\n  }\n  return this\n};\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length;\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3);\n    swap(this, i + 1, i + 2);\n  }\n  return this\n};\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length;\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7);\n    swap(this, i + 1, i + 6);\n    swap(this, i + 2, i + 5);\n    swap(this, i + 3, i + 4);\n  }\n  return this\n};\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0;\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n};\n\nBuffer.prototype.equals = function equals (b) {\n  if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n};\n\nBuffer.prototype.inspect = function inspect () {\n  var str = '';\n  var max = INSPECT_MAX_BYTES;\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n    if (this.length > max) str += ' ... ';\n  }\n  return '<Buffer ' + str + '>'\n};\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!internalIsBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0;\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0;\n  }\n  if (thisStart === undefined) {\n    thisStart = 0;\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length;\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0;\n  end >>>= 0;\n  thisStart >>>= 0;\n  thisEnd >>>= 0;\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart;\n  var y = end - start;\n  var len = Math.min(x, y);\n\n  var thisCopy = this.slice(thisStart, thisEnd);\n  var targetCopy = target.slice(start, end);\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i];\n      y = targetCopy[i];\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset;\n    byteOffset = 0;\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff;\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000;\n  }\n  byteOffset = +byteOffset;  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1);\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1;\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0;\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding);\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (internalIsBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF; // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1;\n  var arrLength = arr.length;\n  var valLength = val.length;\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase();\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2;\n      arrLength /= 2;\n      valLength /= 2;\n      byteOffset /= 2;\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i;\n  if (dir) {\n    var foundIndex = -1;\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i;\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex;\n        foundIndex = -1;\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true;\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false;\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n};\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n};\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0;\n  var remaining = buf.length - offset;\n  if (!length) {\n    length = remaining;\n  } else {\n    length = Number(length);\n    if (length > remaining) {\n      length = remaining;\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length;\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2;\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16);\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed;\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8';\n    length = this.length;\n    offset = 0;\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset;\n    length = this.length;\n    offset = 0;\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0;\n    if (isFinite(length)) {\n      length = length | 0;\n      if (encoding === undefined) encoding = 'utf8';\n    } else {\n      encoding = length;\n      length = undefined;\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset;\n  if (length === undefined || length > remaining) length = remaining;\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8';\n\n  var loweredCase = false;\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase();\n        loweredCase = true;\n    }\n  }\n};\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n};\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return fromByteArray(buf)\n  } else {\n    return fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end);\n  var res = [];\n\n  var i = start;\n  while (i < end) {\n    var firstByte = buf[i];\n    var codePoint = null;\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1;\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte;\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1];\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint;\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1];\n          thirdByte = buf[i + 2];\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint;\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1];\n          thirdByte = buf[i + 2];\n          fourthByte = buf[i + 3];\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint;\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD;\n      bytesPerSequence = 1;\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000;\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n      codePoint = 0xDC00 | codePoint & 0x3FF;\n    }\n\n    res.push(codePoint);\n    i += bytesPerSequence;\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length;\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = '';\n  var i = 0;\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    );\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = '';\n  end = Math.min(buf.length, end);\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F);\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = '';\n  end = Math.min(buf.length, end);\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i]);\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length;\n\n  if (!start || start < 0) start = 0;\n  if (!end || end < 0 || end > len) end = len;\n\n  var out = '';\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i]);\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end);\n  var res = '';\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length;\n  start = ~~start;\n  end = end === undefined ? len : ~~end;\n\n  if (start < 0) {\n    start += len;\n    if (start < 0) start = 0;\n  } else if (start > len) {\n    start = len;\n  }\n\n  if (end < 0) {\n    end += len;\n    if (end < 0) end = 0;\n  } else if (end > len) {\n    end = len;\n  }\n\n  if (end < start) end = start;\n\n  var newBuf;\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end);\n    newBuf.__proto__ = Buffer.prototype;\n  } else {\n    var sliceLen = end - start;\n    newBuf = new Buffer(sliceLen, undefined);\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start];\n    }\n  }\n\n  return newBuf\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0;\n  byteLength = byteLength | 0;\n  if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n  var val = this[offset];\n  var mul = 1;\n  var i = 0;\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul;\n  }\n\n  return val\n};\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0;\n  byteLength = byteLength | 0;\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length);\n  }\n\n  var val = this[offset + --byteLength];\n  var mul = 1;\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul;\n  }\n\n  return val\n};\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length);\n  return this[offset]\n};\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length);\n  return this[offset] | (this[offset + 1] << 8)\n};\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length);\n  return (this[offset] << 8) | this[offset + 1]\n};\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length);\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n};\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length);\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n};\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0;\n  byteLength = byteLength | 0;\n  if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n  var val = this[offset];\n  var mul = 1;\n  var i = 0;\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul;\n  }\n  mul *= 0x80;\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n  return val\n};\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0;\n  byteLength = byteLength | 0;\n  if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n  var i = byteLength;\n  var mul = 1;\n  var val = this[offset + --i];\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul;\n  }\n  mul *= 0x80;\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n  return val\n};\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length);\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length);\n  var val = this[offset] | (this[offset + 1] << 8);\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length);\n  var val = this[offset + 1] | (this[offset] << 8);\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length);\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length);\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n};\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length);\n  return read(this, offset, true, 23, 4)\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length);\n  return read(this, offset, false, 23, 4)\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length);\n  return read(this, offset, true, 52, 8)\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length);\n  return read(this, offset, false, 52, 8)\n};\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  byteLength = byteLength | 0;\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n    checkInt(this, value, offset, byteLength, maxBytes, 0);\n  }\n\n  var mul = 1;\n  var i = 0;\n  this[offset] = value & 0xFF;\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF;\n  }\n\n  return offset + byteLength\n};\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  byteLength = byteLength | 0;\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n    checkInt(this, value, offset, byteLength, maxBytes, 0);\n  }\n\n  var i = byteLength - 1;\n  var mul = 1;\n  this[offset + i] = value & 0xFF;\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF;\n  }\n\n  return offset + byteLength\n};\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n  this[offset] = (value & 0xff);\n  return offset + 1\n};\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1;\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8;\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff);\n    this[offset + 1] = (value >>> 8);\n  } else {\n    objectWriteUInt16(this, value, offset, true);\n  }\n  return offset + 2\n};\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8);\n    this[offset + 1] = (value & 0xff);\n  } else {\n    objectWriteUInt16(this, value, offset, false);\n  }\n  return offset + 2\n};\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1;\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff;\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24);\n    this[offset + 2] = (value >>> 16);\n    this[offset + 1] = (value >>> 8);\n    this[offset] = (value & 0xff);\n  } else {\n    objectWriteUInt32(this, value, offset, true);\n  }\n  return offset + 4\n};\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24);\n    this[offset + 1] = (value >>> 16);\n    this[offset + 2] = (value >>> 8);\n    this[offset + 3] = (value & 0xff);\n  } else {\n    objectWriteUInt32(this, value, offset, false);\n  }\n  return offset + 4\n};\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1);\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit);\n  }\n\n  var i = 0;\n  var mul = 1;\n  var sub = 0;\n  this[offset] = value & 0xFF;\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1;\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n  }\n\n  return offset + byteLength\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1);\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit);\n  }\n\n  var i = byteLength - 1;\n  var mul = 1;\n  var sub = 0;\n  this[offset + i] = value & 0xFF;\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1;\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n  }\n\n  return offset + byteLength\n};\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n  if (value < 0) value = 0xff + value + 1;\n  this[offset] = (value & 0xff);\n  return offset + 1\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff);\n    this[offset + 1] = (value >>> 8);\n  } else {\n    objectWriteUInt16(this, value, offset, true);\n  }\n  return offset + 2\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8);\n    this[offset + 1] = (value & 0xff);\n  } else {\n    objectWriteUInt16(this, value, offset, false);\n  }\n  return offset + 2\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff);\n    this[offset + 1] = (value >>> 8);\n    this[offset + 2] = (value >>> 16);\n    this[offset + 3] = (value >>> 24);\n  } else {\n    objectWriteUInt32(this, value, offset, true);\n  }\n  return offset + 4\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value;\n  offset = offset | 0;\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n  if (value < 0) value = 0xffffffff + value + 1;\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24);\n    this[offset + 1] = (value >>> 16);\n    this[offset + 2] = (value >>> 8);\n    this[offset + 3] = (value & 0xff);\n  } else {\n    objectWriteUInt32(this, value, offset, false);\n  }\n  return offset + 4\n};\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4);\n  }\n  write(buf, value, offset, littleEndian, 23, 4);\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n};\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8);\n  }\n  write(buf, value, offset, littleEndian, 52, 8);\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0;\n  if (!end && end !== 0) end = this.length;\n  if (targetStart >= target.length) targetStart = target.length;\n  if (!targetStart) targetStart = 0;\n  if (end > 0 && end < start) end = start;\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length;\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start;\n  }\n\n  var len = end - start;\n  var i;\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start];\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start];\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    );\n  }\n\n  return len\n};\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start;\n      start = 0;\n      end = this.length;\n    } else if (typeof end === 'string') {\n      encoding = end;\n      end = this.length;\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0);\n      if (code < 256) {\n        val = code;\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255;\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0;\n  end = end === undefined ? this.length : end >>> 0;\n\n  if (!val) val = 0;\n\n  var i;\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val;\n    }\n  } else {\n    var bytes = internalIsBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString());\n    var len = bytes.length;\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len];\n    }\n  }\n\n  return this\n};\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '');\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '=';\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity;\n  var codePoint;\n  var length = string.length;\n  var leadSurrogate = null;\n  var bytes = [];\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i);\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint;\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n        leadSurrogate = codePoint;\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n    }\n\n    leadSurrogate = null;\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint);\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      );\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      );\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      );\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = [];\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF);\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo;\n  var byteArray = [];\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i);\n    hi = c >> 8;\n    lo = c % 256;\n    byteArray.push(lo);\n    byteArray.push(hi);\n  }\n\n  return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n  return toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i];\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nfunction isBuffer(obj) {\n  return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n  return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n  return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n\nexport { Buffer, INSPECT_MAX_BYTES, SlowBuffer, isBuffer, _kMaxLength as kMaxLength };\n","import {Buffer} from 'buffer';\n\nexport default BufferList;\n\nfunction BufferList() {\n  this.head = null;\n  this.tail = null;\n  this.length = 0;\n}\n\nBufferList.prototype.push = function (v) {\n  var entry = { data: v, next: null };\n  if (this.length > 0) this.tail.next = entry;else this.head = entry;\n  this.tail = entry;\n  ++this.length;\n};\n\nBufferList.prototype.unshift = function (v) {\n  var entry = { data: v, next: this.head };\n  if (this.length === 0) this.tail = entry;\n  this.head = entry;\n  ++this.length;\n};\n\nBufferList.prototype.shift = function () {\n  if (this.length === 0) return;\n  var ret = this.head.data;\n  if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n  --this.length;\n  return ret;\n};\n\nBufferList.prototype.clear = function () {\n  this.head = this.tail = null;\n  this.length = 0;\n};\n\nBufferList.prototype.join = function (s) {\n  if (this.length === 0) return '';\n  var p = this.head;\n  var ret = '' + p.data;\n  while (p = p.next) {\n    ret += s + p.data;\n  }return ret;\n};\n\nBufferList.prototype.concat = function (n) {\n  if (this.length === 0) return Buffer.alloc(0);\n  if (this.length === 1) return this.head.data;\n  var ret = Buffer.allocUnsafe(n >>> 0);\n  var p = this.head;\n  var i = 0;\n  while (p) {\n    p.data.copy(ret, i);\n    i += p.data.length;\n    p = p.next;\n  }\n  return ret;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport {Buffer} from 'buffer';\nvar isBufferEncoding = Buffer.isEncoding\n  || function(encoding) {\n       switch (encoding && encoding.toLowerCase()) {\n         case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n         default: return false;\n       }\n     }\n\n\nfunction assertEncoding(encoding) {\n  if (encoding && !isBufferEncoding(encoding)) {\n    throw new Error('Unknown encoding: ' + encoding);\n  }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nexport function StringDecoder(encoding) {\n  this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n  assertEncoding(encoding);\n  switch (this.encoding) {\n    case 'utf8':\n      // CESU-8 represents each of Surrogate Pair by 3-bytes\n      this.surrogateSize = 3;\n      break;\n    case 'ucs2':\n    case 'utf16le':\n      // UTF-16 represents each of Surrogate Pair by 2-bytes\n      this.surrogateSize = 2;\n      this.detectIncompleteChar = utf16DetectIncompleteChar;\n      break;\n    case 'base64':\n      // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n      this.surrogateSize = 3;\n      this.detectIncompleteChar = base64DetectIncompleteChar;\n      break;\n    default:\n      this.write = passThroughWrite;\n      return;\n  }\n\n  // Enough space to store all bytes of a single character. UTF-8 needs 4\n  // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n  this.charBuffer = new Buffer(6);\n  // Number of bytes received for the current incomplete multi-byte character.\n  this.charReceived = 0;\n  // Number of bytes expected for the current incomplete multi-byte character.\n  this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n  var charStr = '';\n  // if our last write ended with an incomplete multibyte character\n  while (this.charLength) {\n    // determine how many remaining bytes this buffer has to offer for this char\n    var available = (buffer.length >= this.charLength - this.charReceived) ?\n        this.charLength - this.charReceived :\n        buffer.length;\n\n    // add the new bytes to the char buffer\n    buffer.copy(this.charBuffer, this.charReceived, 0, available);\n    this.charReceived += available;\n\n    if (this.charReceived < this.charLength) {\n      // still not enough chars in this buffer? wait for more ...\n      return '';\n    }\n\n    // remove bytes belonging to the current character from the buffer\n    buffer = buffer.slice(available, buffer.length);\n\n    // get the character that was split\n    charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n    // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n    var charCode = charStr.charCodeAt(charStr.length - 1);\n    if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n      this.charLength += this.surrogateSize;\n      charStr = '';\n      continue;\n    }\n    this.charReceived = this.charLength = 0;\n\n    // if there are no more bytes in this buffer, just emit our char\n    if (buffer.length === 0) {\n      return charStr;\n    }\n    break;\n  }\n\n  // determine and set charLength / charReceived\n  this.detectIncompleteChar(buffer);\n\n  var end = buffer.length;\n  if (this.charLength) {\n    // buffer the incomplete character bytes we got\n    buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n    end -= this.charReceived;\n  }\n\n  charStr += buffer.toString(this.encoding, 0, end);\n\n  var end = charStr.length - 1;\n  var charCode = charStr.charCodeAt(end);\n  // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n  if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n    var size = this.surrogateSize;\n    this.charLength += size;\n    this.charReceived += size;\n    this.charBuffer.copy(this.charBuffer, size, 0, size);\n    buffer.copy(this.charBuffer, 0, 0, size);\n    return charStr.substring(0, end);\n  }\n\n  // or just emit the charStr\n  return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n  // determine how many bytes we have to check at the end of this buffer\n  var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n  // Figure out if one of the last i bytes of our buffer announces an\n  // incomplete char.\n  for (; i > 0; i--) {\n    var c = buffer[buffer.length - i];\n\n    // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n    // 110XXXXX\n    if (i == 1 && c >> 5 == 0x06) {\n      this.charLength = 2;\n      break;\n    }\n\n    // 1110XXXX\n    if (i <= 2 && c >> 4 == 0x0E) {\n      this.charLength = 3;\n      break;\n    }\n\n    // 11110XXX\n    if (i <= 3 && c >> 3 == 0x1E) {\n      this.charLength = 4;\n      break;\n    }\n  }\n  this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n  var res = '';\n  if (buffer && buffer.length)\n    res = this.write(buffer);\n\n  if (this.charReceived) {\n    var cr = this.charReceived;\n    var buf = this.charBuffer;\n    var enc = this.encoding;\n    res += buf.slice(0, cr).toString(enc);\n  }\n\n  return res;\n};\n\nfunction passThroughWrite(buffer) {\n  return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n  this.charReceived = buffer.length % 2;\n  this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n  this.charReceived = buffer.length % 3;\n  this.charLength = this.charReceived ? 3 : 0;\n}\n","'use strict';\n\n\nReadable.ReadableState = ReadableState;\nimport EventEmitter from 'events';\nimport {inherits, debuglog} from 'util';\nimport BufferList from './buffer-list';\nimport {StringDecoder} from 'string_decoder';\nimport {Duplex} from './duplex';\nimport {nextTick} from 'process';\n\nvar debug = debuglog('stream');\ninherits(Readable, EventEmitter);\n\nfunction prependListener(emitter, event, fn) {\n  // Sadly this is not cacheable as some libraries bundle their own\n  // event emitter implementation with them.\n  if (typeof emitter.prependListener === 'function') {\n    return emitter.prependListener(event, fn);\n  } else {\n    // This is a hack to make sure that our error handler is attached before any\n    // userland ones.  NEVER DO THIS. This is here only because this code needs\n    // to continue to work with older versions of Node.js that do not include\n    // the prependListener() method. The goal is to eventually remove this hack.\n    if (!emitter._events || !emitter._events[event])\n      emitter.on(event, fn);\n    else if (Array.isArray(emitter._events[event]))\n      emitter._events[event].unshift(fn);\n    else\n      emitter._events[event] = [fn, emitter._events[event]];\n  }\n}\nfunction listenerCount (emitter, type) {\n  return emitter.listeners(type).length;\n}\nfunction ReadableState(options, stream) {\n\n  options = options || {};\n\n  // object stream flag. Used to make read(n) ignore n and to\n  // make all the buffer merging and length checks go away\n  this.objectMode = !!options.objectMode;\n\n  if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n  // the point at which it stops calling _read() to fill the buffer\n  // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n  var hwm = options.highWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = ~ ~this.highWaterMark;\n\n  // A linked list is used to store data chunks instead of an array because the\n  // linked list can remove elements from the beginning faster than\n  // array.shift()\n  this.buffer = new BufferList();\n  this.length = 0;\n  this.pipes = null;\n  this.pipesCount = 0;\n  this.flowing = null;\n  this.ended = false;\n  this.endEmitted = false;\n  this.reading = false;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // whenever we return null, then we set a flag to say\n  // that we're awaiting a 'readable' event emission.\n  this.needReadable = false;\n  this.emittedReadable = false;\n  this.readableListening = false;\n  this.resumeScheduled = false;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // when piping, we only care about 'readable' events that happen\n  // after read()ing all the bytes and not getting any pushback.\n  this.ranOut = false;\n\n  // the number of writers that are awaiting a drain event in .pipe()s\n  this.awaitDrain = 0;\n\n  // if true, a maybeReadMore has been scheduled\n  this.readingMore = false;\n\n  this.decoder = null;\n  this.encoding = null;\n  if (options.encoding) {\n    this.decoder = new StringDecoder(options.encoding);\n    this.encoding = options.encoding;\n  }\n}\nexport default Readable;\nexport function Readable(options) {\n\n  if (!(this instanceof Readable)) return new Readable(options);\n\n  this._readableState = new ReadableState(options, this);\n\n  // legacy\n  this.readable = true;\n\n  if (options && typeof options.read === 'function') this._read = options.read;\n\n  EventEmitter.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n  var state = this._readableState;\n\n  if (!state.objectMode && typeof chunk === 'string') {\n    encoding = encoding || state.defaultEncoding;\n    if (encoding !== state.encoding) {\n      chunk = Buffer.from(chunk, encoding);\n      encoding = '';\n    }\n  }\n\n  return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n  var state = this._readableState;\n  return readableAddChunk(this, state, chunk, '', true);\n};\n\nReadable.prototype.isPaused = function () {\n  return this._readableState.flowing === false;\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n  var er = chunkInvalid(state, chunk);\n  if (er) {\n    stream.emit('error', er);\n  } else if (chunk === null) {\n    state.reading = false;\n    onEofChunk(stream, state);\n  } else if (state.objectMode || chunk && chunk.length > 0) {\n    if (state.ended && !addToFront) {\n      var e = new Error('stream.push() after EOF');\n      stream.emit('error', e);\n    } else if (state.endEmitted && addToFront) {\n      var _e = new Error('stream.unshift() after end event');\n      stream.emit('error', _e);\n    } else {\n      var skipAdd;\n      if (state.decoder && !addToFront && !encoding) {\n        chunk = state.decoder.write(chunk);\n        skipAdd = !state.objectMode && chunk.length === 0;\n      }\n\n      if (!addToFront) state.reading = false;\n\n      // Don't add to the buffer if we've decoded to an empty string chunk and\n      // we're not in object mode\n      if (!skipAdd) {\n        // if we want the data now, just emit it.\n        if (state.flowing && state.length === 0 && !state.sync) {\n          stream.emit('data', chunk);\n          stream.read(0);\n        } else {\n          // update the buffer info.\n          state.length += state.objectMode ? 1 : chunk.length;\n          if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n          if (state.needReadable) emitReadable(stream);\n        }\n      }\n\n      maybeReadMore(stream, state);\n    }\n  } else if (!addToFront) {\n    state.reading = false;\n  }\n\n  return needMoreData(state);\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes.  This is to work around cases where hwm=0,\n// such as the repl.  Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n  this._readableState.decoder = new StringDecoder(enc);\n  this._readableState.encoding = enc;\n  return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n  if (n >= MAX_HWM) {\n    n = MAX_HWM;\n  } else {\n    // Get the next highest power of 2 to prevent increasing hwm excessively in\n    // tiny amounts\n    n--;\n    n |= n >>> 1;\n    n |= n >>> 2;\n    n |= n >>> 4;\n    n |= n >>> 8;\n    n |= n >>> 16;\n    n++;\n  }\n  return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n  if (n <= 0 || state.length === 0 && state.ended) return 0;\n  if (state.objectMode) return 1;\n  if (n !== n) {\n    // Only flow one buffer at a time\n    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n  }\n  // If we're asking for more than the current hwm, then raise the hwm.\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n  if (n <= state.length) return n;\n  // Don't have enough\n  if (!state.ended) {\n    state.needReadable = true;\n    return 0;\n  }\n  return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n  debug('read', n);\n  n = parseInt(n, 10);\n  var state = this._readableState;\n  var nOrig = n;\n\n  if (n !== 0) state.emittedReadable = false;\n\n  // if we're doing read(0) to trigger a readable event, but we\n  // already have a bunch of data in the buffer, then just trigger\n  // the 'readable' event and move on.\n  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n    debug('read: emitReadable', state.length, state.ended);\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n    return null;\n  }\n\n  n = howMuchToRead(n, state);\n\n  // if we've ended, and we're now clear, then finish it up.\n  if (n === 0 && state.ended) {\n    if (state.length === 0) endReadable(this);\n    return null;\n  }\n\n  // All the actual chunk generation logic needs to be\n  // *below* the call to _read.  The reason is that in certain\n  // synthetic stream cases, such as passthrough streams, _read\n  // may be a completely synchronous operation which may change\n  // the state of the read buffer, providing enough data when\n  // before there was *not* enough.\n  //\n  // So, the steps are:\n  // 1. Figure out what the state of things will be after we do\n  // a read from the buffer.\n  //\n  // 2. If that resulting state will trigger a _read, then call _read.\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\n  // deeply ugly to write APIs this way, but that still doesn't mean\n  // that the Readable class should behave improperly, as streams are\n  // designed to be sync/async agnostic.\n  // Take note if the _read call is sync or async (ie, if the read call\n  // has returned yet), so that we know whether or not it's safe to emit\n  // 'readable' etc.\n  //\n  // 3. Actually pull the requested chunks out of the buffer and return.\n\n  // if we need a readable event, then we need to do some reading.\n  var doRead = state.needReadable;\n  debug('need readable', doRead);\n\n  // if we currently have less than the highWaterMark, then also read some\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\n    doRead = true;\n    debug('length less than watermark', doRead);\n  }\n\n  // however, if we've ended, then there's no point, and if we're already\n  // reading, then it's unnecessary.\n  if (state.ended || state.reading) {\n    doRead = false;\n    debug('reading or ended', doRead);\n  } else if (doRead) {\n    debug('do read');\n    state.reading = true;\n    state.sync = true;\n    // if the length is currently zero, then we *need* a readable event.\n    if (state.length === 0) state.needReadable = true;\n    // call internal read method\n    this._read(state.highWaterMark);\n    state.sync = false;\n    // If _read pushed data synchronously, then `reading` will be false,\n    // and we need to re-evaluate how much data we can return to the user.\n    if (!state.reading) n = howMuchToRead(nOrig, state);\n  }\n\n  var ret;\n  if (n > 0) ret = fromList(n, state);else ret = null;\n\n  if (ret === null) {\n    state.needReadable = true;\n    n = 0;\n  } else {\n    state.length -= n;\n  }\n\n  if (state.length === 0) {\n    // If we have nothing in the buffer, then we want to know\n    // as soon as we *do* get something into the buffer.\n    if (!state.ended) state.needReadable = true;\n\n    // If we tried to read() past the EOF, then emit end on the next tick.\n    if (nOrig !== n && state.ended) endReadable(this);\n  }\n\n  if (ret !== null) this.emit('data', ret);\n\n  return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n  var er = null;\n  if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  return er;\n}\n\nfunction onEofChunk(stream, state) {\n  if (state.ended) return;\n  if (state.decoder) {\n    var chunk = state.decoder.end();\n    if (chunk && chunk.length) {\n      state.buffer.push(chunk);\n      state.length += state.objectMode ? 1 : chunk.length;\n    }\n  }\n  state.ended = true;\n\n  // emit 'readable' now to make sure it gets picked up.\n  emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow.  This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n  var state = stream._readableState;\n  state.needReadable = false;\n  if (!state.emittedReadable) {\n    debug('emitReadable', state.flowing);\n    state.emittedReadable = true;\n    if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n  }\n}\n\nfunction emitReadable_(stream) {\n  debug('emit readable');\n  stream.emit('readable');\n  flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data.  that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n  if (!state.readingMore) {\n    state.readingMore = true;\n    nextTick(maybeReadMore_, stream, state);\n  }\n}\n\nfunction maybeReadMore_(stream, state) {\n  var len = state.length;\n  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n    debug('maybeReadMore read 0');\n    stream.read(0);\n    if (len === state.length)\n      // didn't get any data, stop spinning.\n      break;else len = state.length;\n  }\n  state.readingMore = false;\n}\n\n// abstract method.  to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n  this.emit('error', new Error('not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n  var src = this;\n  var state = this._readableState;\n\n  switch (state.pipesCount) {\n    case 0:\n      state.pipes = dest;\n      break;\n    case 1:\n      state.pipes = [state.pipes, dest];\n      break;\n    default:\n      state.pipes.push(dest);\n      break;\n  }\n  state.pipesCount += 1;\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n  var doEnd = (!pipeOpts || pipeOpts.end !== false);\n\n  var endFn = doEnd ? onend : cleanup;\n  if (state.endEmitted) nextTick(endFn);else src.once('end', endFn);\n\n  dest.on('unpipe', onunpipe);\n  function onunpipe(readable) {\n    debug('onunpipe');\n    if (readable === src) {\n      cleanup();\n    }\n  }\n\n  function onend() {\n    debug('onend');\n    dest.end();\n  }\n\n  // when the dest drains, it reduces the awaitDrain counter\n  // on the source.  This would be more elegant with a .once()\n  // handler in flow(), but adding and removing repeatedly is\n  // too slow.\n  var ondrain = pipeOnDrain(src);\n  dest.on('drain', ondrain);\n\n  var cleanedUp = false;\n  function cleanup() {\n    debug('cleanup');\n    // cleanup event handlers once the pipe is broken\n    dest.removeListener('close', onclose);\n    dest.removeListener('finish', onfinish);\n    dest.removeListener('drain', ondrain);\n    dest.removeListener('error', onerror);\n    dest.removeListener('unpipe', onunpipe);\n    src.removeListener('end', onend);\n    src.removeListener('end', cleanup);\n    src.removeListener('data', ondata);\n\n    cleanedUp = true;\n\n    // if the reader is waiting for a drain event from this\n    // specific writer, then it would cause it to never start\n    // flowing again.\n    // So, if this is awaiting a drain, then we just call it now.\n    // If we don't know, then assume that we are waiting for one.\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n  }\n\n  // If the user pushes more data while we're writing to dest then we'll end up\n  // in ondata again. However, we only want to increase awaitDrain once because\n  // dest will only emit one 'drain' event for the multiple writes.\n  // => Introduce a guard on increasing awaitDrain.\n  var increasedAwaitDrain = false;\n  src.on('data', ondata);\n  function ondata(chunk) {\n    debug('ondata');\n    increasedAwaitDrain = false;\n    var ret = dest.write(chunk);\n    if (false === ret && !increasedAwaitDrain) {\n      // If the user unpiped during `dest.write()`, it is possible\n      // to get stuck in a permanently paused state if that write\n      // also returned false.\n      // => Check whether `dest` is still a piping destination.\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n        debug('false write response, pause', src._readableState.awaitDrain);\n        src._readableState.awaitDrain++;\n        increasedAwaitDrain = true;\n      }\n      src.pause();\n    }\n  }\n\n  // if the dest has an error, then stop piping into it.\n  // however, don't suppress the throwing behavior for this.\n  function onerror(er) {\n    debug('onerror', er);\n    unpipe();\n    dest.removeListener('error', onerror);\n    if (listenerCount(dest, 'error') === 0) dest.emit('error', er);\n  }\n\n  // Make sure our error handler is attached before userland ones.\n  prependListener(dest, 'error', onerror);\n\n  // Both close and finish should trigger unpipe, but only once.\n  function onclose() {\n    dest.removeListener('finish', onfinish);\n    unpipe();\n  }\n  dest.once('close', onclose);\n  function onfinish() {\n    debug('onfinish');\n    dest.removeListener('close', onclose);\n    unpipe();\n  }\n  dest.once('finish', onfinish);\n\n  function unpipe() {\n    debug('unpipe');\n    src.unpipe(dest);\n  }\n\n  // tell the dest that it's being piped to\n  dest.emit('pipe', src);\n\n  // start the flow if it hasn't been started already.\n  if (!state.flowing) {\n    debug('pipe resume');\n    src.resume();\n  }\n\n  return dest;\n};\n\nfunction pipeOnDrain(src) {\n  return function () {\n    var state = src._readableState;\n    debug('pipeOnDrain', state.awaitDrain);\n    if (state.awaitDrain) state.awaitDrain--;\n    if (state.awaitDrain === 0 && src.listeners('data').length) {\n      state.flowing = true;\n      flow(src);\n    }\n  };\n}\n\nReadable.prototype.unpipe = function (dest) {\n  var state = this._readableState;\n\n  // if we're not piping anywhere, then do nothing.\n  if (state.pipesCount === 0) return this;\n\n  // just one destination.  most common case.\n  if (state.pipesCount === 1) {\n    // passed in one, but it's not the right one.\n    if (dest && dest !== state.pipes) return this;\n\n    if (!dest) dest = state.pipes;\n\n    // got a match.\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n    if (dest) dest.emit('unpipe', this);\n    return this;\n  }\n\n  // slow case. multiple pipe destinations.\n\n  if (!dest) {\n    // remove all.\n    var dests = state.pipes;\n    var len = state.pipesCount;\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n\n    for (var _i = 0; _i < len; _i++) {\n      dests[_i].emit('unpipe', this);\n    }return this;\n  }\n\n  // try to find the right one.\n  var i = indexOf(state.pipes, dest);\n  if (i === -1) return this;\n\n  state.pipes.splice(i, 1);\n  state.pipesCount -= 1;\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n  dest.emit('unpipe', this);\n\n  return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n  var res = EventEmitter.prototype.on.call(this, ev, fn);\n\n  if (ev === 'data') {\n    // Start flowing on next tick if stream isn't explicitly paused\n    if (this._readableState.flowing !== false) this.resume();\n  } else if (ev === 'readable') {\n    var state = this._readableState;\n    if (!state.endEmitted && !state.readableListening) {\n      state.readableListening = state.needReadable = true;\n      state.emittedReadable = false;\n      if (!state.reading) {\n        nextTick(nReadingNextTick, this);\n      } else if (state.length) {\n        emitReadable(this, state);\n      }\n    }\n  }\n\n  return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n  debug('readable nexttick read 0');\n  self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n  var state = this._readableState;\n  if (!state.flowing) {\n    debug('resume');\n    state.flowing = true;\n    resume(this, state);\n  }\n  return this;\n};\n\nfunction resume(stream, state) {\n  if (!state.resumeScheduled) {\n    state.resumeScheduled = true;\n    nextTick(resume_, stream, state);\n  }\n}\n\nfunction resume_(stream, state) {\n  if (!state.reading) {\n    debug('resume read 0');\n    stream.read(0);\n  }\n\n  state.resumeScheduled = false;\n  state.awaitDrain = 0;\n  stream.emit('resume');\n  flow(stream);\n  if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n  debug('call pause flowing=%j', this._readableState.flowing);\n  if (false !== this._readableState.flowing) {\n    debug('pause');\n    this._readableState.flowing = false;\n    this.emit('pause');\n  }\n  return this;\n};\n\nfunction flow(stream) {\n  var state = stream._readableState;\n  debug('flow', state.flowing);\n  while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n  var state = this._readableState;\n  var paused = false;\n\n  var self = this;\n  stream.on('end', function () {\n    debug('wrapped end');\n    if (state.decoder && !state.ended) {\n      var chunk = state.decoder.end();\n      if (chunk && chunk.length) self.push(chunk);\n    }\n\n    self.push(null);\n  });\n\n  stream.on('data', function (chunk) {\n    debug('wrapped data');\n    if (state.decoder) chunk = state.decoder.write(chunk);\n\n    // don't skip over falsy values in objectMode\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n    var ret = self.push(chunk);\n    if (!ret) {\n      paused = true;\n      stream.pause();\n    }\n  });\n\n  // proxy all the other methods.\n  // important when wrapping filters and duplexes.\n  for (var i in stream) {\n    if (this[i] === undefined && typeof stream[i] === 'function') {\n      this[i] = function (method) {\n        return function () {\n          return stream[method].apply(stream, arguments);\n        };\n      }(i);\n    }\n  }\n\n  // proxy certain important events.\n  var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n  forEach(events, function (ev) {\n    stream.on(ev, self.emit.bind(self, ev));\n  });\n\n  // when we try to consume some more bytes, simply unpause the\n  // underlying stream.\n  self._read = function (n) {\n    debug('wrapped _read', n);\n    if (paused) {\n      paused = false;\n      stream.resume();\n    }\n  };\n\n  return self;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n  // nothing buffered\n  if (state.length === 0) return null;\n\n  var ret;\n  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n    // read it all, truncate the list\n    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n    state.buffer.clear();\n  } else {\n    // read part of list\n    ret = fromListPartial(n, state.buffer, state.decoder);\n  }\n\n  return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n  var ret;\n  if (n < list.head.data.length) {\n    // slice is the same for buffers and strings\n    ret = list.head.data.slice(0, n);\n    list.head.data = list.head.data.slice(n);\n  } else if (n === list.head.data.length) {\n    // first chunk is a perfect match\n    ret = list.shift();\n  } else {\n    // result spans more than one buffer\n    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n  }\n  return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n  var p = list.head;\n  var c = 1;\n  var ret = p.data;\n  n -= ret.length;\n  while (p = p.next) {\n    var str = p.data;\n    var nb = n > str.length ? str.length : n;\n    if (nb === str.length) ret += str;else ret += str.slice(0, n);\n    n -= nb;\n    if (n === 0) {\n      if (nb === str.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = str.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n  var ret = Buffer.allocUnsafe(n);\n  var p = list.head;\n  var c = 1;\n  p.data.copy(ret);\n  n -= p.data.length;\n  while (p = p.next) {\n    var buf = p.data;\n    var nb = n > buf.length ? buf.length : n;\n    buf.copy(ret, ret.length - n, 0, nb);\n    n -= nb;\n    if (n === 0) {\n      if (nb === buf.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = buf.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\nfunction endReadable(stream) {\n  var state = stream._readableState;\n\n  // If we get here before consuming all the bytes, then that is a\n  // bug in node.  Should never happen.\n  if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n  if (!state.endEmitted) {\n    state.ended = true;\n    nextTick(endReadableNT, state, stream);\n  }\n}\n\nfunction endReadableNT(state, stream) {\n  // Check that we didn't get one last unshift.\n  if (!state.endEmitted && state.length === 0) {\n    state.endEmitted = true;\n    stream.readable = false;\n    stream.emit('end');\n  }\n}\n\nfunction forEach(xs, f) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    f(xs[i], i);\n  }\n}\n\nfunction indexOf(xs, x) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    if (xs[i] === x) return i;\n  }\n  return -1;\n}\n","// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\nimport {inherits, deprecate} from 'util';\nimport {Buffer} from 'buffer';\nWritable.WritableState = WritableState;\nimport {EventEmitter} from 'events';\nimport {Duplex} from './duplex';\nimport {nextTick} from 'process';\ninherits(Writable, EventEmitter);\n\nfunction nop() {}\n\nfunction WriteReq(chunk, encoding, cb) {\n  this.chunk = chunk;\n  this.encoding = encoding;\n  this.callback = cb;\n  this.next = null;\n}\n\nfunction WritableState(options, stream) {\n  Object.defineProperty(this, 'buffer', {\n    get: deprecate(function () {\n      return this.getBuffer();\n    }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n  });\n  options = options || {};\n\n  // object stream flag to indicate whether or not this stream\n  // contains buffers or objects.\n  this.objectMode = !!options.objectMode;\n\n  if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n  // the point at which write() starts returning false\n  // Note: 0 is a valid value, means that we always return false if\n  // the entire buffer is not flushed immediately on write()\n  var hwm = options.highWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = ~ ~this.highWaterMark;\n\n  this.needDrain = false;\n  // at the start of calling end()\n  this.ending = false;\n  // when end() has been called, and returned\n  this.ended = false;\n  // when 'finish' is emitted\n  this.finished = false;\n\n  // should we decode strings into buffers before passing to _write?\n  // this is here so that some node-core streams can optimize string\n  // handling at a lower level.\n  var noDecode = options.decodeStrings === false;\n  this.decodeStrings = !noDecode;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // not an actual buffer we keep track of, but a measurement\n  // of how much we're waiting to get pushed to some underlying\n  // socket or file.\n  this.length = 0;\n\n  // a flag to see when we're in the middle of a write.\n  this.writing = false;\n\n  // when true all writes will be buffered until .uncork() call\n  this.corked = 0;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // a flag to know if we're processing previously buffered items, which\n  // may call the _write() callback in the same tick, so that we don't\n  // end up in an overlapped onwrite situation.\n  this.bufferProcessing = false;\n\n  // the callback that's passed to _write(chunk,cb)\n  this.onwrite = function (er) {\n    onwrite(stream, er);\n  };\n\n  // the callback that the user supplies to write(chunk,encoding,cb)\n  this.writecb = null;\n\n  // the amount that is being written when _write is called.\n  this.writelen = 0;\n\n  this.bufferedRequest = null;\n  this.lastBufferedRequest = null;\n\n  // number of pending user-supplied write callbacks\n  // this must be 0 before 'finish' can be emitted\n  this.pendingcb = 0;\n\n  // emit prefinish if the only thing we're waiting for is _write cbs\n  // This is relevant for synchronous Transform streams\n  this.prefinished = false;\n\n  // True if the error was already emitted and should not be thrown again\n  this.errorEmitted = false;\n\n  // count buffered requests\n  this.bufferedRequestCount = 0;\n\n  // allocate the first CorkedRequest, there is always\n  // one allocated and free to use, and we maintain at most two\n  this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function writableStateGetBuffer() {\n  var current = this.bufferedRequest;\n  var out = [];\n  while (current) {\n    out.push(current);\n    current = current.next;\n  }\n  return out;\n};\n\nexport default Writable;\nexport function Writable(options) {\n\n  // Writable ctor is applied to Duplexes, though they're not\n  // instanceof Writable, they're instanceof Readable.\n  if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);\n\n  this._writableState = new WritableState(options, this);\n\n  // legacy.\n  this.writable = true;\n\n  if (options) {\n    if (typeof options.write === 'function') this._write = options.write;\n\n    if (typeof options.writev === 'function') this._writev = options.writev;\n  }\n\n  EventEmitter.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n  this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n  var er = new Error('write after end');\n  // TODO: defer error events consistently everywhere, not just the cb\n  stream.emit('error', er);\n  nextTick(cb, er);\n}\n\n// If we get something that is not a buffer, string, null, or undefined,\n// and we're not in objectMode, then that's an error.\n// Otherwise stream chunks are all considered to be of length=1, and the\n// watermarks determine how many objects to keep in the buffer, rather than\n// how many bytes or characters.\nfunction validChunk(stream, state, chunk, cb) {\n  var valid = true;\n  var er = false;\n  // Always throw error if a null is written\n  // if we are not in object mode then throw\n  // if it is not a buffer, string, or undefined.\n  if (chunk === null) {\n    er = new TypeError('May not write null values to stream');\n  } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  if (er) {\n    stream.emit('error', er);\n    nextTick(cb, er);\n    valid = false;\n  }\n  return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n  var state = this._writableState;\n  var ret = false;\n\n  if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n  if (typeof cb !== 'function') cb = nop;\n\n  if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {\n    state.pendingcb++;\n    ret = writeOrBuffer(this, state, chunk, encoding, cb);\n  }\n\n  return ret;\n};\n\nWritable.prototype.cork = function () {\n  var state = this._writableState;\n\n  state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n  var state = this._writableState;\n\n  if (state.corked) {\n    state.corked--;\n\n    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n  }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n  // node::ParseEncoding() requires lower case.\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n  this._writableState.defaultEncoding = encoding;\n  return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n    chunk = Buffer.from(chunk, encoding);\n  }\n  return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn.  Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, chunk, encoding, cb) {\n  chunk = decodeChunk(state, chunk, encoding);\n\n  if (Buffer.isBuffer(chunk)) encoding = 'buffer';\n  var len = state.objectMode ? 1 : chunk.length;\n\n  state.length += len;\n\n  var ret = state.length < state.highWaterMark;\n  // we must ensure that previous needDrain will not be reset to false.\n  if (!ret) state.needDrain = true;\n\n  if (state.writing || state.corked) {\n    var last = state.lastBufferedRequest;\n    state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n    if (last) {\n      last.next = state.lastBufferedRequest;\n    } else {\n      state.bufferedRequest = state.lastBufferedRequest;\n    }\n    state.bufferedRequestCount += 1;\n  } else {\n    doWrite(stream, state, false, len, chunk, encoding, cb);\n  }\n\n  return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n  state.writelen = len;\n  state.writecb = cb;\n  state.writing = true;\n  state.sync = true;\n  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n  state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n  --state.pendingcb;\n  if (sync) nextTick(cb, er);else cb(er);\n\n  stream._writableState.errorEmitted = true;\n  stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n  state.writing = false;\n  state.writecb = null;\n  state.length -= state.writelen;\n  state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n  var state = stream._writableState;\n  var sync = state.sync;\n  var cb = state.writecb;\n\n  onwriteStateUpdate(state);\n\n  if (er) onwriteError(stream, state, sync, er, cb);else {\n    // Check if we're actually ready to finish, but don't emit yet\n    var finished = needFinish(state);\n\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n      clearBuffer(stream, state);\n    }\n\n    if (sync) {\n      /*<replacement>*/\n        nextTick(afterWrite, stream, state, finished, cb);\n      /*</replacement>*/\n    } else {\n        afterWrite(stream, state, finished, cb);\n      }\n  }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n  if (!finished) onwriteDrain(stream, state);\n  state.pendingcb--;\n  cb();\n  finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n  if (state.length === 0 && state.needDrain) {\n    state.needDrain = false;\n    stream.emit('drain');\n  }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n  state.bufferProcessing = true;\n  var entry = state.bufferedRequest;\n\n  if (stream._writev && entry && entry.next) {\n    // Fast case, write everything using _writev()\n    var l = state.bufferedRequestCount;\n    var buffer = new Array(l);\n    var holder = state.corkedRequestsFree;\n    holder.entry = entry;\n\n    var count = 0;\n    while (entry) {\n      buffer[count] = entry;\n      entry = entry.next;\n      count += 1;\n    }\n\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n    // doWrite is almost always async, defer these to save a bit of time\n    // as the hot path ends with doWrite\n    state.pendingcb++;\n    state.lastBufferedRequest = null;\n    if (holder.next) {\n      state.corkedRequestsFree = holder.next;\n      holder.next = null;\n    } else {\n      state.corkedRequestsFree = new CorkedRequest(state);\n    }\n  } else {\n    // Slow case, write chunks one-by-one\n    while (entry) {\n      var chunk = entry.chunk;\n      var encoding = entry.encoding;\n      var cb = entry.callback;\n      var len = state.objectMode ? 1 : chunk.length;\n\n      doWrite(stream, state, false, len, chunk, encoding, cb);\n      entry = entry.next;\n      // if we didn't call the onwrite immediately, then\n      // it means that we need to wait until it does.\n      // also, that means that the chunk and cb are currently\n      // being processed, so move the buffer counter past them.\n      if (state.writing) {\n        break;\n      }\n    }\n\n    if (entry === null) state.lastBufferedRequest = null;\n  }\n\n  state.bufferedRequestCount = 0;\n  state.bufferedRequest = entry;\n  state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n  cb(new Error('not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n  var state = this._writableState;\n\n  if (typeof chunk === 'function') {\n    cb = chunk;\n    chunk = null;\n    encoding = null;\n  } else if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n  // .end() fully uncorks\n  if (state.corked) {\n    state.corked = 1;\n    this.uncork();\n  }\n\n  // ignore unnecessary end() calls.\n  if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction prefinish(stream, state) {\n  if (!state.prefinished) {\n    state.prefinished = true;\n    stream.emit('prefinish');\n  }\n}\n\nfunction finishMaybe(stream, state) {\n  var need = needFinish(state);\n  if (need) {\n    if (state.pendingcb === 0) {\n      prefinish(stream, state);\n      state.finished = true;\n      stream.emit('finish');\n    } else {\n      prefinish(stream, state);\n    }\n  }\n  return need;\n}\n\nfunction endWritable(stream, state, cb) {\n  state.ending = true;\n  finishMaybe(stream, state);\n  if (cb) {\n    if (state.finished) nextTick(cb);else stream.once('finish', cb);\n  }\n  state.ended = true;\n  stream.writable = false;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n  var _this = this;\n\n  this.next = null;\n  this.entry = null;\n\n  this.finish = function (err) {\n    var entry = _this.entry;\n    _this.entry = null;\n    while (entry) {\n      var cb = entry.callback;\n      state.pendingcb--;\n      cb(err);\n      entry = entry.next;\n    }\n    if (state.corkedRequestsFree) {\n      state.corkedRequestsFree.next = _this;\n    } else {\n      state.corkedRequestsFree = _this;\n    }\n  };\n}\n","\nimport {inherits} from 'util';\nimport {nextTick} from 'process';\nimport {Readable} from './readable';\nimport {Writable} from './writable';\n\n\ninherits(Duplex, Readable);\n\nvar keys = Object.keys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n  var method = keys[v];\n  if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\nexport default Duplex;\nexport function Duplex(options) {\n  if (!(this instanceof Duplex)) return new Duplex(options);\n\n  Readable.call(this, options);\n  Writable.call(this, options);\n\n  if (options && options.readable === false) this.readable = false;\n\n  if (options && options.writable === false) this.writable = false;\n\n  this.allowHalfOpen = true;\n  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n  this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n  // if we allow half-open state, or if the writable side ended,\n  // then we're ok.\n  if (this.allowHalfOpen || this._writableState.ended) return;\n\n  // no more data can be written.\n  // But allow more writes to happen in this tick.\n  nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n  self.end();\n}\n","// a transform stream is a readable/writable stream where you do\n// something with the data.  Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored.  (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation.  For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up.  When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer.  When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks.  If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk.  However,\n// a pathological inflate type of transform can cause excessive buffering\n// here.  For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output.  In this case, you could write a very small\n// amount of input, and end up with a very large amount of output.  In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform.  A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n\nimport {Duplex} from './duplex';\n\n\nimport {inherits} from 'util';\ninherits(Transform, Duplex);\n\nfunction TransformState(stream) {\n  this.afterTransform = function (er, data) {\n    return afterTransform(stream, er, data);\n  };\n\n  this.needTransform = false;\n  this.transforming = false;\n  this.writecb = null;\n  this.writechunk = null;\n  this.writeencoding = null;\n}\n\nfunction afterTransform(stream, er, data) {\n  var ts = stream._transformState;\n  ts.transforming = false;\n\n  var cb = ts.writecb;\n\n  if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n  ts.writechunk = null;\n  ts.writecb = null;\n\n  if (data !== null && data !== undefined) stream.push(data);\n\n  cb(er);\n\n  var rs = stream._readableState;\n  rs.reading = false;\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\n    stream._read(rs.highWaterMark);\n  }\n}\nexport default Transform;\nexport function Transform(options) {\n  if (!(this instanceof Transform)) return new Transform(options);\n\n  Duplex.call(this, options);\n\n  this._transformState = new TransformState(this);\n\n  // when the writable side finishes, then flush out anything remaining.\n  var stream = this;\n\n  // start out asking for a readable event once data is transformed.\n  this._readableState.needReadable = true;\n\n  // we have implemented the _read method, and done the other things\n  // that Readable wants before the first _read call, so unset the\n  // sync guard flag.\n  this._readableState.sync = false;\n\n  if (options) {\n    if (typeof options.transform === 'function') this._transform = options.transform;\n\n    if (typeof options.flush === 'function') this._flush = options.flush;\n  }\n\n  this.once('prefinish', function () {\n    if (typeof this._flush === 'function') this._flush(function (er) {\n      done(stream, er);\n    });else done(stream);\n  });\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n  this._transformState.needTransform = false;\n  return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side.  You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk.  If you pass\n// an error, then that'll put the hurt on the whole operation.  If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n  throw new Error('Not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n  var ts = this._transformState;\n  ts.writecb = cb;\n  ts.writechunk = chunk;\n  ts.writeencoding = encoding;\n  if (!ts.transforming) {\n    var rs = this._readableState;\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n  }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n  var ts = this._transformState;\n\n  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n    ts.transforming = true;\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n  } else {\n    // mark that we need a transform, so that any data that comes in\n    // will get processed, now that we've asked for it.\n    ts.needTransform = true;\n  }\n};\n\nfunction done(stream, er) {\n  if (er) return stream.emit('error', er);\n\n  // if there's nothing in the write buffer, then that means\n  // that nothing more will ever be provided\n  var ws = stream._writableState;\n  var ts = stream._transformState;\n\n  if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n  if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n  return stream.push(null);\n}\n","\nimport {Transform} from './transform';\n\nimport {inherits} from 'util';\ninherits(PassThrough, Transform);\nexport default PassThrough;\nexport function PassThrough(options) {\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n  Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n  cb(null, chunk);\n};\n","import EE from 'events';\nimport {inherits} from 'util';\n\nimport {Duplex} from './readable-stream/duplex.js';\nimport {Readable} from './readable-stream/readable.js';\nimport {Writable} from './readable-stream/writable.js';\nimport {Transform} from './readable-stream/transform.js';\nimport {PassThrough} from './readable-stream/passthrough.js';\ninherits(Stream, EE);\nStream.Readable = Readable;\nStream.Writable = Writable;\nStream.Duplex = Duplex;\nStream.Transform = Transform;\nStream.PassThrough = PassThrough;\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\nexport default Stream;\nexport {Readable,Writable,Duplex,Transform,PassThrough,Stream}\n\n// old-style streams.  Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n  EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n  var source = this;\n\n  function ondata(chunk) {\n    if (dest.writable) {\n      if (false === dest.write(chunk) && source.pause) {\n        source.pause();\n      }\n    }\n  }\n\n  source.on('data', ondata);\n\n  function ondrain() {\n    if (source.readable && source.resume) {\n      source.resume();\n    }\n  }\n\n  dest.on('drain', ondrain);\n\n  // If the 'end' option is not supplied, dest.end() will be called when\n  // source gets the 'end' or 'close' events.  Only dest.end() once.\n  if (!dest._isStdio && (!options || options.end !== false)) {\n    source.on('end', onend);\n    source.on('close', onclose);\n  }\n\n  var didOnEnd = false;\n  function onend() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    dest.end();\n  }\n\n\n  function onclose() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    if (typeof dest.destroy === 'function') dest.destroy();\n  }\n\n  // don't leave dangling pipes when there are errors.\n  function onerror(er) {\n    cleanup();\n    if (EE.listenerCount(this, 'error') === 0) {\n      throw er; // Unhandled stream error in pipe.\n    }\n  }\n\n  source.on('error', onerror);\n  dest.on('error', onerror);\n\n  // remove all the event listeners that were added.\n  function cleanup() {\n    source.removeListener('data', ondata);\n    dest.removeListener('drain', ondrain);\n\n    source.removeListener('end', onend);\n    source.removeListener('close', onclose);\n\n    source.removeListener('error', onerror);\n    dest.removeListener('error', onerror);\n\n    source.removeListener('end', cleanup);\n    source.removeListener('close', cleanup);\n\n    dest.removeListener('close', cleanup);\n  }\n\n  source.on('end', cleanup);\n  source.on('close', cleanup);\n\n  dest.on('close', cleanup);\n\n  dest.emit('pipe', source);\n\n  // Allow for unix-like usage: A.pipe(B).pipe(C)\n  return dest;\n};\n","var WritableStream = require('stream').Writable\nvar inherits = require('util').inherits\n\nmodule.exports = BrowserStdout\n\n\ninherits(BrowserStdout, WritableStream)\n\nfunction BrowserStdout(opts) {\n  if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts)\n\n  opts = opts || {}\n  WritableStream.call(this, opts)\n  this.label = (opts.label !== undefined) ? opts.label : 'stdout'\n}\n\nBrowserStdout.prototype._write = function(chunks, encoding, cb) {\n  var output = chunks.toString ? chunks.toString() : chunks\n  if (this.label === false) {\n    console.log(output)\n  } else {\n    console.log(this.label+':', output)\n  }\n  process.nextTick(cb)\n}\n","'use strict';\n\n/**\n * Parse the given `qs`.\n *\n * @private\n * @param {string} qs\n * @return {Object<string, string>}\n */\nmodule.exports = function parseQuery(qs) {\n  return qs\n    .replace('?', '')\n    .split('&')\n    .reduce(function(obj, pair) {\n      var i = pair.indexOf('=');\n      var key = pair.slice(0, i);\n      var val = pair.slice(++i);\n\n      // Due to how the URLSearchParams API treats spaces\n      obj[key] = decodeURIComponent(val.replace(/\\+/g, '%20'));\n\n      return obj;\n    }, {});\n};\n","'use strict';\n\n/**\n * Highlight the given string of `js`.\n *\n * @private\n * @param {string} js\n * @return {string}\n */\nfunction highlight(js) {\n  return js\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;')\n    .replace(/\\/\\/(.*)/gm, '<span class=\"comment\">//$1</span>')\n    .replace(/('.*?')/gm, '<span class=\"string\">$1</span>')\n    .replace(/(\\d+\\.\\d+)/gm, '<span class=\"number\">$1</span>')\n    .replace(/(\\d+)/gm, '<span class=\"number\">$1</span>')\n    .replace(\n      /\\bnew[ \\t]+(\\w+)/gm,\n      '<span class=\"keyword\">new</span> <span class=\"init\">$1</span>'\n    )\n    .replace(\n      /\\b(function|new|throw|return|var|if|else)\\b/gm,\n      '<span class=\"keyword\">$1</span>'\n    );\n}\n\n/**\n * Highlight the contents of tag `name`.\n *\n * @private\n * @param {string} name\n */\nmodule.exports = function highlightTags(name) {\n  var code = document.getElementById('mocha').getElementsByTagName(name);\n  for (var i = 0, len = code.length; i < len; ++i) {\n    code[i].innerHTML = highlight(code[i].innerHTML);\n  }\n};\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","var anObject = require('../internals/an-object');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n  try {\n    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n  // 7.4.6 IteratorClose(iterator, completion)\n  } catch (error) {\n    var returnMethod = iterator['return'];\n    if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n    throw error;\n  }\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar Result = function (stopped, result) {\n  this.stopped = stopped;\n  this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n  var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n  var iterator, iterFn, index, length, result, next, step;\n\n  if (IS_ITERATOR) {\n    iterator = iterable;\n  } else {\n    iterFn = getIteratorMethod(iterable);\n    if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n    // optimisation for array iterators\n    if (isArrayIteratorMethod(iterFn)) {\n      for (index = 0, length = toLength(iterable.length); length > index; index++) {\n        result = AS_ENTRIES\n          ? boundFunction(anObject(step = iterable[index])[0], step[1])\n          : boundFunction(iterable[index]);\n        if (result && result instanceof Result) return result;\n      } return new Result(false);\n    }\n    iterator = iterFn.call(iterable);\n  }\n\n  next = iterator.next;\n  while (!(step = next.call(iterator)).done) {\n    result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n    if (typeof result == 'object' && result && result instanceof Result) return result;\n  } return new Result(false);\n};\n\niterate.stop = function (result) {\n  return new Result(true, result);\n};\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n  // eslint-disable-next-line no-prototype-builtins\n  if (queue.hasOwnProperty(id)) {\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\n\nvar runner = function (id) {\n  return function () {\n    run(id);\n  };\n};\n\nvar listener = function (event) {\n  run(event.data);\n};\n\nvar post = function (id) {\n  // old engines have not location.origin\n  global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n  set = function setImmediate(fn) {\n    var args = [];\n    var i = 1;\n    while (arguments.length > i) args.push(arguments[i++]);\n    queue[++counter] = function () {\n      // eslint-disable-next-line no-new-func\n      (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clear = function clearImmediate(id) {\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if (classof(process) == 'process') {\n    defer = function (id) {\n      process.nextTick(runner(id));\n    };\n  // Sphere (JS game engine) Dispatch API\n  } else if (Dispatch && Dispatch.now) {\n    defer = function (id) {\n      Dispatch.now(runner(id));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  // except iOS - https://github.com/zloirock/core-js/issues/624\n  } else if (MessageChannel && !IS_IOS) {\n    channel = new MessageChannel();\n    port = channel.port2;\n    channel.port1.onmessage = listener;\n    defer = bind(port.postMessage, port, 1);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if (\n    global.addEventListener &&\n    typeof postMessage == 'function' &&\n    !global.importScripts &&\n    !fails(post) &&\n    location.protocol !== 'file:'\n  ) {\n    defer = post;\n    global.addEventListener('message', listener, false);\n  // IE8-\n  } else if (ONREADYSTATECHANGE in createElement('script')) {\n    defer = function (id) {\n      html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n        html.removeChild(this);\n        run(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function (id) {\n      setTimeout(runner(id), 0);\n    };\n  }\n}\n\nmodule.exports = {\n  set: set,\n  clear: clear\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar classof = require('../internals/classof-raw');\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar IS_NODE = classof(process) == 'process';\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n  flush = function () {\n    var parent, fn;\n    if (IS_NODE && (parent = process.domain)) parent.exit();\n    while (head) {\n      fn = head.fn;\n      head = head.next;\n      try {\n        fn();\n      } catch (error) {\n        if (head) notify();\n        else last = undefined;\n        throw error;\n      }\n    } last = undefined;\n    if (parent) parent.enter();\n  };\n\n  // Node.js\n  if (IS_NODE) {\n    notify = function () {\n      process.nextTick(flush);\n    };\n  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n  } else if (MutationObserver && !IS_IOS) {\n    toggle = true;\n    node = document.createTextNode('');\n    new MutationObserver(flush).observe(node, { characterData: true });\n    notify = function () {\n      node.data = toggle = !toggle;\n    };\n  // environments with maybe non-completely correct, but existent Promise\n  } else if (Promise && Promise.resolve) {\n    // Promise.resolve without an argument throws an error in LG WebOS 2\n    promise = Promise.resolve(undefined);\n    then = promise.then;\n    notify = function () {\n      then.call(promise, flush);\n    };\n  // for other environments - macrotask based on:\n  // - setImmediate\n  // - MessageChannel\n  // - window.postMessag\n  // - onreadystatechange\n  // - setTimeout\n  } else {\n    notify = function () {\n      // strange IE + webpack dev server bug - use .call(global)\n      macrotask.call(global, flush);\n    };\n  }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n  var task = { fn: fn, next: undefined };\n  if (last) last.next = task;\n  if (!head) {\n    head = task;\n    notify();\n  } last = task;\n};\n","'use strict';\nvar aFunction = require('../internals/a-function');\n\nvar PromiseCapability = function (C) {\n  var resolve, reject;\n  this.promise = new C(function ($$resolve, $$reject) {\n    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n    resolve = $$resolve;\n    reject = $$reject;\n  });\n  this.resolve = aFunction(resolve);\n  this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n  return new PromiseCapability(C);\n};\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n  anObject(C);\n  if (isObject(x) && x.constructor === C) return x;\n  var promiseCapability = newPromiseCapability.f(C);\n  var resolve = promiseCapability.resolve;\n  resolve(x);\n  return promiseCapability.promise;\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n  var console = global.console;\n  if (console && console.error) {\n    arguments.length === 1 ? console.error(a) : console.error(a, b);\n  }\n};\n","module.exports = function (exec) {\n  try {\n    return { error: false, value: exec() };\n  } catch (error) {\n    return { error: true, value: error };\n  }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar isObject = require('../internals/is-object');\nvar aFunction = require('../internals/a-function');\nvar anInstance = require('../internals/an-instance');\nvar classof = require('../internals/classof-raw');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar PromiseConstructor = NativePromise;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar $fetch = getBuiltIn('fetch');\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar IS_NODE = classof(process) == 'process';\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n  var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);\n  if (!GLOBAL_CORE_JS_PROMISE) {\n    // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n    // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n    // We can't detect it synchronously, so just check versions\n    if (V8_VERSION === 66) return true;\n    // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n    if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;\n  }\n  // We need Promise#finally in the pure version for preventing prototype pollution\n  if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;\n  // We can't use @@species feature detection in V8 since it causes\n  // deoptimization and performance degradation\n  // https://github.com/zloirock/core-js/issues/679\n  if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;\n  // Detect correctness of subclassing with @@species support\n  var promise = PromiseConstructor.resolve(1);\n  var FakePromise = function (exec) {\n    exec(function () { /* empty */ }, function () { /* empty */ });\n  };\n  var constructor = promise.constructor = {};\n  constructor[SPECIES] = FakePromise;\n  return !(promise.then(function () { /* empty */ }) instanceof FakePromise);\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n  PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n  var then;\n  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (promise, state, isReject) {\n  if (state.notified) return;\n  state.notified = true;\n  var chain = state.reactions;\n  microtask(function () {\n    var value = state.value;\n    var ok = state.state == FULFILLED;\n    var index = 0;\n    // variable length - can't use forEach\n    while (chain.length > index) {\n      var reaction = chain[index++];\n      var handler = ok ? reaction.ok : reaction.fail;\n      var resolve = reaction.resolve;\n      var reject = reaction.reject;\n      var domain = reaction.domain;\n      var result, then, exited;\n      try {\n        if (handler) {\n          if (!ok) {\n            if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);\n            state.rejection = HANDLED;\n          }\n          if (handler === true) result = value;\n          else {\n            if (domain) domain.enter();\n            result = handler(value); // can throw\n            if (domain) {\n              domain.exit();\n              exited = true;\n            }\n          }\n          if (result === reaction.promise) {\n            reject(TypeError('Promise-chain cycle'));\n          } else if (then = isThenable(result)) {\n            then.call(result, resolve, reject);\n          } else resolve(result);\n        } else reject(value);\n      } catch (error) {\n        if (domain && !exited) domain.exit();\n        reject(error);\n      }\n    }\n    state.reactions = [];\n    state.notified = false;\n    if (isReject && !state.rejection) onUnhandled(promise, state);\n  });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n  var event, handler;\n  if (DISPATCH_EVENT) {\n    event = document.createEvent('Event');\n    event.promise = promise;\n    event.reason = reason;\n    event.initEvent(name, false, true);\n    global.dispatchEvent(event);\n  } else event = { promise: promise, reason: reason };\n  if (handler = global['on' + name]) handler(event);\n  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (promise, state) {\n  task.call(global, function () {\n    var value = state.value;\n    var IS_UNHANDLED = isUnhandled(state);\n    var result;\n    if (IS_UNHANDLED) {\n      result = perform(function () {\n        if (IS_NODE) {\n          process.emit('unhandledRejection', value, promise);\n        } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n      });\n      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n      state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n      if (result.error) throw result.value;\n    }\n  });\n};\n\nvar isUnhandled = function (state) {\n  return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (promise, state) {\n  task.call(global, function () {\n    if (IS_NODE) {\n      process.emit('rejectionHandled', promise);\n    } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n  });\n};\n\nvar bind = function (fn, promise, state, unwrap) {\n  return function (value) {\n    fn(promise, state, value, unwrap);\n  };\n};\n\nvar internalReject = function (promise, state, value, unwrap) {\n  if (state.done) return;\n  state.done = true;\n  if (unwrap) state = unwrap;\n  state.value = value;\n  state.state = REJECTED;\n  notify(promise, state, true);\n};\n\nvar internalResolve = function (promise, state, value, unwrap) {\n  if (state.done) return;\n  state.done = true;\n  if (unwrap) state = unwrap;\n  try {\n    if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n    var then = isThenable(value);\n    if (then) {\n      microtask(function () {\n        var wrapper = { done: false };\n        try {\n          then.call(value,\n            bind(internalResolve, promise, wrapper, state),\n            bind(internalReject, promise, wrapper, state)\n          );\n        } catch (error) {\n          internalReject(promise, wrapper, error, state);\n        }\n      });\n    } else {\n      state.value = value;\n      state.state = FULFILLED;\n      notify(promise, state, false);\n    }\n  } catch (error) {\n    internalReject(promise, { done: false }, error, state);\n  }\n};\n\n// constructor polyfill\nif (FORCED) {\n  // 25.4.3.1 Promise(executor)\n  PromiseConstructor = function Promise(executor) {\n    anInstance(this, PromiseConstructor, PROMISE);\n    aFunction(executor);\n    Internal.call(this);\n    var state = getInternalState(this);\n    try {\n      executor(bind(internalResolve, this, state), bind(internalReject, this, state));\n    } catch (error) {\n      internalReject(this, state, error);\n    }\n  };\n  // eslint-disable-next-line no-unused-vars\n  Internal = function Promise(executor) {\n    setInternalState(this, {\n      type: PROMISE,\n      done: false,\n      notified: false,\n      parent: false,\n      reactions: [],\n      rejection: false,\n      state: PENDING,\n      value: undefined\n    });\n  };\n  Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n    // `Promise.prototype.then` method\n    // https://tc39.github.io/ecma262/#sec-promise.prototype.then\n    then: function then(onFulfilled, onRejected) {\n      var state = getInternalPromiseState(this);\n      var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n      reaction.fail = typeof onRejected == 'function' && onRejected;\n      reaction.domain = IS_NODE ? process.domain : undefined;\n      state.parent = true;\n      state.reactions.push(reaction);\n      if (state.state != PENDING) notify(this, state, false);\n      return reaction.promise;\n    },\n    // `Promise.prototype.catch` method\n    // https://tc39.github.io/ecma262/#sec-promise.prototype.catch\n    'catch': function (onRejected) {\n      return this.then(undefined, onRejected);\n    }\n  });\n  OwnPromiseCapability = function () {\n    var promise = new Internal();\n    var state = getInternalState(promise);\n    this.promise = promise;\n    this.resolve = bind(internalResolve, promise, state);\n    this.reject = bind(internalReject, promise, state);\n  };\n  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n    return C === PromiseConstructor || C === PromiseWrapper\n      ? new OwnPromiseCapability(C)\n      : newGenericPromiseCapability(C);\n  };\n\n  if (!IS_PURE && typeof NativePromise == 'function') {\n    nativeThen = NativePromise.prototype.then;\n\n    // wrap native Promise#then for native async functions\n    redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {\n      var that = this;\n      return new PromiseConstructor(function (resolve, reject) {\n        nativeThen.call(that, resolve, reject);\n      }).then(onFulfilled, onRejected);\n    // https://github.com/zloirock/core-js/issues/640\n    }, { unsafe: true });\n\n    // wrap fetch result\n    if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {\n      // eslint-disable-next-line no-unused-vars\n      fetch: function fetch(input /* , init */) {\n        return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));\n      }\n    });\n  }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n  Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n  // `Promise.reject` method\n  // https://tc39.github.io/ecma262/#sec-promise.reject\n  reject: function reject(r) {\n    var capability = newPromiseCapability(this);\n    capability.reject.call(undefined, r);\n    return capability.promise;\n  }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n  // `Promise.resolve` method\n  // https://tc39.github.io/ecma262/#sec-promise.resolve\n  resolve: function resolve(x) {\n    return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n  }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n  // `Promise.all` method\n  // https://tc39.github.io/ecma262/#sec-promise.all\n  all: function all(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var $promiseResolve = aFunction(C.resolve);\n      var values = [];\n      var counter = 0;\n      var remaining = 1;\n      iterate(iterable, function (promise) {\n        var index = counter++;\n        var alreadyCalled = false;\n        values.push(undefined);\n        remaining++;\n        $promiseResolve.call(C, promise).then(function (value) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[index] = value;\n          --remaining || resolve(values);\n        }, reject);\n      });\n      --remaining || resolve(values);\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  },\n  // `Promise.race` method\n  // https://tc39.github.io/ecma262/#sec-promise.race\n  race: function race(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var reject = capability.reject;\n    var result = perform(function () {\n      var $promiseResolve = aFunction(C.resolve);\n      iterate(iterable, function (promise) {\n        $promiseResolve.call(C, promise).then(capability.resolve, reject);\n      });\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.asyncIterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.asynciterator\ndefineWellKnownSymbol('asyncIterator');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.toStringTag` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.tostringtag\ndefineWellKnownSymbol('toStringTag');\n","var global = require('../internals/global');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// JSON[@@toStringTag] property\n// https://tc39.github.io/ecma262/#sec-json-@@tostringtag\nsetToStringTag(global.JSON, 'JSON', true);\n","var setToStringTag = require('../internals/set-to-string-tag');\n\n// Math[@@toStringTag] property\n// https://tc39.github.io/ecma262/#sec-math-@@tostringtag\nsetToStringTag(Math, 'Math', true);\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n  setInternalState(this, {\n    type: STRING_ITERATOR,\n    string: String(iterated),\n    index: 0\n  });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n  var state = getInternalState(this);\n  var string = state.string;\n  var index = state.index;\n  var point;\n  if (index >= string.length) return { value: undefined, done: true };\n  point = charAt(string, index);\n  state.index += point.length;\n  return { value: point, done: false };\n});\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n  var Collection = global[COLLECTION_NAME];\n  var CollectionPrototype = Collection && Collection.prototype;\n  if (CollectionPrototype) {\n    // some Chrome versions have non-configurable methods on DOMTokenList\n    if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n      createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n    } catch (error) {\n      CollectionPrototype[ITERATOR] = ArrayValues;\n    }\n    if (!CollectionPrototype[TO_STRING_TAG]) {\n      createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n    }\n    if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n      // some Chrome versions have non-configurable methods on DOMTokenList\n      if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n        createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n      } catch (error) {\n        CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n      }\n    }\n  }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  var inModule = typeof module === \"object\";\n  var runtime = global.regeneratorRuntime;\n  if (runtime) {\n    if (inModule) {\n      // If regeneratorRuntime is defined globally and we're in a module,\n      // make the exports object identical to regeneratorRuntime.\n      module.exports = runtime;\n    }\n    // Don't bother evaluating the rest of this file if the runtime was\n    // already defined globally.\n    return;\n  }\n\n  // Define the runtime globally (as expected by generated code) as either\n  // module.exports (if we're in a module) or a new, empty object.\n  runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  runtime.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  IteratorPrototype[iteratorSymbol] = function () {\n    return this;\n  };\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n  GeneratorFunctionPrototype.constructor = GeneratorFunction;\n  GeneratorFunctionPrototype[toStringTagSymbol] =\n    GeneratorFunction.displayName = \"GeneratorFunction\";\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      prototype[method] = function(arg) {\n        return this._invoke(method, arg);\n      };\n    });\n  }\n\n  runtime.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  runtime.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      if (!(toStringTagSymbol in genFun)) {\n        genFun[toStringTagSymbol] = \"GeneratorFunction\";\n      }\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  runtime.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return Promise.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return Promise.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration. If the Promise is rejected, however, the\n          // result for this iteration will be rejected with the same\n          // reason. Note that rejections of yielded Promises are not\n          // thrown back into the generator function, as is the case\n          // when an awaited Promise is rejected. This difference in\n          // behavior between yield and await is important, because it\n          // allows the consumer to decide what to do with the yielded\n          // rejection (swallow it and continue, manually .throw it back\n          // into the generator, abandon iteration, whatever). With\n          // await, by contrast, there is no opportunity to examine the\n          // rejection reason outside the generator function, so the\n          // only option is to throw it from the await expression, and\n          // let the generator function handle the exception.\n          result.value = unwrapped;\n          resolve(result);\n        }, reject);\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new Promise(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n    return this;\n  };\n  runtime.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList)\n    );\n\n    return runtime.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        if (delegate.iterator.return) {\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method = \"return\";\n          context.arg = undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if (context.method === \"throw\") {\n            // If maybeInvokeDelegate(context) changed context.method from\n            // \"return\" to \"throw\", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  Gp[toStringTagSymbol] = \"Generator\";\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  Gp[iteratorSymbol] = function() {\n    return this;\n  };\n\n  Gp.toString = function() {\n    return \"[object Generator]\";\n  };\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  runtime.keys = function(object) {\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  runtime.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n})(\n  // In sloppy mode, unbound `this` refers to the global object, fallback to\n  // Function constructor if we're in global strict mode. That is sadly a form\n  // of indirect eval which violates Content Security Policy.\n  (function() { return this })() || Function(\"return this\")()\n);\n","'use strict';\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a \\unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = parts.length - 1; i >= 0; i--) {\n    var last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n    /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n  return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexport function resolve() {\n  var resolvedPath = '',\n      resolvedAbsolute = false;\n\n  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    var path = (i >= 0) ? arguments[i] : '/';\n\n    // Skip empty and invalid entries\n    if (typeof path !== 'string') {\n      throw new TypeError('Arguments to path.resolve must be strings');\n    } else if (!path) {\n      continue;\n    }\n\n    resolvedPath = path + '/' + resolvedPath;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n    return !!p;\n  }), !resolvedAbsolute).join('/');\n\n  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexport function normalize(path) {\n  var isPathAbsolute = isAbsolute(path),\n      trailingSlash = substr(path, -1) === '/';\n\n  // Normalize the path\n  path = normalizeArray(filter(path.split('/'), function(p) {\n    return !!p;\n  }), !isPathAbsolute).join('/');\n\n  if (!path && !isPathAbsolute) {\n    path = '.';\n  }\n  if (path && trailingSlash) {\n    path += '/';\n  }\n\n  return (isPathAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexport function isAbsolute(path) {\n  return path.charAt(0) === '/';\n}\n\n// posix version\nexport function join() {\n  var paths = Array.prototype.slice.call(arguments, 0);\n  return normalize(filter(paths, function(p, index) {\n    if (typeof p !== 'string') {\n      throw new TypeError('Arguments to path.join must be strings');\n    }\n    return p;\n  }).join('/'));\n}\n\n\n// path.relative(from, to)\n// posix version\nexport function relative(from, to) {\n  from = resolve(from).substr(1);\n  to = resolve(to).substr(1);\n\n  function trim(arr) {\n    var start = 0;\n    for (; start < arr.length; start++) {\n      if (arr[start] !== '') break;\n    }\n\n    var end = arr.length - 1;\n    for (; end >= 0; end--) {\n      if (arr[end] !== '') break;\n    }\n\n    if (start > end) return [];\n    return arr.slice(start, end - start + 1);\n  }\n\n  var fromParts = trim(from.split('/'));\n  var toParts = trim(to.split('/'));\n\n  var length = Math.min(fromParts.length, toParts.length);\n  var samePartsLength = length;\n  for (var i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  var outputParts = [];\n  for (var i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n}\n\nexport var sep = '/';\nexport var delimiter = ':';\n\nexport function dirname(path) {\n  var result = splitPath(path),\n      root = result[0],\n      dir = result[1];\n\n  if (!root && !dir) {\n    // No dirname whatsoever\n    return '.';\n  }\n\n  if (dir) {\n    // It has a dirname, strip trailing slash\n    dir = dir.substr(0, dir.length - 1);\n  }\n\n  return root + dir;\n}\n\nexport function basename(path, ext) {\n  var f = splitPath(path)[2];\n  // TODO: make this comparison case-insensitive on windows?\n  if (ext && f.substr(-1 * ext.length) === ext) {\n    f = f.substr(0, f.length - ext.length);\n  }\n  return f;\n}\n\n\nexport function extname(path) {\n  return splitPath(path)[3];\n}\nexport default {\n  extname: extname,\n  basename: basename,\n  dirname: dirname,\n  sep: sep,\n  delimiter: delimiter,\n  relative: relative,\n  join: join,\n  isAbsolute: isAbsolute,\n  normalize: normalize,\n  resolve: resolve\n};\nfunction filter (xs, f) {\n    if (xs.filter) return xs.filter(f);\n    var res = [];\n    for (var i = 0; i < xs.length; i++) {\n        if (f(xs[i], i, xs)) res.push(xs[i]);\n    }\n    return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b' ?\n    function (str, start, len) { return str.substr(start, len) } :\n    function (str, start, len) {\n        if (start < 0) start = str.length + start;\n        return str.substr(start, len);\n    }\n;\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.github.io/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n  var O = toObject(arrayLike);\n  var C = typeof this == 'function' ? this : Array;\n  var argumentsLength = arguments.length;\n  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n  var mapping = mapfn !== undefined;\n  var iteratorMethod = getIteratorMethod(O);\n  var index = 0;\n  var length, result, step, iterator, next, value;\n  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n  // if the target is not iterable or it's an array with the default iterator - use a simple case\n  if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n    iterator = iteratorMethod.call(O);\n    next = iterator.next;\n    result = new C();\n    for (;!(step = next.call(iterator)).done; index++) {\n      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n      createProperty(result, index, value);\n    }\n  } else {\n    length = toLength(O.length);\n    result = new C(length);\n    for (;length > index; index++) {\n      value = mapping ? mapfn(O[index], index) : O[index];\n      createProperty(result, index, value);\n    }\n  }\n  result.length = index;\n  return result;\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n  Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n  from: from\n});\n","/*!\n\n diff v4.0.1\n\nSoftware License Agreement (BSD License)\n\nCopyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>\n\nAll rights reserved.\n\nRedistribution and use of this software in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above\n  copyright notice, this list of conditions and the\n  following disclaimer.\n\n* Redistributions in binary form must reproduce the above\n  copyright notice, this list of conditions and the\n  following disclaimer in the documentation and/or other\n  materials provided with the distribution.\n\n* Neither the name of Kevin Decker nor the names of its\n  contributors may be used to endorse or promote products\n  derived from this software without specific prior\n  written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\nIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\nIN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\nOF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n@license\n*/\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n  typeof define === 'function' && define.amd ? define(['exports'], factory) :\n  (global = global || self, factory(global.Diff = {}));\n}(this, function (exports) { 'use strict';\n\n  function Diff() {}\n  Diff.prototype = {\n    diff: function diff(oldString, newString) {\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var callback = options.callback;\n\n      if (typeof options === 'function') {\n        callback = options;\n        options = {};\n      }\n\n      this.options = options;\n      var self = this;\n\n      function done(value) {\n        if (callback) {\n          setTimeout(function () {\n            callback(undefined, value);\n          }, 0);\n          return true;\n        } else {\n          return value;\n        }\n      } // Allow subclasses to massage the input prior to running\n\n\n      oldString = this.castInput(oldString);\n      newString = this.castInput(newString);\n      oldString = this.removeEmpty(this.tokenize(oldString));\n      newString = this.removeEmpty(this.tokenize(newString));\n      var newLen = newString.length,\n          oldLen = oldString.length;\n      var editLength = 1;\n      var maxEditLength = newLen + oldLen;\n      var bestPath = [{\n        newPos: -1,\n        components: []\n      }]; // Seed editLength = 0, i.e. the content starts with the same values\n\n      var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);\n\n      if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n        // Identity per the equality and tokenizer\n        return done([{\n          value: this.join(newString),\n          count: newString.length\n        }]);\n      } // Main worker method. checks all permutations of a given edit length for acceptance.\n\n\n      function execEditLength() {\n        for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {\n          var basePath = void 0;\n\n          var addPath = bestPath[diagonalPath - 1],\n              removePath = bestPath[diagonalPath + 1],\n              _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n\n          if (addPath) {\n            // No one else is going to attempt to use this value, clear it\n            bestPath[diagonalPath - 1] = undefined;\n          }\n\n          var canAdd = addPath && addPath.newPos + 1 < newLen,\n              canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;\n\n          if (!canAdd && !canRemove) {\n            // If this path is a terminal then prune\n            bestPath[diagonalPath] = undefined;\n            continue;\n          } // Select the diagonal that we want to branch from. We select the prior\n          // path whose position in the new string is the farthest from the origin\n          // and does not pass the bounds of the diff graph\n\n\n          if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {\n            basePath = clonePath(removePath);\n            self.pushComponent(basePath.components, undefined, true);\n          } else {\n            basePath = addPath; // No need to clone, we've pulled it from the list\n\n            basePath.newPos++;\n            self.pushComponent(basePath.components, true, undefined);\n          }\n\n          _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done\n\n          if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {\n            return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));\n          } else {\n            // Otherwise track this path as a potential candidate and continue.\n            bestPath[diagonalPath] = basePath;\n          }\n        }\n\n        editLength++;\n      } // Performs the length of edit iteration. Is a bit fugly as this has to support the\n      // sync and async mode which is never fun. Loops over execEditLength until a value\n      // is produced.\n\n\n      if (callback) {\n        (function exec() {\n          setTimeout(function () {\n            // This should not happen, but we want to be safe.\n\n            /* istanbul ignore next */\n            if (editLength > maxEditLength) {\n              return callback();\n            }\n\n            if (!execEditLength()) {\n              exec();\n            }\n          }, 0);\n        })();\n      } else {\n        while (editLength <= maxEditLength) {\n          var ret = execEditLength();\n\n          if (ret) {\n            return ret;\n          }\n        }\n      }\n    },\n    pushComponent: function pushComponent(components, added, removed) {\n      var last = components[components.length - 1];\n\n      if (last && last.added === added && last.removed === removed) {\n        // We need to clone here as the component clone operation is just\n        // as shallow array clone\n        components[components.length - 1] = {\n          count: last.count + 1,\n          added: added,\n          removed: removed\n        };\n      } else {\n        components.push({\n          count: 1,\n          added: added,\n          removed: removed\n        });\n      }\n    },\n    extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {\n      var newLen = newString.length,\n          oldLen = oldString.length,\n          newPos = basePath.newPos,\n          oldPos = newPos - diagonalPath,\n          commonCount = 0;\n\n      while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {\n        newPos++;\n        oldPos++;\n        commonCount++;\n      }\n\n      if (commonCount) {\n        basePath.components.push({\n          count: commonCount\n        });\n      }\n\n      basePath.newPos = newPos;\n      return oldPos;\n    },\n    equals: function equals(left, right) {\n      if (this.options.comparator) {\n        return this.options.comparator(left, right);\n      } else {\n        return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();\n      }\n    },\n    removeEmpty: function removeEmpty(array) {\n      var ret = [];\n\n      for (var i = 0; i < array.length; i++) {\n        if (array[i]) {\n          ret.push(array[i]);\n        }\n      }\n\n      return ret;\n    },\n    castInput: function castInput(value) {\n      return value;\n    },\n    tokenize: function tokenize(value) {\n      return value.split('');\n    },\n    join: function join(chars) {\n      return chars.join('');\n    }\n  };\n\n  function buildValues(diff, components, newString, oldString, useLongestToken) {\n    var componentPos = 0,\n        componentLen = components.length,\n        newPos = 0,\n        oldPos = 0;\n\n    for (; componentPos < componentLen; componentPos++) {\n      var component = components[componentPos];\n\n      if (!component.removed) {\n        if (!component.added && useLongestToken) {\n          var value = newString.slice(newPos, newPos + component.count);\n          value = value.map(function (value, i) {\n            var oldValue = oldString[oldPos + i];\n            return oldValue.length > value.length ? oldValue : value;\n          });\n          component.value = diff.join(value);\n        } else {\n          component.value = diff.join(newString.slice(newPos, newPos + component.count));\n        }\n\n        newPos += component.count; // Common case\n\n        if (!component.added) {\n          oldPos += component.count;\n        }\n      } else {\n        component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));\n        oldPos += component.count; // Reverse add and remove so removes are output first to match common convention\n        // The diffing algorithm is tied to add then remove output and this is the simplest\n        // route to get the desired output with minimal overhead.\n\n        if (componentPos && components[componentPos - 1].added) {\n          var tmp = components[componentPos - 1];\n          components[componentPos - 1] = components[componentPos];\n          components[componentPos] = tmp;\n        }\n      }\n    } // Special case handle for when one terminal is ignored (i.e. whitespace).\n    // For this case we merge the terminal into the prior string and drop the change.\n    // This is only available for string mode.\n\n\n    var lastComponent = components[componentLen - 1];\n\n    if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {\n      components[componentLen - 2].value += lastComponent.value;\n      components.pop();\n    }\n\n    return components;\n  }\n\n  function clonePath(path) {\n    return {\n      newPos: path.newPos,\n      components: path.components.slice(0)\n    };\n  }\n\n  var characterDiff = new Diff();\n  function diffChars(oldStr, newStr, options) {\n    return characterDiff.diff(oldStr, newStr, options);\n  }\n\n  function generateOptions(options, defaults) {\n    if (typeof options === 'function') {\n      defaults.callback = options;\n    } else if (options) {\n      for (var name in options) {\n        /* istanbul ignore else */\n        if (options.hasOwnProperty(name)) {\n          defaults[name] = options[name];\n        }\n      }\n    }\n\n    return defaults;\n  }\n\n  //\n  // Ranges and exceptions:\n  // Latin-1 Supplement, 0080–00FF\n  //  - U+00D7  × Multiplication sign\n  //  - U+00F7  ÷ Division sign\n  // Latin Extended-A, 0100–017F\n  // Latin Extended-B, 0180–024F\n  // IPA Extensions, 0250–02AF\n  // Spacing Modifier Letters, 02B0–02FF\n  //  - U+02C7  ˇ &#711;  Caron\n  //  - U+02D8  ˘ &#728;  Breve\n  //  - U+02D9  ˙ &#729;  Dot Above\n  //  - U+02DA  ˚ &#730;  Ring Above\n  //  - U+02DB  ˛ &#731;  Ogonek\n  //  - U+02DC  ˜ &#732;  Small Tilde\n  //  - U+02DD  ˝ &#733;  Double Acute Accent\n  // Latin Extended Additional, 1E00–1EFF\n\n  var extendedWordChars = /^[A-Za-z\\xC0-\\u02C6\\u02C8-\\u02D7\\u02DE-\\u02FF\\u1E00-\\u1EFF]+$/;\n  var reWhitespace = /\\S/;\n  var wordDiff = new Diff();\n\n  wordDiff.equals = function (left, right) {\n    if (this.options.ignoreCase) {\n      left = left.toLowerCase();\n      right = right.toLowerCase();\n    }\n\n    return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);\n  };\n\n  wordDiff.tokenize = function (value) {\n    var tokens = value.split(/(\\s+|[()[\\]{}'\"]|\\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.\n\n    for (var i = 0; i < tokens.length - 1; i++) {\n      // If we have an empty string in the next field and we have only word chars before and after, merge\n      if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {\n        tokens[i] += tokens[i + 2];\n        tokens.splice(i + 1, 2);\n        i--;\n      }\n    }\n\n    return tokens;\n  };\n\n  function diffWords(oldStr, newStr, options) {\n    options = generateOptions(options, {\n      ignoreWhitespace: true\n    });\n    return wordDiff.diff(oldStr, newStr, options);\n  }\n  function diffWordsWithSpace(oldStr, newStr, options) {\n    return wordDiff.diff(oldStr, newStr, options);\n  }\n\n  var lineDiff = new Diff();\n\n  lineDiff.tokenize = function (value) {\n    var retLines = [],\n        linesAndNewlines = value.split(/(\\n|\\r\\n)/); // Ignore the final empty token that occurs if the string ends with a new line\n\n    if (!linesAndNewlines[linesAndNewlines.length - 1]) {\n      linesAndNewlines.pop();\n    } // Merge the content and line separators into single tokens\n\n\n    for (var i = 0; i < linesAndNewlines.length; i++) {\n      var line = linesAndNewlines[i];\n\n      if (i % 2 && !this.options.newlineIsToken) {\n        retLines[retLines.length - 1] += line;\n      } else {\n        if (this.options.ignoreWhitespace) {\n          line = line.trim();\n        }\n\n        retLines.push(line);\n      }\n    }\n\n    return retLines;\n  };\n\n  function diffLines(oldStr, newStr, callback) {\n    return lineDiff.diff(oldStr, newStr, callback);\n  }\n  function diffTrimmedLines(oldStr, newStr, callback) {\n    var options = generateOptions(callback, {\n      ignoreWhitespace: true\n    });\n    return lineDiff.diff(oldStr, newStr, options);\n  }\n\n  var sentenceDiff = new Diff();\n\n  sentenceDiff.tokenize = function (value) {\n    return value.split(/(\\S.+?[.!?])(?=\\s+|$)/);\n  };\n\n  function diffSentences(oldStr, newStr, callback) {\n    return sentenceDiff.diff(oldStr, newStr, callback);\n  }\n\n  var cssDiff = new Diff();\n\n  cssDiff.tokenize = function (value) {\n    return value.split(/([{}:;,]|\\s+)/);\n  };\n\n  function diffCss(oldStr, newStr, callback) {\n    return cssDiff.diff(oldStr, newStr, callback);\n  }\n\n  function _typeof(obj) {\n    if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n      _typeof = function (obj) {\n        return typeof obj;\n      };\n    } else {\n      _typeof = function (obj) {\n        return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n      };\n    }\n\n    return _typeof(obj);\n  }\n\n  function _toConsumableArray(arr) {\n    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n  }\n\n  function _arrayWithoutHoles(arr) {\n    if (Array.isArray(arr)) {\n      for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n      return arr2;\n    }\n  }\n\n  function _iterableToArray(iter) {\n    if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n  }\n\n  function _nonIterableSpread() {\n    throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n  }\n\n  var objectPrototypeToString = Object.prototype.toString;\n  var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a\n  // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:\n\n  jsonDiff.useLongestToken = true;\n  jsonDiff.tokenize = lineDiff.tokenize;\n\n  jsonDiff.castInput = function (value) {\n    var _this$options = this.options,\n        undefinedReplacement = _this$options.undefinedReplacement,\n        _this$options$stringi = _this$options.stringifyReplacer,\n        stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {\n      return typeof v === 'undefined' ? undefinedReplacement : v;\n    } : _this$options$stringi;\n    return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, '  ');\n  };\n\n  jsonDiff.equals = function (left, right) {\n    return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\\r\\n])/g, '$1'), right.replace(/,([\\r\\n])/g, '$1'));\n  };\n\n  function diffJson(oldObj, newObj, options) {\n    return jsonDiff.diff(oldObj, newObj, options);\n  } // This function handles the presence of circular references by bailing out when encountering an\n  // object that is already on the \"stack\" of items being processed. Accepts an optional replacer\n\n  function canonicalize(obj, stack, replacementStack, replacer, key) {\n    stack = stack || [];\n    replacementStack = replacementStack || [];\n\n    if (replacer) {\n      obj = replacer(key, obj);\n    }\n\n    var i;\n\n    for (i = 0; i < stack.length; i += 1) {\n      if (stack[i] === obj) {\n        return replacementStack[i];\n      }\n    }\n\n    var canonicalizedObj;\n\n    if ('[object Array]' === objectPrototypeToString.call(obj)) {\n      stack.push(obj);\n      canonicalizedObj = new Array(obj.length);\n      replacementStack.push(canonicalizedObj);\n\n      for (i = 0; i < obj.length; i += 1) {\n        canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n      }\n\n      stack.pop();\n      replacementStack.pop();\n      return canonicalizedObj;\n    }\n\n    if (obj && obj.toJSON) {\n      obj = obj.toJSON();\n    }\n\n    if (_typeof(obj) === 'object' && obj !== null) {\n      stack.push(obj);\n      canonicalizedObj = {};\n      replacementStack.push(canonicalizedObj);\n\n      var sortedKeys = [],\n          _key;\n\n      for (_key in obj) {\n        /* istanbul ignore else */\n        if (obj.hasOwnProperty(_key)) {\n          sortedKeys.push(_key);\n        }\n      }\n\n      sortedKeys.sort();\n\n      for (i = 0; i < sortedKeys.length; i += 1) {\n        _key = sortedKeys[i];\n        canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);\n      }\n\n      stack.pop();\n      replacementStack.pop();\n    } else {\n      canonicalizedObj = obj;\n    }\n\n    return canonicalizedObj;\n  }\n\n  var arrayDiff = new Diff();\n\n  arrayDiff.tokenize = function (value) {\n    return value.slice();\n  };\n\n  arrayDiff.join = arrayDiff.removeEmpty = function (value) {\n    return value;\n  };\n\n  function diffArrays(oldArr, newArr, callback) {\n    return arrayDiff.diff(oldArr, newArr, callback);\n  }\n\n  function parsePatch(uniDiff) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var diffstr = uniDiff.split(/\\r\\n|[\\n\\v\\f\\r\\x85]/),\n        delimiters = uniDiff.match(/\\r\\n|[\\n\\v\\f\\r\\x85]/g) || [],\n        list = [],\n        i = 0;\n\n    function parseIndex() {\n      var index = {};\n      list.push(index); // Parse diff metadata\n\n      while (i < diffstr.length) {\n        var line = diffstr[i]; // File header found, end parsing diff metadata\n\n        if (/^(\\-\\-\\-|\\+\\+\\+|@@)\\s/.test(line)) {\n          break;\n        } // Diff index\n\n\n        var header = /^(?:Index:|diff(?: -r \\w+)+)\\s+(.+?)\\s*$/.exec(line);\n\n        if (header) {\n          index.index = header[1];\n        }\n\n        i++;\n      } // Parse file headers if they are defined. Unified diff requires them, but\n      // there's no technical issues to have an isolated hunk without file header\n\n\n      parseFileHeader(index);\n      parseFileHeader(index); // Parse hunks\n\n      index.hunks = [];\n\n      while (i < diffstr.length) {\n        var _line = diffstr[i];\n\n        if (/^(Index:|diff|\\-\\-\\-|\\+\\+\\+)\\s/.test(_line)) {\n          break;\n        } else if (/^@@/.test(_line)) {\n          index.hunks.push(parseHunk());\n        } else if (_line && options.strict) {\n          // Ignore unexpected content unless in strict mode\n          throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));\n        } else {\n          i++;\n        }\n      }\n    } // Parses the --- and +++ headers, if none are found, no lines\n    // are consumed.\n\n\n    function parseFileHeader(index) {\n      var fileHeader = /^(---|\\+\\+\\+)\\s+(.*)$/.exec(diffstr[i]);\n\n      if (fileHeader) {\n        var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';\n        var data = fileHeader[2].split('\\t', 2);\n        var fileName = data[0].replace(/\\\\\\\\/g, '\\\\');\n\n        if (/^\".*\"$/.test(fileName)) {\n          fileName = fileName.substr(1, fileName.length - 2);\n        }\n\n        index[keyPrefix + 'FileName'] = fileName;\n        index[keyPrefix + 'Header'] = (data[1] || '').trim();\n        i++;\n      }\n    } // Parses a hunk\n    // This assumes that we are at the start of a hunk.\n\n\n    function parseHunk() {\n      var chunkHeaderIndex = i,\n          chunkHeaderLine = diffstr[i++],\n          chunkHeader = chunkHeaderLine.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/);\n      var hunk = {\n        oldStart: +chunkHeader[1],\n        oldLines: +chunkHeader[2] || 1,\n        newStart: +chunkHeader[3],\n        newLines: +chunkHeader[4] || 1,\n        lines: [],\n        linedelimiters: []\n      };\n      var addCount = 0,\n          removeCount = 0;\n\n      for (; i < diffstr.length; i++) {\n        // Lines starting with '---' could be mistaken for the \"remove line\" operation\n        // But they could be the header for the next file. Therefore prune such cases out.\n        if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {\n          break;\n        }\n\n        var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];\n\n        if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\\\') {\n          hunk.lines.push(diffstr[i]);\n          hunk.linedelimiters.push(delimiters[i] || '\\n');\n\n          if (operation === '+') {\n            addCount++;\n          } else if (operation === '-') {\n            removeCount++;\n          } else if (operation === ' ') {\n            addCount++;\n            removeCount++;\n          }\n        } else {\n          break;\n        }\n      } // Handle the empty block count case\n\n\n      if (!addCount && hunk.newLines === 1) {\n        hunk.newLines = 0;\n      }\n\n      if (!removeCount && hunk.oldLines === 1) {\n        hunk.oldLines = 0;\n      } // Perform optional sanity checking\n\n\n      if (options.strict) {\n        if (addCount !== hunk.newLines) {\n          throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));\n        }\n\n        if (removeCount !== hunk.oldLines) {\n          throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));\n        }\n      }\n\n      return hunk;\n    }\n\n    while (i < diffstr.length) {\n      parseIndex();\n    }\n\n    return list;\n  }\n\n  // Iterator that traverses in the range of [min, max], stepping\n  // by distance from a given start position. I.e. for [0, 4], with\n  // start of 2, this will iterate 2, 3, 1, 4, 0.\n  function distanceIterator (start, minLine, maxLine) {\n    var wantForward = true,\n        backwardExhausted = false,\n        forwardExhausted = false,\n        localOffset = 1;\n    return function iterator() {\n      if (wantForward && !forwardExhausted) {\n        if (backwardExhausted) {\n          localOffset++;\n        } else {\n          wantForward = false;\n        } // Check if trying to fit beyond text length, and if not, check it fits\n        // after offset location (or desired location on first iteration)\n\n\n        if (start + localOffset <= maxLine) {\n          return localOffset;\n        }\n\n        forwardExhausted = true;\n      }\n\n      if (!backwardExhausted) {\n        if (!forwardExhausted) {\n          wantForward = true;\n        } // Check if trying to fit before text beginning, and if not, check it fits\n        // before offset location\n\n\n        if (minLine <= start - localOffset) {\n          return -localOffset++;\n        }\n\n        backwardExhausted = true;\n        return iterator();\n      } // We tried to fit hunk before text beginning and beyond text length, then\n      // hunk can't fit on the text. Return undefined\n\n    };\n  }\n\n  function applyPatch(source, uniDiff) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n    if (typeof uniDiff === 'string') {\n      uniDiff = parsePatch(uniDiff);\n    }\n\n    if (Array.isArray(uniDiff)) {\n      if (uniDiff.length > 1) {\n        throw new Error('applyPatch only works with a single input.');\n      }\n\n      uniDiff = uniDiff[0];\n    } // Apply the diff to the input\n\n\n    var lines = source.split(/\\r\\n|[\\n\\v\\f\\r\\x85]/),\n        delimiters = source.match(/\\r\\n|[\\n\\v\\f\\r\\x85]/g) || [],\n        hunks = uniDiff.hunks,\n        compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {\n      return line === patchContent;\n    },\n        errorCount = 0,\n        fuzzFactor = options.fuzzFactor || 0,\n        minLine = 0,\n        offset = 0,\n        removeEOFNL,\n        addEOFNL;\n    /**\n     * Checks if the hunk exactly fits on the provided location\n     */\n\n\n    function hunkFits(hunk, toPos) {\n      for (var j = 0; j < hunk.lines.length; j++) {\n        var line = hunk.lines[j],\n            operation = line.length > 0 ? line[0] : ' ',\n            content = line.length > 0 ? line.substr(1) : line;\n\n        if (operation === ' ' || operation === '-') {\n          // Context sanity check\n          if (!compareLine(toPos + 1, lines[toPos], operation, content)) {\n            errorCount++;\n\n            if (errorCount > fuzzFactor) {\n              return false;\n            }\n          }\n\n          toPos++;\n        }\n      }\n\n      return true;\n    } // Search best fit offsets for each hunk based on the previous ones\n\n\n    for (var i = 0; i < hunks.length; i++) {\n      var hunk = hunks[i],\n          maxLine = lines.length - hunk.oldLines,\n          localOffset = 0,\n          toPos = offset + hunk.oldStart - 1;\n      var iterator = distanceIterator(toPos, minLine, maxLine);\n\n      for (; localOffset !== undefined; localOffset = iterator()) {\n        if (hunkFits(hunk, toPos + localOffset)) {\n          hunk.offset = offset += localOffset;\n          break;\n        }\n      }\n\n      if (localOffset === undefined) {\n        return false;\n      } // Set lower text limit to end of the current hunk, so next ones don't try\n      // to fit over already patched text\n\n\n      minLine = hunk.offset + hunk.oldStart + hunk.oldLines;\n    } // Apply patch hunks\n\n\n    var diffOffset = 0;\n\n    for (var _i = 0; _i < hunks.length; _i++) {\n      var _hunk = hunks[_i],\n          _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;\n\n      diffOffset += _hunk.newLines - _hunk.oldLines;\n\n      if (_toPos < 0) {\n        // Creating a new file\n        _toPos = 0;\n      }\n\n      for (var j = 0; j < _hunk.lines.length; j++) {\n        var line = _hunk.lines[j],\n            operation = line.length > 0 ? line[0] : ' ',\n            content = line.length > 0 ? line.substr(1) : line,\n            delimiter = _hunk.linedelimiters[j];\n\n        if (operation === ' ') {\n          _toPos++;\n        } else if (operation === '-') {\n          lines.splice(_toPos, 1);\n          delimiters.splice(_toPos, 1);\n          /* istanbul ignore else */\n        } else if (operation === '+') {\n          lines.splice(_toPos, 0, content);\n          delimiters.splice(_toPos, 0, delimiter);\n          _toPos++;\n        } else if (operation === '\\\\') {\n          var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;\n\n          if (previousOperation === '+') {\n            removeEOFNL = true;\n          } else if (previousOperation === '-') {\n            addEOFNL = true;\n          }\n        }\n      }\n    } // Handle EOFNL insertion/removal\n\n\n    if (removeEOFNL) {\n      while (!lines[lines.length - 1]) {\n        lines.pop();\n        delimiters.pop();\n      }\n    } else if (addEOFNL) {\n      lines.push('');\n      delimiters.push('\\n');\n    }\n\n    for (var _k = 0; _k < lines.length - 1; _k++) {\n      lines[_k] = lines[_k] + delimiters[_k];\n    }\n\n    return lines.join('');\n  } // Wrapper that supports multiple file patches via callbacks.\n\n  function applyPatches(uniDiff, options) {\n    if (typeof uniDiff === 'string') {\n      uniDiff = parsePatch(uniDiff);\n    }\n\n    var currentIndex = 0;\n\n    function processIndex() {\n      var index = uniDiff[currentIndex++];\n\n      if (!index) {\n        return options.complete();\n      }\n\n      options.loadFile(index, function (err, data) {\n        if (err) {\n          return options.complete(err);\n        }\n\n        var updatedContent = applyPatch(data, index, options);\n        options.patched(index, updatedContent, function (err) {\n          if (err) {\n            return options.complete(err);\n          }\n\n          processIndex();\n        });\n      });\n    }\n\n    processIndex();\n  }\n\n  function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n    if (!options) {\n      options = {};\n    }\n\n    if (typeof options.context === 'undefined') {\n      options.context = 4;\n    }\n\n    var diff = diffLines(oldStr, newStr, options);\n    diff.push({\n      value: '',\n      lines: []\n    }); // Append an empty value to make cleanup easier\n\n    function contextLines(lines) {\n      return lines.map(function (entry) {\n        return ' ' + entry;\n      });\n    }\n\n    var hunks = [];\n    var oldRangeStart = 0,\n        newRangeStart = 0,\n        curRange = [],\n        oldLine = 1,\n        newLine = 1;\n\n    var _loop = function _loop(i) {\n      var current = diff[i],\n          lines = current.lines || current.value.replace(/\\n$/, '').split('\\n');\n      current.lines = lines;\n\n      if (current.added || current.removed) {\n        var _curRange;\n\n        // If we have previous context, start with that\n        if (!oldRangeStart) {\n          var prev = diff[i - 1];\n          oldRangeStart = oldLine;\n          newRangeStart = newLine;\n\n          if (prev) {\n            curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];\n            oldRangeStart -= curRange.length;\n            newRangeStart -= curRange.length;\n          }\n        } // Output our changes\n\n\n        (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {\n          return (current.added ? '+' : '-') + entry;\n        }))); // Track the updated file position\n\n\n        if (current.added) {\n          newLine += lines.length;\n        } else {\n          oldLine += lines.length;\n        }\n      } else {\n        // Identical context lines. Track line changes\n        if (oldRangeStart) {\n          // Close out any changes that have been output (or join overlapping)\n          if (lines.length <= options.context * 2 && i < diff.length - 2) {\n            var _curRange2;\n\n            // Overlapping\n            (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));\n          } else {\n            var _curRange3;\n\n            // end the range and output\n            var contextSize = Math.min(lines.length, options.context);\n\n            (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));\n\n            var hunk = {\n              oldStart: oldRangeStart,\n              oldLines: oldLine - oldRangeStart + contextSize,\n              newStart: newRangeStart,\n              newLines: newLine - newRangeStart + contextSize,\n              lines: curRange\n            };\n\n            if (i >= diff.length - 2 && lines.length <= options.context) {\n              // EOF is inside this hunk\n              var oldEOFNewline = /\\n$/.test(oldStr);\n              var newEOFNewline = /\\n$/.test(newStr);\n              var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;\n\n              if (!oldEOFNewline && noNlBeforeAdds) {\n                // special case: old has no eol and no trailing context; no-nl can end up before adds\n                curRange.splice(hunk.oldLines, 0, '\\\\ No newline at end of file');\n              }\n\n              if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {\n                curRange.push('\\\\ No newline at end of file');\n              }\n            }\n\n            hunks.push(hunk);\n            oldRangeStart = 0;\n            newRangeStart = 0;\n            curRange = [];\n          }\n        }\n\n        oldLine += lines.length;\n        newLine += lines.length;\n      }\n    };\n\n    for (var i = 0; i < diff.length; i++) {\n      _loop(i);\n    }\n\n    return {\n      oldFileName: oldFileName,\n      newFileName: newFileName,\n      oldHeader: oldHeader,\n      newHeader: newHeader,\n      hunks: hunks\n    };\n  }\n  function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n    var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);\n    var ret = [];\n\n    if (oldFileName == newFileName) {\n      ret.push('Index: ' + oldFileName);\n    }\n\n    ret.push('===================================================================');\n    ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\\t' + diff.oldHeader));\n    ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\\t' + diff.newHeader));\n\n    for (var i = 0; i < diff.hunks.length; i++) {\n      var hunk = diff.hunks[i];\n      ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');\n      ret.push.apply(ret, hunk.lines);\n    }\n\n    return ret.join('\\n') + '\\n';\n  }\n  function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {\n    return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);\n  }\n\n  function arrayEqual(a, b) {\n    if (a.length !== b.length) {\n      return false;\n    }\n\n    return arrayStartsWith(a, b);\n  }\n  function arrayStartsWith(array, start) {\n    if (start.length > array.length) {\n      return false;\n    }\n\n    for (var i = 0; i < start.length; i++) {\n      if (start[i] !== array[i]) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  function calcLineCount(hunk) {\n    var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),\n        oldLines = _calcOldNewLineCount.oldLines,\n        newLines = _calcOldNewLineCount.newLines;\n\n    if (oldLines !== undefined) {\n      hunk.oldLines = oldLines;\n    } else {\n      delete hunk.oldLines;\n    }\n\n    if (newLines !== undefined) {\n      hunk.newLines = newLines;\n    } else {\n      delete hunk.newLines;\n    }\n  }\n  function merge(mine, theirs, base) {\n    mine = loadPatch(mine, base);\n    theirs = loadPatch(theirs, base);\n    var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.\n    // Leaving sanity checks on this to the API consumer that may know more about the\n    // meaning in their own context.\n\n    if (mine.index || theirs.index) {\n      ret.index = mine.index || theirs.index;\n    }\n\n    if (mine.newFileName || theirs.newFileName) {\n      if (!fileNameChanged(mine)) {\n        // No header or no change in ours, use theirs (and ours if theirs does not exist)\n        ret.oldFileName = theirs.oldFileName || mine.oldFileName;\n        ret.newFileName = theirs.newFileName || mine.newFileName;\n        ret.oldHeader = theirs.oldHeader || mine.oldHeader;\n        ret.newHeader = theirs.newHeader || mine.newHeader;\n      } else if (!fileNameChanged(theirs)) {\n        // No header or no change in theirs, use ours\n        ret.oldFileName = mine.oldFileName;\n        ret.newFileName = mine.newFileName;\n        ret.oldHeader = mine.oldHeader;\n        ret.newHeader = mine.newHeader;\n      } else {\n        // Both changed... figure it out\n        ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);\n        ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);\n        ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);\n        ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);\n      }\n    }\n\n    ret.hunks = [];\n    var mineIndex = 0,\n        theirsIndex = 0,\n        mineOffset = 0,\n        theirsOffset = 0;\n\n    while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {\n      var mineCurrent = mine.hunks[mineIndex] || {\n        oldStart: Infinity\n      },\n          theirsCurrent = theirs.hunks[theirsIndex] || {\n        oldStart: Infinity\n      };\n\n      if (hunkBefore(mineCurrent, theirsCurrent)) {\n        // This patch does not overlap with any of the others, yay.\n        ret.hunks.push(cloneHunk(mineCurrent, mineOffset));\n        mineIndex++;\n        theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;\n      } else if (hunkBefore(theirsCurrent, mineCurrent)) {\n        // This patch does not overlap with any of the others, yay.\n        ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));\n        theirsIndex++;\n        mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;\n      } else {\n        // Overlap, merge as best we can\n        var mergedHunk = {\n          oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),\n          oldLines: 0,\n          newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),\n          newLines: 0,\n          lines: []\n        };\n        mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);\n        theirsIndex++;\n        mineIndex++;\n        ret.hunks.push(mergedHunk);\n      }\n    }\n\n    return ret;\n  }\n\n  function loadPatch(param, base) {\n    if (typeof param === 'string') {\n      if (/^@@/m.test(param) || /^Index:/m.test(param)) {\n        return parsePatch(param)[0];\n      }\n\n      if (!base) {\n        throw new Error('Must provide a base reference or pass in a patch');\n      }\n\n      return structuredPatch(undefined, undefined, base, param);\n    }\n\n    return param;\n  }\n\n  function fileNameChanged(patch) {\n    return patch.newFileName && patch.newFileName !== patch.oldFileName;\n  }\n\n  function selectField(index, mine, theirs) {\n    if (mine === theirs) {\n      return mine;\n    } else {\n      index.conflict = true;\n      return {\n        mine: mine,\n        theirs: theirs\n      };\n    }\n  }\n\n  function hunkBefore(test, check) {\n    return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;\n  }\n\n  function cloneHunk(hunk, offset) {\n    return {\n      oldStart: hunk.oldStart,\n      oldLines: hunk.oldLines,\n      newStart: hunk.newStart + offset,\n      newLines: hunk.newLines,\n      lines: hunk.lines\n    };\n  }\n\n  function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {\n    // This will generally result in a conflicted hunk, but there are cases where the context\n    // is the only overlap where we can successfully merge the content here.\n    var mine = {\n      offset: mineOffset,\n      lines: mineLines,\n      index: 0\n    },\n        their = {\n      offset: theirOffset,\n      lines: theirLines,\n      index: 0\n    }; // Handle any leading content\n\n    insertLeading(hunk, mine, their);\n    insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.\n\n    while (mine.index < mine.lines.length && their.index < their.lines.length) {\n      var mineCurrent = mine.lines[mine.index],\n          theirCurrent = their.lines[their.index];\n\n      if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {\n        // Both modified ...\n        mutualChange(hunk, mine, their);\n      } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {\n        var _hunk$lines;\n\n        // Mine inserted\n        (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));\n      } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {\n        var _hunk$lines2;\n\n        // Theirs inserted\n        (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));\n      } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {\n        // Mine removed or edited\n        removal(hunk, mine, their);\n      } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {\n        // Their removed or edited\n        removal(hunk, their, mine, true);\n      } else if (mineCurrent === theirCurrent) {\n        // Context identity\n        hunk.lines.push(mineCurrent);\n        mine.index++;\n        their.index++;\n      } else {\n        // Context mismatch\n        conflict(hunk, collectChange(mine), collectChange(their));\n      }\n    } // Now push anything that may be remaining\n\n\n    insertTrailing(hunk, mine);\n    insertTrailing(hunk, their);\n    calcLineCount(hunk);\n  }\n\n  function mutualChange(hunk, mine, their) {\n    var myChanges = collectChange(mine),\n        theirChanges = collectChange(their);\n\n    if (allRemoves(myChanges) && allRemoves(theirChanges)) {\n      // Special case for remove changes that are supersets of one another\n      if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {\n        var _hunk$lines3;\n\n        (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));\n\n        return;\n      } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {\n        var _hunk$lines4;\n\n        (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));\n\n        return;\n      }\n    } else if (arrayEqual(myChanges, theirChanges)) {\n      var _hunk$lines5;\n\n      (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));\n\n      return;\n    }\n\n    conflict(hunk, myChanges, theirChanges);\n  }\n\n  function removal(hunk, mine, their, swap) {\n    var myChanges = collectChange(mine),\n        theirChanges = collectContext(their, myChanges);\n\n    if (theirChanges.merged) {\n      var _hunk$lines6;\n\n      (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));\n    } else {\n      conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);\n    }\n  }\n\n  function conflict(hunk, mine, their) {\n    hunk.conflict = true;\n    hunk.lines.push({\n      conflict: true,\n      mine: mine,\n      theirs: their\n    });\n  }\n\n  function insertLeading(hunk, insert, their) {\n    while (insert.offset < their.offset && insert.index < insert.lines.length) {\n      var line = insert.lines[insert.index++];\n      hunk.lines.push(line);\n      insert.offset++;\n    }\n  }\n\n  function insertTrailing(hunk, insert) {\n    while (insert.index < insert.lines.length) {\n      var line = insert.lines[insert.index++];\n      hunk.lines.push(line);\n    }\n  }\n\n  function collectChange(state) {\n    var ret = [],\n        operation = state.lines[state.index][0];\n\n    while (state.index < state.lines.length) {\n      var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one \"atomic\" modify change.\n\n      if (operation === '-' && line[0] === '+') {\n        operation = '+';\n      }\n\n      if (operation === line[0]) {\n        ret.push(line);\n        state.index++;\n      } else {\n        break;\n      }\n    }\n\n    return ret;\n  }\n\n  function collectContext(state, matchChanges) {\n    var changes = [],\n        merged = [],\n        matchIndex = 0,\n        contextChanges = false,\n        conflicted = false;\n\n    while (matchIndex < matchChanges.length && state.index < state.lines.length) {\n      var change = state.lines[state.index],\n          match = matchChanges[matchIndex]; // Once we've hit our add, then we are done\n\n      if (match[0] === '+') {\n        break;\n      }\n\n      contextChanges = contextChanges || change[0] !== ' ';\n      merged.push(match);\n      matchIndex++; // Consume any additions in the other block as a conflict to attempt\n      // to pull in the remaining context after this\n\n      if (change[0] === '+') {\n        conflicted = true;\n\n        while (change[0] === '+') {\n          changes.push(change);\n          change = state.lines[++state.index];\n        }\n      }\n\n      if (match.substr(1) === change.substr(1)) {\n        changes.push(change);\n        state.index++;\n      } else {\n        conflicted = true;\n      }\n    }\n\n    if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {\n      conflicted = true;\n    }\n\n    if (conflicted) {\n      return changes;\n    }\n\n    while (matchIndex < matchChanges.length) {\n      merged.push(matchChanges[matchIndex++]);\n    }\n\n    return {\n      merged: merged,\n      changes: changes\n    };\n  }\n\n  function allRemoves(changes) {\n    return changes.reduce(function (prev, change) {\n      return prev && change[0] === '-';\n    }, true);\n  }\n\n  function skipRemoveSuperset(state, removeChanges, delta) {\n    for (var i = 0; i < delta; i++) {\n      var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);\n\n      if (state.lines[state.index + i] !== ' ' + changeContent) {\n        return false;\n      }\n    }\n\n    state.index += delta;\n    return true;\n  }\n\n  function calcOldNewLineCount(lines) {\n    var oldLines = 0;\n    var newLines = 0;\n    lines.forEach(function (line) {\n      if (typeof line !== 'string') {\n        var myCount = calcOldNewLineCount(line.mine);\n        var theirCount = calcOldNewLineCount(line.theirs);\n\n        if (oldLines !== undefined) {\n          if (myCount.oldLines === theirCount.oldLines) {\n            oldLines += myCount.oldLines;\n          } else {\n            oldLines = undefined;\n          }\n        }\n\n        if (newLines !== undefined) {\n          if (myCount.newLines === theirCount.newLines) {\n            newLines += myCount.newLines;\n          } else {\n            newLines = undefined;\n          }\n        }\n      } else {\n        if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {\n          newLines++;\n        }\n\n        if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {\n          oldLines++;\n        }\n      }\n    });\n    return {\n      oldLines: oldLines,\n      newLines: newLines\n    };\n  }\n\n  // See: http://code.google.com/p/google-diff-match-patch/wiki/API\n  function convertChangesToDMP(changes) {\n    var ret = [],\n        change,\n        operation;\n\n    for (var i = 0; i < changes.length; i++) {\n      change = changes[i];\n\n      if (change.added) {\n        operation = 1;\n      } else if (change.removed) {\n        operation = -1;\n      } else {\n        operation = 0;\n      }\n\n      ret.push([operation, change.value]);\n    }\n\n    return ret;\n  }\n\n  function convertChangesToXML(changes) {\n    var ret = [];\n\n    for (var i = 0; i < changes.length; i++) {\n      var change = changes[i];\n\n      if (change.added) {\n        ret.push('<ins>');\n      } else if (change.removed) {\n        ret.push('<del>');\n      }\n\n      ret.push(escapeHTML(change.value));\n\n      if (change.added) {\n        ret.push('</ins>');\n      } else if (change.removed) {\n        ret.push('</del>');\n      }\n    }\n\n    return ret.join('');\n  }\n\n  function escapeHTML(s) {\n    var n = s;\n    n = n.replace(/&/g, '&amp;');\n    n = n.replace(/</g, '&lt;');\n    n = n.replace(/>/g, '&gt;');\n    n = n.replace(/\"/g, '&quot;');\n    return n;\n  }\n\n  /* See LICENSE file for terms of use */\n\n  exports.Diff = Diff;\n  exports.diffChars = diffChars;\n  exports.diffWords = diffWords;\n  exports.diffWordsWithSpace = diffWordsWithSpace;\n  exports.diffLines = diffLines;\n  exports.diffTrimmedLines = diffTrimmedLines;\n  exports.diffSentences = diffSentences;\n  exports.diffCss = diffCss;\n  exports.diffJson = diffJson;\n  exports.diffArrays = diffArrays;\n  exports.structuredPatch = structuredPatch;\n  exports.createTwoFilesPatch = createTwoFilesPatch;\n  exports.createPatch = createPatch;\n  exports.applyPatch = applyPatch;\n  exports.applyPatches = applyPatches;\n  exports.parsePatch = parsePatch;\n  exports.merge = merge;\n  exports.convertChangesToDMP = convertChangesToDMP;\n  exports.convertChangesToXML = convertChangesToXML;\n  exports.canonicalize = canonicalize;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isFinite(val)) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'weeks':\n    case 'week':\n    case 'w':\n      return n * w;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (msAbs >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (msAbs >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (msAbs >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return plural(ms, msAbs, d, 'day');\n  }\n  if (msAbs >= h) {\n    return plural(ms, msAbs, h, 'hour');\n  }\n  if (msAbs >= m) {\n    return plural(ms, msAbs, m, 'minute');\n  }\n  if (msAbs >= s) {\n    return plural(ms, msAbs, s, 'second');\n  }\n  return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n  var isPlural = msAbs >= n * 1.5;\n  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  return Object.isExtensible(Object.preventExtensions({}));\n});\n","var hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar defineProperty = require('../internals/object-define-property').f;\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar isExtensible = Object.isExtensible || function () {\n  return true;\n};\n\nvar setMetadata = function (it) {\n  defineProperty(it, METADATA, { value: {\n    objectID: 'O' + ++id, // object ID\n    weakData: {}          // weak collections IDs\n  } });\n};\n\nvar fastKey = function (it, create) {\n  // return a primitive with prefix\n  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n  if (!has(it, METADATA)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return 'F';\n    // not necessary to add metadata\n    if (!create) return 'E';\n    // add missing metadata\n    setMetadata(it);\n  // return object ID\n  } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n  if (!has(it, METADATA)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return true;\n    // not necessary to add metadata\n    if (!create) return false;\n    // add missing metadata\n    setMetadata(it);\n  // return the store of weak collections IDs\n  } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n  if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n  return it;\n};\n\nvar meta = module.exports = {\n  REQUIRED: false,\n  fastKey: fastKey,\n  getWeakData: getWeakData,\n  onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","var $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\nvar nativeFreeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); });\n\n// `Object.freeze` method\n// https://tc39.github.io/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n  freeze: function freeze(it) {\n    return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;\n  }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n  var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n  var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n  var ADDER = IS_MAP ? 'set' : 'add';\n  var NativeConstructor = global[CONSTRUCTOR_NAME];\n  var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n  var Constructor = NativeConstructor;\n  var exported = {};\n\n  var fixMethod = function (KEY) {\n    var nativeMethod = NativePrototype[KEY];\n    redefine(NativePrototype, KEY,\n      KEY == 'add' ? function add(value) {\n        nativeMethod.call(this, value === 0 ? 0 : value);\n        return this;\n      } : KEY == 'delete' ? function (key) {\n        return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n      } : KEY == 'get' ? function get(key) {\n        return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n      } : KEY == 'has' ? function has(key) {\n        return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n      } : function set(key, value) {\n        nativeMethod.call(this, key === 0 ? 0 : key, value);\n        return this;\n      }\n    );\n  };\n\n  // eslint-disable-next-line max-len\n  if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n    new NativeConstructor().entries().next();\n  })))) {\n    // create collection constructor\n    Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n    InternalMetadataModule.REQUIRED = true;\n  } else if (isForced(CONSTRUCTOR_NAME, true)) {\n    var instance = new Constructor();\n    // early implementations not supports chaining\n    var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n    // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n    var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n    // most early implementations doesn't supports iterables, most modern - not close it correctly\n    // eslint-disable-next-line no-new\n    var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n    // for early implementations -0 and +0 not the same\n    var BUGGY_ZERO = !IS_WEAK && fails(function () {\n      // V8 ~ Chromium 42- fails only with 5+ elements\n      var $instance = new NativeConstructor();\n      var index = 5;\n      while (index--) $instance[ADDER](index, index);\n      return !$instance.has(-0);\n    });\n\n    if (!ACCEPT_ITERABLES) {\n      Constructor = wrapper(function (dummy, iterable) {\n        anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n        var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n        if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n        return that;\n      });\n      Constructor.prototype = NativePrototype;\n      NativePrototype.constructor = Constructor;\n    }\n\n    if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n      fixMethod('delete');\n      fixMethod('has');\n      IS_MAP && fixMethod('get');\n    }\n\n    if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n    // weak collections should not contains .clear method\n    if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n  }\n\n  exported[CONSTRUCTOR_NAME] = Constructor;\n  $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n  setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n  if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n  return Constructor;\n};\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar create = require('../internals/object-create');\nvar redefineAll = require('../internals/redefine-all');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/define-iterator');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n  getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n    var C = wrapper(function (that, iterable) {\n      anInstance(that, C, CONSTRUCTOR_NAME);\n      setInternalState(that, {\n        type: CONSTRUCTOR_NAME,\n        index: create(null),\n        first: undefined,\n        last: undefined,\n        size: 0\n      });\n      if (!DESCRIPTORS) that.size = 0;\n      if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n    });\n\n    var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n    var define = function (that, key, value) {\n      var state = getInternalState(that);\n      var entry = getEntry(that, key);\n      var previous, index;\n      // change existing entry\n      if (entry) {\n        entry.value = value;\n      // create new entry\n      } else {\n        state.last = entry = {\n          index: index = fastKey(key, true),\n          key: key,\n          value: value,\n          previous: previous = state.last,\n          next: undefined,\n          removed: false\n        };\n        if (!state.first) state.first = entry;\n        if (previous) previous.next = entry;\n        if (DESCRIPTORS) state.size++;\n        else that.size++;\n        // add to index\n        if (index !== 'F') state.index[index] = entry;\n      } return that;\n    };\n\n    var getEntry = function (that, key) {\n      var state = getInternalState(that);\n      // fast case\n      var index = fastKey(key);\n      var entry;\n      if (index !== 'F') return state.index[index];\n      // frozen object case\n      for (entry = state.first; entry; entry = entry.next) {\n        if (entry.key == key) return entry;\n      }\n    };\n\n    redefineAll(C.prototype, {\n      // 23.1.3.1 Map.prototype.clear()\n      // 23.2.3.2 Set.prototype.clear()\n      clear: function clear() {\n        var that = this;\n        var state = getInternalState(that);\n        var data = state.index;\n        var entry = state.first;\n        while (entry) {\n          entry.removed = true;\n          if (entry.previous) entry.previous = entry.previous.next = undefined;\n          delete data[entry.index];\n          entry = entry.next;\n        }\n        state.first = state.last = undefined;\n        if (DESCRIPTORS) state.size = 0;\n        else that.size = 0;\n      },\n      // 23.1.3.3 Map.prototype.delete(key)\n      // 23.2.3.4 Set.prototype.delete(value)\n      'delete': function (key) {\n        var that = this;\n        var state = getInternalState(that);\n        var entry = getEntry(that, key);\n        if (entry) {\n          var next = entry.next;\n          var prev = entry.previous;\n          delete state.index[entry.index];\n          entry.removed = true;\n          if (prev) prev.next = next;\n          if (next) next.previous = prev;\n          if (state.first == entry) state.first = next;\n          if (state.last == entry) state.last = prev;\n          if (DESCRIPTORS) state.size--;\n          else that.size--;\n        } return !!entry;\n      },\n      // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n      // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n      forEach: function forEach(callbackfn /* , that = undefined */) {\n        var state = getInternalState(this);\n        var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n        var entry;\n        while (entry = entry ? entry.next : state.first) {\n          boundFunction(entry.value, entry.key, this);\n          // revert to the last existing entry\n          while (entry && entry.removed) entry = entry.previous;\n        }\n      },\n      // 23.1.3.7 Map.prototype.has(key)\n      // 23.2.3.7 Set.prototype.has(value)\n      has: function has(key) {\n        return !!getEntry(this, key);\n      }\n    });\n\n    redefineAll(C.prototype, IS_MAP ? {\n      // 23.1.3.6 Map.prototype.get(key)\n      get: function get(key) {\n        var entry = getEntry(this, key);\n        return entry && entry.value;\n      },\n      // 23.1.3.9 Map.prototype.set(key, value)\n      set: function set(key, value) {\n        return define(this, key === 0 ? 0 : key, value);\n      }\n    } : {\n      // 23.2.3.1 Set.prototype.add(value)\n      add: function add(value) {\n        return define(this, value = value === 0 ? 0 : value, value);\n      }\n    });\n    if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n      get: function () {\n        return getInternalState(this).size;\n      }\n    });\n    return C;\n  },\n  setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n    var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n    var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n    var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n    // add .keys, .values, .entries, [@@iterator]\n    // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n    defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n      setInternalState(this, {\n        type: ITERATOR_NAME,\n        target: iterated,\n        state: getInternalCollectionState(iterated),\n        kind: kind,\n        last: undefined\n      });\n    }, function () {\n      var state = getInternalIteratorState(this);\n      var kind = state.kind;\n      var entry = state.last;\n      // revert to the last existing entry\n      while (entry && entry.removed) entry = entry.previous;\n      // get next entry\n      if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n        // or finish the iteration\n        state.target = undefined;\n        return { value: undefined, done: true };\n      }\n      // return step by kind\n      if (kind == 'keys') return { value: entry.key, done: false };\n      if (kind == 'values') return { value: entry.value, done: false };\n      return { value: [entry.key, entry.value], done: false };\n    }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n    // add [@@species], 23.1.2.2, 23.2.2.2\n    setSpecies(CONSTRUCTOR_NAME);\n  }\n};\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.github.io/ecma262/#sec-set-objects\nmodule.exports = collection('Set', function (init) {\n  return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","export var browser = true;\n","// This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped\n// optimize the gzip compression for this alphabet.\nlet urlAlphabet =\n  'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\n\nlet customAlphabet = (alphabet, size) => {\n  return () => {\n    let id = ''\n    // A compact alternative for `for (var i = 0; i < step; i++)`.\n    let i = size\n    while (i--) {\n      // `| 0` is more compact and faster than `Math.floor()`.\n      id += alphabet[(Math.random() * alphabet.length) | 0]\n    }\n    return id\n  }\n}\n\nlet nanoid = (size = 21) => {\n  let id = ''\n  // A compact alternative for `for (var i = 0; i < step; i++)`.\n  let i = size\n  while (i--) {\n    // `| 0` is more compact and faster than `Math.floor()`.\n    id += urlAlphabet[(Math.random() * 64) | 0]\n  }\n  return id\n}\n\nexport { nanoid, customAlphabet }\n","/*! https://mths.be/he v1.2.0 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code,\n\t// and use it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t// All astral symbols.\n\tvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\t// All ASCII symbols (not just printable ASCII) except those listed in the\n\t// first column of the overrides table.\n\t// https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides\n\tvar regexAsciiWhitelist = /[\\x01-\\x7F]/g;\n\t// All BMP symbols that are not ASCII newlines, printable ASCII symbols, or\n\t// code points listed in the first column of the overrides table on\n\t// https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.\n\tvar regexBmpWhitelist = /[\\x01-\\t\\x0B\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g;\n\n\tvar regexEncodeNonAscii = /<\\u20D2|=\\u20E5|>\\u20D2|\\u205F\\u200A|\\u219D\\u0338|\\u2202\\u0338|\\u2220\\u20D2|\\u2229\\uFE00|\\u222A\\uFE00|\\u223C\\u20D2|\\u223D\\u0331|\\u223E\\u0333|\\u2242\\u0338|\\u224B\\u0338|\\u224D\\u20D2|\\u224E\\u0338|\\u224F\\u0338|\\u2250\\u0338|\\u2261\\u20E5|\\u2264\\u20D2|\\u2265\\u20D2|\\u2266\\u0338|\\u2267\\u0338|\\u2268\\uFE00|\\u2269\\uFE00|\\u226A\\u0338|\\u226A\\u20D2|\\u226B\\u0338|\\u226B\\u20D2|\\u227F\\u0338|\\u2282\\u20D2|\\u2283\\u20D2|\\u228A\\uFE00|\\u228B\\uFE00|\\u228F\\u0338|\\u2290\\u0338|\\u2293\\uFE00|\\u2294\\uFE00|\\u22B4\\u20D2|\\u22B5\\u20D2|\\u22D8\\u0338|\\u22D9\\u0338|\\u22DA\\uFE00|\\u22DB\\uFE00|\\u22F5\\u0338|\\u22F9\\u0338|\\u2933\\u0338|\\u29CF\\u0338|\\u29D0\\u0338|\\u2A6D\\u0338|\\u2A70\\u0338|\\u2A7D\\u0338|\\u2A7E\\u0338|\\u2AA1\\u0338|\\u2AA2\\u0338|\\u2AAC\\uFE00|\\u2AAD\\uFE00|\\u2AAF\\u0338|\\u2AB0\\u0338|\\u2AC5\\u0338|\\u2AC6\\u0338|\\u2ACB\\uFE00|\\u2ACC\\uFE00|\\u2AFD\\u20E5|[\\xA0-\\u0113\\u0116-\\u0122\\u0124-\\u012B\\u012E-\\u014D\\u0150-\\u017E\\u0192\\u01B5\\u01F5\\u0237\\u02C6\\u02C7\\u02D8-\\u02DD\\u0311\\u0391-\\u03A1\\u03A3-\\u03A9\\u03B1-\\u03C9\\u03D1\\u03D2\\u03D5\\u03D6\\u03DC\\u03DD\\u03F0\\u03F1\\u03F5\\u03F6\\u0401-\\u040C\\u040E-\\u044F\\u0451-\\u045C\\u045E\\u045F\\u2002-\\u2005\\u2007-\\u2010\\u2013-\\u2016\\u2018-\\u201A\\u201C-\\u201E\\u2020-\\u2022\\u2025\\u2026\\u2030-\\u2035\\u2039\\u203A\\u203E\\u2041\\u2043\\u2044\\u204F\\u2057\\u205F-\\u2063\\u20AC\\u20DB\\u20DC\\u2102\\u2105\\u210A-\\u2113\\u2115-\\u211E\\u2122\\u2124\\u2127-\\u2129\\u212C\\u212D\\u212F-\\u2131\\u2133-\\u2138\\u2145-\\u2148\\u2153-\\u215E\\u2190-\\u219B\\u219D-\\u21A7\\u21A9-\\u21AE\\u21B0-\\u21B3\\u21B5-\\u21B7\\u21BA-\\u21DB\\u21DD\\u21E4\\u21E5\\u21F5\\u21FD-\\u2205\\u2207-\\u2209\\u220B\\u220C\\u220F-\\u2214\\u2216-\\u2218\\u221A\\u221D-\\u2238\\u223A-\\u2257\\u2259\\u225A\\u225C\\u225F-\\u2262\\u2264-\\u228B\\u228D-\\u229B\\u229D-\\u22A5\\u22A7-\\u22B0\\u22B2-\\u22BB\\u22BD-\\u22DB\\u22DE-\\u22E3\\u22E6-\\u22F7\\u22F9-\\u22FE\\u2305\\u2306\\u2308-\\u2310\\u2312\\u2313\\u2315\\u2316\\u231C-\\u231F\\u2322\\u2323\\u232D\\u232E\\u2336\\u233D\\u233F\\u237C\\u23B0\\u23B1\\u23B4-\\u23B6\\u23DC-\\u23DF\\u23E2\\u23E7\\u2423\\u24C8\\u2500\\u2502\\u250C\\u2510\\u2514\\u2518\\u251C\\u2524\\u252C\\u2534\\u253C\\u2550-\\u256C\\u2580\\u2584\\u2588\\u2591-\\u2593\\u25A1\\u25AA\\u25AB\\u25AD\\u25AE\\u25B1\\u25B3-\\u25B5\\u25B8\\u25B9\\u25BD-\\u25BF\\u25C2\\u25C3\\u25CA\\u25CB\\u25EC\\u25EF\\u25F8-\\u25FC\\u2605\\u2606\\u260E\\u2640\\u2642\\u2660\\u2663\\u2665\\u2666\\u266A\\u266D-\\u266F\\u2713\\u2717\\u2720\\u2736\\u2758\\u2772\\u2773\\u27C8\\u27C9\\u27E6-\\u27ED\\u27F5-\\u27FA\\u27FC\\u27FF\\u2902-\\u2905\\u290C-\\u2913\\u2916\\u2919-\\u2920\\u2923-\\u292A\\u2933\\u2935-\\u2939\\u293C\\u293D\\u2945\\u2948-\\u294B\\u294E-\\u2976\\u2978\\u2979\\u297B-\\u297F\\u2985\\u2986\\u298B-\\u2996\\u299A\\u299C\\u299D\\u29A4-\\u29B7\\u29B9\\u29BB\\u29BC\\u29BE-\\u29C5\\u29C9\\u29CD-\\u29D0\\u29DC-\\u29DE\\u29E3-\\u29E5\\u29EB\\u29F4\\u29F6\\u2A00-\\u2A02\\u2A04\\u2A06\\u2A0C\\u2A0D\\u2A10-\\u2A17\\u2A22-\\u2A27\\u2A29\\u2A2A\\u2A2D-\\u2A31\\u2A33-\\u2A3C\\u2A3F\\u2A40\\u2A42-\\u2A4D\\u2A50\\u2A53-\\u2A58\\u2A5A-\\u2A5D\\u2A5F\\u2A66\\u2A6A\\u2A6D-\\u2A75\\u2A77-\\u2A9A\\u2A9D-\\u2AA2\\u2AA4-\\u2AB0\\u2AB3-\\u2AC8\\u2ACB\\u2ACC\\u2ACF-\\u2ADB\\u2AE4\\u2AE6-\\u2AE9\\u2AEB-\\u2AF3\\u2AFD\\uFB00-\\uFB04]|\\uD835[\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDCCF\\uDD04\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDD6B]/g;\n\tvar encodeMap = {'\\xAD':'shy','\\u200C':'zwnj','\\u200D':'zwj','\\u200E':'lrm','\\u2063':'ic','\\u2062':'it','\\u2061':'af','\\u200F':'rlm','\\u200B':'ZeroWidthSpace','\\u2060':'NoBreak','\\u0311':'DownBreve','\\u20DB':'tdot','\\u20DC':'DotDot','\\t':'Tab','\\n':'NewLine','\\u2008':'puncsp','\\u205F':'MediumSpace','\\u2009':'thinsp','\\u200A':'hairsp','\\u2004':'emsp13','\\u2002':'ensp','\\u2005':'emsp14','\\u2003':'emsp','\\u2007':'numsp','\\xA0':'nbsp','\\u205F\\u200A':'ThickSpace','\\u203E':'oline','_':'lowbar','\\u2010':'dash','\\u2013':'ndash','\\u2014':'mdash','\\u2015':'horbar',',':'comma',';':'semi','\\u204F':'bsemi',':':'colon','\\u2A74':'Colone','!':'excl','\\xA1':'iexcl','?':'quest','\\xBF':'iquest','.':'period','\\u2025':'nldr','\\u2026':'mldr','\\xB7':'middot','\\'':'apos','\\u2018':'lsquo','\\u2019':'rsquo','\\u201A':'sbquo','\\u2039':'lsaquo','\\u203A':'rsaquo','\"':'quot','\\u201C':'ldquo','\\u201D':'rdquo','\\u201E':'bdquo','\\xAB':'laquo','\\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\\u2308':'lceil','\\u2309':'rceil','\\u230A':'lfloor','\\u230B':'rfloor','\\u2985':'lopar','\\u2986':'ropar','\\u298B':'lbrke','\\u298C':'rbrke','\\u298D':'lbrkslu','\\u298E':'rbrksld','\\u298F':'lbrksld','\\u2990':'rbrkslu','\\u2991':'langd','\\u2992':'rangd','\\u2993':'lparlt','\\u2994':'rpargt','\\u2995':'gtlPar','\\u2996':'ltrPar','\\u27E6':'lobrk','\\u27E7':'robrk','\\u27E8':'lang','\\u27E9':'rang','\\u27EA':'Lang','\\u27EB':'Rang','\\u27EC':'loang','\\u27ED':'roang','\\u2772':'lbbrk','\\u2773':'rbbrk','\\u2016':'Vert','\\xA7':'sect','\\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\\u2030':'permil','\\u2031':'pertenk','\\u2020':'dagger','\\u2021':'Dagger','\\u2022':'bull','\\u2043':'hybull','\\u2032':'prime','\\u2033':'Prime','\\u2034':'tprime','\\u2057':'qprime','\\u2035':'bprime','\\u2041':'caret','`':'grave','\\xB4':'acute','\\u02DC':'tilde','^':'Hat','\\xAF':'macr','\\u02D8':'breve','\\u02D9':'dot','\\xA8':'die','\\u02DA':'ring','\\u02DD':'dblac','\\xB8':'cedil','\\u02DB':'ogon','\\u02C6':'circ','\\u02C7':'caron','\\xB0':'deg','\\xA9':'copy','\\xAE':'reg','\\u2117':'copysr','\\u2118':'wp','\\u211E':'rx','\\u2127':'mho','\\u2129':'iiota','\\u2190':'larr','\\u219A':'nlarr','\\u2192':'rarr','\\u219B':'nrarr','\\u2191':'uarr','\\u2193':'darr','\\u2194':'harr','\\u21AE':'nharr','\\u2195':'varr','\\u2196':'nwarr','\\u2197':'nearr','\\u2198':'searr','\\u2199':'swarr','\\u219D':'rarrw','\\u219D\\u0338':'nrarrw','\\u219E':'Larr','\\u219F':'Uarr','\\u21A0':'Rarr','\\u21A1':'Darr','\\u21A2':'larrtl','\\u21A3':'rarrtl','\\u21A4':'mapstoleft','\\u21A5':'mapstoup','\\u21A6':'map','\\u21A7':'mapstodown','\\u21A9':'larrhk','\\u21AA':'rarrhk','\\u21AB':'larrlp','\\u21AC':'rarrlp','\\u21AD':'harrw','\\u21B0':'lsh','\\u21B1':'rsh','\\u21B2':'ldsh','\\u21B3':'rdsh','\\u21B5':'crarr','\\u21B6':'cularr','\\u21B7':'curarr','\\u21BA':'olarr','\\u21BB':'orarr','\\u21BC':'lharu','\\u21BD':'lhard','\\u21BE':'uharr','\\u21BF':'uharl','\\u21C0':'rharu','\\u21C1':'rhard','\\u21C2':'dharr','\\u21C3':'dharl','\\u21C4':'rlarr','\\u21C5':'udarr','\\u21C6':'lrarr','\\u21C7':'llarr','\\u21C8':'uuarr','\\u21C9':'rrarr','\\u21CA':'ddarr','\\u21CB':'lrhar','\\u21CC':'rlhar','\\u21D0':'lArr','\\u21CD':'nlArr','\\u21D1':'uArr','\\u21D2':'rArr','\\u21CF':'nrArr','\\u21D3':'dArr','\\u21D4':'iff','\\u21CE':'nhArr','\\u21D5':'vArr','\\u21D6':'nwArr','\\u21D7':'neArr','\\u21D8':'seArr','\\u21D9':'swArr','\\u21DA':'lAarr','\\u21DB':'rAarr','\\u21DD':'zigrarr','\\u21E4':'larrb','\\u21E5':'rarrb','\\u21F5':'duarr','\\u21FD':'loarr','\\u21FE':'roarr','\\u21FF':'hoarr','\\u2200':'forall','\\u2201':'comp','\\u2202':'part','\\u2202\\u0338':'npart','\\u2203':'exist','\\u2204':'nexist','\\u2205':'empty','\\u2207':'Del','\\u2208':'in','\\u2209':'notin','\\u220B':'ni','\\u220C':'notni','\\u03F6':'bepsi','\\u220F':'prod','\\u2210':'coprod','\\u2211':'sum','+':'plus','\\xB1':'pm','\\xF7':'div','\\xD7':'times','<':'lt','\\u226E':'nlt','<\\u20D2':'nvlt','=':'equals','\\u2260':'ne','=\\u20E5':'bne','\\u2A75':'Equal','>':'gt','\\u226F':'ngt','>\\u20D2':'nvgt','\\xAC':'not','|':'vert','\\xA6':'brvbar','\\u2212':'minus','\\u2213':'mp','\\u2214':'plusdo','\\u2044':'frasl','\\u2216':'setmn','\\u2217':'lowast','\\u2218':'compfn','\\u221A':'Sqrt','\\u221D':'prop','\\u221E':'infin','\\u221F':'angrt','\\u2220':'ang','\\u2220\\u20D2':'nang','\\u2221':'angmsd','\\u2222':'angsph','\\u2223':'mid','\\u2224':'nmid','\\u2225':'par','\\u2226':'npar','\\u2227':'and','\\u2228':'or','\\u2229':'cap','\\u2229\\uFE00':'caps','\\u222A':'cup','\\u222A\\uFE00':'cups','\\u222B':'int','\\u222C':'Int','\\u222D':'tint','\\u2A0C':'qint','\\u222E':'oint','\\u222F':'Conint','\\u2230':'Cconint','\\u2231':'cwint','\\u2232':'cwconint','\\u2233':'awconint','\\u2234':'there4','\\u2235':'becaus','\\u2236':'ratio','\\u2237':'Colon','\\u2238':'minusd','\\u223A':'mDDot','\\u223B':'homtht','\\u223C':'sim','\\u2241':'nsim','\\u223C\\u20D2':'nvsim','\\u223D':'bsim','\\u223D\\u0331':'race','\\u223E':'ac','\\u223E\\u0333':'acE','\\u223F':'acd','\\u2240':'wr','\\u2242':'esim','\\u2242\\u0338':'nesim','\\u2243':'sime','\\u2244':'nsime','\\u2245':'cong','\\u2247':'ncong','\\u2246':'simne','\\u2248':'ap','\\u2249':'nap','\\u224A':'ape','\\u224B':'apid','\\u224B\\u0338':'napid','\\u224C':'bcong','\\u224D':'CupCap','\\u226D':'NotCupCap','\\u224D\\u20D2':'nvap','\\u224E':'bump','\\u224E\\u0338':'nbump','\\u224F':'bumpe','\\u224F\\u0338':'nbumpe','\\u2250':'doteq','\\u2250\\u0338':'nedot','\\u2251':'eDot','\\u2252':'efDot','\\u2253':'erDot','\\u2254':'colone','\\u2255':'ecolon','\\u2256':'ecir','\\u2257':'cire','\\u2259':'wedgeq','\\u225A':'veeeq','\\u225C':'trie','\\u225F':'equest','\\u2261':'equiv','\\u2262':'nequiv','\\u2261\\u20E5':'bnequiv','\\u2264':'le','\\u2270':'nle','\\u2264\\u20D2':'nvle','\\u2265':'ge','\\u2271':'nge','\\u2265\\u20D2':'nvge','\\u2266':'lE','\\u2266\\u0338':'nlE','\\u2267':'gE','\\u2267\\u0338':'ngE','\\u2268\\uFE00':'lvnE','\\u2268':'lnE','\\u2269':'gnE','\\u2269\\uFE00':'gvnE','\\u226A':'ll','\\u226A\\u0338':'nLtv','\\u226A\\u20D2':'nLt','\\u226B':'gg','\\u226B\\u0338':'nGtv','\\u226B\\u20D2':'nGt','\\u226C':'twixt','\\u2272':'lsim','\\u2274':'nlsim','\\u2273':'gsim','\\u2275':'ngsim','\\u2276':'lg','\\u2278':'ntlg','\\u2277':'gl','\\u2279':'ntgl','\\u227A':'pr','\\u2280':'npr','\\u227B':'sc','\\u2281':'nsc','\\u227C':'prcue','\\u22E0':'nprcue','\\u227D':'sccue','\\u22E1':'nsccue','\\u227E':'prsim','\\u227F':'scsim','\\u227F\\u0338':'NotSucceedsTilde','\\u2282':'sub','\\u2284':'nsub','\\u2282\\u20D2':'vnsub','\\u2283':'sup','\\u2285':'nsup','\\u2283\\u20D2':'vnsup','\\u2286':'sube','\\u2288':'nsube','\\u2287':'supe','\\u2289':'nsupe','\\u228A\\uFE00':'vsubne','\\u228A':'subne','\\u228B\\uFE00':'vsupne','\\u228B':'supne','\\u228D':'cupdot','\\u228E':'uplus','\\u228F':'sqsub','\\u228F\\u0338':'NotSquareSubset','\\u2290':'sqsup','\\u2290\\u0338':'NotSquareSuperset','\\u2291':'sqsube','\\u22E2':'nsqsube','\\u2292':'sqsupe','\\u22E3':'nsqsupe','\\u2293':'sqcap','\\u2293\\uFE00':'sqcaps','\\u2294':'sqcup','\\u2294\\uFE00':'sqcups','\\u2295':'oplus','\\u2296':'ominus','\\u2297':'otimes','\\u2298':'osol','\\u2299':'odot','\\u229A':'ocir','\\u229B':'oast','\\u229D':'odash','\\u229E':'plusb','\\u229F':'minusb','\\u22A0':'timesb','\\u22A1':'sdotb','\\u22A2':'vdash','\\u22AC':'nvdash','\\u22A3':'dashv','\\u22A4':'top','\\u22A5':'bot','\\u22A7':'models','\\u22A8':'vDash','\\u22AD':'nvDash','\\u22A9':'Vdash','\\u22AE':'nVdash','\\u22AA':'Vvdash','\\u22AB':'VDash','\\u22AF':'nVDash','\\u22B0':'prurel','\\u22B2':'vltri','\\u22EA':'nltri','\\u22B3':'vrtri','\\u22EB':'nrtri','\\u22B4':'ltrie','\\u22EC':'nltrie','\\u22B4\\u20D2':'nvltrie','\\u22B5':'rtrie','\\u22ED':'nrtrie','\\u22B5\\u20D2':'nvrtrie','\\u22B6':'origof','\\u22B7':'imof','\\u22B8':'mumap','\\u22B9':'hercon','\\u22BA':'intcal','\\u22BB':'veebar','\\u22BD':'barvee','\\u22BE':'angrtvb','\\u22BF':'lrtri','\\u22C0':'Wedge','\\u22C1':'Vee','\\u22C2':'xcap','\\u22C3':'xcup','\\u22C4':'diam','\\u22C5':'sdot','\\u22C6':'Star','\\u22C7':'divonx','\\u22C8':'bowtie','\\u22C9':'ltimes','\\u22CA':'rtimes','\\u22CB':'lthree','\\u22CC':'rthree','\\u22CD':'bsime','\\u22CE':'cuvee','\\u22CF':'cuwed','\\u22D0':'Sub','\\u22D1':'Sup','\\u22D2':'Cap','\\u22D3':'Cup','\\u22D4':'fork','\\u22D5':'epar','\\u22D6':'ltdot','\\u22D7':'gtdot','\\u22D8':'Ll','\\u22D8\\u0338':'nLl','\\u22D9':'Gg','\\u22D9\\u0338':'nGg','\\u22DA\\uFE00':'lesg','\\u22DA':'leg','\\u22DB':'gel','\\u22DB\\uFE00':'gesl','\\u22DE':'cuepr','\\u22DF':'cuesc','\\u22E6':'lnsim','\\u22E7':'gnsim','\\u22E8':'prnsim','\\u22E9':'scnsim','\\u22EE':'vellip','\\u22EF':'ctdot','\\u22F0':'utdot','\\u22F1':'dtdot','\\u22F2':'disin','\\u22F3':'isinsv','\\u22F4':'isins','\\u22F5':'isindot','\\u22F5\\u0338':'notindot','\\u22F6':'notinvc','\\u22F7':'notinvb','\\u22F9':'isinE','\\u22F9\\u0338':'notinE','\\u22FA':'nisd','\\u22FB':'xnis','\\u22FC':'nis','\\u22FD':'notnivc','\\u22FE':'notnivb','\\u2305':'barwed','\\u2306':'Barwed','\\u230C':'drcrop','\\u230D':'dlcrop','\\u230E':'urcrop','\\u230F':'ulcrop','\\u2310':'bnot','\\u2312':'profline','\\u2313':'profsurf','\\u2315':'telrec','\\u2316':'target','\\u231C':'ulcorn','\\u231D':'urcorn','\\u231E':'dlcorn','\\u231F':'drcorn','\\u2322':'frown','\\u2323':'smile','\\u232D':'cylcty','\\u232E':'profalar','\\u2336':'topbot','\\u233D':'ovbar','\\u233F':'solbar','\\u237C':'angzarr','\\u23B0':'lmoust','\\u23B1':'rmoust','\\u23B4':'tbrk','\\u23B5':'bbrk','\\u23B6':'bbrktbrk','\\u23DC':'OverParenthesis','\\u23DD':'UnderParenthesis','\\u23DE':'OverBrace','\\u23DF':'UnderBrace','\\u23E2':'trpezium','\\u23E7':'elinters','\\u2423':'blank','\\u2500':'boxh','\\u2502':'boxv','\\u250C':'boxdr','\\u2510':'boxdl','\\u2514':'boxur','\\u2518':'boxul','\\u251C':'boxvr','\\u2524':'boxvl','\\u252C':'boxhd','\\u2534':'boxhu','\\u253C':'boxvh','\\u2550':'boxH','\\u2551':'boxV','\\u2552':'boxdR','\\u2553':'boxDr','\\u2554':'boxDR','\\u2555':'boxdL','\\u2556':'boxDl','\\u2557':'boxDL','\\u2558':'boxuR','\\u2559':'boxUr','\\u255A':'boxUR','\\u255B':'boxuL','\\u255C':'boxUl','\\u255D':'boxUL','\\u255E':'boxvR','\\u255F':'boxVr','\\u2560':'boxVR','\\u2561':'boxvL','\\u2562':'boxVl','\\u2563':'boxVL','\\u2564':'boxHd','\\u2565':'boxhD','\\u2566':'boxHD','\\u2567':'boxHu','\\u2568':'boxhU','\\u2569':'boxHU','\\u256A':'boxvH','\\u256B':'boxVh','\\u256C':'boxVH','\\u2580':'uhblk','\\u2584':'lhblk','\\u2588':'block','\\u2591':'blk14','\\u2592':'blk12','\\u2593':'blk34','\\u25A1':'squ','\\u25AA':'squf','\\u25AB':'EmptyVerySmallSquare','\\u25AD':'rect','\\u25AE':'marker','\\u25B1':'fltns','\\u25B3':'xutri','\\u25B4':'utrif','\\u25B5':'utri','\\u25B8':'rtrif','\\u25B9':'rtri','\\u25BD':'xdtri','\\u25BE':'dtrif','\\u25BF':'dtri','\\u25C2':'ltrif','\\u25C3':'ltri','\\u25CA':'loz','\\u25CB':'cir','\\u25EC':'tridot','\\u25EF':'xcirc','\\u25F8':'ultri','\\u25F9':'urtri','\\u25FA':'lltri','\\u25FB':'EmptySmallSquare','\\u25FC':'FilledSmallSquare','\\u2605':'starf','\\u2606':'star','\\u260E':'phone','\\u2640':'female','\\u2642':'male','\\u2660':'spades','\\u2663':'clubs','\\u2665':'hearts','\\u2666':'diams','\\u266A':'sung','\\u2713':'check','\\u2717':'cross','\\u2720':'malt','\\u2736':'sext','\\u2758':'VerticalSeparator','\\u27C8':'bsolhsub','\\u27C9':'suphsol','\\u27F5':'xlarr','\\u27F6':'xrarr','\\u27F7':'xharr','\\u27F8':'xlArr','\\u27F9':'xrArr','\\u27FA':'xhArr','\\u27FC':'xmap','\\u27FF':'dzigrarr','\\u2902':'nvlArr','\\u2903':'nvrArr','\\u2904':'nvHarr','\\u2905':'Map','\\u290C':'lbarr','\\u290D':'rbarr','\\u290E':'lBarr','\\u290F':'rBarr','\\u2910':'RBarr','\\u2911':'DDotrahd','\\u2912':'UpArrowBar','\\u2913':'DownArrowBar','\\u2916':'Rarrtl','\\u2919':'latail','\\u291A':'ratail','\\u291B':'lAtail','\\u291C':'rAtail','\\u291D':'larrfs','\\u291E':'rarrfs','\\u291F':'larrbfs','\\u2920':'rarrbfs','\\u2923':'nwarhk','\\u2924':'nearhk','\\u2925':'searhk','\\u2926':'swarhk','\\u2927':'nwnear','\\u2928':'toea','\\u2929':'tosa','\\u292A':'swnwar','\\u2933':'rarrc','\\u2933\\u0338':'nrarrc','\\u2935':'cudarrr','\\u2936':'ldca','\\u2937':'rdca','\\u2938':'cudarrl','\\u2939':'larrpl','\\u293C':'curarrm','\\u293D':'cularrp','\\u2945':'rarrpl','\\u2948':'harrcir','\\u2949':'Uarrocir','\\u294A':'lurdshar','\\u294B':'ldrushar','\\u294E':'LeftRightVector','\\u294F':'RightUpDownVector','\\u2950':'DownLeftRightVector','\\u2951':'LeftUpDownVector','\\u2952':'LeftVectorBar','\\u2953':'RightVectorBar','\\u2954':'RightUpVectorBar','\\u2955':'RightDownVectorBar','\\u2956':'DownLeftVectorBar','\\u2957':'DownRightVectorBar','\\u2958':'LeftUpVectorBar','\\u2959':'LeftDownVectorBar','\\u295A':'LeftTeeVector','\\u295B':'RightTeeVector','\\u295C':'RightUpTeeVector','\\u295D':'RightDownTeeVector','\\u295E':'DownLeftTeeVector','\\u295F':'DownRightTeeVector','\\u2960':'LeftUpTeeVector','\\u2961':'LeftDownTeeVector','\\u2962':'lHar','\\u2963':'uHar','\\u2964':'rHar','\\u2965':'dHar','\\u2966':'luruhar','\\u2967':'ldrdhar','\\u2968':'ruluhar','\\u2969':'rdldhar','\\u296A':'lharul','\\u296B':'llhard','\\u296C':'rharul','\\u296D':'lrhard','\\u296E':'udhar','\\u296F':'duhar','\\u2970':'RoundImplies','\\u2971':'erarr','\\u2972':'simrarr','\\u2973':'larrsim','\\u2974':'rarrsim','\\u2975':'rarrap','\\u2976':'ltlarr','\\u2978':'gtrarr','\\u2979':'subrarr','\\u297B':'suplarr','\\u297C':'lfisht','\\u297D':'rfisht','\\u297E':'ufisht','\\u297F':'dfisht','\\u299A':'vzigzag','\\u299C':'vangrt','\\u299D':'angrtvbd','\\u29A4':'ange','\\u29A5':'range','\\u29A6':'dwangle','\\u29A7':'uwangle','\\u29A8':'angmsdaa','\\u29A9':'angmsdab','\\u29AA':'angmsdac','\\u29AB':'angmsdad','\\u29AC':'angmsdae','\\u29AD':'angmsdaf','\\u29AE':'angmsdag','\\u29AF':'angmsdah','\\u29B0':'bemptyv','\\u29B1':'demptyv','\\u29B2':'cemptyv','\\u29B3':'raemptyv','\\u29B4':'laemptyv','\\u29B5':'ohbar','\\u29B6':'omid','\\u29B7':'opar','\\u29B9':'operp','\\u29BB':'olcross','\\u29BC':'odsold','\\u29BE':'olcir','\\u29BF':'ofcir','\\u29C0':'olt','\\u29C1':'ogt','\\u29C2':'cirscir','\\u29C3':'cirE','\\u29C4':'solb','\\u29C5':'bsolb','\\u29C9':'boxbox','\\u29CD':'trisb','\\u29CE':'rtriltri','\\u29CF':'LeftTriangleBar','\\u29CF\\u0338':'NotLeftTriangleBar','\\u29D0':'RightTriangleBar','\\u29D0\\u0338':'NotRightTriangleBar','\\u29DC':'iinfin','\\u29DD':'infintie','\\u29DE':'nvinfin','\\u29E3':'eparsl','\\u29E4':'smeparsl','\\u29E5':'eqvparsl','\\u29EB':'lozf','\\u29F4':'RuleDelayed','\\u29F6':'dsol','\\u2A00':'xodot','\\u2A01':'xoplus','\\u2A02':'xotime','\\u2A04':'xuplus','\\u2A06':'xsqcup','\\u2A0D':'fpartint','\\u2A10':'cirfnint','\\u2A11':'awint','\\u2A12':'rppolint','\\u2A13':'scpolint','\\u2A14':'npolint','\\u2A15':'pointint','\\u2A16':'quatint','\\u2A17':'intlarhk','\\u2A22':'pluscir','\\u2A23':'plusacir','\\u2A24':'simplus','\\u2A25':'plusdu','\\u2A26':'plussim','\\u2A27':'plustwo','\\u2A29':'mcomma','\\u2A2A':'minusdu','\\u2A2D':'loplus','\\u2A2E':'roplus','\\u2A2F':'Cross','\\u2A30':'timesd','\\u2A31':'timesbar','\\u2A33':'smashp','\\u2A34':'lotimes','\\u2A35':'rotimes','\\u2A36':'otimesas','\\u2A37':'Otimes','\\u2A38':'odiv','\\u2A39':'triplus','\\u2A3A':'triminus','\\u2A3B':'tritime','\\u2A3C':'iprod','\\u2A3F':'amalg','\\u2A40':'capdot','\\u2A42':'ncup','\\u2A43':'ncap','\\u2A44':'capand','\\u2A45':'cupor','\\u2A46':'cupcap','\\u2A47':'capcup','\\u2A48':'cupbrcap','\\u2A49':'capbrcup','\\u2A4A':'cupcup','\\u2A4B':'capcap','\\u2A4C':'ccups','\\u2A4D':'ccaps','\\u2A50':'ccupssm','\\u2A53':'And','\\u2A54':'Or','\\u2A55':'andand','\\u2A56':'oror','\\u2A57':'orslope','\\u2A58':'andslope','\\u2A5A':'andv','\\u2A5B':'orv','\\u2A5C':'andd','\\u2A5D':'ord','\\u2A5F':'wedbar','\\u2A66':'sdote','\\u2A6A':'simdot','\\u2A6D':'congdot','\\u2A6D\\u0338':'ncongdot','\\u2A6E':'easter','\\u2A6F':'apacir','\\u2A70':'apE','\\u2A70\\u0338':'napE','\\u2A71':'eplus','\\u2A72':'pluse','\\u2A73':'Esim','\\u2A77':'eDDot','\\u2A78':'equivDD','\\u2A79':'ltcir','\\u2A7A':'gtcir','\\u2A7B':'ltquest','\\u2A7C':'gtquest','\\u2A7D':'les','\\u2A7D\\u0338':'nles','\\u2A7E':'ges','\\u2A7E\\u0338':'nges','\\u2A7F':'lesdot','\\u2A80':'gesdot','\\u2A81':'lesdoto','\\u2A82':'gesdoto','\\u2A83':'lesdotor','\\u2A84':'gesdotol','\\u2A85':'lap','\\u2A86':'gap','\\u2A87':'lne','\\u2A88':'gne','\\u2A89':'lnap','\\u2A8A':'gnap','\\u2A8B':'lEg','\\u2A8C':'gEl','\\u2A8D':'lsime','\\u2A8E':'gsime','\\u2A8F':'lsimg','\\u2A90':'gsiml','\\u2A91':'lgE','\\u2A92':'glE','\\u2A93':'lesges','\\u2A94':'gesles','\\u2A95':'els','\\u2A96':'egs','\\u2A97':'elsdot','\\u2A98':'egsdot','\\u2A99':'el','\\u2A9A':'eg','\\u2A9D':'siml','\\u2A9E':'simg','\\u2A9F':'simlE','\\u2AA0':'simgE','\\u2AA1':'LessLess','\\u2AA1\\u0338':'NotNestedLessLess','\\u2AA2':'GreaterGreater','\\u2AA2\\u0338':'NotNestedGreaterGreater','\\u2AA4':'glj','\\u2AA5':'gla','\\u2AA6':'ltcc','\\u2AA7':'gtcc','\\u2AA8':'lescc','\\u2AA9':'gescc','\\u2AAA':'smt','\\u2AAB':'lat','\\u2AAC':'smte','\\u2AAC\\uFE00':'smtes','\\u2AAD':'late','\\u2AAD\\uFE00':'lates','\\u2AAE':'bumpE','\\u2AAF':'pre','\\u2AAF\\u0338':'npre','\\u2AB0':'sce','\\u2AB0\\u0338':'nsce','\\u2AB3':'prE','\\u2AB4':'scE','\\u2AB5':'prnE','\\u2AB6':'scnE','\\u2AB7':'prap','\\u2AB8':'scap','\\u2AB9':'prnap','\\u2ABA':'scnap','\\u2ABB':'Pr','\\u2ABC':'Sc','\\u2ABD':'subdot','\\u2ABE':'supdot','\\u2ABF':'subplus','\\u2AC0':'supplus','\\u2AC1':'submult','\\u2AC2':'supmult','\\u2AC3':'subedot','\\u2AC4':'supedot','\\u2AC5':'subE','\\u2AC5\\u0338':'nsubE','\\u2AC6':'supE','\\u2AC6\\u0338':'nsupE','\\u2AC7':'subsim','\\u2AC8':'supsim','\\u2ACB\\uFE00':'vsubnE','\\u2ACB':'subnE','\\u2ACC\\uFE00':'vsupnE','\\u2ACC':'supnE','\\u2ACF':'csub','\\u2AD0':'csup','\\u2AD1':'csube','\\u2AD2':'csupe','\\u2AD3':'subsup','\\u2AD4':'supsub','\\u2AD5':'subsub','\\u2AD6':'supsup','\\u2AD7':'suphsub','\\u2AD8':'supdsub','\\u2AD9':'forkv','\\u2ADA':'topfork','\\u2ADB':'mlcp','\\u2AE4':'Dashv','\\u2AE6':'Vdashl','\\u2AE7':'Barv','\\u2AE8':'vBar','\\u2AE9':'vBarv','\\u2AEB':'Vbar','\\u2AEC':'Not','\\u2AED':'bNot','\\u2AEE':'rnmid','\\u2AEF':'cirmid','\\u2AF0':'midcir','\\u2AF1':'topcir','\\u2AF2':'nhpar','\\u2AF3':'parsim','\\u2AFD':'parsl','\\u2AFD\\u20E5':'nparsl','\\u266D':'flat','\\u266E':'natur','\\u266F':'sharp','\\xA4':'curren','\\xA2':'cent','$':'dollar','\\xA3':'pound','\\xA5':'yen','\\u20AC':'euro','\\xB9':'sup1','\\xBD':'half','\\u2153':'frac13','\\xBC':'frac14','\\u2155':'frac15','\\u2159':'frac16','\\u215B':'frac18','\\xB2':'sup2','\\u2154':'frac23','\\u2156':'frac25','\\xB3':'sup3','\\xBE':'frac34','\\u2157':'frac35','\\u215C':'frac38','\\u2158':'frac45','\\u215A':'frac56','\\u215D':'frac58','\\u215E':'frac78','\\uD835\\uDCB6':'ascr','\\uD835\\uDD52':'aopf','\\uD835\\uDD1E':'afr','\\uD835\\uDD38':'Aopf','\\uD835\\uDD04':'Afr','\\uD835\\uDC9C':'Ascr','\\xAA':'ordf','\\xE1':'aacute','\\xC1':'Aacute','\\xE0':'agrave','\\xC0':'Agrave','\\u0103':'abreve','\\u0102':'Abreve','\\xE2':'acirc','\\xC2':'Acirc','\\xE5':'aring','\\xC5':'angst','\\xE4':'auml','\\xC4':'Auml','\\xE3':'atilde','\\xC3':'Atilde','\\u0105':'aogon','\\u0104':'Aogon','\\u0101':'amacr','\\u0100':'Amacr','\\xE6':'aelig','\\xC6':'AElig','\\uD835\\uDCB7':'bscr','\\uD835\\uDD53':'bopf','\\uD835\\uDD1F':'bfr','\\uD835\\uDD39':'Bopf','\\u212C':'Bscr','\\uD835\\uDD05':'Bfr','\\uD835\\uDD20':'cfr','\\uD835\\uDCB8':'cscr','\\uD835\\uDD54':'copf','\\u212D':'Cfr','\\uD835\\uDC9E':'Cscr','\\u2102':'Copf','\\u0107':'cacute','\\u0106':'Cacute','\\u0109':'ccirc','\\u0108':'Ccirc','\\u010D':'ccaron','\\u010C':'Ccaron','\\u010B':'cdot','\\u010A':'Cdot','\\xE7':'ccedil','\\xC7':'Ccedil','\\u2105':'incare','\\uD835\\uDD21':'dfr','\\u2146':'dd','\\uD835\\uDD55':'dopf','\\uD835\\uDCB9':'dscr','\\uD835\\uDC9F':'Dscr','\\uD835\\uDD07':'Dfr','\\u2145':'DD','\\uD835\\uDD3B':'Dopf','\\u010F':'dcaron','\\u010E':'Dcaron','\\u0111':'dstrok','\\u0110':'Dstrok','\\xF0':'eth','\\xD0':'ETH','\\u2147':'ee','\\u212F':'escr','\\uD835\\uDD22':'efr','\\uD835\\uDD56':'eopf','\\u2130':'Escr','\\uD835\\uDD08':'Efr','\\uD835\\uDD3C':'Eopf','\\xE9':'eacute','\\xC9':'Eacute','\\xE8':'egrave','\\xC8':'Egrave','\\xEA':'ecirc','\\xCA':'Ecirc','\\u011B':'ecaron','\\u011A':'Ecaron','\\xEB':'euml','\\xCB':'Euml','\\u0117':'edot','\\u0116':'Edot','\\u0119':'eogon','\\u0118':'Eogon','\\u0113':'emacr','\\u0112':'Emacr','\\uD835\\uDD23':'ffr','\\uD835\\uDD57':'fopf','\\uD835\\uDCBB':'fscr','\\uD835\\uDD09':'Ffr','\\uD835\\uDD3D':'Fopf','\\u2131':'Fscr','\\uFB00':'fflig','\\uFB03':'ffilig','\\uFB04':'ffllig','\\uFB01':'filig','fj':'fjlig','\\uFB02':'fllig','\\u0192':'fnof','\\u210A':'gscr','\\uD835\\uDD58':'gopf','\\uD835\\uDD24':'gfr','\\uD835\\uDCA2':'Gscr','\\uD835\\uDD3E':'Gopf','\\uD835\\uDD0A':'Gfr','\\u01F5':'gacute','\\u011F':'gbreve','\\u011E':'Gbreve','\\u011D':'gcirc','\\u011C':'Gcirc','\\u0121':'gdot','\\u0120':'Gdot','\\u0122':'Gcedil','\\uD835\\uDD25':'hfr','\\u210E':'planckh','\\uD835\\uDCBD':'hscr','\\uD835\\uDD59':'hopf','\\u210B':'Hscr','\\u210C':'Hfr','\\u210D':'Hopf','\\u0125':'hcirc','\\u0124':'Hcirc','\\u210F':'hbar','\\u0127':'hstrok','\\u0126':'Hstrok','\\uD835\\uDD5A':'iopf','\\uD835\\uDD26':'ifr','\\uD835\\uDCBE':'iscr','\\u2148':'ii','\\uD835\\uDD40':'Iopf','\\u2110':'Iscr','\\u2111':'Im','\\xED':'iacute','\\xCD':'Iacute','\\xEC':'igrave','\\xCC':'Igrave','\\xEE':'icirc','\\xCE':'Icirc','\\xEF':'iuml','\\xCF':'Iuml','\\u0129':'itilde','\\u0128':'Itilde','\\u0130':'Idot','\\u012F':'iogon','\\u012E':'Iogon','\\u012B':'imacr','\\u012A':'Imacr','\\u0133':'ijlig','\\u0132':'IJlig','\\u0131':'imath','\\uD835\\uDCBF':'jscr','\\uD835\\uDD5B':'jopf','\\uD835\\uDD27':'jfr','\\uD835\\uDCA5':'Jscr','\\uD835\\uDD0D':'Jfr','\\uD835\\uDD41':'Jopf','\\u0135':'jcirc','\\u0134':'Jcirc','\\u0237':'jmath','\\uD835\\uDD5C':'kopf','\\uD835\\uDCC0':'kscr','\\uD835\\uDD28':'kfr','\\uD835\\uDCA6':'Kscr','\\uD835\\uDD42':'Kopf','\\uD835\\uDD0E':'Kfr','\\u0137':'kcedil','\\u0136':'Kcedil','\\uD835\\uDD29':'lfr','\\uD835\\uDCC1':'lscr','\\u2113':'ell','\\uD835\\uDD5D':'lopf','\\u2112':'Lscr','\\uD835\\uDD0F':'Lfr','\\uD835\\uDD43':'Lopf','\\u013A':'lacute','\\u0139':'Lacute','\\u013E':'lcaron','\\u013D':'Lcaron','\\u013C':'lcedil','\\u013B':'Lcedil','\\u0142':'lstrok','\\u0141':'Lstrok','\\u0140':'lmidot','\\u013F':'Lmidot','\\uD835\\uDD2A':'mfr','\\uD835\\uDD5E':'mopf','\\uD835\\uDCC2':'mscr','\\uD835\\uDD10':'Mfr','\\uD835\\uDD44':'Mopf','\\u2133':'Mscr','\\uD835\\uDD2B':'nfr','\\uD835\\uDD5F':'nopf','\\uD835\\uDCC3':'nscr','\\u2115':'Nopf','\\uD835\\uDCA9':'Nscr','\\uD835\\uDD11':'Nfr','\\u0144':'nacute','\\u0143':'Nacute','\\u0148':'ncaron','\\u0147':'Ncaron','\\xF1':'ntilde','\\xD1':'Ntilde','\\u0146':'ncedil','\\u0145':'Ncedil','\\u2116':'numero','\\u014B':'eng','\\u014A':'ENG','\\uD835\\uDD60':'oopf','\\uD835\\uDD2C':'ofr','\\u2134':'oscr','\\uD835\\uDCAA':'Oscr','\\uD835\\uDD12':'Ofr','\\uD835\\uDD46':'Oopf','\\xBA':'ordm','\\xF3':'oacute','\\xD3':'Oacute','\\xF2':'ograve','\\xD2':'Ograve','\\xF4':'ocirc','\\xD4':'Ocirc','\\xF6':'ouml','\\xD6':'Ouml','\\u0151':'odblac','\\u0150':'Odblac','\\xF5':'otilde','\\xD5':'Otilde','\\xF8':'oslash','\\xD8':'Oslash','\\u014D':'omacr','\\u014C':'Omacr','\\u0153':'oelig','\\u0152':'OElig','\\uD835\\uDD2D':'pfr','\\uD835\\uDCC5':'pscr','\\uD835\\uDD61':'popf','\\u2119':'Popf','\\uD835\\uDD13':'Pfr','\\uD835\\uDCAB':'Pscr','\\uD835\\uDD62':'qopf','\\uD835\\uDD2E':'qfr','\\uD835\\uDCC6':'qscr','\\uD835\\uDCAC':'Qscr','\\uD835\\uDD14':'Qfr','\\u211A':'Qopf','\\u0138':'kgreen','\\uD835\\uDD2F':'rfr','\\uD835\\uDD63':'ropf','\\uD835\\uDCC7':'rscr','\\u211B':'Rscr','\\u211C':'Re','\\u211D':'Ropf','\\u0155':'racute','\\u0154':'Racute','\\u0159':'rcaron','\\u0158':'Rcaron','\\u0157':'rcedil','\\u0156':'Rcedil','\\uD835\\uDD64':'sopf','\\uD835\\uDCC8':'sscr','\\uD835\\uDD30':'sfr','\\uD835\\uDD4A':'Sopf','\\uD835\\uDD16':'Sfr','\\uD835\\uDCAE':'Sscr','\\u24C8':'oS','\\u015B':'sacute','\\u015A':'Sacute','\\u015D':'scirc','\\u015C':'Scirc','\\u0161':'scaron','\\u0160':'Scaron','\\u015F':'scedil','\\u015E':'Scedil','\\xDF':'szlig','\\uD835\\uDD31':'tfr','\\uD835\\uDCC9':'tscr','\\uD835\\uDD65':'topf','\\uD835\\uDCAF':'Tscr','\\uD835\\uDD17':'Tfr','\\uD835\\uDD4B':'Topf','\\u0165':'tcaron','\\u0164':'Tcaron','\\u0163':'tcedil','\\u0162':'Tcedil','\\u2122':'trade','\\u0167':'tstrok','\\u0166':'Tstrok','\\uD835\\uDCCA':'uscr','\\uD835\\uDD66':'uopf','\\uD835\\uDD32':'ufr','\\uD835\\uDD4C':'Uopf','\\uD835\\uDD18':'Ufr','\\uD835\\uDCB0':'Uscr','\\xFA':'uacute','\\xDA':'Uacute','\\xF9':'ugrave','\\xD9':'Ugrave','\\u016D':'ubreve','\\u016C':'Ubreve','\\xFB':'ucirc','\\xDB':'Ucirc','\\u016F':'uring','\\u016E':'Uring','\\xFC':'uuml','\\xDC':'Uuml','\\u0171':'udblac','\\u0170':'Udblac','\\u0169':'utilde','\\u0168':'Utilde','\\u0173':'uogon','\\u0172':'Uogon','\\u016B':'umacr','\\u016A':'Umacr','\\uD835\\uDD33':'vfr','\\uD835\\uDD67':'vopf','\\uD835\\uDCCB':'vscr','\\uD835\\uDD19':'Vfr','\\uD835\\uDD4D':'Vopf','\\uD835\\uDCB1':'Vscr','\\uD835\\uDD68':'wopf','\\uD835\\uDCCC':'wscr','\\uD835\\uDD34':'wfr','\\uD835\\uDCB2':'Wscr','\\uD835\\uDD4E':'Wopf','\\uD835\\uDD1A':'Wfr','\\u0175':'wcirc','\\u0174':'Wcirc','\\uD835\\uDD35':'xfr','\\uD835\\uDCCD':'xscr','\\uD835\\uDD69':'xopf','\\uD835\\uDD4F':'Xopf','\\uD835\\uDD1B':'Xfr','\\uD835\\uDCB3':'Xscr','\\uD835\\uDD36':'yfr','\\uD835\\uDCCE':'yscr','\\uD835\\uDD6A':'yopf','\\uD835\\uDCB4':'Yscr','\\uD835\\uDD1C':'Yfr','\\uD835\\uDD50':'Yopf','\\xFD':'yacute','\\xDD':'Yacute','\\u0177':'ycirc','\\u0176':'Ycirc','\\xFF':'yuml','\\u0178':'Yuml','\\uD835\\uDCCF':'zscr','\\uD835\\uDD37':'zfr','\\uD835\\uDD6B':'zopf','\\u2128':'Zfr','\\u2124':'Zopf','\\uD835\\uDCB5':'Zscr','\\u017A':'zacute','\\u0179':'Zacute','\\u017E':'zcaron','\\u017D':'Zcaron','\\u017C':'zdot','\\u017B':'Zdot','\\u01B5':'imped','\\xFE':'thorn','\\xDE':'THORN','\\u0149':'napos','\\u03B1':'alpha','\\u0391':'Alpha','\\u03B2':'beta','\\u0392':'Beta','\\u03B3':'gamma','\\u0393':'Gamma','\\u03B4':'delta','\\u0394':'Delta','\\u03B5':'epsi','\\u03F5':'epsiv','\\u0395':'Epsilon','\\u03DD':'gammad','\\u03DC':'Gammad','\\u03B6':'zeta','\\u0396':'Zeta','\\u03B7':'eta','\\u0397':'Eta','\\u03B8':'theta','\\u03D1':'thetav','\\u0398':'Theta','\\u03B9':'iota','\\u0399':'Iota','\\u03BA':'kappa','\\u03F0':'kappav','\\u039A':'Kappa','\\u03BB':'lambda','\\u039B':'Lambda','\\u03BC':'mu','\\xB5':'micro','\\u039C':'Mu','\\u03BD':'nu','\\u039D':'Nu','\\u03BE':'xi','\\u039E':'Xi','\\u03BF':'omicron','\\u039F':'Omicron','\\u03C0':'pi','\\u03D6':'piv','\\u03A0':'Pi','\\u03C1':'rho','\\u03F1':'rhov','\\u03A1':'Rho','\\u03C3':'sigma','\\u03A3':'Sigma','\\u03C2':'sigmaf','\\u03C4':'tau','\\u03A4':'Tau','\\u03C5':'upsi','\\u03A5':'Upsilon','\\u03D2':'Upsi','\\u03C6':'phi','\\u03D5':'phiv','\\u03A6':'Phi','\\u03C7':'chi','\\u03A7':'Chi','\\u03C8':'psi','\\u03A8':'Psi','\\u03C9':'omega','\\u03A9':'ohm','\\u0430':'acy','\\u0410':'Acy','\\u0431':'bcy','\\u0411':'Bcy','\\u0432':'vcy','\\u0412':'Vcy','\\u0433':'gcy','\\u0413':'Gcy','\\u0453':'gjcy','\\u0403':'GJcy','\\u0434':'dcy','\\u0414':'Dcy','\\u0452':'djcy','\\u0402':'DJcy','\\u0435':'iecy','\\u0415':'IEcy','\\u0451':'iocy','\\u0401':'IOcy','\\u0454':'jukcy','\\u0404':'Jukcy','\\u0436':'zhcy','\\u0416':'ZHcy','\\u0437':'zcy','\\u0417':'Zcy','\\u0455':'dscy','\\u0405':'DScy','\\u0438':'icy','\\u0418':'Icy','\\u0456':'iukcy','\\u0406':'Iukcy','\\u0457':'yicy','\\u0407':'YIcy','\\u0439':'jcy','\\u0419':'Jcy','\\u0458':'jsercy','\\u0408':'Jsercy','\\u043A':'kcy','\\u041A':'Kcy','\\u045C':'kjcy','\\u040C':'KJcy','\\u043B':'lcy','\\u041B':'Lcy','\\u0459':'ljcy','\\u0409':'LJcy','\\u043C':'mcy','\\u041C':'Mcy','\\u043D':'ncy','\\u041D':'Ncy','\\u045A':'njcy','\\u040A':'NJcy','\\u043E':'ocy','\\u041E':'Ocy','\\u043F':'pcy','\\u041F':'Pcy','\\u0440':'rcy','\\u0420':'Rcy','\\u0441':'scy','\\u0421':'Scy','\\u0442':'tcy','\\u0422':'Tcy','\\u045B':'tshcy','\\u040B':'TSHcy','\\u0443':'ucy','\\u0423':'Ucy','\\u045E':'ubrcy','\\u040E':'Ubrcy','\\u0444':'fcy','\\u0424':'Fcy','\\u0445':'khcy','\\u0425':'KHcy','\\u0446':'tscy','\\u0426':'TScy','\\u0447':'chcy','\\u0427':'CHcy','\\u045F':'dzcy','\\u040F':'DZcy','\\u0448':'shcy','\\u0428':'SHcy','\\u0449':'shchcy','\\u0429':'SHCHcy','\\u044A':'hardcy','\\u042A':'HARDcy','\\u044B':'ycy','\\u042B':'Ycy','\\u044C':'softcy','\\u042C':'SOFTcy','\\u044D':'ecy','\\u042D':'Ecy','\\u044E':'yucy','\\u042E':'YUcy','\\u044F':'yacy','\\u042F':'YAcy','\\u2135':'aleph','\\u2136':'beth','\\u2137':'gimel','\\u2138':'daleth'};\n\n\tvar regexEscape = /[\"&'<>`]/g;\n\tvar escapeMap = {\n\t\t'\"': '&quot;',\n\t\t'&': '&amp;',\n\t\t'\\'': '&#x27;',\n\t\t'<': '&lt;',\n\t\t// See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the\n\t\t// following is not strictly necessary unless it’s part of a tag or an\n\t\t// unquoted attribute value. We’re only escaping it to support those\n\t\t// situations, and for XML support.\n\t\t'>': '&gt;',\n\t\t// In Internet Explorer ≤ 8, the backtick character can be used\n\t\t// to break out of (un)quoted attribute values or HTML comments.\n\t\t// See http://html5sec.org/#102, http://html5sec.org/#108, and\n\t\t// http://html5sec.org/#133.\n\t\t'`': '&#x60;'\n\t};\n\n\tvar regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;\n\tvar regexInvalidRawCodePoint = /[\\0-\\x08\\x0B\\x0E-\\x1F\\x7F-\\x9F\\uFDD0-\\uFDEF\\uFFFE\\uFFFF]|[\\uD83F\\uD87F\\uD8BF\\uD8FF\\uD93F\\uD97F\\uD9BF\\uD9FF\\uDA3F\\uDA7F\\uDABF\\uDAFF\\uDB3F\\uDB7F\\uDBBF\\uDBFF][\\uDFFE\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n\tvar regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa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acute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;\n\tvar decodeMap = {'aacute':'\\xE1','Aacute':'\\xC1','abreve':'\\u0103','Abreve':'\\u0102','ac':'\\u223E','acd':'\\u223F','acE':'\\u223E\\u0333','acirc':'\\xE2','Acirc':'\\xC2','acute':'\\xB4','acy':'\\u0430','Acy':'\\u0410','aelig':'\\xE6','AElig':'\\xC6','af':'\\u2061','afr':'\\uD835\\uDD1E','Afr':'\\uD835\\uDD04','agrave':'\\xE0','Agrave':'\\xC0','alefsym':'\\u2135','aleph':'\\u2135','alpha':'\\u03B1','Alpha':'\\u0391','amacr':'\\u0101','Amacr':'\\u0100','amalg':'\\u2A3F','amp':'&','AMP':'&','and':'\\u2227','And':'\\u2A53','andand':'\\u2A55','andd':'\\u2A5C','andslope':'\\u2A58','andv':'\\u2A5A','ang':'\\u2220','ange':'\\u29A4','angle':'\\u2220','angmsd':'\\u2221','angmsdaa':'\\u29A8','angmsdab':'\\u29A9','angmsdac':'\\u29AA','angmsdad':'\\u29AB','angmsdae':'\\u29AC','angmsdaf':'\\u29AD','angmsdag':'\\u29AE','angmsdah':'\\u29AF','angrt':'\\u221F','angrtvb':'\\u22BE','angrtvbd':'\\u299D','angsph':'\\u2222','angst':'\\xC5','angzarr':'\\u237C','aogon':'\\u0105','Aogon':'\\u0104','aopf':'\\uD835\\uDD52','Aopf':'\\uD835\\uDD38','ap':'\\u2248','apacir':'\\u2A6F','ape':'\\u224A','apE':'\\u2A70','apid':'\\u224B','apos':'\\'','ApplyFunction':'\\u2061','approx':'\\u2248','approxeq':'\\u224A','aring':'\\xE5','Aring':'\\xC5','ascr':'\\uD835\\uDCB6','Ascr':'\\uD835\\uDC9C','Assign':'\\u2254','ast':'*','asymp':'\\u2248','asympeq':'\\u224D','atilde':'\\xE3','Atilde':'\\xC3','auml':'\\xE4','Auml':'\\xC4','awconint':'\\u2233','awint':'\\u2A11','backcong':'\\u224C','backepsilon':'\\u03F6','backprime':'\\u2035','backsim':'\\u223D','backsimeq':'\\u22CD','Backslash':'\\u2216','Barv':'\\u2AE7','barvee':'\\u22BD','barwed':'\\u2305','Barwed':'\\u2306','barwedge':'\\u2305','bbrk':'\\u23B5','bbrktbrk':'\\u23B6','bcong':'\\u224C','bcy':'\\u0431','Bcy':'\\u0411','bdquo':'\\u201E','becaus':'\\u2235','because':'\\u2235','Because':'\\u2235','bemptyv':'\\u29B0','bepsi':'\\u03F6','bernou':'\\u212C','Bernoullis':'\\u212C','beta':'\\u03B2','Beta':'\\u0392','beth':'\\u2136','between':'\\u226C','bfr':'\\uD835\\uDD1F','Bfr':'\\uD835\\uDD05','bigcap':'\\u22C2','bigcirc':'\\u25EF','bigcup':'\\u22C3','bigodot':'\\u2A00','bigoplus':'\\u2A01','bigotimes':'\\u2A02','bigsqcup':'\\u2A06','bigstar':'\\u2605','bigtriangledown':'\\u25BD','bigtriangleup':'\\u25B3','biguplus':'\\u2A04','bigvee':'\\u22C1','bigwedge':'\\u22C0','bkarow':'\\u290D','blacklozenge':'\\u29EB','blacksquare':'\\u25AA','blacktriangle':'\\u25B4','blacktriangledown':'\\u25BE','blacktriangleleft':'\\u25C2','blacktriangleright':'\\u25B8','blank':'\\u2423','blk12':'\\u2592','blk14':'\\u2591','blk34':'\\u2593','block':'\\u2588','bne':'=\\u20E5','bnequiv':'\\u2261\\u20E5','bnot':'\\u2310','bNot':'\\u2AED','bopf':'\\uD835\\uDD53','Bopf':'\\uD835\\uDD39','bot':'\\u22A5','bottom':'\\u22A5','bowtie':'\\u22C8','boxbox':'\\u29C9','boxdl':'\\u2510','boxdL':'\\u2555','boxDl':'\\u2556','boxDL':'\\u2557','boxdr':'\\u250C','boxdR':'\\u2552','boxDr':'\\u2553','boxDR':'\\u2554','boxh':'\\u2500','boxH':'\\u2550','boxhd':'\\u252C','boxhD':'\\u2565','boxHd':'\\u2564','boxHD':'\\u2566','boxhu':'\\u2534','boxhU':'\\u2568','boxHu':'\\u2567','boxHU':'\\u2569','boxminus':'\\u229F','boxplus':'\\u229E','boxtimes':'\\u22A0','boxul':'\\u2518','boxuL':'\\u255B','boxUl':'\\u255C','boxUL':'\\u255D','boxur':'\\u2514','boxuR':'\\u2558','boxUr':'\\u2559','boxUR':'\\u255A','boxv':'\\u2502','boxV':'\\u2551','boxvh':'\\u253C','boxvH':'\\u256A','boxVh':'\\u256B','boxVH':'\\u256C','boxvl':'\\u2524','boxvL':'\\u2561','boxVl':'\\u2562','boxVL':'\\u2563','boxvr':'\\u251C','boxvR':'\\u255E','boxVr':'\\u255F','boxVR':'\\u2560','bprime':'\\u2035','breve':'\\u02D8','Breve':'\\u02D8','brvbar':'\\xA6','bscr':'\\uD835\\uDCB7','Bscr':'\\u212C','bsemi':'\\u204F','bsim':'\\u223D','bsime':'\\u22CD','bsol':'\\\\','bsolb':'\\u29C5','bsolhsub':'\\u27C8','bull':'\\u2022','bullet':'\\u2022','bump':'\\u224E','bumpe':'\\u224F','bumpE':'\\u2AAE','bumpeq':'\\u224F','Bumpeq':'\\u224E','cacute':'\\u0107','Cacute':'\\u0106','cap':'\\u2229','Cap':'\\u22D2','capand':'\\u2A44','capbrcup':'\\u2A49','capcap':'\\u2A4B','capcup':'\\u2A47','capdot':'\\u2A40','CapitalDifferentialD':'\\u2145','caps':'\\u2229\\uFE00','caret':'\\u2041','caron':'\\u02C7','Cayleys':'\\u212D','ccaps':'\\u2A4D','ccaron':'\\u010D','Ccaron':'\\u010C','ccedil':'\\xE7','Ccedil':'\\xC7','ccirc':'\\u0109','Ccirc':'\\u0108','Cconint':'\\u2230','ccups':'\\u2A4C','ccupssm':'\\u2A50','cdot':'\\u010B','Cdot':'\\u010A','cedil':'\\xB8','Cedilla':'\\xB8','cemptyv':'\\u29B2','cent':'\\xA2','centerdot':'\\xB7','CenterDot':'\\xB7','cfr':'\\uD835\\uDD20','Cfr':'\\u212D','chcy':'\\u0447','CHcy':'\\u0427','check':'\\u2713','checkmark':'\\u2713','chi':'\\u03C7','Chi':'\\u03A7','cir':'\\u25CB','circ':'\\u02C6','circeq':'\\u2257','circlearrowleft':'\\u21BA','circlearrowright':'\\u21BB','circledast':'\\u229B','circledcirc':'\\u229A','circleddash':'\\u229D','CircleDot':'\\u2299','circledR':'\\xAE','circledS':'\\u24C8','CircleMinus':'\\u2296','CirclePlus':'\\u2295','CircleTimes':'\\u2297','cire':'\\u2257','cirE':'\\u29C3','cirfnint':'\\u2A10','cirmid':'\\u2AEF','cirscir':'\\u29C2','ClockwiseContourIntegral':'\\u2232','CloseCurlyDoubleQuote':'\\u201D','CloseCurlyQuote':'\\u2019','clubs':'\\u2663','clubsuit':'\\u2663','colon':':','Colon':'\\u2237','colone':'\\u2254','Colone':'\\u2A74','coloneq':'\\u2254','comma':',','commat':'@','comp':'\\u2201','compfn':'\\u2218','complement':'\\u2201','complexes':'\\u2102','cong':'\\u2245','congdot':'\\u2A6D','Congruent':'\\u2261','conint':'\\u222E','Conint':'\\u222F','ContourIntegral':'\\u222E','copf':'\\uD835\\uDD54','Copf':'\\u2102','coprod':'\\u2210','Coproduct':'\\u2210','copy':'\\xA9','COPY':'\\xA9','copysr':'\\u2117','CounterClockwiseContourIntegral':'\\u2233','crarr':'\\u21B5','cross':'\\u2717','Cross':'\\u2A2F','cscr':'\\uD835\\uDCB8','Cscr':'\\uD835\\uDC9E','csub':'\\u2ACF','csube':'\\u2AD1','csup':'\\u2AD0','csupe':'\\u2AD2','ctdot':'\\u22EF','cudarrl':'\\u2938','cudarrr':'\\u2935','cuepr':'\\u22DE','cuesc':'\\u22DF','cularr':'\\u21B6','cularrp':'\\u293D','cup':'\\u222A','Cup':'\\u22D3','cupbrcap':'\\u2A48','cupcap':'\\u2A46','CupCap':'\\u224D','cupcup':'\\u2A4A','cupdot':'\\u228D','cupor':'\\u2A45','cups':'\\u222A\\uFE00','curarr':'\\u21B7','curarrm':'\\u293C','curlyeqprec':'\\u22DE','curlyeqsucc':'\\u22DF','curlyvee':'\\u22CE','curlywedge':'\\u22CF','curren':'\\xA4','curvearrowleft':'\\u21B6','curvearrowright':'\\u21B7','cuvee':'\\u22CE','cuwed':'\\u22CF','cwconint':'\\u2232','cwint':'\\u2231','cylcty':'\\u232D','dagger':'\\u2020','Dagger':'\\u2021','daleth':'\\u2138','darr':'\\u2193','dArr':'\\u21D3','Darr':'\\u21A1','dash':'\\u2010','dashv':'\\u22A3','Dashv':'\\u2AE4','dbkarow':'\\u290F','dblac':'\\u02DD','dcaron':'\\u010F','Dcaron':'\\u010E','dcy':'\\u0434','Dcy':'\\u0414','dd':'\\u2146','DD':'\\u2145','ddagger':'\\u2021','ddarr':'\\u21CA','DDotrahd':'\\u2911','ddotseq':'\\u2A77','deg':'\\xB0','Del':'\\u2207','delta':'\\u03B4','Delta':'\\u0394','demptyv':'\\u29B1','dfisht':'\\u297F','dfr':'\\uD835\\uDD21','Dfr':'\\uD835\\uDD07','dHar':'\\u2965','dharl':'\\u21C3','dharr':'\\u21C2','DiacriticalAcute':'\\xB4','DiacriticalDot':'\\u02D9','DiacriticalDoubleAcute':'\\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\\u02DC','diam':'\\u22C4','diamond':'\\u22C4','Diamond':'\\u22C4','diamondsuit':'\\u2666','diams':'\\u2666','die':'\\xA8','DifferentialD':'\\u2146','digamma':'\\u03DD','disin':'\\u22F2','div':'\\xF7','divide':'\\xF7','divideontimes':'\\u22C7','divonx':'\\u22C7','djcy':'\\u0452','DJcy':'\\u0402','dlcorn':'\\u231E','dlcrop':'\\u230D','dollar':'$','dopf':'\\uD835\\uDD55','Dopf':'\\uD835\\uDD3B','dot':'\\u02D9','Dot':'\\xA8','DotDot':'\\u20DC','doteq':'\\u2250','doteqdot':'\\u2251','DotEqual':'\\u2250','dotminus':'\\u2238','dotplus':'\\u2214','dotsquare':'\\u22A1','doublebarwedge':'\\u2306','DoubleContourIntegral':'\\u222F','DoubleDot':'\\xA8','DoubleDownArrow':'\\u21D3','DoubleLeftArrow':'\\u21D0','DoubleLeftRightArrow':'\\u21D4','DoubleLeftTee':'\\u2AE4','DoubleLongLeftArrow':'\\u27F8','DoubleLongLeftRightArrow':'\\u27FA','DoubleLongRightArrow':'\\u27F9','DoubleRightArrow':'\\u21D2','DoubleRightTee':'\\u22A8','DoubleUpArrow':'\\u21D1','DoubleUpDownArrow':'\\u21D5','DoubleVerticalBar':'\\u2225','downarrow':'\\u2193','Downarrow':'\\u21D3','DownArrow':'\\u2193','DownArrowBar':'\\u2913','DownArrowUpArrow':'\\u21F5','DownBreve':'\\u0311','downdownarrows':'\\u21CA','downharpoonleft':'\\u21C3','downharpoonright':'\\u21C2','DownLeftRightVector':'\\u2950','DownLeftTeeVector':'\\u295E','DownLeftVector':'\\u21BD','DownLeftVectorBar':'\\u2956','DownRightTeeVector':'\\u295F','DownRightVector':'\\u21C1','DownRightVectorBar':'\\u2957','DownTee':'\\u22A4','DownTeeArrow':'\\u21A7','drbkarow':'\\u2910','drcorn':'\\u231F','drcrop':'\\u230C','dscr':'\\uD835\\uDCB9','Dscr':'\\uD835\\uDC9F','dscy':'\\u0455','DScy':'\\u0405','dsol':'\\u29F6','dstrok':'\\u0111','Dstrok':'\\u0110','dtdot':'\\u22F1','dtri':'\\u25BF','dtrif':'\\u25BE','duarr':'\\u21F5','duhar':'\\u296F','dwangle':'\\u29A6','dzcy':'\\u045F','DZcy':'\\u040F','dzigrarr':'\\u27FF','eacute':'\\xE9','Eacute':'\\xC9','easter':'\\u2A6E','ecaron':'\\u011B','Ecaron':'\\u011A','ecir':'\\u2256','ecirc':'\\xEA','Ecirc':'\\xCA','ecolon':'\\u2255','ecy':'\\u044D','Ecy':'\\u042D','eDDot':'\\u2A77','edot':'\\u0117','eDot':'\\u2251','Edot':'\\u0116','ee':'\\u2147','efDot':'\\u2252','efr':'\\uD835\\uDD22','Efr':'\\uD835\\uDD08','eg':'\\u2A9A','egrave':'\\xE8','Egrave':'\\xC8','egs':'\\u2A96','egsdot':'\\u2A98','el':'\\u2A99','Element':'\\u2208','elinters':'\\u23E7','ell':'\\u2113','els':'\\u2A95','elsdot':'\\u2A97','emacr':'\\u0113','Emacr':'\\u0112','empty':'\\u2205','emptyset':'\\u2205','EmptySmallSquare':'\\u25FB','emptyv':'\\u2205','EmptyVerySmallSquare':'\\u25AB','emsp':'\\u2003','emsp13':'\\u2004','emsp14':'\\u2005','eng':'\\u014B','ENG':'\\u014A','ensp':'\\u2002','eogon':'\\u0119','Eogon':'\\u0118','eopf':'\\uD835\\uDD56','Eopf':'\\uD835\\uDD3C','epar':'\\u22D5','eparsl':'\\u29E3','eplus':'\\u2A71','epsi':'\\u03B5','epsilon':'\\u03B5','Epsilon':'\\u0395','epsiv':'\\u03F5','eqcirc':'\\u2256','eqcolon':'\\u2255','eqsim':'\\u2242','eqslantgtr':'\\u2A96','eqslantless':'\\u2A95','Equal':'\\u2A75','equals':'=','EqualTilde':'\\u2242','equest':'\\u225F','Equilibrium':'\\u21CC','equiv':'\\u2261','equivDD':'\\u2A78','eqvparsl':'\\u29E5','erarr':'\\u2971','erDot':'\\u2253','escr':'\\u212F','Escr':'\\u2130','esdot':'\\u2250','esim':'\\u2242','Esim':'\\u2A73','eta':'\\u03B7','Eta':'\\u0397','eth':'\\xF0','ETH':'\\xD0','euml':'\\xEB','Euml':'\\xCB','euro':'\\u20AC','excl':'!','exist':'\\u2203','Exists':'\\u2203','expectation':'\\u2130','exponentiale':'\\u2147','ExponentialE':'\\u2147','fallingdotseq':'\\u2252','fcy':'\\u0444','Fcy':'\\u0424','female':'\\u2640','ffilig':'\\uFB03','fflig':'\\uFB00','ffllig':'\\uFB04','ffr':'\\uD835\\uDD23','Ffr':'\\uD835\\uDD09','filig':'\\uFB01','FilledSmallSquare':'\\u25FC','FilledVerySmallSquare':'\\u25AA','fjlig':'fj','flat':'\\u266D','fllig':'\\uFB02','fltns':'\\u25B1','fnof':'\\u0192','fopf':'\\uD835\\uDD57','Fopf':'\\uD835\\uDD3D','forall':'\\u2200','ForAll':'\\u2200','fork':'\\u22D4','forkv':'\\u2AD9','Fouriertrf':'\\u2131','fpartint':'\\u2A0D','frac12':'\\xBD','frac13':'\\u2153','frac14':'\\xBC','frac15':'\\u2155','frac16':'\\u2159','frac18':'\\u215B','frac23':'\\u2154','frac25':'\\u2156','frac34':'\\xBE','frac35':'\\u2157','frac38':'\\u215C','frac45':'\\u2158','frac56':'\\u215A','frac58':'\\u215D','frac78':'\\u215E','frasl':'\\u2044','frown':'\\u2322','fscr':'\\uD835\\uDCBB','Fscr':'\\u2131','gacute':'\\u01F5','gamma':'\\u03B3','Gamma':'\\u0393','gammad':'\\u03DD','Gammad':'\\u03DC','gap':'\\u2A86','gbreve':'\\u011F','Gbreve':'\\u011E','Gcedil':'\\u0122','gcirc':'\\u011D','Gcirc':'\\u011C','gcy':'\\u0433','Gcy':'\\u0413','gdot':'\\u0121','Gdot':'\\u0120','ge':'\\u2265','gE':'\\u2267','gel':'\\u22DB','gEl':'\\u2A8C','geq':'\\u2265','geqq':'\\u2267','geqslant':'\\u2A7E','ges':'\\u2A7E','gescc':'\\u2AA9','gesdot':'\\u2A80','gesdoto':'\\u2A82','gesdotol':'\\u2A84','gesl':'\\u22DB\\uFE00','gesles':'\\u2A94','gfr':'\\uD835\\uDD24','Gfr':'\\uD835\\uDD0A','gg':'\\u226B','Gg':'\\u22D9','ggg':'\\u22D9','gimel':'\\u2137','gjcy':'\\u0453','GJcy':'\\u0403','gl':'\\u2277','gla':'\\u2AA5','glE':'\\u2A92','glj':'\\u2AA4','gnap':'\\u2A8A','gnapprox':'\\u2A8A','gne':'\\u2A88','gnE':'\\u2269','gneq':'\\u2A88','gneqq':'\\u2269','gnsim':'\\u22E7','gopf':'\\uD835\\uDD58','Gopf':'\\uD835\\uDD3E','grave':'`','GreaterEqual':'\\u2265','GreaterEqualLess':'\\u22DB','GreaterFullEqual':'\\u2267','GreaterGreater':'\\u2AA2','GreaterLess':'\\u2277','GreaterSlantEqual':'\\u2A7E','GreaterTilde':'\\u2273','gscr':'\\u210A','Gscr':'\\uD835\\uDCA2','gsim':'\\u2273','gsime':'\\u2A8E','gsiml':'\\u2A90','gt':'>','Gt':'\\u226B','GT':'>','gtcc':'\\u2AA7','gtcir':'\\u2A7A','gtdot':'\\u22D7','gtlPar':'\\u2995','gtquest':'\\u2A7C','gtrapprox':'\\u2A86','gtrarr':'\\u2978','gtrdot':'\\u22D7','gtreqless':'\\u22DB','gtreqqless':'\\u2A8C','gtrless':'\\u2277','gtrsim':'\\u2273','gvertneqq':'\\u2269\\uFE00','gvnE':'\\u2269\\uFE00','Hacek':'\\u02C7','hairsp':'\\u200A','half':'\\xBD','hamilt':'\\u210B','hardcy':'\\u044A','HARDcy':'\\u042A','harr':'\\u2194','hArr':'\\u21D4','harrcir':'\\u2948','harrw':'\\u21AD','Hat':'^','hbar':'\\u210F','hcirc':'\\u0125','Hcirc':'\\u0124','hearts':'\\u2665','heartsuit':'\\u2665','hellip':'\\u2026','hercon':'\\u22B9','hfr':'\\uD835\\uDD25','Hfr':'\\u210C','HilbertSpace':'\\u210B','hksearow':'\\u2925','hkswarow':'\\u2926','hoarr':'\\u21FF','homtht':'\\u223B','hookleftarrow':'\\u21A9','hookrightarrow':'\\u21AA','hopf':'\\uD835\\uDD59','Hopf':'\\u210D','horbar':'\\u2015','HorizontalLine':'\\u2500','hscr':'\\uD835\\uDCBD','Hscr':'\\u210B','hslash':'\\u210F','hstrok':'\\u0127','Hstrok':'\\u0126','HumpDownHump':'\\u224E','HumpEqual':'\\u224F','hybull':'\\u2043','hyphen':'\\u2010','iacute':'\\xED','Iacute':'\\xCD','ic':'\\u2063','icirc':'\\xEE','Icirc':'\\xCE','icy':'\\u0438','Icy':'\\u0418','Idot':'\\u0130','iecy':'\\u0435','IEcy':'\\u0415','iexcl':'\\xA1','iff':'\\u21D4','ifr':'\\uD835\\uDD26','Ifr':'\\u2111','igrave':'\\xEC','Igrave':'\\xCC','ii':'\\u2148','iiiint':'\\u2A0C','iiint':'\\u222D','iinfin':'\\u29DC','iiota':'\\u2129','ijlig':'\\u0133','IJlig':'\\u0132','Im':'\\u2111','imacr':'\\u012B','Imacr':'\\u012A','image':'\\u2111','ImaginaryI':'\\u2148','imagline':'\\u2110','imagpart':'\\u2111','imath':'\\u0131','imof':'\\u22B7','imped':'\\u01B5','Implies':'\\u21D2','in':'\\u2208','incare':'\\u2105','infin':'\\u221E','infintie':'\\u29DD','inodot':'\\u0131','int':'\\u222B','Int':'\\u222C','intcal':'\\u22BA','integers':'\\u2124','Integral':'\\u222B','intercal':'\\u22BA','Intersection':'\\u22C2','intlarhk':'\\u2A17','intprod':'\\u2A3C','InvisibleComma':'\\u2063','InvisibleTimes':'\\u2062','iocy':'\\u0451','IOcy':'\\u0401','iogon':'\\u012F','Iogon':'\\u012E','iopf':'\\uD835\\uDD5A','Iopf':'\\uD835\\uDD40','iota':'\\u03B9','Iota':'\\u0399','iprod':'\\u2A3C','iquest':'\\xBF','iscr':'\\uD835\\uDCBE','Iscr':'\\u2110','isin':'\\u2208','isindot':'\\u22F5','isinE':'\\u22F9','isins':'\\u22F4','isinsv':'\\u22F3','isinv':'\\u2208','it':'\\u2062','itilde':'\\u0129','Itilde':'\\u0128','iukcy':'\\u0456','Iukcy':'\\u0406','iuml':'\\xEF','Iuml':'\\xCF','jcirc':'\\u0135','Jcirc':'\\u0134','jcy':'\\u0439','Jcy':'\\u0419','jfr':'\\uD835\\uDD27','Jfr':'\\uD835\\uDD0D','jmath':'\\u0237','jopf':'\\uD835\\uDD5B','Jopf':'\\uD835\\uDD41','jscr':'\\uD835\\uDCBF','Jscr':'\\uD835\\uDCA5','jsercy':'\\u0458','Jsercy':'\\u0408','jukcy':'\\u0454','Jukcy':'\\u0404','kappa':'\\u03BA','Kappa':'\\u039A','kappav':'\\u03F0','kcedil':'\\u0137','Kcedil':'\\u0136','kcy':'\\u043A','Kcy':'\\u041A','kfr':'\\uD835\\uDD28','Kfr':'\\uD835\\uDD0E','kgreen':'\\u0138','khcy':'\\u0445','KHcy':'\\u0425','kjcy':'\\u045C','KJcy':'\\u040C','kopf':'\\uD835\\uDD5C','Kopf':'\\uD835\\uDD42','kscr':'\\uD835\\uDCC0','Kscr':'\\uD835\\uDCA6','lAarr':'\\u21DA','lacute':'\\u013A','Lacute':'\\u0139','laemptyv':'\\u29B4','lagran':'\\u2112','lambda':'\\u03BB','Lambda':'\\u039B','lang':'\\u27E8','Lang':'\\u27EA','langd':'\\u2991','langle':'\\u27E8','lap':'\\u2A85','Laplacetrf':'\\u2112','laquo':'\\xAB','larr':'\\u2190','lArr':'\\u21D0','Larr':'\\u219E','larrb':'\\u21E4','larrbfs':'\\u291F','larrfs':'\\u291D','larrhk':'\\u21A9','larrlp':'\\u21AB','larrpl':'\\u2939','larrsim':'\\u2973','larrtl':'\\u21A2','lat':'\\u2AAB','latail':'\\u2919','lAtail':'\\u291B','late':'\\u2AAD','lates':'\\u2AAD\\uFE00','lbarr':'\\u290C','lBarr':'\\u290E','lbbrk':'\\u2772','lbrace':'{','lbrack':'[','lbrke':'\\u298B','lbrksld':'\\u298F','lbrkslu':'\\u298D','lcaron':'\\u013E','Lcaron':'\\u013D','lcedil':'\\u013C','Lcedil':'\\u013B','lceil':'\\u2308','lcub':'{','lcy':'\\u043B','Lcy':'\\u041B','ldca':'\\u2936','ldquo':'\\u201C','ldquor':'\\u201E','ldrdhar':'\\u2967','ldrushar':'\\u294B','ldsh':'\\u21B2','le':'\\u2264','lE':'\\u2266','LeftAngleBracket':'\\u27E8','leftarrow':'\\u2190','Leftarrow':'\\u21D0','LeftArrow':'\\u2190','LeftArrowBar':'\\u21E4','LeftArrowRightArrow':'\\u21C6','leftarrowtail':'\\u21A2','LeftCeiling':'\\u2308','LeftDoubleBracket':'\\u27E6','LeftDownTeeVector':'\\u2961','LeftDownVector':'\\u21C3','LeftDownVectorBar':'\\u2959','LeftFloor':'\\u230A','leftharpoondown':'\\u21BD','leftharpoonup':'\\u21BC','leftleftarrows':'\\u21C7','leftrightarrow':'\\u2194','Leftrightarrow':'\\u21D4','LeftRightArrow':'\\u2194','leftrightarrows':'\\u21C6','leftrightharpoons':'\\u21CB','leftrightsquigarrow':'\\u21AD','LeftRightVector':'\\u294E','LeftTee':'\\u22A3','LeftTeeArrow':'\\u21A4','LeftTeeVector':'\\u295A','leftthreetimes':'\\u22CB','LeftTriangle':'\\u22B2','LeftTriangleBar':'\\u29CF','LeftTriangleEqual':'\\u22B4','LeftUpDownVector':'\\u2951','LeftUpTeeVector':'\\u2960','LeftUpVector':'\\u21BF','LeftUpVectorBar':'\\u2958','LeftVector':'\\u21BC','LeftVectorBar':'\\u2952','leg':'\\u22DA','lEg':'\\u2A8B','leq':'\\u2264','leqq':'\\u2266','leqslant':'\\u2A7D','les':'\\u2A7D','lescc':'\\u2AA8','lesdot':'\\u2A7F','lesdoto':'\\u2A81','lesdotor':'\\u2A83','lesg':'\\u22DA\\uFE00','lesges':'\\u2A93','lessapprox':'\\u2A85','lessdot':'\\u22D6','lesseqgtr':'\\u22DA','lesseqqgtr':'\\u2A8B','LessEqualGreater':'\\u22DA','LessFullEqual':'\\u2266','LessGreater':'\\u2276','lessgtr':'\\u2276','LessLess':'\\u2AA1','lesssim':'\\u2272','LessSlantEqual':'\\u2A7D','LessTilde':'\\u2272','lfisht':'\\u297C','lfloor':'\\u230A','lfr':'\\uD835\\uDD29','Lfr':'\\uD835\\uDD0F','lg':'\\u2276','lgE':'\\u2A91','lHar':'\\u2962','lhard':'\\u21BD','lharu':'\\u21BC','lharul':'\\u296A','lhblk':'\\u2584','ljcy':'\\u0459','LJcy':'\\u0409','ll':'\\u226A','Ll':'\\u22D8','llarr':'\\u21C7','llcorner':'\\u231E','Lleftarrow':'\\u21DA','llhard':'\\u296B','lltri':'\\u25FA','lmidot':'\\u0140','Lmidot':'\\u013F','lmoust':'\\u23B0','lmoustache':'\\u23B0','lnap':'\\u2A89','lnapprox':'\\u2A89','lne':'\\u2A87','lnE':'\\u2268','lneq':'\\u2A87','lneqq':'\\u2268','lnsim':'\\u22E6','loang':'\\u27EC','loarr':'\\u21FD','lobrk':'\\u27E6','longleftarrow':'\\u27F5','Longleftarrow':'\\u27F8','LongLeftArrow':'\\u27F5','longleftrightarrow':'\\u27F7','Longleftrightarrow':'\\u27FA','LongLeftRightArrow':'\\u27F7','longmapsto':'\\u27FC','longrightarrow':'\\u27F6','Longrightarrow':'\\u27F9','LongRightArrow':'\\u27F6','looparrowleft':'\\u21AB','looparrowright':'\\u21AC','lopar':'\\u2985','lopf':'\\uD835\\uDD5D','Lopf':'\\uD835\\uDD43','loplus':'\\u2A2D','lotimes':'\\u2A34','lowast':'\\u2217','lowbar':'_','LowerLeftArrow':'\\u2199','LowerRightArrow':'\\u2198','loz':'\\u25CA','lozenge':'\\u25CA','lozf':'\\u29EB','lpar':'(','lparlt':'\\u2993','lrarr':'\\u21C6','lrcorner':'\\u231F','lrhar':'\\u21CB','lrhard':'\\u296D','lrm':'\\u200E','lrtri':'\\u22BF','lsaquo':'\\u2039','lscr':'\\uD835\\uDCC1','Lscr':'\\u2112','lsh':'\\u21B0','Lsh':'\\u21B0','lsim':'\\u2272','lsime':'\\u2A8D','lsimg':'\\u2A8F','lsqb':'[','lsquo':'\\u2018','lsquor':'\\u201A','lstrok':'\\u0142','Lstrok':'\\u0141','lt':'<','Lt':'\\u226A','LT':'<','ltcc':'\\u2AA6','ltcir':'\\u2A79','ltdot':'\\u22D6','lthree':'\\u22CB','ltimes':'\\u22C9','ltlarr':'\\u2976','ltquest':'\\u2A7B','ltri':'\\u25C3','ltrie':'\\u22B4','ltrif':'\\u25C2','ltrPar':'\\u2996','lurdshar':'\\u294A','luruhar':'\\u2966','lvertneqq':'\\u2268\\uFE00','lvnE':'\\u2268\\uFE00','macr':'\\xAF','male':'\\u2642','malt':'\\u2720','maltese':'\\u2720','map':'\\u21A6','Map':'\\u2905','mapsto':'\\u21A6','mapstodown':'\\u21A7','mapstoleft':'\\u21A4','mapstoup':'\\u21A5','marker':'\\u25AE','mcomma':'\\u2A29','mcy':'\\u043C','Mcy':'\\u041C','mdash':'\\u2014','mDDot':'\\u223A','measuredangle':'\\u2221','MediumSpace':'\\u205F','Mellintrf':'\\u2133','mfr':'\\uD835\\uDD2A','Mfr':'\\uD835\\uDD10','mho':'\\u2127','micro':'\\xB5','mid':'\\u2223','midast':'*','midcir':'\\u2AF0','middot':'\\xB7','minus':'\\u2212','minusb':'\\u229F','minusd':'\\u2238','minusdu':'\\u2A2A','MinusPlus':'\\u2213','mlcp':'\\u2ADB','mldr':'\\u2026','mnplus':'\\u2213','models':'\\u22A7','mopf':'\\uD835\\uDD5E','Mopf':'\\uD835\\uDD44','mp':'\\u2213','mscr':'\\uD835\\uDCC2','Mscr':'\\u2133','mstpos':'\\u223E','mu':'\\u03BC','Mu':'\\u039C','multimap':'\\u22B8','mumap':'\\u22B8','nabla':'\\u2207','nacute':'\\u0144','Nacute':'\\u0143','nang':'\\u2220\\u20D2','nap':'\\u2249','napE':'\\u2A70\\u0338','napid':'\\u224B\\u0338','napos':'\\u0149','napprox':'\\u2249','natur':'\\u266E','natural':'\\u266E','naturals':'\\u2115','nbsp':'\\xA0','nbump':'\\u224E\\u0338','nbumpe':'\\u224F\\u0338','ncap':'\\u2A43','ncaron':'\\u0148','Ncaron':'\\u0147','ncedil':'\\u0146','Ncedil':'\\u0145','ncong':'\\u2247','ncongdot':'\\u2A6D\\u0338','ncup':'\\u2A42','ncy':'\\u043D','Ncy':'\\u041D','ndash':'\\u2013','ne':'\\u2260','nearhk':'\\u2924','nearr':'\\u2197','neArr':'\\u21D7','nearrow':'\\u2197','nedot':'\\u2250\\u0338','NegativeMediumSpace':'\\u200B','NegativeThickSpace':'\\u200B','NegativeThinSpace':'\\u200B','NegativeVeryThinSpace':'\\u200B','nequiv':'\\u2262','nesear':'\\u2928','nesim':'\\u2242\\u0338','NestedGreaterGreater':'\\u226B','NestedLessLess':'\\u226A','NewLine':'\\n','nexist':'\\u2204','nexists':'\\u2204','nfr':'\\uD835\\uDD2B','Nfr':'\\uD835\\uDD11','nge':'\\u2271','ngE':'\\u2267\\u0338','ngeq':'\\u2271','ngeqq':'\\u2267\\u0338','ngeqslant':'\\u2A7E\\u0338','nges':'\\u2A7E\\u0338','nGg':'\\u22D9\\u0338','ngsim':'\\u2275','ngt':'\\u226F','nGt':'\\u226B\\u20D2','ngtr':'\\u226F','nGtv':'\\u226B\\u0338','nharr':'\\u21AE','nhArr':'\\u21CE','nhpar':'\\u2AF2','ni':'\\u220B','nis':'\\u22FC','nisd':'\\u22FA','niv':'\\u220B','njcy':'\\u045A','NJcy':'\\u040A','nlarr':'\\u219A','nlArr':'\\u21CD','nldr':'\\u2025','nle':'\\u2270','nlE':'\\u2266\\u0338','nleftarrow':'\\u219A','nLeftarrow':'\\u21CD','nleftrightarrow':'\\u21AE','nLeftrightarrow':'\\u21CE','nleq':'\\u2270','nleqq':'\\u2266\\u0338','nleqslant':'\\u2A7D\\u0338','nles':'\\u2A7D\\u0338','nless':'\\u226E','nLl':'\\u22D8\\u0338','nlsim':'\\u2274','nlt':'\\u226E','nLt':'\\u226A\\u20D2','nltri':'\\u22EA','nltrie':'\\u22EC','nLtv':'\\u226A\\u0338','nmid':'\\u2224','NoBreak':'\\u2060','NonBreakingSpace':'\\xA0','nopf':'\\uD835\\uDD5F','Nopf':'\\u2115','not':'\\xAC','Not':'\\u2AEC','NotCongruent':'\\u2262','NotCupCap':'\\u226D','NotDoubleVerticalBar':'\\u2226','NotElement':'\\u2209','NotEqual':'\\u2260','NotEqualTilde':'\\u2242\\u0338','NotExists':'\\u2204','NotGreater':'\\u226F','NotGreaterEqual':'\\u2271','NotGreaterFullEqual':'\\u2267\\u0338','NotGreaterGreater':'\\u226B\\u0338','NotGreaterLess':'\\u2279','NotGreaterSlantEqual':'\\u2A7E\\u0338','NotGreaterTilde':'\\u2275','NotHumpDownHump':'\\u224E\\u0338','NotHumpEqual':'\\u224F\\u0338','notin':'\\u2209','notindot':'\\u22F5\\u0338','notinE':'\\u22F9\\u0338','notinva':'\\u2209','notinvb':'\\u22F7','notinvc':'\\u22F6','NotLeftTriangle':'\\u22EA','NotLeftTriangleBar':'\\u29CF\\u0338','NotLeftTriangleEqual':'\\u22EC','NotLess':'\\u226E','NotLessEqual':'\\u2270','NotLessGreater':'\\u2278','NotLessLess':'\\u226A\\u0338','NotLessSlantEqual':'\\u2A7D\\u0338','NotLessTilde':'\\u2274','NotNestedGreaterGreater':'\\u2AA2\\u0338','NotNestedLessLess':'\\u2AA1\\u0338','notni':'\\u220C','notniva':'\\u220C','notnivb':'\\u22FE','notnivc':'\\u22FD','NotPrecedes':'\\u2280','NotPrecedesEqual':'\\u2AAF\\u0338','NotPrecedesSlantEqual':'\\u22E0','NotReverseElement':'\\u220C','NotRightTriangle':'\\u22EB','NotRightTriangleBar':'\\u29D0\\u0338','NotRightTriangleEqual':'\\u22ED','NotSquareSubset':'\\u228F\\u0338','NotSquareSubsetEqual':'\\u22E2','NotSquareSuperset':'\\u2290\\u0338','NotSquareSupersetEqual':'\\u22E3','NotSubset':'\\u2282\\u20D2','NotSubsetEqual':'\\u2288','NotSucceeds':'\\u2281','NotSucceedsEqual':'\\u2AB0\\u0338','NotSucceedsSlantEqual':'\\u22E1','NotSucceedsTilde':'\\u227F\\u0338','NotSuperset':'\\u2283\\u20D2','NotSupersetEqual':'\\u2289','NotTilde':'\\u2241','NotTildeEqual':'\\u2244','NotTildeFullEqual':'\\u2247','NotTildeTilde':'\\u2249','NotVerticalBar':'\\u2224','npar':'\\u2226','nparallel':'\\u2226','nparsl':'\\u2AFD\\u20E5','npart':'\\u2202\\u0338','npolint':'\\u2A14','npr':'\\u2280','nprcue':'\\u22E0','npre':'\\u2AAF\\u0338','nprec':'\\u2280','npreceq':'\\u2AAF\\u0338','nrarr':'\\u219B','nrArr':'\\u21CF','nrarrc':'\\u2933\\u0338','nrarrw':'\\u219D\\u0338','nrightarrow':'\\u219B','nRightarrow':'\\u21CF','nrtri':'\\u22EB','nrtrie':'\\u22ED','nsc':'\\u2281','nsccue':'\\u22E1','nsce':'\\u2AB0\\u0338','nscr':'\\uD835\\uDCC3','Nscr':'\\uD835\\uDCA9','nshortmid':'\\u2224','nshortparallel':'\\u2226','nsim':'\\u2241','nsime':'\\u2244','nsimeq':'\\u2244','nsmid':'\\u2224','nspar':'\\u2226','nsqsube':'\\u22E2','nsqsupe':'\\u22E3','nsub':'\\u2284','nsube':'\\u2288','nsubE':'\\u2AC5\\u0338','nsubset':'\\u2282\\u20D2','nsubseteq':'\\u2288','nsubseteqq':'\\u2AC5\\u0338','nsucc':'\\u2281','nsucceq':'\\u2AB0\\u0338','nsup':'\\u2285','nsupe':'\\u2289','nsupE':'\\u2AC6\\u0338','nsupset':'\\u2283\\u20D2','nsupseteq':'\\u2289','nsupseteqq':'\\u2AC6\\u0338','ntgl':'\\u2279','ntilde':'\\xF1','Ntilde':'\\xD1','ntlg':'\\u2278','ntriangleleft':'\\u22EA','ntrianglelefteq':'\\u22EC','ntriangleright':'\\u22EB','ntrianglerighteq':'\\u22ED','nu':'\\u03BD','Nu':'\\u039D','num':'#','numero':'\\u2116','numsp':'\\u2007','nvap':'\\u224D\\u20D2','nvdash':'\\u22AC','nvDash':'\\u22AD','nVdash':'\\u22AE','nVDash':'\\u22AF','nvge':'\\u2265\\u20D2','nvgt':'>\\u20D2','nvHarr':'\\u2904','nvinfin':'\\u29DE','nvlArr':'\\u2902','nvle':'\\u2264\\u20D2','nvlt':'<\\u20D2','nvltrie':'\\u22B4\\u20D2','nvrArr':'\\u2903','nvrtrie':'\\u22B5\\u20D2','nvsim':'\\u223C\\u20D2','nwarhk':'\\u2923','nwarr':'\\u2196','nwArr':'\\u21D6','nwarrow':'\\u2196','nwnear':'\\u2927','oacute':'\\xF3','Oacute':'\\xD3','oast':'\\u229B','ocir':'\\u229A','ocirc':'\\xF4','Ocirc':'\\xD4','ocy':'\\u043E','Ocy':'\\u041E','odash':'\\u229D','odblac':'\\u0151','Odblac':'\\u0150','odiv':'\\u2A38','odot':'\\u2299','odsold':'\\u29BC','oelig':'\\u0153','OElig':'\\u0152','ofcir':'\\u29BF','ofr':'\\uD835\\uDD2C','Ofr':'\\uD835\\uDD12','ogon':'\\u02DB','ograve':'\\xF2','Ograve':'\\xD2','ogt':'\\u29C1','ohbar':'\\u29B5','ohm':'\\u03A9','oint':'\\u222E','olarr':'\\u21BA','olcir':'\\u29BE','olcross':'\\u29BB','oline':'\\u203E','olt':'\\u29C0','omacr':'\\u014D','Omacr':'\\u014C','omega':'\\u03C9','Omega':'\\u03A9','omicron':'\\u03BF','Omicron':'\\u039F','omid':'\\u29B6','ominus':'\\u2296','oopf':'\\uD835\\uDD60','Oopf':'\\uD835\\uDD46','opar':'\\u29B7','OpenCurlyDoubleQuote':'\\u201C','OpenCurlyQuote':'\\u2018','operp':'\\u29B9','oplus':'\\u2295','or':'\\u2228','Or':'\\u2A54','orarr':'\\u21BB','ord':'\\u2A5D','order':'\\u2134','orderof':'\\u2134','ordf':'\\xAA','ordm':'\\xBA','origof':'\\u22B6','oror':'\\u2A56','orslope':'\\u2A57','orv':'\\u2A5B','oS':'\\u24C8','oscr':'\\u2134','Oscr':'\\uD835\\uDCAA','oslash':'\\xF8','Oslash':'\\xD8','osol':'\\u2298','otilde':'\\xF5','Otilde':'\\xD5','otimes':'\\u2297','Otimes':'\\u2A37','otimesas':'\\u2A36','ouml':'\\xF6','Ouml':'\\xD6','ovbar':'\\u233D','OverBar':'\\u203E','OverBrace':'\\u23DE','OverBracket':'\\u23B4','OverParenthesis':'\\u23DC','par':'\\u2225','para':'\\xB6','parallel':'\\u2225','parsim':'\\u2AF3','parsl':'\\u2AFD','part':'\\u2202','PartialD':'\\u2202','pcy':'\\u043F','Pcy':'\\u041F','percnt':'%','period':'.','permil':'\\u2030','perp':'\\u22A5','pertenk':'\\u2031','pfr':'\\uD835\\uDD2D','Pfr':'\\uD835\\uDD13','phi':'\\u03C6','Phi':'\\u03A6','phiv':'\\u03D5','phmmat':'\\u2133','phone':'\\u260E','pi':'\\u03C0','Pi':'\\u03A0','pitchfork':'\\u22D4','piv':'\\u03D6','planck':'\\u210F','planckh':'\\u210E','plankv':'\\u210F','plus':'+','plusacir':'\\u2A23','plusb':'\\u229E','pluscir':'\\u2A22','plusdo':'\\u2214','plusdu':'\\u2A25','pluse':'\\u2A72','PlusMinus':'\\xB1','plusmn':'\\xB1','plussim':'\\u2A26','plustwo':'\\u2A27','pm':'\\xB1','Poincareplane':'\\u210C','pointint':'\\u2A15','popf':'\\uD835\\uDD61','Popf':'\\u2119','pound':'\\xA3','pr':'\\u227A','Pr':'\\u2ABB','prap':'\\u2AB7','prcue':'\\u227C','pre':'\\u2AAF','prE':'\\u2AB3','prec':'\\u227A','precapprox':'\\u2AB7','preccurlyeq':'\\u227C','Precedes':'\\u227A','PrecedesEqual':'\\u2AAF','PrecedesSlantEqual':'\\u227C','PrecedesTilde':'\\u227E','preceq':'\\u2AAF','precnapprox':'\\u2AB9','precneqq':'\\u2AB5','precnsim':'\\u22E8','precsim':'\\u227E','prime':'\\u2032','Prime':'\\u2033','primes':'\\u2119','prnap':'\\u2AB9','prnE':'\\u2AB5','prnsim':'\\u22E8','prod':'\\u220F','Product':'\\u220F','profalar':'\\u232E','profline':'\\u2312','profsurf':'\\u2313','prop':'\\u221D','Proportion':'\\u2237','Proportional':'\\u221D','propto':'\\u221D','prsim':'\\u227E','prurel':'\\u22B0','pscr':'\\uD835\\uDCC5','Pscr':'\\uD835\\uDCAB','psi':'\\u03C8','Psi':'\\u03A8','puncsp':'\\u2008','qfr':'\\uD835\\uDD2E','Qfr':'\\uD835\\uDD14','qint':'\\u2A0C','qopf':'\\uD835\\uDD62','Qopf':'\\u211A','qprime':'\\u2057','qscr':'\\uD835\\uDCC6','Qscr':'\\uD835\\uDCAC','quaternions':'\\u210D','quatint':'\\u2A16','quest':'?','questeq':'\\u225F','quot':'\"','QUOT':'\"','rAarr':'\\u21DB','race':'\\u223D\\u0331','racute':'\\u0155','Racute':'\\u0154','radic':'\\u221A','raemptyv':'\\u29B3','rang':'\\u27E9','Rang':'\\u27EB','rangd':'\\u2992','range':'\\u29A5','rangle':'\\u27E9','raquo':'\\xBB','rarr':'\\u2192','rArr':'\\u21D2','Rarr':'\\u21A0','rarrap':'\\u2975','rarrb':'\\u21E5','rarrbfs':'\\u2920','rarrc':'\\u2933','rarrfs':'\\u291E','rarrhk':'\\u21AA','rarrlp':'\\u21AC','rarrpl':'\\u2945','rarrsim':'\\u2974','rarrtl':'\\u21A3','Rarrtl':'\\u2916','rarrw':'\\u219D','ratail':'\\u291A','rAtail':'\\u291C','ratio':'\\u2236','rationals':'\\u211A','rbarr':'\\u290D','rBarr':'\\u290F','RBarr':'\\u2910','rbbrk':'\\u2773','rbrace':'}','rbrack':']','rbrke':'\\u298C','rbrksld':'\\u298E','rbrkslu':'\\u2990','rcaron':'\\u0159','Rcaron':'\\u0158','rcedil':'\\u0157','Rcedil':'\\u0156','rceil':'\\u2309','rcub':'}','rcy':'\\u0440','Rcy':'\\u0420','rdca':'\\u2937','rdldhar':'\\u2969','rdquo':'\\u201D','rdquor':'\\u201D','rdsh':'\\u21B3','Re':'\\u211C','real':'\\u211C','realine':'\\u211B','realpart':'\\u211C','reals':'\\u211D','rect':'\\u25AD','reg':'\\xAE','REG':'\\xAE','ReverseElement':'\\u220B','ReverseEquilibrium':'\\u21CB','ReverseUpEquilibrium':'\\u296F','rfisht':'\\u297D','rfloor':'\\u230B','rfr':'\\uD835\\uDD2F','Rfr':'\\u211C','rHar':'\\u2964','rhard':'\\u21C1','rharu':'\\u21C0','rharul':'\\u296C','rho':'\\u03C1','Rho':'\\u03A1','rhov':'\\u03F1','RightAngleBracket':'\\u27E9','rightarrow':'\\u2192','Rightarrow':'\\u21D2','RightArrow':'\\u2192','RightArrowBar':'\\u21E5','RightArrowLeftArrow':'\\u21C4','rightarrowtail':'\\u21A3','RightCeiling':'\\u2309','RightDoubleBracket':'\\u27E7','RightDownTeeVector':'\\u295D','RightDownVector':'\\u21C2','RightDownVectorBar':'\\u2955','RightFloor':'\\u230B','rightharpoondown':'\\u21C1','rightharpoonup':'\\u21C0','rightleftarrows':'\\u21C4','rightleftharpoons':'\\u21CC','rightrightarrows':'\\u21C9','rightsquigarrow':'\\u219D','RightTee':'\\u22A2','RightTeeArrow':'\\u21A6','RightTeeVector':'\\u295B','rightthreetimes':'\\u22CC','RightTriangle':'\\u22B3','RightTriangleBar':'\\u29D0','RightTriangleEqual':'\\u22B5','RightUpDownVector':'\\u294F','RightUpTeeVector':'\\u295C','RightUpVector':'\\u21BE','RightUpVectorBar':'\\u2954','RightVector':'\\u21C0','RightVectorBar':'\\u2953','ring':'\\u02DA','risingdotseq':'\\u2253','rlarr':'\\u21C4','rlhar':'\\u21CC','rlm':'\\u200F','rmoust':'\\u23B1','rmoustache':'\\u23B1','rnmid':'\\u2AEE','roang':'\\u27ED','roarr':'\\u21FE','robrk':'\\u27E7','ropar':'\\u2986','ropf':'\\uD835\\uDD63','Ropf':'\\u211D','roplus':'\\u2A2E','rotimes':'\\u2A35','RoundImplies':'\\u2970','rpar':')','rpargt':'\\u2994','rppolint':'\\u2A12','rrarr':'\\u21C9','Rrightarrow':'\\u21DB','rsaquo':'\\u203A','rscr':'\\uD835\\uDCC7','Rscr':'\\u211B','rsh':'\\u21B1','Rsh':'\\u21B1','rsqb':']','rsquo':'\\u2019','rsquor':'\\u2019','rthree':'\\u22CC','rtimes':'\\u22CA','rtri':'\\u25B9','rtrie':'\\u22B5','rtrif':'\\u25B8','rtriltri':'\\u29CE','RuleDelayed':'\\u29F4','ruluhar':'\\u2968','rx':'\\u211E','sacute':'\\u015B','Sacute':'\\u015A','sbquo':'\\u201A','sc':'\\u227B','Sc':'\\u2ABC','scap':'\\u2AB8','scaron':'\\u0161','Scaron':'\\u0160','sccue':'\\u227D','sce':'\\u2AB0','scE':'\\u2AB4','scedil':'\\u015F','Scedil':'\\u015E','scirc':'\\u015D','Scirc':'\\u015C','scnap':'\\u2ABA','scnE':'\\u2AB6','scnsim':'\\u22E9','scpolint':'\\u2A13','scsim':'\\u227F','scy':'\\u0441','Scy':'\\u0421','sdot':'\\u22C5','sdotb':'\\u22A1','sdote':'\\u2A66','searhk':'\\u2925','searr':'\\u2198','seArr':'\\u21D8','searrow':'\\u2198','sect':'\\xA7','semi':';','seswar':'\\u2929','setminus':'\\u2216','setmn':'\\u2216','sext':'\\u2736','sfr':'\\uD835\\uDD30','Sfr':'\\uD835\\uDD16','sfrown':'\\u2322','sharp':'\\u266F','shchcy':'\\u0449','SHCHcy':'\\u0429','shcy':'\\u0448','SHcy':'\\u0428','ShortDownArrow':'\\u2193','ShortLeftArrow':'\\u2190','shortmid':'\\u2223','shortparallel':'\\u2225','ShortRightArrow':'\\u2192','ShortUpArrow':'\\u2191','shy':'\\xAD','sigma':'\\u03C3','Sigma':'\\u03A3','sigmaf':'\\u03C2','sigmav':'\\u03C2','sim':'\\u223C','simdot':'\\u2A6A','sime':'\\u2243','simeq':'\\u2243','simg':'\\u2A9E','simgE':'\\u2AA0','siml':'\\u2A9D','simlE':'\\u2A9F','simne':'\\u2246','simplus':'\\u2A24','simrarr':'\\u2972','slarr':'\\u2190','SmallCircle':'\\u2218','smallsetminus':'\\u2216','smashp':'\\u2A33','smeparsl':'\\u29E4','smid':'\\u2223','smile':'\\u2323','smt':'\\u2AAA','smte':'\\u2AAC','smtes':'\\u2AAC\\uFE00','softcy':'\\u044C','SOFTcy':'\\u042C','sol':'/','solb':'\\u29C4','solbar':'\\u233F','sopf':'\\uD835\\uDD64','Sopf':'\\uD835\\uDD4A','spades':'\\u2660','spadesuit':'\\u2660','spar':'\\u2225','sqcap':'\\u2293','sqcaps':'\\u2293\\uFE00','sqcup':'\\u2294','sqcups':'\\u2294\\uFE00','Sqrt':'\\u221A','sqsub':'\\u228F','sqsube':'\\u2291','sqsubset':'\\u228F','sqsubseteq':'\\u2291','sqsup':'\\u2290','sqsupe':'\\u2292','sqsupset':'\\u2290','sqsupseteq':'\\u2292','squ':'\\u25A1','square':'\\u25A1','Square':'\\u25A1','SquareIntersection':'\\u2293','SquareSubset':'\\u228F','SquareSubsetEqual':'\\u2291','SquareSuperset':'\\u2290','SquareSupersetEqual':'\\u2292','SquareUnion':'\\u2294','squarf':'\\u25AA','squf':'\\u25AA','srarr':'\\u2192','sscr':'\\uD835\\uDCC8','Sscr':'\\uD835\\uDCAE','ssetmn':'\\u2216','ssmile':'\\u2323','sstarf':'\\u22C6','star':'\\u2606','Star':'\\u22C6','starf':'\\u2605','straightepsilon':'\\u03F5','straightphi':'\\u03D5','strns':'\\xAF','sub':'\\u2282','Sub':'\\u22D0','subdot':'\\u2ABD','sube':'\\u2286','subE':'\\u2AC5','subedot':'\\u2AC3','submult':'\\u2AC1','subne':'\\u228A','subnE':'\\u2ACB','subplus':'\\u2ABF','subrarr':'\\u2979','subset':'\\u2282','Subset':'\\u22D0','subseteq':'\\u2286','subseteqq':'\\u2AC5','SubsetEqual':'\\u2286','subsetneq':'\\u228A','subsetneqq':'\\u2ACB','subsim':'\\u2AC7','subsub':'\\u2AD5','subsup':'\\u2AD3','succ':'\\u227B','succapprox':'\\u2AB8','succcurlyeq':'\\u227D','Succeeds':'\\u227B','SucceedsEqual':'\\u2AB0','SucceedsSlantEqual':'\\u227D','SucceedsTilde':'\\u227F','succeq':'\\u2AB0','succnapprox':'\\u2ABA','succneqq':'\\u2AB6','succnsim':'\\u22E9','succsim':'\\u227F','SuchThat':'\\u220B','sum':'\\u2211','Sum':'\\u2211','sung':'\\u266A','sup':'\\u2283','Sup':'\\u22D1','sup1':'\\xB9','sup2':'\\xB2','sup3':'\\xB3','supdot':'\\u2ABE','supdsub':'\\u2AD8','supe':'\\u2287','supE':'\\u2AC6','supedot':'\\u2AC4','Superset':'\\u2283','SupersetEqual':'\\u2287','suphsol':'\\u27C9','suphsub':'\\u2AD7','suplarr':'\\u297B','supmult':'\\u2AC2','supne':'\\u228B','supnE':'\\u2ACC','supplus':'\\u2AC0','supset':'\\u2283','Supset':'\\u22D1','supseteq':'\\u2287','supseteqq':'\\u2AC6','supsetneq':'\\u228B','supsetneqq':'\\u2ACC','supsim':'\\u2AC8','supsub':'\\u2AD4','supsup':'\\u2AD6','swarhk':'\\u2926','swarr':'\\u2199','swArr':'\\u21D9','swarrow':'\\u2199','swnwar':'\\u292A','szlig':'\\xDF','Tab':'\\t','target':'\\u2316','tau':'\\u03C4','Tau':'\\u03A4','tbrk':'\\u23B4','tcaron':'\\u0165','Tcaron':'\\u0164','tcedil':'\\u0163','Tcedil':'\\u0162','tcy':'\\u0442','Tcy':'\\u0422','tdot':'\\u20DB','telrec':'\\u2315','tfr':'\\uD835\\uDD31','Tfr':'\\uD835\\uDD17','there4':'\\u2234','therefore':'\\u2234','Therefore':'\\u2234','theta':'\\u03B8','Theta':'\\u0398','thetasym':'\\u03D1','thetav':'\\u03D1','thickapprox':'\\u2248','thicksim':'\\u223C','ThickSpace':'\\u205F\\u200A','thinsp':'\\u2009','ThinSpace':'\\u2009','thkap':'\\u2248','thksim':'\\u223C','thorn':'\\xFE','THORN':'\\xDE','tilde':'\\u02DC','Tilde':'\\u223C','TildeEqual':'\\u2243','TildeFullEqual':'\\u2245','TildeTilde':'\\u2248','times':'\\xD7','timesb':'\\u22A0','timesbar':'\\u2A31','timesd':'\\u2A30','tint':'\\u222D','toea':'\\u2928','top':'\\u22A4','topbot':'\\u2336','topcir':'\\u2AF1','topf':'\\uD835\\uDD65','Topf':'\\uD835\\uDD4B','topfork':'\\u2ADA','tosa':'\\u2929','tprime':'\\u2034','trade':'\\u2122','TRADE':'\\u2122','triangle':'\\u25B5','triangledown':'\\u25BF','triangleleft':'\\u25C3','trianglelefteq':'\\u22B4','triangleq':'\\u225C','triangleright':'\\u25B9','trianglerighteq':'\\u22B5','tridot':'\\u25EC','trie':'\\u225C','triminus':'\\u2A3A','TripleDot':'\\u20DB','triplus':'\\u2A39','trisb':'\\u29CD','tritime':'\\u2A3B','trpezium':'\\u23E2','tscr':'\\uD835\\uDCC9','Tscr':'\\uD835\\uDCAF','tscy':'\\u0446','TScy':'\\u0426','tshcy':'\\u045B','TSHcy':'\\u040B','tstrok':'\\u0167','Tstrok':'\\u0166','twixt':'\\u226C','twoheadleftarrow':'\\u219E','twoheadrightarrow':'\\u21A0','uacute':'\\xFA','Uacute':'\\xDA','uarr':'\\u2191','uArr':'\\u21D1','Uarr':'\\u219F','Uarrocir':'\\u2949','ubrcy':'\\u045E','Ubrcy':'\\u040E','ubreve':'\\u016D','Ubreve':'\\u016C','ucirc':'\\xFB','Ucirc':'\\xDB','ucy':'\\u0443','Ucy':'\\u0423','udarr':'\\u21C5','udblac':'\\u0171','Udblac':'\\u0170','udhar':'\\u296E','ufisht':'\\u297E','ufr':'\\uD835\\uDD32','Ufr':'\\uD835\\uDD18','ugrave':'\\xF9','Ugrave':'\\xD9','uHar':'\\u2963','uharl':'\\u21BF','uharr':'\\u21BE','uhblk':'\\u2580','ulcorn':'\\u231C','ulcorner':'\\u231C','ulcrop':'\\u230F','ultri':'\\u25F8','umacr':'\\u016B','Umacr':'\\u016A','uml':'\\xA8','UnderBar':'_','UnderBrace':'\\u23DF','UnderBracket':'\\u23B5','UnderParenthesis':'\\u23DD','Union':'\\u22C3','UnionPlus':'\\u228E','uogon':'\\u0173','Uogon':'\\u0172','uopf':'\\uD835\\uDD66','Uopf':'\\uD835\\uDD4C','uparrow':'\\u2191','Uparrow':'\\u21D1','UpArrow':'\\u2191','UpArrowBar':'\\u2912','UpArrowDownArrow':'\\u21C5','updownarrow':'\\u2195','Updownarrow':'\\u21D5','UpDownArrow':'\\u2195','UpEquilibrium':'\\u296E','upharpoonleft':'\\u21BF','upharpoonright':'\\u21BE','uplus':'\\u228E','UpperLeftArrow':'\\u2196','UpperRightArrow':'\\u2197','upsi':'\\u03C5','Upsi':'\\u03D2','upsih':'\\u03D2','upsilon':'\\u03C5','Upsilon':'\\u03A5','UpTee':'\\u22A5','UpTeeArrow':'\\u21A5','upuparrows':'\\u21C8','urcorn':'\\u231D','urcorner':'\\u231D','urcrop':'\\u230E','uring':'\\u016F','Uring':'\\u016E','urtri':'\\u25F9','uscr':'\\uD835\\uDCCA','Uscr':'\\uD835\\uDCB0','utdot':'\\u22F0','utilde':'\\u0169','Utilde':'\\u0168','utri':'\\u25B5','utrif':'\\u25B4','uuarr':'\\u21C8','uuml':'\\xFC','Uuml':'\\xDC','uwangle':'\\u29A7','vangrt':'\\u299C','varepsilon':'\\u03F5','varkappa':'\\u03F0','varnothing':'\\u2205','varphi':'\\u03D5','varpi':'\\u03D6','varpropto':'\\u221D','varr':'\\u2195','vArr':'\\u21D5','varrho':'\\u03F1','varsigma':'\\u03C2','varsubsetneq':'\\u228A\\uFE00','varsubsetneqq':'\\u2ACB\\uFE00','varsupsetneq':'\\u228B\\uFE00','varsupsetneqq':'\\u2ACC\\uFE00','vartheta':'\\u03D1','vartriangleleft':'\\u22B2','vartriangleright':'\\u22B3','vBar':'\\u2AE8','Vbar':'\\u2AEB','vBarv':'\\u2AE9','vcy':'\\u0432','Vcy':'\\u0412','vdash':'\\u22A2','vDash':'\\u22A8','Vdash':'\\u22A9','VDash':'\\u22AB','Vdashl':'\\u2AE6','vee':'\\u2228','Vee':'\\u22C1','veebar':'\\u22BB','veeeq':'\\u225A','vellip':'\\u22EE','verbar':'|','Verbar':'\\u2016','vert':'|','Vert':'\\u2016','VerticalBar':'\\u2223','VerticalLine':'|','VerticalSeparator':'\\u2758','VerticalTilde':'\\u2240','VeryThinSpace':'\\u200A','vfr':'\\uD835\\uDD33','Vfr':'\\uD835\\uDD19','vltri':'\\u22B2','vnsub':'\\u2282\\u20D2','vnsup':'\\u2283\\u20D2','vopf':'\\uD835\\uDD67','Vopf':'\\uD835\\uDD4D','vprop':'\\u221D','vrtri':'\\u22B3','vscr':'\\uD835\\uDCCB','Vscr':'\\uD835\\uDCB1','vsubne':'\\u228A\\uFE00','vsubnE':'\\u2ACB\\uFE00','vsupne':'\\u228B\\uFE00','vsupnE':'\\u2ACC\\uFE00','Vvdash':'\\u22AA','vzigzag':'\\u299A','wcirc':'\\u0175','Wcirc':'\\u0174','wedbar':'\\u2A5F','wedge':'\\u2227','Wedge':'\\u22C0','wedgeq':'\\u2259','weierp':'\\u2118','wfr':'\\uD835\\uDD34','Wfr':'\\uD835\\uDD1A','wopf':'\\uD835\\uDD68','Wopf':'\\uD835\\uDD4E','wp':'\\u2118','wr':'\\u2240','wreath':'\\u2240','wscr':'\\uD835\\uDCCC','Wscr':'\\uD835\\uDCB2','xcap':'\\u22C2','xcirc':'\\u25EF','xcup':'\\u22C3','xdtri':'\\u25BD','xfr':'\\uD835\\uDD35','Xfr':'\\uD835\\uDD1B','xharr':'\\u27F7','xhArr':'\\u27FA','xi':'\\u03BE','Xi':'\\u039E','xlarr':'\\u27F5','xlArr':'\\u27F8','xmap':'\\u27FC','xnis':'\\u22FB','xodot':'\\u2A00','xopf':'\\uD835\\uDD69','Xopf':'\\uD835\\uDD4F','xoplus':'\\u2A01','xotime':'\\u2A02','xrarr':'\\u27F6','xrArr':'\\u27F9','xscr':'\\uD835\\uDCCD','Xscr':'\\uD835\\uDCB3','xsqcup':'\\u2A06','xuplus':'\\u2A04','xutri':'\\u25B3','xvee':'\\u22C1','xwedge':'\\u22C0','yacute':'\\xFD','Yacute':'\\xDD','yacy':'\\u044F','YAcy':'\\u042F','ycirc':'\\u0177','Ycirc':'\\u0176','ycy':'\\u044B','Ycy':'\\u042B','yen':'\\xA5','yfr':'\\uD835\\uDD36','Yfr':'\\uD835\\uDD1C','yicy':'\\u0457','YIcy':'\\u0407','yopf':'\\uD835\\uDD6A','Yopf':'\\uD835\\uDD50','yscr':'\\uD835\\uDCCE','Yscr':'\\uD835\\uDCB4','yucy':'\\u044E','YUcy':'\\u042E','yuml':'\\xFF','Yuml':'\\u0178','zacute':'\\u017A','Zacute':'\\u0179','zcaron':'\\u017E','Zcaron':'\\u017D','zcy':'\\u0437','Zcy':'\\u0417','zdot':'\\u017C','Zdot':'\\u017B','zeetrf':'\\u2128','ZeroWidthSpace':'\\u200B','zeta':'\\u03B6','Zeta':'\\u0396','zfr':'\\uD835\\uDD37','Zfr':'\\u2128','zhcy':'\\u0436','ZHcy':'\\u0416','zigrarr':'\\u21DD','zopf':'\\uD835\\uDD6B','Zopf':'\\u2124','zscr':'\\uD835\\uDCCF','Zscr':'\\uD835\\uDCB5','zwj':'\\u200D','zwnj':'\\u200C'};\n\tvar decodeMapLegacy = {'aacute':'\\xE1','Aacute':'\\xC1','acirc':'\\xE2','Acirc':'\\xC2','acute':'\\xB4','aelig':'\\xE6','AElig':'\\xC6','agrave':'\\xE0','Agrave':'\\xC0','amp':'&','AMP':'&','aring':'\\xE5','Aring':'\\xC5','atilde':'\\xE3','Atilde':'\\xC3','auml':'\\xE4','Auml':'\\xC4','brvbar':'\\xA6','ccedil':'\\xE7','Ccedil':'\\xC7','cedil':'\\xB8','cent':'\\xA2','copy':'\\xA9','COPY':'\\xA9','curren':'\\xA4','deg':'\\xB0','divide':'\\xF7','eacute':'\\xE9','Eacute':'\\xC9','ecirc':'\\xEA','Ecirc':'\\xCA','egrave':'\\xE8','Egrave':'\\xC8','eth':'\\xF0','ETH':'\\xD0','euml':'\\xEB','Euml':'\\xCB','frac12':'\\xBD','frac14':'\\xBC','frac34':'\\xBE','gt':'>','GT':'>','iacute':'\\xED','Iacute':'\\xCD','icirc':'\\xEE','Icirc':'\\xCE','iexcl':'\\xA1','igrave':'\\xEC','Igrave':'\\xCC','iquest':'\\xBF','iuml':'\\xEF','Iuml':'\\xCF','laquo':'\\xAB','lt':'<','LT':'<','macr':'\\xAF','micro':'\\xB5','middot':'\\xB7','nbsp':'\\xA0','not':'\\xAC','ntilde':'\\xF1','Ntilde':'\\xD1','oacute':'\\xF3','Oacute':'\\xD3','ocirc':'\\xF4','Ocirc':'\\xD4','ograve':'\\xF2','Ograve':'\\xD2','ordf':'\\xAA','ordm':'\\xBA','oslash':'\\xF8','Oslash':'\\xD8','otilde':'\\xF5','Otilde':'\\xD5','ouml':'\\xF6','Ouml':'\\xD6','para':'\\xB6','plusmn':'\\xB1','pound':'\\xA3','quot':'\"','QUOT':'\"','raquo':'\\xBB','reg':'\\xAE','REG':'\\xAE','sect':'\\xA7','shy':'\\xAD','sup1':'\\xB9','sup2':'\\xB2','sup3':'\\xB3','szlig':'\\xDF','thorn':'\\xFE','THORN':'\\xDE','times':'\\xD7','uacute':'\\xFA','Uacute':'\\xDA','ucirc':'\\xFB','Ucirc':'\\xDB','ugrave':'\\xF9','Ugrave':'\\xD9','uml':'\\xA8','uuml':'\\xFC','Uuml':'\\xDC','yacute':'\\xFD','Yacute':'\\xDD','yen':'\\xA5','yuml':'\\xFF'};\n\tvar decodeMapNumeric = {'0':'\\uFFFD','128':'\\u20AC','130':'\\u201A','131':'\\u0192','132':'\\u201E','133':'\\u2026','134':'\\u2020','135':'\\u2021','136':'\\u02C6','137':'\\u2030','138':'\\u0160','139':'\\u2039','140':'\\u0152','142':'\\u017D','145':'\\u2018','146':'\\u2019','147':'\\u201C','148':'\\u201D','149':'\\u2022','150':'\\u2013','151':'\\u2014','152':'\\u02DC','153':'\\u2122','154':'\\u0161','155':'\\u203A','156':'\\u0153','158':'\\u017E','159':'\\u0178'};\n\tvar invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar stringFromCharCode = String.fromCharCode;\n\n\tvar object = {};\n\tvar hasOwnProperty = object.hasOwnProperty;\n\tvar has = function(object, propertyName) {\n\t\treturn hasOwnProperty.call(object, propertyName);\n\t};\n\n\tvar contains = function(array, value) {\n\t\tvar index = -1;\n\t\tvar length = array.length;\n\t\twhile (++index < length) {\n\t\t\tif (array[index] == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\tvar merge = function(options, defaults) {\n\t\tif (!options) {\n\t\t\treturn defaults;\n\t\t}\n\t\tvar result = {};\n\t\tvar key;\n\t\tfor (key in defaults) {\n\t\t\t// A `hasOwnProperty` check is not needed here, since only recognized\n\t\t\t// option names are used anyway. Any others are ignored.\n\t\t\tresult[key] = has(options, key) ? options[key] : defaults[key];\n\t\t}\n\t\treturn result;\n\t};\n\n\t// Modified version of `ucs2encode`; see https://mths.be/punycode.\n\tvar codePointToSymbol = function(codePoint, strict) {\n\t\tvar output = '';\n\t\tif ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {\n\t\t\t// See issue #4:\n\t\t\t// “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is\n\t\t\t// greater than 0x10FFFF, then this is a parse error. Return a U+FFFD\n\t\t\t// REPLACEMENT CHARACTER.”\n\t\t\tif (strict) {\n\t\t\t\tparseError('character reference outside the permissible Unicode range');\n\t\t\t}\n\t\t\treturn '\\uFFFD';\n\t\t}\n\t\tif (has(decodeMapNumeric, codePoint)) {\n\t\t\tif (strict) {\n\t\t\t\tparseError('disallowed character reference');\n\t\t\t}\n\t\t\treturn decodeMapNumeric[codePoint];\n\t\t}\n\t\tif (strict && contains(invalidReferenceCodePoints, codePoint)) {\n\t\t\tparseError('disallowed character reference');\n\t\t}\n\t\tif (codePoint > 0xFFFF) {\n\t\t\tcodePoint -= 0x10000;\n\t\t\toutput += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);\n\t\t\tcodePoint = 0xDC00 | codePoint & 0x3FF;\n\t\t}\n\t\toutput += stringFromCharCode(codePoint);\n\t\treturn output;\n\t};\n\n\tvar hexEscape = function(codePoint) {\n\t\treturn '&#x' + codePoint.toString(16).toUpperCase() + ';';\n\t};\n\n\tvar decEscape = function(codePoint) {\n\t\treturn '&#' + codePoint + ';';\n\t};\n\n\tvar parseError = function(message) {\n\t\tthrow Error('Parse error: ' + message);\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar encode = function(string, options) {\n\t\toptions = merge(options, encode.options);\n\t\tvar strict = options.strict;\n\t\tif (strict && regexInvalidRawCodePoint.test(string)) {\n\t\t\tparseError('forbidden code point');\n\t\t}\n\t\tvar encodeEverything = options.encodeEverything;\n\t\tvar useNamedReferences = options.useNamedReferences;\n\t\tvar allowUnsafeSymbols = options.allowUnsafeSymbols;\n\t\tvar escapeCodePoint = options.decimal ? decEscape : hexEscape;\n\n\t\tvar escapeBmpSymbol = function(symbol) {\n\t\t\treturn escapeCodePoint(symbol.charCodeAt(0));\n\t\t};\n\n\t\tif (encodeEverything) {\n\t\t\t// Encode ASCII symbols.\n\t\t\tstring = string.replace(regexAsciiWhitelist, function(symbol) {\n\t\t\t\t// Use named references if requested & possible.\n\t\t\t\tif (useNamedReferences && has(encodeMap, symbol)) {\n\t\t\t\t\treturn '&' + encodeMap[symbol] + ';';\n\t\t\t\t}\n\t\t\t\treturn escapeBmpSymbol(symbol);\n\t\t\t});\n\t\t\t// Shorten a few escapes that represent two symbols, of which at least one\n\t\t\t// is within the ASCII range.\n\t\t\tif (useNamedReferences) {\n\t\t\t\tstring = string\n\t\t\t\t\t.replace(/&gt;\\u20D2/g, '&nvgt;')\n\t\t\t\t\t.replace(/&lt;\\u20D2/g, '&nvlt;')\n\t\t\t\t\t.replace(/&#x66;&#x6A;/g, '&fjlig;');\n\t\t\t}\n\t\t\t// Encode non-ASCII symbols.\n\t\t\tif (useNamedReferences) {\n\t\t\t\t// Encode non-ASCII symbols that can be replaced with a named reference.\n\t\t\t\tstring = string.replace(regexEncodeNonAscii, function(string) {\n\t\t\t\t\t// Note: there is no need to check `has(encodeMap, string)` here.\n\t\t\t\t\treturn '&' + encodeMap[string] + ';';\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Note: any remaining non-ASCII symbols are handled outside of the `if`.\n\t\t} else if (useNamedReferences) {\n\t\t\t// Apply named character references.\n\t\t\t// Encode `<>\"'&` using named character references.\n\t\t\tif (!allowUnsafeSymbols) {\n\t\t\t\tstring = string.replace(regexEscape, function(string) {\n\t\t\t\t\treturn '&' + encodeMap[string] + ';'; // no need to check `has()` here\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Shorten escapes that represent two symbols, of which at least one is\n\t\t\t// `<>\"'&`.\n\t\t\tstring = string\n\t\t\t\t.replace(/&gt;\\u20D2/g, '&nvgt;')\n\t\t\t\t.replace(/&lt;\\u20D2/g, '&nvlt;');\n\t\t\t// Encode non-ASCII symbols that can be replaced with a named reference.\n\t\t\tstring = string.replace(regexEncodeNonAscii, function(string) {\n\t\t\t\t// Note: there is no need to check `has(encodeMap, string)` here.\n\t\t\t\treturn '&' + encodeMap[string] + ';';\n\t\t\t});\n\t\t} else if (!allowUnsafeSymbols) {\n\t\t\t// Encode `<>\"'&` using hexadecimal escapes, now that they’re not handled\n\t\t\t// using named character references.\n\t\t\tstring = string.replace(regexEscape, escapeBmpSymbol);\n\t\t}\n\t\treturn string\n\t\t\t// Encode astral symbols.\n\t\t\t.replace(regexAstralSymbols, function($0) {\n\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\tvar high = $0.charCodeAt(0);\n\t\t\t\tvar low = $0.charCodeAt(1);\n\t\t\t\tvar codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;\n\t\t\t\treturn escapeCodePoint(codePoint);\n\t\t\t})\n\t\t\t// Encode any remaining BMP symbols that are not printable ASCII symbols\n\t\t\t// using a hexadecimal escape.\n\t\t\t.replace(regexBmpWhitelist, escapeBmpSymbol);\n\t};\n\t// Expose default options (so they can be overridden globally).\n\tencode.options = {\n\t\t'allowUnsafeSymbols': false,\n\t\t'encodeEverything': false,\n\t\t'strict': false,\n\t\t'useNamedReferences': false,\n\t\t'decimal' : false\n\t};\n\n\tvar decode = function(html, options) {\n\t\toptions = merge(options, decode.options);\n\t\tvar strict = options.strict;\n\t\tif (strict && regexInvalidEntity.test(html)) {\n\t\t\tparseError('malformed character reference');\n\t\t}\n\t\treturn html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n\t\t\tvar codePoint;\n\t\t\tvar semicolon;\n\t\t\tvar decDigits;\n\t\t\tvar hexDigits;\n\t\t\tvar reference;\n\t\t\tvar next;\n\n\t\t\tif ($1) {\n\t\t\t\treference = $1;\n\t\t\t\t// Note: there is no need to check `has(decodeMap, reference)`.\n\t\t\t\treturn decodeMap[reference];\n\t\t\t}\n\n\t\t\tif ($2) {\n\t\t\t\t// Decode named character references without trailing `;`, e.g. `&amp`.\n\t\t\t\t// This is only a parse error if it gets converted to `&`, or if it is\n\t\t\t\t// followed by `=` in an attribute context.\n\t\t\t\treference = $2;\n\t\t\t\tnext = $3;\n\t\t\t\tif (next && options.isAttributeValue) {\n\t\t\t\t\tif (strict && next == '=') {\n\t\t\t\t\t\tparseError('`&` did not start a character reference');\n\t\t\t\t\t}\n\t\t\t\t\treturn $0;\n\t\t\t\t} else {\n\t\t\t\t\tif (strict) {\n\t\t\t\t\t\tparseError(\n\t\t\t\t\t\t\t'named character reference was not terminated by a semicolon'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Note: there is no need to check `has(decodeMapLegacy, reference)`.\n\t\t\t\t\treturn decodeMapLegacy[reference] + (next || '');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($4) {\n\t\t\t\t// Decode decimal escapes, e.g. `&#119558;`.\n\t\t\t\tdecDigits = $4;\n\t\t\t\tsemicolon = $5;\n\t\t\t\tif (strict && !semicolon) {\n\t\t\t\t\tparseError('character reference was not terminated by a semicolon');\n\t\t\t\t}\n\t\t\t\tcodePoint = parseInt(decDigits, 10);\n\t\t\t\treturn codePointToSymbol(codePoint, strict);\n\t\t\t}\n\n\t\t\tif ($6) {\n\t\t\t\t// Decode hexadecimal escapes, e.g. `&#x1D306;`.\n\t\t\t\thexDigits = $6;\n\t\t\t\tsemicolon = $7;\n\t\t\t\tif (strict && !semicolon) {\n\t\t\t\t\tparseError('character reference was not terminated by a semicolon');\n\t\t\t\t}\n\t\t\t\tcodePoint = parseInt(hexDigits, 16);\n\t\t\t\treturn codePointToSymbol(codePoint, strict);\n\t\t\t}\n\n\t\t\t// If we’re still here, `if ($7)` is implied; it’s an ambiguous\n\t\t\t// ampersand for sure. https://mths.be/notes/ambiguous-ampersands\n\t\t\tif (strict) {\n\t\t\t\tparseError(\n\t\t\t\t\t'named character reference was not terminated by a semicolon'\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $0;\n\t\t});\n\t};\n\t// Expose default options (so they can be overridden globally).\n\tdecode.options = {\n\t\t'isAttributeValue': false,\n\t\t'strict': false\n\t};\n\n\tvar escape = function(string) {\n\t\treturn string.replace(regexEscape, function($0) {\n\t\t\t// Note: there is no need to check `has(escapeMap, $0)` here.\n\t\t\treturn escapeMap[$0];\n\t\t});\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar he = {\n\t\t'version': '1.2.0',\n\t\t'encode': encode,\n\t\t'decode': decode,\n\t\t'escape': escape,\n\t\t'unescape': decode\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn he;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = he;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (var key in he) {\n\t\t\t\thas(he, key) && (freeExports[key] = he[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.he = he;\n\t}\n\n}(this));\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n  return function (it) {\n    var O = toIndexedObject(it);\n    var keys = objectKeys(O);\n    var length = keys.length;\n    var i = 0;\n    var result = [];\n    var key;\n    while (length > i) {\n      key = keys[i++];\n      if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n        result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n      }\n    }\n    return result;\n  };\n};\n\nmodule.exports = {\n  // `Object.entries` method\n  // https://tc39.github.io/ecma262/#sec-object.entries\n  entries: createMethod(true),\n  // `Object.values` method\n  // https://tc39.github.io/ecma262/#sec-object.values\n  values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.github.io/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n  values: function values(O) {\n    return $values(O);\n  }\n});\n","'use strict';\n\nconst {format} = require('util');\n\n/**\n * Contains error codes, factory functions to create throwable error objects,\n * and warning/deprecation functions.\n * @module\n */\n\n/**\n * process.emitWarning or a polyfill\n * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options\n * @ignore\n */\nconst emitWarning = (msg, type) => {\n  if (process.emitWarning) {\n    process.emitWarning(msg, type);\n  } else {\n    process.nextTick(function() {\n      console.warn(type + ': ' + msg);\n    });\n  }\n};\n\n/**\n * Show a deprecation warning. Each distinct message is only displayed once.\n * Ignores empty messages.\n *\n * @param {string} [msg] - Warning to print\n * @private\n */\nconst deprecate = msg => {\n  msg = String(msg);\n  if (msg && !deprecate.cache[msg]) {\n    deprecate.cache[msg] = true;\n    emitWarning(msg, 'DeprecationWarning');\n  }\n};\ndeprecate.cache = {};\n\n/**\n * Show a generic warning.\n * Ignores empty messages.\n *\n * @param {string} [msg] - Warning to print\n * @private\n */\nconst warn = msg => {\n  if (msg) {\n    emitWarning(msg);\n  }\n};\n\n/**\n * When Mocha throw exceptions (or otherwise errors), it attempts to assign a\n * `code` property to the `Error` object, for easier handling.  These are the\n * potential values of `code`.\n */\nvar constants = {\n  /**\n   * An unrecoverable error.\n   */\n  FATAL: 'ERR_MOCHA_FATAL',\n\n  /**\n   * The type of an argument to a function call is invalid\n   */\n  INVALID_ARG_TYPE: 'ERR_MOCHA_INVALID_ARG_TYPE',\n\n  /**\n   * The value of an argument to a function call is invalid\n   */\n  INVALID_ARG_VALUE: 'ERR_MOCHA_INVALID_ARG_VALUE',\n\n  /**\n   * Something was thrown, but it wasn't an `Error`\n   */\n  INVALID_EXCEPTION: 'ERR_MOCHA_INVALID_EXCEPTION',\n\n  /**\n   * An interface (e.g., `Mocha.interfaces`) is unknown or invalid\n   */\n  INVALID_INTERFACE: 'ERR_MOCHA_INVALID_INTERFACE',\n\n  /**\n   * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid\n   */\n  INVALID_REPORTER: 'ERR_MOCHA_INVALID_REPORTER',\n\n  /**\n   * `done()` was called twice in a `Test` or `Hook` callback\n   */\n  MULTIPLE_DONE: 'ERR_MOCHA_MULTIPLE_DONE',\n\n  /**\n   * No files matched the pattern provided by the user\n   */\n  NO_FILES_MATCH_PATTERN: 'ERR_MOCHA_NO_FILES_MATCH_PATTERN',\n\n  /**\n   * Known, but unsupported behavior of some kind\n   */\n  UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED',\n\n  /**\n   * Invalid state transition occurring in `Mocha` instance\n   */\n  INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING',\n\n  /**\n   * Invalid state transition occurring in `Mocha` instance\n   */\n  INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED',\n\n  /**\n   * Use of `only()` w/ `--forbid-only` results in this error.\n   */\n  FORBIDDEN_EXCLUSIVITY: 'ERR_MOCHA_FORBIDDEN_EXCLUSIVITY',\n\n  /**\n   * To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid\n   */\n  INVALID_PLUGIN_IMPLEMENTATION: 'ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION',\n\n  /**\n   * To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid\n   */\n  INVALID_PLUGIN_DEFINITION: 'ERR_MOCHA_INVALID_PLUGIN_DEFINITION'\n};\n\nconst MOCHA_ERRORS = new Set(Object.values(constants));\n\n/**\n * Creates an error object to be thrown when no files to be tested could be found using specified pattern.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @param {string} pattern - User-specified argument value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createNoFilesMatchPatternError(message, pattern) {\n  var err = new Error(message);\n  err.code = constants.NO_FILES_MATCH_PATTERN;\n  err.pattern = pattern;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when the reporter specified in the options was not found.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @param {string} reporter - User-specified reporter value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidReporterError(message, reporter) {\n  var err = new TypeError(message);\n  err.code = constants.INVALID_REPORTER;\n  err.reporter = reporter;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when the interface specified in the options was not found.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @param {string} ui - User-specified interface value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidInterfaceError(message, ui) {\n  var err = new Error(message);\n  err.code = constants.INVALID_INTERFACE;\n  err.interface = ui;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when a behavior, option, or parameter is unsupported.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createUnsupportedError(message) {\n  var err = new Error(message);\n  err.code = constants.UNSUPPORTED;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when an argument is missing.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} expected - Expected argument datatype.\n * @returns {Error} instance detailing the error condition\n */\nfunction createMissingArgumentError(message, argument, expected) {\n  return createInvalidArgumentTypeError(message, argument, expected);\n}\n\n/**\n * Creates an error object to be thrown when an argument did not use the supported type\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} expected - Expected argument datatype.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidArgumentTypeError(message, argument, expected) {\n  var err = new TypeError(message);\n  err.code = constants.INVALID_ARG_TYPE;\n  err.argument = argument;\n  err.expected = expected;\n  err.actual = typeof argument;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when an argument did not use the supported value\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} value - Argument value.\n * @param {string} [reason] - Why value is invalid.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidArgumentValueError(message, argument, value, reason) {\n  var err = new TypeError(message);\n  err.code = constants.INVALID_ARG_VALUE;\n  err.argument = argument;\n  err.value = value;\n  err.reason = typeof reason !== 'undefined' ? reason : 'is invalid';\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidExceptionError(message, value) {\n  var err = new Error(message);\n  err.code = constants.INVALID_EXCEPTION;\n  err.valueType = typeof value;\n  err.value = value;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when an unrecoverable error occurs.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createFatalError(message, value) {\n  var err = new Error(message);\n  err.code = constants.FATAL;\n  err.valueType = typeof value;\n  err.value = value;\n  return err;\n}\n\n/**\n * Dynamically creates a plugin-type-specific error based on plugin type\n * @param {string} message - Error message\n * @param {\"reporter\"|\"interface\"} pluginType - Plugin type. Future: expand as needed\n * @param {string} [pluginId] - Name/path of plugin, if any\n * @throws When `pluginType` is not known\n * @public\n * @returns {Error}\n */\nfunction createInvalidLegacyPluginError(message, pluginType, pluginId) {\n  switch (pluginType) {\n    case 'reporter':\n      return createInvalidReporterError(message, pluginId);\n    case 'interface':\n      return createInvalidInterfaceError(message, pluginId);\n    default:\n      throw new Error('unknown pluginType \"' + pluginType + '\"');\n  }\n}\n\n/**\n * **DEPRECATED**.  Use {@link createInvalidLegacyPluginError} instead  Dynamically creates a plugin-type-specific error based on plugin type\n * @deprecated\n * @param {string} message - Error message\n * @param {\"reporter\"|\"interface\"} pluginType - Plugin type. Future: expand as needed\n * @param {string} [pluginId] - Name/path of plugin, if any\n * @throws When `pluginType` is not known\n * @public\n * @returns {Error}\n */\nfunction createInvalidPluginError(...args) {\n  deprecate('Use createInvalidLegacyPluginError() instead');\n  return createInvalidLegacyPluginError(...args);\n}\n\n/**\n * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed.\n * @param {string} message The error message to be displayed.\n * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun`\n * @param {Mocha} instance the mocha instance that throw this error\n */\nfunction createMochaInstanceAlreadyDisposedError(\n  message,\n  cleanReferencesAfterRun,\n  instance\n) {\n  var err = new Error(message);\n  err.code = constants.INSTANCE_ALREADY_DISPOSED;\n  err.cleanReferencesAfterRun = cleanReferencesAfterRun;\n  err.instance = instance;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress.\n * @param {string} message The error message to be displayed.\n */\nfunction createMochaInstanceAlreadyRunningError(message, instance) {\n  var err = new Error(message);\n  err.code = constants.INSTANCE_ALREADY_RUNNING;\n  err.instance = instance;\n  return err;\n}\n\n/*\n * Creates an error object to be thrown when done() is called multiple times in a test\n *\n * @public\n * @param {Runnable} runnable - Original runnable\n * @param {Error} [originalErr] - Original error, if any\n * @returns {Error} instance detailing the error condition\n */\nfunction createMultipleDoneError(runnable, originalErr) {\n  var title;\n  try {\n    title = format('<%s>', runnable.fullTitle());\n    if (runnable.parent.root) {\n      title += ' (of root suite)';\n    }\n  } catch (ignored) {\n    title = format('<%s> (of unknown suite)', runnable.title);\n  }\n  var message = format(\n    'done() called multiple times in %s %s',\n    runnable.type ? runnable.type : 'unknown runnable',\n    title\n  );\n  if (runnable.file) {\n    message += format(' of file %s', runnable.file);\n  }\n  if (originalErr) {\n    message += format('; in addition, done() received error: %s', originalErr);\n  }\n\n  var err = new Error(message);\n  err.code = constants.MULTIPLE_DONE;\n  err.valueType = typeof originalErr;\n  err.value = originalErr;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when `.only()` is used with\n * `--forbid-only`.\n * @public\n * @param {Mocha} mocha - Mocha instance\n * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY}\n */\nfunction createForbiddenExclusivityError(mocha) {\n  var err = new Error(\n    mocha.isWorker\n      ? '`.only` is not supported in parallel mode'\n      : '`.only` forbidden by --forbid-only'\n  );\n  err.code = constants.FORBIDDEN_EXCLUSIVITY;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when a plugin definition is invalid\n * @param {string} msg - Error message\n * @param {PluginDefinition} [pluginDef] - Problematic plugin definition\n * @public\n * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}\n */\nfunction createInvalidPluginDefinitionError(msg, pluginDef) {\n  const err = new Error(msg);\n  err.code = constants.INVALID_PLUGIN_DEFINITION;\n  err.pluginDef = pluginDef;\n  return err;\n}\n\n/**\n * Creates an error object to be thrown when a plugin implementation (user code) is invalid\n * @param {string} msg - Error message\n * @param {Object} [opts] - Plugin definition and user-supplied implementation\n * @param {PluginDefinition} [opts.pluginDef] - Plugin Definition\n * @param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied)\n * @public\n * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}\n */\nfunction createInvalidPluginImplementationError(\n  msg,\n  {pluginDef, pluginImpl} = {}\n) {\n  const err = new Error(msg);\n  err.code = constants.INVALID_PLUGIN_IMPLEMENTATION;\n  err.pluginDef = pluginDef;\n  err.pluginImpl = pluginImpl;\n  return err;\n}\n\n/**\n * Returns `true` if an error came out of Mocha.\n * _Can suffer from false negatives, but not false positives._\n * @public\n * @param {*} err - Error, or anything\n * @returns {boolean}\n */\nconst isMochaError = err =>\n  Boolean(err && typeof err === 'object' && MOCHA_ERRORS.has(err.code));\n\nmodule.exports = {\n  constants,\n  createFatalError,\n  createForbiddenExclusivityError,\n  createInvalidArgumentTypeError,\n  createInvalidArgumentValueError,\n  createInvalidExceptionError,\n  createInvalidInterfaceError,\n  createInvalidLegacyPluginError,\n  createInvalidPluginDefinitionError,\n  createInvalidPluginError,\n  createInvalidPluginImplementationError,\n  createInvalidReporterError,\n  createMissingArgumentError,\n  createMochaInstanceAlreadyDisposedError,\n  createMochaInstanceAlreadyRunningError,\n  createMultipleDoneError,\n  createNoFilesMatchPatternError,\n  createUnsupportedError,\n  deprecate,\n  isMochaError,\n  warn\n};\n","'use strict';\n\n/**\n * Various utility functions used throughout Mocha's codebase.\n * @module utils\n */\n\n/**\n * Module dependencies.\n */\n\nconst {nanoid} = require('nanoid/non-secure');\nvar path = require('path');\nvar util = require('util');\nvar he = require('he');\nconst errors = require('./errors');\n\nconst MOCHA_ID_PROP_NAME = '__mocha_id__';\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * @param {function} ctor - Constructor function which needs to inherit the\n *     prototype.\n * @param {function} superCtor - Constructor function to inherit prototype from.\n * @throws {TypeError} if either constructor is null, or if super constructor\n *     lacks a prototype.\n */\nexports.inherits = util.inherits;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @private\n * @param  {string} html\n * @return {string}\n */\nexports.escape = function(html) {\n  return he.encode(String(html), {useNamedReferences: false});\n};\n\n/**\n * Test if the given obj is type of string.\n *\n * @private\n * @param {Object} obj\n * @return {boolean}\n */\nexports.isString = function(obj) {\n  return typeof obj === 'string';\n};\n\n/**\n * Compute a slug from the given `str`.\n *\n * @private\n * @param {string} str\n * @return {string}\n */\nexports.slug = function(str) {\n  return str\n    .toLowerCase()\n    .replace(/\\s+/g, '-')\n    .replace(/[^-\\w]/g, '')\n    .replace(/-{2,}/g, '-');\n};\n\n/**\n * Strip the function definition from `str`, and re-indent for pre whitespace.\n *\n * @param {string} str\n * @return {string}\n */\nexports.clean = function(str) {\n  str = str\n    .replace(/\\r\\n?|[\\n\\u2028\\u2029]/g, '\\n')\n    .replace(/^\\uFEFF/, '')\n    // (traditional)->  space/name     parameters    body     (lambda)-> parameters       body   multi-statement/single          keep body content\n    .replace(\n      /^function(?:\\s*|\\s+[^(]*)\\([^)]*\\)\\s*\\{((?:.|\\n)*?)\\s*\\}$|^\\([^)]*\\)\\s*=>\\s*(?:\\{((?:.|\\n)*?)\\s*\\}|((?:.|\\n)*))$/,\n      '$1$2$3'\n    );\n\n  var spaces = str.match(/^\\n?( *)/)[1].length;\n  var tabs = str.match(/^\\n?(\\t*)/)[1].length;\n  var re = new RegExp(\n    '^\\n?' + (tabs ? '\\t' : ' ') + '{' + (tabs || spaces) + '}',\n    'gm'\n  );\n\n  str = str.replace(re, '');\n\n  return str.trim();\n};\n\n/**\n * If a value could have properties, and has none, this function is called,\n * which returns a string representation of the empty value.\n *\n * Functions w/ no properties return `'[Function]'`\n * Arrays w/ length === 0 return `'[]'`\n * Objects w/ no properties return `'{}'`\n * All else: return result of `value.toString()`\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} typeHint The type of the value\n * @returns {string}\n */\nfunction emptyRepresentation(value, typeHint) {\n  switch (typeHint) {\n    case 'function':\n      return '[Function]';\n    case 'object':\n      return '{}';\n    case 'array':\n      return '[]';\n    default:\n      return value.toString();\n  }\n}\n\n/**\n * Takes some variable and asks `Object.prototype.toString()` what it thinks it\n * is.\n *\n * @private\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString\n * @param {*} value The value to test.\n * @returns {string} Computed type\n * @example\n * canonicalType({}) // 'object'\n * canonicalType([]) // 'array'\n * canonicalType(1) // 'number'\n * canonicalType(false) // 'boolean'\n * canonicalType(Infinity) // 'number'\n * canonicalType(null) // 'null'\n * canonicalType(new Date()) // 'date'\n * canonicalType(/foo/) // 'regexp'\n * canonicalType('type') // 'string'\n * canonicalType(global) // 'global'\n * canonicalType(new String('foo') // 'object'\n * canonicalType(async function() {}) // 'asyncfunction'\n * canonicalType(await import(name)) // 'module'\n */\nvar canonicalType = (exports.canonicalType = function canonicalType(value) {\n  if (value === undefined) {\n    return 'undefined';\n  } else if (value === null) {\n    return 'null';\n  } else if (Buffer.isBuffer(value)) {\n    return 'buffer';\n  }\n  return Object.prototype.toString\n    .call(value)\n    .replace(/^\\[.+\\s(.+?)]$/, '$1')\n    .toLowerCase();\n});\n\n/**\n *\n * Returns a general type or data structure of a variable\n * @private\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures\n * @param {*} value The value to test.\n * @returns {string} One of undefined, boolean, number, string, bigint, symbol, object\n * @example\n * type({}) // 'object'\n * type([]) // 'array'\n * type(1) // 'number'\n * type(false) // 'boolean'\n * type(Infinity) // 'number'\n * type(null) // 'null'\n * type(new Date()) // 'object'\n * type(/foo/) // 'object'\n * type('type') // 'string'\n * type(global) // 'object'\n * type(new String('foo') // 'string'\n */\nexports.type = function type(value) {\n  // Null is special\n  if (value === null) return 'null';\n  const primitives = new Set([\n    'undefined',\n    'boolean',\n    'number',\n    'string',\n    'bigint',\n    'symbol'\n  ]);\n  const _type = typeof value;\n  if (_type === 'function') return _type;\n  if (primitives.has(_type)) return _type;\n  if (value instanceof String) return 'string';\n  if (value instanceof Error) return 'error';\n  if (Array.isArray(value)) return 'array';\n\n  return _type;\n};\n\n/**\n * Stringify `value`. Different behavior depending on type of value:\n *\n * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively.\n * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes.\n * - If `value` is an *empty* object, function, or array, return result of function\n *   {@link emptyRepresentation}.\n * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of\n *   JSON.stringify().\n *\n * @private\n * @see exports.type\n * @param {*} value\n * @return {string}\n */\nexports.stringify = function(value) {\n  var typeHint = canonicalType(value);\n\n  if (!~['object', 'array', 'function'].indexOf(typeHint)) {\n    if (typeHint === 'buffer') {\n      var json = Buffer.prototype.toJSON.call(value);\n      // Based on the toJSON result\n      return jsonStringify(\n        json.data && json.type ? json.data : json,\n        2\n      ).replace(/,(\\n|$)/g, '$1');\n    }\n\n    // IE7/IE8 has a bizarre String constructor; needs to be coerced\n    // into an array and back to obj.\n    if (typeHint === 'string' && typeof value === 'object') {\n      value = value.split('').reduce(function(acc, char, idx) {\n        acc[idx] = char;\n        return acc;\n      }, {});\n      typeHint = 'object';\n    } else {\n      return jsonStringify(value);\n    }\n  }\n\n  for (var prop in value) {\n    if (Object.prototype.hasOwnProperty.call(value, prop)) {\n      return jsonStringify(\n        exports.canonicalize(value, null, typeHint),\n        2\n      ).replace(/,(\\n|$)/g, '$1');\n    }\n  }\n\n  return emptyRepresentation(value, typeHint);\n};\n\n/**\n * like JSON.stringify but more sense.\n *\n * @private\n * @param {Object}  object\n * @param {number=} spaces\n * @param {number=} depth\n * @returns {*}\n */\nfunction jsonStringify(object, spaces, depth) {\n  if (typeof spaces === 'undefined') {\n    // primitive types\n    return _stringify(object);\n  }\n\n  depth = depth || 1;\n  var space = spaces * depth;\n  var str = Array.isArray(object) ? '[' : '{';\n  var end = Array.isArray(object) ? ']' : '}';\n  var length =\n    typeof object.length === 'number'\n      ? object.length\n      : Object.keys(object).length;\n  // `.repeat()` polyfill\n  function repeat(s, n) {\n    return new Array(n).join(s);\n  }\n\n  function _stringify(val) {\n    switch (canonicalType(val)) {\n      case 'null':\n      case 'undefined':\n        val = '[' + val + ']';\n        break;\n      case 'array':\n      case 'object':\n        val = jsonStringify(val, spaces, depth + 1);\n        break;\n      case 'boolean':\n      case 'regexp':\n      case 'symbol':\n      case 'number':\n        val =\n          val === 0 && 1 / val === -Infinity // `-0`\n            ? '-0'\n            : val.toString();\n        break;\n      case 'date':\n        var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString();\n        val = '[Date: ' + sDate + ']';\n        break;\n      case 'buffer':\n        var json = val.toJSON();\n        // Based on the toJSON result\n        json = json.data && json.type ? json.data : json;\n        val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';\n        break;\n      default:\n        val =\n          val === '[Function]' || val === '[Circular]'\n            ? val\n            : JSON.stringify(val); // string\n    }\n    return val;\n  }\n\n  for (var i in object) {\n    if (!Object.prototype.hasOwnProperty.call(object, i)) {\n      continue; // not my business\n    }\n    --length;\n    str +=\n      '\\n ' +\n      repeat(' ', space) +\n      (Array.isArray(object) ? '' : '\"' + i + '\": ') + // key\n      _stringify(object[i]) + // value\n      (length ? ',' : ''); // comma\n  }\n\n  return (\n    str +\n    // [], {}\n    (str.length !== 1 ? '\\n' + repeat(' ', --space) + end : end)\n  );\n}\n\n/**\n * Return a new Thing that has the keys in sorted order. Recursive.\n *\n * If the Thing...\n * - has already been seen, return string `'[Circular]'`\n * - is `undefined`, return string `'[undefined]'`\n * - is `null`, return value `null`\n * - is some other primitive, return the value\n * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method\n * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again.\n * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()`\n *\n * @private\n * @see {@link exports.stringify}\n * @param {*} value Thing to inspect.  May or may not have properties.\n * @param {Array} [stack=[]] Stack of seen values\n * @param {string} [typeHint] Type hint\n * @return {(Object|Array|Function|string|undefined)}\n */\nexports.canonicalize = function canonicalize(value, stack, typeHint) {\n  var canonicalizedObj;\n  /* eslint-disable no-unused-vars */\n  var prop;\n  /* eslint-enable no-unused-vars */\n  typeHint = typeHint || canonicalType(value);\n  function withStack(value, fn) {\n    stack.push(value);\n    fn();\n    stack.pop();\n  }\n\n  stack = stack || [];\n\n  if (stack.indexOf(value) !== -1) {\n    return '[Circular]';\n  }\n\n  switch (typeHint) {\n    case 'undefined':\n    case 'buffer':\n    case 'null':\n      canonicalizedObj = value;\n      break;\n    case 'array':\n      withStack(value, function() {\n        canonicalizedObj = value.map(function(item) {\n          return exports.canonicalize(item, stack);\n        });\n      });\n      break;\n    case 'function':\n      /* eslint-disable-next-line no-unused-vars */\n      for (prop in value) {\n        canonicalizedObj = {};\n        break;\n      }\n      /* eslint-enable guard-for-in */\n      if (!canonicalizedObj) {\n        canonicalizedObj = emptyRepresentation(value, typeHint);\n        break;\n      }\n    /* falls through */\n    case 'object':\n      canonicalizedObj = canonicalizedObj || {};\n      withStack(value, function() {\n        Object.keys(value)\n          .sort()\n          .forEach(function(key) {\n            canonicalizedObj[key] = exports.canonicalize(value[key], stack);\n          });\n      });\n      break;\n    case 'date':\n    case 'number':\n    case 'regexp':\n    case 'boolean':\n    case 'symbol':\n      canonicalizedObj = value;\n      break;\n    default:\n      canonicalizedObj = value + '';\n  }\n\n  return canonicalizedObj;\n};\n\n/**\n * @summary\n * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`)\n * @description\n * When invoking this function you get a filter function that get the Error.stack as an input,\n * and return a prettify output.\n * (i.e: strip Mocha and internal node functions from stack trace).\n * @returns {Function}\n */\nexports.stackTraceFilter = function() {\n  // TODO: Replace with `process.browser`\n  var is = typeof document === 'undefined' ? {node: true} : {browser: true};\n  var slash = path.sep;\n  var cwd;\n  if (is.node) {\n    cwd = exports.cwd() + slash;\n  } else {\n    cwd = (typeof location === 'undefined'\n      ? window.location\n      : location\n    ).href.replace(/\\/[^/]*$/, '/');\n    slash = '/';\n  }\n\n  function isMochaInternal(line) {\n    return (\n      ~line.indexOf('node_modules' + slash + 'mocha' + slash) ||\n      ~line.indexOf(slash + 'mocha.js') ||\n      ~line.indexOf(slash + 'mocha.min.js')\n    );\n  }\n\n  function isNodeInternal(line) {\n    return (\n      ~line.indexOf('(timers.js:') ||\n      ~line.indexOf('(events.js:') ||\n      ~line.indexOf('(node.js:') ||\n      ~line.indexOf('(module.js:') ||\n      ~line.indexOf('GeneratorFunctionPrototype.next (native)') ||\n      false\n    );\n  }\n\n  return function(stack) {\n    stack = stack.split('\\n');\n\n    stack = stack.reduce(function(list, line) {\n      if (isMochaInternal(line)) {\n        return list;\n      }\n\n      if (is.node && isNodeInternal(line)) {\n        return list;\n      }\n\n      // Clean up cwd(absolute)\n      if (/:\\d+:\\d+\\)?$/.test(line)) {\n        line = line.replace('(' + cwd, '(');\n      }\n\n      list.push(line);\n      return list;\n    }, []);\n\n    return stack.join('\\n');\n  };\n};\n\n/**\n * Crude, but effective.\n * @public\n * @param {*} value\n * @returns {boolean} Whether or not `value` is a Promise\n */\nexports.isPromise = function isPromise(value) {\n  return (\n    typeof value === 'object' &&\n    value !== null &&\n    typeof value.then === 'function'\n  );\n};\n\n/**\n * Clamps a numeric value to an inclusive range.\n *\n * @param {number} value - Value to be clamped.\n * @param {number[]} range - Two element array specifying [min, max] range.\n * @returns {number} clamped value\n */\nexports.clamp = function clamp(value, range) {\n  return Math.min(Math.max(value, range[0]), range[1]);\n};\n\n/**\n * Single quote text by combining with undirectional ASCII quotation marks.\n *\n * @description\n * Provides a simple means of markup for quoting text to be used in output.\n * Use this to quote names of variables, methods, and packages.\n *\n * <samp>package 'foo' cannot be found</samp>\n *\n * @private\n * @param {string} str - Value to be quoted.\n * @returns {string} quoted value\n * @example\n * sQuote('n') // => 'n'\n */\nexports.sQuote = function(str) {\n  return \"'\" + str + \"'\";\n};\n\n/**\n * Double quote text by combining with undirectional ASCII quotation marks.\n *\n * @description\n * Provides a simple means of markup for quoting text to be used in output.\n * Use this to quote names of datatypes, classes, pathnames, and strings.\n *\n * <samp>argument 'value' must be \"string\" or \"number\"</samp>\n *\n * @private\n * @param {string} str - Value to be quoted.\n * @returns {string} quoted value\n * @example\n * dQuote('number') // => \"number\"\n */\nexports.dQuote = function(str) {\n  return '\"' + str + '\"';\n};\n\n/**\n * It's a noop.\n * @public\n */\nexports.noop = function() {};\n\n/**\n * Creates a map-like object.\n *\n * @description\n * A \"map\" is an object with no prototype, for our purposes. In some cases\n * this would be more appropriate than a `Map`, especially if your environment\n * doesn't support it. Recommended for use in Mocha's public APIs.\n *\n * @public\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Custom_and_Null_objects|MDN:Map}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Custom_and_Null_objects|MDN:Object.assign}\n * @param {...*} [obj] - Arguments to `Object.assign()`.\n * @returns {Object} An object with no prototype, having `...obj` properties\n */\nexports.createMap = function(obj) {\n  return Object.assign.apply(\n    null,\n    [Object.create(null)].concat(Array.prototype.slice.call(arguments))\n  );\n};\n\n/**\n * Creates a read-only map-like object.\n *\n * @description\n * This differs from {@link module:utils.createMap createMap} only in that\n * the argument must be non-empty, because the result is frozen.\n *\n * @see {@link module:utils.createMap createMap}\n * @param {...*} [obj] - Arguments to `Object.assign()`.\n * @returns {Object} A frozen object with no prototype, having `...obj` properties\n * @throws {TypeError} if argument is not a non-empty object.\n */\nexports.defineConstants = function(obj) {\n  if (canonicalType(obj) !== 'object' || !Object.keys(obj).length) {\n    throw new TypeError('Invalid argument; expected a non-empty object');\n  }\n  return Object.freeze(exports.createMap(obj));\n};\n\n/**\n * Whether current version of Node support ES modules\n *\n * @description\n * Versions prior to 10 did not support ES Modules, and version 10 has an old incompatible version of ESM.\n * This function returns whether Node.JS has ES Module supports that is compatible with Mocha's needs,\n * which is version >=12.11.\n *\n * @param {partialSupport} whether the full Node.js ESM support is available (>= 12) or just something that supports the runtime (>= 10)\n *\n * @returns {Boolean} whether the current version of Node.JS supports ES Modules in a way that is compatible with Mocha\n */\nexports.supportsEsModules = function(partialSupport) {\n  if (!exports.isBrowser() && process.versions && process.versions.node) {\n    var versionFields = process.versions.node.split('.');\n    var major = +versionFields[0];\n    var minor = +versionFields[1];\n\n    if (!partialSupport) {\n      return major >= 13 || (major === 12 && minor >= 11);\n    } else {\n      return major >= 10;\n    }\n  }\n};\n\n/**\n * Returns current working directory\n *\n * Wrapper around `process.cwd()` for isolation\n * @private\n */\nexports.cwd = function cwd() {\n  return process.cwd();\n};\n\n/**\n * Returns `true` if Mocha is running in a browser.\n * Checks for `process.browser`.\n * @returns {boolean}\n * @private\n */\nexports.isBrowser = function isBrowser() {\n  return Boolean(process.browser);\n};\n\n/**\n * Lookup file names at the given `path`.\n *\n * @description\n * Filenames are returned in _traversal_ order by the OS/filesystem.\n * **Make no assumption that the names will be sorted in any fashion.**\n *\n * @public\n * @alias module:lib/cli.lookupFiles\n * @param {string} filepath - Base path to start searching from.\n * @param {string[]} [extensions=[]] - File extensions to look for.\n * @param {boolean} [recursive=false] - Whether to recurse into subdirectories.\n * @return {string[]} An array of paths.\n * @throws {Error} if no files match pattern.\n * @throws {TypeError} if `filepath` is directory and `extensions` not provided.\n * @deprecated Moved to {@link module:lib/cli.lookupFiles}\n */\nexports.lookupFiles = (...args) => {\n  if (exports.isBrowser()) {\n    throw errors.createUnsupportedError(\n      'lookupFiles() is only supported in Node.js!'\n    );\n  }\n  errors.deprecate(\n    '`lookupFiles()` in module `mocha/lib/utils` has moved to module `mocha/lib/cli` and will be removed in the next major revision of Mocha'\n  );\n  return require('./cli').lookupFiles(...args);\n};\n\n/*\n * Casts `value` to an array; useful for optionally accepting array parameters\n *\n * It follows these rules, depending on `value`.  If `value` is...\n * 1. `undefined`: return an empty Array\n * 2. `null`: return an array with a single `null` element\n * 3. Any other object: return the value of `Array.from()` _if_ the object is iterable\n * 4. otherwise: return an array with a single element, `value`\n * @param {*} value - Something to cast to an Array\n * @returns {Array<*>}\n */\nexports.castArray = function castArray(value) {\n  if (value === undefined) {\n    return [];\n  }\n  if (value === null) {\n    return [null];\n  }\n  if (\n    typeof value === 'object' &&\n    (typeof value[Symbol.iterator] === 'function' || value.length !== undefined)\n  ) {\n    return Array.from(value);\n  }\n  return [value];\n};\n\nexports.constants = exports.defineConstants({\n  MOCHA_ID_PROP_NAME\n});\n\n/**\n * Creates a new unique identifier\n * @returns {string} Unique identifier\n */\nexports.uniqueID = () => nanoid();\n\nexports.assignNewMochaID = obj => {\n  const id = exports.uniqueID();\n  Object.defineProperty(obj, MOCHA_ID_PROP_NAME, {\n    get() {\n      return id;\n    }\n  });\n  return obj;\n};\n\n/**\n * Retrieves a Mocha ID from an object, if present.\n * @param {*} [obj] - Object\n * @returns {string|void}\n */\nexports.getMochaID = obj =>\n  obj && typeof obj === 'object' ? obj[MOCHA_ID_PROP_NAME] : undefined;\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.github.io/ecma262/#sec-map-objects\nmodule.exports = collection('Map', function (init) {\n  return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","'use strict';\n\n/**\n @module Pending\n*/\n\nmodule.exports = Pending;\n\n/**\n * Initialize a new `Pending` error with the given message.\n *\n * @param {string} message\n */\nfunction Pending(message) {\n  this.message = message;\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* Active `debug` instances.\n\t*/\n\tcreateDebug.instances = [];\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn match;\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.enabled = createDebug.enabled(namespace);\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.destroy = destroy;\n\t\tdebug.extend = extend;\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\tcreateDebug.instances.push(debug);\n\n\t\treturn debug;\n\t}\n\n\tfunction destroy() {\n\t\tconst index = createDebug.instances.indexOf(this);\n\t\tif (index !== -1) {\n\t\t\tcreateDebug.instances.splice(index, 1);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < createDebug.instances.length; i++) {\n\t\t\tconst instance = createDebug.instances[i];\n\t\t\tinstance.enabled = createDebug.enabled(instance.namespace);\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar Pending = require('./pending');\nvar debug = require('debug')('mocha:runnable');\nvar milliseconds = require('ms');\nvar utils = require('./utils');\nvar errors = require('./errors');\nvar createInvalidExceptionError = errors.createInvalidExceptionError;\nvar createMultipleDoneError = errors.createMultipleDoneError;\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n * @private\n */\nvar Date = global.Date;\nvar setTimeout = global.setTimeout;\nvar clearTimeout = global.clearTimeout;\nvar toString = Object.prototype.toString;\n\nmodule.exports = Runnable;\n\n/**\n * Initialize a new `Runnable` with the given `title` and callback `fn`.\n *\n * @class\n * @extends external:EventEmitter\n * @public\n * @param {String} title\n * @param {Function} fn\n */\nfunction Runnable(title, fn) {\n  this.title = title;\n  this.fn = fn;\n  this.body = (fn || '').toString();\n  this.async = fn && fn.length;\n  this.sync = !this.async;\n  this._timeout = 2000;\n  this._slow = 75;\n  this._retries = -1;\n  utils.assignNewMochaID(this);\n  Object.defineProperty(this, 'id', {\n    get() {\n      return utils.getMochaID(this);\n    }\n  });\n  this.reset();\n}\n\n/**\n * Inherit from `EventEmitter.prototype`.\n */\nutils.inherits(Runnable, EventEmitter);\n\n/**\n * Resets the state initially or for a next run.\n */\nRunnable.prototype.reset = function() {\n  this.timedOut = false;\n  this._currentRetry = 0;\n  this.pending = false;\n  delete this.state;\n  delete this.err;\n};\n\n/**\n * Get current timeout value in msecs.\n *\n * @private\n * @returns {number} current timeout threshold value\n */\n/**\n * @summary\n * Set timeout threshold value (msecs).\n *\n * @description\n * A string argument can use shorthand (e.g., \"2s\") and will be converted.\n * The value will be clamped to range [<code>0</code>, <code>2^<sup>31</sup>-1</code>].\n * If clamped value matches either range endpoint, timeouts will be disabled.\n *\n * @private\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value}\n * @param {number|string} ms - Timeout threshold value.\n * @returns {Runnable} this\n * @chainable\n */\nRunnable.prototype.timeout = function(ms) {\n  if (!arguments.length) {\n    return this._timeout;\n  }\n  if (typeof ms === 'string') {\n    ms = milliseconds(ms);\n  }\n\n  // Clamp to range\n  var INT_MAX = Math.pow(2, 31) - 1;\n  var range = [0, INT_MAX];\n  ms = utils.clamp(ms, range);\n\n  // see #1652 for reasoning\n  if (ms === range[0] || ms === range[1]) {\n    this._timeout = 0;\n  } else {\n    this._timeout = ms;\n  }\n  debug('timeout %d', this._timeout);\n\n  if (this.timer) {\n    this.resetTimeout();\n  }\n  return this;\n};\n\n/**\n * Set or get slow `ms`.\n *\n * @private\n * @param {number|string} ms\n * @return {Runnable|number} ms or Runnable instance.\n */\nRunnable.prototype.slow = function(ms) {\n  if (!arguments.length || typeof ms === 'undefined') {\n    return this._slow;\n  }\n  if (typeof ms === 'string') {\n    ms = milliseconds(ms);\n  }\n  debug('slow %d', ms);\n  this._slow = ms;\n  return this;\n};\n\n/**\n * Halt and mark as pending.\n *\n * @memberof Mocha.Runnable\n * @public\n */\nRunnable.prototype.skip = function() {\n  this.pending = true;\n  throw new Pending('sync skip; aborting execution');\n};\n\n/**\n * Check if this runnable or its parent suite is marked as pending.\n *\n * @private\n */\nRunnable.prototype.isPending = function() {\n  return this.pending || (this.parent && this.parent.isPending());\n};\n\n/**\n * Return `true` if this Runnable has failed.\n * @return {boolean}\n * @private\n */\nRunnable.prototype.isFailed = function() {\n  return !this.isPending() && this.state === constants.STATE_FAILED;\n};\n\n/**\n * Return `true` if this Runnable has passed.\n * @return {boolean}\n * @private\n */\nRunnable.prototype.isPassed = function() {\n  return !this.isPending() && this.state === constants.STATE_PASSED;\n};\n\n/**\n * Set or get number of retries.\n *\n * @private\n */\nRunnable.prototype.retries = function(n) {\n  if (!arguments.length) {\n    return this._retries;\n  }\n  this._retries = n;\n};\n\n/**\n * Set or get current retry\n *\n * @private\n */\nRunnable.prototype.currentRetry = function(n) {\n  if (!arguments.length) {\n    return this._currentRetry;\n  }\n  this._currentRetry = n;\n};\n\n/**\n * Return the full title generated by recursively concatenating the parent's\n * full title.\n *\n * @memberof Mocha.Runnable\n * @public\n * @return {string}\n */\nRunnable.prototype.fullTitle = function() {\n  return this.titlePath().join(' ');\n};\n\n/**\n * Return the title path generated by concatenating the parent's title path with the title.\n *\n * @memberof Mocha.Runnable\n * @public\n * @return {string}\n */\nRunnable.prototype.titlePath = function() {\n  return this.parent.titlePath().concat([this.title]);\n};\n\n/**\n * Clear the timeout.\n *\n * @private\n */\nRunnable.prototype.clearTimeout = function() {\n  clearTimeout(this.timer);\n};\n\n/**\n * Reset the timeout.\n *\n * @private\n */\nRunnable.prototype.resetTimeout = function() {\n  var self = this;\n  var ms = this.timeout();\n\n  if (ms === 0) {\n    return;\n  }\n  this.clearTimeout();\n  this.timer = setTimeout(function() {\n    if (self.timeout() === 0) {\n      return;\n    }\n    self.callback(self._timeoutError(ms));\n    self.timedOut = true;\n  }, ms);\n};\n\n/**\n * Set or get a list of whitelisted globals for this test run.\n *\n * @private\n * @param {string[]} globals\n */\nRunnable.prototype.globals = function(globals) {\n  if (!arguments.length) {\n    return this._allowedGlobals;\n  }\n  this._allowedGlobals = globals;\n};\n\n/**\n * Run the test and invoke `fn(err)`.\n *\n * @param {Function} fn\n * @private\n */\nRunnable.prototype.run = function(fn) {\n  var self = this;\n  var start = new Date();\n  var ctx = this.ctx;\n  var finished;\n  var errorWasHandled = false;\n\n  if (this.isPending()) return fn();\n\n  // Sometimes the ctx exists, but it is not runnable\n  if (ctx && ctx.runnable) {\n    ctx.runnable(this);\n  }\n\n  // called multiple times\n  function multiple(err) {\n    if (errorWasHandled) {\n      return;\n    }\n    errorWasHandled = true;\n    self.emit('error', createMultipleDoneError(self, err));\n  }\n\n  // finished\n  function done(err) {\n    var ms = self.timeout();\n    if (self.timedOut) {\n      return;\n    }\n\n    if (finished) {\n      return multiple(err);\n    }\n\n    self.clearTimeout();\n    self.duration = new Date() - start;\n    finished = true;\n    if (!err && self.duration > ms && ms > 0) {\n      err = self._timeoutError(ms);\n    }\n    fn(err);\n  }\n\n  // for .resetTimeout() and Runner#uncaught()\n  this.callback = done;\n\n  if (this.fn && typeof this.fn.call !== 'function') {\n    done(\n      new TypeError(\n        'A runnable must be passed a function as its second argument.'\n      )\n    );\n    return;\n  }\n\n  // explicit async with `done` argument\n  if (this.async) {\n    this.resetTimeout();\n\n    // allows skip() to be used in an explicit async context\n    this.skip = function asyncSkip() {\n      this.pending = true;\n      done();\n      // halt execution, the uncaught handler will ignore the failure.\n      throw new Pending('async skip; aborting execution');\n    };\n\n    try {\n      callFnAsync(this.fn);\n    } catch (err) {\n      // handles async runnables which actually run synchronously\n      errorWasHandled = true;\n      if (err instanceof Pending) {\n        return; // done() is already called in this.skip()\n      } else if (this.allowUncaught) {\n        throw err;\n      }\n      done(Runnable.toValueOrError(err));\n    }\n    return;\n  }\n\n  // sync or promise-returning\n  try {\n    callFn(this.fn);\n  } catch (err) {\n    errorWasHandled = true;\n    if (err instanceof Pending) {\n      return done();\n    } else if (this.allowUncaught) {\n      throw err;\n    }\n    done(Runnable.toValueOrError(err));\n  }\n\n  function callFn(fn) {\n    var result = fn.call(ctx);\n    if (result && typeof result.then === 'function') {\n      self.resetTimeout();\n      result.then(\n        function() {\n          done();\n          // Return null so libraries like bluebird do not warn about\n          // subsequently constructed Promises.\n          return null;\n        },\n        function(reason) {\n          done(reason || new Error('Promise rejected with no or falsy reason'));\n        }\n      );\n    } else {\n      if (self.asyncOnly) {\n        return done(\n          new Error(\n            '--async-only option in use without declaring `done()` or returning a promise'\n          )\n        );\n      }\n\n      done();\n    }\n  }\n\n  function callFnAsync(fn) {\n    var result = fn.call(ctx, function(err) {\n      if (err instanceof Error || toString.call(err) === '[object Error]') {\n        return done(err);\n      }\n      if (err) {\n        if (Object.prototype.toString.call(err) === '[object Object]') {\n          return done(\n            new Error('done() invoked with non-Error: ' + JSON.stringify(err))\n          );\n        }\n        return done(new Error('done() invoked with non-Error: ' + err));\n      }\n      if (result && utils.isPromise(result)) {\n        return done(\n          new Error(\n            'Resolution method is overspecified. Specify a callback *or* return a Promise; not both.'\n          )\n        );\n      }\n\n      done();\n    });\n  }\n};\n\n/**\n * Instantiates a \"timeout\" error\n *\n * @param {number} ms - Timeout (in milliseconds)\n * @returns {Error} a \"timeout\" error\n * @private\n */\nRunnable.prototype._timeoutError = function(ms) {\n  var msg =\n    'Timeout of ' +\n    ms +\n    'ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves.';\n  if (this.file) {\n    msg += ' (' + this.file + ')';\n  }\n  return new Error(msg);\n};\n\nvar constants = utils.defineConstants(\n  /**\n   * {@link Runnable}-related constants.\n   * @public\n   * @memberof Runnable\n   * @readonly\n   * @static\n   * @alias constants\n   * @enum {string}\n   */\n  {\n    /**\n     * Value of `state` prop when a `Runnable` has failed\n     */\n    STATE_FAILED: 'failed',\n    /**\n     * Value of `state` prop when a `Runnable` has passed\n     */\n    STATE_PASSED: 'passed',\n    /**\n     * Value of `state` prop when a `Runnable` has been skipped by user\n     */\n    STATE_PENDING: 'pending'\n  }\n);\n\n/**\n * Given `value`, return identity if truthy, otherwise create an \"invalid exception\" error and return that.\n * @param {*} [value] - Value to return, if present\n * @returns {*|Error} `value`, otherwise an `Error`\n * @private\n */\nRunnable.toValueOrError = function(value) {\n  return (\n    value ||\n    createInvalidExceptionError(\n      'Runnable failed with falsy or undefined exception. Please throw an Error instead.',\n      value\n    )\n  );\n};\n\nRunnable.constants = constants;\n","'use strict';\nvar $ = require('../internals/export');\nvar $some = require('../internals/array-iteration').some;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('some');\n\n// `Array.prototype.some` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {\n  some: function some(callbackfn /* , thisArg */) {\n    return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","'use strict';\n\nvar Runnable = require('./runnable');\nconst {inherits, constants} = require('./utils');\nconst {MOCHA_ID_PROP_NAME} = constants;\n\n/**\n * Expose `Hook`.\n */\n\nmodule.exports = Hook;\n\n/**\n * Initialize a new `Hook` with the given `title` and callback `fn`\n *\n * @class\n * @extends Runnable\n * @param {String} title\n * @param {Function} fn\n */\nfunction Hook(title, fn) {\n  Runnable.call(this, title, fn);\n  this.type = 'hook';\n}\n\n/**\n * Inherit from `Runnable.prototype`.\n */\ninherits(Hook, Runnable);\n\n/**\n * Resets the state for a next run.\n */\nHook.prototype.reset = function() {\n  Runnable.prototype.reset.call(this);\n  delete this._error;\n};\n\n/**\n * Get or set the test `err`.\n *\n * @memberof Hook\n * @public\n * @param {Error} err\n * @return {Error}\n */\nHook.prototype.error = function(err) {\n  if (!arguments.length) {\n    err = this._error;\n    this._error = null;\n    return err;\n  }\n\n  this._error = err;\n};\n\n/**\n * Returns an object suitable for IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\nHook.prototype.serialize = function serialize() {\n  return {\n    $$isPending: this.isPending(),\n    $$titlePath: this.titlePath(),\n    ctx:\n      this.ctx && this.ctx.currentTest\n        ? {\n            currentTest: {\n              title: this.ctx.currentTest.title,\n              [MOCHA_ID_PROP_NAME]: this.ctx.currentTest.id\n            }\n          }\n        : {},\n    parent: {\n      [MOCHA_ID_PROP_NAME]: this.parent.id\n    },\n    title: this.title,\n    type: this.type,\n    [MOCHA_ID_PROP_NAME]: this.id\n  };\n};\n","'use strict';\n\n/**\n * Module dependencies.\n * @private\n */\nconst {EventEmitter} = require('events');\nconst Hook = require('./hook');\nvar {\n  assignNewMochaID,\n  clamp,\n  constants: utilsConstants,\n  createMap,\n  defineConstants,\n  getMochaID,\n  inherits,\n  isString\n} = require('./utils');\nconst debug = require('debug')('mocha:suite');\nconst milliseconds = require('ms');\nconst errors = require('./errors');\n\nconst {MOCHA_ID_PROP_NAME} = utilsConstants;\n\n/**\n * Expose `Suite`.\n */\n\nexports = module.exports = Suite;\n\n/**\n * Create a new `Suite` with the given `title` and parent `Suite`.\n *\n * @public\n * @param {Suite} parent - Parent suite (required!)\n * @param {string} title - Title\n * @return {Suite}\n */\nSuite.create = function(parent, title) {\n  var suite = new Suite(title, parent.ctx);\n  suite.parent = parent;\n  title = suite.fullTitle();\n  parent.addSuite(suite);\n  return suite;\n};\n\n/**\n * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`.\n *\n * @public\n * @class\n * @extends EventEmitter\n * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter}\n * @param {string} title - Suite title.\n * @param {Context} parentContext - Parent context instance.\n * @param {boolean} [isRoot=false] - Whether this is the root suite.\n */\nfunction Suite(title, parentContext, isRoot) {\n  if (!isString(title)) {\n    throw errors.createInvalidArgumentTypeError(\n      'Suite argument \"title\" must be a string. Received type \"' +\n        typeof title +\n        '\"',\n      'title',\n      'string'\n    );\n  }\n  this.title = title;\n  function Context() {}\n  Context.prototype = parentContext;\n  this.ctx = new Context();\n  this.suites = [];\n  this.tests = [];\n  this.root = isRoot === true;\n  this.pending = false;\n  this._retries = -1;\n  this._beforeEach = [];\n  this._beforeAll = [];\n  this._afterEach = [];\n  this._afterAll = [];\n  this._timeout = 2000;\n  this._slow = 75;\n  this._bail = false;\n  this._onlyTests = [];\n  this._onlySuites = [];\n  assignNewMochaID(this);\n\n  Object.defineProperty(this, 'id', {\n    get() {\n      return getMochaID(this);\n    }\n  });\n\n  this.reset();\n\n  this.on('newListener', function(event) {\n    if (deprecatedEvents[event]) {\n      errors.deprecate(\n        'Event \"' +\n          event +\n          '\" is deprecated.  Please let the Mocha team know about your use case: https://git.io/v6Lwm'\n      );\n    }\n  });\n}\n\n/**\n * Inherit from `EventEmitter.prototype`.\n */\ninherits(Suite, EventEmitter);\n\n/**\n * Resets the state initially or for a next run.\n */\nSuite.prototype.reset = function() {\n  this.delayed = false;\n  function doReset(thingToReset) {\n    thingToReset.reset();\n  }\n  this.suites.forEach(doReset);\n  this.tests.forEach(doReset);\n  this._beforeEach.forEach(doReset);\n  this._afterEach.forEach(doReset);\n  this._beforeAll.forEach(doReset);\n  this._afterAll.forEach(doReset);\n};\n\n/**\n * Return a clone of this `Suite`.\n *\n * @private\n * @return {Suite}\n */\nSuite.prototype.clone = function() {\n  var suite = new Suite(this.title);\n  debug('clone');\n  suite.ctx = this.ctx;\n  suite.root = this.root;\n  suite.timeout(this.timeout());\n  suite.retries(this.retries());\n  suite.slow(this.slow());\n  suite.bail(this.bail());\n  return suite;\n};\n\n/**\n * Set or get timeout `ms` or short-hand such as \"2s\".\n *\n * @private\n * @todo Do not attempt to set value if `ms` is undefined\n * @param {number|string} ms\n * @return {Suite|number} for chaining\n */\nSuite.prototype.timeout = function(ms) {\n  if (!arguments.length) {\n    return this._timeout;\n  }\n  if (typeof ms === 'string') {\n    ms = milliseconds(ms);\n  }\n\n  // Clamp to range\n  var INT_MAX = Math.pow(2, 31) - 1;\n  var range = [0, INT_MAX];\n  ms = clamp(ms, range);\n\n  debug('timeout %d', ms);\n  this._timeout = parseInt(ms, 10);\n  return this;\n};\n\n/**\n * Set or get number of times to retry a failed test.\n *\n * @private\n * @param {number|string} n\n * @return {Suite|number} for chaining\n */\nSuite.prototype.retries = function(n) {\n  if (!arguments.length) {\n    return this._retries;\n  }\n  debug('retries %d', n);\n  this._retries = parseInt(n, 10) || 0;\n  return this;\n};\n\n/**\n * Set or get slow `ms` or short-hand such as \"2s\".\n *\n * @private\n * @param {number|string} ms\n * @return {Suite|number} for chaining\n */\nSuite.prototype.slow = function(ms) {\n  if (!arguments.length) {\n    return this._slow;\n  }\n  if (typeof ms === 'string') {\n    ms = milliseconds(ms);\n  }\n  debug('slow %d', ms);\n  this._slow = ms;\n  return this;\n};\n\n/**\n * Set or get whether to bail after first error.\n *\n * @private\n * @param {boolean} bail\n * @return {Suite|number} for chaining\n */\nSuite.prototype.bail = function(bail) {\n  if (!arguments.length) {\n    return this._bail;\n  }\n  debug('bail %s', bail);\n  this._bail = bail;\n  return this;\n};\n\n/**\n * Check if this suite or its parent suite is marked as pending.\n *\n * @private\n */\nSuite.prototype.isPending = function() {\n  return this.pending || (this.parent && this.parent.isPending());\n};\n\n/**\n * Generic hook-creator.\n * @private\n * @param {string} title - Title of hook\n * @param {Function} fn - Hook callback\n * @returns {Hook} A new hook\n */\nSuite.prototype._createHook = function(title, fn) {\n  var hook = new Hook(title, fn);\n  hook.parent = this;\n  hook.timeout(this.timeout());\n  hook.retries(this.retries());\n  hook.slow(this.slow());\n  hook.ctx = this.ctx;\n  hook.file = this.file;\n  return hook;\n};\n\n/**\n * Run `fn(test[, done])` before running tests.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\nSuite.prototype.beforeAll = function(title, fn) {\n  if (this.isPending()) {\n    return this;\n  }\n  if (typeof title === 'function') {\n    fn = title;\n    title = fn.name;\n  }\n  title = '\"before all\" hook' + (title ? ': ' + title : '');\n\n  var hook = this._createHook(title, fn);\n  this._beforeAll.push(hook);\n  this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook);\n  return this;\n};\n\n/**\n * Run `fn(test[, done])` after running tests.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\nSuite.prototype.afterAll = function(title, fn) {\n  if (this.isPending()) {\n    return this;\n  }\n  if (typeof title === 'function') {\n    fn = title;\n    title = fn.name;\n  }\n  title = '\"after all\" hook' + (title ? ': ' + title : '');\n\n  var hook = this._createHook(title, fn);\n  this._afterAll.push(hook);\n  this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook);\n  return this;\n};\n\n/**\n * Run `fn(test[, done])` before each test case.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\nSuite.prototype.beforeEach = function(title, fn) {\n  if (this.isPending()) {\n    return this;\n  }\n  if (typeof title === 'function') {\n    fn = title;\n    title = fn.name;\n  }\n  title = '\"before each\" hook' + (title ? ': ' + title : '');\n\n  var hook = this._createHook(title, fn);\n  this._beforeEach.push(hook);\n  this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook);\n  return this;\n};\n\n/**\n * Run `fn(test[, done])` after each test case.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\nSuite.prototype.afterEach = function(title, fn) {\n  if (this.isPending()) {\n    return this;\n  }\n  if (typeof title === 'function') {\n    fn = title;\n    title = fn.name;\n  }\n  title = '\"after each\" hook' + (title ? ': ' + title : '');\n\n  var hook = this._createHook(title, fn);\n  this._afterEach.push(hook);\n  this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook);\n  return this;\n};\n\n/**\n * Add a test `suite`.\n *\n * @private\n * @param {Suite} suite\n * @return {Suite} for chaining\n */\nSuite.prototype.addSuite = function(suite) {\n  suite.parent = this;\n  suite.root = false;\n  suite.timeout(this.timeout());\n  suite.retries(this.retries());\n  suite.slow(this.slow());\n  suite.bail(this.bail());\n  this.suites.push(suite);\n  this.emit(constants.EVENT_SUITE_ADD_SUITE, suite);\n  return this;\n};\n\n/**\n * Add a `test` to this suite.\n *\n * @private\n * @param {Test} test\n * @return {Suite} for chaining\n */\nSuite.prototype.addTest = function(test) {\n  test.parent = this;\n  test.timeout(this.timeout());\n  test.retries(this.retries());\n  test.slow(this.slow());\n  test.ctx = this.ctx;\n  this.tests.push(test);\n  this.emit(constants.EVENT_SUITE_ADD_TEST, test);\n  return this;\n};\n\n/**\n * Return the full title generated by recursively concatenating the parent's\n * full title.\n *\n * @memberof Suite\n * @public\n * @return {string}\n */\nSuite.prototype.fullTitle = function() {\n  return this.titlePath().join(' ');\n};\n\n/**\n * Return the title path generated by recursively concatenating the parent's\n * title path.\n *\n * @memberof Suite\n * @public\n * @return {string}\n */\nSuite.prototype.titlePath = function() {\n  var result = [];\n  if (this.parent) {\n    result = result.concat(this.parent.titlePath());\n  }\n  if (!this.root) {\n    result.push(this.title);\n  }\n  return result;\n};\n\n/**\n * Return the total number of tests.\n *\n * @memberof Suite\n * @public\n * @return {number}\n */\nSuite.prototype.total = function() {\n  return (\n    this.suites.reduce(function(sum, suite) {\n      return sum + suite.total();\n    }, 0) + this.tests.length\n  );\n};\n\n/**\n * Iterates through each suite recursively to find all tests. Applies a\n * function in the format `fn(test)`.\n *\n * @private\n * @param {Function} fn\n * @return {Suite}\n */\nSuite.prototype.eachTest = function(fn) {\n  this.tests.forEach(fn);\n  this.suites.forEach(function(suite) {\n    suite.eachTest(fn);\n  });\n  return this;\n};\n\n/**\n * This will run the root suite if we happen to be running in delayed mode.\n * @private\n */\nSuite.prototype.run = function run() {\n  if (this.root) {\n    this.emit(constants.EVENT_ROOT_SUITE_RUN);\n  }\n};\n\n/**\n * Determines whether a suite has an `only` test or suite as a descendant.\n *\n * @private\n * @returns {Boolean}\n */\nSuite.prototype.hasOnly = function hasOnly() {\n  return (\n    this._onlyTests.length > 0 ||\n    this._onlySuites.length > 0 ||\n    this.suites.some(function(suite) {\n      return suite.hasOnly();\n    })\n  );\n};\n\n/**\n * Filter suites based on `isOnly` logic.\n *\n * @private\n * @returns {Boolean}\n */\nSuite.prototype.filterOnly = function filterOnly() {\n  if (this._onlyTests.length) {\n    // If the suite contains `only` tests, run those and ignore any nested suites.\n    this.tests = this._onlyTests;\n    this.suites = [];\n  } else {\n    // Otherwise, do not run any of the tests in this suite.\n    this.tests = [];\n    this._onlySuites.forEach(function(onlySuite) {\n      // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite.\n      // Otherwise, all of the tests on this `only` suite should be run, so don't filter it.\n      if (onlySuite.hasOnly()) {\n        onlySuite.filterOnly();\n      }\n    });\n    // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants.\n    var onlySuites = this._onlySuites;\n    this.suites = this.suites.filter(function(childSuite) {\n      return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly();\n    });\n  }\n  // Keep the suite only if there is something to run\n  return this.tests.length > 0 || this.suites.length > 0;\n};\n\n/**\n * Adds a suite to the list of subsuites marked `only`.\n *\n * @private\n * @param {Suite} suite\n */\nSuite.prototype.appendOnlySuite = function(suite) {\n  this._onlySuites.push(suite);\n};\n\n/**\n * Marks a suite to be `only`.\n *\n * @private\n */\nSuite.prototype.markOnly = function() {\n  this.parent && this.parent.appendOnlySuite(this);\n};\n\n/**\n * Adds a test to the list of tests marked `only`.\n *\n * @private\n * @param {Test} test\n */\nSuite.prototype.appendOnlyTest = function(test) {\n  this._onlyTests.push(test);\n};\n\n/**\n * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants.\n * @private\n */\nSuite.prototype.getHooks = function getHooks(name) {\n  return this['_' + name];\n};\n\n/**\n * cleans all references from this suite and all child suites.\n */\nSuite.prototype.dispose = function() {\n  this.suites.forEach(function(suite) {\n    suite.dispose();\n  });\n  this.cleanReferences();\n};\n\n/**\n * Cleans up the references to all the deferred functions\n * (before/after/beforeEach/afterEach) and tests of a Suite.\n * These must be deleted otherwise a memory leak can happen,\n * as those functions may reference variables from closures,\n * thus those variables can never be garbage collected as long\n * as the deferred functions exist.\n *\n * @private\n */\nSuite.prototype.cleanReferences = function cleanReferences() {\n  function cleanArrReferences(arr) {\n    for (var i = 0; i < arr.length; i++) {\n      delete arr[i].fn;\n    }\n  }\n\n  if (Array.isArray(this._beforeAll)) {\n    cleanArrReferences(this._beforeAll);\n  }\n\n  if (Array.isArray(this._beforeEach)) {\n    cleanArrReferences(this._beforeEach);\n  }\n\n  if (Array.isArray(this._afterAll)) {\n    cleanArrReferences(this._afterAll);\n  }\n\n  if (Array.isArray(this._afterEach)) {\n    cleanArrReferences(this._afterEach);\n  }\n\n  for (var i = 0; i < this.tests.length; i++) {\n    delete this.tests[i].fn;\n  }\n};\n\n/**\n * Returns an object suitable for IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\nSuite.prototype.serialize = function serialize() {\n  return {\n    _bail: this._bail,\n    $$fullTitle: this.fullTitle(),\n    $$isPending: this.isPending(),\n    root: this.root,\n    title: this.title,\n    id: this.id,\n    parent: this.parent ? {[MOCHA_ID_PROP_NAME]: this.parent.id} : null\n  };\n};\n\nvar constants = defineConstants(\n  /**\n   * {@link Suite}-related constants.\n   * @public\n   * @memberof Suite\n   * @alias constants\n   * @readonly\n   * @static\n   * @enum {string}\n   */\n  {\n    /**\n     * Event emitted after a test file has been loaded Not emitted in browser.\n     */\n    EVENT_FILE_POST_REQUIRE: 'post-require',\n    /**\n     * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected.\n     */\n    EVENT_FILE_PRE_REQUIRE: 'pre-require',\n    /**\n     * Event emitted immediately after a test file has been loaded. Not emitted in browser.\n     */\n    EVENT_FILE_REQUIRE: 'require',\n    /**\n     * Event emitted when `global.run()` is called (use with `delay` option)\n     */\n    EVENT_ROOT_SUITE_RUN: 'run',\n\n    /**\n     * Namespace for collection of a `Suite`'s \"after all\" hooks\n     */\n    HOOK_TYPE_AFTER_ALL: 'afterAll',\n    /**\n     * Namespace for collection of a `Suite`'s \"after each\" hooks\n     */\n    HOOK_TYPE_AFTER_EACH: 'afterEach',\n    /**\n     * Namespace for collection of a `Suite`'s \"before all\" hooks\n     */\n    HOOK_TYPE_BEFORE_ALL: 'beforeAll',\n    /**\n     * Namespace for collection of a `Suite`'s \"before all\" hooks\n     */\n    HOOK_TYPE_BEFORE_EACH: 'beforeEach',\n\n    // the following events are all deprecated\n\n    /**\n     * Emitted after an \"after all\" `Hook` has been added to a `Suite`. Deprecated\n     */\n    EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll',\n    /**\n     * Emitted after an \"after each\" `Hook` has been added to a `Suite` Deprecated\n     */\n    EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach',\n    /**\n     * Emitted after an \"before all\" `Hook` has been added to a `Suite` Deprecated\n     */\n    EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll',\n    /**\n     * Emitted after an \"before each\" `Hook` has been added to a `Suite` Deprecated\n     */\n    EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach',\n    /**\n     * Emitted after a child `Suite` has been added to a `Suite`. Deprecated\n     */\n    EVENT_SUITE_ADD_SUITE: 'suite',\n    /**\n     * Emitted after a `Test` has been added to a `Suite`. Deprecated\n     */\n    EVENT_SUITE_ADD_TEST: 'test'\n  }\n);\n\n/**\n * @summary There are no known use cases for these events.\n * @desc This is a `Set`-like object having all keys being the constant's string value and the value being `true`.\n * @todo Remove eventually\n * @type {Object<string,boolean>}\n * @ignore\n */\nvar deprecatedEvents = Object.keys(constants)\n  .filter(function(constant) {\n    return constant.substring(0, 15) === 'EVENT_SUITE_ADD';\n  })\n  .reduce(function(acc, constant) {\n    acc[constants[constant]] = true;\n    return acc;\n  }, createMap());\n\nSuite.constants = constants;\n","'use strict';\n\n/**\n * Module dependencies.\n * @private\n */\nvar util = require('util');\nvar EventEmitter = require('events').EventEmitter;\nvar Pending = require('./pending');\nvar utils = require('./utils');\nvar debug = require('debug')('mocha:runner');\nvar Runnable = require('./runnable');\nvar Suite = require('./suite');\nvar HOOK_TYPE_BEFORE_EACH = Suite.constants.HOOK_TYPE_BEFORE_EACH;\nvar HOOK_TYPE_AFTER_EACH = Suite.constants.HOOK_TYPE_AFTER_EACH;\nvar HOOK_TYPE_AFTER_ALL = Suite.constants.HOOK_TYPE_AFTER_ALL;\nvar HOOK_TYPE_BEFORE_ALL = Suite.constants.HOOK_TYPE_BEFORE_ALL;\nvar EVENT_ROOT_SUITE_RUN = Suite.constants.EVENT_ROOT_SUITE_RUN;\nvar STATE_FAILED = Runnable.constants.STATE_FAILED;\nvar STATE_PASSED = Runnable.constants.STATE_PASSED;\nvar STATE_PENDING = Runnable.constants.STATE_PENDING;\nvar dQuote = utils.dQuote;\nvar sQuote = utils.sQuote;\nvar stackFilter = utils.stackTraceFilter();\nvar stringify = utils.stringify;\n\nconst {\n  createInvalidExceptionError,\n  createUnsupportedError,\n  createFatalError,\n  isMochaError,\n  constants: errorConstants\n} = require('./errors');\n\n/**\n * Non-enumerable globals.\n * @private\n * @readonly\n */\nvar globals = [\n  'setTimeout',\n  'clearTimeout',\n  'setInterval',\n  'clearInterval',\n  'XMLHttpRequest',\n  'Date',\n  'setImmediate',\n  'clearImmediate'\n];\n\nvar constants = utils.defineConstants(\n  /**\n   * {@link Runner}-related constants.\n   * @public\n   * @memberof Runner\n   * @readonly\n   * @alias constants\n   * @static\n   * @enum {string}\n   */\n  {\n    /**\n     * Emitted when {@link Hook} execution begins\n     */\n    EVENT_HOOK_BEGIN: 'hook',\n    /**\n     * Emitted when {@link Hook} execution ends\n     */\n    EVENT_HOOK_END: 'hook end',\n    /**\n     * Emitted when Root {@link Suite} execution begins (all files have been parsed and hooks/tests are ready for execution)\n     */\n    EVENT_RUN_BEGIN: 'start',\n    /**\n     * Emitted when Root {@link Suite} execution has been delayed via `delay` option\n     */\n    EVENT_DELAY_BEGIN: 'waiting',\n    /**\n     * Emitted when delayed Root {@link Suite} execution is triggered by user via `global.run()`\n     */\n    EVENT_DELAY_END: 'ready',\n    /**\n     * Emitted when Root {@link Suite} execution ends\n     */\n    EVENT_RUN_END: 'end',\n    /**\n     * Emitted when {@link Suite} execution begins\n     */\n    EVENT_SUITE_BEGIN: 'suite',\n    /**\n     * Emitted when {@link Suite} execution ends\n     */\n    EVENT_SUITE_END: 'suite end',\n    /**\n     * Emitted when {@link Test} execution begins\n     */\n    EVENT_TEST_BEGIN: 'test',\n    /**\n     * Emitted when {@link Test} execution ends\n     */\n    EVENT_TEST_END: 'test end',\n    /**\n     * Emitted when {@link Test} execution fails\n     */\n    EVENT_TEST_FAIL: 'fail',\n    /**\n     * Emitted when {@link Test} execution succeeds\n     */\n    EVENT_TEST_PASS: 'pass',\n    /**\n     * Emitted when {@link Test} becomes pending\n     */\n    EVENT_TEST_PENDING: 'pending',\n    /**\n     * Emitted when {@link Test} execution has failed, but will retry\n     */\n    EVENT_TEST_RETRY: 'retry',\n    /**\n     * Initial state of Runner\n     */\n    STATE_IDLE: 'idle',\n    /**\n     * State set to this value when the Runner has started running\n     */\n    STATE_RUNNING: 'running',\n    /**\n     * State set to this value when the Runner has stopped\n     */\n    STATE_STOPPED: 'stopped'\n  }\n);\n\nclass Runner extends EventEmitter {\n  /**\n   * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}.\n   *\n   * @extends external:EventEmitter\n   * @public\n   * @class\n   * @param {Suite} suite - Root suite\n   * @param {Object|boolean} [opts] - Options. If `boolean`, whether or not to delay execution of root suite until ready (for backwards compatibility).\n   * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready.\n   * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done.\n   */\n  constructor(suite, opts) {\n    super();\n    if (opts === undefined) {\n      opts = {};\n    }\n    if (typeof opts === 'boolean') {\n      // TODO: deprecate this\n      this._delay = opts;\n      opts = {};\n    } else {\n      this._delay = opts.delay;\n    }\n    var self = this;\n    this._globals = [];\n    this._abort = false;\n    this.suite = suite;\n    this._opts = opts;\n    this.state = constants.STATE_IDLE;\n    this.total = suite.total();\n    this.failures = 0;\n    /**\n     * @type {Map<EventEmitter,Map<string,Set<EventListener>>>}\n     */\n    this._eventListeners = new Map();\n    this.on(constants.EVENT_TEST_END, function(test) {\n      if (test.type === 'test' && test.retriedTest() && test.parent) {\n        var idx =\n          test.parent.tests && test.parent.tests.indexOf(test.retriedTest());\n        if (idx > -1) test.parent.tests[idx] = test;\n      }\n      self.checkGlobals(test);\n    });\n    this.on(constants.EVENT_HOOK_END, function(hook) {\n      self.checkGlobals(hook);\n    });\n    this._defaultGrep = /.*/;\n    this.grep(this._defaultGrep);\n    this.globals(this.globalProps());\n\n    this.uncaught = this._uncaught.bind(this);\n    this.unhandled = (reason, promise) => {\n      if (isMochaError(reason)) {\n        debug(\n          'trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:',\n          reason\n        );\n        this.uncaught(reason);\n      } else {\n        debug(\n          'trapped unhandled rejection from (probably) user code; re-emitting on process'\n        );\n        this._removeEventListener(\n          process,\n          'unhandledRejection',\n          this.unhandled\n        );\n        try {\n          process.emit('unhandledRejection', reason, promise);\n        } finally {\n          this._addEventListener(process, 'unhandledRejection', this.unhandled);\n        }\n      }\n    };\n  }\n}\n\n/**\n * Wrapper for setImmediate, process.nextTick, or browser polyfill.\n *\n * @param {Function} fn\n * @private\n */\nRunner.immediately = global.setImmediate || process.nextTick;\n\n/**\n * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed.\n * @param {EventEmitter} target - The `EventEmitter`\n * @param {string} eventName - The event name\n * @param {string} fn - Listener function\n * @private\n */\nRunner.prototype._addEventListener = function(target, eventName, listener) {\n  debug(\n    '_addEventListener(): adding for event %s; %d current listeners',\n    eventName,\n    target.listenerCount(eventName)\n  );\n  /* istanbul ignore next */\n  if (\n    this._eventListeners.has(target) &&\n    this._eventListeners.get(target).has(eventName) &&\n    this._eventListeners\n      .get(target)\n      .get(eventName)\n      .has(listener)\n  ) {\n    debug(\n      'warning: tried to attach duplicate event listener for %s',\n      eventName\n    );\n    return;\n  }\n  target.on(eventName, listener);\n  const targetListeners = this._eventListeners.has(target)\n    ? this._eventListeners.get(target)\n    : new Map();\n  const targetEventListeners = targetListeners.has(eventName)\n    ? targetListeners.get(eventName)\n    : new Set();\n  targetEventListeners.add(listener);\n  targetListeners.set(eventName, targetEventListeners);\n  this._eventListeners.set(target, targetListeners);\n};\n\n/**\n * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping.\n * @param {EventEmitter} target - The `EventEmitter`\n * @param {string} eventName - The event name\n * @param {function} listener - Listener function\n * @private\n */\nRunner.prototype._removeEventListener = function(target, eventName, listener) {\n  target.removeListener(eventName, listener);\n\n  if (this._eventListeners.has(target)) {\n    const targetListeners = this._eventListeners.get(target);\n    if (targetListeners.has(eventName)) {\n      const targetEventListeners = targetListeners.get(eventName);\n      targetEventListeners.delete(listener);\n      if (!targetEventListeners.size) {\n        targetListeners.delete(eventName);\n      }\n    }\n    if (!targetListeners.size) {\n      this._eventListeners.delete(target);\n    }\n  } else {\n    debug('trying to remove listener for untracked object %s', target);\n  }\n};\n\n/**\n * Removes all event handlers set during a run on this instance.\n * Remark: this does _not_ clean/dispose the tests or suites themselves.\n */\nRunner.prototype.dispose = function() {\n  this.removeAllListeners();\n  this._eventListeners.forEach((targetListeners, target) => {\n    targetListeners.forEach((targetEventListeners, eventName) => {\n      targetEventListeners.forEach(listener => {\n        target.removeListener(eventName, listener);\n      });\n    });\n  });\n  this._eventListeners.clear();\n};\n\n/**\n * Run tests with full titles matching `re`. Updates runner.total\n * with number of tests matched.\n *\n * @public\n * @memberof Runner\n * @param {RegExp} re\n * @param {boolean} invert\n * @return {Runner} Runner instance.\n */\nRunner.prototype.grep = function(re, invert) {\n  debug('grep(): setting to %s', re);\n  this._grep = re;\n  this._invert = invert;\n  this.total = this.grepTotal(this.suite);\n  return this;\n};\n\n/**\n * Returns the number of tests matching the grep search for the\n * given suite.\n *\n * @memberof Runner\n * @public\n * @param {Suite} suite\n * @return {number}\n */\nRunner.prototype.grepTotal = function(suite) {\n  var self = this;\n  var total = 0;\n\n  suite.eachTest(function(test) {\n    var match = self._grep.test(test.fullTitle());\n    if (self._invert) {\n      match = !match;\n    }\n    if (match) {\n      total++;\n    }\n  });\n\n  return total;\n};\n\n/**\n * Return a list of global properties.\n *\n * @return {Array}\n * @private\n */\nRunner.prototype.globalProps = function() {\n  var props = Object.keys(global);\n\n  // non-enumerables\n  for (var i = 0; i < globals.length; ++i) {\n    if (~props.indexOf(globals[i])) {\n      continue;\n    }\n    props.push(globals[i]);\n  }\n\n  return props;\n};\n\n/**\n * Allow the given `arr` of globals.\n *\n * @public\n * @memberof Runner\n * @param {Array} arr\n * @return {Runner} Runner instance.\n */\nRunner.prototype.globals = function(arr) {\n  if (!arguments.length) {\n    return this._globals;\n  }\n  debug('globals(): setting to %O', arr);\n  this._globals = this._globals.concat(arr);\n  return this;\n};\n\n/**\n * Check for global variable leaks.\n *\n * @private\n */\nRunner.prototype.checkGlobals = function(test) {\n  if (!this.checkLeaks) {\n    return;\n  }\n  var ok = this._globals;\n\n  var globals = this.globalProps();\n  var leaks;\n\n  if (test) {\n    ok = ok.concat(test._allowedGlobals || []);\n  }\n\n  if (this.prevGlobalsLength === globals.length) {\n    return;\n  }\n  this.prevGlobalsLength = globals.length;\n\n  leaks = filterLeaks(ok, globals);\n  this._globals = this._globals.concat(leaks);\n\n  if (leaks.length) {\n    var msg = 'global leak(s) detected: %s';\n    var error = new Error(util.format(msg, leaks.map(sQuote).join(', ')));\n    this.fail(test, error);\n  }\n};\n\n/**\n * Fail the given `test`.\n *\n * If `test` is a hook, failures work in the following pattern:\n * - If bail, run corresponding `after each` and `after` hooks,\n *   then exit\n * - Failed `before` hook skips all tests in a suite and subsuites,\n *   but jumps to corresponding `after` hook\n * - Failed `before each` hook skips remaining tests in a\n *   suite and jumps to corresponding `after each` hook,\n *   which is run only once\n * - Failed `after` hook does not alter execution order\n * - Failed `after each` hook skips remaining tests in a\n *   suite and subsuites, but executes other `after each`\n *   hooks\n *\n * @private\n * @param {Runnable} test\n * @param {Error} err\n * @param {boolean} [force=false] - Whether to fail a pending test.\n */\nRunner.prototype.fail = function(test, err, force) {\n  force = force === true;\n  if (test.isPending() && !force) {\n    return;\n  }\n  if (this.state === constants.STATE_STOPPED) {\n    if (err.code === errorConstants.MULTIPLE_DONE) {\n      throw err;\n    }\n    throw createFatalError(\n      'Test failed after root suite execution completed!',\n      err\n    );\n  }\n\n  ++this.failures;\n  debug('total number of failures: %d', this.failures);\n  test.state = STATE_FAILED;\n\n  if (!isError(err)) {\n    err = thrown2Error(err);\n  }\n\n  try {\n    err.stack =\n      this.fullStackTrace || !err.stack ? err.stack : stackFilter(err.stack);\n  } catch (ignore) {\n    // some environments do not take kindly to monkeying with the stack\n  }\n\n  this.emit(constants.EVENT_TEST_FAIL, test, err);\n};\n\n/**\n * Run hook `name` callbacks and then invoke `fn()`.\n *\n * @private\n * @param {string} name\n * @param {Function} fn\n */\n\nRunner.prototype.hook = function(name, fn) {\n  var suite = this.suite;\n  var hooks = suite.getHooks(name);\n  var self = this;\n\n  function next(i) {\n    var hook = hooks[i];\n    if (!hook) {\n      return fn();\n    }\n    self.currentRunnable = hook;\n\n    if (name === HOOK_TYPE_BEFORE_ALL) {\n      hook.ctx.currentTest = hook.parent.tests[0];\n    } else if (name === HOOK_TYPE_AFTER_ALL) {\n      hook.ctx.currentTest = hook.parent.tests[hook.parent.tests.length - 1];\n    } else {\n      hook.ctx.currentTest = self.test;\n    }\n\n    setHookTitle(hook);\n\n    hook.allowUncaught = self.allowUncaught;\n\n    self.emit(constants.EVENT_HOOK_BEGIN, hook);\n\n    if (!hook.listeners('error').length) {\n      self._addEventListener(hook, 'error', function(err) {\n        self.fail(hook, err);\n      });\n    }\n\n    hook.run(function cbHookRun(err) {\n      var testError = hook.error();\n      if (testError) {\n        self.fail(self.test, testError);\n      }\n      // conditional skip\n      if (hook.pending) {\n        if (name === HOOK_TYPE_AFTER_EACH) {\n          // TODO define and implement use case\n          if (self.test) {\n            self.test.pending = true;\n          }\n        } else if (name === HOOK_TYPE_BEFORE_EACH) {\n          if (self.test) {\n            self.test.pending = true;\n          }\n          self.emit(constants.EVENT_HOOK_END, hook);\n          hook.pending = false; // activates hook for next test\n          return fn(new Error('abort hookDown'));\n        } else if (name === HOOK_TYPE_BEFORE_ALL) {\n          suite.tests.forEach(function(test) {\n            test.pending = true;\n          });\n          suite.suites.forEach(function(suite) {\n            suite.pending = true;\n          });\n          hooks = [];\n        } else {\n          hook.pending = false;\n          var errForbid = createUnsupportedError('`this.skip` forbidden');\n          self.fail(hook, errForbid);\n          return fn(errForbid);\n        }\n      } else if (err) {\n        self.fail(hook, err);\n        // stop executing hooks, notify callee of hook err\n        return fn(err);\n      }\n      self.emit(constants.EVENT_HOOK_END, hook);\n      delete hook.ctx.currentTest;\n      setHookTitle(hook);\n      next(++i);\n    });\n\n    function setHookTitle(hook) {\n      hook.originalTitle = hook.originalTitle || hook.title;\n      if (hook.ctx && hook.ctx.currentTest) {\n        hook.title =\n          hook.originalTitle + ' for ' + dQuote(hook.ctx.currentTest.title);\n      } else {\n        var parentTitle;\n        if (hook.parent.title) {\n          parentTitle = hook.parent.title;\n        } else {\n          parentTitle = hook.parent.root ? '{root}' : '';\n        }\n        hook.title = hook.originalTitle + ' in ' + dQuote(parentTitle);\n      }\n    }\n  }\n\n  Runner.immediately(function() {\n    next(0);\n  });\n};\n\n/**\n * Run hook `name` for the given array of `suites`\n * in order, and callback `fn(err, errSuite)`.\n *\n * @private\n * @param {string} name\n * @param {Array} suites\n * @param {Function} fn\n */\nRunner.prototype.hooks = function(name, suites, fn) {\n  var self = this;\n  var orig = this.suite;\n\n  function next(suite) {\n    self.suite = suite;\n\n    if (!suite) {\n      self.suite = orig;\n      return fn();\n    }\n\n    self.hook(name, function(err) {\n      if (err) {\n        var errSuite = self.suite;\n        self.suite = orig;\n        return fn(err, errSuite);\n      }\n\n      next(suites.pop());\n    });\n  }\n\n  next(suites.pop());\n};\n\n/**\n * Run hooks from the top level down.\n *\n * @param {String} name\n * @param {Function} fn\n * @private\n */\nRunner.prototype.hookUp = function(name, fn) {\n  var suites = [this.suite].concat(this.parents()).reverse();\n  this.hooks(name, suites, fn);\n};\n\n/**\n * Run hooks from the bottom up.\n *\n * @param {String} name\n * @param {Function} fn\n * @private\n */\nRunner.prototype.hookDown = function(name, fn) {\n  var suites = [this.suite].concat(this.parents());\n  this.hooks(name, suites, fn);\n};\n\n/**\n * Return an array of parent Suites from\n * closest to furthest.\n *\n * @return {Array}\n * @private\n */\nRunner.prototype.parents = function() {\n  var suite = this.suite;\n  var suites = [];\n  while (suite.parent) {\n    suite = suite.parent;\n    suites.push(suite);\n  }\n  return suites;\n};\n\n/**\n * Run the current test and callback `fn(err)`.\n *\n * @param {Function} fn\n * @private\n */\nRunner.prototype.runTest = function(fn) {\n  var self = this;\n  var test = this.test;\n\n  if (!test) {\n    return;\n  }\n\n  if (this.asyncOnly) {\n    test.asyncOnly = true;\n  }\n  this._addEventListener(test, 'error', function(err) {\n    self.fail(test, err);\n  });\n  if (this.allowUncaught) {\n    test.allowUncaught = true;\n    return test.run(fn);\n  }\n  try {\n    test.run(fn);\n  } catch (err) {\n    fn(err);\n  }\n};\n\n/**\n * Run tests in the given `suite` and invoke the callback `fn()` when complete.\n *\n * @private\n * @param {Suite} suite\n * @param {Function} fn\n */\nRunner.prototype.runTests = function(suite, fn) {\n  var self = this;\n  var tests = suite.tests.slice();\n  var test;\n\n  function hookErr(_, errSuite, after) {\n    // before/after Each hook for errSuite failed:\n    var orig = self.suite;\n\n    // for failed 'after each' hook start from errSuite parent,\n    // otherwise start from errSuite itself\n    self.suite = after ? errSuite.parent : errSuite;\n\n    if (self.suite) {\n      // call hookUp afterEach\n      self.hookUp(HOOK_TYPE_AFTER_EACH, function(err2, errSuite2) {\n        self.suite = orig;\n        // some hooks may fail even now\n        if (err2) {\n          return hookErr(err2, errSuite2, true);\n        }\n        // report error suite\n        fn(errSuite);\n      });\n    } else {\n      // there is no need calling other 'after each' hooks\n      self.suite = orig;\n      fn(errSuite);\n    }\n  }\n\n  function next(err, errSuite) {\n    // if we bail after first err\n    if (self.failures && suite._bail) {\n      tests = [];\n    }\n\n    if (self._abort) {\n      return fn();\n    }\n\n    if (err) {\n      return hookErr(err, errSuite, true);\n    }\n\n    // next test\n    test = tests.shift();\n\n    // all done\n    if (!test) {\n      return fn();\n    }\n\n    // grep\n    var match = self._grep.test(test.fullTitle());\n    if (self._invert) {\n      match = !match;\n    }\n    if (!match) {\n      // Run immediately only if we have defined a grep. When we\n      // define a grep — It can cause maximum callstack error if\n      // the grep is doing a large recursive loop by neglecting\n      // all tests. The run immediately function also comes with\n      // a performance cost. So we don't want to run immediately\n      // if we run the whole test suite, because running the whole\n      // test suite don't do any immediate recursive loops. Thus,\n      // allowing a JS runtime to breathe.\n      if (self._grep !== self._defaultGrep) {\n        Runner.immediately(next);\n      } else {\n        next();\n      }\n      return;\n    }\n\n    // static skip, no hooks are executed\n    if (test.isPending()) {\n      if (self.forbidPending) {\n        self.fail(test, new Error('Pending test forbidden'), true);\n      } else {\n        test.state = STATE_PENDING;\n        self.emit(constants.EVENT_TEST_PENDING, test);\n      }\n      self.emit(constants.EVENT_TEST_END, test);\n      return next();\n    }\n\n    // execute test and hook(s)\n    self.emit(constants.EVENT_TEST_BEGIN, (self.test = test));\n    self.hookDown(HOOK_TYPE_BEFORE_EACH, function(err, errSuite) {\n      // conditional skip within beforeEach\n      if (test.isPending()) {\n        if (self.forbidPending) {\n          self.fail(test, new Error('Pending test forbidden'), true);\n        } else {\n          test.state = STATE_PENDING;\n          self.emit(constants.EVENT_TEST_PENDING, test);\n        }\n        self.emit(constants.EVENT_TEST_END, test);\n        // skip inner afterEach hooks below errSuite level\n        var origSuite = self.suite;\n        self.suite = errSuite || self.suite;\n        return self.hookUp(HOOK_TYPE_AFTER_EACH, function(e, eSuite) {\n          self.suite = origSuite;\n          next(e, eSuite);\n        });\n      }\n      if (err) {\n        return hookErr(err, errSuite, false);\n      }\n      self.currentRunnable = self.test;\n      self.runTest(function(err) {\n        test = self.test;\n        // conditional skip within it\n        if (test.pending) {\n          if (self.forbidPending) {\n            self.fail(test, new Error('Pending test forbidden'), true);\n          } else {\n            test.state = STATE_PENDING;\n            self.emit(constants.EVENT_TEST_PENDING, test);\n          }\n          self.emit(constants.EVENT_TEST_END, test);\n          return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n        } else if (err) {\n          var retry = test.currentRetry();\n          if (retry < test.retries()) {\n            var clonedTest = test.clone();\n            clonedTest.currentRetry(retry + 1);\n            tests.unshift(clonedTest);\n\n            self.emit(constants.EVENT_TEST_RETRY, test, err);\n\n            // Early return + hook trigger so that it doesn't\n            // increment the count wrong\n            return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n          } else {\n            self.fail(test, err);\n          }\n          self.emit(constants.EVENT_TEST_END, test);\n          return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n        }\n\n        test.state = STATE_PASSED;\n        self.emit(constants.EVENT_TEST_PASS, test);\n        self.emit(constants.EVENT_TEST_END, test);\n        self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n      });\n    });\n  }\n\n  this.next = next;\n  this.hookErr = hookErr;\n  next();\n};\n\n/**\n * Run the given `suite` and invoke the callback `fn()` when complete.\n *\n * @private\n * @param {Suite} suite\n * @param {Function} fn\n */\nRunner.prototype.runSuite = function(suite, fn) {\n  var i = 0;\n  var self = this;\n  var total = this.grepTotal(suite);\n\n  debug('runSuite(): running %s', suite.fullTitle());\n\n  if (!total || (self.failures && suite._bail)) {\n    debug('runSuite(): bailing');\n    return fn();\n  }\n\n  this.emit(constants.EVENT_SUITE_BEGIN, (this.suite = suite));\n\n  function next(errSuite) {\n    if (errSuite) {\n      // current suite failed on a hook from errSuite\n      if (errSuite === suite) {\n        // if errSuite is current suite\n        // continue to the next sibling suite\n        return done();\n      }\n      // errSuite is among the parents of current suite\n      // stop execution of errSuite and all sub-suites\n      return done(errSuite);\n    }\n\n    if (self._abort) {\n      return done();\n    }\n\n    var curr = suite.suites[i++];\n    if (!curr) {\n      return done();\n    }\n\n    // Avoid grep neglecting large number of tests causing a\n    // huge recursive loop and thus a maximum call stack error.\n    // See comment in `this.runTests()` for more information.\n    if (self._grep !== self._defaultGrep) {\n      Runner.immediately(function() {\n        self.runSuite(curr, next);\n      });\n    } else {\n      self.runSuite(curr, next);\n    }\n  }\n\n  function done(errSuite) {\n    self.suite = suite;\n    self.nextSuite = next;\n\n    // remove reference to test\n    delete self.test;\n\n    self.hook(HOOK_TYPE_AFTER_ALL, function() {\n      self.emit(constants.EVENT_SUITE_END, suite);\n      fn(errSuite);\n    });\n  }\n\n  this.nextSuite = next;\n\n  this.hook(HOOK_TYPE_BEFORE_ALL, function(err) {\n    if (err) {\n      return done();\n    }\n    self.runTests(suite, next);\n  });\n};\n\n/**\n * Handle uncaught exceptions within runner.\n *\n * This function is bound to the instance as `Runner#uncaught` at instantiation\n * time. It's intended to be listening on the `Process.uncaughtException` event.\n * In order to not leak EE listeners, we need to ensure no more than a single\n * `uncaughtException` listener exists per `Runner`.  The only way to do\n * this--because this function needs the context (and we don't have lambdas)--is\n * to use `Function.prototype.bind`. We need strict equality to unregister and\n * _only_ unregister the _one_ listener we set from the\n * `Process.uncaughtException` event; would be poor form to just remove\n * everything. See {@link Runner#run} for where the event listener is registered\n * and unregistered.\n * @param {Error} err - Some uncaught error\n * @private\n */\nRunner.prototype._uncaught = function(err) {\n  // this is defensive to prevent future developers from mis-calling this function.\n  // it's more likely that it'd be called with the incorrect context--say, the global\n  // `process` object--than it would to be called with a context that is not a \"subclass\"\n  // of `Runner`.\n  if (!(this instanceof Runner)) {\n    throw createFatalError(\n      'Runner#uncaught() called with invalid context',\n      this\n    );\n  }\n  if (err instanceof Pending) {\n    debug('uncaught(): caught a Pending');\n    return;\n  }\n  // browser does not exit script when throwing in global.onerror()\n  if (this.allowUncaught && !utils.isBrowser()) {\n    debug('uncaught(): bubbling exception due to --allow-uncaught');\n    throw err;\n  }\n\n  if (this.state === constants.STATE_STOPPED) {\n    debug('uncaught(): throwing after run has completed!');\n    throw err;\n  }\n\n  if (err) {\n    debug('uncaught(): got truthy exception %O', err);\n  } else {\n    debug('uncaught(): undefined/falsy exception');\n    err = createInvalidExceptionError(\n      'Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger',\n      err\n    );\n  }\n\n  if (!isError(err)) {\n    err = thrown2Error(err);\n    debug('uncaught(): converted \"error\" %o to Error', err);\n  }\n  err.uncaught = true;\n\n  var runnable = this.currentRunnable;\n\n  if (!runnable) {\n    runnable = new Runnable('Uncaught error outside test suite');\n    debug('uncaught(): no current Runnable; created a phony one');\n    runnable.parent = this.suite;\n\n    if (this.state === constants.STATE_RUNNING) {\n      debug('uncaught(): failing gracefully');\n      this.fail(runnable, err);\n    } else {\n      // Can't recover from this failure\n      debug('uncaught(): test run has not yet started; unrecoverable');\n      this.emit(constants.EVENT_RUN_BEGIN);\n      this.fail(runnable, err);\n      this.emit(constants.EVENT_RUN_END);\n    }\n\n    return;\n  }\n\n  runnable.clearTimeout();\n\n  if (runnable.isFailed()) {\n    debug('uncaught(): Runnable has already failed');\n    // Ignore error if already failed\n    return;\n  } else if (runnable.isPending()) {\n    debug('uncaught(): pending Runnable wound up failing!');\n    // report 'pending test' retrospectively as failed\n    this.fail(runnable, err, true);\n    return;\n  }\n\n  // we cannot recover gracefully if a Runnable has already passed\n  // then fails asynchronously\n  if (runnable.isPassed()) {\n    debug('uncaught(): Runnable has already passed; bailing gracefully');\n    this.fail(runnable, err);\n    this.abort();\n  } else {\n    debug('uncaught(): forcing Runnable to complete with Error');\n    return runnable.callback(err);\n  }\n};\n\n/**\n * Run the root suite and invoke `fn(failures)`\n * on completion.\n *\n * @public\n * @memberof Runner\n * @param {Function} fn - Callback when finished\n * @param {{files: string[], options: Options}} [opts] - For subclasses\n * @returns {Runner} Runner instance.\n */\nRunner.prototype.run = function(fn, opts = {}) {\n  var rootSuite = this.suite;\n  var options = opts.options || {};\n\n  debug('run(): got options: %O', options);\n  fn = fn || function() {};\n\n  const end = () => {\n    debug('run(): root suite completed; emitting %s', constants.EVENT_RUN_END);\n    this.emit(constants.EVENT_RUN_END);\n  };\n\n  const begin = () => {\n    debug('run(): emitting %s', constants.EVENT_RUN_BEGIN);\n    this.emit(constants.EVENT_RUN_BEGIN);\n    debug('run(): emitted %s', constants.EVENT_RUN_BEGIN);\n\n    this.runSuite(rootSuite, end);\n  };\n\n  const prepare = () => {\n    debug('run(): starting');\n    // If there is an `only` filter\n    if (rootSuite.hasOnly()) {\n      rootSuite.filterOnly();\n      debug('run(): filtered exclusive Runnables');\n    }\n    this.state = constants.STATE_RUNNING;\n    if (this._delay) {\n      this.emit(constants.EVENT_DELAY_END);\n      debug('run(): \"delay\" ended');\n    }\n\n    return begin();\n  };\n\n  // references cleanup to avoid memory leaks\n  if (this._opts.cleanReferencesAfterRun) {\n    this.on(constants.EVENT_SUITE_END, suite => {\n      suite.cleanReferences();\n    });\n  }\n\n  // callback\n  this.on(constants.EVENT_RUN_END, function() {\n    this.state = constants.STATE_STOPPED;\n    debug('run(): emitted %s', constants.EVENT_RUN_END);\n    fn(this.failures);\n  });\n\n  this._removeEventListener(process, 'uncaughtException', this.uncaught);\n  this._removeEventListener(process, 'unhandledRejection', this.unhandled);\n  this._addEventListener(process, 'uncaughtException', this.uncaught);\n  this._addEventListener(process, 'unhandledRejection', this.unhandled);\n\n  if (this._delay) {\n    // for reporters, I guess.\n    // might be nice to debounce some dots while we wait.\n    this.emit(constants.EVENT_DELAY_BEGIN, rootSuite);\n    rootSuite.once(EVENT_ROOT_SUITE_RUN, prepare);\n    debug('run(): waiting for green light due to --delay');\n  } else {\n    Runner.immediately(prepare);\n  }\n\n  return this;\n};\n\n/**\n * Toggle partial object linking behavior; used for building object references from\n * unique ID's. Does nothing in serial mode, because the object references already exist.\n * Subclasses can implement this (e.g., `ParallelBufferedRunner`)\n * @abstract\n * @param {boolean} [value] - If `true`, enable partial object linking, otherwise disable\n * @returns {Runner}\n * @chainable\n * @public\n * @example\n * // this reporter needs proper object references when run in parallel mode\n * class MyReporter() {\n *   constructor(runner) {\n *     this.runner.linkPartialObjects(true)\n *       .on(EVENT_SUITE_BEGIN, suite => {\n           // this Suite may be the same object...\n *       })\n *       .on(EVENT_TEST_BEGIN, test => {\n *         // ...as the `test.parent` property\n *       });\n *   }\n * }\n */\nRunner.prototype.linkPartialObjects = function(value) {\n  return this;\n};\n\n/*\n * Like {@link Runner#run}, but does not accept a callback and returns a `Promise` instead of a `Runner`.\n * This function cannot reject; an `unhandledRejection` event will bubble up to the `process` object instead.\n * @public\n * @memberof Runner\n * @param {Object} [opts] - Options for {@link Runner#run}\n * @returns {Promise<number>} Failure count\n */\nRunner.prototype.runAsync = async function runAsync(opts = {}) {\n  return new Promise(resolve => {\n    this.run(resolve, opts);\n  });\n};\n\n/**\n * Cleanly abort execution.\n *\n * @memberof Runner\n * @public\n * @return {Runner} Runner instance.\n */\nRunner.prototype.abort = function() {\n  debug('abort(): aborting');\n  this._abort = true;\n\n  return this;\n};\n\n/**\n * Returns `true` if Mocha is running in parallel mode.  For reporters.\n *\n * Subclasses should return an appropriate value.\n * @public\n * @returns {false}\n */\nRunner.prototype.isParallelMode = function isParallelMode() {\n  return false;\n};\n\n/**\n * Configures an alternate reporter for worker processes to use. Subclasses\n * using worker processes should implement this.\n * @public\n * @param {string} path - Absolute path to alternate reporter for worker processes to use\n * @returns {Runner}\n * @throws When in serial mode\n * @chainable\n * @abstract\n */\nRunner.prototype.workerReporter = function() {\n  throw createUnsupportedError('workerReporter() not supported in serial mode');\n};\n\n/**\n * Filter leaks with the given globals flagged as `ok`.\n *\n * @private\n * @param {Array} ok\n * @param {Array} globals\n * @return {Array}\n */\nfunction filterLeaks(ok, globals) {\n  return globals.filter(function(key) {\n    // Firefox and Chrome exposes iframes as index inside the window object\n    if (/^\\d+/.test(key)) {\n      return false;\n    }\n\n    // in firefox\n    // if runner runs in an iframe, this iframe's window.getInterface method\n    // not init at first it is assigned in some seconds\n    if (global.navigator && /^getInterface/.test(key)) {\n      return false;\n    }\n\n    // an iframe could be approached by window[iframeIndex]\n    // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak\n    if (global.navigator && /^\\d+/.test(key)) {\n      return false;\n    }\n\n    // Opera and IE expose global variables for HTML element IDs (issue #243)\n    if (/^mocha-/.test(key)) {\n      return false;\n    }\n\n    var matched = ok.filter(function(ok) {\n      if (~ok.indexOf('*')) {\n        return key.indexOf(ok.split('*')[0]) === 0;\n      }\n      return key === ok;\n    });\n    return !matched.length && (!global.navigator || key !== 'onerror');\n  });\n}\n\n/**\n * Check if argument is an instance of Error object or a duck-typed equivalent.\n *\n * @private\n * @param {Object} err - object to check\n * @param {string} err.message - error message\n * @returns {boolean}\n */\nfunction isError(err) {\n  return err instanceof Error || (err && typeof err.message === 'string');\n}\n\n/**\n *\n * Converts thrown non-extensible type into proper Error.\n *\n * @private\n * @param {*} thrown - Non-extensible type thrown by code\n * @return {Error}\n */\nfunction thrown2Error(err) {\n  return new Error(\n    `the ${utils.canonicalType(err)} ${stringify(\n      err\n    )} was thrown, throw an Error :)`\n  );\n}\n\nRunner.constants = constants;\n\n/**\n * Node.js' `EventEmitter`\n * @external EventEmitter\n * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter}\n */\n\nmodule.exports = Runner;\n","'use strict';\n/**\n * @module Base\n */\n/**\n * Module dependencies.\n */\n\nvar diff = require('diff');\nvar milliseconds = require('ms');\nvar utils = require('../utils');\nvar supportsColor = require('supports-color');\nvar constants = require('../runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\n\nconst isBrowser = utils.isBrowser();\n\nfunction getBrowserWindowSize() {\n  if ('innerHeight' in global) {\n    return [global.innerHeight, global.innerWidth];\n  }\n  // In a Web Worker, the DOM Window is not available.\n  return [640, 480];\n}\n\n/**\n * Expose `Base`.\n */\n\nexports = module.exports = Base;\n\n/**\n * Check if both stdio streams are associated with a tty.\n */\n\nvar isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY);\n\n/**\n * Save log references to avoid tests interfering (see GH-3604).\n */\nvar consoleLog = console.log;\n\n/**\n * Enable coloring by default, except in the browser interface.\n */\n\nexports.useColors =\n  !isBrowser &&\n  (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined);\n\n/**\n * Inline diffs instead of +/-\n */\n\nexports.inlineDiffs = false;\n\n/**\n * Default color map.\n */\n\nexports.colors = {\n  pass: 90,\n  fail: 31,\n  'bright pass': 92,\n  'bright fail': 91,\n  'bright yellow': 93,\n  pending: 36,\n  suite: 0,\n  'error title': 0,\n  'error message': 31,\n  'error stack': 90,\n  checkmark: 32,\n  fast: 90,\n  medium: 33,\n  slow: 31,\n  green: 32,\n  light: 90,\n  'diff gutter': 90,\n  'diff added': 32,\n  'diff removed': 31,\n  'diff added inline': '30;42',\n  'diff removed inline': '30;41'\n};\n\n/**\n * Default symbol map.\n */\n\nexports.symbols = {\n  ok: '✓',\n  err: '✖',\n  dot: '․',\n  comma: ',',\n  bang: '!'\n};\n\n// With node.js on Windows: use symbols available in terminal default fonts\nif (process.platform === 'win32') {\n  exports.symbols.ok = '\\u221A';\n  exports.symbols.err = '\\u00D7';\n  exports.symbols.dot = '.';\n}\n\n/**\n * Color `str` with the given `type`,\n * allowing colors to be disabled,\n * as well as user-defined color\n * schemes.\n *\n * @private\n * @param {string} type\n * @param {string} str\n * @return {string}\n */\nvar color = (exports.color = function(type, str) {\n  if (!exports.useColors) {\n    return String(str);\n  }\n  return '\\u001b[' + exports.colors[type] + 'm' + str + '\\u001b[0m';\n});\n\n/**\n * Expose term window size, with some defaults for when stderr is not a tty.\n */\n\nexports.window = {\n  width: 75\n};\n\nif (isatty) {\n  if (isBrowser) {\n    exports.window.width = getBrowserWindowSize()[1];\n  } else {\n    exports.window.width = process.stdout.getWindowSize(1)[0];\n  }\n}\n\n/**\n * Expose some basic cursor interactions that are common among reporters.\n */\n\nexports.cursor = {\n  hide: function() {\n    isatty && process.stdout.write('\\u001b[?25l');\n  },\n\n  show: function() {\n    isatty && process.stdout.write('\\u001b[?25h');\n  },\n\n  deleteLine: function() {\n    isatty && process.stdout.write('\\u001b[2K');\n  },\n\n  beginningOfLine: function() {\n    isatty && process.stdout.write('\\u001b[0G');\n  },\n\n  CR: function() {\n    if (isatty) {\n      exports.cursor.deleteLine();\n      exports.cursor.beginningOfLine();\n    } else {\n      process.stdout.write('\\r');\n    }\n  }\n};\n\nvar showDiff = (exports.showDiff = function(err) {\n  return (\n    err &&\n    err.showDiff !== false &&\n    sameType(err.actual, err.expected) &&\n    err.expected !== undefined\n  );\n});\n\nfunction stringifyDiffObjs(err) {\n  if (!utils.isString(err.actual) || !utils.isString(err.expected)) {\n    err.actual = utils.stringify(err.actual);\n    err.expected = utils.stringify(err.expected);\n  }\n}\n\n/**\n * Returns a diff between 2 strings with coloured ANSI output.\n *\n * @description\n * The diff will be either inline or unified dependent on the value\n * of `Base.inlineDiff`.\n *\n * @param {string} actual\n * @param {string} expected\n * @return {string} Diff\n */\nvar generateDiff = (exports.generateDiff = function(actual, expected) {\n  try {\n    return exports.inlineDiffs\n      ? inlineDiff(actual, expected)\n      : unifiedDiff(actual, expected);\n  } catch (err) {\n    var msg =\n      '\\n      ' +\n      color('diff added', '+ expected') +\n      ' ' +\n      color('diff removed', '- actual:  failed to generate Mocha diff') +\n      '\\n';\n    return msg;\n  }\n});\n\n/**\n * Outputs the given `failures` as a list.\n *\n * @public\n * @memberof Mocha.reporters.Base\n * @variation 1\n * @param {Object[]} failures - Each is Test instance with corresponding\n *     Error property\n */\nexports.list = function(failures) {\n  var multipleErr, multipleTest;\n  Base.consoleLog();\n  failures.forEach(function(test, i) {\n    // format\n    var fmt =\n      color('error title', '  %s) %s:\\n') +\n      color('error message', '     %s') +\n      color('error stack', '\\n%s\\n');\n\n    // msg\n    var msg;\n    var err;\n    if (test.err && test.err.multiple) {\n      if (multipleTest !== test) {\n        multipleTest = test;\n        multipleErr = [test.err].concat(test.err.multiple);\n      }\n      err = multipleErr.shift();\n    } else {\n      err = test.err;\n    }\n    var message;\n    if (err.message && typeof err.message.toString === 'function') {\n      message = err.message + '';\n    } else if (typeof err.inspect === 'function') {\n      message = err.inspect() + '';\n    } else {\n      message = '';\n    }\n    var stack = err.stack || message;\n    var index = message ? stack.indexOf(message) : -1;\n\n    if (index === -1) {\n      msg = message;\n    } else {\n      index += message.length;\n      msg = stack.slice(0, index);\n      // remove msg from stack\n      stack = stack.slice(index + 1);\n    }\n\n    // uncaught\n    if (err.uncaught) {\n      msg = 'Uncaught ' + msg;\n    }\n    // explicitly show diff\n    if (!exports.hideDiff && showDiff(err)) {\n      stringifyDiffObjs(err);\n      fmt =\n        color('error title', '  %s) %s:\\n%s') + color('error stack', '\\n%s\\n');\n      var match = message.match(/^([^:]+): expected/);\n      msg = '\\n      ' + color('error message', match ? match[1] : msg);\n\n      msg += generateDiff(err.actual, err.expected);\n    }\n\n    // indent stack trace\n    stack = stack.replace(/^/gm, '  ');\n\n    // indented test title\n    var testTitle = '';\n    test.titlePath().forEach(function(str, index) {\n      if (index !== 0) {\n        testTitle += '\\n     ';\n      }\n      for (var i = 0; i < index; i++) {\n        testTitle += '  ';\n      }\n      testTitle += str;\n    });\n\n    Base.consoleLog(fmt, i + 1, testTitle, msg, stack);\n  });\n};\n\n/**\n * Constructs a new `Base` reporter instance.\n *\n * @description\n * All other reporters generally inherit from this reporter.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Base(runner, options) {\n  var failures = (this.failures = []);\n\n  if (!runner) {\n    throw new TypeError('Missing runner argument');\n  }\n  this.options = options || {};\n  this.runner = runner;\n  this.stats = runner.stats; // assigned so Reporters keep a closer reference\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    if (test.duration > test.slow()) {\n      test.speed = 'slow';\n    } else if (test.duration > test.slow() / 2) {\n      test.speed = 'medium';\n    } else {\n      test.speed = 'fast';\n    }\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test, err) {\n    if (showDiff(err)) {\n      stringifyDiffObjs(err);\n    }\n    // more than one error per test\n    if (test.err && err instanceof Error) {\n      test.err.multiple = (test.err.multiple || []).concat(err);\n    } else {\n      test.err = err;\n    }\n    failures.push(test);\n  });\n}\n\n/**\n * Outputs common epilogue used by many of the bundled reporters.\n *\n * @public\n * @memberof Mocha.reporters\n */\nBase.prototype.epilogue = function() {\n  var stats = this.stats;\n  var fmt;\n\n  Base.consoleLog();\n\n  // passes\n  fmt =\n    color('bright pass', ' ') +\n    color('green', ' %d passing') +\n    color('light', ' (%s)');\n\n  Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration));\n\n  // pending\n  if (stats.pending) {\n    fmt = color('pending', ' ') + color('pending', ' %d pending');\n\n    Base.consoleLog(fmt, stats.pending);\n  }\n\n  // failures\n  if (stats.failures) {\n    fmt = color('fail', '  %d failing');\n\n    Base.consoleLog(fmt, stats.failures);\n\n    Base.list(this.failures);\n    Base.consoleLog();\n  }\n\n  Base.consoleLog();\n};\n\n/**\n * Pads the given `str` to `len`.\n *\n * @private\n * @param {string} str\n * @param {string} len\n * @return {string}\n */\nfunction pad(str, len) {\n  str = String(str);\n  return Array(len - str.length + 1).join(' ') + str;\n}\n\n/**\n * Returns inline diff between 2 strings with coloured ANSI output.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} Diff\n */\nfunction inlineDiff(actual, expected) {\n  var msg = errorDiff(actual, expected);\n\n  // linenos\n  var lines = msg.split('\\n');\n  if (lines.length > 4) {\n    var width = String(lines.length).length;\n    msg = lines\n      .map(function(str, i) {\n        return pad(++i, width) + ' |' + ' ' + str;\n      })\n      .join('\\n');\n  }\n\n  // legend\n  msg =\n    '\\n' +\n    color('diff removed inline', 'actual') +\n    ' ' +\n    color('diff added inline', 'expected') +\n    '\\n\\n' +\n    msg +\n    '\\n';\n\n  // indent\n  msg = msg.replace(/^/gm, '      ');\n  return msg;\n}\n\n/**\n * Returns unified diff between two strings with coloured ANSI output.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} The diff.\n */\nfunction unifiedDiff(actual, expected) {\n  var indent = '      ';\n  function cleanUp(line) {\n    if (line[0] === '+') {\n      return indent + colorLines('diff added', line);\n    }\n    if (line[0] === '-') {\n      return indent + colorLines('diff removed', line);\n    }\n    if (line.match(/@@/)) {\n      return '--';\n    }\n    if (line.match(/\\\\ No newline/)) {\n      return null;\n    }\n    return indent + line;\n  }\n  function notBlank(line) {\n    return typeof line !== 'undefined' && line !== null;\n  }\n  var msg = diff.createPatch('string', actual, expected);\n  var lines = msg.split('\\n').splice(5);\n  return (\n    '\\n      ' +\n    colorLines('diff added', '+ expected') +\n    ' ' +\n    colorLines('diff removed', '- actual') +\n    '\\n\\n' +\n    lines\n      .map(cleanUp)\n      .filter(notBlank)\n      .join('\\n')\n  );\n}\n\n/**\n * Returns character diff for `err`.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} the diff\n */\nfunction errorDiff(actual, expected) {\n  return diff\n    .diffWordsWithSpace(actual, expected)\n    .map(function(str) {\n      if (str.added) {\n        return colorLines('diff added inline', str.value);\n      }\n      if (str.removed) {\n        return colorLines('diff removed inline', str.value);\n      }\n      return str.value;\n    })\n    .join('');\n}\n\n/**\n * Colors lines for `str`, using the color `name`.\n *\n * @private\n * @param {string} name\n * @param {string} str\n * @return {string}\n */\nfunction colorLines(name, str) {\n  return str\n    .split('\\n')\n    .map(function(str) {\n      return color(name, str);\n    })\n    .join('\\n');\n}\n\n/**\n * Object#toString reference.\n */\nvar objToString = Object.prototype.toString;\n\n/**\n * Checks that a / b have the same type.\n *\n * @private\n * @param {Object} a\n * @param {Object} b\n * @return {boolean}\n */\nfunction sameType(a, b) {\n  return objToString.call(a) === objToString.call(b);\n}\n\nBase.consoleLog = consoleLog;\n\nBase.abstract = true;\n","'use strict';\n/**\n * @module Dot\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar inherits = require('../utils').inherits;\nvar constants = require('../runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\n/**\n * Expose `Dot`.\n */\n\nexports = module.exports = Dot;\n\n/**\n * Constructs a new `Dot` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Dot(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var width = (Base.window.width * 0.75) | 0;\n  var n = -1;\n\n  runner.on(EVENT_RUN_BEGIN, function() {\n    process.stdout.write('\\n');\n  });\n\n  runner.on(EVENT_TEST_PENDING, function() {\n    if (++n % width === 0) {\n      process.stdout.write('\\n  ');\n    }\n    process.stdout.write(Base.color('pending', Base.symbols.comma));\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    if (++n % width === 0) {\n      process.stdout.write('\\n  ');\n    }\n    if (test.speed === 'slow') {\n      process.stdout.write(Base.color('bright yellow', Base.symbols.dot));\n    } else {\n      process.stdout.write(Base.color(test.speed, Base.symbols.dot));\n    }\n  });\n\n  runner.on(EVENT_TEST_FAIL, function() {\n    if (++n % width === 0) {\n      process.stdout.write('\\n  ');\n    }\n    process.stdout.write(Base.color('fail', Base.symbols.bang));\n  });\n\n  runner.once(EVENT_RUN_END, function() {\n    process.stdout.write('\\n');\n    self.epilogue();\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Dot, Base);\n\nDot.description = 'dot matrix representation';\n","'use strict';\n/**\n * @module Doc\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar utils = require('../utils');\nvar constants = require('../runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\n\n/**\n * Expose `Doc`.\n */\n\nexports = module.exports = Doc;\n\n/**\n * Constructs a new `Doc` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Doc(runner, options) {\n  Base.call(this, runner, options);\n\n  var indents = 2;\n\n  function indent() {\n    return Array(indents).join('  ');\n  }\n\n  runner.on(EVENT_SUITE_BEGIN, function(suite) {\n    if (suite.root) {\n      return;\n    }\n    ++indents;\n    Base.consoleLog('%s<section class=\"suite\">', indent());\n    ++indents;\n    Base.consoleLog('%s<h1>%s</h1>', indent(), utils.escape(suite.title));\n    Base.consoleLog('%s<dl>', indent());\n  });\n\n  runner.on(EVENT_SUITE_END, function(suite) {\n    if (suite.root) {\n      return;\n    }\n    Base.consoleLog('%s</dl>', indent());\n    --indents;\n    Base.consoleLog('%s</section>', indent());\n    --indents;\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    Base.consoleLog('%s  <dt>%s</dt>', indent(), utils.escape(test.title));\n    Base.consoleLog('%s  <dt>%s</dt>', indent(), utils.escape(test.file));\n    var code = utils.escape(utils.clean(test.body));\n    Base.consoleLog('%s  <dd><pre><code>%s</code></pre></dd>', indent(), code);\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test, err) {\n    Base.consoleLog(\n      '%s  <dt class=\"error\">%s</dt>',\n      indent(),\n      utils.escape(test.title)\n    );\n    Base.consoleLog(\n      '%s  <dt class=\"error\">%s</dt>',\n      indent(),\n      utils.escape(test.file)\n    );\n    var code = utils.escape(utils.clean(test.body));\n    Base.consoleLog(\n      '%s  <dd class=\"error\"><pre><code>%s</code></pre></dd>',\n      indent(),\n      code\n    );\n    Base.consoleLog(\n      '%s  <dd class=\"error\">%s</dd>',\n      indent(),\n      utils.escape(err)\n    );\n  });\n}\n\nDoc.description = 'HTML documentation';\n","'use strict';\n/**\n * @module TAP\n */\n/**\n * Module dependencies.\n */\n\nvar util = require('util');\nvar Base = require('./base');\nvar constants = require('../runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar inherits = require('../utils').inherits;\nvar sprintf = util.format;\n\n/**\n * Expose `TAP`.\n */\n\nexports = module.exports = TAP;\n\n/**\n * Constructs a new `TAP` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction TAP(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var n = 1;\n\n  var tapVersion = '12';\n  if (options && options.reporterOptions) {\n    if (options.reporterOptions.tapVersion) {\n      tapVersion = options.reporterOptions.tapVersion.toString();\n    }\n  }\n\n  this._producer = createProducer(tapVersion);\n\n  runner.once(EVENT_RUN_BEGIN, function() {\n    self._producer.writeVersion();\n  });\n\n  runner.on(EVENT_TEST_END, function() {\n    ++n;\n  });\n\n  runner.on(EVENT_TEST_PENDING, function(test) {\n    self._producer.writePending(n, test);\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    self._producer.writePass(n, test);\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test, err) {\n    self._producer.writeFail(n, test, err);\n  });\n\n  runner.once(EVENT_RUN_END, function() {\n    self._producer.writeEpilogue(runner.stats);\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(TAP, Base);\n\n/**\n * Returns a TAP-safe title of `test`.\n *\n * @private\n * @param {Test} test - Test instance.\n * @return {String} title with any hash character removed\n */\nfunction title(test) {\n  return test.fullTitle().replace(/#/g, '');\n}\n\n/**\n * Writes newline-terminated formatted string to reporter output stream.\n *\n * @private\n * @param {string} format - `printf`-like format string\n * @param {...*} [varArgs] - Format string arguments\n */\nfunction println(format, varArgs) {\n  var vargs = Array.from(arguments);\n  vargs[0] += '\\n';\n  process.stdout.write(sprintf.apply(null, vargs));\n}\n\n/**\n * Returns a `tapVersion`-appropriate TAP producer instance, if possible.\n *\n * @private\n * @param {string} tapVersion - Version of TAP specification to produce.\n * @returns {TAPProducer} specification-appropriate instance\n * @throws {Error} if specification version has no associated producer.\n */\nfunction createProducer(tapVersion) {\n  var producers = {\n    '12': new TAP12Producer(),\n    '13': new TAP13Producer()\n  };\n  var producer = producers[tapVersion];\n\n  if (!producer) {\n    throw new Error(\n      'invalid or unsupported TAP version: ' + JSON.stringify(tapVersion)\n    );\n  }\n\n  return producer;\n}\n\n/**\n * @summary\n * Constructs a new TAPProducer.\n *\n * @description\n * <em>Only</em> to be used as an abstract base class.\n *\n * @private\n * @constructor\n */\nfunction TAPProducer() {}\n\n/**\n * Writes the TAP version to reporter output stream.\n *\n * @abstract\n */\nTAPProducer.prototype.writeVersion = function() {};\n\n/**\n * Writes the plan to reporter output stream.\n *\n * @abstract\n * @param {number} ntests - Number of tests that are planned to run.\n */\nTAPProducer.prototype.writePlan = function(ntests) {\n  println('%d..%d', 1, ntests);\n};\n\n/**\n * Writes that test passed to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that passed.\n * @param {Test} test - Instance containing test information.\n */\nTAPProducer.prototype.writePass = function(n, test) {\n  println('ok %d %s', n, title(test));\n};\n\n/**\n * Writes that test was skipped to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that was skipped.\n * @param {Test} test - Instance containing test information.\n */\nTAPProducer.prototype.writePending = function(n, test) {\n  println('ok %d %s # SKIP -', n, title(test));\n};\n\n/**\n * Writes that test failed to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that failed.\n * @param {Test} test - Instance containing test information.\n * @param {Error} err - Reason the test failed.\n */\nTAPProducer.prototype.writeFail = function(n, test, err) {\n  println('not ok %d %s', n, title(test));\n};\n\n/**\n * Writes the summary epilogue to reporter output stream.\n *\n * @abstract\n * @param {Object} stats - Object containing run statistics.\n */\nTAPProducer.prototype.writeEpilogue = function(stats) {\n  // :TBD: Why is this not counting pending tests?\n  println('# tests ' + (stats.passes + stats.failures));\n  println('# pass ' + stats.passes);\n  // :TBD: Why are we not showing pending results?\n  println('# fail ' + stats.failures);\n  this.writePlan(stats.passes + stats.failures + stats.pending);\n};\n\n/**\n * @summary\n * Constructs a new TAP12Producer.\n *\n * @description\n * Produces output conforming to the TAP12 specification.\n *\n * @private\n * @constructor\n * @extends TAPProducer\n * @see {@link https://testanything.org/tap-specification.html|Specification}\n */\nfunction TAP12Producer() {\n  /**\n   * Writes that test failed to reporter output stream, with error formatting.\n   * @override\n   */\n  this.writeFail = function(n, test, err) {\n    TAPProducer.prototype.writeFail.call(this, n, test, err);\n    if (err.message) {\n      println(err.message.replace(/^/gm, '  '));\n    }\n    if (err.stack) {\n      println(err.stack.replace(/^/gm, '  '));\n    }\n  };\n}\n\n/**\n * Inherit from `TAPProducer.prototype`.\n */\ninherits(TAP12Producer, TAPProducer);\n\n/**\n * @summary\n * Constructs a new TAP13Producer.\n *\n * @description\n * Produces output conforming to the TAP13 specification.\n *\n * @private\n * @constructor\n * @extends TAPProducer\n * @see {@link https://testanything.org/tap-version-13-specification.html|Specification}\n */\nfunction TAP13Producer() {\n  /**\n   * Writes the TAP version to reporter output stream.\n   * @override\n   */\n  this.writeVersion = function() {\n    println('TAP version 13');\n  };\n\n  /**\n   * Writes that test failed to reporter output stream, with error formatting.\n   * @override\n   */\n  this.writeFail = function(n, test, err) {\n    TAPProducer.prototype.writeFail.call(this, n, test, err);\n    var emitYamlBlock = err.message != null || err.stack != null;\n    if (emitYamlBlock) {\n      println(indent(1) + '---');\n      if (err.message) {\n        println(indent(2) + 'message: |-');\n        println(err.message.replace(/^/gm, indent(3)));\n      }\n      if (err.stack) {\n        println(indent(2) + 'stack: |-');\n        println(err.stack.replace(/^/gm, indent(3)));\n      }\n      println(indent(1) + '...');\n    }\n  };\n\n  function indent(level) {\n    return Array(level + 1).join('  ');\n  }\n}\n\n/**\n * Inherit from `TAPProducer.prototype`.\n */\ninherits(TAP13Producer, TAPProducer);\n\nTAP.description = 'TAP-compatible output';\n","'use strict';\n/**\n * @module JSON\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar constants = require('../runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\n\n/**\n * Expose `JSON`.\n */\n\nexports = module.exports = JSONReporter;\n\n/**\n * Constructs a new `JSON` reporter instance.\n *\n * @public\n * @class JSON\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction JSONReporter(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var tests = [];\n  var pending = [];\n  var failures = [];\n  var passes = [];\n\n  runner.on(EVENT_TEST_END, function(test) {\n    tests.push(test);\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    passes.push(test);\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test) {\n    failures.push(test);\n  });\n\n  runner.on(EVENT_TEST_PENDING, function(test) {\n    pending.push(test);\n  });\n\n  runner.once(EVENT_RUN_END, function() {\n    var obj = {\n      stats: self.stats,\n      tests: tests.map(clean),\n      pending: pending.map(clean),\n      failures: failures.map(clean),\n      passes: passes.map(clean)\n    };\n\n    runner.testResults = obj;\n\n    process.stdout.write(JSON.stringify(obj, null, 2));\n  });\n}\n\n/**\n * Return a plain-object representation of `test`\n * free of cyclic properties etc.\n *\n * @private\n * @param {Object} test\n * @return {Object}\n */\nfunction clean(test) {\n  var err = test.err || {};\n  if (err instanceof Error) {\n    err = errorJSON(err);\n  }\n\n  return {\n    title: test.title,\n    fullTitle: test.fullTitle(),\n    file: test.file,\n    duration: test.duration,\n    currentRetry: test.currentRetry(),\n    speed: test.speed,\n    err: cleanCycles(err)\n  };\n}\n\n/**\n * Replaces any circular references inside `obj` with '[object Object]'\n *\n * @private\n * @param {Object} obj\n * @return {Object}\n */\nfunction cleanCycles(obj) {\n  var cache = [];\n  return JSON.parse(\n    JSON.stringify(obj, function(key, value) {\n      if (typeof value === 'object' && value !== null) {\n        if (cache.indexOf(value) !== -1) {\n          // Instead of going in a circle, we'll print [object Object]\n          return '' + value;\n        }\n        cache.push(value);\n      }\n\n      return value;\n    })\n  );\n}\n\n/**\n * Transform an Error object into a JSON object.\n *\n * @private\n * @param {Error} err\n * @return {Object}\n */\nfunction errorJSON(err) {\n  var res = {};\n  Object.getOwnPropertyNames(err).forEach(function(key) {\n    res[key] = err[key];\n  }, err);\n  return res;\n}\n\nJSONReporter.description = 'single JSON object';\n","var classof = require('../internals/classof-raw');\n\n// `thisNumberValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-thisnumbervalue\nmodule.exports = function (value) {\n  if (typeof value != 'number' && classof(value) != 'Number') {\n    throw TypeError('Incorrect invocation');\n  }\n  return +value;\n};\n","'use strict';\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.repeat` method implementation\n// https://tc39.github.io/ecma262/#sec-string.prototype.repeat\nmodule.exports = ''.repeat || function repeat(count) {\n  var str = String(requireObjectCoercible(this));\n  var result = '';\n  var n = toInteger(count);\n  if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n  for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n  return result;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar toInteger = require('../internals/to-integer');\nvar thisNumberValue = require('../internals/this-number-value');\nvar repeat = require('../internals/string-repeat');\nvar fails = require('../internals/fails');\n\nvar nativeToFixed = 1.0.toFixed;\nvar floor = Math.floor;\n\nvar pow = function (x, n, acc) {\n  return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n  var n = 0;\n  var x2 = x;\n  while (x2 >= 4096) {\n    n += 12;\n    x2 /= 4096;\n  }\n  while (x2 >= 2) {\n    n += 1;\n    x2 /= 2;\n  } return n;\n};\n\nvar FORCED = nativeToFixed && (\n  0.00008.toFixed(3) !== '0.000' ||\n  0.9.toFixed(0) !== '1' ||\n  1.255.toFixed(2) !== '1.25' ||\n  1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !fails(function () {\n  // V8 ~ Android 4.3-\n  nativeToFixed.call({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.github.io/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n  // eslint-disable-next-line max-statements\n  toFixed: function toFixed(fractionDigits) {\n    var number = thisNumberValue(this);\n    var fractDigits = toInteger(fractionDigits);\n    var data = [0, 0, 0, 0, 0, 0];\n    var sign = '';\n    var result = '0';\n    var e, z, j, k;\n\n    var multiply = function (n, c) {\n      var index = -1;\n      var c2 = c;\n      while (++index < 6) {\n        c2 += n * data[index];\n        data[index] = c2 % 1e7;\n        c2 = floor(c2 / 1e7);\n      }\n    };\n\n    var divide = function (n) {\n      var index = 6;\n      var c = 0;\n      while (--index >= 0) {\n        c += data[index];\n        data[index] = floor(c / n);\n        c = (c % n) * 1e7;\n      }\n    };\n\n    var dataToString = function () {\n      var index = 6;\n      var s = '';\n      while (--index >= 0) {\n        if (s !== '' || index === 0 || data[index] !== 0) {\n          var t = String(data[index]);\n          s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;\n        }\n      } return s;\n    };\n\n    if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');\n    // eslint-disable-next-line no-self-compare\n    if (number != number) return 'NaN';\n    if (number <= -1e21 || number >= 1e21) return String(number);\n    if (number < 0) {\n      sign = '-';\n      number = -number;\n    }\n    if (number > 1e-21) {\n      e = log(number * pow(2, 69, 1)) - 69;\n      z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n      z *= 0x10000000000000;\n      e = 52 - e;\n      if (e > 0) {\n        multiply(0, z);\n        j = fractDigits;\n        while (j >= 7) {\n          multiply(1e7, 0);\n          j -= 7;\n        }\n        multiply(pow(10, j, 1), 0);\n        j = e - 1;\n        while (j >= 23) {\n          divide(1 << 23);\n          j -= 23;\n        }\n        divide(1 << j);\n        multiply(1, 1);\n        divide(2);\n        result = dataToString();\n      } else {\n        multiply(0, z);\n        multiply(1 << -e, 0);\n        result = dataToString() + repeat.call('0', fractDigits);\n      }\n    }\n    if (fractDigits > 0) {\n      k = result.length;\n      result = sign + (k <= fractDigits\n        ? '0.' + repeat.call('0', fractDigits - k) + result\n        : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));\n    } else {\n      result = sign + result;\n    } return result;\n  }\n});\n","'use strict';\n\n/**\n @module browser/Progress\n*/\n\n/**\n * Expose `Progress`.\n */\n\nmodule.exports = Progress;\n\n/**\n * Initialize a new `Progress` indicator.\n */\nfunction Progress() {\n  this.percent = 0;\n  this.size(0);\n  this.fontSize(11);\n  this.font('helvetica, arial, sans-serif');\n}\n\n/**\n * Set progress size to `size`.\n *\n * @public\n * @param {number} size\n * @return {Progress} Progress instance.\n */\nProgress.prototype.size = function(size) {\n  this._size = size;\n  return this;\n};\n\n/**\n * Set text to `text`.\n *\n * @public\n * @param {string} text\n * @return {Progress} Progress instance.\n */\nProgress.prototype.text = function(text) {\n  this._text = text;\n  return this;\n};\n\n/**\n * Set font size to `size`.\n *\n * @public\n * @param {number} size\n * @return {Progress} Progress instance.\n */\nProgress.prototype.fontSize = function(size) {\n  this._fontSize = size;\n  return this;\n};\n\n/**\n * Set font to `family`.\n *\n * @param {string} family\n * @return {Progress} Progress instance.\n */\nProgress.prototype.font = function(family) {\n  this._font = family;\n  return this;\n};\n\n/**\n * Update percentage to `n`.\n *\n * @param {number} n\n * @return {Progress} Progress instance.\n */\nProgress.prototype.update = function(n) {\n  this.percent = n;\n  return this;\n};\n\n/**\n * Draw on `ctx`.\n *\n * @param {CanvasRenderingContext2d} ctx\n * @return {Progress} Progress instance.\n */\nProgress.prototype.draw = function(ctx) {\n  try {\n    var percent = Math.min(this.percent, 100);\n    var size = this._size;\n    var half = size / 2;\n    var x = half;\n    var y = half;\n    var rad = half - 1;\n    var fontSize = this._fontSize;\n\n    ctx.font = fontSize + 'px ' + this._font;\n\n    var angle = Math.PI * 2 * (percent / 100);\n    ctx.clearRect(0, 0, size, size);\n\n    // outer circle\n    ctx.strokeStyle = '#9f9f9f';\n    ctx.beginPath();\n    ctx.arc(x, y, rad, 0, angle, false);\n    ctx.stroke();\n\n    // inner circle\n    ctx.strokeStyle = '#eee';\n    ctx.beginPath();\n    ctx.arc(x, y, rad - 1, 0, angle, true);\n    ctx.stroke();\n\n    // text\n    var text = this._text || (percent | 0) + '%';\n    var w = ctx.measureText(text).width;\n\n    ctx.fillText(text, x - w / 2 + 1, y + fontSize / 2 - 1);\n  } catch (ignore) {\n    // don't fail if we can't render progress\n  }\n  return this;\n};\n","'use strict';\n\n/* eslint-env browser */\n/**\n * @module HTML\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar utils = require('../utils');\nvar Progress = require('../browser/progress');\nvar escapeRe = require('escape-string-regexp');\nvar constants = require('../runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar escape = utils.escape;\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\n\nvar Date = global.Date;\n\n/**\n * Expose `HTML`.\n */\n\nexports = module.exports = HTML;\n\n/**\n * Stats template.\n */\n\nvar statsTemplate =\n  '<ul id=\"mocha-stats\">' +\n  '<li class=\"progress\"><canvas width=\"40\" height=\"40\"></canvas></li>' +\n  '<li class=\"passes\"><a href=\"javascript:void(0);\">passes:</a> <em>0</em></li>' +\n  '<li class=\"failures\"><a href=\"javascript:void(0);\">failures:</a> <em>0</em></li>' +\n  '<li class=\"duration\">duration: <em>0</em>s</li>' +\n  '</ul>';\n\nvar playIcon = '&#x2023;';\n\n/**\n * Constructs a new `HTML` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction HTML(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var stats = this.stats;\n  var stat = fragment(statsTemplate);\n  var items = stat.getElementsByTagName('li');\n  var passes = items[1].getElementsByTagName('em')[0];\n  var passesLink = items[1].getElementsByTagName('a')[0];\n  var failures = items[2].getElementsByTagName('em')[0];\n  var failuresLink = items[2].getElementsByTagName('a')[0];\n  var duration = items[3].getElementsByTagName('em')[0];\n  var canvas = stat.getElementsByTagName('canvas')[0];\n  var report = fragment('<ul id=\"mocha-report\"></ul>');\n  var stack = [report];\n  var progress;\n  var ctx;\n  var root = document.getElementById('mocha');\n\n  if (canvas.getContext) {\n    var ratio = window.devicePixelRatio || 1;\n    canvas.style.width = canvas.width;\n    canvas.style.height = canvas.height;\n    canvas.width *= ratio;\n    canvas.height *= ratio;\n    ctx = canvas.getContext('2d');\n    ctx.scale(ratio, ratio);\n    progress = new Progress();\n  }\n\n  if (!root) {\n    return error('#mocha div missing, add it to your document');\n  }\n\n  // pass toggle\n  on(passesLink, 'click', function(evt) {\n    evt.preventDefault();\n    unhide();\n    var name = /pass/.test(report.className) ? '' : ' pass';\n    report.className = report.className.replace(/fail|pass/g, '') + name;\n    if (report.className.trim()) {\n      hideSuitesWithout('test pass');\n    }\n  });\n\n  // failure toggle\n  on(failuresLink, 'click', function(evt) {\n    evt.preventDefault();\n    unhide();\n    var name = /fail/.test(report.className) ? '' : ' fail';\n    report.className = report.className.replace(/fail|pass/g, '') + name;\n    if (report.className.trim()) {\n      hideSuitesWithout('test fail');\n    }\n  });\n\n  root.appendChild(stat);\n  root.appendChild(report);\n\n  if (progress) {\n    progress.size(40);\n  }\n\n  runner.on(EVENT_SUITE_BEGIN, function(suite) {\n    if (suite.root) {\n      return;\n    }\n\n    // suite\n    var url = self.suiteURL(suite);\n    var el = fragment(\n      '<li class=\"suite\"><h1><a href=\"%s\">%s</a></h1></li>',\n      url,\n      escape(suite.title)\n    );\n\n    // container\n    stack[0].appendChild(el);\n    stack.unshift(document.createElement('ul'));\n    el.appendChild(stack[0]);\n  });\n\n  runner.on(EVENT_SUITE_END, function(suite) {\n    if (suite.root) {\n      updateStats();\n      return;\n    }\n    stack.shift();\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    var url = self.testURL(test);\n    var markup =\n      '<li class=\"test pass %e\"><h2>%e<span class=\"duration\">%ems</span> ' +\n      '<a href=\"%s\" class=\"replay\">' +\n      playIcon +\n      '</a></h2></li>';\n    var el = fragment(markup, test.speed, test.title, test.duration, url);\n    self.addCodeToggle(el, test.body);\n    appendToStack(el);\n    updateStats();\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test) {\n    var el = fragment(\n      '<li class=\"test fail\"><h2>%e <a href=\"%e\" class=\"replay\">' +\n        playIcon +\n        '</a></h2></li>',\n      test.title,\n      self.testURL(test)\n    );\n    var stackString; // Note: Includes leading newline\n    var message = test.err.toString();\n\n    // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we\n    // check for the result of the stringifying.\n    if (message === '[object Error]') {\n      message = test.err.message;\n    }\n\n    if (test.err.stack) {\n      var indexOfMessage = test.err.stack.indexOf(test.err.message);\n      if (indexOfMessage === -1) {\n        stackString = test.err.stack;\n      } else {\n        stackString = test.err.stack.substr(\n          test.err.message.length + indexOfMessage\n        );\n      }\n    } else if (test.err.sourceURL && test.err.line !== undefined) {\n      // Safari doesn't give you a stack. Let's at least provide a source line.\n      stackString = '\\n(' + test.err.sourceURL + ':' + test.err.line + ')';\n    }\n\n    stackString = stackString || '';\n\n    if (test.err.htmlMessage && stackString) {\n      el.appendChild(\n        fragment(\n          '<div class=\"html-error\">%s\\n<pre class=\"error\">%e</pre></div>',\n          test.err.htmlMessage,\n          stackString\n        )\n      );\n    } else if (test.err.htmlMessage) {\n      el.appendChild(\n        fragment('<div class=\"html-error\">%s</div>', test.err.htmlMessage)\n      );\n    } else {\n      el.appendChild(\n        fragment('<pre class=\"error\">%e%e</pre>', message, stackString)\n      );\n    }\n\n    self.addCodeToggle(el, test.body);\n    appendToStack(el);\n    updateStats();\n  });\n\n  runner.on(EVENT_TEST_PENDING, function(test) {\n    var el = fragment(\n      '<li class=\"test pass pending\"><h2>%e</h2></li>',\n      test.title\n    );\n    appendToStack(el);\n    updateStats();\n  });\n\n  function appendToStack(el) {\n    // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack.\n    if (stack[0]) {\n      stack[0].appendChild(el);\n    }\n  }\n\n  function updateStats() {\n    // TODO: add to stats\n    var percent = ((stats.tests / runner.total) * 100) | 0;\n    if (progress) {\n      progress.update(percent).draw(ctx);\n    }\n\n    // update stats\n    var ms = new Date() - stats.start;\n    text(passes, stats.passes);\n    text(failures, stats.failures);\n    text(duration, (ms / 1000).toFixed(2));\n  }\n}\n\n/**\n * Makes a URL, preserving querystring (\"search\") parameters.\n *\n * @param {string} s\n * @return {string} A new URL.\n */\nfunction makeUrl(s) {\n  var search = window.location.search;\n\n  // Remove previous grep query parameter if present\n  if (search) {\n    search = search.replace(/[?&]grep=[^&\\s]*/g, '').replace(/^&/, '?');\n  }\n\n  return (\n    window.location.pathname +\n    (search ? search + '&' : '?') +\n    'grep=' +\n    encodeURIComponent(escapeRe(s))\n  );\n}\n\n/**\n * Provide suite URL.\n *\n * @param {Object} [suite]\n */\nHTML.prototype.suiteURL = function(suite) {\n  return makeUrl(suite.fullTitle());\n};\n\n/**\n * Provide test URL.\n *\n * @param {Object} [test]\n */\nHTML.prototype.testURL = function(test) {\n  return makeUrl(test.fullTitle());\n};\n\n/**\n * Adds code toggle functionality for the provided test's list element.\n *\n * @param {HTMLLIElement} el\n * @param {string} contents\n */\nHTML.prototype.addCodeToggle = function(el, contents) {\n  var h2 = el.getElementsByTagName('h2')[0];\n\n  on(h2, 'click', function() {\n    pre.style.display = pre.style.display === 'none' ? 'block' : 'none';\n  });\n\n  var pre = fragment('<pre><code>%e</code></pre>', utils.clean(contents));\n  el.appendChild(pre);\n  pre.style.display = 'none';\n};\n\n/**\n * Display error `msg`.\n *\n * @param {string} msg\n */\nfunction error(msg) {\n  document.body.appendChild(fragment('<div id=\"mocha-error\">%s</div>', msg));\n}\n\n/**\n * Return a DOM fragment from `html`.\n *\n * @param {string} html\n */\nfunction fragment(html) {\n  var args = arguments;\n  var div = document.createElement('div');\n  var i = 1;\n\n  div.innerHTML = html.replace(/%([se])/g, function(_, type) {\n    switch (type) {\n      case 's':\n        return String(args[i++]);\n      case 'e':\n        return escape(args[i++]);\n      // no default\n    }\n  });\n\n  return div.firstChild;\n}\n\n/**\n * Check for suites that do not have elements\n * with `classname`, and hide them.\n *\n * @param {text} classname\n */\nfunction hideSuitesWithout(classname) {\n  var suites = document.getElementsByClassName('suite');\n  for (var i = 0; i < suites.length; i++) {\n    var els = suites[i].getElementsByClassName(classname);\n    if (!els.length) {\n      suites[i].className += ' hidden';\n    }\n  }\n}\n\n/**\n * Unhide .hidden suites.\n */\nfunction unhide() {\n  var els = document.getElementsByClassName('suite hidden');\n  while (els.length > 0) {\n    els[0].className = els[0].className.replace('suite hidden', 'suite');\n  }\n}\n\n/**\n * Set an element's text contents.\n *\n * @param {HTMLElement} el\n * @param {string} contents\n */\nfunction text(el, contents) {\n  if (el.textContent) {\n    el.textContent = contents;\n  } else {\n    el.innerText = contents;\n  }\n}\n\n/**\n * Listen on `event` with callback `fn`.\n */\nfunction on(el, event, fn) {\n  if (el.addEventListener) {\n    el.addEventListener(event, fn, false);\n  } else {\n    el.attachEvent('on' + event, fn);\n  }\n}\n\nHTML.browserOnly = true;\n","'use strict';\n/**\n * @module List\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar inherits = require('../utils').inherits;\nvar constants = require('../runner').constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_BEGIN = constants.EVENT_TEST_BEGIN;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar color = Base.color;\nvar cursor = Base.cursor;\n\n/**\n * Expose `List`.\n */\n\nexports = module.exports = List;\n\n/**\n * Constructs a new `List` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction List(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var n = 0;\n\n  runner.on(EVENT_RUN_BEGIN, function() {\n    Base.consoleLog();\n  });\n\n  runner.on(EVENT_TEST_BEGIN, function(test) {\n    process.stdout.write(color('pass', '    ' + test.fullTitle() + ': '));\n  });\n\n  runner.on(EVENT_TEST_PENDING, function(test) {\n    var fmt = color('checkmark', '  -') + color('pending', ' %s');\n    Base.consoleLog(fmt, test.fullTitle());\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    var fmt =\n      color('checkmark', '  ' + Base.symbols.ok) +\n      color('pass', ' %s: ') +\n      color(test.speed, '%dms');\n    cursor.CR();\n    Base.consoleLog(fmt, test.fullTitle(), test.duration);\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test) {\n    cursor.CR();\n    Base.consoleLog(color('fail', '  %d) %s'), ++n, test.fullTitle());\n  });\n\n  runner.once(EVENT_RUN_END, self.epilogue.bind(self));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(List, Base);\n\nList.description = 'like \"spec\" reporter but flat';\n","'use strict';\n/**\n * @module Min\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar inherits = require('../utils').inherits;\nvar constants = require('../runner').constants;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\n\n/**\n * Expose `Min`.\n */\n\nexports = module.exports = Min;\n\n/**\n * Constructs a new `Min` reporter instance.\n *\n * @description\n * This minimal test reporter is best used with '--watch'.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Min(runner, options) {\n  Base.call(this, runner, options);\n\n  runner.on(EVENT_RUN_BEGIN, function() {\n    // clear screen\n    process.stdout.write('\\u001b[2J');\n    // set cursor position\n    process.stdout.write('\\u001b[1;3H');\n  });\n\n  runner.once(EVENT_RUN_END, this.epilogue.bind(this));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Min, Base);\n\nMin.description = 'essentially just a summary';\n","'use strict';\n/**\n * @module Spec\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar constants = require('../runner').constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar inherits = require('../utils').inherits;\nvar color = Base.color;\n\n/**\n * Expose `Spec`.\n */\n\nexports = module.exports = Spec;\n\n/**\n * Constructs a new `Spec` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Spec(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var indents = 0;\n  var n = 0;\n\n  function indent() {\n    return Array(indents).join('  ');\n  }\n\n  runner.on(EVENT_RUN_BEGIN, function() {\n    Base.consoleLog();\n  });\n\n  runner.on(EVENT_SUITE_BEGIN, function(suite) {\n    ++indents;\n    Base.consoleLog(color('suite', '%s%s'), indent(), suite.title);\n  });\n\n  runner.on(EVENT_SUITE_END, function() {\n    --indents;\n    if (indents === 1) {\n      Base.consoleLog();\n    }\n  });\n\n  runner.on(EVENT_TEST_PENDING, function(test) {\n    var fmt = indent() + color('pending', '  - %s');\n    Base.consoleLog(fmt, test.title);\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    var fmt;\n    if (test.speed === 'fast') {\n      fmt =\n        indent() +\n        color('checkmark', '  ' + Base.symbols.ok) +\n        color('pass', ' %s');\n      Base.consoleLog(fmt, test.title);\n    } else {\n      fmt =\n        indent() +\n        color('checkmark', '  ' + Base.symbols.ok) +\n        color('pass', ' %s') +\n        color(test.speed, ' (%dms)');\n      Base.consoleLog(fmt, test.title, test.duration);\n    }\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test) {\n    Base.consoleLog(indent() + color('fail', '  %d) %s'), ++n, test.title);\n  });\n\n  runner.once(EVENT_RUN_END, self.epilogue.bind(self));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Spec, Base);\n\nSpec.description = 'hierarchical & verbose [default]';\n","'use strict';\n/**\n * @module Nyan\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar constants = require('../runner').constants;\nvar inherits = require('../utils').inherits;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\n\n/**\n * Expose `Dot`.\n */\n\nexports = module.exports = NyanCat;\n\n/**\n * Constructs a new `Nyan` reporter instance.\n *\n * @public\n * @class Nyan\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction NyanCat(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var width = (Base.window.width * 0.75) | 0;\n  var nyanCatWidth = (this.nyanCatWidth = 11);\n\n  this.colorIndex = 0;\n  this.numberOfLines = 4;\n  this.rainbowColors = self.generateColors();\n  this.scoreboardWidth = 5;\n  this.tick = 0;\n  this.trajectories = [[], [], [], []];\n  this.trajectoryWidthMax = width - nyanCatWidth;\n\n  runner.on(EVENT_RUN_BEGIN, function() {\n    Base.cursor.hide();\n    self.draw();\n  });\n\n  runner.on(EVENT_TEST_PENDING, function() {\n    self.draw();\n  });\n\n  runner.on(EVENT_TEST_PASS, function() {\n    self.draw();\n  });\n\n  runner.on(EVENT_TEST_FAIL, function() {\n    self.draw();\n  });\n\n  runner.once(EVENT_RUN_END, function() {\n    Base.cursor.show();\n    for (var i = 0; i < self.numberOfLines; i++) {\n      write('\\n');\n    }\n    self.epilogue();\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(NyanCat, Base);\n\n/**\n * Draw the nyan cat\n *\n * @private\n */\n\nNyanCat.prototype.draw = function() {\n  this.appendRainbow();\n  this.drawScoreboard();\n  this.drawRainbow();\n  this.drawNyanCat();\n  this.tick = !this.tick;\n};\n\n/**\n * Draw the \"scoreboard\" showing the number\n * of passes, failures and pending tests.\n *\n * @private\n */\n\nNyanCat.prototype.drawScoreboard = function() {\n  var stats = this.stats;\n\n  function draw(type, n) {\n    write(' ');\n    write(Base.color(type, n));\n    write('\\n');\n  }\n\n  draw('green', stats.passes);\n  draw('fail', stats.failures);\n  draw('pending', stats.pending);\n  write('\\n');\n\n  this.cursorUp(this.numberOfLines);\n};\n\n/**\n * Append the rainbow.\n *\n * @private\n */\n\nNyanCat.prototype.appendRainbow = function() {\n  var segment = this.tick ? '_' : '-';\n  var rainbowified = this.rainbowify(segment);\n\n  for (var index = 0; index < this.numberOfLines; index++) {\n    var trajectory = this.trajectories[index];\n    if (trajectory.length >= this.trajectoryWidthMax) {\n      trajectory.shift();\n    }\n    trajectory.push(rainbowified);\n  }\n};\n\n/**\n * Draw the rainbow.\n *\n * @private\n */\n\nNyanCat.prototype.drawRainbow = function() {\n  var self = this;\n\n  this.trajectories.forEach(function(line) {\n    write('\\u001b[' + self.scoreboardWidth + 'C');\n    write(line.join(''));\n    write('\\n');\n  });\n\n  this.cursorUp(this.numberOfLines);\n};\n\n/**\n * Draw the nyan cat\n *\n * @private\n */\nNyanCat.prototype.drawNyanCat = function() {\n  var self = this;\n  var startWidth = this.scoreboardWidth + this.trajectories[0].length;\n  var dist = '\\u001b[' + startWidth + 'C';\n  var padding = '';\n\n  write(dist);\n  write('_,------,');\n  write('\\n');\n\n  write(dist);\n  padding = self.tick ? '  ' : '   ';\n  write('_|' + padding + '/\\\\_/\\\\ ');\n  write('\\n');\n\n  write(dist);\n  padding = self.tick ? '_' : '__';\n  var tail = self.tick ? '~' : '^';\n  write(tail + '|' + padding + this.face() + ' ');\n  write('\\n');\n\n  write(dist);\n  padding = self.tick ? ' ' : '  ';\n  write(padding + '\"\"  \"\" ');\n  write('\\n');\n\n  this.cursorUp(this.numberOfLines);\n};\n\n/**\n * Draw nyan cat face.\n *\n * @private\n * @return {string}\n */\n\nNyanCat.prototype.face = function() {\n  var stats = this.stats;\n  if (stats.failures) {\n    return '( x .x)';\n  } else if (stats.pending) {\n    return '( o .o)';\n  } else if (stats.passes) {\n    return '( ^ .^)';\n  }\n  return '( - .-)';\n};\n\n/**\n * Move cursor up `n`.\n *\n * @private\n * @param {number} n\n */\n\nNyanCat.prototype.cursorUp = function(n) {\n  write('\\u001b[' + n + 'A');\n};\n\n/**\n * Move cursor down `n`.\n *\n * @private\n * @param {number} n\n */\n\nNyanCat.prototype.cursorDown = function(n) {\n  write('\\u001b[' + n + 'B');\n};\n\n/**\n * Generate rainbow colors.\n *\n * @private\n * @return {Array}\n */\nNyanCat.prototype.generateColors = function() {\n  var colors = [];\n\n  for (var i = 0; i < 6 * 7; i++) {\n    var pi3 = Math.floor(Math.PI / 3);\n    var n = i * (1.0 / 6);\n    var r = Math.floor(3 * Math.sin(n) + 3);\n    var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3);\n    var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3);\n    colors.push(36 * r + 6 * g + b + 16);\n  }\n\n  return colors;\n};\n\n/**\n * Apply rainbow to the given `str`.\n *\n * @private\n * @param {string} str\n * @return {string}\n */\nNyanCat.prototype.rainbowify = function(str) {\n  if (!Base.useColors) {\n    return str;\n  }\n  var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length];\n  this.colorIndex += 1;\n  return '\\u001b[38;5;' + color + 'm' + str + '\\u001b[0m';\n};\n\n/**\n * Stdout helper.\n *\n * @param {string} string A message to write to stdout.\n */\nfunction write(string) {\n  process.stdout.write(string);\n}\n\nNyanCat.description = '\"nyan cat\"';\n","export default {};\n","'use strict';\n/**\n * @module XUnit\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar utils = require('../utils');\nvar fs = require('fs');\nvar path = require('path');\nvar errors = require('../errors');\nvar createUnsupportedError = errors.createUnsupportedError;\nvar constants = require('../runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar STATE_FAILED = require('../runnable').constants.STATE_FAILED;\nvar inherits = utils.inherits;\nvar escape = utils.escape;\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\nvar Date = global.Date;\n\n/**\n * Expose `XUnit`.\n */\n\nexports = module.exports = XUnit;\n\n/**\n * Constructs a new `XUnit` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction XUnit(runner, options) {\n  Base.call(this, runner, options);\n\n  var stats = this.stats;\n  var tests = [];\n  var self = this;\n\n  // the name of the test suite, as it will appear in the resulting XML file\n  var suiteName;\n\n  // the default name of the test suite if none is provided\n  var DEFAULT_SUITE_NAME = 'Mocha Tests';\n\n  if (options && options.reporterOptions) {\n    if (options.reporterOptions.output) {\n      if (!fs.createWriteStream) {\n        throw createUnsupportedError('file output not supported in browser');\n      }\n\n      fs.mkdirSync(path.dirname(options.reporterOptions.output), {\n        recursive: true\n      });\n      self.fileStream = fs.createWriteStream(options.reporterOptions.output);\n    }\n\n    // get the suite name from the reporter options (if provided)\n    suiteName = options.reporterOptions.suiteName;\n  }\n\n  // fall back to the default suite name\n  suiteName = suiteName || DEFAULT_SUITE_NAME;\n\n  runner.on(EVENT_TEST_PENDING, function(test) {\n    tests.push(test);\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    tests.push(test);\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test) {\n    tests.push(test);\n  });\n\n  runner.once(EVENT_RUN_END, function() {\n    self.write(\n      tag(\n        'testsuite',\n        {\n          name: suiteName,\n          tests: stats.tests,\n          failures: 0,\n          errors: stats.failures,\n          skipped: stats.tests - stats.failures - stats.passes,\n          timestamp: new Date().toUTCString(),\n          time: stats.duration / 1000 || 0\n        },\n        false\n      )\n    );\n\n    tests.forEach(function(t) {\n      self.test(t);\n    });\n\n    self.write('</testsuite>');\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(XUnit, Base);\n\n/**\n * Override done to close the stream (if it's a file).\n *\n * @param failures\n * @param {Function} fn\n */\nXUnit.prototype.done = function(failures, fn) {\n  if (this.fileStream) {\n    this.fileStream.end(function() {\n      fn(failures);\n    });\n  } else {\n    fn(failures);\n  }\n};\n\n/**\n * Write out the given line.\n *\n * @param {string} line\n */\nXUnit.prototype.write = function(line) {\n  if (this.fileStream) {\n    this.fileStream.write(line + '\\n');\n  } else if (typeof process === 'object' && process.stdout) {\n    process.stdout.write(line + '\\n');\n  } else {\n    Base.consoleLog(line);\n  }\n};\n\n/**\n * Output tag for the given `test.`\n *\n * @param {Test} test\n */\nXUnit.prototype.test = function(test) {\n  Base.useColors = false;\n\n  var attrs = {\n    classname: test.parent.fullTitle(),\n    name: test.title,\n    time: test.duration / 1000 || 0\n  };\n\n  if (test.state === STATE_FAILED) {\n    var err = test.err;\n    var diff =\n      !Base.hideDiff && Base.showDiff(err)\n        ? '\\n' + Base.generateDiff(err.actual, err.expected)\n        : '';\n    this.write(\n      tag(\n        'testcase',\n        attrs,\n        false,\n        tag(\n          'failure',\n          {},\n          false,\n          escape(err.message) + escape(diff) + '\\n' + escape(err.stack)\n        )\n      )\n    );\n  } else if (test.isPending()) {\n    this.write(tag('testcase', attrs, false, tag('skipped', {}, true)));\n  } else {\n    this.write(tag('testcase', attrs, true));\n  }\n};\n\n/**\n * HTML tag helper.\n *\n * @param name\n * @param attrs\n * @param close\n * @param content\n * @return {string}\n */\nfunction tag(name, attrs, close, content) {\n  var end = close ? '/>' : '>';\n  var pairs = [];\n  var tag;\n\n  for (var key in attrs) {\n    if (Object.prototype.hasOwnProperty.call(attrs, key)) {\n      pairs.push(key + '=\"' + escape(attrs[key]) + '\"');\n    }\n  }\n\n  tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end;\n  if (content) {\n    tag += content + '</' + name + end;\n  }\n  return tag;\n}\n\nXUnit.description = 'XUnit-compatible XML output';\n","'use strict';\n/**\n * @module Markdown\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar utils = require('../utils');\nvar constants = require('../runner').constants;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\n\n/**\n * Constants\n */\n\nvar SUITE_PREFIX = '$';\n\n/**\n * Expose `Markdown`.\n */\n\nexports = module.exports = Markdown;\n\n/**\n * Constructs a new `Markdown` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Markdown(runner, options) {\n  Base.call(this, runner, options);\n\n  var level = 0;\n  var buf = '';\n\n  function title(str) {\n    return Array(level).join('#') + ' ' + str;\n  }\n\n  function mapTOC(suite, obj) {\n    var ret = obj;\n    var key = SUITE_PREFIX + suite.title;\n\n    obj = obj[key] = obj[key] || {suite: suite};\n    suite.suites.forEach(function(suite) {\n      mapTOC(suite, obj);\n    });\n\n    return ret;\n  }\n\n  function stringifyTOC(obj, level) {\n    ++level;\n    var buf = '';\n    var link;\n    for (var key in obj) {\n      if (key === 'suite') {\n        continue;\n      }\n      if (key !== SUITE_PREFIX) {\n        link = ' - [' + key.substring(1) + ']';\n        link += '(#' + utils.slug(obj[key].suite.fullTitle()) + ')\\n';\n        buf += Array(level).join('  ') + link;\n      }\n      buf += stringifyTOC(obj[key], level);\n    }\n    return buf;\n  }\n\n  function generateTOC(suite) {\n    var obj = mapTOC(suite, {});\n    return stringifyTOC(obj, 0);\n  }\n\n  generateTOC(runner.suite);\n\n  runner.on(EVENT_SUITE_BEGIN, function(suite) {\n    ++level;\n    var slug = utils.slug(suite.fullTitle());\n    buf += '<a name=\"' + slug + '\"></a>' + '\\n';\n    buf += title(suite.title) + '\\n';\n  });\n\n  runner.on(EVENT_SUITE_END, function() {\n    --level;\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    var code = utils.clean(test.body);\n    buf += test.title + '.\\n';\n    buf += '\\n```js\\n';\n    buf += code + '\\n';\n    buf += '```\\n\\n';\n  });\n\n  runner.once(EVENT_RUN_END, function() {\n    process.stdout.write('# TOC\\n');\n    process.stdout.write(generateTOC(runner.suite));\n    process.stdout.write(buf);\n  });\n}\n\nMarkdown.description = 'GitHub Flavored Markdown';\n","'use strict';\n/**\n * @module Progress\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar constants = require('../runner').constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar inherits = require('../utils').inherits;\nvar color = Base.color;\nvar cursor = Base.cursor;\n\n/**\n * Expose `Progress`.\n */\n\nexports = module.exports = Progress;\n\n/**\n * General progress bar color.\n */\n\nBase.colors.progress = 90;\n\n/**\n * Constructs a new `Progress` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Progress(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var width = (Base.window.width * 0.5) | 0;\n  var total = runner.total;\n  var complete = 0;\n  var lastN = -1;\n\n  // default chars\n  options = options || {};\n  var reporterOptions = options.reporterOptions || {};\n\n  options.open = reporterOptions.open || '[';\n  options.complete = reporterOptions.complete || '▬';\n  options.incomplete = reporterOptions.incomplete || Base.symbols.dot;\n  options.close = reporterOptions.close || ']';\n  options.verbose = reporterOptions.verbose || false;\n\n  // tests started\n  runner.on(EVENT_RUN_BEGIN, function() {\n    process.stdout.write('\\n');\n    cursor.hide();\n  });\n\n  // tests complete\n  runner.on(EVENT_TEST_END, function() {\n    complete++;\n\n    var percent = complete / total;\n    var n = (width * percent) | 0;\n    var i = width - n;\n\n    if (n === lastN && !options.verbose) {\n      // Don't re-render the line if it hasn't changed\n      return;\n    }\n    lastN = n;\n\n    cursor.CR();\n    process.stdout.write('\\u001b[J');\n    process.stdout.write(color('progress', '  ' + options.open));\n    process.stdout.write(Array(n).join(options.complete));\n    process.stdout.write(Array(i).join(options.incomplete));\n    process.stdout.write(color('progress', options.close));\n    if (options.verbose) {\n      process.stdout.write(color('progress', ' ' + complete + ' of ' + total));\n    }\n  });\n\n  // tests are complete, output some stats\n  // and the failures if any\n  runner.once(EVENT_RUN_END, function() {\n    cursor.show();\n    process.stdout.write('\\n');\n    self.epilogue();\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Progress, Base);\n\nProgress.description = 'a progress bar';\n","'use strict';\n/**\n * @module Landing\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar inherits = require('../utils').inherits;\nvar constants = require('../runner').constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar STATE_FAILED = require('../runnable').constants.STATE_FAILED;\n\nvar cursor = Base.cursor;\nvar color = Base.color;\n\n/**\n * Expose `Landing`.\n */\n\nexports = module.exports = Landing;\n\n/**\n * Airplane color.\n */\n\nBase.colors.plane = 0;\n\n/**\n * Airplane crash color.\n */\n\nBase.colors['plane crash'] = 31;\n\n/**\n * Runway color.\n */\n\nBase.colors.runway = 90;\n\n/**\n * Constructs a new `Landing` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Landing(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var width = (Base.window.width * 0.75) | 0;\n  var stream = process.stdout;\n\n  var plane = color('plane', '✈');\n  var crashed = -1;\n  var n = 0;\n  var total = 0;\n\n  function runway() {\n    var buf = Array(width).join('-');\n    return '  ' + color('runway', buf);\n  }\n\n  runner.on(EVENT_RUN_BEGIN, function() {\n    stream.write('\\n\\n\\n  ');\n    cursor.hide();\n  });\n\n  runner.on(EVENT_TEST_END, function(test) {\n    // check if the plane crashed\n    var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed;\n    // show the crash\n    if (test.state === STATE_FAILED) {\n      plane = color('plane crash', '✈');\n      crashed = col;\n    }\n\n    // render landing strip\n    stream.write('\\u001b[' + (width + 1) + 'D\\u001b[2A');\n    stream.write(runway());\n    stream.write('\\n  ');\n    stream.write(color('runway', Array(col).join('⋅')));\n    stream.write(plane);\n    stream.write(color('runway', Array(width - col).join('⋅') + '\\n'));\n    stream.write(runway());\n    stream.write('\\u001b[0m');\n  });\n\n  runner.once(EVENT_RUN_END, function() {\n    cursor.show();\n    process.stdout.write('\\n');\n    self.epilogue();\n  });\n\n  // if cursor is hidden when we ctrl-C, then it will remain hidden unless...\n  process.once('SIGINT', function() {\n    cursor.show();\n    process.nextTick(function() {\n      process.kill(process.pid, 'SIGINT');\n    });\n  });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Landing, Base);\n\nLanding.description = 'Unicode landing strip';\n","'use strict';\n/**\n * @module JSONStream\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base');\nvar constants = require('../runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\n/**\n * Expose `JSONStream`.\n */\n\nexports = module.exports = JSONStream;\n\n/**\n * Constructs a new `JSONStream` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction JSONStream(runner, options) {\n  Base.call(this, runner, options);\n\n  var self = this;\n  var total = runner.total;\n\n  runner.once(EVENT_RUN_BEGIN, function() {\n    writeEvent(['start', {total: total}]);\n  });\n\n  runner.on(EVENT_TEST_PASS, function(test) {\n    writeEvent(['pass', clean(test)]);\n  });\n\n  runner.on(EVENT_TEST_FAIL, function(test, err) {\n    test = clean(test);\n    test.err = err.message;\n    test.stack = err.stack || null;\n    writeEvent(['fail', test]);\n  });\n\n  runner.once(EVENT_RUN_END, function() {\n    writeEvent(['end', self.stats]);\n  });\n}\n\n/**\n * Mocha event to be written to the output stream.\n * @typedef {Array} JSONStream~MochaEvent\n */\n\n/**\n * Writes Mocha event to reporter output stream.\n *\n * @private\n * @param {JSONStream~MochaEvent} event - Mocha event to be output.\n */\nfunction writeEvent(event) {\n  process.stdout.write(JSON.stringify(event) + '\\n');\n}\n\n/**\n * Returns an object literal representation of `test`\n * free of cyclic properties, etc.\n *\n * @private\n * @param {Test} test - Instance used as data source.\n * @return {Object} object containing pared-down test instance data\n */\nfunction clean(test) {\n  return {\n    title: test.title,\n    fullTitle: test.fullTitle(),\n    file: test.file,\n    duration: test.duration,\n    currentRetry: test.currentRetry(),\n    speed: test.speed\n  };\n}\n\nJSONStream.description = 'newline delimited JSON events';\n","'use strict';\n\n// Alias exports to a their normalized format Mocha#reporter to prevent a need\n// for dynamic (try/catch) requires, which Browserify doesn't handle.\nexports.Base = exports.base = require('./base');\nexports.Dot = exports.dot = require('./dot');\nexports.Doc = exports.doc = require('./doc');\nexports.TAP = exports.tap = require('./tap');\nexports.JSON = exports.json = require('./json');\nexports.HTML = exports.html = require('./html');\nexports.List = exports.list = require('./list');\nexports.Min = exports.min = require('./min');\nexports.Spec = exports.spec = require('./spec');\nexports.Nyan = exports.nyan = require('./nyan');\nexports.XUnit = exports.xunit = require('./xunit');\nexports.Markdown = exports.markdown = require('./markdown');\nexports.Progress = exports.progress = require('./progress');\nexports.Landing = exports.landing = require('./landing');\nexports.JSONStream = exports['json-stream'] = require('./json-stream');\n","'use strict';\n\n/**\n * Web Notifications module.\n * @module Growl\n */\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\nvar Date = global.Date;\nvar setTimeout = global.setTimeout;\nvar EVENT_RUN_END = require('../runner').constants.EVENT_RUN_END;\nvar isBrowser = require('../utils').isBrowser;\n\n/**\n * Checks if browser notification support exists.\n *\n * @public\n * @see {@link https://caniuse.com/#feat=notifications|Browser support (notifications)}\n * @see {@link https://caniuse.com/#feat=promises|Browser support (promises)}\n * @see {@link Mocha#growl}\n * @see {@link Mocha#isGrowlCapable}\n * @return {boolean} whether browser notification support exists\n */\nexports.isCapable = function() {\n  var hasNotificationSupport = 'Notification' in window;\n  var hasPromiseSupport = typeof Promise === 'function';\n  return isBrowser() && hasNotificationSupport && hasPromiseSupport;\n};\n\n/**\n * Implements browser notifications as a pseudo-reporter.\n *\n * @public\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/notification|Notification API}\n * @see {@link https://developers.google.com/web/fundamentals/push-notifications/display-a-notification|Displaying a Notification}\n * @see {@link Growl#isPermitted}\n * @see {@link Mocha#_growl}\n * @param {Runner} runner - Runner instance.\n */\nexports.notify = function(runner) {\n  var promise = isPermitted();\n\n  /**\n   * Attempt notification.\n   */\n  var sendNotification = function() {\n    // If user hasn't responded yet... \"No notification for you!\" (Seinfeld)\n    Promise.race([promise, Promise.resolve(undefined)])\n      .then(canNotify)\n      .then(function() {\n        display(runner);\n      })\n      .catch(notPermitted);\n  };\n\n  runner.once(EVENT_RUN_END, sendNotification);\n};\n\n/**\n * Checks if browser notification is permitted by user.\n *\n * @private\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission|Notification.permission}\n * @see {@link Mocha#growl}\n * @see {@link Mocha#isGrowlPermitted}\n * @returns {Promise<boolean>} promise determining if browser notification\n *     permissible when fulfilled.\n */\nfunction isPermitted() {\n  var permitted = {\n    granted: function allow() {\n      return Promise.resolve(true);\n    },\n    denied: function deny() {\n      return Promise.resolve(false);\n    },\n    default: function ask() {\n      return Notification.requestPermission().then(function(permission) {\n        return permission === 'granted';\n      });\n    }\n  };\n\n  return permitted[Notification.permission]();\n}\n\n/**\n * @summary\n * Determines if notification should proceed.\n *\n * @description\n * Notification shall <strong>not</strong> proceed unless `value` is true.\n *\n * `value` will equal one of:\n * <ul>\n *   <li><code>true</code> (from `isPermitted`)</li>\n *   <li><code>false</code> (from `isPermitted`)</li>\n *   <li><code>undefined</code> (from `Promise.race`)</li>\n * </ul>\n *\n * @private\n * @param {boolean|undefined} value - Determines if notification permissible.\n * @returns {Promise<undefined>} Notification can proceed\n */\nfunction canNotify(value) {\n  if (!value) {\n    var why = value === false ? 'blocked' : 'unacknowledged';\n    var reason = 'not permitted by user (' + why + ')';\n    return Promise.reject(new Error(reason));\n  }\n  return Promise.resolve();\n}\n\n/**\n * Displays the notification.\n *\n * @private\n * @param {Runner} runner - Runner instance.\n */\nfunction display(runner) {\n  var stats = runner.stats;\n  var symbol = {\n    cross: '\\u274C',\n    tick: '\\u2705'\n  };\n  var logo = require('../../package').notifyLogo;\n  var _message;\n  var message;\n  var title;\n\n  if (stats.failures) {\n    _message = stats.failures + ' of ' + stats.tests + ' tests failed';\n    message = symbol.cross + ' ' + _message;\n    title = 'Failed';\n  } else {\n    _message = stats.passes + ' tests passed in ' + stats.duration + 'ms';\n    message = symbol.tick + ' ' + _message;\n    title = 'Passed';\n  }\n\n  // Send notification\n  var options = {\n    badge: logo,\n    body: message,\n    dir: 'ltr',\n    icon: logo,\n    lang: 'en-US',\n    name: 'mocha',\n    requireInteraction: false,\n    timestamp: Date.now()\n  };\n  var notification = new Notification(title, options);\n\n  // Autoclose after brief delay (makes various browsers act same)\n  var FORCE_DURATION = 4000;\n  setTimeout(notification.close.bind(notification), FORCE_DURATION);\n}\n\n/**\n * As notifications are tangential to our purpose, just log the error.\n *\n * @private\n * @param {Error} err - Why notification didn't happen.\n */\nfunction notPermitted(err) {\n  console.error('notification error:', err.message);\n}\n","'use strict';\n\n/**\n * Provides a factory function for a {@link StatsCollector} object.\n * @module\n */\n\nvar constants = require('./runner').constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\n\n/**\n * Test statistics collector.\n *\n * @public\n * @typedef {Object} StatsCollector\n * @property {number} suites - integer count of suites run.\n * @property {number} tests - integer count of tests run.\n * @property {number} passes - integer count of passing tests.\n * @property {number} pending - integer count of pending tests.\n * @property {number} failures - integer count of failed tests.\n * @property {Date} start - time when testing began.\n * @property {Date} end - time when testing concluded.\n * @property {number} duration - number of msecs that testing took.\n */\n\nvar Date = global.Date;\n\n/**\n * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`.\n *\n * @private\n * @param {Runner} runner - Runner instance\n * @throws {TypeError} If falsy `runner`\n */\nfunction createStatsCollector(runner) {\n  /**\n   * @type StatsCollector\n   */\n  var stats = {\n    suites: 0,\n    tests: 0,\n    passes: 0,\n    pending: 0,\n    failures: 0\n  };\n\n  if (!runner) {\n    throw new TypeError('Missing runner argument');\n  }\n\n  runner.stats = stats;\n\n  runner.once(EVENT_RUN_BEGIN, function() {\n    stats.start = new Date();\n  });\n  runner.on(EVENT_SUITE_BEGIN, function(suite) {\n    suite.root || stats.suites++;\n  });\n  runner.on(EVENT_TEST_PASS, function() {\n    stats.passes++;\n  });\n  runner.on(EVENT_TEST_FAIL, function() {\n    stats.failures++;\n  });\n  runner.on(EVENT_TEST_PENDING, function() {\n    stats.pending++;\n  });\n  runner.on(EVENT_TEST_END, function() {\n    stats.tests++;\n  });\n  runner.once(EVENT_RUN_END, function() {\n    stats.end = new Date();\n    stats.duration = stats.end - stats.start;\n  });\n}\n\nmodule.exports = createStatsCollector;\n","'use strict';\nvar Runnable = require('./runnable');\nvar utils = require('./utils');\nvar errors = require('./errors');\nvar createInvalidArgumentTypeError = errors.createInvalidArgumentTypeError;\nvar isString = utils.isString;\n\nconst {MOCHA_ID_PROP_NAME} = utils.constants;\n\nmodule.exports = Test;\n\n/**\n * Initialize a new `Test` with the given `title` and callback `fn`.\n *\n * @public\n * @class\n * @extends Runnable\n * @param {String} title - Test title (required)\n * @param {Function} [fn] - Test callback.  If omitted, the Test is considered \"pending\"\n */\nfunction Test(title, fn) {\n  if (!isString(title)) {\n    throw createInvalidArgumentTypeError(\n      'Test argument \"title\" should be a string. Received type \"' +\n        typeof title +\n        '\"',\n      'title',\n      'string'\n    );\n  }\n  this.type = 'test';\n  Runnable.call(this, title, fn);\n  this.reset();\n}\n\n/**\n * Inherit from `Runnable.prototype`.\n */\nutils.inherits(Test, Runnable);\n\n/**\n * Resets the state initially or for a next run.\n */\nTest.prototype.reset = function() {\n  Runnable.prototype.reset.call(this);\n  this.pending = !this.fn;\n  delete this.state;\n};\n\n/**\n * Set or get retried test\n *\n * @private\n */\nTest.prototype.retriedTest = function(n) {\n  if (!arguments.length) {\n    return this._retriedTest;\n  }\n  this._retriedTest = n;\n};\n\n/**\n * Add test to the list of tests marked `only`.\n *\n * @private\n */\nTest.prototype.markOnly = function() {\n  this.parent.appendOnlyTest(this);\n};\n\nTest.prototype.clone = function() {\n  var test = new Test(this.title, this.fn);\n  test.timeout(this.timeout());\n  test.slow(this.slow());\n  test.retries(this.retries());\n  test.currentRetry(this.currentRetry());\n  test.retriedTest(this.retriedTest() || this);\n  test.globals(this.globals());\n  test.parent = this.parent;\n  test.file = this.file;\n  test.ctx = this.ctx;\n  return test;\n};\n\n/**\n * Returns an minimal object suitable for transmission over IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\nTest.prototype.serialize = function serialize() {\n  return {\n    $$currentRetry: this._currentRetry,\n    $$fullTitle: this.fullTitle(),\n    $$isPending: this.pending,\n    $$retriedTest: this._retriedTest || null,\n    $$slow: this._slow,\n    $$titlePath: this.titlePath(),\n    body: this.body,\n    duration: this.duration,\n    err: this.err,\n    parent: {\n      $$fullTitle: this.parent.fullTitle(),\n      [MOCHA_ID_PROP_NAME]: this.parent.id\n    },\n    speed: this.speed,\n    state: this.state,\n    title: this.title,\n    type: this.type,\n    file: this.file,\n    [MOCHA_ID_PROP_NAME]: this.id\n  };\n};\n","'use strict';\n\n/**\n @module interfaces/common\n*/\n\nvar Suite = require('../suite');\nvar errors = require('../errors');\nvar createMissingArgumentError = errors.createMissingArgumentError;\nvar createUnsupportedError = errors.createUnsupportedError;\nvar createForbiddenExclusivityError = errors.createForbiddenExclusivityError;\n\n/**\n * Functions common to more than one interface.\n *\n * @private\n * @param {Suite[]} suites\n * @param {Context} context\n * @param {Mocha} mocha\n * @return {Object} An object containing common functions.\n */\nmodule.exports = function(suites, context, mocha) {\n  /**\n   * Check if the suite should be tested.\n   *\n   * @private\n   * @param {Suite} suite - suite to check\n   * @returns {boolean}\n   */\n  function shouldBeTested(suite) {\n    return (\n      !mocha.options.grep ||\n      (mocha.options.grep &&\n        mocha.options.grep.test(suite.fullTitle()) &&\n        !mocha.options.invert)\n    );\n  }\n\n  return {\n    /**\n     * This is only present if flag --delay is passed into Mocha. It triggers\n     * root suite execution.\n     *\n     * @param {Suite} suite The root suite.\n     * @return {Function} A function which runs the root suite\n     */\n    runWithSuite: function runWithSuite(suite) {\n      return function run() {\n        suite.run();\n      };\n    },\n\n    /**\n     * Execute before running tests.\n     *\n     * @param {string} name\n     * @param {Function} fn\n     */\n    before: function(name, fn) {\n      suites[0].beforeAll(name, fn);\n    },\n\n    /**\n     * Execute after running tests.\n     *\n     * @param {string} name\n     * @param {Function} fn\n     */\n    after: function(name, fn) {\n      suites[0].afterAll(name, fn);\n    },\n\n    /**\n     * Execute before each test case.\n     *\n     * @param {string} name\n     * @param {Function} fn\n     */\n    beforeEach: function(name, fn) {\n      suites[0].beforeEach(name, fn);\n    },\n\n    /**\n     * Execute after each test case.\n     *\n     * @param {string} name\n     * @param {Function} fn\n     */\n    afterEach: function(name, fn) {\n      suites[0].afterEach(name, fn);\n    },\n\n    suite: {\n      /**\n       * Create an exclusive Suite; convenience function\n       * See docstring for create() below.\n       *\n       * @param {Object} opts\n       * @returns {Suite}\n       */\n      only: function only(opts) {\n        if (mocha.options.forbidOnly) {\n          throw createForbiddenExclusivityError(mocha);\n        }\n        opts.isOnly = true;\n        return this.create(opts);\n      },\n\n      /**\n       * Create a Suite, but skip it; convenience function\n       * See docstring for create() below.\n       *\n       * @param {Object} opts\n       * @returns {Suite}\n       */\n      skip: function skip(opts) {\n        opts.pending = true;\n        return this.create(opts);\n      },\n\n      /**\n       * Creates a suite.\n       *\n       * @param {Object} opts Options\n       * @param {string} opts.title Title of Suite\n       * @param {Function} [opts.fn] Suite Function (not always applicable)\n       * @param {boolean} [opts.pending] Is Suite pending?\n       * @param {string} [opts.file] Filepath where this Suite resides\n       * @param {boolean} [opts.isOnly] Is Suite exclusive?\n       * @returns {Suite}\n       */\n      create: function create(opts) {\n        var suite = Suite.create(suites[0], opts.title);\n        suite.pending = Boolean(opts.pending);\n        suite.file = opts.file;\n        suites.unshift(suite);\n        if (opts.isOnly) {\n          suite.markOnly();\n        }\n        if (\n          suite.pending &&\n          mocha.options.forbidPending &&\n          shouldBeTested(suite)\n        ) {\n          throw createUnsupportedError('Pending test forbidden');\n        }\n        if (typeof opts.fn === 'function') {\n          opts.fn.call(suite);\n          suites.shift();\n        } else if (typeof opts.fn === 'undefined' && !suite.pending) {\n          throw createMissingArgumentError(\n            'Suite \"' +\n              suite.fullTitle() +\n              '\" was defined but no callback was supplied. ' +\n              'Supply a callback or explicitly skip the suite.',\n            'callback',\n            'function'\n          );\n        } else if (!opts.fn && suite.pending) {\n          suites.shift();\n        }\n\n        return suite;\n      }\n    },\n\n    test: {\n      /**\n       * Exclusive test-case.\n       *\n       * @param {Object} mocha\n       * @param {Function} test\n       * @returns {*}\n       */\n      only: function(mocha, test) {\n        if (mocha.options.forbidOnly) {\n          throw createForbiddenExclusivityError(mocha);\n        }\n        test.markOnly();\n        return test;\n      },\n\n      /**\n       * Pending test case.\n       *\n       * @param {string} title\n       */\n      skip: function(title) {\n        context.test(title);\n      },\n\n      /**\n       * Number of retry attempts\n       *\n       * @param {number} n\n       */\n      retries: function(n) {\n        context.retries(n);\n      }\n    }\n  };\n};\n","'use strict';\n\nvar Test = require('../test');\nvar EVENT_FILE_PRE_REQUIRE = require('../suite').constants\n  .EVENT_FILE_PRE_REQUIRE;\n\n/**\n * BDD-style interface:\n *\n *      describe('Array', function() {\n *        describe('#indexOf()', function() {\n *          it('should return -1 when not present', function() {\n *            // ...\n *          });\n *\n *          it('should return the index when present', function() {\n *            // ...\n *          });\n *        });\n *      });\n *\n * @param {Suite} suite Root suite.\n */\nmodule.exports = function bddInterface(suite) {\n  var suites = [suite];\n\n  suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) {\n    var common = require('./common')(suites, context, mocha);\n\n    context.before = common.before;\n    context.after = common.after;\n    context.beforeEach = common.beforeEach;\n    context.afterEach = common.afterEach;\n    context.run = mocha.options.delay && common.runWithSuite(suite);\n    /**\n     * Describe a \"suite\" with the given `title`\n     * and callback `fn` containing nested suites\n     * and/or tests.\n     */\n\n    context.describe = context.context = function(title, fn) {\n      return common.suite.create({\n        title: title,\n        file: file,\n        fn: fn\n      });\n    };\n\n    /**\n     * Pending describe.\n     */\n\n    context.xdescribe = context.xcontext = context.describe.skip = function(\n      title,\n      fn\n    ) {\n      return common.suite.skip({\n        title: title,\n        file: file,\n        fn: fn\n      });\n    };\n\n    /**\n     * Exclusive suite.\n     */\n\n    context.describe.only = function(title, fn) {\n      return common.suite.only({\n        title: title,\n        file: file,\n        fn: fn\n      });\n    };\n\n    /**\n     * Describe a specification or test-case\n     * with the given `title` and callback `fn`\n     * acting as a thunk.\n     */\n\n    context.it = context.specify = function(title, fn) {\n      var suite = suites[0];\n      if (suite.isPending()) {\n        fn = null;\n      }\n      var test = new Test(title, fn);\n      test.file = file;\n      suite.addTest(test);\n      return test;\n    };\n\n    /**\n     * Exclusive test-case.\n     */\n\n    context.it.only = function(title, fn) {\n      return common.test.only(mocha, context.it(title, fn));\n    };\n\n    /**\n     * Pending test case.\n     */\n\n    context.xit = context.xspecify = context.it.skip = function(title) {\n      return context.it(title);\n    };\n\n    /**\n     * Number of attempts to retry.\n     */\n    context.it.retries = function(n) {\n      context.retries(n);\n    };\n  });\n};\n\nmodule.exports.description = 'BDD or RSpec style [default]';\n","'use strict';\n\nvar Test = require('../test');\nvar EVENT_FILE_PRE_REQUIRE = require('../suite').constants\n  .EVENT_FILE_PRE_REQUIRE;\n\n/**\n * TDD-style interface:\n *\n *      suite('Array', function() {\n *        suite('#indexOf()', function() {\n *          suiteSetup(function() {\n *\n *          });\n *\n *          test('should return -1 when not present', function() {\n *\n *          });\n *\n *          test('should return the index when present', function() {\n *\n *          });\n *\n *          suiteTeardown(function() {\n *\n *          });\n *        });\n *      });\n *\n * @param {Suite} suite Root suite.\n */\nmodule.exports = function(suite) {\n  var suites = [suite];\n\n  suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) {\n    var common = require('./common')(suites, context, mocha);\n\n    context.setup = common.beforeEach;\n    context.teardown = common.afterEach;\n    context.suiteSetup = common.before;\n    context.suiteTeardown = common.after;\n    context.run = mocha.options.delay && common.runWithSuite(suite);\n\n    /**\n     * Describe a \"suite\" with the given `title` and callback `fn` containing\n     * nested suites and/or tests.\n     */\n    context.suite = function(title, fn) {\n      return common.suite.create({\n        title: title,\n        file: file,\n        fn: fn\n      });\n    };\n\n    /**\n     * Pending suite.\n     */\n    context.suite.skip = function(title, fn) {\n      return common.suite.skip({\n        title: title,\n        file: file,\n        fn: fn\n      });\n    };\n\n    /**\n     * Exclusive test-case.\n     */\n    context.suite.only = function(title, fn) {\n      return common.suite.only({\n        title: title,\n        file: file,\n        fn: fn\n      });\n    };\n\n    /**\n     * Describe a specification or test-case with the given `title` and\n     * callback `fn` acting as a thunk.\n     */\n    context.test = function(title, fn) {\n      var suite = suites[0];\n      if (suite.isPending()) {\n        fn = null;\n      }\n      var test = new Test(title, fn);\n      test.file = file;\n      suite.addTest(test);\n      return test;\n    };\n\n    /**\n     * Exclusive test-case.\n     */\n\n    context.test.only = function(title, fn) {\n      return common.test.only(mocha, context.test(title, fn));\n    };\n\n    context.test.skip = common.test.skip;\n    context.test.retries = common.test.retries;\n  });\n};\n\nmodule.exports.description =\n  'traditional \"suite\"/\"test\" instead of BDD\\'s \"describe\"/\"it\"';\n","'use strict';\n\nvar Test = require('../test');\nvar EVENT_FILE_PRE_REQUIRE = require('../suite').constants\n  .EVENT_FILE_PRE_REQUIRE;\n\n/**\n * QUnit-style interface:\n *\n *     suite('Array');\n *\n *     test('#length', function() {\n *       var arr = [1,2,3];\n *       ok(arr.length == 3);\n *     });\n *\n *     test('#indexOf()', function() {\n *       var arr = [1,2,3];\n *       ok(arr.indexOf(1) == 0);\n *       ok(arr.indexOf(2) == 1);\n *       ok(arr.indexOf(3) == 2);\n *     });\n *\n *     suite('String');\n *\n *     test('#length', function() {\n *       ok('foo'.length == 3);\n *     });\n *\n * @param {Suite} suite Root suite.\n */\nmodule.exports = function qUnitInterface(suite) {\n  var suites = [suite];\n\n  suite.on(EVENT_FILE_PRE_REQUIRE, function(context, file, mocha) {\n    var common = require('./common')(suites, context, mocha);\n\n    context.before = common.before;\n    context.after = common.after;\n    context.beforeEach = common.beforeEach;\n    context.afterEach = common.afterEach;\n    context.run = mocha.options.delay && common.runWithSuite(suite);\n    /**\n     * Describe a \"suite\" with the given `title`.\n     */\n\n    context.suite = function(title) {\n      if (suites.length > 1) {\n        suites.shift();\n      }\n      return common.suite.create({\n        title: title,\n        file: file,\n        fn: false\n      });\n    };\n\n    /**\n     * Exclusive Suite.\n     */\n\n    context.suite.only = function(title) {\n      if (suites.length > 1) {\n        suites.shift();\n      }\n      return common.suite.only({\n        title: title,\n        file: file,\n        fn: false\n      });\n    };\n\n    /**\n     * Describe a specification or test-case\n     * with the given `title` and callback `fn`\n     * acting as a thunk.\n     */\n\n    context.test = function(title, fn) {\n      var test = new Test(title, fn);\n      test.file = file;\n      suites[0].addTest(test);\n      return test;\n    };\n\n    /**\n     * Exclusive test-case.\n     */\n\n    context.test.only = function(title, fn) {\n      return common.test.only(mocha, context.test(title, fn));\n    };\n\n    context.test.skip = common.test.skip;\n    context.test.retries = common.test.retries;\n  });\n};\n\nmodule.exports.description = 'QUnit style';\n","'use strict';\nvar Suite = require('../suite');\nvar Test = require('../test');\n\n/**\n * Exports-style (as Node.js module) interface:\n *\n *     exports.Array = {\n *       '#indexOf()': {\n *         'should return -1 when the value is not present': function() {\n *\n *         },\n *\n *         'should return the correct index when the value is present': function() {\n *\n *         }\n *       }\n *     };\n *\n * @param {Suite} suite Root suite.\n */\nmodule.exports = function(suite) {\n  var suites = [suite];\n\n  suite.on(Suite.constants.EVENT_FILE_REQUIRE, visit);\n\n  function visit(obj, file) {\n    var suite;\n    for (var key in obj) {\n      if (typeof obj[key] === 'function') {\n        var fn = obj[key];\n        switch (key) {\n          case 'before':\n            suites[0].beforeAll(fn);\n            break;\n          case 'after':\n            suites[0].afterAll(fn);\n            break;\n          case 'beforeEach':\n            suites[0].beforeEach(fn);\n            break;\n          case 'afterEach':\n            suites[0].afterEach(fn);\n            break;\n          default:\n            var test = new Test(key, fn);\n            test.file = file;\n            suites[0].addTest(test);\n        }\n      } else {\n        suite = Suite.create(suites[0], key);\n        suites.unshift(suite);\n        visit(obj[key], file);\n        suites.shift();\n      }\n    }\n  }\n};\n\nmodule.exports.description = 'Node.js module (\"exports\") style';\n","'use strict';\n\nexports.bdd = require('./bdd');\nexports.tdd = require('./tdd');\nexports.qunit = require('./qunit');\nexports.exports = require('./exports');\n","'use strict';\n/**\n * @module Context\n */\n/**\n * Expose `Context`.\n */\n\nmodule.exports = Context;\n\n/**\n * Initialize a new `Context`.\n *\n * @private\n */\nfunction Context() {}\n\n/**\n * Set or get the context `Runnable` to `runnable`.\n *\n * @private\n * @param {Runnable} runnable\n * @return {Context} context\n */\nContext.prototype.runnable = function(runnable) {\n  if (!arguments.length) {\n    return this._runnable;\n  }\n  this.test = this._runnable = runnable;\n  return this;\n};\n\n/**\n * Set or get test timeout `ms`.\n *\n * @private\n * @param {number} ms\n * @return {Context} self\n */\nContext.prototype.timeout = function(ms) {\n  if (!arguments.length) {\n    return this.runnable().timeout();\n  }\n  this.runnable().timeout(ms);\n  return this;\n};\n\n/**\n * Set or get test slowness threshold `ms`.\n *\n * @private\n * @param {number} ms\n * @return {Context} self\n */\nContext.prototype.slow = function(ms) {\n  if (!arguments.length) {\n    return this.runnable().slow();\n  }\n  this.runnable().slow(ms);\n  return this;\n};\n\n/**\n * Mark a test as skipped.\n *\n * @private\n * @throws Pending\n */\nContext.prototype.skip = function() {\n  this.runnable().skip();\n};\n\n/**\n * Set or get a number of allowed retries on failed tests\n *\n * @private\n * @param {number} n\n * @return {Context} self\n */\nContext.prototype.retries = function(n) {\n  if (!arguments.length) {\n    return this.runnable().retries();\n  }\n  this.runnable().retries(n);\n  return this;\n};\n","'use strict';\n\n/*!\n * mocha\n * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n * MIT Licensed\n */\n\nvar escapeRe = require('escape-string-regexp');\nvar path = require('path');\nvar builtinReporters = require('./reporters');\nvar growl = require('./nodejs/growl');\nvar utils = require('./utils');\nvar mocharc = require('./mocharc.json');\nvar Suite = require('./suite');\nvar esmUtils = utils.supportsEsModules(true)\n  ? require('./esm-utils')\n  : undefined;\nvar createStatsCollector = require('./stats-collector');\nconst {\n  warn,\n  createInvalidReporterError,\n  createInvalidInterfaceError,\n  createMochaInstanceAlreadyDisposedError,\n  createMochaInstanceAlreadyRunningError,\n  createUnsupportedError\n} = require('./errors');\nconst {\n  EVENT_FILE_PRE_REQUIRE,\n  EVENT_FILE_POST_REQUIRE,\n  EVENT_FILE_REQUIRE\n} = Suite.constants;\nvar sQuote = utils.sQuote;\nvar debug = require('debug')('mocha:mocha');\n\nexports = module.exports = Mocha;\n\n/**\n * A Mocha instance is a finite state machine.\n * These are the states it can be in.\n * @private\n */\nvar mochaStates = utils.defineConstants({\n  /**\n   * Initial state of the mocha instance\n   * @private\n   */\n  INIT: 'init',\n  /**\n   * Mocha instance is running tests\n   * @private\n   */\n  RUNNING: 'running',\n  /**\n   * Mocha instance is done running tests and references to test functions and hooks are cleaned.\n   * You can reset this state by unloading the test files.\n   * @private\n   */\n  REFERENCES_CLEANED: 'referencesCleaned',\n  /**\n   * Mocha instance is disposed and can no longer be used.\n   * @private\n   */\n  DISPOSED: 'disposed'\n});\n\n/**\n * To require local UIs and reporters when running in node.\n */\n\nif (!utils.isBrowser() && typeof module.paths !== 'undefined') {\n  var cwd = utils.cwd();\n  module.paths.push(cwd, path.join(cwd, 'node_modules'));\n}\n\n/**\n * Expose internals.\n * @private\n */\n\nexports.utils = utils;\nexports.interfaces = require('./interfaces');\n/**\n * @public\n * @memberof Mocha\n */\nexports.reporters = builtinReporters;\nexports.Runnable = require('./runnable');\nexports.Context = require('./context');\n/**\n *\n * @memberof Mocha\n */\nexports.Runner = require('./runner');\nexports.Suite = Suite;\nexports.Hook = require('./hook');\nexports.Test = require('./test');\n\n/**\n * Constructs a new Mocha instance with `options`.\n *\n * @public\n * @class Mocha\n * @param {Object} [options] - Settings object.\n * @param {boolean} [options.allowUncaught] - Propagate uncaught errors?\n * @param {boolean} [options.asyncOnly] - Force `done` callback or promise?\n * @param {boolean} [options.bail] - Bail after first test failure?\n * @param {boolean} [options.checkLeaks] - Check for global variable leaks?\n * @param {boolean} [options.color] - Color TTY output from reporter?\n * @param {boolean} [options.delay] - Delay root suite execution?\n * @param {boolean} [options.diff] - Show diff on failure?\n * @param {string} [options.fgrep] - Test filter given string.\n * @param {boolean} [options.forbidOnly] - Tests marked `only` fail the suite?\n * @param {boolean} [options.forbidPending] - Pending tests fail the suite?\n * @param {boolean} [options.fullTrace] - Full stacktrace upon failure?\n * @param {string[]} [options.global] - Variables expected in global scope.\n * @param {RegExp|string} [options.grep] - Test filter given regular expression.\n * @param {boolean} [options.growl] - Enable desktop notifications?\n * @param {boolean} [options.inlineDiffs] - Display inline diffs?\n * @param {boolean} [options.invert] - Invert test filter matches?\n * @param {boolean} [options.noHighlighting] - Disable syntax highlighting?\n * @param {string|constructor} [options.reporter] - Reporter name or constructor.\n * @param {Object} [options.reporterOption] - Reporter settings object.\n * @param {number} [options.retries] - Number of times to retry failed tests.\n * @param {number} [options.slow] - Slow threshold value.\n * @param {number|string} [options.timeout] - Timeout threshold value.\n * @param {string} [options.ui] - Interface name.\n * @param {boolean} [options.parallel] - Run jobs in parallel\n * @param {number} [options.jobs] - Max number of worker processes for parallel runs\n * @param {MochaRootHookObject} [options.rootHooks] - Hooks to bootstrap the root\n * suite with\n * @param {boolean} [options.isWorker] - Should be `true` if `Mocha` process is running in a worker process.\n */\nfunction Mocha(options = {}) {\n  options = {...mocharc, ...options};\n  this.files = [];\n  this.options = options;\n  // root suite\n  this.suite = new exports.Suite('', new exports.Context(), true);\n  this._cleanReferencesAfterRun = true;\n  this._state = mochaStates.INIT;\n\n  this.grep(options.grep)\n    .fgrep(options.fgrep)\n    .ui(options.ui)\n    .reporter(\n      options.reporter,\n      options.reporterOption || options.reporterOptions // reporterOptions was previously the only way to specify options to reporter\n    )\n    .slow(options.slow)\n    .global(options.global);\n\n  // this guard exists because Suite#timeout does not consider `undefined` to be valid input\n  if (typeof options.timeout !== 'undefined') {\n    this.timeout(options.timeout === false ? 0 : options.timeout);\n  }\n\n  if ('retries' in options) {\n    this.retries(options.retries);\n  }\n\n  [\n    'allowUncaught',\n    'asyncOnly',\n    'bail',\n    'checkLeaks',\n    'color',\n    'delay',\n    'diff',\n    'forbidOnly',\n    'forbidPending',\n    'fullTrace',\n    'growl',\n    'inlineDiffs',\n    'invert'\n  ].forEach(function(opt) {\n    if (options[opt]) {\n      this[opt]();\n    }\n  }, this);\n\n  if (options.rootHooks) {\n    this.rootHooks(options.rootHooks);\n  }\n\n  /**\n   * The class which we'll instantiate in {@link Mocha#run}.  Defaults to\n   * {@link Runner} in serial mode; changes in parallel mode.\n   * @memberof Mocha\n   * @private\n   */\n  this._runnerClass = exports.Runner;\n\n  /**\n   * Whether or not to call {@link Mocha#loadFiles} implicitly when calling\n   * {@link Mocha#run}.  If this is `true`, then it's up to the consumer to call\n   * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}.\n   * @private\n   * @memberof Mocha\n   */\n  this._lazyLoadFiles = false;\n\n  /**\n   * It's useful for a Mocha instance to know if it's running in a worker process.\n   * We could derive this via other means, but it's helpful to have a flag to refer to.\n   * @memberof Mocha\n   * @private\n   */\n  this.isWorker = Boolean(options.isWorker);\n\n  this.globalSetup(options.globalSetup)\n    .globalTeardown(options.globalTeardown)\n    .enableGlobalSetup(options.enableGlobalSetup)\n    .enableGlobalTeardown(options.enableGlobalTeardown);\n\n  if (\n    options.parallel &&\n    (typeof options.jobs === 'undefined' || options.jobs > 1)\n  ) {\n    debug('attempting to enable parallel mode');\n    this.parallelMode(true);\n  }\n}\n\n/**\n * Enables or disables bailing on the first failure.\n *\n * @public\n * @see [CLI option](../#-bail-b)\n * @param {boolean} [bail=true] - Whether to bail on first error.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.bail = function(bail) {\n  this.suite.bail(bail !== false);\n  return this;\n};\n\n/**\n * @summary\n * Adds `file` to be loaded for execution.\n *\n * @description\n * Useful for generic setup code that must be included within test suite.\n *\n * @public\n * @see [CLI option](../#-file-filedirectoryglob)\n * @param {string} file - Pathname of file to be loaded.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.addFile = function(file) {\n  this.files.push(file);\n  return this;\n};\n\n/**\n * Sets reporter to `reporter`, defaults to \"spec\".\n *\n * @public\n * @see [CLI option](../#-reporter-name-r-name)\n * @see [Reporters](../#reporters)\n * @param {String|Function} reporterName - Reporter name or constructor.\n * @param {Object} [reporterOptions] - Options used to configure the reporter.\n * @returns {Mocha} this\n * @chainable\n * @throws {Error} if requested reporter cannot be loaded\n * @example\n *\n * // Use XUnit reporter and direct its output to file\n * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' });\n */\nMocha.prototype.reporter = function(reporterName, reporterOptions) {\n  if (typeof reporterName === 'function') {\n    this._reporter = reporterName;\n  } else {\n    reporterName = reporterName || 'spec';\n    var reporter;\n    // Try to load a built-in reporter.\n    if (builtinReporters[reporterName]) {\n      reporter = builtinReporters[reporterName];\n    }\n    // Try to load reporters from process.cwd() and node_modules\n    if (!reporter) {\n      try {\n        reporter = require(reporterName);\n      } catch (err) {\n        if (err.code === 'MODULE_NOT_FOUND') {\n          // Try to load reporters from a path (absolute or relative)\n          try {\n            reporter = require(path.resolve(utils.cwd(), reporterName));\n          } catch (_err) {\n            _err.code === 'MODULE_NOT_FOUND'\n              ? warn(sQuote(reporterName) + ' reporter not found')\n              : warn(\n                  sQuote(reporterName) +\n                    ' reporter blew up with error:\\n' +\n                    err.stack\n                );\n          }\n        } else {\n          warn(\n            sQuote(reporterName) + ' reporter blew up with error:\\n' + err.stack\n          );\n        }\n      }\n    }\n    if (!reporter) {\n      throw createInvalidReporterError(\n        'invalid reporter ' + sQuote(reporterName),\n        reporterName\n      );\n    }\n    this._reporter = reporter;\n  }\n  this.options.reporterOption = reporterOptions;\n  // alias option name is used in public reporters xunit/tap/progress\n  this.options.reporterOptions = reporterOptions;\n  return this;\n};\n\n/**\n * Sets test UI `name`, defaults to \"bdd\".\n *\n * @public\n * @see [CLI option](../#-ui-name-u-name)\n * @see [Interface DSLs](../#interfaces)\n * @param {string|Function} [ui=bdd] - Interface name or class.\n * @returns {Mocha} this\n * @chainable\n * @throws {Error} if requested interface cannot be loaded\n */\nMocha.prototype.ui = function(ui) {\n  var bindInterface;\n  if (typeof ui === 'function') {\n    bindInterface = ui;\n  } else {\n    ui = ui || 'bdd';\n    bindInterface = exports.interfaces[ui];\n    if (!bindInterface) {\n      try {\n        bindInterface = require(ui);\n      } catch (err) {\n        throw createInvalidInterfaceError(\n          'invalid interface ' + sQuote(ui),\n          ui\n        );\n      }\n    }\n  }\n  bindInterface(this.suite);\n\n  this.suite.on(EVENT_FILE_PRE_REQUIRE, function(context) {\n    exports.afterEach = context.afterEach || context.teardown;\n    exports.after = context.after || context.suiteTeardown;\n    exports.beforeEach = context.beforeEach || context.setup;\n    exports.before = context.before || context.suiteSetup;\n    exports.describe = context.describe || context.suite;\n    exports.it = context.it || context.test;\n    exports.xit = context.xit || (context.test && context.test.skip);\n    exports.setup = context.setup || context.beforeEach;\n    exports.suiteSetup = context.suiteSetup || context.before;\n    exports.suiteTeardown = context.suiteTeardown || context.after;\n    exports.suite = context.suite || context.describe;\n    exports.teardown = context.teardown || context.afterEach;\n    exports.test = context.test || context.it;\n    exports.run = context.run;\n  });\n\n  return this;\n};\n\n/**\n * Loads `files` prior to execution. Does not support ES Modules.\n *\n * @description\n * The implementation relies on Node's `require` to execute\n * the test interface functions and will be subject to its cache.\n * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync.\n *\n * @private\n * @see {@link Mocha#addFile}\n * @see {@link Mocha#run}\n * @see {@link Mocha#unloadFiles}\n * @see {@link Mocha#loadFilesAsync}\n * @param {Function} [fn] - Callback invoked upon completion.\n */\nMocha.prototype.loadFiles = function(fn) {\n  var self = this;\n  var suite = this.suite;\n  this.files.forEach(function(file) {\n    file = path.resolve(file);\n    suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self);\n    suite.emit(EVENT_FILE_REQUIRE, require(file), file, self);\n    suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self);\n  });\n  fn && fn();\n};\n\n/**\n * Loads `files` prior to execution. Supports Node ES Modules.\n *\n * @description\n * The implementation relies on Node's `require` and `import` to execute\n * the test interface functions and will be subject to its cache.\n * Supports both CJS and ESM modules.\n *\n * @public\n * @see {@link Mocha#addFile}\n * @see {@link Mocha#run}\n * @see {@link Mocha#unloadFiles}\n * @returns {Promise}\n * @example\n *\n * // loads ESM (and CJS) test files asynchronously, then runs root suite\n * mocha.loadFilesAsync()\n *   .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0))\n *   .catch(() => process.exitCode = 1);\n */\nMocha.prototype.loadFilesAsync = function() {\n  var self = this;\n  var suite = this.suite;\n  this.lazyLoadFiles(true);\n\n  if (!esmUtils) {\n    return new Promise(function(resolve) {\n      self.loadFiles(resolve);\n    });\n  }\n\n  return esmUtils.loadFilesAsync(\n    this.files,\n    function(file) {\n      suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self);\n    },\n    function(file, resultModule) {\n      suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self);\n      suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self);\n    }\n  );\n};\n\n/**\n * Removes a previously loaded file from Node's `require` cache.\n *\n * @private\n * @static\n * @see {@link Mocha#unloadFiles}\n * @param {string} file - Pathname of file to be unloaded.\n */\nMocha.unloadFile = function(file) {\n  if (utils.isBrowser()) {\n    throw createUnsupportedError(\n      'unloadFile() is only suported in a Node.js environment'\n    );\n  }\n  return require('./nodejs/file-unloader').unloadFile(file);\n};\n\n/**\n * Unloads `files` from Node's `require` cache.\n *\n * @description\n * This allows required files to be \"freshly\" reloaded, providing the ability\n * to reuse a Mocha instance programmatically.\n * Note: does not clear ESM module files from the cache\n *\n * <strong>Intended for consumers &mdash; not used internally</strong>\n *\n * @public\n * @see {@link Mocha#run}\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.unloadFiles = function() {\n  if (this._state === mochaStates.DISPOSED) {\n    throw createMochaInstanceAlreadyDisposedError(\n      'Mocha instance is already disposed, it cannot be used again.',\n      this._cleanReferencesAfterRun,\n      this\n    );\n  }\n\n  this.files.forEach(function(file) {\n    Mocha.unloadFile(file);\n  });\n  this._state = mochaStates.INIT;\n  return this;\n};\n\n/**\n * Sets `grep` filter after escaping RegExp special characters.\n *\n * @public\n * @see {@link Mocha#grep}\n * @param {string} str - Value to be converted to a regexp.\n * @returns {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title begins with `\"foo\"` followed by a period\n * mocha.fgrep('foo.');\n */\nMocha.prototype.fgrep = function(str) {\n  if (!str) {\n    return this;\n  }\n  return this.grep(new RegExp(escapeRe(str)));\n};\n\n/**\n * @summary\n * Sets `grep` filter used to select specific tests for execution.\n *\n * @description\n * If `re` is a regexp-like string, it will be converted to regexp.\n * The regexp is tested against the full title of each test (i.e., the\n * name of the test preceded by titles of each its ancestral suites).\n * As such, using an <em>exact-match</em> fixed pattern against the\n * test name itself will not yield any matches.\n * <br>\n * <strong>Previous filter value will be overwritten on each call!</strong>\n *\n * @public\n * @see [CLI option](../#-grep-regexp-g-regexp)\n * @see {@link Mocha#fgrep}\n * @see {@link Mocha#invert}\n * @param {RegExp|String} re - Regular expression used to select tests.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title contains `\"match\"`, ignoring case\n * mocha.grep(/match/i);\n * @example\n *\n * // Same as above but with regexp-like string argument\n * mocha.grep('/match/i');\n * @example\n *\n * // ## Anti-example\n * // Given embedded test `it('only-this-test')`...\n * mocha.grep('/^only-this-test$/');    // NO! Use `.only()` to do this!\n */\nMocha.prototype.grep = function(re) {\n  if (utils.isString(re)) {\n    // extract args if it's regex-like, i.e: [string, pattern, flag]\n    var arg = re.match(/^\\/(.*)\\/(g|i|)$|.*/);\n    this.options.grep = new RegExp(arg[1] || arg[0], arg[2]);\n  } else {\n    this.options.grep = re;\n  }\n  return this;\n};\n\n/**\n * Inverts `grep` matches.\n *\n * @public\n * @see {@link Mocha#grep}\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title does *not* contain `\"match\"`, ignoring case\n * mocha.grep(/match/i).invert();\n */\nMocha.prototype.invert = function() {\n  this.options.invert = true;\n  return this;\n};\n\n/**\n * Enables or disables checking for global variables leaked while running tests.\n *\n * @public\n * @see [CLI option](../#-check-leaks)\n * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.checkLeaks = function(checkLeaks) {\n  this.options.checkLeaks = checkLeaks !== false;\n  return this;\n};\n\n/**\n * Enables or disables whether or not to dispose after each test run.\n * Disable this to ensure you can run the test suite multiple times.\n * If disabled, be sure to dispose mocha when you're done to prevent memory leaks.\n * @public\n * @see {@link Mocha#dispose}\n * @param {boolean} cleanReferencesAfterRun\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.cleanReferencesAfterRun = function(cleanReferencesAfterRun) {\n  this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false;\n  return this;\n};\n\n/**\n * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests.\n * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector.\n * @public\n */\nMocha.prototype.dispose = function() {\n  if (this._state === mochaStates.RUNNING) {\n    throw createMochaInstanceAlreadyRunningError(\n      'Cannot dispose while the mocha instance is still running tests.'\n    );\n  }\n  this.unloadFiles();\n  this._previousRunner && this._previousRunner.dispose();\n  this.suite.dispose();\n  this._state = mochaStates.DISPOSED;\n};\n\n/**\n * Displays full stack trace upon test failure.\n *\n * @public\n * @see [CLI option](../#-full-trace)\n * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.fullTrace = function(fullTrace) {\n  this.options.fullTrace = fullTrace !== false;\n  return this;\n};\n\n/**\n * Enables desktop notification support if prerequisite software installed.\n *\n * @public\n * @see [CLI option](../#-growl-g)\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.growl = function() {\n  this.options.growl = this.isGrowlCapable();\n  if (!this.options.growl) {\n    var detail = utils.isBrowser()\n      ? 'notification support not available in this browser...'\n      : 'notification support prerequisites not installed...';\n    console.error(detail + ' cannot enable!');\n  }\n  return this;\n};\n\n/**\n * @summary\n * Determines if Growl support seems likely.\n *\n * @description\n * <strong>Not available when run in browser.</strong>\n *\n * @private\n * @see {@link Growl#isCapable}\n * @see {@link Mocha#growl}\n * @return {boolean} whether Growl support can be expected\n */\nMocha.prototype.isGrowlCapable = growl.isCapable;\n\n/**\n * Implements desktop notifications using a pseudo-reporter.\n *\n * @private\n * @see {@link Mocha#growl}\n * @see {@link Growl#notify}\n * @param {Runner} runner - Runner instance.\n */\nMocha.prototype._growl = growl.notify;\n\n/**\n * Specifies whitelist of variable names to be expected in global scope.\n *\n * @public\n * @see [CLI option](../#-global-variable-name)\n * @see {@link Mocha#checkLeaks}\n * @param {String[]|String} global - Accepted global variable name(s).\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Specify variables to be expected in global scope\n * mocha.global(['jQuery', 'MyLib']);\n */\nMocha.prototype.global = function(global) {\n  this.options.global = (this.options.global || [])\n    .concat(global)\n    .filter(Boolean)\n    .filter(function(elt, idx, arr) {\n      return arr.indexOf(elt) === idx;\n    });\n  return this;\n};\n// for backwards compability, 'globals' is an alias of 'global'\nMocha.prototype.globals = Mocha.prototype.global;\n\n/**\n * Enables or disables TTY color output by screen-oriented reporters.\n *\n * @public\n * @see [CLI option](../#-color-c-colors)\n * @param {boolean} [color=true] - Whether to enable color output.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.color = function(color) {\n  this.options.color = color !== false;\n  return this;\n};\n\n/**\n * Enables or disables reporter to use inline diffs (rather than +/-)\n * in test failure output.\n *\n * @public\n * @see [CLI option](../#-inline-diffs)\n * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.inlineDiffs = function(inlineDiffs) {\n  this.options.inlineDiffs = inlineDiffs !== false;\n  return this;\n};\n\n/**\n * Enables or disables reporter to include diff in test failure output.\n *\n * @public\n * @see [CLI option](../#-diff)\n * @param {boolean} [diff=true] - Whether to show diff on failure.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.diff = function(diff) {\n  this.options.diff = diff !== false;\n  return this;\n};\n\n/**\n * @summary\n * Sets timeout threshold value.\n *\n * @description\n * A string argument can use shorthand (such as \"2s\") and will be converted.\n * If the value is `0`, timeouts will be disabled.\n *\n * @public\n * @see [CLI option](../#-timeout-ms-t-ms)\n * @see [Timeouts](../#timeouts)\n * @param {number|string} msecs - Timeout threshold value.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Sets timeout to one second\n * mocha.timeout(1000);\n * @example\n *\n * // Same as above but using string argument\n * mocha.timeout('1s');\n */\nMocha.prototype.timeout = function(msecs) {\n  this.suite.timeout(msecs);\n  return this;\n};\n\n/**\n * Sets the number of times to retry failed tests.\n *\n * @public\n * @see [CLI option](../#-retries-n)\n * @see [Retry Tests](../#retry-tests)\n * @param {number} retry - Number of times to retry failed tests.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Allow any failed test to retry one more time\n * mocha.retries(1);\n */\nMocha.prototype.retries = function(retry) {\n  this.suite.retries(retry);\n  return this;\n};\n\n/**\n * Sets slowness threshold value.\n *\n * @public\n * @see [CLI option](../#-slow-ms-s-ms)\n * @param {number} msecs - Slowness threshold value.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Sets \"slow\" threshold to half a second\n * mocha.slow(500);\n * @example\n *\n * // Same as above but using string argument\n * mocha.slow('0.5s');\n */\nMocha.prototype.slow = function(msecs) {\n  this.suite.slow(msecs);\n  return this;\n};\n\n/**\n * Forces all tests to either accept a `done` callback or return a promise.\n *\n * @public\n * @see [CLI option](../#-async-only-a)\n * @param {boolean} [asyncOnly=true] - Whether to force `done` callback or promise.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.asyncOnly = function(asyncOnly) {\n  this.options.asyncOnly = asyncOnly !== false;\n  return this;\n};\n\n/**\n * Disables syntax highlighting (in browser).\n *\n * @public\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.noHighlighting = function() {\n  this.options.noHighlighting = true;\n  return this;\n};\n\n/**\n * Enables or disables uncaught errors to propagate.\n *\n * @public\n * @see [CLI option](../#-allow-uncaught)\n * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.allowUncaught = function(allowUncaught) {\n  this.options.allowUncaught = allowUncaught !== false;\n  return this;\n};\n\n/**\n * @summary\n * Delays root suite execution.\n *\n * @description\n * Used to perform async operations before any suites are run.\n *\n * @public\n * @see [delayed root suite](../#delayed-root-suite)\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.delay = function delay() {\n  this.options.delay = true;\n  return this;\n};\n\n/**\n * Causes tests marked `only` to fail the suite.\n *\n * @public\n * @see [CLI option](../#-forbid-only)\n * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.forbidOnly = function(forbidOnly) {\n  this.options.forbidOnly = forbidOnly !== false;\n  return this;\n};\n\n/**\n * Causes pending tests and tests marked `skip` to fail the suite.\n *\n * @public\n * @see [CLI option](../#-forbid-pending)\n * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.forbidPending = function(forbidPending) {\n  this.options.forbidPending = forbidPending !== false;\n  return this;\n};\n\n/**\n * Throws an error if mocha is in the wrong state to be able to transition to a \"running\" state.\n * @private\n */\nMocha.prototype._guardRunningStateTransition = function() {\n  if (this._state === mochaStates.RUNNING) {\n    throw createMochaInstanceAlreadyRunningError(\n      'Mocha instance is currently running tests, cannot start a next test run until this one is done',\n      this\n    );\n  }\n  if (\n    this._state === mochaStates.DISPOSED ||\n    this._state === mochaStates.REFERENCES_CLEANED\n  ) {\n    throw createMochaInstanceAlreadyDisposedError(\n      'Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.',\n      this._cleanReferencesAfterRun,\n      this\n    );\n  }\n};\n\n/**\n * Mocha version as specified by \"package.json\".\n *\n * @name Mocha#version\n * @type string\n * @readonly\n */\nObject.defineProperty(Mocha.prototype, 'version', {\n  value: require('../package.json').version,\n  configurable: false,\n  enumerable: true,\n  writable: false\n});\n\n/**\n * Callback to be invoked when test execution is complete.\n *\n * @private\n * @callback DoneCB\n * @param {number} failures - Number of failures that occurred.\n */\n\n/**\n * Runs root suite and invokes `fn()` when complete.\n *\n * @description\n * To run tests multiple times (or to run tests in files that are\n * already in the `require` cache), make sure to clear them from\n * the cache first!\n *\n * @public\n * @see {@link Mocha#unloadFiles}\n * @see {@link Runner#run}\n * @param {DoneCB} [fn] - Callback invoked when test execution completed.\n * @returns {Runner} runner instance\n * @example\n *\n * // exit with non-zero status if there were test failures\n * mocha.run(failures => process.exitCode = failures ? 1 : 0);\n */\nMocha.prototype.run = function(fn) {\n  this._guardRunningStateTransition();\n  this._state = mochaStates.RUNNING;\n  if (this._previousRunner) {\n    this._previousRunner.dispose();\n    this.suite.reset();\n  }\n  if (this.files.length && !this._lazyLoadFiles) {\n    this.loadFiles();\n  }\n  var suite = this.suite;\n  var options = this.options;\n  options.files = this.files;\n  const runner = new this._runnerClass(suite, {\n    delay: options.delay,\n    cleanReferencesAfterRun: this._cleanReferencesAfterRun\n  });\n  createStatsCollector(runner);\n  var reporter = new this._reporter(runner, options);\n  runner.checkLeaks = options.checkLeaks === true;\n  runner.fullStackTrace = options.fullTrace;\n  runner.asyncOnly = options.asyncOnly;\n  runner.allowUncaught = options.allowUncaught;\n  runner.forbidOnly = options.forbidOnly;\n  runner.forbidPending = options.forbidPending;\n  if (options.grep) {\n    runner.grep(options.grep, options.invert);\n  }\n  if (options.global) {\n    runner.globals(options.global);\n  }\n  if (options.growl) {\n    this._growl(runner);\n  }\n  if (options.color !== undefined) {\n    exports.reporters.Base.useColors = options.color;\n  }\n  exports.reporters.Base.inlineDiffs = options.inlineDiffs;\n  exports.reporters.Base.hideDiff = !options.diff;\n\n  const done = failures => {\n    this._previousRunner = runner;\n    this._state = this._cleanReferencesAfterRun\n      ? mochaStates.REFERENCES_CLEANED\n      : mochaStates.INIT;\n    fn = fn || utils.noop;\n    if (typeof reporter.done === 'function') {\n      reporter.done(failures, fn);\n    } else {\n      fn(failures);\n    }\n  };\n\n  const runAsync = async runner => {\n    const context =\n      this.options.enableGlobalSetup && this.hasGlobalSetupFixtures()\n        ? await this.runGlobalSetup(runner)\n        : {};\n    const failureCount = await runner.runAsync({\n      files: this.files,\n      options\n    });\n    if (this.options.enableGlobalTeardown && this.hasGlobalTeardownFixtures()) {\n      await this.runGlobalTeardown(runner, {context});\n    }\n    return failureCount;\n  };\n\n  // no \"catch\" here is intentional. errors coming out of\n  // Runner#run are considered uncaught/unhandled and caught\n  // by the `process` event listeners.\n  // also: returning anything other than `runner` would be a breaking\n  // change\n  runAsync(runner).then(done);\n\n  return runner;\n};\n\n/**\n * Assigns hooks to the root suite\n * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite\n * @chainable\n */\nMocha.prototype.rootHooks = function rootHooks({\n  beforeAll = [],\n  beforeEach = [],\n  afterAll = [],\n  afterEach = []\n} = {}) {\n  beforeAll = utils.castArray(beforeAll);\n  beforeEach = utils.castArray(beforeEach);\n  afterAll = utils.castArray(afterAll);\n  afterEach = utils.castArray(afterEach);\n  beforeAll.forEach(hook => {\n    this.suite.beforeAll(hook);\n  });\n  beforeEach.forEach(hook => {\n    this.suite.beforeEach(hook);\n  });\n  afterAll.forEach(hook => {\n    this.suite.afterAll(hook);\n  });\n  afterEach.forEach(hook => {\n    this.suite.afterEach(hook);\n  });\n  return this;\n};\n\n/**\n * Toggles parallel mode.\n *\n * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to\n * use; also enables lazy file loading if not already done so.\n *\n * Warning: when passed `false` and lazy loading has been enabled _via any means_ (including calling `parallelMode(true)`), this method will _not_ disable lazy loading. Lazy loading is a prerequisite for parallel\n * mode, but parallel mode is _not_ a prerequisite for lazy loading!\n * @param {boolean} [enable] - If `true`, enable; otherwise disable.\n * @throws If run in browser\n * @throws If Mocha not in `INIT` state\n * @returns {Mocha}\n * @chainable\n * @public\n */\nMocha.prototype.parallelMode = function parallelMode(enable = true) {\n  if (utils.isBrowser()) {\n    throw createUnsupportedError('parallel mode is only supported in Node.js');\n  }\n  const parallel = Boolean(enable);\n  if (\n    parallel === this.options.parallel &&\n    this._lazyLoadFiles &&\n    this._runnerClass !== exports.Runner\n  ) {\n    return this;\n  }\n  if (this._state !== mochaStates.INIT) {\n    throw createUnsupportedError(\n      'cannot change parallel mode after having called run()'\n    );\n  }\n  this.options.parallel = parallel;\n\n  // swap Runner class\n  this._runnerClass = parallel\n    ? require('./nodejs/parallel-buffered-runner')\n    : exports.Runner;\n\n  // lazyLoadFiles may have been set `true` otherwise (for ESM loading),\n  // so keep `true` if so.\n  return this.lazyLoadFiles(this._lazyLoadFiles || parallel);\n};\n\n/**\n * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This\n * setting is used by watch mode, parallel mode, and for loading ESM files.\n * @todo This should throw if we've already loaded files; such behavior\n * necessitates adding a new state.\n * @param {boolean} [enable] - If `true`, disable eager loading of files in\n * {@link Mocha#run}\n * @chainable\n * @public\n */\nMocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) {\n  this._lazyLoadFiles = enable === true;\n  debug('set lazy load to %s', enable);\n  return this;\n};\n\n/**\n * Configures one or more global setup fixtures.\n *\n * If given no parameters, _unsets_ any previously-set fixtures.\n * @chainable\n * @public\n * @param {MochaGlobalFixture|MochaGlobalFixture[]} [setupFns] - Global setup fixture(s)\n * @returns {Mocha}\n */\nMocha.prototype.globalSetup = function globalSetup(setupFns = []) {\n  setupFns = utils.castArray(setupFns);\n  this.options.globalSetup = setupFns;\n  debug('configured %d global setup functions', setupFns.length);\n  return this;\n};\n\n/**\n * Configures one or more global teardown fixtures.\n *\n * If given no parameters, _unsets_ any previously-set fixtures.\n * @chainable\n * @public\n * @param {MochaGlobalFixture|MochaGlobalFixture[]} [teardownFns] - Global teardown fixture(s)\n * @returns {Mocha}\n */\nMocha.prototype.globalTeardown = function globalTeardown(teardownFns = []) {\n  teardownFns = utils.castArray(teardownFns);\n  this.options.globalTeardown = teardownFns;\n  debug('configured %d global teardown functions', teardownFns.length);\n  return this;\n};\n\n/**\n * Run any global setup fixtures sequentially, if any.\n *\n * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalSetup` option is `false`; see {@link Mocha#enableGlobalSetup}.\n *\n * The context object this function resolves with should be consumed by {@link Mocha#runGlobalTeardown}.\n * @param {object} [context] - Context object if already have one\n * @public\n * @returns {Promise<object>} Context object\n */\nMocha.prototype.runGlobalSetup = async function runGlobalSetup(context = {}) {\n  const {globalSetup} = this.options;\n  if (globalSetup && globalSetup.length) {\n    debug('run(): global setup starting');\n    await this._runGlobalFixtures(globalSetup, context);\n    debug('run(): global setup complete');\n  }\n  return context;\n};\n\n/**\n * Run any global teardown fixtures sequentially, if any.\n *\n * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalTeardown` option is `false`; see {@link Mocha#enableGlobalTeardown}.\n *\n * Should be called with context object returned by {@link Mocha#runGlobalSetup}, if applicable.\n * @param {object} [context] - Context object if already have one\n * @public\n * @returns {Promise<object>} Context object\n */\nMocha.prototype.runGlobalTeardown = async function runGlobalTeardown(\n  context = {}\n) {\n  const {globalTeardown} = this.options;\n  if (globalTeardown && globalTeardown.length) {\n    debug('run(): global teardown starting');\n    await this._runGlobalFixtures(globalTeardown, context);\n  }\n  debug('run(): global teardown complete');\n  return context;\n};\n\n/**\n * Run global fixtures sequentially with context `context`\n * @private\n * @param {MochaGlobalFixture[]} [fixtureFns] - Fixtures to run\n * @param {object} [context] - context object\n * @returns {Promise<object>} context object\n */\nMocha.prototype._runGlobalFixtures = async function _runGlobalFixtures(\n  fixtureFns = [],\n  context = {}\n) {\n  for await (const fixtureFn of fixtureFns) {\n    await fixtureFn.call(context);\n  }\n  return context;\n};\n\n/**\n * Toggle execution of any global setup fixture(s)\n *\n * @chainable\n * @public\n * @param {boolean } [enabled=true] - If `false`, do not run global setup fixture\n * @returns {Mocha}\n */\nMocha.prototype.enableGlobalSetup = function enableGlobalSetup(enabled = true) {\n  this.options.enableGlobalSetup = Boolean(enabled);\n  return this;\n};\n\n/**\n * Toggle execution of any global teardown fixture(s)\n *\n * @chainable\n * @public\n * @param {boolean } [enabled=true] - If `false`, do not run global teardown fixture\n * @returns {Mocha}\n */\nMocha.prototype.enableGlobalTeardown = function enableGlobalTeardown(\n  enabled = true\n) {\n  this.options.enableGlobalTeardown = Boolean(enabled);\n  return this;\n};\n\n/**\n * Returns `true` if one or more global setup fixtures have been supplied.\n * @public\n * @returns {boolean}\n */\nMocha.prototype.hasGlobalSetupFixtures = function hasGlobalSetupFixtures() {\n  return Boolean(this.options.globalSetup.length);\n};\n\n/**\n * Returns `true` if one or more global teardown fixtures have been supplied.\n * @public\n * @returns {boolean}\n */\nMocha.prototype.hasGlobalTeardownFixtures = function hasGlobalTeardownFixtures() {\n  return Boolean(this.options.globalTeardown.length);\n};\n\n/**\n * An alternative way to define root hooks that works with parallel runs.\n * @typedef {Object} MochaRootHookObject\n * @property {Function|Function[]} [beforeAll] - \"Before all\" hook(s)\n * @property {Function|Function[]} [beforeEach] - \"Before each\" hook(s)\n * @property {Function|Function[]} [afterAll] - \"After all\" hook(s)\n * @property {Function|Function[]} [afterEach] - \"After each\" hook(s)\n */\n\n/**\n * An function that returns a {@link MochaRootHookObject}, either sync or async.\n   @callback MochaRootHookFunction\n * @returns {MochaRootHookObject|Promise<MochaRootHookObject>}\n */\n\n/**\n * A function that's invoked _once_ which is either sync or async.\n * Can be a \"teardown\" or \"setup\".  These will all share the same context.\n * @callback MochaGlobalFixture\n * @returns {void|Promise<void>}\n */\n\n/**\n * An object making up all necessary parts of a plugin loader and aggregator\n * @typedef {Object} PluginDefinition\n * @property {string} exportName - Named export to use\n * @property {string} [optionName] - Option name for Mocha constructor (use `exportName` if omitted)\n * @property {PluginValidator} [validate] - Validator function\n * @property {PluginFinalizer} [finalize] - Finalizer/aggregator function\n */\n\n/**\n * A (sync) function to assert a user-supplied plugin implementation is valid.\n *\n * Defined in a {@link PluginDefinition}.\n \n * @callback PluginValidator\n * @param {*} value - Value to check\n * @this {PluginDefinition}\n * @returns {void}\n */\n\n/**\n * A function to finalize plugins impls of a particular ilk\n * @callback PluginFinalizer\n * @param {Array<*>} impls - User-supplied implementations\n * @returns {Promise<*>|*}\n */\n","'use strict';\n\n/* eslint no-unused-vars: off */\n/* eslint-env commonjs */\n\n/**\n * Shim process.stdout.\n */\n\nprocess.stdout = require('browser-stdout')({label: false});\n\nvar parseQuery = require('./lib/browser/parse-query');\nvar highlightTags = require('./lib/browser/highlight-tags');\nvar Mocha = require('./lib/mocha');\n\n/**\n * Create a Mocha instance.\n *\n * @return {undefined}\n */\n\nvar mocha = new Mocha({reporter: 'html'});\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\n\nvar Date = global.Date;\nvar setTimeout = global.setTimeout;\nvar setInterval = global.setInterval;\nvar clearTimeout = global.clearTimeout;\nvar clearInterval = global.clearInterval;\n\nvar uncaughtExceptionHandlers = [];\n\nvar originalOnerrorHandler = global.onerror;\n\n/**\n * Remove uncaughtException listener.\n * Revert to original onerror handler if previously defined.\n */\n\nprocess.removeListener = function(e, fn) {\n  if (e === 'uncaughtException') {\n    if (originalOnerrorHandler) {\n      global.onerror = originalOnerrorHandler;\n    } else {\n      global.onerror = function() {};\n    }\n    var i = uncaughtExceptionHandlers.indexOf(fn);\n    if (i !== -1) {\n      uncaughtExceptionHandlers.splice(i, 1);\n    }\n  }\n};\n\n/**\n * Implements listenerCount for 'uncaughtException'.\n */\n\nprocess.listenerCount = function(name) {\n  if (name === 'uncaughtException') {\n    return uncaughtExceptionHandlers.length;\n  }\n  return 0;\n};\n\n/**\n * Implements uncaughtException listener.\n */\n\nprocess.on = function(e, fn) {\n  if (e === 'uncaughtException') {\n    global.onerror = function(err, url, line) {\n      fn(new Error(err + ' (' + url + ':' + line + ')'));\n      return !mocha.options.allowUncaught;\n    };\n    uncaughtExceptionHandlers.push(fn);\n  }\n};\n\nprocess.listeners = function(e) {\n  if (e === 'uncaughtException') {\n    return uncaughtExceptionHandlers;\n  }\n  return [];\n};\n\n// The BDD UI is registered by default, but no UI will be functional in the\n// browser without an explicit call to the overridden `mocha.ui` (see below).\n// Ensure that this default UI does not expose its methods to the global scope.\nmocha.suite.removeAllListeners('pre-require');\n\nvar immediateQueue = [];\nvar immediateTimeout;\n\nfunction timeslice() {\n  var immediateStart = new Date().getTime();\n  while (immediateQueue.length && new Date().getTime() - immediateStart < 100) {\n    immediateQueue.shift()();\n  }\n  if (immediateQueue.length) {\n    immediateTimeout = setTimeout(timeslice, 0);\n  } else {\n    immediateTimeout = null;\n  }\n}\n\n/**\n * High-performance override of Runner.immediately.\n */\n\nMocha.Runner.immediately = function(callback) {\n  immediateQueue.push(callback);\n  if (!immediateTimeout) {\n    immediateTimeout = setTimeout(timeslice, 0);\n  }\n};\n\n/**\n * Function to allow assertion libraries to throw errors directly into mocha.\n * This is useful when running tests in a browser because window.onerror will\n * only receive the 'message' attribute of the Error.\n */\nmocha.throwError = function(err) {\n  uncaughtExceptionHandlers.forEach(function(fn) {\n    fn(err);\n  });\n  throw err;\n};\n\n/**\n * Override ui to ensure that the ui functions are initialized.\n * Normally this would happen in Mocha.prototype.loadFiles.\n */\n\nmocha.ui = function(ui) {\n  Mocha.prototype.ui.call(this, ui);\n  this.suite.emit('pre-require', global, null, this);\n  return this;\n};\n\n/**\n * Setup mocha with the given setting options.\n */\n\nmocha.setup = function(opts) {\n  if (typeof opts === 'string') {\n    opts = {ui: opts};\n  }\n  if (opts.delay === true) {\n    this.delay();\n  }\n  var self = this;\n  Object.keys(opts)\n    .filter(function(opt) {\n      return opt !== 'delay';\n    })\n    .forEach(function(opt) {\n      if (Object.prototype.hasOwnProperty.call(opts, opt)) {\n        self[opt](opts[opt]);\n      }\n    });\n  return this;\n};\n\n/**\n * Run mocha, returning the Runner.\n */\n\nmocha.run = function(fn) {\n  var options = mocha.options;\n  mocha.globals('location');\n\n  var query = parseQuery(global.location.search || '');\n  if (query.grep) {\n    mocha.grep(query.grep);\n  }\n  if (query.fgrep) {\n    mocha.fgrep(query.fgrep);\n  }\n  if (query.invert) {\n    mocha.invert();\n  }\n\n  return Mocha.prototype.run.call(mocha, function(err) {\n    // The DOM Document is not available in Web Workers.\n    var document = global.document;\n    if (\n      document &&\n      document.getElementById('mocha') &&\n      options.noHighlighting !== true\n    ) {\n      highlightTags('code');\n    }\n    if (fn) {\n      fn(err);\n    }\n  });\n};\n\n/**\n * Expose the process shim.\n * https://github.com/mochajs/mocha/pull/916\n */\n\nMocha.process = process;\n\n/**\n * Expose mocha.\n */\n\nglobal.Mocha = Mocha;\nglobal.mocha = mocha;\n\n// this allows test/acceptance/required-tokens.js to pass; thus,\n// you can now do `const describe = require('mocha').describe` in a\n// browser context (assuming browserification).  should fix #880\nmodule.exports = Object.assign(mocha, global);\n"],"names":["global","classof","IndexedObject","document","DESCRIPTORS","createElement","IE8_DOM_DEFINE","propertyIsEnumerableModule","definePropertyModule","store","WeakMap","has","NATIVE_WEAK_MAP","objectHas","InternalStateModule","min","require$$0","hiddenKeys","internalObjectKeys","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","getOwnPropertyDescriptorModule","getOwnPropertyDescriptor","isForced","aFunction","NATIVE_SYMBOL","Symbol","USE_SYMBOL_AS_UID","createMethod","bind","userAgent","SPECIES","V8_VERSION","$","USES_TO_LENGTH","forEach","STRICT_METHOD","HAS_SPECIES_SUPPORT","max","defineProperty","assign","nativeKeys","UNSUPPORTED_Y","stickyHelpers","exec","fixRegExpWellKnownSymbolLogic","regExpExec","DOMIterables","MAX_SAFE_INTEGER","self","window","defaultSetTimout","Error","defaultClearTimeout","cachedSetTimeout","cachedClearTimeout","setTimeout","clearTimeout","runTimeout","fun","e","call","runClearTimeout","marker","queue","draining","currentQueue","queueIndex","cleanUpNextTick","length","concat","drainQueue","timeout","len","run","nextTick","args","Array","arguments","i","push","Item","array","prototype","apply","title","platform","browser","env","argv","version","versions","release","config","noop","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","name","cwd","chdir","dir","umask","performance","performanceNow","now","mozNow","msNow","oNow","webkitNow","Date","getTime","hrtime","previousTimestamp","clocktime","seconds","Math","floor","nanoseconds","startTime","uptime","currentTime","dif","TO_STRING_TAG","TO_STRING_TAG_SUPPORT","toString","flags","CORRECT_PROTOTYPE_GETTER","FAILS_ON_PRIMITIVES","nativeGetPrototypeOf","domain","EventHandlers","Object","create","EventEmitter","init","usingDomains","undefined","_events","_maxListeners","defaultMaxListeners","active","getPrototypeOf","_eventsCount","setMaxListeners","n","isNaN","TypeError","$getMaxListeners","that","getMaxListeners","emitNone","handler","isFn","listeners","arrayClone","emitOne","arg1","emitTwo","arg2","emitThree","arg3","emitMany","type","er","events","doError","error","domainEmitter","domainThrown","err","context","_addListener","target","listener","prepend","m","existing","newListener","unshift","warned","w","emitter","count","emitWarning","console","warn","log","prependListener","_onceWrap","fired","g","prependOnceListener","list","position","originalListener","spliceOne","keys","key","evlistener","ret","unwrapListeners","listenerCount","eventNames","Reflect","ownKeys","index","k","pop","arr","copy","setPrototypeOf","IE_PROTO","defineProperties","require$$1","require$$2","require$$3","nativeGetOwnPropertyDescriptor","FORCED","nativeGetOwnPropertyNames","getOwnPropertyNames","MATCH","RegExpPrototype","isRegExp","getFlags","callRegExpExec","wrappedWellKnownSymbolModule","$forEach","PROTOTYPE","setInternalState","ObjectPrototype","nativeDefineProperty","getOwnPropertyNamesExternal","nativePropertyIsEnumerable","WellKnownSymbolsStore","nativeObjectCreate","fill","IteratorPrototype","returnThis","Iterators","IteratorsCore","BUGGY_SAFARI_ITERATORS","ITERATOR","getInternalState","NEGATIVE_ZERO","lastIndexOf","Infinity","RangeError","IEEE754","get","set","NATIVE_ARRAY_BUFFER","j","ARRAY_BUFFER","ArrayBuffer","arrayBufferModule","NativeArrayBuffer","correctIsRegExpLogic","notARegExp","forcedStringTrimMethod","Int8Array","NAME","NATIVE_ARRAY_BUFFER_VIEWS","ArrayPrototype","aTypedArrayConstructor","ArrayBufferModule","ArrayBufferViewCore","TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS","createTypedArrayConstructor","aTypedArray","exportTypedArrayMethod","$copyWithin","$fill","$filter","$includes","$indexOf","Uint8Array","ArrayIterators","$lastIndexOf","$map","$reduce","$slice","lookup","revLookup","Arr","inited","code","charCodeAt","toByteArray","b64","l","tmp","placeHolders","L","tripletToBase64","num","encodeChunk","uint8","start","end","output","join","fromByteArray","extraBytes","parts","maxChunkLength","len2","read","buffer","offset","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","s","NaN","pow","write","value","c","rt","abs","LN2","isArray","INSPECT_MAX_BYTES","Buffer","TYPED_ARRAY_SUPPORT","kMaxLength","createBuffer","__proto__","arg","encodingOrOffset","allocUnsafe","from","poolSize","_augment","fromArrayBuffer","fromString","fromObject","assertSize","size","alloc","encoding","checked","allocUnsafeSlow","string","isEncoding","byteLength","actual","slice","fromArrayLike","byteOffset","obj","internalIsBuffer","isnan","data","isBuffer","b","_isBuffer","compare","a","x","y","String","toLowerCase","pos","buf","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","swap16","swap32","swap64","equals","inspect","str","match","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","val","arrayIndexOf","indexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","found","includes","hexWrite","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","isFinite","toJSON","_arr","base64","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","codePoints","fromCharCode","out","toHex","bytes","newBuf","subarray","sliceLen","checkOffset","ext","readUIntLE","noAssert","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","ieee754","readFloatBE","readDoubleLE","readDoubleBE","checkInt","writeUIntLE","maxBytes","writeUIntBE","writeUInt8","objectWriteUInt16","littleEndian","writeUInt16LE","writeUInt16BE","objectWriteUInt32","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","checkIEEE754","writeFloat","writeFloatLE","writeFloatBE","writeDouble","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","base64clean","stringtrim","replace","trim","units","leadSurrogate","byteArray","hi","lo","src","dst","isFastBuffer","isSlowBuffer","constructor","inherits","ctor","superCtor","super_","enumerable","writable","configurable","TempCtor","formatRegExp","format","f","isString","objects","JSON","stringify","_","isNull","isObject","deprecate","fn","msg","isUndefined","process","deprecated","debugs","debugEnviron","debuglog","toUpperCase","RegExp","test","pid","opts","ctx","seen","stylize","stylizeNoColor","depth","colors","isBoolean","showHidden","_extend","customInspect","stylizeWithColor","formatValue","styles","styleType","style","arrayToHash","hash","idx","recurseTimes","isFunction","primitive","formatPrimitive","visibleKeys","isError","formatError","isDate","base","braces","toUTCString","formatArray","map","formatProperty","reduceToSingleString","simple","isNumber","hasOwnProperty","desc","split","line","reduce","prev","cur","numLinesEst","ar","isNullOrUndefined","isSymbol","re","objectToString","isPrimitive","maybeBuf","Buffer.isBuffer","o","pad","months","timestamp","time","getHours","getMinutes","getSeconds","getDate","getMonth","origin","add","prop","BufferList","head","tail","v","entry","next","shift","clear","p","isBufferEncoding","assertEncoding","StringDecoder","surrogateSize","detectIncompleteChar","utf16DetectIncompleteChar","base64DetectIncompleteChar","passThroughWrite","charBuffer","charReceived","charLength","charStr","available","charCode","substring","cr","enc","Readable","ReadableState","debug","event","options","stream","objectMode","Duplex","readableObjectMode","hwm","highWaterMark","defaultHwm","pipes","pipesCount","flowing","ended","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","defaultEncoding","ranOut","awaitDrain","readingMore","decoder","_readableState","readable","_read","chunk","state","readableAddChunk","isPaused","addToFront","chunkInvalid","onEofChunk","_e","skipAdd","emitReadable","maybeReadMore","needMoreData","setEncoding","MAX_HWM","computeNewHighWaterMark","howMuchToRead","nOrig","endReadable","doRead","fromList","emitReadable_","flow","maybeReadMore_","pipe","dest","pipeOpts","doEnd","endFn","onend","cleanup","onunpipe","ondrain","pipeOnDrain","cleanedUp","onclose","onfinish","onerror","ondata","_writableState","needDrain","increasedAwaitDrain","pause","unpipe","resume","dests","_i","splice","ev","nReadingNextTick","resume_","wrap","paused","method","_fromList","fromListPartial","hasStrings","copyFromBufferString","copyFromBuffer","nb","endReadableNT","xs","Writable","WritableState","nop","WriteReq","cb","callback","getBuffer","writableObjectMode","ending","finished","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writecb","writelen","bufferedRequest","lastBufferedRequest","pendingcb","prefinished","errorEmitted","bufferedRequestCount","corkedRequestsFree","CorkedRequest","writableStateGetBuffer","current","_write","writev","_writev","writeAfterEnd","validChunk","valid","writeOrBuffer","cork","uncork","clearBuffer","setDefaultEncoding","decodeChunk","last","doWrite","onwriteError","onwriteStateUpdate","needFinish","afterWrite","onwriteDrain","finishMaybe","holder","finish","endWritable","prefinish","need","_this","allowHalfOpen","onEndNT","Transform","TransformState","afterTransform","needTransform","transforming","writechunk","writeencoding","ts","_transformState","rs","transform","_transform","flush","_flush","done","ws","PassThrough","Stream","EE","source","_isStdio","didOnEnd","destroy","WritableStream","BrowserStdout","label","chunks","process.nextTick","parseQuery","qs","pair","decodeURIComponent","highlight","js","highlightTags","getElementById","getElementsByTagName","innerHTML","location","IS_IOS","Promise","task","NativePromise","newPromiseCapability","newPromiseCapabilityModule","IS_NODE","notify","iterate","charAt","ArrayIteratorMethods","COLLECTION_NAME","Collection","CollectionPrototype","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","runtime","regeneratorRuntime","module","exports","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","_invoke","makeInvokeMethod","tryCatch","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","getProto","NativeIteratorPrototype","values","Gp","displayName","defineIteratorMethods","isGeneratorFunction","genFun","mark","awrap","__await","AsyncIterator","invoke","resolve","reject","record","result","then","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","async","iter","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","object","reverse","iterable","iteratorMethod","skipTempReset","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","Function","normalizeArray","allowAboveRoot","up","splitPathRe","splitPath","filename","resolvedPath","resolvedAbsolute","path","filter","normalize","isPathAbsolute","isAbsolute","trailingSlash","paths","relative","to","fromParts","toParts","samePartsLength","outputParts","sep","delimiter","dirname","root","basename","extname","INCORRECT_ITERATION","factory","this","Diff","diff","oldString","newString","castInput","removeEmpty","tokenize","newLen","oldLen","editLength","maxEditLength","bestPath","newPos","components","oldPos","extractCommon","execEditLength","diagonalPath","basePath","addPath","removePath","_oldPos","canAdd","canRemove","clonePath","pushComponent","buildValues","useLongestToken","added","removed","commonCount","left","right","comparator","ignoreCase","chars","componentPos","componentLen","component","oldValue","lastComponent","characterDiff","diffChars","oldStr","newStr","generateOptions","defaults","extendedWordChars","reWhitespace","wordDiff","ignoreWhitespace","tokens","diffWords","diffWordsWithSpace","lineDiff","retLines","linesAndNewlines","newlineIsToken","diffLines","diffTrimmedLines","sentenceDiff","diffSentences","cssDiff","diffCss","_typeof","_typeof2","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","arr2","objectPrototypeToString","jsonDiff","_this$options","undefinedReplacement","_this$options$stringi","stringifyReplacer","canonicalize","diffJson","oldObj","newObj","stack","replacementStack","replacer","canonicalizedObj","sortedKeys","_key","sort","arrayDiff","diffArrays","oldArr","newArr","parsePatch","uniDiff","diffstr","delimiters","parseIndex","header","parseFileHeader","hunks","_line","parseHunk","strict","fileHeader","keyPrefix","fileName","chunkHeaderIndex","chunkHeaderLine","chunkHeader","hunk","oldStart","oldLines","newStart","newLines","lines","linedelimiters","addCount","removeCount","operation","distanceIterator","minLine","maxLine","wantForward","backwardExhausted","forwardExhausted","localOffset","applyPatch","compareLine","lineNumber","patchContent","errorCount","fuzzFactor","removeEOFNL","addEOFNL","hunkFits","toPos","content","diffOffset","_hunk","_toPos","previousOperation","_k","applyPatches","currentIndex","processIndex","loadFile","updatedContent","patched","structuredPatch","oldFileName","newFileName","oldHeader","newHeader","contextLines","oldRangeStart","newRangeStart","curRange","oldLine","newLine","_loop","_curRange","_curRange2","_curRange3","contextSize","oldEOFNewline","newEOFNewline","noNlBeforeAdds","createTwoFilesPatch","createPatch","arrayEqual","arrayStartsWith","calcLineCount","_calcOldNewLineCount","calcOldNewLineCount","merge","mine","theirs","loadPatch","fileNameChanged","selectField","mineIndex","theirsIndex","mineOffset","theirsOffset","mineCurrent","theirsCurrent","hunkBefore","cloneHunk","mergedHunk","mergeLines","param","patch","conflict","check","mineLines","theirOffset","theirLines","their","insertLeading","theirCurrent","mutualChange","_hunk$lines","collectChange","_hunk$lines2","removal","insertTrailing","myChanges","theirChanges","allRemoves","skipRemoveSuperset","_hunk$lines3","_hunk$lines4","_hunk$lines5","collectContext","merged","_hunk$lines6","insert","matchChanges","changes","matchIndex","contextChanges","conflicted","change","removeChanges","delta","changeContent","myCount","theirCount","convertChangesToDMP","convertChangesToXML","escapeHTML","h","parse","fmtLong","fmtShort","parseFloat","ms","msAbs","round","plural","isPlural","FREEZING","InternalMetadataModule","urlAlphabet","customAlphabet","alphabet","id","random","nanoid","freeExports","freeModule","freeGlobal","regexAstralSymbols","regexAsciiWhitelist","regexBmpWhitelist","regexEncodeNonAscii","encodeMap","regexEscape","escapeMap","regexInvalidEntity","regexInvalidRawCodePoint","regexDecode","decodeMap","decodeMapLegacy","decodeMapNumeric","invalidReferenceCodePoints","stringFromCharCode","propertyName","contains","codePointToSymbol","parseError","hexEscape","decEscape","message","encode","encodeEverything","useNamedReferences","allowUnsafeSymbols","escapeCodePoint","decimal","escapeBmpSymbol","symbol","$0","high","low","decode","html","$1","$2","$3","$4","$5","$6","$7","$8","semicolon","decDigits","hexDigits","reference","isAttributeValue","escape","he","nodeType","cache","constants","FATAL","INVALID_ARG_TYPE","INVALID_ARG_VALUE","INVALID_EXCEPTION","INVALID_INTERFACE","INVALID_REPORTER","MULTIPLE_DONE","NO_FILES_MATCH_PATTERN","UNSUPPORTED","INSTANCE_ALREADY_RUNNING","INSTANCE_ALREADY_DISPOSED","FORBIDDEN_EXCLUSIVITY","INVALID_PLUGIN_IMPLEMENTATION","INVALID_PLUGIN_DEFINITION","MOCHA_ERRORS","Set","createNoFilesMatchPatternError","pattern","createInvalidReporterError","reporter","createInvalidInterfaceError","ui","createUnsupportedError","createMissingArgumentError","argument","expected","createInvalidArgumentTypeError","createInvalidArgumentValueError","reason","createInvalidExceptionError","valueType","createFatalError","createInvalidLegacyPluginError","pluginType","pluginId","createInvalidPluginError","createMochaInstanceAlreadyDisposedError","cleanReferencesAfterRun","instance","createMochaInstanceAlreadyRunningError","createMultipleDoneError","runnable","originalErr","fullTitle","parent","ignored","file","createForbiddenExclusivityError","mocha","isWorker","createInvalidPluginDefinitionError","pluginDef","createInvalidPluginImplementationError","pluginImpl","isMochaError","Boolean","MOCHA_ID_PROP_NAME","util","spaces","tabs","emptyRepresentation","typeHint","canonicalType","primitives","_type","json","jsonStringify","acc","char","_stringify","space","repeat","sDate","toISOString","withStack","item","is","node","slash","href","isMochaInternal","isNodeInternal","isPromise","clamp","range","freeze","createMap","partialSupport","isBrowser","versionFields","major","minor","process.browser","errors","lookupFiles","castArray","defineConstants","uniqueID","Pending","setup","createDebug","coerce","disable","enable","enabled","humanize","instances","names","skips","formatters","selectColor","namespace","prevTime","curr","formatter","formatArgs","logFn","useColors","color","extend","newDebug","namespaces","save","toNamespace","regexp","load","localstorage","__nwjs","navigator","documentElement","WebkitAppearance","firebug","table","lastC","storage","setItem","removeItem","r","getItem","DEBUG","localStorage","Runnable","body","_timeout","_slow","_retries","utils","assignNewMochaID","getMochaID","timedOut","_currentRetry","pending","milliseconds","INT_MAX","timer","resetTimeout","slow","skip","isPending","isFailed","STATE_FAILED","isPassed","STATE_PASSED","retries","currentRetry","titlePath","_timeoutError","globals","_allowedGlobals","errorWasHandled","multiple","duration","asyncSkip","callFnAsync","allowUncaught","toValueOrError","callFn","asyncOnly","STATE_PENDING","$some","Hook","_error","serialize","$$isPending","$$titlePath","currentTest","utilsConstants","Suite","suite","addSuite","parentContext","isRoot","suites","tests","_beforeEach","_beforeAll","_afterEach","_afterAll","_bail","_onlyTests","_onlySuites","deprecatedEvents","delayed","doReset","thingToReset","clone","bail","_createHook","hook","beforeAll","EVENT_SUITE_ADD_HOOK_BEFORE_ALL","afterAll","EVENT_SUITE_ADD_HOOK_AFTER_ALL","beforeEach","EVENT_SUITE_ADD_HOOK_BEFORE_EACH","afterEach","EVENT_SUITE_ADD_HOOK_AFTER_EACH","EVENT_SUITE_ADD_SUITE","addTest","EVENT_SUITE_ADD_TEST","total","sum","eachTest","EVENT_ROOT_SUITE_RUN","hasOnly","some","filterOnly","onlySuite","onlySuites","childSuite","appendOnlySuite","markOnly","appendOnlyTest","getHooks","dispose","cleanReferences","cleanArrReferences","$$fullTitle","EVENT_FILE_POST_REQUIRE","EVENT_FILE_PRE_REQUIRE","EVENT_FILE_REQUIRE","HOOK_TYPE_AFTER_ALL","HOOK_TYPE_AFTER_EACH","HOOK_TYPE_BEFORE_ALL","HOOK_TYPE_BEFORE_EACH","constant","dQuote","sQuote","stackFilter","stackTraceFilter","errorConstants","EVENT_HOOK_BEGIN","EVENT_HOOK_END","EVENT_RUN_BEGIN","EVENT_DELAY_BEGIN","EVENT_DELAY_END","EVENT_RUN_END","EVENT_SUITE_BEGIN","EVENT_SUITE_END","EVENT_TEST_BEGIN","EVENT_TEST_END","EVENT_TEST_FAIL","EVENT_TEST_PASS","EVENT_TEST_PENDING","EVENT_TEST_RETRY","STATE_IDLE","STATE_RUNNING","STATE_STOPPED","Runner","_delay","delay","_globals","_abort","_opts","failures","_eventListeners","Map","retriedTest","checkGlobals","_defaultGrep","grep","globalProps","uncaught","_uncaught","unhandled","promise","_removeEventListener","_addEventListener","immediately","setImmediate","eventName","targetListeners","targetEventListeners","invert","_grep","_invert","grepTotal","props","checkLeaks","ok","leaks","prevGlobalsLength","filterLeaks","fail","force","thrown2Error","fullStackTrace","ignore","hooks","currentRunnable","setHookTitle","cbHookRun","testError","errForbid","originalTitle","parentTitle","orig","errSuite","hookUp","parents","hookDown","runTest","runTests","hookErr","after","err2","errSuite2","forbidPending","origSuite","eSuite","retry","clonedTest","runSuite","nextSuite","abort","rootSuite","begin","prepare","linkPartialObjects","runAsync","isParallelMode","workerReporter","matched","getBrowserWindowSize","innerHeight","innerWidth","Base","isatty","stdout","isTTY","stderr","consoleLog","supportsColor","MOCHA_COLORS","pass","checkmark","fast","medium","green","light","dot","comma","bang","symbols","width","getWindowSize","hide","show","deleteLine","beginningOfLine","CR","cursor","showDiff","sameType","stringifyDiffObjs","generateDiff","inlineDiffs","inlineDiff","unifiedDiff","multipleErr","multipleTest","fmt","hideDiff","testTitle","runner","stats","speed","epilogue","passes","errorDiff","indent","cleanUp","colorLines","notBlank","objToString","Dot","description","Doc","indents","clean","sprintf","TAP","tapVersion","reporterOptions","_producer","createProducer","writeVersion","writePending","writePass","writeFail","writeEpilogue","println","varArgs","vargs","producers","TAP12Producer","TAP13Producer","producer","TAPProducer","writePlan","ntests","emitYamlBlock","level","JSONReporter","testResults","errorJSON","cleanCycles","Progress","percent","fontSize","font","_size","text","_text","_fontSize","family","_font","update","draw","half","rad","angle","PI","clearRect","strokeStyle","beginPath","arc","stroke","measureText","fillText","HTML","statsTemplate","playIcon","stat","fragment","items","passesLink","failuresLink","canvas","report","progress","getContext","ratio","devicePixelRatio","height","scale","evt","preventDefault","unhide","className","hideSuitesWithout","appendChild","url","suiteURL","el","updateStats","testURL","markup","addCodeToggle","appendToStack","stackString","indexOfMessage","sourceURL","htmlMessage","toFixed","makeUrl","search","pathname","encodeURIComponent","escapeRe","contents","h2","pre","display","div","firstChild","classname","getElementsByClassName","els","textContent","innerText","addEventListener","attachEvent","browserOnly","List","Min","Spec","NyanCat","nyanCatWidth","colorIndex","numberOfLines","rainbowColors","generateColors","scoreboardWidth","tick","trajectories","trajectoryWidthMax","appendRainbow","drawScoreboard","drawRainbow","drawNyanCat","cursorUp","segment","rainbowified","rainbowify","trajectory","startWidth","dist","padding","face","cursorDown","pi3","sin","XUnit","suiteName","DEFAULT_SUITE_NAME","fs","createWriteStream","mkdirSync","recursive","fileStream","tag","skipped","t","attrs","close","pairs","SUITE_PREFIX","Markdown","mapTOC","stringifyTOC","link","slug","generateTOC","lastN","open","incomplete","verbose","Landing","plane","runway","crashed","col","kill","JSONStream","writeEvent","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","hasNotificationSupport","hasPromiseSupport","isPermitted","sendNotification","race","canNotify","notPermitted","permitted","granted","allow","denied","deny","ask","Notification","requestPermission","permission","why","cross","logo","notifyLogo","_message","badge","icon","lang","requireInteraction","notification","FORCE_DURATION","createStatsCollector","Test","_retriedTest","$$currentRetry","$$retriedTest","$$slow","shouldBeTested","runWithSuite","before","only","forbidOnly","isOnly","bddInterface","common","describe","xdescribe","xcontext","it","specify","xit","xspecify","teardown","suiteSetup","suiteTeardown","qUnitInterface","visit","_runnable","esmUtils","supportsEsModules","Mocha","mochaStates","INIT","RUNNING","REFERENCES_CLEANED","DISPOSED","builtinReporters","mocharc","files","_cleanReferencesAfterRun","_state","fgrep","reporterOption","opt","rootHooks","_runnerClass","_lazyLoadFiles","globalSetup","globalTeardown","enableGlobalSetup","enableGlobalTeardown","parallel","jobs","parallelMode","addFile","reporterName","_reporter","require","_err","bindInterface","interfaces","loadFiles","loadFilesAsync","lazyLoadFiles","resultModule","unloadFile","unloadFiles","_previousRunner","fullTrace","growl","isGrowlCapable","detail","isCapable","_growl","elt","msecs","noHighlighting","_guardRunningStateTransition","reporters","hasGlobalSetupFixtures","runGlobalSetup","failureCount","hasGlobalTeardownFixtures","runGlobalTeardown","setupFns","teardownFns","_runGlobalFixtures","fixtureFns","fixtureFn","unc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C,cAArB;;;;;;;;"}
\ No newline at end of file
diff --git a/lwnode/apps/sqlite3/sample/styles/style.css b/lwnode/apps/sqlite3/sample/styles/style.css
new file mode 100644 (file)
index 0000000..1a4d910
--- /dev/null
@@ -0,0 +1,28 @@
+* {
+  font-family: monospace;
+}
+
+body {
+  margin: 20 auto;
+  background-color:white;
+}
+
+.contents {
+  font-size: 1.2em;
+  color:black;
+  position: static;
+}
+
+.content_text {
+  white-space: pre-wrap;
+  line-height: 1.4em;
+  position: relative;
+  width: 100%;
+  height: 15%;
+}
+
+@media (min-width:1024px) {
+  .contents {
+    font-size: 1.2em;
+  }
+}
diff --git a/lwnode/apps/sqlite3/sample/test.html b/lwnode/apps/sqlite3/sample/test.html
new file mode 100644 (file)
index 0000000..5c04e1a
--- /dev/null
@@ -0,0 +1,28 @@
+<!--
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+-->
+
+<html>
+<body>
+<script src="../../download/libsqlite.js"></script>
+<script src="test.js"></script>
+<script>
+</script>
+
+<button type="button" onclick="test1()">Test</button>
+</body>
+</html>
diff --git a/lwnode/apps/sqlite3/sample/test.js b/lwnode/apps/sqlite3/sample/test.js
new file mode 100644 (file)
index 0000000..7fe3d5d
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+// var md5 = require("md5");
+const DB_SOURCE = "sqlite3.db";
+const DB_HOSTNAME = "localhost";
+const DB_PORT = 8140;
+const DB_PATH = "/";
+
+async function test1() {
+  var url = "ws://" + DB_HOSTNAME + ":" + DB_PORT + DB_PATH;
+
+  let sqlite3 = new SQLite3(url);
+  let db = await sqlite3.open(DB_SOURCE, (err) => {
+    if (err) {
+      console.log("open: error");
+      return;
+    }
+    console.log("open: ok");
+  });
+
+  console.log("db: " + JSON.stringify(db));
+
+  {
+    let q = `CREATE TABLE user (
+            id INTEGER PRIMARY KEY AUTOINCREMENT,
+            name text,
+            email text UNIQUE,
+            password text,
+            CONSTRAINT email_unique UNIQUE (email)
+            )`;
+
+    await db.run(q, [], (err) => {
+      if (err) {
+        console.log("run: error: " + JSON.stringify(err));
+        return;
+      }
+      console.log("run: ok");
+    });
+  }
+
+  let q = 'INSERT INTO user (name, email, password) VALUES (?,?,?)';
+  {
+    let params = ["admin1", "admin@example.com", "admin123456"]; // need md5();
+    await db.run(q, params, (err) => {
+      if (err) {
+        console.log("run: error: " + JSON.stringify(err));
+        return;
+      }
+      console.log("run: ok");
+    });
+  }
+
+  {
+    let params = ["user1", "user@example.com", "user123456"]; // need md5();
+    await db.run(q, params, (err) => {
+      if (err) {
+        console.log("run: error: " + JSON.stringify(err));
+        return;
+      }
+      console.log("run: ok");
+    });
+  }
+
+  {
+    let q = "select * from user";
+    await db.all(q, [], (err, rows) => {
+      if (err) {
+        console.log("all: error");
+        return;
+      }
+      console.log("all: ok: " + JSON.stringify(rows));
+    });
+
+    await db.get(q, [], (err, row) => {
+      if (err) {
+        console.log("get: error");
+        return;
+      }
+      console.log("get: ok: " + JSON.stringify(row));
+    });
+  }
+
+  console.log("Testing Each");
+  {
+    let q = "select * from user";
+    await db.each(q, [], (err, row) => {
+      if (err) {
+        console.log("each: error");
+        return;
+      }
+      console.log("each: ok: " + JSON.stringify(row));
+    }, (err, rowCount) => {
+      if (err) {
+        console.log("each: complete error");
+        return;
+      }
+      console.log("each: complete ok: " + rowCount);
+    });
+  }
+
+  {
+    let q = "select * from user";
+    await db.exec(q, (err) => {
+      if (err) {
+        console.log("exec: error");
+        return;
+      }
+      console.log("exec: ok");
+    });
+  }
+
+  {
+    let q = "select * from user";
+    let stmt = await db.prepare(q, (err) => {
+      if (err) {
+        console.log("prepare: error");
+        return;
+      }
+      console.log("prepare: ok");
+    });
+
+    console.log("Prepare: client " + JSON.stringify(stmt));
+
+    await stmt.finalize((err) => {
+      if (err) {
+        console.log("finalize: error");
+        return;
+      }
+      console.log("finalize: ok");
+    });
+  }
+
+  await db.close((err) => {
+    if (err) {
+      console.log("error: close: " + JSON.stringify(err));
+      return;
+    }
+    console.log("close: ok");
+  });
+}
diff --git a/lwnode/apps/sqlite3/sample/tizen-manifest.xml b/lwnode/apps/sqlite3/sample/tizen-manifest.xml
new file mode 100644 (file)
index 0000000..8aa468b
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="4.0" package="node-sqlite3-service" version="1.0.0">
+    <profile name="tv-samsung" />
+    <service-application appid="node-sqlite3-service" exec="node" type="capp" multiple="false" taskmanage="false" nodisplay="true" on-boot="true">
+        <icon>service.png</icon>
+        <label>Sqlite3 Service</label>
+       </service-application>
+    <privileges>
+    </privileges>
+</manifest>
diff --git a/lwnode/apps/sqlite3/src/backend/api/api.ctrl.js b/lwnode/apps/sqlite3/src/backend/api/api.ctrl.js
new file mode 100644 (file)
index 0000000..79b9ddb
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+const { paths } = require('../lib/variables');
+const { deleteFile, existFile } = require('../lib/utils');
+
+const debug = require('debug')('api');
+
+exports.downloadFile = async (req, res) => {
+  const { file } = req.params;
+
+  debug(`${req.method} ${req.url} ${req.ip}`);
+  res.download(`${paths.download}/${file}`);
+};
+
+exports.deleteFile = async (req, res) => {
+  try {
+    const { file } = req.params;
+
+    debug(`${req.method} ${req.url} ${req.ip}`);
+
+    await deleteFile(`${paths.store}/${file}`);
+    debug(`remove file : ${paths.store}/${file}`);
+
+    res.status(200).end('OK');
+  } catch (e) {
+    res.status(409).end(`Error: ${e.message}`);
+  }
+};
+
+exports.existFile = async (req, res) => {
+  try {
+    const { file } = req.params;
+
+    debug(`${req.method} ${req.url} ${req.ip}`);
+
+    let result = await existFile(`${paths.store}/${file}`);
+    debug(`exist file : ${paths.store}/${file} - ${result}`);
+
+    res.status(200).end(result.toString());
+  } catch (e) {
+    res.status(409).end(`Error: ${e.message}`);
+  }
+};
diff --git a/lwnode/apps/sqlite3/src/backend/api/auth.ctrl.js b/lwnode/apps/sqlite3/src/backend/api/auth.ctrl.js
new file mode 100644 (file)
index 0000000..5d7d99e
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+const Joi = require('joi');
+const debug = require('debug')('api');
+
+import Users, { UserData } from '../db/Users';
+import DAO from '../db/dao';
+import config from '../config';
+
+const { cookieOptions } = config.auth;
+const defaultOption = {
+  allowUnknown: true,
+};
+
+exports.localRegister = async (req, res) => {
+  debug(`${req.method} ${req.url} ${req.ip}`);
+
+  const { body: data } = req;
+
+  // todo: use joi typescript validator with UserData
+  const schema = Joi.object({
+    email: Joi.string().email().required(),
+    password: Joi.string().min(4).max(30).required(),
+    displayName: Joi.string().regex(/^[a-zA-Z0-9ㄱ-힣]{3,12}$/),
+  });
+
+  const result = schema.validate(data, defaultOption);
+  if (result.error) {
+    return res.status(400).end(result.error.details[0].message);
+  }
+
+  try {
+    let users = new Users(DAO.knex());
+
+    if (await users.getByEmail(data.email)) {
+      return res.status(400).end(`${data.email} already exists`);
+    }
+
+    await users.create(data);
+
+    return res.status(200).end('OK');
+  } catch (error) {
+    debug(error);
+    return res.status(500).end('something wrong');
+  }
+};
+
+exports.localLogin = async (req, res) => {
+  debug(`${req.method} ${req.url} ${req.ip}`);
+
+  const { body } = req;
+
+  const schema = Joi.object({
+    email: Joi.string().email().required(),
+    password: Joi.string().min(6).max(30),
+  });
+
+  const result = schema.validate(body, defaultOption);
+
+  if (result.error) {
+    return res.status(400).end(result.error.details[0].message);
+  }
+
+  const { email, password } = body;
+
+  try {
+    let users = new Users(DAO.knex());
+    const user = await users.getByEmail(email);
+
+    if (!user) {
+      return res.status(403).end('user does not exist');
+    }
+
+    if (user.validatePassword(password) == false) {
+      return res.status(403).end('wrong password');
+    }
+
+    const accessToken = await user.generateToken();
+
+    return res
+      .cookie('access_token', accessToken, cookieOptions)
+      .status(200)
+      .end('OK');
+  } catch (e) {
+    res.status(500).end('something wrong');
+  }
+};
+
+exports.logout = (req, res) => {
+  res.clearCookie('access_token').status(200).end('OK');
+};
+
+exports.localDelete = async (req, res) => {
+  debug(`${req.method} ${req.url} ${req.ip}`);
+
+  const { body } = req;
+
+  const schema = Joi.object({
+    email: Joi.string().email().required(),
+    password: Joi.string().min(6).max(30).required(),
+  });
+
+  const result = schema.validate(body, defaultOption);
+
+  if (result.error) {
+    return res.status(400).end(result.error.details[0].message);
+  }
+
+  const { email, password } = body;
+
+  try {
+    let users = new Users(DAO.knex());
+    const user = await users.getByEmail(email);
+
+    if (!user) {
+      return res.status(403).end('user does not exist');
+    }
+
+    if (user.validatePassword(password) == false) {
+      return res.status(403).end('wrong password');
+    }
+
+    await users.delete(email);
+
+    return res.status(200).end('OK');
+  } catch (e) {
+    res.status(500).end('something wrong');
+  }
+};
diff --git a/lwnode/apps/sqlite3/src/backend/api/index.js b/lwnode/apps/sqlite3/src/backend/api/index.js
new file mode 100644 (file)
index 0000000..43f67e8
--- /dev/null
@@ -0,0 +1,41 @@
+/* Copyright 2020-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+const express = require('express');
+const apiCtrl = require('./api.ctrl');
+const authCtrl = require('./auth.ctrl');
+const serviceCtrl = require('./service.ctrl');
+
+const api = express.Router();
+const auth = express.Router();
+const service = express.Router();
+
+api.use('/auth', auth);
+
+api.get('/download/:file', apiCtrl.downloadFile);
+api.delete('/delete/:file', apiCtrl.deleteFile);
+api.get('/exist/:file', apiCtrl.existFile);
+
+auth.post('/register/local', authCtrl.localRegister);
+auth.post('/login/local', authCtrl.localLogin);
+auth.delete('/local', authCtrl.localDelete);
+auth.get('/logout', authCtrl.logout);
+
+api.use('/service', service);
+
+service.post('/register', serviceCtrl.registerService);
+service.delete('/delete/:name', serviceCtrl.deleteService);
+
+module.exports = api;
diff --git a/lwnode/apps/sqlite3/src/backend/api/service.ctrl.js b/lwnode/apps/sqlite3/src/backend/api/service.ctrl.js
new file mode 100644 (file)
index 0000000..2a1964d
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+const Joi = require('joi');
+const debug = require('debug')('api');
+
+import { ServiceData, ServicesDB } from '../db/Services';
+import DAO from '../db/dao';
+import Services from '../lib/services';
+
+exports.registerService = async (req, res) => {
+  debug(`${req.method} ${req.url} ${req.ip}`);
+
+  const { body: data } = req;
+
+  const schema = Joi.object({
+    name: Joi.string().min(2).max(30).required(),
+    path: Joi.string().min(2).max(100).required(),
+  });
+
+  const result = schema.validate(data);
+  if (result.error) {
+    return res.status(400).end(result.error.details[0].message);
+  }
+
+  try {
+    let services = new ServicesDB(DAO.knex());
+    debug(`register service: ${data.name}(${data.path})`);
+
+    if (await services.getDataByName(data.name)) {
+      return res.status(400).end(`${data.name} already exists`);
+    }
+
+    Services.getInstance().addService(data);
+
+    await services.create(data);
+
+    return res.status(200).end('OK');
+  } catch (error) {
+    return res.status(500).end('something wrong');
+  }
+};
+
+exports.deleteService = async (req, res) => {
+  const { name } = req.params;
+
+  try {
+    let servicesDB = new ServicesDB(DAO.knex());
+
+    if (await servicesDB.getDataByName(name) === undefined) {
+      return res.status(400).end(`${name} is not installed`);
+    }
+
+    Services.getInstance().deleteService(name);
+
+    await servicesDB.delete(name);
+
+    return res.status(200).end('OK');
+  } catch (error) {
+    return res.status(500).end('something wrong');
+  }
+};
diff --git a/lwnode/apps/sqlite3/src/backend/config.ts b/lwnode/apps/sqlite3/src/backend/config.ts
new file mode 100644 (file)
index 0000000..497f8dd
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+import { paths } from './lib/variables';
+import { deepFreeze } from './lib/utils';
+
+const filename = paths.store + '/db.lwnode';
+
+const config = {
+  db: {
+    knex: {
+      client: 'sqlite3',
+      connection: {
+        filename,
+      },
+      useNullAsDefault: true,
+    },
+    privateKey: process.env?.LWNODE_DB_USERS_PRIVATE_KEY || 'lwnode',
+  },
+  auth: {
+    privateKey: process.env?.LWNODE_JWT_PRIVATE_KEY || 'qwer!234',
+    signOptions: {
+      issuer: 'lwnode',
+      expiresIn: '30m',
+    },
+    cookieOptions: {
+      httpOnly: true,
+      maxAge: 60 * 30, // 30 minutes
+      secure: process.env.NODE_ENV === 'production',
+    },
+  },
+};
+
+// todo: check this file ownership.
+// we need to consider how to securly store private key
+// process.env.NODE_ENV === "production"
+
+if (typeof config.db.privateKey != 'string') {
+  throw new Error("private key doesn't exist");
+}
+
+export default deepFreeze(config);
diff --git a/lwnode/apps/sqlite3/src/backend/db/Services.ts b/lwnode/apps/sqlite3/src/backend/db/Services.ts
new file mode 100644 (file)
index 0000000..a9a0f25
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+import { Knex } from 'knex';
+const debug = require('debug')('api');
+
+const tableName = 'services';
+
+export type ServiceData = {
+  name: string;
+  path: string;
+};
+
+export class ServicesDB {
+  private knex: Knex;
+
+  constructor(knex: Knex) {
+    this.knex = knex;
+  }
+
+  private ensureTable() {
+    return this.knex.schema.hasTable(tableName).then((exists) => {
+      if (!exists) {
+        return this.knex.schema.createTable(tableName, (table) => {
+          table.string('name').primary();
+          table.string('path').unique();
+        })
+          .then(() => {
+            debug(`${tableName} table is created`);
+          });
+      }
+    });
+  }
+
+  async create(data: ServiceData) {
+    await this.ensureTable();
+    return this.knex(tableName).insert({
+      ...data
+    });
+  }
+
+  async getDataAll(): Promise<ServiceData[]> | undefined {
+    await this.ensureTable();
+    return this.knex(tableName).select('*');
+  }
+
+  async getDataByName(name: string): Promise<ServiceData> | undefined {
+    await this.ensureTable();
+    return this.knex(tableName)
+      .where('name', name)
+      .then((result: Array<ServiceData>) => {
+        if (result.length) {
+          return result[0];
+        }
+      });
+  }
+
+  async delete(name: string) {
+    await this.ensureTable();
+    return this.knex(tableName).where('name', name).del();
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/backend/db/Users.ts b/lwnode/apps/sqlite3/src/backend/db/Users.ts
new file mode 100644 (file)
index 0000000..e3c5617
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+import { Knex } from 'knex';
+import config from '../config';
+import crypto from 'crypto';
+import { generateToken } from '../lib/token';
+
+const { privateKey: secret } = config.db;
+
+function encryptPassword(password: string) {
+  return crypto.createHmac('sha256', secret).update(password).digest('hex');
+}
+
+export type UserData = {
+  id: number;
+  email: string;
+  password: string;
+  displayName: string;
+};
+
+export class User {
+  readonly email: string;
+  readonly displayName: string;
+  private readonly id: number;
+  private readonly password: string;
+
+  constructor(data: UserData) {
+    this.email = data.email;
+    this.displayName = data.displayName;
+    this.id = data.id;
+    this.password = data.password;
+  }
+
+  validatePassword(password: string): boolean {
+    return this.password === encryptPassword(password);
+  }
+
+  generateToken(): Promise<string> {
+    const { id, displayName } = this;
+    const user: UserTokenData = {
+      id,
+      displayName,
+    };
+    return generateToken({ user }, 'user');
+  }
+}
+
+class Users {
+  private knex: Knex;
+
+  constructor(knex: Knex) {
+    this.knex = knex;
+  }
+
+  private ensureTable() {
+    return this.knex.schema.hasTable('users').then((exists) => {
+      if (!exists) {
+        // one user to many social ids
+        return this.knex.schema
+          .createTable('users', (table) => {
+            table.increments('id').primary();
+            table.string('email').unique();
+            table.string('password'); // todo: should be encrypted
+            table.string('displayName');
+          })
+          .createTable('socials', (table) => {
+            table.increments('id').primary();
+            table.string('provider');
+            table.string('accessToken');
+            table.integer('user_id').unsigned().references('users.id');
+          });
+      }
+    });
+  }
+
+  async create(data: UserData) {
+    await this.ensureTable();
+    return this.knex('users').insert({
+      ...data,
+      password: encryptPassword(data.password),
+    });
+  }
+
+  // read
+  async getByEmail(email: string): Promise<User> | undefined {
+    await this.ensureTable();
+    return this.knex('users')
+      .where('email', email)
+      .then((result: Array<UserData>) => {
+        if (result.length) {
+          return new User(result[0]);
+        }
+      });
+  }
+
+  async update(data: UserData) {
+    await this.ensureTable();
+    return this.knex('users').where('email', data.email).update(data);
+  }
+
+  async delete(email: string) {
+    await this.ensureTable();
+    return this.knex('users').where('email', email).del();
+  }
+}
+
+export default Users;
diff --git a/lwnode/apps/sqlite3/src/backend/db/dao.ts b/lwnode/apps/sqlite3/src/backend/db/dao.ts
new file mode 100644 (file)
index 0000000..32f424e
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+import config from '../config';
+const debug = require('debug')('api');
+
+class DAO {
+  private static instance: any = null;
+
+  public static knex() {
+    if (!DAO.instance) {
+      debug('create a DAO');
+      DAO.instance = require('knex')(config.db?.knex);
+    }
+    return DAO.instance;
+  }
+}
+
+export default DAO;
diff --git a/lwnode/apps/sqlite3/src/backend/index.ts b/lwnode/apps/sqlite3/src/backend/index.ts
new file mode 100644 (file)
index 0000000..0581352
--- /dev/null
@@ -0,0 +1,214 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+if (process.cwd() != __dirname) {
+  process.chdir(__dirname);
+}
+
+(function reloadNodePath(nodePath) {
+  process.env.NODE_PATH = process.env.NODE_PATH
+    ? `${process.env.NODE_PATH}:${nodePath}`
+    : nodePath;
+
+  require('module').Module._initPaths(); // eslint-disable-line no-underscore-dangle
+})('./');
+
+const { port } = require('./lib/variables');
+const compression = require('compression');
+const express = require('express');
+import { log } from './lib/log';
+const debug = require('debug');
+
+const asyncify = require('express-asyncify');
+
+import { Services } from './lib/services';
+import { jwtParser } from './lib/middleware/jwt';
+
+const app = asyncify(express());
+
+startServer(app);
+
+function startServer(app) {
+  const http = require('http');
+  const WebSocket = require('ws');
+  const { isLinux } = require('./lib/utils');
+  const api = require('./api');
+  const router = express.Router();
+
+  app.all('/*', function (req, res, next) {
+    res.header('Access-Control-Allow-Origin', '*');
+    res.header('Access-Control-Allow-Headers', 'X-Requested-With');
+    res.header(
+      'Access-Control-Allow-Methods',
+      'GET, POST, DELETE, PATCH, OPTIONS',
+    );
+    next();
+  });
+
+  const rpc = require('./lib/rpc').create();
+  const { database, statement } = require('./lib/sqlite3');
+
+  rpc.use('Database#', database.ws);
+  rpc.use('Statement#', statement.ws);
+  router.use('/api', api);
+
+  app.use(compression());
+  app.use(express.json());
+  app.use(express.urlencoded({ extended: false }));
+  app.use(jwtParser());
+  app.use(router);
+
+  startService(app);
+
+  const server = http.createServer(app);
+  const wss = new WebSocket.Server({ server });
+
+  wss.on('connection', (ws) => rpc.handle(ws));
+
+  server.listen(port, (err) => {
+    if (err) {
+      log.error(err);
+      process.exit(1);
+    }
+
+    log.info(`listening port: ${port}`);
+
+    let onCloseCallback = setServerCloseHandler(server);
+
+    if (isLinux()) {
+      enablePrompt(onCloseCallback);
+    }
+  });
+
+  return server;
+}
+
+async function startService(app) {
+  const router = express.Router();
+  const serviceRouter = express.Router();
+  app.use(router);
+  router.use('/service', serviceRouter);
+
+  const services = Services.getInstance();
+  app.set('view engine', services.getViewEngine());
+  services.start(serviceRouter);
+}
+
+function setServerCloseHandler(server) {
+  ['SIGINT', 'SIGTERM', 'SIGQUIT', 'exit'].forEach((signal) => {
+    // @ts-ignore
+    process.once(signal, shutdown);
+  });
+
+  let connections = [];
+
+  server.on('connection', (socket) => {
+    connections.push(socket);
+    socket.on('close', () => {
+      connections = connections.filter((element) => element !== socket);
+    });
+  });
+
+  server.on('error', (error) => {
+    log.error(`error: ${error}`);
+  });
+
+  let isShutdowning = false;
+
+  function shutdown() {
+    if (isShutdowning) {
+      return;
+    }
+    isShutdowning = true;
+
+    server.close(() => {
+      log.info('shutdown');
+      process.exit(0);
+    });
+
+    connections.forEach((socket) => socket.end());
+
+    const socketCloseTimeout = 300;
+    const serverCloseTimeout = 10000;
+
+    setTimeout(() => {
+      log.info('serverCloseTimeout');
+      process.exit(1);
+    }, serverCloseTimeout);
+
+    setTimeout(() => {
+      log.info('socketCloseTimeout');
+      connections.forEach((socket) => socket.destroy());
+    }, socketCloseTimeout);
+  }
+
+  return shutdown;
+}
+
+function enablePrompt(closeCallback) {
+  const readline = require('readline');
+  const rl = readline.createInterface({
+    input: process.stdin,
+    output: process.stdout,
+    completer: (line) => {
+      const completions = 'c clear d debug e q x exit'.split(' ');
+      const hits = completions.filter((c) => c.startsWith(line));
+      return [hits.length ? hits : completions, line];
+    },
+  });
+
+  if (process.stdin.isTTY) {
+    process.stdin.setRawMode(true);
+  }
+
+  rl.on('line', function (line) {
+    let input = line.trim().split(/[ =]+/);
+    switch (input[0]) {
+      case 'q':
+      case 'e':
+      case 'x':
+      case 'exit':
+        rl.close();
+        break;
+      case 'c':
+      case 'clear':
+        process.stdout.write('\033[2J');
+        process.stdout.write('\u001b[H\u001b[2J\u001b[3J');
+        break;
+      case 'd':
+      case 'debug':
+        let cns = debug.disable();
+        let nns = input[1] ? input[1] : '';
+        debug.enable(nns);
+        console.log(`[${cns}]  -->  [${nns}]\n`);
+        break;
+      default:
+        break;
+    }
+    rl.prompt();
+  });
+
+  rl.on('close', function () {
+    closeCallback && closeCallback();
+  });
+
+  rl.on('SIGINT', function () {
+    rl.close();
+  });
+
+  console.log('\ndebug console is open.');
+  rl.prompt();
+}
diff --git a/lwnode/apps/sqlite3/src/backend/lib/log.ts b/lwnode/apps/sqlite3/src/backend/lib/log.ts
new file mode 100644 (file)
index 0000000..aeffeb7
--- /dev/null
@@ -0,0 +1,39 @@
+const chalk = require('chalk');
+const Moment = require('moment');
+
+/* istanbul ignore next */
+function getTime() {
+  const now = new Moment();
+  const time = chalk.dim(`[${now.format('HH:mm:ss')}]`);
+  return time;
+}
+
+/* istanbul ignore next */
+export function log(...message) {
+  const time = getTime();
+  const type = chalk.bold('[LOG]');
+  console.log(`${time}${type}`, ...message);
+}
+
+/* istanbul ignore next */
+log.info = (...message) => {
+  const time = getTime();
+  const type = chalk.bold(chalk.cyan('[INFO]'));
+  console.info(`${time}${type}`, ...message);
+};
+
+/* istanbul ignore next */
+log.warn = (...message) => {
+  const time = getTime();
+  const type = chalk.bold(chalk.yellow('[WARN]'));
+  console.error(`${time}${type}`, ...message);
+};
+
+/* istanbul ignore next */
+log.error = (...message) => {
+  const time = getTime();
+  const type = chalk.bold(chalk.red('[ERROR]'));
+  console.error(`${time}${type}`, ...message);
+};
+
+// module.exports = log;
diff --git a/lwnode/apps/sqlite3/src/backend/lib/middleware/jwt.ts b/lwnode/apps/sqlite3/src/backend/lib/middleware/jwt.ts
new file mode 100644 (file)
index 0000000..bc96a61
--- /dev/null
@@ -0,0 +1,48 @@
+import { RequestHandler } from 'express';
+import { generateToken, decodeToken } from '../token';
+import config from '../../config';
+const { cookieOptions } = config.auth;
+const debug = require('debug')('auth');
+
+declare global {
+  export type UserTokenData = {
+    id: number;
+    displayName: string;
+  };
+
+  namespace Express {
+    export interface Request {
+      user?: UserTokenData;
+    }
+  }
+}
+
+export function jwtParser(options?: any): RequestHandler {
+  return async function jwtParser(req, res, next) {
+    try {
+      const authHeader = req.headers['authorization'];
+      const token = authHeader && authHeader.split(' ')[1];
+
+      if (token == null) {
+        return next();
+      }
+
+      const decoded = await decodeToken(token);
+      const { user } = decoded;
+
+      // re-issue token when its age is over
+      if (Date.now() / 1000 - decoded.iat > cookieOptions.maxAge) {
+        const freshToken = await generateToken({ user }, 'user');
+        res.cookie('access_token', freshToken, cookieOptions);
+      }
+
+      // `req.user` indicates if the given request is authorized.
+      req.user = user;
+    } catch (e) {
+      debug(e);
+      req.user = null;
+    }
+
+    next();
+  };
+}
diff --git a/lwnode/apps/sqlite3/src/backend/lib/response.ts b/lwnode/apps/sqlite3/src/backend/lib/response.ts
new file mode 100644 (file)
index 0000000..0685009
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+const jsonrpc = require('jsonrpc-lite');
+
+const requestSymbol = Symbol('request');
+const payloadSymbol = Symbol('payload');
+
+import { JSONRPCError } from './rpcerror';
+import type { Request } from './rpc';
+import type { Socket } from './socket';
+
+export class Response {
+  static readonly option = { AutoFill: 'auto' };
+
+  constructor(request: Request, payload) {
+    this[requestSymbol] = request;
+    this[payloadSymbol] = payload;
+  }
+
+  get socket(): Socket {
+    return this[requestSymbol].socket;
+  }
+
+  write(data) {
+    if (data && data.method === Response.option.AutoFill) {
+      data.method = this[requestSymbol].payload.method;
+    }
+
+    const output = jsonrpc.success(this[payloadSymbol].id, data);
+    this[requestSymbol].socket.send(output);
+  }
+
+  send(data) {
+    return this.write(data);
+  }
+
+  error(data, code = 0, message = '') {
+    let meta = { code, message };
+
+    if (data instanceof JSONRPCError) {
+      // @ts-ignore
+      meta.code = data.errno || code;
+      meta.message = data.message;
+    }
+
+    if (data && data.method === Response.option.AutoFill) {
+      data.method = this[requestSymbol].payload.method;
+    }
+
+    const output = jsonrpc.error(
+      this[payloadSymbol].id,
+      new jsonrpc.JsonRpcError(meta.message, meta.code, data),
+    );
+
+    this[requestSymbol].socket.send(output);
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/backend/lib/rpc.ts b/lwnode/apps/sqlite3/src/backend/lib/rpc.ts
new file mode 100644 (file)
index 0000000..86bec74
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+const jsonrpc = require('jsonrpc-lite');
+import { Socket } from './socket';
+import { Response } from './response';
+import {
+  isFunction,
+  isValidationError,
+  getValidationErrorMessage,
+} from './utils';
+import { log } from './log';
+const debug = require('debug')('rpc:router');
+const inspector = require('./rpcinspector').inspector;
+
+/*
+ Usage:
+  const rpc = RPC.create();
+
+  // sync
+  rpc.set('ping', (ws)=> { ws.send()});
+
+  // async
+  rpc.set('ping', (ws)=> { return new Promise((resolve, reject) => {}); });
+
+  // groups
+  let api = { ping(ws) {ws.send()} }
+  rpc.use(api);
+*/
+
+
+export interface Request {
+  payload;
+  socket: Socket;
+}
+
+export interface Context {
+  request: Request;
+  response: Response;
+}
+
+class RPC {
+  api;
+  constructor() {
+    this.api = {};
+  }
+
+  handle(ws) {
+    let socket = new Socket(ws, inspector);
+
+    socket.onMessage(async (msg) => {
+      try {
+        let { payload } = jsonrpc.parse(msg);
+
+        // debug('RECV', toJson(payload));
+
+        if (payload instanceof jsonrpc.JsonRpcError) {
+          throw payload;
+        }
+
+        let { id, method, params } = payload;
+
+        if (!this.api[method]) {
+          throw jsonrpc.JsonRpcError.methodNotFound();
+        }
+
+        let request: Request = { payload, socket };
+        let response = new Response(request, payload);
+
+        // NOTE: consider creating Context and Request if needed
+        let context: Context = { request, response };
+
+        debug(`${method}`);
+
+        await this.api[method](context, params);
+
+        // send `FIN` once a requested task is done.
+        socket.send(jsonrpc.success(id, 'FIN'));
+      } catch (error) {
+        if (error instanceof jsonrpc.JsonRpcError) {
+          socket.send(error);
+        } else {
+          if (isValidationError(error)) {
+            socket.send(
+              jsonrpc.JsonRpcError.invalidParams(
+                getValidationErrorMessage(error),
+              ),
+            );
+          } else if (!error) {
+            log.warn('undefined error is thrown');
+          } else {
+            socket.send(jsonrpc.JsonRpcError.internalError());
+            log.error(`internalError`);
+            log.error(error);
+          }
+        }
+      }
+    });
+  }
+
+  use(prefix, api) {
+    for (const [key, value] of Object.entries(api)) {
+      if (isFunction(value)) {
+        this.set(`${prefix}${key}`, value);
+      }
+    }
+  }
+
+  set(method, handler) {
+    if (this.api[method]) {
+      throw new Error('already registered');
+    }
+    this.api[method] = handler;
+  }
+
+  unset(method) {
+    if (this.api[method]) {
+      delete this.api[method];
+    }
+  }
+
+  static create() {
+    return new RPC();
+  }
+}
+
+module.exports = RPC;
diff --git a/lwnode/apps/sqlite3/src/backend/lib/rpcerror.ts b/lwnode/apps/sqlite3/src/backend/lib/rpcerror.ts
new file mode 100644 (file)
index 0000000..706ed88
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+export class JSONRPCError extends Error {
+  constructor(e) {
+    if (e instanceof Error) {
+      super(e.message);
+    } else {
+      super(e);
+    }
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/backend/lib/rpcinspector.ts b/lwnode/apps/sqlite3/src/backend/lib/rpcinspector.ts
new file mode 100644 (file)
index 0000000..7671b5b
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+const chalk = require('chalk');
+import { log } from './log';
+import { stringify, isObject } from './utils';
+const debug = (() => {
+  let debug = require('debug')('rpc');
+  return {
+    recv: debug.extend('payload:recv'),
+    send: debug.extend('payload:send'),
+    status: debug.extend('status'),
+  };
+})();
+
+export class RPCInspector {
+  lastId: number;
+  registery: Set<number>;
+  constructor() {
+    this.lastId = -1;
+    this.registery = new Set();
+  }
+
+  onRecv(payload) {
+    const { id } = payload;
+
+    debug.recv(chalk.bold.bgMagenta('RECV'), stringify(payload));
+
+    this.registery.add(id);
+  }
+
+  onSend(payload) {
+    if (!isObject(payload)) {
+      log.warn(`typeof payload isn't object`);
+      payload = JSON.parse(payload);
+    }
+
+    const { id, result, error } = payload;
+
+    // check if FIN is sent
+    if (result == 'FIN') {
+      if (this.registery.has(id) === false) {
+        log.warn(`FIN ${id} already sent.`);
+      }
+
+      this.registery.delete(id);
+
+      debug.status('STATUS', `${this.registery.size} request(s) left`);
+    }
+
+    // print debug log
+    if (result != 'FIN') {
+      let tag = chalk.bold.bgCyan('SEND');
+
+      if (error) {
+        tag += ' ' + chalk.bold.bgRedBright('ERROR');
+      }
+
+      if (result == 'FIN') {
+        tag += ' ' + chalk.bold.bgGrey('FIN');
+      }
+
+      if (result && result.hasMoreData === true) {
+        tag += ' ' + chalk.bold.bgCyan('MORE');
+      }
+
+      debug.send(tag, stringify(payload));
+    }
+  }
+}
+
+export const inspector = new RPCInspector();
diff --git a/lwnode/apps/sqlite3/src/backend/lib/services.ts b/lwnode/apps/sqlite3/src/backend/lib/services.ts
new file mode 100644 (file)
index 0000000..b8ea0b7
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2022-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+
+import { Router } from 'express';
+import { ServiceData, ServicesDB } from '../db/Services';
+import DAO from '../db/dao';
+const debug = require('debug')('service');
+
+const State = {
+  RUN: 'run',
+  STOP: 'stop'
+} as const;
+type State = typeof State[keyof typeof State];
+
+
+export class Service {
+  private readonly name: string;
+  private path: string;
+  private state: State;
+
+  constructor(data: ServiceData, router: Router) {
+    this.name = data.name;
+    this.path = data.path;
+    this.state = State.STOP;
+
+    router.get(`/${this.name}`, (req, res) => {
+      debug(`${this.name} state is ${this.state}.`);
+
+      if (this.state === State.RUN) {
+        debug(`render service: ${this.name}: ${this.path}`);
+        res.render(this.path, { name: this.name });
+      } else {
+        res.status(404).send('not found');
+      }
+    });
+  }
+
+  public setPath(path: string) {
+    this.path = path;
+  }
+
+  public run() {
+    if (this.state === State.RUN) {
+      return;
+    }
+
+    debug(`run service: ${this.name}(${this.path})`);
+
+    this.state = State.RUN;
+  }
+
+  public stop() {
+    if (this.state === State.STOP) {
+      return;
+    }
+
+    debug(`stop service: ${this.name}`);
+
+    this.state = State.STOP;
+  }
+}
+
+export class Services {
+  private static instance: Services;
+  private router: Router;
+  private appList: Map<string, Service>;
+  private viewEngine: string;
+  private isRunning: boolean;
+  private servicesDB: ServicesDB;
+
+  private constructor() {
+    this.appList = new Map<string, Service>();
+    this.viewEngine = 'ejs';
+    this.isRunning = false;
+    this.servicesDB = new ServicesDB(DAO.knex());
+  }
+
+  public static getInstance(): Services {
+    return this.instance || (this.instance = new this())
+  }
+
+  public getViewEngine(): string {
+    return this.viewEngine;
+  }
+
+  public async start(router: Router) {
+    this.router = router;
+    this.isRunning = true;
+
+    try {
+      const servicesData = await this.servicesDB.getDataAll();
+      servicesData.forEach(function (data) {
+        this.addService(data);
+      }, this);
+    } catch(e) {
+      debug('cannot start service app.');
+    }
+  }
+
+  public addService(data: ServiceData) {
+    if (!this.isRunning) {
+      throw new Error("Service is not start!");
+    }
+
+    let service;
+    if (this.appList.has(data.name)) {
+      service = this.appList.get(data.name);
+      service.setPath(data.path);
+    } else {
+      service = new Service(data, this.router);
+      this.appList.set(data.name, service);
+    }
+
+    service.run();
+  }
+
+  public deleteService(name: string) {
+    if (!this.isRunning) {
+      throw new Error("Service is not start!");
+    }
+
+    if (!this.appList.has(name)) {
+      throw new Error(`${name} is not exists.`);
+    }
+
+    const service = this.appList.get(name);
+    service.stop();
+  }
+}
+
+export default Services;
diff --git a/lwnode/apps/sqlite3/src/backend/lib/socket.ts b/lwnode/apps/sqlite3/src/backend/lib/socket.ts
new file mode 100644 (file)
index 0000000..695d74d
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+const chalk = require('chalk');
+const WebSocket = require('ws');
+const log = require('./log');
+const debug = require('debug')('rpc:socket');
+const jsonrpc = require('jsonrpc-lite');
+const wsSymbol = Symbol('ws');
+
+export class Socket {
+  inspector;
+
+  constructor(ws, inspector) {
+    if (ws instanceof WebSocket && ws.readyState === WebSocket.OPEN) {
+      debug(chalk.bold('OPEN'));
+    }
+
+    this[wsSymbol] = ws;
+    this[wsSymbol].on('close', (closeCode) => {
+      debug(chalk.bold('CLOSE'), `${closeCode}`);
+    });
+
+    this.inspector = inspector;
+  }
+
+  onMessage(callback) {
+    if (typeof callback !== 'function') {
+      return;
+    }
+
+    this[wsSymbol].on('message', (msg) => {
+      let { payload } = jsonrpc.parse(msg);
+
+      this.inspector && this.inspector.onRecv(payload);
+
+      callback(msg);
+    });
+  }
+
+  onClose(callback) {
+    if (typeof callback !== 'function') {
+      return;
+    }
+
+    this[wsSymbol].on('close', callback);
+  }
+
+  send(payload) {
+    let encoded = payload;
+
+    this.inspector && this.inspector.onSend(payload);
+
+    try {
+      if (typeof encoded !== 'string') {
+        encoded = JSON.stringify(payload);
+      }
+
+      this[wsSymbol].send(encoded);
+    } catch (e) {
+      log.error(e);
+    }
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/backend/lib/sqlite3/database.ts b/lwnode/apps/sqlite3/src/backend/lib/sqlite3/database.ts
new file mode 100644 (file)
index 0000000..b6d0e29
--- /dev/null
@@ -0,0 +1,721 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+import { log } from '../log';
+import { str2ab, isNumber, isString, restoreBufferFromArrayBufferInString } from '../utils';
+import type { Context } from '../rpc';
+import type { Socket } from '../socket';
+import { StatementInfo } from './statement';
+
+import { DatabasePacket, StatementPacket } from './packet';
+import { SQLiteError } from './error';
+const Joi = require('joi');
+
+const debug = (() => {
+  let debug = require('debug')('sql');
+  return {
+    database: debug.extend('database'),
+  };
+})();
+
+let sqlite3 = null;
+
+try {
+  const versionString = 'v14.14.0';
+  if (process.version != versionString) {
+    log.warn(
+      `(warn) compatible version: ${versionString} (cur: ${process.version})`,
+    );
+    log.warn(`(warn) we'll try using the original sqlite3`);
+    sqlite3 = require('sqlite3');
+  } else {
+    sqlite3 = require('sqlite3');
+  }
+} catch (e) {
+  log.error(`(exit) ${e.message}`);
+  process.exit(1);
+}
+
+let g_nextDbId = -1; // A counter for generating DB Ids
+
+interface DatabaseSqlite3 { // Obtained from libsqlite
+  open: boolean;
+  filename: string;
+  mode: number;
+
+  close(...params);
+  configure(...params);
+  run(...params);
+  get(...params);
+  all(...params);
+  each(...params);
+  exec(...params);
+  prepare(...params);
+  on(...params);
+  removeAllListeners(...params);
+  wait(...params);
+}
+
+export class ErrorSqlite3 extends Error {
+  errno: number;
+  code: string;
+  constructor(errno, code, msg) {
+    super(`${code}: ${msg}`);
+    this.errno = errno;
+    this.code = code;
+  }
+}
+
+export class DatabaseManager {
+  private m_clients: Map<Socket, DatabaseClient>;
+  constructor() {
+    this.m_clients = new Map<Socket, DatabaseClient>();
+  }
+
+  open(ctx: Context, filename: string, dbId: number, mode: number = undefined): Promise<DatabaseInfo> {
+    let self = this;
+
+    let executor = function (resolve, reject) {
+      let client = self.getClient(ctx.response.socket);
+      let dbInfo = client.databaseInfo(dbId);
+      if (mode === undefined && dbInfo) {
+        resolve(dbInfo);
+        return;
+      }
+
+      if (dbId >= 0) {
+        let err = new ErrorSqlite3(sqlite3.MISUSE, 'SQLITE_MISUSE', 'Database is closed');
+        reject(new SQLiteError(err, dbInfo));
+        return;
+      }
+
+      client
+        .createDatabaseInfo(filename, mode)
+        .then((dbInfo) => resolve(dbInfo))
+        .catch((err) => reject(err));
+    };
+
+    return new Promise<DatabaseInfo>(executor);
+  }
+
+  verbose(): void {
+    sqlite3.verbose();
+  }
+
+  getClient(socket: Socket): DatabaseClient {
+    if (!this.m_clients.has(socket)) {
+      let self = this;
+      this.m_clients.set(socket, new DatabaseClient());
+
+      socket.onClose(() => {
+        self.m_clients.get(socket).destroy();
+        self.m_clients.delete(socket);
+      });
+    }
+    return this.m_clients.get(socket);
+  }
+
+  databaseInfo(ctx: Context, dbId: number): DatabaseInfo {
+    let dbInfo = this.getClient(ctx.response.socket).databaseInfo(dbId);
+    if (!dbInfo) {
+      // A DB has been closed, but there is a request to access to
+      // this closed DB. SQLite3 returns an error for this invalid use case.
+      // But, since we remove the DB instance from the server when
+      // a DB is closed, we cannot get the error message from the DB.
+      // We imitate the error message by sending the same error
+      // message to the client.
+      let err = new ErrorSqlite3(sqlite3.MISUSE, 'SQLITE_MISUSE', 'Database is closed');
+      throw new SQLiteError(err);
+    }
+    return dbInfo;
+  }
+
+  deleteDatabaseInfo(ctx: Context, dbId: number): void {
+    this.getClient(ctx.response.socket).deleteDatabaseInfo(dbId);
+  }
+}
+
+class DatabaseClient {
+  private m_dbInfos: Map<number, DatabaseInfo>;
+
+  constructor() {
+    this.m_dbInfos = new Map<number, DatabaseInfo>();
+  }
+
+  createDatabaseInfo(filename: string, mode: number): Promise<DatabaseInfo> {
+    let self = this;
+    return new Promise<DatabaseInfo>((resolve, reject) => {
+      let db = new sqlite3.Database(filename, mode, function (err) {
+        // err != null, if an error occurred.
+        if (err) {
+          reject(err);
+          return;
+        }
+      });
+
+      let dbInfo = new DatabaseInfo(db);
+      dbInfo.assignId();
+      self.m_dbInfos.set(dbInfo.id(), dbInfo);
+      resolve(dbInfo);
+    });
+  }
+
+  databaseInfo(dbId: number): DatabaseInfo {
+    return this.m_dbInfos.get(dbId);
+  }
+
+  deleteDatabaseInfo(dbInfoId: number): void {
+    this.m_dbInfos.get(dbInfoId).destroy();
+    this.m_dbInfos.delete(dbInfoId);
+  }
+
+  destroy(): void {
+    this.m_dbInfos.forEach((value, key) => {
+      value.destroy();
+    });
+    this.m_dbInfos.clear();
+  }
+}
+
+export class DatabaseInfo {
+  private m_id: number;
+  private m_db: DatabaseSqlite3;
+  private m_stmtInfos: Map<number, StatementInfo>;
+  private m_nextStmtId: number;
+  m_eventListenerCounters: { [key: string]: number };
+
+  constructor(db: DatabaseSqlite3 = null) {
+    this.m_id = -1;
+    this.m_db = db;
+    this.m_stmtInfos = new Map<number, StatementInfo>();
+    this.m_nextStmtId = -1;
+    this.m_eventListenerCounters = { trace: 0, profile: 0 }; // listener counters
+  }
+
+  type() {
+    return this.constructor.name;
+  }
+
+  db() {
+    return this.m_db;
+  }
+
+  id() {
+    return this.m_id;
+  }
+
+  assignId() {
+    g_nextDbId++;
+    this.m_id = g_nextDbId;
+  }
+
+  genStmtId() {
+    this.m_nextStmtId++;
+    return this.m_nextStmtId;
+  }
+
+  addStmtInfo(stmtInfo: StatementInfo) {
+    this.m_stmtInfos.set(stmtInfo.id(), stmtInfo);
+  }
+
+  getStmtInfo(stmtInfoId: number): StatementInfo {
+    return this.m_stmtInfos.get(stmtInfoId);
+  }
+
+  removeStmtInfo(stmtInfoId: number) {
+    this.m_stmtInfos.delete(stmtInfoId);
+  }
+
+  destroy() {
+    this.closeDb();
+    delete this.m_db;
+  }
+
+  closeDb() {
+    // Try to close the DB, if it is still open, before deleting this DatabaseInfo
+    this.m_stmtInfos.forEach((value, key) => {
+      value.closeStmt();
+    });
+    this.m_stmtInfos.clear();
+
+    this.m_db.close((err) => {
+      if (err) {
+        // DB has already been closed.
+      }
+    });
+  }
+}
+
+export interface EncodedArrayBuffer {
+  arrayBuffer: string;
+}
+
+export type Param = string | number | Buffer | EncodedArrayBuffer;
+
+interface UserDataDatabase {
+  filename: string;
+  id: number;
+  params: Param[];
+}
+
+class DatabaseUtils {
+  static parseUserData(paramsArray: Param[]): UserDataDatabase {
+    if (!(isString(paramsArray[0]) && isNumber(paramsArray[1]))) {
+      throw new SQLiteError('Error: Invalid data received from client');
+    }
+
+    let data: UserDataDatabase = {
+      filename: paramsArray[0] as string,
+      id: paramsArray[1] as number,
+      params: paramsArray.slice(2),
+    };
+
+    restoreBufferFromArrayBufferInString(data.params);
+
+    return data;
+  }
+
+  static printLog(str) {
+    debug.database(str);
+  }
+}
+
+export const dbManager = new DatabaseManager();
+exports.DatabaseUtils = DatabaseUtils;
+
+exports.ws = (function () {
+  return {
+    ping(ctx: Context, param: Param[]) {
+      DatabaseUtils.printLog(`ping: ${param}`);
+      ctx.response.write(`pong: ${param}`);
+    },
+
+    verbose(ctx: Context) {
+      dbManager.verbose();
+      ctx.response.write(
+        new DatabasePacket(new DatabaseInfo()),
+      );
+    },
+
+    async versionNumber(ctx: Context, params: Param[]) {
+      try {
+        let ver: number = sqlite3.VERSION_NUMBER;
+        ctx.response.write(new DatabasePacket(new DatabaseInfo(), ver));
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async on(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+        const schema = Joi.array()
+          .length(1)
+          .items(Joi.string().allow('trace', 'profile').required());
+        const result = schema.validate(data.params);
+
+        if (result.error) {
+          throw new SQLiteError(result.error, new DatabaseInfo());
+        }
+
+        let event = data.params[0] as string;
+        let dbInfo = dbManager.databaseInfo(ctx, data.id);
+        let db = dbInfo.db();
+
+        if (dbInfo.m_eventListenerCounters[event] == 0) {
+          if (event == 'trace') {
+            db.on(event, function (query) {
+              let data = { event, query };
+              ctx.response.write(new DatabasePacket(dbInfo, data));
+            });
+          } else if (event == 'profile') {
+            db.on(event, function (query, time) {
+              let data = { event, query, time };
+              ctx.response.write(new DatabasePacket(dbInfo, data));
+            });
+          }
+        }
+
+        dbInfo.m_eventListenerCounters[event]++;
+        ctx.response.write(new DatabasePacket(dbInfo));
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    removeListener(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+        const schema = Joi.array()
+          .length(1)
+          .items(Joi.string().allow('trace', 'profile').required());
+        const result = schema.validate(data.params);
+
+        if (result.error) {
+          throw new SQLiteError(result.error, new DatabaseInfo());
+        }
+
+        let event = data.params[0] as string;
+        let dbInfo = dbManager.databaseInfo(ctx, data.id);
+        let db = dbInfo.db();
+
+        dbInfo.m_eventListenerCounters[event]--;
+        if (dbInfo.m_eventListenerCounters[event] == 0) {
+          db.removeAllListeners(event);
+        }
+
+        ctx.response.write(new DatabasePacket(dbInfo));
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    removeAllListeners(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+        const schema = Joi.array()
+          .length(1)
+          .items(Joi.string().allow('trace', 'profile').required());
+        const result = schema.validate(data.params);
+
+        if (result.error) {
+          throw new SQLiteError(result.error, new DatabaseInfo());
+        }
+
+        let event = data.params[0] as string;
+        let dbInfo = dbManager.databaseInfo(ctx, data.id);
+        let db = dbInfo.db();
+        db.removeAllListeners(event);
+        dbInfo.m_eventListenerCounters[event] = 0;
+        ctx.response.write(new DatabasePacket(dbInfo));
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async configure(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+        const schema = Joi.array()
+          .length(2)
+          .items(
+            Joi.string().allow('busyTimeout').required(),
+            Joi.number().required(),
+          );
+        const result = schema.validate(data.params);
+
+        if (result.error) {
+          throw new SQLiteError(result.error, new DatabaseInfo());
+        }
+
+        let [option, value] = data.params;
+
+        let dbInfo = dbManager.databaseInfo(ctx, data.id);
+        let db = dbInfo.db();
+
+        if (option == 'busyTimeout') {
+          db.configure(option, value);
+          ctx.response.write(new DatabasePacket(dbInfo));
+        }
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    open(ctx: Context, params: Param[]): Promise<void> {
+      let data;
+      try {
+        data = DatabaseUtils.parseUserData(params);
+      } catch (err) {
+        ctx.response.error(err);
+        return new Promise((resolve, reject) => { reject(); });
+      }
+
+      const schema = Joi.array().length(1).items(Joi.number().required());
+      const result = schema.validate(data.params);
+
+      if (result.error) {
+        ctx.response.error(
+          new SQLiteError(result.error, new DatabaseInfo(data.filename)),
+        );
+        return new Promise((resolve, reject) => { reject(); });
+      }
+
+      let [mode] = data.params;
+
+      return dbManager
+        .open(ctx, data.filename, data.id, mode)
+        .then((dbInfo) => {
+          ctx.response.write(new DatabasePacket(dbInfo));
+        })
+        .catch((err) => {
+          if (!SQLiteError.isError(err)) {
+            throw err;
+          }
+          ctx.response.error(
+            new SQLiteError(err, new DatabaseInfo(data.filename)),
+          );
+        });
+    },
+
+    async close(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+
+        await new Promise((resolve, reject) => {
+          let dbInfo = dbManager.databaseInfo(ctx, data.id);
+          let db = dbInfo.db();
+          db.close((err) => {
+            if (err) {
+              reject(new SQLiteError(err, dbInfo));
+              return;
+            }
+
+            ctx.response.write(new DatabasePacket(dbInfo));
+            dbManager.deleteDatabaseInfo(ctx, data.id);
+            resolve(undefined);
+          });
+        });
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async wait(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+        let dbInfo = dbManager.databaseInfo(ctx, data.id);
+        let packet = await new Promise((resolve, reject) => {
+          dbInfo.db().wait(function (err) {
+            err
+              ? reject(new SQLiteError(err, dbInfo))
+              : resolve(new DatabasePacket(dbInfo));
+          });
+        });
+
+        ctx.response.write(packet);
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async run(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+
+        await new Promise((resolve, reject) => {
+          let dbInfo = dbManager.databaseInfo(ctx, data.id);
+          let db = dbInfo.db();
+          db.run(...data.params, function (err) {
+            if (err) {
+              reject(new SQLiteError(err, dbInfo));
+              return;
+            }
+
+            // debug.database(
+            //   `${ctx.request.payload.method} >> ${data.params} >> lastID: ${this.lastID} changes: ${this.changes}`,
+            // );
+
+            // statement id is null, as this statment is a tmp statement,
+            // we do not need to make an instance and keep track of it.
+            let stmtInfo = new StatementInfo(dbInfo.id(), null, this);
+            ctx.response.write(new StatementPacket(stmtInfo));
+            resolve(undefined);
+          });
+        });
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async get(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+
+        await new Promise((resolve, reject) => {
+          let dbInfo = dbManager.databaseInfo(ctx, data.id);
+          let db = dbInfo.db();
+          db.get(...data.params, function (err, rows) {
+            if (err) {
+              reject(new SQLiteError(err, dbInfo));
+              return;
+            }
+
+            if (rows == undefined) {
+              rows = {};
+            }
+
+            ctx.response.write(new DatabasePacket(dbInfo, rows));
+            resolve(undefined);
+          });
+        }).catch((err) => {
+          throw err;
+        });
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async all(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+
+        await new Promise((resolve, reject) => {
+          let dbInfo = dbManager.databaseInfo(ctx, data.id);
+          let db = dbInfo.db();
+          db.all(...data.params, function (err, rows) {
+            if (err) {
+              reject(new SQLiteError(err, dbInfo));
+              return;
+            }
+
+            ctx.response.write(new DatabasePacket(dbInfo, rows));
+            resolve(undefined);
+          });
+        });
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async each(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+
+        await new Promise((resolve, reject) => {
+          let dbInfo = dbManager.databaseInfo(ctx, data.id);
+          let db = dbInfo.db();
+          db.each(
+            ...data.params,
+            function (err, row) {
+              if (err) {
+                reject(new SQLiteError(err, dbInfo));
+                return;
+              }
+
+              ctx.response.write(
+                new DatabasePacket(dbInfo, row, true),
+              );
+            },
+            function (err, rowCount) {
+              if (err) {
+                reject(new SQLiteError(err, dbInfo));
+                return;
+              }
+
+              ctx.response.write(new DatabasePacket(dbInfo, rowCount));
+              resolve(undefined);
+            },
+          );
+        });
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async exec(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+
+        await new Promise((resolve, reject) => {
+          let dbInfo = dbManager.databaseInfo(ctx, data.id);
+          let db = dbInfo.db();
+          db.exec(...data.params, function (err) {
+            if (err) {
+              reject(new SQLiteError(err, dbInfo));
+              return;
+            }
+
+            ctx.response.write(new DatabasePacket(dbInfo));
+            resolve(undefined);
+          });
+        });
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+
+    async prepare(ctx: Context, params: Param[]) {
+      try {
+        let data = DatabaseUtils.parseUserData(params);
+
+        await new Promise((resolve, reject) => {
+          let dbInfo = dbManager.databaseInfo(ctx, data.id);
+          let db = dbInfo.db();
+          db.prepare(...data.params, function (err) {
+            let stmt = this;
+            let stmtId = dbInfo.genStmtId();
+            if (stmtId < 0) {
+              reject(new SQLiteError('Too many statements'));
+              return;
+            }
+
+            if (err) {
+              reject(new SQLiteError(err, new StatementInfo(dbInfo.id(), stmtId, null)));
+              return;
+            }
+
+            let stmtInfo = new StatementInfo(dbInfo.id(), stmtId, stmt);
+            dbInfo.addStmtInfo(stmtInfo);
+            ctx.response.write(new StatementPacket(stmtInfo));
+            resolve(undefined);
+          });
+        });
+      } catch (err) {
+        if (!SQLiteError.isError(err)) {
+          throw err;
+        }
+        ctx.response.error(err);
+      }
+    },
+  };
+})();
diff --git a/lwnode/apps/sqlite3/src/backend/lib/sqlite3/error.ts b/lwnode/apps/sqlite3/src/backend/lib/sqlite3/error.ts
new file mode 100644 (file)
index 0000000..8f5deb6
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+import { JSONRPCError } from '../rpcerror';
+import type { DatabaseInfo, ErrorSqlite3 } from './database';
+import type { StatementInfo } from './statement';
+import { Response } from '../response';
+
+export class SQLiteError extends JSONRPCError {
+  code: number;
+  type: string;
+  method: string;
+  filename: string;
+  data: {
+    m_dbInfo?;
+    m_stmtInfo?;
+    m_data;
+  }
+
+  // e: Error | string
+  constructor(e: Error | string, info?: DatabaseInfo | StatementInfo, data?) {
+    super(e);
+
+    this.type = this.constructor.name;
+    this.method = Response.option.AutoFill;
+
+    // FIXME: Is e a sqlite error object?
+    if (e instanceof Error) {
+      // @ts-ignore
+      this.code = e.code;
+      // @ts-ignore
+      this.errno = e.errno;
+    }
+
+    if (info) {
+      let type = info.type();
+      this.data = {
+        m_dbInfo: type === 'DatabaseInfo' ? info : undefined,
+        m_stmtInfo: type === 'StatementInfo' ? info : undefined,
+        m_data: data,
+      };
+    }
+  }
+
+  static isError(e) {
+    return (e.code && e.errno) || e instanceof SQLiteError;
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/backend/lib/sqlite3/index.js b/lwnode/apps/sqlite3/src/backend/lib/sqlite3/index.js
new file mode 100644 (file)
index 0000000..2e46905
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+exports.database = require('./database');
+exports.statement = require('./statement');
diff --git a/lwnode/apps/sqlite3/src/backend/lib/sqlite3/packet.ts b/lwnode/apps/sqlite3/src/backend/lib/sqlite3/packet.ts
new file mode 100644 (file)
index 0000000..0463d5d
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+const debug = require('debug')('packet');
+import type { DatabaseInfo } from './database';
+import { StatementSqlite3, StatementInfo } from './statement';
+import { Response } from '../response';
+import { ab2str, isObject, serializeBufferToArrayBuffer } from '../utils';
+
+export class SQLPacket {
+  method;
+  hasMoreData?: boolean;
+
+  constructor(hasMoreData: boolean = undefined) {
+    this.method = Response.option.AutoFill;
+    this.hasMoreData = hasMoreData;
+  }
+
+  data() {
+    return this.data;
+  }
+}
+
+export class DatabasePacket extends SQLPacket {
+  constructor(dbInfo: DatabaseInfo, data = undefined, hasMoreData: boolean = false) {
+    super(hasMoreData);
+
+    debug(
+      `${this.constructor.name}, ${dbInfo}, ${data}, ${hasMoreData}`,
+    );
+
+    // data is a return value for a db operation.
+    // It can be of any type.
+    if (Array.isArray(data)) {
+      for (let i in data) {
+        serializeBufferToArrayBuffer(data[i]);
+      }
+    } else {
+      serializeBufferToArrayBuffer(data);
+    }
+
+    this.data = {
+      // @ts-ignore
+      m_dbInfo: dbInfo,
+      m_data: data ? data : null,
+    };
+  }
+}
+
+export class StatementPacket extends SQLPacket {
+  constructor(stmtInfo: StatementInfo, data = undefined, hasMoreData: boolean = false) {
+    super(hasMoreData);
+
+    debug(
+      `${this.constructor.name}, ${stmtInfo}, ${data}, ${hasMoreData}`,
+    );
+
+    if (Array.isArray(data)) {
+      for (let i in data) {
+        serializeBufferToArrayBuffer(data[i]);
+      }
+    } else {
+      serializeBufferToArrayBuffer(data);
+    }
+
+    let packetedStmtInfo = stmtInfo;
+
+    // Because attribute of the stmt is enumerable, copy to remove this attribute.
+    if (stmtInfo.stmt()) {
+      packetedStmtInfo = new StatementInfo(stmtInfo.dbId(), stmtInfo.id(), null);
+      let stmt: StatementSqlite3;
+      stmt = { sql: stmtInfo.stmt().sql, lastID: stmtInfo.stmt().lastID, 
+        changes: stmtInfo.stmt().changes };
+      packetedStmtInfo.setStmt(stmt);
+    }
+
+    this.data = {
+      // @ts-ignore
+      m_stmtInfo: packetedStmtInfo,
+      m_data: data ? data : null,
+    };
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/backend/lib/sqlite3/statement.ts b/lwnode/apps/sqlite3/src/backend/lib/sqlite3/statement.ts
new file mode 100644 (file)
index 0000000..354b395
--- /dev/null
@@ -0,0 +1,341 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+import type { DatabaseInfo } from "./database";
+import { dbManager } from "./database";
+import type { Context } from '../rpc';
+
+import { log } from '../log';
+import { SQLiteError } from './error';
+import { StatementPacket } from './packet';
+import { isNumber, restoreBufferFromArrayBufferInString } from "../utils";
+
+export interface StatementSqlite3 { // Obtained from libsqlite
+  sql: string;
+  lastID?: number;
+  changes?: number;
+
+  bind?(...params);
+  reset?(...params);
+  finalize?(...params);
+  run?(...params);
+  get?(...params);
+  all?(...params);
+  each?(...params);
+}
+
+export class StatementInfo {
+  private m_dbId: number;           // DB ID
+  private m_id: number;             // Statement ID
+  private m_stmt: StatementSqlite3;
+
+  constructor(dbId: number, id: number, stmt: StatementSqlite3) {
+    this.m_dbId = dbId;
+    this.m_id = id;
+    this.m_stmt = stmt;
+  }
+
+  dbId() {
+    return this.m_dbId;
+  }
+
+  id() {
+    return this.m_id;
+  }
+
+  stmt() {
+    return this.m_stmt;
+  }
+
+  setStmt(stmt: StatementSqlite3) {
+    this.m_stmt = stmt;
+  }
+
+  type() {
+    return this.constructor.name;
+  }
+
+  closeStmt() {
+    if (this.m_stmt) {
+      this.m_stmt.finalize();
+      this.m_stmt = null;
+    }
+  }
+}
+
+interface UserDataStatement {
+  dbId: number; // Our own Database Id for a sqlite3.Database instance
+  stmtInfo: {   // StatementInfo received from client in object format
+    m_dbId: number;
+    m_id: number;
+    m_stmt;     // In simple object format
+  };
+  params: any[];
+}
+
+class StatementUtils {
+  static parseUserData(paramsArray: any[]): UserDataStatement {
+    if (!isNumber(paramsArray[0])) {
+      throw new SQLiteError('Error: Invalid data received from client');
+    }
+
+    let data: UserDataStatement = {
+      dbId: paramsArray[0],
+      stmtInfo: paramsArray[1],
+      params: paramsArray.slice(2),
+    };
+
+    restoreBufferFromArrayBufferInString(data.params);
+
+    return data;
+  }
+
+  static printLog(str) {
+    log.info(str);
+  }
+}
+
+exports.ws = (function () {
+  return {
+    async bind(ctx: Context, params) {
+      try {
+        let data = StatementUtils.parseUserData(params);
+        let dbInfo = await dbManager.open(ctx, null, data.dbId);
+        let stmtInfoReceived = data.stmtInfo;
+        let stmtId = stmtInfoReceived.m_id;
+        let stmtInfo: StatementInfo = dbInfo.getStmtInfo(stmtId);
+
+        if (!stmtInfo) {
+          throw new SQLiteError('Error: No valid statement', stmtInfo);
+        }
+
+        let stmt = stmtInfo.stmt();
+        await new Promise((resolve, reject) => {
+          stmt.bind(...data.params, (err) => {
+            if (err) {
+              reject(new SQLiteError(err, stmtInfo));
+              return;
+            }
+            ctx.response.write(new StatementPacket(stmtInfo));
+            resolve(undefined);
+          });
+        });
+      } catch (error) {
+        if (!SQLiteError.isError(error)) {
+          throw error;
+        }
+        ctx.response.error(error);
+      }
+    },
+
+    async reset(ctx: Context, params) {
+      try {
+        let data = StatementUtils.parseUserData(params);
+        let dbInfo = await dbManager.open(ctx, null, data.dbId);
+        let stmtInfoReceived = data.stmtInfo;
+        let stmtId = stmtInfoReceived.m_id;
+        let stmtInfo = dbInfo.getStmtInfo(stmtId);
+
+        if (!stmtInfo) {
+          throw new SQLiteError('Error: No valid statement', stmtInfo);
+        }
+
+        let stmt = stmtInfo.stmt();
+        await new Promise((resolve, reject) => {
+          stmt.reset((err) => {
+            // Always succeed
+            ctx.response.write(new StatementPacket(stmtInfo));
+            resolve(undefined);
+          });
+        });
+      } catch (error) {
+        if (!SQLiteError.isError(error)) {
+          throw error;
+        }
+        ctx.response.error(error);
+      }
+    },
+
+    async finalize(ctx: Context, params) {
+      try {
+        let data = StatementUtils.parseUserData(params);
+        let dbInfo = await dbManager.open(ctx, null, data.dbId);
+        let stmtInfoReceived = data.stmtInfo;
+        let stmtId = stmtInfoReceived.m_id;
+        let stmtInfo = dbInfo.getStmtInfo(stmtId);
+
+        if (!stmtInfo) {
+          throw new SQLiteError('Error: No valid statement', stmtInfo);
+        }
+
+        let stmt = stmtInfo.stmt();
+        await new Promise((resolve, reject) => {
+          stmt.finalize((err) => {
+            if (err) {
+              reject(new SQLiteError(err, stmtInfo));
+              return;
+            }
+            dbInfo.removeStmtInfo(stmtId);
+            ctx.response.write(new StatementPacket(stmtInfo));
+            resolve(undefined);
+          });
+        });
+      } catch (error) {
+        if (!SQLiteError.isError(error)) {
+          throw error;
+        }
+        ctx.response.error(error);
+      }
+    },
+
+    async run(ctx: Context, params) {
+      try {
+        let data = StatementUtils.parseUserData(params);
+        let dbInfo = await dbManager.open(ctx, null, data.dbId);
+        let stmtInfoReceived = data.stmtInfo;
+        let stmtId = stmtInfoReceived.m_id;
+        let stmtInfo = dbInfo.getStmtInfo(stmtId);
+
+        if (!stmtInfo) {
+          throw new SQLiteError('Error: No valid statement', stmtInfo);
+        }
+
+        let stmt = stmtInfo.stmt();
+
+        await new Promise((resolve, reject) => {
+          stmt.run(...data.params, (err) => {
+            if (err) {
+              reject(new SQLiteError(err, stmtInfo));
+              return;
+            }
+            ctx.response.write(new StatementPacket(stmtInfo));
+            resolve(undefined);
+          });
+        });
+
+      } catch (error) {
+        if (!SQLiteError.isError(error)) {
+          throw error;
+        }
+        ctx.response.error(error);
+      }
+    },
+
+    async get(ctx: Context, params) {
+      try {
+        let data = StatementUtils.parseUserData(params);
+        let dbInfo = await dbManager.open(ctx, null, data.dbId);
+        let stmtInfoReceived = data.stmtInfo;
+        let stmtId = stmtInfoReceived.m_id;
+        let stmtInfo = dbInfo.getStmtInfo(stmtId);
+
+        if (!stmtInfo) {
+          throw new SQLiteError('Error: No valid statement', stmtInfo);
+        }
+
+        let stmt = stmtInfo.stmt();
+        await new Promise((resolve, reject) => {
+          stmt.get(...data.params, (err, row) => {
+            if (err) {
+              reject(new SQLiteError(err, stmtInfo));
+              return;
+            }
+            ctx.response.write(new StatementPacket(stmtInfo, row));
+            resolve(undefined);
+          });
+        });
+      } catch (error) {
+        if (!SQLiteError.isError(error)) {
+          throw error;
+        }
+        ctx.response.error(error);
+      }
+    },
+
+    async all(ctx: Context, params) {
+      try {
+        let data = StatementUtils.parseUserData(params);
+        let dbInfo = await dbManager.open(ctx, null, data.dbId);
+        let stmtInfoReceived = data.stmtInfo;
+        let stmtId = stmtInfoReceived.m_id;
+        let stmtInfo = dbInfo.getStmtInfo(stmtId);
+
+        if (!stmtInfo) {
+          throw new SQLiteError('Error: No valid statement', stmtInfo);
+        }
+
+        let stmt = stmtInfo.stmt();
+
+        await new Promise((resolve, reject) => {
+          stmt.all(...data.params, (err, rows) => {
+            if (err) {
+              reject(new SQLiteError(err, stmtInfo));
+              return;
+            }
+
+            ctx.response.write(new StatementPacket(stmtInfo, rows));
+            resolve(undefined);
+          });
+        });
+      } catch (error) {
+        if (!SQLiteError.isError(error)) {
+          throw error;
+        }
+        ctx.response.error(error);
+      }
+    },
+
+    async each(ctx: Context, params) {
+      try {
+        let data = StatementUtils.parseUserData(params);
+        let dbInfo = await dbManager.open(ctx, null, data.dbId);
+        let stmtInfoReceived = data.stmtInfo;
+        let stmtId = stmtInfoReceived.m_id;
+        let stmtInfo = dbInfo.getStmtInfo(stmtId);
+
+        if (!stmtInfo) {
+          throw new SQLiteError('Error: No valid statement', stmtInfo);
+        }
+
+        let stmt = stmtInfo.stmt();
+        await new Promise((resolve, reject) => {
+          stmt.each(...data.params,
+            (err, row) => {
+              if (err) {
+                reject(new SQLiteError(err, stmtInfo));
+                return;
+              }
+              ctx.response.write(new StatementPacket(stmtInfo, row, true));
+            },
+            (err, rowCount) => {
+              if (err) {
+                reject(new SQLiteError(err, stmtInfo));
+                return;
+              }
+              ctx.response.write(new StatementPacket(stmtInfo, rowCount));
+              resolve(undefined);
+            }
+          );
+        });
+      } catch (error) {
+        if (!SQLiteError.isError(error)) {
+          throw error;
+        }
+        ctx.response.error(error);
+      }
+    },
+  }
+})();
diff --git a/lwnode/apps/sqlite3/src/backend/lib/token.ts b/lwnode/apps/sqlite3/src/backend/lib/token.ts
new file mode 100644 (file)
index 0000000..f6592a3
--- /dev/null
@@ -0,0 +1,33 @@
+import jwt, { JwtPayload, JsonWebTokenError } from 'jsonwebtoken';
+import config from '../config';
+
+const { privateKey: secret, signOptions } = config.auth;
+
+export function generateToken(
+  payload: string | Buffer | object,
+  subject: string,
+): Promise<string> {
+  return new Promise((resolve, reject) => {
+    jwt.sign(
+      payload,
+      secret,
+      {
+        subject,
+        ...signOptions,
+      },
+      (error, token) => {
+        if (error) reject(error);
+        resolve(token);
+      },
+    );
+  });
+}
+
+export function decodeToken(token: string): Promise<JwtPayload> {
+  return new Promise((resolve, reject) => {
+    jwt.verify(token, secret, (error, decoded) => {
+      if (error) reject(error);
+      resolve(decoded);
+    });
+  });
+}
diff --git a/lwnode/apps/sqlite3/src/backend/lib/utils.ts b/lwnode/apps/sqlite3/src/backend/lib/utils.ts
new file mode 100644 (file)
index 0000000..ec631b9
--- /dev/null
@@ -0,0 +1,272 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+const fs = require('fs');
+const Joi = require('joi');
+
+import { SQLiteError } from './sqlite3/error';
+import type { Param, EncodedArrayBuffer } from './sqlite3/database';
+
+export function isDebug() {
+  if (process.env.NODE_ENV === 'production') {
+    return false;
+  }
+  return process.env.DEBUG != undefined;
+}
+
+export function isLinux() {
+  if (process.arch === 'x64') {
+    return true;
+  }
+  return false;
+}
+
+export function isFunction(obj) {
+  return typeof obj === 'function';
+}
+
+export function isObject(value) {
+  return typeof value === 'object' && value !== null;
+}
+
+export function isError(e) {
+  return e && e.message && typeof e.message === 'string';
+}
+
+export function isNumber(num: any): boolean {
+  let schema = Joi.number().integer();
+  const result = schema.validate(num);
+  if (result.error) {
+    return false;
+  }
+  return true;
+}
+
+export function isString(str: any): boolean {
+  let schema = Joi.string();
+  const result = schema.validate(str);
+  if (result.error) {
+    return false;
+  }
+  return true;
+}
+
+export function isValidationError(error) {
+  // @ts-ignore
+  return error instanceof Error && error.isJoi == true;
+}
+
+export function getValidationErrorMessage(error) {
+  return error.message;
+}
+
+export function deleteFile(path) {
+  return new Promise((resolve, reject) => {
+    fs.access(path, fs.constants.F_OK, (err) => {
+      if (err) {
+        // doesn't exist already
+        resolve(false);
+        return;
+      }
+
+      fs.unlink(path, (err) => {
+        err ? reject(err) : resolve(true);
+      });
+    });
+  });
+}
+
+export function existFile(path) {
+  return new Promise((resolve, reject) => {
+    fs.stat(path, (err, stats) => {
+      if (err) {
+        // @ts-ignore
+        if (err.errno !== process.ENOENT &&
+          err.code !== 'ENOENT' &&
+          err.syscall !== 'unlink') {
+          reject(err);
+        } else {
+          resolve(false);
+        }
+      }
+      resolve(true);
+    });
+  });
+}
+
+export function sliceString(v, limit = 40, left = 10) {
+  let msg = '  ...sliced...  ';
+  if (typeof v === 'string' && v.length > limit + left + msg.length) {
+    return v.substring(0, limit) + msg + v.substring(v.length - left);
+  }
+  return v;
+}
+
+export function stringify(obj, indent = 2) {
+  if (!isDebug()) {
+    return '';
+  }
+
+  let result;
+
+  try {
+    // https://stackoverflow.com/questions/6937863/json-stringify-so-that-arrays-are-on-one-line
+    result = JSON.stringify(
+      obj,
+      (key, value) => {
+        // stringify Error including properties not-enumerable
+        if (value instanceof Error) {
+          let error = {};
+          Object.getOwnPropertyNames(value).forEach(function (key) {
+            error[key] = value[key];
+          });
+          return error;
+        }
+
+        // slice the given value if its length is too long.
+        value = sliceString(value);
+
+        // stringify Array items in a single line
+        if (
+          Array.isArray(value) &&
+          !value.some((x) => x && typeof x === 'object')
+        ) {
+          return `\uE000${JSON.stringify(
+            value.map((v) => {
+              v = sliceString(v);
+              return typeof v === 'string' ? v.replace(/"/g, '\uE001') : v;
+            }),
+          )}\uE000`;
+        }
+        return value;
+      },
+      indent,
+    ).replace(/"\uE000([^\uE000]+)\uE000"/g, (match) =>
+      match
+        .substr(2, match.length - 4)
+        .replace(/\\"/g, '"')
+        .replace(/\uE001/g, '\\"'),
+    );
+  } catch (error) {
+    console.error(error);
+  }
+  return result;
+}
+
+export function ab2str(buf: ArrayBuffer): string {
+  return String.fromCharCode.apply(null, new Uint16Array(buf));
+}
+
+export function str2ab(str: string): ArrayBuffer {
+  let buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
+  let bufView = new Uint16Array(buf);
+  for (let i = 0, strLen = str.length; i < strLen; i++) {
+    bufView[i] = str.charCodeAt(i);
+  }
+  return buf;
+}
+
+function arrayBufferToBase64(buffer: ArrayBuffer): string {
+  let binary = '';
+  let bytes = new Uint8Array(buffer);
+  let len = bytes.byteLength;
+  for (let i = 0; i < len; i++) {
+    binary += String.fromCharCode(bytes[i]);
+  }
+  return btoa(binary);
+}
+
+function base64ToArrayBuffer(base64: string): ArrayBuffer {
+  let binary_string = atob(base64);
+  let len = binary_string.length;
+  let bytes = new Uint8Array(len);
+  for (let i = 0; i < len; i++) {
+    bytes[i] = binary_string.charCodeAt(i);
+  }
+  return bytes.buffer;
+}
+
+function arrayBufferToBase64_16(buffer: ArrayBuffer): string {
+  let binary = String.fromCharCode.apply(null, new Uint16Array(buffer));
+  return btoa(binary);
+}
+
+function base64ToArrayBuffer_16(base64: string): ArrayBuffer {
+  let str = atob(base64);
+  let buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
+  let bufView = new Uint16Array(buf);
+  for (let i = 0, strLen = str.length; i < strLen; i++) {
+    bufView[i] = str.charCodeAt(i);
+  }
+  return buf;
+}
+
+function btoa(binaryString: string): string {
+  if (Buffer) {
+    return Buffer.from(binaryString, 'binary').toString('base64');
+  } else {
+    return window.btoa(binaryString); // browser environment
+  }
+}
+
+function atob(base64String: string): string {
+  if (Buffer) {
+    return Buffer.from(base64String, 'base64').toString('binary');
+  } else {
+    return window.atob(base64String); // browser environment
+  }
+}
+
+export function restoreBufferFromArrayBufferInString(params: Param[]): void {
+  for (let i = 0; i < params.length; i++) {
+    let param = params[i];
+
+    if (param && param.hasOwnProperty('arrayBuffer')) {
+      try {
+        let arrayBuffer = base64ToArrayBuffer((param as EncodedArrayBuffer).arrayBuffer);
+        let nodeBuffer = Buffer.from(arrayBuffer);
+        params[i] = nodeBuffer;
+      } catch (err) {
+        throw new SQLiteError('Error: Invalid ArrayBuffer received from client');
+      }
+    }
+  }
+}
+
+export function serializeBufferToArrayBuffer(obj: any): void {
+  for (let k in obj) {
+    let val = obj[k];
+    if (val && Buffer.isBuffer(val)) {
+      let arrayBuffer = nodeBufferToArrayBuffer(val);
+      let abObject = {
+        arrayBuffer: arrayBufferToBase64(arrayBuffer),
+      };
+      obj[k] = abObject;
+    }
+  }
+}
+
+export function nodeBufferToArrayBuffer(nodeBuffer: Buffer): ArrayBuffer {
+  let arrayBuffer = Uint8Array.from(nodeBuffer).buffer;
+  return arrayBuffer;
+}
+
+export function deepFreeze(obj) {
+  Object.keys(obj).forEach((prop) => {
+    if (typeof obj[prop] === 'object') deepFreeze(obj[prop]);
+  });
+  return Object.freeze(obj);
+};
diff --git a/lwnode/apps/sqlite3/src/backend/lib/variables.js b/lwnode/apps/sqlite3/src/backend/lib/variables.js
new file mode 100644 (file)
index 0000000..4ed9cf8
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+exports.port = process.env.DB_PORT || 8140;
+
+const currentWorkingPath = process.cwd();
+
+exports.paths = {
+  current: currentWorkingPath,
+  download: `${currentWorkingPath}/download`,
+  store: process.env.DB_STORE || '/tmp'
+};
diff --git a/lwnode/apps/sqlite3/src/backend/tsconfig.json b/lwnode/apps/sqlite3/src/backend/tsconfig.json
new file mode 100644 (file)
index 0000000..f520d33
--- /dev/null
@@ -0,0 +1,71 @@
+{
+  "compilerOptions": {
+    /* Visit https://aka.ms/tsconfig.json to read more about this file */
+
+    /* Basic Options */
+    "incremental": false,                   /* Enable incremental compilation */
+
+    "target": "es2015",                       /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
+    "module": "commonjs",                     /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
+    // "lib": [],                             /* Specify library files to be included in the compilation. */
+    "allowJs": true,                          /* Allow javascript files to be compiled. */
+    // "checkJs": true,                       /* Report errors in .js files. */
+    // "jsx": "preserve",                     /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
+    "declaration": true,                      /* Generates corresponding '.d.ts' file. */
+    // "declarationMap": true,                /* Generates a sourcemap for each corresponding '.d.ts' file. */
+    // "sourceMap": true,                     /* Generates corresponding '.map' file. */
+    // "outFile": "./",                       /* Concatenate and emit output to single file. */
+    "outDir": "../../out/backend",        /* Redirect output structure to the directory. */
+    // "rootDir": "./",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
+    // "composite": true,                     /* Enable project compilation */
+    // "tsBuildInfoFile": "./",               /* Specify file to store incremental compilation information */
+    // "removeComments": true,                /* Do not emit comments to output. */
+    // "noEmit": true,                        /* Do not emit outputs. */
+    // "importHelpers": true,                 /* Import emit helpers from 'tslib'. */
+    // "downlevelIteration": true,            /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
+    // "isolatedModules": true,               /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
+
+    /* Strict Type-Checking Options */
+    "strict": false,                           /* Enable all strict type-checking options. */
+    // "noImplicitAny": true,                 /* Raise error on expressions and declarations with an implied 'any' type. */
+    // "strictNullChecks": true,              /* Enable strict null checks. */
+    // "strictFunctionTypes": true,           /* Enable strict checking of function types. */
+    // "strictBindCallApply": true,           /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
+    // "strictPropertyInitialization": true,  /* Enable strict checking of property initialization in classes. */
+    // "noImplicitThis": true,                /* Raise error on 'this' expressions with an implied 'any' type. */
+    // "alwaysStrict": true,                  /* Parse in strict mode and emit "use strict" for each source file. */
+    "noImplicitUseStrict": true,
+    /* Additional Checks */
+    // "noUnusedLocals": true,                /* Report errors on unused locals. */
+    // "noUnusedParameters": true,            /* Report errors on unused parameters. */
+    // "noImplicitReturns": true,             /* Report error when not all code paths in function return a value. */
+    // "noFallthroughCasesInSwitch": true,    /* Report errors for fallthrough cases in switch statement. */
+    // "noUncheckedIndexedAccess": true,      /* Include 'undefined' in index signature results */
+
+    /* Module Resolution Options */
+    // "moduleResolution": "node",            /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
+    // "baseUrl": "./",                       /* Base directory to resolve non-absolute module names. */
+    // "paths": {},                           /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
+    // "rootDirs": [],                        /* List of root folders whose combined content represents the structure of the project at runtime. */
+    // "typeRoots": [],                       /* List of folders to include type definitions from. */
+    // "types": [],                           /* Type declaration files to be included in compilation. */
+    // "allowSyntheticDefaultImports": true,  /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
+    "esModuleInterop": true,                  /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
+    // "preserveSymlinks": true,              /* Do not resolve the real path of symlinks. */
+    // "allowUmdGlobalAccess": true,          /* Allow accessing UMD globals from modules. */
+
+    /* Source Map Options */
+    // "sourceRoot": "",                      /* Specify the location where debugger should locate TypeScript files instead of source locations. */
+    // "mapRoot": "",                         /* Specify the location where debugger should locate map files instead of generated locations. */
+    // "inlineSourceMap": true,               /* Emit a single file with source maps instead of having a separate file. */
+    // "inlineSources": true,                 /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
+
+    /* Experimental Options */
+    // "experimentalDecorators": true,        /* Enables experimental support for ES7 decorators. */
+    // "emitDecoratorMetadata": true,         /* Enables experimental support for emitting type metadata for decorators. */
+
+    /* Advanced Options */
+    "skipLibCheck": true,                     /* Skip type checking of declaration files. */
+    "forceConsistentCasingInFileNames": true  /* Disallow inconsistently-cased references to the same file. */
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/frontend/.eslintrc.js b/lwnode/apps/sqlite3/src/frontend/.eslintrc.js
new file mode 100644 (file)
index 0000000..a058e65
--- /dev/null
@@ -0,0 +1,13 @@
+module.exports = {
+  env: {
+    browser: false,
+    commonjs: true,
+    node: true,
+  },
+  extends: ['airbnb-base', 'plugin:prettier/recommended'],
+  ignorePatterns: ['node_modules/'],
+  rules: {
+    'global-require': 0,
+    'no-console': 0,
+  },
+};
diff --git a/lwnode/apps/sqlite3/src/frontend/.gitignore b/lwnode/apps/sqlite3/src/frontend/.gitignore
new file mode 100644 (file)
index 0000000..26ba77d
--- /dev/null
@@ -0,0 +1,9 @@
+.vscode
+.buildResult
+node_modules
+
+.cache
+*.wgt
+dist
+out
+docs
diff --git a/lwnode/apps/sqlite3/src/frontend/jsdoc.json b/lwnode/apps/sqlite3/src/frontend/jsdoc.json
new file mode 100644 (file)
index 0000000..62179b9
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "tags": {
+    "allowUnknownTags": false
+  },
+  "source": {
+    "include": "./out",
+    "includePattern": "\\.js$",
+    "excludePattern": "(node_modules/|docs)"
+  },
+  "opts": {
+    "template": "node_modules/docdash",
+    "encoding": "utf8",
+    "destination": "docs/",
+    "recurse": true,
+    "verbose": true
+  },
+  "templates": {
+    "default": {
+      "cleverLinks": false,
+      "monospaceLinks": false,
+      "outputSourceFiles": false,
+      "outputSourcePath": false
+    }
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/frontend/lib/database.ts b/lwnode/apps/sqlite3/src/frontend/lib/database.ts
new file mode 100644 (file)
index 0000000..e3b3f23
--- /dev/null
@@ -0,0 +1,561 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+import { Statement, StatementInfo } from './statement'; // StatementInfo
+import { resolve } from 'path';
+import { Socket, Param, OperationMessage, events } from './socket';
+import { constant } from './variables';
+
+import {
+  printLog,
+  printError,
+  splitParameter,
+  serializeParameters,
+  SQLError,
+  SQLite3Error,
+} from './utils';
+
+interface DatabaseSqlite3 { // FIXME: From backend. Share with backend
+  open: boolean;
+  filename: string;
+  mode: number;
+
+  close(...params);
+  configure(...params);
+  run(...params);
+  get(...params);
+  all(...params);
+  each(...params);
+  exec(...params);
+  prepare(...params);
+  on(...params);
+  removeAllListeners(...params);
+  wait(...params);
+}
+
+export interface DatabaseInfo { // From backend. Share with backend
+  m_id: number;
+  m_db: DatabaseSqlite3;
+  m_stmtInfos: Map<number, StatementInfo>;
+  m_nextStmtId: number;
+}
+
+export type UserEventCallback = (...params) => {};
+
+/**
+ * This class represents Database.
+ *
+ * @access public
+ * @alias sqlite3.Database
+ */
+export class Database {
+  private m_socket: Socket;
+  private m_id: number;
+  private m_dbInfo: DatabaseInfo;
+  private m_filename: string;
+
+  /**
+   * Returns a new Database object and automatically opens the database.
+   * There is no separate method to open the database.
+   * @access public
+   * @hideconstructor
+   * @param {string} filename - Valid values are filenames, and
+   *  ":memory:" for an anonymous in-memory database
+   * @param {int} [mode] - One or more of sqlite3.OPEN_READONLY,
+   *   sqlite3.OPEN_READWRITE and sqlite3.OPEN_CREATE. The default
+   *   value is OPEN_READWRITE | OPEN_CREATE.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<Database>} - A promise containing a database object.
+   * @example
+   *  // 1. Setup the global sqlite3 object with URL once
+   *  let url = 'ws://127.0.0.1:8140/' // where sqlite3 is running
+   *  sqlite3.configure(url);
+   *
+   *  // 2. Create an DB object
+   *  let db = await new sqlite3.Database('filename.db');
+   */
+  constructor(filename: string, ...args) {
+    let mode = constant.OPEN_READWRITE | constant.OPEN_CREATE;
+    let params: Param[] = args;
+
+    if (Number.isInteger(params[0])) {
+      mode = params[0] as number;
+    }
+
+    if (!Socket.singleton()) {
+      throw SQLite3Error.uninitialized();
+    } else {
+      this.m_socket = Socket.singleton();
+    }
+
+    this.m_id = -1; // A unique DB ID on the server
+    this.m_dbInfo = null; // A copy of the DB representation on the server
+    this.m_filename = filename;
+
+    // NOTE: this constructor returns a Promise instance
+    // Once succeeded the Promise object will be resolved with `this`.
+    // @ts-ignore
+    return this.open(mode);
+  }
+
+  /**
+   * @access private
+   * @return {Promise<Database>} - A promise containing this database object.
+   */
+  open(mode = constant.OPEN_READWRITE | constant.OPEN_CREATE): Promise<Database> {
+    let self = this;
+    let promise = new Promise<Database>((resolve, reject) => {
+      this.sendRequest('open', [mode], (msg) => {
+        printLog('db connected: ' + self.m_socket.url);
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        let dbInfo = msg.data.m_dbInfo;
+        self.m_id = dbInfo.m_id;
+        resolve(self);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Close the database.
+   *
+   * @access public
+   * @return {Promise<undefined>}
+   */
+  close(): Promise<undefined> {
+    let promise = new Promise<undefined>((resolve, reject) => {
+      this.sendRequest('close', [], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        events.forEach((e) => {
+          this.socket().removeAllListeners(e);
+        });
+
+        resolve(undefined);
+      });
+    });
+
+    return promise;
+  }
+
+  wait(): Promise<undefined> {
+    let promise = new Promise<undefined>((resolve, reject) => {
+      this.sendRequest('wait', [], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+        resolve(undefined);
+      });
+    });
+
+    return promise;
+  }
+
+  toJSON(): string {
+    return JSON.stringify(this.m_dbInfo);
+  }
+
+  /**
+   * @access public
+   * @ignore
+   */
+  id(): number {
+    return this.m_id;
+  }
+
+  /**
+   * @access public
+   * @ignore
+   */
+  filename(): string {
+    return this.m_filename;
+  }
+
+  /**
+   * @access public
+   * @ignore
+   */
+  socket(): Socket {
+    return this.m_socket;
+  }
+
+  /**
+   * @access private
+   * @ignore
+   */
+  // FIXME: remove it once on() and configure() are done
+  async openSocket(): Promise<Socket> {
+    await this.m_socket.open();
+    return this.m_socket;
+  }
+
+  async sendRequest(method: string, params: Param[], handler: (msg: OperationMessage) => void) {
+    try {
+      let serialized: Param[] = [this.m_filename, this.m_id];
+      serialized = serialized.concat(serializeParameters(params));
+
+      await this.socket().sendRequest(
+        `Database#${method}`,
+        ...serialized,
+        handler,
+      );
+    } catch (error) {
+      throw error;
+    }
+  }
+
+  /**
+   * Sets an event handler for the database. Valid events and callback signatures
+   * are as follows:
+   *
+   * <table>
+   * <tr>
+   *   <th>Event</th>
+   *   <th>Callback</th>
+   *   <th>Description</th>
+   * </tr>
+   * <tr>
+   *   <td>trace</td>
+   *   <td>function(query: string):void</td>
+   *   <td>Invoked when an SQL statement starts to execute, with a rendering of
+   *       the statement text.</td>
+   * </tr>
+   * <tr>
+   *   <td>profile</td>
+   *   <td>function(query: string, time: number):void</td>
+   *   <td>Invoked when an SQL statement finishes execution, with a rendering
+   *       of the statement text, and its execution time taken</td>
+   * </tr>
+   * </table>
+   *
+   * To enable event handling, call <code>sqlite3.verbose()</code> before
+   * registering callbacks.
+   *
+   * @access public
+   * @param {string} event - A name of an event to handle.
+   * @param {function(query, time):void} callback - A callback for the event.
+   * @return {Promise<undefined>}
+   */
+  on(event: string, callback: UserEventCallback): Promise<undefined> {
+    let res = new Promise<undefined>((resolve, reject) => {
+      if (!callback) {
+        reject();
+        return;
+      }
+
+      this.socket().addEventListener(event, callback);
+
+      this.sendRequest('on', [event], (msg) => {
+        // registration always succeed
+        resolve(undefined);
+      });
+    });
+
+    return res;
+  }
+
+  /**
+   * Removes an event handler for the database. Valid events and callback signatures
+   * are the same as Database#on().
+   *
+   * @access public
+   * @param {string} event - A name of an event to handle.
+   * @param {function(query, time):void} callback - A callback for the event.
+   * @return {Promise<undefined>}
+   */
+  removeListener(event: string, callback: UserEventCallback): Promise<undefined> {
+    let res = new Promise<undefined>((resolve, reject) => {
+      if (!callback) {
+        reject();
+        return;
+      }
+
+      this.socket().removeEventListener(event, callback);
+
+      this.sendRequest('removeListener', [event], (msg) => {
+        // registration always succeed
+        resolve(undefined);
+      });
+    });
+
+    return res;
+  }
+
+  /**
+   * Removes all event handlers for the database. Valid events
+   * are the same as Database#on().
+   *
+   * @access public
+   * @param {string} event - A name of an event to handle.
+   * @return {Promise<undefined>}
+   */
+  removeAllListeners(event: string): Promise<undefined> {
+    let res = new Promise<undefined>((resolve, reject) => {
+      this.socket().removeAllListeners(event);
+
+      this.sendRequest('removeAllListeners', [event], (msg) => {
+        // registration always succeed
+        resolve(undefined);
+      });
+    });
+
+    return res;
+  }
+
+  /**
+   * Sets a configuration option for the database. Valid options are:
+   * <ul>
+   * <li>busyTimeout: provide an integer as a value.
+   * Sets a busy handler that sleeps for a specified amount of time when a table is locked.
+   * The handler will sleep multiple times until at least "ms" milliseconds of
+   * sleeping have accumulated. After at least "ms" milliseconds of sleeping,
+   * the handler returns 0 which causes sqlite3_step() to return SQLITE_BUSY.
+   * Calling this routine with an argument less than or equal to zero turns off
+   * all busy handlers.</li>
+   * </ul>
+   *
+   * @access public
+   * @param {string} option - A name of an option to set.
+   * @param {int} value - Time in milliseconds.
+   * @return {Promise<undefined>}
+   */
+  configure(option: string, value: number): Promise<undefined> {
+    let res = new Promise<undefined>((resolve, reject)=>{
+      this.sendRequest('configure', [option, value], (msg) => {
+        // Always succeed
+        resolve(undefined);
+      })
+    });
+
+    return res;
+  }
+
+  /**
+   * Runs the SQL query with the specified parameters and calls the callback
+   * afterwards. It does not retrieve any result data.
+   *
+   * @access public
+   * @param {string} query - The SQL query to run.
+   * @param {...string} [param] - When the SQL statement contains
+   *   placeholders, you can pass them in here. They will be bound to the
+   *   statement before it is executed.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<Statement>} - A promise containing an executed statement
+   */
+  run(query: string, ...args): Promise<Statement> {
+    let params: Param[] = args;
+
+    let self = this;
+    let promise = new Promise<Statement>((resolve, reject) => {
+      this.sendRequest('run', [query, ...params], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+        let packet = msg.data;
+        // @ts-ignore: m_stmtInfo is in Object format
+        let stmt = new Statement(self, new StatementInfo(packet.m_stmtInfo)); // stmtInfo: from database.js
+        resolve(stmt);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Runs the SQL query with the specified parameters and calls the callback with
+   * the first result row afterwards. The parameters are the same as the Database#run
+   * function.
+   *
+   * @access public
+   * @param {string} query - The SQL query to run.
+   * @param {...string} [param] - When the SQL statement contains
+   *   placeholders, you can pass them in here.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<(undefined|Object)>} - A promise containing undefined, if the
+   *   result set is empty, otherwise an object containing the
+   *   values for the first row. The property names correspond to the column names
+   *   of the result set. It is impossible to access them by column index; the only
+   *   supported way is by column name.
+   */
+  get(query: string, ...args): Promise<Object> {
+    let params: Param[] = args;
+
+    let promise = new Promise<Object>((resolve, reject) => {
+      this.sendRequest('get', [query, ...params], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        let packet = msg.data;
+        let row = packet.m_data;
+        resolve(row);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Runs the SQL query with the specified parameters and calls the callback with
+   * all result rows afterwards. The parameters are the same as the Database#run
+   * function.
+   *
+   * @access public
+   * @param {string} query - The SQL query to run.
+   * @param {...string} [param] - When the SQL statement contains
+   *   placeholders, you can pass them in here.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<Object[]>} - A promise containing an array of rows.
+   *   If the result set is empty,
+   *   it will be an empty array, otherwise it will have an object for each result
+   *   row which in turn contains the values of that row, like the Database#get
+   *   function.
+   */
+  all(query: string, ...args): Promise<any[]> {
+    let params: Param[] = args;
+
+    let promise = new Promise<any[]>((resolve, reject) => {
+      this.sendRequest('all', [query, ...params], (msg) => {
+        let packet = msg.data;
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        let rows = packet.m_data;
+        resolve(rows);
+      });
+    });
+
+    return promise;
+  }
+  /**
+   * Runs the SQL query with the specified parameters and calls the callback
+   * once for each result row.
+   *
+   * <p>If you know that a query only returns a very limited number of rows,
+   * it might be more convenient to use Database#all to retrieve all rows at once.
+   *
+   * <p>There is currently no way to abort execution.
+   *
+   * @access public
+   * @param {string} query - The SQL query to run.
+   * @param {...string} [param] - When the SQL statement contains
+   *   placeholders, you can pass them in here.
+   * @param {function(row):void} [callback] - (function(row):void)
+   *   If the result set succeeds
+   *   but is empty, the callback is never called. In all other cases, the
+   *   callback is called once for every retrieved row. The order of calls correspond
+   *   exactly to the order of rows in the result set.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<number>} - A promise containing the number of retrieved rows.
+   */
+  each(query: string, ...args): Promise<number> {
+    let { params, callback : callbackRow } = splitParameter(args);
+
+    let promise = new Promise<number>((resolve, reject) => {
+      this.sendRequest('each', [query, ...params], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        let packet = msg.data;
+        let rowVal = packet.m_data;
+        if (msg.hasMoreData) {
+          if (callbackRow && rowVal) {
+            callbackRow(rowVal);
+          }
+        } else {
+          resolve(rowVal);
+        }
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Runs all SQL queries in the supplied string. No result rows are retrieved.
+   * The function returns the Database object to allow for function chaining.
+   * If a query fails, no subsequent statements will be executed (wrap it in
+   * a transaction if you want all or none to be executed).
+   *
+   * <p>Note: This function will only execute statements up to the first NULL byte.
+   * Comments are not allowed and will lead to runtime errors.
+   *
+   * @access public
+   * @param {string} query - The SQL query to run.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<undefined>}
+   */
+  exec(query: string, ...args): Promise<undefined> {
+    let params: Param[] = args;
+
+    let promise = new Promise<undefined>((resolve, reject) => {
+      this.sendRequest('exec', [query], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        resolve(undefined);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Prepares the SQL statement and optionally binds the specified parameters and
+   * calls the callback when done. The function returns a Statement object.
+   *
+   * @access public
+   * @param {string} query - The SQL query to run.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<Statement>} - A promise containing a statement object.
+   */
+  prepare(query: string, ...args): Promise<Statement> {
+    let params: Param[] = args;
+
+    let self = this;
+    let promise = new Promise<Statement>((resolve, reject) => {
+      this.sendRequest('prepare', [query, ...params], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+        let packet = msg.data;
+        // @ts-ignore: m_stmtInfo is in Object format
+        let stmt = new Statement(self, new StatementInfo(packet.m_stmtInfo)); // stmtInfo: from database.js
+        resolve(stmt);
+      });
+    });
+
+    return promise;
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/frontend/lib/socket.ts b/lwnode/apps/sqlite3/src/frontend/lib/socket.ts
new file mode 100644 (file)
index 0000000..76342e0
--- /dev/null
@@ -0,0 +1,306 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+import type { DatabaseInfo, UserEventCallback } from './database';
+import type { StatementInfo } from './statement';
+import {
+  currentRequestId,
+  nextRequestId,
+  isFunction,
+  setPromiseTimeout,
+  splitParameter,
+  printLog,
+  printError,
+  restoreArrayBuffer,
+  ab2str,
+} from './utils';
+
+// FIXME: Get this type info from backend
+export type Param = string | number | ArrayBuffer | StatementInfo | ((msg: OperationMessage) => void);
+
+interface OperationRequest { // Sending a request
+  jsonrpc: string;
+  method: string;
+  params: Param[];
+  id: number;
+}
+
+interface OperationResult {
+  method: string;
+  hasMoreData: boolean;
+  data: {
+    m_dbInfo?: DatabaseInfo;    // should be either m_dbInfo or m_stmtInfo
+    m_stmtInfo?: StatementInfo;
+    m_data; // Type depends on the operation return type
+  };
+}
+
+interface OperationResponse {
+  jsonrpc: string;
+  id: number;
+  result: string | OperationResult; // 'FIN' or OperationResult;
+  error?: {
+    code: number;    // libsqlite3 error code
+    message: string; // libsqlite3 message
+    data: {
+      type: string;
+      method: string; // e.g., Database#open
+      code: string;
+      errno: number;
+      filename: string;
+      data; // DBInfo?
+    };
+  }
+}
+
+export interface OperationMessage {
+  classname: string;
+  method: string;
+  hasMoreData?: boolean;
+  data: {
+    m_dbInfo?: DatabaseInfo;    // should be either m_dbInfo or m_stmtInfo
+    m_stmtInfo?: StatementInfo;
+    m_data; // Type depends on the operation return type
+  }
+  status: string;   // 'ok' or 'error'
+  message?: string; // optional error message
+  error?: {         // libsqlite3 error object
+    code: string;
+    errno: number;
+    message: string;
+  }
+}
+
+type SocketEventListner = (e) => void;
+export const events = ['trace', 'profile'];
+
+let g_socket: Socket = null;
+export class Socket {
+  private m_url: string;
+  private m_socket: WebSocket;
+  private m_eventListeners: Map<string, Map<UserEventCallback, SocketEventListner>>;
+
+
+  constructor(url: string) {
+    if (g_socket) {
+      return;
+    }
+
+    g_socket = this;
+    this.m_url = url;
+    this.m_socket = null;
+    this.m_eventListeners = new Map<string, Map<UserEventCallback, SocketEventListner>>();
+
+    events.forEach((e) => {
+      this.m_eventListeners.set(e, new Map<UserEventCallback, SocketEventListner>());
+    });
+  }
+
+  static singleton(): Socket {
+    return g_socket;
+  }
+
+  get url(): string {
+    return this.m_url;
+  }
+
+  open(): Promise<Socket> {
+    let self = this;
+    let promise = new Promise<Socket>((resolve, reject) => {
+      if (self.m_socket != null) {
+        resolve(self);
+        return;
+      }
+
+      self.m_socket = new WebSocket(self.m_url);
+      self.m_socket.addEventListener('open', () => {
+        printLog('socket: create a new socket');
+        resolve(self);
+      });
+
+      self.m_socket.addEventListener('close', () => {
+        self.m_socket.close();
+        self.m_socket = null;
+      });
+    });
+
+    return promise;
+  }
+
+  close(): void {
+    if (this.m_socket) {
+      this.m_socket.close();
+    }
+  }
+
+  async sendRequest(method: string, ...args: Param[]) {
+    let { params = [], callback } = splitParameter(args);
+
+    try {
+      let socket = await this.open();
+      this.onMessage(currentRequestId(), callback);
+      let msgRequest: OperationRequest = {
+        jsonrpc: '2.0',
+        method,
+        params,
+        id: currentRequestId(),
+      };
+
+      socket.m_socket.send(JSON.stringify(msgRequest));
+      nextRequestId();
+      return;
+    } catch (error) {
+      throw error;
+    }
+  }
+
+  parseJsonRpcObject(jsonRpcObject: OperationResponse): OperationMessage {
+    let error = jsonRpcObject.error;
+    let payload = error ? jsonRpcObject.error.data : (jsonRpcObject.result as OperationResult);
+    let errData = error ? jsonRpcObject.error.data : null;
+    let okData = error ? null: jsonRpcObject.result as OperationResult;
+
+    let [classname, method] = payload.method.split('#');
+    let msg: OperationMessage = {
+      classname,
+      method,
+      hasMoreData: error ? undefined: okData.hasMoreData,
+      data: payload.data,
+      status: error ? 'error' : 'ok',
+      message: error ? error.message : undefined,
+      error: error
+        ? {
+            code: errData.code,
+            errno: errData.errno,
+            message: error.message,
+          }
+        : undefined,
+    };
+
+    {
+      // Restore ArrayBuffers if exist
+      let packet = msg.data;
+      if (packet && packet.m_data) {
+        // 'data' is a return value for an operation on the server.
+        // It can be of any type.
+        let data = packet.m_data;
+        if (Array.isArray(data)) {
+          for (let i in data) {
+            restoreArrayBuffer(data);
+          }
+        } else {
+          restoreArrayBuffer(data);
+        }
+      }
+    }
+    return msg;
+  }
+
+  addEventListener(event: string, callback: UserEventCallback): void {
+    if (!callback) {
+      return;
+    }
+
+    let self = this;
+    let handler: SocketEventListner = function (e) {
+      let parsed: OperationResponse = JSON.parse(e.data);
+      if (parsed && parsed.jsonrpc != '2.0') {
+        return;
+      }
+
+      if (parsed.result === 'FIN') {
+        return;
+      }
+
+      let msg: OperationMessage = self.parseJsonRpcObject(parsed);
+      let { error, classname, method, data } = msg;
+
+      if (error) {
+        printError(`Error: ${method}(): ${error.message}`);
+      }
+
+      if (method === 'on' && data.m_data) {
+        let eventData = data.m_data;
+        if (eventData.event === 'trace') {
+          callback(eventData.query);
+        } else if (eventData.event === 'profile') {
+          callback(eventData.query, eventData.time);
+        }
+      }
+    };
+
+    let listeners = this.m_eventListeners.get(event);
+    listeners.set(callback, handler);
+
+    this.m_socket.addEventListener('message', handler);
+  }
+
+  removeEventListener(event: string, callback: UserEventCallback): void {
+    let listeners = this.m_eventListeners.get(event);
+    let handler: SocketEventListner = listeners.get(callback);
+    listeners.delete(callback);
+
+    this.m_socket.removeEventListener('message', handler);
+  }
+
+  removeAllListeners(event: string): void {
+    let listeners = this.m_eventListeners.get(event);
+    listeners.forEach((value, key) => {
+      this.m_socket.removeEventListener('message', value);
+    });
+    listeners.clear();
+  }
+
+  onMessage(msgId: number, callback: (msg: OperationMessage) => void): void {
+    if (!callback) {
+      return;
+    }
+
+    let self = this;
+
+    let cb: SocketEventListner = function (e) {
+      let parsed = JSON.parse(e.data);
+      if (parsed && parsed.jsonrpc != '2.0') {
+        return;
+      }
+
+      // check the matched handler based on relaying handlers logic
+      if (parsed.id != msgId) {
+        return;
+      }
+
+      // `FIN` means that a single operation, which can be identified with
+      // the unique `id`, requested is finished. No more response should come with the id.
+      if (parsed.result === 'FIN') {
+        if (parsed.id == msgId) {
+          self.m_socket.removeEventListener('message', cb);
+        }
+        return;
+      }
+
+      let msg = self.parseJsonRpcObject(parsed);
+      let { error, classname, method, data } = msg;
+
+      if (error) {
+        printError(`Error: ${method}(): ${error.message}`);
+      }
+
+      callback(msg);
+    };
+
+    self.m_socket.addEventListener('message', cb);
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/frontend/lib/sqlite3.ts b/lwnode/apps/sqlite3/src/frontend/lib/sqlite3.ts
new file mode 100644 (file)
index 0000000..3df6f52
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+import { Database } from './database';
+import { Statement } from './statement';
+import { Socket, OperationMessage } from './socket';
+import { constant } from './variables';
+import {
+  printLog,
+  SQLError,
+} from './utils';
+
+/**
+ * This class represents SQLite3
+ *
+ * @file
+ *
+ * sqlite3 is registered as a global object. The following example shows
+ * how to create an DB object. For more DB API usage, please refer to the
+ * DB test files in sample/script/test.
+ *
+ * @example
+ * // 1. Setup the global sqlite3 object with URL once
+ * let url = 'ws://127.0.0.1:8140/' // where sqlite3 is running
+ * sqlite3.configure(url);
+ *
+ * // 2. Create an DB object
+ * let db = await new sqlite3.Database('filename.db'); // DB is now ready to use
+ *
+ */
+class SQLite3 {
+  private m_url: string;
+  private m_socket: Socket;
+
+  /**
+   * The constructor for a sqlite3 object.
+   *
+   * @access public
+   * @hideconstructor
+   * @param {string} url - A host's url
+   */
+  constructor(url: string) {
+    this.m_url = url;
+    this.m_socket = new Socket(url);
+  }
+
+  /**
+   * Open a database connection.
+   *
+   * @access private
+   * @ignore
+   * @param {string} filename - A database filename to create
+   * @param {int} mode - One or more of sqlite3.OPEN_READONLY,
+   *   sqlite3.OPEN_READWRITE and sqlite3.OPEN_CREATE. The default
+   *   value is OPEN_READWRITE | OPEN_CREATE.
+   * @return {Promise<Database>} - A promise containing a database object.
+   */
+  async open(filename: string, mode = constant.OPEN_READWRITE | constant.OPEN_CREATE): Promise<Database> {
+    await this.openSocket();
+    let db = new Database(filename);
+
+    let promise = new Promise<Database>((resolve, reject) => {
+      db.open(mode)
+        .then((newDb) => {
+          resolve(newDb);
+        })
+        .catch((err) => {
+          reject(err);
+        });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Sets the execution mode to verbose to produce long stack traces.
+   * There is no way to reset this.
+   *
+   * @access public
+   * @return {Promise<undefined>}
+   */
+  async verbose(): Promise<undefined> {
+    let socket = await this.openSocket();
+    let promise = new Promise<undefined>((resolve, reject) => {
+      socket.sendRequest('Database#verbose', (msg: OperationMessage) => {
+        resolve(undefined);
+      });
+    });
+
+    return promise;
+  }
+
+  async versionNumber(): Promise<number> {
+    let socket = await this.openSocket();
+    let promise = new Promise<number>((resolve, reject) => {
+      socket.sendRequest('Database#versionNumber', (msg: OperationMessage) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+        let versionNumber: number = msg.data.m_data;
+        resolve(versionNumber);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * The sqlite3 version number
+   *
+   * @access public
+   * @example
+   *  let ver = await sqlite3.VERSION_NUMBER;
+   * @return {Promise<number>}
+   */
+  get VERSION_NUMBER(): Promise<number> {
+    return this.versionNumber();
+  }
+
+  socket(): Socket {
+    return this.m_socket;
+  }
+
+  /**
+   * @access private
+   * @ignore
+   */
+  async openSocket(): Promise<Socket> {
+    // Socket object
+    if (!this.m_socket) {
+      this.m_socket = new Socket(this.m_url);
+    }
+    await this.m_socket.open();
+    return this.m_socket;
+  }
+
+  /**
+   * Disconnect a connection to the server.
+   *
+   * @access private
+   * @ignore
+   */
+  closeSocket(): void {
+    printLog('Closing a socket');
+    if (this.m_socket) {
+      this.m_socket.close();
+      this.m_socket = null;
+    }
+  }
+}
+
+module.exports = (function () {
+  let instance: SQLite3;
+
+  function configure(url): void {
+    if (instance) {
+      throw new Error("Reconfiguration isn't allowed.");
+    }
+    instance = new SQLite3(url);
+  }
+
+  function verbose(): Promise<undefined> {
+    if (!instance) {
+      throw new Error("Error: sqlite3 not exist");
+    }
+
+    return instance.verbose();
+  }
+
+  function closeSocket(): void {
+    if (!instance) {
+      throw new Error("Error: sqlite3 not exist");
+    }
+
+    instance.closeSocket();
+  }
+
+  const globalSqlite3Object = {
+    Database,
+    Statement,
+    verbose,
+    ...constant,
+    configure,
+    closeSocket,
+  };
+
+  Object.defineProperty(globalSqlite3Object, 'VERSION_NUMBER', {
+    get: function(): Promise<number> {
+      return instance.VERSION_NUMBER;
+    }
+  });
+
+  Object.freeze(globalSqlite3Object);
+
+  return globalSqlite3Object;
+})();
diff --git a/lwnode/apps/sqlite3/src/frontend/lib/statement.ts b/lwnode/apps/sqlite3/src/frontend/lib/statement.ts
new file mode 100644 (file)
index 0000000..66bfde0
--- /dev/null
@@ -0,0 +1,378 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+import { Socket, Param, OperationMessage } from './socket';
+import type { Database } from './database';
+
+import {
+  splitParameter,
+  serializeParameters,
+  printLog,
+  printError,
+  SQLError,
+  SQLite3Error,
+} from './utils';
+
+// FIXME: Get this type info from backend
+export interface StatementSqlite3 { // Statement data structure obtained directly from libsqlite3
+  sql: string;
+  lastID?: number;
+  changes?: number;
+}
+
+// FIXME: Get this type info from backend
+export class StatementInfo {
+  private m_dbId: number;
+  private m_id: number; // Statement ID
+  private m_stmt: StatementSqlite3;
+
+  constructor(stmtInfo: { m_dbId: number, m_id: number, m_stmt: StatementSqlite3 }) {
+    this.m_dbId = stmtInfo.m_dbId;
+    this.m_id = stmtInfo.m_id;
+    this.m_stmt = stmtInfo.m_stmt;
+  }
+
+  type() {
+    return this.constructor.name;
+  }
+
+  id() {
+    return this.m_id;
+  }
+
+  stmt(): StatementSqlite3 {
+    return this.m_stmt;
+  }
+}
+
+/**
+ * This class represents Statement
+ *
+ */
+export class Statement {
+  private m_socket: Socket;
+  private m_filename: string;
+  private m_dbId: number;
+  private m_stmtInfo: StatementInfo;
+
+  /**
+  * For internal use only
+  *
+  * @hideconstructor
+  */
+  constructor(db: Database, stmtInfo: StatementInfo) {
+    if (!Socket.singleton()) {
+      throw SQLite3Error.uninitialized();
+    } else {
+      this.m_socket = Socket.singleton();
+    }
+
+    this.m_filename = db.filename();
+    this.m_dbId = db.id();
+    this.m_stmtInfo = stmtInfo;
+  }
+
+  get lastID(): number {
+    return this.m_stmtInfo ? this.m_stmtInfo.stmt().lastID : undefined;
+  }
+
+  get changes(): number {
+    return this.m_stmtInfo ? this.m_stmtInfo.stmt().changes : undefined;
+  }
+
+  get sql(): string {
+    if (!this.m_stmtInfo) {
+      return undefined;
+    }
+
+    return this.m_stmtInfo.stmt() ? this.m_stmtInfo.stmt().sql : undefined;
+  }
+
+  toJSON(): string {
+    let obj = this.m_stmtInfo.stmt();
+    return JSON.stringify(obj);
+  }
+
+  /**
+   * @access private
+   * @ignore
+   */
+  async openSocket() {
+    await this.m_socket.open();
+    return this.m_socket;
+  }
+
+  socket(): Socket {
+    return this.m_socket;
+  }
+
+  async sendRequest(method: string, params: Param[], handler: (msg: OperationMessage) => void) {
+    try {
+      let serialized: Param[] = [this.m_dbId, this.m_stmtInfo];
+      serialized = serialized.concat(serializeParameters(params));
+
+      await this.socket().sendRequest(
+        `Statement#${method}`,
+        ...serialized,
+        handler);
+    } catch (error) {
+      throw error;
+    }
+  }
+
+  /**
+   * Binds parameters to the prepared statement and calls the callback
+   * when done or when an error occurs.
+   *
+   * <p>Binding parameters with this function completely resets the statement
+   * object and row cursor and removes all previously bound parameters,
+   * if any.
+   *
+   * @access public
+   * @param {...string} [param] - When the SQL statement contains placeholders,
+   *   you can pass them in here.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<undefined>}
+   */
+  bind(...args): Promise<undefined> {
+    let params: Param[] = args;
+
+    let self = this;
+    let promise = new Promise<undefined>((resolve, reject) => {
+      self.sendRequest('bind', params, (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        resolve(undefined);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Resets the row cursor of the statement and preserves the parameter
+   * bindings. Use this function to re-execute the same query with the
+   * same bindings. This action will never fail and will always return null.
+   *
+   * @access public
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<undefined>}
+   */
+  reset(): Promise<undefined> {
+    let self = this;
+    let promise = new Promise<undefined>((resolve, reject) => {
+      self.sendRequest('reset', [], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        resolve(undefined);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Finalizes the statement. It is prefer to explicitly finalizing your
+   * statement, as you might experience long delays before the next query
+   * is executed. After the statement is finalized, all further function
+   * calls on that statement object will throw errors.
+   *
+   * @access public
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<undefined>}
+   */
+  finalize(): Promise<undefined> {
+    let self = this;
+    let promise = new Promise<undefined>((resolve, reject) => {
+      self.sendRequest('finalize', [], (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+
+        resolve(undefined);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Binds parameters and executes the statement.
+   *
+   * <p>If you specify bind parameters, they will be bound to the statement
+   * before it is executed. Note that the bindings and the row cursor are
+   * reset when you specify even a single bind parameter.
+   *
+   * <p>The behavior is identical to the Database#run method with
+   * the difference that the statement will not be finalized after it is run.
+   * This means you can run it multiple times.
+   *
+   * @access public
+   * @param {...string} [param] - When the SQL statement contains
+   *   placeholders, you can pass them in here.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<Statement>} - A promise containing an executed statement
+   */
+  run(...args): Promise<Statement> {
+    let params: Param[] = args;
+
+    let self = this;
+    let promise = new Promise<Statement>((resolve, reject) => {
+      self.sendRequest('run', params, (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+        let packet = msg.data;
+        // @ts-ignore
+        self.m_stmtInfo = new StatementInfo(packet.m_stmtInfo);
+        resolve(self);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Binds parameters, executes the statement and retrieves the first result
+   * row.
+   *
+   * <p>Like with Statement#run, the statement will not be finalized after
+   * executing this function.
+   *
+   * <p>Using this method can leave the database locked, as the database
+   * awaits further calls to Statement#get to retrieve subsequent rows.
+   * To inform the database that you are finished retrieving rows, you
+   * should either finalize (with Statement#finalize) or reset
+   * (with Statement#reset) the statement.
+   *
+   * @access public
+   * @param {...string} [param] - When the SQL statement contains
+   *   placeholders, you can pass them in here.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<Object>} - A promise containing an object that contains
+   *   the values for the first row.
+   */
+  get(...args): Promise<Object> {
+    let params: Param[] = args;
+
+    let self = this;
+    let promise = new Promise<Object>((resolve, reject) => {
+      self.sendRequest('get', params, (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+        let packet = msg.data;
+        let response = packet.m_data;
+        let row = response;
+        resolve(row);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Binds parameters, executes the statement and calls the callback with all
+   * result rows.
+   *
+   * <p>Like with Statement#run, the statement will not be finalized after
+   * executing this function.
+   *
+   * @access public
+   * @param {...string} [param] - When the SQL statement contains
+   *   placeholders, you can pass them in here.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<Object[]>} - A promise containing an array, that contains an object
+   *   for each result row which in turn contains the values of that row.
+   */
+  all(...args): Promise<Object[]> {
+    let params: Param[] = args;
+
+    let self = this;
+    let promise = new Promise<Object[]>((resolve, reject) => {
+      self.sendRequest('all', params, (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+        let packet = msg.data;
+        let response = packet.m_data;
+        let rows = response;
+        resolve(rows);
+      });
+    });
+
+    return promise;
+  }
+
+  /**
+   * Binds parameters, executes the statement and calls the callback for each
+   * result row.
+   *
+   * <p>Like with Statement#run, the statement will not be finalized after
+   * executing this function.
+   *
+   * <p>If you know that a query only returns a very limited number of rows,
+   * it might be more convenient to use Statement#all to retrieve all rows
+   * at once.
+   *
+   * There is currently no way to abort execution!
+   *
+   * @access public
+   * @param {...string} [param] - When the SQL statement contains
+   *   placeholders, you can pass them in here.
+   * @param {function(row):void} [callback] - (function(row):void)
+   *   If the result set succeeds but is empty, the callback is never called.
+   *   In all other cases, the callback is called once for every retrieved row.
+   *   The order of calls correspond exactly to the order of rows in the
+   *   result set.
+   * @throws - Throw an error object if an error occurred.
+   * @return {Promise<number>} - A promise containing the number of retrieved rows.
+   */
+  each(...args): Promise<number> {
+    let { params, callback : callbackRow } = splitParameter(args);
+
+    let self = this;
+    let promise = new Promise<number>((resolve, reject) => {
+      self.sendRequest('each', params, (msg) => {
+        if (msg.error) {
+          reject(new SQLError(msg.error));
+          return;
+        }
+        let packet = msg.data;
+        let rowVal = packet.m_data;
+        if (msg.hasMoreData) {
+          if (callbackRow && rowVal) {
+            callbackRow(rowVal);
+          }
+        } else {
+          resolve(rowVal);
+        }
+      });
+    });
+
+    return promise;
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/frontend/lib/tsconfig.json b/lwnode/apps/sqlite3/src/frontend/lib/tsconfig.json
new file mode 100644 (file)
index 0000000..1024cb6
--- /dev/null
@@ -0,0 +1,71 @@
+{
+  "compilerOptions": {
+    /* Visit https://aka.ms/tsconfig.json to read more about this file */
+
+    /* Basic Options */
+    "incremental": false,                   /* Enable incremental compilation */
+
+    "target": "es2015",                       /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
+    "module": "commonjs",                     /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
+    // "lib": [],                             /* Specify library files to be included in the compilation. */
+    "allowJs": true,                          /* Allow javascript files to be compiled. */
+    // "checkJs": true,                       /* Report errors in .js files. */
+    // "jsx": "preserve",                     /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
+    "declaration": true,                      /* Generates corresponding '.d.ts' file. */
+    // "declarationMap": true,                /* Generates a sourcemap for each corresponding '.d.ts' file. */
+    // "sourceMap": true,                     /* Generates corresponding '.map' file. */
+    // "outFile": "./",                       /* Concatenate and emit output to single file. */
+    "outDir": "../../../out/frontend",        /* Redirect output structure to the directory. */
+    // "rootDir": "./",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
+    // "composite": true,                     /* Enable project compilation */
+    // "tsBuildInfoFile": "./",               /* Specify file to store incremental compilation information */
+    // "removeComments": true,                /* Do not emit comments to output. */
+    // "noEmit": true,                        /* Do not emit outputs. */
+    // "importHelpers": true,                 /* Import emit helpers from 'tslib'. */
+    // "downlevelIteration": true,            /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
+    // "isolatedModules": true,               /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
+
+    /* Strict Type-Checking Options */
+    "strict": false,                           /* Enable all strict type-checking options. */
+    // "noImplicitAny": true,                 /* Raise error on expressions and declarations with an implied 'any' type. */
+    // "strictNullChecks": true,              /* Enable strict null checks. */
+    // "strictFunctionTypes": true,           /* Enable strict checking of function types. */
+    // "strictBindCallApply": true,           /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
+    // "strictPropertyInitialization": true,  /* Enable strict checking of property initialization in classes. */
+    // "noImplicitThis": true,                /* Raise error on 'this' expressions with an implied 'any' type. */
+    // "alwaysStrict": true,                  /* Parse in strict mode and emit "use strict" for each source file. */
+
+    /* Additional Checks */
+    // "noUnusedLocals": true,                /* Report errors on unused locals. */
+    // "noUnusedParameters": true,            /* Report errors on unused parameters. */
+    // "noImplicitReturns": true,             /* Report error when not all code paths in function return a value. */
+    // "noFallthroughCasesInSwitch": true,    /* Report errors for fallthrough cases in switch statement. */
+    // "noUncheckedIndexedAccess": true,      /* Include 'undefined' in index signature results */
+
+    /* Module Resolution Options */
+    // "moduleResolution": "node",            /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
+    // "baseUrl": "./",                       /* Base directory to resolve non-absolute module names. */
+    // "paths": {},                           /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
+    // "rootDirs": [],                        /* List of root folders whose combined content represents the structure of the project at runtime. */
+    // "typeRoots": [],                       /* List of folders to include type definitions from. */
+    // "types": [],                           /* Type declaration files to be included in compilation. */
+    // "allowSyntheticDefaultImports": true,  /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
+    "esModuleInterop": true,                  /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
+    // "preserveSymlinks": true,              /* Do not resolve the real path of symlinks. */
+    // "allowUmdGlobalAccess": true,          /* Allow accessing UMD globals from modules. */
+
+    /* Source Map Options */
+    // "sourceRoot": "",                      /* Specify the location where debugger should locate TypeScript files instead of source locations. */
+    // "mapRoot": "",                         /* Specify the location where debugger should locate map files instead of generated locations. */
+    // "inlineSourceMap": true,               /* Emit a single file with source maps instead of having a separate file. */
+    // "inlineSources": true,                 /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
+
+    /* Experimental Options */
+    // "experimentalDecorators": true,        /* Enables experimental support for ES7 decorators. */
+    // "emitDecoratorMetadata": true,         /* Enables experimental support for emitting type metadata for decorators. */
+
+    /* Advanced Options */
+    "skipLibCheck": true,                     /* Skip type checking of declaration files. */
+    "forceConsistentCasingInFileNames": true  /* Disallow inconsistently-cased references to the same file. */
+  }
+}
diff --git a/lwnode/apps/sqlite3/src/frontend/lib/utils.ts b/lwnode/apps/sqlite3/src/frontend/lib/utils.ts
new file mode 100644 (file)
index 0000000..bf0a190
--- /dev/null
@@ -0,0 +1,195 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd. and other contributors
+ *
+ * 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.
+ */
+
+import type { Param, OperationMessage } from './socket';
+
+let uid: number = 0;
+
+export function currentRequestId() {
+  return uid;
+}
+
+export function nextRequestId() {
+  return ++uid;
+}
+
+export function isFunction(obj) {
+  return typeof obj === 'function';
+}
+
+export function isDate(obj) {
+  return Object.prototype.toString.call(obj) === '[object Date]';
+}
+
+export function isRegExp(obj) {
+  return Object.prototype.toString.call(obj) === '[object RegExp]';
+}
+
+export function isInfinity(obj) {
+  return obj === obj/0;
+}
+
+export function isArrayBuffer(obj) {
+  return Object.prototype.toString.call(obj) === '[object ArrayBuffer]';
+}
+
+export function ab2str(buf: ArrayBuffer): string {
+  return String.fromCharCode.apply(null, new Uint16Array(buf));
+}
+
+export function str2ab(str: string): ArrayBuffer {
+  let buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
+  let bufView = new Uint16Array(buf);
+  for (let i = 0, strLen = str.length; i < strLen; i++) {
+    bufView[i] = str.charCodeAt(i);
+  }
+  return buf;
+}
+
+function arrayBufferToBase64(buffer: ArrayBuffer): string {
+  let binary = '';
+  let bytes = new Uint8Array(buffer);
+  let len = bytes.byteLength;
+  for (let i = 0; i < len; i++) {
+    binary += String.fromCharCode(bytes[i]);
+  }
+  return btoa(binary);
+}
+
+function base64ToArrayBuffer(base64: string): ArrayBuffer {
+  let binary_string = atob(base64);
+  let len = binary_string.length;
+  let bytes = new Uint8Array(len);
+  for (let i = 0; i < len; i++) {
+    bytes[i] = binary_string.charCodeAt(i);
+  }
+  return bytes.buffer;
+}
+
+function arrayBufferToBase64_16(buffer: ArrayBuffer): string {
+  let binary = String.fromCharCode.apply(null, new Uint16Array(buffer));
+  return btoa(binary);
+}
+
+function base64ToArrayBuffer_16(base64: string): ArrayBuffer {
+  let str = atob(base64);
+  let buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
+  let bufView = new Uint16Array(buf);
+  for (let i = 0, strLen = str.length; i < strLen; i++) {
+    bufView[i] = str.charCodeAt(i);
+  }
+  return buf;
+}
+
+function btoa(binaryString: string): string {
+  if (Buffer) {
+    return Buffer.from(binaryString, 'binary').toString('base64');
+  } else {
+    return window.btoa(binaryString); // browser environment
+  }
+}
+
+function atob(base64String: string): string {
+  if (Buffer) {
+    return Buffer.from(base64String, 'base64').toString('binary');
+  } else {
+    return window.atob(base64String); // browser environment
+  }
+}
+
+export function printLog(str) {
+  // console.log(str);
+}
+
+export function printError(str) {
+  // console.error(str);
+}
+
+export function splitParameter(args): { params: Param[], callback: (msg: OperationMessage) => void } {
+  let params = args,
+    callback = null;
+  if (typeof args[args.length - 1] === 'function') {
+    callback = args[args.length - 1];
+    params = args.slice(0, args.length - 1);
+  }
+  return {
+    params,
+    callback,
+  };
+}
+
+export function serializeParameters(params: Param[]): Param[] {
+  let serialized = [];
+  params.forEach((e) => {
+    if (isDate(e)) {
+      serialized.push(+e);
+    } else if (isRegExp(e) || isInfinity(e)) {
+      serialized.push(String(e));
+    } else if (isArrayBuffer(e)) {
+      let abObject = {
+        'arrayBuffer': arrayBufferToBase64(e as ArrayBuffer),
+      };
+      serialized.push(abObject);
+    } else {
+      serialized.push(e);
+    }
+  });
+
+  return serialized;
+}
+
+export function restoreArrayBuffer(obj): void {
+  for (let k in obj) {
+    if (obj[k] && obj[k].arrayBuffer) {
+      let val = obj[k].arrayBuffer;
+      let arrayBuffer = base64ToArrayBuffer(val);
+      obj[k] = arrayBuffer;
+    } else {
+      if (typeof obj[k] == 'object' && obj[k] !== null) {
+        restoreArrayBuffer(obj[k]);
+      }
+    }
+  }
+}
+
+export class SQLError extends Error {
+  code: string;
+  errno: number;
+
+  constructor(e) {
+    super(e.message);
+    this.code = e.code;
+    this.errno = e.errno;
+  }
+}
+
+export const SQLite3Error = {
+  uninitialized: () =>
+    new Error('sqlite3.configure(`connection_url: string`) must be called.'),
+  timeout: () =>
+    new Error('request timeout.'),
+};
+
+export function setPromiseTimeout(delay, promise) {
+  let timeout = new Promise((resolve, reject) => {
+    let id = setTimeout(() => {
+      clearTimeout(id);
+      reject(SQLite3Error.timeout());
+    }, delay);
+  });
+
+  return Promise.race([promise, timeout]);
+}
diff --git a/lwnode/apps/sqlite3/src/frontend/lib/variables.ts b/lwnode/apps/sqlite3/src/frontend/lib/variables.ts
new file mode 100644 (file)
index 0000000..4c7553b
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+export const constant = {
+  OPEN_READONLY: 1,
+  OPEN_READWRITE: 2,
+  OPEN_CREATE: 4,
+  OPEN_URI: 0x00000040,
+  OPEN_FULLMUTEX: 0x00010000,
+  OPEN_SHAREDCACHE: 0x00020000,
+  OPEN_PRIVATECACHE: 0x00040000,
+  OK: 0,
+  ERROR: 1,
+  INTERNAL: 2,
+  PERM: 3,
+  ABORT: 4,
+  BUSY: 5,
+  LOCKED: 6,
+  NOMEM: 7,
+  READONLY: 8,
+  INTERRUPT: 9,
+  IOERR: 10,
+  CORRUPT: 11,
+  NOTFOUND: 12,
+  FULL: 13,
+  CANTOPEN: 14,
+  PROTOCOL: 15,
+  EMPTY: 16,
+  SCHEMA: 17,
+  TOOBIG: 18,
+  CONSTRAINT: 19,
+  MISMATCH: 20,
+  MISUSE: 21,
+  NOLFS: 22,
+  AUTH: 23,
+  FORMAT: 24,
+  RANGE: 25,
+  NOTADB: 26,
+};
+
+export const connectionOpenTimeout = 10000;
diff --git a/lwnode/apps/sqlite3/tools/README.md b/lwnode/apps/sqlite3/tools/README.md
new file mode 100644 (file)
index 0000000..0498808
--- /dev/null
@@ -0,0 +1,9 @@
+# How to use Tools
+## How to release the project
+See ``tools/release.sh``
+
+## How to run TC coverage
+```sh
+./node_modules/nyc/bin/nyc.js ./dist/bin/linux/node out/backend
+./tools/run-verification.sh
+```
diff --git a/lwnode/apps/sqlite3/tools/buildlib.sh b/lwnode/apps/sqlite3/tools/buildlib.sh
new file mode 100755 (executable)
index 0000000..02754f4
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -e
+
+if ! command -v npx &> /dev/null; then
+    echo "npm should be installed"
+    exit 1
+fi
+
+cd frontend
+
+rm -rf dist
+
+npx parcel build lib/libsqlite.js --global SQLite3 \
+  --no-source-maps \
+  --out-dir=dist \
+  --out-file=libsqlite.js
+
+cd -
diff --git a/lwnode/apps/sqlite3/tools/buildtpk.sh b/lwnode/apps/sqlite3/tools/buildtpk.sh
new file mode 100755 (executable)
index 0000000..efa3f69
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+PROJECT_DIR=`pwd`
+PACKAGE_NAME='node-sqlite3-service'
+TOOLS_DIR=${PROJECT_DIR}/tools
+TPK_WORKING_DIR=${PROJECT_DIR}/backend
+OUTPUT_DIR=${PROJECT_DIR}/out
+TPK_PROJECT_DIR=${OUTPUT_DIR}/tpk
+
+echo_err() {
+  echo -e "\e[1;31m${@:1}\e[0m"
+}
+
+signing() {
+  ./kuep_net_signer.sh -s -tizen_major_ver 4  $1
+  if [ $? != 0 ];then
+    echo_err "Cannot sign $1"
+    exit 1
+  fi
+}
+
+build() {
+  rm -rf ./out/tpk
+
+  # copy node binary
+  mkdir -p ${TPK_PROJECT_DIR}/bin
+  cp -rf ${TPK_WORKING_DIR}/dist/bin/tizen/node ${TPK_PROJECT_DIR}/bin
+
+  # copy manifest
+  cp -rf ${TPK_WORKING_DIR}/tizen-manifest.xml ${TPK_PROJECT_DIR}
+
+  # copy Javascript file with node_modules
+  mkdir -p ${TPK_PROJECT_DIR}/res/node_modules
+  # TODO: remove test and example file
+  rsync -arvmL --delete-excluded --filter="merge ./backend/tools/rpm_package_filter.txt" \
+      ${TPK_WORKING_DIR}/* ${TPK_PROJECT_DIR}/res
+
+  # singing
+  curl --noproxy '*' -o ./kuep_net_signer.sh http://10.40.68.214/kuep_net_signer.sh && chmod +x ./kuep_net_signer.sh
+  if [ -z ./kuep_net_signer.sh ]; then
+    echo_err "Downloading a signing script failed."
+    exit 1
+  fi
+  signing ${TPK_PROJECT_DIR}/bin/node
+  signing ${TPK_PROJECT_DIR}/res/node_modules/sqlite3/lib/binding/tizen/node_sqlite3.node
+  rm -f kuep_net_signer.sh
+
+  # create package file
+  cd ${TPK_PROJECT_DIR}
+  zip ${PACKAGE_NAME}.tpk * -r
+  cd - > /dev/null
+  tizen package -t tpk -o ./out -- ${TPK_PROJECT_DIR}/${PACKAGE_NAME}.tpk
+  rm -rf ${TPK_PROJECT_DIR}
+}
+
+i() {
+  local target=$1
+  [[ -z "$target" ]] && target=${KIOSK_TARGET_IP}
+  [[ -z "$target" ]] && echo "usage: ./tools/buildtpk.sh i <target-ip>" && exit 1
+
+  local filename=$(find ${OUTPUT_DIR} -maxdepth 1 -name "*.tpk" -printf "%f\n")
+  local appid="${filename%.*}"
+  echo "install and launch ${appid}"
+
+  scp ${OUTPUT_DIR}/${filename} root@${target}:/tmp && \
+  ssh -t root@${target} "pkgcmd -i -t tpk -p /tmp/${filename} && app_launcher -s ${appid}"
+}
+
+if [ "$1" = "-h" ]; then
+  echo "usage:"
+  echo "  package tpk: ./tools/buildtpk.sh"
+  echo "  install and start app on target: ./tools/buildtpk.sh i <target-ip>"
+  exit 0
+fi
+
+if declare -f "$1" > /dev/null
+then
+  "$@"
+else
+  build
+fi
diff --git a/lwnode/apps/sqlite3/tools/buildwgt.sh b/lwnode/apps/sqlite3/tools/buildwgt.sh
new file mode 100755 (executable)
index 0000000..b756edf
--- /dev/null
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+set -e
+
+# mandatory
+PROJECT_DIR=`pwd`
+WGT_PATH=${PROJECT_DIR}/sample
+OUT_PATH=${PROJECT_DIR}/out
+WGT_OUT_PATH=${OUT_PATH}/sample
+SECURITY_PROFILE=tizen_author
+
+# optional
+TARGET=root@kiosk1
+
+fancy_echo() {
+  local BOLD="\033[1m"
+  local GREEN="\033[1;32m"
+  local CLEAR="\033[0m"
+  echo -e ""
+  echo -e ${GREEN}$1$2${CLEAR}
+}
+
+build_frontend() {
+  cd $PROJECT_DIR
+  npm run build:test_noenv
+}
+
+build_wgt() {
+  local WGT_PATH=$1
+  local OUT_PATH=$2
+  local SECURITY_PROFILE=$3
+
+  cd $PROJECT_DIR
+  mkdir -p $OUT_PATH
+  rm -rf $WGT_OUT_PATH
+  mkdir -p $WGT_OUT_PATH
+
+  
+  cp -rfL $WGT_PATH $OUT_PATH
+  
+  # copy test and resource files
+  mkdir -p $WGT_OUT_PATH/res
+  cp -f $PROJECT_DIR/sample/script/test/support/*.db $WGT_OUT_PATH/res
+
+  # fancy_echo "build web app"
+  tizen build-web -- $WGT_OUT_PATH -e "node_modules/*"
+  fancy_echo "package web app"
+  tizen package -t wgt -s $SECURITY_PROFILE -- $WGT_OUT_PATH/.buildResult
+  fancy_echo "copy web app"
+  cp -fv $WGT_OUT_PATH/.buildResult/*.wgt $OUT_PATH
+  rm -rf $WGT_OUT_PATH
+}
+
+install_wgt() {
+  local outputdir=$1
+  local filename=$(find $outputdir -maxdepth 1 -name "*.wgt" -printf "%f\n")
+
+  # use tizen cli
+  # tizen install -n $filename -- $outputdir/
+
+  # use ssh
+  local target=$2
+  ssh -t $target 'rm /tmp/'$filename'' > /dev/null 2>&1
+  scp $outputdir/$filename $target:/tmp/
+  ssh -t $target 'pkgcmd -i -t wgt -p /tmp/'$filename''
+}
+
+# main
+
+build_wgt $WGT_PATH $OUT_PATH $SECURITY_PROFILE
+
+if [ "$1" = "-i" ]; then
+  set +e
+  fancy_echo "install web app"
+  install_wgt $OUT_PATH $TARGET
+  set -e
+fi
diff --git a/lwnode/apps/sqlite3/tools/certificates/tizen-distributor-partner-manufacturer-signer.p12 b/lwnode/apps/sqlite3/tools/certificates/tizen-distributor-partner-manufacturer-signer.p12
new file mode 100644 (file)
index 0000000..fb0512c
Binary files /dev/null and b/lwnode/apps/sqlite3/tools/certificates/tizen-distributor-partner-manufacturer-signer.p12 differ
diff --git a/lwnode/apps/sqlite3/tools/certificates/tizen_author.p12 b/lwnode/apps/sqlite3/tools/certificates/tizen_author.p12
new file mode 100644 (file)
index 0000000..8a5a99d
Binary files /dev/null and b/lwnode/apps/sqlite3/tools/certificates/tizen_author.p12 differ
diff --git a/lwnode/apps/sqlite3/tools/install-build-tools.sh b/lwnode/apps/sqlite3/tools/install-build-tools.sh
new file mode 100755 (executable)
index 0000000..14e5b12
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Copyright 2020-present Samsung Electronics Co., Ltd.
+#
+# 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.
+
+if [ -z $BASH_ENV ]; then
+  echo "* Guard: BASH_ENV is empty. This script is intended to run on CircleCI."
+  exit 1
+fi
+
+function install_jdk() {
+  wget https://download.java.net/java/GA/jdk12/GPL/openjdk-12_linux-x64_bin.tar.gz
+  tar xzf openjdk-12_linux-x64_bin.tar.gz
+  JDK_PATH=$PWD/jdk-12
+
+  sudo update-alternatives --install "/usr/bin/java" "java" "$JDK_PATH/bin/java" 1
+  sudo update-alternatives --install "/usr/bin/javac" "javac" "$JDK_PATH/bin/javac" 1
+
+  sudo update-alternatives --config java
+  sudo update-alternatives --config javac
+
+  java -version
+}
+
+function install_node() {
+  curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
+  sudo apt install nodejs
+  node -v
+  npm -version
+}
+
+install_node
+
+sudo apt-get install -y -q zip rsync
+wget http://download.tizen.org/sdk/Installer/tizen-studio_3.7/web-cli_Tizen_Studio_3.7_ubuntu-64.bin
+chmod +x web-cli_Tizen_Studio_3.7_ubuntu-64.bin; ./web-cli_Tizen_Studio_3.7_ubuntu-64.bin --accept-license ~/tizen-studio
+echo 'export PATH=~/tizen-studio/package-manager:~/tizen-studio/tools/ide/bin/:$PATH' >> $BASH_ENV; source $BASH_ENV
+tizen security-profiles add -n tizen_author -a ./tools/certificates/tizen_author.p12 -p tizenauthor -d ./tools/certificates/tizen-distributor-partner-manufacturer-signer.p12 -dp tizenpkcs12passfordsigner
+sed -i 's|/home/circleci/project/tools/certificates/tizen_author.pwd|tizenauthor|g' ~/tizen-studio-data/profile/profiles.xml
+sed -i 's|/home/circleci/project/tools/certificates/tizen-distributor-partner-manufacturer-signer.pwd|tizenpkcs12passfordsigner|g' ~/tizen-studio-data/profile/profiles.xml
+
+cat ~/tizen-studio-data/profile/profiles.xml
diff --git a/lwnode/apps/sqlite3/tools/release.sh b/lwnode/apps/sqlite3/tools/release.sh
new file mode 100755 (executable)
index 0000000..067d993
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+# How to release
+# 0. Precondition: clone source and destination repos
+# git clone git@github.sec.samsung.net:lws/sqlite3-service.git sqlite3-service-clean
+# git clone -b release git@github.sec.samsung.net:lws/sqlite3-service.git sqlite3-service-release
+# git git clone git@github.sec.samsung.net:VD-20-B2B-NodeSqlite3/node-sqlite3.git
+#
+# 1. Run this script
+# cd sqlite3-service-clean
+# ./tools/release.sh [ node-sqlite3 | sqlite3-service-release ]
+
+ROOT=`pwd`
+
+repo=$1
+
+if [ "$repo" == "node-sqlite3" ] || [ "$repo" == "sqlite3-service-release" ]; then
+  echo "Syncing with: $repo"
+else
+  echo "Usage: $0 [ node-sqlite3 | sqlite3-service-release ]"
+  exit 0
+fi
+
+if [ "$repo" == "node-sqlite3" ] && [ ! -d ../node-sqlite3 ]; then
+  # git clone git@github.sec.samsung.net:VD-20-B2B-NodeSqlite3/node-sqlite3.git
+  echo "Error: $repo not exist"
+  exit 0
+elif [ "$repo" == "sqlite3-service-release" ] && [ ! -d ../sqlite3-service-release ]; then
+  # git clone -b release git@github.sec.samsung.net:lws/sqlite3-service.git sqlite3-service-release
+  echo "Error: $repo not exist"
+  exit 0
+fi
+
+if [ ! $(node -v | grep -q "12.20.0") ]; then
+  source ~/.nvm/nvm.sh
+  nvm use 12.20.0
+  if [ $? != 0 ]; then
+    echo "Error: Need nvm and node 12.20.0 (nvm install 12.20.0)"
+    exit 0
+  fi
+fi
+
+clean_repo() {
+  git clean -xfd
+  git submodule foreach --recursive git clean -xfd
+}
+
+echo "Found: $repo"
+
+# Clean repos
+clean_repo
+pushd ../$repo
+clean_repo
+popd
+
+# Install packages
+git submodule update --init
+npm install
+npm run build:all_noenv
+npm run docs
+rm -rf ./node_modules
+npm install --production
+./tools/removeNPMAbsolutePaths/bin/removeNPMAbsolutePaths .
+
+# sync source repo to $repo
+rsync -avmL --delete --delete-excluded --filter="merge tools/sqlite3-filter.txt" . ../$repo
+
+pushd ../$repo
+cp .circleci/config_release.yml .circleci/config.yml
+
+hash=`git log | head -1 | cut -f2 -d' ' | cut -c 1-7`
+today=`date +%y%m%d`
+msg="Node_SQLite3_Release_$today""_$hash"
+
+echo "======================================="
+echo git commit -m "$msg"
+echo "======================================="
+
+git add -A
+git commit -m "$msg"
+popd
diff --git a/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/LICENSE b/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/LICENSE
new file mode 100644 (file)
index 0000000..ccf7370
--- /dev/null
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Juanjo Diaz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/bin/removeNPMAbsolutePaths b/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/bin/removeNPMAbsolutePaths
new file mode 100755 (executable)
index 0000000..ad94cd3
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/env node
+
+/* eslint-disable no-console */
+
+'use strict';
+
+const cli = require('../src/cli');
+const removeNPMAbsolutePaths = require('../src/removeNPMAbsolutePaths');
+
+async function main() {
+  try {
+    const args = await cli.parseArguments(process.argv.slice(2));
+
+    if (args.ignored.length) {
+      console.warn(`The following options are unknown and will be ignored:\n${args.ignored.join('\n')}`);
+    }
+
+    const results = await removeNPMAbsolutePaths(args.path, args.opts);
+
+    results.forEach((result) => {
+      if (!result.success) {
+        console.log(result.err.message);
+      }
+    });
+  } catch (err) {
+    console.error(err.message);
+  }
+}
+
+main();
diff --git a/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/cli.js b/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/cli.js
new file mode 100644 (file)
index 0000000..41fb2f5
--- /dev/null
@@ -0,0 +1,51 @@
+'use strict';
+
+const defaultOpts = {
+  force: false,
+};
+
+function parseArguments(args) {
+  if (args.length < 1) {
+    throw new Error('Missing path.\nThe first argument should be the path to a directory or a package.json file.');
+  }
+
+  const path = args[0];
+  const opts = { ...defaultOpts };
+
+  const ignored = [];
+
+  for (let i = 1; i < args.length; i += 1) {
+    const arg = args[i];
+    switch (arg) {
+      case '--force':
+        opts.force = true;
+        break;
+      case '--fields':
+        if (opts.fields) {
+          throw new Error('Duplicated argument: --fields.\nThe --fields flag has been detected twice.');
+        }
+
+        opts.fields = [];
+        while (args[i + 1] && args[i + 1].slice(0, 2) !== '--') {
+          opts.fields.push(args[i += 1]);
+        }
+
+        if (opts.fields && opts.fields.length === 0) {
+          throw new Error('Invalid argument usage: --fields.\nThe --fields flag should be followed by the specific fields that should be removed but none was found.');
+        }
+        break;
+      default:
+        ignored.push(arg);
+        break;
+    }
+  }
+
+  return {
+    path,
+    opts,
+    ignored,
+  };
+}
+
+module.exports.defaultOpts = defaultOpts;
+module.exports.parseArguments = parseArguments;
diff --git a/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/errno.js b/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/errno.js
new file mode 100644 (file)
index 0000000..d5ba943
--- /dev/null
@@ -0,0 +1,310 @@
+'use strict';
+
+const all = [
+  {
+    errno: -2,
+    code: 'ENOENT',
+    description: 'No such file or directory',
+  },
+  {
+    errno: -1,
+    code: 'UNKNOWN',
+    description: 'Unknown error',
+  },
+  {
+    errno: 0,
+    code: 'OK',
+    description: 'Success',
+  },
+  {
+    errno: 1,
+    code: 'EOF',
+    description: 'End of file',
+  },
+  {
+    errno: 2,
+    code: 'EADDRINFO',
+    description: 'Getaddrinfo error',
+  },
+  {
+    errno: 3,
+    code: 'EACCES',
+    description: 'Permission denied',
+  },
+  {
+    errno: 4,
+    code: 'EAGAIN',
+    description: 'Resource temporarily unavailable',
+  },
+  {
+    errno: 5,
+    code: 'EADDRINUSE',
+    description: 'Address already in use',
+  },
+  {
+    errno: 6,
+    code: 'EADDRNOTAVAIL',
+    description: 'Address not available',
+  },
+  {
+    errno: 7,
+    code: 'EAFNOSUPPORT',
+    description: 'Address family not supported',
+  },
+  {
+    errno: 8,
+    code: 'EALREADY',
+    description: 'Connection already in progress',
+  },
+  {
+    errno: 9,
+    code: 'EBADF',
+    description: 'Bad file descriptor',
+  },
+  {
+    errno: 10,
+    code: 'EBUSY',
+    description: 'Resource busy or locked',
+  },
+  {
+    errno: 11,
+    code: 'ECONNABORTED',
+    description: 'Software caused connection abort',
+  },
+  {
+    errno: 12,
+    code: 'ECONNREFUSED',
+    description: 'Connection refused',
+  },
+  {
+    errno: 13,
+    code: 'ECONNRESET',
+    description: 'Connection reset by peer',
+  },
+  {
+    errno: 14,
+    code: 'EDESTADDRREQ',
+    description: 'Destination address required',
+  },
+  {
+    errno: 15,
+    code: 'EFAULT',
+    description: 'Bad address in system call argument',
+  },
+  {
+    errno: 16,
+    code: 'EHOSTUNREACH',
+    description: 'Host is unreachable',
+  },
+  {
+    errno: 17,
+    code: 'EINTR',
+    description: 'Interrupted system call',
+  },
+  {
+    errno: 18,
+    code: 'EINVAL',
+    description: 'Invalid argument',
+  },
+  {
+    errno: 19,
+    code: 'EISCONN',
+    description: 'Socket is already connected',
+  },
+  {
+    errno: 20,
+    code: 'EMFILE',
+    description: 'Too many open files',
+  },
+  {
+    errno: 21,
+    code: 'EMSGSIZE',
+    description: 'Message too long',
+  },
+  {
+    errno: 22,
+    code: 'ENETDOWN',
+    description: 'Network is down',
+  },
+  {
+    errno: 23,
+    code: 'ENETUNREACH',
+    description: 'Network is unreachable',
+  },
+  {
+    errno: 24,
+    code: 'ENFILE',
+    description: 'File table overflow',
+  },
+  {
+    errno: 25,
+    code: 'ENOBUFS',
+    description: 'No buffer space available',
+  },
+  {
+    errno: 26,
+    code: 'ENOMEM',
+    description: 'Not enough memory',
+  },
+  {
+    errno: 27,
+    code: 'ENOTDIR',
+    description: 'Not a directory',
+  },
+  {
+    errno: 28,
+    code: 'EISDIR',
+    description: 'Illegal operation on a directory',
+  },
+  {
+    errno: 29,
+    code: 'ENONET',
+    description: 'Machine is not on the network',
+  },
+  {
+    errno: 31,
+    code: 'ENOTCONN',
+    description: 'Socket is not connected',
+  },
+  {
+    errno: 32,
+    code: 'ENOTSOCK',
+    description: 'Socket operation on non-socket',
+  },
+  {
+    errno: 33,
+    code: 'ENOTSUP',
+    description: 'Operation not supported on socket',
+  },
+  {
+    errno: 34,
+    code: 'ENOENT',
+    description: 'No such file or directory',
+  },
+  {
+    errno: 35,
+    code: 'ENOSYS',
+    description: 'Function not implemented',
+  },
+  {
+    errno: 36,
+    code: 'EPIPE',
+    description: 'Broken pipe',
+  },
+  {
+    errno: 37,
+    code: 'EPROTO',
+    description: 'Protocol error',
+  },
+  {
+    errno: 38,
+    code: 'EPROTONOSUPPORT',
+    description: 'Protocol not supported',
+  },
+  {
+    errno: 39,
+    code: 'EPROTOTYPE',
+    description: 'Protocol wrong type for socket',
+  },
+  {
+    errno: 40,
+    code: 'ETIMEDOUT',
+    description: 'Connection timed out',
+  },
+  {
+    errno: 41,
+    code: 'ECHARSET',
+    description: 'Invalid Unicode character',
+  },
+  {
+    errno: 42,
+    code: 'EAIFAMNOSUPPORT',
+    description: 'Address family for hostname not supported',
+  },
+  {
+    errno: 44,
+    code: 'EAISERVICE',
+    description: 'Servname not supported for ai_socktype',
+  },
+  {
+    errno: 45,
+    code: 'EAISOCKTYPE',
+    description: 'Ai_socktype not supported',
+  },
+  {
+    errno: 46,
+    code: 'ESHUTDOWN',
+    description: 'Cannot send after transport endpoint shutdown',
+  },
+  {
+    errno: 47,
+    code: 'EEXIST',
+    description: 'File already exists',
+  },
+  {
+    errno: 48,
+    code: 'ESRCH',
+    description: 'No such process',
+  },
+  {
+    errno: 49,
+    code: 'ENAMETOOLONG',
+    description: 'Name too long',
+  },
+  {
+    errno: 50,
+    code: 'EPERM',
+    description: 'Operation not permitted',
+  },
+  {
+    errno: 51,
+    code: 'ELOOP',
+    description: 'Too many symbolic links encountered',
+  },
+  {
+    errno: 52,
+    code: 'EXDEV',
+    description: 'Cross-device link not permitted',
+  },
+  {
+    errno: 53,
+    code: 'ENOTEMPTY',
+    description: 'Directory not empty',
+  },
+  {
+    errno: 54,
+    code: 'ENOSPC',
+    description: 'No space left on device',
+  },
+  {
+    errno: 55,
+    code: 'EIO',
+    description: 'I/O error',
+  },
+  {
+    errno: 56,
+    code: 'EROFS',
+    description: 'Read-only file system',
+  },
+  {
+    errno: 57,
+    code: 'ENODEV',
+    description: 'No such device',
+  },
+  {
+    errno: 58,
+    code: 'ESPIPE',
+    description: 'Invalid seek',
+  },
+  {
+    errno: 59,
+    code: 'ECANCELED',
+    description: 'Operation canceled',
+  },
+];
+
+module.exports = {};
+
+all.forEach((error) => {
+  module.exports[error.errno] = error.description;
+});
diff --git a/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/removeNPMAbsolutePaths.js b/lwnode/apps/sqlite3/tools/removeNPMAbsolutePaths/src/removeNPMAbsolutePaths.js
new file mode 100644 (file)
index 0000000..da7690e
--- /dev/null
@@ -0,0 +1,137 @@
+'use strict';
+
+const path = require('path');
+const {
+  stat, readdir, readFile, writeFile,
+} = require('fs');
+const { promisify } = require('util');
+const errno = require('./errno');
+
+const statAsync = promisify(stat);
+const readdirAsync = promisify(readdir);
+const readFileAsync = promisify(readFile);
+const writeFileAsync = promisify(writeFile);
+
+class ProcessingError extends Error {
+  constructor(message, err) {
+    super(message + ((err && err.errno) ? ` (${errno[err.errno]})` : ''));
+    this.cause = err;
+  }
+}
+
+async function getStats(filePath) {
+  try {
+    return await statAsync(filePath);
+  } catch (err) {
+    throw new ProcessingError(`Can't read directory/file at "${filePath}"`, err);
+  }
+}
+
+async function processFile(filePath, opts) {
+  try {
+    let data;
+    try {
+      data = await readFileAsync(filePath, 'utf8');
+    } catch (err) {
+      throw new ProcessingError(`Can't read file at "${filePath}"`, err);
+    }
+
+    let shouldWriteFile = false;
+    let obj;
+    try {
+      obj = JSON.parse(data);
+    } catch (err) {
+      throw new ProcessingError(`Malformed package.json file at "${filePath}"`, err);
+    }
+
+    Object.keys(obj).forEach((key) => {
+      const shouldBeDeleted = opts.fields ? (opts.fields.indexOf(key) !== -1) : (key[0] === '_');
+      if (shouldBeDeleted) {
+        delete obj[key];
+        shouldWriteFile = true;
+      }
+    });
+
+    if (shouldWriteFile || opts.force) {
+      try {
+        await writeFileAsync(filePath, JSON.stringify(obj, null, '  '));
+      } catch (err) {
+        throw new ProcessingError(`Can't write processed file to "${filePath}"`, err);
+      }
+
+      return { filePath, rewritten: true, success: true };
+    }
+
+    return { filePath, rewritten: false, success: true };
+  } catch (err) {
+    return { filePath, err, success: false };
+  }
+}
+
+async function processDir(dirPath, opts) {
+  try {
+    let files;
+    try {
+      files = await readdirAsync(dirPath);
+    } catch (err) {
+      throw new ProcessingError(`Can't read directory at "${dirPath}"`, err);
+    }
+
+    const results = await Promise.all(files.map(async (fileName) => {
+      const filePath = path.join(dirPath, fileName);
+
+      const stats = await getStats(filePath);
+
+      if (stats.isDirectory()) {
+        return processDir(filePath, opts);
+      }
+
+      if (fileName === 'package.json') {
+        return processFile(filePath, opts);
+      }
+
+      return undefined;
+    }));
+
+    return results.reduce((arr, value) => {
+      if (!value) {
+        return arr;
+      }
+
+      if (value.constructor === Array) {
+        return arr.concat(value);
+      }
+
+      arr.push(value);
+      return arr;
+    }, [{ dirPath, success: true }]);
+  } catch (err) {
+    return [{ dirPath, err, success: false }];
+  }
+}
+
+async function removeNPMAbsolutePaths(filePath, opts) {
+  opts = opts || {}; // eslint-disable-line no-param-reassign
+
+  if (!filePath) {
+    throw new ProcessingError('Missing path.\nThe first argument should be the path to a directory or a package.json file.');
+  }
+
+  if (opts.fields && (opts.fields.constructor !== Array || opts.fields.length === 0)) {
+    throw new ProcessingError('Invalid option: fields.\nThe fields option should be an array cotaining the names of the specific fields that should be removed.');
+  }
+
+  const stats = await getStats(filePath);
+
+  if (stats.isDirectory()) {
+    return processDir(filePath, opts);
+  }
+
+  if (path.basename(filePath) === 'package.json') {
+    return [await processFile(filePath, opts)];
+  }
+
+  throw new Error('Invalid path provided. The path should be a directory or a package.json file.');
+}
+
+module.exports = removeNPMAbsolutePaths;
diff --git a/lwnode/apps/sqlite3/tools/run-verification.sh b/lwnode/apps/sqlite3/tools/run-verification.sh
new file mode 100755 (executable)
index 0000000..4115eff
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+./node_modules/nyc/bin/nyc.js -x sample/script/test/support/helper.js ./node_modules/mocha/bin/mocha --timeout 480000 --exit sample/script/test/*.test.js
+
diff --git a/lwnode/apps/sqlite3/tools/sqlite3-filter.txt b/lwnode/apps/sqlite3/tools/sqlite3-filter.txt
new file mode 100644 (file)
index 0000000..d9f6fd4
--- /dev/null
@@ -0,0 +1,59 @@
+P /.git
+P /.github
+P /.circleci
+
+- /.circleci/testhub.cfg
+- /dist/bin/tizen/node
+- /download/libsqlite.js.map
+- /download/libsqlite.cjs.js
++ /dist/bin/linux/node
++ /tools/buildwgt.sh
++ /tools/install-build-tools.sh
++ /tools/certificates/***
+- /tools/**
+
+- /node_modules/sqlite3/lib/binding/napi-v3-linux-x64/node_sqlite3.node
+
+# These rules are only needed when building rpms from node_modules dev
+# <dev>
+- /node_modules/.bin/***
+- /node_modules/eslint/***
+- /node_modules/@babel/***
+- /node_modules/@eslint/***
+- /node_modules/eslint*/***
+- /node_modules/jsdoc/***
+- /node_modules/mocha/***
+- /node_modules/nodemon/***
+- /node_modules/prettier/***
+- /node_modules/@types/***
+- /node_modules/typescript/***
+# </dev>
+
+- /node_modules/**/test
+- /node_modules/**/example
+- /node_modules/**/examples
+- /node_modules/**/benchmark
++ /node_modules/**/
++ /node_modules/**/*.js
++ /node_modules/**/*.node
++ /node_modules/**/*.json
++ /node_modules/**/LICENSE
++ /node_modules/**/license
+- /node_modules/**/*
+
+- .git
+- .gitignore
+- .gitmodules
+- .gitattributes
+- .eslintrc.js
+- .prettierrc
+- .cache
+
+- *.pyc
+- *.a
+- *.so
+- *.o
+- out_linux
+- out_tizen
+- CMakeCache.txt
+- CMakeFiles
index a49bb17df5f031d7c403727bb9b4911daf3129b4..931d67f6c3e9e39e90425424153c761bc6640e44 100755 (executable)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ROOT_PATH=out/cctest
+ROOT=$PWD
+OUT_PATH=$ROOT/out/cctest
+ARCH="x64"
+ASAN=1
+
+while [[ $# -gt 0 ]]; do
+  case "$1" in
+  --arch=*)
+    ARCH="${1#*=}"
+    ;;
+  --asan=*)
+    ASAN="${1#*=}"
+    ;;
+  *)
+    echo "Unknown option $1"
+    exit -1
+    ;;
+  esac
+
+  shift
+done
 
 ./tools/gyp/gyp ./lwnode/code/escargotshim/test/cctest.gyp --depth=. -f ninja \
-  --generator-output=$ROOT_PATH -Dasan=1 -Dbuild_mode=debug \
-  -Descargot_lib_type=static_lib -Dtarget_arch=x64 -Dtarget_os=linux \
+  --generator-output=$OUT_PATH -Dasan=$ASAN -Dbuild_mode=debug \
+  -Descargot_lib_type=static_lib -Dtarget_arch=$ARCH -Dtarget_os=linux \
   -Denable_experimental=true -Descargot_threading=1 -Dinclude_node_bindings=false \
-  -Descargot_debugger=false
+  -Descargot_debugger=0
 
-ninja -v -C $ROOT_PATH/out/Debug cctest
+ninja -C $OUT_PATH/out/Debug cctest
 
-ln -sf $ROOT_PATH/out/Debug/cctest ./cctest
+if [ $ARCH == "x64" ]; then
+ln -sf $OUT_PATH/out/Debug/cctest ./cctest
+fi
index f51787a1b5bb0db5e2030e5f2e9f2bedbd6fdc68..cbc3ad8ad1fc5f60fd4d53a37475f2c9b5c297b0 100755 (executable)
@@ -58,6 +58,14 @@ find_and_build_modules() {
   done
 }
 
+check_build_result() {
+  ret=$?
+  if [ $ret -ne 0 ]; then
+    error_echo "Failed to build $1"
+    exit $ret
+  fi
+}
+
 build_module() {
   fancy_echo "build [$1]"
 
@@ -67,7 +75,9 @@ build_module() {
 
   cmake $module_path -B$out_path -H$module_path -DLWNODE_INCLUDES=$LWNODE_INCLUDES_PATH \
     -G Ninja
+  check_build_result $1
   ninja -C $out_path
+  check_build_result $1
 }
 
 if [[ -z $1 ]] || [[ $1 == -* ]]; then
index f6574fdf1c9344c774942e2f9a48f5c1a74a65b6..83a025b2518599c12fd6663b51cf86a52b86352a 100644 (file)
@@ -58,7 +58,9 @@ IF (NOT ${ESCARGOT_OUTPUT} MATCHES "shell")
 ENDIF()
 
 IF (${ESCARGOT_OUTPUT} STREQUAL "cctest")
+       ADD_COMPILE_OPTIONS(${ESCARGOT_THIRDPARTY_CFLAGS})
        ADD_SUBDIRECTORY (third_party/googletest/googletest)
+       TARGET_INCLUDE_DIRECTORIES (gtest PUBLIC ${ESCARGOT_THIRD_PARTY_ROOT}/googletest/googletest/include)
        FILE (GLOB CCTEST_SRC ${ESCARGOT_ROOT}/test/cctest/testapi.cpp)
 ENDIF()
 
@@ -175,5 +177,5 @@ ELSEIF (${ESCARGOT_OUTPUT} STREQUAL "cctest")
     TARGET_LINK_LIBRARIES (${ESCARGOT_CCTEST_TARGET} PRIVATE ${ESCARGOT_LIBRARIES} ${ESCARGOT_LDFLAGS} ${LDFLAGS_FROM_ENV} gtest)
     TARGET_INCLUDE_DIRECTORIES (${ESCARGOT_CCTEST_TARGET} PRIVATE ${ESCARGOT_INCDIRS})
     TARGET_COMPILE_DEFINITIONS (${ESCARGOT_CCTEST_TARGET} PRIVATE ${ESCARGOT_DEFINITIONS})
-    TARGET_COMPILE_OPTIONS (${ESCARGOT_CCTEST_TARGET} PRIVATE ${ESCARGOT_CXXFLAGS} ${DEBUGGER_FLAGS} -I${ESCARGOT_ROOT}/third_party/googletest/googletest/include/ ${CXXFLAGS_FROM_ENV})
+    TARGET_COMPILE_OPTIONS (${ESCARGOT_CCTEST_TARGET} PRIVATE ${ESCARGOT_CXXFLAGS} ${DEBUGGER_FLAGS} ${CXXFLAGS_FROM_ENV})
 ENDIF()
index 47070637613ac62baabbdc6e6bb82cc19df1a54d..f33a96ddbf2ff2f2a0cd117e7fe3db8692ff7989 100644 (file)
@@ -1096,20 +1096,34 @@ void VMInstanceRef::setOnVMInstanceDelete(OnVMInstanceDelete cb)
                                        (void*)cb);
 }
 
-void VMInstanceRef::registerErrorCreationCallback(ErrorCreationCallback cb)
+void VMInstanceRef::registerErrorCreationCallback(ErrorCallback cb)
 {
     toImpl(this)->registerErrorCreationCallback([](ExecutionState& state, ErrorObject* err, void* cb) -> void {
         ASSERT(!!cb);
-        (reinterpret_cast<ErrorCreationCallback>(cb))(toRef(&state), toRef(err));
+        (reinterpret_cast<ErrorCallback>(cb))(toRef(&state), toRef(err));
     },
                                                 (void*)cb);
 }
 
+void VMInstanceRef::registerErrorThrowCallback(ErrorCallback cb)
+{
+    toImpl(this)->registerErrorThrowCallback([](ExecutionState& state, ErrorObject* err, void* cb) -> void {
+        ASSERT(!!cb);
+        (reinterpret_cast<ErrorCallback>(cb))(toRef(&state), toRef(err));
+    },
+                                             (void*)cb);
+}
+
 void VMInstanceRef::unregisterErrorCreationCallback()
 {
     toImpl(this)->unregisterErrorCreationCallback();
 }
 
+void VMInstanceRef::unregisterErrorThrowCallback()
+{
+    toImpl(this)->unregisterErrorThrowCallback();
+}
+
 void VMInstanceRef::registerPromiseHook(PromiseHook promiseHook)
 {
     toImpl(this)->registerPromiseHook([](ExecutionState& state, VMInstance::PromiseHookType type, PromiseObject* promise, const Value& parent, void* hook) -> void {
@@ -1169,11 +1183,18 @@ Evaluator::EvaluatorResult VMInstanceRef::executePendingJob()
 
 #ifdef ESCARGOT_DEBUGGER
 
-StringRef* DebuggerOperationsRef::BreakpointOperations::eval(StringRef* sourceCode, bool& isError)
+class DebuggerOperationsRef::BreakpointOperations::ObjectStore {
+public:
+    Vector<Object*, GCUtil::gc_malloc_allocator<Object*>> m_activeObjects;
+};
+
+StringRef* DebuggerOperationsRef::BreakpointOperations::eval(StringRef* sourceCode, bool& isError, size_t& objectIndex)
 {
     ExecutionState* state = toImpl(m_executionState);
     Debugger* debugger = state->context()->debugger();
 
+    objectIndex = SIZE_MAX;
+
     if (debugger == nullptr) {
         isError = true;
 
@@ -1190,7 +1211,13 @@ StringRef* DebuggerOperationsRef::BreakpointOperations::eval(StringRef* sourceCo
         Value asValue(toImpl(sourceCode));
         Value evalResult(Value::ForceUninitialized);
         evalResult = state->context()->globalObject()->evalLocal(*state, asValue, state->thisValue(), reinterpret_cast<ByteCodeBlock*>(weakCodeRef())->m_codeBlock, true);
-        result = evalResult.toStringWithoutException(*state);
+
+        if (evalResult.isObject()) {
+            result = nullptr;
+            objectIndex = putObject(toRef(evalResult.asObject()));
+        } else {
+            result = evalResult.toStringWithoutException(*state);
+        }
     } catch (const Value& val) {
         result = val.toStringWithoutException(*state);
 
@@ -1297,6 +1324,195 @@ void DebuggerOperationsRef::BreakpointOperations::getLexicalScopeChain(uint32_t
     }
 }
 
+static void fillObjectProperties(ExecutionState* state, Object* object, Object::OwnPropertyKeyVector& keys, DebuggerOperationsRef::PropertyKeyValueVector& result, size_t start)
+{
+    size_t size = keys.size();
+
+    ASSERT(result.size() >= start + size);
+
+    for (size_t i = 0; i < size; i++) {
+        ObjectPropertyName propertyName(*state, keys[i]);
+
+        result[start + i].key = toRef(keys[i].toStringWithoutException(*state));
+
+        try {
+            ObjectGetResult value = object->getOwnProperty(*state, propertyName);
+
+            result[start + i].value = toRef(value.value(*state, Value(object)));
+        } catch (const Value& val) {
+            // The value field is optional, and not filled on error.
+        }
+    }
+}
+
+static void fillRecordProperties(ExecutionState* state, EnvironmentRecord* record, IdentifierRecordVector* identifiers, DebuggerOperationsRef::PropertyKeyValueVector& result)
+{
+    size_t size = identifiers->size();
+
+    ASSERT(result.size() >= size);
+
+    for (size_t i = 0; i < size; i++) {
+        AtomicString name = (*identifiers)[i].m_name;
+
+        result[i].key = toRef(name.string());
+
+        try {
+            EnvironmentRecord::GetBindingValueResult value = record->getBindingValue(*state, name);
+            ASSERT(value.m_hasBindingValue);
+
+            result[i].value = toRef(value.m_value);
+        } catch (const Value& val) {
+            // The value field is optional, and not filled on error.
+        }
+    }
+}
+
+static void fillRecordProperties(ExecutionState* state, ModuleEnvironmentRecord* record, const ModuleEnvironmentRecord::ModuleBindingRecordVector& bindings, DebuggerOperationsRef::PropertyKeyValueVector& result)
+{
+    size_t size = bindings.size();
+
+    ASSERT(result.size() >= size);
+
+    for (size_t i = 0; i < size; i++) {
+        AtomicString name = bindings[i].m_localName;
+
+        result[i].key = toRef(name.string());
+
+        try {
+            EnvironmentRecord::GetBindingValueResult value = record->getBindingValue(*state, name);
+            ASSERT(value.m_hasBindingValue);
+
+            result[i].value = toRef(value.m_value);
+        } catch (const Value& val) {
+            // The value field is optional, and not filled on error.
+        }
+    }
+}
+
+class DebuggerAPI {
+public:
+    static IdentifierRecordVector* globalDeclarativeRecord(GlobalEnvironmentRecord* global)
+    {
+        return global->m_globalDeclarativeRecord;
+    }
+
+    static const ModuleEnvironmentRecord::ModuleBindingRecordVector& moduleBindings(ModuleEnvironmentRecord* moduleRecord)
+    {
+        return moduleRecord->m_moduleBindings;
+    }
+
+    static IdentifierRecordVector* declarativeEnvironmentRecordVector(DeclarativeEnvironmentRecord* declarativeRecord)
+    {
+        return &declarativeRecord->asDeclarativeEnvironmentRecordNotIndexed()->m_recordVector;
+    }
+};
+
+DebuggerOperationsRef::PropertyKeyValueVector DebuggerOperationsRef::BreakpointOperations::getLexicalScopeChainProperties(uint32_t stateIndex, uint32_t scopeIndex)
+{
+    ExecutionState* state = toImpl(m_executionState);
+
+    while (stateIndex > 0) {
+        state = state->parent();
+        stateIndex--;
+
+        if (!state) {
+            return PropertyKeyValueVector();
+        }
+    }
+
+    LexicalEnvironment* lexEnv = state->lexicalEnvironment();
+
+    while (lexEnv && scopeIndex > 0) {
+        lexEnv = lexEnv->outerEnvironment();
+        scopeIndex--;
+    }
+
+    if (!lexEnv) {
+        return PropertyKeyValueVector();
+    }
+
+    EnvironmentRecord* record = lexEnv->record();
+    if (record->isGlobalEnvironmentRecord()) {
+        GlobalEnvironmentRecord* global = record->asGlobalEnvironmentRecord();
+        Object* globalObject = global->globalObject();
+
+        Object::OwnPropertyKeyVector keys = globalObject->ownPropertyKeys(*state);
+        IdentifierRecordVector* identifiers = DebuggerAPI::globalDeclarativeRecord(global);
+
+        PropertyKeyValueVector result(identifiers->size() + keys.size());
+
+        fillRecordProperties(state, global, identifiers, result);
+        fillObjectProperties(state, globalObject, keys, result, identifiers->size());
+        return result;
+    } else if (record->isDeclarativeEnvironmentRecord()) {
+        DeclarativeEnvironmentRecord* declarativeRecord = record->asDeclarativeEnvironmentRecord();
+        if (declarativeRecord->isFunctionEnvironmentRecord()) {
+            IdentifierRecordVector* identifiers = declarativeRecord->asFunctionEnvironmentRecord()->getRecordVector();
+
+            if (identifiers != NULL) {
+                PropertyKeyValueVector result(identifiers->size());
+
+                fillRecordProperties(state, record, identifiers, result);
+                return result;
+            }
+        } else if (record->isModuleEnvironmentRecord()) {
+            ModuleEnvironmentRecord* moduleRecord = record->asModuleEnvironmentRecord();
+
+            const ModuleEnvironmentRecord::ModuleBindingRecordVector& bindings = DebuggerAPI::moduleBindings(moduleRecord);
+            PropertyKeyValueVector result(bindings.size());
+
+            fillRecordProperties(state, moduleRecord, bindings, result);
+            return result;
+        } else if (declarativeRecord->isDeclarativeEnvironmentRecordNotIndexed()) {
+            IdentifierRecordVector* identifiers = DebuggerAPI::declarativeEnvironmentRecordVector(declarativeRecord);
+            PropertyKeyValueVector result(identifiers->size());
+
+            fillRecordProperties(state, record, identifiers, result);
+            return result;
+        }
+    } else if (record->isObjectEnvironmentRecord()) {
+        Object* bindingObject = record->asObjectEnvironmentRecord()->bindingObject();
+        Object::OwnPropertyKeyVector keys = bindingObject->ownPropertyKeys(*state);
+        PropertyKeyValueVector result(keys.size());
+
+        fillObjectProperties(state, bindingObject, keys, result, 0);
+        return result;
+    }
+
+    return PropertyKeyValueVector();
+}
+
+size_t DebuggerOperationsRef::BreakpointOperations::putObject(ObjectRef* object)
+{
+    Object* storedObject = toImpl(object);
+
+    if (m_objectStore == nullptr) {
+        m_objectStore = new ObjectStore();
+        m_objectStore->m_activeObjects.pushBack(storedObject);
+        return 0;
+    }
+
+    size_t size = m_objectStore->m_activeObjects.size();
+
+    for (size_t i = 0; i < size; i++) {
+        if (m_objectStore->m_activeObjects[i] == storedObject) {
+            return i;
+        }
+    }
+
+    m_objectStore->m_activeObjects.pushBack(storedObject);
+    return size;
+}
+
+ObjectRef* DebuggerOperationsRef::BreakpointOperations::getObject(size_t index)
+{
+    if (m_objectStore == nullptr || index >= m_objectStore->m_activeObjects.size()) {
+        return nullptr;
+    }
+
+    return toRef(m_objectStore->m_activeObjects[index]);
+}
+
 StringRef* DebuggerOperationsRef::getFunctionName(WeakCodeRef* weakCodeRef)
 {
     ByteCodeBlock* byteCode = reinterpret_cast<ByteCodeBlock*>(weakCodeRef);
@@ -1341,7 +1557,7 @@ bool DebuggerOperationsRef::updateBreakpoint(WeakCodeRef* weakCodeRef, uint32_t
 
 class DebuggerC : public Debugger {
 public:
-    virtual void parseCompleted(String* source, String* srcName, String* error = nullptr) override;
+    virtual void parseCompleted(String* source, String* srcName, size_t originLineOffset, String* error = nullptr) override;
     virtual void stopAtBreakpoint(ByteCodeBlock* byteCodeBlock, uint32_t offset, ExecutionState* state) override;
     virtual void byteCodeReleaseNotification(ByteCodeBlock* byteCodeBlock) override;
     virtual void exceptionCaught(String* message, SavedStackTraceDataVector& exceptionTrace) override;
@@ -1362,7 +1578,7 @@ private:
     DebuggerOperationsRef::DebuggerClient* m_debuggerClient;
 };
 
-void DebuggerC::parseCompleted(String* source, String* srcName, String* error)
+void DebuggerC::parseCompleted(String* source, String* srcName, size_t originLineOffset, String* error)
 {
     if (error != nullptr) {
         m_debuggerClient->parseError(toRef(source), toRef(srcName), toRef(error));
@@ -1371,6 +1587,18 @@ void DebuggerC::parseCompleted(String* source, String* srcName, String* error)
 
     size_t breakpointLocationsSize = m_breakpointLocationsVector.size();
 
+    if (originLineOffset > 0) {
+        for (size_t i = 0; i < breakpointLocationsSize; i++) {
+            // adjust line offset for manipulated source code
+            // inserted breakpoint's line info should be bigger than `originLineOffset`
+            BreakpointLocationVector& locationVector = m_breakpointLocationsVector[i]->breakpointLocations;
+            for (size_t j = 0; j < locationVector.size(); j++) {
+                ASSERT(locationVector[j].line > originLineOffset);
+                locationVector[j].line -= originLineOffset;
+            }
+        }
+    }
+
     for (size_t i = 0; i < breakpointLocationsSize; i++) {
         InterpretedCodeBlock* codeBlock = reinterpret_cast<InterpretedCodeBlock*>(m_breakpointLocationsVector[i]->weakCodeRef);
 
@@ -2463,7 +2691,7 @@ FunctionObjectRef* FunctionObjectRef::create(ExecutionStateRef* stateRef, Atomic
         newArgv[i] = toImpl(argumentNameArray[i]);
     }
 
-    auto functionSource = FunctionObject::createFunctionScript(state, toImpl(functionName), argumentCount, newArgv, toImpl(body), false, false, false, false);
+    auto functionSource = FunctionObject::createDynamicFunctionScript(state, toImpl(functionName), argumentCount, newArgv, toImpl(body), false, false, false, false);
 
     Object* proto = state.context()->globalObject()->functionPrototype();
     ScriptFunctionObject* result = new ScriptFunctionObject(state, proto, functionSource.codeBlock, functionSource.outerEnvironment, true, false);
@@ -2481,7 +2709,7 @@ FunctionObjectRef* FunctionObjectRef::create(ExecutionStateRef* stateRef, String
         newArgv[i] = toImpl(argumentNameArray[i]);
     }
 
-    auto functionSource = FunctionObject::createFunctionScript(state, toImpl(functionName), argumentCount, newArgv, toImpl(body), false, false, false, false, false, toImpl(sourceName));
+    auto functionSource = FunctionObject::createDynamicFunctionScript(state, toImpl(functionName), argumentCount, newArgv, toImpl(body), false, false, false, false, false, toImpl(sourceName));
 
     Object* proto = state.context()->globalObject()->functionPrototype();
     ScriptFunctionObject* result = new ScriptFunctionObject(state, proto, functionSource.codeBlock, functionSource.outerEnvironment, true, false);
@@ -4068,6 +4296,14 @@ ScriptRef* ScriptParserRef::InitializeScriptResult::fetchScriptThrowsExceptionIf
     return script.value();
 }
 
+ScriptParserRef::InitializeFunctionScriptResult::InitializeFunctionScriptResult()
+    : script()
+    , functionObject()
+    , parseErrorMessage(StringRef::emptyString())
+    , parseErrorCode(ErrorObjectRef::Code::None)
+{
+}
+
 ScriptParserRef::InitializeScriptResult ScriptParserRef::initializeScript(StringRef* source, StringRef* srcName, bool isModule)
 {
     auto internalResult = toImpl(this)->initializeScript(toImpl(source), toImpl(srcName), isModule);
@@ -4082,6 +4318,45 @@ ScriptParserRef::InitializeScriptResult ScriptParserRef::initializeScript(String
     return result;
 }
 
+ScriptParserRef::InitializeFunctionScriptResult ScriptParserRef::initializeFunctionScript(StringRef* sourceName, AtomicStringRef* functionName, size_t argumentCount, ValueRef** argumentNameArray, ValueRef* functionBody)
+{
+    // temporal ExecutionState
+    ExecutionState state(toImpl(this)->context());
+
+    Value* argArray = ALLOCA(sizeof(Value) * argumentCount, Value, state);
+    for (size_t i = 0; i < argumentCount; i++) {
+        argArray[i] = toImpl(argumentNameArray[i]);
+    }
+
+    auto internalResult = FunctionObject::createFunctionScript(state, toImpl(sourceName), toImpl(functionName), argumentCount, argArray, toImpl(functionBody), false);
+
+    ScriptParserRef::InitializeFunctionScriptResult result;
+
+    if (internalResult.script) {
+        Script* script = internalResult.script.value();
+        InterpretedCodeBlock* codeBlock = script->topCodeBlock()->childBlockAt(0);
+
+#ifdef ESCARGOT_DEBUGGER
+        // enable first breakpoint for debugger
+        ASSERT(codeBlock->byteCodeBlock());
+        ByteCodeGenerator::enableFirstBreakPoint(codeBlock->byteCodeBlock());
+#endif
+
+        // create FunctionObject
+        LexicalEnvironment* globalEnvironment = new LexicalEnvironment(new GlobalEnvironmentRecord(state, script->topCodeBlock(), state.context()->globalObject(), state.context()->globalDeclarativeRecord(), state.context()->globalDeclarativeStorage()), nullptr);
+        Object* proto = state.context()->globalObject()->functionPrototype();
+        ScriptFunctionObject* func = new ScriptFunctionObject(state, proto, codeBlock, globalEnvironment, true, false);
+
+        result.script = toRef(internalResult.script.value());
+        result.functionObject = toRef(func);
+    } else {
+        result.parseErrorMessage = toRef(internalResult.parseErrorMessage);
+        result.parseErrorCode = (Escargot::ErrorObjectRef::Code)internalResult.parseErrorCode;
+    }
+
+    return result;
+}
+
 bool ScriptRef::isModule()
 {
     return toImpl(this)->isModule();
index 6a3d6a9bc4b149bc3acab1fa6f3ef8e451f43281..a37e29b36a91c06eb2829a7444b7b79cec0f69bb 100644 (file)
@@ -634,11 +634,13 @@ public:
     typedef void (*OnVMInstanceDelete)(VMInstanceRef* instance);
     void setOnVMInstanceDelete(OnVMInstanceDelete cb);
 
-    // register ErrorCreationCallback which is triggered when each Error constructor (e.g. new TypeError()) invoked
-    // parameter `err` is newly created ErrorObject
-    typedef void (*ErrorCreationCallback)(ExecutionStateRef* state, ErrorObjectRef* err);
-    void registerErrorCreationCallback(ErrorCreationCallback cb);
+    // register ErrorCallback which is triggered when each Error constructor (e.g. new TypeError()) invoked or thrown
+    // parameter `err` stands for the newly created ErrorObject
+    typedef void (*ErrorCallback)(ExecutionStateRef* state, ErrorObjectRef* err);
+    void registerErrorCreationCallback(ErrorCallback cb);
+    void registerErrorThrowCallback(ErrorCallback cb);
     void unregisterErrorCreationCallback();
+    void unregisterErrorThrowCallback();
 
     enum PromiseHookType {
         Init,
@@ -748,6 +750,25 @@ public:
 
     typedef std::vector<ScopeType> LexicalScopeChainVector;
 
+    struct PropertyKeyValue {
+        PropertyKeyValue()
+            : key(nullptr)
+            , value()
+        {
+        }
+
+        PropertyKeyValue(StringRef* key, OptionalRef<ValueRef> value)
+            : key(key)
+            , value(value)
+        {
+        }
+
+        StringRef* key;
+        OptionalRef<ValueRef> value;
+    };
+
+    typedef GCManagedVector<PropertyKeyValue> PropertyKeyValueVector;
+
     class ESCARGOT_EXPORT BreakpointOperations {
         friend class DebuggerC;
 
@@ -767,20 +788,32 @@ public:
             return m_offset;
         }
 
-        StringRef* eval(StringRef* sourceCode, bool& isError);
+        // eval notes:
+        //   - error: the result is the string of the error message, isError is set to true
+        //   - object: the returned string is nullptr, objectRef contains the index of the object
+        //   - other values: the returned string contains the string representation of the value
+        StringRef* eval(StringRef* sourceCode, bool& isError, size_t& objectIndex);
         void getStackTrace(DebuggerStackTraceDataVector& outStackTrace);
         void getLexicalScopeChain(uint32_t stateIndex, LexicalScopeChainVector& outLexicalScopeChain);
+        PropertyKeyValueVector getLexicalScopeChainProperties(uint32_t stateIndex, uint32_t scopeIndex);
+        // Temporary object store for storing inspected objects. All object has an index.
+        size_t putObject(ObjectRef* object);
+        ObjectRef* getObject(size_t index);
 
     private:
+        class ObjectStore;
+
         BreakpointOperations(WeakCodeRef* weakCodeRef, ExecutionStateRef* executionState, uint32_t offset)
             : m_weakCodeRef(weakCodeRef)
             , m_executionState(executionState)
+            , m_objectStore(nullptr)
             , m_offset(offset)
         {
         }
 
         WeakCodeRef* m_weakCodeRef;
         ExecutionStateRef* m_executionState;
+        ObjectStore* m_objectStore;
         uint32_t m_offset;
     };
 
@@ -1991,7 +2024,26 @@ public:
         ScriptRef* fetchScriptThrowsExceptionIfParseError(ExecutionStateRef* state);
     };
 
-    InitializeScriptResult initializeScript(StringRef* sourceCode, StringRef* src, bool isModule = false);
+    struct ESCARGOT_EXPORT InitializeFunctionScriptResult {
+        bool isSuccessful()
+        {
+            return script.hasValue();
+        }
+
+        OptionalRef<ScriptRef> script;
+        OptionalRef<FunctionObjectRef> functionObject;
+
+        StringRef* parseErrorMessage;
+        ErrorObjectRef::Code parseErrorCode;
+
+        InitializeFunctionScriptResult();
+    };
+
+    // parse the input source code and return the result (Script)
+    InitializeScriptResult initializeScript(StringRef* sourceCode, StringRef* srcName, bool isModule = false);
+    // convert the input body source into a function and parse it
+    // generate Script and FunctionObject
+    InitializeFunctionScriptResult initializeFunctionScript(StringRef* sourceName, AtomicStringRef* functionName, size_t argumentCount, ValueRef** argumentNameArray, ValueRef* functionBody);
 };
 
 class ESCARGOT_EXPORT ScriptRef {
index 160cfe1d69160ff99873ef05a3b25e2201752c48..5d1c14107163f66e9c46b8f3a4d25357fb7e4c4c 100644 (file)
@@ -2060,7 +2060,7 @@ void GlobalObject::installArray(ExecutionState& state)
 
     m_array->setFunctionPrototype(state, m_arrayPrototype);
 
-    m_arrayIteratorPrototype = new Object(state, m_iteratorPrototype);
+    m_arrayIteratorPrototype = new PrototypeObject(state, m_iteratorPrototype);
     m_arrayIteratorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_arrayIteratorPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->staticStrings().next),
index 719300e2c0b17dbd62513ad8b5d3ffe22624c302..ca1209dfa60bb3e2877ae01ccd2cc2e5989fdfc4 100644 (file)
@@ -212,7 +212,7 @@ void GlobalObject::installArrayBuffer(ExecutionState& state)
                                      ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(strings->isView, builtinArrayBufferIsView, 1, NativeFunctionInfo::Strict)),
                                                               (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
-    m_arrayBufferPrototype = new Object(state, m_objectPrototype);
+    m_arrayBufferPrototype = new PrototypeObject(state, m_objectPrototype);
     m_arrayBufferPrototype->setGlobalIntrinsicObject(state, true);
 
     m_arrayBufferPrototype->defineOwnProperty(state, ObjectPropertyName(strings->constructor), ObjectPropertyDescriptor(m_arrayBuffer, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
index 04f76cf37309c60a27c8e5e5238c77a99de611d3..7c529e0eea1601a2b6816cffa9851e7a98dc6d73 100644 (file)
@@ -278,7 +278,7 @@ void GlobalObject::installAsyncFromSyncIterator(ExecutionState& state)
     ASSERT(!!m_asyncIteratorPrototype);
 
     // https://www.ecma-international.org/ecma-262/10.0/#sec-%asyncfromsynciteratorprototype%-object
-    m_asyncFromSyncIteratorPrototype = new Object(state, m_asyncIteratorPrototype);
+    m_asyncFromSyncIteratorPrototype = new PrototypeObject(state, m_asyncIteratorPrototype);
     m_asyncFromSyncIteratorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_asyncFromSyncIteratorPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->vmInstance()->globalSymbols().toStringTag),
index 45299a479fa75fd2c9a4591a0da9b5bce3c32286..c66727481ac74c75277ac31ae3a2f94568b9a29d 100644 (file)
@@ -31,7 +31,7 @@ static Value builtinAsyncFunction(ExecutionState& state, Value thisValue, size_t
 {
     size_t argumentVectorCount = argc > 1 ? argc - 1 : 0;
     Value sourceValue = argc >= 1 ? argv[argc - 1] : Value(String::emptyString);
-    auto functionSource = FunctionObject::createFunctionScript(state, state.context()->staticStrings().anonymous, argumentVectorCount, argv, sourceValue, false, false, true, false);
+    auto functionSource = FunctionObject::createDynamicFunctionScript(state, state.context()->staticStrings().anonymous, argumentVectorCount, argv, sourceValue, false, false, true, false);
 
     // Let proto be ? GetPrototypeFromConstructor(newTarget, fallbackProto).
     if (!newTarget.hasValue()) {
@@ -55,7 +55,7 @@ void GlobalObject::installAsyncFunction(ExecutionState& state)
     m_asyncFunction->setGlobalIntrinsicObject(state);
     m_asyncFunction->setPrototype(state, m_function);
 
-    m_asyncFunctionPrototype = new Object(state, m_functionPrototype);
+    m_asyncFunctionPrototype = new PrototypeObject(state, m_functionPrototype);
     m_asyncFunctionPrototype->setGlobalIntrinsicObject(state, true);
     m_asyncFunction->setFunctionPrototype(state, m_asyncFunctionPrototype);
 
index d68fb9baac5d3206e33f6053143e1c6bca3dd682..98df8c7387b6a315ef68bc7dfb104dd8e832eb1d 100644 (file)
@@ -31,7 +31,7 @@ static Value builtinAsyncGeneratorFunction(ExecutionState& state, Value thisValu
 {
     size_t argumentVectorCount = argc > 1 ? argc - 1 : 0;
     Value sourceValue = argc >= 1 ? argv[argc - 1] : Value(String::emptyString);
-    auto functionSource = FunctionObject::createFunctionScript(state, state.context()->staticStrings().anonymous, argumentVectorCount, argv, sourceValue, false, true, true, false);
+    auto functionSource = FunctionObject::createDynamicFunctionScript(state, state.context()->staticStrings().anonymous, argumentVectorCount, argv, sourceValue, false, true, true, false);
 
     // Let proto be ? GetPrototypeFromConstructor(newTarget, fallbackProto).
     if (!newTarget.hasValue()) {
@@ -74,7 +74,7 @@ void GlobalObject::installAsyncGenerator(ExecutionState& state)
     m_asyncGeneratorFunction->setPrototype(state, m_function);
 
     // https://www.ecma-international.org/ecma-262/10.0/index.html#sec-properties-of-asyncgeneratorfunction-prototype
-    m_asyncGenerator = new Object(state, m_functionPrototype);
+    m_asyncGenerator = new PrototypeObject(state, m_functionPrototype);
     m_asyncGenerator->setGlobalIntrinsicObject(state, true);
 
     m_asyncGeneratorFunction->setFunctionPrototype(state, m_asyncGenerator);
@@ -86,7 +86,7 @@ void GlobalObject::installAsyncGenerator(ExecutionState& state)
                                         ObjectPropertyDescriptor(state.context()->staticStrings().AsyncGeneratorFunction.string(), ObjectPropertyDescriptor::ConfigurablePresent));
 
     // https://www.ecma-international.org/ecma-262/10.0/index.html#sec-properties-of-asyncgenerator-prototype
-    m_asyncGeneratorPrototype = new Object(state, m_asyncIteratorPrototype);
+    m_asyncGeneratorPrototype = new PrototypeObject(state, m_asyncIteratorPrototype);
     m_asyncGeneratorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_asyncGenerator->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().prototype), ObjectPropertyDescriptor(m_asyncGeneratorPrototype, ObjectPropertyDescriptor::ConfigurablePresent));
index 8a89d957d5dd5e24424a9d4b8b65e28314a531a9..4d6c818e49b4df8c8922921dd462296b759bcc73 100644 (file)
@@ -491,7 +491,7 @@ void GlobalObject::initializeAtomics(ExecutionState& state)
 
 void GlobalObject::installAtomics(ExecutionState& state)
 {
-    m_atomics = new Object(state);
+    m_atomics = new PrototypeObject(state);
     m_atomics->setGlobalIntrinsicObject(state);
 
     m_atomics->defineOwnPropertyThrowsException(state, ObjectPropertyName(state, Value(state.context()->vmInstance()->globalSymbols().toStringTag)),
index adc89e24586bf396b65fed3854d7f6cf1622cef5..8936fc291d70e6d9fab973ea221835a8c92e9d8f 100644 (file)
@@ -211,7 +211,7 @@ void GlobalObject::installBigInt(ExecutionState& state)
                                 ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().asIntN, builtinBigIntAsIntN, 2, NativeFunctionInfo::Strict)),
                                                          (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
-    m_bigIntPrototype = new Object(state);
+    m_bigIntPrototype = new PrototypeObject(state);
     m_bigIntPrototype->setGlobalIntrinsicObject(state, true);
 
     m_bigIntPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_bigInt, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
index dc8919835c919681edd84b3c335df0512e1c385a..6c54e48828491aff87b97b8c69696b89b4cf634f 100644 (file)
@@ -522,7 +522,7 @@ void GlobalObject::installDate(ExecutionState& state)
     m_date = new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().Date, builtinDateConstructor, 7), NativeFunctionObject::__ForBuiltinConstructor__);
     m_date->setGlobalIntrinsicObject(state);
 
-    m_datePrototype = new Object(state);
+    m_datePrototype = new PrototypeObject(state);
     m_datePrototype->setGlobalIntrinsicObject(state, true);
 
     m_datePrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_date, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
index 3745b8e7da422e21774e9321ec046da1a3f31b43..4157bd0111ab9b3de12796cba3c98c60bddf4ee9 100644 (file)
@@ -224,7 +224,7 @@ void GlobalObject::installError(ExecutionState& state)
     m_error = new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().Error, builtinErrorConstructor, 1), NativeFunctionObject::__ForBuiltinConstructor__);
     m_error->setGlobalIntrinsicObject(state);
 
-    m_errorPrototype = new Object(state);
+    m_errorPrototype = new PrototypeObject(state);
     m_errorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_error->setFunctionPrototype(state, m_errorPrototype);
@@ -252,7 +252,7 @@ void GlobalObject::installError(ExecutionState& state)
 #define DEFINE_ERROR(errorname, bname, length)                                                                                                                                                                                                                                                                                          \
     m_##errorname##Error = new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().bname##Error, builtin##bname##ErrorConstructor, length), NativeFunctionObject::__ForBuiltinConstructor__);                                                                                                               \
     m_##errorname##Error->setPrototype(state, m_error);                                                                                                                                                                                                                                                                                 \
-    m_##errorname##ErrorPrototype = new Object(state, m_errorPrototype);                                                                                                                                                                                                                                                                \
+    m_##errorname##ErrorPrototype = new PrototypeObject(state, m_errorPrototype);                                                                                                                                                                                                                                                       \
     m_##errorname##ErrorPrototype->setGlobalIntrinsicObject(state, true);                                                                                                                                                                                                                                                               \
     m_##errorname##ErrorPrototype->defineOwnProperty(state, state.context()->staticStrings().constructor, ObjectPropertyDescriptor(m_##errorname##Error, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectStructurePropertyDescriptor::ConfigurablePresent)));                            \
     m_##errorname##ErrorPrototype->defineOwnProperty(state, state.context()->staticStrings().message, ObjectPropertyDescriptor(String::emptyString, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectStructurePropertyDescriptor::ConfigurablePresent)));                                 \
index 312691f7188827e24da37d6445d2d6f561fb043b..01d3011b80ec9915f0787518dbf01674b54af620 100644 (file)
@@ -116,7 +116,7 @@ void GlobalObject::installFinalizationRegistry(ExecutionState& state)
     m_finalizationRegistry = new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().FinalizationRegistry, builtinFinalizationRegistryConstructor, 1), NativeFunctionObject::__ForBuiltinConstructor__);
     m_finalizationRegistry->setGlobalIntrinsicObject(state);
 
-    m_finalizationRegistryPrototype = new Object(state, m_objectPrototype);
+    m_finalizationRegistryPrototype = new PrototypeObject(state, m_objectPrototype);
     m_finalizationRegistryPrototype->setGlobalIntrinsicObject(state, true);
     m_finalizationRegistryPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_finalizationRegistry, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
index 14a53e6d55044134037685b4fb5714819cc68499..68fdeebad5ee90811fc7cc78b6359e263fb5e3ba 100644 (file)
@@ -47,7 +47,7 @@ static Value builtinFunctionConstructor(ExecutionState& state, Value thisValue,
 
     size_t argumentVectorCount = argc > 1 ? argc - 1 : 0;
     Value sourceValue = argc >= 1 ? argv[argc - 1] : Value(String::emptyString);
-    auto functionSource = FunctionObject::createFunctionScript(state, state.context()->staticStrings().anonymous, argumentVectorCount, argv, sourceValue, false, false, false, false);
+    auto functionSource = FunctionObject::createDynamicFunctionScript(state, state.context()->staticStrings().anonymous, argumentVectorCount, argv, sourceValue, false, false, false, false);
 
     // Let proto be ? GetPrototypeFromConstructor(newTarget, fallbackProto).
     if (!newTarget.hasValue()) {
index c91dd1fa6bb8b64f0d7b3be4501c9280d8f2f037..cb78fe3211d962ce08ed133aec0c5701d6efae68 100644 (file)
@@ -31,7 +31,7 @@ static Value builtinGeneratorFunction(ExecutionState& state, Value thisValue, si
 {
     size_t argumentVectorCount = argc > 1 ? argc - 1 : 0;
     Value sourceValue = argc >= 1 ? argv[argc - 1] : Value(String::emptyString);
-    auto functionSource = FunctionObject::createFunctionScript(state, state.context()->staticStrings().anonymous, argumentVectorCount, argv, sourceValue, false, true, false, false);
+    auto functionSource = FunctionObject::createDynamicFunctionScript(state, state.context()->staticStrings().anonymous, argumentVectorCount, argv, sourceValue, false, true, false, false);
 
     // Let proto be ? GetPrototypeFromConstructor(newTarget, fallbackProto).
     if (!newTarget.hasValue()) {
@@ -90,7 +90,7 @@ void GlobalObject::installGenerator(ExecutionState& state)
     }
 
     // %GeneratorPrototype% : The initial value of the prototype property of %Generator%
-    m_generatorPrototype = new Object(state, m_iteratorPrototype);
+    m_generatorPrototype = new PrototypeObject(state, m_iteratorPrototype);
     m_generatorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_generator->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().prototype), ObjectPropertyDescriptor(m_generatorPrototype, ObjectPropertyDescriptor::ConfigurablePresent));
index 078fe2d0331c434ac52542f3cd9aeccc46ce7bdb..7a0aafa26f70e072ba9502272010e48a9260258d 100644 (file)
@@ -264,7 +264,7 @@ void GlobalObject::installMap(ExecutionState& state)
     ObjectPropertyDescriptor desc(gs, ObjectPropertyDescriptor::ConfigurablePresent);
     m_mapPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().size), desc);
 
-    m_mapIteratorPrototype = new Object(state, m_iteratorPrototype);
+    m_mapIteratorPrototype = new PrototypeObject(state, m_iteratorPrototype);
     m_mapIteratorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_mapIteratorPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->staticStrings().next),
index c9b68a36a8f8cbf0bec070e0cda8b8d482c39afc..7cea21078afac7961e78be51f488ddc3f47913c0 100644 (file)
@@ -767,7 +767,7 @@ void GlobalObject::installPromise(ExecutionState& state)
         m_promise->defineOwnProperty(state, ObjectPropertyName(state.context()->vmInstance()->globalSymbols().species), desc);
     }
 
-    m_promisePrototype = new Object(state);
+    m_promisePrototype = new PrototypeObject(state);
     m_promisePrototype->setGlobalIntrinsicObject(state, true);
 
     m_promisePrototype->defineOwnProperty(state, ObjectPropertyName(strings->constructor), ObjectPropertyDescriptor(m_promise, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
index 1f1f44c0dd52ce7cec09a6dddfbe38ad1d7ce94e..68bcf422dc421a8e30ba3b474be37ef9bc5a16c0 100644 (file)
@@ -829,7 +829,7 @@ void GlobalObject::installRegExp(ExecutionState& state)
 
     REGEXP_LEGACY_DOLLAR_NUMBER_FEATURES(DEFINE_LEGACY_DOLLAR_NUMBER_ATTR);
 
-    m_regexpPrototype = new Object(state);
+    m_regexpPrototype = new PrototypeObject(state);
     m_regexpPrototype->setGlobalIntrinsicObject(state, true);
 
     {
@@ -928,7 +928,7 @@ void GlobalObject::installRegExp(ExecutionState& state)
     m_regexpPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->vmInstance()->globalSymbols().matchAll),
                                                         ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(strings->symbolMatchAll, builtinRegExpMatchAll, 1, NativeFunctionInfo::Strict)), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
-    m_regexpStringIteratorPrototype = new Object(state, m_iteratorPrototype);
+    m_regexpStringIteratorPrototype = new PrototypeObject(state, m_iteratorPrototype);
     m_regexpStringIteratorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_regexpStringIteratorPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->staticStrings().next),
index 0c37e187b6e9968ade8457d9ddc9ad6ecce7dded..822646cf9d6dcdaf47d52318b43f39a4b116dc3e 100644 (file)
@@ -207,7 +207,7 @@ void GlobalObject::installSet(ExecutionState& state)
         m_set->defineOwnProperty(state, ObjectPropertyName(state.context()->vmInstance()->globalSymbols().species), desc);
     }
 
-    m_setPrototype = new Object(state);
+    m_setPrototype = new PrototypeObject(state);
     m_setPrototype->setGlobalIntrinsicObject(state, true);
     m_setPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_set, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
@@ -245,7 +245,7 @@ void GlobalObject::installSet(ExecutionState& state)
     ObjectPropertyDescriptor desc(gs, ObjectPropertyDescriptor::ConfigurablePresent);
     m_setPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().size), desc);
 
-    m_setIteratorPrototype = new Object(state, m_iteratorPrototype);
+    m_setIteratorPrototype = new PrototypeObject(state, m_iteratorPrototype);
     m_setIteratorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_setIteratorPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->staticStrings().next),
index ac8dc78424194fc53e21f9c0c58dab10c572cde3..15d4962cf760c9c168c0e0d72dc9d85354256f0a 100644 (file)
@@ -153,7 +153,7 @@ void GlobalObject::installSharedArrayBuffer(ExecutionState& state)
     m_sharedArrayBuffer = new NativeFunctionObject(state, NativeFunctionInfo(strings->SharedArrayBuffer, builtinSharedArrayBufferConstructor, 1), NativeFunctionObject::__ForBuiltinConstructor__);
     m_sharedArrayBuffer->setGlobalIntrinsicObject(state);
 
-    m_sharedArrayBufferPrototype = new Object(state, m_objectPrototype);
+    m_sharedArrayBufferPrototype = new PrototypeObject(state, m_objectPrototype);
     m_sharedArrayBufferPrototype->setGlobalIntrinsicObject(state, true);
 
     m_sharedArrayBufferPrototype->defineOwnProperty(state, ObjectPropertyName(strings->constructor), ObjectPropertyDescriptor(m_sharedArrayBuffer, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
index 2407a3f3f24769be540394cd345942f777055f80..178ff624c499d8dac3f92fa99710e932ab69b09a 100644 (file)
@@ -1812,7 +1812,7 @@ void GlobalObject::installString(ExecutionState& state)
 
     m_string->setFunctionPrototype(state, m_stringPrototype);
 
-    m_stringIteratorPrototype = new Object(state, m_iteratorPrototype);
+    m_stringIteratorPrototype = new PrototypeObject(state, m_iteratorPrototype);
     m_stringIteratorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_stringIteratorPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->staticStrings().next),
index d859031fa48ef9e7fb55b2a581864632dd4183af..8740a74e8686f3f15a1ef378f08d2f2bc60149f6 100644 (file)
@@ -148,7 +148,7 @@ void GlobalObject::installSymbol(ExecutionState& state)
                                 ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().keyFor, builtinSymbolKeyFor, 1, NativeFunctionInfo::Strict)),
                                                          (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
-    m_symbolPrototype = new Object(state);
+    m_symbolPrototype = new PrototypeObject(state);
     m_symbolPrototype->setGlobalIntrinsicObject(state, true);
 
     m_symbolPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_symbol, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
index 39c8825775d0e341ab67bc0e083655d120c82db4..dc8022fb484aa5b3769314b44fca82ad474101b6 100644 (file)
@@ -155,7 +155,7 @@ void GlobalObject::installWeakMap(ExecutionState& state)
     m_weakMap = new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().WeakMap, builtinWeakMapConstructor, 0), NativeFunctionObject::__ForBuiltinConstructor__);
     m_weakMap->setGlobalIntrinsicObject(state);
 
-    m_weakMapPrototype = new Object(state, m_objectPrototype);
+    m_weakMapPrototype = new PrototypeObject(state, m_objectPrototype);
     m_weakMapPrototype->setGlobalIntrinsicObject(state, true);
     m_weakMapPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_weakMap, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
index b0dbcaff433b0efd096430d58480be1bbba7c151..ca8a84f4a5d07b497bca2545195f8bb0bfc77081 100644 (file)
@@ -72,7 +72,7 @@ void GlobalObject::installWeakRef(ExecutionState& state)
     m_weakRef = new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().WeakRef, builtinWeakRefConstructor, 1), NativeFunctionObject::__ForBuiltinConstructor__);
     m_weakRef->setGlobalIntrinsicObject(state);
 
-    m_weakRefPrototype = new Object(state, m_objectPrototype);
+    m_weakRefPrototype = new PrototypeObject(state, m_objectPrototype);
     m_weakRefPrototype->setGlobalIntrinsicObject(state, true);
     m_weakRefPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_weakRef, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
index 5a72891fe750c29d35f8d1fc6fda214efedecd2a..e5ceaa5e08c5b8caa257c5194f9358e7d0195813 100644 (file)
@@ -143,7 +143,7 @@ void GlobalObject::installWeakSet(ExecutionState& state)
     m_weakSet = new NativeFunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().WeakSet, builtinWeakSetConstructor, 0), NativeFunctionObject::__ForBuiltinConstructor__);
     m_weakSet->setGlobalIntrinsicObject(state);
 
-    m_weakSetPrototype = new Object(state);
+    m_weakSetPrototype = new PrototypeObject(state);
     m_weakSetPrototype->setGlobalIntrinsicObject(state, true);
 
     m_weakSetPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_weakSet, (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
index 1c284c6d09557f8a29f832ddaec00cf8a669408c..2a14db21f16b5b67ab24d14506383388e09f5600 100644 (file)
@@ -221,7 +221,8 @@ void CodeCacheWriter::storeInterpretedCodeBlock(InterpretedCodeBlock* codeBlock)
     m_buffer.put(codeBlock->m_functionBodyBlockIndex);
     m_buffer.put(codeBlock->m_lexicalBlockIndexFunctionLocatedIn);
 
-    m_buffer.ensureSize(30 * sizeof(bool));
+    m_buffer.ensureSize(31 * sizeof(bool));
+    m_buffer.put(codeBlock->m_isFunctionNameUsedBySelf);
     m_buffer.put(codeBlock->m_isFunctionNameSaveOnHeap);
     m_buffer.put(codeBlock->m_isFunctionNameExplicitlyDeclared);
     m_buffer.put(codeBlock->m_canUseIndexedVariableStorage);
@@ -294,10 +295,11 @@ void CodeCacheWriter::storeByteCodeBlock(ByteCodeBlock* block)
 
     size_t size = 0;
 
-    m_buffer.ensureSize(2 * sizeof(bool) + sizeof(uint16_t));
+    m_buffer.ensureSize(2 * sizeof(bool) + 2 * sizeof(uint16_t));
     m_buffer.put(block->m_shouldClearStack);
     m_buffer.put(block->m_isOwnerMayFreed);
-    m_buffer.put((uint16_t)block->m_requiredRegisterFileSizeInValueSize);
+    m_buffer.put((uint16_t)block->m_requiredOperandRegisterNumber);
+    m_buffer.put((uint16_t)block->m_requiredTotalRegisterNumber);
 
     // ByteCodeBlock::m_numeralLiteralData
     ByteCodeNumeralLiteralData& numeralLiteralData = block->m_numeralLiteralData;
@@ -581,7 +583,7 @@ void CodeCacheWriter::storeByteCodeStream(ByteCodeBlock* block)
             }
             case GetObjectPreComputedCaseOpcode: {
                 GetObjectPreComputedCase* bc = static_cast<GetObjectPreComputedCase*>(currentCode);
-                ASSERT(!bc->m_inlineCache);
+                ASSERT(!bc->hasInlineCache());
                 ASSERT(bc->m_propertyName.hasAtomicString());
                 STORE_ATOMICSTRING_RELOC(m_propertyName.asAtomicString());
                 break;
@@ -767,6 +769,7 @@ InterpretedCodeBlock* CodeCacheReader::loadInterpretedCodeBlock(Context* context
     codeBlock->m_functionBodyBlockIndex = m_buffer.get<LexicalBlockIndex>();
     codeBlock->m_lexicalBlockIndexFunctionLocatedIn = m_buffer.get<LexicalBlockIndex>();
 
+    codeBlock->m_isFunctionNameUsedBySelf = m_buffer.get<bool>();
     codeBlock->m_isFunctionNameSaveOnHeap = m_buffer.get<bool>();
     codeBlock->m_isFunctionNameExplicitlyDeclared = m_buffer.get<bool>();
     codeBlock->m_canUseIndexedVariableStorage = m_buffer.get<bool>();
@@ -839,7 +842,8 @@ ByteCodeBlock* CodeCacheReader::loadByteCodeBlock(Context* context, InterpretedC
 
     block->m_shouldClearStack = m_buffer.get<bool>();
     block->m_isOwnerMayFreed = m_buffer.get<bool>();
-    block->m_requiredRegisterFileSizeInValueSize = m_buffer.get<uint16_t>();
+    block->m_requiredOperandRegisterNumber = m_buffer.get<uint16_t>();
+    block->m_requiredTotalRegisterNumber = m_buffer.get<uint16_t>();
 
     // ByteCodeBlock::m_numeralLiteralData
     ByteCodeNumeralLiteralData& numeralLiteralData = block->m_numeralLiteralData;
@@ -1149,7 +1153,7 @@ void CodeCacheReader::loadByteCodeStream(Context* context, ByteCodeBlock* block)
             }
             case GetObjectPreComputedCaseOpcode: {
                 GetObjectPreComputedCase* bc = static_cast<GetObjectPreComputedCase*>(currentCode);
-                ASSERT(!bc->m_inlineCache);
+                ASSERT(!bc->hasInlineCache());
                 LOAD_ATOMICSTRING_RELOC(m_propertyName);
                 break;
             }
index e0a3cbbc3631c71a79f02681a55d80a6dc08328a..27acd7446a485b7df904b43872516c1d27bdb088 100644 (file)
@@ -95,7 +95,7 @@ void DebuggerRemote::sendPointer(uint8_t type, const void* ptr)
     send(type, (void*)&ptr, sizeof(void*));
 }
 
-void DebuggerRemote::parseCompleted(String* source, String* srcName, String* error)
+void DebuggerRemote::parseCompleted(String* source, String* srcName, size_t originLineOffset, String* error)
 {
     if (!enabled()) {
         return;
@@ -124,6 +124,18 @@ void DebuggerRemote::parseCompleted(String* source, String* srcName, String* err
 
     size_t breakpointLocationsSize = m_breakpointLocationsVector.size();
 
+    if (originLineOffset > 0) {
+        for (size_t i = 0; i < breakpointLocationsSize; i++) {
+            // adjust line offset for manipulated source code
+            // inserted breakpoint's line info should be bigger than `originLineOffset`
+            BreakpointLocationVector& locationVector = m_breakpointLocationsVector[i]->breakpointLocations;
+            for (size_t j = 0; j < locationVector.size(); j++) {
+                ASSERT(locationVector[j].line > originLineOffset);
+                locationVector[j].line -= originLineOffset;
+            }
+        }
+    }
+
     for (size_t i = 0; i < breakpointLocationsSize; i++) {
         /* Send breakpoint locations. */
         const size_t maxPacketLength = (ESCARGOT_DEBUGGER_MAX_MESSAGE_LENGTH - 1) / sizeof(BreakpointLocation);
@@ -157,7 +169,8 @@ void DebuggerRemote::parseCompleted(String* source, String* srcName, String* err
 
         /* Send function info. */
         char* byteCodeStart = codeBlock->byteCodeBlock()->m_code.data();
-        uint32_t startLine = (uint32_t)codeBlock->functionStart().line;
+        // adjust startLine with originLineOffset
+        uint32_t startLine = (uint32_t)codeBlock->functionStart().line - originLineOffset;
         uint32_t startColumn = (uint32_t)(codeBlock->functionStart().column + 1);
         FunctionInfo functionInfo;
 
index 6139d3289ee170e470aa3445f65bc801b25329ec..07a3c91d36548e66f02dbcf3e8df9f0b07609746 100644 (file)
@@ -56,8 +56,8 @@ public:
         {
         }
 
-        uint32_t line;
-        uint32_t offset;
+        uint32_t line; // source code line
+        uint32_t offset; // bytecode offset
     };
 
     typedef std::vector<BreakpointLocation> BreakpointLocationVector;
@@ -156,7 +156,7 @@ public:
 
     static void createDebuggerRemote(const char* options, Context* context);
 
-    virtual void parseCompleted(String* source, String* srcName, String* error = nullptr) = 0;
+    virtual void parseCompleted(String* source, String* srcName, size_t originLineOffset, String* error = nullptr) = 0;
     virtual void stopAtBreakpoint(ByteCodeBlock* byteCodeBlock, uint32_t offset, ExecutionState* state) = 0;
     virtual void byteCodeReleaseNotification(ByteCodeBlock* byteCodeBlock) = 0;
     virtual void exceptionCaught(String* message, SavedStackTraceDataVector& exceptionTrace) = 0;
@@ -345,7 +345,7 @@ public:
     void sendPointer(uint8_t type, const void* ptr);
 
     virtual void init(const char* options, Context* context) = 0;
-    virtual void parseCompleted(String* source, String* srcName, String* error = nullptr) override;
+    virtual void parseCompleted(String* source, String* srcName, size_t originLineOffset, String* error = nullptr) override;
     virtual void stopAtBreakpoint(ByteCodeBlock* byteCodeBlock, uint32_t offset, ExecutionState* state) override;
     virtual void byteCodeReleaseNotification(ByteCodeBlock* byteCodeBlock) override;
     virtual void exceptionCaught(String* message, SavedStackTraceDataVector& exceptionTrace) override;
index 769c8c315c8d3e1f4a272744f173449eca6fd386..a5a8f89e3e7ec3064970237cdbd3f7210cb85869 100644 (file)
@@ -116,7 +116,7 @@ static bool tcpSend(EscargotSocket socket, const uint8_t* message, size_t messag
 #ifdef OS_POSIX
         ssize_t result = recv(socket, NULL, 0, MSG_PEEK);
 
-        if (result == 0 && errno != ESCARGOT_EWOULDBLOCK) {
+        if (result == 0 && (errno != ESCARGOT_EWOULDBLOCK && errno != 0)) {
             tcpLogError(tcpGetErrno());
             return false;
         }
index 364c10e48f81fc3e7edf11f9cba3817f0deb1df5..96eb57953d5f0d53630c4aa8f66e76293e5a9e24 100644 (file)
@@ -87,6 +87,14 @@ void getNextValidInGetObjectInlineCacheDataVector(GC_word* ptr, GC_word* end, GC
     *to = (GC_word*)current->m_cachedhiddenClassChain;
 }
 
+void getNextValidInSetObjectInlineCacheDataVector(GC_word* ptr, GC_word* end, GC_word** next_ptr, GC_word** from, GC_word** to)
+{
+    SetObjectInlineCacheData* current = (SetObjectInlineCacheData*)ptr;
+    *next_ptr = (GC_word*)((size_t)ptr + sizeof(SetObjectInlineCacheData));
+    *from = (GC_word*)&current->m_cachedHiddenClassChainData;
+    *to = (GC_word*)current->m_cachedHiddenClassChainData;
+}
+
 #if defined(ESCARGOT_64) && defined(ESCARGOT_USE_32BIT_IN_64BIT)
 void getNextValidInEncodedSmallValueVector(GC_word* ptr, GC_word* end, GC_word** next_ptr, GC_word** from, GC_word** to)
 {
@@ -249,6 +257,11 @@ void initializeCustomAllocators()
                                                                                 FALSE,
                                                                                 TRUE);
 
+    s_gcKinds[HeapObjectKind::SetObjectInlineCacheDataVectorKind] = GC_new_kind(GC_new_free_list(),
+                                                                                GC_MAKE_PROC(GC_new_proc(markAndPushCustomIterable<getNextValidInSetObjectInlineCacheDataVector>), 0),
+                                                                                FALSE,
+                                                                                TRUE);
+
 #if defined(ESCARGOT_64) && defined(ESCARGOT_USE_32BIT_IN_64BIT)
     s_gcKinds[HeapObjectKind::EncodedSmallValueVectorKind] = GC_new_kind(GC_new_free_list(),
                                                                          GC_MAKE_PROC(GC_new_proc(markAndPushCustomIterable<getNextValidInEncodedSmallValueVector>), 0),
@@ -371,6 +384,20 @@ GetObjectInlineCacheData* CustomAllocator<GetObjectInlineCacheData>::allocate(si
     return ret;
 }
 
+template <>
+SetObjectInlineCacheData* CustomAllocator<SetObjectInlineCacheData>::allocate(size_type GC_n, const void*)
+{
+    // Un-comment this to use default allocator
+    // return (Value*)GC_MALLOC(sizeof(SetObjectInlineCacheData) * GC_n);
+    // typed calloc test
+    int kind = s_gcKinds[HeapObjectKind::SetObjectInlineCacheDataVectorKind];
+    size_t size = sizeof(SetObjectInlineCacheData) * GC_n;
+
+    SetObjectInlineCacheData* ret;
+    ret = (SetObjectInlineCacheData*)GC_GENERIC_MALLOC(size, kind);
+    return ret;
+}
+
 #if defined(ESCARGOT_64) && defined(ESCARGOT_USE_32BIT_IN_64BIT)
 template <>
 EncodedSmallValue* CustomAllocator<EncodedSmallValue>::allocate(size_type GC_n, const void*)
index ab000b4f9f797695b3b18272b87f65ab1ef8c4a9..6234384f4e4c8b88104a1db70b2f3ddd34aa43be 100644 (file)
@@ -50,6 +50,7 @@ class ExecutionState;
 enum HeapObjectKind : unsigned {
     ValueVectorKind = 0,
     GetObjectInlineCacheDataVectorKind,
+    SetObjectInlineCacheDataVectorKind,
 #if defined(ESCARGOT_64) && defined(ESCARGOT_USE_32BIT_IN_64BIT)
     EncodedSmallValueVectorKind,
 #endif
index cd28c63ee6bdfa8f3ac38f08c5831cd4d04f090a..69a661ea794387695213fd622088c4234a0ed4c7 100644 (file)
@@ -107,7 +107,8 @@ void SetGlobalVariable::dump()
 ByteCodeBlock::ByteCodeBlock()
     : m_shouldClearStack(false)
     , m_isOwnerMayFreed(false)
-    , m_requiredRegisterFileSizeInValueSize(2)
+    , m_requiredOperandRegisterNumber(2)
+    , m_requiredTotalRegisterNumber(0)
     , m_inlineCacheDataSize(0)
     , m_codeBlock(nullptr)
 {
@@ -117,8 +118,8 @@ ByteCodeBlock::ByteCodeBlock()
 static void clearByteCodeBlock(ByteCodeBlock* self)
 {
 #ifdef ESCARGOT_DEBUGGER
-    Debugger* debugger = self->m_codeBlock->context()->debugger();
-    if (debugger != nullptr) {
+    Debugger* debugger = self->codeBlock()->context()->debugger();
+    if (debugger != nullptr && self->codeBlock()->markDebugging()) {
         debugger->byteCodeReleaseNotification(self);
     }
 #endif
@@ -135,7 +136,8 @@ static void clearByteCodeBlock(ByteCodeBlock* self)
 ByteCodeBlock::ByteCodeBlock(InterpretedCodeBlock* codeBlock)
     : m_shouldClearStack(false)
     , m_isOwnerMayFreed(false)
-    , m_requiredRegisterFileSizeInValueSize(2)
+    , m_requiredOperandRegisterNumber(2)
+    , m_requiredTotalRegisterNumber(0)
     , m_inlineCacheDataSize(0)
     , m_codeBlock(codeBlock)
 {
@@ -229,6 +231,11 @@ ExtendedNodeLOC ByteCodeBlock::computeNodeLOC(StringView src, ExtendedNodeLOC so
             column = 1;
         }
     }
+
+    // subtract `originSourceLineOffset` for line offset
+    ASSERT(line > codeBlock()->script()->originSourceLineOffset());
+    line -= codeBlock()->script()->originSourceLineOffset();
+
     return ExtendedNodeLOC(line, column, index);
 }
 
@@ -325,14 +332,30 @@ void ByteCodeBlock::pushPauseStatementExtraData(ByteCodeGenerateContext* context
     }
 }
 
-void* GetObjectInlineCache::operator new(size_t size)
+void* GetObjectInlineCacheSimpleCase::operator new(size_t size)
+{
+    static MAY_THREAD_LOCAL bool typeInited = false;
+    static MAY_THREAD_LOCAL GC_descr descr;
+    if (!typeInited) {
+        GC_word obj_bitmap[GC_BITMAP_SIZE(GetObjectInlineCacheSimpleCase)] = { 0 };
+        for (size_t i = 0; i < inlineBufferSize; i++) {
+            GC_set_bit(obj_bitmap, GC_WORD_OFFSET(GetObjectInlineCacheSimpleCase, m_cachedStructures) + i);
+        }
+        descr = GC_make_descriptor(obj_bitmap, GC_WORD_LEN(GetObjectInlineCacheSimpleCase));
+        typeInited = true;
+    }
+
+    return GC_MALLOC_EXPLICITLY_TYPED(size, descr);
+}
+
+void* GetObjectInlineCacheComplexCase::operator new(size_t size)
 {
     static MAY_THREAD_LOCAL bool typeInited = false;
     static MAY_THREAD_LOCAL GC_descr descr;
     if (!typeInited) {
-        GC_word obj_bitmap[GC_BITMAP_SIZE(GetObjectInlineCache)] = { 0 };
-        GC_set_bit(obj_bitmap, GC_WORD_OFFSET(GetObjectInlineCache, m_cache));
-        descr = GC_make_descriptor(obj_bitmap, GC_WORD_LEN(GetObjectInlineCache));
+        GC_word obj_bitmap[GC_BITMAP_SIZE(GetObjectInlineCacheComplexCase)] = { 0 };
+        GC_set_bit(obj_bitmap, GC_WORD_OFFSET(GetObjectInlineCacheComplexCase, m_cache));
+        descr = GC_make_descriptor(obj_bitmap, GC_WORD_LEN(GetObjectInlineCacheComplexCase));
         typeInited = true;
     }
     return GC_MALLOC_EXPLICITLY_TYPED(size, descr);
@@ -344,8 +367,7 @@ void* SetObjectInlineCache::operator new(size_t size)
     static MAY_THREAD_LOCAL GC_descr descr;
     if (!typeInited) {
         GC_word obj_bitmap[GC_BITMAP_SIZE(SetObjectInlineCache)] = { 0 };
-        GC_set_bit(obj_bitmap, GC_WORD_OFFSET(SetObjectInlineCache, m_cachedHiddenClassChainData));
-        GC_set_bit(obj_bitmap, GC_WORD_OFFSET(SetObjectInlineCache, m_hiddenClassWillBe));
+        GC_set_bit(obj_bitmap, GC_WORD_OFFSET(SetObjectInlineCache, m_cache));
         descr = GC_make_descriptor(obj_bitmap, GC_WORD_LEN(SetObjectInlineCache));
         typeInited = true;
     }
index 0e2af167a69fe16c18c7d9ff22bdc8d95f0451f9..5bbfe9a42b0140aaeccad37ef248a2f3e9f064ac 100644 (file)
@@ -130,6 +130,7 @@ struct GlobalVariableAccessCacheItem;
     F(ReplaceBlockLexicalEnvironmentOperation, 0, 0)        \
     F(TaggedTemplateOperation, 0, 0)                        \
     F(EnsureArgumentsObject, 0, 0)                          \
+    F(BindingCalleeIntoRegister, 0, 0)                      \
     F(ResolveNameAddress, 1, 0)                             \
     F(StoreByNameWithAddress, 0, 1)                         \
     F(End, 0, 0)
@@ -899,6 +900,8 @@ public:
 #endif
 };
 
+COMPILE_ASSERT(sizeof(BreakpointDisabled) == sizeof(BreakpointEnabled), "");
+
 class CreateObject : public ByteCode {
 public:
     CreateObject(const ByteCodeLOC& loc, const size_t registerIndex)
@@ -1130,10 +1133,7 @@ struct GetObjectInlineCacheData {
         m_cachedIndex = 0;
     }
 
-    union {
-        ObjectStructure** m_cachedhiddenClassChain;
-        ObjectStructure* m_cachedhiddenClass;
-    };
+    ObjectStructure** m_cachedhiddenClassChain;
     bool m_isPlainDataProperty : 1;
     // 15bits of storage is enough
     // inlineCacheProtoTraverseMaxCount is so small
@@ -1144,8 +1144,8 @@ struct GetObjectInlineCacheData {
 
 typedef Vector<GetObjectInlineCacheData, CustomAllocator<GetObjectInlineCacheData>, ComputeReservedCapacityFunctionWithLog2<>> GetObjectInlineCacheDataVector;
 
-struct GetObjectInlineCache {
-    GetObjectInlineCache()
+struct GetObjectInlineCacheComplexCase {
+    GetObjectInlineCacheComplexCase()
     {
     }
 
@@ -1155,27 +1155,58 @@ struct GetObjectInlineCache {
     GetObjectInlineCacheDataVector m_cache;
 };
 
+struct GetObjectInlineCacheSimpleCase : public gc {
+    GetObjectInlineCacheSimpleCase()
+    {
+        memset(this, 0, sizeof(GetObjectInlineCacheSimpleCase));
+    }
+
+    void* operator new(size_t size);
+    void* operator new[](size_t size) = delete;
+
+    static constexpr size_t inlineBufferSize = 3;
+
+    ObjectStructure* m_cachedStructures[inlineBufferSize];
+    uint8_t m_cachedIndexes[inlineBufferSize];
+};
+
 class GetObjectPreComputedCase : public ByteCode {
 public:
     // [object] -> [value]
     GetObjectPreComputedCase(const ByteCodeLOC& loc, const size_t objectRegisterIndex, const size_t storeRegisterIndex, ObjectStructurePropertyName propertyName)
         : ByteCode(Opcode::GetObjectPreComputedCaseOpcode, loc)
+        , m_inlineCacheMode(None)
         , m_isLength(propertyName.plainString()->equals("length"))
         , m_inlineCacheProtoTraverseMaxIndex(0)
         , m_cacheMissCount(0)
-        , m_inlineCache(nullptr)
+        , m_simpleInlineCache(nullptr)
         , m_objectRegisterIndex(objectRegisterIndex)
         , m_storeRegisterIndex(storeRegisterIndex)
         , m_propertyName(propertyName)
     {
     }
 
+    bool hasInlineCache() const
+    {
+        return !!m_simpleInlineCache;
+    }
+
     static constexpr size_t inlineCacheProtoTraverseMaxCount = 12;
 
+    enum GetInlineCacheMode {
+        None,
+        Simple,
+        Complex
+    };
+
+    GetInlineCacheMode m_inlineCacheMode : 2;
     bool m_isLength : 1;
     unsigned char m_inlineCacheProtoTraverseMaxIndex : 8;
     size_t m_cacheMissCount : 16;
-    GetObjectInlineCache* m_inlineCache;
+    union {
+        GetObjectInlineCacheSimpleCase* m_simpleInlineCache;
+        GetObjectInlineCacheComplexCase* m_complexInlineCache;
+    };
 
     ByteCodeRegisterIndex m_objectRegisterIndex;
     ByteCodeRegisterIndex m_storeRegisterIndex;
@@ -1188,28 +1219,32 @@ public:
 #endif
 };
 
-struct SetObjectInlineCache {
+struct SetObjectInlineCacheData {
+    SetObjectInlineCacheData()
+    {
+        m_cachedHiddenClass = nullptr;
+        m_cachedIndex = m_cachedhiddenClassChainLength = 0;
+    }
+
     union {
         ObjectStructure** m_cachedHiddenClassChainData;
         ObjectStructure* m_cachedHiddenClass;
     };
-    size_t m_cachedhiddenClassChainLength;
-    union {
-        size_t m_cachedIndex;
-        ObjectStructure* m_hiddenClassWillBe;
-    };
+    // 16bits of storage is enough
+    // inlineCacheProtoTraverseMaxCount is so small
+    uint16_t m_cachedhiddenClassChainLength : 16;
+    static constexpr size_t inlineCacheCachedIndexMax = std::numeric_limits<uint16_t>::max();
+    uint16_t m_cachedIndex : 16;
+};
 
+typedef Vector<SetObjectInlineCacheData, CustomAllocator<SetObjectInlineCacheData>, ComputeReservedCapacityFunctionWithLog2<>> SetObjectInlineCacheDataVector;
+
+struct SetObjectInlineCache {
     SetObjectInlineCache()
     {
-        m_cachedHiddenClass = m_hiddenClassWillBe = nullptr;
-        m_cachedhiddenClassChainLength = 0;
     }
 
-    void invalidateCache()
-    {
-        m_cachedHiddenClass = m_hiddenClassWillBe = nullptr;
-        m_cachedhiddenClassChainLength = 0;
-    }
+    SetObjectInlineCacheDataVector m_cache;
 
     void* operator new(size_t size);
     void* operator new[](size_t size) = delete;
@@ -1224,6 +1259,7 @@ public:
         , m_propertyName(propertyName)
         , m_inlineCache(nullptr)
         , m_isLength(propertyName.plainString()->equals("length"))
+        , m_inlineCacheProtoTraverseMaxIndex(0)
         , m_missCount(0)
     {
     }
@@ -1232,7 +1268,11 @@ public:
     ByteCodeRegisterIndex m_loadRegisterIndex;
     ObjectStructurePropertyName m_propertyName;
     SetObjectInlineCache* m_inlineCache;
+
+    static constexpr size_t inlineCacheProtoTraverseMaxCount = 12;
+
     bool m_isLength : 1;
+    unsigned char m_inlineCacheProtoTraverseMaxIndex : 8;
     uint16_t m_missCount : 16;
 #ifndef NDEBUG
     void dump()
@@ -2702,6 +2742,21 @@ public:
 #endif
 };
 
+class BindingCalleeIntoRegister : public ByteCode {
+public:
+    BindingCalleeIntoRegister(const ByteCodeLOC& loc)
+        : ByteCode(Opcode::BindingCalleeIntoRegisterOpcode, loc)
+    {
+    }
+
+#ifndef NDEBUG
+    void dump()
+    {
+        printf("binding callee into register");
+    }
+#endif
+};
+
 class ResolveNameAddress : public ByteCode {
 public:
     ResolveNameAddress(const ByteCodeLOC& loc, AtomicString name, ByteCodeRegisterIndex registerIndex)
@@ -2811,10 +2866,10 @@ public:
             first++;
         }
 
-        m_requiredRegisterFileSizeInValueSize = std::max(m_requiredRegisterFileSizeInValueSize, (ByteCodeRegisterIndex)context->m_baseRegisterCount);
+        m_requiredOperandRegisterNumber = std::max(m_requiredOperandRegisterNumber, (ByteCodeRegisterIndex)context->m_baseRegisterCount);
 
         // TODO throw exception
-        RELEASE_ASSERT(m_requiredRegisterFileSizeInValueSize < REGISTER_LIMIT);
+        RELEASE_ASSERT(m_requiredOperandRegisterNumber < REGISTER_LIMIT);
 
         if (std::is_same<CodeType, ExecutionPause>::value) {
             pushPauseStatementExtraData(context);
@@ -2880,7 +2935,10 @@ public:
 
     bool m_shouldClearStack : 1;
     bool m_isOwnerMayFreed : 1;
-    ByteCodeRegisterIndex m_requiredRegisterFileSizeInValueSize : REGISTER_INDEX_IN_BIT;
+    // number of bytecode registers used for bytecode operation like adding...moving...
+    ByteCodeRegisterIndex m_requiredOperandRegisterNumber : REGISTER_INDEX_IN_BIT;
+    // precomputed value of total register number which is "m_requiredTotalRegisterNumber + stack allocated variables size"
+    ByteCodeRegisterIndex m_requiredTotalRegisterNumber : REGISTER_INDEX_IN_BIT;
     size_t m_inlineCacheDataSize;
 
     ByteCodeBlockData m_code;
index 14d2a77f955698018ad4c68b3ccbf4eadd3272ab..81c7b75297f914adb3be49080b439975f666ee77 100644 (file)
@@ -157,17 +157,23 @@ void ByteCodeGenerateContext::insertBreakpoint(size_t index, Node* node)
 
 void ByteCodeGenerateContext::insertBreakpointAt(size_t line, Node* node)
 {
-    m_breakpointContext->m_breakpointLocations->breakpointLocations.push_back(Debugger::BreakpointLocation(line, (uint32_t)m_byteCodeBlock->currentCodeSize()));
-    m_byteCodeBlock->pushCode(BreakpointDisabled(ByteCodeLOC(node->loc().index)), this, node);
+    // add breakpoint only when its line offset is bigger than original source's start line offset
+    // m_originSourceLineOffset is usually set as 0, but for the manipulated source code case,
+    // we should consider original source code and insert bytecode only for the original source code case
+    if (line > m_breakpointContext->m_originSourceLineOffset) {
+        m_breakpointContext->m_breakpointLocations->breakpointLocations.push_back(Debugger::BreakpointLocation(line, (uint32_t)m_byteCodeBlock->currentCodeSize()));
+        m_byteCodeBlock->pushCode(BreakpointDisabled(ByteCodeLOC(node->loc().index)), this, node);
+    }
 }
 
-ByteCodeBreakpointContext::ByteCodeBreakpointContext(Debugger* debugger, InterpretedCodeBlock* codeBlock)
+ByteCodeBreakpointContext::ByteCodeBreakpointContext(Debugger* debugger, InterpretedCodeBlock* codeBlock, bool addBreakpointLocationsInfoToDebugger)
     : m_lastBreakpointLineOffset(0)
     , m_lastBreakpointIndexOffset(0)
+    , m_originSourceLineOffset(codeBlock->script()->originSourceLineOffset())
     , m_breakpointLocations()
 {
     m_breakpointLocations = new Debugger::BreakpointLocationsInfo(reinterpret_cast<Debugger::WeakCodeRef*>(codeBlock));
-    if (debugger && codeBlock->markDebugging()) {
+    if (debugger && codeBlock->markDebugging() && addBreakpointLocationsInfoToDebugger) {
         debugger->appendBreakpointLocations(m_breakpointLocations);
     }
 }
@@ -231,6 +237,12 @@ ByteCodeBlock* ByteCodeGenerator::generateByteCode(Context* context, Interpreted
         block->m_code.shrinkToFit();
     }
 
+    if (ast->type() == ASTNodeType::Program) {
+        block->m_requiredTotalRegisterNumber = block->m_requiredOperandRegisterNumber + 1 + codeBlock->lexicalBlockStackAllocatedIdentifierMaximumDepth() + block->m_numeralLiteralData.size();
+    } else {
+        block->m_requiredTotalRegisterNumber = block->m_requiredOperandRegisterNumber + codeBlock->totalStackAllocatedVariableSize() + block->m_numeralLiteralData.size();
+    }
+
 #if defined(ENABLE_CODE_CACHE)
     // cache bytecode right before relocation
     if (UNLIKELY(cacheByteCode)) {
@@ -285,7 +297,9 @@ void ByteCodeGenerator::collectByteCodeLOCData(Context* context, InterpretedCode
     ctx.m_locData = locData;
 
 #ifdef ESCARGOT_DEBUGGER
-    ByteCodeBreakpointContext breakpointContext(context->debugger(), codeBlock);
+    // create a dummy ByteCodeBreakpointContext because we just calculate location info only
+    // unnecessary BreakpointLocationsInfoToDebugger insertion would incur incorrect debugger operations
+    ByteCodeBreakpointContext breakpointContext(context->debugger(), codeBlock, false);
     ctx.m_breakpointContext = &breakpointContext;
 #endif /* ESCARGOT_DEBUGGER */
 
@@ -322,7 +336,7 @@ void ByteCodeGenerator::relocateByteCode(ByteCodeBlock* block)
     InterpretedCodeBlock* codeBlock = block->codeBlock();
 
     ByteCodeRegisterIndex stackBase = REGULAR_REGISTER_LIMIT;
-    ByteCodeRegisterIndex stackBaseWillBe = block->m_requiredRegisterFileSizeInValueSize;
+    ByteCodeRegisterIndex stackBaseWillBe = block->m_requiredOperandRegisterNumber;
     ByteCodeRegisterIndex stackVariableSize = codeBlock->totalStackAllocatedVariableSize();
 
     char* code = block->m_code.data();
@@ -798,6 +812,39 @@ void ByteCodeGenerator::relocateByteCode(ByteCodeBlock* block)
     }
 }
 
+#ifdef ESCARGOT_DEBUGGER
+bool ByteCodeGenerator::enableFirstBreakPoint(ByteCodeBlock* block)
+{
+    // This function should be called after ByteCode relocation (`relocateByteCode`)
+    ASSERT(block && block->m_code.size());
+
+    char* code = block->m_code.data();
+    size_t codeBase = (size_t)code;
+    char* end = code + block->m_code.size();
+
+    while (code < end) {
+        ByteCode* currentCode = reinterpret_cast<ByteCode*>(code);
+
+#if defined(COMPILER_GCC) || defined(COMPILER_CLANG)
+        if (currentCode->m_opcodeInAddress == g_opcodeTable.m_addressTable[BreakpointDisabledOpcode]) {
+            currentCode->m_opcodeInAddress = g_opcodeTable.m_addressTable[BreakpointEnabledOpcode];
+            return true;
+        }
+#else
+        if (currentCode->m_opcode == BreakpointDisabledOpcode) {
+            currentCode->m_opcode = BreakpointEnabledOpcode;
+            return true;
+        }
+#endif
+        ASSERT(currentCode->m_orgOpcode != BreakpointEnabledOpcode);
+        ASSERT(currentCode->m_orgOpcode <= EndOpcode);
+        code += byteCodeLengths[currentCode->m_orgOpcode];
+    }
+
+    return false;
+}
+#endif
+
 #ifndef NDEBUG
 void ByteCodeGenerator::printByteCode(Context* context, ByteCodeBlock* block)
 {
@@ -808,12 +855,12 @@ void ByteCodeGenerator::printByteCode(Context* context, ByteCodeBlock* block)
     if (dumpByteCode && (strcmp(dumpByteCode, "1") == 0)) {
         printf("dumpBytecode %s (%d:%d)>>>>>>>>>>>>>>>>>>>>>>\n", codeBlock->functionName().string()->toUTF8StringData().data(), (int)codeBlock->functionStart().line, (int)codeBlock->functionStart().column);
         printf("register info.. (stack variable total(%d), this + function + var (%d), max lexical depth (%d)) [", (int)codeBlock->totalStackAllocatedVariableSize(), (int)codeBlock->identifierOnStackCount(), (int)codeBlock->lexicalBlockStackAllocatedIdentifierMaximumDepth());
-        for (size_t i = 0; i < block->m_requiredRegisterFileSizeInValueSize; i++) {
+        for (size_t i = 0; i < block->m_requiredOperandRegisterNumber; i++) {
             printf("r%d,", (int)i);
         }
 
-        size_t b = block->m_requiredRegisterFileSizeInValueSize + 1;
-        printf("`r%d this`,", (int)block->m_requiredRegisterFileSizeInValueSize);
+        size_t b = block->m_requiredOperandRegisterNumber + 1;
+        printf("`r%d this`,", (int)block->m_requiredOperandRegisterNumber);
         if (!codeBlock->isGlobalCodeBlock()) {
             printf("`r%d function`,", (int)b);
             b++;
index ac32dad79bc14a18ccf75b367af3344ee44f6097..3188865699338edddf9509c582de9b8b03979992 100644 (file)
@@ -54,10 +54,11 @@ struct ClassContextInformation {
 struct ByteCodeBreakpointContext {
     size_t m_lastBreakpointLineOffset; // cache breakpoint's calculated line offset
     size_t m_lastBreakpointIndexOffset; // cache breakpoint's calculated index offset
+    size_t m_originSourceLineOffset; // original source's start line offset
     Debugger::BreakpointLocationsInfo* m_breakpointLocations;
     bool m_parsingEnabled;
 
-    ByteCodeBreakpointContext(Debugger* debugger, InterpretedCodeBlock* codeBlock);
+    ByteCodeBreakpointContext(Debugger* debugger, InterpretedCodeBlock* codeBlock, bool addBreakpointLocationsInfoToDebugger = true);
 };
 #endif /* ESCARGOT_DEBUGGER */
 
@@ -376,6 +377,10 @@ public:
     static void collectByteCodeLOCData(Context* context, InterpretedCodeBlock* codeBlock, std::vector<std::pair<size_t, size_t>, std::allocator<std::pair<size_t, size_t>>>* locData);
     static void relocateByteCode(ByteCodeBlock* block);
 
+#ifdef ESCARGOT_DEBUGGER
+    static bool enableFirstBreakPoint(ByteCodeBlock* block);
+#endif
+
 #ifndef NDEBUG
     static void printByteCode(Context* context, ByteCodeBlock* block);
 #endif
index e4474dcef88df86de6c6798ea67a7c20a97fa611..a2486dcf9e7f5b24fc8116450e5b490d0faaf41c 100644 (file)
@@ -161,7 +161,7 @@ Value ByteCodeInterpreter::interpret(ExecutionState* state, ByteCodeBlock* byteC
             :
         {
             Move* code = (Move*)programCounter;
-            ASSERT(code->m_registerIndex1 < (byteCodeBlock->m_requiredRegisterFileSizeInValueSize + byteCodeBlock->m_codeBlock->totalStackAllocatedVariableSize() + 1));
+            ASSERT(code->m_registerIndex1 < (byteCodeBlock->m_requiredOperandRegisterNumber + byteCodeBlock->m_codeBlock->totalStackAllocatedVariableSize() + 1));
             ASSERT(!registerFile[code->m_registerIndex0].isEmpty());
             registerFile[code->m_registerIndex1] = registerFile[code->m_registerIndex0];
             ADD_PROGRAM_COUNTER(Move);
@@ -485,15 +485,12 @@ Value ByteCodeInterpreter::interpret(ExecutionState* state, ByteCodeBlock* byteC
             PointerValue* v;
             if (LIKELY(willBeObject.isObject() && (v = willBeObject.asPointerValue())->hasArrayObjectTag())) {
                 ArrayObject* arr = (ArrayObject*)v;
-                if (LIKELY(arr->isFastModeArray())) {
+                if (LIKELY(arr->hasFastModeDataBuffer())) {
                     uint32_t idx = property.tryToUseAsIndexProperty(*state);
-                    if (LIKELY(idx != Value::InvalidIndexPropertyValue) && LIKELY(idx < arr->arrayLength(*state))) {
-                        const Value& v = arr->m_fastModeData[idx];
-                        if (LIKELY(!v.isEmpty())) {
-                            registerFile[code->m_storeRegisterIndex] = v;
-                            ADD_PROGRAM_COUNTER(GetObject);
-                            NEXT_INSTRUCTION();
-                        }
+                    if (LIKELY(idx < arr->arrayLength(*state))) {
+                        registerFile[code->m_storeRegisterIndex] = arr->m_fastModeData[idx].toValue<true>();
+                        ADD_PROGRAM_COUNTER(GetObject);
+                        NEXT_INSTRUCTION();
                     }
                 }
             }
@@ -508,18 +505,10 @@ Value ByteCodeInterpreter::interpret(ExecutionState* state, ByteCodeBlock* byteC
             const Value& property = registerFile[code->m_propertyRegisterIndex];
             if (LIKELY(willBeObject.isObject() && (willBeObject.asPointerValue())->hasArrayObjectTag())) {
                 ArrayObject* arr = willBeObject.asObject()->asArrayObject();
-                uint32_t idx = property.tryToUseAsIndexProperty(*state);
-                if (LIKELY(arr->isFastModeArray())) {
-                    if (LIKELY(idx != Value::InvalidIndexPropertyValue)) {
-                        uint32_t len = arr->arrayLength(*state);
-                        if (UNLIKELY(len <= idx)) {
-                            if (UNLIKELY(!arr->isExtensible(*state))) {
-                                JUMP_INSTRUCTION(SetObjectOpcodeSlowCase);
-                            }
-                            if (UNLIKELY(!arr->setArrayLength(*state, idx + 1)) || UNLIKELY(!arr->isFastModeArray())) {
-                                JUMP_INSTRUCTION(SetObjectOpcodeSlowCase);
-                            }
-                        }
+                if (LIKELY(arr->hasFastModeDataBuffer())) {
+                    uint32_t len = arr->arrayLength(*state);
+                    uint32_t idx = property.tryToUseAsIndexProperty(*state);
+                    if (LIKELY(idx < len)) {
                         arr->m_fastModeData[idx] = registerFile[code->m_loadRegisterIndex];
                         ADD_PROGRAM_COUNTER(SetObjectOperation);
                         NEXT_INSTRUCTION();
@@ -880,6 +869,15 @@ Value ByteCodeInterpreter::interpret(ExecutionState* state, ByteCodeBlock* byteC
             NEXT_INSTRUCTION();
         }
 
+        DEFINE_OPCODE(BindingCalleeIntoRegister)
+            :
+        {
+            BindingCalleeIntoRegister* code = (BindingCalleeIntoRegister*)programCounter;
+            registerFile[byteCodeBlock->m_requiredOperandRegisterNumber + 1] = state->lexicalEnvironment()->record()->asDeclarativeEnvironmentRecord()->asFunctionEnvironmentRecord()->functionObject();
+            ADD_PROGRAM_COUNTER(BindingCalleeIntoRegister);
+            NEXT_INSTRUCTION();
+        }
+
         DEFINE_OPCODE(InitializeGlobalVariable)
             :
         {
@@ -2052,45 +2050,34 @@ ALWAYS_INLINE void ByteCodeInterpreter::getObjectPrecomputedCaseOperation(Execut
         obj = fastToObject(state, receiver);
     }
 
-    if (LIKELY(code->m_inlineCache != nullptr)) {
-        GetObjectInlineCache* const inlineCache = code->m_inlineCache;
-        const size_t cacheFillCount = inlineCache->m_cache.size();
-        GetObjectInlineCacheData* const cacheData = inlineCache->m_cache.data();
-
-        // simple case
-        if (!code->m_inlineCacheProtoTraverseMaxIndex) {
-            ObjectStructure* const objStructure = obj->structure();
-            for (unsigned currentCacheIndex = 0; currentCacheIndex < cacheFillCount; currentCacheIndex++) {
-                const GetObjectInlineCacheData& data = cacheData[currentCacheIndex];
-                if (data.m_cachedhiddenClass == objStructure) {
-                    const auto& cachedIndex = data.m_cachedIndex;
-                    // this is possible. but super rare
-                    // so not cached for performance
-                    ASSERT(cachedIndex != GetObjectInlineCacheData::inlineCacheCachedIndexMax);
-                    if (LIKELY(data.m_isPlainDataProperty)) {
-                        registerFile[code->m_storeRegisterIndex] = obj->m_values[cachedIndex];
-                    } else {
-                        registerFile[code->m_storeRegisterIndex] = obj->getOwnNonPlainDataPropertyUtilForObject(state, cachedIndex, receiver);
-                    }
-                    return;
-                }
-            }
-        } else {
-            if (getObjectPrecomputedCaseOperationSlowCase(state, obj, receiver, code, cacheData, cacheFillCount, registerFile, block)) {
+    if (LIKELY(code->m_inlineCacheMode == GetObjectPreComputedCase::Simple)) {
+        auto cacheData = code->m_simpleInlineCache->m_cachedStructures;
+        ObjectStructure* const objStructure = obj->structure();
+        // NOTE
+        // if GetObjectInlineCacheSimpleCase::simpleCaseLimit is small,
+        // `skipping cacheData[currentCacheIndex] != nullptr` is faster
+        for (unsigned currentCacheIndex = 0; /* cacheData[currentCacheIndex] &&*/ currentCacheIndex < GetObjectInlineCacheSimpleCase::inlineBufferSize; currentCacheIndex++) {
+            if (cacheData[currentCacheIndex] == objStructure) {
+                registerFile[code->m_storeRegisterIndex] = obj->m_values[code->m_simpleInlineCache->m_cachedIndexes[currentCacheIndex]];
                 return;
             }
         }
+    } else if (code->m_inlineCacheMode == GetObjectPreComputedCase::Complex) {
+        if (getObjectPrecomputedCaseOperationSlowCase(state, obj, receiver, code, registerFile, block)) {
+            return;
+        }
     }
 
     getObjectPrecomputedCaseOperationCacheMiss(state, obj, receiver, code, registerFile, block);
 }
 
 NEVER_INLINE bool ByteCodeInterpreter::getObjectPrecomputedCaseOperationSlowCase(ExecutionState& state, Object* obj, const Value& receiver, GetObjectPreComputedCase* code,
-                                                                                 GetObjectInlineCacheData* cacheData,
-                                                                                 const size_t& cacheFillCount,
                                                                                  Value* registerFile,
                                                                                  ByteCodeBlock* block)
 {
+    GetObjectInlineCacheComplexCase* const inlineCache = code->m_complexInlineCache;
+    const size_t cacheFillCount = inlineCache->m_cache.size();
+    GetObjectInlineCacheData* const cacheData = inlineCache->m_cache.data();
     Object* objChain[GetObjectPreComputedCase::inlineCacheProtoTraverseMaxCount];
     ObjectStructure* objStructures[GetObjectPreComputedCase::inlineCacheProtoTraverseMaxCount];
     const auto& maxIndex = code->m_inlineCacheProtoTraverseMaxIndex;
@@ -2104,7 +2091,7 @@ NEVER_INLINE bool ByteCodeInterpreter::getObjectPrecomputedCaseOperationSlowCase
     for (unsigned currentCacheIndex = 0; currentCacheIndex < cacheFillCount; currentCacheIndex++) {
         const GetObjectInlineCacheData& data = cacheData[currentCacheIndex];
         const size_t& cSiz = data.m_cachedhiddenClassChainLength;
-        if (cSiz <= fillCount) {
+        if (LIKELY(cSiz <= fillCount)) {
             bool ok = true;
             for (size_t i = 0; i < cSiz; i++) {
                 if (objStructures[i] != data.m_cachedhiddenClassChain[i]) {
@@ -2169,30 +2156,12 @@ NEVER_INLINE void ByteCodeInterpreter::getObjectPrecomputedCaseOperationCacheMis
         return;
     }
 
-    auto& currentCodeSizeTotal = state.context()->vmInstance()->compiledByteCodeSize();
-
-    if (!code->m_inlineCache) {
-        code->m_inlineCache = new GetObjectInlineCache();
-        block->m_inlineCacheDataSize += sizeof(GetObjectInlineCache);
-        currentCodeSizeTotal += sizeof(GetObjectInlineCache);
-        block->m_otherLiteralData.push_back(code->m_inlineCache);
-    }
-
-    auto inlineCache = code->m_inlineCache;
     Object* orgObj = obj;
 
-    if (inlineCache->m_cache.size() > maxCacheCount) {
-        for (size_t i = inlineCache->m_cache.size() - 1; i > 0; i--) {
-            inlineCache->m_cache[i] = inlineCache->m_cache[i - 1];
-        }
-    } else {
-        inlineCache->m_cache.insert(0, GetObjectInlineCacheData());
-        block->m_inlineCacheDataSize += sizeof(GetObjectInlineCacheData);
-        currentCodeSizeTotal += sizeof(GetObjectInlineCacheData);
-    }
-
-    auto& newItem = inlineCache->m_cache[0];
+    auto& currentCodeSizeTotal = state.context()->vmInstance()->compiledByteCodeSize();
     VectorWithInlineStorage<GetObjectPreComputedCase::inlineCacheProtoTraverseMaxCount, ObjectStructure*, std::allocator<ObjectStructure*>> cachedhiddenClassChain;
+    size_t cachedIndex = 0;
+    bool isPlainDataProperty = 0;
 
     while (true) {
         auto s = obj->structure();
@@ -2203,15 +2172,15 @@ NEVER_INLINE void ByteCodeInterpreter::getObjectPrecomputedCaseOperationCacheMis
             if (UNLIKELY(result.first > GetObjectInlineCacheData::inlineCacheCachedIndexMax)) {
                 goto GiveUp;
             }
-            newItem.m_cachedIndex = result.first;
-            newItem.m_isPlainDataProperty = result.second->m_descriptor.isPlainDataProperty();
+            cachedIndex = result.first;
+            isPlainDataProperty = result.second->m_descriptor.isPlainDataProperty();
             break;
         }
 
         obj = obj->Object::getPrototypeObject(state);
 
         if (!obj) {
-            newItem.m_cachedIndex = GetObjectInlineCacheData::inlineCacheCachedIndexMax;
+            cachedIndex = GetObjectInlineCacheData::inlineCacheCachedIndexMax;
             break;
         }
 
@@ -2226,37 +2195,106 @@ NEVER_INLINE void ByteCodeInterpreter::getObjectPrecomputedCaseOperationCacheMis
 
     // this is possible. but super rare
     // so this case is not cached for performance
-    if (UNLIKELY(cachedhiddenClassChain.size() == 1 && newItem.m_cachedIndex == GetObjectInlineCacheData::inlineCacheCachedIndexMax)) {
+    if (UNLIKELY(cachedhiddenClassChain.size() == 1 && cachedIndex == GetObjectInlineCacheData::inlineCacheCachedIndexMax)) {
         goto GiveUp;
     }
 
-    code->m_inlineCacheProtoTraverseMaxIndex = std::max(cachedhiddenClassChain.size() - 1, (size_t)code->m_inlineCacheProtoTraverseMaxIndex);
+    if (isPlainDataProperty && cachedhiddenClassChain.size() == 1 && cachedIndex <= std::numeric_limits<uint8_t>::max()
+        && code->m_inlineCacheMode <= GetObjectPreComputedCase::Simple) {
+        if (code->m_inlineCacheMode != GetObjectPreComputedCase::Simple) {
+            code->m_simpleInlineCache = new GetObjectInlineCacheSimpleCase();
+            block->m_inlineCacheDataSize += sizeof(GetObjectInlineCacheSimpleCase);
+            currentCodeSizeTotal += sizeof(GetObjectInlineCacheSimpleCase);
+            code->m_inlineCacheMode = GetObjectPreComputedCase::Simple;
+            block->m_otherLiteralData.push_back(code->m_simpleInlineCache);
+        }
+
+        auto inlineCache = code->m_simpleInlineCache;
+
+        size_t targetIndex = 0;
+        for (; targetIndex < GetObjectInlineCacheSimpleCase::inlineBufferSize; targetIndex++) {
+            if (inlineCache->m_cachedStructures[targetIndex] == nullptr) {
+                break;
+            }
+        }
+        if (targetIndex == GetObjectInlineCacheSimpleCase::inlineBufferSize) {
+            for (size_t i = GetObjectInlineCacheSimpleCase::inlineBufferSize - 1; i > 0; i--) {
+                inlineCache->m_cachedStructures[i] = inlineCache->m_cachedStructures[i - 1];
+                inlineCache->m_cachedIndexes[i] = inlineCache->m_cachedIndexes[i - 1];
+            }
+            targetIndex = 0;
+        }
+        inlineCache->m_cachedStructures[targetIndex] = cachedhiddenClassChain[0];
+        inlineCache->m_cachedIndexes[targetIndex] = cachedIndex;
 
-    newItem.m_cachedhiddenClassChainLength = cachedhiddenClassChain.size();
-    if (newItem.m_cachedhiddenClassChainLength == 1) {
-        newItem.m_cachedhiddenClass = cachedhiddenClassChain[0];
+        registerFile[code->m_storeRegisterIndex] = obj->m_values[cachedIndex];
     } else {
+        if (code->m_inlineCacheMode == GetObjectPreComputedCase::Simple) {
+            // convert simple case to complex case
+            GetObjectInlineCacheSimpleCase* old = code->m_simpleInlineCache;
+            auto inlineCache = code->m_complexInlineCache = new GetObjectInlineCacheComplexCase();
+            block->m_otherLiteralData.push_back(code->m_complexInlineCache);
+            code->m_inlineCacheMode = GetObjectPreComputedCase::Complex;
+            block->m_inlineCacheDataSize += sizeof(GetObjectInlineCacheComplexCase) - sizeof(GetObjectInlineCacheSimpleCase);
+            currentCodeSizeTotal += sizeof(GetObjectInlineCacheComplexCase) - sizeof(GetObjectInlineCacheSimpleCase);
+            for (size_t i = 0; i < GetObjectInlineCacheSimpleCase::inlineBufferSize && old->m_cachedStructures[i]; i++) {
+                inlineCache->m_cache.pushBack(GetObjectInlineCacheData());
+                block->m_inlineCacheDataSize += sizeof(GetObjectInlineCacheData);
+                currentCodeSizeTotal += sizeof(GetObjectInlineCacheData);
+
+                auto& item = inlineCache->m_cache.back();
+                item.m_cachedhiddenClassChain = (ObjectStructure**)GC_MALLOC(sizeof(ObjectStructure*));
+                item.m_cachedhiddenClassChain[0] = old->m_cachedStructures[i];
+                item.m_cachedhiddenClassChainLength = 1;
+                item.m_cachedIndex = old->m_cachedIndexes[i];
+                item.m_isPlainDataProperty = true;
+            }
+        } else if (code->m_inlineCacheMode == GetObjectPreComputedCase::None) {
+            code->m_complexInlineCache = new GetObjectInlineCacheComplexCase();
+            block->m_otherLiteralData.push_back(code->m_complexInlineCache);
+            code->m_inlineCacheMode = GetObjectPreComputedCase::Complex;
+            block->m_inlineCacheDataSize += sizeof(GetObjectInlineCacheComplexCase);
+            currentCodeSizeTotal += sizeof(GetObjectInlineCacheComplexCase);
+        }
+
+        auto inlineCache = code->m_complexInlineCache;
+        if (inlineCache->m_cache.size() > maxCacheCount) {
+            for (size_t i = inlineCache->m_cache.size() - 1; i > 0; i--) {
+                inlineCache->m_cache[i] = inlineCache->m_cache[i - 1];
+            }
+        } else {
+            inlineCache->m_cache.insert(0, GetObjectInlineCacheData());
+            block->m_inlineCacheDataSize += sizeof(GetObjectInlineCacheData);
+            currentCodeSizeTotal += sizeof(GetObjectInlineCacheData);
+        }
+
+        auto& newItem = inlineCache->m_cache[0];
+        code->m_inlineCacheProtoTraverseMaxIndex = std::max(cachedhiddenClassChain.size() - 1, (size_t)code->m_inlineCacheProtoTraverseMaxIndex);
+
+        newItem.m_cachedhiddenClassChainLength = cachedhiddenClassChain.size();
         block->m_inlineCacheDataSize += sizeof(size_t) * cachedhiddenClassChain.size();
         currentCodeSizeTotal += sizeof(size_t) * cachedhiddenClassChain.size();
         newItem.m_cachedhiddenClassChain = (ObjectStructure**)GC_MALLOC(sizeof(ObjectStructure*) * cachedhiddenClassChain.size());
         memcpy(newItem.m_cachedhiddenClassChain, cachedhiddenClassChain.data(), sizeof(ObjectStructure*) * cachedhiddenClassChain.size());
-    }
+        newItem.m_cachedIndex = cachedIndex;
+        newItem.m_isPlainDataProperty = isPlainDataProperty;
 
-    if (newItem.m_cachedIndex != GetObjectInlineCacheData::inlineCacheCachedIndexMax) {
-        if (newItem.m_isPlainDataProperty) {
-            registerFile[code->m_storeRegisterIndex] = obj->m_values[newItem.m_cachedIndex];
+        if (newItem.m_cachedIndex != GetObjectInlineCacheData::inlineCacheCachedIndexMax) {
+            if (newItem.m_isPlainDataProperty) {
+                registerFile[code->m_storeRegisterIndex] = obj->m_values[newItem.m_cachedIndex];
+            } else {
+                registerFile[code->m_storeRegisterIndex] = obj->getOwnNonPlainDataPropertyUtilForObject(state, newItem.m_cachedIndex, receiver);
+            }
         } else {
-            registerFile[code->m_storeRegisterIndex] = obj->getOwnNonPlainDataPropertyUtilForObject(state, newItem.m_cachedIndex, receiver);
+            registerFile[code->m_storeRegisterIndex] = Value();
         }
-        return;
-    } else {
-        registerFile[code->m_storeRegisterIndex] = Value();
-        return;
     }
 
+    return;
+
 GiveUp:
-    inlineCache->m_cache.clear();
-    code->m_inlineCache = nullptr;
+    code->m_inlineCacheMode = GetObjectPreComputedCase::None;
+    code->m_simpleInlineCache = nullptr;
     code->m_cacheMissCount = maxCacheMissCount + 1;
     registerFile[code->m_storeRegisterIndex] = orgObj->get(state, ObjectPropertyName(state, code->m_propertyName)).value(state, receiver);
 }
@@ -2273,39 +2311,25 @@ ALWAYS_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperation(Execut
         obj = willBeObject.asObject();
     }
     Object* originalObject = obj;
-    ASSERT(originalObject != nullptr);
-
-    ObjectStructure* testItem = obj->structure();
-
     auto inlineCache = code->m_inlineCache;
 
-    if (inlineCache) {
-        if (inlineCache->m_cachedhiddenClassChainLength == 1 && inlineCache->m_cachedHiddenClass == testItem) {
-            // cache hit!
-            obj->m_values[inlineCache->m_cachedIndex] = value;
-            return;
-        } else if (inlineCache->m_hiddenClassWillBe) {
-            const auto& cSiz = inlineCache->m_cachedhiddenClassChainLength;
-            bool miss = false;
-            for (size_t i = 0; i < cSiz - 1; i++) {
-                if (UNLIKELY(inlineCache->m_cachedHiddenClassChainData[i] != obj->structure())) {
-                    miss = true;
-                    break;
-                } else {
-                    Object* o = obj->Object::getPrototypeObject(state);
-                    if (UNLIKELY(!o)) {
-                        miss = true;
-                        break;
-                    }
-                    obj = o;
+    if (LIKELY(inlineCache != nullptr)) {
+        // simple case
+        if (LIKELY(code->m_inlineCacheProtoTraverseMaxIndex == 0)) {
+            ObjectStructure* testItem = obj->structure();
+            SetObjectInlineCache* const inlineCache = code->m_inlineCache;
+            const size_t cacheFillCount = inlineCache->m_cache.size();
+            SetObjectInlineCacheData* const cacheData = inlineCache->m_cache.data();
+            for (unsigned currentCacheIndex = 0; currentCacheIndex < cacheFillCount; currentCacheIndex++) {
+                const auto& item = cacheData[currentCacheIndex];
+                if (testItem == item.m_cachedHiddenClass) {
+                    // cache hit!
+                    obj->m_values[item.m_cachedIndex] = value;
+                    return;
                 }
             }
-            if (LIKELY(!miss) && inlineCache->m_cachedHiddenClassChainData[cSiz - 1] == obj->structure()) {
-                // cache hit!
-                obj = originalObject;
-                ASSERT(obj->structure()->inTransitionMode());
-                obj->m_values.push_back(value, inlineCache->m_hiddenClassWillBe->propertyCount());
-                obj->m_structure = inlineCache->m_hiddenClassWillBe;
+        } else {
+            if (setObjectPreComputedCaseOperationSlowCase(state, originalObject, willBeObject, value, code, block)) {
                 return;
             }
         }
@@ -2314,6 +2338,47 @@ ALWAYS_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperation(Execut
     setObjectPreComputedCaseOperationCacheMiss(state, originalObject, willBeObject, value, code, block);
 }
 
+NEVER_INLINE bool ByteCodeInterpreter::setObjectPreComputedCaseOperationSlowCase(ExecutionState& state, Object* originalObject, const Value& willBeObject, const Value& value, SetObjectPreComputedCase* code, ByteCodeBlock* block)
+{
+    Object* obj = originalObject;
+    Object* objChain[GetObjectPreComputedCase::inlineCacheProtoTraverseMaxCount];
+    ObjectStructure* objStructures[GetObjectPreComputedCase::inlineCacheProtoTraverseMaxCount];
+    const auto& maxIndex = code->m_inlineCacheProtoTraverseMaxIndex;
+    size_t fillCount;
+    for (fillCount = 0; fillCount <= maxIndex && obj; fillCount++) {
+        objChain[fillCount] = obj;
+        objStructures[fillCount] = obj->structure();
+        obj = obj->Object::getPrototypeObject(state);
+    }
+
+    SetObjectInlineCache* const inlineCache = code->m_inlineCache;
+    const size_t cacheFillCount = inlineCache->m_cache.size();
+    SetObjectInlineCacheData* const cacheData = inlineCache->m_cache.data();
+    for (unsigned currentCacheIndex = 0; currentCacheIndex < cacheFillCount; currentCacheIndex++) {
+        const auto& item = cacheData[currentCacheIndex];
+        const auto& cSiz = item.m_cachedhiddenClassChainLength;
+        bool ok = true;
+        for (size_t i = 0; i < cSiz; i++) {
+            if (objStructures[i] != item.m_cachedHiddenClassChainData[i]) {
+                ok = false;
+                break;
+            }
+        }
+        if (ok) {
+            if (item.m_cachedIndex != SetObjectInlineCacheData::inlineCacheCachedIndexMax) {
+                originalObject->m_values[item.m_cachedIndex] = value;
+            } else {
+                ASSERT(originalObject->structure()->inTransitionMode());
+                // next object structure save in `item.m_cachedHiddenClassChainData[cSiz]`
+                originalObject->m_structure = item.m_cachedHiddenClassChainData[cSiz];
+                originalObject->m_values.push_back(value, originalObject->m_structure->propertyCount());
+            }
+            return true;
+        }
+    }
+    return false;
+}
+
 NEVER_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperationCacheMiss(ExecutionState& state, Object* originalObject, const Value& willBeObject, const Value& value, SetObjectPreComputedCase* code, ByteCodeBlock* block)
 {
     if (code->m_isLength && originalObject->isArrayObject()) {
@@ -2333,8 +2398,9 @@ NEVER_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperationCacheMis
     return;
 #endif
 
-    const int maxCacheMissCount = 16;
-    const int minCacheFillCount = 3;
+    const size_t maxCacheMissCount = 32;
+    const size_t minCacheFillCount = 3;
+    const size_t maxCacheCount = 24;
 
     // cache miss
     if (code->m_missCount > maxCacheMissCount) {
@@ -2349,7 +2415,7 @@ NEVER_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperationCacheMis
     }
 
     if (UNLIKELY(!originalObject->isInlineCacheable())) {
-        code->m_missCount++;
+        code->m_missCount = maxCacheMissCount + 1;
         originalObject->setThrowsExceptionWhenStrictMode(state, ObjectPropertyName(state, code->m_propertyName), value, willBeObject);
         return;
     }
@@ -2365,9 +2431,18 @@ NEVER_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperationCacheMis
 
     auto inlineCache = code->m_inlineCache;
 
-    inlineCache->invalidateCache();
-    code->m_missCount++;
+    if (inlineCache->m_cache.size() > maxCacheCount) {
+        for (size_t i = inlineCache->m_cache.size() - 1; i > 0; i--) {
+            inlineCache->m_cache[i] = inlineCache->m_cache[i - 1];
+        }
+    } else {
+        inlineCache->m_cache.insert(0, SetObjectInlineCacheData());
+        block->m_inlineCacheDataSize += sizeof(SetObjectInlineCacheData);
+        currentCodeSizeTotal += sizeof(SetObjectInlineCacheData);
+    }
 
+    auto& newItem = inlineCache->m_cache[0];
+    VectorWithInlineStorage<GetObjectPreComputedCase::inlineCacheProtoTraverseMaxCount, ObjectStructure*, std::allocator<ObjectStructure*>> cachedhiddenClassChain;
     Object* obj = originalObject;
 
     auto findResult = obj->structure()->findProperty(code->m_propertyName);
@@ -2380,22 +2455,30 @@ NEVER_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperationCacheMis
         o.foo = 0;
         */
         if (UNLIKELY(findResult.first >= obj->structure()->propertyCount())) {
-            return;
+            goto GiveUp;
         }
 
         const auto& propertyData = obj->structure()->readProperty(findResult.first);
         const auto& desc = propertyData.m_descriptor;
         if (propertyData.m_propertyName == code->m_propertyName && desc.isPlainDataProperty() && desc.isWritable()) {
-            inlineCache->m_cachedIndex = findResult.first;
-            inlineCache->m_cachedhiddenClassChainLength = 1;
-            inlineCache->m_cachedHiddenClass = obj->structure();
+            if (code->m_inlineCacheProtoTraverseMaxIndex == 0) {
+                newItem.m_cachedIndex = findResult.first;
+                newItem.m_cachedhiddenClassChainLength = 1;
+                newItem.m_cachedHiddenClass = obj->structure();
+            } else {
+                newItem.m_cachedIndex = findResult.first;
+                newItem.m_cachedhiddenClassChainLength = 1;
+                newItem.m_cachedHiddenClassChainData = (ObjectStructure**)GC_MALLOC(sizeof(ObjectStructure*));
+                newItem.m_cachedHiddenClassChainData[0] = obj->structure();
+            }
+        } else {
+            goto GiveUp;
         }
     } else {
         Object* orgObject = obj;
         if (UNLIKELY(!obj->structure()->inTransitionMode())) {
-            inlineCache->invalidateCache();
             orgObject->setThrowsExceptionWhenStrictMode(state, ObjectPropertyName(state, code->m_propertyName), value, willBeObject);
-            return;
+            goto GiveUp;
         }
 
         VectorWithInlineStorage<24, ObjectStructure*, std::allocator<ObjectStructure*>> cachedhiddenClassChain;
@@ -2407,42 +2490,62 @@ NEVER_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperationCacheMis
             if (!UNLIKELY(obj->isInlineCacheable())) {
                 code->m_missCount++;
                 originalObject->setThrowsExceptionWhenStrictMode(state, ObjectPropertyName(state, code->m_propertyName), value, willBeObject);
-                return;
+                goto GiveUp;
             }
 
             cachedhiddenClassChain.push_back(obj->structure());
             proto = obj->getPrototype(state);
         }
 
-        inlineCache->m_hiddenClassWillBe = nullptr;
-        inlineCache->m_cachedhiddenClassChainLength = cachedhiddenClassChain.size();
-        inlineCache->m_cachedHiddenClassChainData = (ObjectStructure**)GC_MALLOC(sizeof(ObjectStructure*) * inlineCache->m_cachedhiddenClassChainLength);
-        memcpy(inlineCache->m_cachedHiddenClassChainData, cachedhiddenClassChain.data(), sizeof(ObjectStructure*) * inlineCache->m_cachedhiddenClassChainLength);
+        newItem.m_cachedIndex = SetObjectInlineCacheData::inlineCacheCachedIndexMax;
+        newItem.m_cachedhiddenClassChainLength = cachedhiddenClassChain.size();
+        // +1 space for next object structure
+        newItem.m_cachedHiddenClassChainData = (ObjectStructure**)GC_MALLOC(sizeof(ObjectStructure*) * (newItem.m_cachedhiddenClassChainLength + 1));
+        memcpy(newItem.m_cachedHiddenClassChainData, cachedhiddenClassChain.data(), sizeof(ObjectStructure*) * newItem.m_cachedhiddenClassChainLength);
 
-        block->m_inlineCacheDataSize += sizeof(size_t) * inlineCache->m_cachedhiddenClassChainLength;
-        currentCodeSizeTotal += sizeof(size_t) * inlineCache->m_cachedhiddenClassChainLength;
+        block->m_inlineCacheDataSize += sizeof(size_t) * newItem.m_cachedhiddenClassChainLength;
+        currentCodeSizeTotal += sizeof(size_t) * newItem.m_cachedhiddenClassChainLength;
         bool s = orgObject->set(state, ObjectPropertyName(state, code->m_propertyName), value, willBeObject);
         if (UNLIKELY(!s)) {
+            inlineCache->m_cache.clear();
+            code->m_inlineCache = nullptr;
+            code->m_missCount = maxCacheMissCount + 1;
             if (state.inStrictMode()) {
                 orgObject->throwCannotWriteError(state, code->m_propertyName);
             }
-
-            inlineCache->invalidateCache();
             return;
         }
         if (!orgObject->structure()->inTransitionMode()) {
-            inlineCache->invalidateCache();
-            return;
+            goto GiveUp;
         }
 
         auto result = orgObject->get(state, ObjectPropertyName(state, code->m_propertyName));
         if (!result.hasValue() || !result.isDataProperty()) {
-            inlineCache->invalidateCache();
-            return;
+            goto GiveUp;
         }
 
-        inlineCache->m_hiddenClassWillBe = orgObject->structure();
+        newItem.m_cachedHiddenClassChainData[newItem.m_cachedhiddenClassChainLength] = orgObject->structure();
+
+        if (code->m_inlineCacheProtoTraverseMaxIndex == 0) {
+            // convert simple case to complex case
+            for (size_t i = 1; i < inlineCache->m_cache.size(); i++) {
+                auto oldClass = inlineCache->m_cache[i].m_cachedHiddenClass;
+                block->m_inlineCacheDataSize += sizeof(size_t);
+                currentCodeSizeTotal += sizeof(size_t);
+                ASSERT(inlineCache->m_cache[i].m_cachedhiddenClassChainLength == 1);
+                inlineCache->m_cache[i].m_cachedHiddenClassChainData = (ObjectStructure**)GC_MALLOC(sizeof(ObjectStructure*));
+                inlineCache->m_cache[i].m_cachedHiddenClassChainData[0] = oldClass;
+            }
+        }
+        code->m_inlineCacheProtoTraverseMaxIndex = std::max(cachedhiddenClassChain.size() - 1, (size_t)code->m_inlineCacheProtoTraverseMaxIndex);
     }
+
+    return;
+
+GiveUp:
+    inlineCache->m_cache.clear();
+    code->m_inlineCache = nullptr;
+    code->m_missCount = maxCacheMissCount + 1;
 }
 
 ALWAYS_INLINE Object* ByteCodeInterpreter::fastToObject(ExecutionState& state, const Value& obj)
@@ -2585,7 +2688,7 @@ NEVER_INLINE void ByteCodeInterpreter::createFunctionOperation(ExecutionState& s
 
     if (UNLIKELY(isGenerator && isAsync)) {
         proto = functionRealm->globalObject()->asyncGenerator();
-        Value thisValue = cb->isArrowFunctionExpression() ? registerFile[byteCodeBlock->m_requiredRegisterFileSizeInValueSize] : Value(Value::EmptyValue);
+        Value thisValue = cb->isArrowFunctionExpression() ? registerFile[byteCodeBlock->m_requiredOperandRegisterNumber] : Value(Value::EmptyValue);
         Object* homeObject = (cb->isObjectMethod() || cb->isClassMethod() || cb->isClassStaticMethod()) ? registerFile[code->m_homeObjectRegisterIndex].asObject() : nullptr;
         registerFile[code->m_registerIndex] = new ScriptAsyncGeneratorFunctionObject(state, proto, cb, outerLexicalEnvironment, thisValue, homeObject);
     } else if (UNLIKELY(isGenerator)) {
@@ -2884,7 +2987,7 @@ NEVER_INLINE void ByteCodeInterpreter::initializeClassOperation(ExecutionState&
         } else {
             if (!heritagePresent) {
                 Value argv[] = { String::emptyString, String::emptyString };
-                auto functionSource = FunctionObject::createFunctionScript(state, state.context()->staticStrings().constructor, 1, &argv[0], argv[1], true, false, false, false, true);
+                auto functionSource = FunctionObject::createDynamicFunctionScript(state, state.context()->staticStrings().constructor, 1, &argv[0], argv[1], true, false, false, false, true);
                 functionSource.codeBlock->setAsClassConstructor();
                 constructor = new ScriptClassConstructorFunctionObject(state, constructorParent.asObject(),
                                                                        functionSource.codeBlock, functionSource.outerEnvironment, proto,
@@ -2892,7 +2995,7 @@ NEVER_INLINE void ByteCodeInterpreter::initializeClassOperation(ExecutionState&
             } else {
                 Value argv[] = { state.context()->staticStrings().lazyDotDotDotArgs().string(),
                                  state.context()->staticStrings().lazySuperDotDotDotArgs().string() };
-                auto functionSource = FunctionObject::createFunctionScript(state, state.context()->staticStrings().constructor, 1, &argv[0], argv[1], true, false, false, true, true);
+                auto functionSource = FunctionObject::createDynamicFunctionScript(state, state.context()->staticStrings().constructor, 1, &argv[0], argv[1], true, false, false, true, true);
                 functionSource.codeBlock->setAsClassConstructor();
                 functionSource.codeBlock->setAsDerivedClassConstructor();
                 constructor = new ScriptClassConstructorFunctionObject(state, constructorParent.asObject(),
@@ -2988,7 +3091,7 @@ NEVER_INLINE void ByteCodeInterpreter::complexSetObjectOperation(ExecutionState&
             ASSERT(envRec->isDeclarativeEnvironmentRecord() && envRec->asDeclarativeEnvironmentRecord()->isFunctionEnvironmentRecord());
             thisValue = envRec->asDeclarativeEnvironmentRecord()->asFunctionEnvironmentRecord()->getThisBinding(state);
         } else {
-            thisValue = registerFile[byteCodeBlock->m_requiredRegisterFileSizeInValueSize];
+            thisValue = registerFile[byteCodeBlock->m_requiredOperandRegisterNumber];
         }
 
         const Value& object = registerFile[code->m_objectRegisterIndex];
@@ -3025,7 +3128,7 @@ NEVER_INLINE void ByteCodeInterpreter::complexGetObjectOperation(ExecutionState&
             ASSERT(envRec->isDeclarativeEnvironmentRecord() && envRec->asDeclarativeEnvironmentRecord()->isFunctionEnvironmentRecord());
             thisValue = envRec->asDeclarativeEnvironmentRecord()->asFunctionEnvironmentRecord()->getThisBinding(state);
         } else {
-            thisValue = registerFile[byteCodeBlock->m_requiredRegisterFileSizeInValueSize];
+            thisValue = registerFile[byteCodeBlock->m_requiredOperandRegisterNumber];
         }
 
         Value object = registerFile[code->m_objectRegisterIndex];
@@ -3359,7 +3462,7 @@ NEVER_INLINE void ByteCodeInterpreter::callFunctionComplexCase(ExecutionState& s
         for (size_t i = 0; i < idInfo.size(); i++) {
             if (idInfo[i].m_name == argumentsAtomicString) {
                 if (idInfo[i].m_needToAllocateOnStack) {
-                    argumentsValue = registerFile[idInfo[i].m_indexForIndexedStorage + byteCodeBlock->m_requiredRegisterFileSizeInValueSize];
+                    argumentsValue = registerFile[idInfo[i].m_indexForIndexedStorage + byteCodeBlock->m_requiredOperandRegisterNumber];
                 } else {
                     argumentsValue = functionRecord->getBindingValue(state, argumentsAtomicString).m_value;
                 }
@@ -4268,6 +4371,6 @@ NEVER_INLINE void ByteCodeInterpreter::ensureArgumentsObjectOperation(ExecutionS
     auto functionRecord = state.mostNearestFunctionLexicalEnvironment()->record()->asDeclarativeEnvironmentRecord()->asFunctionEnvironmentRecord();
     auto functionObject = functionRecord->functionObject()->asScriptFunctionObject();
     bool isMapped = functionObject->interpretedCodeBlock()->shouldHaveMappedArguments();
-    functionObject->generateArgumentsObject(state, state.argc(), state.argv(), functionRecord, registerFile + byteCodeBlock->m_requiredRegisterFileSizeInValueSize, isMapped);
+    functionObject->generateArgumentsObject(state, state.argc(), state.argv(), functionRecord, registerFile + byteCodeBlock->m_requiredOperandRegisterNumber, isMapped);
 }
 } // namespace Escargot
index ef9168af9584eccfb5ee5e97731b79d0094eb002..8c7f6b3e1db387160ab3bcea804458be621c0f6d 100644 (file)
@@ -113,10 +113,10 @@ private:
     static bool abstractLeftIsLessThanEqualRight(ExecutionState& state, const Value& left, const Value& right, bool switched);
 
     static void getObjectPrecomputedCaseOperation(ExecutionState& state, GetObjectPreComputedCase* code, Value* registerFile, ByteCodeBlock* block);
-    static bool getObjectPrecomputedCaseOperationSlowCase(ExecutionState& state, Object* obj, const Value& receiver, GetObjectPreComputedCase* code, GetObjectInlineCacheData* cacheData,
-                                                          const size_t& cacheFillCount, Value* registerFile, ByteCodeBlock* block);
+    static bool getObjectPrecomputedCaseOperationSlowCase(ExecutionState& state, Object* obj, const Value& receiver, GetObjectPreComputedCase* code, Value* registerFile, ByteCodeBlock* block);
     static void getObjectPrecomputedCaseOperationCacheMiss(ExecutionState& state, Object* obj, const Value& receiver, GetObjectPreComputedCase* code, Value* registerFile, ByteCodeBlock* block);
     static void setObjectPreComputedCaseOperation(ExecutionState& state, const Value& willBeObject, const Value& value, SetObjectPreComputedCase* code, ByteCodeBlock* block);
+    static bool setObjectPreComputedCaseOperationSlowCase(ExecutionState& state, Object* obj, const Value& willBeObject, const Value& value, SetObjectPreComputedCase* code, ByteCodeBlock* block);
     static void setObjectPreComputedCaseOperationCacheMiss(ExecutionState& state, Object* obj, const Value& willBeObject, const Value& value, SetObjectPreComputedCase* code, ByteCodeBlock* block);
 
     static Object* fastToObject(ExecutionState& state, const Value& obj);
index 57f52d49c5c84d9d8cf00ec902f0f53835152ad7..e5ea3cd4b45acffbbd9c102d986dc5c40ea56d87 100644 (file)
@@ -184,6 +184,7 @@ InterpretedCodeBlock::InterpretedCodeBlock(Context* ctx, Script* script, StringV
     , m_lexicalBlockStackAllocatedIdentifierMaximumDepth(0)
     , m_functionBodyBlockIndex(0)
     , m_lexicalBlockIndexFunctionLocatedIn(0)
+    , m_isFunctionNameUsedBySelf(false)
     , m_isFunctionNameSaveOnHeap(false)
     , m_isFunctionNameExplicitlyDeclared(false)
     , m_canUseIndexedVariableStorage(false)
@@ -244,6 +245,7 @@ InterpretedCodeBlock::InterpretedCodeBlock(Context* ctx, Script* script, StringV
     , m_lexicalBlockStackAllocatedIdentifierMaximumDepth(0)
     , m_functionBodyBlockIndex(0)
     , m_lexicalBlockIndexFunctionLocatedIn(scopeCtx->m_lexicalBlockIndexFunctionLocatedIn)
+    , m_isFunctionNameUsedBySelf(false)
     , m_isFunctionNameSaveOnHeap(false)
     , m_isFunctionNameExplicitlyDeclared(false)
     , m_canUseIndexedVariableStorage(false)
@@ -304,6 +306,7 @@ InterpretedCodeBlock::InterpretedCodeBlock(Context* ctx, Script* script)
     , m_lexicalBlockStackAllocatedIdentifierMaximumDepth(0)
     , m_functionBodyBlockIndex(0)
     , m_lexicalBlockIndexFunctionLocatedIn(0)
+    , m_isFunctionNameUsedBySelf(false)
     , m_isFunctionNameSaveOnHeap(false)
     , m_isFunctionNameExplicitlyDeclared(false)
     , m_canUseIndexedVariableStorage(false)
@@ -627,9 +630,7 @@ void InterpretedCodeBlock::computeVariables()
             // name of function expression is immutable
             for (size_t i = 0; i < m_identifierInfos.size(); i++) {
                 if (m_identifierInfos[i].m_name == m_functionName && !m_identifierInfos[i].m_isExplicitlyDeclaredOrParameterName) {
-                    if (m_isFunctionExpression) {
-                        m_identifierInfos[i].m_isMutable = false;
-                    }
+                    m_identifierInfos[i].m_isMutable = false;
                     break;
                 }
             }
index 228c8877aa39b5f2826305723184d0e92b861a49..a7a4ed263194e5cda1a6176533b86d49ffa23043 100644 (file)
@@ -657,6 +657,11 @@ public:
     }
 #endif
 
+    bool isFunctionNameUsedBySelf() const
+    {
+        return m_isFunctionNameUsedBySelf;
+    }
+
     bool isFunctionNameSaveOnHeap() const
     {
         return m_isFunctionNameSaveOnHeap;
@@ -869,6 +874,7 @@ protected:
     LexicalBlockIndex m_functionBodyBlockIndex : 16;
     LexicalBlockIndex m_lexicalBlockIndexFunctionLocatedIn : 16;
 
+    bool m_isFunctionNameUsedBySelf : 1;
     bool m_isFunctionNameSaveOnHeap : 1;
     bool m_isFunctionNameExplicitlyDeclared : 1;
     bool m_canUseIndexedVariableStorage : 1;
@@ -900,7 +906,7 @@ protected:
     bool m_allowSuperCall : 1;
     bool m_allowSuperProperty : 1;
     bool m_allowArguments : 1;
-    // represent if its source code is created dynamically by createFunctionScript
+    // represent if its source code is created dynamically by createDynamicFunctionScript
     bool m_hasDynamicSourceCode : 1;
 #ifdef ESCARGOT_DEBUGGER
     // mark that this InterpretedCodeBlock should generate debugging bytecode (breakpoint)
index a78741a712f8541a41b0d611b40f852a0b1d9c43..b0d87769c6da62db27a8fbb2da22199c6248067c 100644 (file)
@@ -459,7 +459,7 @@ Value Script::execute(ExecutionState& state, bool isExecuteOnEvalFunction, bool
     Value thisValue(context()->globalObjectProxy());
 
     const size_t literalStorageSize = byteCodeBlock->m_numeralLiteralData.size();
-    const size_t registerFileSize = byteCodeBlock->m_requiredRegisterFileSizeInValueSize + 1 + literalStorageSize + m_topCodeBlock->lexicalBlockStackAllocatedIdentifierMaximumDepth();
+    const size_t registerFileSize = byteCodeBlock->m_requiredTotalRegisterNumber;
     Value* registerFile;
     if (LIKELY(!m_topCodeBlock->isAsync())) {
         registerFile = (Value*)ALLOCA(registerFileSize * sizeof(Value), Value, state);
@@ -469,7 +469,7 @@ Value Script::execute(ExecutionState& state, bool isExecuteOnEvalFunction, bool
         memset(static_cast<void*>(registerFile), 0, sizeof(Value) * registerFileSize);
     }
     registerFile[0] = Value();
-    Value* stackStorage = registerFile + byteCodeBlock->m_requiredRegisterFileSizeInValueSize;
+    Value* stackStorage = registerFile + byteCodeBlock->m_requiredOperandRegisterNumber;
     stackStorage[0] = thisValue;
     Value* literalStorage = stackStorage + 1 + m_topCodeBlock->lexicalBlockStackAllocatedIdentifierMaximumDepth();
     Value* src = byteCodeBlock->m_numeralLiteralData.data();
@@ -479,6 +479,10 @@ Value Script::execute(ExecutionState& state, bool isExecuteOnEvalFunction, bool
 
     Value resultValue;
     if (LIKELY(!m_topCodeBlock->isAsync())) {
+#ifdef ESCARGOT_DEBUGGER
+        // set the next(first) breakpoint to be stopped in a newer script execution
+        context()->setAsAlwaysStopState();
+#endif
         resultValue = ByteCodeInterpreter::interpret(codeExecutionState, byteCodeBlock, 0, registerFile);
         clearStack<512>();
 
@@ -568,9 +572,9 @@ Value Script::executeLocal(ExecutionState& state, Value thisValue, InterpretedCo
     size_t stackStorageSize = m_topCodeBlock->totalStackAllocatedVariableSize();
     size_t identifierOnStackCount = m_topCodeBlock->identifierOnStackCount();
     size_t literalStorageSize = byteCodeBlock->m_numeralLiteralData.size();
-    Value* registerFile = ALLOCA((byteCodeBlock->m_requiredRegisterFileSizeInValueSize + stackStorageSize + literalStorageSize + m_topCodeBlock->lexicalBlockStackAllocatedIdentifierMaximumDepth()) * sizeof(Value), Value, state);
+    Value* registerFile = ALLOCA((byteCodeBlock->m_requiredTotalRegisterNumber) * sizeof(Value), Value, state);
     registerFile[0] = Value();
-    Value* stackStorage = registerFile + byteCodeBlock->m_requiredRegisterFileSizeInValueSize;
+    Value* stackStorage = registerFile + byteCodeBlock->m_requiredOperandRegisterNumber;
     for (size_t i = 0; i < identifierOnStackCount; i++) {
         stackStorage[i] = Value();
     }
@@ -1065,7 +1069,7 @@ Script::ModuleExecutionResult Script::moduleExecute(ExecutionState& state, Optio
     newState->setLexicalEnvironment(new LexicalEnvironment(moduleData()->m_moduleRecord, globalLexicalEnv), true);
 
     const size_t literalStorageSize = byteCodeBlock->m_numeralLiteralData.size();
-    const size_t registerFileSize = byteCodeBlock->m_requiredRegisterFileSizeInValueSize + 1 + literalStorageSize + m_topCodeBlock->lexicalBlockStackAllocatedIdentifierMaximumDepth();
+    const size_t registerFileSize = byteCodeBlock->m_requiredTotalRegisterNumber;
     Value* registerFile;
     if (LIKELY(!m_topCodeBlock->isAsync())) {
         registerFile = (Value*)ALLOCA(registerFileSize * sizeof(Value), Value, state);
@@ -1076,7 +1080,7 @@ Script::ModuleExecutionResult Script::moduleExecute(ExecutionState& state, Optio
     }
 
     registerFile[0] = Value();
-    Value* stackStorage = registerFile + byteCodeBlock->m_requiredRegisterFileSizeInValueSize;
+    Value* stackStorage = registerFile + byteCodeBlock->m_requiredOperandRegisterNumber;
     stackStorage[0] = Value();
     Value* literalStorage = stackStorage + 1 + m_topCodeBlock->lexicalBlockStackAllocatedIdentifierMaximumDepth();
     Value* src = byteCodeBlock->m_numeralLiteralData.data();
index 9534044bf2ab98e900c69466bc023513c5ce7887..c006ca86465d947afcb7ef17f6f155d468a733c0 100644 (file)
@@ -146,12 +146,13 @@ public:
         }
     };
 
-    Script(String* srcName, String* sourceCode, ModuleData* moduleData, bool canExecuteAgain)
+    Script(String* srcName, String* sourceCode, ModuleData* moduleData, bool canExecuteAgain, size_t originLineOffset)
         : m_canExecuteAgain(canExecuteAgain && !moduleData)
         , m_srcName(srcName)
         , m_sourceCode(sourceCode)
         , m_topCodeBlock(nullptr)
         , m_moduleData(moduleData)
+        , m_originSourceLineOffset(originLineOffset)
     {
         // srcName and sourceCode should have valid string (empty string for no name)
         ASSERT(!!srcName && !!sourceCode);
@@ -204,6 +205,8 @@ public:
     // https://tc39.es/ecma262/#sec-getmodulenamespace
     ModuleNamespaceObject* getModuleNamespace(ExecutionState& state);
 
+    size_t originSourceLineOffset() const { return m_originSourceLineOffset; }
+
 private:
     Value executeLocal(ExecutionState& state, Value thisValue, InterpretedCodeBlock* parentCodeBlock, bool isStrictModeOutside = false, bool isEvalCodeOnFunction = false);
     Script* loadModuleFromScript(ExecutionState& state, String* src);
@@ -283,7 +286,12 @@ private:
     String* m_sourceCode;
     InterpretedCodeBlock* m_topCodeBlock;
     ModuleData* m_moduleData;
+
+    // original source code's start line offset
+    // default value is zero, but it has other value for source codes manipulated by `createFunctionScript`
+    size_t m_originSourceLineOffset;
 };
+
 } // namespace Escargot
 
 #endif
index 746531bc2faf230b34fc5ffbafba67bb188491fc..7cef92052cc29a10b3c3f2cb464cf9f70b772b47 100644 (file)
@@ -209,6 +209,10 @@ InterpretedCodeBlock* ScriptParser::generateCodeBlockTreeFromASTWalker(Context*
                         c = c->parent();
                     }
                 }
+
+                if (uname == codeBlock->functionName()) {
+                    codeBlock->m_isFunctionNameUsedBySelf = true;
+                }
             }
         }
     }
@@ -273,8 +277,10 @@ void ScriptParser::deleteCodeBlockCacheInfo()
     m_codeBlockCacheInfo = nullptr;
 }
 
-ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode, bool isEvalCodeInFunction, bool inWithOperation, bool strictFromOutside, bool allowSuperCall, bool allowSuperProperty, bool allowNewTarget, bool needByteCodeGeneration, size_t stackSizeRemain)
+ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* originSource, size_t originLineOffset, String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode, bool isEvalCodeInFunction, bool inWithOperation, bool strictFromOutside, bool allowSuperCall, bool allowSuperProperty, bool allowNewTarget, bool needByteCodeGeneration, size_t stackSizeRemain)
 {
+    UNUSED_PARAMETER(originSource);
+
     size_t srcHash = 0;
     CodeCache* codeCache = m_context->vmInstance()->codeCache();
     bool cacheable = codeCache->enabled() && needByteCodeGeneration && !isModule && !isEvalMode && srcName->length() && source->length() > CODE_CACHE_MIN_SOURCE_LENGTH;
@@ -287,7 +293,7 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* sour
         if (result.first) {
             GC_disable();
 
-            Script* script = new Script(srcName, source, nullptr, false);
+            Script* script = new Script(srcName, source, nullptr, false, originLineOffset);
             CodeCacheEntry& entry = result.second;
 
             codeCache->prepareCacheLoading(m_context, srcHash, entry);
@@ -336,7 +342,7 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* sour
         programNode = esprima::parseProgram(m_context, sourceView, outerClassInfo,
                                             isModule, strictFromOutside, inWith, stackSizeRemain, allowSC, allowSP, allowNewTarget, allowArguments);
 
-        script = new Script(srcName, source, programNode->moduleData(), !parentCodeBlock);
+        script = new Script(srcName, source, programNode->moduleData(), !parentCodeBlock, originLineOffset);
         if (parentCodeBlock) {
             programNode->scopeContext()->m_hasEval = parentCodeBlock->hasEval();
             programNode->scopeContext()->m_hasWith = parentCodeBlock->hasWith();
@@ -414,12 +420,12 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* sour
 
 #else
 
-ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode, bool isEvalCodeInFunction, bool inWithOperation, bool strictFromOutside, bool allowSuperCall, bool allowSuperProperty, bool allowNewTarget, bool needByteCodeGeneration, size_t stackSizeRemain)
+ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* originSource, size_t originLineOffset, String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode, bool isEvalCodeInFunction, bool inWithOperation, bool strictFromOutside, bool allowSuperCall, bool allowSuperProperty, bool allowNewTarget, bool needByteCodeGeneration, size_t stackSizeRemain)
 {
     ASSERT(m_context->astAllocator().isInitialized());
 #ifdef ESCARGOT_DEBUGGER
-    if (LIKELY(needByteCodeGeneration) && m_context->debuggerEnabled() && !m_context->debugger()->skipSourceCode(srcName)) {
-        return initializeScriptWithDebugger(source, srcName, parentCodeBlock, isModule, isEvalMode, isEvalCodeInFunction, inWithOperation, strictFromOutside, allowSuperCall, allowSuperProperty, allowNewTarget);
+    if (LIKELY(needByteCodeGeneration) && m_context->debuggerEnabled() && srcName->length() && !m_context->debugger()->skipSourceCode(srcName)) {
+        return initializeScriptWithDebugger(originSource, originLineOffset, source, srcName, parentCodeBlock, isModule, isEvalMode, isEvalCodeInFunction, inWithOperation, strictFromOutside, allowSuperCall, allowSuperProperty, allowNewTarget);
     }
 #endif /* ESCARGOT_DEBUGGER */
 
@@ -442,7 +448,7 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* sour
         programNode = esprima::parseProgram(m_context, sourceView, outerClassInfo,
                                             isModule, strictFromOutside, inWith, stackSizeRemain, allowSC, allowSP, allowNewTarget, allowArguments);
 
-        script = new Script(srcName, source, programNode->moduleData(), !parentCodeBlock);
+        script = new Script(srcName, source, programNode->moduleData(), !parentCodeBlock, originLineOffset);
         if (parentCodeBlock) {
             programNode->scopeContext()->m_hasEval = parentCodeBlock->hasEval();
             programNode->scopeContext()->m_hasWith = parentCodeBlock->hasWith();
@@ -561,8 +567,11 @@ void ScriptParser::recursivelyGenerateChildrenByteCode(InterpretedCodeBlock* par
     }
 }
 
-ScriptParser::InitializeScriptResult ScriptParser::initializeScriptWithDebugger(String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode, bool isEvalCodeInFunction, bool inWithOperation, bool strictFromOutside, bool allowSuperCall, bool allowSuperProperty, bool allowNewTarget)
+ScriptParser::InitializeScriptResult ScriptParser::initializeScriptWithDebugger(String* originSource, size_t originLineOffset, String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode, bool isEvalCodeInFunction, bool inWithOperation, bool strictFromOutside, bool allowSuperCall, bool allowSuperProperty, bool allowNewTarget)
 {
+    // src name should have valid string
+    ASSERT(srcName && srcName->length());
+
     GC_disable();
     if (m_context->debuggerEnabled()) {
         m_context->debugger()->setInDebuggingCodeMode(true);
@@ -584,7 +593,7 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScriptWithDebugger(
 
         programNode = esprima::parseProgram(m_context, sourceView, outerClassInfo, isModule, strictFromOutside, inWith, SIZE_MAX, allowSC, allowSP, allowNewTarget, allowArguments);
 
-        script = new Script(srcName, source, programNode->moduleData(), !parentCodeBlock);
+        script = new Script(srcName, source, programNode->moduleData(), !parentCodeBlock, originLineOffset);
         if (parentCodeBlock) {
             programNode->scopeContext()->m_hasEval = parentCodeBlock->hasEval();
             programNode->scopeContext()->m_hasWith = parentCodeBlock->hasWith();
@@ -605,7 +614,7 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScriptWithDebugger(
         m_context->astAllocator().reset();
 
         if (m_context->debuggerEnabled()) {
-            m_context->debugger()->parseCompleted(source, srcName, orgError->message);
+            m_context->debugger()->parseCompleted(originSource ? originSource : source, srcName, originLineOffset, orgError->message);
             m_context->debugger()->clearParsingData();
             m_context->debugger()->setInDebuggingCodeMode(false);
         }
@@ -640,7 +649,7 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScriptWithDebugger(
     if (debugger != nullptr) {
         recursivelyGenerateChildrenByteCode(topCodeBlock);
 
-        debugger->parseCompleted(source, srcName);
+        debugger->parseCompleted(originSource ? originSource : source, srcName, originLineOffset);
         debugger->clearParsingData();
         debugger->setInDebuggingCodeMode(false);
     }
index 76512003ac5085e7afdf41d9b003f4fa631d530a..3c5f956bcda8d9b406af252cf51d78b6cbcb854d 100644 (file)
@@ -62,12 +62,14 @@ public:
         }
     };
 
-    InitializeScriptResult initializeScript(String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode = false, bool isEvalCodeInFunction = false, bool inWithOperation = false, bool strictFromOutside = false, bool allowSuperCall = false, bool allowSuperProperty = false, bool allowNewTarget = false, bool needByteCodeGeneration = true, size_t stackSizeRemain = SIZE_MAX);
+    InitializeScriptResult initializeScript(String* originSource, size_t originLineOffset, String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode = false, bool isEvalCodeInFunction = false, bool inWithOperation = false, bool strictFromOutside = false, bool allowSuperCall = false, bool allowSuperProperty = false, bool allowNewTarget = false, bool needByteCodeGeneration = true, size_t stackSizeRemain = SIZE_MAX);
     InitializeScriptResult initializeScript(String* source, String* srcName, bool isModule)
     {
-        return initializeScript(source, srcName, nullptr, isModule);
+        return initializeScript(nullptr, 0, source, srcName, nullptr, isModule);
     }
 
+    Context* context() const { return m_context; }
+
     void generateFunctionByteCode(ExecutionState& state, InterpretedCodeBlock* codeBlock, size_t stackSizeRemain);
 
 #if defined(ENABLE_CODE_CACHE)
@@ -85,7 +87,7 @@ private:
 
 #ifdef ESCARGOT_DEBUGGER
     void recursivelyGenerateChildrenByteCode(InterpretedCodeBlock* topCodeBlock);
-    InitializeScriptResult initializeScriptWithDebugger(String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode, bool isEvalCodeInFunction, bool inWithOperation, bool strictFromOutside, bool allowSuperCall, bool allowSuperProperty, bool allowNewTarget);
+    InitializeScriptResult initializeScriptWithDebugger(String* originSource, size_t originLineOffset, String* source, String* srcName, InterpretedCodeBlock* parentCodeBlock, bool isModule, bool isEvalMode, bool isEvalCodeInFunction, bool inWithOperation, bool strictFromOutside, bool allowSuperCall, bool allowSuperProperty, bool allowNewTarget);
 #endif /* ESCARGOT_DEBUGGER */
 
     Context* m_context;
index 694c6a9f86ad2649d84131dfb68ccb8d209d0276..01a91f4261be0ace68243d259f1ef7dded5708a4 100644 (file)
@@ -167,8 +167,8 @@ public:
 
         if (m_forIn) {
             // for-in statement
-            auto oldRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredRegisterFileSizeInValueSize;
-            codeBlock->m_requiredRegisterFileSizeInValueSize = 0;
+            auto oldRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredOperandRegisterNumber;
+            codeBlock->m_requiredOperandRegisterNumber = 0;
 
             size_t headRightLexicalBlockIndexBefore = newContext.m_lexicalBlockIndex;
             ByteCodeBlock::ByteCodeLexicalBlockContext headRightBlockContext;
@@ -224,16 +224,16 @@ public:
             ASSERT(newContext.m_registerStack->size() == baseCountBefore);
             newContext.giveUpRegister();
 
-            auto headRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredRegisterFileSizeInValueSize;
+            auto headRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredOperandRegisterNumber;
 
-            oldRequiredRegisterFileSizeInValueSize = std::max(oldRequiredRegisterFileSizeInValueSize, codeBlock->m_requiredRegisterFileSizeInValueSize);
-            codeBlock->m_requiredRegisterFileSizeInValueSize = 0;
+            oldRequiredRegisterFileSizeInValueSize = std::max(oldRequiredRegisterFileSizeInValueSize, codeBlock->m_requiredOperandRegisterNumber);
+            codeBlock->m_requiredOperandRegisterNumber = 0;
             generateBodyByteCode(codeBlock, context, newContext);
 
-            auto bodyRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredRegisterFileSizeInValueSize;
+            auto bodyRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredOperandRegisterNumber;
             auto dataRegisterIndex = std::max(headRequiredRegisterFileSizeInValueSize, bodyRequiredRegisterFileSizeInValueSize);
 
-            codeBlock->m_requiredRegisterFileSizeInValueSize = std::max({ oldRequiredRegisterFileSizeInValueSize, codeBlock->m_requiredRegisterFileSizeInValueSize, (ByteCodeRegisterIndex)(dataRegisterIndex + 1) });
+            codeBlock->m_requiredOperandRegisterNumber = std::max({ oldRequiredRegisterFileSizeInValueSize, codeBlock->m_requiredOperandRegisterNumber, (ByteCodeRegisterIndex)(dataRegisterIndex + 1) });
 
             codeBlock->peekCode<CreateEnumerateObject>(ePosition)->m_dataRegisterIndex = dataRegisterIndex;
             codeBlock->peekCode<CheckLastEnumerateKey>(checkPos)->m_registerIndex = dataRegisterIndex;
@@ -242,8 +242,8 @@ public:
             // for-of statement
             TryStatementNode::generateTryStatementStartByteCode(codeBlock, &newContext, this, forOfTryStatementContext);
 
-            auto oldRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredRegisterFileSizeInValueSize;
-            codeBlock->m_requiredRegisterFileSizeInValueSize = 0;
+            auto oldRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredOperandRegisterNumber;
+            codeBlock->m_requiredOperandRegisterNumber = 0;
 
             forOfEndCheckRegisterHeadStartPosition = codeBlock->currentCodeSize();
             codeBlock->pushCode(LoadLiteral(ByteCodeLOC(m_loc.index), SIZE_MAX, Value(true)), &newContext, this);
@@ -347,22 +347,22 @@ public:
             ASSERT(newContext.m_registerStack->size() == baseCountBefore);
             newContext.giveUpRegister();
 
-            auto headRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredRegisterFileSizeInValueSize;
+            auto headRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredOperandRegisterNumber;
 
-            oldRequiredRegisterFileSizeInValueSize = std::max(oldRequiredRegisterFileSizeInValueSize, codeBlock->m_requiredRegisterFileSizeInValueSize);
-            codeBlock->m_requiredRegisterFileSizeInValueSize = 0;
+            oldRequiredRegisterFileSizeInValueSize = std::max(oldRequiredRegisterFileSizeInValueSize, codeBlock->m_requiredOperandRegisterNumber);
+            codeBlock->m_requiredOperandRegisterNumber = 0;
 
             generateBodyByteCode(codeBlock, context, newContext);
 
             forOfEndCheckRegisterBodyEndPosition = codeBlock->currentCodeSize();
             codeBlock->pushCode(LoadLiteral(ByteCodeLOC(m_loc.index), SIZE_MAX, Value(true)), &newContext, this);
 
-            auto bodyRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredRegisterFileSizeInValueSize;
+            auto bodyRequiredRegisterFileSizeInValueSize = codeBlock->m_requiredOperandRegisterNumber;
             iteratorRecordRegisterIndex = std::max(headRequiredRegisterFileSizeInValueSize, bodyRequiredRegisterFileSizeInValueSize);
             iteratorObjectRegisterIndex = iteratorRecordRegisterIndex + 1;
             finishCheckRegisterIndex = iteratorRecordRegisterIndex + 2;
 
-            codeBlock->m_requiredRegisterFileSizeInValueSize = std::max({ oldRequiredRegisterFileSizeInValueSize, codeBlock->m_requiredRegisterFileSizeInValueSize, (ByteCodeRegisterIndex)(iteratorRecordRegisterIndex + 3) });
+            codeBlock->m_requiredOperandRegisterNumber = std::max({ oldRequiredRegisterFileSizeInValueSize, codeBlock->m_requiredOperandRegisterNumber, (ByteCodeRegisterIndex)(iteratorRecordRegisterIndex + 3) });
 
             codeBlock->peekCode<IteratorOperation>(getIteratorOperationPosition)->m_getIteratorData.m_dstIteratorRecordIndex = iteratorRecordRegisterIndex;
             codeBlock->peekCode<IteratorOperation>(getIteratorOperationPosition)->m_getIteratorData.m_dstIteratorObjectIndex = iteratorObjectRegisterIndex;
index dce9716189ab34c2527aa948b8da51c23cb7ec58..33b4a65dce25906c982d5c145b5bbd2e230e2d87 100644 (file)
@@ -40,6 +40,36 @@ public:
     virtual ASTNodeType type() override { return ASTNodeType::Function; }
     virtual void generateStatementByteCode(ByteCodeBlock* codeBlock, ByteCodeGenerateContext* context) override
     {
+        // binding function name if needs
+        if (context->m_codeBlock->functionName().string()->length()) {
+            if (context->m_codeBlock->isFunctionNameSaveOnHeap() || context->m_codeBlock->isFunctionNameUsedBySelf()) {
+                codeBlock->pushCode(BindingCalleeIntoRegister(ByteCodeLOC(m_loc.index)), context, this);
+            }
+        }
+
+        // init stack-allocated vars
+        if (context->m_codeBlock->canUseIndexedVariableStorage()) {
+            auto varInfo = codeBlock->m_codeBlock->identifierInfos();
+            auto fnName = codeBlock->m_codeBlock->functionName();
+            for (size_t i = 0; i < varInfo.size(); i++) {
+                const auto& var = varInfo[i];
+                if (var.m_name == fnName && !var.m_isExplicitlyDeclaredOrParameterName) {
+                    // this case, init from outside
+                    continue;
+                }
+                if (var.m_needToAllocateOnStack && !var.m_isParameterName) {
+                    codeBlock->pushCode(LoadLiteral(ByteCodeLOC(m_loc.index), REGULAR_REGISTER_LIMIT + var.m_indexForIndexedStorage, Value()), context, this);
+                }
+            }
+        }
+
+        // init literal values
+        if (context->m_numeralLiteralData) {
+            for (size_t i = 0; i < context->m_numeralLiteralData->size(); i++) {
+                codeBlock->pushCode(LoadLiteral(ByteCodeLOC(m_loc.index), REGULAR_REGISTER_LIMIT + VARIABLE_LIMIT + i, context->m_numeralLiteralData->data()[i]), context, this);
+            }
+        }
+
         if (codeBlock->m_codeBlock->functionBodyBlockIndex() != 0) {
             size_t lexicalBlockIndexBefore = context->m_lexicalBlockIndex;
 
index 6d0d3561bfeab0ff48f83e9d2e7b4562bf71471a..0788b2085d427245e0326e3e2cb37503d33256d1 100644 (file)
@@ -3683,8 +3683,7 @@ public:
 
         closeBlock(blockContext);
 
-        MetaNode node = this->createNode();
-        return this->finalize(node, builder.createBlockStatementNode(block, blockContext.childLexicalBlockIndex));
+        return this->finalize(this->createNode(), builder.createBlockStatementNode(block, blockContext.childLexicalBlockIndex));
     }
 
     // ECMA-262 13.3.1 Let and Const Declarations
@@ -4508,6 +4507,7 @@ public:
         this->expectKeyword(SwitchKeyword);
 
         this->expect(LeftParenthesis);
+        MetaNode node = this->createNode();
         ASTNode discriminant = this->parseExpression(builder);
         this->expect(RightParenthesis);
 
@@ -4555,7 +4555,7 @@ public:
         closeBlock(blockContext);
 
         this->context->inSwitch = previousInSwitch;
-        return this->finalize(this->createNode(), builder.createSwitchStatementNode(discriminant, casesA, deflt, casesB, blockContext.childLexicalBlockIndex));
+        return this->finalize(node, builder.createSwitchStatementNode(discriminant, casesA, deflt, casesB, blockContext.childLexicalBlockIndex));
     }
 
     // ECMA-262 13.13 Labelled Statements
@@ -4708,6 +4708,7 @@ public:
     ASTNode parseTryStatement(ASTBuilder& builder)
     {
         this->expectKeyword(TryKeyword);
+        MetaNode node = this->createNode();
 
         if (!this->match(LeftBrace)) {
             this->throwUnexpectedToken(this->lookahead);
@@ -4726,7 +4727,7 @@ public:
             this->throwError(Messages::NoCatchOrFinally);
         }
 
-        return this->finalize(this->createNode(), builder.createTryStatementNode(block, handler, finalizer));
+        return this->finalize(node, builder.createTryStatementNode(block, handler, finalizer));
     }
 
     // ECMA-262 13.16 The debugger statement
index cce5da0afb65f0db7fd44c9feeae3258d235c03c..cc43182635838b3f6a4591b4c24ecaa96c4041f1 100644 (file)
@@ -40,11 +40,14 @@ enum class TypedArrayType : unsigned {
 };
 
 class ArrayBuffer : public Object {
+    friend int getValidValueInArrayBufferObject(void* ptr, GC_mark_custom_result* arr);
+
 public:
     static const uint64_t maxArrayBufferSize = 210000000;
 
     explicit ArrayBuffer(ExecutionState& state, Object* proto)
         : Object(state, proto, ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER)
+        , m_cachedDataAddress(nullptr)
     {
     }
 
@@ -66,15 +69,15 @@ public:
 
     ALWAYS_INLINE uint8_t* data()
     {
-        if (LIKELY(m_backingStore)) {
-            return reinterpret_cast<uint8_t*>(m_backingStore->data());
+        if (LIKELY(m_cachedDataAddress.hasValue())) {
+            return m_cachedDataAddress.unwrap();
         }
-        return nullptr;
+        return dataSlowCase();
     }
 
     ALWAYS_INLINE size_t byteLength()
     {
-        if (LIKELY(m_backingStore)) {
+        if (LIKELY(m_backingStore.hasValue())) {
             return m_backingStore->byteLength();
         }
         return 0;
@@ -116,7 +119,24 @@ protected:
         GC_set_bit(desc, GC_WORD_OFFSET(ArrayBuffer, m_backingStore));
     }
 
+    void updateBackingStore(Optional<BackingStore*> bs)
+    {
+        m_backingStore = bs;
+        m_cachedDataAddress = nullptr;
+    }
+
+private:
+    NEVER_INLINE uint8_t* dataSlowCase()
+    {
+        if (LIKELY(m_backingStore)) {
+            m_cachedDataAddress = reinterpret_cast<uint8_t*>(m_backingStore->data());
+            return m_cachedDataAddress.unwrap();
+        }
+        return nullptr;
+    }
+
     Optional<BackingStore*> m_backingStore;
+    Optional<uint8_t*> m_cachedDataAddress;
 };
 
 class ArrayBufferView : public Object {
index 338d79ee9a56fb8c06fc8f9774455eb593df8465..492b458c57be2a470466f6d811035a040feb92e9 100644 (file)
@@ -97,7 +97,7 @@ void ArrayBufferObject::allocateBuffer(ExecutionState& state, size_t byteLength)
         GC_invoke_finalizers();
     }
 
-    m_backingStore = BackingStore::createDefaultNonSharedBackingStore(byteLength);
+    updateBackingStore(BackingStore::createDefaultNonSharedBackingStore(byteLength));
 }
 
 void ArrayBufferObject::allocateResizableBuffer(ExecutionState& state, size_t byteLength, size_t maxByteLength)
@@ -118,7 +118,7 @@ void ArrayBufferObject::allocateResizableBuffer(ExecutionState& state, size_t by
         GC_invoke_finalizers();
     }
 
-    m_backingStore = BackingStore::createDefaultResizableNonSharedBackingStore(byteLength, maxByteLength);
+    updateBackingStore(BackingStore::createDefaultResizableNonSharedBackingStore(byteLength, maxByteLength));
 }
 
 void ArrayBufferObject::attachBuffer(BackingStore* backingStore)
@@ -127,12 +127,12 @@ void ArrayBufferObject::attachBuffer(BackingStore* backingStore)
     ASSERT(!backingStore->isShared());
     detachArrayBuffer();
 
-    m_backingStore = backingStore;
+    updateBackingStore(backingStore);
 }
 
 void ArrayBufferObject::detachArrayBuffer()
 {
-    m_backingStore.reset();
+    updateBackingStore(nullptr);
 }
 
 void* ArrayBufferObject::operator new(size_t size)
index 9c4eff4f3b5ab8bdadf66838a054149e10eee8dc..6baaea83158db2975e7dc64fc536e9960184073d 100644 (file)
@@ -230,7 +230,6 @@ bool ArrayObject::deleteOwnProperty(ExecutionState& state, const ObjectPropertyN
             if (idx < len) {
                 if (!m_fastModeData[idx].isEmpty()) {
                     m_fastModeData[idx] = Value(Value::EmptyValue);
-                    ensureRareData()->m_shouldUpdateEnumerateObject = true;
                 }
                 return true;
             }
@@ -605,6 +604,12 @@ uint64_t ArrayObject::length(ExecutionState& state)
     return arrayLength(state);
 }
 
+void ArrayObject::markAsPrototypeObject(ExecutionState& state)
+{
+    Object::markAsPrototypeObject(state);
+    convertIntoNonFastMode(state);
+}
+
 ArrayIteratorObject::ArrayIteratorObject(ExecutionState& state, Object* a, Type type)
     : IteratorObject(state, state.context()->globalObject()->arrayIteratorPrototype())
     , m_array(a)
@@ -685,5 +690,19 @@ std::pair<Value, bool> ArrayIteratorObject::advance(ExecutionState& state)
 ArrayPrototypeObject::ArrayPrototypeObject(ExecutionState& state)
     : ArrayObject(state, state.context()->globalObject()->objectPrototype())
 {
+    convertIntoNonFastMode(state);
+}
+
+void ArrayPrototypeObject::markAsPrototypeObject(ExecutionState& state)
+{
+    if (UNLIKELY(!state.context()->vmInstance()->didSomePrototypeObjectDefineIndexedProperty() && (structure()->hasIndexPropertyName() || isProxyObject()))) {
+        state.context()->vmInstance()->somePrototypeObjectDefineIndexedProperty(state);
+    }
+}
+
+bool ArrayPrototypeObject::isEverSetAsPrototypeObject() const
+{
+    ASSERT(!hasRareData() || !rareData()->m_isEverSetAsPrototypeObject);
+    return true;
 }
 } // namespace Escargot
index 15b4beb892d78fe9ffe1623e481a94adcee90226..d2cbca68fce3669db40893283e0eccfb1bae7bb7 100644 (file)
@@ -35,6 +35,7 @@ class ArrayObject : public Object {
     friend class VMInstance;
     friend class Global;
     friend class ByteCodeInterpreter;
+    friend class EnumerateObject;
     friend class EnumerateObjectWithDestruction;
     friend class EnumerateObjectWithIteration;
     friend Value builtinArrayConstructor(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget);
@@ -73,6 +74,7 @@ public:
     virtual bool setIndexedProperty(ExecutionState& state, const Value& property, const Value& value, const Value& receiver) override;
     virtual bool preventExtensions(ExecutionState&) override;
     virtual uint64_t length(ExecutionState& state) override;
+    virtual void markAsPrototypeObject(ExecutionState& state) override;
 
     // Use custom allocator for Array object (for Badtime)
     void* operator new(size_t size);
@@ -102,6 +104,8 @@ protected:
         // only called by Global::initialize to set tag value
     }
 
+    void convertIntoNonFastMode(ExecutionState& state);
+
 private:
     ALWAYS_INLINE bool isFastModeArray()
     {
@@ -128,9 +132,17 @@ private:
         return m_arrayLength;
     }
 
+    bool hasFastModeDataBuffer()
+    {
+#if defined(ESCARGOT_64) && defined(ESCARGOT_USE_32BIT_IN_64BIT)
+        return !!m_fastModeData.data();
+#else
+        return !!m_fastModeData;
+#endif
+    }
+
     bool setArrayLength(ExecutionState& state, const Value& newLength);
     bool setArrayLength(ExecutionState& state, const uint32_t newLength, bool useFitStorage = false, bool considerHole = true);
-    void convertIntoNonFastMode(ExecutionState& state);
 
     ObjectGetResult getVirtualValue(ExecutionState& state, const ObjectPropertyName& P);
 
@@ -148,6 +160,9 @@ class ArrayPrototypeObject : public ArrayObject {
 public:
     explicit ArrayPrototypeObject(ExecutionState& state);
 
+    virtual void markAsPrototypeObject(ExecutionState& state) override;
+    virtual bool isEverSetAsPrototypeObject() const override;
+
 private:
     ArrayPrototypeObject()
         : ArrayObject()
index be9b3bd123d82e8a19cccf53765a74a9917f49b3..21d77885be91df876d1bd4368c7137ebbe0d4a36 100644 (file)
@@ -96,6 +96,11 @@ Context::Context(VMInstance* instance)
 void Context::throwException(ExecutionState& state, const Value& exception)
 {
     if (LIKELY(vmInstance()->currentSandBox() != nullptr)) {
+        ASSERT(!!m_instance);
+        if (UNLIKELY(m_instance->isErrorThrowCallbackRegistered() && exception.isObject() && exception.asObject()->isErrorObject())) {
+            // trigger ErrorThrowCallback when an ErrorObject is thrown
+            m_instance->triggerErrorThrowCallback(state, exception.asObject()->asErrorObject());
+        }
         vmInstance()->currentSandBox()->throwException(state, exception);
     } else {
         ESCARGOT_LOG_ERROR("there is no sandbox but exception occurred");
index 45d8da2244e70f23073b7f4ff333ae645b912cdc..7b2c270a3556398b78c4ee16c38d8063c3026161 100644 (file)
@@ -34,19 +34,29 @@ class PointerValue;
 
 #ifdef ESCARGOT_32
 COMPILE_ASSERT(sizeof(EncodedValueData) == 4, "");
+COMPILE_ASSERT(sizeof(Value) == 8, "");
 #else
 COMPILE_ASSERT(sizeof(EncodedValueData) == 8, "");
 #endif
 
-class DoubleInEncodedValue : public PointerValue {
-    friend class EncodedValue;
-    friend class EncodedSmallValue;
-
+#pragma pack(push, 1)
+// NumberInEncodedValue stores its tag in `this + sizeof(size_t)`
+// the location is same with PointerValues
+// store double
+class NumberInEncodedValue : public gc {
 public:
-    explicit DoubleInEncodedValue(double v)
+    explicit NumberInEncodedValue(const Value& v)
+#ifdef ESCARGOT_32
+    {
+        m_buffer[1] = POINTER_VALUE_NUMBER_TAG_IN_DATA;
+        setValue(v);
+    }
+#else
         : m_value(v)
+        , m_tag(POINTER_VALUE_NUMBER_TAG_IN_DATA)
     {
     }
+#endif
 
     void* operator new(size_t size)
     {
@@ -54,14 +64,40 @@ public:
     }
     void* operator new[](size_t size) = delete;
 
-    double value()
+    Value value() const
     {
+#ifdef ESCARGOT_32
+        Value ret;
+        uint32_t* buf = reinterpret_cast<uint32_t*>(&ret);
+        buf[0] = m_buffer[0];
+        buf[1] = m_buffer[2];
+        return ret;
+#else
         return m_value;
+#endif
+    }
+
+    void setValue(const Value& v)
+    {
+        ASSERT(v.isNumber());
+#ifdef ESCARGOT_32
+        const uint32_t* buf = reinterpret_cast<const uint32_t*>(&v);
+        m_buffer[0] = buf[0];
+        m_buffer[2] = buf[1];
+#else
+        m_value = v;
+#endif
     }
 
 private:
-    double m_value;
+#ifdef ESCARGOT_32
+    uint32_t m_buffer[3];
+#else
+    Value m_value;
+    size_t m_tag;
+#endif
 };
+#pragma pack(pop)
 
 namespace EncodedValueImpl {
 
@@ -145,13 +181,14 @@ const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize;
 // EncodedValue turns int, double values into pointer or odd value
 // so there is no conservative gc leak(there is no even value looks like pointer without pointers)
 // developers should use this class if want to save some Value on Heap
-// developers should not copy this value because this class changes DoubleInEncodedValue without copy it
+// developers should not copy this value because this class changes NumberInEncodedValue without copy it
 // just convert into Value and use it.
 class EncodedValue {
 public:
     enum ForceUninitializedTag { ForceUninitialized };
     enum EmptyValueInitTag { EmptyValue };
     COMPILE_ASSERT(EncodedValue::EmptyValue == 0, "");
+    friend class EncodedSmallValue;
 
     EncodedValue(ForceUninitializedTag)
     {
@@ -211,24 +248,47 @@ public:
         return m_data.payload == ValueEmpty;
     }
 
-    ALWAYS_INLINE operator Value() const
+    template <const bool shouldTreatEmptyAsUndefined = false>
+    ALWAYS_INLINE Value toValue() const
     {
         if (HAS_SMI_TAG(m_data.payload)) {
             int32_t value = EncodedValueImpl::PlatformSmiTagging::SmiToInt(m_data.payload);
             return Value(value);
         }
 
-        PointerValue* v = (PointerValue*)m_data.payload;
-        if (((size_t)v) <= ValueLast) {
+        void* ptr = reinterpret_cast<void*>(m_data.payload);
+        if (UNLIKELY(((size_t)ptr) <= ValueLast)) {
+            if (shouldTreatEmptyAsUndefined && UNLIKELY(ptr == ValueEmpty)) {
+                return Value();
+            }
 #ifdef ESCARGOT_32
-            return Value(Value::FromTag, ~((uint32_t)v));
+            return Value(Value::FromTag, ~((uint32_t)ptr));
 #else
-            return Value(v);
+            return Value(reinterpret_cast<PointerValue*>(ptr));
 #endif
-        } else if (v->isDoubleInEncodedValue()) {
-            return Value(v->asDoubleInEncodedValue()->value());
         }
-        return Value(v);
+
+#ifdef ESCARGOT_32
+        const uint8_t tag = *(reinterpret_cast<size_t*>(ptr) + 1);
+        if (LIKELY(!(tag & POINTER_VALUE_NOT_OBJECT_TAG_IN_DATA))) {
+            return Value(reinterpret_cast<Object*>(ptr));
+        } else if (UNLIKELY(tag == POINTER_VALUE_NUMBER_TAG_IN_DATA)) {
+            return reinterpret_cast<NumberInEncodedValue*>(ptr)->value();
+        } else {
+            return Value(reinterpret_cast<PointerValue*>(ptr), Value::FromNonObjectPointer);
+        }
+#else
+        if (UNLIKELY(readPointerIsNumberEncodedValue(ptr))) {
+            return reinterpret_cast<NumberInEncodedValue*>(ptr)->value();
+        } else {
+            return Value(reinterpret_cast<PointerValue*>(ptr));
+        }
+#endif
+    }
+
+    ALWAYS_INLINE operator Value() const
+    {
+        return toValue<>();
     }
 
     bool isInt32()
@@ -294,16 +354,17 @@ public:
         }
 
         if (from.isNumber()) {
-            auto payload = m_data.payload;
+            intptr_t payload = m_data.payload;
 
             if (!HAS_SMI_TAG(payload) && ((size_t)payload > (size_t)ValueLast)) {
-                PointerValue* v = (PointerValue*)payload;
-                if (v->isDoubleInEncodedValue()) {
-                    ((DoubleInEncodedValue*)m_data.payload)->m_value = from.asNumber();
+                void* v = (void*)payload;
+                if (readPointerIsNumberEncodedValue(v)) {
+                    ((NumberInEncodedValue*)m_data.payload)->setValue(from);
                     return;
                 }
             }
-            m_data.payload = reinterpret_cast<intptr_t>(new DoubleInEncodedValue(from.asNumber()));
+            m_data.payload = reinterpret_cast<intptr_t>(new NumberInEncodedValue(from));
+            ASSERT(readPointerIsNumberEncodedValue((void*)m_data.payload));
             return;
         }
 
@@ -315,6 +376,12 @@ public:
     }
 
 protected:
+    static ALWAYS_INLINE bool readPointerIsNumberEncodedValue(void* ptr)
+    {
+        const uint8_t* b = reinterpret_cast<const uint8_t*>(reinterpret_cast<size_t*>(ptr) + 1);
+        return *b == POINTER_VALUE_NUMBER_TAG_IN_DATA;
+    }
+
     void fromValueForCtor(const Value& from)
     {
         if (from.isPointerValue()) {
@@ -327,7 +394,7 @@ protected:
             if (from.isInt32() && EncodedValueImpl::PlatformSmiTagging::IsValidSmi(i32 = from.asInt32())) {
                 m_data.payload = EncodedValueImpl::PlatformSmiTagging::IntToSmi(i32);
             } else if (from.isNumber()) {
-                m_data.payload = reinterpret_cast<intptr_t>(new DoubleInEncodedValue(from.asNumber()));
+                m_data.payload = reinterpret_cast<intptr_t>(new NumberInEncodedValue(from));
             } else {
 #ifdef ESCARGOT_32
                 m_data.payload = ~from.tag();
@@ -372,7 +439,7 @@ public:
             if (from.isInt32() && EncodedValueImpl::PlatformSmiTagging::IsValidSmi(i32 = from.asInt32())) {
                 setPayload(EncodedValueImpl::PlatformSmiTagging::IntToSmi(i32));
             } else if (from.isNumber()) {
-                setPayload(reinterpret_cast<intptr_t>(new DoubleInEncodedValue(from.asNumber())));
+                setPayload(reinterpret_cast<intptr_t>(new NumberInEncodedValue(from)));
             } else {
                 setPayload(from.payload());
             }
@@ -405,7 +472,8 @@ public:
         return m_data.payload;
     }
 
-    ALWAYS_INLINE operator Value() const
+    template <const bool shouldTreatEmptyAsUndefined = false>
+    ALWAYS_INLINE Value toValue() const
     {
         if (isSMI()) {
             // we cannot use EncodedValueImpl::PlatformSmiTagging::SmiToInt
@@ -415,13 +483,24 @@ public:
             return Value(value);
         }
 
-        PointerValue* v = reinterpret_cast<PointerValue*>(payload());
-        if (((size_t)v) <= ValueLast) {
-            return Value(v);
-        } else if (v->isDoubleInEncodedValue()) {
-            return Value(v->asDoubleInEncodedValue()->value());
+        void* ptr = reinterpret_cast<void*>(payload());
+        if (((size_t)ptr) <= ValueLast) {
+            if (shouldTreatEmptyAsUndefined && UNLIKELY(ptr == ValueEmpty)) {
+                return Value();
+            }
+            return Value(reinterpret_cast<PointerValue*>(ptr));
         }
-        return Value(v);
+
+        if (EncodedValue::readPointerIsNumberEncodedValue(ptr)) {
+            return reinterpret_cast<NumberInEncodedValue*>(ptr)->value();
+        } else {
+            return Value(reinterpret_cast<PointerValue*>(ptr));
+        }
+    }
+
+    ALWAYS_INLINE operator Value() const
+    {
+        return toValue<>();
     }
 
     bool isEmpty() const
@@ -460,13 +539,14 @@ public:
         if (from.isNumber()) {
             auto pl = payload();
             if (!isSMI() && ((size_t)pl > (size_t)ValueLast)) {
-                PointerValue* v = reinterpret_cast<PointerValue*>(pl);
-                if (v->isDoubleInEncodedValue()) {
-                    ((DoubleInEncodedValue*)v)->m_value = from.asNumber();
+                void* v = reinterpret_cast<void*>(pl);
+                if (EncodedValue::readPointerIsNumberEncodedValue(v)) {
+                    reinterpret_cast<NumberInEncodedValue*>(v)->setValue(from);
                     return;
                 }
             }
-            setPayload(reinterpret_cast<intptr_t>(new DoubleInEncodedValue(from.asNumber())));
+            setPayload(reinterpret_cast<intptr_t>(new NumberInEncodedValue(from)));
+            ASSERT(EncodedValue::readPointerIsNumberEncodedValue((void*)payload()));
             return;
         }
         setPayload(from.payload());
index 8c496d87e360f7bb20870952b63bdbb04ea408e8..d41c22ce222efc4f531a3e22d023b19cfb4d2bd7 100644 (file)
@@ -35,6 +35,8 @@ struct EncodedValueData {
     }
 };
 
+COMPILE_ASSERT(sizeof(EncodedValueData) == sizeof(intptr_t), "");
+
 #if defined(ESCARGOT_64) && defined(ESCARGOT_USE_32BIT_IN_64BIT)
 struct EncodedSmallValueData {
     int32_t payload;
index c0f2e54a15675c00aa589002eee09ba2f6a5c121..454223b7c0a71f31375f186af3e4534a6e07aba9 100644 (file)
@@ -61,6 +61,26 @@ void EnumerateObject::update(ExecutionState& state)
     }
 }
 
+bool EnumerateObject::checkIfModified(ExecutionState& state)
+{
+    if (m_object->isArrayObject()) {
+        ArrayObject* obj = m_object->asArrayObject();
+        if (UNLIKELY(obj->arrayLength(state) != m_arrayLength)) {
+            return true;
+        }
+        if (obj->isFastModeArray() && m_index < m_keys.size()) {
+            Value currentKey = m_keys[m_index];
+            auto idx = currentKey.tryToUseAsIndex(state);
+            if (idx < m_arrayLength) {
+                if (obj->m_fastModeData[idx].isEmpty()) {
+                    return true;
+                }
+            }
+        }
+    }
+    return false;
+}
+
 void* EnumerateObjectWithDestruction::operator new(size_t size)
 {
     static MAY_THREAD_LOCAL bool typeInited = false;
@@ -163,16 +183,7 @@ bool EnumerateObjectWithDestruction::checkIfModified(ExecutionState& state)
         return true;
     }
 
-    if (m_object->isArrayObject()) {
-        if (UNLIKELY(m_object->asArrayObject()->arrayLength(state) != m_arrayLength)) {
-            return true;
-        }
-        if (UNLIKELY(m_object->hasRareData() && m_object->rareData()->m_shouldUpdateEnumerateObject)) {
-            return true;
-        }
-    }
-
-    return false;
+    return EnumerateObject::checkIfModified(state);
 }
 
 void EnumerateObjectWithIteration::executeEnumeration(ExecutionState& state, EncodedValueTightVector& keys)
@@ -296,10 +307,6 @@ void EnumerateObjectWithIteration::executeEnumeration(ExecutionState& state, Enc
                                   &keys);
         }
     }
-
-    if (m_object->hasRareData()) {
-        m_object->rareData()->m_shouldUpdateEnumerateObject = false;
-    }
 }
 
 bool EnumerateObjectWithIteration::checkIfModified(ExecutionState& state)
@@ -319,16 +326,7 @@ bool EnumerateObjectWithIteration::checkIfModified(ExecutionState& state)
         }
     }
 
-    if (m_object->isArrayObject()) {
-        if (UNLIKELY(m_object->asArrayObject()->arrayLength(state) != m_arrayLength)) {
-            return true;
-        }
-        if (UNLIKELY(m_object->hasRareData() && m_object->rareData()->m_shouldUpdateEnumerateObject)) {
-            return true;
-        }
-    }
-
-    return false;
+    return EnumerateObject::checkIfModified(state);
 }
 } // namespace Escargot
 ;
index dcf3226a893f8f022d0c91ca4de817d3cd977293..1a678da216263fd99db794fbb445459ed29c2e6b 100644 (file)
@@ -53,7 +53,7 @@ protected:
     void update(ExecutionState& state);
 
     virtual void executeEnumeration(ExecutionState& state, EncodedValueTightVector& keys) = 0;
-    virtual bool checkIfModified(ExecutionState& state) = 0;
+    virtual bool checkIfModified(ExecutionState& state);
 
     Object* m_object;
     uint32_t m_arrayLength;
index 49b42e46c6a0e63660aeee1e1da6231525e18fcc..caed354b93d100b9eeb5f4b1eb10d24740efa4c0 100644 (file)
@@ -309,6 +309,7 @@ private:
 class GlobalEnvironmentRecord : public EnvironmentRecord {
 #ifdef ESCARGOT_DEBUGGER
     friend class DebuggerRemote;
+    friend class DebuggerAPI;
 #endif /* ESCARGOT_DEBUGGER */
 public:
     GlobalEnvironmentRecord(ExecutionState& state, InterpretedCodeBlock* codeBlock, GlobalObject* global, IdentifierRecordVector* globalDeclarativeRecord, EncodedValueVector* globalDeclarativeStorage);
@@ -576,6 +577,7 @@ private:
 class DeclarativeEnvironmentRecordNotIndexed : public DeclarativeEnvironmentRecord {
 #ifdef ESCARGOT_DEBUGGER
     friend class DebuggerRemote;
+    friend class DebuggerAPI;
 #endif /* ESCARGOT_DEBUGGER */
 public:
     DeclarativeEnvironmentRecordNotIndexed(ExecutionState& state, bool isVarDeclarationTarget = false, bool isCatchClause = false)
@@ -838,7 +840,7 @@ public:
 
     ScriptFunctionObject* functionObject()
     {
-        if (m_argumentsObject->isArgumentsObject()) {
+        if (UNLIKELY(m_argumentsObject->isArgumentsObject())) {
             return m_argumentsObject->sourceFunctionObject();
         }
         return m_functionObject;
@@ -1195,6 +1197,7 @@ public:
 class ModuleEnvironmentRecord : public DeclarativeEnvironmentRecord {
 #ifdef ESCARGOT_DEBUGGER
     friend class DebuggerRemote;
+    friend class DebuggerAPI;
 #endif /* ESCARGOT_DEBUGGER */
 public:
     struct ModuleBindingRecord {
index d3aa3747d3d726259ee11b347b013a8808db7c02..9a19c70eabd43d4dacbd26ef8bca220f70c7b75b 100644 (file)
@@ -24,7 +24,6 @@
 #include "runtime/ReloadableString.h"
 #include "interpreter/ByteCode.h"
 #include "parser/ast/ProgramNode.h"
-#include "parser/ScriptParser.h"
 #include "parser/esprima_cpp/esprima.h"
 #include "runtime/Environment.h"
 #include "runtime/EnvironmentRecord.h"
@@ -228,7 +227,7 @@ static String* createFunctionSource(ExecutionState& state, AtomicString function
     return scriptSource;
 }
 
-FunctionObject::FunctionSource FunctionObject::createFunctionScript(ExecutionState& state, AtomicString functionName, size_t argCount, Value* argArray, Value bodyValue, bool useStrict, bool isGenerator, bool isAsync, bool allowSuperCall, bool isInternalSource, String* sourceName)
+FunctionObject::FunctionSource FunctionObject::createDynamicFunctionScript(ExecutionState& state, AtomicString functionName, size_t argCount, Value* argArray, Value bodyValue, bool useStrict, bool isGenerator, bool isAsync, bool allowSuperCall, bool isInternalSource, String* sourceName)
 {
     String* scriptSource = createFunctionSource(state, functionName, argCount, argArray, bodyValue, useStrict, isGenerator, isAsync, isInternalSource);
 
@@ -243,7 +242,8 @@ FunctionObject::FunctionSource FunctionObject::createFunctionScript(ExecutionSta
         }
     }
 
-    Script* script = parser.initializeScript(scriptSource, srcName, nullptr, false, false, false, false, false, allowSuperCall, false, true, false).scriptThrowsExceptionIfParseError(state);
+    Script* script = parser.initializeScript(nullptr, 0, scriptSource, srcName, nullptr, false, false, false, false, false, allowSuperCall, false, true, false).scriptThrowsExceptionIfParseError(state);
+
     InterpretedCodeBlock* cb = script->topCodeBlock()->childBlockAt(0);
     // mark it as dynamic code
     cb->setDynamicSourceCode();
@@ -257,6 +257,29 @@ FunctionObject::FunctionSource FunctionObject::createFunctionScript(ExecutionSta
     return fs;
 }
 
+ScriptParser::InitializeScriptResult FunctionObject::createFunctionScript(ExecutionState& state, String* sourceName, AtomicString functionName, size_t argCount, Value* argArray, Value bodyString, bool useStrict)
+{
+    String* sourceBodyString = bodyString.toString(state);
+    ASSERT(sourceBodyString->length());
+
+    String* scriptSource = createFunctionSource(state, functionName, argCount, argArray, bodyString, useStrict, false, false, false);
+
+    ScriptParser parser(state.context());
+    // originLineOffset is set to 2 because `createFunctionSource` adds 2 lines at start
+    auto result = parser.initializeScript(sourceBodyString, 2, scriptSource, sourceName, nullptr, false, false, false, false, false, false, false, true
+#ifdef ESCARGOT_DEBUGGER
+                                          // in debugger mode, all bytecodes should be compiled at once
+                                          ,
+                                          true
+#else
+                                          ,
+                                          false
+#endif
+    );
+
+    return result;
+}
+
 bool FunctionObject::setName(AtomicString name)
 {
     // re-set function name is allowed only for native function or dynamically created function except class constructor
index c554b1daa46931021a70b907558e50fdf84d076f..0d8e01eaef07aadc3245ffccb5a5f050345317d0 100644 (file)
@@ -23,6 +23,7 @@
 #include "parser/CodeBlock.h"
 #include "runtime/Object.h"
 #include "runtime/ErrorObject.h"
+#include "parser/ScriptParser.h"
 
 namespace Escargot {
 
@@ -107,7 +108,11 @@ public:
         InterpretedCodeBlock* codeBlock;
         LexicalEnvironment* outerEnvironment;
     };
-    static FunctionSource createFunctionScript(ExecutionState& state, AtomicString functionName, size_t argCount, Value* argArray, Value bodyString, bool useStrict, bool isGenerator, bool isAsync, bool allowSuperCall, bool isInternalSource = false, String* sourceName = String::emptyString);
+
+    // create a script for dynamic function
+    static FunctionSource createDynamicFunctionScript(ExecutionState& state, AtomicString functionName, size_t argCount, Value* argArray, Value bodyString, bool useStrict, bool isGenerator, bool isAsync, bool allowSuperCall, bool isInternalSource = false, String* sourceName = String::emptyString);
+    // create a general function script which is not a dynamic function
+    static ScriptParser::InitializeScriptResult createFunctionScript(ExecutionState& state, String* sourceName, AtomicString functionName, size_t argCount, Value* argArray, Value bodyString, bool useStrict);
 
     bool setName(AtomicString name);
 
index 97c946a3d715d072cbb065323188cf864019de1a..ca1d83369424282f48ed34c6fe70a4048b227ba0 100644 (file)
@@ -110,11 +110,8 @@ public:
         ByteCodeBlock* blk = codeBlock->byteCodeBlock();
         Context* ctx = codeBlock->context();
         bool isStrict = codeBlock->isStrict();
-        size_t registerSize = blk->m_requiredRegisterFileSizeInValueSize;
-        size_t identifierOnStackCount = codeBlock->identifierOnStackCount();
-        size_t stackStorageSize = codeBlock->totalStackAllocatedVariableSize();
-        size_t literalStorageSize = blk->m_numeralLiteralData.size();
-        Value* literalStorageSrc = blk->m_numeralLiteralData.data();
+        size_t registerFileSize = blk->m_requiredTotalRegisterNumber;
+        size_t generalRegisterSize = blk->m_requiredOperandRegisterNumber;
 
         // prepare env, ec
         FunctionEnvironmentRecord* record;
@@ -137,27 +134,12 @@ public:
         Value* registerFile;
 
         if (std::is_same<FunctionObjectType, ScriptGeneratorFunctionObject>::value || std::is_same<FunctionObjectType, ScriptAsyncFunctionObject>::value || std::is_same<FunctionObjectType, ScriptAsyncGeneratorFunctionObject>::value) {
-            registerFile = (Value*)CustomAllocator<Value>().allocate(registerSize + stackStorageSize + literalStorageSize);
+            registerFile = (Value*)CustomAllocator<Value>().allocate(registerFileSize);
         } else {
-            registerFile = (Value*)alloca((registerSize + stackStorageSize + literalStorageSize) * sizeof(Value));
+            registerFile = (Value*)alloca((registerFileSize) * sizeof(Value));
         }
 
-        Value* stackStorage = registerFile + registerSize;
-
-        {
-            Value* literalStorage = stackStorage + stackStorageSize;
-            for (size_t i = 0; i < literalStorageSize; i++) {
-                literalStorage[i] = literalStorageSrc[i];
-            }
-        }
-
-        // binding function name
-        stackStorage[1] = self;
-
-        // initialize identifiers by undefined value
-        for (size_t i = 2; i < identifierOnStackCount; i++) {
-            stackStorage[i] = Value();
-        }
+        Value* stackStorage = registerFile + generalRegisterSize;
 
         ThisValueBinder thisValueBinder;
         if (std::is_same<FunctionObjectType, ScriptGeneratorFunctionObject>::value || std::is_same<FunctionObjectType, ScriptAsyncGeneratorFunctionObject>::value) {
@@ -171,6 +153,8 @@ public:
             // https://www.ecma-international.org/ecma-262/6.0/#sec-ordinarycallbindthis
             // NOTE ToObject produces wrapper objects using calleeRealm. <<----
             stackStorage[0] = thisValueBinder(state, *newState, self, thisArgument, isStrict);
+            // binding function name
+            stackStorage[1] = self;
 
             if (isConstructCall) {
                 NewTargetBinder newTargetBinder;
index 7247c75a17ab00d7d2b3b1762aee30f87fa85447..cd43c8c19b2fcc479df8f37f055c9223d21b9f8c 100644 (file)
@@ -22,6 +22,7 @@
 #include "runtime/Platform.h"
 #include "runtime/PointerValue.h"
 #include "runtime/ArrayObject.h"
+#include "runtime/PrototypeObject.h"
 #include "runtime/ScriptFunctionObject.h"
 
 namespace Escargot {
@@ -47,11 +48,12 @@ void Global::initialize(Platform* platform)
 
     // initialize PointerValue tag values
     // tag values should be initialized once and not changed
+    PointerValue::g_objectTag = Object().getTag();
+    PointerValue::g_prototypeObjectTag = PrototypeObject().getTag();
     PointerValue::g_arrayObjectTag = ArrayObject().getTag();
     PointerValue::g_arrayPrototypeObjectTag = ArrayPrototypeObject().getTag();
     PointerValue::g_scriptFunctionObjectTag = ScriptFunctionObject().getTag();
     PointerValue::g_objectRareDataTag = ObjectRareData(nullptr).getTag();
-    PointerValue::g_doubleInEncodedValueTag = DoubleInEncodedValue(0).getTag();
 
     called_once = false;
     inited = true;
index b7c847f3ce88bd12853a8407aaad6af976565c83..af3402cad73b5f84b0bc629decd1f96ad475e5f0 100644 (file)
@@ -44,7 +44,7 @@
 namespace Escargot {
 
 GlobalObject::GlobalObject(ExecutionState& state)
-    : Object(state, ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER, Object::__ForGlobalBuiltin__)
+    : PrototypeObject(state, PrototypeObject::__ForGlobalBuiltin__)
     , m_context(state.context())
 #define INIT_BUILTIN_VALUE(builtin, TYPE, objName) \
     , m_##builtin(nullptr)
@@ -179,7 +179,7 @@ Value GlobalObject::eval(ExecutionState& state, const Value& arg)
         size_t stackRemainApprox = state.stackLimit() - currentStackBase;
 #endif
 
-        Script* script = parser.initializeScript(arg.asString(), state.context()->staticStrings().lazyEvalInput().string(), nullptr, false, true, false, false, strictFromOutside, false, false, false, true, stackRemainApprox).scriptThrowsExceptionIfParseError(state);
+        Script* script = parser.initializeScript(nullptr, 0, arg.asString(), state.context()->staticStrings().lazyEvalInput().string(), nullptr, false, true, false, false, strictFromOutside, false, false, false, true, stackRemainApprox).scriptThrowsExceptionIfParseError(state);
         // In case of indirect call, use global execution context
         ExecutionState stateForNewGlobal(m_context);
         return script->execute(stateForNewGlobal, true, script->topCodeBlock()->isStrict());
@@ -228,7 +228,7 @@ Value GlobalObject::evalLocal(ExecutionState& state, const Value& arg, Value thi
         size_t stackRemainApprox = state.stackLimit() - currentStackBase;
 #endif
 
-        Script* script = parser.initializeScript(arg.asString(), state.context()->staticStrings().lazyEvalInput().string(), parentCodeBlock,
+        Script* script = parser.initializeScript(nullptr, 0, arg.asString(), state.context()->staticStrings().lazyEvalInput().string(), parentCodeBlock,
                                                  false, true, isRunningEvalOnFunction, inWithOperation, strictFromOutside, parentCodeBlock->allowSuperCall(),
                                                  parentCodeBlock->allowSuperProperty(), allowNewTarget, true, stackRemainApprox)
                              .scriptThrowsExceptionIfParseError(state);
@@ -927,21 +927,21 @@ void GlobalObject::installOthers(ExecutionState& state)
     m_arrayToString = new NativeFunctionObject(state, NativeFunctionInfo(strings->toString, builtinArrayToString, 0, NativeFunctionInfo::Strict));
 
     // shared builtin objects
-    m_asyncIteratorPrototype = new Object(state);
+    m_asyncIteratorPrototype = new PrototypeObject(state);
     m_asyncIteratorPrototype->setGlobalIntrinsicObject(state, true);
     // https://www.ecma-international.org/ecma-262/10.0/index.html#sec-asynciteratorprototype-asynciterator
     m_asyncIteratorPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->vmInstance()->globalSymbols().asyncIterator),
                                                                ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(AtomicString(state, String::fromASCII("[Symbol.asyncIterator]")), builtinSpeciesGetter, 0, NativeFunctionInfo::Strict)),
                                                                                         (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
-    m_iteratorPrototype = new Object(state);
+    m_iteratorPrototype = new PrototypeObject(state);
     m_iteratorPrototype->setGlobalIntrinsicObject(state, true);
     // https://www.ecma-international.org/ecma-262/10.0/index.html#sec-%iteratorprototype%-@@iterator
     m_iteratorPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->vmInstance()->globalSymbols().iterator),
                                                           ObjectPropertyDescriptor(new NativeFunctionObject(state, NativeFunctionInfo(AtomicString(state, String::fromASCII("[Symbol.iterator]")), builtinSpeciesGetter, 0, NativeFunctionInfo::Strict)),
                                                                                    (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
 
-    m_genericIteratorPrototype = new Object(state, m_iteratorPrototype);
+    m_genericIteratorPrototype = new PrototypeObject(state, m_iteratorPrototype);
     m_genericIteratorPrototype->setGlobalIntrinsicObject(state, true);
 
     m_genericIteratorPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->staticStrings().next),
index b57042b2ef9239c29b1ce9d903cfaf505d9d98e9..ec4ac864150ecb37fdf8b4316bb596d0d90ced99 100644 (file)
@@ -20,8 +20,9 @@
 #ifndef __EscargotObjectGlobalObject__
 #define __EscargotObjectGlobalObject__
 
-#include "runtime/FunctionObject.h"
 #include "runtime/Object.h"
+#include "runtime/FunctionObject.h"
+#include "runtime/PrototypeObject.h"
 
 namespace Escargot {
 
@@ -320,7 +321,7 @@ class FunctionObject;
 
 Value builtinSpeciesGetter(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget);
 
-class GlobalObject : public Object {
+class GlobalObject : public PrototypeObject {
 public:
     friend class GlobalEnvironmentRecord;
 
index ae024cb40e00607097b5f926cd0c704b77b4ec8d..cfc42546cb9642e4ec6ad5de07b9fa4d91fa8b00 100644 (file)
@@ -31,6 +31,7 @@
 #include "SymbolObject.h"
 #include "BigIntObject.h"
 #include "ProxyObject.h"
+#include "PrototypeObject.h"
 #include "ScriptClassConstructorFunctionObject.h"
 
 namespace Escargot {
@@ -112,7 +113,6 @@ ObjectRareData::ObjectRareData(Object* obj)
     , m_isSpreadArrayObject(false)
     , m_isFinalizerRegistered(false)
     , m_isInlineCacheable(true)
-    , m_shouldUpdateEnumerateObject(false)
     , m_hasNonWritableLastIndexRegExpObject(false)
     , m_hasExtendedExtraData(false)
 #if defined(ESCARGOT_ENABLE_TEST)
@@ -479,7 +479,7 @@ Object::Object(ExecutionState& state, Object* proto)
 {
     // proto has been marked as a prototype object
     ASSERT(!!proto);
-    ASSERT(proto->hasRareData() && proto->rareData()->m_isEverSetAsPrototypeObject);
+    ASSERT(proto->isEverSetAsPrototypeObject());
     // create a new ordinary object
     m_values.resizeWithUninitializedValues(0, ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER);
 }
@@ -498,15 +498,7 @@ Object::Object(ExecutionState& state, Object* proto, size_t defaultSpace)
 {
     // proto has been marked as a prototype object
     ASSERT(!!proto);
-    ASSERT(proto->hasRareData() && proto->rareData()->m_isEverSetAsPrototypeObject);
-    m_values.resizeWithUninitializedValues(0, defaultSpace);
-}
-
-// this constructor is used only for initialization of GlobalObject
-Object::Object(ExecutionState& state, size_t defaultSpace, ForGlobalBuiltin)
-    : m_structure(state.context()->defaultStructureForObject())
-    , m_prototype(nullptr)
-{
+    ASSERT(proto->isEverSetAsPrototypeObject());
     m_values.resizeWithUninitializedValues(0, defaultSpace);
 }
 
@@ -538,10 +530,9 @@ bool Object::isConcatSpreadable(ExecutionState& state)
 
 Object* Object::createBuiltinObjectPrototype(ExecutionState& state)
 {
-    Object* obj = new Object(state, ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER, Object::__ForGlobalBuiltin__);
+    Object* obj = new PrototypeObject(state, PrototypeObject::__ForGlobalBuiltin__);
     obj->setPrototype(state, Value(Value::Null));
     obj->markThisObjectDontNeedStructureTransitionTable();
-    obj->ensureRareData()->m_isEverSetAsPrototypeObject = true;
 
     return obj;
 }
@@ -549,7 +540,7 @@ Object* Object::createBuiltinObjectPrototype(ExecutionState& state)
 Object* Object::createFunctionPrototypeObject(ExecutionState& state, FunctionObject* function)
 {
     auto ctx = function->codeBlock()->context();
-    Object* obj = new Object(state, ctx->globalObject()->objectPrototype()->asObject(), ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 1);
+    Object* obj = new PrototypeObject(state, ctx->globalObject()->objectPrototype()->asObject(), ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 1);
     obj->m_structure = ctx->defaultStructureForFunctionPrototypeObject();
     obj->m_values[0] = Value(function);
 
@@ -566,7 +557,7 @@ void Object::setGlobalIntrinsicObject(ExecutionState& state, bool isPrototype)
     markThisObjectDontNeedStructureTransitionTable();
 
     if (isPrototype) {
-        ensureRareData()->m_isEverSetAsPrototypeObject = true;
+        markAsPrototypeObject(state);
     }
 }
 
@@ -629,7 +620,11 @@ bool Object::setPrototype(ExecutionState& state, const Value& proto)
 
 void Object::markAsPrototypeObject(ExecutionState& state)
 {
-    ensureRareData()->m_isEverSetAsPrototypeObject = true;
+    if (hasTag(g_objectTag)) {
+        writeTag(g_prototypeObjectTag);
+    } else {
+        ensureRareData()->m_isEverSetAsPrototypeObject = true;
+    }
 
     if (UNLIKELY(!state.context()->vmInstance()->didSomePrototypeObjectDefineIndexedProperty() && (structure()->hasIndexPropertyName() || isProxyObject()))) {
         state.context()->vmInstance()->somePrototypeObjectDefineIndexedProperty(state);
index c791291d6d2ebe1569134de97d4055dfe4d0f663..c621906ab6217cb02025cf154453c8ba5f8acd1d 100644 (file)
@@ -75,7 +75,6 @@ struct ObjectRareData : public PointerValue {
     bool m_isSpreadArrayObject : 1;
     bool m_isFinalizerRegistered : 1;
     bool m_isInlineCacheable : 1;
-    bool m_shouldUpdateEnumerateObject : 1; // used only for Array Object when ArrayObject::deleteOwnProperty called
     bool m_hasNonWritableLastIndexRegExpObject : 1;
     bool m_hasExtendedExtraData : 1;
 #if defined(ESCARGOT_ENABLE_TEST)
@@ -764,6 +763,7 @@ enum class ElementTypes : uint8_t {
 
 class Object : public PointerValue {
     friend class ObjectRef;
+    friend class Global;
     friend class GlobalObject;
     friend class ByteCodeInterpreter;
     friend class EnumerateObjectWithDestruction;
@@ -805,6 +805,7 @@ public:
     // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-ordinary-object-internal-methods-and-internal-slots-preventextensions
     virtual bool preventExtensions(ExecutionState&)
     {
+        markThisObjectDontNeedStructureTransitionTable();
         ensureRareData()->m_isExtensible = false;
         return true;
     }
@@ -976,7 +977,7 @@ public:
         return (m_prototype != nullptr && m_prototype->isObjectRareData());
     }
 
-    bool isEverSetAsPrototypeObject() const
+    virtual bool isEverSetAsPrototypeObject() const
     {
         if (LIKELY(!hasRareData())) {
             return false;
@@ -1099,7 +1100,7 @@ public:
     IteratorObject* entries(ExecutionState& state);
 
     Value speciesConstructor(ExecutionState& state, const Value& defaultConstructor);
-    void markAsPrototypeObject(ExecutionState& state);
+    virtual void markAsPrototypeObject(ExecutionState& state);
 
     ALWAYS_INLINE Value uncheckedGetOwnDataProperty(size_t idx)
     {
@@ -1179,8 +1180,6 @@ protected:
     }
 
     explicit Object(ExecutionState& state, Object* proto, size_t defaultSpace);
-    enum ForGlobalBuiltin { __ForGlobalBuiltin__ };
-    explicit Object(ExecutionState& state, size_t defaultSpace, ForGlobalBuiltin);
     // ctor for ObjectTemplate
     explicit Object(ObjectStructure* structure, ObjectPropertyValueVector&& values, Object* proto);
 
index 59692c9ac768087b39227fac0f4d04ecf59dd648..533fedb92aa5e251df567842a3815a86f81cab6d 100644 (file)
 
 namespace Escargot {
 
+size_t PointerValue::g_objectTag;
+size_t PointerValue::g_prototypeObjectTag;
 size_t PointerValue::g_arrayObjectTag;
 size_t PointerValue::g_arrayPrototypeObjectTag;
 size_t PointerValue::g_scriptFunctionObjectTag;
 size_t PointerValue::g_objectRareDataTag;
-size_t PointerValue::g_doubleInEncodedValueTag;
 
 Value PointerValue::call(ExecutionState& state, const Value& thisValue, const size_t argc, Value* argv)
 {
index 98b696d45d69e257c4ed7f704a6a259479b7daa0..759b7aa849ba303f4982b2a896976ae331e3ae6e 100644 (file)
@@ -93,8 +93,9 @@ class ExportedFunctionObject;
 #define POINTER_VALUE_STRING_TAG_IN_DATA 1
 #define POINTER_VALUE_SYMBOL_TAG_IN_DATA 1 << 1
 #define POINTER_VALUE_BIGINT_TAG_IN_DATA 1 << 2
+#define POINTER_VALUE_NUMBER_TAG_IN_DATA (POINTER_VALUE_SYMBOL_TAG_IN_DATA | POINTER_VALUE_BIGINT_TAG_IN_DATA)
 
-#define POINTER_VALUE_NOT_OBJECT_TAG_IN_DATA (POINTER_VALUE_STRING_TAG_IN_DATA | POINTER_VALUE_SYMBOL_TAG_IN_DATA | POINTER_VALUE_BIGINT_TAG_IN_DATA)
+#define POINTER_VALUE_NOT_OBJECT_TAG_IN_DATA (POINTER_VALUE_STRING_TAG_IN_DATA | POINTER_VALUE_SYMBOL_TAG_IN_DATA | POINTER_VALUE_BIGINT_TAG_IN_DATA | POINTER_VALUE_NUMBER_TAG_IN_DATA)
 // Finding the type of PointerValue operation is widely used during the runtime
 // Only Object, String and Symbol are seen in regular runtime-code
 // We can figure out fastly what the type of PointerValue by tag value
@@ -112,6 +113,7 @@ class PointerValue : public gc {
     friend class Context;
     friend class Global;
     friend class ByteCodeInterpreter;
+    friend class EncodedValue;
 
 public:
     virtual ~PointerValue() {}
@@ -128,12 +130,12 @@ public:
 
     inline bool isSymbol() const
     {
-        return getTagInFirstDataArea() & POINTER_VALUE_SYMBOL_TAG_IN_DATA;
+        return getTagInFirstDataArea() == POINTER_VALUE_SYMBOL_TAG_IN_DATA;
     }
 
     inline bool isBigInt() const
     {
-        return getTagInFirstDataArea() & POINTER_VALUE_BIGINT_TAG_IN_DATA;
+        return getTagInFirstDataArea() == POINTER_VALUE_BIGINT_TAG_IN_DATA;
     }
 
     inline bool isArrayObject() const
@@ -151,11 +153,6 @@ public:
         return hasTag(g_objectRareDataTag);
     }
 
-    inline bool isDoubleInEncodedValue() const
-    {
-        return hasTag(g_doubleInEncodedValueTag);
-    }
-
     inline bool hasArrayObjectTag() const
     {
         return hasTag(g_arrayObjectTag);
@@ -700,12 +697,6 @@ public:
         return (DataViewObject*)this;
     }
 
-    DoubleInEncodedValue* asDoubleInEncodedValue()
-    {
-        ASSERT(isDoubleInEncodedValue());
-        return (DoubleInEncodedValue*)this;
-    }
-
     JSGetterSetter* asJSGetterSetter()
     {
         ASSERT(isJSGetterSetter());
@@ -906,11 +897,12 @@ protected:
 
     // tag values for fast type check
     // these values actually have unique virtual table address of each object class
+    static size_t g_objectTag;
+    static size_t g_prototypeObjectTag;
     static size_t g_arrayObjectTag;
     static size_t g_arrayPrototypeObjectTag;
     static size_t g_scriptFunctionObjectTag;
     static size_t g_objectRareDataTag;
-    static size_t g_doubleInEncodedValueTag;
 };
 } // namespace Escargot
 
diff --git a/lwnode/code/escargotshim/deps/escargot/src/runtime/PrototypeObject.cpp b/lwnode/code/escargotshim/deps/escargot/src/runtime/PrototypeObject.cpp
new file mode 100644 (file)
index 0000000..13c1ba4
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2022-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include "Escargot.h"
+#include "PrototypeObject.h"
+#include "runtime/Context.h"
+#include "runtime/VMInstance.h"
+
+namespace Escargot {
+
+PrototypeObject::PrototypeObject(ExecutionState& state)
+    : Object(state)
+{
+}
+
+PrototypeObject::PrototypeObject(ExecutionState& state, Object* proto, size_t defaultSpace)
+    : Object(state, proto, defaultSpace)
+{
+}
+
+PrototypeObject::PrototypeObject(ExecutionState& state, ForGlobalBuiltin)
+    : Object(state, Object::PrototypeIsNull)
+{
+}
+
+void PrototypeObject::markAsPrototypeObject(ExecutionState& state)
+{
+    if (UNLIKELY(!state.context()->vmInstance()->didSomePrototypeObjectDefineIndexedProperty() && (structure()->hasIndexPropertyName() || isProxyObject()))) {
+        state.context()->vmInstance()->somePrototypeObjectDefineIndexedProperty(state);
+    }
+}
+
+} // namespace Escargot
diff --git a/lwnode/code/escargotshim/deps/escargot/src/runtime/PrototypeObject.h b/lwnode/code/escargotshim/deps/escargot/src/runtime/PrototypeObject.h
new file mode 100644 (file)
index 0000000..f4fea2f
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2022-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#ifndef __EscargotPrototypeObject__
+#define __EscargotPrototypeObject__
+
+#include "runtime/Object.h"
+
+namespace Escargot {
+
+class PrototypeObject : public Object {
+    friend class Global;
+    explicit PrototypeObject()
+        : Object()
+    {
+        // ctor for reading tag
+    }
+
+public:
+    explicit PrototypeObject(ExecutionState& state);
+    explicit PrototypeObject(ExecutionState& state, Object* proto, size_t defaultSpace = ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER);
+    enum ForGlobalBuiltin { __ForGlobalBuiltin__ };
+    explicit PrototypeObject(ExecutionState& state, ForGlobalBuiltin);
+
+    virtual void markAsPrototypeObject(ExecutionState& state) override;
+    virtual bool isEverSetAsPrototypeObject() const override
+    {
+        ASSERT(!hasRareData() || !rareData()->m_isEverSetAsPrototypeObject);
+        return true;
+    }
+};
+
+} // namespace Escargot
+
+#endif
index 5088c62390cdc86ea6d923d8f87e7f2b9074245d..c59b1e83bc93717aeb0c66187054d30eb2be9142 100644 (file)
@@ -179,8 +179,6 @@ bool RegExpObject::defineOwnProperty(ExecutionState& state, const ObjectProperty
     if (!P.isUIntType() && returnValue && P.objectStructurePropertyName() == ObjectStructurePropertyName(state.context()->staticStrings().lastIndex)) {
         if (!structure()->readProperty((size_t)ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER).m_descriptor.isWritable()) {
             ensureRareData()->m_hasNonWritableLastIndexRegExpObject = true;
-        } else {
-            ensureRareData()->m_hasNonWritableLastIndexRegExpObject = false;
         }
     }
     return returnValue;
index 75b2559612ea8b31a03da40dc4b5424a2aacb8d5..5a96e7b451f6c6e17865b2296d750b38733bda21 100644 (file)
@@ -452,8 +452,8 @@ void SandBox::fillStackDataIntoErrorObject(const Value& e)
         ErrorObject* obj = e.asObject()->asErrorObject();
         ExecutionState state(m_context);
 
-        if (UNLIKELY(m_context->vmInstance()->isErrorCreationCallbackRegistered() && obj->hasOwnProperty(state, ObjectPropertyName(m_context->staticStrings().stack)))) {
-            // if ErrorCreationCallback is registered and this callback already inserts `stack` property for evert created ErrorObject,
+        if (UNLIKELY((m_context->vmInstance()->isErrorCreationCallbackRegistered() || m_context->vmInstance()->isErrorThrowCallbackRegistered()) && obj->hasOwnProperty(state, ObjectPropertyName(m_context->staticStrings().stack)))) {
+            // if ErrorCreationCallback or ErrorThrowCallback is registered and this callback already inserts `stack` property for the created ErrorObject,
             // we just ignore adding `stack` data here
             return;
         }
index 596a28810fcf87ce997515d402f401286be4f592..c83518408a202d46ba8710cd55f9a4f9f8759b11 100644 (file)
@@ -26,7 +26,7 @@ namespace Escargot {
 
 Object* ScriptAsyncGeneratorFunctionObject::createFunctionPrototypeObject(ExecutionState& state)
 {
-    Object* prototype = new Object(state, m_codeBlock->context()->globalObject()->asyncGeneratorPrototype());
+    Object* prototype = new PrototypeObject(state, m_codeBlock->context()->globalObject()->asyncGeneratorPrototype());
     return prototype;
 }
 
index 0cc1910fdd108d2650629b4ecdd2919f81ea882d..48af6a671e2c5c80273778caaeb37015c5c482dd 100644 (file)
@@ -83,12 +83,7 @@ NEVER_INLINE void ScriptFunctionObject::generateByteCodeBlock(ExecutionState& st
     if (hasTag(g_scriptFunctionObjectTag)) {
         auto cb = m_codeBlock->asInterpretedCodeBlock();
         auto byteCb = cb->byteCodeBlock();
-        size_t registerSize = byteCb->m_requiredRegisterFileSizeInValueSize;
-        size_t identifierOnStackCount = cb->identifierOnStackCount();
-        size_t stackStorageSize = cb->totalStackAllocatedVariableSize();
-        size_t literalStorageSize = byteCb->m_numeralLiteralData.size();
-        size_t registerFileSize = registerSize + stackStorageSize + literalStorageSize;
-
+        size_t registerFileSize = byteCb->m_requiredTotalRegisterNumber;
         bool isStrict = cb->isStrict();
         bool shouldClearStack = byteCb->m_shouldClearStack;
 
index 2ac6c133def3dd11fcc7568d82cab72c2c0b23c8..2f1167442a7a937e9a6662cfab08318415b873a6 100644 (file)
@@ -26,7 +26,7 @@ namespace Escargot {
 
 Object* ScriptGeneratorFunctionObject::createFunctionPrototypeObject(ExecutionState& state)
 {
-    Object* prototype = new Object(state, m_codeBlock->context()->globalObject()->generatorPrototype());
+    Object* prototype = new PrototypeObject(state, m_codeBlock->context()->globalObject()->generatorPrototype());
     return prototype;
 }
 
index 22bf1bee229b4d44c9beef46d4b21c9fac7e4f1c..0eb3f00c93983529ee48bcdd9b5a3bda6a17fc51 100644 (file)
@@ -61,15 +61,13 @@ protected:
 
         ByteCodeBlock* blk = codeBlock->byteCodeBlock();
         Context* ctx = codeBlock->context();
-        const size_t stackStorageSize = codeBlock->totalStackAllocatedVariableSize();
-        const size_t identifierOnStackCount = codeBlock->identifierOnStackCount();
-        const size_t registerSize = blk->m_requiredRegisterFileSizeInValueSize;
-        const size_t literalStorageSize = blk->m_numeralLiteralData.size();
-        Value* literalStorageSrc = blk->m_numeralLiteralData.data();
+        const size_t registerSize = blk->m_requiredOperandRegisterNumber;
 
 #if !defined(NDEBUG)
+        const size_t stackStorageSize = codeBlock->totalStackAllocatedVariableSize();
+        const size_t literalStorageSize = blk->m_numeralLiteralData.size();
         ASSERT(codeBlock->isStrict() == isStrict);
-        ASSERT(blk->m_requiredRegisterFileSizeInValueSize + stackStorageSize + literalStorageSize <= registerFileSize);
+        ASSERT(blk->m_requiredOperandRegisterNumber + stackStorageSize + literalStorageSize <= registerFileSize);
 #endif
 
         // prepare env, ec
@@ -86,21 +84,6 @@ protected:
         Value* registerFile = reinterpret_cast<Value*>(registerFileBuffer);
         Value* stackStorage = registerFile + registerSize;
 
-        {
-            Value* literalStorage = stackStorage + stackStorageSize;
-            for (size_t i = 0; i < literalStorageSize; i++) {
-                literalStorage[i] = literalStorageSrc[i];
-            }
-        }
-
-        // binding function name
-        stackStorage[1] = this;
-
-        // initialize identifiers by undefined value
-        for (size_t i = 2; i < identifierOnStackCount; i++) {
-            stackStorage[i] = Value();
-        }
-
         ExecutionState newState(ctx, &state, &lexEnv, argc, argv, isStrict);
         if (isStrict) {
             stackStorage[0] = thisValue;
@@ -120,6 +103,75 @@ protected:
             return ByteCodeInterpreter::interpret(&newState, blk, 0, registerFile);
         }
     }
+
+    virtual Value construct(ExecutionState& state, const size_t argc, Value* argv, Object* newTarget) override
+    {
+        // Assert: Type(newTarget) is Object.
+        ASSERT(newTarget->isObject());
+        ASSERT(newTarget->isConstructor());
+        // Let kind be F’s [[ConstructorKind]] internal slot.
+        ASSERT(constructorKind() == ConstructorKind::Base); // this is always `Base` because we define ScriptClassConsturctor::construct
+
+#ifdef STACK_GROWS_DOWN
+        if (UNLIKELY(state.stackLimit() > (size_t)currentStackPointer())) {
+#else
+        if (UNLIKELY(state.stackLimit() < (size_t)currentStackPointer())) {
+#endif
+            ErrorObject::throwBuiltinError(state, ErrorObject::RangeError, "Maximum call stack size exceeded");
+        }
+
+        // Let thisArgument be ? OrdinaryCreateFromConstructor(newTarget, "%ObjectPrototype%").
+        Object* proto = Object::getPrototypeFromConstructor(state, newTarget, [](ExecutionState& state, Context* constructorRealm) -> Object* {
+            return constructorRealm->globalObject()->objectPrototype();
+        });
+
+        // Set the [[Prototype]] internal slot of obj to proto.
+        Object* thisArgument = new Object(state, proto);
+
+        ASSERT(codeBlock()->isInterpretedCodeBlock());
+        InterpretedCodeBlock* codeBlock = interpretedCodeBlock();
+
+        // prepare ByteCodeBlock if needed
+        if (UNLIKELY(codeBlock->byteCodeBlock() == nullptr)) {
+            generateByteCodeBlock(state);
+        }
+
+        ByteCodeBlock* blk = codeBlock->byteCodeBlock();
+        Context* ctx = codeBlock->context();
+        const size_t registerSize = blk->m_requiredOperandRegisterNumber;
+
+#if !defined(NDEBUG)
+        const size_t stackStorageSize = codeBlock->totalStackAllocatedVariableSize();
+        const size_t literalStorageSize = blk->m_numeralLiteralData.size();
+        ASSERT(codeBlock->isStrict() == isStrict);
+        ASSERT(blk->m_requiredOperandRegisterNumber + stackStorageSize + literalStorageSize <= registerFileSize);
+#endif
+
+        // prepare env, ec
+        ASSERT(codeBlock->canAllocateEnvironmentOnStack());
+        FunctionEnvironmentRecordOnStack<false, true> record(this);
+        LexicalEnvironment lexEnv(&record, outerEnvironment()
+#ifndef NDEBUG
+                                               ,
+                                  false
+#endif
+        );
+
+        char* registerFileBuffer[sizeof(Value) * registerFileSize];
+        Value* registerFile = reinterpret_cast<Value*>(registerFileBuffer);
+        Value* stackStorage = registerFile + registerSize;
+
+        ExecutionState newState(ctx, &state, &lexEnv, argc, argv, isStrict);
+        stackStorage[0] = thisArgument;
+
+        record.setNewTarget(newTarget);
+
+        const Value returnValue = ByteCodeInterpreter::interpret(&newState, blk, 0, registerFile);
+        if (shouldClearStack) {
+            clearStack<512>();
+        }
+        return returnValue.isObject() ? returnValue : thisArgument;
+    }
 };
 
 COMPILE_ASSERT(sizeof(ScriptSimpleFunctionObject<>) == sizeof(ScriptFunctionObject), "");
index 6e45baaf298cb3697e5ed71edf2611306b5a7e5e..585df89f6c8324c96b691dc74de65213e43a6047 100644 (file)
@@ -44,7 +44,7 @@ SharedArrayBufferObject::SharedArrayBufferObject(ExecutionState& state, Object*
         GC_invoke_finalizers();
     }
 
-    m_backingStore = BackingStore::createDefaultSharedBackingStore(byteLength);
+    updateBackingStore(BackingStore::createDefaultSharedBackingStore(byteLength));
 }
 
 SharedArrayBufferObject::SharedArrayBufferObject(ExecutionState& state, Object* proto, size_t byteLength, size_t maxByteLength)
@@ -64,7 +64,7 @@ SharedArrayBufferObject::SharedArrayBufferObject(ExecutionState& state, Object*
         GC_invoke_finalizers();
     }
 
-    m_backingStore = BackingStore::createDefaultGrowableSharedBackingStore(byteLength, maxByteLength);
+    updateBackingStore(BackingStore::createDefaultGrowableSharedBackingStore(byteLength, maxByteLength));
 }
 
 SharedArrayBufferObject::SharedArrayBufferObject(ExecutionState& state, Object* proto, BackingStore* backingStore)
@@ -73,13 +73,13 @@ SharedArrayBufferObject::SharedArrayBufferObject(ExecutionState& state, Object*
     // BackingStore should be valid and shared
     ASSERT(!!backingStore && backingStore->isShared());
 
-    m_backingStore = BackingStore::createSharedBackingStore(backingStore->sharedDataBlockInfo());
+    updateBackingStore(BackingStore::createSharedBackingStore(backingStore->sharedDataBlockInfo()));
 }
 
 SharedArrayBufferObject::SharedArrayBufferObject(ExecutionState& state, Object* proto, SharedDataBlockInfo* sharedInfo)
     : ArrayBuffer(state, proto)
 {
-    m_backingStore = BackingStore::createSharedBackingStore(sharedInfo);
+    updateBackingStore(BackingStore::createSharedBackingStore(sharedInfo));
 }
 
 SharedArrayBufferObject* SharedArrayBufferObject::allocateSharedArrayBuffer(ExecutionState& state, Object* constructor, uint64_t byteLength, Optional<uint64_t> maxByteLength)
index 78d66c75c544612083b26de74139686b29d3ac95..57e037278f6f3842f7fd9f980374a6a405bbfd69 100644 (file)
@@ -40,15 +40,15 @@ public:
     };
 
     TemplateData(const Value& v)
+        : m_type(TemplateDataValue)
+        , m_value(v)
     {
-        m_type = TemplateDataValue;
-        m_value = v;
     }
 
     TemplateData(Template* t)
+        : m_type(TemplateDataTemplate)
+        , m_template(t)
     {
-        m_type = TemplateDataTemplate;
-        m_template = t;
     }
 
 private:
index 883fb40159572da134f640343e45bf1536e2c6cf..5abc668984d05752a0c48f66e1101243b9b106e9 100644 (file)
@@ -349,6 +349,8 @@ VMInstance::VMInstance(const char* locale, const char* timezone, const char* bas
     , m_onVMInstanceDestroyData(nullptr)
     , m_errorCreationCallback(nullptr)
     , m_errorCreationCallbackPublic(nullptr)
+    , m_errorThrowCallback(nullptr)
+    , m_errorThrowCallbackPublic(nullptr)
     , m_promiseHook(nullptr)
     , m_promiseHookPublic(nullptr)
     , m_promiseRejectCallback(nullptr)
index 3617572a5a3c1a282515da81774cc94ce6a1ba3e..cc2d3404d4023883131d9f4cfc6c9ef1d9a80b47 100644 (file)
@@ -241,18 +241,35 @@ public:
         return !!m_errorCreationCallback;
     }
 
-    void registerErrorCreationCallback(void (*ErrorCreationCallback)(ExecutionState& state, ErrorObject* err, void* cb), void* callbackPublic)
+    bool isErrorThrowCallbackRegistered()
     {
-        m_errorCreationCallback = ErrorCreationCallback;
+        return !!m_errorThrowCallback;
+    }
+
+    void registerErrorCreationCallback(void (*ErrorCallback)(ExecutionState& state, ErrorObject* err, void* cb), void* callbackPublic)
+    {
+        m_errorCreationCallback = ErrorCallback;
         m_errorCreationCallbackPublic = callbackPublic;
     }
 
+    void registerErrorThrowCallback(void (*ErrorCallback)(ExecutionState& state, ErrorObject* err, void* cb), void* callbackPublic)
+    {
+        m_errorThrowCallback = ErrorCallback;
+        m_errorThrowCallbackPublic = callbackPublic;
+    }
+
     void unregisterErrorCreationCallback()
     {
         m_errorCreationCallback = nullptr;
         m_errorCreationCallbackPublic = nullptr;
     }
 
+    void unregisterErrorThrowCallback()
+    {
+        m_errorThrowCallback = nullptr;
+        m_errorThrowCallbackPublic = nullptr;
+    }
+
     void triggerErrorCreationCallback(ExecutionState& state, ErrorObject* error)
     {
         ASSERT(!!m_errorCreationCallback);
@@ -261,6 +278,14 @@ public:
         }
     }
 
+    void triggerErrorThrowCallback(ExecutionState& state, ErrorObject* error)
+    {
+        ASSERT(!!m_errorThrowCallback);
+        if (m_errorThrowCallbackPublic) {
+            m_errorThrowCallback(state, error, m_errorThrowCallbackPublic);
+        }
+    }
+
     // PromiseHook is triggered for each Promise event
     // Third party app registers PromiseHook when it is necessary
     bool isPromiseHookRegistered()
@@ -381,6 +406,8 @@ private:
 
     void (*m_errorCreationCallback)(ExecutionState& state, ErrorObject* err, void* cb);
     void* m_errorCreationCallbackPublic;
+    void (*m_errorThrowCallback)(ExecutionState& state, ErrorObject* err, void* cb);
+    void* m_errorThrowCallbackPublic;
 
     // PromiseHook is triggered for each Promise event
     // Third party app registers PromiseHook when it is necessary
index eb774eff99a6bab88aebe138fd0d21ba6fd54aef..e833eb752e3b8140f888602cff350a206a842304 100644 (file)
@@ -133,6 +133,8 @@ public:
 #else
     Value(PointerValue* ptr);
     Value(const PointerValue* ptr);
+    enum FromNonObjectPointerTag { FromNonObjectPointer };
+    Value(const PointerValue* ptr, FromNonObjectPointerTag);
     Value(Object* ptr);
     Value(const Object* ptr);
     Value(String* ptr);
index bc7b577088b4c57dbf884be9ad128c76d413dbbd..b938895129aea1b447368c90ac852c064cf7117a 100644 (file)
@@ -133,6 +133,13 @@ inline Value::Value(const PointerValue* ptr)
     u.asBits.payload = reinterpret_cast<int32_t>(const_cast<PointerValue*>(ptr));
 }
 
+inline Value::Value(const PointerValue* ptr, FromNonObjectPointerTag)
+{
+    ASSERT(!ptr->isObject());
+    u.asBits.tag = OtherPointerTag;
+    u.asBits.payload = reinterpret_cast<int32_t>(const_cast<PointerValue*>(ptr));
+}
+
 inline Value::Value(String* ptr)
 {
     ASSERT(ptr != NULL);
index dc53b461b9d2f644b7400a6241db8ada3a9c8b0e..f6cef281101f790bb7ec29022cab1f51d123c0ce 100644 (file)
@@ -1044,7 +1044,6 @@ int main(int argc, char* argv[])
     }
 
     if (wait_before_exit || context->isWaitBeforeExit()) {
-        context->setAsAlwaysStopState();
         auto evalResult = Evaluator::execute(context, [](ExecutionStateRef* state, ScriptRef* script) -> ValueRef* {
             return script->execute(state);
         },
index 9eb0ec4d3c00f002cabf41a070467ec34e24cf84..f1f9bd488030852d0b6138ffe0a6c37cf01e32b4 100644 (file)
@@ -34,6 +34,9 @@ class GmainLoopNodeBindings {
   GmainLoopNodeBindings(GmainLoopWork* bindingWork);
   virtual ~GmainLoopNodeBindings(){};
 
+  static void enable();
+  static bool isEnabled();
+
   void StartEventLoop();
   void RunOnce();
   bool HasMoreTasks();
index 9ad3a74a76862a33fd455945d62b100a5a18ad0f..a879c7427d5d06730475b936a14870a5676a2889 100644 (file)
@@ -187,13 +187,24 @@ namespace LWNode {
 
 namespace LWNode {
 
+static thread_local bool g_enableGmainLoop = false;
+
 GmainLoopNodeBindings::GmainLoopNodeBindings(GmainLoopWork* gmainLoopWork)
     : gmainLoopWork_(gmainLoopWork) {
   m_isInitialize = true;
 }
 
+void GmainLoopNodeBindings::enable() {
+  g_enableGmainLoop = true;
+}
+
+bool GmainLoopNodeBindings::isEnabled() {
+  return g_enableGmainLoop;
+}
+
 void GmainLoopNodeBindings::StartEventLoop() {
   assert(m_isInitialize);
+  assert(g_enableGmainLoop);
 
   glib::GmainLoopInit(this);
 
index 2187721541a835907a8f7b5df7d5cbe2c5fd739c..c37dbf2ad55dc402799615aa1d9e8369ddf2ae17 100755 (executable)
@@ -47,7 +47,7 @@
         'src/libplatform/tracing/trace-object.cc',
         'src/libplatform/tracing/trace-writer.cc',
         'src/api/utils/debug.cc',
-        'src/api/utils/gc.cc',
+        'src/api/utils/gc-util.cc',
         'src/api/utils/smaps.cc',
         'src/api/utils/string-util.cc',
         'src/api/utils/logger/flags.cc',
index 786bb7b217e87d3cc010ac3f3d1254bd604a41d2..38e252b7457e9299aab9107c62a7bdd3fecc6694 100644 (file)
@@ -25,6 +25,10 @@ class ContextRef;
 class ValueRef;
 }  // namespace Escargot
 
+#ifndef LWNODE_EXPORT
+#define LWNODE_EXPORT __attribute__((visibility("default")))
+#endif
+
 namespace LWNode {
 
 void InitializeProcessMethods(v8::Local<v8::Object> target,
@@ -59,7 +63,7 @@ class MessageLoop {
   std::unique_ptr<Internal> internal_;
 };
 
-class Utils {
+class LWNODE_EXPORT Utils {
  public:
   static Escargot::ContextRef* ToEsContext(v8::Context* context);
 
index 91620eaac6b7dbd2e779ada96b6a80428b6634c0..b0d470e4e8baca19a6263f80b45d985ba5d2a5df 100644 (file)
@@ -278,6 +278,11 @@ MaybeLocal<String> Value::ToString(Local<Context> context) const {
 MaybeLocal<String> Value::ToDetailString(Local<Context> context) const {
   EsScope scope(context, this);
 
+  if (scope.self()->isSymbol()) {
+    auto str = scope.self()->asSymbol()->symbolDescriptiveString();
+    return Utils::NewLocal<String>(scope.v8Isolate(), str);
+  }
+
   auto esString = scope.self()->toStringWithoutException(scope.context());
   return Utils::NewLocal<String>(scope.v8Isolate(), esString);
 }
@@ -1410,6 +1415,10 @@ Local<String> v8::Object::GetConstructorName() {
 
 Maybe<bool> v8::Object::SetIntegrityLevel(Local<Context> context,
                                           IntegrityLevel level) {
+// Note: Debugger and setIntegrityLevel cannot be used together
+#if defined(LWNODE_ENABLE_DEBUGGER)
+  return Just(true);
+#else
   API_ENTER_WITH_CONTEXT(context, Nothing<bool>());
   auto esContext = lwIsolate->GetCurrentContext()->get();
 
@@ -1434,6 +1443,7 @@ Maybe<bool> v8::Object::SetIntegrityLevel(Local<Context> context,
   }
 #endif
   return Just(r.result->asBoolean());
+#endif
 }
 
 Maybe<bool> v8::Object::Delete(Local<Context> context, Local<Value> key) {
@@ -1570,12 +1580,35 @@ Maybe<bool> v8::Object::HasOwnProperty(Local<Context> context, uint32_t index) {
 
 Maybe<bool> v8::Object::HasRealNamedProperty(Local<Context> context,
                                              Local<Name> key) {
-  LWNODE_RETURN_MAYBE(bool);
+  API_ENTER_WITH_CONTEXT(context, Nothing<bool>());
+
+  auto r = ObjectRefHelper::getOwnProperty(VAL(*context)->context()->get(),
+                                           VAL(this)->value()->asObject(),
+                                           VAL(*key)->value());
+
+  API_HANDLE_EXCEPTION(r, lwIsolate, Nothing<bool>());
+
+  if (r.result->isUndefined()) {
+    return Just(false);
+  }
+
+  return Just(true);
 }
 
 Maybe<bool> v8::Object::HasRealIndexedProperty(Local<Context> context,
                                                uint32_t index) {
-  LWNODE_RETURN_MAYBE(bool);
+  API_ENTER_WITH_CONTEXT(context, Nothing<bool>());
+
+  auto r = ObjectRefHelper::getOwnIndexedProperty(
+      VAL(*context)->context()->get(), VAL(this)->value()->asObject(), index);
+
+  API_HANDLE_EXCEPTION(r, lwIsolate, Nothing<bool>());
+
+  if (r.result->isUndefined()) {
+    return Just(false);
+  }
+
+  return Just(true);
 }
 
 Maybe<bool> v8::Object::HasRealNamedCallbackProperty(Local<Context> context,
@@ -2409,7 +2442,9 @@ void v8::Object::SetAlignedPointerInInternalField(int index, void* value) {
 void v8::Object::SetAlignedPointerInInternalFields(int argc,
                                                    int indices[],
                                                    void* values[]) {
-  LWNODE_RETURN_VOID;
+  for (int i = 0; i < argc; i++) {
+    SetAlignedPointerInInternalField(indices[i], values[i]);
+  }
 }
 
 }  // namespace v8
index e3931c00029daa1318380e6208008802b6767e55..9924bc65188d30c38ebf7f9c30e65021691ec1af 100644 (file)
@@ -40,8 +40,6 @@ void v8::V8::ShutdownPlatform() {
 bool v8::V8::Initialize(const int build_config) {
   Engine::Initialize();
 
-  RegisterExtension(std::make_unique<ExternalizeStringExtension>());
-  RegisterExtension(std::make_unique<ExternalizeGcExtension>());
   return true;
 }
 
@@ -271,7 +269,8 @@ void Context::SetErrorMessageForCodeGenerationFromStrings(Local<String> error) {
 
 void Context::SetAbortScriptExecution(
     Context::AbortScriptExecutionCallback callback) {
-  LWNODE_UNIMPLEMENT;
+  auto lwContext = VAL(this)->context();
+  lwContext->SetAbortScriptExecution(callback);
 }
 
 Local<Value> Context::GetContinuationPreservedEmbedderData() const {
@@ -671,11 +670,25 @@ Local<v8::Symbol> v8::SymbolObject::ValueOf() const {
 }
 
 MaybeLocal<v8::Value> v8::Date::New(Local<Context> context, double time) {
-  LWNODE_RETURN_LOCAL(Value);
+  EsScope scope(context);
+
+  auto r = Evaluator::execute(
+      scope.context(),
+      [](ExecutionStateRef* state, double time) -> ValueRef* {
+        auto date = DateObjectRef::create(state);
+        date->setTimeValue(time);
+
+        return date;
+      },
+      time);
+  LWNODE_CHECK(r.isSuccessful());
+
+  return Utils::NewLocal<Date>(scope.v8Isolate(), r.result);
 }
 
 double v8::Date::ValueOf() const {
-  LWNODE_RETURN_0;
+  EsScope scope(this);
+  return scope.self()->asDateObject()->primitiveValue();
 }
 
 MaybeLocal<v8::RegExp> v8::RegExp::New(Local<Context> context,
index 71d99ef75ba6c758ddf1dbf93ad2aa949f157258..4532aeeff00be386cd709a8b88d9ced654b8acaa 100644 (file)
@@ -79,25 +79,7 @@ i::Address* HandleScope::CreateHandle(i::Isolate* isolate, i::Address value) {
 
   LWNODE_CHECK(handle->isValid());
 
-  switch (handle->location()) {
-    case HandleWrap::Location::Local:
-      lwIsolate->addHandleToCurrentScope(handle);
-      return reinterpret_cast<i::Address*>(handle);
-
-    case HandleWrap::Location::Strong:
-    case HandleWrap::Location::Weak: {
-      auto cloned = handle->clone(HandleWrap::Location::Local);
-      lwIsolate->addHandleToCurrentScope(cloned);
-      return reinterpret_cast<i::Address*>(cloned);
-    }
-
-    default:
-      break;
-  }
-
-  LWNODE_CHECK_NOT_REACH_HERE();
-
-  return reinterpret_cast<i::Address*>(value);
+  return handle->location()->create(lwIsolate, handle);
 }
 
 EscapableHandleScope::EscapableHandleScope(Isolate* v8_isolate) {
index f5eb2774b620b04f8129641b0ad2861a750d14ea..6b7b950dd351a868affa8e063c70eccfc1419adf 100644 (file)
@@ -114,6 +114,15 @@ MaybeLocal<Value> Script::Run(Local<Context> context) {
   // 1) lwContextUsed->get() ?
   // 2) script->context() ?
 
+  if (lwContext->getAbortScriptExecution()) {
+    auto abortScriptExecutionCb = lwContext->getAbortScriptExecution();
+    abortScriptExecutionCb(lwIsolate->toV8(), context);
+
+    lwIsolate->ScheduleThrow(ValueRef::createUndefined());
+
+    return MaybeLocal<Value>();
+  }
+
   auto r = Evaluator::execute(
       esScript->context(),
       [](ExecutionStateRef* state, ScriptRef* script) -> ValueRef* {
@@ -398,35 +407,20 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
     arguments_list.push_back(VAL(*arguments[i])->value());
   }
 
-  EvalResult r = Evaluator::execute(
-      esContext,
-      [](ExecutionStateRef* state,
-         StringRef* sourceName,
-         StringRef* source,
-         size_t argc,
-         ValueRef** argv) -> ValueRef* {
-        return FunctionObjectRef::create(
-            state,
-            sourceName,
-            AtomicStringRef::create(state->context(), "anonymous"),
-            argc,
-            argv,
-            source);
-      },
-      esSourceName,
-      esSource,
-      arguments_list.size(),
-      arguments_list.data());
+  ScriptParserRef::InitializeFunctionScriptResult result =
+      esContext->scriptParser()->initializeFunctionScript(
+          esSourceName,
+          AtomicStringRef::create(esContext, "anonymous"),
+          arguments_list.size(),
+          arguments_list.data(),
+          esSource);
 
   // note: expand API_HANDLE_EXCEPTION and add the resource name
-  if (!r.isSuccessful()) {
-    LWNODE_DLOG_ERROR("Evaluate");
-    LWNODE_DLOG_RAW("Execute:\n  %s\nResource:\n  %s\n%s",
-                    __CODE_LOCATION__,
-                    esSourceName->toStdUTF8String().c_str(),
-                    EvalResultHelper::getErrorString(
-                        lwIsolate->GetCurrentContext()->get(), r)
-                        .c_str());
+  if (!result.isSuccessful()) {
+    Evaluator::EvaluatorResult r;
+    ContextRef* esPureContext = ContextRef::create(lwIsolate->vmInstance());
+    r.error = ExceptionHelper::createErrorObject(
+        esPureContext, result.parseErrorCode, result.parseErrorMessage);
 
     lwIsolate->SetPendingExceptionAndMessage(r.error.get(), r.stackTrace);
     lwIsolate->ReportPendingMessages();
@@ -435,21 +429,14 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
 
   if (script_or_module_out != nullptr) {
     ScriptParserRef* parser = esContext->scriptParser();
-    // note: The script should be the script of the function generated above,
-    // but escargot do not support these api.
-    // We use the script of empty strings instead, as node is used only
-    // to register it in the weak callback.
-    ScriptParserRef::InitializeScriptResult result = parser->initializeScript(
-        lwIsolate->emptyString()->value()->asString(),
-        VAL(*source->resource_name)->value()->asString(),
-        false);
     LWNODE_CHECK(result.isSuccessful());
 
     *script_or_module_out =
         Utils::NewLocal<ScriptOrModule>(lwIsolate->toV8(), result.script.get());
   }
 
-  return Utils::NewLocal<Function>(lwIsolate->toV8(), r.result);
+  return Utils::NewLocal<Function>(lwIsolate->toV8(),
+                                   result.functionObject.get());
 }
 
 void ScriptCompiler::ScriptStreamingTask::Run() {
index 8493f5ac70fb4529f155a18ade07b37ddc38376f..11a23775ea30c7c4ff8404728182235f9b04cf31 100644 (file)
@@ -195,7 +195,8 @@ class ExtensionSourceString : public v8::String::ExternalOneByteStringResource {
   const char* data_;
 };
 
-std::vector<std::unique_ptr<Extension>> RegisteredExtension::extensions;
+thread_local std::vector<std::unique_ptr<Extension>>
+    RegisteredExtension::extensions;
 
 void RegisterExtension(std::unique_ptr<Extension> extension) {
   RegisteredExtension::registerExtension(std::move(extension));
@@ -228,6 +229,68 @@ bool RegisteredExtension::isLwExtension(Extension* extension) {
   return (name == "v8/externalize") || (name == "v8/gc");
 }
 
+class ExtensionFunctionChecker {
+ public:
+  ExtensionFunctionChecker(const std::string& src)
+      : hasError_(false), isNativeFunction_(false) {
+    tokens_ = tokenzier(src, " ");
+  }
+
+  std::vector<std::string> tokenzier(const std::string& src,
+                                     const std::string& delims) {
+    char buffer[src.size() + 1];
+    strncpy(buffer, src.c_str(), src.size());
+
+    char* ptr = strtok(buffer, " ");
+    std::vector<std::string> tokens;
+    while (ptr != nullptr) {
+      tokens.push_back(ptr);
+      ptr = strtok(nullptr, " ");
+    }
+
+    return tokens;
+  }
+
+  void parseFunction() {
+    size_t i = 0;
+    bool isNativeFunction = false;
+    while (i < tokens_.size()) {
+      if (tokens_[i] == "native") {
+        if (i + 1 < tokens_.size() && tokens_[i + 1] == "function") {
+          isNativeFunction_ = true;
+        } else {
+          hasError_ = true;
+          break;
+        }
+      } else if (tokens_[i] == "function") {
+        if (i + 1 < tokens_.size()) {
+          functionName_ = tokens_[i + 1];
+          if (functionName_.find("(") != std::string::npos) {
+            functionName_ = functionName_.substr(0, functionName_.find("("));
+          }
+        } else {
+          hasError_ = true;
+          break;
+        }
+
+        // check for the first function
+        break;
+      }
+      i++;
+    }
+  }
+
+  bool hasError() { return hasError_; }
+  std::string functionName() { return functionName_; }
+  bool isNativeFunction() { return isNativeFunction_; }
+
+ private:
+  bool hasError_ = false;
+  bool isNativeFunction_ = false;
+  std::vector<std::string> tokens_;
+  std::string functionName_;
+};
+
 void RegisteredExtension::applyV8Extension(ContextRef* context,
                                            Extension* extension) {
   if (extension->source() == nullptr ||
@@ -237,23 +300,29 @@ void RegisteredExtension::applyV8Extension(ContextRef* context,
   }
 
   std::string src = extension->source()->data();
-  std::string prefix = "native function ";
-  size_t prefixPosition = src.find(prefix.c_str());
-  if (prefixPosition == std::string::npos) {
+  ExtensionFunctionChecker checker(src);
+  checker.parseFunction();
+
+  if (checker.hasError()) {
+    LWNODE_LOG_WARN("Invalid usage of native");
+    return;
+  }
+
+  if (!checker.isNativeFunction()) {
     EvalResultHelper::compileRun(context, extension->source()->data());
     return;
   }
 
   // Register v8 native function extension
+  std::string name = checker.functionName();
   auto lwIsolate = IsolateWrap::GetCurrent();
-  v8::Local<v8::String> str;
+  auto v8Name = Utils::NewLocal<String>(
+      lwIsolate->toV8(), StringRef::createFromASCII(name.c_str(), name.size()));
+
   v8::Local<v8::FunctionTemplate> v8FunctionTemplate =
-      extension->GetNativeFunctionTemplate(lwIsolate->toV8(), str);
+      extension->GetNativeFunctionTemplate(lwIsolate->toV8(), v8Name);
 
   auto esFunctionTemplate = CVAL(*v8FunctionTemplate)->ftpl();
-  src = src.substr(prefixPosition + prefix.length());
-  src = src.substr(0, src.find("("));
-  std::string name = src;
 
   EvalResult r = Evaluator::execute(
       context,
index 3dcc71cc18fbd11bfdf0c4f7a085295c383d79c8..daac25c206eff47346b25782f7c7e847053f059e 100644 (file)
@@ -151,7 +151,7 @@ class RegisteredExtension {
   static bool isLwExtension(Extension* extension);
   static void applyV8Extension(ContextRef* context, Extension* extension);
 
-  static std::vector<std::unique_ptr<Extension>> extensions;
+  thread_local static std::vector<std::unique_ptr<Extension>> extensions;
 };
 
 class LwExtension : public v8::Extension {
index 1046b3ad3ab7f4834061bafc2581e4675cb8c3f1..c0326b279e56a691efeba704dbd626d7fee5dbcb 100644 (file)
@@ -17,7 +17,7 @@
 #pragma once
 
 #include <v8.h>
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 
 namespace EscargotShim {
 
index e773d22e5352f5d6e6d681421fa8d3ade9e6e6bf..5d79be17a96f852af0cee0f56faccd876ead7407 100644 (file)
@@ -53,83 +53,19 @@ static void evalJavaScript(ContextRef* context,
   LWNODE_CHECK_MSG(r.isSuccessful(), "Cannot execute %s", name);
 }
 
-static bool createGlobals(ContextRef* context) {
-#if defined(HOST_TIZEN)
-// @todo setup device APIs
-#endif
-  // Create captureStackTrace and stackTraceLimit
-  EvalResult r =
-      Evaluator::execute(context, [](ExecutionStateRef* state) -> ValueRef* {
-        auto errorObject = state->context()
-                               ->globalObject()
-                               ->get(state, StringRef::createFromASCII("Error"))
-                               ->asObject();
-
-        errorObject->set(state,
-                         StringRef::createFromASCII("captureStackTrace"),
-                         StackTrace::createCaptureStackTrace(state));
-        errorObject->set(
-            state,
-            StringRef::createFromASCII("stackTraceLimit"),
-            ValueRef::create(
-                20));  // TODO: get number from '--stack-trace-limit' options
-
-        if (!EscargotShim::Global::flags()->isOn(
-                EscargotShim::Flag::Type::AllowCodeGenerationFromString)) {
-          // @note --disallow-code-generation-from-strings as default
-          state->context()->globalObject()->defineDataProperty(
-              state,
-              StringRef::createFromASCII("eval"),
-              FunctionObjectRef::create(
-                  state,
-                  FunctionObjectRef::NativeFunctionInfo(
-                      AtomicStringRef::emptyAtomicString(),
-                      [](ExecutionStateRef* state,
-                         ValueRef* thisValue,
-                         size_t argc,
-                         ValueRef** argv,
-                         bool isConstructCall) -> ValueRef* {
-                        state->throwException(
-                            ExceptionHelper::createErrorObject(
-                                state->context(),
-                                ErrorMessageType::kDisallowCodeGeneration));
-                        return ValueRef::createUndefined();
-                      },
-                      0,
-                      true,
-                      false)),
-              false,
-              false,
-              false);
-        }
-
-        return ValueRef::createUndefined();
-      });
-  LWNODE_CHECK(r.isSuccessful());
-  return true;
-}
-
 // ContextWrap
 ContextWrap::ContextWrap(IsolateWrap* isolate,
                          v8::ExtensionConfiguration* extensionConfiguration) {
   isolate_ = isolate;
-
   context_ = ContextRef::create(isolate->vmInstance());
-
   callSite_ = new CallSite(context_);
+  val_ = context_;
+  type_ = Type::Context;
 
   // NOTE: Not tested with multi initialization
   initDebugger();
 
-  auto globalObjectData = new GlobalObjectData();
-  globalObjectData->setInternalFieldCount(
-      GlobalObjectData::kInternalFieldCount);
-  globalObjectData->setInternalField(GlobalObjectData::kContextWrapSlot, this);
-  ObjectRefHelper::setExtraData(context_->globalObject(), globalObjectData);
-  createGlobals(context_);
-
-  val_ = context_;
-  type_ = Type::Context;
+  EscargotShim::Global::initGlobalObject(this);
 
   RegisteredExtension::applyAll(context_);
 }
@@ -265,6 +201,16 @@ void ContextWrap::UseDefaultSecurityToken() {
   security_token_ = context_->globalObject();
 }
 
+void ContextWrap::SetAbortScriptExecution(
+    v8::Context::AbortScriptExecutionCallback callback) {
+  abortScriptExecutionCallback_ = callback;
+}
+
+v8::Context::AbortScriptExecutionCallback
+ContextWrap::getAbortScriptExecution() {
+  return abortScriptExecutionCallback_;
+}
+
 }  // namespace EscargotShim
 
 // namespace EscargotShim
index 04db035210ea1f93af96d1b9e7fe88aece97b77f..c4b1e908e98c4b44d26df28ba22b73cbf8234da2 100644 (file)
@@ -55,6 +55,10 @@ class ContextWrap : public ValueWrap {
 
   CallSite* callSite() { return callSite_; }
 
+  void SetAbortScriptExecution(
+      v8::Context::AbortScriptExecutionCallback callback);
+  v8::Context::AbortScriptExecutionCallback getAbortScriptExecution();
+
   void initDebugger();
 
  private:
@@ -71,6 +75,9 @@ class ContextWrap : public ValueWrap {
   Escargot::ValueRef* security_token_ = nullptr;
 
   CallSite* callSite_ = nullptr;
+
+  v8::Context::AbortScriptExecutionCallback abortScriptExecutionCallback_ =
+      nullptr;
 };
 
 }  // namespace EscargotShim
index 6598d89d549fc4548d028f6b687506e878dac8a4..939b36cc9c3970a3baf1d255822b9adf50799141 100644 (file)
@@ -22,7 +22,7 @@
 #include <thread>
 #include <vector>
 
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 
 using namespace Escargot;
 
index 9a865dbd2b84183f87a690ded100fc66cce5acbf..bf94fe538ec01ae8462e55f8a9a54f2c6866cb65 100755 (executable)
@@ -32,6 +32,14 @@ using namespace v8;
 
 namespace EscargotShim {
 
+EvalResult::EvalResult() : Evaluator::EvaluatorResult() {}
+
+EvalResult::EvalResult(const EvalResult& src)
+    : Evaluator::EvaluatorResult(src) {}
+
+EvalResult::EvalResult(EvalResult&& src)
+    : Evaluator::EvaluatorResult(std::move(src)) {}
+
 // --- ObjectRefHelper ---
 
 ObjectRef* ObjectRefHelper::create(ContextRef* context) {
@@ -206,6 +214,30 @@ EvalResult ObjectRefHelper::hasOwnProperty(ContextRef* context,
       key);
 }
 
+EvalResult ObjectRefHelper::getOwnIndexedProperty(ContextRef* context,
+                                                  ObjectRef* object,
+                                                  uint32_t index) {
+  LWNODE_DCHECK_NOT_NULL(object);
+
+  return Evaluator::execute(
+      context,
+      [](ExecutionStateRef* state,
+         ObjectRef* object,
+         ValueRef* index) -> ValueRef* {
+        ValueRef* ownIndexProperty = object->getOwnProperty(state, index);
+        ValueRef* propertyValue = object->getIndexedProperty(state, index);
+
+        if (ownIndexProperty->isUndefinedOrNull() ||
+            propertyValue->isUndefinedOrNull()) {
+          return ValueRef::createUndefined();
+        }
+
+        return propertyValue;
+      },
+      object,
+      ValueRef::create(index));
+}
+
 EvalResult ObjectRefHelper::deleteProperty(ContextRef* context,
                                            ObjectRef* object,
                                            ValueRef* key) {
@@ -470,7 +502,7 @@ void ObjectRefHelper::addNativeFunction(ContextRef* context,
                                         ObjectRef* object,
                                         StringRef* name,
                                         NativeFunctionPointer function) {
-  Evaluator::execute(
+  auto r = Evaluator::execute(
       context,
       [](ExecutionStateRef* state,
          ObjectRef* target,
@@ -495,6 +527,8 @@ void ObjectRefHelper::addNativeFunction(ContextRef* context,
       object,
       name,
       function);
+
+  LWNODE_CHECK(r.isSuccessful());
 }
 
 ArrayObjectRef* ArrayObjectRefHelper::create(ContextRef* context,
@@ -974,29 +1008,9 @@ void ExceptionHelper::addStackPropertyCallback(ExecutionStateRef* state,
     return;
   }
 
-  auto lwIsolate = IsolateWrap::GetCurrent();
-  auto errorObject = error->asObject();
-
-  ValueRef* formattedStackTrace = StringRef::emptyString();
-  StackTrace stackTrace(state);
-  if (lwIsolate->HasPrepareStackTraceCallback()) {
-    auto lwContext = lwIsolate->GetCurrentContext();
-
-    auto sites = stackTrace.genCallSites();
-    formattedStackTrace = lwIsolate->RunPrepareStackTraceCallback(
-        state, lwContext, errorObject, sites);
-  } else {
-    formattedStackTrace =
-        stackTrace.formatStackTraceStringNodeStyle(errorObject);
-  }
-
-  bool ok = errorObject->defineDataProperty(state,
-                                            StringRef::createFromASCII("stack"),
-                                            formattedStackTrace,
-                                            true,
-                                            false,
-                                            true);
-  LWNODE_CHECK(ok);
+  StackTrace stackTrace(state, error->asObject());
+  auto sites = stackTrace.genCallSites(state->computeStackTrace());
+  stackTrace.addStackProperty(sites);
 }
 
 // --- StringRefHelper ---
index 821389a9e311e28edd05e348348f003af2ff879c..de4f6efa4894c14fb53ca817c8f29dd29f3ab430 100755 (executable)
@@ -18,7 +18,7 @@
 
 #include <EscargotPublic.h>
 #include "extra-data.h"
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 
 using namespace Escargot;
 
@@ -31,7 +31,23 @@ class FunctionData;
 class ValueWrap;
 enum class ErrorMessageType;
 
-typedef Evaluator::EvaluatorResult EvalResult;
+struct EvalResult : public Evaluator::EvaluatorResult {
+  EvalResult();
+  EvalResult(const EvalResult& src);
+  EvalResult(EvalResult&& src);
+
+  // Evaluator::EvaluatorResult
+  EvalResult(const Evaluator::EvaluatorResult& src)
+      : Evaluator::EvaluatorResult(src) {}
+  EvalResult(Evaluator::EvaluatorResult&& src)
+      : Evaluator::EvaluatorResult(std::move(src)) {}
+
+  EvalResult& check() {
+    LWNODE_CHECK(isSuccessful());
+    return *this;
+  }
+};
+
 typedef FunctionObjectRef::NativeFunctionPointer NativeFunctionPointer;
 typedef FunctionObjectRef::NativeFunctionInfo NativeFunctionInfo;
 typedef ValueWrap InternalField;
@@ -71,6 +87,10 @@ class ObjectRefHelper {
                                    ObjectRef* object,
                                    ValueRef* key);
 
+  static EvalResult getOwnIndexedProperty(ContextRef* context,
+                                          ObjectRef* object,
+                                          uint32_t index);
+
   static EvalResult getPrivate(ContextRef* context,
                                SymbolRef* privateValueSymbol,
                                ObjectRef* object,
@@ -193,6 +213,16 @@ class ExtraDataHelper {
     return nullptr;
   }
 
+  static ExceptionObjectData* getExceptionObjectExtraData(
+      ObjectRef* functionObject) {
+    auto extraData = (ExtraData*)functionObject->extraData();
+    if (extraData) {
+      return extraData->asExceptionObjectData();
+    }
+
+    return nullptr;
+  }
+
   // Only allow the following (Object, extraData) pairs when adding extraData
   static void setExtraData(ObjectTemplateRef* otpl, ObjectTemplateData* data);
   static void setExtraData(FunctionTemplateRef* ftpl,
index bf656478b01a054a0cf6350ba6517ee697f2102b..3c8d40b530c17bfadb57e1b97df1a1740f9ba05a 100644 (file)
@@ -18,7 +18,8 @@
 
 #include <EscargotPublic.h>
 #include <memory>
-#include "utils/gc.h"
+#include "utils/gc-util.h"
+#include "utils/misc.h"
 #include "v8.h"
 
 namespace EscargotShim {
@@ -225,39 +226,25 @@ class ExternalObjectData : public ObjectData {
 class StackTraceData : public ExtraData {
  public:
   StackTraceData(const Escargot::Evaluator::StackTraceData& data)
-      : src_(data.srcName),
-        sourceCode_(data.sourceCode),
-        loc_(data.loc),
-        functionName_(data.functionName),
-        isConstructor_(data.isConstructor),
-        isAssociatedWithJavaScriptCode_(data.isAssociatedWithJavaScriptCode),
-        isEval_(data.isEval),
-        callee_(data.callee) {}
+      : data_(data) {}
 
   bool isStackTraceData() const override { return true; }
 
-  StringRef* src() const { return src_; }
-  StringRef* sourceCode() const { return sourceCode_; }
-  Escargot::Evaluator::LOC loc() const { return loc_; }
-  StringRef* functionName() const { return functionName_; }
-  bool isFunction() const { return isFunction_; }
-  bool isConstructor() const { return isConstructor_; }
+  Evaluator::StackTraceData stackTraceData() { return data_; }
+  StringRef* src() const { return data_.srcName; }
+  StringRef* sourceCode() const { return data_.sourceCode; }
+  Escargot::Evaluator::LOC loc() const { return data_.loc; }
+  StringRef* functionName() const { return data_.functionName; }
+  bool isFunction() const { return data_.isFunction; }
+  bool isConstructor() const { return data_.isConstructor; }
   bool isAssociatedWithJavaScriptCode() const {
-    return isAssociatedWithJavaScriptCode_;
+    return data_.isAssociatedWithJavaScriptCode;
   }
-  bool isEval() const { return isEval_; }
-  OptionalRef<FunctionObjectRef> callee() { return callee_; }
+  bool isEval() const { return data_.isEval; }
+  OptionalRef<FunctionObjectRef> callee() { return data_.callee; }
 
  private:
-  StringRef* src_{nullptr};
-  StringRef* sourceCode_{nullptr};
-  Escargot::Evaluator::LOC loc_{0, 0, 0};
-  StringRef* functionName_{nullptr};
-  bool isFunction_{false};
-  bool isConstructor_{false};
-  bool isAssociatedWithJavaScriptCode_{false};
-  bool isEval_{false};
-  OptionalRef<FunctionObjectRef> callee_;
+  Escargot::Evaluator::StackTraceData data_;
 };
 
 // NOTE: ExceptionObjectData does not use any InternalFields.
index 739ed238d6d459fe5a4e0e76169a065670af0f16..29f213b4da6042a2800ed4eb9e3a05b9308a5669 100644 (file)
@@ -40,7 +40,8 @@ FunctionCallbackInfoWrap::FunctionCallbackInfoWrap(
 
   m_implicitArgs[T::kHolderIndex] = ValueWrap::createValue(holder);
   m_implicitArgs[T::kIsolateIndex] = reinterpret_cast<HandleWrap*>(isolate);
-  // m_implicitArgs[T::kReturnValueDefaultValueIndex];  // TODO
+  m_implicitArgs[T::kReturnValueDefaultValueIndex] =
+      lwIsolate->undefined_value();
   m_implicitArgs[T::kReturnValueIndex] = lwIsolate->defaultReturnValue();
   m_implicitArgs[T::kDataIndex] = data;
   m_implicitArgs[T::kNewTargetIndex] =
index dbcf1f47249e00fc18137fc9b9bae7b3793ffbe6..f6d093052cc5ec0182bd621d7210640a718f167c 100644 (file)
@@ -21,7 +21,7 @@
 #include "base.h"
 #include "global-handles.h"
 
-#include "api/utils/gc.h"
+#include "api/utils/gc-util.h"
 
 namespace v8 {
 namespace internal {
index fddaad1e8a26adbd0febb09295da1f3dd79a1a08..4d6caa23874dc5e9e00fdae3bcffdac341ecfee8 100644 (file)
@@ -21,7 +21,7 @@
 #include <EscargotPublic.h>
 
 #include "handle.h"
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 
 namespace v8 {
 namespace internal {
index e7bd97de7d1e1bcf8cfa6da18cc3f3cd2ccc8ac5..a909f3fb0a16057a747fad053eb6665355416638 100644 (file)
 
 #include "global.h"
 
+#include "api/context.h"
+#include "error-message.h"
+#include "es-helper.h"
+#include "stack-trace.h"
+#include "utils/misc.h"
+
 namespace EscargotShim {
+using namespace Escargot;
+
 std::unique_ptr<Flags> Global::s_flags = std::make_unique<Flags>();
 
 Flags* Global::flags() {
   return s_flags.get();
 }
+
+void Global::initGlobalObject(ContextWrap* lwContext) {
+#if defined(HOST_TIZEN)
+// @todo setup device APIs
+#endif
+  auto context = lwContext->get();
+
+  auto globalObjectData = new GlobalObjectData();
+  globalObjectData->setInternalFieldCount(
+      GlobalObjectData::kInternalFieldCount);
+  globalObjectData->setInternalField(GlobalObjectData::kContextWrapSlot,
+                                     lwContext);
+  ObjectRefHelper::setExtraData(context->globalObject(), globalObjectData);
+
+  initErrorObject(context);
+  initEvalObject(context);
+}
+
+void Global::initErrorObject(ContextRef* context) {
+  Evaluator::EvaluatorResult r =
+      Evaluator::execute(context, [](ExecutionStateRef* state) -> ValueRef* {
+        auto errorObject = state->context()
+                               ->globalObject()
+                               ->get(state, StringRef::createFromASCII("Error"))
+                               ->asObject();
+
+        errorObject->set(state,
+                         StringRef::createFromASCII("captureStackTrace"),
+                         StackTrace::createCaptureStackTrace(state));
+
+        // TODO: get number from '--stack-trace-limit' options
+        errorObject->set(state,
+                         StringRef::createFromASCII("stackTraceLimit"),
+                         ValueRef::create(20));
+
+        return ValueRef::createUndefined();
+      });
+
+  LWNODE_CHECK(r.isSuccessful());
+}
+
+static ValueRef* throwExceptionWhenEvalCalled(ExecutionStateRef* state,
+                                              ValueRef* thisValue,
+                                              size_t argc,
+                                              ValueRef** argv,
+                                              bool isConstructCall) {
+  state->throwException(ExceptionHelper::createErrorObject(
+      state->context(), ErrorMessageType::kDisallowCodeGeneration));
+  return ValueRef::createUndefined();
+}
+
+void Global::initEvalObject(ContextRef* context) {
+  // @note --disallow-code-generation-from-strings as default
+  if (flags()->isOn(Flag::Type::AllowCodeGenerationFromString)) {
+    return;
+  }
+
+  ObjectRefHelper::addNativeFunction(context,
+                                     context->globalObject(),
+                                     StringRef::createFromASCII("eval"),
+                                     throwExceptionWhenEvalCalled);
+}
+
 }  // namespace EscargotShim
index 5ddf1a0735afe4dfdd705e9d743d2eecad527650..c174e33932f0f5d0f395e1ba5f9049758edc4e9c 100644 (file)
 
 #include <memory>
 
+#include "EscargotPublic.h"
+
 #include "utils/logger/flags.h"
 
 namespace EscargotShim {
 class Flags;
+class ContextWrap;
 
 class Global {
  public:
@@ -29,8 +32,13 @@ class Global {
 
   static Flags* flags();
 
+  static void initGlobalObject(ContextWrap* context);
+
  private:
   static std::unique_ptr<Flags> s_flags;
+
+  static void initErrorObject(Escargot::ContextRef* context);
+  static void initEvalObject(Escargot::ContextRef* context);
 };
 
 }  // namespace EscargotShim
index 237c4f9993092433d25516fea2b1a27a9a7dd186..3ea60f085d7edc931f6c687e7d402c567f78f2d1 100644 (file)
@@ -36,7 +36,7 @@ uint8_t HandleWrap::valueType() const {
   return valueType_;
 }
 
-uint8_t HandleWrap::location() const {
+GlobalHandle::Location* HandleWrap::location() const {
   return location_;
 }
 
@@ -45,17 +45,17 @@ bool HandleWrap::isValid() const {
 }
 
 bool HandleWrap::isStrongOrWeak() const {
-  return (location_ == Strong || location_ == Weak || location_ == NearDeath);
+  return location_->isStrongOrWeak();
 }
 
-void HandleWrap::copy(HandleWrap* that, Location location) {
+void HandleWrap::copy(HandleWrap* that, GlobalHandle::Location* location) {
   val_ = that->val_;
   type_ = that->type_;
   valueType_ = that->valueType_;
   location_ = location;
 }
 
-HandleWrap* HandleWrap::clone(Location location) {
+HandleWrap* HandleWrap::clone(GlobalHandle::Location* location) {
   auto handle = new HandleWrap();
   handle->val_ = val_;
   handle->type_ = type_;
@@ -76,8 +76,8 @@ HandleWrap* HandleWrap::as(void* address) {
 std::string HandleWrap::getHandleInfoString() const {
   std::stringstream ss;
   ss << "(addr: " << this << " es: " << val_;
-  if (location_ != Location::Local) {
-    ss << " loc: " << std::to_string(location_);
+  if (!location_->isLocal()) {
+    ss << " loc: " << location_->toString();
   }
   ss << " type: " << std::to_string(type_) << ")";
   return ss.str();
@@ -220,7 +220,7 @@ inline static void makeStrongToWeak(void* address) {
 
 PersistentWrap::PersistentWrap(ValueWrap* lwValue) {
   // copy the given value information and set it as Strong
-  copy(lwValue, Location::Strong);
+  copy(lwValue, GlobalHandle::State::strong());
 
   holder_ = lwValue;
 
@@ -255,7 +255,7 @@ void PersistentWrap::DisposeGlobal(void* address) {
   PersistentWrap* persistent = reinterpret_cast<PersistentWrap*>(address);
   LWNODE_CALL_TRACE_ID(GCHEAP, "%s", persistent->getPersistentInfoString());
 
-  LWNODE_DCHECK(persistent->location_ != Local);
+  LWNODE_DCHECK(!persistent->location_->isLocal());
 
   persistent->dispose();
 
@@ -271,13 +271,7 @@ void PersistentWrap::dispose() {
     return;
   }
 
-  if (location_ == Location::Strong) {
-    releaseStrong(getTracingAddress());
-  } else if (location_ == Location::Weak) {
-    releaseWeak(getTracingAddress());
-  } else {
-    LWNODE_CHECK_NOT_REACH_HERE();
-  }
+  location_->dispose(this);
 }
 
 void PersistentWrap::MakeWeak(
@@ -286,28 +280,15 @@ void PersistentWrap::MakeWeak(
     v8::WeakCallbackInfo<void>::Callback weak_callback) {
   LWNODE_CALL_TRACE_ID(GCHEAP);
   PersistentWrap* persitent = reinterpret_cast<PersistentWrap*>(address);
-  LWNODE_CHECK(persitent->location() != Location::Local);
-  persitent->makeWeak(parameter, weak_callback);
+  LWNODE_CHECK(!persitent->location()->isLocal());
+  persitent->location()->makeWeak(persitent, parameter, weak_callback);
 
   GCHeap()->printStatus(true);
 }
 
 void PersistentWrap::makeWeak(
     void* parameter, v8::WeakCallbackInfo<void>::Callback weak_callback) {
-  if (location_ == Location::Strong) {
-    // Strong -> Weak
-    makeStrongToWeak(getTracingAddress());
-    location_ = Location::Weak;
-    parameter_ = parameter;
-    weak_callback_ = weak_callback;
-
-  } else if (location_ == Location::Weak) {
-    LWNODE_CHECK(weak_callback_ == weak_callback);
-    LWNODE_CHECK(parameter_ == parameter);
-
-  } else {
-    LWNODE_CHECK_NOT_REACH_HERE();
-  }
+  location_->makeWeak(this, parameter, weak_callback);
 
   LWNODE_CHECK(GCHeap()->isTraced(this));
 }
@@ -330,27 +311,15 @@ void PersistentWrap::invokeFinalizer() {
 void* PersistentWrap::ClearWeak(void* address) {
   LWNODE_CALL_TRACE_ID(GCHEAP);
   PersistentWrap* persitent = reinterpret_cast<PersistentWrap*>(address);
-  LWNODE_CHECK(persitent->location() != Location::Local);
+  LWNODE_CHECK(!persitent->location()->isLocal());
+
   void* p = persitent->clearWeak();
   GCHeap()->printStatus(true);
   return p;
 }
 
 void* PersistentWrap::clearWeak() {
-  if (location_ == Location::Strong) {
-    // Nothing to do
-    LWNODE_CHECK_NULL(weak_callback_);
-    LWNODE_CHECK_NULL(parameter_);
-
-  } else if (location_ == Location::Weak) {
-    // Weak -> Strong
-    acquireStrong(getTracingAddress(), nullptr);
-    releaseWeak(getTracingAddress());
-    location_ = Location::Strong;
-
-  } else {
-    LWNODE_CHECK_NOT_REACH_HERE();
-  }
+  location_->clearWeak(this);
 
   void* p = parameter_;
   parameter_ = nullptr;
@@ -372,4 +341,106 @@ std::string PersistentWrap::getPersistentInfoString() {
   return ss.str();
 }
 
+namespace GlobalHandle {
+
+Local State::s_local;
+Strong State::s_strong;
+Weak State::s_weak;
+NearDeath State::s_nearDeath;
+
+// Local Location
+v8::internal::Address* Local::create(IsolateWrap* lwIsolate,
+                                     HandleWrap* handle) {
+  lwIsolate->addHandleToCurrentScope(handle);
+  return reinterpret_cast<i::Address*>(handle);
+}
+
+void Local::makeWeak(PersistentWrap* persistentWrap,
+                     void* parameter,
+                     v8::WeakCallbackInfo<void>::Callback weak_callback) {
+  LWNODE_CHECK(persistentWrap->weak_callback() == weak_callback);
+  LWNODE_CHECK(persistentWrap->parameter() == parameter);
+}
+
+void Local::clearWeak(PersistentWrap* persistentWrap) {
+  LWNODE_CHECK_NOT_REACH_HERE();
+}
+
+void Local::dispose(PersistentWrap* persistentWrap) {
+  LWNODE_CHECK_NOT_REACH_HERE();
+}
+
+// Strong Location
+v8::internal::Address* Strong::create(IsolateWrap* lwIsolate,
+                                      HandleWrap* handle) {
+  auto cloned = handle->clone(GlobalHandle::State::local());
+  lwIsolate->addHandleToCurrentScope(cloned);
+  return reinterpret_cast<i::Address*>(cloned);
+}
+
+void Strong::makeWeak(PersistentWrap* persistentWrap,
+                      void* parameter,
+                      v8::WeakCallbackInfo<void>::Callback weak_callback) {
+  // Strong -> Weak
+  makeStrongToWeak(persistentWrap->getTracingAddress());
+  persistentWrap->setLocation(State::weak());
+  persistentWrap->setParameter(parameter);
+  persistentWrap->setWeakCallback(weak_callback);
+}
+
+void Strong::clearWeak(PersistentWrap* persistentWrap) {
+  // Nothing to do
+  LWNODE_CHECK_NULL(persistentWrap->weak_callback());
+  LWNODE_CHECK_NULL(persistentWrap->parameter());
+}
+
+void Strong::dispose(PersistentWrap* persistentWrap) {
+  releaseStrong(persistentWrap->getTracingAddress());
+}
+
+// Weak Location
+v8::internal::Address* Weak::create(IsolateWrap* lwIsolate,
+                                    HandleWrap* handle) {
+  auto cloned = handle->clone(State::local());
+  lwIsolate->addHandleToCurrentScope(cloned);
+  return reinterpret_cast<i::Address*>(cloned);
+}
+
+void Weak::makeWeak(PersistentWrap* persistentWrap,
+                    void* parameter,
+                    v8::WeakCallbackInfo<void>::Callback weak_callback) {
+  // Nothing to do
+}
+
+void Weak::clearWeak(PersistentWrap* persistentWrap) {
+  // Weak -> Strong
+  acquireStrong(persistentWrap->getTracingAddress(), nullptr);
+  releaseWeak(persistentWrap->getTracingAddress());
+  persistentWrap->setLocation(State::strong());
+}
+
+void Weak::dispose(PersistentWrap* persistentWrap) {
+  releaseWeak(persistentWrap->getTracingAddress());
+}
+
+v8::internal::Address* NearDeath::create(IsolateWrap* lwIsolate,
+                                         HandleWrap* handle) {
+  return nullptr;
+}
+
+void NearDeath::makeWeak(PersistentWrap* persistentWrap,
+                         void* parameter,
+                         v8::WeakCallbackInfo<void>::Callback weak_callback) {
+  // Nothing to do
+}
+
+void NearDeath::clearWeak(PersistentWrap* persistentWrap) {
+  // Nothing to do
+}
+
+void NearDeath::dispose(PersistentWrap* persistentWrap) {
+  // Nothing to do
+}
+
+}  // namespace GlobalHandle
 }  // namespace EscargotShim
index 060d3525c91ddda59c65b2f60f6f75a433aa9035..3fca3f582115e0158303eaff380f008da97a0496 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <EscargotPublic.h>
 #include <v8.h>
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 
 namespace EscargotShim {
 
@@ -27,6 +27,89 @@ class IsolateWrap;
 class ModuleWrap;
 class ExternalStringWrap;
 class GCHeap;
+class PersistentWrap;
+
+namespace GlobalHandle {
+class Location {
+ public:
+  virtual v8::internal::Address* create(IsolateWrap* lwIsolate,
+                                        HandleWrap* handle) = 0;
+  virtual void makeWeak(PersistentWrap* persistentWrap,
+                        void* parameter,
+                        v8::WeakCallbackInfo<void>::Callback weak_callback) = 0;
+  virtual void clearWeak(PersistentWrap* persistentWrap) = 0;
+  virtual void dispose(PersistentWrap* persistentWrap) = 0;
+  virtual std::string toString() const = 0;
+
+  virtual bool isLocal() const { return false; }
+  virtual bool isStrongOrWeak() const { return false; }
+};
+
+class Local : public Location {
+ public:
+  v8::internal::Address* create(IsolateWrap* lwIsolate,
+                                HandleWrap* handle) override;
+  void makeWeak(PersistentWrap* persistentWrap,
+                void* parameter,
+                v8::WeakCallbackInfo<void>::Callback weak_callback) override;
+  void clearWeak(PersistentWrap* persistentWrap) override;
+  void dispose(PersistentWrap* persistentWrap) override;
+  std::string toString() const override { return "local"; }
+  bool isLocal() const override { return true; }
+};
+
+class Strong : public Location {
+ public:
+  v8::internal::Address* create(IsolateWrap* lwIsolate,
+                                HandleWrap* handle) override;
+  void makeWeak(PersistentWrap* persistentWrap,
+                void* parameter,
+                v8::WeakCallbackInfo<void>::Callback weak_callback) override;
+  void clearWeak(PersistentWrap* persistentWrap) override;
+  void dispose(PersistentWrap* persistentWrap) override;
+  std::string toString() const override { return "strong"; }
+  bool isStrongOrWeak() const override { return true; }
+};
+
+class Weak : public Location {
+ public:
+  v8::internal::Address* create(IsolateWrap* lwIsolate,
+                                HandleWrap* handle) override;
+  void makeWeak(PersistentWrap* persistentWrap,
+                void* parameter,
+                v8::WeakCallbackInfo<void>::Callback weak_callback) override;
+  void clearWeak(PersistentWrap* persistentWrap) override;
+  void dispose(PersistentWrap* persistentWrap) override;
+  std::string toString() const override { return "weak"; }
+  bool isStrongOrWeak() const override { return true; }
+};
+
+class NearDeath : public Location {
+ public:
+  v8::internal::Address* create(IsolateWrap* lwIsolate,
+                                HandleWrap* handle) override;
+  void makeWeak(PersistentWrap* persistentWrap,
+                void* parameter,
+                v8::WeakCallbackInfo<void>::Callback weak_callback) override;
+  void clearWeak(PersistentWrap* persistentWrap) override;
+  void dispose(PersistentWrap* persistentWrap) override;
+  std::string toString() const override { return "nearDeath"; }
+};
+
+class State {
+ public:
+  static Local* local() { return &s_local; };
+  static Strong* strong() { return &s_strong; };
+  static Weak* weak() { return &s_weak; };
+  static NearDeath* nearDeath() { return &s_nearDeath; };
+
+ private:
+  static Local s_local;
+  static Strong s_strong;
+  static Weak s_weak;
+  static NearDeath s_nearDeath;
+};
+}  // namespace GlobalHandle
 
 class HandleWrap : public gc {
  public:
@@ -41,13 +124,6 @@ class HandleWrap : public gc {
     EndOfType,
   };
 
-  enum Location : uint8_t {
-    Local = 0,
-    Strong,
-    Weak,
-    NearDeath,
-  };
-
   enum ValueType : uint8_t {
     None,
     ExternalString,
@@ -57,19 +133,22 @@ class HandleWrap : public gc {
   uint8_t valueType() const;
   bool isValid() const;
   bool isStrongOrWeak() const;
-  uint8_t location() const;
-  HandleWrap* clone(Location location = Local);
+  GlobalHandle::Location* location() const;
+  void setLocation(GlobalHandle::Location* location) { location_ = location; }
+
+  HandleWrap* clone(
+      GlobalHandle::Location* location = GlobalHandle::State::local());
   std::string getHandleInfoString() const;
   static HandleWrap* as(void* address);
 
  protected:
   HandleWrap() = default;
-  void copy(HandleWrap* that, Location location);
+  void copy(HandleWrap* that, GlobalHandle::Location* location);
 
   void* val_ = nullptr;
   uint8_t type_ = Type::NotPresent;
-  uint8_t valueType_ = ValueType::None;  // TODO: remove this variable
-  uint8_t location_ = Location::Local;
+  uint8_t valueType_ = ValueType::None;
+  GlobalHandle::Location* location_ = GlobalHandle::State::local();
 };
 
 class ValueWrap : public HandleWrap {
@@ -129,6 +208,17 @@ class PersistentWrap : public ValueWrap {
   static PersistentWrap* as(void* address);
   std::string getPersistentInfoString();
   void invokeFinalizer();
+  void* getTracingAddress();
+
+  void* parameter() { return parameter_; }
+  void setParameter(void* parameter) { parameter_ = parameter; }
+
+  v8::WeakCallbackInfo<void>::Callback weak_callback() {
+    return weak_callback_;
+  }
+  void setWeakCallback(v8::WeakCallbackInfo<void>::Callback weak_callback) {
+    weak_callback_ = weak_callback;
+  }
 
  private:
   PersistentWrap(ValueWrap* ptr);
@@ -137,7 +227,6 @@ class PersistentWrap : public ValueWrap {
   void makeWeak(void* parameter,
                 v8::WeakCallbackInfo<void>::Callback weak_callback);
   void* clearWeak();
-  void* getTracingAddress();
 
   ValueWrap* holder_{nullptr};
   v8::Isolate* v8Isolate_{nullptr};
index dcfea2f3e736527db5c081dfeb6abce36b02d790..9e362ded2c71162a7eeb6b4ebc9f60a3017f750c 100644 (file)
@@ -38,6 +38,9 @@ HandleScopeWrap::HandleScopeWrap(v8::EscapableHandleScope* scope,
                                  HandleScopeWrap::Type type)
     : type_(type), v8scope_(reinterpret_cast<void*>(scope)) {}
 
+HandleScopeWrap::HandleScopeWrap(HandleScopeWrap::Type type)
+    : type_(type), v8scope_(nullptr) {}
+
 void HandleScopeWrap::add(HandleWrap* value) {
   LWNODE_CALL_TRACE_ID(HDLSCOPE,
                        "%s --> %p (lw: %p)",
@@ -85,4 +88,15 @@ void HandleScopeWrap::clear() {
   handles_.clear();
 }
 
+HandleScopeWrapGuard::HandleScopeWrapGuard(IsolateWrap* isolate)
+    : isolate_(isolate) {
+  LWNODE_CHECK_NOT_NULL(isolate_);
+  isolate_->pushHandleScope(
+      new HandleScopeWrap(HandleScopeWrap::Type::Internal));
+}
+
+HandleScopeWrapGuard::~HandleScopeWrapGuard() {
+  isolate_->popHandleScope(nullptr);
+}
+
 }  // namespace EscargotShim
index 7006c0f9bcf82851cabdf03269461313cc2b817b..7736e48c1516cdbc2b4f5eb0feca7ba853e15894 100644 (file)
 #pragma once
 
 #include <v8.h>
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 
 namespace EscargotShim {
 
 class IsolateWrap;
 class HandleWrap;
+class HandleScopeWrapGuard;
 
 typedef void v8Scope_t;
 
@@ -33,6 +34,7 @@ class HandleScopeWrap : public gc {
     Normal,
     Escapable,
     Sealed,
+    Internal,
   };
 
   HandleScopeWrap(v8::HandleScope* scope, HandleScopeWrap::Type type);
@@ -42,15 +44,31 @@ class HandleScopeWrap : public gc {
   v8Scope_t* v8Scope() const { return v8scope_; }
 
  private:
+  HandleScopeWrap(HandleScopeWrap::Type type);
   void add(HandleWrap* value);
   bool remove(HandleWrap* value);
   void clear();
 
-  Type type_ = None;
-  v8Scope_t* v8scope_ = nullptr;
+  Type type_{None};
+  v8Scope_t* v8scope_{nullptr};
   GCVector<HandleWrap*> handles_;
 
   friend class IsolateWrap;
+  friend class HandleScopeWrapGuard;
+};
+
+class HandleScopeWrapGuard : public gc {
+ public:
+  HandleScopeWrapGuard(IsolateWrap* isolate);
+  ~HandleScopeWrapGuard();
+
+  void* operator new(size_t size) = delete;
+  void* operator new[](size_t size) = delete;
+  void operator delete(void*, size_t) = delete;
+  void operator delete[](void*, size_t) = delete;
+
+ private:
+  IsolateWrap* isolate_{nullptr};
 };
 
 }  // namespace EscargotShim
index d28d675b2af0e79b5a4948ebb0796370eacee232..6359d6f255c8f952e35b10f54380821ee3c35a86 100755 (executable)
@@ -20,7 +20,7 @@
 #include "context.h"
 #include "es-helper.h"
 #include "extra-data.h"
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 #include "utils/misc.h"
 
 namespace v8 {
@@ -218,7 +218,7 @@ void Isolate::RestorePendingMessageFromTryCatch(v8::TryCatch* handler) {
   set_pending_exception(VAL(*handler->Exception())->value());
 }
 
-void Isolate::handleException(EscargotShim::EvalResult& evalResult) {
+void Isolate::handleException(EscargotShim::EvalResult&& evalResult) {
   LWNODE_DCHECK(!evalResult.isSuccessful());
 
   auto exception = evalResult.error.get();
@@ -268,15 +268,9 @@ void Isolate::ReportPromiseReject(
   PromiseRejectMessage v8Message(v8::Utils::ToLocal<Promise>(promise),
                                  static_cast<v8::PromiseRejectEvent>(event),
                                  v8::Utils::ToLocal<Value>(value));
-#ifdef LWNODE_ENABLE_EXPERIMENTAL_PROMISE
-  if (promise_reject_callback_ && !promise->hasRejectHandlers() &&
-      event == Escargot::VMInstanceRef::PromiseRejectEvent::
-                   PromiseRejectWithNoHandler) {
+  if (promise_reject_callback_ && !promise->hasRejectHandlers()) {
     promise_reject_callback_(v8Message);
   }
-#else
-  LWNODE_UNIMPLEMENT;
-#endif
 }
 
 ValueRef* Isolate::RunPrepareStackTraceCallback(ExecutionStateRef* state,
@@ -302,7 +296,7 @@ ValueRef* Isolate::RunPrepareStackTraceCallback(ExecutionStateRef* state,
     }
   }
 
-  return nullptr;
+  return ValueRef::createUndefined();
 }
 
 bool Isolate::hasCallDepth() {
@@ -355,6 +349,9 @@ IsolateWrap::IsolateWrap() {
         break;
     }
   });
+
+  RegisterExtension(std::make_unique<ExternalizeStringExtension>());
+  RegisterExtension(std::make_unique<ExternalizeGcExtension>());
 }
 
 IsolateWrap::~IsolateWrap() {
@@ -373,6 +370,7 @@ void IsolateWrap::Dispose() {
   // unlock_gc_release();
 
   global_handles()->dispose();
+  RegisteredExtension::unregisterAll();
 
   LWNODE_CALL_TRACE_GC_END();
 }
index 0a2ba9c6d74c404413da6eda4565829658bdcecf..903cfed82b4cf32e4523f0759838e5a7eb1f0ba0 100755 (executable)
@@ -23,7 +23,7 @@
 #include "global-handles.h"
 #include "handlescope.h"
 #include "utils/compiler.h"
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 
 namespace v8 {
 namespace internal {
@@ -56,7 +56,7 @@ class Isolate : public gc {
   virtual bool PropagatePendingExceptionToExternalTryCatch();
   virtual void ReportPendingMessages(bool isVerbose = false);
 
-  void handleException(EscargotShim::EvalResult& evalResult);
+  void handleException(EscargotShim::EvalResult&& evalResult);
 
   void RunPromiseHook(PromiseHookType type,
                       Escargot::PromiseObjectRef* promise,
@@ -85,6 +85,14 @@ class Isolate : public gc {
     return prepare_stack_trace_callback_;
   }
 
+  bool prepareStackTraceRecursion() const {
+    return prepareStackTraceRecursion_;
+  }
+
+  void setPrepareStackTraceRecursion(bool recursion) {
+    prepareStackTraceRecursion_ = recursion;
+  }
+
   virtual ValueRef* RunPrepareStackTraceCallback(
       ExecutionStateRef* state,
       EscargotShim::ContextWrap* lwContext,
@@ -143,6 +151,7 @@ class Isolate : public gc {
   Escargot::ValueRef* pending_exception_{nullptr};
   Escargot::ValueRef* pending_message_obj_{nullptr};
   size_t callDepth_ = 0;
+  bool prepareStackTraceRecursion_{false};
 };
 }  // namespace internal
 }  // namespace v8
index 3c5bb86d4b6dc5413ebfa75108f69e1e88f74fe5..4333a1a6facf22e9b535792060ffc125188670e1 100644 (file)
@@ -25,16 +25,34 @@ using namespace v8;
 
 namespace EscargotShim {
 
-size_t StackTrace::getStackTraceLimit(ExecutionStateRef* state) {
+class PrepareStackTraceScope {
+ public:
+  explicit PrepareStackTraceScope(IsolateWrap* isolate) : isolate_(isolate) {
+    LWNODE_DCHECK(!isolate_->prepareStackTraceRecursion());
+    isolate_->setPrepareStackTraceRecursion(true);
+  }
+
+  ~PrepareStackTraceScope() { isolate_->setPrepareStackTraceRecursion(false); }
+
+ private:
+  IsolateWrap* isolate_;
+};
+
+bool StackTrace::getStackTraceLimit(ExecutionStateRef* state,
+                                    double& stackTraceLimit) {
   auto errorObject = state->context()->globalObject()->get(
       state, StringRef::createFromASCII("Error"));
   LWNODE_CHECK(errorObject->isObject());
 
   auto stackTraceLimitValue = errorObject->asObject()->get(
       state, StringRef::createFromASCII("stackTraceLimit"));
-  LWNODE_CHECK(stackTraceLimitValue->isNumber());
 
-  return stackTraceLimitValue->asNumber();
+  if (!stackTraceLimitValue->isNumber()) {
+    return false;
+  }
+
+  stackTraceLimit = stackTraceLimitValue->asNumber();
+  return true;
 }
 
 ValueRef* StackTrace::StackTraceGetter(
@@ -42,22 +60,38 @@ ValueRef* StackTrace::StackTraceGetter(
     ObjectRef* self,
     ValueRef* receiver,
     ObjectRef::NativeDataAccessorPropertyData* data) {
+  auto accessorData = reinterpret_cast<NativeAccessorProperty*>(data);
+  if (accessorData->hasStackValue()) {
+    return accessorData->stackValue();
+  }
+
   auto lwIsolate = IsolateWrap::GetCurrent();
   auto lwContext = lwIsolate->GetCurrentContext();
-  auto accessorData = reinterpret_cast<NativeAccessorProperty*>(data);
 
-  if (lwIsolate->HasPrepareStackTraceCallback()) {
-    auto sites =
-        ArrayObjectRef::create(state, accessorData->stackTraceVector());
+  if (!accessorData->stackTrace()) {
+    auto undefined = ValueRef::createUndefined();
+    accessorData->setStackValue(undefined);
+    return undefined;
+  }
 
-    auto formattedStackTrace =
-        lwIsolate->RunPrepareStackTraceCallback(state, lwContext, self, sites);
-    if (formattedStackTrace) {
+  if (!lwIsolate->prepareStackTraceRecursion() &&
+      lwIsolate->HasPrepareStackTraceCallback()) {
+    // Avoid calling this function multiple times with 'error.stack' in
+    // 'PrepareStackTraceCallback'.
+    PrepareStackTraceScope scope(lwIsolate);
+    auto formattedStackTrace = lwIsolate->RunPrepareStackTraceCallback(
+        state, lwContext, self, accessorData->stackTrace());
+    if (!formattedStackTrace->isUndefined()) {
+      accessorData->setStackValue(formattedStackTrace);
       return formattedStackTrace;
     }
   }
 
-  return ValueRef::createUndefined();
+  StackTrace stackTrace(state, self);
+  auto stackTraceString =
+      stackTrace.formatStackTraceStringNodeStyle(accessorData->stackTrace());
+  accessorData->setStackValue(stackTraceString);
+  return stackTraceString;
 }
 
 bool StackTrace::StackTraceSetter(
@@ -66,7 +100,15 @@ bool StackTrace::StackTraceSetter(
     ValueRef* receiver,
     ObjectRef::NativeDataAccessorPropertyData* data,
     ValueRef* setterInputData) {
-  LWNODE_RETURN_FALSE;
+  auto accessorData = reinterpret_cast<NativeAccessorProperty*>(data);
+  accessorData->setStackValue(setterInputData);
+  return true;
+}
+
+bool StackTrace::checkFilter(ValueRef* filter,
+                             const Evaluator::StackTraceData& traceData) {
+  return (filter && traceData.callee.hasValue() &&
+          filter == traceData.callee.get());
 }
 
 ValueRef* StackTrace::captureStackTraceCallback(ExecutionStateRef* state,
@@ -79,56 +121,58 @@ ValueRef* StackTrace::captureStackTraceCallback(ExecutionStateRef* state,
   }
 
   auto exceptionObject = argv[0]->asObject();
+  auto stackString = StringRef::createFromUTF8("stack");
+  if (exceptionObject->hasOwnProperty(state, stackString)) {
+    exceptionObject->deleteOwnProperty(state, stackString);
+  }
+
   auto callSite = IsolateWrap::GetCurrent()->GetCurrentContext()->callSite();
-  auto stackTrace = state->computeStackTrace();
+  auto stackTraceData = state->computeStackTrace();
   auto stackTraceVector = ValueVectorRef::create();
 
-  std::string filterFunctionName;
+  ValueRef* filterFunction = nullptr;
   if (argc > 1 && argv[1]->isFunctionObject()) {
-    auto name = argv[1]->asFunctionObject()->get(
-        state, StringRef::createFromASCII("name"));
-    if (name->isString()) {
-      filterFunctionName = name->asString()->toStdUTF8String();
-    }
+    filterFunction = argv[1];
   }
 
-  // TODO: handle `constructorOpt` option :
-  // compare the address of constructorOpt function not name.
   int stacktraceStartIdx = 1;
-  size_t stackTraceLimit = getStackTraceLimit(state) + stacktraceStartIdx;
-
-  for (size_t i = stacktraceStartIdx;
-       i < stackTraceLimit && i < stackTrace.size();
-       i++) {
-    if (!filterFunctionName.empty() &&
-        filterFunctionName == stackTrace[i].functionName->toStdUTF8String()) {
-      break;
-    }
 
-    stackTraceVector->pushBack(
-        callSite->instantiate(state->context(), stackTrace[i]));
+  double stackTraceLimit = 0;
+  if (!getStackTraceLimit(state, stackTraceLimit)) {
+    stackTraceVector = nullptr;
+  } else {
+    size_t maxPrintStackSize =
+        std::min(stackTraceLimit, (double)stackTraceData.size());
+    for (size_t i = 0; i < maxPrintStackSize; i++) {
+      if (StackTrace::checkFilter(filterFunction, stackTraceData[i])) {
+        if (stackTraceVector->size() > 0) {
+          stackTraceVector->erase(0, stackTraceVector->size());
+        }
+        filterFunction = nullptr;
+
+        continue;
+      }
+
+      stackTraceVector->pushBack(
+          callSite->instantiate(state->context(), stackTraceData[i]));
+    }
   }
 
   // FIXME: it seems there are some cases where we need to freeze the
   // stack string here. Investigate further
-  addStackProperty(state, exceptionObject, stackTraceVector);
+  StackTrace stackTrace(state, exceptionObject);
+  stackTrace.addStackProperty(ArrayObjectRef::create(state, stackTraceVector));
 
   return ValueRef::createUndefined();
 }
 
-void StackTrace::addStackProperty(ExecutionStateRef* state,
-                                  ObjectRef* object,
-                                  ValueVectorRef* stackTraceVector) {
+void StackTrace::addStackProperty(ArrayObjectRef* stackTrace) {
   // NOTE: either Error or Exception contains stack.
-  object->defineNativeDataAccessorProperty(
-      state,
+  error_->defineNativeDataAccessorProperty(
+      state_,
       StringRef::createFromUTF8("stack"),
-      new NativeAccessorProperty(false,
-                                 false,
-                                 false,
-                                 StackTraceGetter,
-                                 StackTraceSetter,
-                                 stackTraceVector));
+      new NativeAccessorProperty(
+          true, false, true, StackTraceGetter, StackTraceSetter, stackTrace));
 }
 
 ValueRef* StackTrace::createCaptureStackTrace(
@@ -165,21 +209,29 @@ ValueRef* StackTrace::prepareStackTraceCallback(ExecutionStateRef* state,
   return StringRef::emptyString();
 }
 
-StringRef* StackTrace::formatStackTraceStringNodeStyle(ObjectRef* errorObject,
-                                                       size_t maxStackSize) {
+StringRef* StackTrace::formatStackTraceStringNodeStyle(
+    ArrayObjectRef* stackTrace) {
   std::ostringstream oss;
-  auto message = errorObject->toString(state_)->toStdUTF8String();
+  auto message = error_->toString(state_)->toStdUTF8String();
   if (message.length() > 0) {
-    oss << message << "\n";
+    oss << message;
   }
 
-  auto traceData = state_->computeStackTrace();
-  size_t maxPrintStackSize = std::min((int)maxStackSize, (int)traceData.size());
+  auto esContext = state_->context();
+  size_t maxPrintStackSize =
+      ArrayObjectRefHelper::length(esContext, stackTrace);
+
+  if (maxPrintStackSize > 0) {
+    oss << std::endl;
+  }
 
   const std::string separator = "    ";
+
   for (size_t i = 0; i < maxPrintStackSize; ++i) {
-    oss << separator << "at " << formatStackTraceLine(traceData[i])
-        << std::endl;
+    auto callSiteString = ArrayObjectRefHelper::get(esContext, stackTrace, i)
+                              ->toString(state_)
+                              ->toStdUTF8String();
+    oss << separator << "at " << callSiteString << std::endl;
   }
 
   auto stringNodeStyle = oss.str();
@@ -191,27 +243,40 @@ std::string StackTrace::formatStackTraceLine(
     const Evaluator::StackTraceData& line) {
   std::ostringstream oss;
 
-  const auto& iter = line;
-  const auto& resourceName = iter.srcName->toStdUTF8String();
-  const auto& functionName = iter.functionName->toStdUTF8String();
-  const int errorLine = iter.loc.line;
-  const int errorColumn = iter.loc.column;
+  auto stdFunctionName = line.functionName->toStdUTF8String();
+  // TODO: 'anonymous' is not unique. 'stdFunctionName' should be unique.
+  // 'anonymous' keyword is related to ScriptCompiler::CompileFunctionInContext.
+  if (stdFunctionName == "anonymous") {
+    stdFunctionName = "";
+  }
 
-  oss << (functionName == "" ? "Object.<anonymous>" : functionName) << " "
-      << "(" << (resourceName == "" ? "?" : resourceName) << ":" << errorLine
-      << ":" << errorColumn << ")";
+  if (stdFunctionName.empty()) {
+    oss << line.srcName->toStdUTF8String() << ":" << line.loc.line << ":"
+        << line.loc.column;
+  } else {
+    oss << stdFunctionName << " (" << line.srcName->toStdUTF8String() << ":"
+        << line.loc.line << ":" << line.loc.column << ")";
+  }
 
   return oss.str();
 }
 
-ArrayObjectRef* StackTrace::genCallSites() {
-  auto stackTrace = state_->computeStackTrace();
-  auto stackTraceVector = ValueVectorRef::create();
+ArrayObjectRef* StackTrace::genCallSites(
+    const GCManagedVector<Evaluator::StackTraceData>& stackTraceData) {
   auto callSite = IsolateWrap::GetCurrent()->GetCurrentContext()->callSite();
 
-  for (size_t i = 0; i < stackTrace.size(); i++) {
+  double stackTraceLimit = 0;
+  if (!getStackTraceLimit(state_, stackTraceLimit)) {
+    return nullptr;
+  }
+
+  auto stackTraceVector = ValueVectorRef::create();
+  size_t maxPrintStackSize =
+      std::min(stackTraceLimit, (double)stackTraceData.size());
+
+  for (size_t i = 0; i < maxPrintStackSize; i++) {
     stackTraceVector->pushBack(
-        callSite->instantiate(state_->context(), stackTrace[i]));
+        callSite->instantiate(state_->context(), stackTraceData[i]));
   }
 
   return ArrayObjectRef::create(state_, stackTraceVector);
@@ -240,6 +305,13 @@ ValueRef* CallSite::instantiate(ContextRef* context,
   return callSite;
 };
 
+ValueRef* CallSite::instantiate(ContextRef* context,
+                                EscargotShim::StackTraceData* data) {
+  auto callSite = template_->instanceTemplate()->instantiate(context);
+  ExtraDataHelper::setExtraData(callSite, data);
+  return callSite;
+};
+
 void CallSite::injectSitePrototype() {
   setCallSitePrototype(
       "getFunctionName",
@@ -310,11 +382,8 @@ void CallSite::injectSitePrototype() {
          bool isNewExpression) -> ValueRef* {
         auto data = ObjectRefHelper::getExtraData(thisValue->asObject())
                         ->asStackTraceData();
-        std::ostringstream stream;
-        stream << data->functionName()->toStdUTF8String() << " ("
-               << data->src()->toStdUTF8String() << ":" << data->loc().line
-               << ":" << data->loc().column << ")";
-        auto string = stream.str();
+        auto string = StackTrace::formatStackTraceLine(data->stackTraceData());
+
         return StringRef::createFromUTF8(string.data(), string.length());
       });
 
index a26da904705c9ba3e67d9c8137b71320f97ef4e6..022de8cbdb1212adc432d7a35bfb4b377fe736e2 100644 (file)
@@ -23,6 +23,8 @@ using namespace Escargot;
 
 namespace EscargotShim {
 
+class StackTraceData;
+
 class StackTrace {
  public:
   class NativeAccessorProperty
@@ -33,20 +35,30 @@ class StackTrace {
                            bool isConfigurable,
                            ObjectRef::NativeDataAccessorPropertyGetter getter,
                            ObjectRef::NativeDataAccessorPropertySetter setter,
-                           ValueVectorRef* stackTraceVector)
+                           ArrayObjectRef* stackTrace)
         : NativeDataAccessorPropertyData(
               isWritable, isEnumerable, isConfigurable, getter, setter),
-          stackTraceVector_(stackTraceVector) {}
+          stackTrace_(stackTrace) {}
+
+    ArrayObjectRef* stackTrace() { return stackTrace_; }
+    void setStackTrace(ArrayObjectRef* stackTrace) { stackTrace_ = stackTrace; }
 
-    ValueVectorRef* stackTraceVector() { return stackTraceVector_; }
+    ValueRef* stackValue() { return stackValue_; }
+    void setStackValue(ValueRef* stackValue) { stackValue_ = stackValue; }
+    bool hasStackValue() { return stackValue_ != nullptr; }
 
     void* operator new(size_t size) { return GC_MALLOC(size); }
 
    private:
-    ValueVectorRef* stackTraceVector_ = nullptr;
+    ArrayObjectRef* stackTrace_ = nullptr;
+    ValueRef* stackValue_ = nullptr;
   };
 
-  StackTrace(ExecutionStateRef* state) : state_(state) {}
+  StackTrace(ExecutionStateRef* state, ObjectRef* error)
+      : state_(state), error_(error) {}
+
+  static bool checkFilter(ValueRef* filter,
+                          const Evaluator::StackTraceData& traceData);
 
   static ValueRef* createCaptureStackTrace(ExecutionStateRef* state);
   static ValueRef* captureStackTraceCallback(ExecutionStateRef* state,
@@ -73,23 +85,22 @@ class StackTrace {
                                ObjectRef::NativeDataAccessorPropertyData* data,
                                ValueRef* setterInputData);
 
-  static void addStackProperty(ExecutionStateRef* state,
-                               ObjectRef* object,
-                               ValueVectorRef* stackTraceVector);
+  static std::string formatStackTraceLine(
+      const Evaluator::StackTraceData& line);
 
-  ArrayObjectRef* genCallSites();
+  void addStackProperty(ArrayObjectRef* stackTraceVector);
 
-  // FIXME: Having maxStackSize=1 does not print full stack. Find the right
-  // value
-  StringRef* formatStackTraceStringNodeStyle(ObjectRef* errorObject,
-                                             size_t maxStackSize = 1);
+  ArrayObjectRef* genCallSites(
+      const GCManagedVector<Evaluator::StackTraceData>& stackTraceData);
 
- private:
-  ExecutionStateRef* state_ = nullptr;
+  StringRef* formatStackTraceStringNodeStyle(ArrayObjectRef* stackTrace);
 
-  static size_t getStackTraceLimit(ExecutionStateRef* state);
+  static bool getStackTraceLimit(ExecutionStateRef* state,
+                                 double& stackTraceLimit);
 
-  std::string formatStackTraceLine(const Evaluator::StackTraceData& line);
+ private:
+  ExecutionStateRef* state_ = nullptr;
+  ObjectRef* error_ = nullptr;
 
   // NOTE: StackTrace can only be initialized as a local variable
   void* operator new(size_t size);
@@ -105,6 +116,9 @@ class CallSite : public gc {
   ValueRef* instantiate(ContextRef* context,
                         const Evaluator::StackTraceData& data);
 
+  ValueRef* instantiate(ContextRef* context,
+                        EscargotShim::StackTraceData* data);
+
  private:
   ContextRef* context_ = nullptr;
   FunctionTemplateRef* template_ = nullptr;
index 25d53b222dbebf19eaeab48e9503990c001c5c21..08e58a502006f1b7804b60fb5c23c4fe5d288daf 100644 (file)
@@ -19,6 +19,6 @@
 #include "utils/cast.h"
 #include "utils/compiler.h"
 #include "utils/conversions-inl.h"
-#include "utils/gc.h"
+#include "utils/gc-util.h"
 #include "utils/misc.h"
 #include "utils/string-util.h"
index a18dbb27d80c630d31424893b85e36d5ce682b00..7a4842370b36724ec8e5e1880b1d8dc012c85cce 100644 (file)
@@ -20,8 +20,7 @@
 #include <cassert>
 #include <cstdarg>
 
-#include "gc.h"
-#include "misc.h"
+#include <GCUtil.h>  // class gc
 
 template <typename T>
 class GCContainer : public gc {
@@ -60,7 +59,6 @@ class GCContainer : public gc {
   const GCContainer<T>& operator=(const GCContainer<T>& other) = delete;
 
   ~GCContainer() {
-    LWNODE_CALL_TRACE_ID(GCDEBUG);
     if (buffer_) {
       for (size_t i = 0; i < size_; i++) {
         buffer_[i].~T();
@@ -72,27 +70,27 @@ class GCContainer : public gc {
   size_t size() const { return size_; }
 
   T& operator[](const size_t idx) {
-    LWNODE_CHECK(size_ > idx);
+    assert(size_ > idx);
     return buffer_[idx];
   }
 
   const T& operator[](const size_t idx) const {
-    LWNODE_CHECK(size_ > idx);
+    assert(size_ > idx);
     return buffer_[idx];
   }
 
   T get(const size_t idx) const {
-    LWNODE_CHECK(size_ > idx);
+    assert(size_ > idx);
     return buffer_[idx];
   }
 
   void set(const size_t idx, T val) {
-    LWNODE_CHECK(size_ > idx);
+    assert(size_ > idx);
     buffer_[idx] = val;
   }
 
   void remove(const size_t idx) {
-    LWNODE_CHECK(size_ > idx);
+    assert(size_ > idx);
     buffer_[idx] = nullptr;
   }
 
diff --git a/lwnode/code/escargotshim/src/api/utils/gc-util.cc b/lwnode/code/escargotshim/src/api/utils/gc-util.cc
new file mode 100644 (file)
index 0000000..106ff94
--- /dev/null
@@ -0,0 +1,336 @@
+/*
+ * Copyright (c) 2021-present Samsung Electronics Co., Ltd
+ *
+ * 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.
+ */
+
+#include "gc-util.h"
+
+#include <EscargotPublic.h>
+#include "api/global.h"
+#include "misc.h"
+
+using namespace Escargot;
+
+#define LOG_HANDLER(msg, ...)                                                  \
+  do {                                                                         \
+    if (EscargotShim::Global::flags()->isOn(                                   \
+            EscargotShim::Flag::Type::TraceGC)) {                              \
+      LWNODE_LOGR(CLR_DIM msg CLR_RESET, ##__VA_ARGS__);                       \
+    }                                                                          \
+  } while (0)
+
+#define LOG_HANDLER_RAW(msg, ...)                                              \
+  do {                                                                         \
+    printf(msg, ##__VA_ARGS__);                                                \
+  } while (0)
+
+// --- GCTracer ---
+
+GCTracer MemoryUtil::tracer;
+
+#define GC_DEREF_OFFSET 1
+#define TO_FAKEPTR(gcPtr) ((void*)((size_t)gcPtr + GC_DEREF_OFFSET))
+#define TO_GCPTR(ptr) ((void*)((size_t)ptr - GC_DEREF_OFFSET))
+
+#define REGISTER_FINALIZER(obj, fn, data)                                      \
+  GC_REGISTER_FINALIZER_NO_ORDER(obj, fn, data, nullptr, nullptr)
+
+#define DEREGISTER_FINALIZER(obj)                                              \
+  GC_REGISTER_FINALIZER_NO_ORDER(obj, nullptr, nullptr, nullptr, nullptr)
+
+GCTracer::~GCTracer() {
+  reset();
+}
+
+void GCTracer::reset() {
+  for (const auto& it : registeredAddress_) {
+    DEREGISTER_FINALIZER(TO_GCPTR(it.ptr));
+  }
+  registeredAddress_.clear();
+}
+
+void GCTracer::add(void* gcPtr, std::string description) {
+  registeredAddress_.push_back(Address{TO_FAKEPTR(gcPtr), description, false});
+
+  // @todo support multiple finalizer
+  REGISTER_FINALIZER(
+      gcPtr,
+      [](void* gcPtr, void* data) {
+        auto self = reinterpret_cast<GCTracer*>(data);
+        self->setAddressDeallocatd(gcPtr);
+      },
+      this);
+}
+
+void GCTracer::add(Escargot::ObjectRef* ptr, std::string description) {
+  // @todo
+  LWNODE_CHECK_NOT_REACH_HERE();
+}
+
+void GCTracer::setAddressDeallocatd(void* gcPtr) {
+  LWNODE_CALL_TRACE_ID(GCDEBUG, "de-allocated: %p", gcPtr);
+  LWNODE_CHECK_NOT_NULL(gcPtr);
+
+  for (auto& it : registeredAddress_) {
+    if (it.ptr == TO_FAKEPTR(gcPtr)) {
+      it.deallocated = true;
+      return;
+    }
+  }
+
+  LWNODE_CHECK_NOT_REACH_HERE();
+}
+
+void GCTracer::printState() {
+  LOG_HANDLER("");
+  GC_gcollect();
+  GC_disable();
+
+  for (const auto& it : registeredAddress_) {
+    if (it.deallocated) {
+      LOG_HANDLER(CLR_MAGENTA "deallocated: %s (%p)",
+                  it.description.c_str(),
+                  TO_GCPTR(it.ptr));
+    } else {
+      LOG_HANDLER(CLR_YELLOW "backtrace of %s (%p):\n",
+                  it.description.c_str(),
+                  TO_GCPTR(it.ptr));
+
+      MemoryUtil::printBacktrace(TO_GCPTR(it.ptr));
+    }
+  }
+
+  GC_enable();
+  LOG_HANDLER("");
+  // GC_print_heap_usage();
+}
+
+size_t GCTracer::getAllocatedCount() {
+  size_t count = 0;
+  for (auto& it : registeredAddress_) {
+    if (it.deallocated == false) {
+      count++;
+    }
+  }
+  return count;
+}
+
+// --- MemoryUtil ---
+
+static std::function<bool(uint, double)> g_filter = [](uint idx, double value) {
+  // @note bug walkaround: GC print returns an underflowed value at termination.
+  if (idx >= 5 && value >= 10) {
+    return true;
+  }
+  return false;
+};
+
+#define THRESHOLD_BYTES_BACKTRACE 2048
+
+void MemoryUtil::gcPrintGCMemoryUsage(void* data) {
+  static size_t last_use = 0, last_heap = 0;
+
+  size_t nuse = GC_get_memory_use();
+  size_t nheap = GC_get_heap_size();
+
+  if (last_use == nuse && last_heap == nheap) {
+    // skip
+    return;
+  } else {
+    last_use = nuse;
+    last_heap = nheap;
+  }
+
+  char heap[20], use[20];
+  prettyBytes(use, sizeof(use), nuse);
+  prettyBytes(heap, sizeof(heap), nheap, g_filter);
+  LOG_HANDLER("use %s, heap %s", use, heap);
+}
+
+static thread_local MemoryUtil::OnGCWarnEventListener g_gcWarnEventListener;
+
+void MemoryUtil::gcSetWarningListener(OnGCWarnEventListener callback) {
+  if (g_gcWarnEventListener == nullptr) {
+    g_gcWarnEventListener = callback;
+
+    GC_set_warn_proc([](char* format, GC_word arg) {
+      /*
+        GC Warning: ...May lead to memory leak and poor performance
+        GC Warning: ...Failed to expand heap
+        GC Warning: Out of Memory! ... Returning NULL!
+      */
+      std::string message = format;
+
+#if !defined(NDEBUG)
+      LOG_HANDLER_RAW(format, arg);
+#endif
+
+      if (message.find("poor performance") != std::string::npos) {
+        g_gcWarnEventListener(POOR_PERFORMANCE);
+      } else if (message.find("Failed to expand heap") != std::string::npos) {
+        g_gcWarnEventListener(FAILED_TO_EXPAND_HEAP);
+      } else if (message.find("Out of Memory") != std::string::npos) {
+        g_gcWarnEventListener(OUT_OF_MEMORY);
+      }
+    });
+  }
+}
+
+void MemoryUtil::printGCStats() {
+  // struct GC_prof_stats_s stats;
+  // GC_get_prof_stats(&stats, sizeof(stats));
+
+  char u[20], h[20];
+  prettyBytes(u, sizeof(u), GC_get_memory_use());
+  prettyBytes(h, sizeof(h), GC_get_heap_size(), g_filter);
+  LOG_HANDLER("use %s, heap %s", u, h);
+}
+
+void MemoryUtil::printBacktrace(void* gcPtr) {
+#if !defined(NDEBUG)
+  GC_print_backtrace(gcPtr);
+#else
+  LOG_HANDLER("%s works in debug build only", __PRETTY_FUNCTION__);
+#endif
+}
+
+void MemoryUtil::printEveryReachableGCObjects() {
+#if !defined(ESCARGOT_THREADING)
+  LOG_HANDLER("print reachable pointers -->\n");
+  GC_gcollect();
+  GC_disable();
+
+  struct temp_t {
+    size_t totalCount = 0;
+    size_t totalRemainSize = 0;
+  } temp;
+
+  size_t totalRemainSize = 0;
+
+  GC_enumerate_reachable_objects_inner(
+      [](void* obj, size_t bytes, void* cd) {
+        size_t size;
+        int kind = GC_get_kind_and_size(obj, &size);
+        void* ptr = GC_USR_PTR_FROM_BASE(obj);
+
+        temp_t* tmp = (temp_t*)cd;
+        tmp->totalRemainSize += size;
+        tmp->totalCount++;
+
+        // @note about kinds: bdwgc/include/private/gc_priv.h:1511
+        LOG_HANDLER(
+            "@@@ kind %d pointer %p size %d B", (int)kind, ptr, (int)size);
+
+#if !defined(NDEBUG)
+        // details
+        if (size > THRESHOLD_BYTES_BACKTRACE) {
+          MemoryUtil::printBacktrace(ptr);
+        }
+#endif
+      },
+      &temp);
+  GC_enable();
+
+  LOG_HANDLER("<-- end of print reachable pointers %fKB (count: %zu)\n",
+              temp.totalRemainSize / 1024.f,
+              temp.totalCount);
+#endif
+}
+
+void MemoryUtil::gcFull() {
+  LWNODE_CALL_TRACE_GC_START();
+  LOG_HANDLER("[FULL GC]");
+  GC_register_mark_stack_func([]() {
+    // do nothing for skip stack
+    // assume there is no gc-object on stack
+  });
+
+  GC_gcollect();
+  GC_gcollect();
+  GC_gcollect_and_unmap();
+  GC_register_mark_stack_func(nullptr);
+  GC_gcollect();
+  LWNODE_CALL_TRACE_GC_END();
+}
+
+void MemoryUtil::gc() {
+  LWNODE_CALL_TRACE_GC_START();
+  LOG_HANDLER("[GC]");
+
+  for (int i = 0; i < 5; ++i) {
+    GC_gcollect_and_unmap();
+  }
+
+  for (int i = 0; i < 5; i++) {
+    GC_gcollect();
+  }
+
+  LWNODE_CALL_TRACE_GC_END();
+}
+
+void MemoryUtil::gcInvokeFinalizers() {
+  GC_invoke_finalizers();
+}
+
+void MemoryUtil::prettyBytes(char* buf,
+                             size_t nBuf,
+                             size_t bytes,
+                             std::function<bool(uint, double)> filter) {
+  const char* suffix[7] = {
+      "B",
+      "KB",
+      "MB",
+      "GB",
+      "TB",
+      "PB",
+      "EB",
+  };
+  uint s = 0;
+  double c = bytes;
+  while (c >= 1024 && s < 7 - 1) {
+    c /= 1024;
+    s++;
+  }
+
+  if (filter != nullptr && filter(s, c)) {
+    snprintf(buf, nBuf, "0 B (F)");
+    return;
+  }
+
+  if (c - ((int)c) == 0.f) {
+    snprintf(buf, nBuf, "%d %s", (int)c, suffix[s]);
+  } else {
+    snprintf(buf, nBuf, "%.3f %s", c, suffix[s]);
+  }
+}
+
+void MemoryUtil::gcRegisterFinalizer(Escargot::ValueRef* ptr,
+                                     GCAllocatedMemoryFinalizer callback) {
+  Escargot::Memory::gcRegisterFinalizer(ptr->asObject(), callback);
+}
+
+void MemoryUtil::gcRegisterFinalizer(EscargotShim::ValueWrap* ptr,
+                                     GCAllocatedMemoryFinalizer callback) {
+  Escargot::Memory::gcRegisterFinalizer(ptr, callback);
+}
+
+void MemoryUtil::gcUnregisterFinalizer(Escargot::ValueRef* ptr,
+                                       GCAllocatedMemoryFinalizer callback) {
+  Escargot::Memory::gcUnregisterFinalizer(ptr->asObject(), callback);
+}
+
+void MemoryUtil::gcRegisterFinalizer(
+    void* gcPtr, GCAllocatedMemoryFinalizerWithData callback, void* data) {
+  REGISTER_FINALIZER(gcPtr, callback, data);
+}
diff --git a/lwnode/code/escargotshim/src/api/utils/gc-util.h b/lwnode/code/escargotshim/src/api/utils/gc-util.h
new file mode 100644 (file)
index 0000000..6c2be03
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2021-present Samsung Electronics Co., Ltd
+ *
+ * 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.
+ */
+
+#pragma once
+
+// --------------------------------------------------------------------------------
+//                                GC CONTAINERS
+// --------------------------------------------------------------------------------
+
+#include <GCUtil.h>
+#include "compiler.h"
+#include "gc-container.h"
+#include "sf-vector.h"
+
+#include <string>
+
+// typedef of GC-aware vector
+template <typename T,
+          bool isEraseStrategyStrict = false,
+          typename Allocator = GCUtil::gc_malloc_allocator<T>>
+using GCVectorT = Starfish::Vector<T, Allocator, isEraseStrategyStrict>;
+
+#if defined(GC_DEBUG)
+template <typename T,
+          bool isEraseStrategyStrict = true,
+          typename Allocator = GCUtil::gc_malloc_allocator<T>>
+class GCVector : public GCVectorT<T, isEraseStrategyStrict, Allocator>,
+                 public gc {};
+#else
+template <typename T,
+          bool isEraseStrategyStrict = false,
+          typename Allocator = GCUtil::gc_malloc_allocator<T>>
+class GCVector : public GCVectorT<T, isEraseStrategyStrict, Allocator>,
+                 public gc {};
+#endif
+
+// typedef of GC-aware list
+template <typename T, typename Allocator = GCUtil::gc_malloc_allocator<T>>
+using GCListT = std::list<T, Allocator>;
+
+template <typename T, typename Allocator = GCUtil::gc_malloc_allocator<T>>
+class GCList : public GCListT<T, Allocator>, public gc {};
+
+// typedef of GC-aware deque
+template <typename T, typename Allocator = GCUtil::gc_malloc_allocator<T>>
+using GCDequeT = std::deque<T, Allocator>;
+
+template <typename T, typename Allocator = GCUtil::gc_malloc_allocator<T>>
+class GCDeque : public GCDequeT<T, Allocator>, public gc {};
+
+// typedef of GC-aware unordered_map
+template <typename Key,
+          typename Value,
+          typename Hasher = std::hash<Key>,
+          typename Predicate = std::equal_to<Key>,
+          typename Allocator =
+              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
+using GCUnorderedMapT =
+    std::unordered_map<Key, Value, Hasher, Predicate, Allocator>;
+
+template <typename Key,
+          typename Value,
+          typename Hasher = std::hash<Key>,
+          typename Predicate = std::equal_to<Key>,
+          typename Allocator =
+              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
+class GCUnorderedMap
+    : public GCUnorderedMapT<Key, Value, Hasher, Predicate, Allocator>,
+      public gc {};
+
+template <typename Key,
+          typename Value,
+          typename Hasher = std::hash<Key>,
+          typename Predicate = std::equal_to<Key>,
+          typename Allocator =
+              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
+using GCUnorderedMultiMapT =
+    std::unordered_multimap<Key, Value, Hasher, Predicate, Allocator>;
+
+template <typename Key,
+          typename Value,
+          typename Hasher = std::hash<Key>,
+          typename Predicate = std::equal_to<Key>,
+          typename Allocator =
+              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
+class GCUnorderedMultiMap
+    : public GCUnorderedMultiMapT<Key, Value, Hasher, Predicate, Allocator>,
+      public gc {};
+
+// typedef of GC-aware map
+template <typename Key,
+          typename Value,
+          typename Comparator,
+          typename Allocator =
+              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
+using GCMapT = std::map<Key, Value, Comparator, Allocator>;
+
+template <typename Key,
+          typename Value,
+          typename Comparator,
+          typename Allocator =
+              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
+class GCMap : public GCMapT<Key, Value, Comparator, Allocator>, public gc {};
+
+// typedef of GC-aware unordered_set
+template <typename T,
+          typename Hasher = std::hash<T>,
+          typename Predicate = std::equal_to<T>,
+          typename Allocator = GCUtil::gc_malloc_allocator<T>>
+using GCUnorderedSetT = std::unordered_set<T, Hasher, Predicate, Allocator>;
+
+template <typename T,
+          typename Hasher = std::hash<T>,
+          typename Predicate = std::equal_to<T>,
+          typename Allocator = GCUtil::gc_malloc_allocator<T>>
+class GCUnorderedSet : public GCUnorderedSetT<T, Hasher, Predicate, Allocator>,
+                       public gc {};
+
+namespace Escargot {
+class ValueRef;
+class ObjectRef;
+}  // namespace Escargot
+
+namespace EscargotShim {
+class ValueWrap;
+}
+
+class GCTracer {
+ public:
+  ~GCTracer();
+  void add(void* gcPtr, std::string description = "");
+  void add(Escargot::ObjectRef* gcPtr, std::string description = "");
+  void printState();
+  size_t getAllocatedCount();
+  void reset();
+
+ private:
+  void setAddressDeallocatd(void* gcPtr);
+
+  struct Address {
+    void* ptr = nullptr;
+    std::string description;
+    bool deallocated = false;
+  };
+
+  std::vector<Address> registeredAddress_;
+};
+
+enum WarnEventType {
+  POOR_PERFORMANCE,
+  FAILED_TO_EXPAND_HEAP,
+  OUT_OF_MEMORY,
+};
+
+enum class GarbageCollectionReason {
+  // NOTE: From the following enum values from v8,
+  // we only use a few.
+  // kUnknown = 0,
+  // kAllocationFailure = 1,
+  // kAllocationLimit = 2,
+  // kContextDisposal = 3,
+  // kCountersExtension = 4,
+  // kDebugger = 5,
+  // kDeserializer = 6,
+  // kExternalMemoryPressure = 7,
+  // kFinalizeMarkingViaStackGuard = 8,
+  // kFinalizeMarkingViaTask = 9,
+  // kFullHashtable = 10,
+  // kHeapProfiler = 11,
+  // kTask = 12,
+  // kLastResort = 13,
+  // kLowMemoryNotification = 14,
+  // kMakeHeapIterable = 15,
+  // kMemoryPressure = 16,
+  // kMemoryReducer = 17,
+  kRuntime = 18,
+  // kSamplingProfiler = 19,
+  // kSnapshotCreator = 20,
+  kTesting = 21,
+  // kExternalFinalize = 22,
+  // kGlobalAllocationLimit = 23,
+  // kMeasureMemory = 24
+};
+
+class ESCARGOT_EXPORT MemoryUtil {
+ public:
+  typedef void (*OnGCWarnEventListener)(WarnEventType type);
+
+  static void gcSetWarningListener(OnGCWarnEventListener callback);
+  static void gcPrintGCMemoryUsage(void* data);
+  static void gcFull();
+  static void gcInvokeFinalizers();
+  static void gc();
+
+  typedef void (*GCAllocatedMemoryFinalizer)(void* self);
+  typedef void (*GCAllocatedMemoryFinalizerWithData)(void* self, void* data);
+  // @note this should not use on escargot values since they may be already
+  // bound with another finalizer with its internal data.
+  static void gcRegisterFinalizer(void* gcPtr,
+                                  GCAllocatedMemoryFinalizerWithData callback,
+                                  void* data);
+  static void gcRegisterFinalizer(Escargot::ValueRef* gcPtr,
+                                  GCAllocatedMemoryFinalizer callback);
+  static void gcRegisterFinalizer(EscargotShim::ValueWrap* gcPtr,
+                                  GCAllocatedMemoryFinalizer callback);
+  static void gcUnregisterFinalizer(Escargot::ValueRef* gcPtr,
+                                    GCAllocatedMemoryFinalizer callback);
+  // print
+  static void printRegisteredGCObjects();
+  static void printEveryReachableGCObjects();
+  static void printGCStats();
+  static void printBacktrace(void* gcPtr);
+  static void prettyBytes(char* buf,
+                          size_t nBuf,
+                          size_t bytes,
+                          std::function<bool(uint, double)> filter = nullptr);
+  static GCTracer tracer;
+};
diff --git a/lwnode/code/escargotshim/src/api/utils/gc-vector.h b/lwnode/code/escargotshim/src/api/utils/gc-vector.h
deleted file mode 100644 (file)
index 134990e..0000000
+++ /dev/null
@@ -1,495 +0,0 @@
-/*
- * Copyright (c) 2017-present Samsung Electronics Co., Ltd
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
- *  USA
- */
-
-#pragma once
-
-#include <math.h>  // log21
-#include <deque>
-#include <list>
-#include <map>
-#include <unordered_map>
-#include <unordered_set>
-#include <vector>
-
-#include "misc.h"  // LWNODE_CHECK
-
-namespace Starfish {
-
-template <typename T>
-struct VectorAllocInfo {
- public:
-  VectorAllocInfo(T* buffer, size_t capacity)
-      : m_buffer(buffer), m_capacity(capacity) {}
-
-  T* m_buffer;
-  size_t m_capacity;
-};
-
-template <typename T, typename Allocator, bool isEraseStrategyStrict = false>
-class Vector {
- protected:
-  typedef typename Allocator::template rebind<T>::other TAllocType;
-
-  // Types:
- public:
-  typedef typename std::char_traits<T> traits_type;
-  typedef typename TAllocType::size_type size_type;
-  typedef typename TAllocType::difference_type difference_type;
-  typedef typename TAllocType::pointer pointer;
-  typedef typename TAllocType::const_pointer const_pointer;
-
-  typedef T* iterator;
-  typedef const T* const_iterator;
-  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-  typedef std::reverse_iterator<iterator> reverse_iterator;
-
-  Vector() : m_buffer(nullptr), m_size(0), m_capacity(0) { makeEmpty(); }
-
-  Vector(Vector<T, Allocator>&& other)
-      : m_buffer(other.m_buffer),
-        m_size(other.m_size),
-        m_capacity(other.m_capacity) {
-    other.m_buffer = nullptr;
-    other.m_size = 0;
-    other.m_capacity = 0;
-  }
-
-  Vector(const Vector<T, Allocator>& other)
-      : m_buffer(nullptr), m_size(0), m_capacity(0) {
-    if (other.m_size > 0) {
-      construct(other);
-    } else {
-      makeEmpty();
-    }
-  }
-
-  template <typename _InputIterator>
-  Vector(_InputIterator start, _InputIterator end)
-      : m_buffer(nullptr), m_size(0), m_capacity(0) {
-    construct(start, end);
-  }
-
-  Vector<T, Allocator>& operator=(const Vector<T, Allocator>& other) {
-    if (other.m_size > 0) {
-      deallocate();
-      construct(other);
-    } else {
-      clear();
-    }
-    return *this;
-  }
-
-  ~Vector() { deallocate(); }
-
-  void push_back(const T& val) { pushBack(val); }
-
-  void push_back(T&& val) { pushBack(val); }
-
-  template <class... Args>
-  void emplace_back(Args&&... args) {
-    pushBack(T(args...));
-  }
-
-  void emplace_back(T&& val) { pushBack(val); }
-
-  void insert(size_t pos, const T& val) {
-    LWNODE_CHECK(pos <= m_size);
-    insertImpl(pos, val);
-  }
-
-  template <class _Iterator>
-  void insert(_Iterator pos, const T& val) {
-    size_t npos = std::distance(begin(), pos);
-    insertImpl(npos, val);
-  }
-
-  template <class _Iterator, class _InputIterator>
-  void insert(_Iterator pos, _InputIterator first, _InputIterator last) {
-    size_t npos = std::distance(begin(), pos);
-    size_t l = std::distance(first, last);
-    for (size_t i = 0; i < l; i++) {
-      insertImpl(i + npos, *first);
-      first++;
-    }
-  }
-
-  template <class _InputIterator>
-  void assign(_InputIterator first, _InputIterator last) {
-    clear();
-    insert(begin(), first, last);
-  }
-
-  template <class _Iterator>
-  _Iterator erase(_Iterator first, _Iterator last) {
-    size_t start = first - _Iterator(data());
-    size_t end = last - _Iterator(data());
-
-    erase(start, end);
-
-    return _Iterator(this->m_buffer + start);
-  }
-
-  void erase(size_t pos) { erase(pos, pos + 1); }
-
-  void erase(size_t start, size_t end) {
-    if (start == end) return;
-    LWNODE_CHECK(start >= 0);
-    LWNODE_CHECK(end <= m_size);
-
-    size_t howMuch = end - start;
-    size_t newLen = m_size - howMuch;
-
-    if (howMuch == 0) {
-      return;
-    } else if (newLen == 0) {
-      clear();
-    } else {
-      if (isEraseStrategyStrict) {
-        eraseStrictImpl(start, howMuch);
-      } else {
-        eraseImpl(start, howMuch);
-      }
-    }
-  }
-
-  template <class _Iterator>
-  _Iterator erase(_Iterator pos) {
-    return erase(pos, pos + 1);
-  }
-
-  void erase(reverse_iterator pos) {
-    size_t start = size() - std::distance(rbegin(), pos) - 1;
-    size_t end = start + 1;
-    erase(start, end);
-  }
-
-  void erase(reverse_iterator pos, reverse_iterator pos2) {
-    size_t start = size() - std::distance(rbegin(), pos) - 1;
-    size_t end = size() - std::distance(rbegin(), pos2) - 1;
-    erase(start, end);
-  }
-
-  size_t size() const { return m_size; }
-
-  size_t capacity() const { return m_capacity; }
-
-  void shrink_to_fit() {}
-
-  iterator begin() { return iterator(data()); }
-
-  const_iterator cbegin() { return const_iterator(data()); }
-
-  const_iterator begin() const { return const_iterator(data()); }
-
-  T& front() { return *begin(); }
-
-  const T& front() const { return *begin(); }
-
-  iterator end() { return iterator(data() + m_size); }
-
-  const_iterator cend() { return const_iterator(data() + m_size); }
-
-  const_iterator end() const { return const_iterator(data() + m_size); }
-
-  reverse_iterator rbegin() { return reverse_iterator(end()); }
-
-  const_reverse_iterator rbegin() const {
-    return const_reverse_iterator(end());
-  }
-
-  reverse_iterator rend() { return reverse_iterator(begin()); }
-
-  const_reverse_iterator rend() const {
-    return const_reverse_iterator(begin());
-  }
-
-  T& back() { return *iterator(data() + m_size - 1); }
-
-  const T& back() const { return *const_iterator(data() + m_size - 1); }
-
-  bool empty() const { return m_size == 0; }
-
-  void pop_back() { erase(m_size - 1); }
-
-  T& operator[](const size_t& idx) {
-    LWNODE_CHECK(idx < m_size);
-    return m_buffer[idx];
-  }
-
-  const T& operator[](const size_t& idx) const {
-    LWNODE_CHECK(idx < m_size);
-    return m_buffer[idx];
-  }
-
-  T& at(const size_t& idx) {
-    LWNODE_CHECK(idx < m_size);
-    return m_buffer[idx];
-  }
-
-  const T& at(const size_t& idx) const {
-    LWNODE_CHECK(idx < m_size);
-    return m_buffer[idx];
-  }
-
-  void clear() { makeEmpty(); }
-
-  T* data() const { return m_buffer; }
-
-  void swap(Vector<T, Allocator>& other) {
-    std::swap(m_buffer, other.m_buffer);
-    std::swap(m_capacity, other.m_capacity);
-    std::swap(m_size, other.m_size);
-  }
-
-  bool operator==(const Vector<T, Allocator>& other) {
-    if (m_size != other.m_size) {
-      return false;
-    }
-    if (other.empty()) {
-      return true;
-    }
-    return std::equal(begin(), end(), other.begin());
-  }
-
-  bool operator!=(const Vector<T, Allocator>& other) {
-    return !(this == other);
-  }
-
-  void resize(size_t newSize) {
-    reserve(newSize);
-    for (size_t i = m_size; i < newSize; i++) {
-      new (&m_buffer[i]) T;
-    }
-    setLen(newSize);
-  }
-
-  void reserve(size_t newSize) {
-    if (newSize <= m_capacity) {
-      return;
-    }
-
-    size_t oldSize = m_size;
-    VectorAllocInfo<T> allocInfo = allocate(newSize);
-    for (size_t i = 0; i < m_size; i++) {
-      new (&allocInfo.m_buffer[i]) T(std::move(m_buffer[i]));
-    }
-    resetBuffer(allocInfo);
-    setLen(oldSize);
-  }
-
- protected:
-  void makeEmpty() { deallocate(); }
-
-  size_t toCapacity(size_t size) const {
-    if (size == 0) {
-      return 1;
-    }
-    size_t base = log2l(size);
-    size_t capacity = 1 << (base + 1);
-    return capacity;
-  }
-
-  VectorAllocInfo<T> allocate(size_t size) const {
-    size_t capacity = toCapacity(size);
-    T* ret = Allocator().allocate(capacity);
-    return VectorAllocInfo<T>(ret, capacity);
-  }
-
-  void resetBuffer(const VectorAllocInfo<T>& info) {
-    deallocate();
-    m_buffer = info.m_buffer;
-    m_capacity = info.m_capacity;
-  }
-
-  template <typename _InputIterator>
-  void construct(_InputIterator start, _InputIterator end) {
-    typedef typename std::is_integral<_InputIterator> _Integral;
-    _construct(start, end, _Integral());
-  }
-
-  template <class _InIterator>
-  void _construct(_InIterator start, _InIterator end, std::false_type) {
-    typedef typename std::iterator_traits<_InIterator>::iterator_category _Tag;
-    return _construct(start, end, _Tag());
-  }
-
-  template <class _InIterator>
-  void _construct(_InIterator start,
-                  _InIterator end,
-                  std::forward_iterator_tag) {
-    const size_t distance = static_cast<size_t>(std::distance(start, end));
-    VectorAllocInfo<T> allocInfo = allocate(distance);
-    resetBuffer(allocInfo);
-    size_t len = 0;
-    for (; len < distance; len++) {
-      new (&m_buffer[len]) T(*(start + len));
-    }
-    setLen(len);
-  }
-
-  void construct(const Vector<T, Allocator>& other) {
-    construct(other.begin(), other.end());
-  }
-
-  void eraseStrictImpl(size_t start, size_t sizeToErase) {
-    // @note this drops unused memory immediately
-
-    size_t end = start + sizeToErase;
-    LWNODE_CHECK(start < end);
-    LWNODE_CHECK(start >= 0);
-    LWNODE_CHECK(end <= m_size);
-
-    size_t c = end - start;
-    size_t newLen = m_size - c;
-
-    if (newLen > 0) {
-      VectorAllocInfo<T> newBuffer = allocate(newLen);
-      for (size_t i = 0; i < start; i++) {
-        new (&newBuffer.m_buffer[i]) T(m_buffer[i]);
-      }
-
-      for (size_t i = end; i < m_size; i++) {
-        new (&newBuffer.m_buffer[i - c]) T(m_buffer[i]);
-      }
-
-      for (size_t i = 0; i < m_size; i++) {
-        m_buffer[i].~T();
-      }
-
-      m_buffer = newBuffer.m_buffer;
-      m_capacity = newBuffer.m_capacity;
-      m_size = newLen;
-    } else {
-      clear();
-    }
-  }
-
-  void eraseImpl(size_t start, size_t sizeToErase) {
-    // @note this drops unused memory when newLen < (m_capacity / 2)
-
-    size_t end = start + sizeToErase;
-    LWNODE_CHECK(start < end);
-    LWNODE_CHECK(start >= 0);
-    LWNODE_CHECK(end <= m_size);
-
-    size_t c = end - start;
-    size_t newLen = m_size - c;
-    if (newLen == 0) {
-      clear();
-    } else if (newLen < (m_capacity / 2)) {
-      VectorAllocInfo<T> newBuffer = allocate(newLen);
-      for (size_t i = 0; i < start; i++) {
-        new (&newBuffer.m_buffer[i]) T(m_buffer[i]);
-      }
-
-      for (size_t i = end; i < m_size; i++) {
-        new (&newBuffer.m_buffer[i - c]) T(m_buffer[i]);
-      }
-
-      for (size_t i = 0; i < m_size; i++) {
-        m_buffer[i].~T();
-      }
-
-      m_buffer = newBuffer.m_buffer;
-      m_capacity = newBuffer.m_capacity;
-      m_size = newLen;
-    } else {
-      for (size_t i = 0; i < sizeToErase; i++) {
-        size_t idx = i + start;
-        size_t nextIdx = i + start + sizeToErase;
-        if (nextIdx < m_size) {
-          m_buffer[idx] = std::move(m_buffer[nextIdx]);
-          m_buffer[nextIdx].~T();
-        } else {
-          m_buffer[idx].~T();
-        }
-      }
-
-      for (size_t i = end; i < m_size; i++) {
-        size_t idx = i;
-        size_t nextIdx = i + sizeToErase;
-        if (nextIdx < m_size) {
-          m_buffer[idx] = std::move(m_buffer[nextIdx]);
-          m_buffer[nextIdx].~T();
-        } else {
-          m_buffer[idx].~T();
-        }
-      }
-
-      m_size = newLen;
-    }
-  }
-
-  void insertImpl(size_t pos, const T& v) {
-    LWNODE_CHECK(pos <= m_size);
-
-    size_t newLen = m_size + 1;
-
-    if (capacity() < newLen) {
-      reserve(newLen);
-    }
-
-    for (size_t i = m_size; i > pos; i--) {
-      m_buffer[i] = m_buffer[i - 1];
-    }
-
-    new (&m_buffer[pos]) T(v);
-    setLen(newLen);
-  }
-
-  void setLen(size_t newLen) {
-    for (size_t i = newLen; i < m_size; i++) {
-      m_buffer[i].~T();
-    }
-    m_size = newLen;
-  }
-
-  void pushBack(const T& val) {
-    size_t newLen = m_size + 1;
-    reserve(newLen);
-    new (&m_buffer[newLen - 1]) T(val);
-    setLen(newLen);
-  }
-
-  void pushBack(T&& val) {
-    size_t newLen = m_size + 1;
-    reserve(newLen);
-    new (&m_buffer[newLen - 1]) T(std::move(val));
-    setLen(newLen);
-  }
-
-  // Important! `m_size` update should follow `deallocate()`
-  void deallocate() {
-    for (size_t i = 0; i < m_size; i++) {
-      m_buffer[i].~T();
-    }
-    if (m_buffer) {
-      Allocator().deallocate(m_buffer, m_capacity);
-    }
-    m_buffer = nullptr;
-    m_size = 0;
-    m_capacity = 0;
-  }
-
-  T* m_buffer;
-  size_t m_size;
-  size_t m_capacity;
-};
-
-}  // namespace Starfish
diff --git a/lwnode/code/escargotshim/src/api/utils/gc.cc b/lwnode/code/escargotshim/src/api/utils/gc.cc
deleted file mode 100644 (file)
index 6f29822..0000000
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Copyright (c) 2021-present Samsung Electronics Co., Ltd
- *
- * 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.
- */
-
-#include "gc.h"
-
-#include <EscargotPublic.h>
-#include "api/global.h"
-#include "misc.h"
-
-using namespace Escargot;
-
-#define LOG_HANDLER(msg, ...)                                                  \
-  do {                                                                         \
-    if (EscargotShim::Global::flags()->isOn(                                   \
-            EscargotShim::Flag::Type::TraceGC)) {                              \
-      LWNODE_LOGR(CLR_DIM msg CLR_RESET, ##__VA_ARGS__);                       \
-    }                                                                          \
-  } while (0)
-
-#define LOG_HANDLER_RAW(msg, ...)                                              \
-  do {                                                                         \
-    printf(msg, ##__VA_ARGS__);                                                \
-  } while (0)
-
-// --- GCTracer ---
-
-GCTracer MemoryUtil::tracer;
-
-#define GC_DEREF_OFFSET 1
-#define TO_FAKEPTR(gcPtr) ((void*)((size_t)gcPtr + GC_DEREF_OFFSET))
-#define TO_GCPTR(ptr) ((void*)((size_t)ptr - GC_DEREF_OFFSET))
-
-#define REGISTER_FINALIZER(obj, fn, data)                                      \
-  GC_REGISTER_FINALIZER_NO_ORDER(obj, fn, data, nullptr, nullptr)
-
-#define DEREGISTER_FINALIZER(obj)                                              \
-  GC_REGISTER_FINALIZER_NO_ORDER(obj, nullptr, nullptr, nullptr, nullptr)
-
-GCTracer::~GCTracer() {
-  reset();
-}
-
-void GCTracer::reset() {
-  for (const auto& it : registeredAddress_) {
-    DEREGISTER_FINALIZER(TO_GCPTR(it.ptr));
-  }
-  registeredAddress_.clear();
-}
-
-void GCTracer::add(void* gcPtr, std::string description) {
-  registeredAddress_.push_back(Address{TO_FAKEPTR(gcPtr), description, false});
-
-  // @todo support multiple finalizer
-  REGISTER_FINALIZER(
-      gcPtr,
-      [](void* gcPtr, void* data) {
-        auto self = reinterpret_cast<GCTracer*>(data);
-        self->setAddressDeallocatd(gcPtr);
-      },
-      this);
-}
-
-void GCTracer::add(Escargot::ObjectRef* ptr, std::string description) {
-  // @todo
-  LWNODE_CHECK_NOT_REACH_HERE();
-}
-
-void GCTracer::setAddressDeallocatd(void* gcPtr) {
-  LWNODE_CALL_TRACE_ID(GCDEBUG, "de-allocated: %p", gcPtr);
-  LWNODE_CHECK_NOT_NULL(gcPtr);
-
-  for (auto& it : registeredAddress_) {
-    if (it.ptr == TO_FAKEPTR(gcPtr)) {
-      it.deallocated = true;
-      return;
-    }
-  }
-
-  LWNODE_CHECK_NOT_REACH_HERE();
-}
-
-void GCTracer::printState() {
-  LOG_HANDLER("");
-  GC_gcollect();
-  GC_disable();
-
-  for (const auto& it : registeredAddress_) {
-    if (it.deallocated) {
-      LOG_HANDLER(CLR_MAGENTA "deallocated: %s (%p)",
-                  it.description.c_str(),
-                  TO_GCPTR(it.ptr));
-    } else {
-      LOG_HANDLER(CLR_YELLOW "backtrace of %s (%p):\n",
-                  it.description.c_str(),
-                  TO_GCPTR(it.ptr));
-
-      MemoryUtil::printBacktrace(TO_GCPTR(it.ptr));
-    }
-  }
-
-  GC_enable();
-  LOG_HANDLER("");
-  // GC_print_heap_usage();
-}
-
-size_t GCTracer::getAllocatedCount() {
-  size_t count = 0;
-  for (auto& it : registeredAddress_) {
-    if (it.deallocated == false) {
-      count++;
-    }
-  }
-  return count;
-}
-
-// --- MemoryUtil ---
-
-static std::function<bool(uint, double)> g_filter = [](uint idx, double value) {
-  // @note bug walkaround: GC print returns an underflowed value at termination.
-  if (idx >= 5 && value >= 10) {
-    return true;
-  }
-  return false;
-};
-
-#define THRESHOLD_BYTES_BACKTRACE 2048
-
-void MemoryUtil::gcPrintGCMemoryUsage(void* data) {
-  static size_t last_use = 0, last_heap = 0;
-
-  size_t nuse = GC_get_memory_use();
-  size_t nheap = GC_get_heap_size();
-
-  if (last_use == nuse && last_heap == nheap) {
-    // skip
-    return;
-  } else {
-    last_use = nuse;
-    last_heap = nheap;
-  }
-
-  char heap[20], use[20];
-  prettyBytes(use, sizeof(use), nuse);
-  prettyBytes(heap, sizeof(heap), nheap, g_filter);
-  LOG_HANDLER("use %s, heap %s", use, heap);
-}
-
-static thread_local MemoryUtil::OnGCWarnEventListener g_gcWarnEventListener;
-
-void MemoryUtil::gcSetWarningListener(OnGCWarnEventListener callback) {
-  if (g_gcWarnEventListener == nullptr) {
-    g_gcWarnEventListener = callback;
-
-    GC_set_warn_proc([](char* format, GC_word arg) {
-      /*
-        GC Warning: ...May lead to memory leak and poor performance
-        GC Warning: ...Failed to expand heap
-        GC Warning: Out of Memory! ... Returning NULL!
-      */
-      std::string message = format;
-
-#if !defined(NDEBUG)
-      LOG_HANDLER_RAW(format, arg);
-#endif
-
-      if (message.find("poor performance") != std::string::npos) {
-        g_gcWarnEventListener(POOR_PERFORMANCE);
-      } else if (message.find("Failed to expand heap") != std::string::npos) {
-        g_gcWarnEventListener(FAILED_TO_EXPAND_HEAP);
-      } else if (message.find("Out of Memory") != std::string::npos) {
-        g_gcWarnEventListener(OUT_OF_MEMORY);
-      }
-    });
-  }
-}
-
-void MemoryUtil::printGCStats() {
-  // struct GC_prof_stats_s stats;
-  // GC_get_prof_stats(&stats, sizeof(stats));
-
-  char u[20], h[20];
-  prettyBytes(u, sizeof(u), GC_get_memory_use());
-  prettyBytes(h, sizeof(h), GC_get_heap_size(), g_filter);
-  LOG_HANDLER("use %s, heap %s", u, h);
-}
-
-void MemoryUtil::printBacktrace(void* gcPtr) {
-#if !defined(NDEBUG)
-  GC_print_backtrace(gcPtr);
-#else
-  LOG_HANDLER("%s works in debug build only", __PRETTY_FUNCTION__);
-#endif
-}
-
-void MemoryUtil::printEveryReachableGCObjects() {
-#if !defined(ESCARGOT_THREADING)
-  LOG_HANDLER("print reachable pointers -->\n");
-  GC_gcollect();
-  GC_disable();
-
-  struct temp_t {
-    size_t totalCount = 0;
-    size_t totalRemainSize = 0;
-  } temp;
-
-  size_t totalRemainSize = 0;
-
-  GC_enumerate_reachable_objects_inner(
-      [](void* obj, size_t bytes, void* cd) {
-        size_t size;
-        int kind = GC_get_kind_and_size(obj, &size);
-        void* ptr = GC_USR_PTR_FROM_BASE(obj);
-
-        temp_t* tmp = (temp_t*)cd;
-        tmp->totalRemainSize += size;
-        tmp->totalCount++;
-
-        // @note about kinds: bdwgc/include/private/gc_priv.h:1511
-        LOG_HANDLER(
-            "@@@ kind %d pointer %p size %d B", (int)kind, ptr, (int)size);
-
-#if !defined(NDEBUG)
-        // details
-        if (size > THRESHOLD_BYTES_BACKTRACE) {
-          MemoryUtil::printBacktrace(ptr);
-        }
-#endif
-      },
-      &temp);
-  GC_enable();
-
-  LOG_HANDLER("<-- end of print reachable pointers %fKB (count: %zu)\n",
-              temp.totalRemainSize / 1024.f,
-              temp.totalCount);
-#endif
-}
-
-void MemoryUtil::gcFull() {
-  LWNODE_CALL_TRACE_GC_START();
-  LOG_HANDLER("[FULL GC]");
-  GC_register_mark_stack_func([]() {
-    // do nothing for skip stack
-    // assume there is no gc-object on stack
-  });
-
-  GC_gcollect();
-  GC_gcollect();
-  GC_gcollect_and_unmap();
-  GC_register_mark_stack_func(nullptr);
-  GC_gcollect();
-  LWNODE_CALL_TRACE_GC_END();
-}
-
-void MemoryUtil::gc() {
-  LWNODE_CALL_TRACE_GC_START();
-  LOG_HANDLER("[GC]");
-
-  for (int i = 0; i < 5; ++i) {
-    GC_gcollect_and_unmap();
-  }
-
-  for (int i = 0; i < 5; i++) {
-    GC_gcollect();
-  }
-
-  LWNODE_CALL_TRACE_GC_END();
-}
-
-void MemoryUtil::gcInvokeFinalizers() {
-  GC_invoke_finalizers();
-}
-
-void MemoryUtil::prettyBytes(char* buf,
-                             size_t nBuf,
-                             size_t bytes,
-                             std::function<bool(uint, double)> filter) {
-  const char* suffix[7] = {
-      "B",
-      "KB",
-      "MB",
-      "GB",
-      "TB",
-      "PB",
-      "EB",
-  };
-  uint s = 0;
-  double c = bytes;
-  while (c >= 1024 && s < 7 - 1) {
-    c /= 1024;
-    s++;
-  }
-
-  if (filter != nullptr && filter(s, c)) {
-    snprintf(buf, nBuf, "0 B (F)");
-    return;
-  }
-
-  if (c - ((int)c) == 0.f) {
-    snprintf(buf, nBuf, "%d %s", (int)c, suffix[s]);
-  } else {
-    snprintf(buf, nBuf, "%.3f %s", c, suffix[s]);
-  }
-}
-
-void MemoryUtil::gcRegisterFinalizer(Escargot::ValueRef* ptr,
-                                     GCAllocatedMemoryFinalizer callback) {
-  Escargot::Memory::gcRegisterFinalizer(ptr->asObject(), callback);
-}
-
-void MemoryUtil::gcRegisterFinalizer(EscargotShim::ValueWrap* ptr,
-                                     GCAllocatedMemoryFinalizer callback) {
-  Escargot::Memory::gcRegisterFinalizer(ptr, callback);
-}
-
-void MemoryUtil::gcUnregisterFinalizer(Escargot::ValueRef* ptr,
-                                       GCAllocatedMemoryFinalizer callback) {
-  Escargot::Memory::gcUnregisterFinalizer(ptr->asObject(), callback);
-}
-
-void MemoryUtil::gcRegisterFinalizer(
-    void* gcPtr, GCAllocatedMemoryFinalizerWithData callback, void* data) {
-  REGISTER_FINALIZER(gcPtr, callback, data);
-}
diff --git a/lwnode/code/escargotshim/src/api/utils/gc.h b/lwnode/code/escargotshim/src/api/utils/gc.h
deleted file mode 100644 (file)
index 4e82528..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 2021-present Samsung Electronics Co., Ltd
- *
- * 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.
- */
-
-#pragma once
-
-// --------------------------------------------------------------------------------
-//                                GC CONTAINERS
-// --------------------------------------------------------------------------------
-
-#include <GCUtil.h>
-#include "compiler.h"
-#include "gc-container.h"
-#include "gc-vector.h"
-
-#include <string>
-
-// typedef of GC-aware vector
-template <typename T,
-          bool isEraseStrategyStrict = false,
-          typename Allocator = GCUtil::gc_malloc_allocator<T>>
-using GCVectorT = Starfish::Vector<T, Allocator, isEraseStrategyStrict>;
-
-#if defined(GC_DEBUG)
-template <typename T,
-          bool isEraseStrategyStrict = true,
-          typename Allocator = GCUtil::gc_malloc_allocator<T>>
-class GCVector : public GCVectorT<T, isEraseStrategyStrict, Allocator>,
-                 public gc {};
-#else
-template <typename T,
-          bool isEraseStrategyStrict = false,
-          typename Allocator = GCUtil::gc_malloc_allocator<T>>
-class GCVector : public GCVectorT<T, isEraseStrategyStrict, Allocator>,
-                 public gc {};
-#endif
-
-// typedef of GC-aware list
-template <typename T, typename Allocator = GCUtil::gc_malloc_allocator<T>>
-using GCListT = std::list<T, Allocator>;
-
-template <typename T, typename Allocator = GCUtil::gc_malloc_allocator<T>>
-class GCList : public GCListT<T, Allocator>, public gc {};
-
-// typedef of GC-aware deque
-template <typename T, typename Allocator = GCUtil::gc_malloc_allocator<T>>
-using GCDequeT = std::deque<T, Allocator>;
-
-template <typename T, typename Allocator = GCUtil::gc_malloc_allocator<T>>
-class GCDeque : public GCDequeT<T, Allocator>, public gc {};
-
-// typedef of GC-aware unordered_map
-template <typename Key,
-          typename Value,
-          typename Hasher = std::hash<Key>,
-          typename Predicate = std::equal_to<Key>,
-          typename Allocator =
-              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
-using GCUnorderedMapT =
-    std::unordered_map<Key, Value, Hasher, Predicate, Allocator>;
-
-template <typename Key,
-          typename Value,
-          typename Hasher = std::hash<Key>,
-          typename Predicate = std::equal_to<Key>,
-          typename Allocator =
-              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
-class GCUnorderedMap
-    : public GCUnorderedMapT<Key, Value, Hasher, Predicate, Allocator>,
-      public gc {};
-
-template <typename Key,
-          typename Value,
-          typename Hasher = std::hash<Key>,
-          typename Predicate = std::equal_to<Key>,
-          typename Allocator =
-              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
-using GCUnorderedMultiMapT =
-    std::unordered_multimap<Key, Value, Hasher, Predicate, Allocator>;
-
-template <typename Key,
-          typename Value,
-          typename Hasher = std::hash<Key>,
-          typename Predicate = std::equal_to<Key>,
-          typename Allocator =
-              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
-class GCUnorderedMultiMap
-    : public GCUnorderedMultiMapT<Key, Value, Hasher, Predicate, Allocator>,
-      public gc {};
-
-// typedef of GC-aware map
-template <typename Key,
-          typename Value,
-          typename Comparator,
-          typename Allocator =
-              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
-using GCMapT = std::map<Key, Value, Comparator, Allocator>;
-
-template <typename Key,
-          typename Value,
-          typename Comparator,
-          typename Allocator =
-              GCUtil::gc_malloc_allocator<std::pair<Key const, Value>>>
-class GCMap : public GCMapT<Key, Value, Comparator, Allocator>, public gc {};
-
-// typedef of GC-aware unordered_set
-template <typename T,
-          typename Hasher = std::hash<T>,
-          typename Predicate = std::equal_to<T>,
-          typename Allocator = GCUtil::gc_malloc_allocator<T>>
-using GCUnorderedSetT = std::unordered_set<T, Hasher, Predicate, Allocator>;
-
-template <typename T,
-          typename Hasher = std::hash<T>,
-          typename Predicate = std::equal_to<T>,
-          typename Allocator = GCUtil::gc_malloc_allocator<T>>
-class GCUnorderedSet : public GCUnorderedSetT<T, Hasher, Predicate, Allocator>,
-                       public gc {};
-
-namespace Escargot {
-class ValueRef;
-class ObjectRef;
-}  // namespace Escargot
-
-namespace EscargotShim {
-class ValueWrap;
-}
-
-class GCTracer {
- public:
-  ~GCTracer();
-  void add(void* gcPtr, std::string description = "");
-  void add(Escargot::ObjectRef* gcPtr, std::string description = "");
-  void printState();
-  size_t getAllocatedCount();
-  void reset();
-
- private:
-  void setAddressDeallocatd(void* gcPtr);
-
-  struct Address {
-    void* ptr = nullptr;
-    std::string description;
-    bool deallocated = false;
-  };
-
-  std::vector<Address> registeredAddress_;
-};
-
-enum WarnEventType {
-  POOR_PERFORMANCE,
-  FAILED_TO_EXPAND_HEAP,
-  OUT_OF_MEMORY,
-};
-
-enum class GarbageCollectionReason {
-  // NOTE: From the following enum values from v8,
-  // we only use a few.
-  // kUnknown = 0,
-  // kAllocationFailure = 1,
-  // kAllocationLimit = 2,
-  // kContextDisposal = 3,
-  // kCountersExtension = 4,
-  // kDebugger = 5,
-  // kDeserializer = 6,
-  // kExternalMemoryPressure = 7,
-  // kFinalizeMarkingViaStackGuard = 8,
-  // kFinalizeMarkingViaTask = 9,
-  // kFullHashtable = 10,
-  // kHeapProfiler = 11,
-  // kTask = 12,
-  // kLastResort = 13,
-  // kLowMemoryNotification = 14,
-  // kMakeHeapIterable = 15,
-  // kMemoryPressure = 16,
-  // kMemoryReducer = 17,
-  kRuntime = 18,
-  // kSamplingProfiler = 19,
-  // kSnapshotCreator = 20,
-  kTesting = 21,
-  // kExternalFinalize = 22,
-  // kGlobalAllocationLimit = 23,
-  // kMeasureMemory = 24
-};
-
-class ESCARGOT_EXPORT MemoryUtil {
- public:
-  typedef void (*OnGCWarnEventListener)(WarnEventType type);
-
-  static void gcSetWarningListener(OnGCWarnEventListener callback);
-  static void gcPrintGCMemoryUsage(void* data);
-  static void gcFull();
-  static void gcInvokeFinalizers();
-  static void gc();
-
-  typedef void (*GCAllocatedMemoryFinalizer)(void* self);
-  typedef void (*GCAllocatedMemoryFinalizerWithData)(void* self, void* data);
-  // @note this should not use on escargot values since they may be already
-  // bound with another finalizer with its internal data.
-  static void gcRegisterFinalizer(void* gcPtr,
-                                  GCAllocatedMemoryFinalizerWithData callback,
-                                  void* data);
-  static void gcRegisterFinalizer(Escargot::ValueRef* gcPtr,
-                                  GCAllocatedMemoryFinalizer callback);
-  static void gcRegisterFinalizer(EscargotShim::ValueWrap* gcPtr,
-                                  GCAllocatedMemoryFinalizer callback);
-  static void gcUnregisterFinalizer(Escargot::ValueRef* gcPtr,
-                                    GCAllocatedMemoryFinalizer callback);
-  // print
-  static void printRegisteredGCObjects();
-  static void printEveryReachableGCObjects();
-  static void printGCStats();
-  static void printBacktrace(void* gcPtr);
-  static void prettyBytes(char* buf,
-                          size_t nBuf,
-                          size_t bytes,
-                          std::function<bool(uint, double)> filter = nullptr);
-  static GCTracer tracer;
-};
index 1a97d04b86f511e06d44b7e65a69155e544cd90f..8485aeda4a95da63f56153a4c213365e9fcbe90b 100644 (file)
 
 namespace EscargotShim {
 
-std::vector<Flag> Flags::s_validFlags = {
-    // v8 flags
-    Flag("--expose-gc", Flag::Type::ExposeGC),
-    Flag("--use-strict", Flag::Type::UseStrict),
-    Flag("--off-idlegc", Flag::Type::DisableIdleGC),
-    Flag("--harmony-top-level-await", Flag::Type::TopLevelWait),
-    Flag("--allow-code-generation-from-strings",
-         Flag::Type::AllowCodeGenerationFromString),
-    Flag("--abort-on-uncaught-exception", Flag::Type::AbortOnUncaughtException),
-    Flag("--expose-externalize-string", Flag::Type::ExposeExternalizeString),
-    FlagWithValues("--unhandled-rejections=", Flag::Type::UnhandledRejections),
-    Flag("--trace-debug", Flag::Type::LWNodeOther, true),
-    Flag("--debug", Flag::Type::LWNodeOther, true),
-    Flag("--stack-size=", Flag::Type::LWNodeOther, true),
-    Flag("--nolazy", Flag::Type::LWNodeOther, true),
-    // lwnode flags
-    Flag("--trace-gc", Flag::Type::TraceGC),
-    FlagWithNegativeValues("--trace-call=", Flag::Type::TraceCall, true),
-    Flag("--internal-log", Flag::Type::InternalLog),
-    Flag("--start-debug-server", Flag::Type::DebugServer),
-};
+void Flags::initFlags() {
+  // v8 flags
+  addFlag<Flag>("--expose-gc", Flag::Type::ExposeGC);
+  addFlag<Flag>("--use-strict", Flag::Type::UseStrict);
+  addFlag<Flag>("--off-idlegc", Flag::Type::DisableIdleGC);
+  addFlag<Flag>("--harmony-top-level-await", Flag::Type::TopLevelWait);
+  addFlag<Flag>("--allow-code-generation-from-strings",
+                Flag::Type::AllowCodeGenerationFromString);
+  addFlag<Flag>("--abort-on-uncaught-exception",
+                Flag::Type::AbortOnUncaughtException);
+  addFlag<Flag>("--expose-externalize-string",
+                Flag::Type::ExposeExternalizeString);
+  addFlag<FlagWithValues>("--unhandled-rejections=",
+                          Flag::Type::UnhandledRejections);
+  addFlag<Flag>("--trace-debug", Flag::Type::LWNodeOther, true);
+  addFlag<Flag>("--debug", Flag::Type::LWNodeOther, true);
+  addFlag<Flag>("--stack-size=", Flag::Type::LWNodeOther, true);
+  addFlag<Flag>("--nolazy", Flag::Type::LWNodeOther, true);
+
+  // lwnode flags
+  addFlag<Flag>("--trace-gc", Flag::Type::TraceGC);
+  addFlag<FlagWithNegativeValues>("--trace-call=", Flag::Type::TraceCall, true);
+  addFlag<Flag>("--internal-log", Flag::Type::InternalLog);
+  addFlag<Flag>("--start-debug-server", Flag::Type::DebugServer);
+}
 
 bool Flag::isPrefixOf(const std::string& name) {
   if (useAsPrefix_ && (name.find(name_) != std::string::npos)) {
@@ -56,8 +60,8 @@ Flag* Flags::findFlagObject(const std::string& name) {
   std::string normalized = name;
   std::replace(normalized.begin(), normalized.end(), '_', '-');
 
-  for (size_t i = 0; i < s_validFlags.size(); i++) {
-    Flag* flag = &s_validFlags[i];
+  for (size_t i = 0; i < validFlags_.size(); i++) {
+    Flag* flag = validFlags_[i].get();
     if ((flag->name() == normalized) || flag->isPrefixOf(normalized)) {
       return flag;
     }
@@ -67,8 +71,8 @@ Flag* Flags::findFlagObject(const std::string& name) {
 }
 
 Flag* Flags::findFlagObject(Flag::Type type) {
-  for (size_t i = 0; i < s_validFlags.size(); i++) {
-    Flag* flag = &s_validFlags[i];
+  for (size_t i = 0; i < validFlags_.size(); i++) {
+    Flag* flag = validFlags_[i].get();
     if (flag->type() == type) {
       return flag;
     }
index f27fa2602632370effabce2db5a9e90b5604848d..ae19ec31e34ef2b1b01a6070ec224f9bcfaa9e27 100644 (file)
@@ -53,6 +53,7 @@ class Flag {
 
   Flag(const std::string& name, Type type, bool useAsPrefix = false)
       : name_(name), type_(type), useAsPrefix_(useAsPrefix) {}
+  virtual ~Flag() {}
 
   virtual std::string name() { return name_; }
   virtual Type type() const { return type_; }
@@ -74,6 +75,7 @@ class FlagWithValues : public Flag {
  public:
   FlagWithValues(const std::string& name, Type type, bool useAsPrefix = false)
       : Flag(name, type, useAsPrefix) {}
+  virtual ~FlagWithValues() {}
 
   virtual void addValue(const std::string& value) override {
     values_.insert(value);
@@ -93,6 +95,7 @@ class FlagWithNegativeValues : public FlagWithValues {
                          Type type,
                          bool useAsPrefix = false)
       : FlagWithValues(name, type, useAsPrefix) {}
+  virtual ~FlagWithNegativeValues() {}
 
   void addNegativeValue(const std::string& value) override {
     negativeValues_.insert(value);
@@ -108,13 +111,15 @@ class FlagWithNegativeValues : public FlagWithValues {
 
 class LWNODE_EXPORT Flags {
  public:
-  static std::vector<Flag> s_validFlags;
   struct FlagComparator {
     bool operator()(const Flag* a, const Flag* b) const {
       return a->type() < b->type();
     }
   };
 
+  Flags() { initFlags(); }
+  virtual ~Flags() { validFlags_.clear(); }
+
   void add(const std::string& flag);
   void add(Flag::Type type);
   void add(Flag* flag);
@@ -122,14 +127,23 @@ class LWNODE_EXPORT Flags {
   bool isOn(Flag::Type type, const std::string& value = "");
   void shrinkArgumentList(int* argc, char** argv);
 
+  // NOTE: get() and set() are only used in cctest
   std::set<Flag*, FlagComparator> get() { return flags_; };
   void set(std::set<Flag*, FlagComparator> flags) { flags_ = flags; }
 
  private:
+  void initFlags();
   Flag* findFlagObject(const std::string& name);
   Flag* findFlagObject(Flag::Type type);
 
   Flag* getFlag(Flag::Type type);
+
+  template <class T>
+  void addFlag(const char* name, Flag::Type type, bool useAsPrefix = false) {
+    validFlags_.push_back(std::make_unique<T>(name, type, useAsPrefix));
+  }
+
+  std::vector<std::unique_ptr<Flag>> validFlags_;
   std::set<Flag*, FlagComparator> flags_;
 };
 
index 77c253e0bf7af3210bede69afcfb2e03172c69ca..a0ae9e7b886f0329a94983fd869a02df972e517a 100644 (file)
@@ -16,7 +16,7 @@
 
 #pragma once
 
-#include <assert.h>
+#include <cassert>
 #include "debug.h"
 #include "logger/trace.h"
 
diff --git a/lwnode/code/escargotshim/src/api/utils/sf-vector.h b/lwnode/code/escargotshim/src/api/utils/sf-vector.h
new file mode 100644 (file)
index 0000000..04395a2
--- /dev/null
@@ -0,0 +1,494 @@
+/*
+ * Copyright (c) 2017-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#pragma once
+
+#include <math.h>  // log21
+#include <cassert>
+#include <deque>
+#include <list>
+#include <map>
+#include <unordered_map>
+#include <unordered_set>
+#include <vector>
+
+namespace Starfish {
+
+template <typename T>
+struct VectorAllocInfo {
+ public:
+  VectorAllocInfo(T* buffer, size_t capacity)
+      : m_buffer(buffer), m_capacity(capacity) {}
+
+  T* m_buffer;
+  size_t m_capacity;
+};
+
+template <typename T, typename Allocator, bool isEraseStrategyStrict = false>
+class Vector {
+ protected:
+  typedef typename Allocator::template rebind<T>::other TAllocType;
+
+  // Types:
+ public:
+  typedef typename std::char_traits<T> traits_type;
+  typedef typename TAllocType::size_type size_type;
+  typedef typename TAllocType::difference_type difference_type;
+  typedef typename TAllocType::pointer pointer;
+  typedef typename TAllocType::const_pointer const_pointer;
+
+  typedef T* iterator;
+  typedef const T* const_iterator;
+  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+  typedef std::reverse_iterator<iterator> reverse_iterator;
+
+  Vector() : m_buffer(nullptr), m_size(0), m_capacity(0) { makeEmpty(); }
+
+  Vector(Vector<T, Allocator>&& other)
+      : m_buffer(other.m_buffer),
+        m_size(other.m_size),
+        m_capacity(other.m_capacity) {
+    other.m_buffer = nullptr;
+    other.m_size = 0;
+    other.m_capacity = 0;
+  }
+
+  Vector(const Vector<T, Allocator>& other)
+      : m_buffer(nullptr), m_size(0), m_capacity(0) {
+    if (other.m_size > 0) {
+      construct(other);
+    } else {
+      makeEmpty();
+    }
+  }
+
+  template <typename _InputIterator>
+  Vector(_InputIterator start, _InputIterator end)
+      : m_buffer(nullptr), m_size(0), m_capacity(0) {
+    construct(start, end);
+  }
+
+  Vector<T, Allocator>& operator=(const Vector<T, Allocator>& other) {
+    if (other.m_size > 0) {
+      deallocate();
+      construct(other);
+    } else {
+      clear();
+    }
+    return *this;
+  }
+
+  ~Vector() { deallocate(); }
+
+  void push_back(const T& val) { pushBack(val); }
+
+  void push_back(T&& val) { pushBack(val); }
+
+  template <class... Args>
+  void emplace_back(Args&&... args) {
+    pushBack(T(args...));
+  }
+
+  void emplace_back(T&& val) { pushBack(val); }
+
+  void insert(size_t pos, const T& val) {
+    assert(pos <= m_size);
+    insertImpl(pos, val);
+  }
+
+  template <class _Iterator>
+  void insert(_Iterator pos, const T& val) {
+    size_t npos = std::distance(begin(), pos);
+    insertImpl(npos, val);
+  }
+
+  template <class _Iterator, class _InputIterator>
+  void insert(_Iterator pos, _InputIterator first, _InputIterator last) {
+    size_t npos = std::distance(begin(), pos);
+    size_t l = std::distance(first, last);
+    for (size_t i = 0; i < l; i++) {
+      insertImpl(i + npos, *first);
+      first++;
+    }
+  }
+
+  template <class _InputIterator>
+  void assign(_InputIterator first, _InputIterator last) {
+    clear();
+    insert(begin(), first, last);
+  }
+
+  template <class _Iterator>
+  _Iterator erase(_Iterator first, _Iterator last) {
+    size_t start = first - _Iterator(data());
+    size_t end = last - _Iterator(data());
+
+    erase(start, end);
+
+    return _Iterator(this->m_buffer + start);
+  }
+
+  void erase(size_t pos) { erase(pos, pos + 1); }
+
+  void erase(size_t start, size_t end) {
+    if (start == end) return;
+    assert(start >= 0);
+    assert(end <= m_size);
+
+    size_t howMuch = end - start;
+    size_t newLen = m_size - howMuch;
+
+    if (howMuch == 0) {
+      return;
+    } else if (newLen == 0) {
+      clear();
+    } else {
+      if (isEraseStrategyStrict) {
+        eraseStrictImpl(start, howMuch);
+      } else {
+        eraseImpl(start, howMuch);
+      }
+    }
+  }
+
+  template <class _Iterator>
+  _Iterator erase(_Iterator pos) {
+    return erase(pos, pos + 1);
+  }
+
+  void erase(reverse_iterator pos) {
+    size_t start = size() - std::distance(rbegin(), pos) - 1;
+    size_t end = start + 1;
+    erase(start, end);
+  }
+
+  void erase(reverse_iterator pos, reverse_iterator pos2) {
+    size_t start = size() - std::distance(rbegin(), pos) - 1;
+    size_t end = size() - std::distance(rbegin(), pos2) - 1;
+    erase(start, end);
+  }
+
+  size_t size() const { return m_size; }
+
+  size_t capacity() const { return m_capacity; }
+
+  void shrink_to_fit() {}
+
+  iterator begin() { return iterator(data()); }
+
+  const_iterator cbegin() { return const_iterator(data()); }
+
+  const_iterator begin() const { return const_iterator(data()); }
+
+  T& front() { return *begin(); }
+
+  const T& front() const { return *begin(); }
+
+  iterator end() { return iterator(data() + m_size); }
+
+  const_iterator cend() { return const_iterator(data() + m_size); }
+
+  const_iterator end() const { return const_iterator(data() + m_size); }
+
+  reverse_iterator rbegin() { return reverse_iterator(end()); }
+
+  const_reverse_iterator rbegin() const {
+    return const_reverse_iterator(end());
+  }
+
+  reverse_iterator rend() { return reverse_iterator(begin()); }
+
+  const_reverse_iterator rend() const {
+    return const_reverse_iterator(begin());
+  }
+
+  T& back() { return *iterator(data() + m_size - 1); }
+
+  const T& back() const { return *const_iterator(data() + m_size - 1); }
+
+  bool empty() const { return m_size == 0; }
+
+  void pop_back() { erase(m_size - 1); }
+
+  T& operator[](const size_t& idx) {
+    assert(idx < m_size);
+    return m_buffer[idx];
+  }
+
+  const T& operator[](const size_t& idx) const {
+    assert(idx < m_size);
+    return m_buffer[idx];
+  }
+
+  T& at(const size_t& idx) {
+    assert(idx < m_size);
+    return m_buffer[idx];
+  }
+
+  const T& at(const size_t& idx) const {
+    assert(idx < m_size);
+    return m_buffer[idx];
+  }
+
+  void clear() { makeEmpty(); }
+
+  T* data() const { return m_buffer; }
+
+  void swap(Vector<T, Allocator>& other) {
+    std::swap(m_buffer, other.m_buffer);
+    std::swap(m_capacity, other.m_capacity);
+    std::swap(m_size, other.m_size);
+  }
+
+  bool operator==(const Vector<T, Allocator>& other) {
+    if (m_size != other.m_size) {
+      return false;
+    }
+    if (other.empty()) {
+      return true;
+    }
+    return std::equal(begin(), end(), other.begin());
+  }
+
+  bool operator!=(const Vector<T, Allocator>& other) {
+    return !(this == other);
+  }
+
+  void resize(size_t newSize) {
+    reserve(newSize);
+    for (size_t i = m_size; i < newSize; i++) {
+      new (&m_buffer[i]) T;
+    }
+    setLen(newSize);
+  }
+
+  void reserve(size_t newSize) {
+    if (newSize <= m_capacity) {
+      return;
+    }
+
+    size_t oldSize = m_size;
+    VectorAllocInfo<T> allocInfo = allocate(newSize);
+    for (size_t i = 0; i < m_size; i++) {
+      new (&allocInfo.m_buffer[i]) T(std::move(m_buffer[i]));
+    }
+    resetBuffer(allocInfo);
+    setLen(oldSize);
+  }
+
+ protected:
+  void makeEmpty() { deallocate(); }
+
+  size_t toCapacity(size_t size) const {
+    if (size == 0) {
+      return 1;
+    }
+    size_t base = log2l(size);
+    size_t capacity = 1 << (base + 1);
+    return capacity;
+  }
+
+  VectorAllocInfo<T> allocate(size_t size) const {
+    size_t capacity = toCapacity(size);
+    T* ret = Allocator().allocate(capacity);
+    return VectorAllocInfo<T>(ret, capacity);
+  }
+
+  void resetBuffer(const VectorAllocInfo<T>& info) {
+    deallocate();
+    m_buffer = info.m_buffer;
+    m_capacity = info.m_capacity;
+  }
+
+  template <typename _InputIterator>
+  void construct(_InputIterator start, _InputIterator end) {
+    typedef typename std::is_integral<_InputIterator> _Integral;
+    _construct(start, end, _Integral());
+  }
+
+  template <class _InIterator>
+  void _construct(_InIterator start, _InIterator end, std::false_type) {
+    typedef typename std::iterator_traits<_InIterator>::iterator_category _Tag;
+    return _construct(start, end, _Tag());
+  }
+
+  template <class _InIterator>
+  void _construct(_InIterator start,
+                  _InIterator end,
+                  std::forward_iterator_tag) {
+    const size_t distance = static_cast<size_t>(std::distance(start, end));
+    VectorAllocInfo<T> allocInfo = allocate(distance);
+    resetBuffer(allocInfo);
+    size_t len = 0;
+    for (; len < distance; len++) {
+      new (&m_buffer[len]) T(*(start + len));
+    }
+    setLen(len);
+  }
+
+  void construct(const Vector<T, Allocator>& other) {
+    construct(other.begin(), other.end());
+  }
+
+  void eraseStrictImpl(size_t start, size_t sizeToErase) {
+    // @note this drops unused memory immediately
+
+    size_t end = start + sizeToErase;
+    assert(start < end);
+    assert(start >= 0);
+    assert(end <= m_size);
+
+    size_t c = end - start;
+    size_t newLen = m_size - c;
+
+    if (newLen > 0) {
+      VectorAllocInfo<T> newBuffer = allocate(newLen);
+      for (size_t i = 0; i < start; i++) {
+        new (&newBuffer.m_buffer[i]) T(m_buffer[i]);
+      }
+
+      for (size_t i = end; i < m_size; i++) {
+        new (&newBuffer.m_buffer[i - c]) T(m_buffer[i]);
+      }
+
+      for (size_t i = 0; i < m_size; i++) {
+        m_buffer[i].~T();
+      }
+
+      m_buffer = newBuffer.m_buffer;
+      m_capacity = newBuffer.m_capacity;
+      m_size = newLen;
+    } else {
+      clear();
+    }
+  }
+
+  void eraseImpl(size_t start, size_t sizeToErase) {
+    // @note this drops unused memory when newLen < (m_capacity / 2)
+
+    size_t end = start + sizeToErase;
+    assert(start < end);
+    assert(start >= 0);
+    assert(end <= m_size);
+
+    size_t c = end - start;
+    size_t newLen = m_size - c;
+    if (newLen == 0) {
+      clear();
+    } else if (newLen < (m_capacity / 2)) {
+      VectorAllocInfo<T> newBuffer = allocate(newLen);
+      for (size_t i = 0; i < start; i++) {
+        new (&newBuffer.m_buffer[i]) T(m_buffer[i]);
+      }
+
+      for (size_t i = end; i < m_size; i++) {
+        new (&newBuffer.m_buffer[i - c]) T(m_buffer[i]);
+      }
+
+      for (size_t i = 0; i < m_size; i++) {
+        m_buffer[i].~T();
+      }
+
+      m_buffer = newBuffer.m_buffer;
+      m_capacity = newBuffer.m_capacity;
+      m_size = newLen;
+    } else {
+      for (size_t i = 0; i < sizeToErase; i++) {
+        size_t idx = i + start;
+        size_t nextIdx = i + start + sizeToErase;
+        if (nextIdx < m_size) {
+          m_buffer[idx] = std::move(m_buffer[nextIdx]);
+          m_buffer[nextIdx].~T();
+        } else {
+          m_buffer[idx].~T();
+        }
+      }
+
+      for (size_t i = end; i < m_size; i++) {
+        size_t idx = i;
+        size_t nextIdx = i + sizeToErase;
+        if (nextIdx < m_size) {
+          m_buffer[idx] = std::move(m_buffer[nextIdx]);
+          m_buffer[nextIdx].~T();
+        } else {
+          m_buffer[idx].~T();
+        }
+      }
+
+      m_size = newLen;
+    }
+  }
+
+  void insertImpl(size_t pos, const T& v) {
+    assert(pos <= m_size);
+
+    size_t newLen = m_size + 1;
+
+    if (capacity() < newLen) {
+      reserve(newLen);
+    }
+
+    for (size_t i = m_size; i > pos; i--) {
+      m_buffer[i] = m_buffer[i - 1];
+    }
+
+    new (&m_buffer[pos]) T(v);
+    setLen(newLen);
+  }
+
+  void setLen(size_t newLen) {
+    for (size_t i = newLen; i < m_size; i++) {
+      m_buffer[i].~T();
+    }
+    m_size = newLen;
+  }
+
+  void pushBack(const T& val) {
+    size_t newLen = m_size + 1;
+    reserve(newLen);
+    new (&m_buffer[newLen - 1]) T(val);
+    setLen(newLen);
+  }
+
+  void pushBack(T&& val) {
+    size_t newLen = m_size + 1;
+    reserve(newLen);
+    new (&m_buffer[newLen - 1]) T(std::move(val));
+    setLen(newLen);
+  }
+
+  // Important! `m_size` update should follow `deallocate()`
+  void deallocate() {
+    for (size_t i = 0; i < m_size; i++) {
+      m_buffer[i].~T();
+    }
+    if (m_buffer) {
+      Allocator().deallocate(m_buffer, m_capacity);
+    }
+    m_buffer = nullptr;
+    m_size = 0;
+    m_capacity = 0;
+  }
+
+  T* m_buffer;
+  size_t m_size;
+  size_t m_capacity;
+};
+
+}  // namespace Starfish
index eb3c0aba1ae4930fd82fa036138bffc37e65c776..88ce19e494da425caf38b69025b9eb680a0882c9 100644 (file)
@@ -69,7 +69,7 @@ class ValueWrap;
 #define API_HANDLE_EXCEPTION(eval_result, lwIsolate, bailout_value)            \
   if (!eval_result.isSuccessful()) {                                           \
     __DLOG_EVAL_EXCEPTION(eval_result);                                        \
-    lwIsolate->handleException(eval_result);                                   \
+    lwIsolate->handleException(std::move(eval_result));                        \
     return bailout_value;                                                      \
   }
 
index efacf2007330227a7fc09759783e0c3378b46454..f3946c7c03bf5efc33cbdafee7c87417c40e2310 100644 (file)
@@ -20,7 +20,7 @@
 #include <mutex>
 #include <thread>
 
-#include "api/utils/gc.h"
+#include "api/utils/gc-util.h"
 
 namespace EscargotShim {
 
index 8611513e855928ab9c72252d189c6505eb34ab9e..66a6c62f92277e1e97af9a6c6c941cd28c4c9875 100644 (file)
@@ -158,6 +158,36 @@ static ValueRef* CreateReloadableSourceFromFile(ExecutionStateRef* state,
   return ValueRef::createUndefined();
 }
 
+static ValueRef* getGCMemoryStats(ExecutionStateRef* state,
+                                  ValueRef* thisValue,
+                                  size_t argc,
+                                  ValueRef** argv,
+                                  bool isConstructCall) {
+  auto context = state->context();
+  auto object = ObjectRefHelper::create(context);
+
+  // GC_heapsize - GC_unmapped_bytes
+  ObjectRefHelper::setProperty(context,
+                               object,
+                               StringRef::createFromASCII("heapSize"),
+                               ValueRef::create(GC_get_heap_size()))
+      .check();
+
+  ObjectRefHelper::setProperty(context,
+                               object,
+                               StringRef::createFromASCII("unmappedBytes"),
+                               ValueRef::create(GC_get_unmapped_bytes()))
+      .check();
+
+  ObjectRefHelper::setProperty(context,
+                               object,
+                               StringRef::createFromASCII("bytesSinceGC"),
+                               ValueRef::create(GC_get_bytes_since_gc()))
+      .check();
+
+  return ValueRef::create(object);
+}
+
 static ValueRef* checkIfHandledAsOneByteString(ExecutionStateRef* state,
                                                ValueRef* thisValue,
                                                size_t argc,
@@ -189,6 +219,7 @@ void InitializeProcessMethods(Local<Object> target, Local<Context> context) {
             "CreateReloadableSourceFromFile",
             CreateReloadableSourceFromFile);
 #endif
+  SetMethod(esContext, esTarget, "getGCMemoryStats", getGCMemoryStats);
 }
 
 void IdleGC(v8::Isolate* isolate) {
diff --git a/lwnode/modules/device-api/CMakeLists.txt b/lwnode/modules/device-api/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b8bf11c
--- /dev/null
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 2.8)
+set (CMAKE_CXX_STANDARD 11)
+project (device-api)
+
+find_package (PkgConfig REQUIRED)
+pkg_check_modules(PACKAGES REQUIRED dlog)
+
+set(CMAKE_C_FLAGS "-std=gnu++14 -fPIE -Wno-invalid-offsetof -Wno-error=format=")
+
+add_definitions(-DBUILDING_NODE_EXTENSION -DNDEBUG)
+include_directories(${LWNODE_INCLUDES})
+
+file (GLOB_RECURSE SOURCE_FILES src/*.cpp)
+include_directories(
+  ../../../src
+  ../../code/escargotshim/deps/escargot/src/api
+  ../../code/escargotshim/deps/escargot/third_party/GCutil
+  ../../code/escargotshim/deps/escargot/third_party/GCutil/bdwgc/include
+  include
+  ${PACKAGES_INCLUDE_DIRS}
+)
+
+
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
+target_link_libraries(${PROJECT_NAME} dlog)
diff --git a/lwnode/modules/device-api/src/DeviceAPIModule.cpp b/lwnode/modules/device-api/src/DeviceAPIModule.cpp
new file mode 100644 (file)
index 0000000..5aa8af0
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2022-present Samsung Electronics Co., Ltd
+ *
+ * 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.
+ */
+
+#include <js_native_api.h>
+#include <node_api.h>
+#include <lwnode_api.h>
+#include "TizenDeviceAPILoaderForEscargot.h"
+#include "lwnode/lwnode.h"
+
+using namespace LWNode;
+
+static napi_value InitMethod(napi_env env, napi_callback_info info) {
+  napi_status status;
+  napi_context context;
+
+  status = napi_get_context(env, context);
+  assert(status == napi_ok);
+
+  auto esContext = Utils::ToEsContext(context);
+
+  auto instance = DeviceAPI::ExtensionManagerInstanceGet(esContext);
+  if (!instance) {
+    DeviceAPI::initialize(esContext);
+  }
+
+  return nullptr;
+}
+
+#define DECLARE_NAPI_METHOD(name, func)                          \
+  { name, 0, func, 0, 0, 0, napi_default, 0 }
+
+napi_value InitModule(napi_env env, napi_value exports) {
+  napi_status status;
+  napi_property_descriptor desc = DECLARE_NAPI_METHOD("init", InitMethod);
+  status = napi_define_properties(env, exports, 1, &desc);
+  assert(status == napi_ok);
+  return exports;
+}
+
+NAPI_MODULE(NODE_GYP_MODULE_NAME, InitModule)
diff --git a/lwnode/modules/device-api/src/Extension.cpp b/lwnode/modules/device-api/src/Extension.cpp
new file mode 100644 (file)
index 0000000..644a534
--- /dev/null
@@ -0,0 +1,317 @@
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "Extension.h"
+
+#include <dlfcn.h>
+
+#include "TizenDeviceAPIBase.h"
+#include "ExtensionAdapter.h"
+#include "EscargotPublic.h"
+#include "TizenDeviceAPILoaderForEscargot.h"
+
+namespace wrt {
+namespace xwalk {
+
+Extension::Extension(const std::string& path, RuntimeVariableProvider* provider)
+    : initialized_(false),
+      library_path_(path),
+      xw_extension_(0),
+      use_trampoline_(true),
+      created_instance_callback_(NULL),
+      destroyed_instance_callback_(NULL),
+      shutdown_callback_(NULL),
+      handle_msg_callback_(NULL),
+      handle_sync_msg_callback_(NULL),
+      rv_provider_(provider) {}
+
+Extension::Extension(const std::string& path, const std::string& name,
+                     const std::vector<std::string>& entry_points,
+                     RuntimeVariableProvider* provider)
+    : initialized_(false),
+      handle_(NULL),
+      library_path_(path),
+      xw_extension_(0),
+      name_(name),
+      entry_points_(entry_points),
+      use_trampoline_(true),
+      created_instance_callback_(NULL),
+      destroyed_instance_callback_(NULL),
+      shutdown_callback_(NULL),
+      handle_msg_callback_(NULL),
+      handle_sync_msg_callback_(NULL),
+      rv_provider_(provider) {}
+
+Extension::~Extension() {
+  if (!initialized_) return;
+
+  if (handle_) dlclose(handle_);
+
+  if (shutdown_callback_) shutdown_callback_(xw_extension_);
+  ExtensionAdapter::GetInstance()->UnregisterExtension(this);
+}
+
+bool Extension::Initialize() {
+  if (initialized_) return true;
+
+  DEVICEAPI_LOG_INFO("========== << Initialize >> ENTER ==========");
+  DEVICEAPI_SLOG_INFO("Extension Module library : [%s]", library_path_.c_str());
+
+  DEVICEAPI_ASSERT(handle_ == NULL);
+  handle_ = dlopen(library_path_.c_str(), RTLD_LAZY);
+  if (!handle_) {
+    const char* error = (const char*)dlerror();
+    DEVICEAPI_LOG_ERROR("Error loading extension '%s'. Reason: %s",
+                        library_path_.c_str(),
+                        (error != NULL ? error : "unknown"));
+    return false;
+  }
+
+  XW_Initialize_Func initialize =
+      reinterpret_cast<XW_Initialize_Func>(dlsym(handle_, "XW_Initialize"));
+  if (!initialize) {
+    DEVICEAPI_LOG_ERROR("Error loading extension");
+    DEVICEAPI_SLOG_ERROR("[%s] couldn't get XW_Initialize function",
+                         library_path_.c_str());
+    dlclose(handle_);
+    handle_ = NULL;
+    return false;
+  }
+
+  ExtensionAdapter* adapter = ExtensionAdapter::GetInstance();
+  xw_extension_ = adapter->GetNextXWExtension();
+  adapter->RegisterExtension(this);
+
+  int ret = initialize(xw_extension_, ExtensionAdapter::GetInterface);
+  if (ret != XW_OK) {
+    DEVICEAPI_LOG_ERROR("Error loading extension");
+    DEVICEAPI_SLOG_ERROR("[%s] XW_Initialize function returned error value.",
+                         library_path_.c_str());
+    dlclose(handle_);
+    handle_ = NULL;
+    return false;
+  }
+
+  initialized_ = true;
+  DEVICEAPI_LOG_INFO("========== << Initialize >> END ==========");
+  return true;
+}
+
+ExtensionInstance* Extension::CreateInstance() {
+  Initialize();
+  ExtensionAdapter* adapter = ExtensionAdapter::GetInstance();
+  XW_Instance xw_instance = adapter->GetNextXWInstance();
+  return new ExtensionInstance(this, xw_instance);
+}
+
+void Extension::GetRuntimeVariable(const char* key, char* value,
+                                   size_t value_len) {
+  if (rv_provider_) {
+    rv_provider_->GetRuntimeVariable(key, value, value_len);
+  }
+}
+
+int Extension::CheckAPIAccessControl(const char* /*api_name*/) {
+  // TODO
+  return XW_OK;
+}
+
+int Extension::RegisterPermissions(const char* /*perm_table*/) {
+  // TODO
+  return XW_OK;
+}
+
+ExtensionInstance::ExtensionInstance(Extension* extension,
+                                     XW_Instance xw_instance)
+    : extension_(extension),
+      xw_instance_(xw_instance),
+      instance_data_(NULL),
+      post_message_listener_(NULL),
+      post_data_listener_(NULL) {
+  DEVICEAPI_LOG_INFO("Enter");
+  ExtensionAdapter::GetInstance()->RegisterInstance(this);
+  XW_CreatedInstanceCallback callback = extension_->created_instance_callback_;
+  if (callback) callback(xw_instance_);
+}
+
+ExtensionInstance::~ExtensionInstance() {
+  DEVICEAPI_LOG_INFO("Enter");
+  XW_DestroyedInstanceCallback callback =
+      extension_->destroyed_instance_callback_;
+  if (callback) callback(xw_instance_);
+  ExtensionAdapter::GetInstance()->UnregisterInstance(this);
+}
+
+void ExtensionInstance::HandleMessage(const std::string& msg) {
+  XW_HandleMessageCallback callback = extension_->handle_msg_callback_;
+  if (callback) callback(xw_instance_, msg.c_str());
+}
+
+void ExtensionInstance::HandleSyncMessage(const std::string& msg) {
+  XW_HandleSyncMessageCallback callback = extension_->handle_sync_msg_callback_;
+  if (callback) {
+    sync_reply_msg_.clear();
+    callback(xw_instance_, msg.c_str());
+  }
+}
+
+void ExtensionInstance::PostMessage(const std::string& msg) {
+  if (post_message_listener_) {
+    post_message_listener_->PostMessageToJS(msg);
+  }
+}
+
+void ExtensionInstance::SyncReply(const std::string& reply) {
+  sync_reply_msg_ = reply;
+}
+
+void ExtensionInstance::HandleData(const std::string& msg, uint8_t* buffer,
+                                   size_t len) {
+  XW_HandleDataCallback callback = extension_->handle_data_callback_;
+  if (callback) callback(xw_instance_, msg.c_str(), buffer, len);
+}
+
+void ExtensionInstance::HandleSyncData(const std::string& msg, uint8_t* buffer,
+                                       size_t len) {
+  XW_HandleDataCallback callback = extension_->handle_sync_data_callback_;
+  if (callback) {
+    sync_reply_msg_.clear();
+    sync_reply_buffer_len_ = 0;
+    sync_reply_buffer_ = NULL;
+    // sync_reply_buffer_ will be freed by XWalkExtensionModule
+    callback(xw_instance_, msg.c_str(), buffer, len);
+  }
+}
+
+void ExtensionInstance::PostData(const std::string& msg, uint8_t* buffer,
+                                 size_t len) {
+  if (post_data_listener_) {
+    post_data_listener_->PostDataToJS(msg, buffer, len);
+  }
+}
+
+void ExtensionInstance::SyncDataReply(const std::string& reply, uint8_t* buffer,
+                                      size_t len) {
+  sync_reply_msg_ = reply;
+  sync_reply_buffer_ = buffer;
+  sync_reply_buffer_len_ = len;
+}
+
+}  // namespace xwalk
+}  // namespace wrt
+
+namespace DeviceAPI {
+
+ESPostListener::ESPostListener(Escargot::ContextRef* context,
+                               Escargot::ObjectRef* listener)
+    : context_(context), listener_(listener) {
+  DEVICEAPI_LOG_INFO("Enter");
+  GC_add_roots(&listener_, &listener_ + sizeof(Escargot::ObjectRef*));
+}
+
+ESPostListener::~ESPostListener() {
+  DEVICEAPI_LOG_INFO("Enter");
+  finalize();
+}
+
+void ESPostListener::finalize() {
+  DEVICEAPI_LOG_INFO("Enter");
+  GC_remove_roots(&listener_, &listener_ + sizeof(Escargot::ObjectRef*));
+  listener_ = nullptr;
+  context_ = nullptr;
+}
+
+ESPostMessageListener::IdlerRegister_t
+    ESPostMessageListener::AddIdlerToMainThread = nullptr;
+
+void ESPostMessageListener::PostMessageToJS(const std::string& msg) {
+  DEVICEAPI_LOG_INFO(
+      "ESPostMessageListener::PostMessageToJS (msg %s listener %p context "
+      "%p)",
+      msg.c_str(), listener_, context_);
+
+  ExtensionManagerInstance* extensionManagerInstance =
+      ExtensionManagerInstance::get(context_);
+  if (!extensionManagerInstance) {
+    return;
+  }
+
+  struct Params {
+    Escargot::ContextRef* context;
+    Escargot::ObjectRef* listener;
+    std::string msg;
+  };
+
+  Params* params = new Params();
+  params->context = context_;
+  params->listener = listener_;
+  params->msg = msg;
+  DEVICEAPI_LOG_INFO("Post message");
+
+  if (AddIdlerToMainThread) {
+    AddIdlerToMainThread(
+        [](void* data) {
+          DEVICEAPI_LOG_INFO("Add idle\n");
+          Params* params = (Params*)data;
+          Escargot::ContextRef* context = params->context;
+
+          auto result = Escargot::Evaluator::execute(
+              context,
+              [](Escargot::ExecutionStateRef* state,
+                 Params* params) -> Escargot::ValueRef* {
+                Escargot::ObjectRef* listener = params->listener;
+                std::string msg = params->msg;
+                Escargot::ValueRef* arguments[] = {Escargot::ValueRef::create(
+                    Escargot::StringRef::createFromASCII(msg.c_str(),
+                                                         msg.size()))};
+                return listener->call(state, Escargot::ValueRef::createNull(),
+                                      1, arguments);
+              },
+              params);
+          if (result.error.hasValue()) {
+            DEVICEAPI_LOG_ERROR("Uncaught %s\n",
+                                result.resultOrErrorToString(context)
+                                    ->toStdUTF8String()
+                                    .c_str());
+          }
+
+          delete params;
+          return 0;
+        },
+        params);
+  } else {
+    DEVICEAPI_LOG_WARN("idler is ignored.\n");
+  }
+}
+
+void ESPostDataListener::PostDataToJS(const std::string& msg, uint8_t* buffer,
+                                      size_t len) {
+  DEVICEAPI_LOG_INFO("ESPostDataListener::PostDataToJS (%s, %zu)", msg.c_str(),
+                     len);
+
+  ExtensionManagerInstance* extensionManagerInstance =
+      ExtensionManagerInstance::get(context_);
+  if (!extensionManagerInstance) {
+    return;
+  }
+
+  auto result = Escargot::Evaluator::execute(
+      context_, [](Escargot::ExecutionStateRef* state) -> Escargot::ValueRef* {
+#if 0
+            Escargot::ValueRef* arguments[] = {Escargot::ValueRef::create(Escargot::StringRef::createFromASCII(msg.c_str(), msg.size()))};
+            return listener_->call(state, Escargot::ValueRef::createNull(), 1, arguments);
+#else
+            DEVICEAPI_LOG_ERROR("NOT IMPLEMENTED");
+            DEVICEAPI_ASSERT_SHOULD_NOT_BE_HERE();
+            return Escargot::ValueRef::createUndefined();
+#endif
+      });
+  if (result.error.hasValue()) {
+    DEVICEAPI_LOG_ERROR(
+        "Uncaught %s\n",
+        result.resultOrErrorToString(context_)->toStdUTF8String().c_str());
+  }
+}
+
+}  // namespace DeviceAPI
diff --git a/lwnode/modules/device-api/src/Extension.h b/lwnode/modules/device-api/src/Extension.h
new file mode 100644 (file)
index 0000000..4daf5c2
--- /dev/null
@@ -0,0 +1,253 @@
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WRT_SERVICE_NODE_EXTENSION_H_
+#define WRT_SERVICE_NODE_EXTENSION_H_
+
+#include <string>
+#include <vector>
+
+#include "XW_Extension.h"
+#include "XW_Extension_SyncMessage.h"
+#include "XW_Extension_Data.h"
+
+namespace wrt {
+class RuntimeVariableProvider;
+
+namespace xwalk {
+
+    class ExtensionAdapter;
+    class ExtensionInstance;
+
+    class Extension {
+    public:
+        class RuntimeVariableProvider {
+        public:
+            virtual void GetRuntimeVariable(const char* key, char* value, size_t value_len) = 0;
+        };
+
+        Extension(const std::string& path, RuntimeVariableProvider* provider);
+        Extension(const std::string& path, const std::string& name,
+                  const std::vector<std::string>& entry_points,
+                  RuntimeVariableProvider* provider);
+
+        virtual ~Extension();
+
+        bool Initialize();
+        ExtensionInstance* CreateInstance();
+
+        XW_Extension xw_extension()
+        {
+            return xw_extension_;
+        }
+
+        std::string name()
+        {
+            return name_;
+        }
+
+        std::string javascript_api()
+        {
+            Initialize();
+            return javascript_api_;
+        }
+
+        std::vector<std::string>& entry_points()
+        {
+            return entry_points_;
+        }
+
+        bool use_trampoline()
+        {
+            return use_trampoline_;
+        }
+
+        void set_name(const std::string& name)
+        {
+            name_ = name;
+        }
+
+        void set_javascript_api(const std::string& javascript_api)
+        {
+            javascript_api_ = javascript_api;
+        }
+
+        void set_use_trampoline(bool use_trampoline)
+        {
+            use_trampoline_ = use_trampoline;
+        }
+
+    private:
+        friend class ExtensionAdapter;
+        friend class ExtensionInstance;
+
+        void GetRuntimeVariable(const char* key, char* value, size_t value_len);
+        int CheckAPIAccessControl(const char* api_name);
+        int RegisterPermissions(const char* perm_table);
+
+        bool initialized_{ false };
+        void* handle_{ nullptr };
+        std::string library_path_;
+
+        XW_Extension xw_extension_{ 0 };
+        std::string name_;
+        std::string javascript_api_;
+        std::vector<std::string> entry_points_;
+        bool use_trampoline_{ true };
+
+        XW_CreatedInstanceCallback created_instance_callback_{ nullptr };
+        XW_DestroyedInstanceCallback destroyed_instance_callback_{ nullptr };
+        XW_ShutdownCallback shutdown_callback_{ nullptr };
+        XW_HandleMessageCallback handle_msg_callback_{ nullptr };
+        XW_HandleSyncMessageCallback handle_sync_msg_callback_{ nullptr };
+        XW_HandleDataCallback handle_data_callback_{ nullptr };
+        XW_HandleDataCallback handle_sync_data_callback_{ nullptr };
+        RuntimeVariableProvider* rv_provider_{ nullptr };
+        XW_HandleBinaryMessageCallback handle_binary_msg_callback_{ nullptr };
+    };
+
+    class PostMessageListener {
+    public:
+        virtual void PostMessageToJS(const std::string& msg) = 0;
+    };
+
+    class PostDataListener {
+    public:
+        virtual void PostDataToJS(const std::string& msg, uint8_t* buffer,
+                                  size_t len) = 0;
+    };
+
+    class ExtensionInstance {
+    public:
+        ExtensionInstance(Extension* extension, XW_Instance xw_instance);
+        virtual ~ExtensionInstance();
+
+        void HandleMessage(const std::string& msg);
+        void HandleSyncMessage(const std::string& msg);
+
+        void HandleData(const std::string& msg, uint8_t* buffer, size_t len);
+        void HandleSyncData(const std::string& msg, uint8_t* buffer,
+                            size_t len);
+
+        XW_Instance xw_instance()
+        {
+            return xw_instance_;
+        }
+
+        std::string sync_replay_msg()
+        {
+            return sync_reply_msg_;
+        }
+
+        std::string sync_data_reply_msg(uint8_t** buffer, size_t* len)
+        {
+            *buffer = sync_reply_buffer_;
+            *len = sync_reply_buffer_len_;
+            return sync_reply_msg_;
+        }
+
+        void set_post_message_listener(PostMessageListener* listener)
+        {
+            post_message_listener_ = listener;
+        }
+
+        void set_post_data_listener(PostDataListener* listener)
+        {
+            post_data_listener_ = listener;
+        }
+
+    private:
+        friend class ExtensionAdapter;
+
+        void PostMessage(const std::string& msg);
+        void SyncReply(const std::string& reply);
+
+        void PostData(const std::string& msg, uint8_t* buffer, size_t len);
+        void SyncDataReply(const std::string& reply, uint8_t* buffer,
+                           size_t len);
+
+        Extension* extension_;
+        XW_Instance xw_instance_;
+        void* instance_data_;
+        std::string sync_reply_msg_;
+        uint8_t* sync_reply_buffer_;
+        size_t sync_reply_buffer_len_;
+
+        PostMessageListener* post_message_listener_;
+        PostDataListener* post_data_listener_;
+    };
+
+} // namespace xwalk
+} // namespace wrt
+
+namespace Escargot {
+class ContextRef;
+class ObjectRef;
+}
+
+namespace DeviceAPI {
+
+class ESPostListener {
+public:
+    virtual ~ESPostListener();
+    void finalize();
+
+protected:
+    ESPostListener(Escargot::ContextRef* context,
+                   Escargot::ObjectRef* listener);
+
+    Escargot::ContextRef* context_;
+    Escargot::ObjectRef* listener_;
+};
+
+class ESPostMessageListener : public wrt::xwalk::PostMessageListener,
+                              public ESPostListener {
+public:
+    static ESPostMessageListener* create(Escargot::ContextRef* context,
+                                         Escargot::ObjectRef* listener)
+    {
+        return new ESPostMessageListener(context, listener);
+    }
+    void PostMessageToJS(const std::string& msg);
+
+    // @escargot
+    typedef int (*Idler_t)(void* data);
+    typedef void (*IdlerRegister_t)(Idler_t idler, void* data);
+    static void SetMainThreadIdlerRegister(IdlerRegister_t idlerRegister)
+    {
+        AddIdlerToMainThread = idlerRegister;
+    }
+
+private:
+    ESPostMessageListener(Escargot::ContextRef* context,
+                          Escargot::ObjectRef* listener)
+        : ESPostListener(context, listener)
+    {
+    }
+
+    // @escargot
+    static IdlerRegister_t AddIdlerToMainThread;
+};
+
+class ESPostDataListener : public wrt::xwalk::PostDataListener,
+                           public ESPostListener {
+public:
+    static ESPostDataListener* create(Escargot::ContextRef* context,
+                                      Escargot::ObjectRef* listener)
+    {
+        return new ESPostDataListener(context, listener);
+    }
+    void PostDataToJS(const std::string& msg, uint8_t* buffer, size_t len);
+
+private:
+    ESPostDataListener(Escargot::ContextRef* context,
+                       Escargot::ObjectRef* listener)
+        : ESPostListener(context, listener)
+    {
+    }
+};
+
+} // namespace DeviceAPI
+
+#endif // WRT_SERVICE_NODE_EXTENSION_H_
diff --git a/lwnode/modules/device-api/src/ExtensionAdapter.cpp b/lwnode/modules/device-api/src/ExtensionAdapter.cpp
new file mode 100644 (file)
index 0000000..b6b3d62
--- /dev/null
@@ -0,0 +1,368 @@
+// Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "TizenDeviceAPIBase.h"
+#include "TizenDeviceAPILoaderForEscargot.h"
+#include "ExtensionAdapter.h"
+
+namespace wrt {
+namespace xwalk {
+
+    ExtensionAdapter::ExtensionAdapter()
+        : next_xw_extension_(1)
+        , next_xw_instance_(1)
+    {
+    }
+
+    ExtensionAdapter::~ExtensionAdapter()
+    {
+    }
+
+    ExtensionAdapter* ExtensionAdapter::GetInstance()
+    {
+        static ExtensionAdapter self;
+        return &self;
+    }
+
+    XW_Extension ExtensionAdapter::GetNextXWExtension()
+    {
+        return next_xw_extension_++;
+    }
+
+    XW_Instance ExtensionAdapter::GetNextXWInstance()
+    {
+        return next_xw_instance_++;
+    }
+
+    void ExtensionAdapter::RegisterExtension(Extension* extension)
+    {
+        XW_Extension xw_extension = extension->xw_extension();
+        if (!(xw_extension > 0 && xw_extension < next_xw_extension_)) {
+            DEVICEAPI_LOG_WARN("xw_extension (%d) is invalid.", xw_extension);
+            return;
+        }
+        if (extension_map_.find(xw_extension) == extension_map_.end())
+            extension_map_[xw_extension] = extension;
+    }
+
+    void ExtensionAdapter::UnregisterExtension(Extension* extension)
+    {
+        XW_Extension xw_extension = extension->xw_extension();
+        if (!(xw_extension > 0 && xw_extension < next_xw_extension_)) {
+            DEVICEAPI_LOG_WARN("xw_extension (%d) is invalid.", xw_extension);
+            return;
+        }
+        if (extension_map_.find(xw_extension) != extension_map_.end())
+            extension_map_.erase(xw_extension);
+    }
+
+    void ExtensionAdapter::RegisterInstance(ExtensionInstance* instance)
+    {
+        XW_Instance xw_instance = instance->xw_instance();
+        if (!(xw_instance > 0 && xw_instance < next_xw_instance_)) {
+            DEVICEAPI_LOG_WARN("xw_instance (%d) is invalid.", xw_instance);
+            return;
+        }
+        if (instance_map_.find(xw_instance) == instance_map_.end())
+            instance_map_[xw_instance] = instance;
+    }
+
+    void ExtensionAdapter::UnregisterInstance(ExtensionInstance* instance)
+    {
+        XW_Instance xw_instance = instance->xw_instance();
+        if (!(xw_instance > 0 && xw_instance < next_xw_instance_)) {
+            DEVICEAPI_LOG_WARN("xw_instance (%d) is invalid.", xw_instance);
+            return;
+        }
+        if (instance_map_.find(xw_instance) != instance_map_.end())
+            instance_map_.erase(xw_instance);
+    }
+
+    const void* ExtensionAdapter::GetInterface(const char* name)
+    {
+        if (!strcmp(name, XW_CORE_INTERFACE_1)) {
+            static const XW_CoreInterface_1 coreInterface1 = {
+                CoreSetExtensionName,          CoreSetJavaScriptAPI,
+                CoreRegisterInstanceCallbacks, CoreRegisterShutdownCallback,
+                CoreSetInstanceData,           CoreGetInstanceData
+            };
+            return &coreInterface1;
+        }
+
+        if (!strcmp(name, XW_MESSAGING_INTERFACE_1)) {
+            static const XW_MessagingInterface_1 messagingInterface1 = {
+                MessagingRegister, MessagingPostMessage
+            };
+            return &messagingInterface1;
+        }
+
+        if (!strcmp(name, XW_MESSAGING_INTERFACE_2)) {
+            static const XW_MessagingInterface_2 messagingInterface2 = {
+            MessagingRegister,
+            MessagingPostMessage,
+            MessagingRegisterBinaryMessageCallback,
+            MessagingPostBinaryMessage
+        };
+        return &messagingInterface2;
+        }
+
+        if (!strcmp(name, XW_INTERNAL_SYNC_MESSAGING_INTERFACE_1)) {
+            static const XW_Internal_SyncMessagingInterface_1
+                syncMessagingInterface1 = { SyncMessagingRegister,
+                                            SyncMessagingSetSyncReply };
+            return &syncMessagingInterface1;
+        }
+
+        if (!strcmp(name, XW_INTERNAL_ENTRY_POINTS_INTERFACE_1)) {
+            static const XW_Internal_EntryPointsInterface_1
+                entryPointsInterface1 = { EntryPointsSetExtraJSEntryPoints };
+            return &entryPointsInterface1;
+        }
+
+        if (!strcmp(name, XW_INTERNAL_RUNTIME_INTERFACE_1)) {
+            static const XW_Internal_RuntimeInterface_1 runtimeInterface1 = {
+                RuntimeGetStringVariable
+            };
+            return &runtimeInterface1;
+        }
+
+        if (!strcmp(name, XW_INTERNAL_PERMISSIONS_INTERFACE_1)) {
+            static const XW_Internal_PermissionsInterface_1
+                permissionsInterface1 = { PermissionsCheckAPIAccessControl,
+                                          PermissionsRegisterPermissions };
+            return &permissionsInterface1;
+        }
+
+        if (!strcmp(name, XW_INTERNAL_DATA_INTERFACE_1)) {
+            static const XW_Internal_DataInterface_1 dataInterface1 = {
+                DataRegisterSync, DataRegisterAsync, DataSetSyncReply,
+                DataPostData
+            };
+            return &dataInterface1;
+        }
+
+        DEVICEAPI_LOG_WARN("Interface '%s' is not supported.", name);
+        return NULL;
+    }
+
+    Extension* ExtensionAdapter::GetExtension(XW_Extension xw_extension)
+    {
+        ExtensionAdapter* adapter = ExtensionAdapter::GetInstance();
+        ExtensionMap::iterator it = adapter->extension_map_.find(xw_extension);
+        if (it == adapter->extension_map_.end())
+            return NULL;
+        return it->second;
+    }
+
+    ExtensionInstance* ExtensionAdapter::GetExtensionInstance(
+        XW_Instance xw_instance)
+    {
+        ExtensionAdapter* adapter = ExtensionAdapter::GetInstance();
+        InstanceMap::iterator it = adapter->instance_map_.find(xw_instance);
+        if (it == adapter->instance_map_.end())
+            return NULL;
+        return it->second;
+    }
+
+#define CHECK(x, xw)                                                   \
+    if (!x) {                                                          \
+        DEVICEAPI_LOG_WARN("Ignoring call. Invalid %s = %d", #xw, xw); \
+        return;                                                        \
+    }
+
+#define RETURN_IF_INITIALIZED(x) \
+    if (x->initialized_)         \
+        return;
+
+    void ExtensionAdapter::CoreSetExtensionName(XW_Extension xw_extension,
+                                                const char* name)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->name_ = name;
+    }
+
+    void ExtensionAdapter::CoreSetJavaScriptAPI(XW_Extension xw_extension,
+                                                const char* javascript_api)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->javascript_api_ = javascript_api;
+    }
+
+    void ExtensionAdapter::CoreRegisterInstanceCallbacks(
+        XW_Extension xw_extension, XW_CreatedInstanceCallback created,
+        XW_DestroyedInstanceCallback destroyed)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->created_instance_callback_ = created;
+        extension->destroyed_instance_callback_ = destroyed;
+    }
+
+    void ExtensionAdapter::CoreRegisterShutdownCallback(
+        XW_Extension xw_extension, XW_ShutdownCallback shutdown)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->shutdown_callback_ = shutdown;
+    }
+
+    void ExtensionAdapter::CoreSetInstanceData(XW_Instance xw_instance,
+                                               void* data)
+    {
+        ExtensionInstance* instance = GetExtensionInstance(xw_instance);
+        CHECK(instance, xw_instance);
+        instance->instance_data_ = data;
+    }
+
+    void* ExtensionAdapter::CoreGetInstanceData(XW_Instance xw_instance)
+    {
+        ExtensionInstance* instance = GetExtensionInstance(xw_instance);
+        if (instance)
+            return instance->instance_data_;
+        else
+            return NULL;
+    }
+
+    void ExtensionAdapter::MessagingRegister(
+        XW_Extension xw_extension, XW_HandleMessageCallback handle_message)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->handle_msg_callback_ = handle_message;
+    }
+
+    void ExtensionAdapter::MessagingPostMessage(XW_Instance xw_instance,
+                                                const char* message)
+    {
+        ExtensionInstance* instance = GetExtensionInstance(xw_instance);
+        CHECK(instance, xw_instance);
+        instance->PostMessage(message);
+    }
+
+    void ExtensionAdapter::SyncMessagingRegister(
+        XW_Extension xw_extension,
+        XW_HandleSyncMessageCallback handle_sync_message)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->handle_sync_msg_callback_ = handle_sync_message;
+    }
+
+    void ExtensionAdapter::SyncMessagingSetSyncReply(XW_Instance xw_instance,
+                                                     const char* reply)
+    {
+        ExtensionInstance* instance = GetExtensionInstance(xw_instance);
+        CHECK(instance, xw_instance);
+        instance->SyncReply(reply);
+    }
+
+    void ExtensionAdapter::EntryPointsSetExtraJSEntryPoints(
+        XW_Extension xw_extension, const char** entry_points)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+
+        for (int i = 0; entry_points[i]; ++i) {
+            extension->entry_points_.push_back(std::string(entry_points[i]));
+        }
+    }
+
+    void ExtensionAdapter::RuntimeGetStringVariable(XW_Extension xw_extension,
+                                                    const char* key,
+                                                    char* value,
+                                                    unsigned int value_len)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        extension->GetRuntimeVariable(key, value, value_len);
+    }
+
+    int ExtensionAdapter::PermissionsCheckAPIAccessControl(
+        XW_Extension xw_extension, const char* api_name)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        if (extension)
+            return extension->CheckAPIAccessControl(api_name);
+        else
+            return XW_ERROR;
+    }
+
+    int ExtensionAdapter::PermissionsRegisterPermissions(
+        XW_Extension xw_extension, const char* perm_table)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        if (extension)
+            return extension->RegisterPermissions(perm_table);
+        else
+            return XW_ERROR;
+    }
+
+    void ExtensionAdapter::MessagingRegisterBinaryMessageCallback(
+        XW_Extension xw_extension, XW_HandleBinaryMessageCallback handle_message) {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->handle_binary_msg_callback_ = handle_message;
+    }
+
+    void ExtensionAdapter::MessagingPostBinaryMessage(
+        XW_Instance xw_instance, const char* message, size_t size) {
+        ExtensionInstance* instance = GetExtensionInstance(xw_instance);
+        CHECK(instance, xw_instance);
+
+        if (!instance->post_message_listener_) {
+            DEVICEAPI_LOG_ERROR("Don't have message listener!");
+            return;
+        }
+        instance->post_message_listener_->PostMessageToJS(message);
+    }
+
+    void ExtensionAdapter::DataRegisterSync(
+        XW_Extension xw_extension, XW_HandleDataCallback handle_sync_data)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->handle_sync_data_callback_ = handle_sync_data;
+    }
+
+    void ExtensionAdapter::DataRegisterAsync(XW_Extension xw_extension,
+                                             XW_HandleDataCallback handle_data)
+    {
+        Extension* extension = GetExtension(xw_extension);
+        CHECK(extension, xw_extension);
+        RETURN_IF_INITIALIZED(extension);
+        extension->handle_data_callback_ = handle_data;
+    }
+
+    void ExtensionAdapter::DataSetSyncReply(XW_Instance xw_instance,
+                                            const char* reply, uint8_t* buffer,
+                                            size_t len)
+    {
+        ExtensionInstance* instance = GetExtensionInstance(xw_instance);
+        CHECK(instance, xw_instance);
+        instance->SyncDataReply(reply, buffer, len);
+    }
+
+    void ExtensionAdapter::DataPostData(XW_Instance xw_instance,
+                                        const char* message, uint8_t* buffer,
+                                        size_t len)
+    {
+        ExtensionInstance* instance = GetExtensionInstance(xw_instance);
+        CHECK(instance, xw_instance);
+        instance->PostData(message, buffer, len);
+    }
+
+} // namespace xwalk
+} // namespace wrt
diff --git a/lwnode/modules/device-api/src/ExtensionAdapter.h b/lwnode/modules/device-api/src/ExtensionAdapter.h
new file mode 100644 (file)
index 0000000..ddf48d4
--- /dev/null
@@ -0,0 +1,101 @@
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WRT_SERVICE_NODE_EXTENSION_ADAPTER_H_
+#define WRT_SERVICE_NODE_EXTENSION_ADAPTER_H_
+
+#include <map>
+
+#include "XW_Extension.h"
+#include "XW_Extension_SyncMessage.h"
+#include "XW_Extension_EntryPoints.h"
+#include "XW_Extension_Runtime.h"
+#include "XW_Extension_Permissions.h"
+#include "XW_Extension_Data.h"
+
+#include "Extension.h"
+
+namespace wrt {
+namespace xwalk {
+
+    class ExtensionAdapter {
+    public:
+        static ExtensionAdapter* GetInstance();
+
+        XW_Extension GetNextXWExtension();
+        XW_Instance GetNextXWInstance();
+
+        void RegisterExtension(Extension* extension);
+        void UnregisterExtension(Extension* extension);
+
+        void RegisterInstance(ExtensionInstance* instance);
+        void UnregisterInstance(ExtensionInstance* instance);
+
+        // Returns the correct struct according to interface asked. This is
+        // passed to external extensions in XW_Initialize() call.
+        static const void* GetInterface(const char* name);
+
+        static Extension* GetExtension(XW_Extension xw_extension);
+        static ExtensionInstance* GetExtensionInstance(XW_Instance xw_instance);
+
+    private:
+        ExtensionAdapter();
+        virtual ~ExtensionAdapter();
+
+        static void CoreSetExtensionName(XW_Extension xw_extension,
+                                         const char* name);
+        static void CoreSetJavaScriptAPI(XW_Extension xw_extension,
+                                         const char* javascript_api);
+        static void CoreRegisterInstanceCallbacks(
+            XW_Extension xw_extension, XW_CreatedInstanceCallback created,
+            XW_DestroyedInstanceCallback destroyed);
+        static void CoreRegisterShutdownCallback(XW_Extension xw_extension,
+                                                 XW_ShutdownCallback shutdown);
+        static void CoreSetInstanceData(XW_Instance xw_instance, void* data);
+        static void* CoreGetInstanceData(XW_Instance xw_instance);
+        static void MessagingRegister(XW_Extension xw_extension,
+                                      XW_HandleMessageCallback handle_message);
+        static void MessagingPostMessage(XW_Instance xw_instance,
+                                         const char* message);
+        static void SyncMessagingRegister(
+            XW_Extension xw_extension,
+            XW_HandleSyncMessageCallback handle_sync_message);
+        static void SyncMessagingSetSyncReply(XW_Instance xw_instance,
+                                              const char* reply);
+        static void EntryPointsSetExtraJSEntryPoints(XW_Extension xw_extension,
+                                                     const char** entry_points);
+        static void RuntimeGetStringVariable(XW_Extension xw_extension,
+                                             const char* key, char* value,
+                                             unsigned int value_len);
+        static int PermissionsCheckAPIAccessControl(XW_Extension xw_extension,
+                                                    const char* api_name);
+        static int PermissionsRegisterPermissions(XW_Extension xw_extension,
+                                                  const char* perm_table);
+        static void MessagingRegisterBinaryMessageCallback(
+            XW_Extension xw_extension, XW_HandleBinaryMessageCallback handle_message);
+        static void MessagingPostBinaryMessage(
+            XW_Instance xw_instance, const char* message, size_t size);
+        static void DataRegisterSync(XW_Extension xw_extension,
+                                     XW_HandleDataCallback handle_sync_data);
+        static void DataRegisterAsync(XW_Extension xw_extension,
+                                      XW_HandleDataCallback handle_data);
+        static void DataSetSyncReply(XW_Instance instance, const char* reply,
+                                     uint8_t* buffer, size_t len);
+        static void DataPostData(XW_Instance instance, const char* message,
+                                 uint8_t* buffer, size_t len);
+
+        typedef std::map<XW_Extension, Extension*> ExtensionMap;
+        ExtensionMap extension_map_;
+
+        typedef std::map<XW_Instance, ExtensionInstance*> InstanceMap;
+        InstanceMap instance_map_;
+
+        XW_Extension next_xw_extension_;
+        XW_Instance next_xw_instance_;
+    };
+
+} // namespace xwalk
+} // namespace wrt
+
+#endif // WRT_SERVICE_NODE_EXTENSION_ADAPTER_H_
diff --git a/lwnode/modules/device-api/src/ExtensionManager.cpp b/lwnode/modules/device-api/src/ExtensionManager.cpp
new file mode 100644 (file)
index 0000000..3dc303b
--- /dev/null
@@ -0,0 +1,183 @@
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "TizenDeviceAPIBase.h"
+#include "ExtensionManager.h"
+
+#include <glob.h>
+// #include <dpl/log/secure_log.h>
+#include <memory>
+#include <iostream>
+#include <fstream>
+
+// #include "runtime_variable_provider.h"
+// #include "picojson.h"
+#include "TizenDeviceAPILoaderForEscargot.h"
+
+namespace wrt {
+namespace xwalk {
+
+    namespace {
+        // TODO: need to cleanup
+        const char kExtensionDir[] = "/usr/lib/wrt-plugins-widget";
+        const char kExtensionPrefix[] = "lib";
+        const char kExtensionSuffix[] = ".so";
+        const char kExtensionMetadataSuffix[] = ".json";
+    }
+
+    ExtensionManager::ExtensionManager()
+    {
+    }
+
+    ExtensionManager::~ExtensionManager()
+    {
+    }
+
+    ExtensionManager* ExtensionManager::GetInstance()
+    {
+        static ExtensionManager self;
+        return &self;
+    }
+
+#if 0
+void ExtensionManager::RegisterExtensionsByMetadata(
+    RuntimeVariableProvider* provider, const std::string& metafile_path) {
+  DEVICEAPI_SLOG_INFO("path : [%s]", metafile_path.c_str());
+  std::ifstream metafile(metafile_path.c_str());
+  if (!metafile.is_open()) {
+    DEVICEAPI_LOG_ERROR("Can't open plugin metadata file");
+    return;
+  }
+
+  picojson::value metadata;
+  metafile >> metadata;
+  if (metadata.is<picojson::array>()) {
+    auto& plugins = metadata.get<picojson::array>();
+    for (auto plugin = plugins.begin(); plugin != plugins.end(); ++plugin) {
+      if (!plugin->is<picojson::object>())
+        continue;
+
+      std::string name = plugin->get("name").to_str();
+      std::string lib = plugin->get("lib").to_str();
+      if (lib.at(0) != '/') {
+        lib = std::string(kExtensionDir) + "/" + lib;
+      }
+      std::vector<std::string> entries;
+      auto& entry_points_value = plugin->get("entry_points");
+      if (entry_points_value.is<picojson::array>()) {
+        auto& entry_points = entry_points_value.get<picojson::array>();
+        for (auto entry = entry_points.begin(); entry != entry_points.end();
+             ++entry) {
+          entries.push_back(entry->to_str());
+        }
+      } else {
+        DEVICEAPI_LOG_ERROR("there is no entry points");
+      }
+      Extension* extension = new Extension(lib, name, entries, provider);
+      RegisterExtension(extension);
+    }
+  } else {
+    DEVICEAPI_LOG_ERROR("Not plugin metadata");
+    DEVICEAPI_SLOG_ERROR("%s is not plugin metadata", metafile_path.c_str());
+  }
+  metafile.close();
+}
+
+void ExtensionManager::RegisterExtensionsByMetadata(
+    RuntimeVariableProvider* provider) {
+  std::string extension_path(kExtensionDir);
+  extension_path.append("/");
+  extension_path.append("*");
+  extension_path.append(kExtensionMetadataSuffix);
+
+  DEVICEAPI_LOG_INFO("Register Extension directory");
+  DEVICEAPI_SLOG_INFO("path : [%s]", extension_path.c_str());
+
+  glob_t glob_result;
+  glob(extension_path.c_str(), GLOB_TILDE, NULL, &glob_result);
+  for (unsigned int i = 0; i < glob_result.gl_pathc; ++i) {
+    RegisterExtensionsByMetadata(provider, glob_result.gl_pathv[i]);
+  }
+  if (glob_result.gl_pathc == 0) {
+    RegisterExtensionsInDirectory(provider);
+  }
+}
+
+    void ExtensionManager::RegisterExtensionsInDirectory(
+        RuntimeVariableProvider* provider)
+    {
+        std::string extension_path(kExtensionDir);
+        extension_path.append("/");
+        extension_path.append(kExtensionPrefix);
+        extension_path.append("*");
+        extension_path.append(kExtensionSuffix);
+
+        DEVICEAPI_LOG_INFO("Register Extension directory");
+        DEVICEAPI_SLOG_INFO("path : [%s]", extension_path.c_str());
+
+        glob_t glob_result;
+        glob(extension_path.c_str(), GLOB_TILDE, NULL, &glob_result);
+        for (unsigned int i = 0; i < glob_result.gl_pathc; ++i) {
+            Extension* extension =
+                new Extension(glob_result.gl_pathv[i], provider);
+            if (extension->Initialize()) {
+                RegisterExtension(extension);
+            }
+        }
+    }
+#endif
+
+    bool ExtensionManager::RegisterExtension(Extension* extension)
+    {
+        DEVICEAPI_LOG_INFO(
+            "========== << RegisterExtension >> ENTER ==========");
+        if (!extension)
+            return false;
+
+        std::string name = extension->name();
+
+        DEVICEAPI_LOG_INFO("Register Extension name : [%s]", name.c_str());
+        if (extension_symbols_.find(name) != extension_symbols_.end()) {
+            DEVICEAPI_LOG_WARN(
+                "Ignoring extension with name already registred. '%s'",
+                name.c_str());
+            return false;
+        }
+
+        std::vector<std::string>& entry_points = extension->entry_points();
+        std::vector<std::string>::iterator iter;
+        for (iter = entry_points.begin(); iter != entry_points.end(); ++iter) {
+            if (extension_symbols_.find(*iter) != extension_symbols_.end()) {
+                DEVICEAPI_LOG_WARN(
+                    "Ignoring extension with entry_point already registred. "
+                    "'%s'",
+                    (*iter).c_str());
+                return false;
+            }
+        }
+
+        for (iter = entry_points.begin(); iter != entry_points.end(); ++iter) {
+            extension_symbols_.insert(*iter);
+        }
+
+        extension_symbols_.insert(name);
+        extensions_[name] = extension;
+
+        DEVICEAPI_LOG_INFO("========== << RegisterExtension >> END ==========");
+        return true;
+    }
+
+    void ExtensionManager::AddRuntimeVariable(const std::string& key, const std::string& value) {
+      runtime_variableMap_.insert(std::make_pair(key, value));
+    }
+
+    void ExtensionManager::GetRuntimeVariable(const char* key, char* value, size_t value_len) {
+      auto it = runtime_variableMap_.find(key);
+      if (it != runtime_variableMap_.end()) {
+        strncpy(value, it->second.c_str(), value_len);
+      }
+    }
+
+} // namespace xwalk
+} // namespace wrt
diff --git a/lwnode/modules/device-api/src/ExtensionManager.h b/lwnode/modules/device-api/src/ExtensionManager.h
new file mode 100644 (file)
index 0000000..86969d2
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WRT_SERVICE_NODE_EXTENSION_MANAGER_H_
+#define WRT_SERVICE_NODE_EXTENSION_MANAGER_H_
+
+#include <string>
+#include <set>
+#include <map>
+
+#include "XW_Extension.h"
+#include "XW_Extension_SyncMessage.h"
+#include "Extension.h"
+
+namespace wrt {
+namespace xwalk {
+
+    typedef std::map<std::string, Extension*> ExtensionMap;
+    typedef std::map<std::string, std::string> RuntimeVariableMap;
+
+    class ExtensionManager : public Extension::RuntimeVariableProvider {
+    public:
+        static ExtensionManager* GetInstance();
+#if 0
+        void RegisterExtensionsInDirectory(RuntimeVariableProvider* provider);
+        void RegisterExtensionsByMetadata(RuntimeVariableProvider* provider);
+        void RegisterExtensionsByMetadata(RuntimeVariableProvider* provider,
+                                          const std::string& metafile_path);
+#endif
+
+        ExtensionMap& extensions()
+        {
+            return extensions_;
+        }
+
+        bool RegisterExtension(Extension* extension);
+
+        void AddRuntimeVariable(const std::string& key, const std::string& value);
+        void GetRuntimeVariable(const char* key, char* value, size_t value_len) override;
+
+    private:
+        ExtensionManager();
+        virtual ~ExtensionManager();
+
+        ExtensionMap extensions_;
+        RuntimeVariableMap runtime_variableMap_;
+        std::set<std::string> extension_symbols_;
+    };
+
+} // namespace xwalk
+} // namespace wrt
+
+#endif // WRT_SERVICE_NODE_EXTENSION_MANAGER_H_
diff --git a/lwnode/modules/device-api/src/TizenDeviceAPIBase.h b/lwnode/modules/device-api/src/TizenDeviceAPIBase.h
new file mode 100644 (file)
index 0000000..d6c50e5
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2022-present Samsung Electronics Co., Ltd
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <dlog.h>
+
+#undef LOGGER_TAG
+#define LOGGER_TAG "EscargotDeviceAPI"
+
+#ifndef __MODULE__
+#define __MODULE__                                                             \
+  (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+#endif
+#define _LOGGER_LOG(prio, fmt, args...)                                        \
+  dlog_print(prio,                                                             \
+             LOGGER_TAG,                                                       \
+             "%s: %s(%d) > " fmt,                                              \
+             __MODULE__,                                                       \
+             __func__,                                                         \
+             __LINE__,                                                         \
+             ##args);
+
+#define _LOGGER_SLOG(prio, fmt, args...)                                       \
+  SECURE_LOG_(LOG_ID_MAIN,                                                     \
+              prio,                                                            \
+              LOGGER_TAG,                                                      \
+              "%s: %s(%d) > " fmt,                                             \
+              __MODULE__,                                                      \
+              __func__,                                                        \
+              __LINE__,                                                        \
+              ##args);
+
+#define DEVICEAPI_LOG_INFO(fmt, args...) _LOGGER_LOG(DLOG_INFO, fmt, ##args)
+#define DEVICEAPI_LOG_ERROR(fmt, args...)                                      \
+  _LOGGER_LOG(DLOG_ERROR, "Error: " fmt, ##args)
+#define DEVICEAPI_LOG_WARN(fmt, args...) _LOGGER_LOG(DLOG_WARN, fmt, ##args)
+
+#define DEVICEAPI_SLOG_INFO(fmt, args...) _LOGGER_LOG(DLOG_INFO, fmt, ##args)
+#define DEVICEAPI_SLOG_ERROR(fmt, args...) _LOGGER_LOG(DLOG_ERROR, fmt, ##args)
+#define DEVICEAPI_SLOG_WARN(fmt, args...) _LOGGER_LOG(DLOG_WARN, fmt, ##args)
+#define VALUE_NAME_STRCAT(name) name##Value
+
+#define DEVICEAPI_ASSERT_SHOULD_NOT_BE_HERE()                                  \
+  do {                                                                         \
+    DEVICEAPI_LOG_ERROR(                                                       \
+        "MUST NOT REACH HERE at %s (%d)\n", __FILE__, __LINE__)                \
+    std::abort();                                                              \
+  } while (0)
+
+#define DEVICEAPI_ASSERT(condition)                                            \
+  do {                                                                         \
+    if (!(condition)) {                                                        \
+      DEVICEAPI_LOG_ERROR("assert at %s (%d)\n", __FILE__, __LINE__);          \
+      std::abort();                                                            \
+    }                                                                          \
+  } while (0)
diff --git a/lwnode/modules/device-api/src/TizenDeviceAPILoaderForEscargot.cpp b/lwnode/modules/device-api/src/TizenDeviceAPILoaderForEscargot.cpp
new file mode 100644 (file)
index 0000000..ec61ee9
--- /dev/null
@@ -0,0 +1,921 @@
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "TizenDeviceAPILoaderForEscargot.h"
+
+#include <dlfcn.h>
+#include "ExtensionAdapter.h"
+#include "ExtensionManager.h"
+
+
+using namespace Escargot;
+
+namespace DeviceAPI {
+
+TizenStrings::TizenStrings(ContextRef* context)
+    : m_context(context)
+    , m_initialized(false)
+{
+    initializeEarlyStrings();
+}
+
+#define INIT_TIZEN_STRING(name) \
+    name = AtomicStringRef::create(m_context, "" #name);
+void TizenStrings::initializeEarlyStrings()
+{
+    DEVICEAPI_LOG_INFO("Enter");
+
+    FOR_EACH_EARLY_TIZEN_STRINGS(INIT_TIZEN_STRING)
+    SUPPORTED_TIZEN_PROPERTY(INIT_TIZEN_STRING)
+    SUPPORTED_TIZEN_ENTRYPOINTS(INIT_TIZEN_STRING)
+}
+
+void TizenStrings::initializeLazyStrings()
+{
+    DEVICEAPI_LOG_INFO("Enter");
+
+    if (m_initialized)
+        return;
+
+    FOR_EACH_LAZY_TIZEN_STRINGS(INIT_TIZEN_STRING)
+
+    m_initialized = true;
+}
+#undef INIT_TIZEN_STRING
+
+void printArguments(ContextRef* context, size_t argc, ValueRef** argv)
+{
+    Evaluator::execute(
+        context,
+        [](ExecutionStateRef* state, size_t argc,
+           ValueRef** argv) -> ValueRef* {
+#ifdef DEBUG
+            DEVICEAPI_LOG_INFO("printing %zu arguments", argc);
+            for (size_t i = 0; i < argc; i++) {
+                DEVICEAPI_LOG_INFO(
+                    "argument %zu : %s", i,
+                    argv[i]->toString(state)->toStdUTF8String().c_str());
+            }
+#endif
+            return ValueRef::createUndefined();
+        },
+        argc, argv);
+}
+
+void* ExtensionManagerInstance::operator new(size_t size)
+{
+
+
+
+    static bool typeInited = false;
+    static GC_descr descr;
+    if (!typeInited) {
+        GC_word obj_bitmap[GC_BITMAP_SIZE(ExtensionManagerInstance)] = { 0 };
+        GC_set_bit(obj_bitmap,
+                   GC_WORD_OFFSET(ExtensionManagerInstance, m_context));
+        GC_set_bit(obj_bitmap,
+                   GC_WORD_OFFSET(ExtensionManagerInstance, m_strings));
+#if defined(STARFISH_TIZEN_WEARABLE_WIDGET)
+        GC_set_bit(obj_bitmap, GC_WORD_OFFSET(ExtensionManagerInstance,
+                                              m_webWidgetAPIInstance));
+#endif
+#define DECLARE_TIZEN_VALUE(name)                                   \
+    GC_set_bit(obj_bitmap, GC_WORD_OFFSET(ExtensionManagerInstance, \
+                                          VALUE_NAME_STRCAT(m_##name)));
+        FOR_EACH_EARLY_TIZEN_STRINGS(DECLARE_TIZEN_VALUE);
+        FOR_EACH_LAZY_TIZEN_STRINGS(DECLARE_TIZEN_VALUE);
+        SUPPORTED_TIZEN_PROPERTY(DECLARE_TIZEN_VALUE);
+        SUPPORTED_TIZEN_ENTRYPOINTS(DECLARE_TIZEN_VALUE);
+#undef DECLARE_TIZEN_VALUE
+        descr = GC_make_descriptor(obj_bitmap,
+                                   GC_WORD_LEN(ExtensionManagerInstance));
+        typeInited = true;
+    }
+    return GC_MALLOC_EXPLICITLY_TYPED(size, descr);
+}
+
+wrt::xwalk::Extension* ExtensionManagerInstance::getExtension(
+    const char* apiName)
+{
+    DEVICEAPI_LOG_INFO("Creating a new extension: %s\n", apiName);
+    auto extensionManager = wrt::xwalk::ExtensionManager::GetInstance();
+    wrt::xwalk::ExtensionMap& extensions = extensionManager->extensions();
+
+    auto it = extensions.find(apiName);
+    if (it == extensions.end()) {
+        DEVICEAPI_LOG_INFO("Enter");
+        char library_path[512];
+        if (!strcmp(apiName, "tizen")) {
+            snprintf(library_path, 512,
+                     "/usr/lib/tizen-extensions-crosswalk/libtizen.so");
+        } else if (!strcmp(apiName, "sensorservice")) {
+            snprintf(library_path, 512,
+                     "/usr/lib/tizen-extensions-crosswalk/libtizen_sensor.so");
+        } else if (!strcmp(apiName, "sa")) {
+            snprintf(library_path, 512,
+                     "/usr/lib/tizen-extensions-crosswalk/libwebapis_sa.so");
+        } else if (!strcmp(apiName, "tvaudiocontrol")) {
+            snprintf(library_path, 512,
+                     "/usr/lib/tizen-extensions-crosswalk/libtizen_tvaudio.so");
+        } else {
+            snprintf(library_path, 512,
+                     "/usr/lib/tizen-extensions-crosswalk/libtizen_%s.so",
+                     apiName);
+        }
+
+        wrt::xwalk::Extension* extension =
+            new wrt::xwalk::Extension(library_path, extensionManager);
+
+        if (extension->Initialize()) {
+            extensionManager->RegisterExtension(extension);
+            extensions[apiName] = extension;
+            return extension;
+        } else {
+            DEVICEAPI_LOG_INFO("Cannot initialize extension %s", apiName);
+            return nullptr;
+        }
+    } else {
+        return it->second;
+    }
+}
+
+static const char deviceAPISourcePieceStart[] = R"(
+    (function(extension) {
+        extension.internal = {};
+        extension.internal._ = {};
+        let internalAPI = [
+            "sendSyncMessage",
+            "sendSyncMessageWithBinaryReply",
+            "sendSyncMessageWithStringReply",
+        ];
+
+        for (let name of internalAPI) {
+            extension.internal._[name] = extension[name];
+            extension.internal[name] = function () {
+                return extension.internal._[name].apply(extension, arguments);
+            };
+            delete extension[name];
+        }
+
+        var exports = {};
+        var window = {
+            Object,
+        };
+    (function() {'use strict';
+    )";
+
+// sizeof(deviceAPISourcePieceStart) should point string length of deviceAPISourcePieceStart
+static_assert(sizeof(deviceAPISourcePieceStart) > sizeof(size_t), "");
+
+static const char deviceAPISourcePieceEnd[] = R"(
+    })();
+    return exports;})
+    )";
+
+// sizeof(deviceAPISourcePieceEnd) should point string length of deviceAPISourcePieceStart
+static_assert(sizeof(deviceAPISourcePieceEnd) > sizeof(size_t), "");
+
+static void* loadDeviceAPISource(void* data)
+{
+    wrt::xwalk::Extension* extension = ExtensionManagerInstance::getExtension((const char*)data);
+
+    auto startLen = sizeof(deviceAPISourcePieceStart) - 1;
+    auto endLen = sizeof(deviceAPISourcePieceEnd) - 1;
+
+    char* dest = (char*)malloc(startLen + endLen + extension->javascript_api().size() + 1);
+    char* ptr = dest;
+    strncpy(ptr, deviceAPISourcePieceStart, startLen);
+    ptr += startLen;
+
+    strncpy(ptr, extension->javascript_api().data(), extension->javascript_api().size());
+    ptr += extension->javascript_api().size();
+
+    strncpy(ptr, deviceAPISourcePieceEnd, endLen);
+    ptr += endLen;
+
+    *ptr = 0;
+
+    return dest;
+}
+
+static void unloadDeviceAPISource(void* memoryPtr, void* callbackData)
+{
+    free(memoryPtr);
+}
+
+// Caution: this function is called only inside existing js execution context,
+// so we don't handle JS exception around ESFunctionObject::call()
+ObjectRef* ExtensionManagerInstance::initializeExtensionInstance(
+    const char* apiName)
+{
+    DEVICEAPI_LOG_INFO("Enter");
+
+    auto execResult = Evaluator::execute(
+               m_context,
+               [](ExecutionStateRef* state, ExtensionManagerInstance* self,
+                  const char* apiName) -> ValueRef* {
+                   wrt::xwalk::Extension* extension = getExtension(apiName);
+                   if (!extension) {
+                       DEVICEAPI_LOG_INFO("Cannot load extension %s", apiName);
+                       return ObjectRef::create(state);
+                   }
+
+                   const std::string& source = extension->javascript_api();
+                   for (auto c: source) {
+                       if (static_cast<unsigned char>(c) > 127) {
+                           // TODO support unicode version of source
+                           DEVICEAPI_ASSERT_SHOULD_NOT_BE_HERE();
+                       }
+                   }
+
+                   char* newApiName = (char*)GC_MALLOC_ATOMIC(strlen(apiName) + 1);
+                   memcpy(newApiName, apiName, strlen(apiName));
+                   newApiName[strlen(apiName)] = 0;
+
+                   auto startLen = sizeof(deviceAPISourcePieceStart) - 1;
+                   auto endLen = sizeof(deviceAPISourcePieceEnd) - 1;
+
+                   size_t sourceLength = startLen + endLen + extension->javascript_api().size();
+                   StringRef* apiSource = Escargot::StringRef::createReloadableString(
+                       state->context()->vmInstance(), true,
+                       sourceLength, newApiName, loadDeviceAPISource, unloadDeviceAPISource);
+
+                   std::string jsFileName = apiName;
+                   jsFileName += ".js";
+                   jsFileName = "tizen_api_internal_" + jsFileName;
+
+                   FunctionObjectRef* initializer =
+                       self->m_context->scriptParser()
+                           ->initializeScript(
+                               apiSource,
+                               StringRef::createFromUTF8(jsFileName.c_str(),
+                                                         jsFileName.length()))
+                           .script.value()
+                           ->execute(state)
+                           ->asFunctionObject();
+
+                   ObjectRef* extensionObject = self->createExtensionObject(state);
+                   wrt::xwalk::ExtensionInstance* extensionInstance = extension->CreateInstance();
+                   self->m_extensionInstances[extensionObject] = extensionInstance;
+
+                   ValueRef* arguments[] = { ValueRef::create(extensionObject) };
+                   return initializer
+                       ->call(state, ValueRef::createNull(), 1, arguments)
+                       ->toObject(state);
+               },
+               this, apiName);
+
+    if (!execResult.isSuccessful()) {
+        DEVICEAPI_LOG_ERROR("Error: %s\n",
+        execResult.resultOrErrorToString(m_context)->toStdUTF8String().c_str());
+    }
+    return execResult.result->asObject();
+}
+
+ObjectRef* ExtensionManagerInstance::createExtensionObject(
+    ExecutionStateRef* state)
+{
+    DEVICEAPI_LOG_INFO("Enter");
+
+    ObjectRef* extensionObject = ObjectRef::create(state);
+
+    FunctionObjectRef* postMessageFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->postMessage,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_ERROR("extension.postMessage UNIMPLEMENTED");
+                printArguments(state->context(), argc, argv);
+                DEVICEAPI_ASSERT_SHOULD_NOT_BE_HERE();
+                return ValueRef::createUndefined();
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->postMessage->string()),
+        ValueRef::create(postMessageFn), true, true, true);
+
+    FunctionObjectRef* sendSyncMessageFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->sendSyncMessage,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_INFO("extension.sendSyncMessage");
+                printArguments(state->context(), argc, argv);
+
+                ExtensionManagerInstance* extensionManagerInstance =
+                    get(state->context());
+                wrt::xwalk::ExtensionInstance* extensionInstance =
+                    extensionManagerInstance
+                        ->getExtensionInstanceFromCallingContext(
+                            state->context(), thisValue);
+                if (!extensionInstance || argc != 1) {
+                    DEVICEAPI_LOG_ERROR("extensionInstance == nullptr");
+                    return ValueRef::create(false);
+                }
+
+                StringRef* message = argv[0]->toString(state);
+                extensionInstance->HandleSyncMessage(
+                    message->toStdUTF8String());
+
+                std::string reply = extensionInstance->sync_replay_msg();
+                DEVICEAPI_LOG_INFO(
+                    "extension.sendSyncMessage Done with reply %s",
+                    reply.c_str());
+
+                if (reply.empty()) {
+                    return ValueRef::createNull();
+                }
+                return ValueRef::create(
+                    StringRef::createFromUTF8(reply.c_str(), reply.size()));
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->sendSyncMessage->string()),
+        ValueRef::create(sendSyncMessageFn), true, true, true);
+
+    FunctionObjectRef* sendSyncMessageWithBinaryReplyFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->sendSyncMessageWithBinaryReply,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_ERROR("Not implemented: extension.sendSyncMessageWithBinaryReply");
+                printArguments(state->context(), argc, argv);
+
+                return ValueRef::createNull();
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->sendSyncMessageWithBinaryReply->string()),
+        ValueRef::create(sendSyncMessageWithBinaryReplyFn), true, true, true);
+
+    FunctionObjectRef* sendSyncMessageWithStringReplyFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->sendSyncMessageWithStringReply,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_ERROR("Not implemented: extension.sendSyncMessageWithStringReply");
+                printArguments(state->context(), argc, argv);
+
+                return ValueRef::createNull();
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->sendSyncMessageWithStringReply->string()),
+        ValueRef::create(sendSyncMessageWithStringReplyFn), true, true, true);
+
+    FunctionObjectRef* sendSyncDataFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->sendSyncData,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_INFO("extension.sendSyncData");
+                printArguments(state->context(), argc, argv);
+
+                ExtensionManagerInstance* extensionManagerInstance =
+                    get(state->context());
+                wrt::xwalk::ExtensionInstance* extensionInstance =
+                    extensionManagerInstance
+                        ->getExtensionInstanceFromCallingContext(
+                            state->context(), thisValue);
+                if (!extensionInstance || argc < 1) {
+                    return ValueRef::create(false);
+                }
+
+                ChunkData chunkData(nullptr, 0);
+                if (argc > 1) {
+                    ValueRef* dataValue = argv[1];
+                    if (dataValue->isObject()) {
+                        ObjectRef* arrayData = dataValue->toObject(state);
+                        size_t length =
+                            arrayData
+                                ->get(state,
+                                      ValueRef::create(
+                                          StringRef::createFromASCII("length")))
+                                ->toLength(state);
+                        uint8_t* buffer =
+                            (uint8_t*)malloc(sizeof(uint8_t) * length);
+                        for (size_t i = 0; i < length; i++) {
+                            buffer[i] = static_cast<uint8_t>(
+                                arrayData->get(state, ValueRef::create(i))
+                                    ->toNumber(state));
+                        }
+                        chunkData = ChunkData(buffer, length);
+                    } else if (dataValue->isString()) {
+                        StringRef* stringData = dataValue->toString(state);
+                        chunkData = ChunkData(
+                            (uint8_t*)stringData->toStdUTF8String().c_str(),
+                            stringData->length());
+                    }
+                }
+
+                StringRef* message = argv[0]->toString(state);
+                extensionInstance->HandleSyncData(message->toStdUTF8String(),
+                                                  chunkData.m_buffer,
+                                                  chunkData.m_length);
+
+                uint8_t* replyBuffer = nullptr;
+                size_t replyLength = 0;
+                std::string reply = extensionInstance->sync_data_reply_msg(
+                    &replyBuffer, &replyLength);
+
+                DEVICEAPI_LOG_INFO(
+                    "extension.sendSyncData Done with reply %s (buffer %s)",
+                    reply.c_str(), replyBuffer);
+
+                if (reply.empty()) {
+                    return ValueRef::createNull();
+                }
+
+                ObjectRef* returnObject = ObjectRef::create(state);
+                returnObject->defineDataProperty(
+                    state,
+                    ValueRef::create(
+                        extensionManagerInstance->strings()->reply->string()),
+                    ValueRef::create(StringRef::createFromUTF8(reply.c_str(),
+                                                                reply.size())),
+                    true, true, true);
+
+                if (replyBuffer || replyLength > 0) {
+                    size_t chunkID = extensionManagerInstance->addChunk(
+                        replyBuffer, replyLength);
+                    returnObject->defineDataProperty(
+                        state,
+                        ValueRef::create(extensionManagerInstance->strings()
+                                             ->chunk_id->string()),
+                        ValueRef::create(chunkID), true, true, true);
+                }
+
+                return ValueRef::create(returnObject);
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->sendSyncData->string()),
+        ValueRef::create(sendSyncDataFn), true, true, true);
+
+    FunctionObjectRef* sendRuntimeMessageFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->sendRuntimeMessage,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_ERROR(
+                    "extension.sendRuntimeMessage UNIMPLEMENTED");
+                printArguments(state->context(), argc, argv);
+                DEVICEAPI_ASSERT_SHOULD_NOT_BE_HERE();
+                return ValueRef::createUndefined();
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->sendRuntimeMessage->string()),
+        ValueRef::create(sendRuntimeMessageFn), true, true, true);
+
+    FunctionObjectRef* sendRuntimeAsyncMessageFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->sendRuntimeAsyncMessage,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_ERROR(
+                    "extension.sendRuntimeAsyncMessage UNIMPLEMENTED");
+                printArguments(state->context(), argc, argv);
+                DEVICEAPI_ASSERT_SHOULD_NOT_BE_HERE();
+                return ValueRef::createUndefined();
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->sendRuntimeAsyncMessage->string()),
+        ValueRef::create(sendRuntimeAsyncMessageFn), true, true, true);
+
+    FunctionObjectRef* sendRuntimeSyncMessageFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->sendRuntimeSyncMessage,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_ERROR(
+                    "extension.sendRuntimeSyncMessage UNIMPLEMENTED");
+                printArguments(state->context(), argc, argv);
+                DEVICEAPI_ASSERT_SHOULD_NOT_BE_HERE();
+                return ValueRef::createUndefined();
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->sendRuntimeSyncMessage->string()),
+        ValueRef::create(sendRuntimeSyncMessageFn), true, true, true);
+
+    FunctionObjectRef* setMessageListenerFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->setMessageListener,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_INFO("extension.setMessageListener");
+                printArguments(state->context(), argc, argv);
+
+                ExtensionManagerInstance* extensionManagerInstance =
+                    get(state->context());
+                wrt::xwalk::ExtensionInstance* extensionInstance =
+                    extensionManagerInstance
+                        ->getExtensionInstanceFromCallingContext(
+                            state->context(), thisValue);
+
+                if (!extensionInstance || argc != 1) {
+                    return ValueRef::create(false);
+                }
+
+                ValueRef* listenerValue = argv[0];
+                if (listenerValue->isUndefined()) {
+                    DEVICEAPI_LOG_ERROR("listenerValue == undefined");
+                    extensionInstance->set_post_message_listener(nullptr);
+                    return ValueRef::create(true);
+                }
+
+                if (!listenerValue->isCallable()) {
+                    DEVICEAPI_LOG_ERROR("Invalid message listener.");
+                    return ValueRef::create(false);
+                }
+
+                ObjectRef* listener = listenerValue->asObject();
+                ESPostMessageListener* postMessageListener =
+                    ESPostMessageListener::create(state->context(), listener);
+                extensionInstance->set_post_message_listener(
+                    postMessageListener);
+
+                extensionManagerInstance->m_postListeners.push_back(
+                    postMessageListener);
+
+                return ValueRef::create(true);
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->setMessageListener->string()),
+        ValueRef::create(setMessageListenerFn), true, true, true);
+
+    FunctionObjectRef* receiveChunkDataFn = FunctionObjectRef::create(
+        state,
+        FunctionObjectRef::NativeFunctionInfo(
+            m_strings->receiveChunkData,
+            [](ExecutionStateRef* state, ValueRef* thisValue, size_t argc,
+               ValueRef** argv, bool isNewExpression) -> ValueRef* {
+                DEVICEAPI_LOG_ERROR("extension.receiveChunkData");
+                printArguments(state->context(), argc, argv);
+
+                ExtensionManagerInstance* extensionManagerInstance =
+                    get(state->context());
+                wrt::xwalk::ExtensionInstance* extensionInstance =
+                    extensionManagerInstance
+                        ->getExtensionInstanceFromCallingContext(
+                            state->context(), thisValue);
+
+                if (!extensionInstance || argc < 1) {
+                    return ValueRef::create(false);
+                }
+
+                TizenStrings* strings = extensionManagerInstance->strings();
+
+                size_t chunkID = argv[0]->toNumber(state);
+                ExtensionManagerInstance::ChunkData chunkData =
+                    extensionManagerInstance->getChunk(chunkID);
+                if (!chunkData.m_buffer) {
+                    return ValueRef::createNull();
+                }
+
+                StringRef* type = argv[1]->toString(state);
+                bool isStringType = (!type->equals(strings->octet->string()));
+
+                ValueRef* ret;
+                if (isStringType) {
+                    ret = ValueRef::create(StringRef::createFromUTF8(
+                        (const char*)chunkData.m_buffer,
+                        strlen((const char*)chunkData.m_buffer)));
+                } else {
+                    ArrayObjectRef* octetArray = ArrayObjectRef::create(state);
+                    for (size_t i = 0; i < chunkData.m_length; i++) {
+                        octetArray->set(
+                            state, ValueRef::create(i),
+                            ValueRef::create(chunkData.m_buffer[i]));
+                    }
+                    ret = ValueRef::create(octetArray);
+                }
+                free(chunkData.m_buffer);
+                return ret;
+            },
+            0, true, true));
+
+    extensionObject->defineDataProperty(
+        state, ValueRef::create(m_strings->receiveChunkData->string()),
+        ValueRef::create(receiveChunkDataFn), true, true, true);
+
+    return extensionObject;
+}
+
+wrt::xwalk::ExtensionInstance*
+ExtensionManagerInstance::getExtensionInstanceFromCallingContext(
+    ContextRef* context, ValueRef* thisValue)
+{
+    DEVICEAPI_LOG_INFO("Enter");
+    if (thisValue->isUndefinedOrNull()) {
+        return nullptr;
+    }
+
+    ObjectRef* obj = Evaluator::execute(m_context,
+                                        [](ExecutionStateRef* state,
+                                           ValueRef* thisValue) -> ValueRef* {
+                                            return thisValue->toObject(state);
+                                        },
+                                        thisValue)
+                         .result->asObject();
+
+    auto it = m_extensionInstances.find(obj);
+    if (it == m_extensionInstances.end()) {
+        return nullptr;
+    }
+
+    return it->second;
+}
+
+size_t ExtensionManagerInstance::addChunk(uint8_t* buffer, size_t length)
+{
+    DEVICEAPI_LOG_INFO("Enter");
+    size_t chunkID = m_chunkID++;
+    m_chunkDataMap[chunkID] = ChunkData(buffer, length);
+    return chunkID;
+}
+
+ExtensionManagerInstance::ChunkData ExtensionManagerInstance::getChunk(
+    size_t chunkID)
+{
+    DEVICEAPI_LOG_INFO("Enter");
+    auto it = m_chunkDataMap.find(chunkID);
+    if (it == m_chunkDataMap.end()) {
+        return ChunkData(nullptr, 0);
+    } else {
+        ChunkData chunkData = it->second;
+        m_chunkDataMap.erase(it);
+        return chunkData;
+    }
+}
+
+ExtensionManagerInstance::ExtensionManagerInstanceMap
+    ExtensionManagerInstance::s_extensionManagerInstances;
+
+std::mutex ExtensionManagerInstance::s_mutex;
+
+ExtensionManagerInstance::ExtensionManagerInstance(ContextRef* context)
+    : m_context(context)
+    , m_chunkID(0)
+{
+    DEVICEAPI_LOG_INFO("new ExtensionManagerInstance %p", this);
+
+#define DECLARE_TIZEN_OBJECT(name) VALUE_NAME_STRCAT(m_##name) = nullptr;
+    FOR_EACH_EARLY_TIZEN_STRINGS(DECLARE_TIZEN_OBJECT);
+    FOR_EACH_LAZY_TIZEN_STRINGS(DECLARE_TIZEN_OBJECT);
+    SUPPORTED_TIZEN_PROPERTY(DECLARE_TIZEN_OBJECT);
+    SUPPORTED_TIZEN_ENTRYPOINTS(DECLARE_TIZEN_OBJECT);
+#undef DECLARE_TIZEN_OBJECT
+
+    m_strings = new TizenStrings(m_context);
+    Evaluator::execute(
+        m_context,
+        [](ExecutionStateRef* state,
+           ExtensionManagerInstance* self) -> ValueRef* {
+            ValueRef* tizenGetter = ValueRef::create(FunctionObjectRef::create(
+                state,
+                FunctionObjectRef::NativeFunctionInfo(
+                    self->m_strings->tizen,
+                    [](ExecutionStateRef* state, ValueRef* thisValue,
+                       size_t argc, ValueRef** argv,
+                       bool isNewExpression) -> ValueRef* {
+                        DEVICEAPI_LOG_INFO("Enter");
+
+                        ExtensionManagerInstance* extensionManagerInstance =
+                            get(state->context());
+
+                        if (extensionManagerInstance->m_tizenValue) {
+                            return extensionManagerInstance->m_tizenValue;
+                        }
+                        TizenStrings* strings =
+                            extensionManagerInstance->strings();
+                        strings->initializeLazyStrings();
+
+                        // initialize tizen object
+                        ObjectRef* tizenObject =
+                            extensionManagerInstance
+                                ->initializeExtensionInstance("tizen");
+                        extensionManagerInstance->m_tizenValue =
+                            ValueRef::create(tizenObject);
+
+#define DEFINE_SUPPORTED_TIZEN_API(name)                                       \
+    tizenObject->defineAccessorProperty(                                       \
+        state, ValueRef::create(StringRef::createFromUTF8("" #name)),         \
+        ObjectRef::AccessorPropertyDescriptor(                                 \
+            ValueRef::create(FunctionObjectRef::create(                        \
+                state,                                                         \
+                FunctionObjectRef::NativeFunctionInfo(                         \
+                    AtomicStringRef::create(state->context(), "" #name),       \
+                    [](ExecutionStateRef* state, ValueRef* thisValue,          \
+                       size_t argc, ValueRef** argv,                           \
+                       bool isNewExpression) -> ValueRef* {                    \
+                        ExtensionManagerInstance* extensionManagerInstance =   \
+                            get(state->context());                             \
+                        if (extensionManagerInstance->VALUE_NAME_STRCAT(       \
+                                m_##name)) {                                   \
+                            return extensionManagerInstance                    \
+                                ->VALUE_NAME_STRCAT(m_##name);                 \
+                        }                                                      \
+                        DEVICEAPI_LOG_INFO("Loading plugin for %s", "" #name); \
+                        ObjectRef* apiObject =                                 \
+                            extensionManagerInstance                           \
+                                ->initializeExtensionInstance("" #name);       \
+                        extensionManagerInstance->VALUE_NAME_STRCAT(           \
+                            m_##name) = ValueRef::create(apiObject);           \
+                        thisValue->toObject(state)->defineDataProperty(        \
+                            state, ValueRef::create(                           \
+                                       StringRef::createFromUTF8("" #name)),  \
+                            ValueRef::create(apiObject), false, true, false);  \
+                        return ValueRef::create(apiObject);                    \
+                    },                                                         \
+                    0, true, true))),                                          \
+            nullptr, ObjectRef::PresentAttribute::EnumerablePresent));
+
+    SUPPORTED_TIZEN_PROPERTY(DEFINE_SUPPORTED_TIZEN_API)
+
+#undef DEFINE_SUPPORTED_TIZEN_API
+
+#define DEFINE_SUPPORTED_TIZEN_ENTRYPOINTS(name)                               \
+    ObjectRef::NativeDataAccessorPropertyData* nativeData##name =              \
+        new NativeDataAccessorPropertyDataForEntryPoint(                       \
+            true, true, true,                                                  \
+            [](ExecutionStateRef* state, ObjectRef* self, ValueRef* receiver,  \
+               ObjectRef::NativeDataAccessorPropertyData* data) -> ValueRef* { \
+                ExtensionManagerInstance* extensionManagerInstance =           \
+                    get(state->context());                                     \
+                if (extensionManagerInstance->VALUE_NAME_STRCAT(m_##name)) {   \
+                    return extensionManagerInstance->VALUE_NAME_STRCAT(        \
+                        m_##name);                                             \
+                }                                                              \
+                DEVICEAPI_LOG_INFO("Loading plugin for %s", "" #name);         \
+                extensionManagerInstance->VALUE_NAME_STRCAT(m_##name) =        \
+                    Escargot::ValueRef::createUndefined();                     \
+                extensionManagerInstance->m_tizenValue->toObject(state)->get(  \
+                    state, ValueRef::create(                                   \
+                               StringRef::createFromASCII("application")));    \
+                NativeDataAccessorPropertyDataForEntryPoint* myData =          \
+                    (NativeDataAccessorPropertyDataForEntryPoint*)data;        \
+                extensionManagerInstance->VALUE_NAME_STRCAT(m_##name) =        \
+                    myData->m_data;                                            \
+                return myData->m_data;                                         \
+            },                                                                 \
+            [](ExecutionStateRef* state, ObjectRef* self, ValueRef* receiver,  \
+               ObjectRef::NativeDataAccessorPropertyData* data,                \
+               ValueRef* setterInputData) -> bool {                            \
+                NativeDataAccessorPropertyDataForEntryPoint* myData =          \
+                    (NativeDataAccessorPropertyDataForEntryPoint*)data;        \
+                myData->m_data = setterInputData;                              \
+                return true;                                                   \
+            });                                                                \
+    tizenObject->defineNativeDataAccessorProperty(                             \
+        state, ValueRef::create(StringRef::createFromUTF8(#name)),            \
+        nativeData##name);
+
+
+    SUPPORTED_TIZEN_ENTRYPOINTS(DEFINE_SUPPORTED_TIZEN_ENTRYPOINTS)
+
+#undef DEFINE_SUPPORTED_TIZEN_ENTRYPOINTS
+
+#if defined(STARFISH_TIZEN_WEARABLE_WIDGET)
+                        WebWidgetAPIInstance* ww =
+                            new (GC) WebWidgetAPIInstance();
+                        extensionManagerInstance->m_webWidgetAPIInstance = ww;
+                        ObjectRef* widgetAPIObj =
+                            ww->createWebWidgetAPIObject(state->context());
+                        tizenObject->defineDataProperty(
+                            state, ValueRef::create(
+                                       StringRef::createFromASCII("webWidget")),
+                            ValueRef::create(widgetAPIObj), false, true, false);
+#endif
+
+                        return ValueRef::create(tizenObject);
+                    },
+                    0, true, true)));
+
+            self->m_context->globalObject()->defineAccessorProperty(
+                state, ValueRef::create(self->m_strings->tizen->string()),
+                ObjectRef::AccessorPropertyDescriptor(
+                    tizenGetter, nullptr,
+                    ObjectRef::PresentAttribute::EnumerablePresent));
+
+            ValueRef* xwalkGetter = ValueRef::create(FunctionObjectRef::create(
+                state,
+                FunctionObjectRef::NativeFunctionInfo(
+                    self->m_strings->xwalk,
+                    [](ExecutionStateRef* state, ValueRef* thisValue,
+                       size_t argc, ValueRef** argv,
+                       bool isNewExpression) -> ValueRef* {
+                        DEVICEAPI_LOG_INFO("xwalkGetter Enter");
+
+                        ExtensionManagerInstance* extensionManagerInstance =
+                            get(state->context());
+                        if (extensionManagerInstance->m_xwalkValue) {
+                            return extensionManagerInstance->m_xwalkValue;
+                        }
+                        DEVICEAPI_LOG_INFO("Loading plugin for xwalk.utils");
+
+                        TizenStrings* strings =
+                            extensionManagerInstance->strings();
+                        strings->initializeLazyStrings();
+
+                        // initialize xwalk object
+                        ObjectRef* xwalkObject =
+                            extensionManagerInstance
+                                ->initializeExtensionInstance("utils");
+                        extensionManagerInstance->m_xwalkValue =
+                            ValueRef::create(xwalkObject);
+
+                        // re-define xwalk object
+                        thisValue->toObject(state)->defineDataProperty(
+                            state, ValueRef::create(strings->xwalk->string()),
+                            ValueRef::create(xwalkObject), false, true, false);
+
+                        return ValueRef::create(xwalkObject);
+                    },
+                    0, true, true)));
+
+            self->m_context->globalObject()->defineAccessorProperty(
+                state, ValueRef::create(self->m_strings->xwalk->string()),
+                ObjectRef::AccessorPropertyDescriptor(
+                    xwalkGetter, nullptr,
+                    ObjectRef::PresentAttribute::EnumerablePresent));
+
+            return ValueRef::createUndefined();
+        },
+        this);
+
+#if defined(STARFISH_TIZEN_WEARABLE_WIDGET)
+    m_webWidgetAPIInstance = nullptr;
+#endif
+    std::lock_guard<std::mutex> guard(s_mutex);
+    s_extensionManagerInstances[m_context] = this;
+    DEVICEAPI_LOG_INFO("ExtensionManagerInstance %zu => %zu",
+                       s_extensionManagerInstances.size() - 1,
+                       s_extensionManagerInstances.size());
+}
+
+ExtensionManagerInstance::~ExtensionManagerInstance()
+{
+    std::lock_guard<std::mutex> guard(s_mutex);
+    DEVICEAPI_LOG_INFO(
+        "ExtensionManagerInstance delete ExtensionManagerInstance %p", this);
+    for (auto it : m_extensionInstances)
+        delete it.second;
+    for (auto it : m_postListeners)
+        it->finalize();
+    auto it = s_extensionManagerInstances.find(m_context);
+    s_extensionManagerInstances.erase(it);
+    DEVICEAPI_LOG_INFO("ExtensionManagerInstance %zu => %zu",
+                       s_extensionManagerInstances.size() + 1,
+                       s_extensionManagerInstances.size());
+}
+
+ExtensionManagerInstance* ExtensionManagerInstance::get(ContextRef* context)
+{
+    std::lock_guard<std::mutex> guard(s_mutex);
+    ExtensionManagerInstance* instance = nullptr;
+
+    auto it = s_extensionManagerInstances.find(context);
+    if (it != s_extensionManagerInstances.end()) {
+        instance = it->second;
+    }
+
+    return instance;
+}
+
+ExtensionManagerInstance* initialize(ContextRef* context)
+{
+    DEVICEAPI_LOG_INFO("ExtensionManagerInstance Enter with context %p",
+                       context);
+    return new ExtensionManagerInstance(context);
+}
+
+void close(ContextRef* context)
+{
+    DEVICEAPI_LOG_INFO("ExtensionManagerInstance Enter with context %p",
+                       context);
+    delete ExtensionManagerInstance::get(context);
+}
+}
diff --git a/lwnode/modules/device-api/src/TizenDeviceAPILoaderForEscargot.h b/lwnode/modules/device-api/src/TizenDeviceAPILoaderForEscargot.h
new file mode 100644 (file)
index 0000000..87d4da7
--- /dev/null
@@ -0,0 +1,187 @@
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef __TizenDeviceAPILoaderForEscargot__
+#define __TizenDeviceAPILoaderForEscargot__
+
+
+#include <mutex>
+#include <map>
+
+#include <GCUtil.h>
+
+#include "TizenDeviceAPIBase.h"
+#include "EscargotPublic.h"
+
+namespace wrt {
+namespace xwalk {
+class Extension;
+class ExtensionInstance;
+}  // namespace xwalk
+}  // namespace wrt
+
+namespace DeviceAPI {
+
+class ESPostListener;
+
+#define FOR_EACH_EARLY_TIZEN_STRINGS(F) \
+  F(tizen)                              \
+  F(xwalk)                              \
+  F(webapis)
+
+#define FOR_EACH_LAZY_TIZEN_STRINGS(F) \
+  F(utils)                             \
+  F(common)                            \
+  F(extension)                         \
+  F(postMessage)                       \
+  F(sendSyncMessage)                   \
+  F(sendSyncMessageWithBinaryReply)    \
+  F(sendSyncMessageWithStringReply)    \
+  F(sendSyncData)                      \
+  F(sendRuntimeMessage)                \
+  F(sendRuntimeSyncMessage)            \
+  F(sendRuntimeAsyncMessage)           \
+  F(setMessageListener)                \
+  F(receiveChunkData)                  \
+  F(reply)                             \
+  F(chunk_id)                          \
+  F(string)                            \
+  F(octet)
+
+#define SUPPORTED_TIZEN_PROPERTY(F) \
+  F(application)                    \
+  F(filesystem)                     \
+  F(mediacontroller)                \
+  F(messageport)                    \
+  F(systeminfo)                     \
+  F(sensorservice)                  \
+  F(tvaudiocontrol)                 \
+  F(preference)                     \
+  F(power)                          \
+  F(time)
+
+#define SUPPORTED_TIZEN_ENTRYPOINTS(F) \
+  F(ApplicationControl)                \
+  F(ApplicationControlData)
+
+class TizenStrings {
+ public:
+  TizenStrings(Escargot::ContextRef* context);
+  void initializeEarlyStrings();
+  void initializeLazyStrings();
+
+#define DECLARE_TIZEN_STRING(name) Escargot::AtomicStringRef* name;
+  FOR_EACH_EARLY_TIZEN_STRINGS(DECLARE_TIZEN_STRING);
+  FOR_EACH_LAZY_TIZEN_STRINGS(DECLARE_TIZEN_STRING);
+  SUPPORTED_TIZEN_PROPERTY(DECLARE_TIZEN_STRING);
+  SUPPORTED_TIZEN_ENTRYPOINTS(DECLARE_TIZEN_STRING);
+#undef DECLARE_TIZEN_STRING
+
+ private:
+  Escargot::ContextRef* m_context;
+  bool m_initialized;
+};
+
+/*
+ * Extension: (tizen, utils, common, messageport, sensorservice...) * 1
+ * ExtensionManager: (manager) * 1
+ * ExtensionInstance: (tizen, utils, common, messageport, sensorservice...) *
+ * number of ESVMInstances
+ * ExtensionManagerInstance: (manager) * number of ESVMInstances
+ */
+
+class ExtensionManagerInstance : public gc {
+ public:
+  ExtensionManagerInstance(Escargot::ContextRef* context);
+  ~ExtensionManagerInstance();
+
+  void* operator new(size_t size);
+  void* operator new[](size_t size) = delete;
+
+  static ExtensionManagerInstance* get(Escargot::ContextRef* context);
+  TizenStrings* strings() { return m_strings; }
+  wrt::xwalk::ExtensionInstance* getExtensionInstanceFromCallingContext(
+      Escargot::ContextRef*, Escargot::ValueRef* thisValue);
+  Escargot::ObjectRef* initializeExtensionInstance(const char*);
+#if defined(STARFISH_TIZEN_WEARABLE_WIDGET)
+  WebWidgetAPIInstance* webWidgetAPIInstance() {
+    return m_webWidgetAPIInstance;
+  }
+#endif
+
+  static wrt::xwalk::Extension* getExtension(const char* apiName);
+
+ private:
+  struct ChunkData {
+    ChunkData() {}
+    ChunkData(uint8_t* buffer, size_t length)
+        : m_buffer(buffer), m_length(length) {}
+    uint8_t* m_buffer;
+    size_t m_length;
+  };
+
+  typedef std::map<size_t, ChunkData> ChunkDataMap;
+  typedef std::map<Escargot::ObjectRef*, wrt::xwalk::ExtensionInstance*>
+      ExtensionInstanceMap;
+  typedef std::vector<ESPostListener*> ESPostListenerVector;
+
+  Escargot::ObjectRef* createExtensionObject(
+      Escargot::ExecutionStateRef* state);
+  size_t addChunk(uint8_t* buffer, size_t length);
+  ChunkData getChunk(size_t chunkID);
+
+  Escargot::ContextRef* m_context;
+  ExtensionInstanceMap m_extensionInstances;
+  ESPostListenerVector m_postListeners;
+  ChunkDataMap m_chunkDataMap;
+  size_t m_chunkID;
+  TizenStrings* m_strings;
+
+#if defined(STARFISH_TIZEN_WEARABLE_WIDGET)
+  WebWidgetAPIInstance* m_webWidgetAPIInstance;
+#endif
+#define DECLARE_TIZEN_OBJECT(name) \
+  Escargot::ValueRef* VALUE_NAME_STRCAT(m_##name);
+  FOR_EACH_EARLY_TIZEN_STRINGS(DECLARE_TIZEN_OBJECT);
+  FOR_EACH_LAZY_TIZEN_STRINGS(DECLARE_TIZEN_OBJECT);
+  SUPPORTED_TIZEN_PROPERTY(DECLARE_TIZEN_OBJECT);
+  SUPPORTED_TIZEN_ENTRYPOINTS(DECLARE_TIZEN_OBJECT);
+#undef DECLARE_TIZEN_OBJECT
+
+  // static members
+  // TODO: release persistentRefHolder
+  typedef std::map<Escargot::ContextRef*,
+                   Escargot::PersistentRefHolder<ExtensionManagerInstance>>
+      ExtensionManagerInstanceMap;
+  static ExtensionManagerInstanceMap s_extensionManagerInstances;
+  static std::mutex s_mutex;
+};
+
+inline ExtensionManagerInstance* ExtensionManagerInstanceGet(
+    Escargot::ContextRef* context) {
+  return ExtensionManagerInstance::get(context);
+}
+
+ExtensionManagerInstance* initialize(Escargot::ContextRef* context);
+void close(Escargot::ContextRef* context);
+}  // namespace DeviceAPI
+
+class NativeDataAccessorPropertyDataForEntryPoint
+    : public Escargot::ObjectRef::NativeDataAccessorPropertyData {
+ public:
+  NativeDataAccessorPropertyDataForEntryPoint(
+      bool isWritable, bool isEnumerable, bool isConfigurable,
+      Escargot::ObjectRef::NativeDataAccessorPropertyGetter getter,
+      Escargot::ObjectRef::NativeDataAccessorPropertySetter setter)
+      : NativeDataAccessorPropertyData(isWritable, isEnumerable, isConfigurable,
+                                       getter, setter) {
+    m_data = Escargot::ValueRef::createUndefined();
+  }
+
+  void* operator new(size_t size) { return GC_MALLOC(size); }
+
+  Escargot::ValueRef* m_data;
+};
+
+#endif  // __TizenDeviceAPILoaderForEscargot__
diff --git a/lwnode/modules/device-api/src/XW_Extension.h b/lwnode/modules/device-api/src/XW_Extension.h
new file mode 100644 (file)
index 0000000..bdd9eb5
--- /dev/null
@@ -0,0 +1,223 @@
+// Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
+#define XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
+
+// Crosswalk Extensions are modules of code loaded by Crosswalk runtime that
+// allow extending its capabilities. The extension is expected to define a
+// XW_Initialize() function as declared below, get the interfaces it need to
+// use and register to whatever callbacks it needs, then return XW_OK.
+//
+// The Extension is represented by the type XW_Extension. Each extension
+// loaded may be used multiple times for different pages, so to each execution
+// there will be an associated XW_Instance. A reasonable analogy is that the
+// XW_Extension represent a "class", and have concrete instances running.
+//
+// An interface is a struct with a set of functions, provided by Crosswalk,
+// that allow the extension code to interact with the web content. Certain
+// functions in an interface are used to register callbacks, so that Crosswalk
+// can call the extension at specific situations.
+//
+// Crosswalk won't call an extension's XW_Initialize() multiple times in the
+// same process.
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if __GNUC__ >= 4
+#define XW_EXPORT __attribute__((visibility("default")))
+#elif defined(_MSC_VER)
+#define XW_EXPORT __declspec(dllexport)
+#endif
+
+#include <stddef.h>
+#include <stdint.h>
+
+// XW_Extension is used to identify your extension when calling functions from
+// the API. You should always use the XW_Extension received at XW_Initialize().
+//
+// XW_Instance is used to identify different web contents using your
+// extension. Each time a new web content is created you can be notified
+// registering the XW_CreatedInstanceCallback, that receives the new
+// XW_Instance. When interacting with an Instance (for example to post a
+// message), you should pass the corresponding XW_Instance.
+//
+// In both types the zero value is never used by Crosswalk, so can be used to
+// initialize variables.
+typedef int32_t XW_Extension;
+typedef int32_t XW_Instance;
+
+enum { XW_OK = 0, XW_ERROR = -1 };
+
+// Returns a struct containing functions to be used by the extension. Those
+// structs can be stored statically and used until the extension is unloaded.
+// Extensions should use definitions like XW_CORE_INTERFACE, instead of using
+// the versioned definition or the literal string. Returns NULL if the
+// interface is not supported.
+typedef const void* (*XW_GetInterface)(const char* interface_name);
+
+typedef int32_t (*XW_Initialize_Func)(XW_Extension extension,
+                                      XW_GetInterface get_interface);
+
+// XW_Initialize is called after the extension code is loaded. The 'extension'
+// value should be used in further calls that expect XW_Extension argument.
+//
+// The 'get_interface' function should be used to get access to functions that
+// interact with the web content. It is only valid during the execution of the
+// XW_Initialize() function.
+//
+// This function should return XW_OK when the extension was succesfully
+// loaded, otherwise XW_ERROR.
+XW_EXPORT int32_t XW_Initialize(XW_Extension extension,
+                                XW_GetInterface get_interface);
+
+//
+// XW_CORE_INTERFACE: Basic functionality for Crosswalk Extensions. All
+// extensions should use this interface to set at least their name.
+//
+
+#define XW_CORE_INTERFACE_1 "XW_CoreInterface_1"
+#define XW_CORE_INTERFACE XW_CORE_INTERFACE_1
+
+typedef void (*XW_CreatedInstanceCallback)(XW_Instance instance);
+typedef void (*XW_DestroyedInstanceCallback)(XW_Instance instance);
+typedef void (*XW_ShutdownCallback)(XW_Extension extension);
+
+struct XW_CoreInterface_1 {
+    // Set the name of the extension. It is used as the namespace for the
+    // JavaScript code exposed by the extension. So extension named
+    // 'my_extension', will expose its JavaScript functionality inside
+    // the 'my_extension' namespace.
+    //
+    // This function should be called only during XW_Initialize().
+    void (*SetExtensionName)(XW_Extension extension, const char* name);
+
+    // Set the JavaScript code loaded in the web content when the extension is
+    // used. This can be used together with the messaging mechanism to implement
+    // a higher-level API that posts messages to extensions, see
+    // XW_MESSAGING_INTERFACE below.
+    //
+    // The code will be executed inside a JS function context with the following
+    // objects available:
+    //
+    // - exports: this object should be filled with properties and functions
+    //            that will be exposed in the namespace associated with this
+    //            extension.
+    //
+    // - extension.postMessage(): post a string message to the extension native
+    //                            code. See below for details.
+    // - extension.setMessageListener(): allow setting a callback that is called
+    //                                   when the native code sends a message
+    //                                   to JavaScript. Callback takes a string.
+    //
+    // This function should be called only during XW_Initialize().
+    void (*SetJavaScriptAPI)(XW_Extension extension, const char* api);
+
+    // Register callbacks that are called when an instance of this extension
+    // is created or destroyed. Everytime a new web content is loaded, it will
+    // get a new associated instance.
+    //
+    // This function should be called only during XW_Initialize().
+    void (*RegisterInstanceCallbacks)(XW_Extension extension,
+                                      XW_CreatedInstanceCallback created,
+                                      XW_DestroyedInstanceCallback destroyed);
+
+    // Register a callback to be executed when the extension will be unloaded.
+    //
+    // This function should be called only during XW_Initialize().
+    void (*RegisterShutdownCallback)(XW_Extension extension,
+                                     XW_ShutdownCallback shutdown_callback);
+
+    // These two functions are conveniences used to associated arbitrary data
+    // with a given XW_Instance. They can be used only with instances that were
+    // created but not yet completely destroyed. GetInstanceData() can be used
+    // during the destroyed instance callback. If not instance data was set,
+    // getting it returns NULL.
+    void (*SetInstanceData)(XW_Instance instance, void* data);
+    void* (*GetInstanceData)(XW_Instance instance);
+};
+
+typedef struct XW_CoreInterface_1 XW_CoreInterface;
+
+//
+// XW_MESSAGING_INTERFACE: Exchange asynchronous messages with JavaScript
+// code provided by extension.
+//
+
+#define XW_MESSAGING_INTERFACE_1 "XW_MessagingInterface_1"
+#define XW_MESSAGING_INTERFACE XW_MESSAGING_INTERFACE_1
+
+typedef void (*XW_HandleMessageCallback)(XW_Instance instance,
+                                         const char* message);
+
+struct XW_MessagingInterface_1 {
+    // Register a callback to be called when the JavaScript code associated
+    // with the extension posts a message. Note that the callback will be called
+    // with the XW_Instance that posted the message as well as the message
+    // contents.
+    void (*Register)(XW_Extension extension,
+                     XW_HandleMessageCallback handle_message);
+
+    // Post a message to the web content associated with the instance. To
+    // receive this message the extension's JavaScript code should set a
+    // listener using extension.setMessageListener() function.
+    //
+    // This function is thread-safe and can be called until the instance is
+    // destroyed.
+    void (*PostMessage)(XW_Instance instance, const char* message);
+};
+
+typedef struct XW_MessagingInterface_1 XW_MessagingInterface;
+
+#define XW_MESSAGING_INTERFACE_2 "XW_MessagingInterface_2"
+
+typedef void (*XW_HandleBinaryMessageCallback)(XW_Instance instance,
+                                               const char* message,
+                                               const size_t size);
+
+struct XW_MessagingInterface_2 {
+  // Register a callback to be called when the JavaScript code associated
+  // with the extension posts a message. Note that the callback will be called
+  // with the XW_Instance that posted the message as well as the message
+  // contents.
+  void (*Register)(XW_Extension extension,
+                   XW_HandleMessageCallback handle_message);
+
+  // Post a message to the web content associated with the instance. To
+  // receive this message the extension's JavaScript code should set a
+  // listener using extension.setMessageListener() function.
+  //
+  // This function is thread-safe and can be called until the instance is
+  // destroyed.
+  void (*PostMessage)(XW_Instance instance, const char* message);
+
+  // Register a callback to be called when the JavaScript code associated
+  // with the extension posts a binary message (ArrayBuffer object).
+  // Note that the callback will be called with the XW_Instance that posted
+  // the message as well as the message contents.
+  void (*RegisterBinaryMessageCallback)(
+      XW_Extension extension,
+      XW_HandleBinaryMessageCallback handle_message);
+
+  // Post a binary message to the web content associated with the instance. To
+  // receive this message the extension's JavaScript code should set a
+  // listener using extension.setMessageListener() function.
+  // The JavaScript message listener function would receive the binary message
+  // in an ArrayBuffer object.
+  //
+  // This function is thread-safe and can be called until the instance is
+  // destroyed.
+  void (*PostBinaryMessage)(XW_Instance instance,
+                            const char* message, size_t size);
+};
+
+typedef struct XW_MessagingInterface_2 XW_MessagingInterface2;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
diff --git a/lwnode/modules/device-api/src/XW_Extension_Data.h b/lwnode/modules/device-api/src/XW_Extension_Data.h
new file mode 100644 (file)
index 0000000..56cdb7a
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_DATA_H_
+#define XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_DATA_H_
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
+#error "You should include XW_Extension.h before this file"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//
+// XW_INTERNAL_DATA_INTERFACE: allow extensions to exchange binary chunk data
+// between extension and loader.
+//
+
+#define XW_INTERNAL_DATA_INTERFACE_1 "XW_InternalDataInterface_1"
+#define XW_INTERNAL_DATA_INTERFACE XW_INTERNAL_DATA_INTERFACE_1
+
+// Synchronous / Asynchronous data exchanging interface
+typedef void (*XW_HandleDataCallback)(XW_Instance instance, const char* message,
+                                      uint8_t* buffer, size_t len);
+
+struct XW_Internal_DataInterface_1 {
+    void (*RegisterSync)(XW_Extension extension,
+                         XW_HandleDataCallback handle_data);
+
+    void (*RegisterAsync)(XW_Extension extension,
+                          XW_HandleDataCallback handle_data);
+
+    void (*SetSyncReply)(XW_Instance instance, const char* reply,
+                         uint8_t* buffer, size_t len);
+
+    void (*PostData)(XW_Instance instance, const char* message, uint8_t* buffer,
+                     size_t len);
+};
+
+typedef struct XW_Internal_DataInterface_1 XW_Internal_DataInterface;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_DATA_H_
diff --git a/lwnode/modules/device-api/src/XW_Extension_EntryPoints.h b/lwnode/modules/device-api/src/XW_Extension_EntryPoints.h
new file mode 100644 (file)
index 0000000..65da47d
--- /dev/null
@@ -0,0 +1,47 @@
+// Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_ENTRYPOINTS_H_
+#define XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_ENTRYPOINTS_H_
+
+// NOTE: This file and interfaces marked as internal are not considered stable
+// and can be modified in incompatible ways between Crosswalk versions.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
+#error "You should include XW_Extension.h before this file"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XW_INTERNAL_ENTRY_POINTS_INTERFACE_1 \
+    "XW_Internal_EntryPointsInterface_1"
+#define XW_INTERNAL_ENTRY_POINTS_INTERFACE XW_INTERNAL_ENTRY_POINTS_INTERFACE_1
+
+//
+// XW_INTERNAL_ENTRY_POINTS_INTERFACE: provides a way for extensions to add
+// more information about its implementation. For now, allow extensions to
+// specify more objects that the access should cause the extension to be
+// loaded.
+//
+
+struct XW_Internal_EntryPointsInterface_1 {
+    // Register extra entry points for this extension. An "extra" entry points
+    // are objects outside the implicit namespace for which the extension should
+    // be loaded when they are touched.
+    //
+    // This function should be called only during XW_Initialize().
+    void (*SetExtraJSEntryPoints)(XW_Extension extension,
+                                  const char** entry_points);
+};
+
+typedef struct XW_Internal_EntryPointsInterface_1
+    XW_Internal_EntryPointsInterface;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_ENTRYPOINTS_H_
diff --git a/lwnode/modules/device-api/src/XW_Extension_Permissions.h b/lwnode/modules/device-api/src/XW_Extension_Permissions.h
new file mode 100644 (file)
index 0000000..15c94a7
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright (c) 2014 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_PERMISSIONS_H_
+#define XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_PERMISSIONS_H_
+
+// NOTE: This file and interfaces marked as internal are not considered stable
+// and can be modified in incompatible ways between Crosswalk versions.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
+#error "You should include XW_Extension.h before this file"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XW_INTERNAL_PERMISSIONS_INTERFACE_1 "XW_Internal_PermissionsInterface_1"
+#define XW_INTERNAL_PERMISSIONS_INTERFACE XW_INTERNAL_PERMISSIONS_INTERFACE_1
+
+//
+// XW_INTERNAL_PERMISSIONS_INTERFACE: provides a way for extensions
+// check if they have the proper permissions for certain APIs.
+//
+
+struct XW_Internal_PermissionsInterface_1 {
+    int (*CheckAPIAccessControl)(XW_Extension extension, const char* api_name);
+    int (*RegisterPermissions)(XW_Extension extension, const char* perm_table);
+};
+
+typedef struct XW_Internal_PermissionsInterface_1
+    XW_Internal_PermissionsInterface;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_PERMISSIONS_H_
diff --git a/lwnode/modules/device-api/src/XW_Extension_Runtime.h b/lwnode/modules/device-api/src/XW_Extension_Runtime.h
new file mode 100644 (file)
index 0000000..ba55bf7
--- /dev/null
@@ -0,0 +1,38 @@
+// Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_RUNTIME_H_
+#define XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_RUNTIME_H_
+
+// NOTE: This file and interfaces marked as internal are not considered stable
+// and can be modified in incompatible ways between Crosswalk versions.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
+#error "You should include XW_Extension.h before this file"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XW_INTERNAL_RUNTIME_INTERFACE_1 "XW_Internal_RuntimeInterface_1"
+#define XW_INTERNAL_RUNTIME_INTERFACE XW_INTERNAL_RUNTIME_INTERFACE_1
+
+//
+// XW_INTERNAL_RUNTIME_INTERFACE: allow extensions to gather information
+// from the runtime.
+//
+
+struct XW_Internal_RuntimeInterface_1 {
+    void (*GetRuntimeVariableString)(XW_Extension extension, const char* key,
+                                     char* value, unsigned int value_len);
+};
+
+typedef struct XW_Internal_RuntimeInterface_1 XW_Internal_RuntimeInterface;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_RUNTIME_H_
diff --git a/lwnode/modules/device-api/src/XW_Extension_SyncMessage.h b/lwnode/modules/device-api/src/XW_Extension_SyncMessage.h
new file mode 100644 (file)
index 0000000..5a2c28b
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_SYNCMESSAGE_H_
+#define XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_SYNCMESSAGE_H_
+
+#include <vector>
+
+// NOTE: This file and interfaces marked as internal are not considered stable
+// and can be modified in incompatible ways between Crosswalk versions.
+
+#ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
+#error "You should include XW_Extension.h before this file"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//
+// XW_INTERNAL_SYNC_MESSAGING_INTERFACE: allow JavaScript code to send a
+// synchronous message to extension code and block until response is
+// available. The response is made available by calling the SetSyncReply
+// function, that can be done from outside the context of the SyncMessage
+// handler.
+//
+
+#define XW_INTERNAL_SYNC_MESSAGING_INTERFACE_1 \
+    "XW_InternalSyncMessagingInterface_1"
+#define XW_INTERNAL_SYNC_MESSAGING_INTERFACE \
+    XW_INTERNAL_SYNC_MESSAGING_INTERFACE_1
+
+typedef void (*XW_HandleSyncMessageCallback)(XW_Instance instance,
+                                             const char* message);
+
+struct XW_Internal_SyncMessagingInterface_1 {
+    void (*Register)(XW_Extension extension,
+                     XW_HandleSyncMessageCallback handle_sync_message);
+    void (*SetSyncReply)(XW_Instance instance, const char* reply);
+    void (*SetSyncBinaryReply)(XW_Instance instance, const std::vector<uint8_t>& reply);
+};
+
+typedef struct XW_Internal_SyncMessagingInterface_1
+    XW_Internal_SyncMessagingInterface;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_SYNCMESSAGE_H_
diff --git a/lwnode/modules/device-api/src/wrt-common-native-plugin.h b/lwnode/modules/device-api/src/wrt-common-native-plugin.h
new file mode 100644 (file)
index 0000000..f36f33e
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2017-present Samsung Electronics Co., Ltd
+ *
+* 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.
+ */
+
+#ifndef WRT_COMMON_NATIVE_PLUGIN_H_
+#define WRT_COMMON_NATIVE_PLUGIN_H_
+
+#include <string>
+
+namespace wrt {
+namespace common {
+
+    class NativePlugin {
+    public:
+        virtual void OnLoad() = 0;
+        virtual std::string OnCallSync(std::string& data) = 0;
+        virtual std::string OnCall(std::string& data, int callback_handle) = 0;
+    };
+
+    typedef NativePlugin* create_native_plugin_t();
+
+} // namespace common
+} // namespace wrt
+
+#define EXPORT_NATIVE_PLUGIN(pluginClass)                        \
+    extern "C" wrt::common::NativePlugin* create_native_plugin() \
+    {                                                            \
+        return (wrt::common::NativePlugin*)(new pluginClass());  \
+    }
+
+#endif // WRT_COMMON_NATIVE_PLUGIN_H_
diff --git a/lwnode/modules/gmain-loop/CMakeLists.txt b/lwnode/modules/gmain-loop/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2dc6321
--- /dev/null
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 2.8)
+set(CMAKE_CXX_STANDARD 11)
+project(gmain-loop)
+
+set(CMAKE_C_FLAGS "-std=gnu++1y -fPIE -Wno-invalid-offsetof -Wno-error=format=")
+
+add_definitions(-DBUILDING_NODE_EXTENSION -DNDEBUG)
+include_directories(
+  ${LWNODE_INCLUDES}
+  ../../code/escargotshim/deps/node-bindings/include
+)
+
+file(GLOB_RECURSE SOURCE_FILES src/*.cc)
+
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
diff --git a/lwnode/modules/gmain-loop/sample/hello-world.js b/lwnode/modules/gmain-loop/sample/hello-world.js
new file mode 100644 (file)
index 0000000..8d486da
--- /dev/null
@@ -0,0 +1,2 @@
+require('gmain-loop').init();
+console.log('hello-world');
diff --git a/lwnode/modules/gmain-loop/src/gmain-loop.cc b/lwnode/modules/gmain-loop/src/gmain-loop.cc
new file mode 100644 (file)
index 0000000..cf2bf79
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2022-present Samsung Electronics Co., Ltd
+ *
+ * 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.
+ */
+
+#include <node.h>
+#include <v8.h>
+#include "node_bindings.h"
+
+using namespace LWNode;
+
+void Init(const v8::FunctionCallbackInfo<v8::Value>& args) {
+  GmainLoopNodeBindings::enable();
+}
+
+void initModule(v8::Local<v8::Object> exports, v8::Local<v8::Object> module) {
+  NODE_SET_METHOD(exports, "init", Init);
+}
+
+NODE_MODULE(NODE_GYP_MODULE_NAME, initModule)
diff --git a/lwnode/pkgs/.clang-format b/lwnode/pkgs/.clang-format
new file mode 100644 (file)
index 0000000..6bd5fce
--- /dev/null
@@ -0,0 +1,6 @@
+# Defines the Google C++ style for automatic reformatting.
+# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
+BasedOnStyle: Google
+DerivePointerAlignment: false
+MaxEmptyLinesToKeep: 1
+SortIncludes: false
diff --git a/lwnode/pkgs/.gitignore b/lwnode/pkgs/.gitignore
new file mode 100644 (file)
index 0000000..1cc2578
--- /dev/null
@@ -0,0 +1,113 @@
+### Node ###
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+
+# Diagnostic reports (https://nodejs.org/api/report.html)
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+*.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# TypeScript v1 declaration files
+typings/
+
+# TypeScript cache
+*.tsbuildinfo
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+.env.test
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+
+# next.js build output
+.next
+
+# nuxt.js build output
+.nuxt
+
+# Uncomment the public line if your project uses Gatsby
+# https://nextjs.org/blog/next-9-1#public-directory-support
+# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
+# public
+
+# Storybook build outputs
+.out
+.storybook-out
+
+# vuepress build output
+.vuepress/dist
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
+
+# Temporary folders
+tmp/
+temp/
+
+# Tools
+.vscode
+
+# gbs
+kuep_net_signer.sh
+
+# addons
+out
+out_tizen
+build/
diff --git a/lwnode/pkgs/README.md b/lwnode/pkgs/README.md
new file mode 100644 (file)
index 0000000..9751b5c
--- /dev/null
@@ -0,0 +1 @@
+# lwnode-packages
diff --git a/lwnode/pkgs/apps/beagle/.gitignore b/lwnode/pkgs/apps/beagle/.gitignore
new file mode 100644 (file)
index 0000000..4233c60
--- /dev/null
@@ -0,0 +1,7 @@
+coverage/
+node_modules/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+.nyc_output
+dist
diff --git a/lwnode/pkgs/apps/beagle/__tests__/greeter.test.ts b/lwnode/pkgs/apps/beagle/__tests__/greeter.test.ts
new file mode 100644 (file)
index 0000000..598641c
--- /dev/null
@@ -0,0 +1,6 @@
+import { Greeter } from 'greeter';
+
+test('Should greet with message', () => {
+  const greeter = new Greeter('Beagle');
+  expect(greeter.greet()).toBe('Bonjour, Beagle!');
+});
diff --git a/lwnode/pkgs/apps/beagle/package-lock.json b/lwnode/pkgs/apps/beagle/package-lock.json
new file mode 100644 (file)
index 0000000..5865cae
--- /dev/null
@@ -0,0 +1,6916 @@
+{
+  "name": "beagle",
+  "version": "0.0.0",
+  "lockfileVersion": 1,
+  "requires": true,
+  "dependencies": {
+    "@babel/code-frame": {
+      "version": "7.16.7",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz",
+      "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==",
+      "dev": true,
+      "requires": {
+        "@babel/highlight": "^7.16.7"
+      }
+    },
+    "@babel/helper-validator-identifier": {
+      "version": "7.16.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz",
+      "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==",
+      "dev": true
+    },
+    "@babel/highlight": {
+      "version": "7.16.10",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz",
+      "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-validator-identifier": "^7.16.7",
+        "chalk": "^2.0.0",
+        "js-tokens": "^4.0.0"
+      },
+      "dependencies": {
+        "js-tokens": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+          "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+          "dev": true
+        }
+      }
+    },
+    "@sindresorhus/is": {
+      "version": "0.14.0",
+      "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
+      "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
+      "dev": true
+    },
+    "@szmarczak/http-timer": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
+      "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
+      "dev": true,
+      "requires": {
+        "defer-to-connect": "^1.0.1"
+      }
+    },
+    "@types/accepts": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz",
+      "integrity": "sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*"
+      }
+    },
+    "@types/body-parser": {
+      "version": "1.19.2",
+      "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
+      "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
+      "dev": true,
+      "requires": {
+        "@types/connect": "*",
+        "@types/node": "*"
+      }
+    },
+    "@types/connect": {
+      "version": "3.4.35",
+      "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
+      "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*"
+      }
+    },
+    "@types/content-disposition": {
+      "version": "0.5.4",
+      "resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.4.tgz",
+      "integrity": "sha512-0mPF08jn9zYI0n0Q/Pnz7C4kThdSt+6LD4amsrYDDpgBfrVWa3TcCOxKX1zkGgYniGagRv8heN2cbh+CAn+uuQ==",
+      "dev": true
+    },
+    "@types/cookies": {
+      "version": "0.7.7",
+      "resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.7.tgz",
+      "integrity": "sha512-h7BcvPUogWbKCzBR2lY4oqaZbO3jXZksexYJVFvkrFeLgbZjQkU4x8pRq6eg2MHXQhY0McQdqmmsxRWlVAHooA==",
+      "dev": true,
+      "requires": {
+        "@types/connect": "*",
+        "@types/express": "*",
+        "@types/keygrip": "*",
+        "@types/node": "*"
+      }
+    },
+    "@types/express": {
+      "version": "4.17.13",
+      "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
+      "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
+      "dev": true,
+      "requires": {
+        "@types/body-parser": "*",
+        "@types/express-serve-static-core": "^4.17.18",
+        "@types/qs": "*",
+        "@types/serve-static": "*"
+      }
+    },
+    "@types/express-serve-static-core": {
+      "version": "4.17.28",
+      "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz",
+      "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*",
+        "@types/qs": "*",
+        "@types/range-parser": "*"
+      }
+    },
+    "@types/http-assert": {
+      "version": "1.5.3",
+      "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.3.tgz",
+      "integrity": "sha512-FyAOrDuQmBi8/or3ns4rwPno7/9tJTijVW6aQQjK02+kOQ8zmoNg2XJtAuQhvQcy1ASJq38wirX5//9J1EqoUA==",
+      "dev": true
+    },
+    "@types/http-errors": {
+      "version": "1.8.2",
+      "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.2.tgz",
+      "integrity": "sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==",
+      "dev": true
+    },
+    "@types/jest": {
+      "version": "23.3.14",
+      "resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.14.tgz",
+      "integrity": "sha512-Q5hTcfdudEL2yOmluA1zaSyPbzWPmJ3XfSWeP3RyoYvS9hnje1ZyagrZOuQ6+1nQC1Gw+7gap3pLNL3xL6UBug==",
+      "dev": true
+    },
+    "@types/keygrip": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.2.tgz",
+      "integrity": "sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw==",
+      "dev": true
+    },
+    "@types/koa": {
+      "version": "2.13.4",
+      "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.13.4.tgz",
+      "integrity": "sha512-dfHYMfU+z/vKtQB7NUrthdAEiSvnLebvBjwHtfFmpZmB7em2N3WVQdHgnFq+xvyVgxW5jKDmjWfLD3lw4g4uTw==",
+      "dev": true,
+      "requires": {
+        "@types/accepts": "*",
+        "@types/content-disposition": "*",
+        "@types/cookies": "*",
+        "@types/http-assert": "*",
+        "@types/http-errors": "*",
+        "@types/keygrip": "*",
+        "@types/koa-compose": "*",
+        "@types/node": "*"
+      }
+    },
+    "@types/koa-compose": {
+      "version": "3.2.5",
+      "resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz",
+      "integrity": "sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ==",
+      "dev": true,
+      "requires": {
+        "@types/koa": "*"
+      }
+    },
+    "@types/koa-router": {
+      "version": "7.4.4",
+      "resolved": "https://registry.npmjs.org/@types/koa-router/-/koa-router-7.4.4.tgz",
+      "integrity": "sha512-3dHlZ6CkhgcWeF6wafEUvyyqjWYfKmev3vy1PtOmr0mBc3wpXPU5E8fBBd4YQo5bRpHPfmwC5yDaX7s4jhIN6A==",
+      "dev": true,
+      "requires": {
+        "@types/koa": "*"
+      }
+    },
+    "@types/mime": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
+      "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
+      "dev": true
+    },
+    "@types/node": {
+      "version": "10.17.60",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
+      "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
+      "dev": true
+    },
+    "@types/qs": {
+      "version": "6.9.7",
+      "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
+      "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
+      "dev": true
+    },
+    "@types/range-parser": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
+      "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
+      "dev": true
+    },
+    "@types/serve-static": {
+      "version": "1.13.10",
+      "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz",
+      "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==",
+      "dev": true,
+      "requires": {
+        "@types/mime": "^1",
+        "@types/node": "*"
+      }
+    },
+    "abab": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz",
+      "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==",
+      "dev": true
+    },
+    "abbrev": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+      "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+      "dev": true
+    },
+    "accepts": {
+      "version": "1.3.8",
+      "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+      "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+      "requires": {
+        "mime-types": "~2.1.34",
+        "negotiator": "0.6.3"
+      }
+    },
+    "acorn": {
+      "version": "5.7.4",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz",
+      "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==",
+      "dev": true
+    },
+    "acorn-globals": {
+      "version": "4.3.4",
+      "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz",
+      "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==",
+      "dev": true,
+      "requires": {
+        "acorn": "^6.0.1",
+        "acorn-walk": "^6.0.1"
+      },
+      "dependencies": {
+        "acorn": {
+          "version": "6.4.2",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz",
+          "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==",
+          "dev": true
+        }
+      }
+    },
+    "acorn-walk": {
+      "version": "6.2.0",
+      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz",
+      "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==",
+      "dev": true
+    },
+    "ajv": {
+      "version": "6.12.6",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+      "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+      "dev": true,
+      "requires": {
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
+      }
+    },
+    "ansi-align": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
+      "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
+      "dev": true,
+      "requires": {
+        "string-width": "^4.1.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "5.0.1",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+          "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+          "dev": true
+        },
+        "string-width": {
+          "version": "4.2.3",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+          "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^8.0.0",
+            "is-fullwidth-code-point": "^3.0.0",
+            "strip-ansi": "^6.0.1"
+          }
+        },
+        "strip-ansi": {
+          "version": "6.0.1",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+          "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^5.0.1"
+          }
+        }
+      }
+    },
+    "ansi-escapes": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
+      "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
+      "dev": true
+    },
+    "ansi-regex": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+      "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+      "dev": true
+    },
+    "ansi-styles": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+      "dev": true,
+      "requires": {
+        "color-convert": "^1.9.0"
+      }
+    },
+    "anymatch": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+      "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+      "dev": true,
+      "requires": {
+        "micromatch": "^3.1.4",
+        "normalize-path": "^2.1.1"
+      },
+      "dependencies": {
+        "arr-diff": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+          "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+          "dev": true
+        },
+        "array-unique": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+          "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+          "dev": true
+        },
+        "braces": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+          "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+          "dev": true,
+          "requires": {
+            "arr-flatten": "^1.1.0",
+            "array-unique": "^0.3.2",
+            "extend-shallow": "^2.0.1",
+            "fill-range": "^4.0.0",
+            "isobject": "^3.0.1",
+            "repeat-element": "^1.1.2",
+            "snapdragon": "^0.8.1",
+            "snapdragon-node": "^2.0.1",
+            "split-string": "^3.0.2",
+            "to-regex": "^3.0.1"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "expand-brackets": {
+          "version": "2.1.4",
+          "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+          "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+          "dev": true,
+          "requires": {
+            "debug": "^2.3.3",
+            "define-property": "^0.2.5",
+            "extend-shallow": "^2.0.1",
+            "posix-character-classes": "^0.1.0",
+            "regex-not": "^1.0.0",
+            "snapdragon": "^0.8.1",
+            "to-regex": "^3.0.1"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "0.2.5",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+              "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "^0.1.0"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            },
+            "is-accessor-descriptor": {
+              "version": "0.1.6",
+              "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+              "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+              "dev": true,
+              "requires": {
+                "kind-of": "^3.0.2"
+              },
+              "dependencies": {
+                "kind-of": {
+                  "version": "3.2.2",
+                  "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+                  "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+                  "dev": true,
+                  "requires": {
+                    "is-buffer": "^1.1.5"
+                  }
+                }
+              }
+            },
+            "is-data-descriptor": {
+              "version": "0.1.4",
+              "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+              "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+              "dev": true,
+              "requires": {
+                "kind-of": "^3.0.2"
+              },
+              "dependencies": {
+                "kind-of": {
+                  "version": "3.2.2",
+                  "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+                  "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+                  "dev": true,
+                  "requires": {
+                    "is-buffer": "^1.1.5"
+                  }
+                }
+              }
+            },
+            "is-descriptor": {
+              "version": "0.1.6",
+              "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+              "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+              "dev": true,
+              "requires": {
+                "is-accessor-descriptor": "^0.1.6",
+                "is-data-descriptor": "^0.1.4",
+                "kind-of": "^5.0.0"
+              }
+            },
+            "kind-of": {
+              "version": "5.1.0",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+              "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+              "dev": true
+            }
+          }
+        },
+        "extglob": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+          "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+          "dev": true,
+          "requires": {
+            "array-unique": "^0.3.2",
+            "define-property": "^1.0.0",
+            "expand-brackets": "^2.1.4",
+            "extend-shallow": "^2.0.1",
+            "fragment-cache": "^0.2.1",
+            "regex-not": "^1.0.0",
+            "snapdragon": "^0.8.1",
+            "to-regex": "^3.0.1"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "1.0.0",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+              "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "^1.0.0"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "requires": {
+            "extend-shallow": "^2.0.1",
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1",
+            "to-regex-range": "^2.1.0"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "6.0.3",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+          "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+          "dev": true
+        },
+        "micromatch": {
+          "version": "3.1.10",
+          "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+          "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+          "dev": true,
+          "requires": {
+            "arr-diff": "^4.0.0",
+            "array-unique": "^0.3.2",
+            "braces": "^2.3.1",
+            "define-property": "^2.0.2",
+            "extend-shallow": "^3.0.2",
+            "extglob": "^2.0.4",
+            "fragment-cache": "^0.2.1",
+            "kind-of": "^6.0.2",
+            "nanomatch": "^1.2.9",
+            "object.pick": "^1.3.0",
+            "regex-not": "^1.0.0",
+            "snapdragon": "^0.8.1",
+            "to-regex": "^3.0.2"
+          }
+        }
+      }
+    },
+    "append-transform": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz",
+      "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=",
+      "dev": true,
+      "requires": {
+        "default-require-extensions": "^1.0.0"
+      }
+    },
+    "argparse": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+      "dev": true,
+      "requires": {
+        "sprintf-js": "~1.0.2"
+      }
+    },
+    "arr-diff": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
+      "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
+      "dev": true,
+      "requires": {
+        "arr-flatten": "^1.0.1"
+      }
+    },
+    "arr-flatten": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
+      "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
+      "dev": true
+    },
+    "arr-union": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
+      "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
+      "dev": true
+    },
+    "array-equal": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
+      "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
+      "dev": true
+    },
+    "array-unique": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
+      "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
+      "dev": true
+    },
+    "arrify": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+      "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
+      "dev": true
+    },
+    "asn1": {
+      "version": "0.2.6",
+      "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
+      "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
+      "dev": true,
+      "requires": {
+        "safer-buffer": "~2.1.0"
+      }
+    },
+    "assert-plus": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+      "dev": true
+    },
+    "assign-symbols": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+      "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
+      "dev": true
+    },
+    "astral-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
+      "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
+      "dev": true
+    },
+    "async": {
+      "version": "2.6.3",
+      "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
+      "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.14"
+      }
+    },
+    "async-limiter": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+      "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
+      "dev": true
+    },
+    "asynckit": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+      "dev": true
+    },
+    "atob": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+      "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+      "dev": true
+    },
+    "aws-sign2": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+      "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+      "dev": true
+    },
+    "aws4": {
+      "version": "1.11.0",
+      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
+      "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
+      "dev": true
+    },
+    "babel-code-frame": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
+      "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
+      "dev": true,
+      "requires": {
+        "chalk": "^1.1.3",
+        "esutils": "^2.0.2",
+        "js-tokens": "^3.0.2"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+          "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+          "dev": true
+        },
+        "chalk": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+          "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^2.2.1",
+            "escape-string-regexp": "^1.0.2",
+            "has-ansi": "^2.0.0",
+            "strip-ansi": "^3.0.0",
+            "supports-color": "^2.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+          "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^2.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+          "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+          "dev": true
+        }
+      }
+    },
+    "babel-core": {
+      "version": "6.26.3",
+      "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
+      "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
+      "dev": true,
+      "requires": {
+        "babel-code-frame": "^6.26.0",
+        "babel-generator": "^6.26.0",
+        "babel-helpers": "^6.24.1",
+        "babel-messages": "^6.23.0",
+        "babel-register": "^6.26.0",
+        "babel-runtime": "^6.26.0",
+        "babel-template": "^6.26.0",
+        "babel-traverse": "^6.26.0",
+        "babel-types": "^6.26.0",
+        "babylon": "^6.18.0",
+        "convert-source-map": "^1.5.1",
+        "debug": "^2.6.9",
+        "json5": "^0.5.1",
+        "lodash": "^4.17.4",
+        "minimatch": "^3.0.4",
+        "path-is-absolute": "^1.0.1",
+        "private": "^0.1.8",
+        "slash": "^1.0.0",
+        "source-map": "^0.5.7"
+      }
+    },
+    "babel-generator": {
+      "version": "6.26.1",
+      "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
+      "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
+      "dev": true,
+      "requires": {
+        "babel-messages": "^6.23.0",
+        "babel-runtime": "^6.26.0",
+        "babel-types": "^6.26.0",
+        "detect-indent": "^4.0.0",
+        "jsesc": "^1.3.0",
+        "lodash": "^4.17.4",
+        "source-map": "^0.5.7",
+        "trim-right": "^1.0.1"
+      }
+    },
+    "babel-helpers": {
+      "version": "6.24.1",
+      "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
+      "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.22.0",
+        "babel-template": "^6.24.1"
+      }
+    },
+    "babel-jest": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz",
+      "integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==",
+      "dev": true,
+      "requires": {
+        "babel-plugin-istanbul": "^4.1.6",
+        "babel-preset-jest": "^23.2.0"
+      }
+    },
+    "babel-messages": {
+      "version": "6.23.0",
+      "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
+      "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.22.0"
+      }
+    },
+    "babel-plugin-istanbul": {
+      "version": "4.1.6",
+      "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
+      "integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==",
+      "dev": true,
+      "requires": {
+        "babel-plugin-syntax-object-rest-spread": "^6.13.0",
+        "find-up": "^2.1.0",
+        "istanbul-lib-instrument": "^1.10.1",
+        "test-exclude": "^4.2.1"
+      }
+    },
+    "babel-plugin-jest-hoist": {
+      "version": "23.2.0",
+      "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz",
+      "integrity": "sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc=",
+      "dev": true
+    },
+    "babel-plugin-syntax-object-rest-spread": {
+      "version": "6.13.0",
+      "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
+      "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=",
+      "dev": true
+    },
+    "babel-preset-jest": {
+      "version": "23.2.0",
+      "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz",
+      "integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=",
+      "dev": true,
+      "requires": {
+        "babel-plugin-jest-hoist": "^23.2.0",
+        "babel-plugin-syntax-object-rest-spread": "^6.13.0"
+      }
+    },
+    "babel-register": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
+      "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
+      "dev": true,
+      "requires": {
+        "babel-core": "^6.26.0",
+        "babel-runtime": "^6.26.0",
+        "core-js": "^2.5.0",
+        "home-or-tmp": "^2.0.0",
+        "lodash": "^4.17.4",
+        "mkdirp": "^0.5.1",
+        "source-map-support": "^0.4.15"
+      }
+    },
+    "babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
+      "dev": true,
+      "requires": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      }
+    },
+    "babel-template": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
+      "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.26.0",
+        "babel-traverse": "^6.26.0",
+        "babel-types": "^6.26.0",
+        "babylon": "^6.18.0",
+        "lodash": "^4.17.4"
+      }
+    },
+    "babel-traverse": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
+      "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
+      "dev": true,
+      "requires": {
+        "babel-code-frame": "^6.26.0",
+        "babel-messages": "^6.23.0",
+        "babel-runtime": "^6.26.0",
+        "babel-types": "^6.26.0",
+        "babylon": "^6.18.0",
+        "debug": "^2.6.8",
+        "globals": "^9.18.0",
+        "invariant": "^2.2.2",
+        "lodash": "^4.17.4"
+      }
+    },
+    "babel-types": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
+      "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.26.0",
+        "esutils": "^2.0.2",
+        "lodash": "^4.17.4",
+        "to-fast-properties": "^1.0.3"
+      }
+    },
+    "babylon": {
+      "version": "6.18.0",
+      "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+      "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
+      "dev": true
+    },
+    "balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true
+    },
+    "base": {
+      "version": "0.11.2",
+      "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
+      "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+      "dev": true,
+      "requires": {
+        "cache-base": "^1.0.1",
+        "class-utils": "^0.3.5",
+        "component-emitter": "^1.2.1",
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.1",
+        "mixin-deep": "^1.2.0",
+        "pascalcase": "^0.1.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        },
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "6.0.3",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+          "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+          "dev": true
+        }
+      }
+    },
+    "bcrypt-pbkdf": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+      "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+      "dev": true,
+      "requires": {
+        "tweetnacl": "^0.14.3"
+      }
+    },
+    "binary-extensions": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+      "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+      "dev": true
+    },
+    "bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
+    "boxen": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz",
+      "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==",
+      "dev": true,
+      "requires": {
+        "ansi-align": "^3.0.0",
+        "camelcase": "^6.2.0",
+        "chalk": "^4.1.0",
+        "cli-boxes": "^2.2.1",
+        "string-width": "^4.2.2",
+        "type-fest": "^0.20.2",
+        "widest-line": "^3.1.0",
+        "wrap-ansi": "^7.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "5.0.1",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+          "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+          "dev": true
+        },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "camelcase": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+          "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
+          "dev": true
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+          "dev": true
+        },
+        "string-width": {
+          "version": "4.2.3",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+          "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^8.0.0",
+            "is-fullwidth-code-point": "^3.0.0",
+            "strip-ansi": "^6.0.1"
+          }
+        },
+        "strip-ansi": {
+          "version": "6.0.1",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+          "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^5.0.1"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        },
+        "wrap-ansi": {
+          "version": "7.0.0",
+          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+          "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.0.0",
+            "string-width": "^4.1.0",
+            "strip-ansi": "^6.0.0"
+          }
+        }
+      }
+    },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "dev": true,
+      "requires": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "braces": {
+      "version": "1.8.5",
+      "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
+      "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
+      "dev": true,
+      "requires": {
+        "expand-range": "^1.8.1",
+        "preserve": "^0.2.0",
+        "repeat-element": "^1.1.2"
+      }
+    },
+    "browser-process-hrtime": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
+      "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==",
+      "dev": true
+    },
+    "browser-resolve": {
+      "version": "1.11.3",
+      "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz",
+      "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==",
+      "dev": true,
+      "requires": {
+        "resolve": "1.1.7"
+      },
+      "dependencies": {
+        "resolve": {
+          "version": "1.1.7",
+          "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
+          "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
+          "dev": true
+        }
+      }
+    },
+    "bs-logger": {
+      "version": "0.2.6",
+      "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz",
+      "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==",
+      "dev": true,
+      "requires": {
+        "fast-json-stable-stringify": "2.x"
+      }
+    },
+    "bser": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
+      "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==",
+      "dev": true,
+      "requires": {
+        "node-int64": "^0.4.0"
+      }
+    },
+    "buffer-from": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+      "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+      "dev": true
+    },
+    "builtin-modules": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
+      "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
+      "dev": true
+    },
+    "cache-base": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
+      "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+      "dev": true,
+      "requires": {
+        "collection-visit": "^1.0.0",
+        "component-emitter": "^1.2.1",
+        "get-value": "^2.0.6",
+        "has-value": "^1.0.0",
+        "isobject": "^3.0.1",
+        "set-value": "^2.0.0",
+        "to-object-path": "^0.3.0",
+        "union-value": "^1.0.0",
+        "unset-value": "^1.0.0"
+      },
+      "dependencies": {
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        }
+      }
+    },
+    "cache-content-type": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz",
+      "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==",
+      "requires": {
+        "mime-types": "^2.1.18",
+        "ylru": "^1.2.0"
+      }
+    },
+    "cacheable-request": {
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz",
+      "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==",
+      "dev": true,
+      "requires": {
+        "clone-response": "^1.0.2",
+        "get-stream": "^5.1.0",
+        "http-cache-semantics": "^4.0.0",
+        "keyv": "^3.0.0",
+        "lowercase-keys": "^2.0.0",
+        "normalize-url": "^4.1.0",
+        "responselike": "^1.0.2"
+      },
+      "dependencies": {
+        "get-stream": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+          "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+          "dev": true,
+          "requires": {
+            "pump": "^3.0.0"
+          }
+        },
+        "lowercase-keys": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
+          "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
+          "dev": true
+        }
+      }
+    },
+    "call-bind": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+      "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+      "dev": true,
+      "requires": {
+        "function-bind": "^1.1.1",
+        "get-intrinsic": "^1.0.2"
+      }
+    },
+    "callsites": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
+      "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
+      "dev": true
+    },
+    "camelcase": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+      "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+      "dev": true
+    },
+    "capture-exit": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz",
+      "integrity": "sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=",
+      "dev": true,
+      "requires": {
+        "rsvp": "^3.3.3"
+      }
+    },
+    "caseless": {
+      "version": "0.12.0",
+      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+      "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
+      "dev": true
+    },
+    "chalk": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+      "dev": true,
+      "requires": {
+        "ansi-styles": "^3.2.1",
+        "escape-string-regexp": "^1.0.5",
+        "supports-color": "^5.3.0"
+      }
+    },
+    "chokidar": {
+      "version": "3.5.3",
+      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+      "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+      "dev": true,
+      "requires": {
+        "anymatch": "~3.1.2",
+        "braces": "~3.0.2",
+        "fsevents": "~2.3.2",
+        "glob-parent": "~5.1.2",
+        "is-binary-path": "~2.1.0",
+        "is-glob": "~4.0.1",
+        "normalize-path": "~3.0.0",
+        "readdirp": "~3.6.0"
+      },
+      "dependencies": {
+        "anymatch": {
+          "version": "3.1.2",
+          "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+          "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
+          "dev": true,
+          "requires": {
+            "normalize-path": "^3.0.0",
+            "picomatch": "^2.0.4"
+          }
+        },
+        "braces": {
+          "version": "3.0.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+          "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+          "dev": true,
+          "requires": {
+            "fill-range": "^7.0.1"
+          }
+        },
+        "fill-range": {
+          "version": "7.0.1",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+          "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+          "dev": true,
+          "requires": {
+            "to-regex-range": "^5.0.1"
+          }
+        },
+        "fsevents": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+          "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+          "dev": true,
+          "optional": true
+        },
+        "glob-parent": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+          "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+          "dev": true,
+          "requires": {
+            "is-glob": "^4.0.1"
+          }
+        },
+        "is-extglob": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+          "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+          "dev": true
+        },
+        "is-glob": {
+          "version": "4.0.3",
+          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+          "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+          "dev": true,
+          "requires": {
+            "is-extglob": "^2.1.1"
+          }
+        },
+        "is-number": {
+          "version": "7.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+          "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+          "dev": true
+        },
+        "normalize-path": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+          "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+          "dev": true
+        },
+        "to-regex-range": {
+          "version": "5.0.1",
+          "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+          "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+          "dev": true,
+          "requires": {
+            "is-number": "^7.0.0"
+          }
+        }
+      }
+    },
+    "ci-info": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
+      "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
+      "dev": true
+    },
+    "class-utils": {
+      "version": "0.3.6",
+      "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
+      "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+      "dev": true,
+      "requires": {
+        "arr-union": "^3.1.0",
+        "define-property": "^0.2.5",
+        "isobject": "^3.0.0",
+        "static-extend": "^0.1.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        }
+      }
+    },
+    "cli-boxes": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz",
+      "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==",
+      "dev": true
+    },
+    "cliui": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
+      "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
+      "dev": true,
+      "requires": {
+        "string-width": "^2.1.1",
+        "strip-ansi": "^4.0.0",
+        "wrap-ansi": "^2.0.0"
+      }
+    },
+    "clone-response": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
+      "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
+      "dev": true,
+      "requires": {
+        "mimic-response": "^1.0.0"
+      }
+    },
+    "co": {
+      "version": "4.6.0",
+      "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+      "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
+    },
+    "code-point-at": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+      "dev": true
+    },
+    "collection-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
+      "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
+      "dev": true,
+      "requires": {
+        "map-visit": "^1.0.0",
+        "object-visit": "^1.0.0"
+      }
+    },
+    "color-convert": {
+      "version": "1.9.3",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+      "dev": true,
+      "requires": {
+        "color-name": "1.1.3"
+      }
+    },
+    "color-name": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+      "dev": true
+    },
+    "combined-stream": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+      "dev": true,
+      "requires": {
+        "delayed-stream": "~1.0.0"
+      }
+    },
+    "commander": {
+      "version": "2.20.3",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+      "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+      "dev": true
+    },
+    "component-emitter": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+      "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
+      "dev": true
+    },
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+      "dev": true
+    },
+    "configstore": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz",
+      "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==",
+      "dev": true,
+      "requires": {
+        "dot-prop": "^5.2.0",
+        "graceful-fs": "^4.1.2",
+        "make-dir": "^3.0.0",
+        "unique-string": "^2.0.0",
+        "write-file-atomic": "^3.0.0",
+        "xdg-basedir": "^4.0.0"
+      },
+      "dependencies": {
+        "write-file-atomic": {
+          "version": "3.0.3",
+          "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+          "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+          "dev": true,
+          "requires": {
+            "imurmurhash": "^0.1.4",
+            "is-typedarray": "^1.0.0",
+            "signal-exit": "^3.0.2",
+            "typedarray-to-buffer": "^3.1.5"
+          }
+        }
+      }
+    },
+    "content-disposition": {
+      "version": "0.5.4",
+      "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+      "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+      "requires": {
+        "safe-buffer": "5.2.1"
+      }
+    },
+    "content-type": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+      "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
+    },
+    "convert-source-map": {
+      "version": "1.8.0",
+      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
+      "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "~5.1.1"
+      },
+      "dependencies": {
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        }
+      }
+    },
+    "cookies": {
+      "version": "0.8.0",
+      "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz",
+      "integrity": "sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==",
+      "requires": {
+        "depd": "~2.0.0",
+        "keygrip": "~1.1.0"
+      }
+    },
+    "copy-descriptor": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
+      "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
+      "dev": true
+    },
+    "core-js": {
+      "version": "2.6.12",
+      "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
+      "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
+      "dev": true
+    },
+    "core-util-is": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+      "dev": true
+    },
+    "coveralls": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz",
+      "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==",
+      "dev": true,
+      "requires": {
+        "js-yaml": "^3.13.1",
+        "lcov-parse": "^1.0.0",
+        "log-driver": "^1.2.7",
+        "minimist": "^1.2.5",
+        "request": "^2.88.2"
+      }
+    },
+    "cross-spawn": {
+      "version": "6.0.5",
+      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+      "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+      "dev": true,
+      "requires": {
+        "nice-try": "^1.0.4",
+        "path-key": "^2.0.1",
+        "semver": "^5.5.0",
+        "shebang-command": "^1.2.0",
+        "which": "^1.2.9"
+      }
+    },
+    "crypto-random-string": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
+      "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==",
+      "dev": true
+    },
+    "cssom": {
+      "version": "0.3.8",
+      "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
+      "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==",
+      "dev": true
+    },
+    "cssstyle": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz",
+      "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==",
+      "dev": true,
+      "requires": {
+        "cssom": "0.3.x"
+      }
+    },
+    "dashdash": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+      "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "^1.0.0"
+      }
+    },
+    "data-urls": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz",
+      "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==",
+      "dev": true,
+      "requires": {
+        "abab": "^2.0.0",
+        "whatwg-mimetype": "^2.2.0",
+        "whatwg-url": "^7.0.0"
+      },
+      "dependencies": {
+        "whatwg-url": {
+          "version": "7.1.0",
+          "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz",
+          "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==",
+          "dev": true,
+          "requires": {
+            "lodash.sortby": "^4.7.0",
+            "tr46": "^1.0.1",
+            "webidl-conversions": "^4.0.2"
+          }
+        }
+      }
+    },
+    "debug": {
+      "version": "2.6.9",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+      "dev": true,
+      "requires": {
+        "ms": "2.0.0"
+      }
+    },
+    "decamelize": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+      "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+      "dev": true
+    },
+    "decode-uri-component": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+      "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+      "dev": true
+    },
+    "decompress-response": {
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
+      "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
+      "dev": true,
+      "requires": {
+        "mimic-response": "^1.0.0"
+      }
+    },
+    "deep-equal": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
+      "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
+    },
+    "deep-extend": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+      "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+      "dev": true
+    },
+    "deep-is": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+      "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+      "dev": true
+    },
+    "default-require-extensions": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz",
+      "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=",
+      "dev": true,
+      "requires": {
+        "strip-bom": "^2.0.0"
+      }
+    },
+    "defer-to-connect": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",
+      "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
+      "dev": true
+    },
+    "define-properties": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+      "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+      "dev": true,
+      "requires": {
+        "object-keys": "^1.0.12"
+      }
+    },
+    "define-property": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
+      "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+      "dev": true,
+      "requires": {
+        "is-descriptor": "^1.0.2",
+        "isobject": "^3.0.1"
+      },
+      "dependencies": {
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        },
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "6.0.3",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+          "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+          "dev": true
+        }
+      }
+    },
+    "delayed-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+      "dev": true
+    },
+    "delegates": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+      "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+    },
+    "depd": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+      "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
+    },
+    "destroy": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.1.1.tgz",
+      "integrity": "sha512-jxwFW+yrVOLdwqIWvowFOM8UPdhZnvOF6mhXQQLXMxBDLtv2JVJlVJPEwkDv9prqscEtGtmnxuuI6pQKStK1vA=="
+    },
+    "detect-indent": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
+      "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
+      "dev": true,
+      "requires": {
+        "repeating": "^2.0.0"
+      }
+    },
+    "detect-newline": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz",
+      "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=",
+      "dev": true
+    },
+    "diff": {
+      "version": "3.5.0",
+      "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+      "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
+      "dev": true
+    },
+    "domexception": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
+      "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==",
+      "dev": true,
+      "requires": {
+        "webidl-conversions": "^4.0.2"
+      }
+    },
+    "dot-prop": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
+      "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
+      "dev": true,
+      "requires": {
+        "is-obj": "^2.0.0"
+      }
+    },
+    "duplexer3": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
+      "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=",
+      "dev": true
+    },
+    "ecc-jsbn": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+      "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+      "dev": true,
+      "requires": {
+        "jsbn": "~0.1.0",
+        "safer-buffer": "^2.1.0"
+      }
+    },
+    "ee-first": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+      "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
+    },
+    "emoji-regex": {
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+      "dev": true
+    },
+    "encodeurl": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+      "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
+    },
+    "end-of-stream": {
+      "version": "1.4.4",
+      "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+      "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+      "dev": true,
+      "requires": {
+        "once": "^1.4.0"
+      }
+    },
+    "error-ex": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+      "dev": true,
+      "requires": {
+        "is-arrayish": "^0.2.1"
+      }
+    },
+    "es-abstract": {
+      "version": "1.19.1",
+      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz",
+      "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "es-to-primitive": "^1.2.1",
+        "function-bind": "^1.1.1",
+        "get-intrinsic": "^1.1.1",
+        "get-symbol-description": "^1.0.0",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.2",
+        "internal-slot": "^1.0.3",
+        "is-callable": "^1.2.4",
+        "is-negative-zero": "^2.0.1",
+        "is-regex": "^1.1.4",
+        "is-shared-array-buffer": "^1.0.1",
+        "is-string": "^1.0.7",
+        "is-weakref": "^1.0.1",
+        "object-inspect": "^1.11.0",
+        "object-keys": "^1.1.1",
+        "object.assign": "^4.1.2",
+        "string.prototype.trimend": "^1.0.4",
+        "string.prototype.trimstart": "^1.0.4",
+        "unbox-primitive": "^1.0.1"
+      }
+    },
+    "es-to-primitive": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+      "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+      "dev": true,
+      "requires": {
+        "is-callable": "^1.1.4",
+        "is-date-object": "^1.0.1",
+        "is-symbol": "^1.0.2"
+      }
+    },
+    "escape-goat": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz",
+      "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==",
+      "dev": true
+    },
+    "escape-html": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+      "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
+    },
+    "escape-string-regexp": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+      "dev": true
+    },
+    "escodegen": {
+      "version": "1.14.3",
+      "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
+      "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
+      "dev": true,
+      "requires": {
+        "esprima": "^4.0.1",
+        "estraverse": "^4.2.0",
+        "esutils": "^2.0.2",
+        "optionator": "^0.8.1",
+        "source-map": "~0.6.1"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true,
+          "optional": true
+        }
+      }
+    },
+    "esprima": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+      "dev": true
+    },
+    "estraverse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+      "dev": true
+    },
+    "esutils": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+      "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+      "dev": true
+    },
+    "exec-sh": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz",
+      "integrity": "sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw==",
+      "dev": true,
+      "requires": {
+        "merge": "^1.2.0"
+      }
+    },
+    "execa": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
+      "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
+      "dev": true,
+      "requires": {
+        "cross-spawn": "^6.0.0",
+        "get-stream": "^4.0.0",
+        "is-stream": "^1.1.0",
+        "npm-run-path": "^2.0.0",
+        "p-finally": "^1.0.0",
+        "signal-exit": "^3.0.0",
+        "strip-eof": "^1.0.0"
+      }
+    },
+    "exit": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
+      "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=",
+      "dev": true
+    },
+    "expand-brackets": {
+      "version": "0.1.5",
+      "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
+      "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
+      "dev": true,
+      "requires": {
+        "is-posix-bracket": "^0.1.0"
+      }
+    },
+    "expand-range": {
+      "version": "1.8.2",
+      "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
+      "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
+      "dev": true,
+      "requires": {
+        "fill-range": "^2.1.0"
+      }
+    },
+    "expect": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/expect/-/expect-23.6.0.tgz",
+      "integrity": "sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w==",
+      "dev": true,
+      "requires": {
+        "ansi-styles": "^3.2.0",
+        "jest-diff": "^23.6.0",
+        "jest-get-type": "^22.1.0",
+        "jest-matcher-utils": "^23.6.0",
+        "jest-message-util": "^23.4.0",
+        "jest-regex-util": "^23.3.0"
+      }
+    },
+    "extend": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+      "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+      "dev": true
+    },
+    "extend-shallow": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+      "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+      "dev": true,
+      "requires": {
+        "assign-symbols": "^1.0.0",
+        "is-extendable": "^1.0.1"
+      },
+      "dependencies": {
+        "is-extendable": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+          "dev": true,
+          "requires": {
+            "is-plain-object": "^2.0.4"
+          }
+        }
+      }
+    },
+    "extglob": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
+      "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
+      "dev": true,
+      "requires": {
+        "is-extglob": "^1.0.0"
+      }
+    },
+    "extsprintf": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+      "dev": true
+    },
+    "fast-deep-equal": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+      "dev": true
+    },
+    "fast-json-stable-stringify": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+      "dev": true
+    },
+    "fast-levenshtein": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+      "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
+      "dev": true
+    },
+    "fb-watchman": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz",
+      "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==",
+      "dev": true,
+      "requires": {
+        "bser": "2.1.1"
+      }
+    },
+    "file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "dev": true,
+      "optional": true
+    },
+    "filename-regex": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
+      "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
+      "dev": true
+    },
+    "fileset": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz",
+      "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=",
+      "dev": true,
+      "requires": {
+        "glob": "^7.0.3",
+        "minimatch": "^3.0.3"
+      }
+    },
+    "fill-range": {
+      "version": "2.2.4",
+      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
+      "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==",
+      "dev": true,
+      "requires": {
+        "is-number": "^2.1.0",
+        "isobject": "^2.0.0",
+        "randomatic": "^3.0.0",
+        "repeat-element": "^1.1.2",
+        "repeat-string": "^1.5.2"
+      }
+    },
+    "find-up": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+      "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+      "dev": true,
+      "requires": {
+        "locate-path": "^2.0.0"
+      }
+    },
+    "for-each": {
+      "version": "0.3.3",
+      "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
+      "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
+      "dev": true,
+      "requires": {
+        "is-callable": "^1.1.3"
+      }
+    },
+    "for-in": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+      "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
+      "dev": true
+    },
+    "for-own": {
+      "version": "0.1.5",
+      "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
+      "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
+      "dev": true,
+      "requires": {
+        "for-in": "^1.0.1"
+      }
+    },
+    "forever-agent": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+      "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+      "dev": true
+    },
+    "form-data": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
+      "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
+      "dev": true,
+      "requires": {
+        "asynckit": "^0.4.0",
+        "combined-stream": "^1.0.6",
+        "mime-types": "^2.1.12"
+      }
+    },
+    "fragment-cache": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+      "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
+      "dev": true,
+      "requires": {
+        "map-cache": "^0.2.2"
+      }
+    },
+    "fresh": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+      "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
+    },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+      "dev": true
+    },
+    "fsevents": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+      "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "bindings": "^1.5.0",
+        "nan": "^2.12.1"
+      }
+    },
+    "function-bind": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+      "dev": true
+    },
+    "get-caller-file": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
+      "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
+      "dev": true
+    },
+    "get-intrinsic": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+      "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+      "dev": true,
+      "requires": {
+        "function-bind": "^1.1.1",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.1"
+      }
+    },
+    "get-stream": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
+      "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
+      "dev": true,
+      "requires": {
+        "pump": "^3.0.0"
+      }
+    },
+    "get-symbol-description": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
+      "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "get-intrinsic": "^1.1.1"
+      }
+    },
+    "get-value": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
+      "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
+      "dev": true
+    },
+    "getpass": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+      "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "^1.0.0"
+      }
+    },
+    "glob": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
+      "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
+      "dev": true,
+      "requires": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.0.4",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      }
+    },
+    "glob-base": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
+      "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
+      "dev": true,
+      "requires": {
+        "glob-parent": "^2.0.0",
+        "is-glob": "^2.0.0"
+      }
+    },
+    "glob-parent": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
+      "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
+      "dev": true,
+      "requires": {
+        "is-glob": "^2.0.0"
+      }
+    },
+    "global-dirs": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz",
+      "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==",
+      "dev": true,
+      "requires": {
+        "ini": "2.0.0"
+      }
+    },
+    "globals": {
+      "version": "9.18.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
+      "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
+      "dev": true
+    },
+    "got": {
+      "version": "9.6.0",
+      "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
+      "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==",
+      "dev": true,
+      "requires": {
+        "@sindresorhus/is": "^0.14.0",
+        "@szmarczak/http-timer": "^1.1.2",
+        "cacheable-request": "^6.0.0",
+        "decompress-response": "^3.3.0",
+        "duplexer3": "^0.1.4",
+        "get-stream": "^4.1.0",
+        "lowercase-keys": "^1.0.1",
+        "mimic-response": "^1.0.1",
+        "p-cancelable": "^1.0.0",
+        "to-readable-stream": "^1.0.0",
+        "url-parse-lax": "^3.0.0"
+      }
+    },
+    "graceful-fs": {
+      "version": "4.2.9",
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
+      "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
+      "dev": true
+    },
+    "growly": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
+      "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=",
+      "dev": true
+    },
+    "handlebars": {
+      "version": "4.7.7",
+      "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz",
+      "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.2.5",
+        "neo-async": "^2.6.0",
+        "source-map": "^0.6.1",
+        "uglify-js": "^3.1.4",
+        "wordwrap": "^1.0.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "har-schema": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+      "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+      "dev": true
+    },
+    "har-validator": {
+      "version": "5.1.5",
+      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
+      "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
+      "dev": true,
+      "requires": {
+        "ajv": "^6.12.3",
+        "har-schema": "^2.0.0"
+      }
+    },
+    "has": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+      "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+      "dev": true,
+      "requires": {
+        "function-bind": "^1.1.1"
+      }
+    },
+    "has-ansi": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+      "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+      "dev": true,
+      "requires": {
+        "ansi-regex": "^2.0.0"
+      }
+    },
+    "has-bigints": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
+      "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
+      "dev": true
+    },
+    "has-flag": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+      "dev": true
+    },
+    "has-symbols": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+      "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
+    },
+    "has-tostringtag": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
+      "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
+      "requires": {
+        "has-symbols": "^1.0.2"
+      }
+    },
+    "has-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
+      "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
+      "dev": true,
+      "requires": {
+        "get-value": "^2.0.6",
+        "has-values": "^1.0.0",
+        "isobject": "^3.0.0"
+      },
+      "dependencies": {
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        }
+      }
+    },
+    "has-values": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
+      "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
+      "dev": true,
+      "requires": {
+        "is-number": "^3.0.0",
+        "kind-of": "^4.0.0"
+      },
+      "dependencies": {
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "kind-of": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+          "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "has-yarn": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz",
+      "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==",
+      "dev": true
+    },
+    "home-or-tmp": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
+      "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
+      "dev": true,
+      "requires": {
+        "os-homedir": "^1.0.0",
+        "os-tmpdir": "^1.0.1"
+      }
+    },
+    "hosted-git-info": {
+      "version": "2.8.9",
+      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
+      "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
+      "dev": true
+    },
+    "html-encoding-sniffer": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
+      "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
+      "dev": true,
+      "requires": {
+        "whatwg-encoding": "^1.0.1"
+      }
+    },
+    "http-assert": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz",
+      "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==",
+      "requires": {
+        "deep-equal": "~1.0.1",
+        "http-errors": "~1.8.0"
+      }
+    },
+    "http-cache-semantics": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
+      "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==",
+      "dev": true
+    },
+    "http-errors": {
+      "version": "1.8.1",
+      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
+      "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
+      "requires": {
+        "depd": "~1.1.2",
+        "inherits": "2.0.4",
+        "setprototypeof": "1.2.0",
+        "statuses": ">= 1.5.0 < 2",
+        "toidentifier": "1.0.1"
+      },
+      "dependencies": {
+        "depd": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+          "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
+        }
+      }
+    },
+    "http-signature": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+      "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "^1.0.0",
+        "jsprim": "^1.2.2",
+        "sshpk": "^1.7.0"
+      }
+    },
+    "iconv-lite": {
+      "version": "0.4.24",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+      "dev": true,
+      "requires": {
+        "safer-buffer": ">= 2.1.2 < 3"
+      }
+    },
+    "ignore-by-default": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+      "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=",
+      "dev": true
+    },
+    "import-lazy": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
+      "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
+      "dev": true
+    },
+    "import-local": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz",
+      "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==",
+      "dev": true,
+      "requires": {
+        "pkg-dir": "^2.0.0",
+        "resolve-cwd": "^2.0.0"
+      }
+    },
+    "imurmurhash": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+      "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+      "dev": true
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+      "dev": true,
+      "requires": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+    },
+    "ini": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
+      "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==",
+      "dev": true
+    },
+    "internal-slot": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz",
+      "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==",
+      "dev": true,
+      "requires": {
+        "get-intrinsic": "^1.1.0",
+        "has": "^1.0.3",
+        "side-channel": "^1.0.4"
+      }
+    },
+    "invariant": {
+      "version": "2.2.4",
+      "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
+      "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
+      "dev": true,
+      "requires": {
+        "loose-envify": "^1.0.0"
+      }
+    },
+    "invert-kv": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
+      "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
+      "dev": true
+    },
+    "is-accessor-descriptor": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+      "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.0.2"
+      }
+    },
+    "is-arrayish": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+      "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
+      "dev": true
+    },
+    "is-bigint": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
+      "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
+      "dev": true,
+      "requires": {
+        "has-bigints": "^1.0.1"
+      }
+    },
+    "is-binary-path": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+      "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+      "dev": true,
+      "requires": {
+        "binary-extensions": "^2.0.0"
+      }
+    },
+    "is-boolean-object": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
+      "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "has-tostringtag": "^1.0.0"
+      }
+    },
+    "is-buffer": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+      "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+      "dev": true
+    },
+    "is-callable": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz",
+      "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==",
+      "dev": true
+    },
+    "is-ci": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz",
+      "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==",
+      "dev": true,
+      "requires": {
+        "ci-info": "^1.5.0"
+      }
+    },
+    "is-core-module": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz",
+      "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
+      "dev": true,
+      "requires": {
+        "has": "^1.0.3"
+      }
+    },
+    "is-data-descriptor": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+      "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.0.2"
+      }
+    },
+    "is-date-object": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
+      "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
+      "dev": true,
+      "requires": {
+        "has-tostringtag": "^1.0.0"
+      }
+    },
+    "is-descriptor": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+      "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+      "dev": true,
+      "requires": {
+        "is-accessor-descriptor": "^0.1.6",
+        "is-data-descriptor": "^0.1.4",
+        "kind-of": "^5.0.0"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+          "dev": true
+        }
+      }
+    },
+    "is-dotfile": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
+      "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=",
+      "dev": true
+    },
+    "is-equal-shallow": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
+      "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
+      "dev": true,
+      "requires": {
+        "is-primitive": "^2.0.0"
+      }
+    },
+    "is-extendable": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+      "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+      "dev": true
+    },
+    "is-extglob": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+      "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
+      "dev": true
+    },
+    "is-finite": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
+      "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
+      "dev": true
+    },
+    "is-fullwidth-code-point": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+      "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+      "dev": true
+    },
+    "is-generator-fn": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz",
+      "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=",
+      "dev": true
+    },
+    "is-generator-function": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
+      "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
+      "requires": {
+        "has-tostringtag": "^1.0.0"
+      }
+    },
+    "is-glob": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+      "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
+      "dev": true,
+      "requires": {
+        "is-extglob": "^1.0.0"
+      }
+    },
+    "is-installed-globally": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz",
+      "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==",
+      "dev": true,
+      "requires": {
+        "global-dirs": "^3.0.0",
+        "is-path-inside": "^3.0.2"
+      }
+    },
+    "is-negative-zero": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",
+      "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==",
+      "dev": true
+    },
+    "is-npm": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz",
+      "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==",
+      "dev": true
+    },
+    "is-number": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
+      "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.0.2"
+      }
+    },
+    "is-number-object": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz",
+      "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==",
+      "dev": true,
+      "requires": {
+        "has-tostringtag": "^1.0.0"
+      }
+    },
+    "is-obj": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+      "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
+      "dev": true
+    },
+    "is-path-inside": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+      "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
+      "dev": true
+    },
+    "is-plain-object": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+      "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.1"
+      },
+      "dependencies": {
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        }
+      }
+    },
+    "is-posix-bracket": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
+      "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
+      "dev": true
+    },
+    "is-primitive": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
+      "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
+      "dev": true
+    },
+    "is-regex": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
+      "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "has-tostringtag": "^1.0.0"
+      }
+    },
+    "is-shared-array-buffer": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz",
+      "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==",
+      "dev": true
+    },
+    "is-stream": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
+      "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
+      "dev": true
+    },
+    "is-string": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
+      "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
+      "dev": true,
+      "requires": {
+        "has-tostringtag": "^1.0.0"
+      }
+    },
+    "is-symbol": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
+      "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
+      "dev": true,
+      "requires": {
+        "has-symbols": "^1.0.2"
+      }
+    },
+    "is-typedarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+      "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+      "dev": true
+    },
+    "is-utf8": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
+      "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
+      "dev": true
+    },
+    "is-weakref": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
+      "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2"
+      }
+    },
+    "is-windows": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+      "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
+      "dev": true
+    },
+    "is-wsl": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
+      "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
+      "dev": true
+    },
+    "is-yarn-global": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz",
+      "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==",
+      "dev": true
+    },
+    "isarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+      "dev": true
+    },
+    "isexe": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+      "dev": true
+    },
+    "isobject": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+      "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+      "dev": true,
+      "requires": {
+        "isarray": "1.0.0"
+      }
+    },
+    "isstream": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+      "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+      "dev": true
+    },
+    "istanbul-api": {
+      "version": "1.3.7",
+      "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.7.tgz",
+      "integrity": "sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA==",
+      "dev": true,
+      "requires": {
+        "async": "^2.1.4",
+        "fileset": "^2.0.2",
+        "istanbul-lib-coverage": "^1.2.1",
+        "istanbul-lib-hook": "^1.2.2",
+        "istanbul-lib-instrument": "^1.10.2",
+        "istanbul-lib-report": "^1.1.5",
+        "istanbul-lib-source-maps": "^1.2.6",
+        "istanbul-reports": "^1.5.1",
+        "js-yaml": "^3.7.0",
+        "mkdirp": "^0.5.1",
+        "once": "^1.4.0"
+      }
+    },
+    "istanbul-lib-coverage": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz",
+      "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==",
+      "dev": true
+    },
+    "istanbul-lib-hook": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz",
+      "integrity": "sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw==",
+      "dev": true,
+      "requires": {
+        "append-transform": "^0.4.0"
+      }
+    },
+    "istanbul-lib-instrument": {
+      "version": "1.10.2",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz",
+      "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==",
+      "dev": true,
+      "requires": {
+        "babel-generator": "^6.18.0",
+        "babel-template": "^6.16.0",
+        "babel-traverse": "^6.18.0",
+        "babel-types": "^6.18.0",
+        "babylon": "^6.18.0",
+        "istanbul-lib-coverage": "^1.2.1",
+        "semver": "^5.3.0"
+      }
+    },
+    "istanbul-lib-report": {
+      "version": "1.1.5",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz",
+      "integrity": "sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw==",
+      "dev": true,
+      "requires": {
+        "istanbul-lib-coverage": "^1.2.1",
+        "mkdirp": "^0.5.1",
+        "path-parse": "^1.0.5",
+        "supports-color": "^3.1.2"
+      },
+      "dependencies": {
+        "has-flag": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+          "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "3.2.3",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
+          "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
+          "dev": true,
+          "requires": {
+            "has-flag": "^1.0.0"
+          }
+        }
+      }
+    },
+    "istanbul-lib-source-maps": {
+      "version": "1.2.6",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz",
+      "integrity": "sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg==",
+      "dev": true,
+      "requires": {
+        "debug": "^3.1.0",
+        "istanbul-lib-coverage": "^1.2.1",
+        "mkdirp": "^0.5.1",
+        "rimraf": "^2.6.1",
+        "source-map": "^0.5.3"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "3.2.7",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+          "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+          "dev": true,
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "ms": {
+          "version": "2.1.3",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+          "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+          "dev": true
+        }
+      }
+    },
+    "istanbul-reports": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.1.tgz",
+      "integrity": "sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw==",
+      "dev": true,
+      "requires": {
+        "handlebars": "^4.0.3"
+      }
+    },
+    "jest": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest/-/jest-23.6.0.tgz",
+      "integrity": "sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw==",
+      "dev": true,
+      "requires": {
+        "import-local": "^1.0.0",
+        "jest-cli": "^23.6.0"
+      },
+      "dependencies": {
+        "jest-cli": {
+          "version": "23.6.0",
+          "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.6.0.tgz",
+          "integrity": "sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ==",
+          "dev": true,
+          "requires": {
+            "ansi-escapes": "^3.0.0",
+            "chalk": "^2.0.1",
+            "exit": "^0.1.2",
+            "glob": "^7.1.2",
+            "graceful-fs": "^4.1.11",
+            "import-local": "^1.0.0",
+            "is-ci": "^1.0.10",
+            "istanbul-api": "^1.3.1",
+            "istanbul-lib-coverage": "^1.2.0",
+            "istanbul-lib-instrument": "^1.10.1",
+            "istanbul-lib-source-maps": "^1.2.4",
+            "jest-changed-files": "^23.4.2",
+            "jest-config": "^23.6.0",
+            "jest-environment-jsdom": "^23.4.0",
+            "jest-get-type": "^22.1.0",
+            "jest-haste-map": "^23.6.0",
+            "jest-message-util": "^23.4.0",
+            "jest-regex-util": "^23.3.0",
+            "jest-resolve-dependencies": "^23.6.0",
+            "jest-runner": "^23.6.0",
+            "jest-runtime": "^23.6.0",
+            "jest-snapshot": "^23.6.0",
+            "jest-util": "^23.4.0",
+            "jest-validate": "^23.6.0",
+            "jest-watcher": "^23.4.0",
+            "jest-worker": "^23.2.0",
+            "micromatch": "^2.3.11",
+            "node-notifier": "^5.2.1",
+            "prompts": "^0.1.9",
+            "realpath-native": "^1.0.0",
+            "rimraf": "^2.5.4",
+            "slash": "^1.0.0",
+            "string-length": "^2.0.0",
+            "strip-ansi": "^4.0.0",
+            "which": "^1.2.12",
+            "yargs": "^11.0.0"
+          }
+        }
+      }
+    },
+    "jest-changed-files": {
+      "version": "23.4.2",
+      "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz",
+      "integrity": "sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA==",
+      "dev": true,
+      "requires": {
+        "throat": "^4.0.0"
+      }
+    },
+    "jest-config": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.6.0.tgz",
+      "integrity": "sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ==",
+      "dev": true,
+      "requires": {
+        "babel-core": "^6.0.0",
+        "babel-jest": "^23.6.0",
+        "chalk": "^2.0.1",
+        "glob": "^7.1.1",
+        "jest-environment-jsdom": "^23.4.0",
+        "jest-environment-node": "^23.4.0",
+        "jest-get-type": "^22.1.0",
+        "jest-jasmine2": "^23.6.0",
+        "jest-regex-util": "^23.3.0",
+        "jest-resolve": "^23.6.0",
+        "jest-util": "^23.4.0",
+        "jest-validate": "^23.6.0",
+        "micromatch": "^2.3.11",
+        "pretty-format": "^23.6.0"
+      }
+    },
+    "jest-diff": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.6.0.tgz",
+      "integrity": "sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.0.1",
+        "diff": "^3.2.0",
+        "jest-get-type": "^22.1.0",
+        "pretty-format": "^23.6.0"
+      }
+    },
+    "jest-docblock": {
+      "version": "23.2.0",
+      "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.2.0.tgz",
+      "integrity": "sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c=",
+      "dev": true,
+      "requires": {
+        "detect-newline": "^2.1.0"
+      }
+    },
+    "jest-each": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.6.0.tgz",
+      "integrity": "sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.0.1",
+        "pretty-format": "^23.6.0"
+      }
+    },
+    "jest-environment-jsdom": {
+      "version": "23.4.0",
+      "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz",
+      "integrity": "sha1-BWp5UrP+pROsYqFAosNox52eYCM=",
+      "dev": true,
+      "requires": {
+        "jest-mock": "^23.2.0",
+        "jest-util": "^23.4.0",
+        "jsdom": "^11.5.1"
+      }
+    },
+    "jest-environment-node": {
+      "version": "23.4.0",
+      "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.4.0.tgz",
+      "integrity": "sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA=",
+      "dev": true,
+      "requires": {
+        "jest-mock": "^23.2.0",
+        "jest-util": "^23.4.0"
+      }
+    },
+    "jest-get-type": {
+      "version": "22.4.3",
+      "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
+      "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
+      "dev": true
+    },
+    "jest-haste-map": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.6.0.tgz",
+      "integrity": "sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg==",
+      "dev": true,
+      "requires": {
+        "fb-watchman": "^2.0.0",
+        "graceful-fs": "^4.1.11",
+        "invariant": "^2.2.4",
+        "jest-docblock": "^23.2.0",
+        "jest-serializer": "^23.0.1",
+        "jest-worker": "^23.2.0",
+        "micromatch": "^2.3.11",
+        "sane": "^2.0.0"
+      }
+    },
+    "jest-jasmine2": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz",
+      "integrity": "sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ==",
+      "dev": true,
+      "requires": {
+        "babel-traverse": "^6.0.0",
+        "chalk": "^2.0.1",
+        "co": "^4.6.0",
+        "expect": "^23.6.0",
+        "is-generator-fn": "^1.0.0",
+        "jest-diff": "^23.6.0",
+        "jest-each": "^23.6.0",
+        "jest-matcher-utils": "^23.6.0",
+        "jest-message-util": "^23.4.0",
+        "jest-snapshot": "^23.6.0",
+        "jest-util": "^23.4.0",
+        "pretty-format": "^23.6.0"
+      }
+    },
+    "jest-leak-detector": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz",
+      "integrity": "sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg==",
+      "dev": true,
+      "requires": {
+        "pretty-format": "^23.6.0"
+      }
+    },
+    "jest-matcher-utils": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz",
+      "integrity": "sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.0.1",
+        "jest-get-type": "^22.1.0",
+        "pretty-format": "^23.6.0"
+      }
+    },
+    "jest-message-util": {
+      "version": "23.4.0",
+      "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz",
+      "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.0.0-beta.35",
+        "chalk": "^2.0.1",
+        "micromatch": "^2.3.11",
+        "slash": "^1.0.0",
+        "stack-utils": "^1.0.1"
+      }
+    },
+    "jest-mock": {
+      "version": "23.2.0",
+      "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz",
+      "integrity": "sha1-rRxg8p6HGdR8JuETgJi20YsmETQ=",
+      "dev": true
+    },
+    "jest-regex-util": {
+      "version": "23.3.0",
+      "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.3.0.tgz",
+      "integrity": "sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U=",
+      "dev": true
+    },
+    "jest-resolve": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.6.0.tgz",
+      "integrity": "sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA==",
+      "dev": true,
+      "requires": {
+        "browser-resolve": "^1.11.3",
+        "chalk": "^2.0.1",
+        "realpath-native": "^1.0.0"
+      }
+    },
+    "jest-resolve-dependencies": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz",
+      "integrity": "sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA==",
+      "dev": true,
+      "requires": {
+        "jest-regex-util": "^23.3.0",
+        "jest-snapshot": "^23.6.0"
+      }
+    },
+    "jest-runner": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.6.0.tgz",
+      "integrity": "sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA==",
+      "dev": true,
+      "requires": {
+        "exit": "^0.1.2",
+        "graceful-fs": "^4.1.11",
+        "jest-config": "^23.6.0",
+        "jest-docblock": "^23.2.0",
+        "jest-haste-map": "^23.6.0",
+        "jest-jasmine2": "^23.6.0",
+        "jest-leak-detector": "^23.6.0",
+        "jest-message-util": "^23.4.0",
+        "jest-runtime": "^23.6.0",
+        "jest-util": "^23.4.0",
+        "jest-worker": "^23.2.0",
+        "source-map-support": "^0.5.6",
+        "throat": "^4.0.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "source-map-support": {
+          "version": "0.5.21",
+          "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+          "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+          "dev": true,
+          "requires": {
+            "buffer-from": "^1.0.0",
+            "source-map": "^0.6.0"
+          }
+        }
+      }
+    },
+    "jest-runtime": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.6.0.tgz",
+      "integrity": "sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw==",
+      "dev": true,
+      "requires": {
+        "babel-core": "^6.0.0",
+        "babel-plugin-istanbul": "^4.1.6",
+        "chalk": "^2.0.1",
+        "convert-source-map": "^1.4.0",
+        "exit": "^0.1.2",
+        "fast-json-stable-stringify": "^2.0.0",
+        "graceful-fs": "^4.1.11",
+        "jest-config": "^23.6.0",
+        "jest-haste-map": "^23.6.0",
+        "jest-message-util": "^23.4.0",
+        "jest-regex-util": "^23.3.0",
+        "jest-resolve": "^23.6.0",
+        "jest-snapshot": "^23.6.0",
+        "jest-util": "^23.4.0",
+        "jest-validate": "^23.6.0",
+        "micromatch": "^2.3.11",
+        "realpath-native": "^1.0.0",
+        "slash": "^1.0.0",
+        "strip-bom": "3.0.0",
+        "write-file-atomic": "^2.1.0",
+        "yargs": "^11.0.0"
+      },
+      "dependencies": {
+        "strip-bom": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+          "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+          "dev": true
+        }
+      }
+    },
+    "jest-serializer": {
+      "version": "23.0.1",
+      "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz",
+      "integrity": "sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU=",
+      "dev": true
+    },
+    "jest-snapshot": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.6.0.tgz",
+      "integrity": "sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg==",
+      "dev": true,
+      "requires": {
+        "babel-types": "^6.0.0",
+        "chalk": "^2.0.1",
+        "jest-diff": "^23.6.0",
+        "jest-matcher-utils": "^23.6.0",
+        "jest-message-util": "^23.4.0",
+        "jest-resolve": "^23.6.0",
+        "mkdirp": "^0.5.1",
+        "natural-compare": "^1.4.0",
+        "pretty-format": "^23.6.0",
+        "semver": "^5.5.0"
+      }
+    },
+    "jest-util": {
+      "version": "23.4.0",
+      "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz",
+      "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=",
+      "dev": true,
+      "requires": {
+        "callsites": "^2.0.0",
+        "chalk": "^2.0.1",
+        "graceful-fs": "^4.1.11",
+        "is-ci": "^1.0.10",
+        "jest-message-util": "^23.4.0",
+        "mkdirp": "^0.5.1",
+        "slash": "^1.0.0",
+        "source-map": "^0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "jest-validate": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz",
+      "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.0.1",
+        "jest-get-type": "^22.1.0",
+        "leven": "^2.1.0",
+        "pretty-format": "^23.6.0"
+      }
+    },
+    "jest-watcher": {
+      "version": "23.4.0",
+      "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.4.0.tgz",
+      "integrity": "sha1-0uKM50+NrWxq/JIrksq+9u0FyRw=",
+      "dev": true,
+      "requires": {
+        "ansi-escapes": "^3.0.0",
+        "chalk": "^2.0.1",
+        "string-length": "^2.0.0"
+      }
+    },
+    "jest-worker": {
+      "version": "23.2.0",
+      "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz",
+      "integrity": "sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk=",
+      "dev": true,
+      "requires": {
+        "merge-stream": "^1.0.1"
+      }
+    },
+    "js-tokens": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+      "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
+      "dev": true
+    },
+    "js-yaml": {
+      "version": "3.14.1",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+      "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+      "dev": true,
+      "requires": {
+        "argparse": "^1.0.7",
+        "esprima": "^4.0.0"
+      }
+    },
+    "jsbn": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+      "dev": true
+    },
+    "jsdom": {
+      "version": "11.12.0",
+      "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz",
+      "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==",
+      "dev": true,
+      "requires": {
+        "abab": "^2.0.0",
+        "acorn": "^5.5.3",
+        "acorn-globals": "^4.1.0",
+        "array-equal": "^1.0.0",
+        "cssom": ">= 0.3.2 < 0.4.0",
+        "cssstyle": "^1.0.0",
+        "data-urls": "^1.0.0",
+        "domexception": "^1.0.1",
+        "escodegen": "^1.9.1",
+        "html-encoding-sniffer": "^1.0.2",
+        "left-pad": "^1.3.0",
+        "nwsapi": "^2.0.7",
+        "parse5": "4.0.0",
+        "pn": "^1.1.0",
+        "request": "^2.87.0",
+        "request-promise-native": "^1.0.5",
+        "sax": "^1.2.4",
+        "symbol-tree": "^3.2.2",
+        "tough-cookie": "^2.3.4",
+        "w3c-hr-time": "^1.0.1",
+        "webidl-conversions": "^4.0.2",
+        "whatwg-encoding": "^1.0.3",
+        "whatwg-mimetype": "^2.1.0",
+        "whatwg-url": "^6.4.1",
+        "ws": "^5.2.0",
+        "xml-name-validator": "^3.0.0"
+      }
+    },
+    "jsesc": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+      "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
+      "dev": true
+    },
+    "json-buffer": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
+      "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=",
+      "dev": true
+    },
+    "json-parse-better-errors": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+      "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+      "dev": true
+    },
+    "json-schema": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
+      "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
+      "dev": true
+    },
+    "json-schema-traverse": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+      "dev": true
+    },
+    "json-stringify-safe": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+      "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+      "dev": true
+    },
+    "json5": {
+      "version": "0.5.1",
+      "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
+      "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
+      "dev": true
+    },
+    "jsprim": {
+      "version": "1.4.2",
+      "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
+      "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
+      "dev": true,
+      "requires": {
+        "assert-plus": "1.0.0",
+        "extsprintf": "1.3.0",
+        "json-schema": "0.4.0",
+        "verror": "1.10.0"
+      }
+    },
+    "keygrip": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz",
+      "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==",
+      "requires": {
+        "tsscmp": "1.0.6"
+      }
+    },
+    "keyv": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
+      "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==",
+      "dev": true,
+      "requires": {
+        "json-buffer": "3.0.0"
+      }
+    },
+    "kind-of": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+      "dev": true,
+      "requires": {
+        "is-buffer": "^1.1.5"
+      }
+    },
+    "kleur": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz",
+      "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==",
+      "dev": true
+    },
+    "koa": {
+      "version": "2.13.4",
+      "resolved": "https://registry.npmjs.org/koa/-/koa-2.13.4.tgz",
+      "integrity": "sha512-43zkIKubNbnrULWlHdN5h1g3SEKXOEzoAlRsHOTFpnlDu8JlAOZSMJBLULusuXRequboiwJcj5vtYXKB3k7+2g==",
+      "requires": {
+        "accepts": "^1.3.5",
+        "cache-content-type": "^1.0.0",
+        "content-disposition": "~0.5.2",
+        "content-type": "^1.0.4",
+        "cookies": "~0.8.0",
+        "debug": "^4.3.2",
+        "delegates": "^1.0.0",
+        "depd": "^2.0.0",
+        "destroy": "^1.0.4",
+        "encodeurl": "^1.0.2",
+        "escape-html": "^1.0.3",
+        "fresh": "~0.5.2",
+        "http-assert": "^1.3.0",
+        "http-errors": "^1.6.3",
+        "is-generator-function": "^1.0.7",
+        "koa-compose": "^4.1.0",
+        "koa-convert": "^2.0.0",
+        "on-finished": "^2.3.0",
+        "only": "~0.0.2",
+        "parseurl": "^1.3.2",
+        "statuses": "^1.5.0",
+        "type-is": "^1.6.16",
+        "vary": "^1.1.2"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "4.3.3",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+          "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+          "requires": {
+            "ms": "2.1.2"
+          }
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+        }
+      }
+    },
+    "koa-compose": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz",
+      "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw=="
+    },
+    "koa-convert": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-2.0.0.tgz",
+      "integrity": "sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==",
+      "requires": {
+        "co": "^4.6.0",
+        "koa-compose": "^4.1.0"
+      }
+    },
+    "koa-router": {
+      "version": "10.1.1",
+      "resolved": "https://registry.npmjs.org/koa-router/-/koa-router-10.1.1.tgz",
+      "integrity": "sha512-z/OzxVjf5NyuNO3t9nJpx7e1oR3FSBAauiwXtMQu4ppcnuNZzTaQ4p21P8A6r2Es8uJJM339oc4oVW+qX7SqnQ==",
+      "requires": {
+        "debug": "^4.1.1",
+        "http-errors": "^1.7.3",
+        "koa-compose": "^4.1.0",
+        "methods": "^1.1.2",
+        "path-to-regexp": "^6.1.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "4.3.3",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+          "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+          "requires": {
+            "ms": "2.1.2"
+          }
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+        }
+      }
+    },
+    "latest-version": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz",
+      "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==",
+      "dev": true,
+      "requires": {
+        "package-json": "^6.3.0"
+      }
+    },
+    "lcid": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
+      "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
+      "dev": true,
+      "requires": {
+        "invert-kv": "^2.0.0"
+      }
+    },
+    "lcov-parse": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz",
+      "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=",
+      "dev": true
+    },
+    "left-pad": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
+      "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==",
+      "dev": true
+    },
+    "leven": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz",
+      "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=",
+      "dev": true
+    },
+    "levn": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+      "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+      "dev": true,
+      "requires": {
+        "prelude-ls": "~1.1.2",
+        "type-check": "~0.3.2"
+      }
+    },
+    "load-json-file": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+      "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "parse-json": "^2.2.0",
+        "pify": "^2.0.0",
+        "pinkie-promise": "^2.0.0",
+        "strip-bom": "^2.0.0"
+      }
+    },
+    "locate-path": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+      "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+      "dev": true,
+      "requires": {
+        "p-locate": "^2.0.0",
+        "path-exists": "^3.0.0"
+      }
+    },
+    "lodash": {
+      "version": "4.17.21",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+      "dev": true
+    },
+    "lodash.sortby": {
+      "version": "4.7.0",
+      "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
+      "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=",
+      "dev": true
+    },
+    "log-driver": {
+      "version": "1.2.7",
+      "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz",
+      "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==",
+      "dev": true
+    },
+    "loose-envify": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+      "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+      "dev": true,
+      "requires": {
+        "js-tokens": "^3.0.0 || ^4.0.0"
+      }
+    },
+    "lowercase-keys": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
+      "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",
+      "dev": true
+    },
+    "lru-cache": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+      "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+      "dev": true,
+      "requires": {
+        "yallist": "^4.0.0"
+      }
+    },
+    "make-dir": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+      "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+      "dev": true,
+      "requires": {
+        "semver": "^6.0.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "make-error": {
+      "version": "1.3.6",
+      "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+      "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+      "dev": true
+    },
+    "makeerror": {
+      "version": "1.0.12",
+      "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
+      "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==",
+      "dev": true,
+      "requires": {
+        "tmpl": "1.0.5"
+      }
+    },
+    "map-age-cleaner": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+      "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
+      "dev": true,
+      "requires": {
+        "p-defer": "^1.0.0"
+      }
+    },
+    "map-cache": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+      "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
+      "dev": true
+    },
+    "map-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
+      "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
+      "dev": true,
+      "requires": {
+        "object-visit": "^1.0.0"
+      }
+    },
+    "math-random": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz",
+      "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==",
+      "dev": true
+    },
+    "media-typer": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+      "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
+    },
+    "mem": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
+      "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
+      "dev": true,
+      "requires": {
+        "map-age-cleaner": "^0.1.1",
+        "mimic-fn": "^2.0.0",
+        "p-is-promise": "^2.0.0"
+      }
+    },
+    "memorystream": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
+      "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
+      "dev": true
+    },
+    "merge": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz",
+      "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==",
+      "dev": true
+    },
+    "merge-stream": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz",
+      "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=",
+      "dev": true,
+      "requires": {
+        "readable-stream": "^2.0.1"
+      }
+    },
+    "methods": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+      "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
+    },
+    "micromatch": {
+      "version": "2.3.11",
+      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
+      "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
+      "dev": true,
+      "requires": {
+        "arr-diff": "^2.0.0",
+        "array-unique": "^0.2.1",
+        "braces": "^1.8.2",
+        "expand-brackets": "^0.1.4",
+        "extglob": "^0.3.1",
+        "filename-regex": "^2.0.0",
+        "is-extglob": "^1.0.0",
+        "is-glob": "^2.0.1",
+        "kind-of": "^3.0.2",
+        "normalize-path": "^2.0.1",
+        "object.omit": "^2.0.0",
+        "parse-glob": "^3.0.4",
+        "regex-cache": "^0.4.2"
+      }
+    },
+    "mime-db": {
+      "version": "1.52.0",
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
+    },
+    "mime-types": {
+      "version": "2.1.35",
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+      "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+      "requires": {
+        "mime-db": "1.52.0"
+      }
+    },
+    "mimic-fn": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+      "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+      "dev": true
+    },
+    "mimic-response": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
+      "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
+      "dev": true
+    },
+    "minimatch": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+      "dev": true,
+      "requires": {
+        "brace-expansion": "^1.1.7"
+      }
+    },
+    "minimist": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+      "dev": true
+    },
+    "mixin-deep": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
+      "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
+      "dev": true,
+      "requires": {
+        "for-in": "^1.0.2",
+        "is-extendable": "^1.0.1"
+      },
+      "dependencies": {
+        "is-extendable": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+          "dev": true,
+          "requires": {
+            "is-plain-object": "^2.0.4"
+          }
+        }
+      }
+    },
+    "mkdirp": {
+      "version": "0.5.5",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+      "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.2.5"
+      }
+    },
+    "ms": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+      "dev": true
+    },
+    "nan": {
+      "version": "2.15.0",
+      "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
+      "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
+      "dev": true,
+      "optional": true
+    },
+    "nanomatch": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
+      "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
+      "dev": true,
+      "requires": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "fragment-cache": "^0.2.1",
+        "is-windows": "^1.0.2",
+        "kind-of": "^6.0.2",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "dependencies": {
+        "arr-diff": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+          "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+          "dev": true
+        },
+        "array-unique": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+          "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "6.0.3",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+          "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+          "dev": true
+        }
+      }
+    },
+    "natural-compare": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+      "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
+      "dev": true
+    },
+    "negotiator": {
+      "version": "0.6.3",
+      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+      "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
+    },
+    "neo-async": {
+      "version": "2.6.2",
+      "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
+      "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
+      "dev": true
+    },
+    "nice-try": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
+      "dev": true
+    },
+    "node-int64": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
+      "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=",
+      "dev": true
+    },
+    "node-notifier": {
+      "version": "5.4.5",
+      "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.5.tgz",
+      "integrity": "sha512-tVbHs7DyTLtzOiN78izLA85zRqB9NvEXkAf014Vx3jtSvn/xBl6bR8ZYifj+dFcFrKI21huSQgJZ6ZtL3B4HfQ==",
+      "dev": true,
+      "requires": {
+        "growly": "^1.3.0",
+        "is-wsl": "^1.1.0",
+        "semver": "^5.5.0",
+        "shellwords": "^0.1.1",
+        "which": "^1.3.0"
+      }
+    },
+    "nodemon": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz",
+      "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==",
+      "dev": true,
+      "requires": {
+        "chokidar": "^3.5.2",
+        "debug": "^3.2.7",
+        "ignore-by-default": "^1.0.1",
+        "minimatch": "^3.0.4",
+        "pstree.remy": "^1.1.8",
+        "semver": "^5.7.1",
+        "supports-color": "^5.5.0",
+        "touch": "^3.1.0",
+        "undefsafe": "^2.0.5",
+        "update-notifier": "^5.1.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "3.2.7",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+          "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+          "dev": true,
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "ms": {
+          "version": "2.1.3",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+          "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+          "dev": true
+        }
+      }
+    },
+    "nopt": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
+      "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
+      "dev": true,
+      "requires": {
+        "abbrev": "1"
+      }
+    },
+    "normalize-package-data": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+      "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+      "dev": true,
+      "requires": {
+        "hosted-git-info": "^2.1.4",
+        "resolve": "^1.10.0",
+        "semver": "2 || 3 || 4 || 5",
+        "validate-npm-package-license": "^3.0.1"
+      }
+    },
+    "normalize-path": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+      "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+      "dev": true,
+      "requires": {
+        "remove-trailing-separator": "^1.0.1"
+      }
+    },
+    "normalize-url": {
+      "version": "4.5.1",
+      "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz",
+      "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==",
+      "dev": true
+    },
+    "npm-run-all": {
+      "version": "4.1.5",
+      "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
+      "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
+      "dev": true,
+      "requires": {
+        "ansi-styles": "^3.2.1",
+        "chalk": "^2.4.1",
+        "cross-spawn": "^6.0.5",
+        "memorystream": "^0.3.1",
+        "minimatch": "^3.0.4",
+        "pidtree": "^0.3.0",
+        "read-pkg": "^3.0.0",
+        "shell-quote": "^1.6.1",
+        "string.prototype.padend": "^3.0.0"
+      },
+      "dependencies": {
+        "load-json-file": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+          "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "^4.1.2",
+            "parse-json": "^4.0.0",
+            "pify": "^3.0.0",
+            "strip-bom": "^3.0.0"
+          }
+        },
+        "parse-json": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+          "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+          "dev": true,
+          "requires": {
+            "error-ex": "^1.3.1",
+            "json-parse-better-errors": "^1.0.1"
+          }
+        },
+        "path-type": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+          "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+          "dev": true,
+          "requires": {
+            "pify": "^3.0.0"
+          }
+        },
+        "pify": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+          "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+          "dev": true
+        },
+        "read-pkg": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+          "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+          "dev": true,
+          "requires": {
+            "load-json-file": "^4.0.0",
+            "normalize-package-data": "^2.3.2",
+            "path-type": "^3.0.0"
+          }
+        },
+        "strip-bom": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+          "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+          "dev": true
+        }
+      }
+    },
+    "npm-run-path": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
+      "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
+      "dev": true,
+      "requires": {
+        "path-key": "^2.0.0"
+      }
+    },
+    "number-is-nan": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+      "dev": true
+    },
+    "nwsapi": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
+      "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==",
+      "dev": true
+    },
+    "oauth-sign": {
+      "version": "0.9.0",
+      "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
+      "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
+      "dev": true
+    },
+    "object-assign": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+      "dev": true
+    },
+    "object-copy": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
+      "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
+      "dev": true,
+      "requires": {
+        "copy-descriptor": "^0.1.0",
+        "define-property": "^0.2.5",
+        "kind-of": "^3.0.3"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        }
+      }
+    },
+    "object-inspect": {
+      "version": "1.12.0",
+      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
+      "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==",
+      "dev": true
+    },
+    "object-keys": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+      "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+      "dev": true
+    },
+    "object-visit": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
+      "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.0"
+      },
+      "dependencies": {
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        }
+      }
+    },
+    "object.assign": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+      "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "has-symbols": "^1.0.1",
+        "object-keys": "^1.1.1"
+      }
+    },
+    "object.getownpropertydescriptors": {
+      "version": "2.1.3",
+      "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz",
+      "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.19.1"
+      }
+    },
+    "object.omit": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
+      "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
+      "dev": true,
+      "requires": {
+        "for-own": "^0.1.4",
+        "is-extendable": "^0.1.1"
+      }
+    },
+    "object.pick": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
+      "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.1"
+      },
+      "dependencies": {
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        }
+      }
+    },
+    "on-finished": {
+      "version": "2.4.1",
+      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+      "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+      "requires": {
+        "ee-first": "1.1.1"
+      }
+    },
+    "once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+      "dev": true,
+      "requires": {
+        "wrappy": "1"
+      }
+    },
+    "only": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz",
+      "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q="
+    },
+    "optionator": {
+      "version": "0.8.3",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+      "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+      "dev": true,
+      "requires": {
+        "deep-is": "~0.1.3",
+        "fast-levenshtein": "~2.0.6",
+        "levn": "~0.3.0",
+        "prelude-ls": "~1.1.2",
+        "type-check": "~0.3.2",
+        "word-wrap": "~1.2.3"
+      }
+    },
+    "os-homedir": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+      "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
+      "dev": true
+    },
+    "os-locale": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
+      "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
+      "dev": true,
+      "requires": {
+        "execa": "^1.0.0",
+        "lcid": "^2.0.0",
+        "mem": "^4.0.0"
+      }
+    },
+    "os-tmpdir": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+      "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+      "dev": true
+    },
+    "p-cancelable": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
+      "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==",
+      "dev": true
+    },
+    "p-defer": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+      "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
+      "dev": true
+    },
+    "p-finally": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
+      "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
+      "dev": true
+    },
+    "p-is-promise": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz",
+      "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==",
+      "dev": true
+    },
+    "p-limit": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+      "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+      "dev": true,
+      "requires": {
+        "p-try": "^1.0.0"
+      }
+    },
+    "p-locate": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+      "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+      "dev": true,
+      "requires": {
+        "p-limit": "^1.1.0"
+      }
+    },
+    "p-try": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+      "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+      "dev": true
+    },
+    "package-json": {
+      "version": "6.5.0",
+      "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz",
+      "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==",
+      "dev": true,
+      "requires": {
+        "got": "^9.6.0",
+        "registry-auth-token": "^4.0.0",
+        "registry-url": "^5.0.0",
+        "semver": "^6.2.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "parse-glob": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
+      "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
+      "dev": true,
+      "requires": {
+        "glob-base": "^0.3.0",
+        "is-dotfile": "^1.0.0",
+        "is-extglob": "^1.0.0",
+        "is-glob": "^2.0.0"
+      }
+    },
+    "parse-json": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+      "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+      "dev": true,
+      "requires": {
+        "error-ex": "^1.2.0"
+      }
+    },
+    "parse5": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz",
+      "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==",
+      "dev": true
+    },
+    "parseurl": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+      "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
+    },
+    "pascalcase": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
+      "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
+      "dev": true
+    },
+    "path-exists": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+      "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+      "dev": true
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+      "dev": true
+    },
+    "path-key": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+      "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+      "dev": true
+    },
+    "path-parse": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+      "dev": true
+    },
+    "path-to-regexp": {
+      "version": "6.2.0",
+      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz",
+      "integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg=="
+    },
+    "path-type": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+      "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "pify": "^2.0.0",
+        "pinkie-promise": "^2.0.0"
+      }
+    },
+    "performance-now": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+      "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
+      "dev": true
+    },
+    "picomatch": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+      "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+      "dev": true
+    },
+    "pidtree": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz",
+      "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==",
+      "dev": true
+    },
+    "pify": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+      "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+      "dev": true
+    },
+    "pinkie": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+      "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
+      "dev": true
+    },
+    "pinkie-promise": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+      "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
+      "dev": true,
+      "requires": {
+        "pinkie": "^2.0.0"
+      }
+    },
+    "pkg-dir": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
+      "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
+      "dev": true,
+      "requires": {
+        "find-up": "^2.1.0"
+      }
+    },
+    "pn": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
+      "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
+      "dev": true
+    },
+    "posix-character-classes": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
+      "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
+      "dev": true
+    },
+    "prelude-ls": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+      "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+      "dev": true
+    },
+    "prepend-http": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
+      "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=",
+      "dev": true
+    },
+    "preserve": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
+      "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
+      "dev": true
+    },
+    "prettier": {
+      "version": "1.19.1",
+      "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
+      "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
+      "dev": true
+    },
+    "pretty-format": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz",
+      "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==",
+      "dev": true,
+      "requires": {
+        "ansi-regex": "^3.0.0",
+        "ansi-styles": "^3.2.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        }
+      }
+    },
+    "private": {
+      "version": "0.1.8",
+      "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
+      "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
+      "dev": true
+    },
+    "process-nextick-args": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+      "dev": true
+    },
+    "prompts": {
+      "version": "0.1.14",
+      "resolved": "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz",
+      "integrity": "sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w==",
+      "dev": true,
+      "requires": {
+        "kleur": "^2.0.1",
+        "sisteransi": "^0.1.1"
+      }
+    },
+    "psl": {
+      "version": "1.8.0",
+      "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
+      "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
+      "dev": true
+    },
+    "pstree.remy": {
+      "version": "1.1.8",
+      "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
+      "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
+      "dev": true
+    },
+    "pump": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+      "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+      "dev": true,
+      "requires": {
+        "end-of-stream": "^1.1.0",
+        "once": "^1.3.1"
+      }
+    },
+    "punycode": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+      "dev": true
+    },
+    "pupa": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz",
+      "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==",
+      "dev": true,
+      "requires": {
+        "escape-goat": "^2.0.0"
+      }
+    },
+    "qs": {
+      "version": "6.5.3",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
+      "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
+      "dev": true
+    },
+    "randomatic": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz",
+      "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==",
+      "dev": true,
+      "requires": {
+        "is-number": "^4.0.0",
+        "kind-of": "^6.0.0",
+        "math-random": "^1.0.1"
+      },
+      "dependencies": {
+        "is-number": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
+          "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "6.0.3",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+          "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+          "dev": true
+        }
+      }
+    },
+    "rc": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+      "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+      "dev": true,
+      "requires": {
+        "deep-extend": "^0.6.0",
+        "ini": "~1.3.0",
+        "minimist": "^1.2.0",
+        "strip-json-comments": "~2.0.1"
+      },
+      "dependencies": {
+        "ini": {
+          "version": "1.3.8",
+          "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+          "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+          "dev": true
+        }
+      }
+    },
+    "read-pkg": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+      "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
+      "dev": true,
+      "requires": {
+        "load-json-file": "^1.0.0",
+        "normalize-package-data": "^2.3.2",
+        "path-type": "^1.0.0"
+      }
+    },
+    "read-pkg-up": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+      "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+      "dev": true,
+      "requires": {
+        "find-up": "^1.0.0",
+        "read-pkg": "^1.0.0"
+      },
+      "dependencies": {
+        "find-up": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+          "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+          "dev": true,
+          "requires": {
+            "path-exists": "^2.0.0",
+            "pinkie-promise": "^2.0.0"
+          }
+        },
+        "path-exists": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+          "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
+          "dev": true,
+          "requires": {
+            "pinkie-promise": "^2.0.0"
+          }
+        }
+      }
+    },
+    "readable-stream": {
+      "version": "2.3.7",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+      "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+      "dev": true,
+      "requires": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.3",
+        "isarray": "~1.0.0",
+        "process-nextick-args": "~2.0.0",
+        "safe-buffer": "~5.1.1",
+        "string_decoder": "~1.1.1",
+        "util-deprecate": "~1.0.1"
+      },
+      "dependencies": {
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        }
+      }
+    },
+    "readdirp": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+      "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+      "dev": true,
+      "requires": {
+        "picomatch": "^2.2.1"
+      }
+    },
+    "realpath-native": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.1.0.tgz",
+      "integrity": "sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA==",
+      "dev": true,
+      "requires": {
+        "util.promisify": "^1.0.0"
+      }
+    },
+    "regenerator-runtime": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+      "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
+      "dev": true
+    },
+    "regex-cache": {
+      "version": "0.4.4",
+      "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
+      "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
+      "dev": true,
+      "requires": {
+        "is-equal-shallow": "^0.1.3"
+      }
+    },
+    "regex-not": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
+      "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^3.0.2",
+        "safe-regex": "^1.1.0"
+      }
+    },
+    "registry-auth-token": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz",
+      "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==",
+      "dev": true,
+      "requires": {
+        "rc": "^1.2.8"
+      }
+    },
+    "registry-url": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz",
+      "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==",
+      "dev": true,
+      "requires": {
+        "rc": "^1.2.8"
+      }
+    },
+    "remove-trailing-separator": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
+      "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
+      "dev": true
+    },
+    "repeat-element": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz",
+      "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==",
+      "dev": true
+    },
+    "repeat-string": {
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+      "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+      "dev": true
+    },
+    "repeating": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+      "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
+      "dev": true,
+      "requires": {
+        "is-finite": "^1.0.0"
+      }
+    },
+    "request": {
+      "version": "2.88.2",
+      "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
+      "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
+      "dev": true,
+      "requires": {
+        "aws-sign2": "~0.7.0",
+        "aws4": "^1.8.0",
+        "caseless": "~0.12.0",
+        "combined-stream": "~1.0.6",
+        "extend": "~3.0.2",
+        "forever-agent": "~0.6.1",
+        "form-data": "~2.3.2",
+        "har-validator": "~5.1.3",
+        "http-signature": "~1.2.0",
+        "is-typedarray": "~1.0.0",
+        "isstream": "~0.1.2",
+        "json-stringify-safe": "~5.0.1",
+        "mime-types": "~2.1.19",
+        "oauth-sign": "~0.9.0",
+        "performance-now": "^2.1.0",
+        "qs": "~6.5.2",
+        "safe-buffer": "^5.1.2",
+        "tough-cookie": "~2.5.0",
+        "tunnel-agent": "^0.6.0",
+        "uuid": "^3.3.2"
+      }
+    },
+    "request-promise-core": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz",
+      "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.19"
+      }
+    },
+    "request-promise-native": {
+      "version": "1.0.9",
+      "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz",
+      "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==",
+      "dev": true,
+      "requires": {
+        "request-promise-core": "1.1.4",
+        "stealthy-require": "^1.1.1",
+        "tough-cookie": "^2.3.3"
+      }
+    },
+    "require-directory": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+      "dev": true
+    },
+    "require-main-filename": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
+      "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
+      "dev": true
+    },
+    "resolve": {
+      "version": "1.22.0",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
+      "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
+      "dev": true,
+      "requires": {
+        "is-core-module": "^2.8.1",
+        "path-parse": "^1.0.7",
+        "supports-preserve-symlinks-flag": "^1.0.0"
+      }
+    },
+    "resolve-cwd": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz",
+      "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=",
+      "dev": true,
+      "requires": {
+        "resolve-from": "^3.0.0"
+      }
+    },
+    "resolve-from": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+      "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
+      "dev": true
+    },
+    "resolve-url": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
+      "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
+      "dev": true
+    },
+    "responselike": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
+      "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
+      "dev": true,
+      "requires": {
+        "lowercase-keys": "^1.0.0"
+      }
+    },
+    "ret": {
+      "version": "0.1.15",
+      "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
+      "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
+      "dev": true
+    },
+    "rimraf": {
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+      "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+      "dev": true,
+      "requires": {
+        "glob": "^7.1.3"
+      }
+    },
+    "rsvp": {
+      "version": "3.6.2",
+      "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz",
+      "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==",
+      "dev": true
+    },
+    "safe-buffer": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+      "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
+    },
+    "safe-regex": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+      "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+      "dev": true,
+      "requires": {
+        "ret": "~0.1.10"
+      }
+    },
+    "safer-buffer": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+      "dev": true
+    },
+    "sane": {
+      "version": "2.5.2",
+      "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz",
+      "integrity": "sha1-tNwYYcIbQn6SlQej51HiosuKs/o=",
+      "dev": true,
+      "requires": {
+        "anymatch": "^2.0.0",
+        "capture-exit": "^1.2.0",
+        "exec-sh": "^0.2.0",
+        "fb-watchman": "^2.0.0",
+        "fsevents": "^1.2.3",
+        "micromatch": "^3.1.4",
+        "minimist": "^1.1.1",
+        "walker": "~1.0.5",
+        "watch": "~0.18.0"
+      },
+      "dependencies": {
+        "arr-diff": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+          "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+          "dev": true
+        },
+        "array-unique": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+          "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+          "dev": true
+        },
+        "braces": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+          "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+          "dev": true,
+          "requires": {
+            "arr-flatten": "^1.1.0",
+            "array-unique": "^0.3.2",
+            "extend-shallow": "^2.0.1",
+            "fill-range": "^4.0.0",
+            "isobject": "^3.0.1",
+            "repeat-element": "^1.1.2",
+            "snapdragon": "^0.8.1",
+            "snapdragon-node": "^2.0.1",
+            "split-string": "^3.0.2",
+            "to-regex": "^3.0.1"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "expand-brackets": {
+          "version": "2.1.4",
+          "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+          "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+          "dev": true,
+          "requires": {
+            "debug": "^2.3.3",
+            "define-property": "^0.2.5",
+            "extend-shallow": "^2.0.1",
+            "posix-character-classes": "^0.1.0",
+            "regex-not": "^1.0.0",
+            "snapdragon": "^0.8.1",
+            "to-regex": "^3.0.1"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "0.2.5",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+              "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "^0.1.0"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            },
+            "is-accessor-descriptor": {
+              "version": "0.1.6",
+              "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+              "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+              "dev": true,
+              "requires": {
+                "kind-of": "^3.0.2"
+              },
+              "dependencies": {
+                "kind-of": {
+                  "version": "3.2.2",
+                  "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+                  "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+                  "dev": true,
+                  "requires": {
+                    "is-buffer": "^1.1.5"
+                  }
+                }
+              }
+            },
+            "is-data-descriptor": {
+              "version": "0.1.4",
+              "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+              "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+              "dev": true,
+              "requires": {
+                "kind-of": "^3.0.2"
+              },
+              "dependencies": {
+                "kind-of": {
+                  "version": "3.2.2",
+                  "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+                  "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+                  "dev": true,
+                  "requires": {
+                    "is-buffer": "^1.1.5"
+                  }
+                }
+              }
+            },
+            "is-descriptor": {
+              "version": "0.1.6",
+              "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+              "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+              "dev": true,
+              "requires": {
+                "is-accessor-descriptor": "^0.1.6",
+                "is-data-descriptor": "^0.1.4",
+                "kind-of": "^5.0.0"
+              }
+            },
+            "kind-of": {
+              "version": "5.1.0",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+              "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+              "dev": true
+            }
+          }
+        },
+        "extglob": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+          "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+          "dev": true,
+          "requires": {
+            "array-unique": "^0.3.2",
+            "define-property": "^1.0.0",
+            "expand-brackets": "^2.1.4",
+            "extend-shallow": "^2.0.1",
+            "fragment-cache": "^0.2.1",
+            "regex-not": "^1.0.0",
+            "snapdragon": "^0.8.1",
+            "to-regex": "^3.0.1"
+          },
+          "dependencies": {
+            "define-property": {
+              "version": "1.0.0",
+              "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+              "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+              "dev": true,
+              "requires": {
+                "is-descriptor": "^1.0.0"
+              }
+            },
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "requires": {
+            "extend-shallow": "^2.0.1",
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1",
+            "to-regex-range": "^2.1.0"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "6.0.3",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+          "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+          "dev": true
+        },
+        "micromatch": {
+          "version": "3.1.10",
+          "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+          "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+          "dev": true,
+          "requires": {
+            "arr-diff": "^4.0.0",
+            "array-unique": "^0.3.2",
+            "braces": "^2.3.1",
+            "define-property": "^2.0.2",
+            "extend-shallow": "^3.0.2",
+            "extglob": "^2.0.4",
+            "fragment-cache": "^0.2.1",
+            "kind-of": "^6.0.2",
+            "nanomatch": "^1.2.9",
+            "object.pick": "^1.3.0",
+            "regex-not": "^1.0.0",
+            "snapdragon": "^0.8.1",
+            "to-regex": "^3.0.2"
+          }
+        }
+      }
+    },
+    "sax": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
+      "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
+      "dev": true
+    },
+    "semver": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+      "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+      "dev": true
+    },
+    "semver-diff": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz",
+      "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==",
+      "dev": true,
+      "requires": {
+        "semver": "^6.3.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "set-blocking": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+      "dev": true
+    },
+    "set-value": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
+      "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^2.0.1",
+        "is-extendable": "^0.1.1",
+        "is-plain-object": "^2.0.3",
+        "split-string": "^3.0.1"
+      },
+      "dependencies": {
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "setprototypeof": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+      "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
+    },
+    "shebang-command": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+      "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+      "dev": true,
+      "requires": {
+        "shebang-regex": "^1.0.0"
+      }
+    },
+    "shebang-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+      "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+      "dev": true
+    },
+    "shell-quote": {
+      "version": "1.7.3",
+      "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz",
+      "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==",
+      "dev": true
+    },
+    "shellwords": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
+      "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
+      "dev": true
+    },
+    "side-channel": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+      "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "get-intrinsic": "^1.0.2",
+        "object-inspect": "^1.9.0"
+      }
+    },
+    "signal-exit": {
+      "version": "3.0.7",
+      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+      "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+      "dev": true
+    },
+    "sisteransi": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz",
+      "integrity": "sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g==",
+      "dev": true
+    },
+    "slash": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
+      "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
+      "dev": true
+    },
+    "snapdragon": {
+      "version": "0.8.2",
+      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+      "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
+      "dev": true,
+      "requires": {
+        "base": "^0.11.1",
+        "debug": "^2.2.0",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "map-cache": "^0.2.2",
+        "source-map": "^0.5.6",
+        "source-map-resolve": "^0.5.0",
+        "use": "^3.1.0"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "snapdragon-node": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
+      "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+      "dev": true,
+      "requires": {
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.0",
+        "snapdragon-util": "^3.0.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "dev": true,
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        },
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "6.0.3",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+          "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+          "dev": true
+        }
+      }
+    },
+    "snapdragon-util": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
+      "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.2.0"
+      }
+    },
+    "source-map": {
+      "version": "0.5.7",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+      "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+      "dev": true
+    },
+    "source-map-resolve": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
+      "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
+      "dev": true,
+      "requires": {
+        "atob": "^2.1.2",
+        "decode-uri-component": "^0.2.0",
+        "resolve-url": "^0.2.1",
+        "source-map-url": "^0.4.0",
+        "urix": "^0.1.0"
+      }
+    },
+    "source-map-support": {
+      "version": "0.4.18",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
+      "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
+      "dev": true,
+      "requires": {
+        "source-map": "^0.5.6"
+      }
+    },
+    "source-map-url": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
+      "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
+      "dev": true
+    },
+    "spdx-correct": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
+      "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
+      "dev": true,
+      "requires": {
+        "spdx-expression-parse": "^3.0.0",
+        "spdx-license-ids": "^3.0.0"
+      }
+    },
+    "spdx-exceptions": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
+      "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
+      "dev": true
+    },
+    "spdx-expression-parse": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
+      "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
+      "dev": true,
+      "requires": {
+        "spdx-exceptions": "^2.1.0",
+        "spdx-license-ids": "^3.0.0"
+      }
+    },
+    "spdx-license-ids": {
+      "version": "3.0.11",
+      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz",
+      "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==",
+      "dev": true
+    },
+    "split-string": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
+      "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^3.0.0"
+      }
+    },
+    "sprintf-js": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+      "dev": true
+    },
+    "sshpk": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
+      "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
+      "dev": true,
+      "requires": {
+        "asn1": "~0.2.3",
+        "assert-plus": "^1.0.0",
+        "bcrypt-pbkdf": "^1.0.0",
+        "dashdash": "^1.12.0",
+        "ecc-jsbn": "~0.1.1",
+        "getpass": "^0.1.1",
+        "jsbn": "~0.1.0",
+        "safer-buffer": "^2.0.2",
+        "tweetnacl": "~0.14.0"
+      }
+    },
+    "stack-utils": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.5.tgz",
+      "integrity": "sha512-KZiTzuV3CnSnSvgMRrARVCj+Ht7rMbauGDK0LdVFRGyenwdylpajAp4Q0i6SX8rEmbTpMMf6ryq2gb8pPq2WgQ==",
+      "dev": true,
+      "requires": {
+        "escape-string-regexp": "^2.0.0"
+      },
+      "dependencies": {
+        "escape-string-regexp": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+          "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+          "dev": true
+        }
+      }
+    },
+    "static-extend": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
+      "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
+      "dev": true,
+      "requires": {
+        "define-property": "^0.2.5",
+        "object-copy": "^0.1.0"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        }
+      }
+    },
+    "statuses": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+      "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
+    },
+    "stealthy-require": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
+      "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
+      "dev": true
+    },
+    "string-length": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz",
+      "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=",
+      "dev": true,
+      "requires": {
+        "astral-regex": "^1.0.0",
+        "strip-ansi": "^4.0.0"
+      }
+    },
+    "string-width": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+      "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+      "dev": true,
+      "requires": {
+        "is-fullwidth-code-point": "^2.0.0",
+        "strip-ansi": "^4.0.0"
+      }
+    },
+    "string.prototype.padend": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz",
+      "integrity": "sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.19.1"
+      }
+    },
+    "string.prototype.trimend": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
+      "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3"
+      }
+    },
+    "string.prototype.trimstart": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
+      "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3"
+      }
+    },
+    "string_decoder": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "~5.1.0"
+      },
+      "dependencies": {
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        }
+      }
+    },
+    "strip-ansi": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+      "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+      "dev": true,
+      "requires": {
+        "ansi-regex": "^3.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        }
+      }
+    },
+    "strip-bom": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+      "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+      "dev": true,
+      "requires": {
+        "is-utf8": "^0.2.0"
+      }
+    },
+    "strip-eof": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+      "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
+      "dev": true
+    },
+    "strip-json-comments": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+      "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+      "dev": true
+    },
+    "supports-color": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+      "dev": true,
+      "requires": {
+        "has-flag": "^3.0.0"
+      }
+    },
+    "supports-preserve-symlinks-flag": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+      "dev": true
+    },
+    "symbol-tree": {
+      "version": "3.2.4",
+      "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
+      "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",
+      "dev": true
+    },
+    "test-exclude": {
+      "version": "4.2.3",
+      "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.3.tgz",
+      "integrity": "sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA==",
+      "dev": true,
+      "requires": {
+        "arrify": "^1.0.1",
+        "micromatch": "^2.3.11",
+        "object-assign": "^4.1.0",
+        "read-pkg-up": "^1.0.1",
+        "require-main-filename": "^1.0.1"
+      }
+    },
+    "throat": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz",
+      "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=",
+      "dev": true
+    },
+    "tmpl": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
+      "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==",
+      "dev": true
+    },
+    "to-fast-properties": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
+      "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
+      "dev": true
+    },
+    "to-object-path": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
+      "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.0.2"
+      }
+    },
+    "to-readable-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",
+      "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==",
+      "dev": true
+    },
+    "to-regex": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
+      "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+      "dev": true,
+      "requires": {
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "regex-not": "^1.0.2",
+        "safe-regex": "^1.1.0"
+      }
+    },
+    "to-regex-range": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+      "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+      "dev": true,
+      "requires": {
+        "is-number": "^3.0.0",
+        "repeat-string": "^1.6.1"
+      },
+      "dependencies": {
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          }
+        }
+      }
+    },
+    "toidentifier": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+      "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
+    },
+    "touch": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
+      "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
+      "dev": true,
+      "requires": {
+        "nopt": "~1.0.10"
+      }
+    },
+    "tough-cookie": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
+      "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+      "dev": true,
+      "requires": {
+        "psl": "^1.1.28",
+        "punycode": "^2.1.1"
+      }
+    },
+    "tr46": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz",
+      "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
+      "dev": true,
+      "requires": {
+        "punycode": "^2.1.0"
+      }
+    },
+    "trim-right": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
+      "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
+      "dev": true
+    },
+    "ts-jest": {
+      "version": "23.10.5",
+      "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-23.10.5.tgz",
+      "integrity": "sha512-MRCs9qnGoyKgFc8adDEntAOP64fWK1vZKnOYU1o2HxaqjdJvGqmkLCPCnVq1/If4zkUmEjKPnCiUisTrlX2p2A==",
+      "dev": true,
+      "requires": {
+        "bs-logger": "0.x",
+        "buffer-from": "1.x",
+        "fast-json-stable-stringify": "2.x",
+        "json5": "2.x",
+        "make-error": "1.x",
+        "mkdirp": "0.x",
+        "resolve": "1.x",
+        "semver": "^5.5",
+        "yargs-parser": "10.x"
+      },
+      "dependencies": {
+        "json5": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
+          "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        },
+        "yargs-parser": {
+          "version": "10.1.0",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
+          "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
+          "dev": true,
+          "requires": {
+            "camelcase": "^4.1.0"
+          }
+        }
+      }
+    },
+    "ts-node": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz",
+      "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==",
+      "dev": true,
+      "requires": {
+        "arrify": "^1.0.0",
+        "buffer-from": "^1.1.0",
+        "diff": "^3.1.0",
+        "make-error": "^1.1.1",
+        "minimist": "^1.2.0",
+        "mkdirp": "^0.5.1",
+        "source-map-support": "^0.5.6",
+        "yn": "^2.0.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        },
+        "source-map-support": {
+          "version": "0.5.21",
+          "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+          "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+          "dev": true,
+          "requires": {
+            "buffer-from": "^1.0.0",
+            "source-map": "^0.6.0"
+          }
+        }
+      }
+    },
+    "tslib": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+      "dev": true
+    },
+    "tslint": {
+      "version": "5.20.1",
+      "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz",
+      "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.0.0",
+        "builtin-modules": "^1.1.1",
+        "chalk": "^2.3.0",
+        "commander": "^2.12.1",
+        "diff": "^4.0.1",
+        "glob": "^7.1.1",
+        "js-yaml": "^3.13.1",
+        "minimatch": "^3.0.4",
+        "mkdirp": "^0.5.1",
+        "resolve": "^1.3.2",
+        "semver": "^5.3.0",
+        "tslib": "^1.8.0",
+        "tsutils": "^2.29.0"
+      },
+      "dependencies": {
+        "diff": {
+          "version": "4.0.2",
+          "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+          "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+          "dev": true
+        }
+      }
+    },
+    "tslint-config-prettier": {
+      "version": "1.18.0",
+      "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz",
+      "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
+      "dev": true
+    },
+    "tsscmp": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz",
+      "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA=="
+    },
+    "tsutils": {
+      "version": "2.29.0",
+      "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
+      "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
+      "dev": true,
+      "requires": {
+        "tslib": "^1.8.1"
+      }
+    },
+    "tunnel-agent": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+      "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "tweetnacl": {
+      "version": "0.14.5",
+      "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+      "dev": true
+    },
+    "type-check": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+      "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+      "dev": true,
+      "requires": {
+        "prelude-ls": "~1.1.2"
+      }
+    },
+    "type-fest": {
+      "version": "0.20.2",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+      "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+      "dev": true
+    },
+    "type-is": {
+      "version": "1.6.18",
+      "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+      "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+      "requires": {
+        "media-typer": "0.3.0",
+        "mime-types": "~2.1.24"
+      }
+    },
+    "typedarray-to-buffer": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+      "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+      "dev": true,
+      "requires": {
+        "is-typedarray": "^1.0.0"
+      }
+    },
+    "typescript": {
+      "version": "3.9.10",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
+      "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
+      "dev": true
+    },
+    "uglify-js": {
+      "version": "3.15.3",
+      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.3.tgz",
+      "integrity": "sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg==",
+      "dev": true,
+      "optional": true
+    },
+    "unbox-primitive": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
+      "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
+      "dev": true,
+      "requires": {
+        "function-bind": "^1.1.1",
+        "has-bigints": "^1.0.1",
+        "has-symbols": "^1.0.2",
+        "which-boxed-primitive": "^1.0.2"
+      }
+    },
+    "undefsafe": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
+      "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
+      "dev": true
+    },
+    "union-value": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
+      "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
+      "dev": true,
+      "requires": {
+        "arr-union": "^3.1.0",
+        "get-value": "^2.0.6",
+        "is-extendable": "^0.1.1",
+        "set-value": "^2.0.1"
+      }
+    },
+    "unique-string": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
+      "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==",
+      "dev": true,
+      "requires": {
+        "crypto-random-string": "^2.0.0"
+      }
+    },
+    "unset-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+      "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
+      "dev": true,
+      "requires": {
+        "has-value": "^0.3.1",
+        "isobject": "^3.0.0"
+      },
+      "dependencies": {
+        "has-value": {
+          "version": "0.3.1",
+          "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
+          "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
+          "dev": true,
+          "requires": {
+            "get-value": "^2.0.3",
+            "has-values": "^0.1.4",
+            "isobject": "^2.0.0"
+          },
+          "dependencies": {
+            "isobject": {
+              "version": "2.1.0",
+              "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+              "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+              "dev": true,
+              "requires": {
+                "isarray": "1.0.0"
+              }
+            }
+          }
+        },
+        "has-values": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+          "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
+          "dev": true
+        },
+        "isobject": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+          "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+          "dev": true
+        }
+      }
+    },
+    "update-notifier": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz",
+      "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==",
+      "dev": true,
+      "requires": {
+        "boxen": "^5.0.0",
+        "chalk": "^4.1.0",
+        "configstore": "^5.0.1",
+        "has-yarn": "^2.1.0",
+        "import-lazy": "^2.1.0",
+        "is-ci": "^2.0.0",
+        "is-installed-globally": "^0.4.0",
+        "is-npm": "^5.0.0",
+        "is-yarn-global": "^0.3.0",
+        "latest-version": "^5.1.0",
+        "pupa": "^2.1.1",
+        "semver": "^7.3.4",
+        "semver-diff": "^3.1.1",
+        "xdg-basedir": "^4.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "ci-info": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
+          "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
+          "dev": true
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "is-ci": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
+          "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
+          "dev": true,
+          "requires": {
+            "ci-info": "^2.0.0"
+          }
+        },
+        "semver": {
+          "version": "7.3.5",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+          "dev": true,
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "uri-js": {
+      "version": "4.4.1",
+      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+      "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+      "dev": true,
+      "requires": {
+        "punycode": "^2.1.0"
+      }
+    },
+    "urix": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+      "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
+      "dev": true
+    },
+    "url-parse-lax": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
+      "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
+      "dev": true,
+      "requires": {
+        "prepend-http": "^2.0.0"
+      }
+    },
+    "use": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+      "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
+      "dev": true
+    },
+    "util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+      "dev": true
+    },
+    "util.promisify": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.1.tgz",
+      "integrity": "sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "for-each": "^0.3.3",
+        "has-symbols": "^1.0.1",
+        "object.getownpropertydescriptors": "^2.1.1"
+      }
+    },
+    "uuid": {
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+      "dev": true
+    },
+    "validate-npm-package-license": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+      "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+      "dev": true,
+      "requires": {
+        "spdx-correct": "^3.0.0",
+        "spdx-expression-parse": "^3.0.0"
+      }
+    },
+    "vary": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+      "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
+    },
+    "verror": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+      "dev": true,
+      "requires": {
+        "assert-plus": "^1.0.0",
+        "core-util-is": "1.0.2",
+        "extsprintf": "^1.2.0"
+      }
+    },
+    "w3c-hr-time": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
+      "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
+      "dev": true,
+      "requires": {
+        "browser-process-hrtime": "^1.0.0"
+      }
+    },
+    "walker": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz",
+      "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==",
+      "dev": true,
+      "requires": {
+        "makeerror": "1.0.12"
+      }
+    },
+    "watch": {
+      "version": "0.18.0",
+      "resolved": "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz",
+      "integrity": "sha1-KAlUdsbffJDJYxOJkMClQj60uYY=",
+      "dev": true,
+      "requires": {
+        "exec-sh": "^0.2.0",
+        "minimist": "^1.2.0"
+      }
+    },
+    "webidl-conversions": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
+      "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==",
+      "dev": true
+    },
+    "whatwg-encoding": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz",
+      "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==",
+      "dev": true,
+      "requires": {
+        "iconv-lite": "0.4.24"
+      }
+    },
+    "whatwg-mimetype": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
+      "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==",
+      "dev": true
+    },
+    "whatwg-url": {
+      "version": "6.5.0",
+      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz",
+      "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==",
+      "dev": true,
+      "requires": {
+        "lodash.sortby": "^4.7.0",
+        "tr46": "^1.0.1",
+        "webidl-conversions": "^4.0.2"
+      }
+    },
+    "which": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+      "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+      "dev": true,
+      "requires": {
+        "isexe": "^2.0.0"
+      }
+    },
+    "which-boxed-primitive": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+      "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+      "dev": true,
+      "requires": {
+        "is-bigint": "^1.0.1",
+        "is-boolean-object": "^1.1.0",
+        "is-number-object": "^1.0.4",
+        "is-string": "^1.0.5",
+        "is-symbol": "^1.0.3"
+      }
+    },
+    "which-module": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+      "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+      "dev": true
+    },
+    "widest-line": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
+      "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
+      "dev": true,
+      "requires": {
+        "string-width": "^4.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "5.0.1",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+          "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+          "dev": true
+        },
+        "string-width": {
+          "version": "4.2.3",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+          "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^8.0.0",
+            "is-fullwidth-code-point": "^3.0.0",
+            "strip-ansi": "^6.0.1"
+          }
+        },
+        "strip-ansi": {
+          "version": "6.0.1",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+          "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^5.0.1"
+          }
+        }
+      }
+    },
+    "word-wrap": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+      "dev": true
+    },
+    "wordwrap": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+      "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
+      "dev": true
+    },
+    "wrap-ansi": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+      "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
+      "dev": true,
+      "requires": {
+        "string-width": "^1.0.1",
+        "strip-ansi": "^3.0.1"
+      },
+      "dependencies": {
+        "is-fullwidth-code-point": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+          "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+          "dev": true,
+          "requires": {
+            "number-is-nan": "^1.0.0"
+          }
+        },
+        "string-width": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+          "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+          "dev": true,
+          "requires": {
+            "code-point-at": "^1.0.0",
+            "is-fullwidth-code-point": "^1.0.0",
+            "strip-ansi": "^3.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+          "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^2.0.0"
+          }
+        }
+      }
+    },
+    "wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+      "dev": true
+    },
+    "write-file-atomic": {
+      "version": "2.4.3",
+      "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
+      "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.11",
+        "imurmurhash": "^0.1.4",
+        "signal-exit": "^3.0.2"
+      }
+    },
+    "ws": {
+      "version": "5.2.3",
+      "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.3.tgz",
+      "integrity": "sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==",
+      "dev": true,
+      "requires": {
+        "async-limiter": "~1.0.0"
+      }
+    },
+    "xdg-basedir": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
+      "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
+      "dev": true
+    },
+    "xml-name-validator": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
+      "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
+      "dev": true
+    },
+    "y18n": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
+      "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
+      "dev": true
+    },
+    "yallist": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+      "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+      "dev": true
+    },
+    "yargs": {
+      "version": "11.1.1",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz",
+      "integrity": "sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==",
+      "dev": true,
+      "requires": {
+        "cliui": "^4.0.0",
+        "decamelize": "^1.1.1",
+        "find-up": "^2.1.0",
+        "get-caller-file": "^1.0.1",
+        "os-locale": "^3.1.0",
+        "require-directory": "^2.1.1",
+        "require-main-filename": "^1.0.1",
+        "set-blocking": "^2.0.0",
+        "string-width": "^2.0.0",
+        "which-module": "^2.0.0",
+        "y18n": "^3.2.1",
+        "yargs-parser": "^9.0.2"
+      }
+    },
+    "yargs-parser": {
+      "version": "9.0.2",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz",
+      "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=",
+      "dev": true,
+      "requires": {
+        "camelcase": "^4.1.0"
+      }
+    },
+    "ylru": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.2.1.tgz",
+      "integrity": "sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ=="
+    },
+    "yn": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",
+      "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=",
+      "dev": true
+    }
+  }
+}
diff --git a/lwnode/pkgs/apps/beagle/package.json b/lwnode/pkgs/apps/beagle/package.json
new file mode 100644 (file)
index 0000000..f0948af
--- /dev/null
@@ -0,0 +1,68 @@
+{
+  "name": "beagle",
+  "version": "0.0.0",
+  "description": "beagle",
+  "license": "Apache License",
+  "repository": "",
+  "author": {
+    "name": "Samsung Research"
+  },
+  "keywords": [
+    ""
+  ],
+  "files": [
+    "dist"
+  ],
+  "main": "dist/index",
+  "types": "dist/index",
+  "scripts": {
+    "start": "node dist/src/index.js",
+    "watch": "nodemon dist/src/index.js",
+    "dev": "npm-run-all clean build -l -p -r build:watch watch",
+    "build": "tsc --pretty",
+    "build:watch": "npm run build -- --watch",
+    "test": "jest",
+    "test:watch": "jest --watch",
+    "test:coverage": "jest --coverage",
+    "format": "prettier --write \"{src,__tests__}/**/*.ts\"",
+    "lint": "tslint --force --format verbose \"src/**/*.ts\"",
+    "clean": "rm -rf dist && rm -rf coverage",
+    "check": "npm run clean && npm run format && npm run lint && echo Using TypeScript && tsc --version"
+  },
+  "devDependencies": {
+    "@types/jest": "^23.3.3",
+    "@types/koa": "^2.13.4",
+    "@types/koa-router": "^7.4.4",
+    "@types/node": "^10.17.60",
+    "coveralls": "^3.1.1",
+    "jest": "^23.6.0",
+    "nodemon": "^2.0.15",
+    "npm-run-all": "^4.1.5",
+    "prettier": "^1.14.3",
+    "ts-jest": "^23.10.3",
+    "ts-node": "^7.0.1",
+    "tslint": "^5.11.0",
+    "tslint-config-prettier": "^1.15.0",
+    "typescript": "^3.9.10"
+  },
+  "engines": {
+    "node": ">=10.0.0"
+  },
+  "jest": {
+    "preset": "ts-jest",
+    "moduleDirectories": [
+      "src",
+      "node_modules"
+    ],
+    "coverageReporters": [
+      "json",
+      "lcovonly",
+      "text",
+      "clover"
+    ]
+  },
+  "dependencies": {
+    "koa": "^2.13.4",
+    "koa-router": "^10.1.1"
+  }
+}
diff --git a/lwnode/pkgs/apps/beagle/src/core/index.ts b/lwnode/pkgs/apps/beagle/src/core/index.ts
new file mode 100644 (file)
index 0000000..78d2df6
--- /dev/null
@@ -0,0 +1,2 @@
+export { default as Service } from './service';
+export { default as ServiceBroker } from './service-broker';
diff --git a/lwnode/pkgs/apps/beagle/src/core/service-broker.ts b/lwnode/pkgs/apps/beagle/src/core/service-broker.ts
new file mode 100644 (file)
index 0000000..c097ea0
--- /dev/null
@@ -0,0 +1,67 @@
+// import { getNodeID } from 'lib/utils';
+import Service from './service';
+
+interface ILogger {
+  info(arg: string, ...args: any[]): void;
+  error(arg: string, ...args: any[]): void;
+}
+
+class Logger implements ILogger {
+  error(arg: string, ...args: any[]) {
+    console.error.apply(null, [arg, ...args]);
+  }
+  info(arg: string, ...args: any[]) {
+    console.log.apply(null, [arg, ...args]);
+  }
+}
+
+class Registry {
+  constructor(broker: ServiceBroker) {
+
+  }
+}
+
+class ServiceBroker {
+  private logger: Logger;
+  // private nodeID: string;
+  private registry: Registry;
+  private isStarted: boolean = false;
+
+  constructor() {
+    // this.nodeID = getNodeID();
+    // Service registry
+    this.registry = new Registry(this);
+    // this.registry.init(this);
+    this.logger = new Logger();
+
+    process.on('beforeExit', this.closeHandler);
+    process.on('exit', this.closeHandler);
+    process.on('SIGINT', this.closeHandler);
+    process.on('SIGTERM', this.closeHandler);
+  }
+
+  private closeHandler() {
+    this.stop()
+      .catch((err) => this.logger.error(err))
+      .then(() => process.exit(0));
+  }
+
+  private restartService(service) {}
+
+  createService(schema) {
+    let service = new Service(this, schema);
+
+    if (this.isStarted) {
+      this.restartService(service);
+    }
+    return service;
+  }
+
+  async start() {}
+
+  async exec(actionName: string, params?: Object, options?: Object) {}
+
+  async stop() {}
+}
+
+export default ServiceBroker;
diff --git a/lwnode/pkgs/apps/beagle/src/core/service.ts b/lwnode/pkgs/apps/beagle/src/core/service.ts
new file mode 100644 (file)
index 0000000..2bd5390
--- /dev/null
@@ -0,0 +1,68 @@
+import util from 'util';
+import utils from 'lib/utils';
+
+export default class Service {
+  private broker = null;
+  private name: string = '';
+  private fullName: string = '';
+  private version = null;
+  private settings = null;
+  private schema = null;
+
+  constructor(broker, schema) {
+    this.broker = broker;
+
+    if (schema) {
+      this.parseServiceSchema(schema);
+    }
+  }
+
+  parseServiceSchema(schema) {
+    this.name = schema.name;
+    this.version = schema.version;
+    this.settings = schema.settings || {};
+    this.schema = schema;
+    this.fullName = Service.getVersionedFullName(this.name, this.version);
+
+    // Service item for Registry
+    const serviceSpecification = {
+      name: this.name,
+      version: this.version,
+      fullName: this.fullName,
+      actions: {},
+      events: {},
+    };
+
+    // Register actions
+    if (utils.isObject(schema.actions)) {
+      for (const name in schema.actions) {
+        const action = schema.actions[name];
+
+        let innerAction = this.createAction(action, name);
+
+        serviceSpecification.actions[innerAction.name] = innerAction;
+
+        // todo
+      }
+    }
+  }
+
+  private createAction(name, handler) {
+    let action = {
+      name: this.fullName + '.' + name,
+      handler: util.promisify(handler.bind(this)),
+      service: this,
+    };
+
+    return action;
+  }
+
+  static getVersionedFullName(name, version) {
+    if (version != null)
+      return (
+        (typeof version == 'number' ? 'v' + version : version) + '.' + name
+      );
+
+    return name;
+  }
+}
diff --git a/lwnode/pkgs/apps/beagle/src/index.ts b/lwnode/pkgs/apps/beagle/src/index.ts
new file mode 100644 (file)
index 0000000..76d5d8c
--- /dev/null
@@ -0,0 +1,23 @@
+import Koa from 'koa';
+import Router from 'koa-router';
+import { ServiceBroker } from './core';
+import MathServiceScheme from './service/math.service';
+
+const app = new Koa();
+const router = new Router();
+const broker = new ServiceBroker();
+
+broker.createService(MathServiceScheme);
+broker.start();
+
+router.get('/', async (ctx) => {
+  try {
+    const res = await broker.exec('greeter.hi', { param: 'param1' });
+    ctx.body = res;
+  } catch (error) {
+    // todo: handling errors
+  }
+});
+
+app.use(router.routes());
+app.listen(3000, () => console.log('listening'));
diff --git a/lwnode/pkgs/apps/beagle/src/lib/utils.ts b/lwnode/pkgs/apps/beagle/src/lib/utils.ts
new file mode 100644 (file)
index 0000000..a205b4e
--- /dev/null
@@ -0,0 +1,50 @@
+import os from 'os';
+
+const units = ['h', 'm', 's', 'ms', 'μs', 'ns'];
+const divisors = [60 * 60 * 1000, 60 * 1000, 1000, 1, 1e-3, 1e-6];
+
+const utils = {
+  isFunction(fn) {
+    return typeof fn === 'function';
+  },
+
+  isString(s) {
+    return typeof s === 'string' || s instanceof String;
+  },
+
+  isObject(o) {
+    return o !== null && typeof o === 'object' && !(o instanceof String);
+  },
+
+  isPlainObject(o) {
+    return o != null
+      ? Object.getPrototypeOf(o) === Object.prototype ||
+          Object.getPrototypeOf(o) === null
+      : false;
+  },
+
+  isDate(d) {
+    return d instanceof Date && !Number.isNaN(d.getTime());
+  },
+
+  flatten(arr) {
+    return Array.prototype.reduce.call(arr, (a, b) => a.concat(b), []);
+  },
+
+  humanize(milli) {
+    if (milli == null) return '?';
+
+    for (let i = 0; i < divisors.length; i++) {
+      const val = milli / divisors[i];
+      if (val >= 1.0) return '' + Math.floor(val) + units[i];
+    }
+
+    return 'now';
+  },
+
+  getNodeID(): string {
+    return os.hostname().toLowerCase() + '-' + process.pid;
+  },
+};
+
+export default utils;
diff --git a/lwnode/pkgs/apps/beagle/tsconfig.json b/lwnode/pkgs/apps/beagle/tsconfig.json
new file mode 100644 (file)
index 0000000..29d1c59
--- /dev/null
@@ -0,0 +1,49 @@
+{
+  "compilerOptions": {
+    "target": "es2015",
+    "module": "commonjs",
+    "lib": ["esnext"],
+    "outDir": "dist",
+    "declaration": true,
+    "removeComments": true,
+    "preserveConstEnums": true,
+    "allowJs": true,
+
+    /* Strict Type-Checking Options */
+    "strict": true,
+    "noImplicitAny": false,
+               "noImplicitReturns": true,
+               "noImplicitThis": true,
+
+    /* Additional Checks */
+    // "noUnusedLocals": true,
+    // "noUnusedParameters": true,
+    // "noImplicitReturns": true,
+    // "noFallthroughCasesInSwitch": true
+
+    /* Module Resolution Options */
+    "moduleResolution": "node",
+    "baseUrl": "src",
+    // "paths": {
+    //   "@src/*": [
+               //              "service/*"
+               //      ],
+    //   "@service/*": [
+               //              "service/*"
+               //      ],
+    // },
+    "esModuleInterop": true,
+
+    /* Source Map Options */
+    // "sourceRoot": "",
+    // "mapRoot": "",
+    // "inlineSourceMap": true,
+    // "inlineSources": true,
+
+    /* Experimental Options */
+    // "experimentalDecorators": true,
+    // "emitDecoratorMetadata": true,
+  },
+  "include": ["src/**/*"],
+  "exclude": ["node_modules", "**/*.test.ts"]
+}
diff --git a/lwnode/pkgs/apps/beagle/tslint.json b/lwnode/pkgs/apps/beagle/tslint.json
new file mode 100644 (file)
index 0000000..5e8f025
--- /dev/null
@@ -0,0 +1,7 @@
+{
+  "extends": ["tslint:latest", "tslint-config-prettier"],
+  "rules": {
+    "no-console": false,
+    "no-implicit-dependencies": false
+  }
+}
diff --git a/lwnode/pkgs/examples/README.md b/lwnode/pkgs/examples/README.md
new file mode 100644 (file)
index 0000000..49e8f5f
--- /dev/null
@@ -0,0 +1,18 @@
+Node.js Addon Examples
+=========================================
+
+## Usage
+
+In each example's implementation subdirectory, run
+
+```text
+$ npm run build
+```
+
+or 
+
+```text
+$ npm run build-gbs
+```
+
+to build the example.
diff --git a/lwnode/pkgs/examples/async-work/.gitignore b/lwnode/pkgs/examples/async-work/.gitignore
new file mode 100644 (file)
index 0000000..e4fe37f
--- /dev/null
@@ -0,0 +1,2 @@
+kuep_net_signer.sh
+build
diff --git a/lwnode/pkgs/examples/async-work/CMakeLists.txt b/lwnode/pkgs/examples/async-work/CMakeLists.txt
new file mode 100644 (file)
index 0000000..15ce4ea
--- /dev/null
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 2.8)
+set (CMAKE_CXX_STANDARD 11)
+project (async-work)
+
+add_definitions(-DBUILDING_NODE_EXTENSION)
+
+include_directories(include)
+
+file(GLOB SOURCE_FILES "async-work.cc")
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
diff --git a/lwnode/pkgs/examples/async-work/async-work.cc b/lwnode/pkgs/examples/async-work/async-work.cc
new file mode 100644 (file)
index 0000000..e9fec3a
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include <node_api.h>
+#include <assert.h>
+#include <pthread.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define NAPI_CALL_ASSERT(the_call) \
+  do {                             \
+    assert((the_call) == napi_ok); \
+  } while (0)
+
+struct WorkerHandler {
+  napi_async_work handle;
+  napi_value jsObject;
+};
+
+pthread_t ThreadId() { return pthread_self(); }
+
+static WorkerHandler g_workerHandler;
+static pthread_t g_mainThreadId;
+
+void* ThreadWork(void* data) {
+  napi_env env = (napi_env)data;
+
+  // Call JavaScript function in main thread
+  WorkerHandler* handler = new WorkerHandler;
+  NAPI_CALL_ASSERT(napi_create_async_work(
+      env, [](napi_env env, void* data) {},
+      [](napi_env env, napi_status status, void* data) {
+        assert(g_mainThreadId == ThreadId());
+        WorkerHandler* handler = (WorkerHandler*)data;
+
+        napi_value global, test_str, test_fn;
+        NAPI_CALL_ASSERT(napi_get_global(env, &global));
+        NAPI_CALL_ASSERT(napi_create_string_utf8(env, "test", 4, &test_str));
+        NAPI_CALL_ASSERT(napi_get_property(env, g_workerHandler.jsObject,
+                                           test_str, &test_fn));
+        NAPI_CALL_ASSERT(
+            napi_call_function(env, global, test_fn, 0, NULL, NULL));
+
+        delete handler;
+      },
+      handler, &handler->handle));
+  NAPI_CALL_ASSERT(napi_queue_async_work(env, handler->handle));
+}
+
+void Execute(napi_env env, void* data) {
+  pthread_t thread_t;
+  int status;
+
+  // Create thread
+  if (pthread_create(&thread_t, NULL, ThreadWork, (void*)env) < 0) {
+    perror("thread create error:");
+    exit(1);
+  }
+  pthread_join(thread_t, (void**)&status);
+  printf("Thread End %d\n", status);
+}
+
+napi_value Run(napi_env env, napi_callback_info info) {
+  size_t argc = 1;
+  napi_value args[1];
+  NAPI_CALL_ASSERT(napi_get_cb_info(env, info, &argc, args, NULL, NULL));
+  g_workerHandler.jsObject = args[0];
+
+  NAPI_CALL_ASSERT(napi_create_async_work(env, Execute, NULL, &g_workerHandler,
+                                          &g_workerHandler.handle));
+  NAPI_CALL_ASSERT(napi_queue_async_work(env, g_workerHandler.handle));
+
+  return nullptr;
+}
+
+#define DECLARE_NAPI_METHOD(name, func) \
+  { name, 0, func, 0, 0, 0, napi_default, 0 }
+
+void Init(napi_env env, napi_value exports, napi_value module, void* priv) {
+  g_mainThreadId = ThreadId();
+
+  napi_property_descriptor desc = DECLARE_NAPI_METHOD("run", Run);
+  NAPI_CALL_ASSERT(napi_define_properties(env, exports, 1, &desc));
+}
+
+NAPI_MODULE(async, Init)
diff --git a/lwnode/pkgs/examples/async-work/include/node_api.h b/lwnode/pkgs/examples/async-work/include/node_api.h
new file mode 100644 (file)
index 0000000..c27cf93
--- /dev/null
@@ -0,0 +1,489 @@
+/******************************************************************************
+ * Experimental prototype for demonstrating VM agnostic and ABI stable API
+ * for native modules to use instead of using Nan and V8 APIs directly.
+ *
+ * The current status is "Experimental" and should not be used for
+ * production applications.  The API is still subject to change
+ * and as an experimental feature is NOT subject to semver.
+ *
+ ******************************************************************************/
+#ifndef SRC_NODE_API_H_
+#define SRC_NODE_API_H_
+
+#include <stddef.h>
+#include <stdbool.h>
+#include "node_api_types.h"
+
+#define NAPI_VERSION  1
+
+#ifdef _WIN32
+  #ifdef BUILDING_NODE_EXTENSION
+    #ifdef EXTERNAL_NAPI
+      // Building external N-API, or native module against external N-API
+      #define NAPI_EXTERN /* nothing */
+    #else
+      // Building native module against node with built-in N-API
+      #define NAPI_EXTERN __declspec(dllimport)
+    #endif
+  #else
+    // Building node with built-in N-API
+    #define NAPI_EXTERN __declspec(dllexport)
+  #endif
+#else
+  #define NAPI_EXTERN /* nothing */
+#endif
+
+#ifdef _WIN32
+# define NAPI_MODULE_EXPORT __declspec(dllexport)
+#else
+# define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
+#endif
+
+
+typedef void (*napi_addon_register_func)(napi_env env,
+                                         napi_value exports,
+                                         napi_value module,
+                                         void* priv);
+
+typedef struct {
+  int nm_version;
+  unsigned int nm_flags;
+  const char* nm_filename;
+  napi_addon_register_func nm_register_func;
+  const char* nm_modname;
+  void* nm_priv;
+  void* reserved[4];
+} napi_module;
+
+#define NAPI_MODULE_VERSION  1
+
+#if defined(_MSC_VER)
+#pragma section(".CRT$XCU", read)
+#define NAPI_C_CTOR(fn)                                                     \
+  static void __cdecl fn(void);                                             \
+  __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
+      fn;                                                                   \
+  static void __cdecl fn(void)
+#else
+#define NAPI_C_CTOR(fn)                              \
+  static void fn(void) __attribute__((constructor)); \
+  static void fn(void)
+#endif
+
+#ifdef __cplusplus
+#define EXTERN_C_START extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_START
+#define EXTERN_C_END
+#endif
+
+#define NAPI_MODULE_X(modname, regfunc, priv, flags)                  \
+  EXTERN_C_START                                                      \
+    static napi_module _module =                                      \
+    {                                                                 \
+      NAPI_MODULE_VERSION,                                            \
+      flags,                                                          \
+      __FILE__,                                                       \
+      regfunc,                                                        \
+      #modname,                                                       \
+      priv,                                                           \
+      {0},                                                            \
+    };                                                                \
+    NAPI_C_CTOR(_register_ ## modname) {                              \
+      napi_module_register(&_module);                                 \
+    }                                                                 \
+  EXTERN_C_END
+
+#define NAPI_MODULE(modname, regfunc) \
+  NAPI_MODULE_X(modname, regfunc, NULL, 0)
+
+EXTERN_C_START
+
+NAPI_EXTERN void napi_module_register(napi_module* mod);
+
+NAPI_EXTERN napi_status
+napi_get_last_error_info(napi_env env,
+                         const napi_extended_error_info** result);
+
+// Getters for defined singletons
+NAPI_EXTERN napi_status napi_get_undefined(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_null(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_global(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_boolean(napi_env env,
+                                         bool value,
+                                         napi_value* result);
+
+// Methods to create Primitive types/Objects
+NAPI_EXTERN napi_status napi_create_object(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array_with_length(napi_env env,
+                                                      size_t length,
+                                                      napi_value* result);
+NAPI_EXTERN napi_status napi_create_number(napi_env env,
+                                           double value,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_latin1(napi_env env,
+                                                  const char* str,
+                                                  size_t length,
+                                                  napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf8(napi_env env,
+                                                const char* str,
+                                                size_t length,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf16(napi_env env,
+                                                 const char16_t* str,
+                                                 size_t length,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_create_symbol(napi_env env,
+                                           napi_value description,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_function(napi_env env,
+                                             const char* utf8name,
+                                             napi_callback cb,
+                                             void* data,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_create_error(napi_env env,
+                                          napi_value msg,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_type_error(napi_env env,
+                                               napi_value msg,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
+                                                napi_value msg,
+                                                napi_value* result);
+
+// Methods to get the the native napi_value from Primitive type
+NAPI_EXTERN napi_status napi_typeof(napi_env env,
+                                    napi_value value,
+                                    napi_valuetype* result);
+NAPI_EXTERN napi_status napi_get_value_double(napi_env env,
+                                              napi_value value,
+                                              double* result);
+NAPI_EXTERN napi_status napi_get_value_int32(napi_env env,
+                                             napi_value value,
+                                             int32_t* result);
+NAPI_EXTERN napi_status napi_get_value_uint32(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+NAPI_EXTERN napi_status napi_get_value_int64(napi_env env,
+                                             napi_value value,
+                                             int64_t* result);
+NAPI_EXTERN napi_status napi_get_value_bool(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+
+// Copies LATIN-1 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
+                                                     napi_value value,
+                                                     char* buf,
+                                                     size_t bufsize,
+                                                     size_t* result);
+
+// Copies UTF-8 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf8(napi_env env,
+                                                   napi_value value,
+                                                   char* buf,
+                                                   size_t bufsize,
+                                                   size_t* result);
+
+// Copies UTF-16 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf16(napi_env env,
+                                                    napi_value value,
+                                                    char16_t* buf,
+                                                    size_t bufsize,
+                                                    size_t* result);
+
+// Methods to coerce values
+// These APIs may execute user scripts
+NAPI_EXTERN napi_status napi_coerce_to_bool(napi_env env,
+                                            napi_value value,
+                                            napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_number(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_object(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_string(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+
+// Methods to work with Objects
+NAPI_EXTERN napi_status napi_get_prototype(napi_env env,
+                                           napi_value object,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_get_property_names(napi_env env,
+                                                napi_value object,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_set_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value value);
+NAPI_EXTERN napi_status napi_has_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         bool* result);
+NAPI_EXTERN napi_status napi_get_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value* result);
+NAPI_EXTERN napi_status
+napi_define_properties(napi_env env,
+                       napi_value object,
+                       size_t property_count,
+                       const napi_property_descriptor* properties);
+
+// Methods to work with Arrays
+NAPI_EXTERN napi_status napi_is_array(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+NAPI_EXTERN napi_status napi_get_array_length(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+
+// Methods to compare values
+NAPI_EXTERN napi_status napi_strict_equals(napi_env env,
+                                           napi_value lhs,
+                                           napi_value rhs,
+                                           bool* result);
+
+// Methods to work with Functions
+NAPI_EXTERN napi_status napi_call_function(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_new_instance(napi_env env,
+                                          napi_value constructor,
+                                          size_t argc,
+                                          const napi_value* argv,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_instanceof(napi_env env,
+                                        napi_value object,
+                                        napi_value constructor,
+                                        bool* result);
+
+// Napi version of node::MakeCallback(...)
+NAPI_EXTERN napi_status napi_make_callback(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+
+// Methods to work with napi_callbacks
+
+// Gets all callback info in a single call. (Ugly, but faster.)
+NAPI_EXTERN napi_status napi_get_cb_info(
+    napi_env env,               // [in] NAPI environment handle
+    napi_callback_info cbinfo,  // [in] Opaque callback-info handle
+    size_t* argc,      // [in-out] Specifies the size of the provided argv array
+                       // and receives the actual count of args.
+    napi_value* argv,  // [out] Array of values
+    napi_value* this_arg,  // [out] Receives the JS 'this' arg for the call
+    void** data);          // [out] Receives the data pointer for the callback.
+
+NAPI_EXTERN napi_status napi_is_construct_call(napi_env env,
+                                               napi_callback_info cbinfo,
+                                               bool* result);
+NAPI_EXTERN napi_status
+napi_define_class(napi_env env,
+                  const char* utf8name,
+                  napi_callback constructor,
+                  void* data,
+                  size_t property_count,
+                  const napi_property_descriptor* properties,
+                  napi_value* result);
+
+// Methods to work with external data objects
+NAPI_EXTERN napi_status napi_wrap(napi_env env,
+                                  napi_value js_object,
+                                  void* native_object,
+                                  napi_finalize finalize_cb,
+                                  void* finalize_hint,
+                                  napi_ref* result);
+NAPI_EXTERN napi_status napi_unwrap(napi_env env,
+                                    napi_value js_object,
+                                    void** result);
+NAPI_EXTERN napi_status napi_create_external(napi_env env,
+                                             void* data,
+                                             napi_finalize finalize_cb,
+                                             void* finalize_hint,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_get_value_external(napi_env env,
+                                                napi_value value,
+                                                void** result);
+
+// Methods to control object lifespan
+
+// Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
+NAPI_EXTERN napi_status napi_create_reference(napi_env env,
+                                              napi_value value,
+                                              uint32_t initial_refcount,
+                                              napi_ref* result);
+
+// Deletes a reference. The referenced value is released, and may
+// be GC'd unless there are other references to it.
+NAPI_EXTERN napi_status napi_delete_reference(napi_env env, napi_ref ref);
+
+// Increments the reference count, optionally returning the resulting count.
+// After this call the  reference will be a strong reference because its
+// refcount is >0, and the referenced object is effectively "pinned".
+// Calling this when the refcount is 0 and the object is unavailable
+// results in an error.
+NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
+                                           napi_ref ref,
+                                           uint32_t* result);
+
+// Decrements the reference count, optionally returning the resulting count.
+// If the result is 0 the reference is now weak and the object may be GC'd
+// at any time if there are no other references. Calling this when the
+// refcount is already 0 results in an error.
+NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
+                                             napi_ref ref,
+                                             uint32_t* result);
+
+// Attempts to get a referenced value. If the reference is weak,
+// the value might no longer be available, in that case the call
+// is still successful but the result is NULL.
+NAPI_EXTERN napi_status napi_get_reference_value(napi_env env,
+                                                 napi_ref ref,
+                                                 napi_value* result);
+
+NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env,
+                                               napi_handle_scope* result);
+NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
+                                                napi_handle_scope scope);
+NAPI_EXTERN napi_status
+napi_open_escapable_handle_scope(napi_env env,
+                                 napi_escapable_handle_scope* result);
+NAPI_EXTERN napi_status
+napi_close_escapable_handle_scope(napi_env env,
+                                  napi_escapable_handle_scope scope);
+
+NAPI_EXTERN napi_status napi_escape_handle(napi_env env,
+                                           napi_escapable_handle_scope scope,
+                                           napi_value escapee,
+                                           napi_value* result);
+
+// Methods to support error handling
+NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error);
+NAPI_EXTERN napi_status napi_throw_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_is_error(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+
+// Methods to support catching exceptions
+NAPI_EXTERN napi_status napi_is_exception_pending(napi_env env, bool* result);
+NAPI_EXTERN napi_status napi_get_and_clear_last_exception(napi_env env,
+                                                          napi_value* result);
+
+// Methods to provide node::Buffer functionality with napi types
+NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
+                                           size_t length,
+                                           void** data,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
+                                                    size_t length,
+                                                    void* data,
+                                                    napi_finalize finalize_cb,
+                                                    void* finalize_hint,
+                                                    napi_value* result);
+NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
+                                                size_t length,
+                                                const void* data,
+                                                void** result_data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
+                                       napi_value value,
+                                       bool* result);
+NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
+                                             napi_value value,
+                                             void** data,
+                                             size_t* length);
+
+// Methods to work with array buffers and typed arrays
+NAPI_EXTERN napi_status napi_is_arraybuffer(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+NAPI_EXTERN napi_status napi_create_arraybuffer(napi_env env,
+                                                size_t byte_length,
+                                                void** data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status
+napi_create_external_arraybuffer(napi_env env,
+                                 void* external_data,
+                                 size_t byte_length,
+                                 napi_finalize finalize_cb,
+                                 void* finalize_hint,
+                                 napi_value* result);
+NAPI_EXTERN napi_status napi_get_arraybuffer_info(napi_env env,
+                                                  napi_value arraybuffer,
+                                                  void** data,
+                                                  size_t* byte_length);
+NAPI_EXTERN napi_status napi_is_typedarray(napi_env env,
+                                           napi_value value,
+                                           bool* result);
+NAPI_EXTERN napi_status napi_create_typedarray(napi_env env,
+                                               napi_typedarray_type type,
+                                               size_t length,
+                                               napi_value arraybuffer,
+                                               size_t byte_offset,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_get_typedarray_info(napi_env env,
+                                                 napi_value typedarray,
+                                                 napi_typedarray_type* type,
+                                                 size_t* length,
+                                                 void** data,
+                                                 napi_value* arraybuffer,
+                                                 size_t* byte_offset);
+
+// Methods to manage simple async operations
+NAPI_EXTERN
+napi_status napi_create_async_work(napi_env env,
+                                   napi_async_execute_callback execute,
+                                   napi_async_complete_callback complete,
+                                   void* data,
+                                   napi_async_work* result);
+NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
+                                               napi_async_work work);
+NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
+                                              napi_async_work work);
+NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
+                                               napi_async_work work);
+
+
+// version management
+NAPI_EXTERN napi_status napi_get_version(napi_env env, uint32_t* result);
+
+EXTERN_C_END
+
+#endif  // SRC_NODE_API_H_
diff --git a/lwnode/pkgs/examples/async-work/include/node_api_types.h b/lwnode/pkgs/examples/async-work/include/node_api_types.h
new file mode 100644 (file)
index 0000000..43102c5
--- /dev/null
@@ -0,0 +1,105 @@
+#ifndef SRC_NODE_API_TYPES_H_
+#define SRC_NODE_API_TYPES_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
+    typedef uint16_t char16_t;
+#endif
+
+// JSVM API types are all opaque pointers for ABI stability
+// typedef undefined structs instead of void* for compile time type safety
+typedef struct napi_env__ *napi_env;
+typedef struct napi_value__ *napi_value;
+typedef struct napi_ref__ *napi_ref;
+typedef struct napi_handle_scope__ *napi_handle_scope;
+typedef struct napi_escapable_handle_scope__ *napi_escapable_handle_scope;
+typedef struct napi_callback_info__ *napi_callback_info;
+typedef struct napi_async_work__ *napi_async_work;
+
+typedef enum {
+  napi_default = 0,
+  napi_writable = 1 << 0,
+  napi_enumerable = 1 << 1,
+  napi_configurable = 1 << 2,
+
+  // Used with napi_define_class to distinguish static properties
+  // from instance properties. Ignored by napi_define_properties.
+  napi_static = 1 << 10,
+} napi_property_attributes;
+
+typedef enum {
+  // ES6 types (corresponds to typeof)
+  napi_undefined,
+  napi_null,
+  napi_boolean,
+  napi_number,
+  napi_string,
+  napi_symbol,
+  napi_object,
+  napi_function,
+  napi_external,
+} napi_valuetype;
+
+typedef enum {
+  napi_int8_array,
+  napi_uint8_array,
+  napi_uint8_clamped_array,
+  napi_int16_array,
+  napi_uint16_array,
+  napi_int32_array,
+  napi_uint32_array,
+  napi_float32_array,
+  napi_float64_array,
+} napi_typedarray_type;
+
+typedef enum {
+  napi_ok,
+  napi_invalid_arg,
+  napi_object_expected,
+  napi_string_expected,
+  napi_name_expected,
+  napi_function_expected,
+  napi_number_expected,
+  napi_boolean_expected,
+  napi_array_expected,
+  napi_generic_failure,
+  napi_pending_exception,
+  napi_cancelled,
+  napi_escape_called_twice
+} napi_status;
+
+typedef napi_value (*napi_callback)(napi_env env,
+                                    napi_callback_info info);
+typedef void (*napi_finalize)(napi_env env,
+                              void* finalize_data,
+                              void* finalize_hint);
+typedef void (*napi_async_execute_callback)(napi_env env,
+                                            void* data);
+typedef void (*napi_async_complete_callback)(napi_env env,
+                                             napi_status status,
+                                             void* data);
+
+typedef struct {
+  // One of utf8name or name should be NULL.
+  const char* utf8name;
+  napi_value name;
+
+  napi_callback method;
+  napi_callback getter;
+  napi_callback setter;
+  napi_value value;
+
+  napi_property_attributes attributes;
+  void* data;
+} napi_property_descriptor;
+
+typedef struct {
+  const char* error_message;
+  void* engine_reserved;
+  uint32_t engine_error_code;
+  napi_status error_code;
+} napi_extended_error_info;
+
+#endif  // SRC_NODE_API_TYPES_H_
diff --git a/lwnode/pkgs/examples/async-work/package.json b/lwnode/pkgs/examples/async-work/package.json
new file mode 100644 (file)
index 0000000..1d6c887
--- /dev/null
@@ -0,0 +1,17 @@
+{
+    "name": "async-work",
+    "version": "1.0.0",
+    "description": "node-escargot-addon: Build a N-API native addon with CMake.",
+    "private": true,
+    "gbs": {
+        "config": "./packaging/gbs.conf",
+        "profile": "profile.55std",
+        "option": "--incremental --include-all"
+    },
+    "scripts": {
+        "build": "mkdir -p out && cd out && cmake .. -G Ninja && ninja",
+        "build-gbs": "gbs -c $npm_package_gbs_config build -A armv7l --buildroot ~/GBS-ROOT/$npm_package_name -P $npm_package_gbs_profile $npm_package_gbs_option"
+    },
+    "author": "",
+    "license": "ISC"
+}
diff --git a/lwnode/pkgs/examples/async-work/packaging/async-work.manifest b/lwnode/pkgs/examples/async-work/packaging/async-work.manifest
new file mode 100644 (file)
index 0000000..f5a44ec
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+        <request>
+                <domain name="_"/>
+        </request>
+</manifest>
diff --git a/lwnode/pkgs/examples/async-work/packaging/async-work.spec b/lwnode/pkgs/examples/async-work/packaging/async-work.spec
new file mode 100644 (file)
index 0000000..27223c6
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 2020-present Samsung Electronics Co., Ltd
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+Name:          async-work
+Summary:       -
+Version:       1.0.0
+Release:       1
+Group:         System/Servers
+License:       MIT
+Source:        %{name}-%{version}.tar.gz
+Source1001:    %{name}.manifest
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+BuildRequires: cmake, ninja, libgcc
+
+%description
+
+# Initialize the variables
+%define _outdir build/%{name}
+
+%prep
+%setup -q
+
+%build
+mkdir -p %{_outdir} && cd %{_outdir}
+cmake ../.. -DTARGET_OS_TIZEN=1 -G Ninja && ninja
+
+%install
+mv %{_outdir}/*.node %{_outdir}/../
+
+%clean
+rm ./*.list
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
diff --git a/lwnode/pkgs/examples/async-work/packaging/gbs.conf b/lwnode/pkgs/examples/async-work/packaging/gbs.conf
new file mode 100644 (file)
index 0000000..bfcb5ee
--- /dev/null
@@ -0,0 +1,25 @@
+[general]
+profile=profile.standard
+
+[profile.standard]
+repos = repo.public_base, repo.public_unified_standard
+
+[profile.55std]
+repos = repo.public_base_5.5, repo.public_unified_standard_5.5
+buildroot = ~/GBS-ROOT/55std
+
+############## Lastest ##############
+
+[repo.public_base]
+url = http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packages
+
+[repo.public_unified_standard]
+url = http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages
+
+############## Tizen 5.5 ##############
+
+[repo.public_base_5.5]
+url = http://download.tizen.org/snapshots/tizen/5.5-base/latest/repos/standard/packages
+
+[repo.public_unified_standard_5.5]
+url = http://download.tizen.org/snapshots/tizen/5.5-unified/latest/repos/standard/packages
diff --git a/lwnode/pkgs/examples/async-work/sample.js b/lwnode/pkgs/examples/async-work/sample.js
new file mode 100644 (file)
index 0000000..c01415a
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+var asyncWork = require('./out/async-work');
+
+var jsObject = {
+  test: function () {
+    console.log('jsObject: call function');
+  }
+}
+
+asyncWork.run(jsObject);
diff --git a/lwnode/pkgs/examples/hello-world-node/CMakeLists.txt b/lwnode/pkgs/examples/hello-world-node/CMakeLists.txt
new file mode 100644 (file)
index 0000000..31bfd8a
--- /dev/null
@@ -0,0 +1,17 @@
+cmake_minimum_required(VERSION 2.8)
+set (CMAKE_CXX_STANDARD 11)
+project (hello-world)
+
+add_definitions(-DBUILDING_NODE_EXTENSION
+                # -DUSING_UV_SHARED=1
+                # -DUSING_V8_SHARED=1
+                # -DV8_DEPRECATION_WARNINGS=1
+                # -D_LARGEFILE_SOURCE
+                # -D_FILE_OFFSET_BITS=64
+                )
+
+include_directories(include)
+
+file(GLOB SOURCE_FILES "hello.cc")
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
diff --git a/lwnode/pkgs/examples/hello-world-node/README.md b/lwnode/pkgs/examples/hello-world-node/README.md
new file mode 100644 (file)
index 0000000..b7cd875
--- /dev/null
@@ -0,0 +1,8 @@
+## Example: *Hello world*
+
+To get started let's make a small addon which is the C++ equivalent of
+the following JavaScript code:
+
+```js
+module.exports.hello = function() { return 'world'; };
+```
diff --git a/lwnode/pkgs/examples/hello-world-node/hello.cc b/lwnode/pkgs/examples/hello-world-node/hello.cc
new file mode 100644 (file)
index 0000000..7d238b7
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include <node_api.h>
+#include <assert.h>
+
+napi_value Method(napi_env env, napi_callback_info info) {
+  napi_status status;
+  napi_value world;
+  status = napi_create_string_utf8(env, "world", 5, &world);
+  assert(status == napi_ok);
+  return world;
+}
+
+#define DECLARE_NAPI_METHOD(name, func) \
+  { name, 0, func, 0, 0, 0, napi_default, 0 }
+
+void Init(napi_env env, napi_value exports, napi_value module, void* priv) {
+  napi_status status;
+  napi_property_descriptor desc = DECLARE_NAPI_METHOD("hello", Method);
+  status = napi_define_properties(env, exports, 1, &desc);
+  assert(status == napi_ok);
+}
+
+NAPI_MODULE(hello, Init)
diff --git a/lwnode/pkgs/examples/hello-world-node/hello.js b/lwnode/pkgs/examples/hello-world-node/hello.js
new file mode 100644 (file)
index 0000000..9a32b26
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+var addon = require('./hello-world'); // TODO: consider using a path finder module like `require('bindings')('./hello-world.node');`
+console.log(addon.hello()); // 'world'
diff --git a/lwnode/pkgs/examples/hello-world-node/include/node_api.h b/lwnode/pkgs/examples/hello-world-node/include/node_api.h
new file mode 100644 (file)
index 0000000..c27cf93
--- /dev/null
@@ -0,0 +1,489 @@
+/******************************************************************************
+ * Experimental prototype for demonstrating VM agnostic and ABI stable API
+ * for native modules to use instead of using Nan and V8 APIs directly.
+ *
+ * The current status is "Experimental" and should not be used for
+ * production applications.  The API is still subject to change
+ * and as an experimental feature is NOT subject to semver.
+ *
+ ******************************************************************************/
+#ifndef SRC_NODE_API_H_
+#define SRC_NODE_API_H_
+
+#include <stddef.h>
+#include <stdbool.h>
+#include "node_api_types.h"
+
+#define NAPI_VERSION  1
+
+#ifdef _WIN32
+  #ifdef BUILDING_NODE_EXTENSION
+    #ifdef EXTERNAL_NAPI
+      // Building external N-API, or native module against external N-API
+      #define NAPI_EXTERN /* nothing */
+    #else
+      // Building native module against node with built-in N-API
+      #define NAPI_EXTERN __declspec(dllimport)
+    #endif
+  #else
+    // Building node with built-in N-API
+    #define NAPI_EXTERN __declspec(dllexport)
+  #endif
+#else
+  #define NAPI_EXTERN /* nothing */
+#endif
+
+#ifdef _WIN32
+# define NAPI_MODULE_EXPORT __declspec(dllexport)
+#else
+# define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
+#endif
+
+
+typedef void (*napi_addon_register_func)(napi_env env,
+                                         napi_value exports,
+                                         napi_value module,
+                                         void* priv);
+
+typedef struct {
+  int nm_version;
+  unsigned int nm_flags;
+  const char* nm_filename;
+  napi_addon_register_func nm_register_func;
+  const char* nm_modname;
+  void* nm_priv;
+  void* reserved[4];
+} napi_module;
+
+#define NAPI_MODULE_VERSION  1
+
+#if defined(_MSC_VER)
+#pragma section(".CRT$XCU", read)
+#define NAPI_C_CTOR(fn)                                                     \
+  static void __cdecl fn(void);                                             \
+  __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
+      fn;                                                                   \
+  static void __cdecl fn(void)
+#else
+#define NAPI_C_CTOR(fn)                              \
+  static void fn(void) __attribute__((constructor)); \
+  static void fn(void)
+#endif
+
+#ifdef __cplusplus
+#define EXTERN_C_START extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_START
+#define EXTERN_C_END
+#endif
+
+#define NAPI_MODULE_X(modname, regfunc, priv, flags)                  \
+  EXTERN_C_START                                                      \
+    static napi_module _module =                                      \
+    {                                                                 \
+      NAPI_MODULE_VERSION,                                            \
+      flags,                                                          \
+      __FILE__,                                                       \
+      regfunc,                                                        \
+      #modname,                                                       \
+      priv,                                                           \
+      {0},                                                            \
+    };                                                                \
+    NAPI_C_CTOR(_register_ ## modname) {                              \
+      napi_module_register(&_module);                                 \
+    }                                                                 \
+  EXTERN_C_END
+
+#define NAPI_MODULE(modname, regfunc) \
+  NAPI_MODULE_X(modname, regfunc, NULL, 0)
+
+EXTERN_C_START
+
+NAPI_EXTERN void napi_module_register(napi_module* mod);
+
+NAPI_EXTERN napi_status
+napi_get_last_error_info(napi_env env,
+                         const napi_extended_error_info** result);
+
+// Getters for defined singletons
+NAPI_EXTERN napi_status napi_get_undefined(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_null(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_global(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_boolean(napi_env env,
+                                         bool value,
+                                         napi_value* result);
+
+// Methods to create Primitive types/Objects
+NAPI_EXTERN napi_status napi_create_object(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array_with_length(napi_env env,
+                                                      size_t length,
+                                                      napi_value* result);
+NAPI_EXTERN napi_status napi_create_number(napi_env env,
+                                           double value,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_latin1(napi_env env,
+                                                  const char* str,
+                                                  size_t length,
+                                                  napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf8(napi_env env,
+                                                const char* str,
+                                                size_t length,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf16(napi_env env,
+                                                 const char16_t* str,
+                                                 size_t length,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_create_symbol(napi_env env,
+                                           napi_value description,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_function(napi_env env,
+                                             const char* utf8name,
+                                             napi_callback cb,
+                                             void* data,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_create_error(napi_env env,
+                                          napi_value msg,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_type_error(napi_env env,
+                                               napi_value msg,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
+                                                napi_value msg,
+                                                napi_value* result);
+
+// Methods to get the the native napi_value from Primitive type
+NAPI_EXTERN napi_status napi_typeof(napi_env env,
+                                    napi_value value,
+                                    napi_valuetype* result);
+NAPI_EXTERN napi_status napi_get_value_double(napi_env env,
+                                              napi_value value,
+                                              double* result);
+NAPI_EXTERN napi_status napi_get_value_int32(napi_env env,
+                                             napi_value value,
+                                             int32_t* result);
+NAPI_EXTERN napi_status napi_get_value_uint32(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+NAPI_EXTERN napi_status napi_get_value_int64(napi_env env,
+                                             napi_value value,
+                                             int64_t* result);
+NAPI_EXTERN napi_status napi_get_value_bool(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+
+// Copies LATIN-1 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
+                                                     napi_value value,
+                                                     char* buf,
+                                                     size_t bufsize,
+                                                     size_t* result);
+
+// Copies UTF-8 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf8(napi_env env,
+                                                   napi_value value,
+                                                   char* buf,
+                                                   size_t bufsize,
+                                                   size_t* result);
+
+// Copies UTF-16 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf16(napi_env env,
+                                                    napi_value value,
+                                                    char16_t* buf,
+                                                    size_t bufsize,
+                                                    size_t* result);
+
+// Methods to coerce values
+// These APIs may execute user scripts
+NAPI_EXTERN napi_status napi_coerce_to_bool(napi_env env,
+                                            napi_value value,
+                                            napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_number(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_object(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_string(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+
+// Methods to work with Objects
+NAPI_EXTERN napi_status napi_get_prototype(napi_env env,
+                                           napi_value object,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_get_property_names(napi_env env,
+                                                napi_value object,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_set_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value value);
+NAPI_EXTERN napi_status napi_has_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         bool* result);
+NAPI_EXTERN napi_status napi_get_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value* result);
+NAPI_EXTERN napi_status
+napi_define_properties(napi_env env,
+                       napi_value object,
+                       size_t property_count,
+                       const napi_property_descriptor* properties);
+
+// Methods to work with Arrays
+NAPI_EXTERN napi_status napi_is_array(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+NAPI_EXTERN napi_status napi_get_array_length(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+
+// Methods to compare values
+NAPI_EXTERN napi_status napi_strict_equals(napi_env env,
+                                           napi_value lhs,
+                                           napi_value rhs,
+                                           bool* result);
+
+// Methods to work with Functions
+NAPI_EXTERN napi_status napi_call_function(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_new_instance(napi_env env,
+                                          napi_value constructor,
+                                          size_t argc,
+                                          const napi_value* argv,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_instanceof(napi_env env,
+                                        napi_value object,
+                                        napi_value constructor,
+                                        bool* result);
+
+// Napi version of node::MakeCallback(...)
+NAPI_EXTERN napi_status napi_make_callback(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+
+// Methods to work with napi_callbacks
+
+// Gets all callback info in a single call. (Ugly, but faster.)
+NAPI_EXTERN napi_status napi_get_cb_info(
+    napi_env env,               // [in] NAPI environment handle
+    napi_callback_info cbinfo,  // [in] Opaque callback-info handle
+    size_t* argc,      // [in-out] Specifies the size of the provided argv array
+                       // and receives the actual count of args.
+    napi_value* argv,  // [out] Array of values
+    napi_value* this_arg,  // [out] Receives the JS 'this' arg for the call
+    void** data);          // [out] Receives the data pointer for the callback.
+
+NAPI_EXTERN napi_status napi_is_construct_call(napi_env env,
+                                               napi_callback_info cbinfo,
+                                               bool* result);
+NAPI_EXTERN napi_status
+napi_define_class(napi_env env,
+                  const char* utf8name,
+                  napi_callback constructor,
+                  void* data,
+                  size_t property_count,
+                  const napi_property_descriptor* properties,
+                  napi_value* result);
+
+// Methods to work with external data objects
+NAPI_EXTERN napi_status napi_wrap(napi_env env,
+                                  napi_value js_object,
+                                  void* native_object,
+                                  napi_finalize finalize_cb,
+                                  void* finalize_hint,
+                                  napi_ref* result);
+NAPI_EXTERN napi_status napi_unwrap(napi_env env,
+                                    napi_value js_object,
+                                    void** result);
+NAPI_EXTERN napi_status napi_create_external(napi_env env,
+                                             void* data,
+                                             napi_finalize finalize_cb,
+                                             void* finalize_hint,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_get_value_external(napi_env env,
+                                                napi_value value,
+                                                void** result);
+
+// Methods to control object lifespan
+
+// Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
+NAPI_EXTERN napi_status napi_create_reference(napi_env env,
+                                              napi_value value,
+                                              uint32_t initial_refcount,
+                                              napi_ref* result);
+
+// Deletes a reference. The referenced value is released, and may
+// be GC'd unless there are other references to it.
+NAPI_EXTERN napi_status napi_delete_reference(napi_env env, napi_ref ref);
+
+// Increments the reference count, optionally returning the resulting count.
+// After this call the  reference will be a strong reference because its
+// refcount is >0, and the referenced object is effectively "pinned".
+// Calling this when the refcount is 0 and the object is unavailable
+// results in an error.
+NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
+                                           napi_ref ref,
+                                           uint32_t* result);
+
+// Decrements the reference count, optionally returning the resulting count.
+// If the result is 0 the reference is now weak and the object may be GC'd
+// at any time if there are no other references. Calling this when the
+// refcount is already 0 results in an error.
+NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
+                                             napi_ref ref,
+                                             uint32_t* result);
+
+// Attempts to get a referenced value. If the reference is weak,
+// the value might no longer be available, in that case the call
+// is still successful but the result is NULL.
+NAPI_EXTERN napi_status napi_get_reference_value(napi_env env,
+                                                 napi_ref ref,
+                                                 napi_value* result);
+
+NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env,
+                                               napi_handle_scope* result);
+NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
+                                                napi_handle_scope scope);
+NAPI_EXTERN napi_status
+napi_open_escapable_handle_scope(napi_env env,
+                                 napi_escapable_handle_scope* result);
+NAPI_EXTERN napi_status
+napi_close_escapable_handle_scope(napi_env env,
+                                  napi_escapable_handle_scope scope);
+
+NAPI_EXTERN napi_status napi_escape_handle(napi_env env,
+                                           napi_escapable_handle_scope scope,
+                                           napi_value escapee,
+                                           napi_value* result);
+
+// Methods to support error handling
+NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error);
+NAPI_EXTERN napi_status napi_throw_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_is_error(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+
+// Methods to support catching exceptions
+NAPI_EXTERN napi_status napi_is_exception_pending(napi_env env, bool* result);
+NAPI_EXTERN napi_status napi_get_and_clear_last_exception(napi_env env,
+                                                          napi_value* result);
+
+// Methods to provide node::Buffer functionality with napi types
+NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
+                                           size_t length,
+                                           void** data,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
+                                                    size_t length,
+                                                    void* data,
+                                                    napi_finalize finalize_cb,
+                                                    void* finalize_hint,
+                                                    napi_value* result);
+NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
+                                                size_t length,
+                                                const void* data,
+                                                void** result_data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
+                                       napi_value value,
+                                       bool* result);
+NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
+                                             napi_value value,
+                                             void** data,
+                                             size_t* length);
+
+// Methods to work with array buffers and typed arrays
+NAPI_EXTERN napi_status napi_is_arraybuffer(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+NAPI_EXTERN napi_status napi_create_arraybuffer(napi_env env,
+                                                size_t byte_length,
+                                                void** data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status
+napi_create_external_arraybuffer(napi_env env,
+                                 void* external_data,
+                                 size_t byte_length,
+                                 napi_finalize finalize_cb,
+                                 void* finalize_hint,
+                                 napi_value* result);
+NAPI_EXTERN napi_status napi_get_arraybuffer_info(napi_env env,
+                                                  napi_value arraybuffer,
+                                                  void** data,
+                                                  size_t* byte_length);
+NAPI_EXTERN napi_status napi_is_typedarray(napi_env env,
+                                           napi_value value,
+                                           bool* result);
+NAPI_EXTERN napi_status napi_create_typedarray(napi_env env,
+                                               napi_typedarray_type type,
+                                               size_t length,
+                                               napi_value arraybuffer,
+                                               size_t byte_offset,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_get_typedarray_info(napi_env env,
+                                                 napi_value typedarray,
+                                                 napi_typedarray_type* type,
+                                                 size_t* length,
+                                                 void** data,
+                                                 napi_value* arraybuffer,
+                                                 size_t* byte_offset);
+
+// Methods to manage simple async operations
+NAPI_EXTERN
+napi_status napi_create_async_work(napi_env env,
+                                   napi_async_execute_callback execute,
+                                   napi_async_complete_callback complete,
+                                   void* data,
+                                   napi_async_work* result);
+NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
+                                               napi_async_work work);
+NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
+                                              napi_async_work work);
+NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
+                                               napi_async_work work);
+
+
+// version management
+NAPI_EXTERN napi_status napi_get_version(napi_env env, uint32_t* result);
+
+EXTERN_C_END
+
+#endif  // SRC_NODE_API_H_
diff --git a/lwnode/pkgs/examples/hello-world-node/include/node_api_types.h b/lwnode/pkgs/examples/hello-world-node/include/node_api_types.h
new file mode 100644 (file)
index 0000000..43102c5
--- /dev/null
@@ -0,0 +1,105 @@
+#ifndef SRC_NODE_API_TYPES_H_
+#define SRC_NODE_API_TYPES_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
+    typedef uint16_t char16_t;
+#endif
+
+// JSVM API types are all opaque pointers for ABI stability
+// typedef undefined structs instead of void* for compile time type safety
+typedef struct napi_env__ *napi_env;
+typedef struct napi_value__ *napi_value;
+typedef struct napi_ref__ *napi_ref;
+typedef struct napi_handle_scope__ *napi_handle_scope;
+typedef struct napi_escapable_handle_scope__ *napi_escapable_handle_scope;
+typedef struct napi_callback_info__ *napi_callback_info;
+typedef struct napi_async_work__ *napi_async_work;
+
+typedef enum {
+  napi_default = 0,
+  napi_writable = 1 << 0,
+  napi_enumerable = 1 << 1,
+  napi_configurable = 1 << 2,
+
+  // Used with napi_define_class to distinguish static properties
+  // from instance properties. Ignored by napi_define_properties.
+  napi_static = 1 << 10,
+} napi_property_attributes;
+
+typedef enum {
+  // ES6 types (corresponds to typeof)
+  napi_undefined,
+  napi_null,
+  napi_boolean,
+  napi_number,
+  napi_string,
+  napi_symbol,
+  napi_object,
+  napi_function,
+  napi_external,
+} napi_valuetype;
+
+typedef enum {
+  napi_int8_array,
+  napi_uint8_array,
+  napi_uint8_clamped_array,
+  napi_int16_array,
+  napi_uint16_array,
+  napi_int32_array,
+  napi_uint32_array,
+  napi_float32_array,
+  napi_float64_array,
+} napi_typedarray_type;
+
+typedef enum {
+  napi_ok,
+  napi_invalid_arg,
+  napi_object_expected,
+  napi_string_expected,
+  napi_name_expected,
+  napi_function_expected,
+  napi_number_expected,
+  napi_boolean_expected,
+  napi_array_expected,
+  napi_generic_failure,
+  napi_pending_exception,
+  napi_cancelled,
+  napi_escape_called_twice
+} napi_status;
+
+typedef napi_value (*napi_callback)(napi_env env,
+                                    napi_callback_info info);
+typedef void (*napi_finalize)(napi_env env,
+                              void* finalize_data,
+                              void* finalize_hint);
+typedef void (*napi_async_execute_callback)(napi_env env,
+                                            void* data);
+typedef void (*napi_async_complete_callback)(napi_env env,
+                                             napi_status status,
+                                             void* data);
+
+typedef struct {
+  // One of utf8name or name should be NULL.
+  const char* utf8name;
+  napi_value name;
+
+  napi_callback method;
+  napi_callback getter;
+  napi_callback setter;
+  napi_value value;
+
+  napi_property_attributes attributes;
+  void* data;
+} napi_property_descriptor;
+
+typedef struct {
+  const char* error_message;
+  void* engine_reserved;
+  uint32_t engine_error_code;
+  napi_status error_code;
+} napi_extended_error_info;
+
+#endif  // SRC_NODE_API_TYPES_H_
diff --git a/lwnode/pkgs/examples/hello-world-node/package.json b/lwnode/pkgs/examples/hello-world-node/package.json
new file mode 100644 (file)
index 0000000..8eb1bc7
--- /dev/null
@@ -0,0 +1,17 @@
+{
+    "name": "hello-world-node",
+    "version": "1.0.0",
+    "description": "node-escargot-addon: Build a N-API native addon with CMake.",
+    "main": "hello.js",
+    "private": true,
+    "gbs": {
+        "config": "./packaging/gbs.tv.conf",
+        "profile": "profile.MAIN2019_MuseM",
+        "option": "--incremental --include-all"
+    },
+    "scripts": {
+        "build": "mkdir -p out && cd out && cmake .. -G Ninja && ninja",
+        "build-gbs": "gbs -c $npm_package_gbs_config build -A armv7l -P $npm_package_gbs_profile $npm_package_gbs_option",
+        "test": "node --napi-modules hello.js"
+    }
+}
diff --git a/lwnode/pkgs/examples/hello-world-node/packaging/gbs.tv.conf b/lwnode/pkgs/examples/hello-world-node/packaging/gbs.tv.conf
new file mode 100644 (file)
index 0000000..1307669
--- /dev/null
@@ -0,0 +1,54 @@
+[general]
+profile = profile.MAIN2019_KantM2
+profile = profile.MAIN2019_MuseM
+
+[obs.tizentv]
+url = https://168.219.241.169/api
+user = 
+passwdx = 
+
+############################################################################################
+[repo.base_Main2018_standard]
+#url=http://168.219.245.245/base/tizen-5.0-base-main2019/standard/tizen-5.0-main2019-stan_20181121.1/
+#url=http://168.219.245.245/base/tizen-5.0-base-main2019/standard/tizen-5.0-main2019-stan_20181203.1/
+url=http://168.219.245.245/base/tizen-5.0-base-main2019/standard/latest/repos/base/armv7l/packages/
+
+
+[repo.base_Main2018_emulator32]
+url=http://168.219.244.109/tizen-rsa/tizen-4.0-base-main2018/emulator32/latest/repos/base/ia32/packages/
+############################################################################################
+
+############################################################################################
+# KantM2
+[profile.MAIN2019_KantM2]
+obs = obs.tizentv
+repos = repo.local_Main2018_KantM2, repo.product_Main2018_KantM2, repo.base_Main2018_standard
+buildroot = ~/GBS-ROOT
+
+[repo.product_Main2018_KantM2]
+#url=http://168.219.244.109/releases/00_RELEASED_IMAGES/2018/MAIN2018/KantM2/latest/repos/product/armv7l/packages/
+#url=http://168.219.245.245/products/tv/official/2019/MAIN2019/KantM2_ATSC/TIZEN-5.0-MAIN2019-KantM2-RELEASE_20181128.8/
+url=http://168.219.245.245/products/tv/official/2019/MAIN2019/KantM2_ATSC/TIZEN-5.0-MAIN2019-KantM2-RELEASE_20181206.6/
+
+[repo.local_Main2018_KantM2]
+url=~/GBS-ROOT/local/repos/Main2018_KantM2/armv7l
+############################################################################################
+
+############################################################################################
+# Muse-M
+[profile.MAIN2019_MuseM]
+obs = obs.tizentv
+repos = repo.local_Main2018_MuseM, repo.product_Main2018_MuseM, repo.base_Main2018_standard
+buildroot = ~/GBS-ROOT
+
+[repo.product_Main2018_MuseM]
+#url=http://168.219.245.245/products/tv/official/2019/MAIN2019/MuseM_ATSC/TIZEN-5.0-MAIN2019-MuseM-RELEASE_20181128.7/
+#url=http://168.219.245.245/products/tv/official/2019/MAIN2019/MuseM_ATSC/TIZEN-5.0-MAIN2019-MuseM-RELEASE_20181205.8/
+#url=http://168.219.245.245/products/tv/official/2019/MAIN2019/MuseM_ATSC/TIZEN-5.0-MAIN2019-MuseM-RELEASE_20181221.6/
+#url=http://168.219.245.245/products/tv/official/2019/MAIN2019/MuseM_ATSC/TIZEN-5.0-MAIN2019-MuseM-RELEASE_20190104.8/
+url=http://168.219.245.245/products/tv/official/2019/TRUNK2019/MuseM/latest/repos/product/armv7l/packages/
+
+
+[repo.local_Main2018_MuseM]
+url=~/GBS-ROOT/local/repos/Main2018_MuseM/armv7l
+############################################################################################
diff --git a/lwnode/pkgs/examples/hello-world-node/packaging/node-escargot-addon.manifest b/lwnode/pkgs/examples/hello-world-node/packaging/node-escargot-addon.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/lwnode/pkgs/examples/hello-world-node/packaging/node-escargot-addon.spec b/lwnode/pkgs/examples/hello-world-node/packaging/node-escargot-addon.spec
new file mode 100644 (file)
index 0000000..9a7001b
--- /dev/null
@@ -0,0 +1,46 @@
+Name:          node-escargot-addon
+Summary:       -
+Version:       1.0.0
+Release:       1
+Group:         Development/Libraries
+License:       Apache-2.0
+Source:        %{name}-%{version}.tar.gz
+Source1001:    %{name}.manifest
+BuildRequires: cmake, ninja, libgcc
+
+%description
+This package provides a node-addon for Tizen platform.
+
+%if 0%{?build_profile:1}
+    %define profile_name %{build_profile}
+%else
+    %define profile_name all
+%endif
+
+%define _outdir out_tizen/%{profile_name}
+
+%prep
+%setup -q
+
+%build
+mkdir -p %{_outdir} && cd %{_outdir}
+cmake ../.. -G Ninja && ninja
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_bindir}
+cp -fr %{_outdir}/*.node %{buildroot}%{_bindir}
+
+%files 
+%manifest packaging/%{name}.manifest
+%{_bindir}/*.node
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%clean
+rm -f ./*.list
+rm -f ./*.manifest
diff --git a/lwnode/pkgs/modules/app/.gitignore b/lwnode/pkgs/modules/app/.gitignore
new file mode 100644 (file)
index 0000000..e4fe37f
--- /dev/null
@@ -0,0 +1,2 @@
+kuep_net_signer.sh
+build
diff --git a/lwnode/pkgs/modules/app/CMakeLists.txt b/lwnode/pkgs/modules/app/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2ca0fd6
--- /dev/null
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 2.8)
+set (CMAKE_CXX_STANDARD 11)
+project (app)
+
+find_package (PkgConfig REQUIRED)
+pkg_check_modules(PACKAGES REQUIRED capi-appfw-app-common)
+include_directories(${PACKAGES_INCLUDE_DIRS})
+
+file (GLOB_RECURSE SOURCE_FILES src/*.cc)
+add_definitions(-DBUILDING_NODE_EXTENSION)
+include_directories(include)
+
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
+target_link_libraries(${PROJECT_NAME} capi-appfw-app-common)
diff --git a/lwnode/pkgs/modules/app/include/common.h b/lwnode/pkgs/modules/app/include/common.h
new file mode 100644 (file)
index 0000000..aa0f6ae
--- /dev/null
@@ -0,0 +1,76 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// Empty value so that macros here are able to return NULL or void
+#define NAPI_RETVAL_NOTHING  // Intentionally blank #define
+
+#define GET_AND_THROW_LAST_ERROR(env)                                    \
+  do {                                                                   \
+    const napi_extended_error_info *error_info;                          \
+    napi_get_last_error_info((env), &error_info);                        \
+    bool is_pending;                                                     \
+    napi_is_exception_pending((env), &is_pending);                       \
+    /* If an exception is already pending, don't rethrow it */           \
+    if (!is_pending) {                                                   \
+      const char* error_message = error_info->error_message != NULL ?    \
+        error_info->error_message :                                      \
+        "empty error message";                                           \
+      napi_throw_error((env), error_message);                            \
+    }                                                                    \
+  } while(0);
+
+#define NAPI_ASSERT_BASE(env, assertion, message, ret_val)               \
+  if (!(assertion)) {                                                    \
+    napi_throw_error(                                                    \
+        (env),                                                           \
+        "assertion (" #assertion ") failed: " message);                  \
+    return ret_val;                                                      \
+  }
+
+// Returns NULL on failed assertion.
+// This is meant to be used inside napi_callback methods.
+#define NAPI_ASSERT(env, assertion, message)                             \
+  NAPI_ASSERT_BASE(env, assertion, message, NULL)
+
+// Returns empty on failed assertion.
+// This is meant to be used inside functions with void return type.
+#define NAPI_ASSERT_RETURN_VOID(env, assertion, message)                 \
+  NAPI_ASSERT_BASE(env, assertion, message, NAPI_RETVAL_NOTHING)
+
+#define NAPI_CALL_BASE(env, the_call, ret_val)                           \
+  if ((the_call) != napi_ok) {                                           \
+    GET_AND_THROW_LAST_ERROR((env));                                     \
+    return ret_val;                                                      \
+  }
+
+// Returns NULL if the_call doesn't return napi_ok.
+#define NAPI_CALL(env, the_call)                                         \
+  NAPI_CALL_BASE(env, the_call, NULL)
+
+// Returns empty if the_call doesn't return napi_ok.
+#define NAPI_CALL_RETURN_VOID(env, the_call)                             \
+  NAPI_CALL_BASE(env, the_call, NAPI_RETVAL_NOTHING)
+
+#define DECLARE_NAPI_PROPERTY(name, func)                                \
+  { (name), 0, (func), 0, 0, 0, napi_default, 0 }
+
+#define DECLARE_NAPI_GETTER(name, func)                                  \
+  { (name), 0, 0, (func), 0, 0, napi_default, 0 }
diff --git a/lwnode/pkgs/modules/app/include/node_api.h b/lwnode/pkgs/modules/app/include/node_api.h
new file mode 100644 (file)
index 0000000..c27cf93
--- /dev/null
@@ -0,0 +1,489 @@
+/******************************************************************************
+ * Experimental prototype for demonstrating VM agnostic and ABI stable API
+ * for native modules to use instead of using Nan and V8 APIs directly.
+ *
+ * The current status is "Experimental" and should not be used for
+ * production applications.  The API is still subject to change
+ * and as an experimental feature is NOT subject to semver.
+ *
+ ******************************************************************************/
+#ifndef SRC_NODE_API_H_
+#define SRC_NODE_API_H_
+
+#include <stddef.h>
+#include <stdbool.h>
+#include "node_api_types.h"
+
+#define NAPI_VERSION  1
+
+#ifdef _WIN32
+  #ifdef BUILDING_NODE_EXTENSION
+    #ifdef EXTERNAL_NAPI
+      // Building external N-API, or native module against external N-API
+      #define NAPI_EXTERN /* nothing */
+    #else
+      // Building native module against node with built-in N-API
+      #define NAPI_EXTERN __declspec(dllimport)
+    #endif
+  #else
+    // Building node with built-in N-API
+    #define NAPI_EXTERN __declspec(dllexport)
+  #endif
+#else
+  #define NAPI_EXTERN /* nothing */
+#endif
+
+#ifdef _WIN32
+# define NAPI_MODULE_EXPORT __declspec(dllexport)
+#else
+# define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
+#endif
+
+
+typedef void (*napi_addon_register_func)(napi_env env,
+                                         napi_value exports,
+                                         napi_value module,
+                                         void* priv);
+
+typedef struct {
+  int nm_version;
+  unsigned int nm_flags;
+  const char* nm_filename;
+  napi_addon_register_func nm_register_func;
+  const char* nm_modname;
+  void* nm_priv;
+  void* reserved[4];
+} napi_module;
+
+#define NAPI_MODULE_VERSION  1
+
+#if defined(_MSC_VER)
+#pragma section(".CRT$XCU", read)
+#define NAPI_C_CTOR(fn)                                                     \
+  static void __cdecl fn(void);                                             \
+  __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
+      fn;                                                                   \
+  static void __cdecl fn(void)
+#else
+#define NAPI_C_CTOR(fn)                              \
+  static void fn(void) __attribute__((constructor)); \
+  static void fn(void)
+#endif
+
+#ifdef __cplusplus
+#define EXTERN_C_START extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_START
+#define EXTERN_C_END
+#endif
+
+#define NAPI_MODULE_X(modname, regfunc, priv, flags)                  \
+  EXTERN_C_START                                                      \
+    static napi_module _module =                                      \
+    {                                                                 \
+      NAPI_MODULE_VERSION,                                            \
+      flags,                                                          \
+      __FILE__,                                                       \
+      regfunc,                                                        \
+      #modname,                                                       \
+      priv,                                                           \
+      {0},                                                            \
+    };                                                                \
+    NAPI_C_CTOR(_register_ ## modname) {                              \
+      napi_module_register(&_module);                                 \
+    }                                                                 \
+  EXTERN_C_END
+
+#define NAPI_MODULE(modname, regfunc) \
+  NAPI_MODULE_X(modname, regfunc, NULL, 0)
+
+EXTERN_C_START
+
+NAPI_EXTERN void napi_module_register(napi_module* mod);
+
+NAPI_EXTERN napi_status
+napi_get_last_error_info(napi_env env,
+                         const napi_extended_error_info** result);
+
+// Getters for defined singletons
+NAPI_EXTERN napi_status napi_get_undefined(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_null(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_global(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_boolean(napi_env env,
+                                         bool value,
+                                         napi_value* result);
+
+// Methods to create Primitive types/Objects
+NAPI_EXTERN napi_status napi_create_object(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array_with_length(napi_env env,
+                                                      size_t length,
+                                                      napi_value* result);
+NAPI_EXTERN napi_status napi_create_number(napi_env env,
+                                           double value,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_latin1(napi_env env,
+                                                  const char* str,
+                                                  size_t length,
+                                                  napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf8(napi_env env,
+                                                const char* str,
+                                                size_t length,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf16(napi_env env,
+                                                 const char16_t* str,
+                                                 size_t length,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_create_symbol(napi_env env,
+                                           napi_value description,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_function(napi_env env,
+                                             const char* utf8name,
+                                             napi_callback cb,
+                                             void* data,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_create_error(napi_env env,
+                                          napi_value msg,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_type_error(napi_env env,
+                                               napi_value msg,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
+                                                napi_value msg,
+                                                napi_value* result);
+
+// Methods to get the the native napi_value from Primitive type
+NAPI_EXTERN napi_status napi_typeof(napi_env env,
+                                    napi_value value,
+                                    napi_valuetype* result);
+NAPI_EXTERN napi_status napi_get_value_double(napi_env env,
+                                              napi_value value,
+                                              double* result);
+NAPI_EXTERN napi_status napi_get_value_int32(napi_env env,
+                                             napi_value value,
+                                             int32_t* result);
+NAPI_EXTERN napi_status napi_get_value_uint32(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+NAPI_EXTERN napi_status napi_get_value_int64(napi_env env,
+                                             napi_value value,
+                                             int64_t* result);
+NAPI_EXTERN napi_status napi_get_value_bool(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+
+// Copies LATIN-1 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
+                                                     napi_value value,
+                                                     char* buf,
+                                                     size_t bufsize,
+                                                     size_t* result);
+
+// Copies UTF-8 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf8(napi_env env,
+                                                   napi_value value,
+                                                   char* buf,
+                                                   size_t bufsize,
+                                                   size_t* result);
+
+// Copies UTF-16 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf16(napi_env env,
+                                                    napi_value value,
+                                                    char16_t* buf,
+                                                    size_t bufsize,
+                                                    size_t* result);
+
+// Methods to coerce values
+// These APIs may execute user scripts
+NAPI_EXTERN napi_status napi_coerce_to_bool(napi_env env,
+                                            napi_value value,
+                                            napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_number(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_object(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_string(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+
+// Methods to work with Objects
+NAPI_EXTERN napi_status napi_get_prototype(napi_env env,
+                                           napi_value object,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_get_property_names(napi_env env,
+                                                napi_value object,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_set_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value value);
+NAPI_EXTERN napi_status napi_has_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         bool* result);
+NAPI_EXTERN napi_status napi_get_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value* result);
+NAPI_EXTERN napi_status
+napi_define_properties(napi_env env,
+                       napi_value object,
+                       size_t property_count,
+                       const napi_property_descriptor* properties);
+
+// Methods to work with Arrays
+NAPI_EXTERN napi_status napi_is_array(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+NAPI_EXTERN napi_status napi_get_array_length(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+
+// Methods to compare values
+NAPI_EXTERN napi_status napi_strict_equals(napi_env env,
+                                           napi_value lhs,
+                                           napi_value rhs,
+                                           bool* result);
+
+// Methods to work with Functions
+NAPI_EXTERN napi_status napi_call_function(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_new_instance(napi_env env,
+                                          napi_value constructor,
+                                          size_t argc,
+                                          const napi_value* argv,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_instanceof(napi_env env,
+                                        napi_value object,
+                                        napi_value constructor,
+                                        bool* result);
+
+// Napi version of node::MakeCallback(...)
+NAPI_EXTERN napi_status napi_make_callback(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+
+// Methods to work with napi_callbacks
+
+// Gets all callback info in a single call. (Ugly, but faster.)
+NAPI_EXTERN napi_status napi_get_cb_info(
+    napi_env env,               // [in] NAPI environment handle
+    napi_callback_info cbinfo,  // [in] Opaque callback-info handle
+    size_t* argc,      // [in-out] Specifies the size of the provided argv array
+                       // and receives the actual count of args.
+    napi_value* argv,  // [out] Array of values
+    napi_value* this_arg,  // [out] Receives the JS 'this' arg for the call
+    void** data);          // [out] Receives the data pointer for the callback.
+
+NAPI_EXTERN napi_status napi_is_construct_call(napi_env env,
+                                               napi_callback_info cbinfo,
+                                               bool* result);
+NAPI_EXTERN napi_status
+napi_define_class(napi_env env,
+                  const char* utf8name,
+                  napi_callback constructor,
+                  void* data,
+                  size_t property_count,
+                  const napi_property_descriptor* properties,
+                  napi_value* result);
+
+// Methods to work with external data objects
+NAPI_EXTERN napi_status napi_wrap(napi_env env,
+                                  napi_value js_object,
+                                  void* native_object,
+                                  napi_finalize finalize_cb,
+                                  void* finalize_hint,
+                                  napi_ref* result);
+NAPI_EXTERN napi_status napi_unwrap(napi_env env,
+                                    napi_value js_object,
+                                    void** result);
+NAPI_EXTERN napi_status napi_create_external(napi_env env,
+                                             void* data,
+                                             napi_finalize finalize_cb,
+                                             void* finalize_hint,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_get_value_external(napi_env env,
+                                                napi_value value,
+                                                void** result);
+
+// Methods to control object lifespan
+
+// Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
+NAPI_EXTERN napi_status napi_create_reference(napi_env env,
+                                              napi_value value,
+                                              uint32_t initial_refcount,
+                                              napi_ref* result);
+
+// Deletes a reference. The referenced value is released, and may
+// be GC'd unless there are other references to it.
+NAPI_EXTERN napi_status napi_delete_reference(napi_env env, napi_ref ref);
+
+// Increments the reference count, optionally returning the resulting count.
+// After this call the  reference will be a strong reference because its
+// refcount is >0, and the referenced object is effectively "pinned".
+// Calling this when the refcount is 0 and the object is unavailable
+// results in an error.
+NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
+                                           napi_ref ref,
+                                           uint32_t* result);
+
+// Decrements the reference count, optionally returning the resulting count.
+// If the result is 0 the reference is now weak and the object may be GC'd
+// at any time if there are no other references. Calling this when the
+// refcount is already 0 results in an error.
+NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
+                                             napi_ref ref,
+                                             uint32_t* result);
+
+// Attempts to get a referenced value. If the reference is weak,
+// the value might no longer be available, in that case the call
+// is still successful but the result is NULL.
+NAPI_EXTERN napi_status napi_get_reference_value(napi_env env,
+                                                 napi_ref ref,
+                                                 napi_value* result);
+
+NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env,
+                                               napi_handle_scope* result);
+NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
+                                                napi_handle_scope scope);
+NAPI_EXTERN napi_status
+napi_open_escapable_handle_scope(napi_env env,
+                                 napi_escapable_handle_scope* result);
+NAPI_EXTERN napi_status
+napi_close_escapable_handle_scope(napi_env env,
+                                  napi_escapable_handle_scope scope);
+
+NAPI_EXTERN napi_status napi_escape_handle(napi_env env,
+                                           napi_escapable_handle_scope scope,
+                                           napi_value escapee,
+                                           napi_value* result);
+
+// Methods to support error handling
+NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error);
+NAPI_EXTERN napi_status napi_throw_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_is_error(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+
+// Methods to support catching exceptions
+NAPI_EXTERN napi_status napi_is_exception_pending(napi_env env, bool* result);
+NAPI_EXTERN napi_status napi_get_and_clear_last_exception(napi_env env,
+                                                          napi_value* result);
+
+// Methods to provide node::Buffer functionality with napi types
+NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
+                                           size_t length,
+                                           void** data,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
+                                                    size_t length,
+                                                    void* data,
+                                                    napi_finalize finalize_cb,
+                                                    void* finalize_hint,
+                                                    napi_value* result);
+NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
+                                                size_t length,
+                                                const void* data,
+                                                void** result_data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
+                                       napi_value value,
+                                       bool* result);
+NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
+                                             napi_value value,
+                                             void** data,
+                                             size_t* length);
+
+// Methods to work with array buffers and typed arrays
+NAPI_EXTERN napi_status napi_is_arraybuffer(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+NAPI_EXTERN napi_status napi_create_arraybuffer(napi_env env,
+                                                size_t byte_length,
+                                                void** data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status
+napi_create_external_arraybuffer(napi_env env,
+                                 void* external_data,
+                                 size_t byte_length,
+                                 napi_finalize finalize_cb,
+                                 void* finalize_hint,
+                                 napi_value* result);
+NAPI_EXTERN napi_status napi_get_arraybuffer_info(napi_env env,
+                                                  napi_value arraybuffer,
+                                                  void** data,
+                                                  size_t* byte_length);
+NAPI_EXTERN napi_status napi_is_typedarray(napi_env env,
+                                           napi_value value,
+                                           bool* result);
+NAPI_EXTERN napi_status napi_create_typedarray(napi_env env,
+                                               napi_typedarray_type type,
+                                               size_t length,
+                                               napi_value arraybuffer,
+                                               size_t byte_offset,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_get_typedarray_info(napi_env env,
+                                                 napi_value typedarray,
+                                                 napi_typedarray_type* type,
+                                                 size_t* length,
+                                                 void** data,
+                                                 napi_value* arraybuffer,
+                                                 size_t* byte_offset);
+
+// Methods to manage simple async operations
+NAPI_EXTERN
+napi_status napi_create_async_work(napi_env env,
+                                   napi_async_execute_callback execute,
+                                   napi_async_complete_callback complete,
+                                   void* data,
+                                   napi_async_work* result);
+NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
+                                               napi_async_work work);
+NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
+                                              napi_async_work work);
+NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
+                                               napi_async_work work);
+
+
+// version management
+NAPI_EXTERN napi_status napi_get_version(napi_env env, uint32_t* result);
+
+EXTERN_C_END
+
+#endif  // SRC_NODE_API_H_
diff --git a/lwnode/pkgs/modules/app/include/node_api_types.h b/lwnode/pkgs/modules/app/include/node_api_types.h
new file mode 100644 (file)
index 0000000..43102c5
--- /dev/null
@@ -0,0 +1,105 @@
+#ifndef SRC_NODE_API_TYPES_H_
+#define SRC_NODE_API_TYPES_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
+    typedef uint16_t char16_t;
+#endif
+
+// JSVM API types are all opaque pointers for ABI stability
+// typedef undefined structs instead of void* for compile time type safety
+typedef struct napi_env__ *napi_env;
+typedef struct napi_value__ *napi_value;
+typedef struct napi_ref__ *napi_ref;
+typedef struct napi_handle_scope__ *napi_handle_scope;
+typedef struct napi_escapable_handle_scope__ *napi_escapable_handle_scope;
+typedef struct napi_callback_info__ *napi_callback_info;
+typedef struct napi_async_work__ *napi_async_work;
+
+typedef enum {
+  napi_default = 0,
+  napi_writable = 1 << 0,
+  napi_enumerable = 1 << 1,
+  napi_configurable = 1 << 2,
+
+  // Used with napi_define_class to distinguish static properties
+  // from instance properties. Ignored by napi_define_properties.
+  napi_static = 1 << 10,
+} napi_property_attributes;
+
+typedef enum {
+  // ES6 types (corresponds to typeof)
+  napi_undefined,
+  napi_null,
+  napi_boolean,
+  napi_number,
+  napi_string,
+  napi_symbol,
+  napi_object,
+  napi_function,
+  napi_external,
+} napi_valuetype;
+
+typedef enum {
+  napi_int8_array,
+  napi_uint8_array,
+  napi_uint8_clamped_array,
+  napi_int16_array,
+  napi_uint16_array,
+  napi_int32_array,
+  napi_uint32_array,
+  napi_float32_array,
+  napi_float64_array,
+} napi_typedarray_type;
+
+typedef enum {
+  napi_ok,
+  napi_invalid_arg,
+  napi_object_expected,
+  napi_string_expected,
+  napi_name_expected,
+  napi_function_expected,
+  napi_number_expected,
+  napi_boolean_expected,
+  napi_array_expected,
+  napi_generic_failure,
+  napi_pending_exception,
+  napi_cancelled,
+  napi_escape_called_twice
+} napi_status;
+
+typedef napi_value (*napi_callback)(napi_env env,
+                                    napi_callback_info info);
+typedef void (*napi_finalize)(napi_env env,
+                              void* finalize_data,
+                              void* finalize_hint);
+typedef void (*napi_async_execute_callback)(napi_env env,
+                                            void* data);
+typedef void (*napi_async_complete_callback)(napi_env env,
+                                             napi_status status,
+                                             void* data);
+
+typedef struct {
+  // One of utf8name or name should be NULL.
+  const char* utf8name;
+  napi_value name;
+
+  napi_callback method;
+  napi_callback getter;
+  napi_callback setter;
+  napi_value value;
+
+  napi_property_attributes attributes;
+  void* data;
+} napi_property_descriptor;
+
+typedef struct {
+  const char* error_message;
+  void* engine_reserved;
+  uint32_t engine_error_code;
+  napi_status error_code;
+} napi_extended_error_info;
+
+#endif  // SRC_NODE_API_TYPES_H_
diff --git a/lwnode/pkgs/modules/app/package.json b/lwnode/pkgs/modules/app/package.json
new file mode 100644 (file)
index 0000000..d08ae8c
--- /dev/null
@@ -0,0 +1,17 @@
+{
+    "name": "app-node",
+    "version": "1.0.0",
+    "description": "Tizn App Module",
+    "private": true,
+    "gbs": {
+        "config": "./packaging/gbs.conf",
+        "profile": "profile.55std",
+        "option": "--incremental --include-all"
+    },
+    "scripts": {
+        "build": "gbs -c $npm_package_gbs_config build -A armv7l --buildroot ~/GBS-ROOT/$npm_package_name -P $npm_package_gbs_profile $npm_package_gbs_option",
+        "test": "node test/test.js"
+    },
+    "author": "",
+    "license": "ISC"
+}
diff --git a/lwnode/pkgs/modules/app/packaging/app-node.manifest b/lwnode/pkgs/modules/app/packaging/app-node.manifest
new file mode 100644 (file)
index 0000000..f5a44ec
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+        <request>
+                <domain name="_"/>
+        </request>
+</manifest>
diff --git a/lwnode/pkgs/modules/app/packaging/app-node.spec b/lwnode/pkgs/modules/app/packaging/app-node.spec
new file mode 100644 (file)
index 0000000..c8dbf7c
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Copyright (c) 2020-present Samsung Electronics Co., Ltd
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+Name:          app-node
+Summary:       -
+Version:       1.0.0
+Release:       1
+Group:         System/Servers
+License:       MIT
+Source:        %{name}-%{version}.tar.gz
+Source1001:    %{name}.manifest
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+BuildRequires: cmake, ninja, libgcc
+BuildRequires: pkgconfig(capi-appfw-app-common)
+
+%description
+Node.js Tizen App Module
+
+# Initialize the variables
+%define _outdir out_tizen/%{name}
+
+%prep
+%setup -q
+
+%build
+mkdir -p %{_outdir} && cd %{_outdir}
+cmake ../.. -DTARGET_OS_TIZEN=1 -G Ninja && ninja
+
+%install
+
+
+%clean
+rm ./*.list
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
diff --git a/lwnode/pkgs/modules/app/packaging/gbs.conf b/lwnode/pkgs/modules/app/packaging/gbs.conf
new file mode 100644 (file)
index 0000000..bfcb5ee
--- /dev/null
@@ -0,0 +1,25 @@
+[general]
+profile=profile.standard
+
+[profile.standard]
+repos = repo.public_base, repo.public_unified_standard
+
+[profile.55std]
+repos = repo.public_base_5.5, repo.public_unified_standard_5.5
+buildroot = ~/GBS-ROOT/55std
+
+############## Lastest ##############
+
+[repo.public_base]
+url = http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packages
+
+[repo.public_unified_standard]
+url = http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages
+
+############## Tizen 5.5 ##############
+
+[repo.public_base_5.5]
+url = http://download.tizen.org/snapshots/tizen/5.5-base/latest/repos/standard/packages
+
+[repo.public_unified_standard_5.5]
+url = http://download.tizen.org/snapshots/tizen/5.5-unified/latest/repos/standard/packages
diff --git a/lwnode/pkgs/modules/app/src/app.cc b/lwnode/pkgs/modules/app/src/app.cc
new file mode 100644 (file)
index 0000000..2b5d3f4
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include <node_api.h>
+
+#include "common.h"
+
+extern napi_value Common(napi_env env);
+
+void Init(napi_env env, napi_value exports, napi_value module, void* priv) {
+  NAPI_CALL_RETURN_VOID(
+      env, napi_set_named_property(env, exports, "common", Common(env)));
+}
+
+NAPI_MODULE(app, Init)
diff --git a/lwnode/pkgs/modules/app/src/common.cc b/lwnode/pkgs/modules/app/src/common.cc
new file mode 100644 (file)
index 0000000..a9895bf
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <node_api.h>
+#include <app_common.h>
+
+#include "common.h"
+
+napi_value StringValue(napi_env env, char* str) {
+  napi_value val = NULL;
+  size_t len = strlen(str);
+  if (len == 0) {
+    char* unknown = "unknown";
+    NAPI_CALL(env,
+              napi_create_string_utf8(env, unknown, strlen(unknown), &val));
+  } else {
+    NAPI_CALL(env, napi_create_string_utf8(env, str, len, &val));
+    free(str);
+  }
+  return val;
+}
+
+#define COMMON_PATH_PROPERTY(api, Api) \
+  {("get" #Api "Path"), 0, (Get##Api##Path), 0, 0, 0, napi_default, 0},
+
+#define COMMON_APPINFO_PROPERTY(api, Api) \
+  {("get" #Api), 0, (Get##Api), 0, 0, 0, napi_default, 0},
+
+#define GET_PATH_FUNCTION(api, Api)                                  \
+  napi_value Get##Api##Path(napi_env env, napi_callback_info info) { \
+    return StringValue(env, app_get_##api##_path());                 \
+  }
+
+#define GET_APPINFO_FUNCTION(api, Api)                         \
+  napi_value Get##Api(napi_env env, napi_callback_info info) { \
+    char* str = NULL;                                          \
+    int ret = app_get_##api(&str);                             \
+    if (ret != APP_ERROR_NONE) {                               \
+      return StringValue(env, "");                             \
+    }                                                          \
+    return StringValue(env, str);                              \
+  }
+
+#define COMMON_GET_PATH_API(F)       \
+  F(data, Data)                      \
+  F(cache, Cache)                    \
+  F(resource, Resource)              \
+  F(shared_data, SharedData)         \
+  F(shared_resource, SharedResource) \
+  F(shared_trusted, SharedTrusted)   \
+  F(external_data, ExternalData)     \
+  F(external_cache, ExternalCache)   \
+  F(external_shared_data, ExternalSharedData)
+
+#define COMMON_GET_APPINFO_API(F) \
+  F(name, Name)                   \
+  F(id, ID)                       \
+  F(version, Version)
+
+COMMON_GET_PATH_API(GET_PATH_FUNCTION)
+COMMON_GET_APPINFO_API(GET_APPINFO_FUNCTION)
+
+napi_value Common(napi_env env) {
+  napi_value common = NULL;
+  NAPI_CALL(env, napi_create_object(env, &common));
+
+  napi_property_descriptor properties[] = {COMMON_GET_PATH_API(
+      COMMON_PATH_PROPERTY) COMMON_GET_APPINFO_API(COMMON_APPINFO_PROPERTY)};
+
+  NAPI_CALL(env, napi_define_properties(
+                     env, common, sizeof(properties) / sizeof(*properties),
+                     properties));
+
+  return common;
+}
diff --git a/lwnode/pkgs/modules/audio-player-node/.gitignore b/lwnode/pkgs/modules/audio-player-node/.gitignore
new file mode 100644 (file)
index 0000000..e4fe37f
--- /dev/null
@@ -0,0 +1,2 @@
+kuep_net_signer.sh
+build
diff --git a/lwnode/pkgs/modules/audio-player-node/CMakeLists.txt b/lwnode/pkgs/modules/audio-player-node/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7c4e759
--- /dev/null
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 2.8)
+set (CMAKE_CXX_STANDARD 11)
+project (audio-player)
+
+add_definitions(-DBUILDING_NODE_EXTENSION)
+
+include_directories(include src)
+link_directories(${CMAKE_SOURCE_DIR}/lib)
+
+file (GLOB_RECURSE SOURCE_FILES src/*.cc)
+
+add_definitions(-DTARGET_OS_TIZEN)
+
+find_package (PkgConfig REQUIRED)
+pkg_check_modules(PACKAGES REQUIRED capi-media-audio-io capi-media-player capi-media-sound-manager)
+include_directories(${PACKAGES_INCLUDE_DIRS})
+
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
+target_link_libraries(${PROJECT_NAME} capi-media-audio-io capi-media-player capi-media-sound-manager tvbridge pthread)
+add_definitions(-DSPOTIFY_USERNAME="" 
+                -DSPOTIFY_PASSWORD=""
+                )
diff --git a/lwnode/pkgs/modules/audio-player-node/include/common.h b/lwnode/pkgs/modules/audio-player-node/include/common.h
new file mode 100644 (file)
index 0000000..aa0f6ae
--- /dev/null
@@ -0,0 +1,76 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// Empty value so that macros here are able to return NULL or void
+#define NAPI_RETVAL_NOTHING  // Intentionally blank #define
+
+#define GET_AND_THROW_LAST_ERROR(env)                                    \
+  do {                                                                   \
+    const napi_extended_error_info *error_info;                          \
+    napi_get_last_error_info((env), &error_info);                        \
+    bool is_pending;                                                     \
+    napi_is_exception_pending((env), &is_pending);                       \
+    /* If an exception is already pending, don't rethrow it */           \
+    if (!is_pending) {                                                   \
+      const char* error_message = error_info->error_message != NULL ?    \
+        error_info->error_message :                                      \
+        "empty error message";                                           \
+      napi_throw_error((env), error_message);                            \
+    }                                                                    \
+  } while(0);
+
+#define NAPI_ASSERT_BASE(env, assertion, message, ret_val)               \
+  if (!(assertion)) {                                                    \
+    napi_throw_error(                                                    \
+        (env),                                                           \
+        "assertion (" #assertion ") failed: " message);                  \
+    return ret_val;                                                      \
+  }
+
+// Returns NULL on failed assertion.
+// This is meant to be used inside napi_callback methods.
+#define NAPI_ASSERT(env, assertion, message)                             \
+  NAPI_ASSERT_BASE(env, assertion, message, NULL)
+
+// Returns empty on failed assertion.
+// This is meant to be used inside functions with void return type.
+#define NAPI_ASSERT_RETURN_VOID(env, assertion, message)                 \
+  NAPI_ASSERT_BASE(env, assertion, message, NAPI_RETVAL_NOTHING)
+
+#define NAPI_CALL_BASE(env, the_call, ret_val)                           \
+  if ((the_call) != napi_ok) {                                           \
+    GET_AND_THROW_LAST_ERROR((env));                                     \
+    return ret_val;                                                      \
+  }
+
+// Returns NULL if the_call doesn't return napi_ok.
+#define NAPI_CALL(env, the_call)                                         \
+  NAPI_CALL_BASE(env, the_call, NULL)
+
+// Returns empty if the_call doesn't return napi_ok.
+#define NAPI_CALL_RETURN_VOID(env, the_call)                             \
+  NAPI_CALL_BASE(env, the_call, NAPI_RETVAL_NOTHING)
+
+#define DECLARE_NAPI_PROPERTY(name, func)                                \
+  { (name), 0, (func), 0, 0, 0, napi_default, 0 }
+
+#define DECLARE_NAPI_GETTER(name, func)                                  \
+  { (name), 0, 0, (func), 0, 0, napi_default, 0 }
diff --git a/lwnode/pkgs/modules/audio-player-node/include/node_api.h b/lwnode/pkgs/modules/audio-player-node/include/node_api.h
new file mode 100644 (file)
index 0000000..c27cf93
--- /dev/null
@@ -0,0 +1,489 @@
+/******************************************************************************
+ * Experimental prototype for demonstrating VM agnostic and ABI stable API
+ * for native modules to use instead of using Nan and V8 APIs directly.
+ *
+ * The current status is "Experimental" and should not be used for
+ * production applications.  The API is still subject to change
+ * and as an experimental feature is NOT subject to semver.
+ *
+ ******************************************************************************/
+#ifndef SRC_NODE_API_H_
+#define SRC_NODE_API_H_
+
+#include <stddef.h>
+#include <stdbool.h>
+#include "node_api_types.h"
+
+#define NAPI_VERSION  1
+
+#ifdef _WIN32
+  #ifdef BUILDING_NODE_EXTENSION
+    #ifdef EXTERNAL_NAPI
+      // Building external N-API, or native module against external N-API
+      #define NAPI_EXTERN /* nothing */
+    #else
+      // Building native module against node with built-in N-API
+      #define NAPI_EXTERN __declspec(dllimport)
+    #endif
+  #else
+    // Building node with built-in N-API
+    #define NAPI_EXTERN __declspec(dllexport)
+  #endif
+#else
+  #define NAPI_EXTERN /* nothing */
+#endif
+
+#ifdef _WIN32
+# define NAPI_MODULE_EXPORT __declspec(dllexport)
+#else
+# define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
+#endif
+
+
+typedef void (*napi_addon_register_func)(napi_env env,
+                                         napi_value exports,
+                                         napi_value module,
+                                         void* priv);
+
+typedef struct {
+  int nm_version;
+  unsigned int nm_flags;
+  const char* nm_filename;
+  napi_addon_register_func nm_register_func;
+  const char* nm_modname;
+  void* nm_priv;
+  void* reserved[4];
+} napi_module;
+
+#define NAPI_MODULE_VERSION  1
+
+#if defined(_MSC_VER)
+#pragma section(".CRT$XCU", read)
+#define NAPI_C_CTOR(fn)                                                     \
+  static void __cdecl fn(void);                                             \
+  __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
+      fn;                                                                   \
+  static void __cdecl fn(void)
+#else
+#define NAPI_C_CTOR(fn)                              \
+  static void fn(void) __attribute__((constructor)); \
+  static void fn(void)
+#endif
+
+#ifdef __cplusplus
+#define EXTERN_C_START extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_START
+#define EXTERN_C_END
+#endif
+
+#define NAPI_MODULE_X(modname, regfunc, priv, flags)                  \
+  EXTERN_C_START                                                      \
+    static napi_module _module =                                      \
+    {                                                                 \
+      NAPI_MODULE_VERSION,                                            \
+      flags,                                                          \
+      __FILE__,                                                       \
+      regfunc,                                                        \
+      #modname,                                                       \
+      priv,                                                           \
+      {0},                                                            \
+    };                                                                \
+    NAPI_C_CTOR(_register_ ## modname) {                              \
+      napi_module_register(&_module);                                 \
+    }                                                                 \
+  EXTERN_C_END
+
+#define NAPI_MODULE(modname, regfunc) \
+  NAPI_MODULE_X(modname, regfunc, NULL, 0)
+
+EXTERN_C_START
+
+NAPI_EXTERN void napi_module_register(napi_module* mod);
+
+NAPI_EXTERN napi_status
+napi_get_last_error_info(napi_env env,
+                         const napi_extended_error_info** result);
+
+// Getters for defined singletons
+NAPI_EXTERN napi_status napi_get_undefined(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_null(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_global(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_boolean(napi_env env,
+                                         bool value,
+                                         napi_value* result);
+
+// Methods to create Primitive types/Objects
+NAPI_EXTERN napi_status napi_create_object(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array_with_length(napi_env env,
+                                                      size_t length,
+                                                      napi_value* result);
+NAPI_EXTERN napi_status napi_create_number(napi_env env,
+                                           double value,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_latin1(napi_env env,
+                                                  const char* str,
+                                                  size_t length,
+                                                  napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf8(napi_env env,
+                                                const char* str,
+                                                size_t length,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf16(napi_env env,
+                                                 const char16_t* str,
+                                                 size_t length,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_create_symbol(napi_env env,
+                                           napi_value description,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_function(napi_env env,
+                                             const char* utf8name,
+                                             napi_callback cb,
+                                             void* data,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_create_error(napi_env env,
+                                          napi_value msg,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_type_error(napi_env env,
+                                               napi_value msg,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
+                                                napi_value msg,
+                                                napi_value* result);
+
+// Methods to get the the native napi_value from Primitive type
+NAPI_EXTERN napi_status napi_typeof(napi_env env,
+                                    napi_value value,
+                                    napi_valuetype* result);
+NAPI_EXTERN napi_status napi_get_value_double(napi_env env,
+                                              napi_value value,
+                                              double* result);
+NAPI_EXTERN napi_status napi_get_value_int32(napi_env env,
+                                             napi_value value,
+                                             int32_t* result);
+NAPI_EXTERN napi_status napi_get_value_uint32(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+NAPI_EXTERN napi_status napi_get_value_int64(napi_env env,
+                                             napi_value value,
+                                             int64_t* result);
+NAPI_EXTERN napi_status napi_get_value_bool(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+
+// Copies LATIN-1 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
+                                                     napi_value value,
+                                                     char* buf,
+                                                     size_t bufsize,
+                                                     size_t* result);
+
+// Copies UTF-8 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf8(napi_env env,
+                                                   napi_value value,
+                                                   char* buf,
+                                                   size_t bufsize,
+                                                   size_t* result);
+
+// Copies UTF-16 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf16(napi_env env,
+                                                    napi_value value,
+                                                    char16_t* buf,
+                                                    size_t bufsize,
+                                                    size_t* result);
+
+// Methods to coerce values
+// These APIs may execute user scripts
+NAPI_EXTERN napi_status napi_coerce_to_bool(napi_env env,
+                                            napi_value value,
+                                            napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_number(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_object(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_string(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+
+// Methods to work with Objects
+NAPI_EXTERN napi_status napi_get_prototype(napi_env env,
+                                           napi_value object,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_get_property_names(napi_env env,
+                                                napi_value object,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_set_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value value);
+NAPI_EXTERN napi_status napi_has_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         bool* result);
+NAPI_EXTERN napi_status napi_get_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value* result);
+NAPI_EXTERN napi_status
+napi_define_properties(napi_env env,
+                       napi_value object,
+                       size_t property_count,
+                       const napi_property_descriptor* properties);
+
+// Methods to work with Arrays
+NAPI_EXTERN napi_status napi_is_array(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+NAPI_EXTERN napi_status napi_get_array_length(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+
+// Methods to compare values
+NAPI_EXTERN napi_status napi_strict_equals(napi_env env,
+                                           napi_value lhs,
+                                           napi_value rhs,
+                                           bool* result);
+
+// Methods to work with Functions
+NAPI_EXTERN napi_status napi_call_function(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_new_instance(napi_env env,
+                                          napi_value constructor,
+                                          size_t argc,
+                                          const napi_value* argv,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_instanceof(napi_env env,
+                                        napi_value object,
+                                        napi_value constructor,
+                                        bool* result);
+
+// Napi version of node::MakeCallback(...)
+NAPI_EXTERN napi_status napi_make_callback(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+
+// Methods to work with napi_callbacks
+
+// Gets all callback info in a single call. (Ugly, but faster.)
+NAPI_EXTERN napi_status napi_get_cb_info(
+    napi_env env,               // [in] NAPI environment handle
+    napi_callback_info cbinfo,  // [in] Opaque callback-info handle
+    size_t* argc,      // [in-out] Specifies the size of the provided argv array
+                       // and receives the actual count of args.
+    napi_value* argv,  // [out] Array of values
+    napi_value* this_arg,  // [out] Receives the JS 'this' arg for the call
+    void** data);          // [out] Receives the data pointer for the callback.
+
+NAPI_EXTERN napi_status napi_is_construct_call(napi_env env,
+                                               napi_callback_info cbinfo,
+                                               bool* result);
+NAPI_EXTERN napi_status
+napi_define_class(napi_env env,
+                  const char* utf8name,
+                  napi_callback constructor,
+                  void* data,
+                  size_t property_count,
+                  const napi_property_descriptor* properties,
+                  napi_value* result);
+
+// Methods to work with external data objects
+NAPI_EXTERN napi_status napi_wrap(napi_env env,
+                                  napi_value js_object,
+                                  void* native_object,
+                                  napi_finalize finalize_cb,
+                                  void* finalize_hint,
+                                  napi_ref* result);
+NAPI_EXTERN napi_status napi_unwrap(napi_env env,
+                                    napi_value js_object,
+                                    void** result);
+NAPI_EXTERN napi_status napi_create_external(napi_env env,
+                                             void* data,
+                                             napi_finalize finalize_cb,
+                                             void* finalize_hint,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_get_value_external(napi_env env,
+                                                napi_value value,
+                                                void** result);
+
+// Methods to control object lifespan
+
+// Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
+NAPI_EXTERN napi_status napi_create_reference(napi_env env,
+                                              napi_value value,
+                                              uint32_t initial_refcount,
+                                              napi_ref* result);
+
+// Deletes a reference. The referenced value is released, and may
+// be GC'd unless there are other references to it.
+NAPI_EXTERN napi_status napi_delete_reference(napi_env env, napi_ref ref);
+
+// Increments the reference count, optionally returning the resulting count.
+// After this call the  reference will be a strong reference because its
+// refcount is >0, and the referenced object is effectively "pinned".
+// Calling this when the refcount is 0 and the object is unavailable
+// results in an error.
+NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
+                                           napi_ref ref,
+                                           uint32_t* result);
+
+// Decrements the reference count, optionally returning the resulting count.
+// If the result is 0 the reference is now weak and the object may be GC'd
+// at any time if there are no other references. Calling this when the
+// refcount is already 0 results in an error.
+NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
+                                             napi_ref ref,
+                                             uint32_t* result);
+
+// Attempts to get a referenced value. If the reference is weak,
+// the value might no longer be available, in that case the call
+// is still successful but the result is NULL.
+NAPI_EXTERN napi_status napi_get_reference_value(napi_env env,
+                                                 napi_ref ref,
+                                                 napi_value* result);
+
+NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env,
+                                               napi_handle_scope* result);
+NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
+                                                napi_handle_scope scope);
+NAPI_EXTERN napi_status
+napi_open_escapable_handle_scope(napi_env env,
+                                 napi_escapable_handle_scope* result);
+NAPI_EXTERN napi_status
+napi_close_escapable_handle_scope(napi_env env,
+                                  napi_escapable_handle_scope scope);
+
+NAPI_EXTERN napi_status napi_escape_handle(napi_env env,
+                                           napi_escapable_handle_scope scope,
+                                           napi_value escapee,
+                                           napi_value* result);
+
+// Methods to support error handling
+NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error);
+NAPI_EXTERN napi_status napi_throw_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_is_error(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+
+// Methods to support catching exceptions
+NAPI_EXTERN napi_status napi_is_exception_pending(napi_env env, bool* result);
+NAPI_EXTERN napi_status napi_get_and_clear_last_exception(napi_env env,
+                                                          napi_value* result);
+
+// Methods to provide node::Buffer functionality with napi types
+NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
+                                           size_t length,
+                                           void** data,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
+                                                    size_t length,
+                                                    void* data,
+                                                    napi_finalize finalize_cb,
+                                                    void* finalize_hint,
+                                                    napi_value* result);
+NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
+                                                size_t length,
+                                                const void* data,
+                                                void** result_data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
+                                       napi_value value,
+                                       bool* result);
+NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
+                                             napi_value value,
+                                             void** data,
+                                             size_t* length);
+
+// Methods to work with array buffers and typed arrays
+NAPI_EXTERN napi_status napi_is_arraybuffer(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+NAPI_EXTERN napi_status napi_create_arraybuffer(napi_env env,
+                                                size_t byte_length,
+                                                void** data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status
+napi_create_external_arraybuffer(napi_env env,
+                                 void* external_data,
+                                 size_t byte_length,
+                                 napi_finalize finalize_cb,
+                                 void* finalize_hint,
+                                 napi_value* result);
+NAPI_EXTERN napi_status napi_get_arraybuffer_info(napi_env env,
+                                                  napi_value arraybuffer,
+                                                  void** data,
+                                                  size_t* byte_length);
+NAPI_EXTERN napi_status napi_is_typedarray(napi_env env,
+                                           napi_value value,
+                                           bool* result);
+NAPI_EXTERN napi_status napi_create_typedarray(napi_env env,
+                                               napi_typedarray_type type,
+                                               size_t length,
+                                               napi_value arraybuffer,
+                                               size_t byte_offset,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_get_typedarray_info(napi_env env,
+                                                 napi_value typedarray,
+                                                 napi_typedarray_type* type,
+                                                 size_t* length,
+                                                 void** data,
+                                                 napi_value* arraybuffer,
+                                                 size_t* byte_offset);
+
+// Methods to manage simple async operations
+NAPI_EXTERN
+napi_status napi_create_async_work(napi_env env,
+                                   napi_async_execute_callback execute,
+                                   napi_async_complete_callback complete,
+                                   void* data,
+                                   napi_async_work* result);
+NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
+                                               napi_async_work work);
+NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
+                                              napi_async_work work);
+NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
+                                               napi_async_work work);
+
+
+// version management
+NAPI_EXTERN napi_status napi_get_version(napi_env env, uint32_t* result);
+
+EXTERN_C_END
+
+#endif  // SRC_NODE_API_H_
diff --git a/lwnode/pkgs/modules/audio-player-node/include/node_api_types.h b/lwnode/pkgs/modules/audio-player-node/include/node_api_types.h
new file mode 100644 (file)
index 0000000..43102c5
--- /dev/null
@@ -0,0 +1,105 @@
+#ifndef SRC_NODE_API_TYPES_H_
+#define SRC_NODE_API_TYPES_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
+    typedef uint16_t char16_t;
+#endif
+
+// JSVM API types are all opaque pointers for ABI stability
+// typedef undefined structs instead of void* for compile time type safety
+typedef struct napi_env__ *napi_env;
+typedef struct napi_value__ *napi_value;
+typedef struct napi_ref__ *napi_ref;
+typedef struct napi_handle_scope__ *napi_handle_scope;
+typedef struct napi_escapable_handle_scope__ *napi_escapable_handle_scope;
+typedef struct napi_callback_info__ *napi_callback_info;
+typedef struct napi_async_work__ *napi_async_work;
+
+typedef enum {
+  napi_default = 0,
+  napi_writable = 1 << 0,
+  napi_enumerable = 1 << 1,
+  napi_configurable = 1 << 2,
+
+  // Used with napi_define_class to distinguish static properties
+  // from instance properties. Ignored by napi_define_properties.
+  napi_static = 1 << 10,
+} napi_property_attributes;
+
+typedef enum {
+  // ES6 types (corresponds to typeof)
+  napi_undefined,
+  napi_null,
+  napi_boolean,
+  napi_number,
+  napi_string,
+  napi_symbol,
+  napi_object,
+  napi_function,
+  napi_external,
+} napi_valuetype;
+
+typedef enum {
+  napi_int8_array,
+  napi_uint8_array,
+  napi_uint8_clamped_array,
+  napi_int16_array,
+  napi_uint16_array,
+  napi_int32_array,
+  napi_uint32_array,
+  napi_float32_array,
+  napi_float64_array,
+} napi_typedarray_type;
+
+typedef enum {
+  napi_ok,
+  napi_invalid_arg,
+  napi_object_expected,
+  napi_string_expected,
+  napi_name_expected,
+  napi_function_expected,
+  napi_number_expected,
+  napi_boolean_expected,
+  napi_array_expected,
+  napi_generic_failure,
+  napi_pending_exception,
+  napi_cancelled,
+  napi_escape_called_twice
+} napi_status;
+
+typedef napi_value (*napi_callback)(napi_env env,
+                                    napi_callback_info info);
+typedef void (*napi_finalize)(napi_env env,
+                              void* finalize_data,
+                              void* finalize_hint);
+typedef void (*napi_async_execute_callback)(napi_env env,
+                                            void* data);
+typedef void (*napi_async_complete_callback)(napi_env env,
+                                             napi_status status,
+                                             void* data);
+
+typedef struct {
+  // One of utf8name or name should be NULL.
+  const char* utf8name;
+  napi_value name;
+
+  napi_callback method;
+  napi_callback getter;
+  napi_callback setter;
+  napi_value value;
+
+  napi_property_attributes attributes;
+  void* data;
+} napi_property_descriptor;
+
+typedef struct {
+  const char* error_message;
+  void* engine_reserved;
+  uint32_t engine_error_code;
+  napi_status error_code;
+} napi_extended_error_info;
+
+#endif  // SRC_NODE_API_TYPES_H_
diff --git a/lwnode/pkgs/modules/audio-player-node/index.js b/lwnode/pkgs/modules/audio-player-node/index.js
new file mode 100644 (file)
index 0000000..a71a360
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+const _player = require('./build/audio-player');
+
+module.exports = {
+  start: () => {
+    console.log(`${__filename} start`);
+    _player.start();
+  },
+  stop: () => {
+    console.log(`${__filename} start`);
+    _player.stop();
+  }
+}
diff --git a/lwnode/pkgs/modules/audio-player-node/package.json b/lwnode/pkgs/modules/audio-player-node/package.json
new file mode 100644 (file)
index 0000000..da51072
--- /dev/null
@@ -0,0 +1,20 @@
+{
+  "name": "audio-player-node",
+  "version": "1.0.0",
+  "description": "node-escargot-addon: Build a N-API native addon with CMake.",
+  "private": true,
+  "main": "index.js",
+  "dependencies": {
+  },
+  "gbs": {
+    "config": "./packaging/gbs.conf",
+    "profile": "profile.55std",
+    "option": "--incremental --include-all"
+  },
+  "scripts": {
+      "build": "gbs -c $npm_package_gbs_config build -A armv7l --buildroot ~/GBS-ROOT/$npm_package_name -P $npm_package_gbs_profile $npm_package_gbs_option",
+      "test": "node test/test.js"
+  },
+  "author": "",
+  "license": "ISC"
+}
diff --git a/lwnode/pkgs/modules/audio-player-node/packaging/audio-player-node.manifest b/lwnode/pkgs/modules/audio-player-node/packaging/audio-player-node.manifest
new file mode 100644 (file)
index 0000000..f5a44ec
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+        <request>
+                <domain name="_"/>
+        </request>
+</manifest>
diff --git a/lwnode/pkgs/modules/audio-player-node/packaging/audio-player-node.spec b/lwnode/pkgs/modules/audio-player-node/packaging/audio-player-node.spec
new file mode 100644 (file)
index 0000000..75aa57a
--- /dev/null
@@ -0,0 +1,61 @@
+#
+# Copyright (c) 2020-present Samsung Electronics Co., Ltd
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+Name:          audio-player-node
+Summary:       -
+Version:       1.0.0
+Release:       1
+Group:         System/Servers
+License:       MIT
+Source:        %{name}-%{version}.tar.gz
+Source1001:    %{name}.manifest
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+BuildRequires: cmake, ninja, libgcc
+BuildRequires: pkgconfig(capi-media-audio-io)
+BuildRequires: pkgconfig(capi-media-player), pkgconfig(capi-media-sound-manager)
+
+%description
+Node.js Audio Player Module for node escargot
+
+# Initialize the variables
+%define _outdir build/%{name}
+
+%prep
+%setup -q
+
+%build
+mkdir -p %{_outdir} && cd %{_outdir}
+cmake ../.. -DTARGET_OS_TIZEN=1 -G Ninja && ninja
+
+%install
+mv %{_outdir}/*.node %{_outdir}/../
+
+%clean
+rm ./*.list
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
diff --git a/lwnode/pkgs/modules/audio-player-node/packaging/gbs.conf b/lwnode/pkgs/modules/audio-player-node/packaging/gbs.conf
new file mode 100644 (file)
index 0000000..bfcb5ee
--- /dev/null
@@ -0,0 +1,25 @@
+[general]
+profile=profile.standard
+
+[profile.standard]
+repos = repo.public_base, repo.public_unified_standard
+
+[profile.55std]
+repos = repo.public_base_5.5, repo.public_unified_standard_5.5
+buildroot = ~/GBS-ROOT/55std
+
+############## Lastest ##############
+
+[repo.public_base]
+url = http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packages
+
+[repo.public_unified_standard]
+url = http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages
+
+############## Tizen 5.5 ##############
+
+[repo.public_base_5.5]
+url = http://download.tizen.org/snapshots/tizen/5.5-base/latest/repos/standard/packages
+
+[repo.public_unified_standard_5.5]
+url = http://download.tizen.org/snapshots/tizen/5.5-unified/latest/repos/standard/packages
diff --git a/lwnode/pkgs/modules/audio-player-node/src/audio_player.cc b/lwnode/pkgs/modules/audio-player-node/src/audio_player.cc
new file mode 100644 (file)
index 0000000..e9f9608
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include "audio_player.h"
+
+static AudioPlayer* g_audioPlayerInstance;
+
+AudioPlayer* AudioPlayer::GetInstance() {
+  if (g_audioPlayerInstance == nullptr) {
+    g_audioPlayerInstance = AudioPlayer::CreateTizenAudioIO();
+  }
+  return g_audioPlayerInstance;
+}
+
+void AudioPlayer::RemoveInstance() {
+  if (g_audioPlayerInstance) {
+    delete g_audioPlayerInstance;
+    g_audioPlayerInstance = nullptr;
+  }
+}
diff --git a/lwnode/pkgs/modules/audio-player-node/src/audio_player.h b/lwnode/pkgs/modules/audio-player-node/src/audio_player.h
new file mode 100644 (file)
index 0000000..98b188b
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#ifndef AudioPlayer_H_
+#define AudioPlayer_H_
+
+// typedef int (*AudioPacketFinalizeCB)(void* user_data);
+#include <iostream>
+#include <cassert>
+#include <thread>
+#include <deque>
+#include <mutex>
+#include <condition_variable>
+#include <atomic>
+#include <cstdint>
+#include <cstring>
+#include <signal.h>
+#include <unistd.h>
+#ifdef NDEBUG
+#define AUDIOPLAYER_DLOG_INFO(...)
+#define AUDIOPLAYER_DLOG_WARN(...)
+#define AUDIOPLAYER_DLOG_ERROR(...)
+
+#define AUDIOPLAYER_ASSERT(assertion) ((void)0)
+
+#else
+
+#include <cassert>
+
+#define AUDIOPLAYER_DLOG_INFO(...) fprintf(stdout, __VA_ARGS__);
+
+#define AUDIOPLAYER_DLOG_WARN(...) fprintf(stdout, __VA_ARGS__);
+
+#define AUDIOPLAYER_DLOG_ERROR(...) fprintf(stderr, __VA_ARGS__);
+
+#define AUDIOPLAYER_ASSERT(assertion) assert(assertion);
+
+#endif  // NDEBBUG
+
+class AudioPlayer {
+ public:
+  virtual ~AudioPlayer(){};
+
+  static AudioPlayer* GetInstance();
+  static void RemoveInstance();
+
+  virtual int Start() = 0;
+  virtual int Write(const int16_t* samples, size_t samples_count) = 0;
+  virtual int Close() = 0;
+
+ protected:
+  AudioPlayer(){};
+
+  static AudioPlayer* CreateTizenAudioIO();
+  static AudioPlayer* CreateTizenAudioPlayer();
+};
+
+#endif
diff --git a/lwnode/pkgs/modules/audio-player-node/src/audio_player_module.cc b/lwnode/pkgs/modules/audio-player-node/src/audio_player_module.cc
new file mode 100644 (file)
index 0000000..638e194
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include <node_api.h>
+#include <stdio.h>
+#include <mutex>
+#include <condition_variable>
+
+#include "common.h"
+#include "bridge/service.h"
+
+namespace modules {
+
+struct WorkerHandler {
+  napi_async_work handle;
+};
+
+static WorkerHandler g_workerHandler;
+static bool g_isCreatedWorkerQueue = false;
+static bool g_isStopRequested = false;
+static std::mutex g_mutex;
+static std::condition_variable g_condition;
+
+void Execute(napi_env env, void* data) {
+  WorkerHandler* handler = static_cast<WorkerHandler*>(data);
+
+  if (handler != &g_workerHandler) {
+    napi_throw_type_error(env, "Wrong data parameter to Execute.");
+    return;
+  }
+
+  std::unique_lock<std::mutex> lock(g_mutex);
+
+  printf("Execute: Service starts (%s)\n", SPOTIFY_USERNAME);
+  service_start(SPOTIFY_USERNAME, SPOTIFY_PASSWORD);
+
+  g_condition.wait(lock, [] { return g_isStopRequested; });
+
+  service_stop();
+}
+
+void Complete(napi_env env, napi_status status, void* data) {
+  printf("Complete\n");
+
+  WorkerHandler* handler = static_cast<WorkerHandler*>(data);
+  if (handler != &g_workerHandler) {
+    napi_throw_type_error(env, "Wrong data parameter to Complete.");
+    return;
+  }
+
+  if (status != napi_ok) {
+    napi_throw_type_error(env, "Execute callback failed.");
+    return;
+  }
+
+  g_isCreatedWorkerQueue = false;
+
+  NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, handler->handle));
+}
+
+napi_value Stop(napi_env env, napi_callback_info info) {
+  g_isStopRequested = true;
+  g_condition.notify_one();
+  return nullptr;
+}
+
+napi_value Start(napi_env env, napi_callback_info info) {
+  if (g_isCreatedWorkerQueue) {
+    return nullptr;
+  }
+
+  g_isStopRequested = false;
+  g_isCreatedWorkerQueue = true;
+
+  NAPI_CALL(env,
+            napi_create_async_work(env, Execute, Complete, &g_workerHandler,
+                                   &g_workerHandler.handle));
+
+  NAPI_CALL(env, napi_queue_async_work(env, g_workerHandler.handle));
+
+  return nullptr;
+}
+
+void Init(napi_env env, napi_value exports, napi_value module, void* priv) {
+  napi_property_descriptor properties[] = {
+      DECLARE_NAPI_PROPERTY("start", Start),
+      DECLARE_NAPI_PROPERTY("stop", Stop),
+  };
+
+  NAPI_CALL_RETURN_VOID(
+      env,
+      napi_define_properties(
+          env, exports, sizeof(properties) / sizeof(*properties), properties));
+}
+
+NAPI_MODULE(audio_player, Init)
+
+}  // namespace modules
diff --git a/lwnode/pkgs/modules/audio-player-node/src/audio_player_sample.cc b/lwnode/pkgs/modules/audio-player-node/src/audio_player_sample.cc
new file mode 100644 (file)
index 0000000..0ae563e
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include <stdio.h>
+#include <assert.h>
+
+#include "audio_player.h"
+#include "audio_player_sample.h"
+
+static AudioPlayer* g_audioPlayer;
+
+int audio_player_start() {
+  g_audioPlayer = AudioPlayer::GetInstance();
+  g_audioPlayer->Start();
+  return 0;
+}
+
+int audio_player_write(const int16_t* samples, size_t samples_count,
+                       int* written_samples_count) {
+  if (g_audioPlayer == nullptr) {
+    return -1;
+  }
+
+  if (samples_count == 0) {
+    return 0;
+  }
+
+  int ret = g_audioPlayer->Write(samples, samples_count);
+
+  if (written_samples_count) {
+    *written_samples_count = ret;
+  }
+  return ret;
+}
+
+int audio_player_close() {
+  g_audioPlayer->Close();
+  AudioPlayer::RemoveInstance();
+  return 0;
+}
diff --git a/lwnode/pkgs/modules/audio-player-node/src/audio_player_sample.h b/lwnode/pkgs/modules/audio-player-node/src/audio_player_sample.h
new file mode 100644 (file)
index 0000000..d2d9f67
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#ifndef AUDIOPLAYER_H
+#define AUDIOPLAYER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int audio_player_start();
+int audio_player_write(const int16_t* samples, size_t samples_count,
+                       int* written_samples_count);
+int audio_player_close();
+
+#ifdef __cplusplus
+}  // extern "C"
+#endif
+
+#endif /* AUDIOPLAYER_H */
diff --git a/lwnode/pkgs/modules/audio-player-node/src/bridge/bridge.h b/lwnode/pkgs/modules/audio-player-node/src/bridge/bridge.h
new file mode 100644 (file)
index 0000000..e65334f
--- /dev/null
@@ -0,0 +1,570 @@
+/*
+ * Copyright (c) 2006-2014 Spotify AB
+ *
+ */
+
+/**
+ * \file   bridge.h    Public bridge API for eSDK.
+ *
+ * \note   All input strings are expected to be in JSON format
+ * \note   All output strings are in JSON format
+ *
+ */
+
+#ifndef BRIDGE_H
+#define BRIDGE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef SP_LIBEXPORT
+#define SP_LIBEXPORT(x) x
+#endif //SP_LIBEXPORT
+
+/* Includes */
+#include <stddef.h>
+#include <stdint.h>
+
+/**
+ * \brief Current version of the application interface, that is, the API described
+ * by this file.
+ *
+ * This value should be set in the sp_bridge_config struct passed to sp_bridge_create().
+ *
+ * If an (upgraded) library is no longer compatible with this version the error
+ * #SP_BRIDGE_ERROR_BAD_API_VERSION will be returned from sp_bridge_create().
+ * Future versions of the library will provide you with some kind of mechanism
+ * to request an updated version of the library.
+ */
+#define BRIDGE_API_VERSION 21
+
+/**
+ * \brief Maximum length of the device's unique ID (not counting terminating NULL)
+ * \see sp_bridge_config.
+ */
+#define SP_BRIDGE_MAX_UNIQUE_ID_LENGTH (64)
+
+/**
+ * \brief Maximum length of the device display name (not counting terminating NULL)
+ * \see sp_bridge_config.
+ */
+#define SP_BRIDGE_MAX_DISPLAY_NAME_LENGTH (64)
+
+/**
+ * \brief Maximum length of the brand name string (not counting terminating NULL)
+ * \see sp_bridge_config
+ */
+#define SP_BRIDGE_MAX_BRAND_NAME_LENGTH (32)
+
+/**
+ * \brief Maximum length of the model name string (not counting terminating NULL)
+ * \see sp_bridge_config
+ */
+#define SP_BRIDGE_MAX_MODEL_NAME_LENGTH (30)
+
+/**
+ * \brief The default scope to request for ZeroConf access tokens
+ * \see sp_bridge_config
+ */
+#define SP_BRIDGE_SCOPE_DEFAULT "umbrella-tv,streaming,client-authorization-universal"
+
+
+/**
+ * \brief Error codes
+ *
+ * These are the possible status codes returned by functions in the bridge. They
+ * should be used to determine if an action was successful, and if not, why the
+ * action failed.
+ */
+typedef enum sp_bridge_error {
+  /**
+   * \brief No errors encountered.
+   */
+  SP_BRIDGE_ERROR_OK                        = 0,
+
+  /**
+   * \brief The library version targeted does not match the version passed in
+   * sp_bridge_config::api_version.
+   */
+  SP_BRIDGE_ERROR_BAD_API_VERSION           = 1,
+
+  /**
+   * \brief Initialization of library failed - check sp_bridge_config parameters
+   *  passed to sp_bridge_create().
+   */
+  SP_BRIDGE_ERROR_API_INITIALIZATION_FAILED = 2,
+
+  /**
+   * \brief Input data was either missing or invalid.
+   */
+  SP_BRIDGE_ERROR_INVALID_INDATA            = 3,
+
+  /**
+   * \brief An invalid argument was specified.
+   */
+  SP_BRIDGE_ERROR_INVALID_ARGUMENT          = 4,
+
+  /**
+   * \brief An operating system error.
+   */
+  SP_BRIDGE_ERROR_SYSTEM_FAILURE            = 5,
+
+  /**
+   * \brief One or more callbacks were not specified.
+   */
+  SP_BRIDGE_ERROR_MISSING_CALLBACK          = 6,
+} sp_bridge_error;
+
+/**
+ * \brief Audio format
+ */
+typedef struct sp_bridge_audioformat {
+  /** \brief Number of channels (1 = mono, 2 = stereo) */
+  int channels;
+
+  /** \brief Sample rate in Hz (such as 22050, 44100 or 48000) */
+  int sample_rate;
+} sp_bridge_audioformat;
+
+/**
+ * \brief Playback events.
+ */
+typedef enum sp_bridge_playback_event {
+  /**
+   * \brief Start delivery samples from your internal buffer to the audio-out.
+   */
+  SP_BRIDGE_PLAYBACK_EVENT_PLAY = 0,
+
+  /**
+   * \brief Stop delivery samples from your internal buffer to the audio-out.
+   */
+  SP_BRIDGE_PLAYBACK_EVENT_PAUSE = 1,
+
+  /**
+   * \brief Flush your internal buffer.
+   */
+  SP_BRIDGE_PLAYBACK_EVENT_FLUSH = 2,
+
+  /**
+   * \brief User want to change the volume level.
+   */
+  SP_BRIDGE_PLAYBACK_EVENT_VOLUME = 3,
+
+  /**
+   * \brief A seek operation started.
+   * Some implementation might need this information.
+   */
+  SP_BRIDGE_PLAYBACK_EVENT_SEEK = 4,
+} sp_bridge_playback_event;
+
+/**
+ * \brief Volume event parameters.
+ *
+ * see \a on_playback_event
+ *
+ */
+struct pb_volume_param {
+
+  /*
+   * \brief Volume level in the range [0..65535]
+   */
+  uint16_t volume_level;
+
+  /*
+   * \brief Indicates whether volume change was originated remotely [0..1]
+   */
+  uint8_t remote;
+};
+
+/**
+ * \brief Seek event parameters.
+ *
+ * see \a on_playback_event
+ *
+ */
+struct pb_seek_param {
+
+  /*
+   * \brief Position in ms the user seeked to.
+   */
+  uint32_t position_ms;
+};
+
+/*
+ * \brief common data structure for on_playback events.
+ *
+ * see \a on_playback_event
+ */
+typedef struct {
+  union {
+    /*
+     * valid only for SP_BRIDGE_PLAYBACK_EVENT_VOLUME event
+     */
+    struct pb_volume_param volume;
+
+    /*
+     * valid only for SP_BRIDGE_PLAYBACK_EVENT_SEEK event
+     */
+    struct pb_seek_param seek;
+  } u;
+} sp_bridge_pb_param;
+
+/**
+ * Bridge callbacks
+ *
+ * Registered when you create the bridge.
+ */
+typedef struct sp_bridge_callbacks {
+
+  /**
+   * \brief A bridge event occurred.
+   *
+   * \param[in]  evt JSON structure describing the event. The user has to copy the
+   *             data in evt if it wishes to retain it.
+   * \param[in]  ns name of the namspace that generated the event or NULL if evt must
+   *             be passed to the upper layer.
+   * \param[in]  userdata Data supplied by the user in the sp_bridge_config structure
+   *
+   */
+  void (*on_event)(const char *evt, const char *ns, void *userdata);
+
+  /**
+   * \brief An action from the audio driver is required.
+   *
+   * \param[in]  evt one of the playback event specified in \a sp_bridge_playback_event.
+   * \param[in]  userdata Data supplied by the user in the \a sp_bridge_config structure
+   *
+   */
+  void (*on_playback_event)(sp_bridge_playback_event evt, sp_bridge_pb_param *param, void *userdata);
+
+  /**
+   * \brief Callback for sending audio data to the application
+   *
+   * \param[in] samples Pointer to 16-bit PCM data. The buffer contains
+   *              \a sample_count samples, whereby each sample contains the data
+   *              for a single audio channel.
+   * \param[in] sample_count Number of samples in the \a samples buffer. This is
+   *              always a multiple of \a sample_format->channels.
+   * \param[in] sample_format Information about the format of the audio data.
+   *              See the note below.
+   * \param[out] samples_buffered The number of samples that the application
+   *              has received but that have not been played yet. See the note below.
+   * \param[in] userdata Data supplied by the user in the sp_bridge_config structure
+   * \return The number of samples that the application accepted.
+   *
+   * \note \a sample_format can change at any time as playback goes from one track
+   * to the next. The application should check the format during every invocation
+   * of the callback and reinitialize the audio pipeline if necessary.
+   * \par
+   *
+   * \note It is important to return an accurate value in \a samples_buffered.
+   * The library uses this value to calculate an accurate playback position within
+   * the track. For example, if the library has delivered 1.5 seconds of audio data,
+   * but the application is buffering half a second of audio data, the actual
+   * playback position is 1 second.
+   *  - By default, when \a samples_buffered is 0, the library will calculate the
+   *    playback position and the notifications that are sent when playback reaches
+   *    the end of a track based on the amount of audio data that was delivered in
+   *    music_delivery().
+   *  - However, audio data is delivered faster than the playback happens (1.5 times
+   *    playback speed). This means, as long as the application accepts samples in
+   *    music_delivery(), these samples will be calculated as "consumed" and
+   *    the playback position will move ahead. Eventually, the last sample for a track
+   *    will be delivered in music_delivery().
+   *  - To adjust playback position and notifications for the amount of data that the
+   *    application has buffered but that have not been played yet, the application
+   *    should set \a samples_buffered to the amount of samples in all buffers. This
+   *    will make sure that the internal position is adjusted, the notifications
+   *    will be sent at the correct time to the upper layers.
+   *  - If the application has buffered data, music_delivery() may be invoked with
+   *    \a samples_count = 0 after all audio data has been delivered by the library.
+   *    In this case, the application should make sure to update \a samples_buffered
+   *    (since the application's buffers are draining) and to return 0 from the
+   *    callback.
+   * \par
+   *
+   * \note Most tracks are stereo, 44100 Hz, so it is a good idea to initialize
+   * the audio pipeline to this format when the application starts.
+   * \par
+   *
+   * \note The application should not block or call other API functions in the
+   * callback.
+   */
+  size_t (*music_delivery)(const int16_t *samples, size_t sample_count,
+      const struct sp_bridge_audioformat *sample_format,
+      uint32_t *samples_buffered, void *userdata);
+
+  /**
+   * \brief Callback for sending compressed audio data (OGG Vorbis) to the application
+   *
+   * This callback is invoked as soon as compressed ogg bits are available.
+   *
+   * Ogg headers are transmitted once per track, and are always at offset 0.
+   * The headers must be parsed for the track format.  In addition to the three
+   * mandatory Ogg headers, there is an optional fourth Spotify-specific Ogg
+   * header that is sent as the first header of a track.  This header should
+   * simply be skipped.
+   *
+   * The return value is a boolean response to whether the data was accepted.  It is
+   * not supported to accept only part of the buffer.  If there is not room to store
+   * or process the entire buffer, all data should be rejected.  The data will be
+   * redelivered later.
+   *
+   * \param[in] data Block of compressed Ogg Vorbis data.
+   * \param[in] size Size of the data buffer.
+   * \param[in] offset Offset of the data buffer within the track (in bytes).
+   If offset is 0, it is the beginning of an Ogg track and contains
+   Ogg headers.  These must be parsed for the track format.
+   * \param[in] userdata Data supplied by the user in the sp_bridge_config structure
+   * \return 0 if data was rejected, non-zero if all data was accepted.
+   */
+  uint8_t (*compress_delivery)(const void *data, uint32_t size,
+      uint32_t offset, void *context);
+
+  /**
+   * \brief Callback for reporting the current playback position to the Spotify library
+   *
+   * This callback is invoked periodically by the Spotify library to request the
+   * current playback position, in milliseconds.  It is up to the integrator to
+   * track how much of the audio has played and report that here as accurately
+   * as possible.
+   *
+   * The reported time should represent the amount of audio that has actually
+   * played, not the amount that is buffered.
+   *
+   * \param[out] position_ms Playback position, in milliseconds, of current track
+   * \param[in] context Context pointer that was passed when registering the callback
+   */
+  void (*stream_position)(uint32_t *position_ms, void *context);
+
+  /**
+   * \brief Callback for platform specific tasks upon the Spotify thread start.
+   *
+   * The callback will be called immediately after the Spotify thread will be
+   * started and as all the other callbacks it will be called from the thread.
+   *
+   * \param[in] userdata Data supplied by the user in the sp_bridge_config structure
+   */
+  void (*on_thread_started)(void *userdata);
+
+  /**
+   * \brief Callback for platform logging.
+   *
+   * This callback will be invoked for every log message originated from eSDK or from the TvBridge.
+   * Used only for debugging purposes. If no callback is speificed and logging is enabled 
+   * it will go to stdout. Max message length is 2048 bytes including null termination
+   *
+   * \param[in] message Debug message
+   * \param[in] userdata Data supplied by the user in the sp_bridge_config structure
+   */
+  void (*log_print)(const char *message, void *userdata);
+} sp_bridge_callbacks;
+
+
+/**
+ * \brief Configuration
+ * \see sp_bridge_create
+ */
+typedef struct sp_bridge_config {
+  /**
+   * \brief The version of the API contained in this header file. Must be
+   *        set to BRIDGE_API_VERSION.
+   */
+  int api_version;
+
+  /**
+   * \brief The Spotify Application Key for the application/device.
+   *
+   * See the Spotify Developer web site for information about Application Keys.
+   */
+  const uint8_t *application_key;
+
+  /**
+   * \brief Size of the buffer pointed to by \a app_key
+   */
+  size_t application_key_size;
+
+  /**
+   * \brief Size of the \a memory_block buffer in bytes
+   */
+  uint32_t memory_block_size;
+
+  /**
+   * \brief A NULL-terminated character string that uniquely identifies the
+   *        device (such as a MAC address)
+   *
+   * The string will be truncated to SP_MAX_UNIQUE_ID_LENGTH characters,
+   * not counting the terminating NULL.
+   *
+   * The library may use this to distinguish this device from other Spotify
+   * Connect-enabled devices that the users has. On any given device, the
+   * ID should not change between calls to sp_bridge_create().
+   *
+   * \warning If the unique ID collides with other devices that the user has,
+   * the device might not be usable with Spotify Connect. Therefore, it is
+   * important to minimize the chance of such collisions while still making
+   * sure that the unique ID does not change between sessions. (A MAC address
+   * or the device's serial number should work well. The device's model name
+   * or its IP address will not work.)
+   *
+   * sp_bridge_create() returns SP_BRIDGE_ERROR_API_INITIALIZATION_FAILED if
+   * this is not specified.
+   */
+  const char *unique_id;
+
+  /**
+   * \brief A UTF-8-encoded display name for the application/device
+   *
+   * When using Spotify Connect, this is the name that the Spotify app
+   * will use in the UI to refer to this instance of the application/this device.
+   *
+   * The string will be truncated to SP_MAX_DISPLAY_NAME_LENGTH bytes
+   * (not UTF-8-encoded characters), not counting the terminating NULL.
+   *
+   * The display name can be changed later with SpSetDisplayName().
+   *
+   * sp_bridge_create() returns SP_BRIDGE_ERROR_API_INITIALIZATION_FAILED if
+   * this is not specified.
+   */
+  const char *display_name;
+
+  /**
+   * \brief A NULL-terminated string containing the brand name of the hardware
+   *        device (for hardware integrations)
+   *
+   * This should be an ASCII string containing only letters, digits,
+   * "_" (underscore), "-" (hyphen), and "." (period).
+   *
+   * sp_bridge_create() returns SP_BRIDGE_ERROR_API_INITIALIZATION_FAILED if
+   * this is not specified.
+   */
+  const char *brand_name;
+
+  /**
+   * \brief A NULL-terminated string containing the model name of the hardware
+   *        device (for hardware integrations)
+   *
+   * This should be an ASCII string containing only letters, digits,
+   * "_" (underscore), "-" (hyphen), and "." (period).
+   *
+   * sp_bridge_create() returns SP_BRIDGE_ERROR_API_INITIALIZATION_FAILED if
+   * this is not specified.
+   */
+  const char *model_name;
+
+  /**
+   * \brief The device type that best describes this product
+   *
+   * This device type will be reported to client applications and might
+   * result in a suitable icon being shown, etc.
+   */
+  int device_type;
+
+  /**
+   * \brief Callbacks that will be invoked when events in the library occur.
+   */
+  const sp_bridge_callbacks *callbacks;
+
+  /**
+   * \brief Context pointer that will passed as input to any
+   * callback.
+   */
+  void *userdata;
+
+  /**
+   * \brief volume level in the range [0..65535]
+   */
+  uint16_t volume;
+
+  /**
+   * \brief reserved for future use.
+   * must be 0.
+   */
+  int reserved;
+
+  /**
+   * \brief The number of volume steps the device can support.
+   *   - 0 will set an internal default value.
+   *   - The max value that is possible to set is 65535.
+   *   - -1 means the volume cannot be controlled remotely through
+   *     the Spotify Connect feature.
+   */
+  int volume_steps;
+
+  /**
+   * \brief A NULL-terminated string containing the client id of the application
+   *
+   * The Client ID identifies the application using Spotify, Register your
+   * application <a href="https://developer.spotify.com/my-applications/#!/">here</a>.
+   *
+   * This can be an ASCII string containing only hexadecimal characters, or NULL
+   *
+   * sp_bridge_create() returns SP_BRIDGE_ERROR_INVALID_ARGUMENT if this is invalid or longer than
+   * 32 characters.
+   */
+  const char *client_id;
+
+  /**
+   * \brief A NULL-terminated string containing the OAuth scope requested when
+   *        authenticating with the Spotify backend.
+   *
+   * This can be a comma-separated string of Spotify scopes, or NULL (which
+   * would mean the default SP_BRIDGE_SCOPE_DEFAULT)
+   *
+   */
+  const char *scope;
+
+  /**
+   * \brief dynamcially disable zeroconf discovery (-1 = disable)
+   */
+  int zeroconf_enabled;
+} sp_bridge_config;
+
+/**
+ * \brief Initialize the bridge.
+ *
+ * \param[in]  config    The configuration to use for bridge
+ * \param[in]  appconfig The configuration passed down by the upper layer.
+ *                       The upper layer can override one or more fields of
+ *                       the sp_bridge_config structure.
+ *
+ * \return               An SP_BRIDGE_ERROR code
+ *
+ */
+SP_LIBEXPORT(sp_bridge_error) sp_bridge_create(sp_bridge_config *config, const char *appconfig);
+
+/**
+ * \brief Execute a command.
+ *
+ * \param[in]   input     A JSON structure describe the command that should be executed.
+ * \param[out]  output    The output of the command. The allocated buffer is valid until the next
+ *                        call to the bridge. The bridge is responsible for freeing the memory.
+ *
+ * \return                An SP_BRIDGE_ERROR code
+ *
+ */
+SP_LIBEXPORT(sp_bridge_error) sp_bridge_execute(const char *input, const char **output);
+
+/**
+ * \brief Release the bridge.
+ *
+ * \return                An SP_BRIDGE_ERROR code
+ */
+SP_LIBEXPORT(sp_bridge_error) sp_bridge_release(void);
+
+/**
+ * \brief Update the Spotify Connect volume level.
+ *
+ * \param[in]   volume    The current volume level in the range [0..65535]
+ *
+ * \return                An SP_BRIDGE_ERROR code
+ */
+SP_LIBEXPORT(sp_bridge_error) sp_bridge_apply_volume(uint16_t volume);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lwnode/pkgs/modules/audio-player-node/src/bridge/bridge_async.h b/lwnode/pkgs/modules/audio-player-node/src/bridge/bridge_async.h
new file mode 100644 (file)
index 0000000..0bc6371
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2015 Spotify AB
+ *
+ */
+
+/**
+ * \file   bridge_async.h    Add async execute function.
+ *
+ * \note   All input strings are expected to be in JSON format
+ * \note   All output strings are in JSON format
+ *
+ */
+
+#ifndef BRIDGE_ASYNC_H
+#define BRIDGE_ASYNC_H
+
+#include "bridge.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * \brief Execute a command.
+ *
+ * \param[in]   input     A JSON structure describe the command that should be executed.
+ *
+ * \return                An SP_BRIDGE_ERROR code
+ *
+ */
+SP_LIBEXPORT(sp_bridge_error) sp_bridge_execute_async(const char *input);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif
diff --git a/lwnode/pkgs/modules/audio-player-node/src/bridge/service.cc b/lwnode/pkgs/modules/audio-player-node/src/bridge/service.cc
new file mode 100644 (file)
index 0000000..ebc77f5
--- /dev/null
@@ -0,0 +1,122 @@
+#include <iostream>
+#include <string>
+#include <thread>
+#include <chrono>
+#include <assert.h>
+#include <cstring>
+
+#include "bridge.h"
+#include "service.h"
+
+#include "audio_player_sample.h"
+
+void wrapper_on_event(const char* evt, const char* ns, void* userdata) {
+  std::cout << "TvBrdige OnEvent ns:" << (ns ? ns : "(null)")
+            << " event: " << evt << std::endl;
+}
+
+void wrapper_on_playback_event(sp_bridge_playback_event evt,
+                               sp_bridge_pb_param* param, void* userdata) {
+  std::cout << "TvBrdige OnPlaybackEvent: " << static_cast<int>(evt)
+            << std::endl;
+}
+
+size_t wrapper_music_delivery(const int16_t* samples, size_t sample_count,
+                              const struct sp_bridge_audioformat* sample_format,
+                              uint32_t* samples_buffered, void* userdata) {
+  std::cout << "TvBridge OnMusicDelivery samples:" << sample_count << std::endl;
+
+  int ret, written_sample_count = 0;
+
+  if (sample_count > 0) {
+    if ((ret = audio_player_write(samples, sample_count,
+                                  &written_sample_count)) < 0) {
+      return 0;
+    }
+  }
+
+  if (samples_buffered) {
+    *samples_buffered = 0;
+  }
+
+  return written_sample_count;
+}
+
+void wrapper_on_log_print(const char* message, void* userdata) {
+  std::cout << message << std::flush;
+}
+
+void assignCallbacks(sp_bridge_callbacks& cb) {
+  memset(&cb, 0, sizeof(cb));
+  cb.on_event = wrapper_on_event;
+  cb.on_playback_event = wrapper_on_playback_event;
+  cb.music_delivery = wrapper_music_delivery;
+  cb.log_print = wrapper_on_log_print;
+}
+
+int service_start(const char* in_username, const char* in_password) {
+  // Start audio player
+  audio_player_start();
+
+  // config
+  sp_bridge_config m_cfg;
+  sp_bridge_callbacks m_callbacks;
+  const char* output;
+
+  memset(&m_cfg, 0, sizeof(m_cfg));
+  m_cfg.unique_id = "sample-unique-id";
+  m_cfg.brand_name = "sample-brand-name";
+  m_cfg.model_name = "sample-model-name";
+  m_cfg.display_name = "sample-display-name";
+  m_cfg.api_version = BRIDGE_API_VERSION;
+  m_cfg.device_type = 5;
+  m_cfg.userdata = NULL;
+  m_cfg.volume = 65535;
+  m_cfg.client_id = "a533a2c29aec473f992ba9c28ed3fea0";  // Mock TV Platform
+  m_cfg.zeroconf_enabled = 1;
+
+  assignCallbacks(m_callbacks);
+  m_cfg.callbacks = &m_callbacks;
+
+  // create bridge
+  auto result = sp_bridge_create(&m_cfg, NULL);
+  assert(result == SP_BRIDGE_ERROR_OK);
+
+  // get bridge version
+  std::string version_cmd = "{\"func\":21, \"args\":[], \"msgId\":0}";
+  result = sp_bridge_execute(version_cmd.c_str(), &output);
+  assert(result == SP_BRIDGE_ERROR_OK);
+  std::cout << "sp_bridge_execute output: " << output << std::endl;
+  std::cout << "sp_bridge_execute output: " << output << std::endl;
+  std::cout << "sp_bridge_execute output: " << output << std::endl;
+
+  // login to bridge
+  std::string username = in_username;
+  std::string password = in_password;
+  std::string login_cmd = "{\"func\":0, \"args\":[\"" + username + "\", \"" +
+                          password + "\"], \"msgId\":0}";
+
+  result = sp_bridge_execute(login_cmd.c_str(), &output);
+  assert(result == SP_BRIDGE_ERROR_OK);
+  std::cout << "sp_bridge_execute output: " << output << std::endl;
+  std::cout << "sp_bridge_execute output: " << output << std::endl;
+  std::cout << "sp_bridge_execute output: " << output << std::endl;
+
+  // let bridge run for some time
+  // std::this_thread::sleep_for(std::chrono::seconds(300));
+
+  // release TvBridge
+  // result = sp_bridge_release();
+  // assert(result == SP_BRIDGE_ERROR_OK);
+
+  return 0;
+}
+
+int service_stop() {
+  // release TvBridge
+  auto result = sp_bridge_release();
+  assert(result == SP_BRIDGE_ERROR_OK);
+
+  audio_player_close();
+  return 0;
+}
diff --git a/lwnode/pkgs/modules/audio-player-node/src/bridge/service.h b/lwnode/pkgs/modules/audio-player-node/src/bridge/service.h
new file mode 100644 (file)
index 0000000..a7dd96f
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef SERVICE_H
+#define SERVICE_H
+
+#ifdef __cplusplus
+#define SERVICE_EXTERN_C extern "C"
+#else /* !__cplusplus */
+#define SERVICE_EXTERN_C extern
+#endif /* !__cplusplus */
+
+SERVICE_EXTERN_C int service_start(const char* in_username, const char* in_password);
+SERVICE_EXTERN_C int service_stop();
+
+#endif /* SERVICE_H */
diff --git a/lwnode/pkgs/modules/audio-player-node/src/tizen_audio_io.cc b/lwnode/pkgs/modules/audio-player-node/src/tizen_audio_io.cc
new file mode 100644 (file)
index 0000000..9b4feda
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include <audio_io.h>
+
+#include "audio_player.h"
+
+static const char* state_str[] = {"IDLE", "RUNNING", "PAUSED"};
+
+class TizenAudioIO : public AudioPlayer {
+ public:
+  TizenAudioIO(){};
+  virtual ~TizenAudioIO(){};
+
+  int Start() override;
+  int Write(const int16_t* samples, size_t samples_count) override;
+  int Close() override;
+
+ private:
+  audio_out_h m_audioOut{nullptr};
+  int m_buffer_size{0};
+};
+
+static void audio_out_state_cb(audio_out_h handle, audio_io_state_e previous,
+                               audio_io_state_e current, bool by_policy,
+                               void* user_data) {
+  AUDIOPLAYER_DLOG_INFO(
+      ">>> _audio_out_state_cb() : handle(%p), (%d,%s) => (%d,%s), "
+      "by_policy(%d), user_data(%p)\n",
+      handle, previous, state_str[previous], current, state_str[current],
+      by_policy, user_data);
+}
+
+int TizenAudioIO::Start() {
+  // 44.1Khz , 2 channel, 16bit PCM data
+  audio_out_create_new(44100, AUDIO_CHANNEL_STEREO, AUDIO_SAMPLE_TYPE_S16_LE,
+                       &m_audioOut);
+  AUDIOPLAYER_ASSERT(m_audioOut);
+  audio_out_set_state_changed_cb(m_audioOut, audio_out_state_cb, NULL);
+  audio_out_prepare(m_audioOut);
+  audio_out_get_buffer_size(m_audioOut, &m_buffer_size);
+  return 0;
+}
+
+int TizenAudioIO::Write(const int16_t* samples, size_t samples_count) {
+  AUDIOPLAYER_ASSERT(m_audioOut);
+  AUDIOPLAYER_ASSERT(m_buffer_size >= 0);
+
+  int ret = 0;
+
+  const size_t buffer_bytes_size = samples_count * 2;
+  auto adjusted_buffer_size = buffer_bytes_size;
+
+  if ((size_t)m_buffer_size < buffer_bytes_size) {
+    adjusted_buffer_size = m_buffer_size;
+  } else {
+    adjusted_buffer_size = buffer_bytes_size;
+  }
+
+  if ((ret = audio_out_write(m_audioOut, (void*)samples,
+                             adjusted_buffer_size)) < 0) {
+    AUDIOPLAYER_DLOG_ERROR("Error!\n");
+    return -1;
+  }
+  return ret / 2;
+}
+
+int TizenAudioIO::Close() {
+  if (m_audioOut) {
+    audio_out_unprepare(m_audioOut);
+    audio_out_destroy(m_audioOut);
+    m_audioOut = nullptr;
+  }
+  return 0;
+}
+
+AudioPlayer* AudioPlayer::CreateTizenAudioIO() { return new TizenAudioIO(); }
diff --git a/lwnode/pkgs/modules/audio-player-node/src/tizen_audio_player.cc b/lwnode/pkgs/modules/audio-player-node/src/tizen_audio_player.cc
new file mode 100644 (file)
index 0000000..617c0c5
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2020-present Samsung Electronics Co., Ltd
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+ *  USA
+ */
+
+#include <media/player.h>
+
+#include "audio_player.h"
+
+static inline bool CheckPlayerAPIError(int err, std::string msg) {
+  if (err == PLAYER_ERROR_NONE) {
+    return true;
+  } else if (err == PLAYER_ERROR_INVALID_PARAMETER) {
+    AUDIOPLAYER_DLOG_ERROR("Invalid params: %s\n", msg.data());
+  } else if (err == PLAYER_ERROR_INVALID_STATE) {
+    AUDIOPLAYER_DLOG_ERROR("Invalid state: %s\n", msg.data());
+  } else if (err == PLAYER_ERROR_NOT_SUPPORTED_FILE) {
+    AUDIOPLAYER_DLOG_ERROR("Not supported file: %s\n", msg.data());
+  } else if (err == PLAYER_ERROR_BUFFER_SPACE) {
+    AUDIOPLAYER_DLOG_ERROR("Buffer space: %s\n", msg.data());
+  } else if (err == PLAYER_ERROR_OUT_OF_MEMORY) {
+    AUDIOPLAYER_DLOG_ERROR("Out of memory: %s\n", msg.data());
+  } else if (err == PLAYER_ERROR_INVALID_OPERATION) {
+    AUDIOPLAYER_DLOG_ERROR("Invalid operation: %s\n", msg.data());
+  } else if (err == PLAYER_ERROR_RESOURCE_LIMIT) {
+    AUDIOPLAYER_DLOG_ERROR("Resource limited: %s\n", msg.data());
+  } else {
+    AUDIOPLAYER_DLOG_ERROR("Unknown error: %s\n", msg.data());
+  }
+  return false;
+}
+
+static inline bool CheckFormatAPIError(int err, std::string msg) {
+  if (err == MEDIA_FORMAT_ERROR_NONE) {
+    return true;
+  } else if (err == MEDIA_FORMAT_ERROR_NONE) {
+    AUDIOPLAYER_DLOG_ERROR("Invalid params: %s\n", msg.data());
+  } else if (err == MEDIA_FORMAT_ERROR_NONE) {
+    AUDIOPLAYER_DLOG_ERROR("Invalid operation: %s\n", msg.data());
+  } else {
+    AUDIOPLAYER_DLOG_ERROR("Unknown error: %s\n", msg.data());
+  }
+  return false;
+}
+
+static inline bool CheckPacketAPIError(int err, std::string msg) {
+  if (err == MEDIA_PACKET_ERROR_NONE) {
+    return true;
+  } else if (err == MEDIA_PACKET_ERROR_INVALID_PARAMETER) {
+    AUDIOPLAYER_DLOG_ERROR("Invalid Params: %s\n", msg.data());
+  } else if (err == MEDIA_PACKET_ERROR_OUT_OF_MEMORY) {
+    AUDIOPLAYER_DLOG_ERROR("Out of memory: %s\n", msg.data());
+  } else if (err == MEDIA_PACKET_ERROR_INVALID_OPERATION) {
+    AUDIOPLAYER_DLOG_ERROR("Invalid operation: %s\n", msg.data());
+  } else {
+    AUDIOPLAYER_DLOG_ERROR("Unknown error: %s\n", msg.data());
+  }
+
+  return false;
+}
+
+static const size_t s_mediaPlayerAudioBufferSize = 2048;
+
+class TizenAudioPlayer : public AudioPlayer {
+ public:
+  TizenAudioPlayer();
+  virtual ~TizenAudioPlayer();
+
+  int Prepare();
+  int Play();
+
+  int Start() override;
+  int Write(const int16_t* samples, size_t samples_count) override;
+  int Close() override;
+
+ private:
+  player_h m_player{nullptr};
+  media_format_h m_format{nullptr};
+};
+
+TizenAudioPlayer::TizenAudioPlayer() : AudioPlayer() {
+  CheckPlayerAPIError(player_create(&m_player), "Cannot create player!");
+
+  CheckPlayerAPIError(
+      player_set_media_stream_buffer_max_size(
+          m_player, PLAYER_STREAM_TYPE_AUDIO, s_mediaPlayerAudioBufferSize),
+      "Cannot set buffer size");
+
+  CheckFormatAPIError(media_format_create(&m_format),
+                      "Cannot create media format!");
+  CheckFormatAPIError(
+      media_format_set_audio_mime(m_format, MEDIA_FORMAT_PCM_S16LE),
+      "Cannot set mime\n");
+  CheckFormatAPIError(media_format_set_audio_channel(m_format, 2),
+                      "Cannot set audio channel");
+  CheckFormatAPIError(media_format_set_audio_samplerate(m_format, 44100),
+                      "Cannot set audio samplerate");
+  CheckPlayerAPIError(player_set_media_stream_info(
+                          m_player, PLAYER_STREAM_TYPE_AUDIO, m_format),
+                      "Cannot set media stream info");
+}
+
+TizenAudioPlayer::~TizenAudioPlayer() {}
+
+int TizenAudioPlayer::Prepare() {
+  if (!CheckPlayerAPIError(player_prepare_async(
+                               m_player,
+                               [](void* user_data) {
+                                 AUDIOPLAYER_DLOG_INFO("Done prepare\n");
+                                 TizenAudioPlayer* self =
+                                     static_cast<TizenAudioPlayer*>(user_data);
+                                 self->Play();
+                               },
+                               this),
+                           "Cannot prepare")) {
+    return -1;
+  }
+  return 0;
+}
+
+int TizenAudioPlayer::Play() {
+  player_state_e state;
+  if (!CheckPlayerAPIError(player_get_state(m_player, &state),
+                           "Cannot get state")) {
+    return -1;
+  }
+  if (state == PLAYER_STATE_PLAYING) {
+    AUDIOPLAYER_DLOG_INFO("Already play\n");
+    return -1;
+  }
+
+  if (!CheckPlayerAPIError(player_start(m_player), "Cannot play")) {
+    return -1;
+  }
+  AUDIOPLAYER_DLOG_INFO("Success play\n");
+  return 0;
+}
+
+int TizenAudioPlayer::Start() { return Prepare(); }
+
+int TizenAudioPlayer::Write(const int16_t* samples, size_t samples_count) {
+  player_state_e state;
+  player_get_state(m_player, &state);
+  if (state == PLAYER_STATE_NONE || state == PLAYER_STATE_IDLE) {
+    AUDIOPLAYER_DLOG_INFO("Not ready player\n");
+    return 0;
+  }
+  media_packet_h mediaPacket = nullptr;
+
+  if (!CheckPacketAPIError(
+          media_packet_create_from_external_memory(
+              m_format, (void*)samples, (uint64_t)(samples_count * 2), nullptr,
+              nullptr, &mediaPacket),
+          "Cannot create media packet")) {
+    return 0;
+  }
+
+  if (!CheckPlayerAPIError(player_push_media_stream(m_player, mediaPacket),
+                           "Cannot push media stream")) {
+    return 0;
+  }
+
+  media_packet_destroy(mediaPacket);
+  return (int)samples_count;
+}
+
+int TizenAudioPlayer::Close() {
+  if (m_player) {
+    player_state_e state;
+    player_get_state(m_player, &state);
+    if (state == PLAYER_STATE_PLAYING) {
+      player_stop(m_player);
+    }
+
+    CheckPlayerAPIError(player_unprepare(m_player), "playerUnprepare");
+    CheckPlayerAPIError(player_destroy(m_player), "playerDestroy");
+    CheckFormatAPIError(media_format_unref(m_format), "mediaFormatUnref");
+
+    m_player = nullptr;
+  }
+  return 0;
+}
+
+AudioPlayer* AudioPlayer::CreateTizenAudioPlayer() {
+  return new TizenAudioPlayer();
+}
diff --git a/lwnode/pkgs/template/rpm/CMakeLists.txt b/lwnode/pkgs/template/rpm/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2de189c
--- /dev/null
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 2.8)
+set (CMAKE_CXX_STANDARD 11)
+project (helloworld)
+
+add_definitions(-DBUILDING_NODE_EXTENSION)
+
+include_directories(include src)
+
+file (GLOB_RECURSE SOURCE_FILES src/*.cc)
+
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
diff --git a/lwnode/pkgs/template/rpm/README.md b/lwnode/pkgs/template/rpm/README.md
new file mode 100644 (file)
index 0000000..9890c24
--- /dev/null
@@ -0,0 +1,34 @@
+## How to package lightweight node.js project
+
+### Amend project name
+You need to change the project name in the file below.
++ `Name` in `packaging/helloworld.spec`
++ app path in `packaging/helloworld.service` 
+  (ExecStart=/usr/bin/lwnode /usr/apps/`{project-name}`/script)
++ `project` in `CMakeLists.txt`
+
+### Work JavaScript
+You can work on your JavaScript code in `lib` folder.
+
+### Copy lightweight node binary
+You should copy node binary file to bin folder.
+```bash
+cd <project_path>
+cp <node_file_path> ./bin
+```
+
+### Package rpm
+To package rpm, you should build gbs.
+For example, 
+``` bash
+gbs -c ~/gbs.conf build -A armv7l -B ~/GBS-ROOT/helloworld --incremental --include-all
+```
+
+### Include native module (napi)
+If you want to include native-module, work on the native code in `src` folder.
+You can also implement build script in `CMakeLists.txt`.
+To package rpm with natvie module, add config `--define='native_module true'` when you build gbs.
+On linux, you can use command `npm run build` to build native module.
+
+### Show log
+To view node console log, use `dlogutil NODE_CONSOLE` command.
diff --git a/lwnode/pkgs/template/rpm/include/node_api.h b/lwnode/pkgs/template/rpm/include/node_api.h
new file mode 100644 (file)
index 0000000..c27cf93
--- /dev/null
@@ -0,0 +1,489 @@
+/******************************************************************************
+ * Experimental prototype for demonstrating VM agnostic and ABI stable API
+ * for native modules to use instead of using Nan and V8 APIs directly.
+ *
+ * The current status is "Experimental" and should not be used for
+ * production applications.  The API is still subject to change
+ * and as an experimental feature is NOT subject to semver.
+ *
+ ******************************************************************************/
+#ifndef SRC_NODE_API_H_
+#define SRC_NODE_API_H_
+
+#include <stddef.h>
+#include <stdbool.h>
+#include "node_api_types.h"
+
+#define NAPI_VERSION  1
+
+#ifdef _WIN32
+  #ifdef BUILDING_NODE_EXTENSION
+    #ifdef EXTERNAL_NAPI
+      // Building external N-API, or native module against external N-API
+      #define NAPI_EXTERN /* nothing */
+    #else
+      // Building native module against node with built-in N-API
+      #define NAPI_EXTERN __declspec(dllimport)
+    #endif
+  #else
+    // Building node with built-in N-API
+    #define NAPI_EXTERN __declspec(dllexport)
+  #endif
+#else
+  #define NAPI_EXTERN /* nothing */
+#endif
+
+#ifdef _WIN32
+# define NAPI_MODULE_EXPORT __declspec(dllexport)
+#else
+# define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
+#endif
+
+
+typedef void (*napi_addon_register_func)(napi_env env,
+                                         napi_value exports,
+                                         napi_value module,
+                                         void* priv);
+
+typedef struct {
+  int nm_version;
+  unsigned int nm_flags;
+  const char* nm_filename;
+  napi_addon_register_func nm_register_func;
+  const char* nm_modname;
+  void* nm_priv;
+  void* reserved[4];
+} napi_module;
+
+#define NAPI_MODULE_VERSION  1
+
+#if defined(_MSC_VER)
+#pragma section(".CRT$XCU", read)
+#define NAPI_C_CTOR(fn)                                                     \
+  static void __cdecl fn(void);                                             \
+  __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
+      fn;                                                                   \
+  static void __cdecl fn(void)
+#else
+#define NAPI_C_CTOR(fn)                              \
+  static void fn(void) __attribute__((constructor)); \
+  static void fn(void)
+#endif
+
+#ifdef __cplusplus
+#define EXTERN_C_START extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_START
+#define EXTERN_C_END
+#endif
+
+#define NAPI_MODULE_X(modname, regfunc, priv, flags)                  \
+  EXTERN_C_START                                                      \
+    static napi_module _module =                                      \
+    {                                                                 \
+      NAPI_MODULE_VERSION,                                            \
+      flags,                                                          \
+      __FILE__,                                                       \
+      regfunc,                                                        \
+      #modname,                                                       \
+      priv,                                                           \
+      {0},                                                            \
+    };                                                                \
+    NAPI_C_CTOR(_register_ ## modname) {                              \
+      napi_module_register(&_module);                                 \
+    }                                                                 \
+  EXTERN_C_END
+
+#define NAPI_MODULE(modname, regfunc) \
+  NAPI_MODULE_X(modname, regfunc, NULL, 0)
+
+EXTERN_C_START
+
+NAPI_EXTERN void napi_module_register(napi_module* mod);
+
+NAPI_EXTERN napi_status
+napi_get_last_error_info(napi_env env,
+                         const napi_extended_error_info** result);
+
+// Getters for defined singletons
+NAPI_EXTERN napi_status napi_get_undefined(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_null(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_global(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_boolean(napi_env env,
+                                         bool value,
+                                         napi_value* result);
+
+// Methods to create Primitive types/Objects
+NAPI_EXTERN napi_status napi_create_object(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array_with_length(napi_env env,
+                                                      size_t length,
+                                                      napi_value* result);
+NAPI_EXTERN napi_status napi_create_number(napi_env env,
+                                           double value,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_latin1(napi_env env,
+                                                  const char* str,
+                                                  size_t length,
+                                                  napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf8(napi_env env,
+                                                const char* str,
+                                                size_t length,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf16(napi_env env,
+                                                 const char16_t* str,
+                                                 size_t length,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_create_symbol(napi_env env,
+                                           napi_value description,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_function(napi_env env,
+                                             const char* utf8name,
+                                             napi_callback cb,
+                                             void* data,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_create_error(napi_env env,
+                                          napi_value msg,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_type_error(napi_env env,
+                                               napi_value msg,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
+                                                napi_value msg,
+                                                napi_value* result);
+
+// Methods to get the the native napi_value from Primitive type
+NAPI_EXTERN napi_status napi_typeof(napi_env env,
+                                    napi_value value,
+                                    napi_valuetype* result);
+NAPI_EXTERN napi_status napi_get_value_double(napi_env env,
+                                              napi_value value,
+                                              double* result);
+NAPI_EXTERN napi_status napi_get_value_int32(napi_env env,
+                                             napi_value value,
+                                             int32_t* result);
+NAPI_EXTERN napi_status napi_get_value_uint32(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+NAPI_EXTERN napi_status napi_get_value_int64(napi_env env,
+                                             napi_value value,
+                                             int64_t* result);
+NAPI_EXTERN napi_status napi_get_value_bool(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+
+// Copies LATIN-1 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
+                                                     napi_value value,
+                                                     char* buf,
+                                                     size_t bufsize,
+                                                     size_t* result);
+
+// Copies UTF-8 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf8(napi_env env,
+                                                   napi_value value,
+                                                   char* buf,
+                                                   size_t bufsize,
+                                                   size_t* result);
+
+// Copies UTF-16 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf16(napi_env env,
+                                                    napi_value value,
+                                                    char16_t* buf,
+                                                    size_t bufsize,
+                                                    size_t* result);
+
+// Methods to coerce values
+// These APIs may execute user scripts
+NAPI_EXTERN napi_status napi_coerce_to_bool(napi_env env,
+                                            napi_value value,
+                                            napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_number(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_object(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_string(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+
+// Methods to work with Objects
+NAPI_EXTERN napi_status napi_get_prototype(napi_env env,
+                                           napi_value object,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_get_property_names(napi_env env,
+                                                napi_value object,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_set_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value value);
+NAPI_EXTERN napi_status napi_has_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         bool* result);
+NAPI_EXTERN napi_status napi_get_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value* result);
+NAPI_EXTERN napi_status
+napi_define_properties(napi_env env,
+                       napi_value object,
+                       size_t property_count,
+                       const napi_property_descriptor* properties);
+
+// Methods to work with Arrays
+NAPI_EXTERN napi_status napi_is_array(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+NAPI_EXTERN napi_status napi_get_array_length(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+
+// Methods to compare values
+NAPI_EXTERN napi_status napi_strict_equals(napi_env env,
+                                           napi_value lhs,
+                                           napi_value rhs,
+                                           bool* result);
+
+// Methods to work with Functions
+NAPI_EXTERN napi_status napi_call_function(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_new_instance(napi_env env,
+                                          napi_value constructor,
+                                          size_t argc,
+                                          const napi_value* argv,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_instanceof(napi_env env,
+                                        napi_value object,
+                                        napi_value constructor,
+                                        bool* result);
+
+// Napi version of node::MakeCallback(...)
+NAPI_EXTERN napi_status napi_make_callback(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+
+// Methods to work with napi_callbacks
+
+// Gets all callback info in a single call. (Ugly, but faster.)
+NAPI_EXTERN napi_status napi_get_cb_info(
+    napi_env env,               // [in] NAPI environment handle
+    napi_callback_info cbinfo,  // [in] Opaque callback-info handle
+    size_t* argc,      // [in-out] Specifies the size of the provided argv array
+                       // and receives the actual count of args.
+    napi_value* argv,  // [out] Array of values
+    napi_value* this_arg,  // [out] Receives the JS 'this' arg for the call
+    void** data);          // [out] Receives the data pointer for the callback.
+
+NAPI_EXTERN napi_status napi_is_construct_call(napi_env env,
+                                               napi_callback_info cbinfo,
+                                               bool* result);
+NAPI_EXTERN napi_status
+napi_define_class(napi_env env,
+                  const char* utf8name,
+                  napi_callback constructor,
+                  void* data,
+                  size_t property_count,
+                  const napi_property_descriptor* properties,
+                  napi_value* result);
+
+// Methods to work with external data objects
+NAPI_EXTERN napi_status napi_wrap(napi_env env,
+                                  napi_value js_object,
+                                  void* native_object,
+                                  napi_finalize finalize_cb,
+                                  void* finalize_hint,
+                                  napi_ref* result);
+NAPI_EXTERN napi_status napi_unwrap(napi_env env,
+                                    napi_value js_object,
+                                    void** result);
+NAPI_EXTERN napi_status napi_create_external(napi_env env,
+                                             void* data,
+                                             napi_finalize finalize_cb,
+                                             void* finalize_hint,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_get_value_external(napi_env env,
+                                                napi_value value,
+                                                void** result);
+
+// Methods to control object lifespan
+
+// Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
+NAPI_EXTERN napi_status napi_create_reference(napi_env env,
+                                              napi_value value,
+                                              uint32_t initial_refcount,
+                                              napi_ref* result);
+
+// Deletes a reference. The referenced value is released, and may
+// be GC'd unless there are other references to it.
+NAPI_EXTERN napi_status napi_delete_reference(napi_env env, napi_ref ref);
+
+// Increments the reference count, optionally returning the resulting count.
+// After this call the  reference will be a strong reference because its
+// refcount is >0, and the referenced object is effectively "pinned".
+// Calling this when the refcount is 0 and the object is unavailable
+// results in an error.
+NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
+                                           napi_ref ref,
+                                           uint32_t* result);
+
+// Decrements the reference count, optionally returning the resulting count.
+// If the result is 0 the reference is now weak and the object may be GC'd
+// at any time if there are no other references. Calling this when the
+// refcount is already 0 results in an error.
+NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
+                                             napi_ref ref,
+                                             uint32_t* result);
+
+// Attempts to get a referenced value. If the reference is weak,
+// the value might no longer be available, in that case the call
+// is still successful but the result is NULL.
+NAPI_EXTERN napi_status napi_get_reference_value(napi_env env,
+                                                 napi_ref ref,
+                                                 napi_value* result);
+
+NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env,
+                                               napi_handle_scope* result);
+NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
+                                                napi_handle_scope scope);
+NAPI_EXTERN napi_status
+napi_open_escapable_handle_scope(napi_env env,
+                                 napi_escapable_handle_scope* result);
+NAPI_EXTERN napi_status
+napi_close_escapable_handle_scope(napi_env env,
+                                  napi_escapable_handle_scope scope);
+
+NAPI_EXTERN napi_status napi_escape_handle(napi_env env,
+                                           napi_escapable_handle_scope scope,
+                                           napi_value escapee,
+                                           napi_value* result);
+
+// Methods to support error handling
+NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error);
+NAPI_EXTERN napi_status napi_throw_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_is_error(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+
+// Methods to support catching exceptions
+NAPI_EXTERN napi_status napi_is_exception_pending(napi_env env, bool* result);
+NAPI_EXTERN napi_status napi_get_and_clear_last_exception(napi_env env,
+                                                          napi_value* result);
+
+// Methods to provide node::Buffer functionality with napi types
+NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
+                                           size_t length,
+                                           void** data,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
+                                                    size_t length,
+                                                    void* data,
+                                                    napi_finalize finalize_cb,
+                                                    void* finalize_hint,
+                                                    napi_value* result);
+NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
+                                                size_t length,
+                                                const void* data,
+                                                void** result_data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
+                                       napi_value value,
+                                       bool* result);
+NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
+                                             napi_value value,
+                                             void** data,
+                                             size_t* length);
+
+// Methods to work with array buffers and typed arrays
+NAPI_EXTERN napi_status napi_is_arraybuffer(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+NAPI_EXTERN napi_status napi_create_arraybuffer(napi_env env,
+                                                size_t byte_length,
+                                                void** data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status
+napi_create_external_arraybuffer(napi_env env,
+                                 void* external_data,
+                                 size_t byte_length,
+                                 napi_finalize finalize_cb,
+                                 void* finalize_hint,
+                                 napi_value* result);
+NAPI_EXTERN napi_status napi_get_arraybuffer_info(napi_env env,
+                                                  napi_value arraybuffer,
+                                                  void** data,
+                                                  size_t* byte_length);
+NAPI_EXTERN napi_status napi_is_typedarray(napi_env env,
+                                           napi_value value,
+                                           bool* result);
+NAPI_EXTERN napi_status napi_create_typedarray(napi_env env,
+                                               napi_typedarray_type type,
+                                               size_t length,
+                                               napi_value arraybuffer,
+                                               size_t byte_offset,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_get_typedarray_info(napi_env env,
+                                                 napi_value typedarray,
+                                                 napi_typedarray_type* type,
+                                                 size_t* length,
+                                                 void** data,
+                                                 napi_value* arraybuffer,
+                                                 size_t* byte_offset);
+
+// Methods to manage simple async operations
+NAPI_EXTERN
+napi_status napi_create_async_work(napi_env env,
+                                   napi_async_execute_callback execute,
+                                   napi_async_complete_callback complete,
+                                   void* data,
+                                   napi_async_work* result);
+NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
+                                               napi_async_work work);
+NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
+                                              napi_async_work work);
+NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
+                                               napi_async_work work);
+
+
+// version management
+NAPI_EXTERN napi_status napi_get_version(napi_env env, uint32_t* result);
+
+EXTERN_C_END
+
+#endif  // SRC_NODE_API_H_
diff --git a/lwnode/pkgs/template/rpm/include/node_api_types.h b/lwnode/pkgs/template/rpm/include/node_api_types.h
new file mode 100644 (file)
index 0000000..43102c5
--- /dev/null
@@ -0,0 +1,105 @@
+#ifndef SRC_NODE_API_TYPES_H_
+#define SRC_NODE_API_TYPES_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
+    typedef uint16_t char16_t;
+#endif
+
+// JSVM API types are all opaque pointers for ABI stability
+// typedef undefined structs instead of void* for compile time type safety
+typedef struct napi_env__ *napi_env;
+typedef struct napi_value__ *napi_value;
+typedef struct napi_ref__ *napi_ref;
+typedef struct napi_handle_scope__ *napi_handle_scope;
+typedef struct napi_escapable_handle_scope__ *napi_escapable_handle_scope;
+typedef struct napi_callback_info__ *napi_callback_info;
+typedef struct napi_async_work__ *napi_async_work;
+
+typedef enum {
+  napi_default = 0,
+  napi_writable = 1 << 0,
+  napi_enumerable = 1 << 1,
+  napi_configurable = 1 << 2,
+
+  // Used with napi_define_class to distinguish static properties
+  // from instance properties. Ignored by napi_define_properties.
+  napi_static = 1 << 10,
+} napi_property_attributes;
+
+typedef enum {
+  // ES6 types (corresponds to typeof)
+  napi_undefined,
+  napi_null,
+  napi_boolean,
+  napi_number,
+  napi_string,
+  napi_symbol,
+  napi_object,
+  napi_function,
+  napi_external,
+} napi_valuetype;
+
+typedef enum {
+  napi_int8_array,
+  napi_uint8_array,
+  napi_uint8_clamped_array,
+  napi_int16_array,
+  napi_uint16_array,
+  napi_int32_array,
+  napi_uint32_array,
+  napi_float32_array,
+  napi_float64_array,
+} napi_typedarray_type;
+
+typedef enum {
+  napi_ok,
+  napi_invalid_arg,
+  napi_object_expected,
+  napi_string_expected,
+  napi_name_expected,
+  napi_function_expected,
+  napi_number_expected,
+  napi_boolean_expected,
+  napi_array_expected,
+  napi_generic_failure,
+  napi_pending_exception,
+  napi_cancelled,
+  napi_escape_called_twice
+} napi_status;
+
+typedef napi_value (*napi_callback)(napi_env env,
+                                    napi_callback_info info);
+typedef void (*napi_finalize)(napi_env env,
+                              void* finalize_data,
+                              void* finalize_hint);
+typedef void (*napi_async_execute_callback)(napi_env env,
+                                            void* data);
+typedef void (*napi_async_complete_callback)(napi_env env,
+                                             napi_status status,
+                                             void* data);
+
+typedef struct {
+  // One of utf8name or name should be NULL.
+  const char* utf8name;
+  napi_value name;
+
+  napi_callback method;
+  napi_callback getter;
+  napi_callback setter;
+  napi_value value;
+
+  napi_property_attributes attributes;
+  void* data;
+} napi_property_descriptor;
+
+typedef struct {
+  const char* error_message;
+  void* engine_reserved;
+  uint32_t engine_error_code;
+  napi_status error_code;
+} napi_extended_error_info;
+
+#endif  // SRC_NODE_API_TYPES_H_
diff --git a/lwnode/pkgs/template/rpm/include/node_escargot.h b/lwnode/pkgs/template/rpm/include/node_escargot.h
new file mode 100644 (file)
index 0000000..470727c
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+#ifndef NODE_ESCARGOT_H
+#define NODE_ESCARGOT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define MAX_PACKAGE_STR_SIZE 512
+
+namespace node {
+
+int nescargot_set_printf_tagname(const char* name);
+int nescargot_get_printf_tagname(char* buffer, unsigned num);
+
+int nescargot_printf(const char* format, ...);
+int nescargot_printf_warn(const char* format, ...);
+int nescargot_printf_err(const char* format, ...);
+}  // namespace node
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
diff --git a/lwnode/pkgs/template/rpm/lib/index.js b/lwnode/pkgs/template/rpm/lib/index.js
new file mode 100644 (file)
index 0000000..3267326
--- /dev/null
@@ -0,0 +1,4 @@
+// var addon = require('./build/helloworld'); // native module
+// console.log(addon.hello());
+
+console.log('hello world!');
diff --git a/lwnode/pkgs/template/rpm/packaging/helloworld.manifest b/lwnode/pkgs/template/rpm/packaging/helloworld.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/lwnode/pkgs/template/rpm/packaging/helloworld.service b/lwnode/pkgs/template/rpm/packaging/helloworld.service
new file mode 100644 (file)
index 0000000..948a3ba
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=lwnode service
+
+[Service]
+User=root
+Group=users
+ExecStart=/usr/bin/lwnode /usr/apps/helloworld/script
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/lwnode/pkgs/template/rpm/packaging/helloworld.spec b/lwnode/pkgs/template/rpm/packaging/helloworld.spec
new file mode 100644 (file)
index 0000000..17bac80
--- /dev/null
@@ -0,0 +1,110 @@
+#
+# Copyright 2020-present Samsung Electronics Co., Ltd.
+#
+# 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.
+#
+
+Name:          helloworld
+Summary:       -
+Version:       1.0.0
+Release:       1
+Group:         Application Framework/Service
+License:       MIT
+Source:        %{name}-%{version}.tar.gz
+Source1:       %{name}.service
+Source1001:    %{name}.manifest
+BuildRequires: cmake, make, ninja, rsync, zip
+BuildRequires: python, libgcc
+
+%description
+
+%{!?build_native: %define build_native false}
+%define _jsdir /usr/apps/%{name}
+%define _tmpdir /tmp
+%define _outdir ./out
+%define _prodir ./script
+%define _nodedir ./deps/lwnode
+
+%prep
+%setup -q
+
+%build
+mkdir -p %{_outdir} 
+mkdir -p %{_prodir}
+%if "%{build_native}" == "true"
+# Build native module
+echo -e "\033[0;33mBuild native module\033[0m"
+%define _module_outdir ./out/module
+mkdir -p %{_module_outdir}
+cmake . -B%{_module_outdir} -H. -G Ninja
+ninja -v -C %{_module_outdir}
+
+mkdir -p %{_prodir}/build
+cp %{_module_outdir}/*.node %{_prodir}/build
+rm -rf %{_module_outdir}
+%endif
+
+%install
+mkdir -p %{buildroot}%{_libdir}/systemd/system
+mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
+install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/%{name}.service
+ln -sf ../%{name}.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/%{name}.service 
+
+mkdir -p %{buildroot}%{_bindir}
+cp -f ./bin/node %{buildroot}%{_bindir}/lwnode
+
+rm -rf %{buildroot}%{_jsdir}
+mkdir -p %{buildroot}%{_jsdir}
+
+cp -rf ./lib/* %{_prodir}
+cp -rf ./node_modules %{_prodir} 2>/dev/null || :
+mkdir -p %{buildroot}/%{_tmpdir}
+zip -r %{buildroot}/%{_tmpdir}/script.zip %{_prodir}
+
+%clean
+rm ./*.list
+rm -rf %{_prodir}
+
+%post
+/sbin/ldconfig
+echo -e "\033[0;33mclean project folder\033[0m"
+rm -rf %{_jsdir}
+
+echo -e "\033[0;33munzip script\033[0m"
+unzip -q %{_tmpdir}/script.zip -d %{_jsdir}
+if [ $? != 0 ];then
+    echo -e "\033[0;31mfaile to unzip script\033[0m"
+fi
+rm %{_tmpdir}/script.zip 
+
+systemctl daemon-reload
+if [ $1 == 1 ]; then
+    echo -e "\033[0;33mservice start\033[0m"
+    systemctl start %{name}.service
+fi
+
+if [ $1 == 2 ]; then
+    echo -e "\033[0;33mservice restart\033[0m"
+    systemctl restart %{name}.service
+fi
+
+%postun
+/sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%manifest packaging/%{name}.manifest
+%{_bindir}/lwnode
+%{_tmpdir}/script.zip
+%{_libdir}/systemd/system/%{name}.service
+%{_libdir}/systemd/system/multi-user.target.wants/%{name}.service
diff --git a/lwnode/pkgs/template/rpm/src/main.cc b/lwnode/pkgs/template/rpm/src/main.cc
new file mode 100644 (file)
index 0000000..0500aa3
--- /dev/null
@@ -0,0 +1,28 @@
+#include <assert.h>
+
+#include "node_api.h"
+#include "node_escargot.h"
+
+using namespace node;
+
+napi_value Method(napi_env env, napi_callback_info info) {
+  nescargot_printf("call Method\n");
+  napi_status status;
+  napi_value world;
+  status = napi_create_string_utf8(env, "world", 5, &world);
+  assert(status == napi_ok);
+
+  return world;
+}
+
+#define DECLARE_NAPI_METHOD(name, func) \
+  { name, 0, func, 0, 0, 0, napi_default, 0 }
+
+void Init(napi_env env, napi_value exports, napi_value module, void* priv) {
+  napi_status status;
+  napi_property_descriptor desc = DECLARE_NAPI_METHOD("hello", Method);
+  status = napi_define_properties(env, exports, 1, &desc);
+  assert(status == napi_ok);
+}
+
+NAPI_MODULE(hello, Init)
diff --git a/lwnode/pkgs/template/tpk/.gitignore b/lwnode/pkgs/template/tpk/.gitignore
new file mode 100644 (file)
index 0000000..61294f7
--- /dev/null
@@ -0,0 +1,4 @@
+out
+lib/build
+node_modules
+.git
diff --git a/lwnode/pkgs/template/tpk/CMakeLists.txt b/lwnode/pkgs/template/tpk/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2de189c
--- /dev/null
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 2.8)
+set (CMAKE_CXX_STANDARD 11)
+project (helloworld)
+
+add_definitions(-DBUILDING_NODE_EXTENSION)
+
+include_directories(include src)
+
+file (GLOB_RECURSE SOURCE_FILES src/*.cc)
+
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
diff --git a/lwnode/pkgs/template/tpk/README.md b/lwnode/pkgs/template/tpk/README.md
new file mode 100644 (file)
index 0000000..4123a4d
--- /dev/null
@@ -0,0 +1,39 @@
+## How to package lightweight node.js project
+
+### Amend project name
+You need to change the project name in the file below.
++ `name` in `package.json`
++ `package` and `app-id` in `tizen-manifest.xml`
++ `Name` in `packaging/helloworld.spec`
++ `project` in `CMakeLists.txt`
+
+### Copy lightweight node binary
+You should copy node binary file to bin folder.
+```bash
+cd <project_path>
+cp <node_file_path> ./bin
+```
+
+### Work JavaScript
+You can work on your JavaScript code in `lib` folder.
+
+### Package tpk
+To package tpk, you should build gbs.
+For example, 
+``` bash
+gbs -c ~/gbs.conf build -A armv7l -B ~/GBS-ROOT/helloworld --incremental --include-all
+```
+After build, you can find tpk in `out` folder.
+
+### Include native module (napi)
+If you want to include native-module, work on the native code in `src` folder.
+You can also implement build script in `CMakeLists.txt`.
+To package tpk with natvie module, add config `--define='native_module true'` when you build gbs.
+On linux, you can use command `npm run build` to build native module.
+
+### Show log
+To view node console log, use `dlogutil <app-id>` command.
+For example,
+``` bash
+dlogutil helloworld
+```
diff --git a/lwnode/pkgs/template/tpk/include/node_api.h b/lwnode/pkgs/template/tpk/include/node_api.h
new file mode 100644 (file)
index 0000000..c27cf93
--- /dev/null
@@ -0,0 +1,489 @@
+/******************************************************************************
+ * Experimental prototype for demonstrating VM agnostic and ABI stable API
+ * for native modules to use instead of using Nan and V8 APIs directly.
+ *
+ * The current status is "Experimental" and should not be used for
+ * production applications.  The API is still subject to change
+ * and as an experimental feature is NOT subject to semver.
+ *
+ ******************************************************************************/
+#ifndef SRC_NODE_API_H_
+#define SRC_NODE_API_H_
+
+#include <stddef.h>
+#include <stdbool.h>
+#include "node_api_types.h"
+
+#define NAPI_VERSION  1
+
+#ifdef _WIN32
+  #ifdef BUILDING_NODE_EXTENSION
+    #ifdef EXTERNAL_NAPI
+      // Building external N-API, or native module against external N-API
+      #define NAPI_EXTERN /* nothing */
+    #else
+      // Building native module against node with built-in N-API
+      #define NAPI_EXTERN __declspec(dllimport)
+    #endif
+  #else
+    // Building node with built-in N-API
+    #define NAPI_EXTERN __declspec(dllexport)
+  #endif
+#else
+  #define NAPI_EXTERN /* nothing */
+#endif
+
+#ifdef _WIN32
+# define NAPI_MODULE_EXPORT __declspec(dllexport)
+#else
+# define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
+#endif
+
+
+typedef void (*napi_addon_register_func)(napi_env env,
+                                         napi_value exports,
+                                         napi_value module,
+                                         void* priv);
+
+typedef struct {
+  int nm_version;
+  unsigned int nm_flags;
+  const char* nm_filename;
+  napi_addon_register_func nm_register_func;
+  const char* nm_modname;
+  void* nm_priv;
+  void* reserved[4];
+} napi_module;
+
+#define NAPI_MODULE_VERSION  1
+
+#if defined(_MSC_VER)
+#pragma section(".CRT$XCU", read)
+#define NAPI_C_CTOR(fn)                                                     \
+  static void __cdecl fn(void);                                             \
+  __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
+      fn;                                                                   \
+  static void __cdecl fn(void)
+#else
+#define NAPI_C_CTOR(fn)                              \
+  static void fn(void) __attribute__((constructor)); \
+  static void fn(void)
+#endif
+
+#ifdef __cplusplus
+#define EXTERN_C_START extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_START
+#define EXTERN_C_END
+#endif
+
+#define NAPI_MODULE_X(modname, regfunc, priv, flags)                  \
+  EXTERN_C_START                                                      \
+    static napi_module _module =                                      \
+    {                                                                 \
+      NAPI_MODULE_VERSION,                                            \
+      flags,                                                          \
+      __FILE__,                                                       \
+      regfunc,                                                        \
+      #modname,                                                       \
+      priv,                                                           \
+      {0},                                                            \
+    };                                                                \
+    NAPI_C_CTOR(_register_ ## modname) {                              \
+      napi_module_register(&_module);                                 \
+    }                                                                 \
+  EXTERN_C_END
+
+#define NAPI_MODULE(modname, regfunc) \
+  NAPI_MODULE_X(modname, regfunc, NULL, 0)
+
+EXTERN_C_START
+
+NAPI_EXTERN void napi_module_register(napi_module* mod);
+
+NAPI_EXTERN napi_status
+napi_get_last_error_info(napi_env env,
+                         const napi_extended_error_info** result);
+
+// Getters for defined singletons
+NAPI_EXTERN napi_status napi_get_undefined(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_null(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_global(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_get_boolean(napi_env env,
+                                         bool value,
+                                         napi_value* result);
+
+// Methods to create Primitive types/Objects
+NAPI_EXTERN napi_status napi_create_object(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array(napi_env env, napi_value* result);
+NAPI_EXTERN napi_status napi_create_array_with_length(napi_env env,
+                                                      size_t length,
+                                                      napi_value* result);
+NAPI_EXTERN napi_status napi_create_number(napi_env env,
+                                           double value,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_latin1(napi_env env,
+                                                  const char* str,
+                                                  size_t length,
+                                                  napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf8(napi_env env,
+                                                const char* str,
+                                                size_t length,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_create_string_utf16(napi_env env,
+                                                 const char16_t* str,
+                                                 size_t length,
+                                                 napi_value* result);
+NAPI_EXTERN napi_status napi_create_symbol(napi_env env,
+                                           napi_value description,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_function(napi_env env,
+                                             const char* utf8name,
+                                             napi_callback cb,
+                                             void* data,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_create_error(napi_env env,
+                                          napi_value msg,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_create_type_error(napi_env env,
+                                               napi_value msg,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
+                                                napi_value msg,
+                                                napi_value* result);
+
+// Methods to get the the native napi_value from Primitive type
+NAPI_EXTERN napi_status napi_typeof(napi_env env,
+                                    napi_value value,
+                                    napi_valuetype* result);
+NAPI_EXTERN napi_status napi_get_value_double(napi_env env,
+                                              napi_value value,
+                                              double* result);
+NAPI_EXTERN napi_status napi_get_value_int32(napi_env env,
+                                             napi_value value,
+                                             int32_t* result);
+NAPI_EXTERN napi_status napi_get_value_uint32(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+NAPI_EXTERN napi_status napi_get_value_int64(napi_env env,
+                                             napi_value value,
+                                             int64_t* result);
+NAPI_EXTERN napi_status napi_get_value_bool(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+
+// Copies LATIN-1 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_latin1(napi_env env,
+                                                     napi_value value,
+                                                     char* buf,
+                                                     size_t bufsize,
+                                                     size_t* result);
+
+// Copies UTF-8 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf8(napi_env env,
+                                                   napi_value value,
+                                                   char* buf,
+                                                   size_t bufsize,
+                                                   size_t* result);
+
+// Copies UTF-16 encoded bytes from a string into a buffer.
+NAPI_EXTERN napi_status napi_get_value_string_utf16(napi_env env,
+                                                    napi_value value,
+                                                    char16_t* buf,
+                                                    size_t bufsize,
+                                                    size_t* result);
+
+// Methods to coerce values
+// These APIs may execute user scripts
+NAPI_EXTERN napi_status napi_coerce_to_bool(napi_env env,
+                                            napi_value value,
+                                            napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_number(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_object(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+NAPI_EXTERN napi_status napi_coerce_to_string(napi_env env,
+                                              napi_value value,
+                                              napi_value* result);
+
+// Methods to work with Objects
+NAPI_EXTERN napi_status napi_get_prototype(napi_env env,
+                                           napi_value object,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_get_property_names(napi_env env,
+                                                napi_value object,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_set_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_property(napi_env env,
+                                          napi_value object,
+                                          napi_value key,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value value);
+NAPI_EXTERN napi_status napi_has_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          bool* result);
+NAPI_EXTERN napi_status napi_get_named_property(napi_env env,
+                                          napi_value object,
+                                          const char* utf8name,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_set_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value value);
+NAPI_EXTERN napi_status napi_has_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         bool* result);
+NAPI_EXTERN napi_status napi_get_element(napi_env env,
+                                         napi_value object,
+                                         uint32_t index,
+                                         napi_value* result);
+NAPI_EXTERN napi_status
+napi_define_properties(napi_env env,
+                       napi_value object,
+                       size_t property_count,
+                       const napi_property_descriptor* properties);
+
+// Methods to work with Arrays
+NAPI_EXTERN napi_status napi_is_array(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+NAPI_EXTERN napi_status napi_get_array_length(napi_env env,
+                                              napi_value value,
+                                              uint32_t* result);
+
+// Methods to compare values
+NAPI_EXTERN napi_status napi_strict_equals(napi_env env,
+                                           napi_value lhs,
+                                           napi_value rhs,
+                                           bool* result);
+
+// Methods to work with Functions
+NAPI_EXTERN napi_status napi_call_function(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_new_instance(napi_env env,
+                                          napi_value constructor,
+                                          size_t argc,
+                                          const napi_value* argv,
+                                          napi_value* result);
+NAPI_EXTERN napi_status napi_instanceof(napi_env env,
+                                        napi_value object,
+                                        napi_value constructor,
+                                        bool* result);
+
+// Napi version of node::MakeCallback(...)
+NAPI_EXTERN napi_status napi_make_callback(napi_env env,
+                                           napi_value recv,
+                                           napi_value func,
+                                           size_t argc,
+                                           const napi_value* argv,
+                                           napi_value* result);
+
+// Methods to work with napi_callbacks
+
+// Gets all callback info in a single call. (Ugly, but faster.)
+NAPI_EXTERN napi_status napi_get_cb_info(
+    napi_env env,               // [in] NAPI environment handle
+    napi_callback_info cbinfo,  // [in] Opaque callback-info handle
+    size_t* argc,      // [in-out] Specifies the size of the provided argv array
+                       // and receives the actual count of args.
+    napi_value* argv,  // [out] Array of values
+    napi_value* this_arg,  // [out] Receives the JS 'this' arg for the call
+    void** data);          // [out] Receives the data pointer for the callback.
+
+NAPI_EXTERN napi_status napi_is_construct_call(napi_env env,
+                                               napi_callback_info cbinfo,
+                                               bool* result);
+NAPI_EXTERN napi_status
+napi_define_class(napi_env env,
+                  const char* utf8name,
+                  napi_callback constructor,
+                  void* data,
+                  size_t property_count,
+                  const napi_property_descriptor* properties,
+                  napi_value* result);
+
+// Methods to work with external data objects
+NAPI_EXTERN napi_status napi_wrap(napi_env env,
+                                  napi_value js_object,
+                                  void* native_object,
+                                  napi_finalize finalize_cb,
+                                  void* finalize_hint,
+                                  napi_ref* result);
+NAPI_EXTERN napi_status napi_unwrap(napi_env env,
+                                    napi_value js_object,
+                                    void** result);
+NAPI_EXTERN napi_status napi_create_external(napi_env env,
+                                             void* data,
+                                             napi_finalize finalize_cb,
+                                             void* finalize_hint,
+                                             napi_value* result);
+NAPI_EXTERN napi_status napi_get_value_external(napi_env env,
+                                                napi_value value,
+                                                void** result);
+
+// Methods to control object lifespan
+
+// Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
+NAPI_EXTERN napi_status napi_create_reference(napi_env env,
+                                              napi_value value,
+                                              uint32_t initial_refcount,
+                                              napi_ref* result);
+
+// Deletes a reference. The referenced value is released, and may
+// be GC'd unless there are other references to it.
+NAPI_EXTERN napi_status napi_delete_reference(napi_env env, napi_ref ref);
+
+// Increments the reference count, optionally returning the resulting count.
+// After this call the  reference will be a strong reference because its
+// refcount is >0, and the referenced object is effectively "pinned".
+// Calling this when the refcount is 0 and the object is unavailable
+// results in an error.
+NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
+                                           napi_ref ref,
+                                           uint32_t* result);
+
+// Decrements the reference count, optionally returning the resulting count.
+// If the result is 0 the reference is now weak and the object may be GC'd
+// at any time if there are no other references. Calling this when the
+// refcount is already 0 results in an error.
+NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
+                                             napi_ref ref,
+                                             uint32_t* result);
+
+// Attempts to get a referenced value. If the reference is weak,
+// the value might no longer be available, in that case the call
+// is still successful but the result is NULL.
+NAPI_EXTERN napi_status napi_get_reference_value(napi_env env,
+                                                 napi_ref ref,
+                                                 napi_value* result);
+
+NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env,
+                                               napi_handle_scope* result);
+NAPI_EXTERN napi_status napi_close_handle_scope(napi_env env,
+                                                napi_handle_scope scope);
+NAPI_EXTERN napi_status
+napi_open_escapable_handle_scope(napi_env env,
+                                 napi_escapable_handle_scope* result);
+NAPI_EXTERN napi_status
+napi_close_escapable_handle_scope(napi_env env,
+                                  napi_escapable_handle_scope scope);
+
+NAPI_EXTERN napi_status napi_escape_handle(napi_env env,
+                                           napi_escapable_handle_scope scope,
+                                           napi_value escapee,
+                                           napi_value* result);
+
+// Methods to support error handling
+NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error);
+NAPI_EXTERN napi_status napi_throw_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, const char* msg);
+NAPI_EXTERN napi_status napi_is_error(napi_env env,
+                                      napi_value value,
+                                      bool* result);
+
+// Methods to support catching exceptions
+NAPI_EXTERN napi_status napi_is_exception_pending(napi_env env, bool* result);
+NAPI_EXTERN napi_status napi_get_and_clear_last_exception(napi_env env,
+                                                          napi_value* result);
+
+// Methods to provide node::Buffer functionality with napi types
+NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
+                                           size_t length,
+                                           void** data,
+                                           napi_value* result);
+NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
+                                                    size_t length,
+                                                    void* data,
+                                                    napi_finalize finalize_cb,
+                                                    void* finalize_hint,
+                                                    napi_value* result);
+NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
+                                                size_t length,
+                                                const void* data,
+                                                void** result_data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
+                                       napi_value value,
+                                       bool* result);
+NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
+                                             napi_value value,
+                                             void** data,
+                                             size_t* length);
+
+// Methods to work with array buffers and typed arrays
+NAPI_EXTERN napi_status napi_is_arraybuffer(napi_env env,
+                                            napi_value value,
+                                            bool* result);
+NAPI_EXTERN napi_status napi_create_arraybuffer(napi_env env,
+                                                size_t byte_length,
+                                                void** data,
+                                                napi_value* result);
+NAPI_EXTERN napi_status
+napi_create_external_arraybuffer(napi_env env,
+                                 void* external_data,
+                                 size_t byte_length,
+                                 napi_finalize finalize_cb,
+                                 void* finalize_hint,
+                                 napi_value* result);
+NAPI_EXTERN napi_status napi_get_arraybuffer_info(napi_env env,
+                                                  napi_value arraybuffer,
+                                                  void** data,
+                                                  size_t* byte_length);
+NAPI_EXTERN napi_status napi_is_typedarray(napi_env env,
+                                           napi_value value,
+                                           bool* result);
+NAPI_EXTERN napi_status napi_create_typedarray(napi_env env,
+                                               napi_typedarray_type type,
+                                               size_t length,
+                                               napi_value arraybuffer,
+                                               size_t byte_offset,
+                                               napi_value* result);
+NAPI_EXTERN napi_status napi_get_typedarray_info(napi_env env,
+                                                 napi_value typedarray,
+                                                 napi_typedarray_type* type,
+                                                 size_t* length,
+                                                 void** data,
+                                                 napi_value* arraybuffer,
+                                                 size_t* byte_offset);
+
+// Methods to manage simple async operations
+NAPI_EXTERN
+napi_status napi_create_async_work(napi_env env,
+                                   napi_async_execute_callback execute,
+                                   napi_async_complete_callback complete,
+                                   void* data,
+                                   napi_async_work* result);
+NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
+                                               napi_async_work work);
+NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
+                                              napi_async_work work);
+NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
+                                               napi_async_work work);
+
+
+// version management
+NAPI_EXTERN napi_status napi_get_version(napi_env env, uint32_t* result);
+
+EXTERN_C_END
+
+#endif  // SRC_NODE_API_H_
diff --git a/lwnode/pkgs/template/tpk/include/node_api_types.h b/lwnode/pkgs/template/tpk/include/node_api_types.h
new file mode 100644 (file)
index 0000000..43102c5
--- /dev/null
@@ -0,0 +1,105 @@
+#ifndef SRC_NODE_API_TYPES_H_
+#define SRC_NODE_API_TYPES_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
+    typedef uint16_t char16_t;
+#endif
+
+// JSVM API types are all opaque pointers for ABI stability
+// typedef undefined structs instead of void* for compile time type safety
+typedef struct napi_env__ *napi_env;
+typedef struct napi_value__ *napi_value;
+typedef struct napi_ref__ *napi_ref;
+typedef struct napi_handle_scope__ *napi_handle_scope;
+typedef struct napi_escapable_handle_scope__ *napi_escapable_handle_scope;
+typedef struct napi_callback_info__ *napi_callback_info;
+typedef struct napi_async_work__ *napi_async_work;
+
+typedef enum {
+  napi_default = 0,
+  napi_writable = 1 << 0,
+  napi_enumerable = 1 << 1,
+  napi_configurable = 1 << 2,
+
+  // Used with napi_define_class to distinguish static properties
+  // from instance properties. Ignored by napi_define_properties.
+  napi_static = 1 << 10,
+} napi_property_attributes;
+
+typedef enum {
+  // ES6 types (corresponds to typeof)
+  napi_undefined,
+  napi_null,
+  napi_boolean,
+  napi_number,
+  napi_string,
+  napi_symbol,
+  napi_object,
+  napi_function,
+  napi_external,
+} napi_valuetype;
+
+typedef enum {
+  napi_int8_array,
+  napi_uint8_array,
+  napi_uint8_clamped_array,
+  napi_int16_array,
+  napi_uint16_array,
+  napi_int32_array,
+  napi_uint32_array,
+  napi_float32_array,
+  napi_float64_array,
+} napi_typedarray_type;
+
+typedef enum {
+  napi_ok,
+  napi_invalid_arg,
+  napi_object_expected,
+  napi_string_expected,
+  napi_name_expected,
+  napi_function_expected,
+  napi_number_expected,
+  napi_boolean_expected,
+  napi_array_expected,
+  napi_generic_failure,
+  napi_pending_exception,
+  napi_cancelled,
+  napi_escape_called_twice
+} napi_status;
+
+typedef napi_value (*napi_callback)(napi_env env,
+                                    napi_callback_info info);
+typedef void (*napi_finalize)(napi_env env,
+                              void* finalize_data,
+                              void* finalize_hint);
+typedef void (*napi_async_execute_callback)(napi_env env,
+                                            void* data);
+typedef void (*napi_async_complete_callback)(napi_env env,
+                                             napi_status status,
+                                             void* data);
+
+typedef struct {
+  // One of utf8name or name should be NULL.
+  const char* utf8name;
+  napi_value name;
+
+  napi_callback method;
+  napi_callback getter;
+  napi_callback setter;
+  napi_value value;
+
+  napi_property_attributes attributes;
+  void* data;
+} napi_property_descriptor;
+
+typedef struct {
+  const char* error_message;
+  void* engine_reserved;
+  uint32_t engine_error_code;
+  napi_status error_code;
+} napi_extended_error_info;
+
+#endif  // SRC_NODE_API_TYPES_H_
diff --git a/lwnode/pkgs/template/tpk/include/node_escargot.h b/lwnode/pkgs/template/tpk/include/node_escargot.h
new file mode 100644 (file)
index 0000000..470727c
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2020-present Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+#ifndef NODE_ESCARGOT_H
+#define NODE_ESCARGOT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define MAX_PACKAGE_STR_SIZE 512
+
+namespace node {
+
+int nescargot_set_printf_tagname(const char* name);
+int nescargot_get_printf_tagname(char* buffer, unsigned num);
+
+int nescargot_printf(const char* format, ...);
+int nescargot_printf_warn(const char* format, ...);
+int nescargot_printf_err(const char* format, ...);
+}  // namespace node
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
diff --git a/lwnode/pkgs/template/tpk/index.js b/lwnode/pkgs/template/tpk/index.js
new file mode 100644 (file)
index 0000000..09ee9e8
--- /dev/null
@@ -0,0 +1 @@
+module.exports = require('./lib/helloworld.js');
diff --git a/lwnode/pkgs/template/tpk/lib/helloworld.js b/lwnode/pkgs/template/tpk/lib/helloworld.js
new file mode 100644 (file)
index 0000000..3267326
--- /dev/null
@@ -0,0 +1,4 @@
+// var addon = require('./build/helloworld'); // native module
+// console.log(addon.hello());
+
+console.log('hello world!');
diff --git a/lwnode/pkgs/template/tpk/package.json b/lwnode/pkgs/template/tpk/package.json
new file mode 100644 (file)
index 0000000..d2ab037
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "name": "helloworld",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "author": "",
+  "dependencies": {
+  },
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1",
+    "build": "mkdir -p out/$npm_package_name && cmake . -Bout/$npm_package_name -H. -G Ninja && ninja -v -C out/$npm_package_name && mkdir -p lib/build && cp -f out/$npm_package_name/*.node lib/build",
+    "clean": "rm -rf lib/build && rm -rf out"
+  }
+}
diff --git a/lwnode/pkgs/template/tpk/packaging/helloworld.spec b/lwnode/pkgs/template/tpk/packaging/helloworld.spec
new file mode 100644 (file)
index 0000000..c2c3b5f
--- /dev/null
@@ -0,0 +1,96 @@
+Name:          helloworld
+Summary:       -
+Version:       1.0.0
+Release:       1
+Group:         System/Servers
+License:       MIT
+Source:        %{name}-%{version}.tar.gz
+Source1001:    x.manifest
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+BuildRequires: builtin-java
+BuildRequires: builtin-tizensdk, builtin-tizensdk-rootstraps
+BuildRequires: app-signer, python-xml
+
+BuildRequires: cmake, ninja
+BuildRequires: pkgconfig(dlog)
+
+%define _signer_url http://10.40.68.214/kuep_net_signer.sh
+
+%description
+sample
+
+# Configure
+%{!?native_module: %define native_module false}
+
+# Initialize the variables
+%define _output ./out
+%define _native_out ./out/%{name}
+%define _native_dist ./out/project/res/lib/build
+%define _project ./out/project
+%define _certi ./packaging
+
+%prep
+%setup -q
+
+%build
+%if "%{native_module}" == "true"
+mkdir -p %{_native_out}
+cmake . -B%{_native_out} -H. -G Ninja
+ninja -v -C %{_native_out}
+%endif
+
+# project scaffolding
+rm -rf %{_project}
+mkdir -p %{_project}/res
+
+cp -rf bin %{_project}
+cp -rf index.js %{_project}/res
+cp -rf lib %{_project}/res
+cp -rf node_modules %{_project}/res 2>/dev/null || :
+cp -rf tizen-manifest.xml %{_project}
+
+# build native-module
+%if "%{native_module}" == "true"
+mkdir -p %{_native_dist}
+cp -f %{_native_out}/*.node %{_native_dist}
+%endif
+
+# setup tizen certificate profile
+tizen cli-config "profiles.path=%{_prefix}/tizen-studio-data/profile/profiles.xml"
+tizen security-profiles add -n ABS -a %{_certi}/tizen_author.p12 -p \
+    tizenauthor -d %{_certi}/tizen-distributor-partner-manufacturer-signer.p12 \
+    -dp tizenpkcs12passfordsigner
+
+# signing
+curl -o ./kuep_net_signer.sh %{_signer_url} && chmod +x ./kuep_net_signer.sh
+./kuep_net_signer.sh -s -tizen_major_ver %{?tizen_version_major} %{_project}/bin/node
+%if "%{native_module}" == "true"
+find %{_native_dist} -name '*.node' -type f -printf '\n%kK %P\n' -exec ./kuep_net_signer.sh -s -tizen_major_ver %{?tizen_version_major} {} \;
+%endif
+
+# packaging
+cd %{_project}
+zip ../%{name}.tpk * -r
+cd - > /dev/null
+tizen package -t tpk -s ABS -- %{_output}/%{name}.tpk
+
+%install
+
+%clean
+rm ./*.list
+rm -rf %{_project}
+%if "%{native_module}" == "true"
+rm -rf %{_native_out}
+%endif
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
diff --git a/lwnode/pkgs/template/tpk/packaging/tizen-distributor-partner-manufacturer-signer.p12 b/lwnode/pkgs/template/tpk/packaging/tizen-distributor-partner-manufacturer-signer.p12
new file mode 100644 (file)
index 0000000..fb0512c
Binary files /dev/null and b/lwnode/pkgs/template/tpk/packaging/tizen-distributor-partner-manufacturer-signer.p12 differ
diff --git a/lwnode/pkgs/template/tpk/packaging/tizen_author.p12 b/lwnode/pkgs/template/tpk/packaging/tizen_author.p12
new file mode 100644 (file)
index 0000000..8a5a99d
Binary files /dev/null and b/lwnode/pkgs/template/tpk/packaging/tizen_author.p12 differ
diff --git a/lwnode/pkgs/template/tpk/packaging/x.manifest b/lwnode/pkgs/template/tpk/packaging/x.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/lwnode/pkgs/template/tpk/src/main.cc b/lwnode/pkgs/template/tpk/src/main.cc
new file mode 100644 (file)
index 0000000..0500aa3
--- /dev/null
@@ -0,0 +1,28 @@
+#include <assert.h>
+
+#include "node_api.h"
+#include "node_escargot.h"
+
+using namespace node;
+
+napi_value Method(napi_env env, napi_callback_info info) {
+  nescargot_printf("call Method\n");
+  napi_status status;
+  napi_value world;
+  status = napi_create_string_utf8(env, "world", 5, &world);
+  assert(status == napi_ok);
+
+  return world;
+}
+
+#define DECLARE_NAPI_METHOD(name, func) \
+  { name, 0, func, 0, 0, 0, napi_default, 0 }
+
+void Init(napi_env env, napi_value exports, napi_value module, void* priv) {
+  napi_status status;
+  napi_property_descriptor desc = DECLARE_NAPI_METHOD("hello", Method);
+  status = napi_define_properties(env, exports, 1, &desc);
+  assert(status == napi_ok);
+}
+
+NAPI_MODULE(hello, Init)
diff --git a/lwnode/pkgs/template/tpk/tizen-manifest.xml b/lwnode/pkgs/template/tpk/tizen-manifest.xml
new file mode 100644 (file)
index 0000000..66563da
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.0" package="helloworld" version="1.0.0">
+    <profile name="tv-samsung" />
+    <service-application appid="helloworld" exec="node" type="capp" multiple="false" taskmanage="false" nodisplay="true" on-boot="false">
+        <icon>service.png</icon>
+        <label>Lightweight Node.js Service</label>
+       </service-application>
+    <privileges>
+        <!-- <privilege>http://tizen.org/privilege/application.info</privilege> -->
+    </privileges>
+</manifest>
index b04909d4cd94077bb677f09112071d5b3b14f6b4..0889978d7a5ca826f4621c55c394d792c32a72fd 100644 (file)
--- a/node.gyp
+++ b/node.gyp
       'lib/internal/js_stream_socket.js',
       'lib/internal/linkedlist.js',
       'lib/internal/lwnode/setup.js',
+      'lib/internal/lwnode/memory.js',
       'lib/internal/main/check_syntax.js',
       'lib/internal/main/eval_string.js',
       'lib/internal/main/eval_stdin.js',
index 69835864ea53f443bd1f5d2bdcffbabf92aabc53..f41e71d9edec33bfe3a434aefe092a8361600037 100644 (file)
@@ -64,10 +64,12 @@ Requires:    %{name} = %{version}
 Development files for Lightweight node.js.
 
 # Initialize the variables
-%{!?target: %define target lwnode} #taget = [lwnode/v8/modules/apps]
+%{!?target: %define target lwnode} #taget = [lwnode/v8/modules/apps/test]
 %{!?lib_type: %define lib_type shared}
 %{!?feature_mode: %define feature_mode production}
-%{!?app_name: %define app_name unkown}
+%{!?build_app: %define build_app 1}
+%{!?app_name: %define app_name sqlite3}
+%{!?build_test: %define build_test 0}
 
 %description
 Node.js on Escargot is a memory efficient node.js implementation,
@@ -76,7 +78,7 @@ by Samsung Research, instead of the default V8 JS engine.
 
 
 # Add subpackage for apps
-%if "%{target}" == "apps"
+%if 0%{?build_app} == 1
 %package %{app_name}
 Summary: lwnode apps
 %description %{app_name}
@@ -92,6 +94,17 @@ lwnode %{app_name} app
 %define app_post_variables APP_PATH=%{target_app_path} FILES_PATH=%{app_files_path}
 %endif
 
+# profile: test
+%if 0%{?build_test} == 1
+%package test
+Summary:     Test files for Lightweight node.js
+Group:       System/Servers
+%description test
+Test files for Lightweight node.js
+
+%define target test
+%endif
+
 %prep
 %setup -q
 
@@ -189,10 +202,23 @@ echo $CFLAGS
 ninja -C %{target_src} %{target}
 %endif
 
-%if "%{target}" == "apps"
+%if 0%{?build_app} == 1
 %{app_variables} %{local_app_path}/build/build.sh
 %endif
 
+# building the cctest executable
+%if 0%{?build_test} == 1
+%define test_exe cctest
+%define local_test_exe %{project_path}/out/tizen/cctest/out/Release/%{test_exe}
+
+./tools/gyp/gyp ./lwnode/code/escargotshim/test/cctest.gyp --depth=. -f ninja \
+  --generator-output=./out/tizen/cctest -Dbuild_mode=release \
+  -Descargot_lib_type=static_lib -Dtarget_arch=arm -Dtarget_os=tizen \
+  -Denable_experimental=true -Descargot_threading=1 -Dinclude_node_bindings=false \
+  -Descargot_debugger=0
+
+ninja -C ./out/tizen/cctest/out/Release cctest
+%endif
 
 ##############################################
 ## Install
@@ -222,7 +248,8 @@ cp %{target_src}/%{target}.dat %{buildroot}%{_bindir}
 
 %endif # "%{target}" == "lwnode"
 
-%if "%{target}" == "apps"
+# for app files
+%if 0%{?build_app} == 1
 rm -rf %{buildroot}%{app_files_path}
 mkdir -p %{buildroot}%{app_files_path}
 
@@ -233,6 +260,12 @@ cp %{local_app_path}/build/%{app_name}.manifest %{buildroot}%{target_app_path}
 
 %endif
 
+# for test files
+%if 0%{?build_test} == 1
+mkdir -p %{buildroot}%{_bindir}
+cp %{local_test_exe} %{buildroot}%{_bindir}
+%endif
+
 %clean
 rm -fr ./*.list
 rm -fr ./*.manifest
@@ -254,20 +287,20 @@ rm -fr ./*.manifest
   %if %{?static_escargot:0}%{!?static_escargot:1}
     %{_libdir}/libescargot.so
   %endif
-  %if "%{lib_type}" == "shared"
-    %{_libdir}/liblwnode.so*
-  %endif
+  %{_bindir}/%{target}.dat
+  %{_bindir}/%{target}
 %endif
 %license LICENSE LICENSE.Apache-2.0 LICENSE.NodeJS LICENSE.MIT LICENSE.BSD-2-Clause LICENSE.BSD-3-Clause LICENSE.BOEHM-GC LICENSE.ICU LICENSE.LGPL-2.1+ LICENSE.Zlib
 
 %files devel
 %manifest packaging/%{name}.manifest
 %if "%{target}" == "lwnode"
-  %{_bindir}/%{target}
-  %{_bindir}/%{target}.dat
+  %if "%{lib_type}" == "shared"
+    %{_libdir}/liblwnode.so*
+  %endif
 %endif
 
-%if "%{target}" == "apps"
+%if 0%{?build_app} == 1
 %post %{app_name}
 %{app_post_variables} %{target_app_path}/build/post.sh
 
@@ -275,3 +308,8 @@ rm -fr ./*.manifest
 %{target_app_path}
 %{app_files_path}
 %endif
+
+%if 0%{?build_test} == 1
+%files test
+%{_bindir}/%{test_exe}
+%endif
diff --git a/src/lwnode_api.h b/src/lwnode_api.h
new file mode 100644 (file)
index 0000000..be75a0a
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef LWNODE_NAPI_H_
+#define LWNODE_NAPI_H_
+
+#ifdef LWNODE
+
+namespace v8 {
+  class Context;
+}
+
+typedef v8::Context* napi_context;
+
+EXTERN_C_START
+
+NAPI_EXTERN napi_status napi_get_context(napi_env env, napi_context& context);
+
+EXTERN_C_END
+
+#endif
+#endif
index d037c2473439fa8344e8d9e99f61f91648947a75..bc0d694a0bd8a69d840f7d4db03e446b02b747b6 100644 (file)
@@ -1076,7 +1076,7 @@ int Start(int argc, char** argv) {
   }
 
   #if defined(LWNODE)
-  LWNode::LWNodeMainRunner nodeMainRunner; // @lwndoe
+  LWNode::LWNodeMainRunner nodeMainRunner; // @lwnode
   {
     Isolate::CreateParams params;
     const std::vector<size_t>* indexes = nullptr;
@@ -1104,7 +1104,7 @@ int Start(int argc, char** argv) {
                                    result.exec_args,
                                    indexes);
 
-    result.exit_code = nodeMainRunner.Run(main_instance); // @lwndoe
+    result.exit_code = nodeMainRunner.Run(main_instance); // @lwnode
   }
 #else
   {
index 12f369a809734f322ed6a586addca78446dbbe46..9670a2e2e61e875de2cfb8949781fb58580787f7 100644 (file)
@@ -1161,3 +1161,15 @@ napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func) {
   CHECK_NOT_NULL(func);
   return reinterpret_cast<v8impl::ThreadSafeFunction*>(func)->Ref();
 }
+
+//@lwnode
+#ifdef LWNODE
+#include "lwnode_api.h"
+napi_status napi_get_context(napi_env env, napi_context& context) {
+  CHECK_NOT_NULL(env);
+  v8::Local<v8::Context> v8Context = env->context();
+  context = *v8Context;
+  return napi_ok;
+}
+#endif
+//end of @lwnode
index 37a1a5bf1db4cccfe27ecc29970de32e4262d90f..073ff888f036f18626234e1c44f86355da07bb29 100644 (file)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2022-present Samsung Electronics Co., Ltd
+ *
+ * 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.
+ */
+
 #pragma once
 #include "node_bindings.h"
 #include "node_internals.h"
@@ -118,8 +134,13 @@ class LWNodeMainRunner {
             node::performance::NODE_PERFORMANCE_MILESTONE_LOOP_START);
 
         // Run main loop
-        std::unique_ptr<MainLoopStrategy> mainLoop =
-            std::make_unique<LoopStrategy>();
+        std::unique_ptr<MainLoopStrategy> mainLoop;
+        if (GmainLoopNodeBindings::isEnabled()) {
+          mainLoop = std::make_unique<GmainLoopStrategy>();
+        } else {
+          mainLoop = std::make_unique<LoopStrategy>();
+        }
+
         mainLoop->RunLoop(env_.get());
 
         env_->performance_state()->Mark(