diff --git a/README.md b/README.md index 3110bb82c..4fd8498fa 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,13 @@ DNN applications to end-users is very hard. **WebDNN** solves this problem by using web browser as installation-free DNN execution framework. This framework optimizes trained DNN model to compress the model data and accelerate the execution, and executes it with novel JavaScript API such as WebAssembly -and WebGPU to achieve zero-overhead execution. Empirical evaluations showed that it +and WebMetal to achieve zero-overhead execution. Empirical evaluations showed that it achieved more than 200x acceleration. +Note: WebGPU introduced by Apple was renamed to WebMetal in 2019. +In WebDNN 1.2.8, both WebMetal and old name WebGPU are supported for compatiblity. +For string constant, currently `webgpu` is used, but will be changed to `webmetal` in the future version. + # Performance - Compared processing time with [Keras.js](https://github.com/transcranial/keras-js) @@ -46,7 +50,7 @@ achieved more than 200x acceleration. Elapsed time per image are shown in vertical axis as logarithmic scale. -WebDNN with WebGPU backend was significantly faster than Keras.js. +WebDNN with WebMetal backend was significantly faster than Keras.js. WebDNN with WebAssembly backend was comparable with GPU backend of Keras.js. In each DNN model and backend, WebDNN obtained better results in terms of speed. More speed improvement is observed when the optimizations are applied in the graph transpiler. diff --git a/README_ja.md b/README_ja.md index fc21f370c..215edddfb 100644 --- a/README_ja.md +++ b/README_ja.md @@ -25,6 +25,10 @@ DNNは様々なタスクについて顕著な成果をおさめていますが WebDNNにより、ウェブブラウザ上での実行を前提とした積極的な最適化が学習済みモデルに行われるため、 パラメータデータの配信サイズを小さく抑え、高速な実行が可能となります。 +WebDNNではAppleにより提案されたアクセラレーションAPI WebMetalをサポートしています。 +WebMetalは2019年までWebGPUと呼称されており、WebDNN 1.2.8では互換性のため両方の名称をサポートしています。 +文字列定数は従来の`webgpu`を使用していますが、将来バージョンでは`webmetal`に変更します。 + # Performance - 比較対象: [Keras.js](https://github.com/transcranial/keras-js) @@ -41,7 +45,7 @@ WebDNNにより、ウェブブラウザ上での実行を前提とした積極 縦軸は画像1枚あたりの処理時間(対数スケール)を表しています。 -WebDNNの実行バックエンドとしてWebGPUを使用した場合、Keras.jsよりも大幅な速度向上が達成されました。 +WebDNNの実行バックエンドとしてWebMetalを使用した場合、Keras.jsよりも大幅な速度向上が達成されました。 また、WebAssembly実装によるCPU上での実行でも、Keras.jsのGPUモードと同等以上の速度が出ていることが分かります。 さらに、WebDNNに実装された最適化機構を用いる事でより一層の速度向上効果が得られています。 diff --git a/dist/webdnn.d.ts b/dist/webdnn.d.ts index 59cb17e18..71fc461cf 100644 --- a/dist/webdnn.d.ts +++ b/dist/webdnn.d.ts @@ -1,61 +1,43 @@ -interface WebGPURenderingContext { - createCommandQueue(): WebGPUCommandQueue; - - createBuffer(data: ArrayBufferView): WebGPUBuffer; - - createLibrary(sourceCode: string): WebGPULibrary; - - createComputePipelineState(function_: WebGPUFunction): WebGPUComputePipelineState; +interface WebMetalRenderingContext { + createCommandQueue(): WebMetalCommandQueue; + createBuffer(data: ArrayBufferView): WebMetalBuffer; + createLibrary(sourceCode: string): WebMetalLibrary; + createComputePipelineState(function_: WebMetalFunction): WebMetalComputePipelineState; } - -interface WebGPUFunction { +interface WebMetalFunction { } - -interface WebGPULibrary { +interface WebMetalLibrary { functionNames: string[]; - - functionWithName(name: string): WebGPUFunction; + functionWithName(name: string): WebMetalFunction; } - -interface WebGPUBuffer { +interface WebMetalBuffer { contents: any; } - -interface WebGPUSize { +interface WebMetalSize { width: number; height: number; depth: number; } - -interface WebGPUCommandQueue { - createCommandBuffer(): WebGPUCommandBuffer; +interface WebMetalCommandQueue { + createCommandBuffer(): WebMetalCommandBuffer; } - -interface WebGPUCommandBuffer { - createComputeCommandEncoder(): WebGPUComputeCommandEncoder; - +interface WebMetalCommandBuffer { + createComputeCommandEncoder(): WebMetalComputeCommandEncoder; commit(): void; - completed: Promise; } - -interface WebGPUCommandEncoder { +interface WebMetalCommandEncoder { endEncoding(): void; } - -interface WebGPUComputeCommandEncoder extends WebGPUCommandEncoder { - setComputePipelineState(state: WebGPUComputePipelineState): void; - - setBuffer(buffer: WebGPUBuffer, offset: number, index: number): void; - - dispatch(threadgroupsPerGrid: WebGPUSize, threadsPerThreadgroup: WebGPUSize): void; +interface WebMetalComputeCommandEncoder extends WebMetalCommandEncoder { + setComputePipelineState(state: WebMetalComputePipelineState): void; + setBuffer(buffer: WebMetalBuffer, offset: number, index: number): void; + dispatch(threadgroupsPerGrid: WebMetalSize, threadsPerThreadgroup: WebMetalSize): void; } - -interface WebGPUComputePipelineState { +interface WebMetalComputePipelineState { } - interface HTMLCanvasElement { - getContext(contextId: "webgpu"): WebGPURenderingContext | null; + getContext(contextId: "webmetal"): WebMetalRenderingContext | null; } declare module 'webdnn/placeholder' { /** @@ -211,8 +193,8 @@ declare module 'webdnn/symbolic_typed_array/symbolic_typed_array' { * The ArrayBuffer instance referenced by the array. */ /** - * The ArrayBuffer instance referenced by the array. - */ + * The ArrayBuffer instance referenced by the array. + */ buffer: ArrayBufferLike; /** * The length in bytes of the array. @@ -670,6 +652,10 @@ declare module 'webdnn/decoder/weight_decoder' { } declare module 'webdnn/decoder/weight_decoder_eightbit' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ import WeightDecoder from 'webdnn/decoder/weight_decoder'; /** * @protected @@ -707,6 +693,10 @@ declare module 'webdnn/decoder/get_weight_decoder' { } declare module 'webdnn/util/dispatch_scheduler' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ /** * Schedule function which is called too much frequently. * @@ -733,6 +723,10 @@ declare module 'webdnn/util/dispatch_scheduler' { } declare module 'webdnn/fetch' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ /** * @protected */ @@ -787,6 +781,10 @@ declare module 'webdnn/graph_descriptor/graph_descriptor_fallback' { } declare module 'webdnn/descriptor_runner/descriptor_runner_fallback' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ import { GraphDescriptorFallback } from 'webdnn/graph_descriptor/graph_descriptor_fallback'; import SymbolicFloat32Array from 'webdnn/symbolic_typed_array/symbolic_float32array'; import { BackendName } from 'webdnn/webdnn'; @@ -821,10 +819,10 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_fallback' { * save cache */ saveCache(directory: string, descriptor: GraphDescriptorFallback, parameters: ArrayBuffer): Promise; - private setDescriptor(descriptor); - private compile(); - private initializeStaticBuffer(weightRawArray); - private initializeDynamicBuffer(); + private setDescriptor; + private compile; + private initializeStaticBuffer; + private initializeDynamicBuffer; setPlaceholderValue(values: { [key: string]: number; }): Promise; @@ -853,6 +851,10 @@ declare module 'webdnn/graph_descriptor/graph_descriptor_webassembly' { } declare module 'webdnn/descriptor_runner/descriptor_runner_webassembly' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ import { GraphDescriptorWebassembly } from 'webdnn/graph_descriptor/graph_descriptor_webassembly'; import SymbolicFloat32Array from 'webdnn/symbolic_typed_array/symbolic_float32array'; import { BackendName } from 'webdnn/webdnn'; @@ -870,7 +872,7 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_webassembly' { static checkAvailability(): boolean; constructor(options?: DescriptorRunnerOptions); init(): Promise; - private absolutePath(path); + private absolutePath; setDescriptorAndParameters(descriptor: GraphDescriptorWebassembly, parameters: ArrayBuffer): Promise; /** * Fetch graph descriptor from specified directory. @@ -920,9 +922,9 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_webassembly' { setPlaceholderValue(values: { [key: string]: number; }): Promise; - private setPlaceholderValueWorker(dynamicBufferSize, metaBufferFillArray); - private compile(worker_src); - private loadWeights(weightsData); + private setPlaceholderValueWorker; + private compile; + private loadWeights; getInputViews(): SymbolicFloat32Array[]; getOutputViews(): SymbolicFloat32Array[]; run(): Promise; @@ -1057,6 +1059,10 @@ declare interface WebGLVertexArrayObjectExtension { createVertexArrayOES(): WebGLVertexArrayObject; } declare module 'webdnn/webgl_handler' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ /// /** * @protected @@ -1081,7 +1087,7 @@ declare module 'webdnn/webgl_handler' { createFragmentShader(source: string): WebGLShader; createShader(type: number, source: string): WebGLShader; createProgram(vertexShader: WebGLShader, fragmentShader: WebGLShader): WebGLProgram; - createArrayBuffer(vertexArray: number | Float32Array): WebGLBuffer; + createArrayBuffer(vertexArray: Float32Array): WebGLBuffer; createFrameBuffer(): WebGLFramebuffer; bindArrayBuffer(buffer: WebGLBuffer): void; bindFrameBuffer(frameBuffer: WebGLFramebuffer, width: number, height: number): void; @@ -1245,13 +1251,17 @@ declare module 'webdnn/buffer/buffer_webgl' { unbindFromReadTexture(): void; bindToDrawTexture(): void; unbindFromDrawTexture(): void; - private pack(array); - private unpack(array); - private allocateTexture(); + private pack; + private unpack; + private allocateTexture; } } declare module 'webdnn/descriptor_runner/descriptor_runner_webgl' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ import { GraphDescriptorWebGL } from 'webdnn/graph_descriptor/graph_descriptor_webgl'; import SymbolicFloat32Array from 'webdnn/symbolic_typed_array/symbolic_float32array'; import { BackendName } from 'webdnn/webdnn'; @@ -1286,64 +1296,75 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_webgl' { */ saveCache(directory: string, descriptor: GraphDescriptorWebGL, parameters: ArrayBuffer): Promise; setDescriptorAndParameters(descriptor: GraphDescriptorWebGL, parameters: ArrayBuffer): Promise; - private initializeStaticBuffer(weightRawArray); - private initializeDynamicBuffer(); - private setDescriptor(descriptor); - private compile(); + private initializeStaticBuffer; + private initializeDynamicBuffer; + private setDescriptor; + private compile; setPlaceholderValue(values: { [key: string]: number; }): Promise; getInputViews(): SymbolicFloat32Array[]; getOutputViews(): SymbolicFloat32Array[]; - private buildPipeline(); + private buildPipeline; run(): Promise; } } -declare module 'webdnn/webgpu_handler' { - /// +declare module 'webdnn/webmetal_handler' { + /// /** * @module webdnn */ /** Don't Remove This comment block */ - import BufferWebGPU from 'webdnn/buffer/buffer_webgpu'; + import BufferWebMetal from 'webdnn/buffer/buffer_webmetal'; /** * @protected */ - export default class WebGPUHandler { + export default class WebMetalHandler { private context; private commandQueue; private pipelineStates; private commandBuffer; - static getInstance(): WebGPUHandler; + static getInstance(): WebMetalHandler; /** - * WebGPUHandler is singleton class and instantiate directly is forbidden (constructor is hidden). + * WebMetalHandler is singleton class and instantiate directly is forbidden (constructor is hidden). * * Since the number of GPU contexts may be limited, the handler is used as a singleton * and only one context is shared among multiple runners. */ private constructor(); - createBuffer(arrayBuffer: ArrayBufferView): WebGPUBuffer; + createBuffer(arrayBuffer: ArrayBufferView): WebMetalBuffer; loadKernel(librarySource: string, namespace?: string): void; - createCommandBuffer(): WebGPUCommandBuffer; - getPipelineStateByName(name: string): WebGPUComputePipelineState; - executeSinglePipelineState(name: string, threadgroupsPerGrid: WebGPUSize, threadsPerThreadgroup: WebGPUSize, buffers: (WebGPUBuffer | BufferWebGPU)[], getCompletedPromise?: boolean): Promise | null; + createCommandBuffer(): WebMetalCommandBuffer; + getPipelineStateByName(name: string): WebMetalComputePipelineState; + executeSinglePipelineState(name: string, threadgroupsPerGrid: WebMetalSize, threadsPerThreadgroup: WebMetalSize, buffers: (WebMetalBuffer | BufferWebMetal)[], getCompletedPromise?: boolean): Promise | null; sync(): Promise; } /** - * Flag whether WebGPU is supported or not + * Flag whether WebGPU on Safari is supported or not + * Its name was changed to WebMetal in 2019 (macOS 10.14.4 / iOS 12.2). + * This is used for backward compatibility. + * @protected + */ + export const IS_APPLE_WEBGPU_SUPPORTED: boolean; + /** + * Flag whether WebMetal is supported or not * @protected */ - export const IS_WEBGPU_SUPPORTED: boolean; + export const IS_WEBMETAL_SUPPORTED: boolean; } -declare module 'webdnn/buffer/buffer_webgpu' { +declare module 'webdnn/buffer/buffer_webmetal' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ import { Buffer } from 'webdnn/buffer/buffer'; /** * @protected */ - export default class BufferWebGPU extends Buffer { - buffer: WebGPUBuffer; + export default class BufferWebMetal extends Buffer { + buffer: WebMetalBuffer; bufferView: Uint8Array; private handler; constructor(byteLength: number); @@ -1358,7 +1379,7 @@ declare module 'webdnn/buffer/buffer_webgpu' { } } -declare module 'webdnn/graph_descriptor/graph_descriptor_webgpu' { +declare module 'webdnn/graph_descriptor/graph_descriptor_webmetal' { /** * @module webdnn */ @@ -1368,17 +1389,17 @@ declare module 'webdnn/graph_descriptor/graph_descriptor_webgpu' { /** * @protected */ - export interface GraphDescriptorWebGPU extends GraphDescriptor { + export interface GraphDescriptorWebMetal extends GraphDescriptor { kernel_source: string; - exec_infos: GraphDescriptorWebGPUExecInfos[]; + exec_infos: GraphDescriptorWebMetalExecInfos[]; } /** * @protected */ - export interface GraphDescriptorWebGPUExecInfos { + export interface GraphDescriptorWebMetalExecInfos { entry_func_name: string; - threadgroups_per_grid: WebGPUSize; - threads_per_thread_group: WebGPUSize; + threadgroups_per_grid: WebMetalSize; + threads_per_thread_group: WebMetalSize; meta_buffer: number[]; unresolved_value_list: { offset: number; @@ -1387,25 +1408,29 @@ declare module 'webdnn/graph_descriptor/graph_descriptor_webgpu' { } } -declare module 'webdnn/descriptor_runner/descriptor_runner_webgpu' { - import { GraphDescriptorWebGPU } from 'webdnn/graph_descriptor/graph_descriptor_webgpu'; +declare module 'webdnn/descriptor_runner/descriptor_runner_webmetal' { + /** + * @module webdnn + */ + /** Don't Remove This comment block */ + import { GraphDescriptorWebMetal } from 'webdnn/graph_descriptor/graph_descriptor_webmetal'; import SymbolicFloat32Array from 'webdnn/symbolic_typed_array/symbolic_float32array'; import { BackendName } from 'webdnn/webdnn'; import { DescriptorRunner, DescriptorRunnerOptions } from 'webdnn/descriptor_runner/descriptor_runner'; /** - * DescriptorRunner for WebGPU + * DescriptorRunner for WebMetal * @protected */ - export default class DescriptorRunnerWebGPU extends DescriptorRunner { + export default class DescriptorRunnerWebMetal extends DescriptorRunner { constructor(options?: DescriptorRunnerOptions); /** * backend name */ readonly backendName: BackendName; /** - * WebGPU Handler + * WebMetal Handler */ - private webgpuHandler; + private webmetalHandler; /** * Static buffer, whose size and layout can be determined in compile time. */ @@ -1436,7 +1461,7 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_webgpu' { * Check whether current GPU is supported or not. If it's not supported, an error is thrown. * @returns {Promise} */ - private checkIncompatibleGPU(); + private checkIncompatibleGPU; /** * Fetch graph descriptor from specified directory. * @@ -1451,7 +1476,7 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_webgpu' { * * @protected */ - fetchDescriptor(directory: string): Promise; + fetchDescriptor(directory: string): Promise; /** * Fetch parameter files from specified directory. * @@ -1472,7 +1497,7 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_webgpu' { * Load cached descriptor from WebStorage * @protected */ - restoreCachedDescriptor(directory: string): Promise; + restoreCachedDescriptor(directory: string): Promise; /** * Load cached descriptor from WebStorage * @protected @@ -1481,20 +1506,20 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_webgpu' { /** * save cache */ - saveCache(directory: string, descriptor: GraphDescriptorWebGPU, parameters: ArrayBuffer): Promise; - setDescriptorAndParameters(descriptor: GraphDescriptorWebGPU, parameter: ArrayBuffer): Promise; + saveCache(directory: string, descriptor: GraphDescriptorWebMetal, parameters: ArrayBuffer): Promise; + setDescriptorAndParameters(descriptor: GraphDescriptorWebMetal, parameter: ArrayBuffer): Promise; /** * Initialize static buffers, whose size and position can be determined in compile time. * * @param {ArrayBuffer} weightRawArray constant weight buffer * @returns {Promise} */ - private initializeStaticBuffer(weightRawArray); + private initializeStaticBuffer; /** * Initialize meta buffers, which contains metadata shared in each GPU kernel thread (ex. hyper parameters). * @returns {Promise} */ - private initializeMetaBuffers(); + private initializeMetaBuffers; /** * Initialize dynamic buffers, whose size and position cannot be determined without runtime-information such as input image size * (if it's dynamic). @@ -1502,10 +1527,10 @@ declare module 'webdnn/descriptor_runner/descriptor_runner_webgpu' { * * @returns {Promise} */ - private initializeDynamicBuffer(); + private initializeDynamicBuffer; /** * Set actual value into placeholder. If all placeholder is resolved, - * [[DescriptorRunnerWebGPU#initializeDynamicBuffer|`initializeDynamicBuffer()`]] is automatically called. + * [[DescriptorRunnerWebMetal#initializeDynamicBuffer|`initializeDynamicBuffer()`]] is automatically called. * * @param values mapping object of placeholder name and value * @returns {Promise} @@ -1547,7 +1572,7 @@ declare module 'webdnn/image/enums' { /** `[Channel, Height, Width]` format */ CHW = 0, /** `[Height, Width, Channel]` format */ - HWC = 1, + HWC = 1 } /** * The color format @@ -1562,7 +1587,7 @@ declare module 'webdnn/image/enums' { /** RGBA format */ RGBA = 3, /** BGRA format */ - BGRA = 4, + BGRA = 4 } } @@ -1581,6 +1606,10 @@ declare module 'webdnn/image/canvas' { } declare module 'webdnn/image/image_data' { + /** + * @module webdnn/image + */ + /** Don't Remove This comment block */ /** * The rectangle of source position of image */ @@ -1660,6 +1689,10 @@ declare module 'webdnn/image/image_source' { } declare module 'webdnn/image/image_array' { + /** + * @module webdnn/image + */ + /** Don't Remove This comment block */ import { Color, Order } from 'webdnn/image/enums'; import { DestinationRect, SourceRect } from 'webdnn/image/image_data'; /** @@ -1865,7 +1898,7 @@ declare module 'webdnn/math' { } declare module 'webdnn/webdnn' { - /// + /// /** * @module webdnn * @preferred diff --git a/dist/webdnn.es5.js b/dist/webdnn.es5.js index f9d4d38db..6e67ee717 100644 --- a/dist/webdnn.es5.js +++ b/dist/webdnn.es5.js @@ -1,7 +1,14 @@ -(function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports.WebDNN=t():e.WebDNN=t()})('undefined'==typeof self?this:self,function(){var e=String.fromCharCode;return function(e){function t(r){if(a[r])return a[r].exports;var n=a[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var a={};return t.m=e,t.c=a,t.d=function(e,a,r){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var a=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(a,'a',a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=1)}([function(e,t){'use strict';function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var r='undefined'!=typeof Uint8Array&&'undefined'!=typeof Uint16Array&&'undefined'!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if('object'!=typeof r)throw new TypeError(r+'must be non-object');for(var n in r)a(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,a,r,n){if(t.subarray&&e.subarray)return void e.set(t.subarray(a,a+r),n);for(var o=0;os[0]&&r[1]a[0]&&r[1]=a.oldVersion&&e.createObjectStore(F)}catch(e){if('ConstraintError'===e.name)console.warn('The database "'+t.name+'" has been upgraded from version '+a.oldVersion+' to version '+a.newVersion+', but the storage "'+t.storeName+'" already exists.');else throw e}}),o.onerror=function(t){t.preventDefault(),r(o.error)},o.onsuccess=function(){a(o.result),p(t)}})}function _(e){return f(e,!1)}function g(e){return f(e,!0)}function m(e,t){if(!e.db)return!0;var a=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+'" can\'t be downgraded from version '+e.db.version+' to version '+e.version+'.'),e.version=e.db.version),n||a){if(a){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function b(t){return new M(function(a,e){var r=new FileReader;r.onerror=e,r.onloadend=function(r){var e=btoa(r.target.result||'');a({__local_forage_encoded_blob:!0,data:e,type:t.type})},r.readAsBinaryString(t)})}function y(e){var t=s(atob(e.data));return r([t],{type:e.type})}function v(e){return e&&e.__local_forage_encoded_blob}function w(e){var t=this,a=t._initReady().then(function(){var e=U[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return n(a,e,e),a}function x(e){u(e);for(var t=U[e.name],a=t.forages,r=0,n;r>4,c[r++]=(15&l)<<4|i>>2,c[r++]=(3&i)<<6|63&s;return d}function C(e){var t=new Uint8Array(e),a='',r;for(r=0;r>2],a+=V[(3&t[r])<<4|t[r+1]>>4],a+=V[(15&t[r+1])<<2|t[r+2]>>6],a+=V[63&t[r+2]];return 2==t.length%3?a=a.substring(0,a.length-1)+'=':1==t.length%3&&(a=a.substring(0,a.length-2)+'=='),a}function T(e,t,a,r){e.executeSql('CREATE TABLE IF NOT EXISTS '+t.storeName+' (id INTEGER PRIMARY KEY, key unique, value)',[],a,r)}function S(e,a,r,n,o,l){e.executeSql(r,n,o,function(e,i){i.code===i.SYNTAX_ERR?e.executeSql('SELECT name FROM sqlite_master WHERE type=\'table\' AND name = ?',[name],function(e,t){t.rows.length?l(e,i):T(e,a,function(){e.executeSql(r,n,o,l)},l)},l):l(e,i)},l)}function R(e,t,a,r){var n=this;e=l(e);var i=new M(function(o,l){n.ready().then(function(){void 0===t&&(t=null);var i=t,s=n._dbInfo;s.serializer.serialize(t,function(d,t){t?l(t):s.db.transaction(function(a){S(a,s,'INSERT OR REPLACE INTO '+s.storeName+' (key, value) VALUES (?, ?)',[e,d],function(){o(i)},function(e,t){l(t)})},function(t){if(t.code===t.QUOTA_ERR){if(0 \'__WebKitDatabaseInfoTable__\'',[],function(r,t){for(var n=[],o=0;oe?void t(null):void a.ready().then(function(){E(a._dbInfo,j,function(n,o){if(n)return r(n);try{var l=o.objectStore(a._dbInfo.storeName),i=!1,s=l.openCursor();s.onsuccess=function(){var a=s.result;return a?void(0===e?t(a.key):i?t(a.key):(i=!0,a.advance(e))):void t(null)},s.onerror=function(){r(s.error)}}catch(t){r(t)}})})['catch'](r)});return o(r,t),r},keys:function(e){var t=this,a=new M(function(e,a){t.ready().then(function(){E(t._dbInfo,j,function(r,n){if(r)return a(r);try{var o=n.objectStore(t._dbInfo.storeName),l=o.openCursor(),i=[];l.onsuccess=function(){var t=l.result;return t?void(i.push(t.key),t['continue']()):void e(i)},l.onerror=function(){a(l.error)}}catch(t){a(t)}})})['catch'](a)});return o(a,e),a},dropInstance:function(e,t){t=i.apply(this,arguments);var a=this.config();e='function'!=typeof e&&e||{},e.name||(e.name=e.name||a.name,e.storeName=e.storeName||a.storeName);var r=this,n;if(!e.name)n=M.reject('Invalid arguments');else{var l=e.name===a.name&&r._dbInfo.db,s=l?M.resolve(r._dbInfo.db):_(e).then(function(t){var a=U[e.name],r=a.forages;a.db=t;for(var n=0;ns[0]&&r[1]>>16,i=0;0!==a;){i=2e3t;t++){a=t;for(var r=0;8>r;r++)a=1&a?3988292384^a>>>1:a>>>1;e[t]=a}return e}();e.exports=function(e,a,r,n){e^=-1;for(var o=n;o>>8^t[255&(e^a[o])];return-1^e}},function(t,a,r){'use strict';function n(t,a){if(65537>a&&(t.subarray&&s||!t.subarray&&l))return e.apply(null,o.shrinkBuf(t,a));for(var r='',n=0;ni;i++)d[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;d[254]=d[254]=1,a.string2buf=function(e){var t=e.length,a=0,r,n,l,s,d;for(s=0;sn?1:2048>n?2:65536>n?3:4;for(r=new o.Buf8(a),d=0,s=0;dn?r[d++]=n:2048>n?(r[d++]=192|n>>>6,r[d++]=128|63&n):65536>n?(r[d++]=224|n>>>12,r[d++]=128|63&n>>>6,r[d++]=128|63&n):(r[d++]=240|n>>>18,r[d++]=128|63&n>>>12,r[d++]=128|63&n>>>6,r[d++]=128|63&n);return r},a.buf2binstring=function(e){return n(e,e.length)},a.binstring2buf=function(e){for(var t=new o.Buf8(e.length),a=0,r=t.length;ai){r[l++]=i;continue}if(s=d[i],4i?r[l++]=i:(i-=65536,r[l++]=55296|1023&i>>10,r[l++]=56320|1023&i)}return n(r,l)},a.utf8border=function(e,t){var a;for(t=t||e.length,t>e.length&&(t=e.length),a=t-1;0<=a&&128==(192&e[a]);)a--;return 0>a?t:0===a?t:a+d[e[a]]>t?a:t}},function(e){'use strict';e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg='',this.state=null,this.data_type=2,this.adler=0}},function(e){'use strict';e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,a){'use strict';function r(e){return'WebGL2RenderingContext'===e.constructor.name}function n(e){if(null===e)throw Error('Null is detected');return e}var o=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))(function(n,o){function l(e){try{s(r.next(e))}catch(t){o(t)}}function i(e){try{s(r['throw'](e))}catch(t){o(t)}}function s(e){e.done?n(e.value):new a(function(t){t(e.value)}).then(l,i)}s((r=r.apply(e,t||[])).next())})},l=this&&this.__generator||function(e,a){function r(e){return function(t){return o([e,t])}}function o(r){if(l)throw new TypeError('Generator is already executing.');for(;n;)try{if(l=1,i&&(s=i[2&r[0]?'return':r[0]?'throw':'next'])&&!(s=s.call(i,r[1])).done)return s;switch((i=0,s)&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,i=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if((s=n.trys,!(s=0s[0]&&r[1]i.getConfiguration('MAX_TEXTURE_SIZE',t.getParameter(t.MAX_TEXTURE_SIZE)))}return c},e.prototype.waitForComplete=function(){return o(this,void 0,void 0,function(){var e,t,a;return l(this,function(n){switch(n.label){case 0:if(e=this.gl,!r(e))return[3,4];t=e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE,0),a=e.clientWaitSync(t,0,0),n.label=1;case 1:return a===e.CONDITION_SATISFIED||a===e.ALREADY_SIGNALED?[3,3]:[4,new Promise(function(e){return setTimeout(e,1)})];case 2:return n.sent(),a=e.clientWaitSync(t,0,0),[3,1];case 3:return e.deleteSync(t),[3,5];case 4:e.finish(),n.label=5;case 5:return[2];}})})},Object.defineProperty(e.prototype,'MAX_TEXTURE_SIZE',{get:function(){var e=i.getConfiguration('MAX_TEXTURE_SIZE',this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE));if(16384<=e)return 4096;if(8192<=e)return 4096;if(4096<=e)return 4096;throw new Error('MAX_TEXTURE_SIZE is too small: '+e)},enumerable:!0,configurable:!0}),e.IS_SAFARI=-1!==navigator.userAgent.toLowerCase().indexOf('safari')&&-1===navigator.userAgent.toLowerCase().indexOf('chrome'),e}(),d;t.default=s;var c=null},function(e,t){'use strict';Object.defineProperty(t,'__esModule',{value:!0});var a=function(){return function(e,t){this.byteLength=e,this.backend=t}}();t.Buffer=a},function(e,t,a){'use strict';var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}(),n=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))(function(n,o){function l(e){try{s(r.next(e))}catch(t){o(t)}}function i(e){try{s(r['throw'](e))}catch(t){o(t)}}function s(e){e.done?n(e.value):new a(function(t){t(e.value)}).then(l,i)}s((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,a){function r(e){return function(t){return o([e,t])}}function o(r){if(l)throw new TypeError('Generator is already executing.');for(;n;)try{if(l=1,i&&(s=i[2&r[0]?'return':r[0]?'throw':'next'])&&!(s=s.call(i,r[1])).done)return s;switch((i=0,s)&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,i=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if((s=n.trys,!(s=0s[0]&&r[1]s[0]&&r[1]s[0]&&r[1]s[0]&&r[1]s[0]&&r[1]f;f++)h[f]=e.decode_table[127&f]*p*(128>f?1:-1);for(i=new Uint8Array(t.buffer,t.byteOffset+d,u),_=o.inflate(i),g=_.length,m=new Float32Array(g),b=0;bt.windowBits&&(t.windowBits+=16),this.err=0,this.msg='',this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var a=o.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(a!==p)throw new Error(s[a]);if(t.header&&o.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n='string'==typeof t.dictionary?i.string2buf(t.dictionary):'[object ArrayBuffer]'===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,a=o.deflateSetDictionary(this.strm,n),a!==p)throw new Error(s[a]);this._dict_set=!0}}function n(e,t){var a=new r(t);if(a.push(e,!0),a.err)throw a.msg||s[a.err];return a.result}var o=a(26),l=a(0),i=a(11),s=a(8),d=a(12),c=Object.prototype.toString,u=4,p=0,h=1,f=2,_=-1,g=0,m=8;r.prototype.push=function(e,t){var a=this.strm,r=this.options.chunkSize,n,s;if(this.ended)return!1;s=t===~~t?t:!0===t?u:0,a.input='string'==typeof e?i.string2buf(e):'[object ArrayBuffer]'===c.call(e)?new Uint8Array(e):e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new l.Buf8(r),a.next_out=0,a.avail_out=r),n=o.deflate(a,s),n!==h&&n!==p)return this.onEnd(n),this.ended=!0,!1;(0===a.avail_out||0===a.avail_in&&(s===u||s===f))&&('string'===this.options.to?this.onData(i.buf2binstring(l.shrinkBuf(a.output,a.next_out))):this.onData(l.shrinkBuf(a.output,a.next_out)))}while((0e.avail_out&&(a=e.avail_out);0===a||(E.arraySet(e.output,t.pending_buf,t.pending_out,a,e.next_out),e.next_out+=a,t.pending_out+=a,e.total_out+=a,e.avail_out-=a,t.pending-=a,0===t.pending&&(t.pending_out=0))}function i(e,t){k._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,l(e.strm)}function d(e,t){e.pending_buf[e.pending++]=t}function c(e,t){e.pending_buf[e.pending++]=255&t>>>8,e.pending_buf[e.pending++]=255&t}function u(e,t,a,r){var n=e.avail_in;return(n>r&&(n=r),0===n)?0:(e.avail_in-=n,E.arraySet(t,e.input,e.next_in,n,a),1===e.state.wrap?e.adler=I(e.adler,t,n,a):2===e.state.wrap&&(e.adler=C(e.adler,t,n,a)),e.next_in+=n,e.total_in+=n,n)}function p(e,t){var a=e.max_chain_length,r=e.strstart,n=e.prev_length,o=e.nice_match,l=e.strstart>e.w_size-K?e.strstart-(e.w_size-K):0,i=e.window,s=e.w_mask,d=e.prev,c=e.strstart+Z,u=i[r+n-1],p=i[r+n],h,f;e.prev_length>=e.good_match&&(a>>=2),o>e.lookahead&&(o=e.lookahead);do{if(h=t,i[h+n]!==p||i[h+n-1]!==u||i[h]!==i[r]||i[++h]!==i[r+1])continue;r+=2,h++;do;while(i[++r]===i[++h]&&i[++r]===i[++h]&&i[++r]===i[++h]&&i[++r]===i[++h]&&i[++r]===i[++h]&&i[++r]===i[++h]&&i[++r]===i[++h]&&i[++r]===i[++h]&&rn){if(e.match_start=t,n=f,f>=o)break;u=i[r+n-1],p=i[r+n]}}while((t=d[t&s])>l&&0!=--a);return n<=e.lookahead?n:e.lookahead}function h(e){var t=e.w_size,a,r,n,o,l;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-K)){E.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,a=r;do n=e.head[--a],e.head[a]=n>=t?n-t:0;while(--r);r=t,a=r;do n=e.prev[--a],e.prev[a]=n>=t?n-t:0;while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=u(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=Y)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=Y&&(e.ins_h=(e.ins_h<=Y))r=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;else if(r=k._tr_tally(e,e.strstart-e.match_start,e.match_length-Y),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Y){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=Y&&(e.ins_h=(e.ins_h<=e.match_length&&(e.strategy===O||e.match_length===Y&&4096=Y&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-Y,r=k._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Y),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<=Y&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Y?(r=k._tr_tally(e,1,e.match_length-Y),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(i(e,!1),0===e.strm.avail_out))return re}return e.insert=0,t===R?(i(e,!0),0===e.strm.avail_out?oe:le):e.last_lit&&(i(e,!1),0===e.strm.avail_out)?re:ne}function g(e,t){for(var a;;){if(0===e.lookahead&&(h(e),0===e.lookahead)){if(t===S)return re;break}if(e.match_length=0,a=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,a&&(i(e,!1),0===e.strm.avail_out))return re}return e.insert=0,t===R?(i(e,!0),0===e.strm.avail_out?oe:le):e.last_lit&&(i(e,!1),0===e.strm.avail_out)?re:ne}function m(e,t,a,r,n){this.good_length=e,this.max_lazy=t,this.nice_length=a,this.max_chain=r,this.func=n}function b(e){e.window_size=2*e.w_size,o(e.head),e.max_lazy_match=ie[e.level].max_lazy,e.good_match=ie[e.level].good_length,e.nice_match=ie[e.level].nice_length,e.max_chain_length=ie[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Y-1,e.match_available=0,e.ins_h=0}function y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=U,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*V),this.dyn_dtree=new E.Buf16(2*(2*H+1)),this.bl_tree=new E.Buf16(2*(2*G+1)),o(this.dyn_ltree),o(this.dyn_dtree),o(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(X+1),this.heap=new E.Buf16(2*j+1),o(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*j+1),o(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=F,t=e.state,t.pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?q:te,e.adler=2===t.wrap?0:1,t.last_flush=S,k._tr_init(t),B):r(e,A)}function w(e){var t=v(e);return t===B&&b(e.state),t}function x(e,t,a,n,o,l){if(!e)return A;var i=1;if(t===N&&(t=6),0>n?(i=0,n=-n):15o||o>W||a!==U||8>n||15t||9l||l>M)return r(e,A);8===n&&(n=9);var d=new y;return e.state=d,d.strm=e,d.wrap=i,d.gzhead=null,d.w_bits=n,d.w_size=1<e.pending_buf_size-5&&(a=e.pending_buf_size-5);;){if(1>=e.lookahead){if(h(e),0===e.lookahead&&t===S)return re;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+a;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,i(e,!1),0===e.strm.avail_out))return re;if(e.strstart-e.block_start>=e.w_size-K&&(i(e,!1),0===e.strm.avail_out))return re}return e.insert=0,t===R?(i(e,!0),0===e.strm.avail_out?oe:le):e.strstart>e.block_start&&(i(e,!1),0===e.strm.avail_out)?re:re}),new m(4,4,8,4,s),new m(4,5,16,8,s),new m(4,6,32,32,s),new m(4,4,16,16,f),new m(8,16,32,32,f),new m(8,16,128,128,f),new m(8,32,128,256,f),new m(32,128,258,1024,f),new m(32,258,258,4096,f)],t.deflateInit=function(e,t){return x(e,t,U,15,8,0)},t.deflateInit2=x,t.deflateReset=w,t.deflateResetKeep=v,t.deflateSetHeader=function(e,t){return e&&e.state?2===e.state.wrap?(e.state.gzhead=t,B):A:A},t.deflate=function(e,t){var a,i,s,u;if(!e||!e.state||t>D||0>t)return e?r(e,A):A;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===ae&&t!==R)return r(e,0===e.avail_out?z:A);if(i.strm=e,a=i.last_flush,i.last_flush=t,i.status===q)if(2===i.wrap)e.adler=0,d(i,31),d(i,139),d(i,8),i.gzhead?(d(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),d(i,255&i.gzhead.time),d(i,255&i.gzhead.time>>8),d(i,255&i.gzhead.time>>16),d(i,255&i.gzhead.time>>24),d(i,9===i.level?2:i.strategy>=L||2>i.level?4:0),d(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(d(i,255&i.gzhead.extra.length),d(i,255&i.gzhead.extra.length>>8)),i.gzhead.hcrc&&(e.adler=C(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Q):(d(i,0),d(i,0),d(i,0),d(i,0),d(i,0),d(i,9===i.level?2:i.strategy>=L||2>i.level?4:0),d(i,3),i.status=te);else{var p=U+(i.w_bits-8<<4)<<8,h=-1;h=i.strategy>=L||2>i.level?0:6>i.level?1:6===i.level?2:3,p|=h<<6,0!==i.strstart&&(p|=32),p+=31-p%31,i.status=te,c(i,p),0!==i.strstart&&(c(i,e.adler>>>16),c(i,65535&e.adler)),e.adler=1}if(i.status===Q)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=C(e.adler,i.pending_buf,i.pending-s,s)),l(e),s=i.pending,i.pending===i.pending_buf_size));)d(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=C(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=J)}else i.status=J;if(i.status===J)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=C(e.adler,i.pending_buf,i.pending-s,s)),l(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexs&&(e.adler=C(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=$)}else i.status=$;if(i.status===$)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=C(e.adler,i.pending_buf,i.pending-s,s)),l(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexs&&(e.adler=C(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=ee)}else i.status=ee;if(i.status===ee&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&l(e),i.pending+2<=i.pending_buf_size&&(d(i,255&e.adler),d(i,255&e.adler>>8),e.adler=0,i.status=te)):i.status=te),0!==i.pending){if(l(e),0===e.avail_out)return i.last_flush=-1,B;}else if(0===e.avail_in&&n(t)<=n(a)&&t!==R)return r(e,z);if(i.status===ae&&0!==e.avail_in)return r(e,z);if(0!==e.avail_in||0!==i.lookahead||t!==S&&i.status!==ae){var f=i.strategy===L?g(i,t):i.strategy===3?_(i,t):ie[i.level].func(i,t);if((f===oe||f===le)&&(i.status=ae),f===re||f===oe)return 0===e.avail_out&&(i.last_flush=-1),B;if(f===ne&&(t===1?k._tr_align(i):t!==D&&(k._tr_stored_block(i,0,0,!1),t===3&&(o(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),l(e),0===e.avail_out))return i.last_flush=-1,B}return t===R?0>=i.wrap?P:(2===i.wrap?(d(i,255&e.adler),d(i,255&e.adler>>8),d(i,255&e.adler>>16),d(i,255&e.adler>>24),d(i,255&e.total_in),d(i,255&e.total_in>>8),d(i,255&e.total_in>>16),d(i,255&e.total_in>>24)):(c(i,e.adler>>>16),c(i,65535&e.adler)),l(e),0=r.w_size&&(0===n&&(o(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new E.Buf8(r.w_size),E.arraySet(u,t,a-r.w_size,r.w_size,0),t=u,a=r.w_size),s=e.avail_in,d=e.next_in,c=e.input,e.avail_in=a,e.next_in=0,e.input=t,h(r);r.lookahead>=Y;){l=r.strstart,i=r.lookahead-(Y-1);do r.ins_h=(r.ins_h<e?J[e]:J[256+(e>>>7)]}function i(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=255&t>>>8}function d(e,t,a){e.bi_valid>U-a?(e.bi_buf|=65535&t<>U-e.bi_valid,e.bi_valid+=a-U):(e.bi_buf|=65535&t<>>=1,a<<=1;while(0<--t);return a>>>1}function u(e){16===e.bi_valid?(i(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function p(e,t){var a=t.dyn_tree,r=t.max_code,o=t.stat_desc.static_tree,l=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,d=t.stat_desc.max_length,c=0,u,p,n,h,_,g;for(h=0;h<=F;h++)e.bl_count[h]=0;for(a[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;ud&&(h=d,c++),a[2*p+1]=h,!(p>r))&&(e.bl_count[h]++,_=0,p>=s&&(_=i[p-s]),g=a[2*p],e.opt_len+=g*(h+_),l&&(e.static_len+=g*(o[2*p+1]+_)));if(0!=c){do{for(h=d-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[d]--,c-=2}while(0r))&&(a[2*n+1]!==h&&(e.opt_len+=(h-a[2*n+1])*a[2*n],a[2*n+1]=h),p--)}}function h(e,t,a){var r=Array(F+1),o=0,l,i;for(l=1;l<=F;l++)r[l]=o=o+a[l-1]<<1;for(i=0;i<=t;i++){var n=e[2*i+1];0!==n&&(e[2*i]=s(r[n]++,n))}}function f(){var e=Array(F+1),t,a,r,n,l;for(r=0,n=0;nn;n++)for(te[n]=l,t=0;t<1<>=7;n=t;)q[2*t+1]=8,t++,e[8]++;for(;255>=t;)q[2*t+1]=9,t++,e[9]++;for(;279>=t;)q[2*t+1]=7,t++,e[7]++;for(;287>=t;)q[2*t+1]=8,t++,e[8]++;for(h(q,N+1,e),t=0;te.heap_len;)d=e.heap[++e.heap_len]=2>i?++i:0,a[2*d]=1,e.depth[d]=0,e.opt_len--,o&&(e.static_len-=r[2*d+1]);for(t.max_code=i,s=e.heap_len>>1;1<=s;s--)y(e,a,s);d=l;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],y(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=n,a[2*d]=a[2*s]+a[2*n],e.depth[d]=(e.depth[s]>=e.depth[n]?e.depth[s]:e.depth[n])+1,a[2*s+1]=a[2*n+1]=d,e.heap[1]=d++,y(e,a,1);while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],p(e,t),h(a,i,e.bl_count)}function x(e,t,a){var r=-1,o=t[1],l=0,i=7,s=4,d,n;for(0===o&&(i=138,s=3),t[2*(a+1)+1]=65535,d=0;d<=a;d++){if(n=o,o=t[2*(d+1)+1],++l=l?e.bl_tree[2*G]++:e.bl_tree[2*V]++:(n!==r&&e.bl_tree[2*n]++,e.bl_tree[2*H]++);l=0,r=n,0===o?(i=138,s=3):n===o?(i=6,s=3):(i=7,s=4)}}function E(e,t,a){var r=-1,o=t[1],l=0,i=7,s=4,u,n;for(0===o&&(i=138,s=3),u=0;u<=a;u++){if(n=o,o=t[2*(u+1)+1],++l=l?(c(e,G,e.bl_tree),d(e,l-3,3)):(c(e,V,e.bl_tree),d(e,l-11,7)):(n!==r&&(c(e,n,e.bl_tree),l--),c(e,H,e.bl_tree),d(e,l-3,2));l=0,r=n,0===o?(i=138,s=3):n===o?(i=6,s=3):(i=7,s=4)}}function k(e){var t;for(x(e,e.dyn_ltree,e.l_desc.max_code),x(e,e.dyn_dtree,e.d_desc.max_code),w(e,e.bl_desc),t=L-1;3<=t&&0===e.bl_tree[2*K[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function I(e,t,a,r){var n;for(d(e,t-257,5),d(e,a-1,5),d(e,r-4,4),n=0;n=a;a++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*a])return R;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return D;for(a=32;a>>3,l=e.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==t?T(e,t,a,r):e.strategy===4||l===o?(d(e,(P<<1)+(r?1:0),3),v(e,q,Q)):(d(e,(2<<1)+(r?1:0),3),I(e,e.l_desc.max_code+1,e.d_desc.max_code+1,n+1),v(e,e.dyn_ltree,e.dyn_dtree)),_(e),r&&g(e)},t._tr_tally=function(e,t,a){return e.pending_buf[e.d_buf+2*e.last_lit]=255&t>>>8,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&a,e.last_lit++,0===t?e.dyn_ltree[2*a]++:(e.matches++,t--,e.dyn_ltree[2*($[a]+z+1)]++,e.dyn_dtree[2*l(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){d(e,P<<1,3),c(e,j,q),u(e)}},function(e,t,a){'use strict';function r(e){if(!(this instanceof r))return new r(e);this.options=l.assign({chunkSize:16384,windowBits:0,to:''},e||{});var t=this.options;t.raw&&0<=t.windowBits&&16>t.windowBits&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),0<=t.windowBits&&16>t.windowBits&&!(e&&e.windowBits)&&(t.windowBits+=32),15t.windowBits&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg='',this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var a=o.inflateInit2(this.strm,t.windowBits);if(a!==s.Z_OK)throw new Error(d[a]);this.header=new u,o.inflateGetHeader(this.strm,this.header)}function n(e,t){var a=new r(t);if(a.push(e,!0),a.err)throw a.msg||d[a.err];return a.result}var o=a(29),l=a(0),i=a(11),s=a(13),d=a(8),c=a(12),u=a(32),p=Object.prototype.toString;r.prototype.push=function(e,t){var a=this.strm,r=this.options.chunkSize,n=this.options.dictionary,d=!1,c,u,h,f,_,g;if(this.ended)return!1;u=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,a.input='string'==typeof e?i.binstring2buf(e):'[object ArrayBuffer]'===p.call(e)?new Uint8Array(e):e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new l.Buf8(r),a.next_out=0,a.avail_out=r),c=o.inflate(a,s.Z_NO_FLUSH),c===s.Z_NEED_DICT&&n&&(g='string'==typeof n?i.string2buf(n):'[object ArrayBuffer]'===p.call(n)?new Uint8Array(n):n,c=o.inflateSetDictionary(this.strm,g)),c===s.Z_BUF_ERROR&&!0==d&&(c=s.Z_OK,d=!1),c!==s.Z_STREAM_END&&c!==s.Z_OK)return this.onEnd(c),this.ended=!0,!1;a.next_out&&(0===a.avail_out||c===s.Z_STREAM_END||0===a.avail_in&&(u===s.Z_FINISH||u===s.Z_SYNC_FLUSH))&&('string'===this.options.to?(h=i.utf8border(a.output,a.next_out),f=a.next_out-h,_=i.buf2string(a.output,h),a.next_out=f,a.avail_out=r-f,f&&l.arraySet(a.output,a.output,h,f,0),this.onData(_)):this.onData(l.shrinkBuf(a.output,a.next_out))),0===a.avail_in&&0===a.avail_out&&(d=!0)}while((0>>24)+(65280&e>>>8)+((65280&e)<<8)+((255&e)<<24)}function n(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new p.Buf16(320),this.work=new p.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg='',t.wrap&&(e.adler=1&t.wrap),t.mode=C,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new p.Buf32(re),t.distcode=t.distdyn=new p.Buf32(ne),t.sane=1,t.back=-1,w):x}function i(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,l(e)):x}function s(e,t){var a,r;return e&&e.state?(r=e.state,0>t?(a=0,t=-t):(a=(t>>4)+1,48>t&&(t&=15)),t&&(8>t||15t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(g(m,e.lens,0,288,le,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;g(b,e.lens,0,32,ie,0,e.work,{bits:5}),oe=!1}e.lencode=le,e.lenbits=9,e.distcode=ie,e.distbits=5}function u(e,t,a,r){var n=e.state,o;return null===n.window&&(n.wsize=1<=n.wsize?(p.arraySet(n.window,t,a-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(o=n.wsize-n.wnext,o>r&&(o=r),p.arraySet(n.window,t,a-r,o,n.wnext),r-=o,r?(p.arraySet(n.window,t,a-r,r,0),n.wnext=r,n.whave=n.wsize):(n.wnext+=o,n.wnext===n.wsize&&(n.wnext=0),n.whavede;){if(0===le)break inf_leave;le--,se+=d[ne++]<>>8,s.check=f(s.check,l,2,0),se=0,de=0,s.mode=T;break}if(s.flags=0,s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&se)<<8)+(se>>8))%31){t.msg='incorrect header check',s.mode=te;break}if((15&se)!=I){t.msg='unknown compression method',s.mode=te;break}if(se>>>=4,de-=4,we=(15&se)+8,0===s.wbits)s.wbits=we;else if(we>s.wbits){t.msg='invalid window size',s.mode=te;break}s.dmax=1<de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>8),512&s.flags&&(l[0]=255&se,l[1]=255&se>>>8,s.check=f(s.check,l,2,0)),se=0,de=0,s.mode=S;case S:for(;32>de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>>8,l[2]=255&se>>>16,l[3]=255&se>>>24,s.check=f(s.check,l,4,0)),se=0,de=0,s.mode=R;case R:for(;16>de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>8),512&s.flags&&(l[0]=255&se,l[1]=255&se>>>8,s.check=f(s.check,l,2,0)),se=0,de=0,s.mode=D;case D:if(1024&s.flags){for(;16>de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>>8,s.check=f(s.check,l,2,0)),se=0,de=0}else s.head&&(s.head.extra=null);s.mode=B;case B:if(1024&s.flags&&(pe=s.length,pe>le&&(pe=le),pe&&(s.head&&(we=s.head.extra_len-s.length,!s.head.extra&&(s.head.extra=Array(s.head.extra_len)),p.arraySet(s.head.extra,d,ne,pe,we)),512&s.flags&&(s.check=f(s.check,d,pe,ne)),le-=pe,ne+=pe,s.length-=pe),s.length))break inf_leave;s.length=0,s.mode=P;case P:if(2048&s.flags){if(0===le)break inf_leave;pe=0;do we=d[ne+pe++],s.head&&we&&65536>s.length&&(s.head.name+=e(we));while(we&&pes.length&&(s.head.comment+=e(we));while(we&&pede;){if(0===le)break inf_leave;le--,se+=d[ne++]<>9,s.head.done=!0),t.adler=s.check=0,s.mode=L;break;case N:for(;32>de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>>=7&de,de-=7&de,s.mode=J;break}for(;3>de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>>=1,de-=1,3&se){case 0:s.mode=F;break;case 1:if(c(s),s.mode=V,a===v){se>>>=2,de-=2;break inf_leave}break;case 2:s.mode=j;break;case 3:t.msg='invalid block type',s.mode=te;}se>>>=2,de-=2;break;case F:for(se>>>=7&de,de-=7&de;32>de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>>16)){t.msg='invalid stored block lengths',s.mode=te;break}if(s.length=65535&se,se=0,de=0,s.mode=U,a===v)break inf_leave;case U:s.mode=W;case W:if(pe=s.length,pe){if(pe>le&&(pe=le),pe>ie&&(pe=ie),0===pe)break inf_leave;p.arraySet(re,d,ne,pe,oe),le-=pe,ne+=pe,ie-=pe,oe+=pe,s.length-=pe;break}s.mode=L;break;case j:for(;14>de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>>=5,de-=5,s.ndist=(31&se)+1,se>>>=5,de-=5,s.ncode=(15&se)+4,se>>>=4,de-=4,286de;){if(0===le)break inf_leave;le--,se+=d[ne++]<>>=3,de-=3}for(;19>s.have;)s.lens[i[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,Ee={bits:s.lenbits},xe=g(0,s.lens,0,19,s.lencode,0,s.work,Ee),s.lenbits=Ee.bits,xe){t.msg='invalid code lengths set',s.mode=te;break}s.have=0,s.mode=G;case G:for(;s.have>>24,ge=255&r>>>16,me=65535&r,_e<=de)break;if(0===le)break inf_leave;le--,se+=d[ne++]<me)se>>>=_e,de-=_e,s.lens[s.have++]=me;else{if(16===me){for(ke=_e+2;de>>=_e,de-=_e,0===s.have){t.msg='invalid bit length repeat',s.mode=te;break}we=s.lens[s.have-1],pe=3+(3&se),se>>>=2,de-=2}else if(17===me){for(ke=_e+3;de>>=_e,de-=_e,we=0,pe=3+(7&se),se>>>=3,de-=3}else{for(ke=_e+7;de>>=_e,de-=_e,we=0,pe=11+(127&se),se>>>=7,de-=7}if(s.have+pe>s.nlen+s.ndist){t.msg='invalid bit length repeat',s.mode=te;break}for(;pe--;)s.lens[s.have++]=we}}if(s.mode===te)break;if(0===s.lens[256]){t.msg='invalid code -- missing end-of-block',s.mode=te;break}if(s.lenbits=9,Ee={bits:s.lenbits},xe=g(m,s.lens,0,s.nlen,s.lencode,0,s.work,Ee),s.lenbits=Ee.bits,xe){t.msg='invalid literal/lengths set',s.mode=te;break}if(s.distbits=6,s.distcode=s.distdyn,Ee={bits:s.distbits},xe=g(b,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,Ee),s.distbits=Ee.bits,xe){t.msg='invalid distances set',s.mode=te;break}if(s.mode=V,a===v)break inf_leave;case V:s.mode=X;case X:if(6<=le&&258<=ie){t.next_out=oe,t.avail_out=ie,t.next_in=ne,t.avail_in=le,s.hold=se,s.bits=de,_(t,ue),oe=t.next_out,re=t.output,ie=t.avail_out,ne=t.next_in,d=t.input,le=t.avail_in,se=s.hold,de=s.bits,s.mode===L&&(s.back=-1);break}for(s.back=0;;){if(r=s.lencode[se&(1<>>24,ge=255&r>>>16,me=65535&r,_e<=de)break;if(0===le)break inf_leave;le--,se+=d[ne++]<>be)],_e=r>>>24,ge=255&r>>>16,me=65535&r,be+_e<=de)break;if(0===le)break inf_leave;le--,se+=d[ne++]<>>=be,de-=be,s.back+=be}if(se>>>=_e,de-=_e,s.back+=_e,s.length=me,0===ge){s.mode=Q;break}if(32&ge){s.back=-1,s.mode=L;break}if(64&ge){t.msg='invalid literal/length code',s.mode=te;break}s.extra=15&ge,s.mode=Y;case Y:if(s.extra){for(ke=s.extra;de>>=s.extra,de-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=Z;case Z:for(;;){if(r=s.distcode[se&(1<>>24,ge=255&r>>>16,me=65535&r,_e<=de)break;if(0===le)break inf_leave;le--,se+=d[ne++]<>be)],_e=r>>>24,ge=255&r>>>16,me=65535&r,be+_e<=de)break;if(0===le)break inf_leave;le--,se+=d[ne++]<>>=be,de-=be,s.back+=be}if(se>>>=_e,de-=_e,s.back+=_e,64&ge){t.msg='invalid distance code',s.mode=te;break}s.offset=me,s.extra=15&ge,s.mode=K;case K:if(s.extra){for(ke=s.extra;de>>=s.extra,de-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){t.msg='invalid distance too far back',s.mode=te;break}s.mode=q;case q:if(0===ie)break inf_leave;if(pe=ue-ie,s.offset>pe){if(pe=s.offset-pe,pe>s.whave&&s.sane){t.msg='invalid distance too far back',s.mode=te;break}pe>s.wnext?(pe-=s.wnext,he=s.wsize-pe):he=s.wnext-pe,pe>s.length&&(pe=s.length),fe=s.window}else fe=re,he=oe-s.offset,pe=s.length;pe>ie&&(pe=ie),ie-=pe,s.length-=pe;do re[oe++]=fe[he++];while(--pe);0===s.length&&(s.mode=X);break;case Q:if(0===ie)break inf_leave;re[oe++]=s.length,ie--,s.mode=X;break;case J:if(s.wrap){for(;32>de;){if(0===le)break inf_leave;le--,se|=d[ne++]<de;){if(0===le)break inf_leave;le--,se+=d[ne++]<_&&(f+=C[n++]<<_,_+=8,f+=C[n++]<<_,_+=8),v=g[f&b];dolen:for(;;){if(w=v>>>24,f>>>=w,_-=w,w=255&v>>>16,0===w)T[l++]=65535&v;else if(16&w){x=65535&v,w&=15,w&&(_>>=w,_-=w),15>_&&(f+=C[n++]<<_,_+=8,f+=C[n++]<<_,_+=8),v=m[f&y];dodist:for(;;){if(w=v>>>24,f>>>=w,_-=w,w=255&v>>>16,16&w){if(E=65535&v,w&=15,_d){e.msg='invalid distance too far back',r.mode=t;break top}if(f>>>=w,_-=w,w=l-i,E>w){if(w=E-w,w>u&&r.sane){e.msg='invalid distance too far back',r.mode=t;break top}if(k=0,I=h,0===p){if(k+=c-w,w>3,n-=x,_-=x<<3,f&=(1<<_)-1,e.next_in=n,e.next_out=l,e.avail_in=nE&&(k=E),0==E)return _[g++]=20971520,_[g++]=20971520,b.bits=1,0;for(x=1;xT)return-1;if(0o||e===d&&S>l)return 1;for(;;){j=v-C,m[w]W?(H=z[N+m[w]],G=D[B+m[w]]):(H=96,G=0),O=1<>C)+L]=0|(j<<24|H<<16|G);while(0!==L);for(O=1<>=1;if(0===O?R=0:(R&=O-1,R+=O),w++,0==--P[v]){if(v==E)break;v=t[a+m[w]]}if(v>k&&(R&F)!==M){for(0==C&&(C=k),U+=x,I=v-C,T=1<=T));)I++,T<<=1;if(S+=1<o||e===d&&S>l)return 1;M=R&F,_[M]=0|(k<<24|I<<16|U-g)}}return 0!==R&&(_[U+R]=0|(4194304|v-C<<24)),b.bits=k,0}},function(e){'use strict';e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name='',this.comment='',this.hcrc=0,this.done=!1}},function(e,t){'use strict';var a=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))(function(n,o){function l(e){try{s(r.next(e))}catch(t){o(t)}}function i(e){try{s(r['throw'](e))}catch(t){o(t)}}function s(e){e.done?n(e.value):new a(function(t){t(e.value)}).then(l,i)}s((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,a){function r(e){return function(t){return o([e,t])}}function o(r){if(l)throw new TypeError('Generator is already executing.');for(;n;)try{if(l=1,i&&(s=i[2&r[0]?'return':r[0]?'throw':'next'])&&!(s=s.call(i,r[1])).done)return s;switch((i=0,s)&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,i=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if((s=n.trys,!(s=0s[0]&&r[1]s[0]&&r[1]'),a.firstChild.href},t.prototype.setDescriptorAndParameters=function(e,t){return n(this,void 0,void 0,function(){var a=this,r,n,l,i,s;return o(this,function(o){switch(o.label){case 0:return this.descriptor=e,this.placeholderContext=new d.default(this.descriptor.placeholders),r='object'==typeof WebAssembly?'webassembly':'asmjs',0<=window.navigator.userAgent.indexOf('iPhone OS 11_2')&&(r='asmjs'),n=this.directory+'/kernels_'+r+'.js',n=this.transformUrlDelegate(n),this.worker_entry_js_path=n,[4,fetch(this.worker_entry_js_path)];case 1:return l=o.sent(),[4,l.text()];case 2:return i=o.sent(),s=function(e,t){var r=a.absolutePath(a.directory+'/'+e),n=a.transformUrlDelegate(r);i=i.replace(t,n)},'webassembly'===r?s('kernels_webassembly.wasm','WEBDNN_URL_KERNELS_WASM'):s('kernels_asmjs.js.mem','WEBDNN_URL_KERNELS_ASMJS_MEM'),[4,this.compile(i)];case 3:return o.sent(),[4,this.loadWeights(new Uint8Array(t))];case 4:return o.sent(),[4,this.getInputViews()];case 5:return o.sent().filter(function(e){return!e.isDynamic}).forEach(function(e){e.buffer=new Float32Array(e.length).buffer}),[4,this.getOutputViews()];case 6:return o.sent().filter(function(e){return!e.isDynamic}).forEach(function(e){e.buffer=new Float32Array(e.length).buffer}),[2];}})})},t.prototype.fetchDescriptor=function(e){return n(this,void 0,void 0,function(){var t;return o(this,function(a){switch(a.label){case 0:return this.directory=e,[4,s.default(e+'/graph_'+this.backendName+'.json',this.transformUrlDelegate)];case 1:return t=a.sent(),[2,t.json()];}})})},t.prototype.fetchParameters=function(e,t){return n(this,void 0,void 0,function(){var a,r;return o(this,function(n){switch(n.label){case 0:return a=e+'/weight_'+this.backendName+'.bin',[4,s.default(a,this.transformUrlDelegate)];case 1:return r=n.sent(),[2,s.readArrayBufferProgressively(r,t)];}})})},t.prototype.restoreCachedDescriptor=function(e){return n(this,void 0,void 0,function(){return o(this,function(){return this.directory=e,[2,l.getItem(e+'_'+this.backendName+'_descriptor').catch(function(){return null})]})})},t.prototype.restoreCachedParameters=function(e,t){return n(this,void 0,void 0,function(){var a;return o(this,function(r){switch(r.label){case 0:return[4,l.getItem(e+'_'+this.backendName+'_parameters').catch(function(){return null})];case 1:return a=r.sent(),a&&t&&t(a.byteLength,a.byteLength),[2,a];}})})},t.prototype.saveCache=function(e,t,a){return n(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,Promise.all([l.setItem(e+'_'+this.backendName+'_descriptor',t),l.setItem(e+'_'+this.backendName+'_parameters',a)])];case 1:return r.sent(),[2];}})})},(t.prototype.setPlaceholderValue=function(e){return n(this,void 0,void 0,function(){var t,a,r,n,l,i,s;return o(this,function(o){switch(o.label){case 0:if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized.');if(t=this.placeholderContext,t.update(e),!t.isResolved)return[2];if(!this.descriptor)throw new Error('Descriptor is not loaded');for(a=this.descriptor,r=a.unresolved_value_lists,n=[],l=function(e){var a=r[e];a.forEach(function(a){var r=t.resolve(a.placeholder);n.push(e,a.offset,r)})},i=0;ii;i++)if(c=l[i][a.inputs[d]],c){var u=e.inputs[d];s.push({space:i,offset:t.resolve(c.offset),size:u.length,data:u.toActual()});break}for(var p=[],d=0;di;i++)if(c=l[i][a.outputs[d]],c){var u=e.outputs[d];p.push({space:i,offset:t.resolve(c.offset),size:u.length});break}r.postMessage({type:'run',inputs:s,outputs:p})}),[2,n]})})},t)}(u.DescriptorRunner);t.default=p},function(e,t,a){'use strict';var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}(),n=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))(function(n,o){function l(e){try{s(r.next(e))}catch(t){o(t)}}function i(e){try{s(r['throw'](e))}catch(t){o(t)}}function s(e){e.done?n(e.value):new a(function(t){t(e.value)}).then(l,i)}s((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,a){function r(e){return function(t){return o([e,t])}}function o(r){if(l)throw new TypeError('Generator is already executing.');for(;n;)try{if(l=1,i&&(s=i[2&r[0]?'return':r[0]?'throw':'next'])&&!(s=s.call(i,r[1])).done)return s;switch((i=0,s)&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,i=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if((s=n.trys,!(s=0s[0]&&r[1]s[0]&&r[1]s[0]&&r[1]\nusing namespace metal;\n kernel void check_compatibility(\n device uint *A[[buffer(0)]],\n uint global_index[[thread_position_in_grid]],\n uint thread_execution_width[[thread_execution_width]]\n ){\n if (global_index == 0) {\n A[0] = thread_execution_width;\n }\n }','basic'),e=this.webgpuHandler.createBuffer(new Uint32Array(1)),[4,this.webgpuHandler.executeSinglePipelineState('basic.check_compatibility',{width:1,height:1,depth:1},{width:1,height:1,depth:1},[e],!0)];case 1:if(a.sent(),t=new Uint32Array(e.contents)[0],32!=t)throw new Error('Sorry, this GPU does not compatible with WebGPU (thread_execution_width == '+t+'. See checkIncompatibleGPU method of https://github.com/mil-tokyo/webdnn/blob/master/src/descriptor_runner/descriptor_runner/descriptor_runner_webgpu.ts');return[2];}})})},t.prototype.fetchDescriptor=function(e){return n(this,void 0,void 0,function(){var t;return o(this,function(a){switch(a.label){case 0:return[4,d.default(e+'/graph_'+this.backendName+'.json',this.transformUrlDelegate)];case 1:return t=a.sent(),[2,t.json()];}})})},t.prototype.fetchParameters=function(e,t){return n(this,void 0,void 0,function(){var a;return o(this,function(r){switch(r.label){case 0:return[4,d.default(e+'/weight_'+this.backendName+'.bin',this.transformUrlDelegate)];case 1:return a=r.sent(),[2,d.readArrayBufferProgressively(a,t)];}})})},t.prototype.restoreCachedDescriptor=function(e){return n(this,void 0,void 0,function(){return o(this,function(){return[2,l.getItem(e+'_'+this.backendName+'_descriptor').catch(function(){return null})]})})},t.prototype.restoreCachedParameters=function(e,t){return n(this,void 0,void 0,function(){var a;return o(this,function(r){switch(r.label){case 0:return[4,l.getItem(e+'_'+this.backendName+'_parameters').catch(function(){return null})];case 1:return a=r.sent(),a&&t&&t(a.byteLength,a.byteLength),[2,a];}})})},t.prototype.saveCache=function(e,t,a){return n(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,Promise.all([l.setItem(e+'_'+this.backendName+'_descriptor',t),l.setItem(e+'_'+this.backendName+'_parameters',a)])];case 1:return r.sent(),[2];}})})},(t.prototype.setDescriptorAndParameters=function(e,t){return n(this,void 0,void 0,function(){return o(this,function(a){switch(a.label){case 0:return this.descriptor=e,this.staticBuffer=null,this.dynamicBuffer=null,this.metaBuffers=null,this.placeholderContext=new c.default(e.placeholders),this.executionInfos=e.exec_infos,this.webgpuHandler.loadKernel(this.descriptor.kernel_source,'descriptor'),[4,this.initializeStaticBuffer(t)];case 1:return a.sent(),[4,this.initializeMetaBuffers()];case 2:return a.sent(),[4,this.setPlaceholderValue({__MAX_THREADS_PER_THREADGROUP__:_?512:1024})];case 3:return a.sent(),this.placeholderContext&&this.placeholderContext.isResolved?[4,this.initializeDynamicBuffer()]:[3,5];case 4:a.sent(),a.label=5;case 5:return[2];}})})},t.prototype.initializeStaticBuffer=function(e){return n(this,void 0,void 0,function(){var t,a,r,n,l;return o(this,function(o){switch(o.label){case 0:if(!this.descriptor)throw Error('GraphDescriptor is not loaded.');return t=this.descriptor,a=new i.default(t.memory_layout.static.size*Float32Array.BYTES_PER_ELEMENT),this.staticBuffer=a,r=s.default(t.weight_encoding),l=(n=a).write,[4,r.decode(new Uint8Array(e))];case 1:return[4,l.apply(n,[o.sent()])];case 2:return o.sent(),[4,this.getInputViews()];case 3:return o.sent().filter(function(e){return!e.isDynamic}).forEach(function(e){e.buffer=a.bufferView.buffer}),[4,this.getOutputViews()];case 4:return o.sent().filter(function(e){return!e.isDynamic}).forEach(function(e){e.buffer=a.bufferView.buffer}),[2];}})})},t.prototype.initializeMetaBuffers=function(){return n(this,void 0,void 0,function(){var e=this,t;return o(this,function(a){switch(a.label){case 0:if(!this.descriptor)throw Error('GraphDescriptor is not loaded.');return t=this,[4,Promise.all(this.descriptor.exec_infos.map(function(t){return n(e,void 0,void 0,function(){var e;return o(this,function(a){switch(a.label){case 0:return e=new i.default(t.meta_buffer.length*Int32Array.BYTES_PER_ELEMENT),[4,e.write(new Uint8Array(t.meta_buffer))];case 1:return a.sent(),[2,e];}})})}))];case 1:return t.metaBuffers=a.sent(),[2];}})})},t.prototype.initializeDynamicBuffer=function(){return n(this,void 0,void 0,function(){var e,t,a,r;return o(this,function(n){switch(n.label){case 0:if(!this.descriptor)throw Error('GraphDescriptor is not loaded.');if(!this.placeholderContext)throw Error('PlaceholderContext is not initialized.');return e=this.descriptor,t=this.placeholderContext,a=t.resolve(e.memory_layout.dynamic.size),r=new i.default(a*Float32Array.BYTES_PER_ELEMENT),this.dynamicBuffer=r,[4,this.getInputViews()];case 1:return n.sent().filter(function(e){return e.isDynamic}).forEach(function(e){e.buffer=r.bufferView.buffer}),[4,this.getOutputViews()];case 2:return n.sent().filter(function(e){return e.isDynamic}).forEach(function(e){e.buffer=r.bufferView.buffer}),[2];}})})},t.prototype.setPlaceholderValue=function(e){return n(this,void 0,void 0,function(){var t=this,a,r,l,i;return o(this,function(s){switch(s.label){case 0:if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized.');if(a=this.placeholderContext,a.update(e),!a.isResolved)return[2];if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.metaBuffers)throw new Error('MetaBuffers are not initialized');return r=this.descriptor,l=this.metaBuffers,[4,this.initializeDynamicBuffer()];case 1:return s.sent(),i=this,[4,Promise.all(r.exec_infos.map(function(e,r){return n(t,void 0,void 0,function(){var t,n,i,s;return o(this,function(){for(t=new Int32Array(l[r].bufferView.buffer),n=0,i=e.unresolved_value_list;ns[0]&&r[1]=i-1)){for(;;){for(;e[d]>s&&d<=c;)d++;for(;e[c]<=s&&d<=c;)c--;if(d>=c)break;u=e[d],e[d]=e[c],e[c]=u,u=r[d],r[d]=r[c],r[c]=u}e[i-1]=e[d],e[d]=s,u=r[i-1],r[i-1]=r[d],r[d]=u,a.push([l,d]),d+1=i-1)){for(;;){for(;e[d]=s&&d<=c;)c--;if(d>=c)break;u=e[d],e[d]=e[c],e[c]=u,u=r[d],r[d]=r[c],r[c]=u}e[i-1]=e[d],e[d]=s,u=r[i-1],r[i-1]=r[d],r[d]=u,a.push([l,d]),d+1=t.oldVersion&&r.createObjectStore(P)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),o.onerror=function(e){e.preventDefault(),n(o.error)},o.onsuccess=function(){r(o.result),c(e)}})}function h(e){return f(e,!1)}function d(e){return f(e,!0)}function p(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.versione.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function b(e){var t=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i>4,l[u++]=(15&n)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return c}function w(e){var t,r=new Uint8Array(e),n="";for(t=0;t>2],n+=j[(3&r[t])<<4|r[t+1]>>4],n+=j[(15&r[t+1])<<2|r[t+2]>>6],n+=j[63&r[t+2]];return 2==r.length%3?n=n.substring(0,n.length-1)+"=":1==r.length%3&&(n=n.substring(0,n.length-2)+"=="),n}function g(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function E(e,t,r,n,i,o){e.executeSql(r,n,i,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?o(e,a):g(e,t,function(){e.executeSql(r,n,i,o)},o)},o):o(e,a)},o)}function x(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function k(){return!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||0e?void t(null):void r.ready().then(function(){y(r._dbInfo,O,function(i,o){if(i)return n(i);try{var a=o.objectStore(r._dbInfo.storeName),s=!1,u=a.openCursor();u.onsuccess=function(){var r=u.result;return r?void(0===e?t(r.key):s?t(r.key):(s=!0,r.advance(e))):void t(null)},u.onerror=function(){n(u.error)}}catch(e){n(e)}})}).catch(n)});return n(i,t),i},keys:function(e){var t=this,r=new I(function(e,r){t.ready().then(function(){y(t._dbInfo,O,function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openCursor(),a=[];o.onsuccess=function(){var t=o.result;return t?(a.push(t.key),void t.continue()):void e(a)},o.onerror=function(){r(o.error)}}catch(e){r(e)}})}).catch(r)});return n(r,e),r},dropInstance:function(e,t){t=a.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var i;if(e.name){var o=e.name===r.name&&this._dbInfo.db?I.resolve(this._dbInfo.db):h(e).then(function(t){var r=B[e.name],n=r.forages;r.db=t;for(var i=0;i '__WebKitDatabaseInfoTable__'",[],function(r,n){for(var i=[],o=0;oa[0]&&r[1]>>16,a=0;0!==r;){r-=a=2e3r;r++){e=r;for(var n=0;8>n;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){e^=-1;for(var o=i;o>>8^t[255&(e^r[o])];return-1^e}},function(e,t,r){"use strict";function n(e,t){if(65534>t&&(e.subarray&&a||!e.subarray&&o))return _StringfromCharCode.apply(null,i.shrinkBuf(e,t));for(var r="",n=0;nu;u++)s[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;s[254]=s[254]=1,t.string2buf=function(e){var t,r,n,o,a,s=e.length,u=0;for(o=0;or?1:2048>r?2:65536>r?3:4;for(t=new i.Buf8(u),a=0,o=0;ar?t[a++]=r:2048>r?(t[a++]=192|r>>>6,t[a++]=128|63&r):65536>r?(t[a++]=224|r>>>12,t[a++]=128|63&r>>>6,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|63&r>>>12,t[a++]=128|63&r>>>6,t[a++]=128|63&r);return t},t.buf2binstring=function(e){return n(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),r=0,n=t.length;r(o=e[r++]))c[i++]=o;else if(4<(a=s[o]))c[i++]=65533,r+=a-1;else{for(o&=2===a?31:3===a?15:7;1o?c[i++]=o:(o-=65536,c[i++]=55296|1023&o>>10,c[i++]=56320|1023&o)}return n(c,i)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return 0>r?t:0===r?t:r+s[e[r]]>t?r:t}},function(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,r){"use strict";function n(e){return"WebGL2RenderingContext"===e.constructor.name}function i(e){if(null===e)throw Error("Null is detected");return e}var o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]s.getConfiguration("MAX_TEXTURE_SIZE",t.getParameter(t.MAX_TEXTURE_SIZE)))}return l},e.prototype.waitForComplete=function(){return o(this,void 0,void 0,function(){var e,t,r;return a(this,function(i){switch(i.label){case 0:if(!n(e=this.gl))return[3,4];t=e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE,0),r=e.clientWaitSync(t,0,0),i.label=1;case 1:return r===e.CONDITION_SATISFIED||r===e.ALREADY_SIGNALED?[3,3]:[4,new Promise(function(e){return setTimeout(e,1)})];case 2:return i.sent(),r=e.clientWaitSync(t,0,0),[3,1];case 3:return e.deleteSync(t),[3,5];case 4:e.finish(),i.label=5;case 5:return[2]}})})},Object.defineProperty(e.prototype,"MAX_TEXTURE_SIZE",{get:function(){var e=s.getConfiguration("MAX_TEXTURE_SIZE",this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE));if(16384<=e)return 4096;if(8192<=e)return 4096;if(4096<=e)return 4096;throw new Error("MAX_TEXTURE_SIZE is too small: "+e)},enumerable:!0,configurable:!0}),e.IS_SAFARI=-1!==navigator.userAgent.toLowerCase().indexOf("safari")&&-1===navigator.userAgent.toLowerCase().indexOf("chrome"),e}();t.default=c;var l=null},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.byteLength=e,this.backend=t};t.Buffer=r},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]a[0]&&r[1]a[0]&&r[1]a[0]&&r[1]a[0]&&r[1]y;y++)l[y]=e.decode_table[127&y]*c*(128>y?1:-1);for(f=new Uint8Array(t.buffer,t.byteOffset+s,u),h=o.inflate(f),d=h.length,p=new Float32Array(d),b=0;bt.windowBits&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=o.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f)throw new Error(u[r]);if(t.header&&o.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(i="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=o.deflateSetDictionary(this.strm,i))!==f)throw new Error(u[r]);this._dict_set=!0}}function i(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg||u[r.err];return r.result}var o=r(26),a=r(0),s=r(11),u=r(8),c=r(12),l=Object.prototype.toString,f=0,h=-1,d=0,p=8;n.prototype.push=function(e,t){var r,n,i=this.strm,u=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,i.input="string"==typeof e?s.string2buf(e):"[object ArrayBuffer]"===l.call(e)?new Uint8Array(e):e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new a.Buf8(u),i.next_out=0,i.avail_out=u),1!==(r=o.deflate(i,n))&&r!==f)return this.onEnd(r),this.ended=!0,!1;(0===i.avail_out||0===i.avail_in&&(4===n||2===n))&&("string"===this.options.to?this.onData(s.buf2binstring(a.shrinkBuf(i.output,i.next_out))):this.onData(a.shrinkBuf(i.output,i.next_out)))}while((0e.avail_out&&(r=e.avail_out),0===r||(x.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function s(e,t){k._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,a(e.strm)}function u(e,t){e.pending_buf[e.pending++]=t}function c(e,t){e.pending_buf[e.pending++]=255&t>>>8,e.pending_buf[e.pending++]=255&t}function l(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,x.arraySet(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=S(e.adler,t,i,r):2===e.state.wrap&&(e.adler=A(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function f(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-J?e.strstart-(e.w_size-J):0,c=e.window,l=e.w_mask,f=e.prev,h=e.strstart+Q,d=c[o+a-1],p=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+a]===p&&c[r+a-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(e.match_start=t,a=n,n>=s)break;d=c[o+a-1],p=c[o+a]}}}while((t=f[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function h(e){var t,r,n,i,o,a=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-J)){x.arraySet(e.window,e.window,a,a,0),e.match_start-=a,e.strstart-=a,e.block_start-=a,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=a?n-a:0}while(--r);t=r=a;do{n=e.prev[--t],e.prev[t]=n>=a?n-a:0}while(--r);i+=a}if(0===e.strm.avail_in)break;if(r=l(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=q)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=q&&(e.ins_h=(e.ins_h<=q)if(n=k._tr_tally(e,e.strstart-e.match_start,e.match_length-q),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=q){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=q&&(e.ins_h=(e.ins_h<=e.match_length&&(e.strategy===F||e.match_length===q&&4096=q&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-q,n=k._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-q),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<=q&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=q?(r=k._tr_tally(e,1,e.match_length-q),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(s(e,!1),0===e.strm.avail_out))return se}return e.insert=0,t===D?(s(e,!0),0===e.strm.avail_out?ce:le):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?se:ue}function v(e,t){for(var r;;){if(0===e.lookahead&&(h(e),0===e.lookahead)){if(t===C)return se;break}if(e.match_length=0,r=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(s(e,!1),0===e.strm.avail_out))return se}return e.insert=0,t===D?(s(e,!0),0===e.strm.avail_out?ce:le):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?se:ue}function _(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=H,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new x.Buf16(2*Z),this.dyn_dtree=new x.Buf16(2*(2*X+1)),this.bl_tree=new x.Buf16(2*(2*Y+1)),o(this.dyn_ltree),o(this.dyn_dtree),o(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new x.Buf16(K+1),this.heap=new x.Buf16(2*V+1),o(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new x.Buf16(2*V+1),o(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function m(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=W,(t=e.state).pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?ee:oe,e.adler=2===t.wrap?0:1,t.last_flush=C,k._tr_init(t),R):n(e,z)}function w(e){var t=m(e);return t===R&&function(e){e.window_size=2*e.w_size,o(e.head),e.max_lazy_match=E[e.level].max_lazy,e.good_match=E[e.level].good_length,e.nice_match=E[e.level].nice_length,e.max_chain_length=E[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=q-1,e.match_available=0,e.ins_h=0}(e.state),t}function g(e,t,r,i,o,a){if(!e)return z;var s=1;if(t===j&&(t=6),0>i?(s=0,i=-i):15o||o>G||r!==H||8>i||15t||9a||a>U)return n(e,z);8===i&&(i=9);var u=new y;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=i,u.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(1>=e.lookahead){if(h(e),0===e.lookahead&&t===C)return se;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,s(e,!1),0===e.strm.avail_out))return se;if(e.strstart-e.block_start>=e.w_size-J&&(s(e,!1),0===e.strm.avail_out))return se}return e.insert=0,t===D?(s(e,!0),0===e.strm.avail_out?ce:le):(e.strstart>e.block_start&&(s(e,!1),e.strm.avail_out),se)}),new _(4,4,8,4,d),new _(4,5,16,8,d),new _(4,6,32,32,d),new _(4,4,16,16,p),new _(8,16,32,32,p),new _(8,16,128,128,p),new _(8,32,128,256,p),new _(32,128,258,1024,p),new _(32,258,258,4096,p)],t.deflateInit=function(e,t){return g(e,t,H,15,8,0)},t.deflateInit2=g,t.deflateReset=w,t.deflateResetKeep=m,t.deflateSetHeader=function(e,t){return e&&e.state&&2===e.state.wrap?(e.state.gzhead=t,R):z},t.deflate=function(e,t){var r,s,l,f;if(!e||!e.state||t>B||0>t)return e?n(e,z):z;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===ae&&t!==D)return n(e,0===e.avail_out?N:z);if(s.strm=e,r=s.last_flush,s.last_flush=t,s.status===ee)if(2===s.wrap)e.adler=0,u(s,31),u(s,139),u(s,8),s.gzhead?(u(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),u(s,255&s.gzhead.time),u(s,255&s.gzhead.time>>8),u(s,255&s.gzhead.time>>16),u(s,255&s.gzhead.time>>24),u(s,9===s.level?2:s.strategy>=L||2>s.level?4:0),u(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(u(s,255&s.gzhead.extra.length),u(s,255&s.gzhead.extra.length>>8)),s.gzhead.hcrc&&(e.adler=A(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=te):(u(s,0),u(s,0),u(s,0),u(s,0),u(s,0),u(s,9===s.level?2:s.strategy>=L||2>s.level?4:0),u(s,fe),s.status=oe);else{var h=H+(s.w_bits-8<<4)<<8;h|=(s.strategy>=L||2>s.level?0:6>s.level?1:6===s.level?2:3)<<6,0!==s.strstart&&(h|=$),h+=31-h%31,s.status=oe,c(s,h),0!==s.strstart&&(c(s,e.adler>>>16),c(s,65535&e.adler)),e.adler=1}if(s.status===te)if(s.gzhead.extra){for(l=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>l&&(e.adler=A(e.adler,s.pending_buf,s.pending-l,l)),a(e),l=s.pending,s.pending!==s.pending_buf_size));)u(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>l&&(e.adler=A(e.adler,s.pending_buf,s.pending-l,l)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=re)}else s.status=re;if(s.status===re)if(s.gzhead.name){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(e.adler=A(e.adler,s.pending_buf,s.pending-l,l)),a(e),l=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindexl&&(e.adler=A(e.adler,s.pending_buf,s.pending-l,l)),0===f&&(s.gzindex=0,s.status=ne)}else s.status=ne;if(s.status===ne)if(s.gzhead.comment){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(e.adler=A(e.adler,s.pending_buf,s.pending-l,l)),a(e),l=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindexl&&(e.adler=A(e.adler,s.pending_buf,s.pending-l,l)),0===f&&(s.status=ie)}else s.status=ie;if(s.status===ie&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&a(e),s.pending+2<=s.pending_buf_size&&(u(s,255&e.adler),u(s,255&e.adler>>8),e.adler=0,s.status=oe)):s.status=oe),0!==s.pending){if(a(e),0===e.avail_out)return s.last_flush=-1,R}else if(0===e.avail_in&&i(t)<=i(r)&&t!==D)return n(e,N);if(s.status===ae&&0!==e.avail_in)return n(e,N);if(0!==e.avail_in||0!==s.lookahead||t!==C&&s.status!==ae){var d=s.strategy===L?v(s,t):s.strategy===M?b(s,t):E[s.level].func(s,t);if((d===ce||d===le)&&(s.status=ae),d===se||d===ce)return 0===e.avail_out&&(s.last_flush=-1),R;if(d===ue&&(t===I?k._tr_align(s):t!==B&&(k._tr_stored_block(s,0,0,!1),t===P&&(o(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),a(e),0===e.avail_out))return s.last_flush=-1,R}return t===D?0>=s.wrap?O:(2===s.wrap?(u(s,255&e.adler),u(s,255&e.adler>>8),u(s,255&e.adler>>16),u(s,255&e.adler>>24),u(s,255&e.total_in),u(s,255&e.total_in>>8),u(s,255&e.total_in>>16),u(s,255&e.total_in>>24)):(c(s,e.adler>>>16),c(s,65535&e.adler)),a(e),0=r.w_size&&(0===a&&(o(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new x.Buf8(r.w_size),x.arraySet(l,t,f-r.w_size,r.w_size,0),t=l,f=r.w_size),s=e.avail_in,u=e.next_in,c=e.input,e.avail_in=f,e.next_in=0,e.input=t,h(r);r.lookahead>=q;){n=r.strstart,i=r.lookahead-(q-1);do{r.ins_h=(r.ins_h<e?G[e]:G[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=255&t>>>8}function u(e,t,r){e.bi_valid>B-r?(e.bi_buf|=65535&t<>B-e.bi_valid,e.bi_valid+=r-B):(e.bi_buf|=65535&t<>>=1,r<<=1}while(0<--t);return r>>>1}function f(e,t,r){var n,i,o=Array(D+1),a=0;for(n=1;n<=D;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=l(o[s]++,s))}}function h(e){var t;for(t=0;te.heap_len;)o[2*(i=e.heap[++e.heap_len]=2>c?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;1<=r;r--)b(e,o,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],b(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,b(e,o,1)}while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,b=0;for(o=0;o<=D;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rp&&(o=p,b++),u[2*n+1]=o,!(n>c)&&(e.bl_count[o]++,a=0,n>=d&&(a=h[n-d]),s=u[2*n],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*n+1]+a)));if(0!=b){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,b-=2}while(0c)&&(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),f(o,c,e.bl_count)}function y(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++s=s?e.bl_tree[2*N]++:e.bl_tree[2*j]++:(i!==o&&e.bl_tree[2*i]++,e.bl_tree[2*z]++),s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))}function m(e,t,r){var n,i,o=-1,a=t[1],s=0,l=7,f=4;for(0===a&&(l=138,f=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++s=s?(c(e,N,e.bl_tree),u(e,s-3,3)):(c(e,j,e.bl_tree),u(e,s-11,7)):(i!==o&&(c(e,i,e.bl_tree),s--),c(e,z,e.bl_tree),u(e,s-3,2));s=0,o=i,0===a?(l=138,f=3):i===a?(l=6,f=3):(l=7,f=4)}}function w(e,t,r,n){u(e,(k<<1)+(n?1:0),3),function(e,t,r,n){d(e),n&&(s(e,r),s(e,~r)),g.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}var g=r(0),E=0,x=1,k=0,S=29,A=256,T=A+1+S,C=30,I=19,P=2*T+1,D=15,B=16,R=7,O=256,z=16,N=17,j=18,F=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],L=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W=Array(2*(T+2));n(W);var H=Array(2*C);n(H);var G=Array(512);n(G);var V=Array(256);n(V);var X=Array(S);n(X);var Y=Array(C);n(Y);var Z,K,q,Q=!1;t._tr_init=function(e){Q||(function(){var e,t,r,n,o,a=Array(D+1);for(r=0,n=0;nn;n++)for(Y[n]=o,e=0;e<1<>=7;n=e;)W[2*e+1]=8,e++,a[8]++;for(;255>=e;)W[2*e+1]=9,e++,a[9]++;for(;279>=e;)W[2*e+1]=7,e++,a[7]++;for(;287>=e;)W[2*e+1]=8,e++,a[8]++;for(f(W,T+1,a),e=0;e=t;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return E;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return x;for(t=32;t>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==t?w(e,t,r,n):4===e.strategy||o===i?(u(e,2+(n?1:0),3),v(e,W,H)):(u(e,4+(n?1:0),3),function(e,t,r,n){var i;for(u(e,t-257,5),u(e,r-1,5),u(e,n-4,4),i=0;i>>8,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(V[r]+A+1)]++,e.dyn_dtree[2*a(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){u(e,2,3),c(e,O,W),function(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&16>t.windowBits&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),0<=t.windowBits&&16>t.windowBits&&!(e&&e.windowBits)&&(t.windowBits+=32),15t.windowBits&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=o.inflateInit2(this.strm,t.windowBits);if(r!==u.Z_OK)throw new Error(c[r]);if(this.header=new f,o.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=o.inflateSetDictionary(this.strm,t.dictionary))!==u.Z_OK))throw new Error(c[r])}function i(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg||c[r.err];return r.result}var o=r(29),a=r(0),s=r(11),u=r(13),c=r(8),l=r(12),f=r(32),h=Object.prototype.toString;n.prototype.push=function(e,t){var r,n,i,c,l,f=this.strm,d=this.options.chunkSize,p=this.options.dictionary,b=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?u.Z_FINISH:u.Z_NO_FLUSH,f.input="string"==typeof e?s.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?new Uint8Array(e):e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new a.Buf8(d),f.next_out=0,f.avail_out=d),(r=o.inflate(f,u.Z_NO_FLUSH))===u.Z_NEED_DICT&&p&&(r=o.inflateSetDictionary(this.strm,p)),r===u.Z_BUF_ERROR&&1==b&&(r=u.Z_OK,b=!1),r!==u.Z_STREAM_END&&r!==u.Z_OK)return this.onEnd(r),this.ended=!0,!1;f.next_out&&(0===f.avail_out||r===u.Z_STREAM_END||0===f.avail_in&&(n===u.Z_FINISH||n===u.Z_SYNC_FLUSH))&&("string"===this.options.to?(i=s.utf8border(f.output,f.next_out),c=f.next_out-i,l=s.buf2string(f.output,i),f.next_out=c,f.avail_out=d-c,c&&a.arraySet(f.output,f.output,i,c,0),this.onData(l)):this.onData(a.shrinkBuf(f.output,f.next_out))),0===f.avail_in&&0===f.avail_out&&(b=!0)}while((0>>24)+(65280&e>>>8)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=E,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new d.Buf32(k),t.distcode=t.distdyn=new d.Buf32(S),t.sane=1,t.back=-1,w):g}function a(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):g}function s(e,t){var r,n;return e&&e.state?(n=e.state,0>t?(r=0,t=-t):(r=1+(t>>4),48>t&&(t&=15)),t&&(8>t||15t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(_(y,e.lens,0,288,f,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;_(m,e.lens,0,32,h,0,e.work,{bits:5}),A=!1}e.lencode=f,e.lenbits=9,e.distcode=h,e.distbits=5}function l(e,t,r,n){var i,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(d.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>n&&(i=n),d.arraySet(o.window,t,r-n,i,o.wnext),(n-=i)?(d.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whavek;){if(0===u)break e;u--,h+=i[a++]<>>8,r.check=b(r.check,U,2,0),h=0,k=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&h)){e.msg="unknown compression method",r.mode=30;break}if(k-=4,N=8+(15&(h>>>=4)),0===r.wbits)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<k;){if(0===u)break e;u--,h+=i[a++]<>8),512&r.flags&&(U[0]=255&h,U[1]=255&h>>>8,r.check=b(r.check,U,2,0)),h=0,k=0,r.mode=3;case 3:for(;32>k;){if(0===u)break e;u--,h+=i[a++]<>>8,U[2]=255&h>>>16,U[3]=255&h>>>24,r.check=b(r.check,U,4,0)),h=0,k=0,r.mode=4;case 4:for(;16>k;){if(0===u)break e;u--,h+=i[a++]<>8),512&r.flags&&(U[0]=255&h,U[1]=255&h>>>8,r.check=b(r.check,U,2,0)),h=0,k=0,r.mode=5;case 5:if(1024&r.flags){for(;16>k;){if(0===u)break e;u--,h+=i[a++]<>>8,r.check=b(r.check,U,2,0)),h=0,k=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((T=r.length)>u&&(T=u),T&&(r.head&&(N=r.head.extra_len-r.length,!r.head.extra&&(r.head.extra=Array(r.head.extra_len)),d.arraySet(r.head.extra,i,a,T,N)),512&r.flags&&(r.check=b(r.check,i,T,a)),u-=T,a+=T,r.length-=T),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===u)break e;T=0;do{N=i[a+T++],r.head&&N&&65536>r.length&&(r.head.name+=_StringfromCharCode(N))}while(N&&Tr.length&&(r.head.comment+=_StringfromCharCode(N))}while(N&&Tk;){if(0===u)break e;u--,h+=i[a++]<>9,r.head.done=!0),e.adler=r.check=0,r.mode=x;break;case 10:for(;32>k;){if(0===u)break e;u--,h+=i[a++]<>>=7&k,k-=7&k,r.mode=27;break}for(;3>k;){if(0===u)break e;u--,h+=i[a++]<>>=1)){case 0:r.mode=14;break;case 1:if(c(r),r.mode=20,6===t){h>>>=2,k-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}h>>>=2,k-=2;break;case 14:for(h>>>=7&k,k-=7&k;32>k;){if(0===u)break e;u--,h+=i[a++]<>>16)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&h,h=0,k=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(T=r.length){if(T>u&&(T=u),T>f&&(T=f),0===T)break e;d.arraySet(o,i,a,T,s),u-=T,a+=T,f-=T,s+=T,r.length-=T;break}r.mode=x;break;case 17:for(;14>k;){if(0===u)break e;u--,h+=i[a++]<>>=5,k-=5,r.ndist=1+(31&h),h>>>=5,k-=5,r.ncode=4+(15&h),h>>>=4,k-=4,286k;){if(0===u)break e;u--,h+=i[a++]<>>=3,k-=3}for(;19>r.have;)r.lens[W[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,F={bits:r.lenbits},j=_(0,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,j){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16,B=65535&M,!((P=M>>>24)<=k);){if(0===u)break e;u--,h+=i[a++]<B)h>>>=P,k-=P,r.lens[r.have++]=B;else{if(16===B){for(L=P+2;k>>=P,k-=P,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}N=r.lens[r.have-1],T=3+(3&h),h>>>=2,k-=2}else if(17===B){for(L=P+3;k>>=P)),h>>>=3,k-=3}else{for(L=P+7;k>>=P)),h>>>=7,k-=7}if(r.have+T>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;T--;)r.lens[r.have++]=N}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,F={bits:r.lenbits},j=_(y,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,j){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},j=_(m,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,j){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=u&&258<=f){e.next_out=s,e.avail_out=f,e.next_in=a,e.avail_in=u,r.hold=h,r.bits=k,v(e,A),s=e.next_out,o=e.output,f=e.avail_out,a=e.next_in,i=e.input,u=e.avail_in,h=r.hold,k=r.bits,r.mode===x&&(r.back=-1);break}for(r.back=0;D=255&(M=r.lencode[h&(1<>>16,B=65535&M,!((P=M>>>24)<=k);){if(0===u)break e;u--,h+=i[a++]<>R)])>>>16,B=65535&M,!(R+(P=M>>>24)<=k);){if(0===u)break e;u--,h+=i[a++]<>>=R,k-=R,r.back+=R}if(h>>>=P,k-=P,r.back+=P,r.length=B,0===D){r.mode=26;break}if(32&D){r.back=-1,r.mode=x;break}if(64&D){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&D,r.mode=22;case 22:if(r.extra){for(L=r.extra;k>>=r.extra,k-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;D=255&(M=r.distcode[h&(1<>>16,B=65535&M,!((P=M>>>24)<=k);){if(0===u)break e;u--,h+=i[a++]<>R)])>>>16,B=65535&M,!(R+(P=M>>>24)<=k);){if(0===u)break e;u--,h+=i[a++]<>>=R,k-=R,r.back+=R}if(h>>>=P,k-=P,r.back+=P,64&D){e.msg="invalid distance code",r.mode=30;break}r.offset=B,r.extra=15&D,r.mode=24;case 24:if(r.extra){for(L=r.extra;k>>=r.extra,k-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===f)break e;if(T=A-f,r.offset>T){if((T=r.offset-T)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}T>r.wnext?(T-=r.wnext,C=r.wsize-T):C=r.wnext-T,T>r.length&&(T=r.length),I=r.window}else I=o,C=s-r.offset,T=r.length;T>f&&(T=f),f-=T,r.length-=T;do{o[s++]=I[C++]}while(--T);0===r.length&&(r.mode=21);break;case 26:if(0===f)break e;o[s++]=r.length,f--,r.mode=21;break;case 27:if(r.wrap){for(;32>k;){if(0===u)break e;u--,h|=i[a++]<k;){if(0===u)break e;u--,h+=i[a++]<p&&(d+=S[n++]<>>=w=m>>>24,p-=w,0===(w=255&m>>>16))A[o++]=65535&m;else{if(!(16&w)){if(0==(64&w)){m=b[(65535&m)+(d&(1<>>=w,p-=w),15>p&&(d+=S[n++]<>>=w=m>>>24,p-=w,!(16&(w=255&m>>>16))){if(0==(64&w)){m=v[(65535&m)+(d&(1<u){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=w,p-=w,E>(w=o-a)){if((w=E-w)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=0,k=h,0===f){if(x+=c-w,w>3,d&=(1<<(p-=g<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=nT&&(C=T),0==T)return l[f++]=20971520,l[f++]=20971520,d.bits=1,0;for(A=1;A(D-=N[k]))return-1;if(0852||2===e&&B>592)return 1;for(;;){w=k-P,h[S]m?(g=F[L+h[S]],E=O[z+h[S]]):(g=96,E=0),p=1<>P)+(b-=p)]=w<<24|g<<16|E|0}while(0!==b);for(p=1<>=1;if(0===p?R=0:(R&=p-1,R+=p),S++,0==--N[k]){if(k===T)break;k=t[r+h[S]]}if(k>C&&(R&_)!==v){for(0==P&&(P=C),y+=A,D=1<<(I=k-P);I+P=(D-=N[I+P]));)I++,D<<=1;if(B+=1<852||2===e&&B>592)return 1;l[v=R&_]=C<<24|I<<16|y-f|0}}return 0!=R&&(l[y+R]=4194304|k-P<<24),d.bits=C,0}},function(e){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})},n=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]a[0]&&r[1]'),t.firstChild.href},t.prototype.setDescriptorAndParameters=function(e,t){return i(this,void 0,void 0,function(){var r,n,i,a,s=this;return o(this,function(o){switch(o.label){case 0:return this.descriptor=e,this.placeholderContext=new c.default(this.descriptor.placeholders),r="object"==typeof WebAssembly?"webassembly":"asmjs",0<=window.navigator.userAgent.indexOf("iPhone OS 11_2")&&(r="asmjs"),n=this.directory+"/kernels_"+r+".js",n=this.transformUrlDelegate(n),this.worker_entry_js_path=n,[4,fetch(this.worker_entry_js_path)];case 1:return[4,o.sent().text()];case 2:return i=o.sent(),a=function(e,t){var r=s.absolutePath(s.directory+"/"+e),n=s.transformUrlDelegate(r);i=i.replace(t,n)},"webassembly"===r?a("kernels_webassembly.wasm","WEBDNN_URL_KERNELS_WASM"):a("kernels_asmjs.js.mem","WEBDNN_URL_KERNELS_ASMJS_MEM"),[4,this.compile(i)];case 3:return o.sent(),[4,this.loadWeights(new Uint8Array(t))];case 4:return o.sent(),[4,this.getInputViews()];case 5:return o.sent().filter(function(e){return!e.isDynamic}).forEach(function(e){e.buffer=new Float32Array(e.length).buffer}),[4,this.getOutputViews()];case 6:return o.sent().filter(function(e){return!e.isDynamic}).forEach(function(e){e.buffer=new Float32Array(e.length).buffer}),[2]}})})},t.prototype.fetchDescriptor=function(e){return i(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return this.directory=e,[4,u.default(e+"/graph_"+this.backendName+".json",this.transformUrlDelegate)];case 1:return[2,t.sent().json()]}})})},t.prototype.fetchParameters=function(e,t){return i(this,void 0,void 0,function(){var r,n;return o(this,function(i){switch(i.label){case 0:return r=e+"/weight_"+this.backendName+".bin",[4,u.default(r,this.transformUrlDelegate)];case 1:return n=i.sent(),[2,u.readArrayBufferProgressively(n,t)]}})})},t.prototype.restoreCachedDescriptor=function(e){return i(this,void 0,void 0,function(){return o(this,function(){return this.directory=e,[2,a.getItem(e+"_"+this.backendName+"_descriptor").catch(function(){return null})]})})},t.prototype.restoreCachedParameters=function(e,t){return i(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:return[4,a.getItem(e+"_"+this.backendName+"_parameters").catch(function(){return null})];case 1:return(r=n.sent())&&t&&t(r.byteLength,r.byteLength),[2,r]}})})},t.prototype.saveCache=function(e,t,r){return i(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,Promise.all([a.setItem(e+"_"+this.backendName+"_descriptor",t),a.setItem(e+"_"+this.backendName+"_parameters",r)])];case 1:return n.sent(),[2]}})})},t.prototype.setPlaceholderValue=function(e){return i(this,void 0,void 0,function(){var t,r,n,i,a,s,u;return o(this,function(o){switch(o.label){case 0:if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized.");if((t=this.placeholderContext).update(e),!t.isResolved)return[2];if(!this.descriptor)throw new Error("Descriptor is not loaded");for(r=this.descriptor,n=r.unresolved_value_lists,i=[],a=function(e){n[e].forEach(function(r){var n=t.resolve(r.placeholder);i.push(e,r.offset,n)})},s=0;sc;c++)if(h=a[c][t.inputs[u]]){var l=n.inputs[u];s.push({space:c,offset:e.resolve(h.offset),size:l.length,data:l.toActual()});break}var f=[];for(u=0;uc;c++)if(h=a[c][t.outputs[u]]){l=n.outputs[u];f.push({space:c,offset:e.resolve(h.offset),size:l.length});break}}r.postMessage({type:"run",inputs:s,outputs:f})})]})})},t}(r(7).DescriptorRunner);t.default=f},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]a[0]&&r[1]a[0]&&r[1]\nusing namespace metal;\n kernel void check_compatibility(\n device uint *A[[buffer(0)]],\n uint global_index[[thread_position_in_grid]],\n uint thread_execution_width[[thread_execution_width]]\n ){\n if (global_index == 0) {\n A[0] = thread_execution_width;\n }\n }","basic"),e=this.webmetalHandler.createBuffer(new Uint32Array(1)),[4,this.webmetalHandler.executeSinglePipelineState("basic.check_compatibility",{width:1,height:1,depth:1},{width:1,height:1,depth:1},[e],!0)];case 1:if(r.sent(),32!=(t=new Uint32Array(e.contents)[0]))throw new Error("Sorry, this GPU does not compatible with WebMetal (thread_execution_width == "+t+". See checkIncompatibleGPU method of https://github.com/mil-tokyo/webdnn/blob/master/src/descriptor_runner/descriptor_runner/descriptor_runner_webmetal.ts");return[2]}})})},t.prototype.fetchDescriptor=function(e){return i(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,c.default(e+"/graph_"+this.backendName+".json",this.transformUrlDelegate)];case 1:return[2,t.sent().json()]}})})},t.prototype.fetchParameters=function(e,t){return i(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:return[4,c.default(e+"/weight_"+this.backendName+".bin",this.transformUrlDelegate)];case 1:return r=n.sent(),[2,c.readArrayBufferProgressively(r,t)]}})})},t.prototype.restoreCachedDescriptor=function(e){return i(this,void 0,void 0,function(){return o(this,function(){return[2,a.getItem(e+"_"+this.backendName+"_descriptor").catch(function(){return null})]})})},t.prototype.restoreCachedParameters=function(e,t){return i(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:return[4,a.getItem(e+"_"+this.backendName+"_parameters").catch(function(){return null})];case 1:return(r=n.sent())&&t&&t(r.byteLength,r.byteLength),[2,r]}})})},t.prototype.saveCache=function(e,t,r){return i(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,Promise.all([a.setItem(e+"_"+this.backendName+"_descriptor",t),a.setItem(e+"_"+this.backendName+"_parameters",r)])];case 1:return n.sent(),[2]}})})},t.prototype.setDescriptorAndParameters=function(e,t){return i(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return this.descriptor=e,this.staticBuffer=null,this.dynamicBuffer=null,this.metaBuffers=null,this.placeholderContext=new l.default(e.placeholders),this.executionInfos=e.exec_infos,this.webmetalHandler.loadKernel(this.descriptor.kernel_source,"descriptor"),[4,this.initializeStaticBuffer(t)];case 1:return r.sent(),[4,this.initializeMetaBuffers()];case 2:return r.sent(),[4,this.setPlaceholderValue({__MAX_THREADS_PER_THREADGROUP__:b?512:1024})];case 3:return r.sent(),this.placeholderContext&&this.placeholderContext.isResolved?[4,this.initializeDynamicBuffer()]:[3,5];case 4:r.sent(),r.label=5;case 5:return[2]}})})},t.prototype.initializeStaticBuffer=function(e){return i(this,void 0,void 0,function(){var t,r,n,i,a;return o(this,function(o){switch(o.label){case 0:if(!this.descriptor)throw Error("GraphDescriptor is not loaded.");return t=this.descriptor,r=new s.default(t.memory_layout.static.size*Float32Array.BYTES_PER_ELEMENT),this.staticBuffer=r,n=u.default(t.weight_encoding),a=(i=r).write,[4,n.decode(new Uint8Array(e))];case 1:return[4,a.apply(i,[o.sent()])];case 2:return o.sent(),[4,this.getInputViews()];case 3:return o.sent().filter(function(e){return!e.isDynamic}).forEach(function(e){e.buffer=r.bufferView.buffer}),[4,this.getOutputViews()];case 4:return o.sent().filter(function(e){return!e.isDynamic}).forEach(function(e){e.buffer=r.bufferView.buffer}),[2]}})})},t.prototype.initializeMetaBuffers=function(){return i(this,void 0,void 0,function(){var e,t=this;return o(this,function(r){switch(r.label){case 0:if(!this.descriptor)throw Error("GraphDescriptor is not loaded.");return e=this,[4,Promise.all(this.descriptor.exec_infos.map(function(e){return i(t,void 0,void 0,function(){var t;return o(this,function(r){switch(r.label){case 0:return[4,(t=new s.default(e.meta_buffer.length*Int32Array.BYTES_PER_ELEMENT)).write(new Uint8Array(e.meta_buffer))];case 1:return r.sent(),[2,t]}})})}))];case 1:return e.metaBuffers=r.sent(),[2]}})})},t.prototype.initializeDynamicBuffer=function(){return i(this,void 0,void 0,function(){var e,t,r,n;return o(this,function(i){switch(i.label){case 0:if(!this.descriptor)throw Error("GraphDescriptor is not loaded.");if(!this.placeholderContext)throw Error("PlaceholderContext is not initialized.");return e=this.descriptor,t=this.placeholderContext,r=t.resolve(e.memory_layout.dynamic.size),n=new s.default(r*Float32Array.BYTES_PER_ELEMENT),this.dynamicBuffer=n,[4,this.getInputViews()];case 1:return i.sent().filter(function(e){return e.isDynamic}).forEach(function(e){e.buffer=n.bufferView.buffer}),[4,this.getOutputViews()];case 2:return i.sent().filter(function(e){return e.isDynamic}).forEach(function(e){e.buffer=n.bufferView.buffer}),[2]}})})},t.prototype.setPlaceholderValue=function(e){return i(this,void 0,void 0,function(){var t,r,n,a,s=this;return o(this,function(u){switch(u.label){case 0:if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized.");if((t=this.placeholderContext).update(e),!t.isResolved)return[2];if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.metaBuffers)throw new Error("MetaBuffers are not initialized");return r=this.descriptor,n=this.metaBuffers,[4,this.initializeDynamicBuffer()];case 1:return u.sent(),a=this,[4,Promise.all(r.exec_infos.map(function(e,r){return i(s,void 0,void 0,function(){var i,a,s,u;return o(this,function(){for(i=new Int32Array(n[r].bufferView.buffer),a=0,s=e.unresolved_value_list;aa[0]&&r[1]=s-1)){for(;;){for(;e[c]>u&&c<=l;)c++;for(;e[l]<=u&&c<=l;)l--;if(c>=l)break;f=e[c],e[c]=e[l],e[l]=f,f=n[c],n[c]=n[l],n[l]=f}e[s-1]=e[c],e[c]=u,f=n[s-1],n[s-1]=n[c],n[c]=f,r.push([a,c]),c+1=s-1)){for(;;){for(;e[c]=u&&c<=l;)l--;if(c>=l)break;f=e[c],e[c]=e[l],e[l]=f,f=n[c],n[c]=n[l],n[l]=f}e[s-1]=e[c],e[c]=u,f=n[s-1],n[s-1]=n[c],n[c]=f,r.push([a,c]),c+1e[t]);return{status:e,defaultOrder:t}}async function r(e,t){if(!(e in h))throw new Error(`Unknown backend: "${e}"`);let a;try{a=new h[e](t),await a.init()}catch(t){return console.warn(`Failed to initialize ${e} backend: ${t}`),null}return a}Object.defineProperty(t,'__esModule',{value:!0}),t.getConfiguration=function(e,t){return e in u?u[e]:t},t.setConfiguration=function(e,t){u[e]=t},t.getBackendAvailability=n,t.load=async function(e,t={}){let{backendOrder:s=null,backendOptions:d={},cacheStrategy:l='latest',saveCache:c=!0,progressCallback:a,weightDirectory:i,transformUrlDelegate:o}=t;s||(s=n().defaultOrder),'string'==typeof s&&(s=[s]),s=s.slice(),-1===s.indexOf('fallback')&&s.concat(['fallback']);for(let n=(t)=>(i&&/\.bin/.test(t)&&(t=t.replace(e,i)),o&&(t=o(t)),t);0null),i=await o.restoreCachedDescriptor(e),i&&r&&i.converted_at===r.converted_at&&(t=i,n=await o.restoreCachedParameters(e,a),n))break;if(r&&(t=r,n=await o.fetchParameters(e,a),n))break;if(i&&(t=i,n=await o.restoreCachedParameters(e,a),n))break;throw Error('Network error is occurred and no cache is exist.');case'networkOnly':case'networkFirst':if(r=await o.fetchDescriptor(e).catch(()=>null),r&&(t=r,n=await o.fetchParameters(e,a),n))break;if('networkOnly'===l)throw Error('Network error is occurred in "networkOnly" cache strategy');if(i=await o.restoreCachedDescriptor(e),i&&(t=i,n=await o.restoreCachedParameters(e,a),n))break;throw Error('Network error is occurred and no cache is exist.');case'cacheOnly':case'cacheFirst':if(i=await o.restoreCachedDescriptor(e),i&&(t=i,n=await o.restoreCachedParameters(e,a),n))break;if('cacheOnly'===l)throw Error('No cache is exist in "cacheOnly" cache strategy');if(r=await o.fetchDescriptor(e).catch(()=>null),r&&(t=r,n=await o.fetchParameters(e,a),n))break;throw Error('Network error is occurred and no cache is exist.');default:throw Error(`"${l}" is not valid cache strategy name: "latest", "networkFirst", "networkOnly", "cacheFirst", "cacheOnly" is available.`);}if(c)try{await o.saveCache(e,t,n)}catch(t){}await o.setDescriptorAndParameters(t,n)}catch(e){console.warn(`Model loading failed for ${t} backend. Trying next backend: ${e.message}`);continue}return o}}throw new Error('No backend is available')};var i=a(21),o=a(36),s=a(37),d=a(39),l=a(40),c=a(43);a.d(t,'Math',function(){return c}),a.d(t,'Image',function(){return l});let u={};const h={webgpu:d.a,webgl:s.a,webassembly:o.a,fallback:i.a}},function(e,t,a){(function(t){var a,a;/*! +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WebDNN=t():e.WebDNN=t()}(window,function(){var _StringfromCharCode=String.fromCharCode;return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var i in e)t.d(n,i,function(t){return e[t]}.bind(null,i));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=19)}([function(e,t,r){(function(t){var r; +/*! localForage -- Offline Storage, Improved - Version 1.7.1 + Version 1.7.3 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 -*/(function(t){e.exports=t()})(function(){return function d(c,e,t){function r(i,o){if(!e[i]){if(!c[i]){if(!o&&'function'==typeof a&&a)return a(i,!0);if(n)return n(i,!0);var s=new Error('Cannot find module \''+i+'\'');throw s.code='MODULE_NOT_FOUND',s}var h=e[i]={exports:{}};c[i][0].call(h.exports,function(t){var e=c[i][1][t];return r(e?e:t)},h,h.exports,d,c,e,t)}return e[i].exports}for(var n='function'==typeof a&&a,i=0;i=a.oldVersion&&e.createObjectStore(M)}catch(e){if('ConstraintError'===e.name)console.warn('The database "'+t.name+'" has been upgraded from version '+a.oldVersion+' to version '+a.newVersion+', but the storage "'+t.storeName+'" already exists.');else throw e}}),i.onerror=function(t){t.preventDefault(),n(i.error)},i.onsuccess=function(){a(i.result),h(t)}})}function m(e){return _(e,!1)}function p(e){return _(e,!0)}function g(e,t){if(!e.db)return!0;var a=!e.db.objectStoreNames.contains(e.storeName),n=e.versione.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+'" can\'t be downgraded from version '+e.db.version+' to version '+e.version+'.'),e.version=e.db.version),r||a){if(a){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function b(t){return new F(function(a,e){var n=new FileReader;n.onerror=e,n.onloadend=function(n){var e=btoa(n.target.result||'');a({__local_forage_encoded_blob:!0,data:e,type:t.type})},n.readAsBinaryString(t)})}function y(e){var t=d(atob(e.data));return n([t],{type:e.type})}function v(e){return e&&e.__local_forage_encoded_blob}function w(e){var t=this,a=t._initReady().then(function(){var e=U[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return i(a,e,e),a}function E(e){u(e);for(var t=U[e.name],a=t.forages,n=0,r;n>4,c[n++]=(15&o)<<4|s>>2,c[n++]=(3&s)<<6|63&d;return l}function I(e){var t=new Uint8Array(e),a='',n;for(n=0;n>2],a+=X[(3&t[n])<<4|t[n+1]>>4],a+=X[(15&t[n+1])<<2|t[n+2]>>6],a+=X[63&t[n+2]];return 2==t.length%3?a=a.substring(0,a.length-1)+'=':1==t.length%3&&(a=a.substring(0,a.length-2)+'=='),a}function S(e,t,a,n){e.executeSql('CREATE TABLE IF NOT EXISTS '+t.storeName+' (id INTEGER PRIMARY KEY, key unique, value)',[],a,n)}function R(e,a,n,r,i,o){e.executeSql(n,r,i,function(e,s){s.code===s.SYNTAX_ERR?e.executeSql('SELECT name FROM sqlite_master WHERE type=\'table\' AND name = ?',[name],function(e,t){t.rows.length?o(e,s):S(e,a,function(){e.executeSql(n,r,i,o)},o)},o):o(e,s)},o)}function C(e,t,a,n){var i=this;e=o(e);var s=new F(function(r,o){i.ready().then(function(){void 0===t&&(t=null);var s=t,d=i._dbInfo;d.serializer.serialize(t,function(l,t){t?o(t):d.db.transaction(function(a){R(a,d,'INSERT OR REPLACE INTO '+d.storeName+' (key, value) VALUES (?, ?)',[e,l],function(){r(s)},function(e,t){o(t)})},function(t){if(t.code===t.QUOTA_ERR){if(0 \'__WebKitDatabaseInfoTable__\'',[],function(n,t){for(var r=[],o=0;oe?void t(null):void a.ready().then(function(){x(a._dbInfo,W,function(r,i){if(r)return n(r);try{var o=i.objectStore(a._dbInfo.storeName),s=!1,d=o.openCursor();d.onsuccess=function(){var a=d.result;return a?void(0===e?t(a.key):s?t(a.key):(s=!0,a.advance(e))):void t(null)},d.onerror=function(){n(d.error)}}catch(t){n(t)}})})['catch'](n)});return r(n,t),n},keys:function(e){var t=this,a=new F(function(e,a){t.ready().then(function(){x(t._dbInfo,W,function(n,r){if(n)return a(n);try{var i=r.objectStore(t._dbInfo.storeName),o=i.openCursor(),s=[];o.onsuccess=function(){var t=o.result;return t?void(s.push(t.key),t['continue']()):void e(s)},o.onerror=function(){a(o.error)}}catch(t){a(t)}})})['catch'](a)});return r(a,e),a},dropInstance:function(e,t){t=s.apply(this,arguments);var a=this.config();e='function'!=typeof e&&e||{},e.name||(e.name=e.name||a.name,e.storeName=e.storeName||a.storeName);var n=this,i;if(!e.name)i=F.reject('Invalid arguments');else{var o=e.name===a.name&&n._dbInfo.db,d=o?F.resolve(n._dbInfo.db):m(e).then(function(t){var a=U[e.name],n=a.forages;a.db=t;for(var r=0;rt(s,r)),s==r?(l.forceDispatch(),o.buffer):d.read().then(a)}if(!t||!e.body)return e.arrayBuffer();let n=e.headers.get('Content-Length');if(!n)return e.arrayBuffer();const r=parseInt(n);let o=new Uint8Array(r),s=0,d=e.body.getReader(),l=new i.a;return d.read().then(a)};var i=a(34)},function(e,t,a){'use strict';class n{constructor(e){this.values={},e&&this.update(e)}get isResolved(){return Object.values(this.values).every((e)=>'number'==typeof e)}update(e){this.values=Object.assign(this.values,e)}resolve(e){if('object'!=typeof e)return e;if(1==Object.keys(e).length&&'eval'in e){if(!this.isResolved)throw Error(`Not all placeholders are resolved: ${this}`);return eval('(function(placeholders){return '+e.eval+';})')(this.values)}return e instanceof Array?e.map((e)=>this.resolve(e)):Object.entries(e).reduce((e,[t,a])=>(e[t]=this.resolve(a),e),{})}toString(){return JSON.stringify(this.values)}}t.a=n},function(e,t,a){'use strict';var n=a(35);class r extends n.a{constructor(){super(...arguments),this.BYTES_PER_ELEMENT=4}toActual(){if(!this.buffer)throw new Error('Internal buffer for this variable is not set. DescriptorRunner.setPlaceholderValue() have to be called before calling this function.');return new Float32Array(this.buffer,this.byteOffset,this.length)}every(e,t){return this.toActual().every(e,t)}filter(e,t){return this.toActual().filter(e,t)}find(e,t){return this.toActual().find(e,t)}findIndex(e,t){return this.toActual().findIndex(e,t)}forEach(e,t){return this.toActual().forEach(e,t)}map(e,t){return this.toActual().map(e,t)}reduce(e,t){return this.toActual().reduce(e,t)}reduceRight(e,t){return this.toActual().reduceRight(e,t)}reverse(){return this.toActual().reverse()}slice(e,t){return this.toActual().slice(e,t)}some(e,t){return this.toActual().some(e,t)}subarray(e,t){return this.toActual().subarray(e,t)}includes(e,t){return this.toActual().includes(e,t)}}t.a=r,r.BYTES_PER_ELEMENT=4},function(e,t){'use strict';t.a=class{constructor(e={}){this.descriptor=null;let{transformUrlDelegate:t=function(e){return e}}=e;this.transformUrlDelegate=t}static checkAvailability(){return!1}}},function(e){'use strict';e.exports={0:'',1:'stream end',2:'need dictionary',"-1":'file error',"-2":'stream error',"-3":'data error',"-4":'insufficient memory',"-5":'buffer error',"-6":'incompatible version'}},function(e){'use strict';e.exports=function(e,t,a,r){for(var i=0|65535&e,o=0|65535&e>>>16,s=0;0!==a;){s=2e3t;t++){a=t;for(var n=0;8>n;n++)a=1&a?3988292384^a>>>1:a>>>1;e[t]=a}return e}();e.exports=function(e,a,n,r){e^=-1;for(var o=r;o>>8^t[255&(e^a[o])];return-1^e}},function(t,a,n){'use strict';function r(t,a){if(65537>a&&(t.subarray&&d||!t.subarray&&s))return e.apply(null,o.shrinkBuf(t,a));for(var n='',r=0;ri;i++)l[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;l[254]=l[254]=1,a.string2buf=function(e){var t=e.length,a=0,n,r,s,d,l;for(d=0;dr?1:2048>r?2:65536>r?3:4;for(n=new o.Buf8(a),l=0,d=0;lr?n[l++]=r:2048>r?(n[l++]=192|r>>>6,n[l++]=128|63&r):65536>r?(n[l++]=224|r>>>12,n[l++]=128|63&r>>>6,n[l++]=128|63&r):(n[l++]=240|r>>>18,n[l++]=128|63&r>>>12,n[l++]=128|63&r>>>6,n[l++]=128|63&r);return n},a.buf2binstring=function(e){return r(e,e.length)},a.binstring2buf=function(e){for(var t=new o.Buf8(e.length),a=0,n=t.length;as){n[i++]=s;continue}if(d=l[s],4s?n[i++]=s:(s-=65536,n[i++]=55296|1023&s>>10,n[i++]=56320|1023&s)}return r(n,i)},a.utf8border=function(e,t){var a;for(t=t||e.length,t>e.length&&(t=e.length),a=t-1;0<=a&&128==(192&e[a]);)a--;return 0>a?t:0===a?t:a+l[e[a]]>t?a:t}},function(e){'use strict';e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg='',this.state=null,this.data_type=2,this.adler=0}},function(e){'use strict';e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,a){'use strict';function n(e){return'WebGL2RenderingContext'===e.constructor.name}function r(e){if(null===e)throw Error('Null is detected');return e}t.b=n;var i=a(1);let o;class s{constructor(){this.gl=r(s.initializeContext())}static getInstance(){return o||(o=new s),o}createTexture(e,t,a,n){let i=this.gl,o=r(i.createTexture());return i.activeTexture(i.TEXTURE0+9),i.bindTexture(i.TEXTURE_2D,o),i.texImage2D(i.TEXTURE_2D,0,a,e,t,0,n,i.FLOAT,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.bindTexture(i.TEXTURE_2D,null),o}createVertexShader(e){return this.createShader(this.gl.VERTEX_SHADER,e)}createFragmentShader(e){return this.createShader(this.gl.FRAGMENT_SHADER,e)}createShader(e,t){let a=r(this.gl.createShader(e));if(this.gl.shaderSource(a,t),this.gl.compileShader(a),!this.gl.getShaderParameter(a,this.gl.COMPILE_STATUS))throw console.error(this.gl.getShaderInfoLog(a)),Error('Shader Compile failed: '+this.gl.getShaderInfoLog(a));return a}createProgram(e,t){let a=r(this.gl.createProgram());if(this.gl.attachShader(a,t),this.gl.attachShader(a,e),this.gl.linkProgram(a),!this.gl.getProgramParameter(a,this.gl.LINK_STATUS))throw console.error(this.gl.getProgramInfoLog(a)),Error('ShaderProgram Initialization failed.');return a}createArrayBuffer(e){let t=r(this.gl.createBuffer());return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,t),this.gl.bufferData(this.gl.ARRAY_BUFFER,e,this.gl.STATIC_DRAW),t}createFrameBuffer(){return r(this.gl.createFramebuffer())}bindArrayBuffer(e){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,e)}bindFrameBuffer(e,t,a){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this.gl.viewport(0,0,t,a),this.gl.scissor(0,0,t,a)}useProgram(e){this.gl.useProgram(e)}deleteTexture(e){this.gl.deleteTexture(e)}static initializeWebGL2Context(e=document.createElement('canvas')){let t;return t=e.getContext('webgl2'),t?t.getExtension('EXT_color_buffer_float')?Object(i.getConfiguration)('DEBUG',!1)&&!t.getExtension('WEBGL_debug_renderer_info')?null:t:null:null}static initializeWebGL1Context(e=document.createElement('canvas')){let t=e.getContext('webgl')||e.getContext('experimental-webgl');return t?t.getExtension('OES_texture_float')?s.IS_SAFARI?null:Object(i.getConfiguration)('DEBUG',!1)&&!t.getExtension('WEBGL_debug_renderer_info')?null:t:null:null}static initializeContext(){let e=document.createElement('canvas'),t;if(t=s.initializeWebGL2Context(e),t)Object(i.getConfiguration)('DEBUG',!1)&&console.info('WebGL2 is enabled');else if(t=s.initializeWebGL1Context(e),t)Object(i.getConfiguration)('DEBUG',!1)&&console.info('WebGL2 is disabled');else return null;return t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.disable(t.BLEND),t.disable(t.DITHER),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SAMPLE_COVERAGE),t.enable(t.SCISSOR_TEST),t.enable(t.CULL_FACE),t.cullFace(t.BACK),t}static checkAvailability(){if(null===d){let e=s.initializeContext();d=!!e&&!(4096>Object(i.getConfiguration)('MAX_TEXTURE_SIZE',e.getParameter(e.MAX_TEXTURE_SIZE)))}return d}async waitForComplete(){let e=this.gl;if(n(e)){let t=e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE,0),a=e.clientWaitSync(t,0,0);for(;a!==e.CONDITION_SATISFIED&&a!==e.ALREADY_SIGNALED;)await new Promise((e)=>setTimeout(e,1)),a=e.clientWaitSync(t,0,0);e.deleteSync(t)}else e.finish()}get MAX_TEXTURE_SIZE(){let e=Object(i.getConfiguration)('MAX_TEXTURE_SIZE',this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE));if(16384<=e)return 4096;if(8192<=e)return 4096;if(4096<=e)return 4096;throw new Error(`MAX_TEXTURE_SIZE is too small: ${e}`)}}t.a=s,s.IS_SAFARI=-1!==navigator.userAgent.toLowerCase().indexOf('safari')&&-1===navigator.userAgent.toLowerCase().indexOf('chrome');let d=null},function(e,t){'use strict';t.a=class{constructor(e,t){this.byteLength=e,this.backend=t}}},function(e,t,a){'use strict';var n=a(17),r=a(15);class i extends r.a{constructor(e){super(e,'webgpu'),0==e&&(e=4),this.handler=n.b.getInstance(),this.buffer=this.handler.createBuffer(new Uint8Array(e)),this.bufferView=new Uint8Array(this.buffer.contents)}async write(e,t){await this.handler.sync();let a=new e.constructor(this.bufferView.buffer);a.set(e,t)}async read(e,t=0,a){if(!e)throw new Error('dst cannot be null');if(await this.handler.sync(),0!==this.byteLength){let n=e.constructor,r=new n(this.bufferView.buffer,this.bufferView.byteOffset+t*n.BYTES_PER_ELEMENT,a);e.set(r)}}getWriteView(e,t,a){return new a(this.bufferView.buffer,this.bufferView.byteOffset+e*a.BYTES_PER_ELEMENT,t)}getReadView(e,t,a){return new a(this.bufferView.buffer,this.bufferView.byteOffset+e*a.BYTES_PER_ELEMENT,t)}async syncWriteViews(){}async syncReadViews(){await this.handler.sync()}}t.a=i},function(e,t,a){'use strict';var n=a(16);let r;class i{constructor(){if(this.pipelineStates=new Map,!o)throw new Error('This browser does not support WebGPU');let e;try{e=document.createElement('canvas').getContext('webgpu')}catch(e){throw new Error(`During initializing WebGPURenderingContext, unexpected error is occurred: ${e.message}`)}if(!e)throw new Error('WebGPURenderingContext initialization failed');this.context=e,this.commandQueue=e.createCommandQueue(),this.loadKernel('kernel void sync(){}','basic')}static getInstance(){return r||(r=new i),r}createBuffer(e){return this.context.createBuffer(e)}loadKernel(e,t=''){let a=this.context.createLibrary(e);for(let n of a.functionNames){let e=a.functionWithName(n),r=this.context.createComputePipelineState(e);this.pipelineStates.set(t+'.'+n,r)}}createCommandBuffer(){return this.commandQueue.createCommandBuffer()}getPipelineStateByName(e){let t=this.pipelineStates.get(e);if(!t)throw TypeError(`Kernel function "${e}" is not loaded.`);return t}executeSinglePipelineState(e,t,a,r,i){let o=this.commandBuffer||(this.commandBuffer=this.createCommandBuffer()),s=o.createComputeCommandEncoder();s.setComputePipelineState(this.getPipelineStateByName(e));for(let o=0;o{t.onload=a,t.onerror=n,t.src=e}).then(()=>t)}async function n(e){let t=e.files;if(!t||0==t.length)throw new Error('No file is selected');let n=URL.createObjectURL(t[0]);return a(n)}t.b=a,t.c=n,t.a=async function(){let e=document.createElement('input');return e.type='file',e.accept='image/*',new Promise((t)=>{e.onchange=()=>t(n(e)),e.click()})}},function(e,t,a){'use strict';function n(e=10){return new Promise((t)=>setTimeout(t,e))}var r=a(2),i=a.n(r),o=a(3),s=a(4),d=a(5),l=a(6),c=a(7);class u extends c.a{constructor(e={}){super(e),this.backendName='fallback'}static checkAvailability(){return!0}async init(){}async setDescriptorAndParameters(e,t){this.setDescriptor(e),await this.compile(),await this.initializeStaticBuffer(t),this.placeholderContext&&this.placeholderContext.isResolved&&(await this.initializeDynamicBuffer())}async fetchDescriptor(e){this.directory=e;let t=await Object(s.a)(`${e}/graph_${this.backendName}.json`,this.transformUrlDelegate);return t.json()}async fetchParameters(e,t){let a=await Object(s.a)(`${e}/weight_${this.backendName}.bin`,this.transformUrlDelegate);return Object(s.b)(a,t)}async restoreCachedDescriptor(e){return r.getItem(`${e}_${this.backendName}_descriptor`).catch(()=>null)}async restoreCachedParameters(e,t){let a=await r.getItem(`${e}_${this.backendName}_parameters`).catch(()=>null);return a&&t&&t(a.byteLength,a.byteLength),a}async saveCache(e,t,a){await Promise.all([r.setItem(`${e}_${this.backendName}_descriptor`,t),r.setItem(`${e}_${this.backendName}_parameters`,a)])}setDescriptor(e){this.descriptor=e,this.placeholderContext=new d.a,this.placeholderContext.update(e.placeholders),this.kernelObj=null,this.variableMap=null,this.staticBuffer=null,this.dynamicBuffer=null}async compile(){if(!this.descriptor)throw new Error('Descriptor is not loaded');await new Promise((e)=>{let t=document.createElement('script');t.type='text/javascript',t.readyState?t.onreadystatechange=()=>{('loaded'==t.readyState||'complete'==t.readyState)&&(t.onreadystatechange=null,e())}:t.onload=e,t.src=this.transformUrlDelegate(`${this.directory}/kernels_fallback.js`),document.getElementsByTagName('head')[0].appendChild(t)}),this.kernelObj=window.dnn_fallback_kernel}async initializeStaticBuffer(e){if(!this.descriptor)throw new Error('Descriptor is not loaded');let t=this.descriptor,a=new Float32Array(t.memory_layout.static.size);this.staticBuffer=a;let n=this.variableMap||new Map;this.variableMap=n,Object.entries(t.memory_layout.static.allocations).forEach(([e,t])=>{n.set(e,new Float32Array(a.buffer,t.offset*Float32Array.BYTES_PER_ELEMENT,t.size))});let r=Object(o.a)(this.descriptor.weight_encoding);a.set((await r.decode(new Uint8Array(e)))),(await this.getInputViews()).filter((e)=>!e.isDynamic).forEach((e)=>{e.buffer=a.buffer}),(await this.getOutputViews()).filter((e)=>!e.isDynamic).forEach((e)=>{e.buffer=a.buffer})}async initializeDynamicBuffer(){if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');let e=this.descriptor,t=this.placeholderContext,a=new Float32Array(t.resolve(e.memory_layout.dynamic.size));this.dynamicBuffer=a;let n=this.variableMap||new Map;this.variableMap=n,Object.entries(e.memory_layout.dynamic.allocations).forEach(([e,r])=>{n.set(e,new Float32Array(a.buffer,t.resolve(r.offset)*Float32Array.BYTES_PER_ELEMENT,t.resolve(r.size)))}),(await this.getInputViews()).filter((e)=>e.isDynamic).forEach((e)=>{e.buffer=a.buffer}),(await this.getOutputViews()).filter((e)=>e.isDynamic).forEach((e)=>{e.buffer=a.buffer})}async setPlaceholderValue(e){if(!this.placeholderContext)throw new Error('placeholderContext is not initialized');let t=this.placeholderContext;t.update(e);t.isResolved&&(await this.initializeDynamicBuffer())}async run(){if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('placeholderContext is not initialized');if(!this.variableMap)throw new Error('Variable map is not initialized');if(!this.staticBuffer)throw new Error('StaticBuffer map is not initialized');if(!this.dynamicBuffer)throw new Error('DynamicBuffer map is not initialized');let e=this.variableMap,t=this.placeholderContext,a=this.descriptor.exec_infos.map((e)=>t.resolve(e)),r=Date.now(),o=Date.now();for(let t=0,i;te.get(t)),l=s.outputs.map((t)=>e.get(t));this.kernelObj[s.entry_func_name](d,l,s.call_option)}console.log(`Processed ${a.length}/${a.length} kernels in ${Date.now()-r} ms`)}getInputViews(){if(this.inputs)return this.inputs;if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');let e=this.descriptor,t=this.placeholderContext;return this.inputs=e.inputs.map((a)=>{let n=e.memory_layout.static.allocations[a]||e.memory_layout.dynamic.allocations[a],r=new l.a(null,n.offset*l.a.BYTES_PER_ELEMENT,n.size,t);return r}),this.inputs}getOutputViews(){if(this.outputs)return this.outputs;if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');let e=this.descriptor,t=this.placeholderContext;return this.outputs=e.outputs.map((a)=>{let n=e.memory_layout.static.allocations[a]||e.memory_layout.dynamic.allocations[a],r=new l.a(null,n.offset*l.a.BYTES_PER_ELEMENT,n.size,t);return r}),this.outputs}}t.a=u},function(e){var t=function(){return this}();try{t=t||Function('return this')()||(1,eval)('this')}catch(a){'object'==typeof window&&(t=window)}e.exports=t},function(e,t,a){'use strict';var n=a(24),r=a.n(n);class o{async decode(e){let t=[],a=0,r=new DataView(e.buffer,e.byteOffset),i=0;for(;ie;e++)l[e]=o.decode_table[127&e]*d*(128>e?1:-1);let c=new Uint8Array(e.buffer,e.byteOffset+i,s),u=n.inflate(c),h=u.length,f=new Float32Array(h);for(let e=0;et.windowBits&&(t.windowBits+=16),this.err=0,this.msg='',this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var a=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(a!==h)throw new Error(d[a]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r='string'==typeof t.dictionary?s.string2buf(t.dictionary):'[object ArrayBuffer]'===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,a=i.deflateSetDictionary(this.strm,r),a!==h)throw new Error(d[a]);this._dict_set=!0}}function r(e,t){var a=new n(t);if(a.push(e,!0),a.err)throw a.msg||d[a.err];return a.result}var i=a(26),o=a(0),s=a(11),d=a(8),l=a(12),c=Object.prototype.toString,u=4,h=0,f=1,_=2,m=-1,p=0,g=8;n.prototype.push=function(e,t){var a=this.strm,n=this.options.chunkSize,r,d;if(this.ended)return!1;d=t===~~t?t:!0===t?u:0,a.input='string'==typeof e?s.string2buf(e):'[object ArrayBuffer]'===c.call(e)?new Uint8Array(e):e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new o.Buf8(n),a.next_out=0,a.avail_out=n),r=i.deflate(a,d),r!==f&&r!==h)return this.onEnd(r),this.ended=!0,!1;(0===a.avail_out||0===a.avail_in&&(d===u||d===_))&&('string'===this.options.to?this.onData(s.buf2binstring(o.shrinkBuf(a.output,a.next_out))):this.onData(o.shrinkBuf(a.output,a.next_out)))}while((0e.avail_out&&(a=e.avail_out);0===a||(x.arraySet(e.output,t.pending_buf,t.pending_out,a,e.next_out),e.next_out+=a,t.pending_out+=a,e.total_out+=a,e.avail_out-=a,t.pending-=a,0===t.pending&&(t.pending_out=0))}function d(e,t){k._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function l(e,t){e.pending_buf[e.pending++]=t}function c(e,t){e.pending_buf[e.pending++]=255&t>>>8,e.pending_buf[e.pending++]=255&t}function u(e,t,a,n){var r=e.avail_in;return(r>n&&(r=n),0===r)?0:(e.avail_in-=r,x.arraySet(t,e.input,e.next_in,r,a),1===e.state.wrap?e.adler=T(e.adler,t,r,a):2===e.state.wrap&&(e.adler=I(e.adler,t,r,a)),e.next_in+=r,e.total_in+=r,r)}function h(e,t){var a=e.max_chain_length,n=e.strstart,r=e.prev_length,i=e.nice_match,o=e.strstart>e.w_size-K?e.strstart-(e.w_size-K):0,s=e.window,d=e.w_mask,l=e.prev,c=e.strstart+Z,u=s[n+r-1],h=s[n+r],f,_;e.prev_length>=e.good_match&&(a>>=2),i>e.lookahead&&(i=e.lookahead);do{if(f=t,s[f+r]!==h||s[f+r-1]!==u||s[f]!==s[n]||s[++f]!==s[n+1])continue;n+=2,f++;do;while(s[++n]===s[++f]&&s[++n]===s[++f]&&s[++n]===s[++f]&&s[++n]===s[++f]&&s[++n]===s[++f]&&s[++n]===s[++f]&&s[++n]===s[++f]&&s[++n]===s[++f]&&nr){if(e.match_start=t,r=_,_>=i)break;u=s[n+r-1],h=s[n+r]}}while((t=l[t&d])>o&&0!=--a);return r<=e.lookahead?r:e.lookahead}function f(e){var t=e.w_size,a,r,n,i,o;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-K)){x.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,a=r;do n=e.head[--a],e.head[a]=n>=t?n-t:0;while(--r);r=t,a=r;do n=e.prev[--a],e.prev[a]=n>=t?n-t:0;while(--r);i+=t}if(0===e.strm.avail_in)break;if(r=u(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=V)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=V&&(e.ins_h=(e.ins_h<=V))n=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;else if(n=k._tr_tally(e,e.strstart-e.match_start,e.match_length-V),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=V){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=V&&(e.ins_h=(e.ins_h<=e.match_length&&(e.strategy===P||e.match_length===V&&4096=V&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-V,n=k._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-V),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=(e.ins_h<=V&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=V?(n=k._tr_tally(e,1,e.match_length-V),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(d(e,!1),0===e.strm.avail_out))return ne}return e.insert=0,t===C?(d(e,!0),0===e.strm.avail_out?ie:oe):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?ne:re}function p(e,t){for(var a;;){if(0===e.lookahead&&(f(e),0===e.lookahead)){if(t===R)return ne;break}if(e.match_length=0,a=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,a&&(d(e,!1),0===e.strm.avail_out))return ne}return e.insert=0,t===C?(d(e,!0),0===e.strm.avail_out?ie:oe):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?ne:re}function g(e,t,a,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=a,this.max_chain=n,this.func=r}function b(e){e.window_size=2*e.w_size,i(e.head),e.max_lazy_match=se[e.level].max_lazy,e.good_match=se[e.level].good_length,e.nice_match=se[e.level].nice_length,e.max_chain_length=se[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=V-1,e.match_available=0,e.ins_h=0}function y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=U,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new x.Buf16(2*X),this.dyn_dtree=new x.Buf16(2*(2*H+1)),this.bl_tree=new x.Buf16(2*(2*G+1)),i(this.dyn_ltree),i(this.dyn_dtree),i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new x.Buf16(Y+1),this.heap=new x.Buf16(2*W+1),i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new x.Buf16(2*W+1),i(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=M,t=e.state,t.pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?q:te,e.adler=2===t.wrap?0:1,t.last_flush=R,k._tr_init(t),D):n(e,z)}function w(e){var t=v(e);return t===D&&b(e.state),t}function E(e,t,a,r,i,o){if(!e)return z;var d=1;if(t===L&&(t=6),0>r?(d=0,r=-r):15i||i>j||a!==U||8>r||15t||9o||o>F)return n(e,z);8===r&&(r=9);var l=new y;return e.state=l,l.strm=e,l.wrap=d,l.gzhead=null,l.w_bits=r,l.w_size=1<e.pending_buf_size-5&&(a=e.pending_buf_size-5);;){if(1>=e.lookahead){if(f(e),0===e.lookahead&&t===R)return ne;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+a;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,d(e,!1),0===e.strm.avail_out))return ne;if(e.strstart-e.block_start>=e.w_size-K&&(d(e,!1),0===e.strm.avail_out))return ne}return e.insert=0,t===C?(d(e,!0),0===e.strm.avail_out?ie:oe):e.strstart>e.block_start&&(d(e,!1),0===e.strm.avail_out)?ne:ne}),new g(4,4,8,4,s),new g(4,5,16,8,s),new g(4,6,32,32,s),new g(4,4,16,16,_),new g(8,16,32,32,_),new g(8,16,128,128,_),new g(8,32,128,256,_),new g(32,128,258,1024,_),new g(32,258,258,4096,_)],t.deflateInit=function(e,t){return E(e,t,U,15,8,0)},t.deflateInit2=E,t.deflateReset=w,t.deflateResetKeep=v,t.deflateSetHeader=function(e,t){return e&&e.state?2===e.state.wrap?(e.state.gzhead=t,D):z:z},t.deflate=function(e,t){var a,d,s,u;if(!e||!e.state||t>B||0>t)return e?n(e,z):z;if(d=e.state,!e.output||!e.input&&0!==e.avail_in||d.status===ae&&t!==C)return n(e,0===e.avail_out?N:z);if(d.strm=e,a=d.last_flush,d.last_flush=t,d.status===q)if(2===d.wrap)e.adler=0,l(d,31),l(d,139),l(d,8),d.gzhead?(l(d,(d.gzhead.text?1:0)+(d.gzhead.hcrc?2:0)+(d.gzhead.extra?4:0)+(d.gzhead.name?8:0)+(d.gzhead.comment?16:0)),l(d,255&d.gzhead.time),l(d,255&d.gzhead.time>>8),l(d,255&d.gzhead.time>>16),l(d,255&d.gzhead.time>>24),l(d,9===d.level?2:d.strategy>=O||2>d.level?4:0),l(d,255&d.gzhead.os),d.gzhead.extra&&d.gzhead.extra.length&&(l(d,255&d.gzhead.extra.length),l(d,255&d.gzhead.extra.length>>8)),d.gzhead.hcrc&&(e.adler=I(e.adler,d.pending_buf,d.pending,0)),d.gzindex=0,d.status=Q):(l(d,0),l(d,0),l(d,0),l(d,0),l(d,0),l(d,9===d.level?2:d.strategy>=O||2>d.level?4:0),l(d,3),d.status=te);else{var h=U+(d.w_bits-8<<4)<<8,f=-1;f=d.strategy>=O||2>d.level?0:6>d.level?1:6===d.level?2:3,h|=f<<6,0!==d.strstart&&(h|=32),h+=31-h%31,d.status=te,c(d,h),0!==d.strstart&&(c(d,e.adler>>>16),c(d,65535&e.adler)),e.adler=1}if(d.status===Q)if(d.gzhead.extra){for(s=d.pending;d.gzindex<(65535&d.gzhead.extra.length)&&!(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=I(e.adler,d.pending_buf,d.pending-s,s)),o(e),s=d.pending,d.pending===d.pending_buf_size));)l(d,255&d.gzhead.extra[d.gzindex]),d.gzindex++;d.gzhead.hcrc&&d.pending>s&&(e.adler=I(e.adler,d.pending_buf,d.pending-s,s)),d.gzindex===d.gzhead.extra.length&&(d.gzindex=0,d.status=J)}else d.status=J;if(d.status===J)if(d.gzhead.name){s=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=I(e.adler,d.pending_buf,d.pending-s,s)),o(e),s=d.pending,d.pending===d.pending_buf_size)){u=1;break}u=d.gzindexs&&(e.adler=I(e.adler,d.pending_buf,d.pending-s,s)),0===u&&(d.gzindex=0,d.status=$)}else d.status=$;if(d.status===$)if(d.gzhead.comment){s=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=I(e.adler,d.pending_buf,d.pending-s,s)),o(e),s=d.pending,d.pending===d.pending_buf_size)){u=1;break}u=d.gzindexs&&(e.adler=I(e.adler,d.pending_buf,d.pending-s,s)),0===u&&(d.status=ee)}else d.status=ee;if(d.status===ee&&(d.gzhead.hcrc?(d.pending+2>d.pending_buf_size&&o(e),d.pending+2<=d.pending_buf_size&&(l(d,255&e.adler),l(d,255&e.adler>>8),e.adler=0,d.status=te)):d.status=te),0!==d.pending){if(o(e),0===e.avail_out)return d.last_flush=-1,D;}else if(0===e.avail_in&&r(t)<=r(a)&&t!==C)return n(e,N);if(d.status===ae&&0!==e.avail_in)return n(e,N);if(0!==e.avail_in||0!==d.lookahead||t!==R&&d.status!==ae){var _=d.strategy===O?p(d,t):d.strategy===3?m(d,t):se[d.level].func(d,t);if((_===ie||_===oe)&&(d.status=ae),_===ne||_===ie)return 0===e.avail_out&&(d.last_flush=-1),D;if(_===re&&(t===1?k._tr_align(d):t!==B&&(k._tr_stored_block(d,0,0,!1),t===3&&(i(d.head),0===d.lookahead&&(d.strstart=0,d.block_start=0,d.insert=0))),o(e),0===e.avail_out))return d.last_flush=-1,D}return t===C?0>=d.wrap?A:(2===d.wrap?(l(d,255&e.adler),l(d,255&e.adler>>8),l(d,255&e.adler>>16),l(d,255&e.adler>>24),l(d,255&e.total_in),l(d,255&e.total_in>>8),l(d,255&e.total_in>>16),l(d,255&e.total_in>>24)):(c(d,e.adler>>>16),c(d,65535&e.adler)),o(e),0=r.w_size&&(0===n&&(i(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new x.Buf8(r.w_size),x.arraySet(u,t,a-r.w_size,r.w_size,0),t=u,a=r.w_size),d=e.avail_in,l=e.next_in,c=e.input,e.avail_in=a,e.next_in=0,e.input=t,f(r);r.lookahead>=V;){o=r.strstart,s=r.lookahead-(V-1);do r.ins_h=(r.ins_h<e?J[e]:J[256+(e>>>7)]}function d(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=255&t>>>8}function l(e,t,a){e.bi_valid>U-a?(e.bi_buf|=65535&t<>U-e.bi_valid,e.bi_valid+=a-U):(e.bi_buf|=65535&t<>>=1,a<<=1;while(0<--t);return a>>>1}function u(e){16===e.bi_valid?(d(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function h(e,t){var a=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,l=t.stat_desc.max_length,c=0,u,h,n,_,m,p;for(_=0;_<=M;_++)e.bl_count[_]=0;for(a[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;ul&&(_=l,c++),a[2*h+1]=_,!(h>r))&&(e.bl_count[_]++,m=0,h>=d&&(m=s[h-d]),p=a[2*h],e.opt_len+=p*(_+m),o&&(e.static_len+=p*(i[2*h+1]+m)));if(0!=c){do{for(_=l-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[l]--,c-=2}while(0r))&&(a[2*n+1]!==_&&(e.opt_len+=(_-a[2*n+1])*a[2*n],a[2*n+1]=_),h--)}}function f(e,t,a){var r=Array(M+1),i=0,o,d;for(o=1;o<=M;o++)r[o]=i=i+a[o-1]<<1;for(d=0;d<=t;d++){var n=e[2*d+1];0!==n&&(e[2*d]=s(r[n]++,n))}}function _(){var e=Array(M+1),t,a,n,i,o;for(n=0,i=0;ii;i++)for(te[i]=o,t=0;t<1<>=7;i=t;)q[2*t+1]=8,t++,e[8]++;for(;255>=t;)q[2*t+1]=9,t++,e[9]++;for(;279>=t;)q[2*t+1]=7,t++,e[7]++;for(;287>=t;)q[2*t+1]=8,t++,e[8]++;for(f(q,L+1,e),t=0;te.heap_len;)l=e.heap[++e.heap_len]=2>s?++s:0,a[2*l]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[2*l+1]);for(t.max_code=s,d=e.heap_len>>1;1<=d;d--)y(e,a,d);l=o;do d=e.heap[1],e.heap[1]=e.heap[e.heap_len--],y(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=d,e.heap[--e.heap_max]=n,a[2*l]=a[2*d]+a[2*n],e.depth[l]=(e.depth[d]>=e.depth[n]?e.depth[d]:e.depth[n])+1,a[2*d+1]=a[2*n+1]=l,e.heap[1]=l++,y(e,a,1);while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],h(e,t),f(a,s,e.bl_count)}function E(e,t,a){var r=-1,i=t[1],o=0,s=7,d=4,l,n;for(0===i&&(s=138,d=3),t[2*(a+1)+1]=65535,l=0;l<=a;l++){if(n=i,i=t[2*(l+1)+1],++o=o?e.bl_tree[2*G]++:e.bl_tree[2*X]++:(n!==r&&e.bl_tree[2*n]++,e.bl_tree[2*H]++);o=0,r=n,0===i?(s=138,d=3):n===i?(s=6,d=3):(s=7,d=4)}}function x(e,t,a){var r=-1,i=t[1],o=0,s=7,d=4,u,n;for(0===i&&(s=138,d=3),u=0;u<=a;u++){if(n=i,i=t[2*(u+1)+1],++o=o?(c(e,G,e.bl_tree),l(e,o-3,3)):(c(e,X,e.bl_tree),l(e,o-11,7)):(n!==r&&(c(e,n,e.bl_tree),o--),c(e,H,e.bl_tree),l(e,o-3,2));o=0,r=n,0===i?(s=138,d=3):n===i?(s=6,d=3):(s=7,d=4)}}function k(e){var t;for(E(e,e.dyn_ltree,e.l_desc.max_code),E(e,e.dyn_dtree,e.d_desc.max_code),w(e,e.bl_desc),t=O-1;3<=t&&0===e.bl_tree[2*K[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function T(e,t,a,n){var r;for(l(e,t-257,5),l(e,a-1,5),l(e,n-4,4),r=0;r=a;a++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*a])return C;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return B;for(a=32;a>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=a+5,a+4<=i&&-1!==t?S(e,t,a,n):e.strategy===4||o===i?(l(e,(A<<1)+(n?1:0),3),v(e,q,Q)):(l(e,(2<<1)+(n?1:0),3),T(e,e.l_desc.max_code+1,e.d_desc.max_code+1,r+1),v(e,e.dyn_ltree,e.dyn_dtree)),m(e),n&&p(e)},t._tr_tally=function(e,t,a){return e.pending_buf[e.d_buf+2*e.last_lit]=255&t>>>8,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&a,e.last_lit++,0===t?e.dyn_ltree[2*a]++:(e.matches++,t--,e.dyn_ltree[2*($[a]+N+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){l(e,A<<1,3),c(e,W,q),u(e)}},function(e,t,a){'use strict';function n(e){if(!(this instanceof n))return new n(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:''},e||{});var t=this.options;t.raw&&0<=t.windowBits&&16>t.windowBits&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),0<=t.windowBits&&16>t.windowBits&&!(e&&e.windowBits)&&(t.windowBits+=32),15t.windowBits&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg='',this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var a=i.inflateInit2(this.strm,t.windowBits);if(a!==d.Z_OK)throw new Error(l[a]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function r(e,t){var a=new n(t);if(a.push(e,!0),a.err)throw a.msg||l[a.err];return a.result}var i=a(29),o=a(0),s=a(11),d=a(13),l=a(8),c=a(12),u=a(32),h=Object.prototype.toString;n.prototype.push=function(e,t){var a=this.strm,n=this.options.chunkSize,r=this.options.dictionary,l=!1,c,u,f,_,m,p;if(this.ended)return!1;u=t===~~t?t:!0===t?d.Z_FINISH:d.Z_NO_FLUSH,a.input='string'==typeof e?s.binstring2buf(e):'[object ArrayBuffer]'===h.call(e)?new Uint8Array(e):e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new o.Buf8(n),a.next_out=0,a.avail_out=n),c=i.inflate(a,d.Z_NO_FLUSH),c===d.Z_NEED_DICT&&r&&(p='string'==typeof r?s.string2buf(r):'[object ArrayBuffer]'===h.call(r)?new Uint8Array(r):r,c=i.inflateSetDictionary(this.strm,p)),c===d.Z_BUF_ERROR&&!0==l&&(c=d.Z_OK,l=!1),c!==d.Z_STREAM_END&&c!==d.Z_OK)return this.onEnd(c),this.ended=!0,!1;a.next_out&&(0===a.avail_out||c===d.Z_STREAM_END||0===a.avail_in&&(u===d.Z_FINISH||u===d.Z_SYNC_FLUSH))&&('string'===this.options.to?(f=s.utf8border(a.output,a.next_out),_=a.next_out-f,m=s.buf2string(a.output,f),a.next_out=_,a.avail_out=n-_,_&&o.arraySet(a.output,a.output,f,_,0),this.onData(m)):this.onData(o.shrinkBuf(a.output,a.next_out))),0===a.avail_in&&0===a.avail_out&&(l=!0)}while((0>>24)+(65280&e>>>8)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg='',t.wrap&&(e.adler=1&t.wrap),t.mode=I,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new h.Buf32(ne),t.distcode=t.distdyn=new h.Buf32(re),t.sane=1,t.back=-1,w):E}function s(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,o(e)):E}function d(e,t){var a,n;return e&&e.state?(n=e.state,0>t?(a=0,t=-t):(a=(t>>4)+1,48>t&&(t&=15)),t&&(8>t||15t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(p(g,e.lens,0,288,oe,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;p(b,e.lens,0,32,se,0,e.work,{bits:5}),ie=!1}e.lencode=oe,e.lenbits=9,e.distcode=se,e.distbits=5}function u(e,t,a,n){var r=e.state,i;return null===r.window&&(r.wsize=1<=r.wsize?(h.arraySet(r.window,t,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(i=r.wsize-r.wnext,i>n&&(i=n),h.arraySet(r.window,t,a-n,i,r.wnext),n-=i,n?(h.arraySet(r.window,t,a-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whavele;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>>8,d.check=_(d.check,o,2,0),de=0,le=0,d.mode=S;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&de)<<8)+(de>>8))%31){t.msg='incorrect header check',d.mode=te;break}if((15&de)!=T){t.msg='unknown compression method',d.mode=te;break}if(de>>>=4,le-=4,we=(15&de)+8,0===d.wbits)d.wbits=we;else if(we>d.wbits){t.msg='invalid window size',d.mode=te;break}d.dmax=1<le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>8),512&d.flags&&(o[0]=255&de,o[1]=255&de>>>8,d.check=_(d.check,o,2,0)),de=0,le=0,d.mode=R;case R:for(;32>le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>>8,o[2]=255&de>>>16,o[3]=255&de>>>24,d.check=_(d.check,o,4,0)),de=0,le=0,d.mode=C;case C:for(;16>le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>8),512&d.flags&&(o[0]=255&de,o[1]=255&de>>>8,d.check=_(d.check,o,2,0)),de=0,le=0,d.mode=B;case B:if(1024&d.flags){for(;16>le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>>8,d.check=_(d.check,o,2,0)),de=0,le=0}else d.head&&(d.head.extra=null);d.mode=D;case D:if(1024&d.flags&&(he=d.length,he>oe&&(he=oe),he&&(d.head&&(we=d.head.extra_len-d.length,!d.head.extra&&(d.head.extra=Array(d.head.extra_len)),h.arraySet(d.head.extra,l,re,he,we)),512&d.flags&&(d.check=_(d.check,l,he,re)),oe-=he,re+=he,d.length-=he),d.length))break inf_leave;d.length=0,d.mode=A;case A:if(2048&d.flags){if(0===oe)break inf_leave;he=0;do we=l[re+he++],d.head&&we&&65536>d.length&&(d.head.name+=e(we));while(we&&hed.length&&(d.head.comment+=e(we));while(we&&hele;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>9,d.head.done=!0),t.adler=d.check=0,d.mode=O;break;case L:for(;32>le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>>=7&le,le-=7&le,d.mode=J;break}for(;3>le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>>=1,le-=1,3&de){case 0:d.mode=M;break;case 1:if(c(d),d.mode=X,a===v){de>>>=2,le-=2;break inf_leave}break;case 2:d.mode=W;break;case 3:t.msg='invalid block type',d.mode=te;}de>>>=2,le-=2;break;case M:for(de>>>=7&le,le-=7≤32>le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>>16)){t.msg='invalid stored block lengths',d.mode=te;break}if(d.length=65535&de,de=0,le=0,d.mode=U,a===v)break inf_leave;case U:d.mode=j;case j:if(he=d.length,he){if(he>oe&&(he=oe),he>se&&(he=se),0===he)break inf_leave;h.arraySet(ne,l,re,he,ie),oe-=he,re+=he,se-=he,ie+=he,d.length-=he;break}d.mode=O;break;case W:for(;14>le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>>=5,le-=5,d.ndist=(31&de)+1,de>>>=5,le-=5,d.ncode=(15&de)+4,de>>>=4,le-=4,286le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<>>=3,le-=3}for(;19>d.have;)d.lens[s[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,xe={bits:d.lenbits},Ee=p(0,d.lens,0,19,d.lencode,0,d.work,xe),d.lenbits=xe.bits,Ee){t.msg='invalid code lengths set',d.mode=te;break}d.have=0,d.mode=G;case G:for(;d.have>>24,pe=255&i>>>16,ge=65535&i,me<=le)break;if(0===oe)break inf_leave;oe--,de+=l[re++]<ge)de>>>=me,le-=me,d.lens[d.have++]=ge;else{if(16===ge){for(ke=me+2;le>>=me,le-=me,0===d.have){t.msg='invalid bit length repeat',d.mode=te;break}we=d.lens[d.have-1],he=3+(3&de),de>>>=2,le-=2}else if(17===ge){for(ke=me+3;le>>=me,le-=me,we=0,he=3+(7&de),de>>>=3,le-=3}else{for(ke=me+7;le>>=me,le-=me,we=0,he=11+(127&de),de>>>=7,le-=7}if(d.have+he>d.nlen+d.ndist){t.msg='invalid bit length repeat',d.mode=te;break}for(;he--;)d.lens[d.have++]=we}}if(d.mode===te)break;if(0===d.lens[256]){t.msg='invalid code -- missing end-of-block',d.mode=te;break}if(d.lenbits=9,xe={bits:d.lenbits},Ee=p(g,d.lens,0,d.nlen,d.lencode,0,d.work,xe),d.lenbits=xe.bits,Ee){t.msg='invalid literal/lengths set',d.mode=te;break}if(d.distbits=6,d.distcode=d.distdyn,xe={bits:d.distbits},Ee=p(b,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,xe),d.distbits=xe.bits,Ee){t.msg='invalid distances set',d.mode=te;break}if(d.mode=X,a===v)break inf_leave;case X:d.mode=Y;case Y:if(6<=oe&&258<=se){t.next_out=ie,t.avail_out=se,t.next_in=re,t.avail_in=oe,d.hold=de,d.bits=le,m(t,ue),ie=t.next_out,ne=t.output,se=t.avail_out,re=t.next_in,l=t.input,oe=t.avail_in,de=d.hold,le=d.bits,d.mode===O&&(d.back=-1);break}for(d.back=0;;){if(i=d.lencode[de&(1<>>24,pe=255&i>>>16,ge=65535&i,me<=le)break;if(0===oe)break inf_leave;oe--,de+=l[re++]<>be)],me=i>>>24,pe=255&i>>>16,ge=65535&i,be+me<=le)break;if(0===oe)break inf_leave;oe--,de+=l[re++]<>>=be,le-=be,d.back+=be}if(de>>>=me,le-=me,d.back+=me,d.length=ge,0===pe){d.mode=Q;break}if(32&pe){d.back=-1,d.mode=O;break}if(64&pe){t.msg='invalid literal/length code',d.mode=te;break}d.extra=15&pe,d.mode=V;case V:if(d.extra){for(ke=d.extra;le>>=d.extra,le-=d.extra,d.back+=d.extra}d.was=d.length,d.mode=Z;case Z:for(;;){if(i=d.distcode[de&(1<>>24,pe=255&i>>>16,ge=65535&i,me<=le)break;if(0===oe)break inf_leave;oe--,de+=l[re++]<>be)],me=i>>>24,pe=255&i>>>16,ge=65535&i,be+me<=le)break;if(0===oe)break inf_leave;oe--,de+=l[re++]<>>=be,le-=be,d.back+=be}if(de>>>=me,le-=me,d.back+=me,64&pe){t.msg='invalid distance code',d.mode=te;break}d.offset=ge,d.extra=15&pe,d.mode=K;case K:if(d.extra){for(ke=d.extra;le>>=d.extra,le-=d.extra,d.back+=d.extra}if(d.offset>d.dmax){t.msg='invalid distance too far back',d.mode=te;break}d.mode=q;case q:if(0===se)break inf_leave;if(he=ue-se,d.offset>he){if(he=d.offset-he,he>d.whave&&d.sane){t.msg='invalid distance too far back',d.mode=te;break}he>d.wnext?(he-=d.wnext,fe=d.wsize-he):fe=d.wnext-he,he>d.length&&(he=d.length),_e=d.window}else _e=ne,fe=ie-d.offset,he=d.length;he>se&&(he=se),se-=he,d.length-=he;do ne[ie++]=_e[fe++];while(--he);0===d.length&&(d.mode=Y);break;case Q:if(0===se)break inf_leave;ne[ie++]=d.length,se--,d.mode=Y;break;case J:if(d.wrap){for(;32>le;){if(0===oe)break inf_leave;oe--,de|=l[re++]<le;){if(0===oe)break inf_leave;oe--,de+=l[re++]<m&&(_+=I[r++]<>>24,_>>>=w,m-=w,w=255&v>>>16,0===w)S[o++]=65535&v;else if(16&w){E=65535&v,w&=15,w&&(m>>=w,m-=w),15>m&&(_+=I[r++]<>>24,_>>>=w,m-=w,w=255&v>>>16,16&w){if(x=65535&v,w&=15,ml){e.msg='invalid distance too far back',n.mode=t;break top}if(_>>>=w,m-=w,w=o-s,x>w){if(w=x-w,w>u&&n.sane){e.msg='invalid distance too far back',n.mode=t;break top}if(k=0,T=f,0===h){if(k+=c-w,w>3,r-=E,m-=E<<3,_&=(1<x&&(k=x),0==x)return m[p++]=20971520,m[p++]=20971520,b.bits=1,0;for(E=1;ES)return-1;if(0i||e===l&&R>o)return 1;for(;;){W=v-I,g[w]j?(H=N[L+g[w]],G=B[D+g[w]]):(H=96,G=0),P=1<>I)+O]=0|(W<<24|H<<16|G);while(0!==O);for(P=1<>=1;if(0===P?C=0:(C&=P-1,C+=P),w++,0==--A[v]){if(v==x)break;v=t[a+g[w]]}if(v>k&&(C&M)!==F){for(0==I&&(I=k),U+=E,T=v-I,S=1<=S));)T++,S<<=1;if(R+=1<i||e===l&&R>o)return 1;F=C&M,m[F]=0|(k<<24|T<<16|U-p)}}return 0!==C&&(m[U+C]=0|(4194304|v-I<<24)),b.bits=k,0}},function(e){'use strict';e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name='',this.comment='',this.hcrc=0,this.done=!1}},function(e,t){'use strict';t.a=class{async decode(e){return new Float32Array(e.buffer,e.byteOffset,e.byteLength/4)}}},function(e,t){'use strict';const a=-1;t.a=class{constructor(){this.scheduledCallbackId=a}request(e){this.fn=e,this.scheduledCallbackId==a&&(this.scheduledCallbackId=requestAnimationFrame(()=>this.forceDispatch()))}forceDispatch(){this.scheduledCallbackId==a||(this.cancel(),this.fn())}cancel(){this.scheduledCallbackId==a||(cancelAnimationFrame(this.scheduledCallbackId),this.scheduledCallbackId=a)}}},function(e,t){'use strict';function a(e){let t=[];for(let n=0,r;n'),a.firstChild.href}async setDescriptorAndParameters(e,t){this.descriptor=e,this.placeholderContext=new s.a(this.descriptor.placeholders);let a='object'==typeof WebAssembly?'webassembly':'asmjs';0<=window.navigator.userAgent.indexOf('iPhone OS 11_2')&&(a='asmjs');let n=`${this.directory}/kernels_${a}.js`;n=this.transformUrlDelegate(n),this.worker_entry_js_path=n;let r=await fetch(this.worker_entry_js_path),i=await r.text(),o=(e,t)=>{let a=this.absolutePath(`${this.directory}/${e}`),n=this.transformUrlDelegate(a);i=i.replace(t,n)};'webassembly'==a?o('kernels_webassembly.wasm','WEBDNN_URL_KERNELS_WASM'):o('kernels_asmjs.js.mem','WEBDNN_URL_KERNELS_ASMJS_MEM'),await this.compile(i),await this.loadWeights(new Uint8Array(t)),(await this.getInputViews()).filter((e)=>!e.isDynamic).forEach((e)=>{e.buffer=new Float32Array(e.length).buffer}),(await this.getOutputViews()).filter((e)=>!e.isDynamic).forEach((e)=>{e.buffer=new Float32Array(e.length).buffer})}async fetchDescriptor(e){this.directory=e;let t=await Object(o.a)(`${e}/graph_${this.backendName}.json`,this.transformUrlDelegate);return t.json()}async fetchParameters(e,t){let a=`${e}/weight_${this.backendName}.bin`,n=await Object(o.a)(a,this.transformUrlDelegate);return Object(o.b)(n,t)}async restoreCachedDescriptor(e){return this.directory=e,n.getItem(`${e}_${this.backendName}_descriptor`).catch(()=>null)}async restoreCachedParameters(e,t){let a=await n.getItem(`${e}_${this.backendName}_parameters`).catch(()=>null);return a&&t&&t(a.byteLength,a.byteLength),a}async saveCache(e,t,a){await Promise.all([n.setItem(`${e}_${this.backendName}_descriptor`,t),n.setItem(`${e}_${this.backendName}_parameters`,a)])}async setPlaceholderValue(e){if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized.');let t=this.placeholderContext;if(t.update(e),!t.isResolved)return;if(!this.descriptor)throw new Error('Descriptor is not loaded');let a=this.descriptor,n=a.unresolved_value_lists,r=[];for(let a=0,i;a{let n=t.resolve(e.placeholder);r.push(a,e.offset,n)});(await this.getInputViews()).filter((e)=>e.isDynamic).forEach((e)=>{e.buffer=new Float32Array(e.length).buffer}),(await this.getOutputViews()).filter((e)=>e.isDynamic).forEach((e)=>{e.buffer=new Float32Array(e.length).buffer});let i=this.placeholderContext.resolve(this.descriptor.memory_layout.dynamic.size);await this.setPlaceholderValueWorker(i,new Int32Array(r))}setPlaceholderValueWorker(e,t){if(!this.worker)throw Error('Worker is not initialized');let a=this.worker;return new Promise((n,r)=>{a.onmessage=(e)=>{0===e.data?n():(console.log(e.data),a.terminate(),r(new Error(e.data)))},a.postMessage({type:'set_dynamic_buffer',size:e,data:t})})}compile(e){let t=new Blob([e],{type:'text/javascript'}),a=URL.createObjectURL(t),n=new Worker(a);n.onerror=(e)=>{console.error(e),this.worker_promise_reject_func?this.worker_promise_reject_func(e):this.worker_initial_error=e};let r=new Promise((e,t)=>this.worker_initial_error?t(this.worker_initial_error):void(this.worker_promise_reject_func=t,n.onmessage=(a)=>{0===a.data?e():(console.error(a.data),n.terminate(),t(new Error(a.data)))}));return this.worker=n,r}async loadWeights(e){if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.worker)throw new Error('Worker is not initialized');let t=Object(i.a)(this.descriptor.weight_encoding),a=await t.decode(e),n=this.worker,r=new Promise((e,t)=>{this.worker_promise_reject_func=t,n.onmessage=(a)=>{0===a.data?e():(console.log(a.data),n.terminate(),t(new Error(a.data)))},n.postMessage({type:'weight',data:a},[a.buffer])});return r}getInputViews(){if(this.inputs)return this.inputs;if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');let e=this.descriptor,t=this.placeholderContext;return this.inputs=e.inputs.map((a)=>{let n=e.memory_layout.static.allocations[a]||e.memory_layout.dynamic.allocations[a],r=new d.a(null,0,n.size,t);return r}),this.inputs}getOutputViews(){if(this.outputs)return this.outputs;if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');let e=this.descriptor,t=this.placeholderContext;return this.outputs=e.outputs.map((a)=>{let n=e.memory_layout.static.allocations[a]||e.memory_layout.dynamic.allocations[a],r=new d.a(null,0,n.size,t);return r}),this.outputs}async run(){if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.worker)throw new Error('Worker is not initialized');if(!this.placeholderContext.isResolved)throw new Error('Not all placeholder is resolved');let e=this.placeholderContext,t=this.descriptor,a=this.worker,n=new Promise((n,r)=>{this.worker_promise_reject_func=r,a.onmessage=(e)=>{if(Array.isArray(e.data)){for(let t=0;tn;n++)if(r=o[n][t.inputs[a]],r){let t=this.inputs[a];s.push({space:n,offset:e.resolve(r.offset),size:t.length,data:t.toActual()});break}let d=[];for(let a=0;an;n++)if(r=o[n][t.outputs[a]],r){let t=this.outputs[a];d.push({space:n,offset:e.resolve(r.offset),size:t.length});break}a.postMessage({type:'run',inputs:s,outputs:d})});return n}}t.a=c},function(e,t,a){'use strict';var n=a(2),r=a.n(n),i=a(38),o=a(3),s=a(4),d=a(5),l=a(6),c=a(1),u=a(14),h=a(7);const f=new Float32Array([-1,1,-1,-1,1,1,1,-1]);class _ extends h.a{constructor(e={}){super(e),this.backendName='webgl'}static checkAvailability(){return u.a.checkAvailability()}async init(){if(!_.checkAvailability())throw Error('WebGL backend is not supported in this browser.');this.handler=u.a.getInstance();let e=this.handler.createArrayBuffer(f);this.handler.bindArrayBuffer(e),this.buffers=new Map}async fetchDescriptor(e){let t=await Object(s.a)(`${e}/graph_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}.json`,this.transformUrlDelegate);return t.json()}async fetchParameters(e,t){let a=await Object(s.a)(`${e}/weight_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}.bin`,this.transformUrlDelegate);return Object(s.b)(a,t)}async restoreCachedDescriptor(e){return n.getItem(`${e}_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}_descriptor`).catch(()=>null)}async restoreCachedParameters(e,t){let a=await n.getItem(`${e}_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}_parameters`).catch(()=>null);return a&&t&&t(a.byteLength,a.byteLength),a}async saveCache(e,t,a){await Promise.all([n.setItem(`${e}_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}_descriptor`,t),n.setItem(`${e}_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}_parameters`,a)])}async setDescriptorAndParameters(e,t){await this.setDescriptor(e),await this.compile(),await this.initializeStaticBuffer(t),this.placeholderContext&&this.placeholderContext.isResolved&&(await this.initializeDynamicBuffer())}async initializeStaticBuffer(e){if(!this.descriptor)throw new Error('Descriptor is not loaded');let t=this.descriptor,a=Object(o.a)(this.descriptor.weight_encoding),n=await a.decode(new Uint8Array(e)),r=this.buffers,s=t.memory_layout.mapping;Object.entries(t.memory_layout.static.allocations).forEach(([e,{width:t,height:a,size:n,channel_mode:o}])=>{r.set(e,new i.a(n*Float32Array.BYTES_PER_ELEMENT,t,a,e,null,o))}),Object.entries(t.constants_map).forEach(([e,{size:t,byte_offset:a}])=>{r.get(e).array.set(new Float32Array(n.buffer,a,t))}),(await this.getInputViews()).filter((e)=>!e.isDynamic).forEach((e)=>{e.buffer=r.get(s[e.name]).getWriteView(0,e.length,Float32Array).buffer}),(await this.getOutputViews()).filter((e)=>!e.isDynamic).forEach((e)=>{e.buffer=r.get(s[e.name]).getReadView(0,e.length,Float32Array).buffer})}async initializeDynamicBuffer(){if(!this.descriptor)throw Error('GraphDescriptor is not loaded.');if(!this.placeholderContext)throw Error('PlaceholderContext is not initialized.');let e=this.descriptor,t=this.placeholderContext,a=this.buffers,n=e.memory_layout.mapping;Object.entries(e.memory_layout.dynamic.allocations).forEach(([e,{width:n,height:r,size:o,channel_mode:s}])=>{a.set(e,new i.a(t.resolve(o)*Float32Array.BYTES_PER_ELEMENT,t.resolve(n),t.resolve(r),e,null,s))}),(await this.getInputViews()).filter((e)=>e.isDynamic).forEach((e)=>{e.buffer=a.get(n[e.name]).getWriteView(0,t.resolve(e.length),Float32Array).buffer}),(await this.getOutputViews()).filter((e)=>e.isDynamic).forEach((e)=>{e.buffer=a.get(n[e.name]).getReadView(0,t.resolve(e.length),Float32Array).buffer}),this.buildPipeline()}async setDescriptor(e){this.descriptor=e,this.placeholderContext=new d.a(e.placeholders)}async compile(){if(!this.descriptor)throw new Error('Descriptor is not loaded');let e=this.descriptor;this.programs=new Map,this.vertexShader=this.handler.createVertexShader(` - precision highp float; - attribute vec2 _xy; - void main() { - gl_Position = vec4(_xy, 0, 1); - } - `),Object.keys(e.shader_sources).forEach((t)=>{let a=this.handler.createFragmentShader(e.shader_sources[t]),n=this.handler.createProgram(this.vertexShader,a);this.programs.set(t,n)})}async setPlaceholderValue(e){if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized.');let t=this.placeholderContext;if(t.update(e),!!t.isResolved){if(!this.descriptor)throw new Error('Descriptor is not loaded');if(await this.initializeDynamicBuffer(),0{let n=new l.a(null,0,this.buffers.get(a[e]).length,t);return n.name=e,n}),this.inputs}getOutputViews(){if(this.outputs)return this.outputs;if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');let e=this.descriptor,t=this.placeholderContext,a=this.descriptor.memory_layout.mapping;return this.outputs=e.outputs.map((e)=>{let n=new l.a(null,0,this.buffers.get(a[e]).length,t);return n.name=e,n}),this.outputs}buildPipeline(){if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');if(!this.placeholderContext.isResolved)throw new Error(`Not all placeholders are resolved: ${this.placeholderContext}`);let e=this.handler.gl,t=this.buffers,a=this.descriptor.memory_layout.mapping,n=new Map;this.runtimeInfo={inputs:this.getInputViews().map((e)=>t.get(a[e.name])),outputs:this.getOutputViews().map((e)=>t.get(a[e.name])),programs:this.descriptor.exec_infos.map((r)=>{let i=r.inputs.map((e)=>{let r=t.get(a[e.variable_name]);return n.has(r)||n.set(r,0),n.set(r,n.get(r)+1),{buffer:r,uniformIndex:e.value}}),o=t.get(a[r.output]),s=this.programs.get(r.shader_name);this.handler.useProgram(s);let d=Object.keys(r.uniforms).map((t)=>{let{type:a,value:n}=r.uniforms[t];switch(a){case'int':return{func:e.uniform1i,args:[e.getUniformLocation(s,t),n]};case'float':return{func:e.uniform1f,args:[e.getUniformLocation(s,t),n]};case'vec2':return{func:e.uniform2fv,args:[e.getUniformLocation(s,t),n]};case'vec3':return{func:e.uniform3fv,args:[e.getUniformLocation(s,t),n]};case'vec4':return{func:e.uniform4fv,args:[e.getUniformLocation(s,t),n]};case'ivec2':return{func:e.uniform2iv,args:[e.getUniformLocation(s,t),n]};case'ivec3':return{func:e.uniform3iv,args:[e.getUniformLocation(s,t),n]};case'ivec4':return{func:e.uniform4iv,args:[e.getUniformLocation(s,t),n]};case'sampler2D':return{func:e.uniform1i,args:[e.getUniformLocation(s,t),n]};default:throw TypeError(`Incompatible type for uniform parameter: ${a}`);}}),l=e.getAttribLocation(s,'_xy');return{program:s,frameBuffer:this.handler.createFrameBuffer(),name:r.shader_name,width:o.textureWidth,height:o.textureHeight,inputs:i,output:o,xyAttribLoc:l,uniforms:d,disposable:[]}})};for(let e of this.runtimeInfo.programs)e.inputs.forEach(({buffer:t})=>{let a=n.get(t)-1;0==a&&e.disposable.push(t),n.set(t,a)})}async run(){if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');if(!this.placeholderContext.isResolved)throw new Error(`Not all placeholders are resolved: ${this.placeholderContext}`);let e=this.handler.gl,t=this.runtimeInfo;if(0(t.Kernel in e||(e[t.Kernel]={Kernel:t.Kernel,Count:0,"Elapsed time [ms]":0}),e[t.Kernel].Count++,e[t.Kernel]['Elapsed time [ms]']+=t['Elapsed time [ms]'],e),{})));r.forEach((e)=>e['Ratio [%]']=(e['Elapsed time [ms]']/n).toFixed(2)),console.table(a),console.table(r)}else for(let a of t.programs){this.handler.bindFrameBuffer(a.frameBuffer,a.width,a.height);for(let{buffer:e,uniformIndex:t}of a.inputs)await e.bindToReadTexture(t);a.output.bindToDrawTexture(),this.handler.useProgram(a.program);for(let t of a.uniforms)t.func.apply(e,t.args);e.vertexAttribPointer(a.xyAttribLoc,2,e.FLOAT,!0,8,0),e.enableVertexAttribArray(a.xyAttribLoc),e.drawArrays(e.TRIANGLE_STRIP,0,f.length/2);for(let{buffer:e}of a.inputs)e.unbindFromReadTexture();a.output.unbindFromDrawTexture()}for(let e of t.outputs)await e.syncReadViews()}}}t.a=_},function(e,t,a){'use strict';var n=a(14),r=a(15);class i extends r.a{constructor(e,t,a,r,i,o){switch(super(e,'webgl'),this._texture=null,this.readTextureUnitIndices=[],this.isBoundToDrawFrameBuffer=!1,this.handler=n.a.getInstance(),this.name=r,this.channelMode=o,o){case'RGBA':this.elementsPerPixel=4;break;case'R':this.elementsPerPixel=1;break;default:throw Error('Unknown channel mode');}if(Object(n.b)(this.handler.gl))switch(o){case'RGBA':this.textureFormat=this.handler.gl.RGBA,this.textureInternalFormat=this.handler.gl.RGBA32F,this.pixelStride=4;break;case'R':this.textureFormat=this.handler.gl.RED,this.textureInternalFormat=this.handler.gl.R32F,this.pixelStride=1;break;default:throw Error('Unknown channel mode');}else this.textureFormat=this.handler.gl.RGBA,this.textureInternalFormat=this.handler.gl.RGBA,this.pixelStride=4;if(this.pixelStride -using namespace metal; - kernel void check_compatibility( - device uint *A[[buffer(0)]], - uint global_index[[thread_position_in_grid]], - uint thread_execution_width[[thread_execution_width]] - ){ - if (global_index == 0) { - A[0] = thread_execution_width; - } - }`,'basic');let e=this.webgpuHandler.createBuffer(new Uint32Array(1));await this.webgpuHandler.executeSinglePipelineState('basic.check_compatibility',{width:1,height:1,depth:1},{width:1,height:1,depth:1},[e],!0);let t=new Uint32Array(e.contents)[0];if(32!=t)throw new Error(`Sorry, this GPU does not compatible with WebGPU (thread_execution_width == ${t}. See checkIncompatibleGPU method of https://github.com/mil-tokyo/webdnn/blob/master/src/descriptor_runner/descriptor_runner/descriptor_runner_webgpu.ts`)}async fetchDescriptor(e){let t=await Object(s.a)(`${e}/graph_${this.backendName}.json`,this.transformUrlDelegate);return t.json()}async fetchParameters(e,t){let a=await Object(s.a)(`${e}/weight_${this.backendName}.bin`,this.transformUrlDelegate);return Object(s.b)(a,t)}async restoreCachedDescriptor(e){return n.getItem(`${e}_${this.backendName}_descriptor`).catch(()=>null)}async restoreCachedParameters(e,t){let a=await n.getItem(`${e}_${this.backendName}_parameters`).catch(()=>null);return a&&t&&t(a.byteLength,a.byteLength),a}async saveCache(e,t,a){await Promise.all([n.setItem(`${e}_${this.backendName}_descriptor`,t),n.setItem(`${e}_${this.backendName}_parameters`,a)])}async setDescriptorAndParameters(e,t){this.descriptor=e,this.staticBuffer=null,this.dynamicBuffer=null,this.metaBuffers=null,this.placeholderContext=new d.a(e.placeholders),this.executionInfos=e.exec_infos,this.webgpuHandler.loadKernel(this.descriptor.kernel_source,'descriptor'),await this.initializeStaticBuffer(t),await this.initializeMetaBuffers(),await this.setPlaceholderValue({__MAX_THREADS_PER_THREADGROUP__:f?512:1024}),this.placeholderContext&&this.placeholderContext.isResolved&&(await this.initializeDynamicBuffer())}async initializeStaticBuffer(e){if(!this.descriptor)throw Error('GraphDescriptor is not loaded.');let t=this.descriptor,a=new i.a(t.memory_layout.static.size*Float32Array.BYTES_PER_ELEMENT);this.staticBuffer=a;let n=Object(o.a)(t.weight_encoding);await a.write((await n.decode(new Uint8Array(e)))),(await this.getInputViews()).filter((e)=>!e.isDynamic).forEach((e)=>{e.buffer=a.bufferView.buffer}),(await this.getOutputViews()).filter((e)=>!e.isDynamic).forEach((e)=>{e.buffer=a.bufferView.buffer})}async initializeMetaBuffers(){if(!this.descriptor)throw Error('GraphDescriptor is not loaded.');this.metaBuffers=await Promise.all(this.descriptor.exec_infos.map(async(e)=>{let t=new i.a(e.meta_buffer.length*Int32Array.BYTES_PER_ELEMENT);return await t.write(new Uint8Array(e.meta_buffer)),t}))}async initializeDynamicBuffer(){if(!this.descriptor)throw Error('GraphDescriptor is not loaded.');if(!this.placeholderContext)throw Error('PlaceholderContext is not initialized.');let e=this.descriptor,t=this.placeholderContext,a=t.resolve(e.memory_layout.dynamic.size),n=new i.a(a*Float32Array.BYTES_PER_ELEMENT);this.dynamicBuffer=n,(await this.getInputViews()).filter((e)=>e.isDynamic).forEach((e)=>{e.buffer=n.bufferView.buffer}),(await this.getOutputViews()).filter((e)=>e.isDynamic).forEach((e)=>{e.buffer=n.bufferView.buffer})}async setPlaceholderValue(e){if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized.');let t=this.placeholderContext;if(t.update(e),!t.isResolved)return;if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.metaBuffers)throw new Error('MetaBuffers are not initialized');let a=this.descriptor,n=this.metaBuffers;await this.initializeDynamicBuffer(),this.executionInfos=await Promise.all(a.exec_infos.map(async(e,a)=>{let r=new Int32Array(n[a].bufferView.buffer);for(let n of e.unresolved_value_list)r[n.offset]=t.resolve(n.placeholder);return t.resolve(e)}))}getInputViews(){if(this.inputs)return this.inputs;if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');let e=this.descriptor,t=this.placeholderContext;return this.inputs=e.inputs.map((a)=>{let n=e.memory_layout.static.allocations[a]||e.memory_layout.dynamic.allocations[a],r=new l.a(null,n.offset*l.a.BYTES_PER_ELEMENT,n.size,t);return r}),this.inputs}getOutputViews(){if(this.outputs)return this.outputs;if(!this.descriptor)throw new Error('Descriptor is not loaded');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');let e=this.descriptor,t=this.placeholderContext;return this.outputs=e.outputs.map((a)=>{let n=e.memory_layout.static.allocations[a]||e.memory_layout.dynamic.allocations[a],r=new l.a(null,n.offset*l.a.BYTES_PER_ELEMENT,n.size,t);return r}),this.outputs}async run(){if(!this.executionInfos)throw new Error('ExecutionInfos is not loaded');if(!this.staticBuffer)throw new Error('StaticBuffer is not initialized');if(!this.dynamicBuffer)throw new Error('DynamicBuffer is not initialized');if(!this.metaBuffers)throw new Error('MetaBuffer is not initialized');if(!this.placeholderContext)throw new Error('PlaceholderContext is not initialized');if(!this.placeholderContext.isResolved)throw new Error(`Not all placeholders are resolved: ${this.placeholderContext}`);let e=this.staticBuffer,t=this.dynamicBuffer,a=this.metaBuffers;if(Object(c.getConfiguration)('DEBUG',!1)){let n=[],r=0;for(let o=0;o(t.Kernel in e||(e[t.Kernel]={Kernel:t.Kernel,Count:0,"Elapsed time [ms]":0}),e[t.Kernel].Count++,e[t.Kernel]['Elapsed time [ms]']+=t['Elapsed time [ms]'],e),{})));i.forEach((e)=>e['Ratio [%]']=(e['Elapsed time [ms]']/r).toFixed(2)),console.table(n),console.table(i)}else{let n=null;for(let r=0;rn(e))):e}function r(e){if('number'==typeof e)return[e,e,e,e];if(4==e.length)return[e[0],e[1],e[2],e[3]];if(3==e.length)return[e[0],e[1],e[2],e[0]];if(1==e.length)return[e[0],e[0],e[0],e[0]];throw new Error('bias and scale must be scalar number or array of length 1 or 3 or 4.')}function i(e,t={}){let{type:a=Float32Array,color:n=c.a.RGB,order:i=c.b.HWC,bias:o=[0,0,0],scale:s=[1,1,1]}=t;const d=r(o),l=r(s),u=e.width,f=e.height;let _=e.data,m,p,y,v,g,E,x,k,b;switch(n){case c.a.RGB:switch(m=new a(3*(u*f)),[E,x,k]=l,[p,y,v]=d,i){case c.b.HWC:for(let e=0;e=i-1)){for(;;){for(;e[s]>o&&s<=d;)s++;for(;e[d]<=o&&s<=d;)d--;if(s>=d)break;l=e[s],e[s]=e[d],e[d]=l,l=n[s],n[s]=n[d],n[d]=l}e[i-1]=e[s],e[s]=o,l=n[i-1],n[i-1]=n[s],n[s]=l,a.push([r,s]),s+1=i-1)){for(;;){for(;e[s]=o&&s<=d;)d--;if(s>=d)break;l=e[s],e[s]=e[d],e[d]=l,l=n[s],n[s]=n[d],n[d]=l}e[i-1]=e[s],e[s]=o,l=n[i-1],n[i-1]=n[s],n[s]=l,a.push([r,s]),s+1=t.oldVersion&&r.createObjectStore(B)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),n(a.error)},a.onsuccess=function(){r(a.result),c(e)}})}function f(e){return h(e,!1)}function d(e){return h(e,!0)}function p(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.versione.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function _(e){var t=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i>4,u[l++]=(15&n)<<4|i>>2,u[l++]=(3&i)<<6|63&a;return c}function y(e){var t,r=new Uint8Array(e),n="";for(t=0;t>2],n+=F[(3&r[t])<<4|r[t+1]>>4],n+=F[(15&r[t+1])<<2|r[t+2]>>6],n+=F[63&r[t+2]];return 2==r.length%3?n=n.substring(0,n.length-1)+"=":1==r.length%3&&(n=n.substring(0,n.length-2)+"=="),n}function v(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function E(e,t,r,n,i,a){e.executeSql(r,n,i,function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?a(e,o):v(e,t,function(){e.executeSql(r,n,i,a)},a)},a):a(e,o)},a)}function k(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function x(){return!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||0e?void t(null):void r.ready().then(function(){b(r._dbInfo,N,function(i,a){if(i)return n(i);try{var o=a.objectStore(r._dbInfo.storeName),s=!1,l=o.openCursor();l.onsuccess=function(){var r=l.result;return r?void(0===e?t(r.key):s?t(r.key):(s=!0,r.advance(e))):void t(null)},l.onerror=function(){n(l.error)}}catch(e){n(e)}})}).catch(n)});return n(i,t),i},keys:function(e){var t=this,r=new C(function(e,r){t.ready().then(function(){b(t._dbInfo,N,function(n,i){if(n)return r(n);try{var a=i.objectStore(t._dbInfo.storeName).openCursor(),o=[];a.onsuccess=function(){var t=a.result;return t?(o.push(t.key),void t.continue()):void e(o)},a.onerror=function(){r(a.error)}}catch(e){r(e)}})}).catch(r)});return n(r,e),r},dropInstance:function(e,t){t=o.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var i;if(e.name){var a=e.name===r.name&&this._dbInfo.db?C.resolve(this._dbInfo.db):f(e).then(function(t){var r=D[e.name],n=r.forages;r.db=t;for(var i=0;i '__WebKitDatabaseInfoTable__'",[],function(r,n){for(var i=[],a=0;a"number"==typeof e)}update(e){this.values=Object.assign(this.values,e)}resolve(placeholder){if("object"!=typeof placeholder)return placeholder;if(1==Object.keys(placeholder).length&&"eval"in placeholder){if(!this.isResolved)throw Error(`Not all placeholders are resolved: ${this}`);return eval("(function(placeholders){return "+placeholder.eval+";})")(this.values)}return placeholder instanceof Array?placeholder.map(e=>this.resolve(e)):Object.entries(placeholder).reduce((e,[t,r])=>(e[t]=this.resolve(r),e),{})}toString(){return JSON.stringify(this.values)}}},function(e){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e){"use strict";e.exports=function(e,t,r,n){for(var i=0|65535&e,a=0|65535&e>>>16,o=0;0!==r;){r-=o=2e3r;r++){e=r;for(var n=0;8>n;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){e^=-1;for(var a=i;a>>8^t[255&(e^r[a])];return-1^e}},function(e,t,r){"use strict";function n(e,t){if(65534>t&&(e.subarray&&o||!e.subarray&&a))return _StringfromCharCode.apply(null,i.shrinkBuf(e,t));for(var r="",n=0;nl;l++)s[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;s[254]=s[254]=1,t.string2buf=function(e){var t,r,n,a,o,s=e.length,l=0;for(a=0;ar?1:2048>r?2:65536>r?3:4;for(t=new i.Buf8(l),o=0,a=0;or?t[o++]=r:2048>r?(t[o++]=192|r>>>6,t[o++]=128|63&r):65536>r?(t[o++]=224|r>>>12,t[o++]=128|63&r>>>6,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|63&r>>>12,t[o++]=128|63&r>>>6,t[o++]=128|63&r);return t},t.buf2binstring=function(e){return n(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),r=0,n=t.length;r(a=e[r++]))c[i++]=a;else if(4<(o=s[a]))c[i++]=65533,r+=o-1;else{for(a&=2===o?31:3===o?15:7;1a?c[i++]=a:(a-=65536,c[i++]=55296|1023&a>>10,c[i++]=56320|1023&a)}return n(c,i)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return 0>r?t:0===r?t:r+s[e[r]]>t?r:t}},function(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,r){"use strict";var n={};(0,r(1).assign)(n,r(11),r(14),r(8)),e.exports=n},function(e){var t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=o.assign({level:f,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},e||{});var t=this.options;t.raw&&0t.windowBits&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h)throw new Error(l[r]);if(t.header&&a.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(i="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=a.deflateSetDictionary(this.strm,i))!==h)throw new Error(l[r]);this._dict_set=!0}}function i(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg||l[r.err];return r.result}var a=r(12),o=r(1),s=r(6),l=r(3),c=r(7),u=Object.prototype.toString,h=0,f=-1,d=0,p=8;n.prototype.push=function(e,t){var r,n,i=this.strm,l=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,i.input="string"==typeof e?s.string2buf(e):"[object ArrayBuffer]"===u.call(e)?new Uint8Array(e):e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new o.Buf8(l),i.next_out=0,i.avail_out=l),1!==(r=a.deflate(i,n))&&r!==h)return this.onEnd(r),this.ended=!0,!1;(0===i.avail_out||0===i.avail_in&&(4===n||2===n))&&("string"===this.options.to?this.onData(s.buf2binstring(o.shrinkBuf(i.output,i.next_out))):this.onData(o.shrinkBuf(i.output,i.next_out)))}while((0e.avail_out&&(r=e.avail_out),0===r||(k.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function s(e,t){x._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function l(e,t){e.pending_buf[e.pending++]=t}function c(e,t){e.pending_buf[e.pending++]=255&t>>>8,e.pending_buf[e.pending++]=255&t}function u(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,k.arraySet(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=A(e.adler,t,i,r):2===e.state.wrap&&(e.adler=S(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function h(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-Q?e.strstart-(e.w_size-Q):0,c=e.window,u=e.w_mask,h=e.prev,f=e.strstart+q,d=c[a+o-1],p=c[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+o]===p&&c[r+o-1]===d&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&ao){if(e.match_start=t,o=n,n>=s)break;d=c[a+o-1],p=c[a+o]}}}while((t=h[t&u])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function f(e){var t,r,n,i,a,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-Q)){k.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=o?n-o:0}while(--r);t=r=o;do{n=e.prev[--t],e.prev[t]=n>=o?n-o:0}while(--r);i+=o}if(0===e.strm.avail_in)break;if(r=u(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=K)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<=K&&(e.ins_h=(e.ins_h<=K)if(n=x._tr_tally(e,e.strstart-e.match_start,e.match_length-K),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=K){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=K&&(e.ins_h=(e.ins_h<=e.match_length&&(e.strategy===L||e.match_length===K&&4096=K&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-K,n=x._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-K),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<=K&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=K?(r=x._tr_tally(e,1,e.match_length-K),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=x._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(s(e,!1),0===e.strm.avail_out))return se}return e.insert=0,t===R?(s(e,!0),0===e.strm.avail_out?ce:ue):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?se:le}function m(e,t){for(var r;;){if(0===e.lookahead&&(f(e),0===e.lookahead)){if(t===I)return se;break}if(e.match_length=0,r=x._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(s(e,!1),0===e.strm.avail_out))return se}return e.insert=0,t===R?(s(e,!0),0===e.strm.avail_out?ce:ue):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?se:le}function w(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function b(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=H,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new k.Buf16(2*Y),this.dyn_dtree=new k.Buf16(2*(2*G+1)),this.bl_tree=new k.Buf16(2*(2*X+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new k.Buf16(Z+1),this.heap=new k.Buf16(2*$+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new k.Buf16(2*$+1),a(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function g(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=W,(t=e.state).pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?ee:ae,e.adler=2===t.wrap?0:1,t.last_flush=I,x._tr_init(t),z):n(e,P)}function y(e){var t=g(e);return t===z&&function(e){e.window_size=2*e.w_size,a(e.head),e.max_lazy_match=E[e.level].max_lazy,e.good_match=E[e.level].good_length,e.nice_match=E[e.level].nice_length,e.max_chain_length=E[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=K-1,e.match_available=0,e.ins_h=0}(e.state),t}function v(e,t,r,i,a,o){if(!e)return P;var s=1;if(t===F&&(t=6),0>i?(s=0,i=-i):15a||a>V||r!==H||8>i||15t||9o||o>j)return n(e,P);8===i&&(i=9);var l=new b;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(1>=e.lookahead){if(f(e),0===e.lookahead&&t===I)return se;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,s(e,!1),0===e.strm.avail_out))return se;if(e.strstart-e.block_start>=e.w_size-Q&&(s(e,!1),0===e.strm.avail_out))return se}return e.insert=0,t===R?(s(e,!0),0===e.strm.avail_out?ce:ue):(e.strstart>e.block_start&&(s(e,!1),e.strm.avail_out),se)}),new w(4,4,8,4,d),new w(4,5,16,8,d),new w(4,6,32,32,d),new w(4,4,16,16,p),new w(8,16,32,32,p),new w(8,16,128,128,p),new w(8,32,128,256,p),new w(32,128,258,1024,p),new w(32,258,258,4096,p)],t.deflateInit=function(e,t){return v(e,t,H,15,8,0)},t.deflateInit2=v,t.deflateReset=y,t.deflateResetKeep=g,t.deflateSetHeader=function(e,t){return e&&e.state&&2===e.state.wrap?(e.state.gzhead=t,z):P},t.deflate=function(e,t){var r,s,u,h;if(!e||!e.state||t>D||0>t)return e?n(e,P):P;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===oe&&t!==R)return n(e,0===e.avail_out?O:P);if(s.strm=e,r=s.last_flush,s.last_flush=t,s.status===ee)if(2===s.wrap)e.adler=0,l(s,31),l(s,139),l(s,8),s.gzhead?(l(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),l(s,255&s.gzhead.time),l(s,255&s.gzhead.time>>8),l(s,255&s.gzhead.time>>16),l(s,255&s.gzhead.time>>24),l(s,9===s.level?2:s.strategy>=U||2>s.level?4:0),l(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(l(s,255&s.gzhead.extra.length),l(s,255&s.gzhead.extra.length>>8)),s.gzhead.hcrc&&(e.adler=S(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=te):(l(s,0),l(s,0),l(s,0),l(s,0),l(s,0),l(s,9===s.level?2:s.strategy>=U||2>s.level?4:0),l(s,he),s.status=ae);else{var f=H+(s.w_bits-8<<4)<<8;f|=(s.strategy>=U||2>s.level?0:6>s.level?1:6===s.level?2:3)<<6,0!==s.strstart&&(f|=J),f+=31-f%31,s.status=ae,c(s,f),0!==s.strstart&&(c(s,e.adler>>>16),c(s,65535&e.adler)),e.adler=1}if(s.status===te)if(s.gzhead.extra){for(u=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>u&&(e.adler=S(e.adler,s.pending_buf,s.pending-u,u)),o(e),u=s.pending,s.pending!==s.pending_buf_size));)l(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>u&&(e.adler=S(e.adler,s.pending_buf,s.pending-u,u)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=re)}else s.status=re;if(s.status===re)if(s.gzhead.name){u=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>u&&(e.adler=S(e.adler,s.pending_buf,s.pending-u,u)),o(e),u=s.pending,s.pending===s.pending_buf_size)){h=1;break}h=s.gzindexu&&(e.adler=S(e.adler,s.pending_buf,s.pending-u,u)),0===h&&(s.gzindex=0,s.status=ne)}else s.status=ne;if(s.status===ne)if(s.gzhead.comment){u=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>u&&(e.adler=S(e.adler,s.pending_buf,s.pending-u,u)),o(e),u=s.pending,s.pending===s.pending_buf_size)){h=1;break}h=s.gzindexu&&(e.adler=S(e.adler,s.pending_buf,s.pending-u,u)),0===h&&(s.status=ie)}else s.status=ie;if(s.status===ie&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&o(e),s.pending+2<=s.pending_buf_size&&(l(s,255&e.adler),l(s,255&e.adler>>8),e.adler=0,s.status=ae)):s.status=ae),0!==s.pending){if(o(e),0===e.avail_out)return s.last_flush=-1,z}else if(0===e.avail_in&&i(t)<=i(r)&&t!==R)return n(e,O);if(s.status===oe&&0!==e.avail_in)return n(e,O);if(0!==e.avail_in||0!==s.lookahead||t!==I&&s.status!==oe){var d=s.strategy===U?m(s,t):s.strategy===M?_(s,t):E[s.level].func(s,t);if((d===ce||d===ue)&&(s.status=oe),d===se||d===ce)return 0===e.avail_out&&(s.last_flush=-1),z;if(d===le&&(t===C?x._tr_align(s):t!==D&&(x._tr_stored_block(s,0,0,!1),t===B&&(a(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),o(e),0===e.avail_out))return s.last_flush=-1,z}return t===R?0>=s.wrap?N:(2===s.wrap?(l(s,255&e.adler),l(s,255&e.adler>>8),l(s,255&e.adler>>16),l(s,255&e.adler>>24),l(s,255&e.total_in),l(s,255&e.total_in>>8),l(s,255&e.total_in>>16),l(s,255&e.total_in>>24)):(c(s,e.adler>>>16),c(s,65535&e.adler)),o(e),0=r.w_size&&(0===o&&(a(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new k.Buf8(r.w_size),k.arraySet(u,t,h-r.w_size,r.w_size,0),t=u,h=r.w_size),s=e.avail_in,l=e.next_in,c=e.input,e.avail_in=h,e.next_in=0,e.input=t,f(r);r.lookahead>=K;){n=r.strstart,i=r.lookahead-(K-1);do{r.ins_h=(r.ins_h<e?V[e]:V[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=255&t>>>8}function l(e,t,r){e.bi_valid>D-r?(e.bi_buf|=65535&t<>D-e.bi_valid,e.bi_valid+=r-D):(e.bi_buf|=65535&t<>>=1,r<<=1}while(0<--t);return r>>>1}function h(e,t,r){var n,i,a=Array(R+1),o=0;for(n=1;n<=R;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=u(a[s]++,s))}}function f(e){var t;for(t=0;te.heap_len;)a[2*(i=e.heap[++e.heap_len]=2>c?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;1<=r;r--)_(e,a,r);i=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],_(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,_(e,a,1)}while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,o,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,_=0;for(a=0;a<=R;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rp&&(a=p,_++),l[2*n+1]=a,!(n>c)&&(e.bl_count[a]++,o=0,n>=d&&(o=f[n-d]),s=l[2*n],e.opt_len+=s*(a+o),h&&(e.static_len+=s*(u[2*n+1]+o)));if(0!=_){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,_-=2}while(0<_);for(a=p;0!==a;a--)for(n=e.bl_count[a];0!==n;)!((i=e.heap[--r])>c)&&(l[2*i+1]!==a&&(e.opt_len+=(a-l[2*i+1])*l[2*i],l[2*i+1]=a),n--)}}(e,t),h(a,c,e.bl_count)}function b(e,t,r){var n,i,a=-1,o=t[1],s=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s=s?e.bl_tree[2*O]++:e.bl_tree[2*F]++:(i!==a&&e.bl_tree[2*i]++,e.bl_tree[2*P]++),s=0,a=i,0===o?(l=138,c=3):i===o?(l=6,c=3):(l=7,c=4))}function g(e,t,r){var n,i,a=-1,o=t[1],s=0,u=7,h=4;for(0===o&&(u=138,h=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++s=s?(c(e,O,e.bl_tree),l(e,s-3,3)):(c(e,F,e.bl_tree),l(e,s-11,7)):(i!==a&&(c(e,i,e.bl_tree),s--),c(e,P,e.bl_tree),l(e,s-3,2));s=0,a=i,0===o?(u=138,h=3):i===o?(u=6,h=3):(u=7,h=4)}}function y(e,t,r,n){l(e,(x<<1)+(n?1:0),3),function(e,t,r,n){d(e),n&&(s(e,r),s(e,~r)),v.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}var v=r(1),E=0,k=1,x=0,A=29,S=256,T=S+1+A,I=30,C=19,B=2*T+1,R=15,D=16,z=7,N=256,P=16,O=17,F=18,L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],U=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W=Array(2*(T+2));n(W);var H=Array(2*I);n(H);var V=Array(512);n(V);var $=Array(256);n($);var G=Array(A);n(G);var X=Array(I);n(X);var Y,Z,K,q=!1;t._tr_init=function(e){q||(function(){var e,t,r,n,a,o=Array(R+1);for(r=0,n=0;nn;n++)for(X[n]=a,e=0;e<1<>=7;n=e;)W[2*e+1]=8,e++,o[8]++;for(;255>=e;)W[2*e+1]=9,e++,o[9]++;for(;279>=e;)W[2*e+1]=7,e++,o[7]++;for(;287>=e;)W[2*e+1]=8,e++,o[8]++;for(h(W,T+1,o),e=0;e=t;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return E;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return k;for(t=32;t>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?y(e,t,r,n):4===e.strategy||a===i?(l(e,2+(n?1:0),3),m(e,W,H)):(l(e,4+(n?1:0),3),function(e,t,r,n){var i;for(l(e,t-257,5),l(e,r-1,5),l(e,n-4,4),i=0;i>>8,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*($[r]+S+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){l(e,2,3),c(e,N,W),function(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&16>t.windowBits&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),0<=t.windowBits&&16>t.windowBits&&!(e&&e.windowBits)&&(t.windowBits+=32),15t.windowBits&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=a.inflateInit2(this.strm,t.windowBits);if(r!==l.Z_OK)throw new Error(c[r]);if(this.header=new h,a.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===f.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=a.inflateSetDictionary(this.strm,t.dictionary))!==l.Z_OK))throw new Error(c[r])}function i(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg||c[r.err];return r.result}var a=r(15),o=r(1),s=r(6),l=r(8),c=r(3),u=r(7),h=r(18),f=Object.prototype.toString;n.prototype.push=function(e,t){var r,n,i,c,u,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,_=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?l.Z_FINISH:l.Z_NO_FLUSH,h.input="string"==typeof e?s.binstring2buf(e):"[object ArrayBuffer]"===f.call(e)?new Uint8Array(e):e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new o.Buf8(d),h.next_out=0,h.avail_out=d),(r=a.inflate(h,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&p&&(r=a.inflateSetDictionary(this.strm,p)),r===l.Z_BUF_ERROR&&1==_&&(r=l.Z_OK,_=!1),r!==l.Z_STREAM_END&&r!==l.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0===h.avail_out||r===l.Z_STREAM_END||0===h.avail_in&&(n===l.Z_FINISH||n===l.Z_SYNC_FLUSH))&&("string"===this.options.to?(i=s.utf8border(h.output,h.next_out),c=h.next_out-i,u=s.buf2string(h.output,i),h.next_out=c,h.avail_out=d-c,c&&o.arraySet(h.output,h.output,i,c,0),this.onData(u)):this.onData(o.shrinkBuf(h.output,h.next_out))),0===h.avail_in&&0===h.avail_out&&(_=!0)}while((0>>24)+(65280&e>>>8)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=E,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new d.Buf32(x),t.distcode=t.distdyn=new d.Buf32(A),t.sane=1,t.back=-1,y):v}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):v}function s(e,t){var r,n;return e&&e.state?(n=e.state,0>t?(r=0,t=-t):(r=1+(t>>4),48>t&&(t&=15)),t&&(8>t||15t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(w(b,e.lens,0,288,h,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;w(g,e.lens,0,32,f,0,e.work,{bits:5}),S=!1}e.lencode=h,e.lenbits=9,e.distcode=f,e.distbits=5}function u(e,t,r,n){var i,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(d.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>n&&(i=n),d.arraySet(a.window,t,r-n,i,a.wnext),(n-=i)?(d.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whavex;){if(0===l)break e;l--,f+=i[o++]<>>8,r.check=_(r.check,j,2,0),f=0,x=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&f)){e.msg="unknown compression method",r.mode=30;break}if(x-=4,O=8+(15&(f>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<x;){if(0===l)break e;l--,f+=i[o++]<>8),512&r.flags&&(j[0]=255&f,j[1]=255&f>>>8,r.check=_(r.check,j,2,0)),f=0,x=0,r.mode=3;case 3:for(;32>x;){if(0===l)break e;l--,f+=i[o++]<>>8,j[2]=255&f>>>16,j[3]=255&f>>>24,r.check=_(r.check,j,4,0)),f=0,x=0,r.mode=4;case 4:for(;16>x;){if(0===l)break e;l--,f+=i[o++]<>8),512&r.flags&&(j[0]=255&f,j[1]=255&f>>>8,r.check=_(r.check,j,2,0)),f=0,x=0,r.mode=5;case 5:if(1024&r.flags){for(;16>x;){if(0===l)break e;l--,f+=i[o++]<>>8,r.check=_(r.check,j,2,0)),f=0,x=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((T=r.length)>l&&(T=l),T&&(r.head&&(O=r.head.extra_len-r.length,!r.head.extra&&(r.head.extra=Array(r.head.extra_len)),d.arraySet(r.head.extra,i,o,T,O)),512&r.flags&&(r.check=_(r.check,i,T,o)),l-=T,o+=T,r.length-=T),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===l)break e;T=0;do{O=i[o+T++],r.head&&O&&65536>r.length&&(r.head.name+=_StringfromCharCode(O))}while(O&&Tr.length&&(r.head.comment+=_StringfromCharCode(O))}while(O&&Tx;){if(0===l)break e;l--,f+=i[o++]<>9,r.head.done=!0),e.adler=r.check=0,r.mode=k;break;case 10:for(;32>x;){if(0===l)break e;l--,f+=i[o++]<>>=7&x,x-=7&x,r.mode=27;break}for(;3>x;){if(0===l)break e;l--,f+=i[o++]<>>=1)){case 0:r.mode=14;break;case 1:if(c(r),r.mode=20,6===t){f>>>=2,x-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}f>>>=2,x-=2;break;case 14:for(f>>>=7&x,x-=7&x;32>x;){if(0===l)break e;l--,f+=i[o++]<>>16)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&f,f=0,x=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(T=r.length){if(T>l&&(T=l),T>h&&(T=h),0===T)break e;d.arraySet(a,i,o,T,s),l-=T,o+=T,h-=T,s+=T,r.length-=T;break}r.mode=k;break;case 17:for(;14>x;){if(0===l)break e;l--,f+=i[o++]<>>=5,x-=5,r.ndist=1+(31&f),f>>>=5,x-=5,r.ncode=4+(15&f),f>>>=4,x-=4,286x;){if(0===l)break e;l--,f+=i[o++]<>>=3,x-=3}for(;19>r.have;)r.lens[W[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},F=w(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,F){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16,D=65535&M,!((B=M>>>24)<=x);){if(0===l)break e;l--,f+=i[o++]<D)f>>>=B,x-=B,r.lens[r.have++]=D;else{if(16===D){for(U=B+2;x>>=B,x-=B,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}O=r.lens[r.have-1],T=3+(3&f),f>>>=2,x-=2}else if(17===D){for(U=B+3;x>>=B)),f>>>=3,x-=3}else{for(U=B+7;x>>=B)),f>>>=7,x-=7}if(r.have+T>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;T--;)r.lens[r.have++]=O}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,L={bits:r.lenbits},F=w(b,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,F){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},F=w(g,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,F){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=l&&258<=h){e.next_out=s,e.avail_out=h,e.next_in=o,e.avail_in=l,r.hold=f,r.bits=x,m(e,S),s=e.next_out,a=e.output,h=e.avail_out,o=e.next_in,i=e.input,l=e.avail_in,f=r.hold,x=r.bits,r.mode===k&&(r.back=-1);break}for(r.back=0;R=255&(M=r.lencode[f&(1<>>16,D=65535&M,!((B=M>>>24)<=x);){if(0===l)break e;l--,f+=i[o++]<>z)])>>>16,D=65535&M,!(z+(B=M>>>24)<=x);){if(0===l)break e;l--,f+=i[o++]<>>=z,x-=z,r.back+=z}if(f>>>=B,x-=B,r.back+=B,r.length=D,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=k;break}if(64&R){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(U=r.extra;x>>=r.extra,x-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=255&(M=r.distcode[f&(1<>>16,D=65535&M,!((B=M>>>24)<=x);){if(0===l)break e;l--,f+=i[o++]<>z)])>>>16,D=65535&M,!(z+(B=M>>>24)<=x);){if(0===l)break e;l--,f+=i[o++]<>>=z,x-=z,r.back+=z}if(f>>>=B,x-=B,r.back+=B,64&R){e.msg="invalid distance code",r.mode=30;break}r.offset=D,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(U=r.extra;x>>=r.extra,x-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(T=S-h,r.offset>T){if((T=r.offset-T)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}T>r.wnext?(T-=r.wnext,I=r.wsize-T):I=r.wnext-T,T>r.length&&(T=r.length),C=r.window}else C=a,I=s-r.offset,T=r.length;T>h&&(T=h),h-=T,r.length-=T;do{a[s++]=C[I++]}while(--T);0===r.length&&(r.mode=21);break;case 26:if(0===h)break e;a[s++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;32>x;){if(0===l)break e;l--,f|=i[o++]<x;){if(0===l)break e;l--,f+=i[o++]<p&&(d+=A[n++]<>>=y=g>>>24,p-=y,0===(y=255&g>>>16))S[a++]=65535&g;else{if(!(16&y)){if(0==(64&y)){g=_[(65535&g)+(d&(1<>>=y,p-=y),15>p&&(d+=A[n++]<>>=y=g>>>24,p-=y,!(16&(y=255&g>>>16))){if(0==(64&y)){g=m[(65535&g)+(d&(1<l){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=y,p-=y,E>(y=a-o)){if((y=E-y)>u&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(k=0,x=f,0===h){if(k+=c-y,y>3,d&=(1<<(p-=v<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=nT&&(I=T),0==T)return u[h++]=20971520,u[h++]=20971520,d.bits=1,0;for(S=1;S(R-=O[x]))return-1;if(0852||2===e&&D>592)return 1;for(;;){y=x-B,f[A]g?(v=L[U+f[A]],E=N[P+f[A]]):(v=96,E=0),p=1<>B)+(_-=p)]=y<<24|v<<16|E|0}while(0!==_);for(p=1<>=1;if(0===p?z=0:(z&=p-1,z+=p),A++,0==--O[x]){if(x===T)break;x=t[r+f[A]]}if(x>I&&(z&w)!==m){for(0==B&&(B=I),b+=S,R=1<<(C=x-B);C+B=(R-=O[C+B]));)C++,R<<=1;if(D+=1<852||2===e&&D>592)return 1;u[m=z&w]=I<<24|C<<16|b-h|0}}return 0!=z&&(u[b+z]=4194304|x-B<<24),d.bits=I,0}},function(e){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,r){"use strict";function n(e){switch(e){case"raw":return new P;case"eightbit":return new N;default:throw new Error("Unknown weight encoding")}}async function i(e,t,r){let n;if(!(n="string"==typeof(e="string"==typeof e?t(e)+(r&&r.ignoreCache?"?t="+Date.now():""):Object.assign({},e,{url:t(e.url)+(r&&r.ignoreCache?"?t="+Date.now():"")}))&&function(){if(!window.hasOwnProperty("ProgressEvent")||!window.hasOwnProperty("FormData"))return!1;let e=new XMLHttpRequest;if("string"!=typeof e.responseType)return!1;try{return e.responseType="blob","blob"===e.responseType}catch(e){return!1}}()?await function(e,t){return new Promise(function(r,n){let i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="blob";let a=new F;i.onload=function(){a.forceDispatch();let e=new Response(i.response);r(e)},i.onprogress=function(e){t&&a.request(function(){return t(e.loaded,e.total)})},i.onerror=function(e){n(e)},i.send(null)})}(e,r&&r.progressCallback):await fetch(e,r)).ok)throw new Error(`Fetch returns status code ${n.status}: ${n.statusText}`);return n}function a(e,t){if(!t||!e.body)return e.arrayBuffer();let r=e.headers.get("Content-Length");if(!r)return e.arrayBuffer();const n=parseInt(r);let i=new Uint8Array(n),a=0,o=e.body.getReader(),s=new F;return o.read().then(function e(r){return i.set(r.value,a),a+=r.value.length,t&&s.request(()=>t(a,n)),a==n?(s.forceDispatch(),i.buffer):o.read().then(e)})}function o(e=10){return new Promise(t=>setTimeout(t,e))}function s(e){return"WebGL2RenderingContext"===e.constructor.name}function l(e){if(null===e)throw Error("Null is detected");return e}function c(e){let t=e.getContext("2d");if(!t)throw Error("CanvasRenderingContext2D initialization failed");return t}function u(e,t={}){let{srcX:r=0,srcY:n=0,srcW:i=e.width,srcH:a=e.height,dstX:o=0,dstY:s=0}=t,{dstW:l=i,dstH:u=a}=t,h=document.createElement("canvas");h.width=i,h.height=a,c(h).putImageData(e,-r,-n);let f=document.createElement("canvas");f.width=o+l,f.height=s+u;let d=c(f);return d.drawImage(h,0,0,i,a,o,s,l,u),d.getImageData(0,0,o+l,s+u)}function h(e,t={}){if(e instanceof HTMLCanvasElement)return function(e,t={}){let{srcX:r=0,srcY:n=0,srcW:i=e.width,srcH:a=e.height,dstX:o=0,dstY:s=0}=t,{dstW:l=i,dstH:h=a}=t,f=c(e).getImageData(r,n,i,a);return(0!==o||0!==s||i!==l||a!==h)&&(f=u(f,{dstX:o,dstY:s,dstW:l,dstH:h})),f}(e,t);if(e instanceof HTMLVideoElement||e instanceof HTMLImageElement)return function(e,t={}){let r,n;if(e instanceof HTMLVideoElement)r=e.videoWidth,n=e.videoHeight;else{if(!(e instanceof HTMLImageElement))throw TypeError('Failed to execute "getImageDataFromDrawable(drawable, options)": "drawable" must be an instanceof HTMLVideoElement or HTMLImageElement');r=e.naturalWidth,n=e.naturalHeight}let{srcX:i=0,srcY:a=0,dstX:o=0,dstY:s=0,dstW:l=r,dstH:u=n}=t,h=document.createElement("canvas");h.width=o+l,h.height=s+u;let f=c(h);return f.drawImage(e,i,a,r,n,o,s,l,u),f.getImageData(0,0,o+l,s+u)}(e,t);throw TypeError('Failed to execute "getImageData(image, options)": "image" must be an instance of HTMLCanvasElement, HTMLVideoElement, or HTMLImageElement')}function f(e,t,r={}){let{srcX:n=0,srcY:i=0,srcW:a=e.width,srcH:o=e.height,dstX:s=0,dstY:l=0}=r,{dstW:h=a,dstH:f=o}=r;(0!==n||0!==i||a!==h||o!==f)&&(e=u(e,{srcX:n,srcY:i,srcW:a,srcH:o,dstW:h,dstH:f})),c(t).putImageData(e,s,l)}async function d(e){let t=document.createElement("img");return new Promise((r,n)=>{t.onload=r,t.onerror=n,t.src=e}).then(()=>t)}async function p(e){let t=e.files;if(!t||0==t.length)throw new Error("No file is selected");return d(URL.createObjectURL(t[0]))}async function _(){let e=document.createElement("input");return e.type="file",e.accept="image/*",new Promise(t=>{e.onchange=(()=>t(p(e))),e.click()})}function m(e){if("number"==typeof e)return[e,e,e,e];if(4==e.length)return[e[0],e[1],e[2],e[3]];if(3==e.length)return[e[0],e[1],e[2],e[0]];if(1==e.length)return[e[0],e[0],e[0],e[0]];throw new Error("bias and scale must be scalar number or array of length 1 or 3 or 4.")}function w(e,t={}){let{type:r=Float32Array,color:n=ne.RGB,order:i=re.HWC,bias:a=[0,0,0],scale:o=[1,1,1]}=t;const s=m(a),l=m(o),c=e.width,u=e.height;let h,f,d,p,_,w,b,g,y,v=e.data;switch(n){case ne.RGB:switch(h=new r(c*u*3),[w,b,g]=l,[f,d,p]=s,i){case re.HWC:for(let e=0;ee(t))):t}(e);let E,k,x,A,S,T,I,C,B=new Uint8ClampedArray(g*y*4);switch(a){case ne.RGB:switch([E,k,x]=w,[S,T,I]=b,o){case re.HWC:for(let r=l;r=o-1)){for(;;){for(;e[l]>s&&l<=c;)l++;for(;e[c]<=s&&l<=c;)c--;if(l>=c)break;i=e[l],e[l]=e[c],e[c]=i,i=n[l],n[l]=n[c],n[c]=i}e[o-1]=e[l],e[l]=s,i=n[o-1],n[o-1]=n[l],n[l]=i,r.push([a,l]),l+1=o-1)){for(;;){for(;e[l]=s&&l<=c;)c--;if(l>=c)break;i=e[l],e[l]=e[c],e[c]=i,i=n[l],n[l]=n[c],n[c]=i}e[o-1]=e[l],e[l]=s,i=n[o-1],n[o-1]=n[l],n[l]=i,r.push([a,l]),l+1e[t]);return{status:e,defaultOrder:t}}async function I(e,t){if(!(e in ae))throw new Error(`Unknown backend: "${e}"`);let r;try{r=new ae[e](t),await r.init()}catch(t){return console.warn(`Failed to initialize ${e} backend: ${t}`),null}return r}async function C(e,t={}){let{backendOrder:r=null,backendOptions:n={},cacheStrategy:i="latest",saveCache:a=!0,progressCallback:o,weightDirectory:s,transformUrlDelegate:l}=t;r||(r=T().defaultOrder),"string"==typeof r&&(r=[r]),-1===(r=r.slice()).indexOf("fallback")&&r.concat(["fallback"]);for(let c=t=>(s&&/\.bin/.test(t)&&(t=t.replace(e,s)),l&&(t=l(t)),t);0null),(l=await u.restoreCachedDescriptor(e))&&s&&l.converted_at===s.converted_at&&(r=l,n=await u.restoreCachedParameters(e,o)))break;if(s&&(r=s,n=await u.fetchParameters(e,o)))break;if(l&&(r=l,n=await u.restoreCachedParameters(e,o)))break;throw Error("Network error is occurred and no cache is exist.");case"networkOnly":case"networkFirst":if((s=await u.fetchDescriptor(e).catch(()=>null))&&(r=s,n=await u.fetchParameters(e,o)))break;if("networkOnly"===i)throw Error('Network error is occurred in "networkOnly" cache strategy');if((l=await u.restoreCachedDescriptor(e))&&(r=l,n=await u.restoreCachedParameters(e,o)))break;throw Error("Network error is occurred and no cache is exist.");case"cacheOnly":case"cacheFirst":if((l=await u.restoreCachedDescriptor(e))&&(r=l,n=await u.restoreCachedParameters(e,o)))break;if("cacheOnly"===i)throw Error('No cache is exist in "cacheOnly" cache strategy');if((s=await u.fetchDescriptor(e).catch(()=>null))&&(r=s,n=await u.fetchParameters(e,o)))break;throw Error("Network error is occurred and no cache is exist.");default:throw Error(`"${i}" is not valid cache strategy name: "latest", "networkFirst", "networkOnly", "cacheFirst", "cacheOnly" is available.`)}if(a)try{await u.saveCache(e,r,n)}catch(t){}await u.setDescriptorAndParameters(r,n)}catch(e){console.warn(`Model loading failed for ${r} backend. Trying next backend: ${e.message}`);continue}return u}}throw new Error("No backend is available")}r.r(t);var B={};r.r(B),r.d(B,"Order",function(){return re}),r.d(B,"Color",function(){return ne}),r.d(B,"getImageArrayFromImageData",function(){return w}),r.d(B,"getImageArrayFromCanvas",function(){return b}),r.d(B,"getImageArrayFromDrawable",function(){return g}),r.d(B,"getImageArray",function(){return y}),r.d(B,"setImageArrayToCanvas",function(){return E}),r.d(B,"loadImageByUrl",function(){return d}),r.d(B,"loadImageFromFileInput",function(){return p}),r.d(B,"loadImageByDialog",function(){return _});var R={};r.r(R),r.d(R,"argmax",function(){return k}),r.d(R,"argmin",function(){return x});var D=r(0),z=r(9);class N{async decode(e){let t=[],r=0,n=new DataView(e.buffer,e.byteOffset),i=0;for(;ie;e++)s[e]=N.decode_table[127&e]*o*(128>e?1:-1);let l=new Uint8Array(e.buffer,e.byteOffset+i,a),c=z.inflate(l),u=c.length,h=new Float32Array(u);for(let e=0;ethis.forceDispatch()))}forceDispatch(){this.scheduledCallbackId==O||(this.cancel(),this.fn())}cancel(){this.scheduledCallbackId==O||(cancelAnimationFrame(this.scheduledCallbackId),this.scheduledCallbackId=O)}}var L=r(2);class U{constructor(e=null,t=0,r,n=null){if(this.placeholderContext=n,this._byteOffset=t,this._buffer=e,e)this._length=void 0===r?e.byteLength/this.BYTES_PER_ELEMENT:r;else{if(void 0===r)throw Error('"butter" or "length" must be specified.');this._length=r}if(this.isDynamic&&!n)throw Error("PlaceholderContext must be required when SymbolicTypedArray is initialized as dynamic buffer view.")}get buffer(){return this._buffer||(this._buffer=new ArrayBuffer(this.byteOffset+this.byteLength)),this._buffer}set buffer(e){this._buffer=e}get byteLength(){return this.length*this.BYTES_PER_ELEMENT}get offset(){return this.byteOffset/this.BYTES_PER_ELEMENT}get isDynamic(){return"number"!=typeof this._byteOffset||"number"!=typeof this._length}get length(){return this.isDynamic?this.placeholderContext.resolve(this._length):this._length}get byteOffset(){return this.isDynamic?this.placeholderContext.resolve(this._byteOffset):this._byteOffset}copyWithin(e,t,r){return this.toActual().copyWithin(e,t,r),this}fill(e,t,r){return this.toActual().fill(e,t,r),this}indexOf(e,t){return this.toActual().indexOf(e,t)}join(e){return this.toActual().join(e)}lastIndexOf(e,t){return this.toActual().lastIndexOf(e,t)}sort(e){return this.toActual().sort(e),this}includes(e,t){return this.toActual().includes(e,t)}set(e,t){return this.toActual().set(function e(t){let r=[];for(let n,i=0;i'),t.firstChild.href}async setDescriptorAndParameters(e,t){this.descriptor=e,this.placeholderContext=new L.a(this.descriptor.placeholders);let r="object"==typeof WebAssembly?"webassembly":"asmjs";0<=window.navigator.userAgent.indexOf("iPhone OS 11_2")&&(r="asmjs");let n=`${this.directory}/kernels_${r}.js`;n=this.transformUrlDelegate(n),this.worker_entry_js_path=n;let i=await fetch(this.worker_entry_js_path),a=await i.text(),o=(e,t)=>{let r=this.absolutePath(`${this.directory}/${e}`),n=this.transformUrlDelegate(r);a=a.replace(t,n)};"webassembly"==r?o("kernels_webassembly.wasm","WEBDNN_URL_KERNELS_WASM"):o("kernels_asmjs.js.mem","WEBDNN_URL_KERNELS_ASMJS_MEM"),await this.compile(a),await this.loadWeights(new Uint8Array(t)),(await this.getInputViews()).filter(e=>!e.isDynamic).forEach(e=>{e.buffer=new Float32Array(e.length).buffer}),(await this.getOutputViews()).filter(e=>!e.isDynamic).forEach(e=>{e.buffer=new Float32Array(e.length).buffer})}async fetchDescriptor(e){return this.directory=e,(await i(`${e}/graph_${this.backendName}.json`,this.transformUrlDelegate)).json()}async fetchParameters(e,t){let r=`${e}/weight_${this.backendName}.bin`;return a(await i(r,this.transformUrlDelegate),t)}async restoreCachedDescriptor(e){return this.directory=e,D.getItem(`${e}_${this.backendName}_descriptor`).catch(()=>null)}async restoreCachedParameters(e,t){let r=await D.getItem(`${e}_${this.backendName}_parameters`).catch(()=>null);return r&&t&&t(r.byteLength,r.byteLength),r}async saveCache(e,t,r){await Promise.all([D.setItem(`${e}_${this.backendName}_descriptor`,t),D.setItem(`${e}_${this.backendName}_parameters`,r)])}async setPlaceholderValue(e){if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized.");let t=this.placeholderContext;if(t.update(e),!t.isResolved)return;if(!this.descriptor)throw new Error("Descriptor is not loaded");let r=this.descriptor.unresolved_value_lists,n=[];for(let e,i=0;i{let r=t.resolve(e.placeholder);n.push(i,e.offset,r)});(await this.getInputViews()).filter(e=>e.isDynamic).forEach(e=>{e.buffer=new Float32Array(e.length).buffer}),(await this.getOutputViews()).filter(e=>e.isDynamic).forEach(e=>{e.buffer=new Float32Array(e.length).buffer});let i=this.placeholderContext.resolve(this.descriptor.memory_layout.dynamic.size);await this.setPlaceholderValueWorker(i,new Int32Array(n))}setPlaceholderValueWorker(e,t){if(!this.worker)throw Error("Worker is not initialized");let r=this.worker;return new Promise((n,i)=>{r.onmessage=(e=>{0===e.data?n():(console.log(e.data),r.terminate(),i(new Error(e.data)))}),r.postMessage({type:"set_dynamic_buffer",size:e,data:t})})}compile(e){let t=new Blob([e],{type:"text/javascript"}),r=URL.createObjectURL(t),n=new Worker(r);n.onerror=(e=>{console.error(e),this.worker_promise_reject_func?this.worker_promise_reject_func(e):this.worker_initial_error=e});let i=new Promise((e,t)=>this.worker_initial_error?t(this.worker_initial_error):(this.worker_promise_reject_func=t,void(n.onmessage=(r=>{0===r.data?e():(console.error(r.data),n.terminate(),t(new Error(r.data)))}))));return this.worker=n,i}async loadWeights(e){if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.worker)throw new Error("Worker is not initialized");let t=n(this.descriptor.weight_encoding),r=await t.decode(e),i=this.worker;return new Promise((e,t)=>{this.worker_promise_reject_func=t,i.onmessage=(r=>{0===r.data?e():(console.log(r.data),i.terminate(),t(new Error(r.data)))}),i.postMessage({type:"weight",data:r},[r.buffer])})}getInputViews(){if(this.inputs)return this.inputs;if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");let e=this.descriptor,t=this.placeholderContext;return this.inputs=e.inputs.map(r=>{let n=e.memory_layout.static.allocations[r]||e.memory_layout.dynamic.allocations[r];return new M(null,0,n.size,t)}),this.inputs}getOutputViews(){if(this.outputs)return this.outputs;if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");let e=this.descriptor,t=this.placeholderContext;return this.outputs=e.outputs.map(r=>{let n=e.memory_layout.static.allocations[r]||e.memory_layout.dynamic.allocations[r];return new M(null,0,n.size,t)}),this.outputs}async run(){if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.worker)throw new Error("Worker is not initialized");if(!this.placeholderContext.isResolved)throw new Error("Not all placeholder is resolved");let e=this.placeholderContext,t=this.descriptor,r=this.worker;return new Promise((n,i)=>{this.worker_promise_reject_func=i,r.onmessage=(e=>{if(Array.isArray(e.data)){for(let t=0;ti;i++)if(n=a[i][t.inputs[r]]){let t=this.inputs[r];o.push({space:i,offset:e.resolve(n.offset),size:t.length,data:t.toActual()});break}let s=[];for(let r=0;ri;i++)if(n=a[i][t.outputs[r]]){let t=this.outputs[r];s.push({space:i,offset:e.resolve(n.offset),size:t.length});break}r.postMessage({type:"run",inputs:o,outputs:s})})}}let H;class V{constructor(){this.gl=l(V.initializeContext())}static getInstance(){return H||(H=new V),H}createTexture(e,t,r,n){let i=this.gl,a=l(i.createTexture());return i.activeTexture(i.TEXTURE0+9),i.bindTexture(i.TEXTURE_2D,a),i.texImage2D(i.TEXTURE_2D,0,r,e,t,0,n,i.FLOAT,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.bindTexture(i.TEXTURE_2D,null),a}createVertexShader(e){return this.createShader(this.gl.VERTEX_SHADER,e)}createFragmentShader(e){return this.createShader(this.gl.FRAGMENT_SHADER,e)}createShader(e,t){let r=l(this.gl.createShader(e));if(this.gl.shaderSource(r,t),this.gl.compileShader(r),!this.gl.getShaderParameter(r,this.gl.COMPILE_STATUS))throw console.error(this.gl.getShaderInfoLog(r)),Error("Shader Compile failed: "+this.gl.getShaderInfoLog(r));return r}createProgram(e,t){let r=l(this.gl.createProgram());if(this.gl.attachShader(r,t),this.gl.attachShader(r,e),this.gl.linkProgram(r),!this.gl.getProgramParameter(r,this.gl.LINK_STATUS))throw console.error(this.gl.getProgramInfoLog(r)),Error("ShaderProgram Initialization failed.");return r}createArrayBuffer(e){let t=l(this.gl.createBuffer());return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,t),this.gl.bufferData(this.gl.ARRAY_BUFFER,e,this.gl.STATIC_DRAW),t}createFrameBuffer(){return l(this.gl.createFramebuffer())}bindArrayBuffer(e){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,e)}bindFrameBuffer(e,t,r){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this.gl.viewport(0,0,t,r),this.gl.scissor(0,0,t,r)}useProgram(e){this.gl.useProgram(e)}deleteTexture(e){this.gl.deleteTexture(e)}static initializeWebGL2Context(e=document.createElement("canvas")){let t;return(t=e.getContext("webgl2"))&&t.getExtension("EXT_color_buffer_float")?A("DEBUG",!1)&&!t.getExtension("WEBGL_debug_renderer_info")?null:t:null}static initializeWebGL1Context(e=document.createElement("canvas")){let t=e.getContext("webgl")||e.getContext("experimental-webgl");return t&&t.getExtension("OES_texture_float")?V.IS_SAFARI?null:A("DEBUG",!1)&&!t.getExtension("WEBGL_debug_renderer_info")?null:t:null}static initializeContext(){let e,t=document.createElement("canvas");if(e=V.initializeWebGL2Context(t))A("DEBUG",!1)&&console.info("WebGL2 is enabled");else{if(!(e=V.initializeWebGL1Context(t)))return null;A("DEBUG",!1)&&console.info("WebGL2 is disabled")}return e.disable(e.DEPTH_TEST),e.disable(e.STENCIL_TEST),e.disable(e.BLEND),e.disable(e.DITHER),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SAMPLE_COVERAGE),e.enable(e.SCISSOR_TEST),e.enable(e.CULL_FACE),e.cullFace(e.BACK),e}static checkAvailability(){if(null===$){let e=V.initializeContext();$=!(!e||4096>A("MAX_TEXTURE_SIZE",e.getParameter(e.MAX_TEXTURE_SIZE)))}return $}async waitForComplete(){let e=this.gl;if(s(e)){let t=e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE,0),r=e.clientWaitSync(t,0,0);for(;r!==e.CONDITION_SATISFIED&&r!==e.ALREADY_SIGNALED;)await new Promise(e=>setTimeout(e,1)),r=e.clientWaitSync(t,0,0);e.deleteSync(t)}else e.finish()}get MAX_TEXTURE_SIZE(){let e=A("MAX_TEXTURE_SIZE",this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE));if(16384<=e)return 4096;if(8192<=e)return 4096;if(4096<=e)return 4096;throw new Error(`MAX_TEXTURE_SIZE is too small: ${e}`)}}V.IS_SAFARI=-1!==navigator.userAgent.toLowerCase().indexOf("safari")&&-1===navigator.userAgent.toLowerCase().indexOf("chrome");let $=null;class G{constructor(e,t){this.byteLength=e,this.backend=t}}class X extends G{constructor(e,t,r,n,i,a){switch(super(e,"webgl"),this._texture=null,this.readTextureUnitIndices=[],this.isBoundToDrawFrameBuffer=!1,this.handler=V.getInstance(),this.name=n,this.channelMode=a,a){case"RGBA":this.elementsPerPixel=4;break;case"R":this.elementsPerPixel=1;break;default:throw Error("Unknown channel mode")}if(s(this.handler.gl))switch(a){case"RGBA":this.textureFormat=this.handler.gl.RGBA,this.textureInternalFormat=this.handler.gl.RGBA32F,this.pixelStride=4;break;case"R":this.textureFormat=this.handler.gl.RED,this.textureInternalFormat=this.handler.gl.R32F,this.pixelStride=1;break;default:throw Error("Unknown channel mode")}else this.textureFormat=this.handler.gl.RGBA,this.textureInternalFormat=this.handler.gl.RGBA,this.pixelStride=4;if(this.pixelStridenull)}async restoreCachedParameters(e,t){let r=await D.getItem(`${e}_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}_parameters`).catch(()=>null);return r&&t&&t(r.byteLength,r.byteLength),r}async saveCache(e,t,r){await Promise.all([D.setItem(`${e}_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}_descriptor`,t),D.setItem(`${e}_${this.backendName}_${this.handler.MAX_TEXTURE_SIZE}_parameters`,r)])}async setDescriptorAndParameters(e,t){await this.setDescriptor(e),await this.compile(),await this.initializeStaticBuffer(t),this.placeholderContext&&this.placeholderContext.isResolved&&await this.initializeDynamicBuffer()}async initializeStaticBuffer(e){if(!this.descriptor)throw new Error("Descriptor is not loaded");let t=this.descriptor,r=n(this.descriptor.weight_encoding),i=await r.decode(new Uint8Array(e)),a=this.buffers,o=t.memory_layout.mapping;Object.entries(t.memory_layout.static.allocations).forEach(([e,{width:t,height:r,size:n,channel_mode:i}])=>{a.set(e,new X(n*Float32Array.BYTES_PER_ELEMENT,t,r,e,null,i))}),Object.entries(t.constants_map).forEach(([e,{size:t,byte_offset:r}])=>{a.get(e).array.set(new Float32Array(i.buffer,r,t))}),(await this.getInputViews()).filter(e=>!e.isDynamic).forEach(e=>{e.buffer=a.get(o[e.name]).getWriteView(0,e.length,Float32Array).buffer}),(await this.getOutputViews()).filter(e=>!e.isDynamic).forEach(e=>{e.buffer=a.get(o[e.name]).getReadView(0,e.length,Float32Array).buffer})}async initializeDynamicBuffer(){if(!this.descriptor)throw Error("GraphDescriptor is not loaded.");if(!this.placeholderContext)throw Error("PlaceholderContext is not initialized.");let e=this.descriptor,t=this.placeholderContext,r=this.buffers,n=e.memory_layout.mapping;Object.entries(e.memory_layout.dynamic.allocations).forEach(([e,{width:n,height:i,size:a,channel_mode:o}])=>{r.set(e,new X(t.resolve(a)*Float32Array.BYTES_PER_ELEMENT,t.resolve(n),t.resolve(i),e,null,o))}),(await this.getInputViews()).filter(e=>e.isDynamic).forEach(e=>{e.buffer=r.get(n[e.name]).getWriteView(0,t.resolve(e.length),Float32Array).buffer}),(await this.getOutputViews()).filter(e=>e.isDynamic).forEach(e=>{e.buffer=r.get(n[e.name]).getReadView(0,t.resolve(e.length),Float32Array).buffer}),this.buildPipeline()}async setDescriptor(e){this.descriptor=e,this.placeholderContext=new L.a(e.placeholders)}async compile(){if(!this.descriptor)throw new Error("Descriptor is not loaded");let e=this.descriptor;this.programs=new Map,this.vertexShader=this.handler.createVertexShader("\n precision highp float;\n attribute vec2 _xy;\n void main() { \n gl_Position = vec4(_xy, 0, 1); \n }\n "),Object.keys(e.shader_sources).forEach(t=>{let r=this.handler.createFragmentShader(e.shader_sources[t]),n=this.handler.createProgram(this.vertexShader,r);this.programs.set(t,n)})}async setPlaceholderValue(e){if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized.");let t=this.placeholderContext;if(t.update(e),t.isResolved){if(!this.descriptor)throw new Error("Descriptor is not loaded");if(await this.initializeDynamicBuffer(),0{let n=new M(null,0,this.buffers.get(r[e]).length,t);return n.name=e,n}),this.inputs}getOutputViews(){if(this.outputs)return this.outputs;if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");let e=this.descriptor,t=this.placeholderContext,r=this.descriptor.memory_layout.mapping;return this.outputs=e.outputs.map(e=>{let n=new M(null,0,this.buffers.get(r[e]).length,t);return n.name=e,n}),this.outputs}buildPipeline(){if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");if(!this.placeholderContext.isResolved)throw new Error(`Not all placeholders are resolved: ${this.placeholderContext}`);let e=this.handler.gl,t=this.buffers,r=this.descriptor.memory_layout.mapping,n=new Map;this.runtimeInfo={inputs:this.getInputViews().map(e=>t.get(r[e.name])),outputs:this.getOutputViews().map(e=>t.get(r[e.name])),programs:this.descriptor.exec_infos.map(i=>{let a=i.inputs.map(e=>{let i=t.get(r[e.variable_name]);return n.has(i)||n.set(i,0),n.set(i,n.get(i)+1),{buffer:i,uniformIndex:e.value}}),o=t.get(r[i.output]),s=this.programs.get(i.shader_name);this.handler.useProgram(s);let l=Object.keys(i.uniforms).map(t=>{let{type:r,value:n}=i.uniforms[t];switch(r){case"int":return{func:e.uniform1i,args:[e.getUniformLocation(s,t),n]};case"float":return{func:e.uniform1f,args:[e.getUniformLocation(s,t),n]};case"vec2":return{func:e.uniform2fv,args:[e.getUniformLocation(s,t),n]};case"vec3":return{func:e.uniform3fv,args:[e.getUniformLocation(s,t),n]};case"vec4":return{func:e.uniform4fv,args:[e.getUniformLocation(s,t),n]};case"ivec2":return{func:e.uniform2iv,args:[e.getUniformLocation(s,t),n]};case"ivec3":return{func:e.uniform3iv,args:[e.getUniformLocation(s,t),n]};case"ivec4":return{func:e.uniform4iv,args:[e.getUniformLocation(s,t),n]};case"sampler2D":return{func:e.uniform1i,args:[e.getUniformLocation(s,t),n]};default:throw TypeError(`Incompatible type for uniform parameter: ${r}`)}}),c=e.getAttribLocation(s,"_xy");return{program:s,frameBuffer:this.handler.createFrameBuffer(),name:i.shader_name,width:o.textureWidth,height:o.textureHeight,inputs:a,output:o,xyAttribLoc:c,uniforms:l,disposable:[]}})};for(let e of this.runtimeInfo.programs)e.inputs.forEach(({buffer:t})=>{let r=n.get(t)-1;0==r&&e.disposable.push(t),n.set(t,r)})}async run(){if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");if(!this.placeholderContext.isResolved)throw new Error(`Not all placeholders are resolved: ${this.placeholderContext}`);let e=this.handler.gl,t=this.runtimeInfo;if(0(t.Kernel in e||(e[t.Kernel]={Kernel:t.Kernel,Count:0,"Elapsed time [ms]":0}),e[t.Kernel].Count++,e[t.Kernel]["Elapsed time [ms]"]+=t["Elapsed time [ms]"],e),{})));i.forEach(e=>e["Ratio [%]"]=(e["Elapsed time [ms]"]/n).toFixed(2)),console.table(r),console.table(i)}else for(let r of t.programs){this.handler.bindFrameBuffer(r.frameBuffer,r.width,r.height);for(let{buffer:e,uniformIndex:t}of r.inputs)await e.bindToReadTexture(t);r.output.bindToDrawTexture(),this.handler.useProgram(r.program);for(let t of r.uniforms)t.func.apply(e,t.args);e.vertexAttribPointer(r.xyAttribLoc,2,e.FLOAT,!0,8,0),e.enableVertexAttribArray(r.xyAttribLoc),e.drawArrays(e.TRIANGLE_STRIP,0,Y.length/2);for(let{buffer:e}of r.inputs)e.unbindFromReadTexture();r.output.unbindFromDrawTexture()}for(let e of t.outputs)await e.syncReadViews()}}}let K;class q{constructor(){if(this.pipelineStates=new Map,!J)throw new Error("This browser does not support WebMetal");let e;try{e=Q?document.createElement("canvas").getContext("webgpu"):document.createElement("canvas").getContext("webmetal")}catch(e){throw new Error(`During initializing WebMetalRenderingContext, unexpected error is occurred: ${e.message}`)}if(!e)throw new Error("WebMetalRenderingContext initialization failed");this.context=e,this.commandQueue=e.createCommandQueue(),this.loadKernel("kernel void sync(){}","basic")}static getInstance(){return K||(K=new q),K}createBuffer(e){return this.context.createBuffer(e)}loadKernel(e,t=""){let r=this.context.createLibrary(e);for(let e of r.functionNames){let n=r.functionWithName(e),i=this.context.createComputePipelineState(n);this.pipelineStates.set(t+"."+e,i)}}createCommandBuffer(){return this.commandQueue.createCommandBuffer()}getPipelineStateByName(e){let t=this.pipelineStates.get(e);if(!t)throw TypeError(`Kernel function "${e}" is not loaded.`);return t}executeSinglePipelineState(e,t,r,n,i){let a=this.commandBuffer||(this.commandBuffer=this.createCommandBuffer()),o=a.createComputeCommandEncoder();o.setComputePipelineState(this.getPipelineStateByName(e));for(let e=0;e\nusing namespace metal;\n kernel void check_compatibility(\n device uint *A[[buffer(0)]],\n uint global_index[[thread_position_in_grid]],\n uint thread_execution_width[[thread_execution_width]]\n ){\n if (global_index == 0) {\n A[0] = thread_execution_width;\n }\n }","basic");let e=this.webmetalHandler.createBuffer(new Uint32Array(1));await this.webmetalHandler.executeSinglePipelineState("basic.check_compatibility",{width:1,height:1,depth:1},{width:1,height:1,depth:1},[e],!0);let t=new Uint32Array(e.contents)[0];if(32!=t)throw new Error(`Sorry, this GPU does not compatible with WebMetal (thread_execution_width == ${t}. See checkIncompatibleGPU method of https://github.com/mil-tokyo/webdnn/blob/master/src/descriptor_runner/descriptor_runner/descriptor_runner_webmetal.ts`)}async fetchDescriptor(e){return(await i(`${e}/graph_${this.backendName}.json`,this.transformUrlDelegate)).json()}async fetchParameters(e,t){return a(await i(`${e}/weight_${this.backendName}.bin`,this.transformUrlDelegate),t)}async restoreCachedDescriptor(e){return D.getItem(`${e}_${this.backendName}_descriptor`).catch(()=>null)}async restoreCachedParameters(e,t){let r=await D.getItem(`${e}_${this.backendName}_parameters`).catch(()=>null);return r&&t&&t(r.byteLength,r.byteLength),r}async saveCache(e,t,r){await Promise.all([D.setItem(`${e}_${this.backendName}_descriptor`,t),D.setItem(`${e}_${this.backendName}_parameters`,r)])}async setDescriptorAndParameters(e,t){this.descriptor=e,this.staticBuffer=null,this.dynamicBuffer=null,this.metaBuffers=null,this.placeholderContext=new L.a(e.placeholders),this.executionInfos=e.exec_infos,this.webmetalHandler.loadKernel(this.descriptor.kernel_source,"descriptor"),await this.initializeStaticBuffer(t),await this.initializeMetaBuffers(),await this.setPlaceholderValue({__MAX_THREADS_PER_THREADGROUP__:te?512:1024}),this.placeholderContext&&this.placeholderContext.isResolved&&await this.initializeDynamicBuffer()}async initializeStaticBuffer(e){if(!this.descriptor)throw Error("GraphDescriptor is not loaded.");let t=this.descriptor,r=new ee(t.memory_layout.static.size*Float32Array.BYTES_PER_ELEMENT);this.staticBuffer=r;let i=n(t.weight_encoding);await r.write(await i.decode(new Uint8Array(e))),(await this.getInputViews()).filter(e=>!e.isDynamic).forEach(e=>{e.buffer=r.bufferView.buffer}),(await this.getOutputViews()).filter(e=>!e.isDynamic).forEach(e=>{e.buffer=r.bufferView.buffer})}async initializeMetaBuffers(){if(!this.descriptor)throw Error("GraphDescriptor is not loaded.");this.metaBuffers=await Promise.all(this.descriptor.exec_infos.map(async e=>{let t=new ee(e.meta_buffer.length*Int32Array.BYTES_PER_ELEMENT);return await t.write(new Uint8Array(e.meta_buffer)),t}))}async initializeDynamicBuffer(){if(!this.descriptor)throw Error("GraphDescriptor is not loaded.");if(!this.placeholderContext)throw Error("PlaceholderContext is not initialized.");let e=this.descriptor,t=this.placeholderContext.resolve(e.memory_layout.dynamic.size),r=new ee(t*Float32Array.BYTES_PER_ELEMENT);this.dynamicBuffer=r,(await this.getInputViews()).filter(e=>e.isDynamic).forEach(e=>{e.buffer=r.bufferView.buffer}),(await this.getOutputViews()).filter(e=>e.isDynamic).forEach(e=>{e.buffer=r.bufferView.buffer})}async setPlaceholderValue(e){if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized.");let t=this.placeholderContext;if(t.update(e),!t.isResolved)return;if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.metaBuffers)throw new Error("MetaBuffers are not initialized");let r=this.descriptor,n=this.metaBuffers;await this.initializeDynamicBuffer(),this.executionInfos=await Promise.all(r.exec_infos.map(async(e,r)=>{let i=new Int32Array(n[r].bufferView.buffer);for(let r of e.unresolved_value_list)i[r.offset]=t.resolve(r.placeholder);return t.resolve(e)}))}getInputViews(){if(this.inputs)return this.inputs;if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");let e=this.descriptor,t=this.placeholderContext;return this.inputs=e.inputs.map(r=>{let n=e.memory_layout.static.allocations[r]||e.memory_layout.dynamic.allocations[r];return new M(null,n.offset*M.BYTES_PER_ELEMENT,n.size,t)}),this.inputs}getOutputViews(){if(this.outputs)return this.outputs;if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");let e=this.descriptor,t=this.placeholderContext;return this.outputs=e.outputs.map(r=>{let n=e.memory_layout.static.allocations[r]||e.memory_layout.dynamic.allocations[r];return new M(null,n.offset*M.BYTES_PER_ELEMENT,n.size,t)}),this.outputs}async run(){if(!this.executionInfos)throw new Error("ExecutionInfos is not loaded");if(!this.staticBuffer)throw new Error("StaticBuffer is not initialized");if(!this.dynamicBuffer)throw new Error("DynamicBuffer is not initialized");if(!this.metaBuffers)throw new Error("MetaBuffer is not initialized");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");if(!this.placeholderContext.isResolved)throw new Error(`Not all placeholders are resolved: ${this.placeholderContext}`);let e=this.staticBuffer,t=this.dynamicBuffer,r=this.metaBuffers;if(!A("DEBUG",!1)){let n=null;for(let i=0;i(t.Kernel in e||(e[t.Kernel]={Kernel:t.Kernel,Count:0,"Elapsed time [ms]":0}),e[t.Kernel].Count++,e[t.Kernel]["Elapsed time [ms]"]+=t["Elapsed time [ms]"],e),{})));a.forEach(e=>e["Ratio [%]"]=(e["Elapsed time [ms]"]/i).toFixed(2)),console.table(n),console.table(a)}}},webgl:Z,webassembly:W,fallback:class extends j{constructor(e={}){super(e),this.backendName="fallback"}static checkAvailability(){return!0}async init(){}async setDescriptorAndParameters(e,t){this.setDescriptor(e),await this.compile(),await this.initializeStaticBuffer(t),this.placeholderContext&&this.placeholderContext.isResolved&&await this.initializeDynamicBuffer()}async fetchDescriptor(e){return this.directory=e,(await i(`${e}/graph_${this.backendName}.json`,this.transformUrlDelegate)).json()}async fetchParameters(e,t){return a(await i(`${e}/weight_${this.backendName}.bin`,this.transformUrlDelegate),t)}async restoreCachedDescriptor(e){return D.getItem(`${e}_${this.backendName}_descriptor`).catch(()=>null)}async restoreCachedParameters(e,t){let r=await D.getItem(`${e}_${this.backendName}_parameters`).catch(()=>null);return r&&t&&t(r.byteLength,r.byteLength),r}async saveCache(e,t,r){await Promise.all([D.setItem(`${e}_${this.backendName}_descriptor`,t),D.setItem(`${e}_${this.backendName}_parameters`,r)])}setDescriptor(e){this.descriptor=e,this.placeholderContext=new L.a,this.placeholderContext.update(e.placeholders),this.kernelObj=null,this.variableMap=null,this.staticBuffer=null,this.dynamicBuffer=null}async compile(){if(!this.descriptor)throw new Error("Descriptor is not loaded");await new Promise(e=>{let t=document.createElement("script");t.type="text/javascript",t.readyState?t.onreadystatechange=(()=>{("loaded"==t.readyState||"complete"==t.readyState)&&(t.onreadystatechange=null,e())}):t.onload=e,t.src=this.transformUrlDelegate(`${this.directory}/kernels_fallback.js`),document.getElementsByTagName("head")[0].appendChild(t)}),this.kernelObj=window.dnn_fallback_kernel}async initializeStaticBuffer(e){if(!this.descriptor)throw new Error("Descriptor is not loaded");let t=this.descriptor,r=new Float32Array(t.memory_layout.static.size);this.staticBuffer=r;let i=this.variableMap||new Map;this.variableMap=i,Object.entries(t.memory_layout.static.allocations).forEach(([e,t])=>{i.set(e,new Float32Array(r.buffer,t.offset*Float32Array.BYTES_PER_ELEMENT,t.size))});let a=n(this.descriptor.weight_encoding);r.set(await a.decode(new Uint8Array(e))),(await this.getInputViews()).filter(e=>!e.isDynamic).forEach(e=>{e.buffer=r.buffer}),(await this.getOutputViews()).filter(e=>!e.isDynamic).forEach(e=>{e.buffer=r.buffer})}async initializeDynamicBuffer(){if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");let e=this.descriptor,t=this.placeholderContext,r=new Float32Array(t.resolve(e.memory_layout.dynamic.size));this.dynamicBuffer=r;let n=this.variableMap||new Map;this.variableMap=n,Object.entries(e.memory_layout.dynamic.allocations).forEach(([e,i])=>{n.set(e,new Float32Array(r.buffer,t.resolve(i.offset)*Float32Array.BYTES_PER_ELEMENT,t.resolve(i.size)))}),(await this.getInputViews()).filter(e=>e.isDynamic).forEach(e=>{e.buffer=r.buffer}),(await this.getOutputViews()).filter(e=>e.isDynamic).forEach(e=>{e.buffer=r.buffer})}async setPlaceholderValue(e){if(!this.placeholderContext)throw new Error("placeholderContext is not initialized");let t=this.placeholderContext;t.update(e),t.isResolved&&await this.initializeDynamicBuffer()}async run(){if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("placeholderContext is not initialized");if(!this.variableMap)throw new Error("Variable map is not initialized");if(!this.staticBuffer)throw new Error("StaticBuffer map is not initialized");if(!this.dynamicBuffer)throw new Error("DynamicBuffer map is not initialized");let e=this.variableMap,t=this.placeholderContext,r=this.descriptor.exec_infos.map(e=>t.resolve(e)),n=Date.now(),i=Date.now();for(let t,a=0;ae.get(t)),c=s.outputs.map(t=>e.get(t));this.kernelObj[s.entry_func_name](l,c,s.call_option)}console.log(`Processed ${r.length}/${r.length} kernels in ${Date.now()-n} ms`)}getInputViews(){if(this.inputs)return this.inputs;if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");let e=this.descriptor,t=this.placeholderContext;return this.inputs=e.inputs.map(r=>{let n=e.memory_layout.static.allocations[r]||e.memory_layout.dynamic.allocations[r];return new M(null,n.offset*M.BYTES_PER_ELEMENT,n.size,t)}),this.inputs}getOutputViews(){if(this.outputs)return this.outputs;if(!this.descriptor)throw new Error("Descriptor is not loaded");if(!this.placeholderContext)throw new Error("PlaceholderContext is not initialized");let e=this.descriptor,t=this.placeholderContext;return this.outputs=e.outputs.map(r=>{let n=e.memory_layout.static.allocations[r]||e.memory_layout.dynamic.allocations[r];return new M(null,n.offset*M.BYTES_PER_ELEMENT,n.size,t)}),this.outputs}}}}])}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1ea1bba30..22a7614c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,138 +5,307 @@ "requires": true, "dependencies": { "@types/events": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", - "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", "dev": true }, "@types/fs-extra": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-4.0.7.tgz", - "integrity": "sha512-BN48b/2F3kL0Ual7tjcHjj0Fl+nuYKtHa0G/xT3Q43HuCpN7rQD5vIx6Aqnl9x10oBI5xMJh8Ly+FQpP205JlA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.5.tgz", + "integrity": "sha512-w7iqhDH9mN8eLClQOYTkhdYUOSpp25eXxfc6VbFOGtzxW34JcvctH2bKjj4jD4++z4R5iO5D+pg48W2e03I65A==", "dev": true, "requires": { - "@types/node": "9.4.0" + "@types/node": "*" } }, "@types/glob": { - "version": "5.0.35", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", - "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", "dev": true, "requires": { - "@types/events": "1.1.0", - "@types/minimatch": "2.0.29", - "@types/node": "9.4.0" + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" } }, "@types/handlebars": { - "version": "4.0.36", - "resolved": "https://registry.npmjs.org/@types/handlebars/-/handlebars-4.0.36.tgz", - "integrity": "sha512-LjNiTX7TY7wtuC6y3QwC93hKMuqYhgV9A1uXBKNvZtVC8ZvyWAjZkJ5BvT0K7RKqORRYRLMrqCxpw5RgS+MdrQ==", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@types/handlebars/-/handlebars-4.1.0.tgz", + "integrity": "sha512-gq9YweFKNNB1uFK71eRqsd4niVkXrxHugqWFQkeLRJvGjnxsLr16bYtcsG4tOFwmYi0Bax+wCkbf1reUfdl4kA==", + "dev": true, + "requires": { + "handlebars": "*" + } }, "@types/highlight.js": { - "version": "9.12.2", - "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.12.2.tgz", - "integrity": "sha512-y5x0XD/WXDaGSyiTaTcKS4FurULJtSiYbGTeQd0m2LYZGBcZZ/7fM6t5H/DzeUF+kv8y6UfmF6yJABQsHcp9VQ==", + "version": "9.12.3", + "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.12.3.tgz", + "integrity": "sha512-pGF/zvYOACZ/gLGWdQH8zSwteQS1epp68yRcVLJMgUck/MjEn/FBYmPub9pXT8C1e4a8YZfHo1CKyV8q1vKUnQ==", "dev": true }, "@types/lodash": { - "version": "4.14.98", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.98.tgz", - "integrity": "sha512-nVCBlQnsTw+769CM5Xt3jR/UAje48DLqEVQVtPLOILOR2AhCmZJ+LEefmbLVspm9U8YhNnT4afAtDsnIZpLogw==", + "version": "4.14.123", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.123.tgz", + "integrity": "sha512-pQvPkc4Nltyx7G1Ww45OjVqUsJP4UsZm+GWJpigXgkikZqJgRm4c48g027o6tdgubWHwFRF15iFd+Y4Pmqv6+Q==", "dev": true }, "@types/marked": { - "version": "0.0.28", - "resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.0.28.tgz", - "integrity": "sha1-RLp1Tp+lFDJYPo6zCnxN0km1L6o=", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.4.2.tgz", + "integrity": "sha512-cDB930/7MbzaGF6U3IwSQp6XBru8xWajF5PV2YZZeV8DyiliTuld11afVztGI9+yJZ29il5E+NpGA6ooV/Cjkg==", "dev": true }, "@types/minimatch": { - "version": "2.0.29", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-2.0.29.tgz", - "integrity": "sha1-UALhT3Xi1x5WQoHfBDHIwbSio2o=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, "@types/node": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.4.0.tgz", - "integrity": "sha512-zkYho6/4wZyX6o9UQ8rd0ReEaiEYNNCqYFIAACe2Tf9DrYlgzWW27OigYHnnztnnZQwVRpwWmZKegFmDpinIsA==", + "version": "11.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.0.tgz", + "integrity": "sha512-rx29MMkRdVmzunmiA4lzBYJNnXsW/PhG4kMBy2ATsYaDjGGR75dCFEVVROKpNwlVdcUX3xxlghKQOeDPBJobng==", "dev": true }, "@types/pako": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.0.tgz", - "integrity": "sha1-6q6DZNG391LiY7w/1o3+yY5hNsU=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.1.tgz", + "integrity": "sha512-GdZbRSJ3Cv5fiwT6I0SQ3ckeN2PWNqxd26W9Z2fCK1tGrrasGy4puvNFtnddqH9UJFMQYXxEuuB7B8UK+LLwSg==" }, "@types/shelljs": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.7.7.tgz", - "integrity": "sha512-37gn9J75TVAhhmzBqoX0vzQodsjzri1SxElMX+Wk092IobNZSGW/8X4ygLOQOrKjCQr5nxGN9Ik0UA3fSdL1Pw==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-UNACC6scKFVljWEvO3rHBkbbKXu3QkKPBOMCisxI7au9cnFK7tjOGPsKh5OjedAPLmtsKSarmk+YeehKTQSKtg==", "dev": true, "requires": { - "@types/glob": "5.0.35", - "@types/node": "9.4.0" + "@types/glob": "*", + "@types/node": "*" } }, - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "@webassemblyjs/ast": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", + "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", + "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", "dev": true }, - "acorn-dynamic-import": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", - "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "@webassemblyjs/helper-api-error": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", + "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", + "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", + "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", "dev": true, "requires": { - "acorn": "4.0.13" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - } + "@webassemblyjs/wast-printer": "1.8.5" } }, - "ajv": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.0.tgz", - "integrity": "sha512-VDUX1oSajablmiyFyED9L1DFndg0P9h7p1F+NO8FkIzei6EPrR6Zu1n18rd5P8PqaSRd/FrWv3G1TVBqpM83gA==", + "@webassemblyjs/helper-fsm": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", + "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", + "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", "dev": true, "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1", - "uri-js": "4.2.2" + "@webassemblyjs/ast": "1.8.5", + "mamacro": "^0.0.3" } }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", + "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", "dev": true }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "@webassemblyjs/helper-wasm-section": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", + "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", + "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", + "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", + "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", + "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/helper-wasm-section": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-opt": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "@webassemblyjs/wast-printer": "1.8.5" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", + "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", + "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", + "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", + "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/floating-point-hex-parser": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-code-frame": "1.8.5", + "@webassemblyjs/helper-fsm": "1.8.5", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", + "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "amdefine": { + "ajv-errors": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, + "ajv-keywords": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", + "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", "dev": true }, "ansi-regex": { @@ -157,10 +326,27 @@ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { - "micromatch": "3.1.10", - "normalize-path": "2.1.1" + "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" + } + } } }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -191,9 +377,9 @@ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "requires": { - "bn.js": "4.11.8", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "assert": { @@ -203,6 +389,23 @@ "dev": true, "requires": { "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" + } + } } }, "assign-symbols": { @@ -211,22 +414,16 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.2.tgz", + "integrity": "sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg==", "dev": true }, "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "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 }, "babel-code-frame": { @@ -235,9 +432,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" } }, "babel-core": { @@ -246,25 +443,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-generator": "6.26.1", - "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.10", - "minimatch": "3.0.4", - "path-is-absolute": "1.0.1", - "private": "0.1.8", - "slash": "1.0.0", - "source-map": "0.5.7" + "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": { @@ -273,26 +470,26 @@ "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.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "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-helper-evaluate-path": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.2.0.tgz", - "integrity": "sha512-0EK9TUKMxHL549hWDPkQoS7R0Ozg1CDLheVBHYds2B2qoAvmr9ejY3zOXFsrICK73TN7bPhU14PBeKc8jcBTwg==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.3.0.tgz", + "integrity": "sha512-dRFlMTqUJRGzx5a2smKxmptDdNCXKSkPcXWzKLwAV72hvIZumrd/0z9RcewHkr7PmAEq+ETtpD1GK6wZ6ZUXzw==", "dev": true }, "babel-helper-flip-expressions": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.2.0.tgz", - "integrity": "sha512-rAsPA1pWBc7e2E6HepkP2e1sXugT+Oq/VCqhyuHJ8aJ2d/ifwnJfd4Qxjm21qlW43AN8tqaeByagKK6wECFMSw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.3.0.tgz", + "integrity": "sha512-kNGohWmtAG3b7tN1xocRQ5rsKkH/hpvZsMiGOJ1VwGJKhnwzR5KlB3rvKBaBPl5/IGHcopB2JN+r1SUEX1iMAw==", "dev": true }, "babel-helper-is-nodes-equiv": { @@ -302,27 +499,27 @@ "dev": true }, "babel-helper-is-void-0": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.2.0.tgz", - "integrity": "sha512-Axj1AYuD0E3Dl7nT3KxROP7VekEofz3XtEljzURf3fABalLpr8PamtgLFt+zuxtaCxRf9iuZmbAMMYWri5Bazw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.3.0.tgz", + "integrity": "sha512-JVqdX8y7Rf/x4NwbqtUI7mdQjL9HWoDnoAEQ8Gv8oxzjvbJv+n75f7l36m9Y8C7sCUltX3V5edndrp7Hp1oSXQ==", "dev": true }, "babel-helper-mark-eval-scopes": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.2.0.tgz", - "integrity": "sha512-KJuwrOUcHbvbh6he4xRXZFLaivK9DF9o3CrvpWnK1Wp0B+1ANYABXBMgwrnNFIDK/AvicxQ9CNr8wsgivlp4Aw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.3.0.tgz", + "integrity": "sha512-nrho5Dg4vl0VUgURVpGpEGiwbst5JX7efIyDHFxmkCx/ocQFnrPt8ze9Kxl6TKjR29bJ7D/XKY1NMlSxOQJRbQ==", "dev": true }, "babel-helper-remove-or-void": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.2.0.tgz", - "integrity": "sha512-1Z41upf/XR+PwY7Nd+F15Jo5BiQi5205ZXUuKed3yoyQgDkMyoM7vAdjEJS/T+M6jy32sXjskMUgms4zeiVtRA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.3.0.tgz", + "integrity": "sha512-D68W1M3ibCcbg0ysh3ww4/O0g10X1CXK720oOuR8kpfY7w0yP4tVcpK7zDmI1JecynycTQYAZ1rhLJo9aVtIKQ==", "dev": true }, "babel-helper-to-multiple-sequence-expressions": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.2.0.tgz", - "integrity": "sha512-ij9lpfdP3+Zc/7kNwa+NXbTrUlsYEWPwt/ugmQO0qflzLrveTIkbfOqQztvitk81aG5NblYDQXDlRohzu3oa8Q==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.3.0.tgz", + "integrity": "sha512-1uCrBD+EAaMnAYh7hc944n8Ga19y3daEnoXWPYDvFVsxMCc1l8aDjksApaCEaNSSuewq8BEcff47Cy1PbLg2Gw==", "dev": true }, "babel-helpers": { @@ -331,8 +528,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, "babel-messages": { @@ -341,216 +538,216 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-minify-webpack-plugin": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.2.0.tgz", - "integrity": "sha512-+5G5Qqm+DIVl7gY4rkHqlFRkaf1FZtz0imzu/Dy9+88AfOIuy7D5MQjkNgQr5gU6/YSZ+rImgxDqFcWkvvrjkQ==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.3.1.tgz", + "integrity": "sha512-Johg6Ju0Gxevk2R55eutMqnyXwlyUzCtwunBpiyNzoxGnKum+x5nfNuYZYHGd5Bmc1gmhjwzb7GkxHWOtYWmtQ==", "dev": true, "requires": { - "babel-core": "6.26.3", - "babel-preset-minify": "0.2.0", - "webpack-sources": "1.0.1" + "babel-core": "^6.26.0", + "babel-preset-minify": "^0.3.0", + "webpack-sources": "^1.0.1" } }, "babel-plugin-minify-builtins": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.2.0.tgz", - "integrity": "sha512-4i+8ntaS8gwVUcOz5y+zE+55OVOl2nTbmHV51D4wAIiKcRI8U5K//ip1GHfhsgk/NJrrHK7h97Oy5jpqt0Iixg==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.3.0.tgz", + "integrity": "sha512-MqhSHlxkmgURqj3144qPksbZ/qof1JWdumcbucc4tysFcf3P3V3z3munTevQgKEFNMd8F5/ECGnwb63xogLjAg==", "dev": true, "requires": { - "babel-helper-evaluate-path": "0.2.0" + "babel-helper-evaluate-path": "^0.3.0" } }, "babel-plugin-minify-constant-folding": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.2.0.tgz", - "integrity": "sha512-B3ffQBEUQ8ydlIkYv2MkZtTCbV7FAkWAV7NkyhcXlGpD10PaCxNGQ/B9oguXGowR1m16Q5nGhvNn8Pkn1MO6Hw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.3.0.tgz", + "integrity": "sha512-1XeRpx+aY1BuNY6QU/cm6P+FtEi3ar3XceYbmC+4q4W+2Ewq5pL7V68oHg1hKXkBIE0Z4/FjSoHz6vosZLOe/A==", "dev": true, "requires": { - "babel-helper-evaluate-path": "0.2.0" + "babel-helper-evaluate-path": "^0.3.0" } }, "babel-plugin-minify-dead-code-elimination": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.2.0.tgz", - "integrity": "sha512-zE7y3pRyzA4zK5nBou0kTcwUTSQ/AiFrynt1cIEYN7vcO2gS9ZFZoI0aO9JYLUdct5fsC1vfB35408yrzTyVfg==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.3.0.tgz", + "integrity": "sha512-SjM2Fzg85YZz+q/PNJ/HU4O3W98FKFOiP9K5z3sfonlamGOzvZw3Eup2OTiEBsbbqTeY8yzNCAv3qpJRYCgGmw==", "dev": true, "requires": { - "babel-helper-evaluate-path": "0.2.0", - "babel-helper-mark-eval-scopes": "0.2.0", - "babel-helper-remove-or-void": "0.2.0", - "lodash.some": "4.6.0" + "babel-helper-evaluate-path": "^0.3.0", + "babel-helper-mark-eval-scopes": "^0.3.0", + "babel-helper-remove-or-void": "^0.3.0", + "lodash.some": "^4.6.0" } }, "babel-plugin-minify-flip-comparisons": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.2.0.tgz", - "integrity": "sha512-QOqXSEmD/LhT3LpM1WCyzAGcQZYYKJF7oOHvS6QbpomHenydrV53DMdPX2mK01icBExKZcJAHF209wvDBa+CSg==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.3.0.tgz", + "integrity": "sha512-B8lK+ekcpSNVH7PZpWDe5nC5zxjRiiT4nTsa6h3QkF3Kk6y9qooIFLemdGlqBq6j0zALEnebvCpw8v7gAdpgnw==", "dev": true, "requires": { - "babel-helper-is-void-0": "0.2.0" + "babel-helper-is-void-0": "^0.3.0" } }, "babel-plugin-minify-guarded-expressions": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.2.0.tgz", - "integrity": "sha512-5+NSPdRQ9mnrHaA+zFj+D5OzmSiv90EX5zGH6cWQgR/OUqmCHSDqgTRPFvOctgpo8MJyO7Rt7ajs2UfLnlAwYg==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.3.0.tgz", + "integrity": "sha512-O+6CvF5/Ttsth3LMg4/BhyvVZ82GImeKMXGdVRQGK/8jFiP15EjRpdgFlxv3cnqRjqdYxLCS6r28VfLpb9C/kA==", "dev": true, "requires": { - "babel-helper-flip-expressions": "0.2.0" + "babel-helper-flip-expressions": "^0.3.0" } }, "babel-plugin-minify-infinity": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.2.0.tgz", - "integrity": "sha512-U694vrla1lN6vDHWGrR832t3a/A2eh+kyl019LxEE2+sS4VTydyOPRsAOIYAdJegWRA4cMX1lm9azAN0cLIr8g==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.3.0.tgz", + "integrity": "sha512-Sj8ia3/w9158DWieUxU6/VvnYVy59geeFEkVgLZYBE8EBP+sN48tHtBM/jSgz0ejEdBlcfqJ6TnvPmVXTzR2BQ==", "dev": true }, "babel-plugin-minify-mangle-names": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.2.0.tgz", - "integrity": "sha512-Gixuak1/CO7VCdjn15/8Bxe/QsAtDG4zPbnsNoe1mIJGCIH/kcmSjFhMlGJtXDQZd6EKzeMfA5WmX9+jvGRefw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.3.0.tgz", + "integrity": "sha512-PYTonhFWURsfAN8achDwvR5Xgy6EeTClLz+fSgGRqjAIXb0OyFm3/xfccbQviVi1qDXmlSnt6oJhBg8KE4Fn7Q==", "dev": true, "requires": { - "babel-helper-mark-eval-scopes": "0.2.0" + "babel-helper-mark-eval-scopes": "^0.3.0" } }, "babel-plugin-minify-numeric-literals": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.2.0.tgz", - "integrity": "sha512-VcLpb+r1YS7+RIOXdRsFVLLqoh22177USpHf+JM/g1nZbzdqENmfd5v534MLAbRErhbz6SyK+NQViVzVtBxu8g==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.3.0.tgz", + "integrity": "sha512-TgZj6ay8zDw74AS3yiIfoQ8vRSNJisYO/Du60S8nPV7EW7JM6fDMx5Sar6yVHlVuuwNgvDUBh191K33bVrAhpg==", "dev": true }, "babel-plugin-minify-replace": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.2.0.tgz", - "integrity": "sha512-SEW6zoSVxh3OH6E1LCgyhhTWMnCv+JIRu5h5IlJDA11tU4ZeSF7uPQcO4vN/o52+FssRB26dmzJ/8D+z0QPg5Q==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.3.0.tgz", + "integrity": "sha512-VR6tTg2Lt0TicHIOw04fsUtpPw7RaRP8PC8YzSFwEixnzvguZjZJoL7TgG7ZyEWQD1cJ96UezswECmFNa815bg==", "dev": true }, "babel-plugin-minify-simplify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.2.0.tgz", - "integrity": "sha512-Mj3Mwy2zVosMfXDWXZrQH5/uMAyfJdmDQ1NVqit+ArbHC3LlXVzptuyC1JxTyai/wgFvjLaichm/7vSUshkWqw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.3.0.tgz", + "integrity": "sha512-2M16ytQOCqBi7bYMu4DCWn8e6KyFCA108F6+tVrBJxOmm5u2sOmTFEa8s94tR9RHRRNYmcUf+rgidfnzL3ik9Q==", "dev": true, "requires": { - "babel-helper-flip-expressions": "0.2.0", - "babel-helper-is-nodes-equiv": "0.0.1", - "babel-helper-to-multiple-sequence-expressions": "0.2.0" + "babel-helper-flip-expressions": "^0.3.0", + "babel-helper-is-nodes-equiv": "^0.0.1", + "babel-helper-to-multiple-sequence-expressions": "^0.3.0" } }, "babel-plugin-minify-type-constructors": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.2.0.tgz", - "integrity": "sha512-NiOvvA9Pq6bki6nP4BayXwT5GZadw7DJFDDzHmkpnOQpENWe8RtHtKZM44MG1R6EQ5XxgbLdsdhswIzTkFlO5g==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.3.0.tgz", + "integrity": "sha512-XRXpvsUCPeVw9YEUw+9vSiugcSZfow81oIJT0yR9s8H4W7yJ6FHbImi5DJHoL8KcDUjYnL9wYASXk/fOkbyR6Q==", "dev": true, "requires": { - "babel-helper-is-void-0": "0.2.0" + "babel-helper-is-void-0": "^0.3.0" } }, "babel-plugin-transform-inline-consecutive-adds": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.2.0.tgz", - "integrity": "sha512-GlhOuLOQ28ua9prg0hT33HslCrEmz9xWXy9ZNZSACppCyRxxRW+haYtRgm7uYXCcd0q8ggCWD2pfWEJp5iiZfQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.3.0.tgz", + "integrity": "sha512-iZsYAIjYLLfLK0yN5WVT7Xf7Y3wQ9Z75j9A8q/0IglQSpUt2ppTdHlwl/GeaXnxdaSmsxBu861klbTBbv2n+RA==", "dev": true }, "babel-plugin-transform-member-expression-literals": { - "version": "6.8.5", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.8.5.tgz", - "integrity": "sha512-Ux3ligf+ukzWaCbBYOstDuFBhRgMiJHlpJBKV4P47qtzVkd0lg1ddPj9fqIJqAM0n+CvxipyrZrnNnw3CdtQCg==", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz", + "integrity": "sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8=", "dev": true }, "babel-plugin-transform-merge-sibling-variables": { - "version": "6.8.6", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.8.6.tgz", - "integrity": "sha512-o5Jioq553HtEAUN5uty7ELJMenXIxHI3PIs1yLqYWYQwP6mg6IPVAJ+U7i4zr9XGF/kb2RGsdehglGTV+vngqA==", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz", + "integrity": "sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4=", "dev": true }, "babel-plugin-transform-minify-booleans": { - "version": "6.8.3", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.8.3.tgz", - "integrity": "sha512-bPbUhkeN2Nc0KH0/A19GwQGj8w+CvdJzyu8t59VoEDgsNMQ9Bopzi5DrVkrSsVjbYUaZpzq/DYLrH+wD5K2Tig==", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz", + "integrity": "sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg=", "dev": true }, "babel-plugin-transform-property-literals": { - "version": "6.8.5", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.8.5.tgz", - "integrity": "sha512-MmiQsQ5AcIaRZMJD0zY5C4H3xuHm06/nWgtOsz7AXV44VEIXIlPiJ39IFYJ4Qx67/fEm8zJAedzR8t+B7d10Bg==", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz", + "integrity": "sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk=", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "babel-plugin-transform-regexp-constructors": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.2.0.tgz", - "integrity": "sha512-7IsQ6aQx6LAaOqy97/PthTf+5Nx9grZww3r6E62IdWe76Yr8KsuwVjxzqSPQvESJqTE3EMADQ9S0RtwWDGNG9Q==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.3.0.tgz", + "integrity": "sha512-h92YHzyl042rb0naKO8frTHntpRFwRgKkfWD8602kFHoQingjJNtbvZzvxqHncJ6XmKVyYvfrBpDOSkCTDIIxw==", "dev": true }, "babel-plugin-transform-remove-console": { - "version": "6.8.5", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.8.5.tgz", - "integrity": "sha512-uuCKvtweCyIvvC8fi92EcWRtO2Kt5KMNMRK6BhpDXdeb3sxvGM7453RSmgeu4DlKns3OlvY9Ep5Q9m5a7RQAgg==", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz", + "integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=", "dev": true }, "babel-plugin-transform-remove-debugger": { - "version": "6.8.5", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.8.5.tgz", - "integrity": "sha512-InDQDdHPOLJKM+G6oXrEesf+P29QFBmcTXID+TAvZziVz+38xe2VO/Bn3FcRcRtnOOycbgsJkUNp9jIK+ist6g==", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz", + "integrity": "sha1-QrcnYxyXl44estGZp67IShgznvI=", "dev": true }, "babel-plugin-transform-remove-undefined": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.2.0.tgz", - "integrity": "sha512-O8v57tPMHkp89kA4ZfQEYds/pzgvz/QYerBJjIuL5/Jc7RnvMVRA5gJY9zFKP7WayW8WOSBV4vh8Y8FJRio+ow==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.3.0.tgz", + "integrity": "sha512-TYGQucc8iP3LJwN3kDZLEz5aa/2KuFrqpT+s8f8NnHsBU1sAgR3y8Opns0xhC+smyDYWscqFCKM1gbkWQOhhnw==", "dev": true, "requires": { - "babel-helper-evaluate-path": "0.2.0" + "babel-helper-evaluate-path": "^0.3.0" } }, "babel-plugin-transform-simplify-comparison-operators": { - "version": "6.8.5", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.8.5.tgz", - "integrity": "sha512-B3HlBZb+Uq86nRj5yNPO6pJ3noEdqHvzYkEYoUWtrsWTv48ZIRatYlumoOiif/v8llF13YjYjx9zhyznDx+N9g==", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz", + "integrity": "sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk=", "dev": true }, "babel-plugin-transform-undefined-to-void": { - "version": "6.8.3", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.8.3.tgz", - "integrity": "sha512-goYwp8dMrzHD6x9GjZ2M85Mk2vxf1h85CnUgAjfftUnlJvzF4uj5MrbReHBTbjQ96C8CuRzvhYZ3tv8H3Sc1ZA==", + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz", + "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=", "dev": true }, "babel-preset-minify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.2.0.tgz", - "integrity": "sha512-mR8Q44RmMzm18bM2Lqd9uiPopzk5GDCtVuquNbLFmX6lOKnqWoenaNBxnWW0UhBFC75lEHTIgNGCbnsRI0pJVw==", - "dev": true, - "requires": { - "babel-plugin-minify-builtins": "0.2.0", - "babel-plugin-minify-constant-folding": "0.2.0", - "babel-plugin-minify-dead-code-elimination": "0.2.0", - "babel-plugin-minify-flip-comparisons": "0.2.0", - "babel-plugin-minify-guarded-expressions": "0.2.0", - "babel-plugin-minify-infinity": "0.2.0", - "babel-plugin-minify-mangle-names": "0.2.0", - "babel-plugin-minify-numeric-literals": "0.2.0", - "babel-plugin-minify-replace": "0.2.0", - "babel-plugin-minify-simplify": "0.2.0", - "babel-plugin-minify-type-constructors": "0.2.0", - "babel-plugin-transform-inline-consecutive-adds": "0.2.0", - "babel-plugin-transform-member-expression-literals": "6.8.5", - "babel-plugin-transform-merge-sibling-variables": "6.8.6", - "babel-plugin-transform-minify-booleans": "6.8.3", - "babel-plugin-transform-property-literals": "6.8.5", - "babel-plugin-transform-regexp-constructors": "0.2.0", - "babel-plugin-transform-remove-console": "6.8.5", - "babel-plugin-transform-remove-debugger": "6.8.5", - "babel-plugin-transform-remove-undefined": "0.2.0", - "babel-plugin-transform-simplify-comparison-operators": "6.8.5", - "babel-plugin-transform-undefined-to-void": "6.8.3", - "lodash.isplainobject": "4.0.6" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.3.0.tgz", + "integrity": "sha512-+VV2GWEyak3eDOmzT1DDMuqHrw3VbE9nBNkx2LLVs4pH/Me32ND8DRpVDd8IRvk1xX5p75nygyRPtkMh6GIAbQ==", + "dev": true, + "requires": { + "babel-plugin-minify-builtins": "^0.3.0", + "babel-plugin-minify-constant-folding": "^0.3.0", + "babel-plugin-minify-dead-code-elimination": "^0.3.0", + "babel-plugin-minify-flip-comparisons": "^0.3.0", + "babel-plugin-minify-guarded-expressions": "^0.3.0", + "babel-plugin-minify-infinity": "^0.3.0", + "babel-plugin-minify-mangle-names": "^0.3.0", + "babel-plugin-minify-numeric-literals": "^0.3.0", + "babel-plugin-minify-replace": "^0.3.0", + "babel-plugin-minify-simplify": "^0.3.0", + "babel-plugin-minify-type-constructors": "^0.3.0", + "babel-plugin-transform-inline-consecutive-adds": "^0.3.0", + "babel-plugin-transform-member-expression-literals": "^6.9.0", + "babel-plugin-transform-merge-sibling-variables": "^6.9.0", + "babel-plugin-transform-minify-booleans": "^6.9.0", + "babel-plugin-transform-property-literals": "^6.9.0", + "babel-plugin-transform-regexp-constructors": "^0.3.0", + "babel-plugin-transform-remove-console": "^6.9.0", + "babel-plugin-transform-remove-debugger": "^6.9.0", + "babel-plugin-transform-remove-undefined": "^0.3.0", + "babel-plugin-transform-simplify-comparison-operators": "^6.9.0", + "babel-plugin-transform-undefined-to-void": "^6.9.0", + "lodash.isplainobject": "^4.0.6" } }, "babel-register": { @@ -559,13 +756,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "6.26.3", - "babel-runtime": "6.26.0", - "core-js": "2.5.7", - "home-or-tmp": "2.0.0", - "lodash": "4.17.10", - "mkdirp": "0.5.1", - "source-map-support": "0.4.18" + "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": { @@ -574,8 +771,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.7", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -584,11 +781,11 @@ "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.10" + "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": { @@ -597,15 +794,15 @@ "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.9", - "globals": "9.18.0", - "invariant": "2.2.4", - "lodash": "4.17.10" + "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": { @@ -614,10 +811,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -638,13 +835,13 @@ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "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": { @@ -653,7 +850,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -662,7 +859,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -671,7 +868,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -680,16 +877,10 @@ "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-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -700,21 +891,21 @@ "dev": true }, "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, "bluebird": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.3.3.tgz", - "integrity": "sha1-z5akXXe5qXpDxGo2XEYZ9iv5dtA=", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", + "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", "dev": true }, "bn.js": { @@ -724,12 +915,12 @@ "dev": true }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "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", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -739,16 +930,16 @@ "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.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "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": { @@ -757,7 +948,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -774,12 +965,12 @@ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "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": { @@ -788,20 +979,21 @@ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { - "browserify-aes": "1.2.0", - "browserify-des": "1.0.1", - "evp_bytestokey": "1.0.3" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, "browserify-des": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", - "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "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.4", - "des.js": "1.0.0", - "inherits": "2.0.3" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "browserify-rsa": { @@ -810,8 +1002,8 @@ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { - "bn.js": "4.11.8", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" } }, "browserify-sign": { @@ -820,13 +1012,13 @@ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "elliptic": "6.4.0", - "inherits": "2.0.3", - "parse-asn1": "5.1.1" + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" } }, "browserify-zlib": { @@ -835,7 +1027,7 @@ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "pako": "1.0.6" + "pako": "~1.0.5" } }, "buffer": { @@ -844,92 +1036,120 @@ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { - "base64-js": "1.3.0", - "ieee754": "1.1.11", - "isarray": "1.0.0" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, + "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-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "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 }, + "cacache": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", + "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "dev": true, + "requires": { + "bluebird": "^3.5.3", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, "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" + "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" } }, "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.0.tgz", + "integrity": "sha512-Y05ICatFYPAfykDIB7VdwSJ0LUl1yq/BwO2OpyGGLjiRe1fgzTwVypPiWnzkGFOVFHXrCXUNBl86bpjBhZWSJg==", "dev": true }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" - } - }, "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.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "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" } }, "chokidar": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", - "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", + "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "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" + } + }, + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", + "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", "dev": true, "requires": { - "anymatch": "2.0.0", - "async-each": "1.0.1", - "braces": "2.3.2", - "glob-parent": "3.1.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "4.0.0", - "normalize-path": "2.1.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0", - "upath": "1.1.0" + "tslib": "^1.9.0" } }, "cipher-base": { @@ -938,8 +1158,8 @@ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "class-utils": { @@ -948,10 +1168,10 @@ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -960,27 +1180,36 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } }, "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "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": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" }, "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "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-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" + } } } }, @@ -996,10 +1225,37 @@ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "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 + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "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.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", @@ -1012,13 +1268,25 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "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" + } + }, "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "0.1.4" + "date-now": "^0.1.4" } }, "constants-browserify": { @@ -1028,10 +1296,27 @@ "dev": true }, "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } }, "copy-descriptor": { "version": "0.1.1", @@ -1040,9 +1325,9 @@ "dev": true }, "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", "dev": true }, "core-util-is": { @@ -1057,8 +1342,8 @@ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "dev": true, "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.0" + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" } }, "create-hash": { @@ -1067,11 +1352,11 @@ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.3", - "md5.js": "1.3.4", - "ripemd160": "2.0.2", - "sha.js": "2.4.11" + "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": { @@ -1080,23 +1365,25 @@ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "inherits": "2.0.3", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "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": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "crypto-browserify": { @@ -1105,27 +1392,24 @@ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "browserify-cipher": "1.0.1", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.3", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "diffie-hellman": "5.0.3", - "inherits": "2.0.3", - "pbkdf2": "3.0.16", - "public-encrypt": "4.0.2", - "randombytes": "2.0.6", - "randomfill": "1.0.4" + "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" } }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "0.10.43" - } + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true }, "date-now": { "version": "0.1.4", @@ -1160,8 +1444,8 @@ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -1170,7 +1454,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -1179,7 +1463,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -1188,16 +1472,10 @@ "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-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -1207,17 +1485,23 @@ "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "dev": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, "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.1" + "repeating": "^2.0.0" } }, "diffie-hellman": { @@ -1226,9 +1510,9 @@ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, "domain-browser": { @@ -1238,29 +1522,40 @@ "dev": true }, "dts-generator": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/dts-generator/-/dts-generator-2.1.0.tgz", - "integrity": "sha1-A5uHpPX4R7O47wDd7j6wlUXezv4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dts-generator/-/dts-generator-3.0.0.tgz", + "integrity": "sha512-IrFP0TUGnBOxr8Lth0hLh/iM9odZTRGYyr4Y46IRxyw1SGO1Vvf30+x4npck9yP4FbaRXbB0Zh7gvmiqUta7mg==", + "dev": true, + "requires": { + "glob": "^7.1.3", + "mkdirp": "^0.5.1" + } + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", "dev": true, "requires": { - "bluebird": "3.3.3", - "glob": "7.0.0", - "mkdirp": "0.5.1" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "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" } }, "emojis-list": { @@ -1269,16 +1564,24 @@ "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", "dev": true }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, "enhanced-resolve": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", - "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "memory-fs": "0.4.1", - "object-assign": "4.1.1", - "tapable": "0.2.8" + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" } }, "errno": { @@ -1287,105 +1590,23 @@ "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "dev": true, "requires": { - "prr": "1.0.1" + "prr": "~1.0.1" } }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "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 + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { - "is-arrayish": "0.2.1" - } - }, - "es5-ext": { - "version": "0.10.43", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.43.tgz", - "integrity": "sha512-cZd1vezWuTM5qMlasKWqQFioFKwO352nVBzhOTMUf/pKQl5Gcq5EdJzqtSNXKnFQSCJDiQZjCYlYbnzFB657OA==", - "dev": true, - "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "next-tick": "1.0.0" - } - }, - "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.0.0", - "es5-ext": "0.10.43", - "es6-symbol": "3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.43", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.43", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.43" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.43", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" - } - }, - "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 - }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "dev": true, - "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "esrecurse": { @@ -1394,7 +1615,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -1409,20 +1630,10 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.43" - } - }, "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", "dev": true }, "evp_bytestokey": { @@ -1431,23 +1642,23 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "md5.js": "1.3.4", - "safe-buffer": "5.1.2" + "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=", + "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": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "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" } }, "expand-brackets": { @@ -1456,13 +1667,13 @@ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "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": { @@ -1471,7 +1682,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -1480,19 +1691,28 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "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" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -1501,7 +1721,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -1512,14 +1732,14 @@ "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.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "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": { @@ -1528,7 +1748,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -1537,7 +1757,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -1546,7 +1766,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -1555,7 +1775,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -1564,16 +1784,10 @@ "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-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -1589,16 +1803,22 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, + "figgy-pudding": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true + }, "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.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -1607,58 +1827,681 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" + } + } + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "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" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "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" + } + } + } + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "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" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "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.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "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" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": 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" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.3", + "bundled": true, + "dev": true, + "optional": true, + "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" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": 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" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": 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" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "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 }, - "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" - } - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "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": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" + "pump": "^3.0.0" } }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "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", @@ -1666,16 +2509,17 @@ "dev": true }, "glob": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.0.tgz", - "integrity": "sha1-OyCjV//89GuzhK7W+K6aZH/basQ=", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "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": { @@ -1684,8 +2528,8 @@ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { @@ -1694,11 +2538,35 @@ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.0" } } } }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", @@ -1706,31 +2574,28 @@ "dev": true }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.1.tgz", + "integrity": "sha512-3Zhi6C0euYZL5sM0Zcy7lInLXKQ+YLcF/olbN010mzGQ4XVm50JeyBnMqofHh696GrciGruC7kCcApPDJvVgwA==", "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" }, "dependencies": { "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": "1.0.1" - } + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -1740,13 +2605,13 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "has-value": { @@ -1755,9 +2620,9 @@ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -1766,8 +2631,8 @@ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { @@ -1776,7 +2641,7 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1787,24 +2652,24 @@ "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "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" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, "highlight.js": { - "version": "9.12.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz", - "integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=", + "version": "9.15.6", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.6.tgz", + "integrity": "sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ==", "dev": true }, "hmac-drbg": { @@ -1813,9 +2678,9 @@ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "hash.js": "1.1.3", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, "home-or-tmp": { @@ -1824,15 +2689,18 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" } }, - "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", - "dev": true + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } }, "https-browserify": { "version": "1.0.0", @@ -1841,9 +2709,15 @@ "dev": true }, "ieee754": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.11.tgz", - "integrity": "sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", "dev": true }, "immediate": { @@ -1851,6 +2725,22 @@ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.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 + }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", @@ -1863,8 +2753,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -1873,10 +2763,16 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, "invariant": { @@ -1885,13 +2781,13 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "1.4.0" + "loose-envify": "^1.0.0" } }, "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "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": { @@ -1900,22 +2796,27 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { - "kind-of": "3.2.2" + "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-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": "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.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -1924,22 +2825,24 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "1.1.1" - } - }, "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.2.2" + "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": { @@ -1948,9 +2851,9 @@ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -1979,25 +2882,22 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "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.1" - } + "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-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "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-extglob": "^2.1.1" } }, "is-number": { @@ -2006,23 +2906,17 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "3.2.2" - } - }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", - "dev": true, - "requires": { - "is-number": "4.0.0" + "kind-of": "^3.0.2" }, "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": "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" + } } } }, @@ -2032,7 +2926,7 @@ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-stream": { @@ -2077,16 +2971,16 @@ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, - "json-loader": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", - "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", + "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-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "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 }, "json5": { @@ -2101,31 +2995,22 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "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.6" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^2.0.0" } }, "lie": { @@ -2133,60 +3018,65 @@ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", "requires": { - "immediate": "3.0.6" - } - }, - "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.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "immediate": "~3.0.5" } }, "loader-runner": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", - "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", "dev": true }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1" + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "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" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } } }, "localforage": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.7.1.tgz", - "integrity": "sha1-5JJ+BCMCuGTbMPMhHxO1xvDell0=", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.7.3.tgz", + "integrity": "sha512-1TulyYfc4udS7ECSBT2vwJksWbkwwTX8BzeUIiq8Y07Riy7bDAAnxDaPU/tWyOVmQAcWJIEIFP9lPfBGqVoPgQ==", "requires": { "lie": "3.1.1" } }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "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": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, "lodash.isplainobject": { @@ -2201,29 +3091,47 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", "dev": true }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "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.2" + "js-tokens": "^3.0.0 || ^4.0.0" } }, "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, + "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": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "p-defer": "^1.0.0" } }, "map-cache": { @@ -2238,32 +3146,35 @@ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "marked": { - "version": "0.3.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.12.tgz", - "integrity": "sha512-k4NaW+vS7ytQn6MgJn3fYpQt20/mOgYM5Ft9BYMfQJDz2QT6yEeS9XJ8k2Nw8JTeWK/znPPW2n3UJGzyYEiMoA==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.4.0.tgz", + "integrity": "sha512-tMsdNBgOsrUophCAFQl0XPe6Zqk/uy9gnue+jIIKhykO51hxyu6uNx7zBPy0+y/WKYVZZMspV9YeXLNdKk+iYw==", "dev": true }, "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "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.4", - "inherits": "2.0.3" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" } }, "memory-fs": { @@ -2272,8 +3183,8 @@ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "dev": true, "requires": { - "errno": "0.1.7", - "readable-stream": "2.3.6" + "errno": "^0.1.3", + "readable-stream": "^2.0.1" } }, "micromatch": { @@ -2282,27 +3193,19 @@ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "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.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } + "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" } }, "miller-rabin": { @@ -2311,14 +3214,14 @@ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" + "bn.js": "^4.0.0", + "brorand": "^1.0.1" } }, "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==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimalistic-assert": { @@ -2339,7 +3242,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -2348,14 +3251,32 @@ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, "mixin-deep": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "dev": true, "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -2364,7 +3285,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -2378,80 +3299,92 @@ "minimist": "0.0.8" } }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "nan": { + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "dev": true, + "optional": true + }, "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", - "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-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } + "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" } }, "neo-async": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", - "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", + "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", "dev": true }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "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-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", - "dev": true, - "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.2.0", - "buffer": "4.9.1", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "domain-browser": "1.2.0", - "events": "1.1.1", - "https-browserify": "1.0.0", - "os-browserify": "0.3.0", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", + "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", + "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.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "readable-stream": "2.3.6", - "stream-browserify": "2.0.1", - "stream-http": "2.8.2", - "string_decoder": "1.1.1", - "timers-browserify": "2.0.10", + "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.10.3", + "url": "^0.11.0", + "util": "^0.11.0", "vm-browserify": "0.0.4" }, "dependencies": { @@ -2463,26 +3396,11 @@ } } }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" - } - }, "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.1.0" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "npm-run-path": { "version": "2.0.2", @@ -2490,7 +3408,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -2499,21 +3417,15 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "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.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -2522,7 +3434,16 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "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" } } } @@ -2533,7 +3454,7 @@ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.pick": { @@ -2542,7 +3463,7 @@ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "once": { @@ -2551,7 +3472,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -2560,8 +3481,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-browserify": { @@ -2577,14 +3498,14 @@ "dev": true }, "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "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": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" } }, "os-tmpdir": { @@ -2593,63 +3514,84 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "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.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", + "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "dev": true + }, "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "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": "1.2.0" + "p-limit": "^2.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=", + "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 }, "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "dev": true, "requires": { - "asn1.js": "4.10.1", - "browserify-aes": "1.2.0", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.16" + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "parse-asn1": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", "dev": true, "requires": { - "error-ex": "1.3.1" + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -2687,39 +3629,39 @@ "dev": true }, "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "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.3.0" - } - }, "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "dev": true, "requires": { - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -2745,9 +3687,15 @@ "dev": true }, "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, "prr": { @@ -2756,23 +3704,51 @@ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "public-encrypt": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "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" + } + }, + "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" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "parse-asn1": "5.1.1", - "randombytes": "2.0.6" + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } } }, "punycode": { @@ -2794,12 +3770,12 @@ "dev": true }, "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "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.2" + "safe-buffer": "^5.1.0" } }, "randomfill": { @@ -2808,29 +3784,8 @@ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dev": true, "requires": { - "randombytes": "2.0.6", - "safe-buffer": "5.1.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.4.0", - "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.1.0", - "read-pkg": "2.0.0" + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" } }, "readable-stream": { @@ -2839,25 +3794,24 @@ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "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": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "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", - "minimatch": "3.0.4", - "readable-stream": "2.3.6", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" } }, "rechoir": { @@ -2866,7 +3820,7 @@ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { - "resolve": "1.5.0" + "resolve": "^1.1.6" } }, "regenerator-runtime": { @@ -2881,8 +3835,8 @@ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "remove-trailing-separator": { @@ -2892,9 +3846,9 @@ "dev": true }, "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "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": { @@ -2909,7 +3863,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "require-directory": { @@ -2925,14 +3879,39 @@ "dev": true }, "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "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-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", "dev": true, "requires": { - "path-parse": "1.0.5" + "expand-tilde": "^2.0.0", + "global-modules": "^1.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", @@ -2945,13 +3924,13 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "align-text": "0.1.4" + "glob": "^7.1.3" } }, "ripemd160": { @@ -2960,8 +3939,17 @@ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.3" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" } }, "safe-buffer": { @@ -2976,13 +3964,30 @@ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" } }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, + "serialize-javascript": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", + "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", "dev": true }, "set-blocking": { @@ -2991,22 +3996,16 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -3015,7 +4014,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -3032,8 +4031,8 @@ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "shebang-command": { @@ -3042,7 +4041,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -3052,14 +4051,14 @@ "dev": true }, "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", "dev": true, "requires": { - "glob": "7.0.0", - "interpret": "1.1.0", - "rechoir": "0.6.2" + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" } }, "signal-exit": { @@ -3080,14 +4079,14 @@ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.2", - "use": "3.1.0" + "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": { @@ -3096,7 +4095,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -3105,7 +4104,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -3116,9 +4115,9 @@ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -3127,7 +4126,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -3136,7 +4135,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -3145,7 +4144,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -3154,16 +4153,10 @@ "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-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -3173,13 +4166,24 @@ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { - "kind-of": "3.2.2" + "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-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, "source-map": { @@ -3194,11 +4198,11 @@ "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "dev": true, "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { @@ -3207,7 +4211,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } }, "source-map-url": { @@ -3216,45 +4220,22 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "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.2" + "extend-shallow": "^3.0.0" + } + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" } }, "static-extend": { @@ -3263,8 +4244,8 @@ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -3273,42 +4254,58 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } }, "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "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.3", - "readable-stream": "2.3.6" + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" } }, "stream-http": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.2.tgz", - "integrity": "sha512-QllfrBhqF1DPcz46WxKTs6Mz1Bpc+8Qm6vbqOpVav5odAXwbyzwnEczoWqtxrsmlO+cJqtPrp/8gWKWjaKLLlA==", + "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.3", - "readable-stream": "2.3.6", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" } }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "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" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -3317,19 +4314,13 @@ "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 - }, "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-regex": "^3.0.0" } } } @@ -3340,7 +4331,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -3349,15 +4340,9 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "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", @@ -3371,18 +4356,81 @@ "dev": true }, "tapable": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", - "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", + "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", "dev": true }, + "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 + }, + "source-map-support": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.11.tgz", + "integrity": "sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } + } + }, + "terser-webpack-plugin": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz", + "integrity": "sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA==", + "dev": true, + "requires": { + "cacache": "^11.0.2", + "find-cache-dir": "^2.0.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "terser": "^3.16.1", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "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 + } + } + }, + "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" + } + }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "dev": true, "requires": { - "setimmediate": "1.0.5" + "setimmediate": "^1.0.4" } }, "to-arraybuffer": { @@ -3403,7 +4451,18 @@ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { - "kind-of": "3.2.2" + "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": { @@ -3412,10 +4471,10 @@ "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" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -3424,8 +4483,8 @@ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, "trim-right": { @@ -3434,41 +4493,53 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, "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 }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, "typedoc": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.8.0.tgz", - "integrity": "sha1-1xcrxqKZZPRRt2CcAFvq2t7+I2E=", - "dev": true, - "requires": { - "@types/fs-extra": "4.0.7", - "@types/handlebars": "4.0.36", - "@types/highlight.js": "9.12.2", - "@types/lodash": "4.14.98", - "@types/marked": "0.0.28", - "@types/minimatch": "2.0.29", - "@types/shelljs": "0.7.7", - "fs-extra": "4.0.3", - "handlebars": "4.0.11", - "highlight.js": "9.12.0", - "lodash": "4.17.10", - "marked": "0.3.12", - "minimatch": "3.0.4", - "progress": "2.0.0", - "shelljs": "0.7.8", - "typedoc-default-themes": "0.5.0", - "typescript": "2.4.1" + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.14.2.tgz", + "integrity": "sha512-aEbgJXV8/KqaVhcedT7xG6d2r+mOvB5ep3eIz1KuB5sc4fDYXcepEEMdU7XSqLFO5hVPu0nllHi1QxX2h/QlpQ==", + "dev": true, + "requires": { + "@types/fs-extra": "^5.0.3", + "@types/handlebars": "^4.0.38", + "@types/highlight.js": "^9.12.3", + "@types/lodash": "^4.14.110", + "@types/marked": "^0.4.0", + "@types/minimatch": "3.0.3", + "@types/shelljs": "^0.8.0", + "fs-extra": "^7.0.0", + "handlebars": "^4.0.6", + "highlight.js": "^9.13.1", + "lodash": "^4.17.10", + "marked": "^0.4.0", + "minimatch": "^3.0.0", + "progress": "^2.0.0", + "shelljs": "^0.8.2", + "typedoc-default-themes": "^0.5.0", + "typescript": "3.2.x" }, "dependencies": { "typescript": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.1.tgz", - "integrity": "sha1-w8yxbdqgsjFN4DHn5v7onlujRrw=", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", + "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", "dev": true } } @@ -3484,38 +4555,29 @@ "dev": true }, "typescript": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.8.3.tgz", - "integrity": "sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.1.tgz", + "integrity": "sha512-3NSMb2VzDQm8oBTLH6Nj55VVtUEpe/rgkIzMir0qVoLyjDZlnMBva0U6vDiV3IH+sl/Yu6oP5QwsAQtHPmDd2Q==", "dev": true }, "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "uglifyjs-webpack-plugin": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", - "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.3.tgz", + "integrity": "sha512-rIQPT2UMDnk4jRX+w4WO84/pebU2jiLsjgIyrCktYgSvx28enOE3iYQMr+BD1rHiitWnDmpu0cY/LfIEpKcjcw==", "dev": true, + "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-js": "2.8.29", - "webpack-sources": "1.0.1" + "commander": "~2.19.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, + "optional": true + } } }, "union-value": { @@ -3524,10 +4586,10 @@ "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "dev": true, "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -3536,7 +4598,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -3545,18 +4607,36 @@ "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", + "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, "unset-value": { @@ -3565,8 +4645,8 @@ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -3575,9 +4655,9 @@ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -3600,9 +4680,9 @@ } }, "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", + "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", "dev": true }, "uri-js": { @@ -3611,7 +4691,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "2.1.1" + "punycode": "^2.1.0" } }, "urix": { @@ -3639,37 +4719,18 @@ } }, "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", - "dev": true, - "requires": { - "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } + "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.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "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.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - } + "inherits": "2.0.3" } }, "util-deprecate": { @@ -3678,15 +4739,11 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "dev": true, - "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" - } + "v8-compile-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz", + "integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==", + "dev": true }, "vm-browserify": { "version": "0.0.4", @@ -3703,126 +4760,109 @@ "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "dev": true, "requires": { - "chokidar": "2.0.3", - "graceful-fs": "4.1.11", - "neo-async": "2.5.1" + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" } }, "webpack": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz", - "integrity": "sha512-Sw7MdIIOv/nkzPzee4o0EdvCuPmxT98+vVpIvwtcwcF1Q4SDSNp92vwcKc4REe7NItH9f1S4ra9FuQ7yuYZ8bQ==", - "dev": true, - "requires": { - "acorn": "5.5.3", - "acorn-dynamic-import": "2.0.2", - "ajv": "6.5.0", - "ajv-keywords": "3.2.0", - "async": "2.6.1", - "enhanced-resolve": "3.4.1", - "escope": "3.6.0", - "interpret": "1.1.0", - "json-loader": "0.5.7", - "json5": "0.5.1", - "loader-runner": "2.3.0", - "loader-utils": "1.1.0", - "memory-fs": "0.4.1", - "mkdirp": "0.5.1", - "node-libs-browser": "2.1.0", - "source-map": "0.5.7", - "supports-color": "4.5.0", - "tapable": "0.2.8", - "uglifyjs-webpack-plugin": "0.4.6", - "watchpack": "1.6.0", - "webpack-sources": "1.0.1", - "yargs": "8.0.2" + "version": "4.29.6", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.6.tgz", + "integrity": "sha512-MwBwpiE1BQpMDkbnUUaW6K8RFZjljJHArC6tWQJoFm0oQtfoSebtg4Y7/QHnJ/SddtjYLHaKGX64CFjG5rehJw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/wasm-edit": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.0", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^1.0.0", + "tapable": "^1.1.0", + "terser-webpack-plugin": "^1.1.0", + "watchpack": "^1.5.0", + "webpack-sources": "^1.3.0" + } + }, + "webpack-cli": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.0.tgz", + "integrity": "sha512-t1M7G4z5FhHKJ92WRKwZ1rtvi7rHc0NZoZRbSkol0YKl4HvcC8+DsmGDmK7MmZxHSAetHagiOsjOB6MmzC2TUw==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.0", + "findup-sync": "^2.0.0", + "global-modules": "^1.0.0", + "import-local": "^2.0.0", + "interpret": "^1.1.0", + "loader-utils": "^1.1.0", + "supports-color": "^5.5.0", + "v8-compile-cache": "^2.0.2", + "yargs": "^12.0.5" }, "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "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": { - "lodash": "4.17.10" + "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 - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "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": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - }, - "dependencies": { - "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.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "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": "2.0.0" - } - }, - "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", - "dev": true, - "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "7.0.0" + "has-flag": "^3.0.0" } } } }, "webpack-sources": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz", - "integrity": "sha512-05tMxipUCwHqYaVS8xc7sYPTly8PzXayRCB4dTxLhWTqlKUiwH6ezmEe0OSreL1c30LAuA3Zqmc+uEBUGFJDjw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", + "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", "dev": true, "requires": { - "source-list-map": "2.0.0", - "source-map": "0.5.7" + "source-list-map": "^2.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 + } } }, "which": { @@ -3831,7 +4871,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -3840,37 +4880,49 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true - }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", "dev": true }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, "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.2", - "strip-ansi": "3.0.1" + "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.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -3888,44 +4940,45 @@ "dev": true }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true }, "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "dev": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", - "window-size": "0.1.0" + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.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 || ^4.0.0", + "yargs-parser": "^11.1.1" } }, "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "dev": true, "requires": { - "camelcase": "4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } diff --git a/package.json b/package.json index 01d41e8e4..cf769dc3e 100644 --- a/package.json +++ b/package.json @@ -45,20 +45,21 @@ "webpack-sources": "1.0.1" }, "dependencies": { - "@types/pako": "^1.0.0", - "localforage": "^1.7.1", - "pako": "^1.0.6" + "@types/pako": "^1.0.1", + "localforage": "^1.7.3", + "pako": "^1.0.10" }, "devDependencies": { - "babel-minify-webpack-plugin": "^0.2.0", - "dts-generator": "^2.1.0", - "handlebars": "^4.0.11", - "typedoc": "^0.8.0", + "babel-minify-webpack-plugin": "^0.3.1", + "dts-generator": "^3.0.0", + "handlebars": "^4.1.1", + "typedoc": "^0.14.2", "typedoc-default-themes": "^0.5.0", "typedoc-plugin-webdnn": "file:docs/template/typedoc/plugin", - "typescript": "^2.8.3", - "webpack": "^3.12.0", - "webpack-sources": "^1.0.1" + "typescript": "^3.4.1", + "webpack": "^4.29.6", + "webpack-cli": "^3.3.0", + "webpack-sources": "^1.3.0" }, "keywords": [ "deep-neural-networks", diff --git a/scripts/build.sh b/scripts/build.sh index ae7e26856..ebd09dbba 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -30,6 +30,6 @@ ${npm_bin_dir}/webpack --config ${script_dir}/../src/descriptor_runner/webpack.c # type declaration file ${npm_bin_dir}/dts-generator \ - --name webdnn \ + --prefix webdnn --name webdnn --main webdnn/webdnn \ --project ${script_dir}/../src/descriptor_runner \ - --out ${script_dir}/../dist/webdnn.d.ts --main 'webdnn/webdnn' + --out ${script_dir}/../dist/webdnn.d.ts diff --git a/src/descriptor_runner/buffer/buffer_webgpu.ts b/src/descriptor_runner/buffer/buffer_webmetal.ts similarity index 91% rename from src/descriptor_runner/buffer/buffer_webgpu.ts rename to src/descriptor_runner/buffer/buffer_webmetal.ts index 6e6908571..27142e601 100644 --- a/src/descriptor_runner/buffer/buffer_webgpu.ts +++ b/src/descriptor_runner/buffer/buffer_webmetal.ts @@ -3,23 +3,23 @@ */ /** Don't Remove This comment block */ -import WebGPUHandler from "../webgpu_handler"; +import WebMetalHandler from "../webmetal_handler"; import { Buffer } from "./buffer"; /** * @protected */ -export default class BufferWebGPU extends Buffer { - buffer: WebGPUBuffer; +export default class BufferWebMetal extends Buffer { + buffer: WebMetalBuffer; bufferView: Uint8Array; - private handler: WebGPUHandler; + private handler: WebMetalHandler; constructor(byteLength: number) { super(byteLength, 'webgpu'); if (byteLength == 0) { byteLength = 4;//0 length buffer causes error } - this.handler = WebGPUHandler.getInstance(); + this.handler = WebMetalHandler.getInstance(); this.buffer = this.handler.createBuffer(new Uint8Array(byteLength)); this.bufferView = new Uint8Array(this.buffer.contents); } diff --git a/src/descriptor_runner/descriptor_runner/descriptor_runner_webgpu.ts b/src/descriptor_runner/descriptor_runner/descriptor_runner_webmetal.ts similarity index 86% rename from src/descriptor_runner/descriptor_runner/descriptor_runner_webgpu.ts rename to src/descriptor_runner/descriptor_runner/descriptor_runner_webmetal.ts index 2d0f42d27..7351045ff 100644 --- a/src/descriptor_runner/descriptor_runner/descriptor_runner_webgpu.ts +++ b/src/descriptor_runner/descriptor_runner/descriptor_runner_webmetal.ts @@ -4,14 +4,14 @@ /** Don't Remove This comment block */ import * as localforage from "localforage"; -import BufferWebGPU from "../buffer/buffer_webgpu"; +import BufferWebMetal from "../buffer/buffer_webmetal"; import getWeightDecoder from "../decoder/get_weight_decoder"; import webdnnFetch, { readArrayBufferProgressively } from "../fetch"; -import { GraphDescriptorWebGPU, GraphDescriptorWebGPUExecInfos } from "../graph_descriptor/graph_descriptor_webgpu"; +import { GraphDescriptorWebMetal, GraphDescriptorWebMetalExecInfos } from "../graph_descriptor/graph_descriptor_webmetal"; import PlaceholderContext from "../placeholder"; import SymbolicFloat32Array from "../symbolic_typed_array/symbolic_float32array"; import { BackendName, getConfiguration } from "../webdnn"; -import WebGPUHandler, { IS_WEBGPU_SUPPORTED } from "../webgpu_handler"; +import WebMetalHandler, { IS_WEBMETAL_SUPPORTED } from "../webmetal_handler"; import {DescriptorRunner, DescriptorRunnerOptions} from "./descriptor_runner"; /** @@ -21,10 +21,10 @@ import {DescriptorRunner, DescriptorRunnerOptions} from "./descriptor_runner"; const IS_IOS = navigator.userAgent.includes('iPhone') || navigator.userAgent.includes('iPad'); /** - * DescriptorRunner for WebGPU + * DescriptorRunner for WebMetal * @protected */ -export default class DescriptorRunnerWebGPU extends DescriptorRunner { +export default class DescriptorRunnerWebMetal extends DescriptorRunner { constructor(options: DescriptorRunnerOptions = {}) { @@ -34,39 +34,39 @@ export default class DescriptorRunnerWebGPU extends DescriptorRunner} Promise object which is resolved when the initialization finished. */ async init() { - this.webgpuHandler = WebGPUHandler.getInstance(); + this.webmetalHandler = WebMetalHandler.getInstance(); await this.checkIncompatibleGPU(); } @@ -86,15 +86,15 @@ export default class DescriptorRunnerWebGPU extends DescriptorRunner using namespace metal; kernel void check_compatibility( @@ -106,8 +106,8 @@ using namespace metal; A[0] = thread_execution_width; } }`, 'basic'); - let buffer = this.webgpuHandler.createBuffer(new Uint32Array(1)); - await this.webgpuHandler.executeSinglePipelineState( + let buffer = this.webmetalHandler.createBuffer(new Uint32Array(1)); + await this.webmetalHandler.executeSinglePipelineState( 'basic.check_compatibility', {width: 1, height: 1, depth: 1}, {width: 1, height: 1, depth: 1}, @@ -116,7 +116,7 @@ using namespace metal; ); let threadExecutionWidth = (new Uint32Array(buffer.contents))[0]; if (threadExecutionWidth != 32) { - throw new Error(`Sorry, this GPU does not compatible with WebGPU (thread_execution_width == ${threadExecutionWidth}. See checkIncompatibleGPU method of https://github.com/mil-tokyo/webdnn/blob/master/src/descriptor_runner/descriptor_runner/descriptor_runner_webgpu.ts`); + throw new Error(`Sorry, this GPU does not compatible with WebMetal (thread_execution_width == ${threadExecutionWidth}. See checkIncompatibleGPU method of https://github.com/mil-tokyo/webdnn/blob/master/src/descriptor_runner/descriptor_runner/descriptor_runner_webmetal.ts`); } } @@ -134,7 +134,7 @@ using namespace metal; * * @protected */ - async fetchDescriptor(directory: string): Promise { + async fetchDescriptor(directory: string): Promise { let res = await webdnnFetch(`${directory}/graph_${this.backendName}.json`, this.transformUrlDelegate); return res.json(); } @@ -163,8 +163,8 @@ using namespace metal; * Load cached descriptor from WebStorage * @protected */ - async restoreCachedDescriptor(directory: string): Promise { - return localforage.getItem(`${directory}_${this.backendName}_descriptor`).catch(() => null); + async restoreCachedDescriptor(directory: string): Promise { + return localforage.getItem(`${directory}_${this.backendName}_descriptor`).catch(() => null); } /** @@ -180,14 +180,14 @@ using namespace metal; /** * save cache */ - async saveCache(directory: string, descriptor: GraphDescriptorWebGPU, parameters: ArrayBuffer): Promise { + async saveCache(directory: string, descriptor: GraphDescriptorWebMetal, parameters: ArrayBuffer): Promise { await Promise.all([ localforage.setItem(`${directory}_${this.backendName}_descriptor`, descriptor), localforage.setItem(`${directory}_${this.backendName}_parameters`, parameters) ]); }; - async setDescriptorAndParameters(descriptor: GraphDescriptorWebGPU, parameter: ArrayBuffer) { + async setDescriptorAndParameters(descriptor: GraphDescriptorWebMetal, parameter: ArrayBuffer) { this.descriptor = descriptor; //reset all datum depend on old descriptor @@ -198,7 +198,7 @@ using namespace metal; this.executionInfos = descriptor.exec_infos; //compile kernels - this.webgpuHandler.loadKernel(this.descriptor.kernel_source, 'descriptor'); + this.webmetalHandler.loadKernel(this.descriptor.kernel_source, 'descriptor'); await this.initializeStaticBuffer(parameter); await this.initializeMetaBuffers(); @@ -220,7 +220,7 @@ using namespace metal; if (!this.descriptor) throw Error("GraphDescriptor is not loaded."); let descriptor = this.descriptor; - let staticBuffer = new BufferWebGPU(descriptor.memory_layout.static.size * Float32Array.BYTES_PER_ELEMENT); + let staticBuffer = new BufferWebMetal(descriptor.memory_layout.static.size * Float32Array.BYTES_PER_ELEMENT); this.staticBuffer = staticBuffer; let decoder = getWeightDecoder(descriptor.weight_encoding); @@ -246,9 +246,9 @@ using namespace metal; private async initializeMetaBuffers() { if (!this.descriptor) throw Error("GraphDescriptor is not loaded."); - this.metaBuffers = await Promise.all( + this.metaBuffers = await Promise.all( this.descriptor.exec_infos.map(async executionInfo => { - let buffer = new BufferWebGPU(executionInfo.meta_buffer.length * Int32Array.BYTES_PER_ELEMENT); + let buffer = new BufferWebMetal(executionInfo.meta_buffer.length * Int32Array.BYTES_PER_ELEMENT); await buffer.write(new Uint8Array(executionInfo.meta_buffer)); return buffer; @@ -270,7 +270,7 @@ using namespace metal; let placeholderContext = this.placeholderContext; let dynamicBufferSize = placeholderContext.resolve(descriptor.memory_layout.dynamic.size); - let dynamicBuffer = new BufferWebGPU(dynamicBufferSize * Float32Array.BYTES_PER_ELEMENT); + let dynamicBuffer = new BufferWebMetal(dynamicBufferSize * Float32Array.BYTES_PER_ELEMENT); this.dynamicBuffer = dynamicBuffer; (await this.getInputViews()) @@ -288,7 +288,7 @@ using namespace metal; /** * Set actual value into placeholder. If all placeholder is resolved, - * [[DescriptorRunnerWebGPU#initializeDynamicBuffer|`initializeDynamicBuffer()`]] is automatically called. + * [[DescriptorRunnerWebMetal#initializeDynamicBuffer|`initializeDynamicBuffer()`]] is automatically called. * * @param values mapping object of placeholder name and value * @returns {Promise} @@ -407,7 +407,7 @@ using namespace metal; let exec_info = this.executionInfos[i]; let start = performance.now(); - await this.webgpuHandler.executeSinglePipelineState( + await this.webmetalHandler.executeSinglePipelineState( 'descriptor.' + exec_info.entry_func_name, exec_info.threadgroups_per_grid, exec_info.threads_per_thread_group, @@ -447,7 +447,7 @@ using namespace metal; for (let i = 0; i < this.executionInfos.length; i++) { let exec_info = this.executionInfos[i]; let is_last = i == this.executionInfos.length - 1; - complete_promise = this.webgpuHandler.executeSinglePipelineState( + complete_promise = this.webmetalHandler.executeSinglePipelineState( 'descriptor.' + exec_info.entry_func_name, exec_info.threadgroups_per_grid, exec_info.threads_per_thread_group, diff --git a/src/descriptor_runner/graph_descriptor/graph_descriptor_webgpu.ts b/src/descriptor_runner/graph_descriptor/graph_descriptor_webmetal.ts similarity index 59% rename from src/descriptor_runner/graph_descriptor/graph_descriptor_webgpu.ts rename to src/descriptor_runner/graph_descriptor/graph_descriptor_webmetal.ts index 36dccfc30..c057e1af0 100644 --- a/src/descriptor_runner/graph_descriptor/graph_descriptor_webgpu.ts +++ b/src/descriptor_runner/graph_descriptor/graph_descriptor_webmetal.ts @@ -9,18 +9,18 @@ import { GraphDescriptor } from "./graph_descriptor"; /** * @protected */ -export interface GraphDescriptorWebGPU extends GraphDescriptor { +export interface GraphDescriptorWebMetal extends GraphDescriptor { kernel_source: string; - exec_infos: GraphDescriptorWebGPUExecInfos[]; + exec_infos: GraphDescriptorWebMetalExecInfos[]; } /** * @protected */ -export interface GraphDescriptorWebGPUExecInfos { +export interface GraphDescriptorWebMetalExecInfos { entry_func_name: string; - threadgroups_per_grid: WebGPUSize; - threads_per_thread_group: WebGPUSize; + threadgroups_per_grid: WebMetalSize; + threads_per_thread_group: WebMetalSize; meta_buffer: number[]; unresolved_value_list: { offset: number, placeholder: Placeholder }[] } diff --git a/src/descriptor_runner/webdnn.ts b/src/descriptor_runner/webdnn.ts index 9cdaa905a..a6f9f2ad9 100644 --- a/src/descriptor_runner/webdnn.ts +++ b/src/descriptor_runner/webdnn.ts @@ -5,12 +5,12 @@ * Module `WebDNN` provides main features of WebDNN. */ /** Don't Remove This comment block */ -/// +/// import { DescriptorRunner as DescriptorRunnerGeneric, DescriptorRunnerConstructor } from "./descriptor_runner/descriptor_runner"; import DescriptorRunnerFallback from "./descriptor_runner/descriptor_runner_fallback"; import DescriptorRunnerWebassembly from "./descriptor_runner/descriptor_runner_webassembly"; import DescriptorRunnerWebGL from "./descriptor_runner/descriptor_runner_webgl"; -import DescriptorRunnerWebGPU from "./descriptor_runner/descriptor_runner_webgpu"; +import DescriptorRunnerWebMetal from "./descriptor_runner/descriptor_runner_webmetal"; import { GraphDescriptor } from "./graph_descriptor/graph_descriptor"; import * as Image from "./image"; import * as Math from "./math"; @@ -53,7 +53,7 @@ export type DescriptorRunner = DescriptorRunnerGeneric; * @private */ const descriptorRunners: { [k in BackendName]: DescriptorRunnerConstructor } = { - webgpu: DescriptorRunnerWebGPU, + webgpu: DescriptorRunnerWebMetal, webgl: DescriptorRunnerWebGL, webassembly: DescriptorRunnerWebassembly, fallback: DescriptorRunnerFallback diff --git a/src/descriptor_runner/webgl_handler.ts b/src/descriptor_runner/webgl_handler.ts index cc4e27f37..a48a058de 100644 --- a/src/descriptor_runner/webgl_handler.ts +++ b/src/descriptor_runner/webgl_handler.ts @@ -93,7 +93,7 @@ export default class WebGLHandler { return program; } - createArrayBuffer(vertexArray: number | Float32Array) { + createArrayBuffer(vertexArray: Float32Array) { let buffer = checkNull(this.gl.createBuffer()); this.gl.bindBuffer(this.gl.ARRAY_BUFFER, buffer); this.gl.bufferData(this.gl.ARRAY_BUFFER, vertexArray, this.gl.STATIC_DRAW); diff --git a/src/descriptor_runner/webgpu.d.ts b/src/descriptor_runner/webgpu.d.ts deleted file mode 100644 index 16b77fc6d..000000000 --- a/src/descriptor_runner/webgpu.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -interface WebGPURenderingContext { - createCommandQueue(): WebGPUCommandQueue; - - createBuffer(data: ArrayBufferView): WebGPUBuffer; - - createLibrary(sourceCode: string): WebGPULibrary; - - createComputePipelineState(function_: WebGPUFunction): WebGPUComputePipelineState; -} - -interface WebGPUFunction { -} - -interface WebGPULibrary { - functionNames: string[]; - - functionWithName(name: string): WebGPUFunction; -} - -interface WebGPUBuffer { - contents: any; -} - -interface WebGPUSize { - width: number; - height: number; - depth: number; -} - -interface WebGPUCommandQueue { - createCommandBuffer(): WebGPUCommandBuffer; -} - -interface WebGPUCommandBuffer { - createComputeCommandEncoder(): WebGPUComputeCommandEncoder; - - commit(): void; - - completed: Promise; -} - -interface WebGPUCommandEncoder { - endEncoding(): void; -} - -interface WebGPUComputeCommandEncoder extends WebGPUCommandEncoder { - setComputePipelineState(state: WebGPUComputePipelineState): void; - - setBuffer(buffer: WebGPUBuffer, offset: number, index: number): void; - - dispatch(threadgroupsPerGrid: WebGPUSize, threadsPerThreadgroup: WebGPUSize): void; -} - -interface WebGPUComputePipelineState { -} - -interface HTMLCanvasElement { - getContext(contextId: "webgpu"): WebGPURenderingContext | null; -} diff --git a/src/descriptor_runner/webmetal.ts b/src/descriptor_runner/webmetal.ts new file mode 100644 index 000000000..a65fc3341 --- /dev/null +++ b/src/descriptor_runner/webmetal.ts @@ -0,0 +1,59 @@ +interface WebMetalRenderingContext { + createCommandQueue(): WebMetalCommandQueue; + + createBuffer(data: ArrayBufferView): WebMetalBuffer; + + createLibrary(sourceCode: string): WebMetalLibrary; + + createComputePipelineState(function_: WebMetalFunction): WebMetalComputePipelineState; +} + +interface WebMetalFunction { +} + +interface WebMetalLibrary { + functionNames: string[]; + + functionWithName(name: string): WebMetalFunction; +} + +interface WebMetalBuffer { + contents: any; +} + +interface WebMetalSize { + width: number; + height: number; + depth: number; +} + +interface WebMetalCommandQueue { + createCommandBuffer(): WebMetalCommandBuffer; +} + +interface WebMetalCommandBuffer { + createComputeCommandEncoder(): WebMetalComputeCommandEncoder; + + commit(): void; + + completed: Promise; +} + +interface WebMetalCommandEncoder { + endEncoding(): void; +} + +interface WebMetalComputeCommandEncoder extends WebMetalCommandEncoder { + setComputePipelineState(state: WebMetalComputePipelineState): void; + + setBuffer(buffer: WebMetalBuffer, offset: number, index: number): void; + + dispatch(threadgroupsPerGrid: WebMetalSize, threadsPerThreadgroup: WebMetalSize): void; +} + +interface WebMetalComputePipelineState { +} + +interface HTMLCanvasElement { + getContext(contextId: "webmetal"): WebMetalRenderingContext | null; +} diff --git a/src/descriptor_runner/webgpu_handler.ts b/src/descriptor_runner/webmetal_handler.ts similarity index 55% rename from src/descriptor_runner/webgpu_handler.ts rename to src/descriptor_runner/webmetal_handler.ts index 129ce565a..22cd66653 100644 --- a/src/descriptor_runner/webgpu_handler.ts +++ b/src/descriptor_runner/webmetal_handler.ts @@ -1,47 +1,52 @@ -/// +/// /** * @module webdnn */ /** Don't Remove This comment block */ -import BufferWebGPU from "./buffer/buffer_webgpu"; +import BufferWebMetal from "./buffer/buffer_webmetal"; /** * @private */ -let instance: WebGPUHandler; +let instance: WebMetalHandler; /** * @protected */ -export default class WebGPUHandler { - private context: WebGPURenderingContext; - private commandQueue: WebGPUCommandQueue; - private pipelineStates: Map = new Map(); - private commandBuffer: WebGPUCommandBuffer | null; +export default class WebMetalHandler { + private context: WebMetalRenderingContext; + private commandQueue: WebMetalCommandQueue; + private pipelineStates: Map = new Map(); + private commandBuffer: WebMetalCommandBuffer | null; static getInstance() { - if (!instance) instance = new WebGPUHandler(); + if (!instance) instance = new WebMetalHandler(); return instance; } /** - * WebGPUHandler is singleton class and instantiate directly is forbidden (constructor is hidden). + * WebMetalHandler is singleton class and instantiate directly is forbidden (constructor is hidden). * * Since the number of GPU contexts may be limited, the handler is used as a singleton * and only one context is shared among multiple runners. */ private constructor() { - if (!IS_WEBGPU_SUPPORTED) throw new Error('This browser does not support WebGPU'); + if (!IS_WEBMETAL_SUPPORTED) throw new Error('This browser does not support WebMetal'); - let context: WebGPURenderingContext | null; + let context: WebMetalRenderingContext | null; try { - context = document.createElement('canvas').getContext('webgpu'); + if (IS_APPLE_WEBGPU_SUPPORTED) { + // for compatibility, get context by 'webgpu' + context = document.createElement('canvas').getContext('webgpu'); + } else { + context = document.createElement('canvas').getContext('webmetal'); + } } catch (err) { - throw new Error(`During initializing WebGPURenderingContext, unexpected error is occurred: ${err.message}`); + throw new Error(`During initializing WebMetalRenderingContext, unexpected error is occurred: ${err.message}`); } - if (!context) throw new Error('WebGPURenderingContext initialization failed'); + if (!context) throw new Error('WebMetalRenderingContext initialization failed'); this.context = context; this.commandQueue = context.createCommandQueue(); @@ -49,7 +54,7 @@ export default class WebGPUHandler { this.loadKernel('kernel void sync(){}', 'basic'); } - createBuffer(arrayBuffer: ArrayBufferView): WebGPUBuffer { + createBuffer(arrayBuffer: ArrayBufferView): WebMetalBuffer { return this.context.createBuffer(arrayBuffer); } @@ -64,11 +69,11 @@ export default class WebGPUHandler { } } - createCommandBuffer(): WebGPUCommandBuffer { + createCommandBuffer(): WebMetalCommandBuffer { return this.commandQueue.createCommandBuffer(); } - getPipelineStateByName(name: string): WebGPUComputePipelineState { + getPipelineStateByName(name: string): WebMetalComputePipelineState { let state = this.pipelineStates.get(name); if (!state) { throw TypeError(`Kernel function "${name}" is not loaded.`); @@ -77,9 +82,9 @@ export default class WebGPUHandler { } executeSinglePipelineState(name: string, - threadgroupsPerGrid: WebGPUSize, - threadsPerThreadgroup: WebGPUSize, - buffers: (WebGPUBuffer | BufferWebGPU)[], + threadgroupsPerGrid: WebMetalSize, + threadsPerThreadgroup: WebMetalSize, + buffers: (WebMetalBuffer | BufferWebMetal)[], getCompletedPromise?: boolean): Promise | null { let commandBuffer = this.commandBuffer || (this.commandBuffer = this.createCommandBuffer()); let commandEncoder = commandBuffer.createComputeCommandEncoder(); @@ -87,11 +92,11 @@ export default class WebGPUHandler { commandEncoder.setComputePipelineState(this.getPipelineStateByName(name)); for (let i = 0; i < buffers.length; i++) { let buffer = buffers[i]; - let wgbuf: WebGPUBuffer; - if (buffer instanceof BufferWebGPU) { + let wgbuf: WebMetalBuffer; + if (buffer instanceof BufferWebMetal) { wgbuf = buffer.buffer; } else { - // cannot perform (buffer instanceof WebGPUBuffer) currently + // cannot perform (buffer instanceof WebMetalBuffer) currently wgbuf = buffer; } @@ -132,7 +137,15 @@ export default class WebGPUHandler { } /** - * Flag whether WebGPU is supported or not + * Flag whether WebGPU on Safari is supported or not + * Its name was changed to WebMetal in 2019 (macOS 10.14.4 / iOS 12.2). + * This is used for backward compatibility. + * @protected + */ +export const IS_APPLE_WEBGPU_SUPPORTED = 'WebGPURenderingContext' in window && 'WebGPUComputeCommandEncoder' in window; + +/** + * Flag whether WebMetal is supported or not * @protected */ -export const IS_WEBGPU_SUPPORTED = 'WebGPURenderingContext' in window && 'WebGPUComputeCommandEncoder' in window; +export const IS_WEBMETAL_SUPPORTED = ('WebMetalRenderingContext' in window && 'WebMetalComputeCommandEncoder' in window) || IS_APPLE_WEBGPU_SUPPORTED; diff --git a/src/descriptor_runner/webpack.config.es5.js b/src/descriptor_runner/webpack.config.es5.js index 730182b8e..acc644591 100644 --- a/src/descriptor_runner/webpack.config.es5.js +++ b/src/descriptor_runner/webpack.config.es5.js @@ -2,6 +2,7 @@ const path = require('path'); const MinifyPlugin = require('babel-minify-webpack-plugin'); module.exports = { + mode: 'production', entry: path.join(__dirname, './webdnn.js'), output: { filename: 'webdnn.es5.js', @@ -9,7 +10,7 @@ module.exports = { library: 'WebDNN', libraryTarget: 'umd' }, - devtool: 'source-map', + // devtool: 'source-map', plugins: [ new MinifyPlugin() ] diff --git a/src/descriptor_runner/webpack.config.js b/src/descriptor_runner/webpack.config.js index fcd17a167..dea81052d 100644 --- a/src/descriptor_runner/webpack.config.js +++ b/src/descriptor_runner/webpack.config.js @@ -2,6 +2,7 @@ const path = require('path'); const MinifyPlugin = require('babel-minify-webpack-plugin'); module.exports = { + mode: 'production', entry: path.join(__dirname, './webdnn.js'), output: { filename: 'webdnn.js', @@ -9,7 +10,7 @@ module.exports = { library: 'WebDNN', libraryTarget: 'umd' }, - devtool: 'source-map', + // devtool: 'source-map', plugins: [ new MinifyPlugin() ]