Files
keras-js/dist/keras.js
T
2016-10-25 10:52:17 -04:00

44 lines
442 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KerasJS=e():t.KerasJS=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,e,r){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=595)}([function(t,e,r){var n=r(5),o=r(30),i=r(15),a=r(16),s=r(31),u="prototype",c=function(t,e,r){var l,f,p,h,d=t&c.F,v=t&c.G,y=t&c.S,g=t&c.P,_=t&c.B,b=v?n:y?n[e]||(n[e]={}):(n[e]||{})[u],m=v?o:o[e]||(o[e]={}),w=m[u]||(m[u]={});v&&(r=e);for(l in r)f=!d&&b&&void 0!==b[l],p=(f?b:r)[l],h=_&&f?s(p,n):g&&"function"==typeof p?s(Function.call,p):p,b&&a(b,l,p,t&c.U),m[l]!=p&&i(m,l,h),g&&w[l]!=p&&(w[l]=p)};n.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(64),s=n(a),u=r(124),c=n(u),l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.layerClass="Layer",this.name=e.name,this.params=[],this.weights={},e.gpu&&weblas?this._useWeblas=!0:this._useWeblas=!1}return i(t,[{key:"setWeights",value:function(t){var e=this;this.params.forEach(function(r,n){e.weights[r]=t[n]})}},{key:"toggleGpu",value:function(t){var e="undefined"==typeof t?!this._useWeblas:t;e&&weblas?this._useWeblas=!0:this._useWeblas=!1}},{key:"call",value:function(t){return t}},{key:"createWeblasWeights",value:function(){var t=this;this.weblasWeights={},this.params.forEach(function(e,r){if(1===t.weights[e].tensor.shape.length){var n=[1,t.weights[e].tensor.shape[0]];t.weblasWeights[e]=new weblas.pipeline.Tensor(n,t.weights[e].tensor.data)}if(2===t.weights[e].tensor.shape.length){var o=t.weights[e].tensor.shape;t.weblasWeights[e]=new weblas.pipeline.Tensor(o,t.weights[e].tensor.data)}})}},{key:"transferWeblasWeights",value:function(){var t=this;this.params.forEach(function(e,r){if(t.weblasWeights[e]){var n=t.weblasWeights[e].shape,o=t.weblasWeights[e].transfer(!0);t.weights[e].tensor=(0,c.default)((0,s.default)(o,n))}})}},{key:"deleteWeblasWeights",value:function(){var t=this;this.params.forEach(function(e,r){t.weblasWeights[e]&&(t.weblasWeights[e].delete(),delete t.weblasWeights[e])}),delete this.weblasWeights}}]),t}();e.default=l},function(t,e,r){var n=r(7);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(64),s=n(a),u=r(124),c=n(u),l=r(192),f=function(t,e){if(t.length&&e.length&&t.length!==e.reduce(function(t,e){return t*e},1))throw new Error("Specified shape incompatible with data.")},p=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(this,t),this._type=n.type||Float32Array,e&&e.length&&(e instanceof this._type||e instanceof Array)?(f(e,r),this.tensor=(0,s.default)(e,r),this.tensor=(0,s.default)(new this._type(e),r)):!e.length&&r.length?this.tensor=(0,s.default)(new this._type(r.reduce(function(t,e){return t*e},1)),r):this.tensor=(0,s.default)(new this._type([]),[]),this._gpuMaxSizeExceeded=!1}return i(t,[{key:"createWeblasTensor",value:function(){if(this.weblasTensor&&this.weblasTensor.delete(),1===this.tensor.shape.length){var t=this.tensor.shape[0];if(t>l.MAX_TEXTURE_SIZE)this._gpuMaxSizeExceeded=!0;else{var e=[1,t];this.weblasTensor=new weblas.pipeline.Tensor(e,this.tensor.data)}}else{if(2!==this.tensor.shape.length)throw new Error("[Tensor] can only create weblas Tensor for 1-D or 2-D only");if(this.tensor.shape.some(function(t){return t>l.MAX_TEXTURE_SIZE}))this._gpuMaxSizeExceeded=!0;else{var r=this.tensor.shape;this.weblasTensor=new weblas.pipeline.Tensor(r,this.tensor.data)}}}},{key:"transferWeblasTensor",value:function(){if(this.weblasTensor){var t=this.weblasTensor.shape,e=this.weblasTensor.transfer(!0);this.tensor=(0,c.default)((0,s.default)(e,t))}}},{key:"deleteWeblasTensor",value:function(){this.weblasTensor&&(this.weblasTensor.delete(),delete this.weblasTensor)}},{key:"replaceTensorData",value:function(t){if(t&&t.length&&t instanceof this._type)this.tensor.data=t;else{if(!(t&&t.length&&t instanceof Array))throw new Error("[Tensor] invalid input for replaceTensorData method.");this.tensor.data=new this._type(t)}}}]),t}();e.default=p},function(t,e,r){"use strict";function n(t){if(!t)return s;for(var e=0;e<t.args.length;++e){var r=t.args[e];0===e?t.args[e]={name:r,lvalue:!0,rvalue:!!t.rvalue,count:t.count||1}:t.args[e]={name:r,lvalue:!1,rvalue:!0,count:1}}return t.thisVars||(t.thisVars=[]),t.localVars||(t.localVars=[]),t}function o(t){return a({args:t.args,pre:n(t.pre),body:n(t.body),post:n(t.proc),funcName:t.funcName})}function i(t){for(var e=[],r=0;r<t.args.length;++r)e.push("a"+r);var n=new Function("P",["return function ",t.funcName,"_ndarrayops(",e.join(","),") {P(",e.join(","),");return a0}"].join(""));return n(o(t))}var a=r(162),s={body:"",args:[],thisVars:[],localVars:[]},u={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};!function(){for(var t in u){var r=u[t];e[t]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+r+"c"},funcName:t}),e[t+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a"+r+"=b"},rvalue:!0,funcName:t+"eq"}),e[t+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+r+"s"},funcName:t+"s"}),e[t+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a"+r+"=s"},rvalue:!0,funcName:t+"seq"})}}();var c={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in c){var r=c[t];e[t]=i({args:["array","array"],body:{args:["a","b"],body:"a="+r+"b"},funcName:t}),e[t+"eq"]=i({args:["array"],body:{args:["a"],body:"a="+r+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in l){var r=l[t];e[t]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+r+"c"},funcName:t}),e[t+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+r+"s"},funcName:t+"s"}),e[t+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a=a"+r+"b"},rvalue:!0,count:2,funcName:t+"eq"}),e[t+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+r+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var f=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;t<f.length;++t){var r=f[t];e[r]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:r}),e[r+"eq"]=i({args:["array"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:r+"eq"})}}();var p=["max","min","atan2","pow"];!function(){for(var t=0;t<p.length;++t){var r=p[t];e[r]=i({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:r}),e[r+"s"]=i({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:r+"s"}),e[r+"eq"]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:r+"eq"}),e[r+"seq"]=i({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:r+"seq"})}}();var h=["atan2","pow"];!function(){for(var t=0;t<h.length;++t){var r=h[t];e[r+"op"]=i({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:r+"op"}),e[r+"ops"]=i({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:r+"ops"}),e[r+"opeq"]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:r+"opeq"}),e[r+"opseq"]=i({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+r,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:r+"opseq"})}}(),e.any=a({args:["array"],pre:s,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),e.all=a({args:["array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),e.sum=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),e.prod=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),e.norm2squared=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),e.norm2=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),e.norminf=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),e.norm1=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),e.sup=a({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),e.inf=a({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),e.argmin=a({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),e.argmax=a({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),e.random=i({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),e.assign=i({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),e.assigns=i({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),e.equals=a({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(75)("wks"),o=r(46),i=r(5).Symbol,a="function"==typeof i,s=t.exports=function(t){return n[t]||(n[t]=a&&i[t]||(a?i:o)("Symbol."+t))};s.store=n},function(t,e,r){t.exports=!r(6)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(2),o=r(142),i=r(28),a=Object.defineProperty;e.f=r(9)?Object.defineProperty:function(t,e,r){if(n(t),e=i(e,!0),n(r),o)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(37),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(23);t.exports=function(t){return Object(n(t))}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(10),o=r(36);t.exports=r(9)?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(5),o=r(15),i=r(13),a=r(46)("src"),s="toString",u=Function[s],c=(""+u).split(s);r(30).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,r,s){var u="function"==typeof r;u&&(i(r,"name")||o(r,"name",e)),t[e]!==r&&(u&&(i(r,a)||o(r,a,t[e]?""+t[e]:c.join(String(e)))),t===n?t[e]=r:s?t[e]?t[e]=r:o(t,e,r):(delete t[e],o(t,e,r)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.call(this)})},function(t,e,r){var n=r(0),o=r(6),i=r(23),a=/"/g,s=function(t,e,r,n){var o=String(i(t)),s="<"+e;return""!==r&&(s+=" "+r+'="'+String(n).replace(a,"&quot;")+'"'),s+">"+o+"</"+e+">"};t.exports=function(t,e){var r={};r[t]=e(s),n(n.P+n.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",r)}},function(t,e,r){var n=r(58),o=r(23);t.exports=function(t){return n(o(t))}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(1===t.tensor.shape.length){var e=h.default.sup(t.tensor);h.default.subseq(t.tensor,e),h.default.expeq(t.tensor);var r=h.default.sum(t.tensor);h.default.divseq(t.tensor,r)}else{if(2!==t.tensor.shape.length)throw new Error("[activations.softmax] tensor shape "+t.tensor.shape+" not supported.");for(var n=0;n<t.tensor.shape[0];n++){var o=h.default.sup(t.tensor.pick(n,null));h.default.subseq(t.tensor.pick(n,null),o),h.default.expeq(t.tensor.pick(n,null));var i=h.default.sum(t.tensor.pick(n,null));h.default.divseq(t.tensor.pick(n,null),i)}}return this}function i(t){return _(t.tensor),this}function a(t){return b(t.tensor),this}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.alpha,n=void 0===r?0:r,o=e.maxValue,i=void 0===o?null:o,a=void 0;return 0!==n&&(a=new g.default([],t.tensor.shape),h.default.mins(a.tensor,t.tensor,0),h.default.mulseq(a.tensor,n)),h.default.maxseq(t.tensor,0),i&&h.default.minseq(t.tensor,i),a&&h.default.addeq(t.tensor,a.tensor),this}function u(t){return m(t.tensor),this}function c(t){return w(t.tensor),this}function l(t){return x(t.tensor),this}function f(t){return this}Object.defineProperty(e,"__esModule",{value:!0}),e.softmax=o,e.softplus=i,e.softsign=a,e.relu=s,e.tanh=u,e.sigmoid=c,e.hardSigmoid=l,e.linear=f;var p=r(4),h=n(p),d=r(25),v=n(d),y=r(3),g=n(y),_=(0,v.default)({args:["array"],body:function(t){t=Math.log(Math.exp(t)+1)}}),b=(0,v.default)({args:["array"],body:function(t){t/=1+Math.abs(t)}}),m=(0,v.default)({args:["array"],body:function(t){t=Math.tanh(t)}}),w=(0,v.default)({args:["array"],body:function(t){t=1/(1+Math.exp(-t))}}),x=(0,v.default)({args:["array"],body:function(t){t=.2*t+.5,t<=0?t=0:t>=1&&(t=1)}})},function(t,e,r){var n=r(59),o=r(36),i=r(18),a=r(28),s=r(13),u=r(142),c=Object.getOwnPropertyDescriptor;e.f=r(9)?c:function(t,e){if(t=i(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return o(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(13),o=r(12),i=r(103)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),n(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(6);t.exports=function(t,e){return!!t&&n(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,r){"use strict";function n(t){for(var e in t)a.indexOf(e)<0&&s.indexOf(e)<0&&console.warn("cwise: Unknown argument '"+e+"' passed to expression compiler");for(var r=0;r<a.length;++r)if(!t[a[r]])throw new Error("cwise: Missing argument: "+a[r]);return i({args:t.args,pre:o(t.pre||function(){}),body:o(t.body),post:o(t.post||function(){}),debug:!!t.printCode,funcName:t.funcName||t.body.name||"cwise",blockSize:t.blockSize||64})}var o=r(434),i=r(162),a=["args","body"],s=["pre","post","printCode","funcName","blockSize"];t.exports=n},function(t,e,r){var n=r(31),o=r(58),i=r(12),a=r(11),s=r(253);t.exports=function(t,e){var r=1==t,u=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f,h=e||s;return function(e,s,d){for(var v,y,g=i(e),_=o(g),b=n(s,d,3),m=a(_.length),w=0,x=r?h(e,m):u?h(e,0):void 0;m>w;w++)if((p||w in _)&&(v=_[w],y=b(v,w,g),t))if(r)x[w]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:x.push(v)}else if(l)return!1;return f?-1:c||l?l:x}}},function(t,e,r){var n=r(0),o=r(30),i=r(6);t.exports=function(t,e){var r=(o.Object||{})[t]||Object[t],a={};a[t]=e(r),n(n.S+n.F*i(function(){r(1)}),"Object",a)}},function(t,e,r){var n=r(7);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(172),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},function(t,e){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(14);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(158),o=r(0),i=r(75)("metadata"),a=i.store||(i.store=new(r(161))),s=function(t,e,r){var o=a.get(t);if(!o){if(!r)return;a.set(t,o=new n)}var i=o.get(e);if(!i){if(!r)return;o.set(e,i=new n)}return i},u=function(t,e,r){var n=s(e,r,!1);return void 0!==n&&n.has(t)},c=function(t,e,r){var n=s(e,r,!1);return void 0===n?void 0:n.get(t)},l=function(t,e,r,n){s(r,n,!0).set(t,e)},f=function(t,e){var r=s(t,e,!1),n=[];return r&&r.forEach(function(t,e){n.push(e)}),n},p=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},h=function(t){o(o.S,"Reflect",t)};t.exports={store:a,map:s,has:u,get:c,set:l,keys:f,key:p,exp:h}},function(t,e,r){"use strict";if(r(9)){var n=r(39),o=r(5),i=r(6),a=r(0),s=r(76),u=r(110),c=r(31),l=r(38),f=r(36),p=r(15),h=r(43),d=r(37),v=r(11),y=r(45),g=r(28),_=r(13),b=r(155),m=r(57),w=r(7),x=r(12),O=r(95),j=r(40),E=r(21),S=r(41).f,k=r(112),P=r(46),A=r(8),M=r(26),C=r(66),T=r(104),R=r(113),F=r(52),I=r(72),D=r(44),L=r(88),N=r(135),U=r(10),B=r(20),V=U.f,W=B.f,z=o.RangeError,q=o.TypeError,G=o.Uint8Array,H="ArrayBuffer",Y="Shared"+H,$="BYTES_PER_ELEMENT",K="prototype",X=Array[K],Z=u.ArrayBuffer,Q=u.DataView,J=M(0),tt=M(2),et=M(3),rt=M(4),nt=M(5),ot=M(6),it=C(!0),at=C(!1),st=R.values,ut=R.keys,ct=R.entries,lt=X.lastIndexOf,ft=X.reduce,pt=X.reduceRight,ht=X.join,dt=X.sort,vt=X.slice,yt=X.toString,gt=X.toLocaleString,_t=A("iterator"),bt=A("toStringTag"),mt=P("typed_constructor"),wt=P("def_constructor"),xt=s.CONSTR,Ot=s.TYPED,jt=s.VIEW,Et="Wrong length!",St=M(1,function(t,e){return Tt(T(t,t[wt]),e)}),kt=i(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),Pt=!!G&&!!G[K].set&&i(function(){new G(1).set({})}),At=function(t,e){if(void 0===t)throw q(Et);var r=+t,n=v(t);if(e&&!b(r,n))throw z(Et);return n},Mt=function(t,e){var r=d(t);if(r<0||r%e)throw z("Wrong offset!");return r},Ct=function(t){if(w(t)&&Ot in t)return t;throw q(t+" is not a typed array!")},Tt=function(t,e){if(!(w(t)&&mt in t))throw q("It is not a typed array constructor!");return new t(e)},Rt=function(t,e){return Ft(T(t,t[wt]),e)},Ft=function(t,e){for(var r=0,n=e.length,o=Tt(t,n);n>r;)o[r]=e[r++];return o},It=function(t,e,r){V(t,e,{get:function(){return this._d[r]}})},Dt=function(t){var e,r,n,o,i,a,s=x(t),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,p=k(s);if(void 0!=p&&!O(p)){for(a=p.call(s),n=[],e=0;!(i=a.next()).done;e++)n.push(i.value);s=n}for(f&&u>2&&(l=c(l,arguments[2],2)),e=0,r=v(s.length),o=Tt(this,r);r>e;e++)o[e]=f?l(s[e],e):s[e];return o},Lt=function(){for(var t=0,e=arguments.length,r=Tt(this,e);e>t;)r[t]=arguments[t++];return r},Nt=!!G&&i(function(){gt.call(new G(1))}),Ut=function(){return gt.apply(Nt?vt.call(Ct(this)):Ct(this),arguments)},Bt={copyWithin:function(t,e){return N.call(Ct(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return rt(Ct(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(Ct(this),arguments)},filter:function(t){return Rt(this,tt(Ct(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return nt(Ct(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Ct(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){J(Ct(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Ct(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Ct(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Ct(this),arguments)},lastIndexOf:function(t){return lt.apply(Ct(this),arguments)},map:function(t){return St(Ct(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ft.apply(Ct(this),arguments)},reduceRight:function(t){return pt.apply(Ct(this),arguments)},reverse:function(){for(var t,e=this,r=Ct(e).length,n=Math.floor(r/2),o=0;o<n;)t=e[o],e[o++]=e[--r],e[r]=t;return e},some:function(t){return et(Ct(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return dt.call(Ct(this),t)},subarray:function(t,e){var r=Ct(this),n=r.length,o=y(t,n);return new(T(r,r[wt]))(r.buffer,r.byteOffset+o*r.BYTES_PER_ELEMENT,v((void 0===e?n:y(e,n))-o))}},Vt=function(t,e){return Rt(this,vt.call(Ct(this),t,e))},Wt=function(t){Ct(this);var e=Mt(arguments[1],1),r=this.length,n=x(t),o=v(n.length),i=0;if(o+e>r)throw z(Et);for(;i<o;)this[e+i]=n[i++]},zt={entries:function(){return ct.call(Ct(this))},keys:function(){return ut.call(Ct(this))},values:function(){return st.call(Ct(this))}},qt=function(t,e){return w(t)&&t[Ot]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Gt=function(t,e){return qt(t,e=g(e,!0))?f(2,t[e]):W(t,e)},Ht=function(t,e,r){return!(qt(t,e=g(e,!0))&&w(r)&&_(r,"value"))||_(r,"get")||_(r,"set")||r.configurable||_(r,"writable")&&!r.writable||_(r,"enumerable")&&!r.enumerable?V(t,e,r):(t[e]=r.value,t)};xt||(B.f=Gt,U.f=Ht),a(a.S+a.F*!xt,"Object",{getOwnPropertyDescriptor:Gt,defineProperty:Ht}),i(function(){yt.call({})})&&(yt=gt=function(){return ht.call(this)});var Yt=h({},Bt);h(Yt,zt),p(Yt,_t,zt.values),h(Yt,{slice:Vt,set:Wt,constructor:function(){},toString:yt,toLocaleString:Ut}),It(Yt,"buffer","b"),It(Yt,"byteOffset","o"),It(Yt,"byteLength","l"),It(Yt,"length","e"),V(Yt,bt,{get:function(){return this[Ot]}}),t.exports=function(t,e,r,u){u=!!u;var c=t+(u?"Clamped":"")+"Array",f="Uint8Array"!=c,h="get"+t,d="set"+t,y=o[c],g=y||{},_=y&&E(y),b=!y||!s.ABV,x={},O=y&&y[K],k=function(t,r){var n=t._d;return n.v[h](r*e+n.o,kt)},P=function(t,r,n){var o=t._d;u&&(n=(n=Math.round(n))<0?0:n>255?255:255&n),o.v[d](r*e+o.o,n,kt)},A=function(t,e){V(t,e,{get:function(){return k(this,e)},set:function(t){return P(this,e,t)},enumerable:!0})};b?(y=r(function(t,r,n,o){l(t,y,c,"_d");var i,a,s,u,f=0,h=0;if(w(r)){if(!(r instanceof Z||(u=m(r))==H||u==Y))return Ot in r?Ft(y,r):Dt.call(y,r);i=r,h=Mt(n,e);var d=r.byteLength;if(void 0===o){if(d%e)throw z(Et);if(a=d-h,a<0)throw z(Et)}else if(a=v(o)*e,a+h>d)throw z(Et);s=a/e}else s=At(r,!0),a=s*e,i=new Z(a);for(p(t,"_d",{b:i,o:h,l:a,e:s,v:new Q(i)});f<s;)A(t,f++)}),O=y[K]=j(Yt),p(O,"constructor",y)):I(function(t){new y(null),new y(t)},!0)||(y=r(function(t,r,n,o){l(t,y,c);var i;return w(r)?r instanceof Z||(i=m(r))==H||i==Y?void 0!==o?new g(r,Mt(n,e),o):void 0!==n?new g(r,Mt(n,e)):new g(r):Ot in r?Ft(y,r):Dt.call(y,r):new g(At(r,f))}),J(_!==Function.prototype?S(g).concat(S(_)):S(g),function(t){t in y||p(y,t,g[t])}),y[K]=O,n||(O.constructor=y));var M=O[_t],C=!!M&&("values"==M.name||void 0==M.name),T=zt.values;p(y,mt,!0),p(O,Ot,c),p(O,jt,!0),p(O,wt,y),(u?new y(1)[bt]==c:bt in O)||V(O,bt,{get:function(){return c}}),x[c]=y,a(a.G+a.W+a.F*(y!=g),x),a(a.S,c,{BYTES_PER_ELEMENT:e,from:Dt,of:Lt}),$ in O||p(O,$,e),a(a.P,c,Bt),D(c),a(a.P+a.F*Pt,c,{set:Wt}),a(a.P+a.F*!C,c,zt),a(a.P+a.F*(O.toString!=yt),c,{toString:yt}),a(a.P+a.F*i(function(){new y(1).slice()}),c,{slice:Vt}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new y([1,2]).toLocaleString()})||!i(function(){O.toLocaleString.call([1,2])})),c,{toLocaleString:Ut}),F[c]=C?M:T,n||C||p(O,_t,T)}}else t.exports=function(){}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){var n=r(46)("meta"),o=r(7),i=r(13),a=r(10).f,s=0,u=Object.isExtensible||function(){return!0},c=!r(6)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,n,{value:{i:"O"+ ++s,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,n)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[n].i},p=function(t,e){if(!i(t,n)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[n].w},h=function(t){return c&&d.NEED&&u(t)&&!i(t,n)&&l(t),t},d=t.exports={KEY:n,NEED:!1,fastKey:f,getWeak:p,onFreeze:h}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e){t.exports=!1},function(t,e,r){var n=r(2),o=r(148),i=r(91),a=r(103)("IE_PROTO"),s=function(){},u="prototype",c=function(){var t,e=r(90)("iframe"),n=i.length,o="<",a=">";for(e.style.display="none",r(93).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),c=t.F;n--;)delete c[u][i[n]];return c()};t.exports=Object.create||function(t,e){var r;return null!==t?(s[u]=n(t),r=new s,s[u]=null,r[a]=t):r=c(),void 0===e?r:o(r,e)}},function(t,e,r){var n=r(150),o=r(91).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(150),o=r(91);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(16);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},function(t,e,r){"use strict";var n=r(5),o=r(10),i=r(9),a=r(8)("species");t.exports=function(t){var e=n[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(37),o=Math.max,i=Math.min;t.exports=function(t,e){return t=n(t),t<0?o(t+e,0):i(t,e)}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){function n(t,e){var r=i(t,e);return o(r)?r:void 0}var o=r(464),i=r(498);t.exports=n},function(t,e,r){function n(t){return a(t)?o(t):i(t)}var o=r(449),i=r(466),a=r(84);t.exports=n},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(8)("unscopables"),o=Array.prototype;void 0==o[n]&&r(15)(o,n,{}),t.exports=function(t){o[n][t]=!0}},function(t,e,r){var n=r(31),o=r(144),i=r(95),a=r(2),s=r(11),u=r(112),c={},l={},e=t.exports=function(t,e,r,f,p){var h,d,v,y,g=p?function(){return t}:u(t),_=n(r,f,e?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(h=s(t.length);h>b;b++)if(y=e?_(a(d=t[b])[0],d[1]):_(t[b]),y===c||y===l)return y}else for(v=g.call(t);!(d=v.next()).done;)if(y=o(v,_,d.value,e),y===c||y===l)return y};e.BREAK=c,e.RETURN=l},function(t,e){t.exports={}},function(t,e,r){var n=r(10).f,o=r(13),i=r(8)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){var n=r(0),o=r(23),i=r(6),a=r(108),s="["+a+"]",u="​…",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),f=function(t,e,r){var o={},s=i(function(){return!!a[t]()||u[t]()!=u}),c=o[t]=s?e(p):a[t];r&&(o[r]=c),n(n.P+n.F*s,"String",o)},p=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),
2&e&&(t=t.replace(l,"")),t};t.exports=f},function(t,e){function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){"use strict";t.exports.gemv=r(575),t.exports.gbmv=r(574),t.exports.symv=r(581),t.exports.sbmv=r(577),t.exports.spmv=r(578),t.exports.trmv=r(587),t.exports.tbmv=r(584),t.exports.trsv=r(588),t.exports.tbsv=r(585),t.exports.tpsv=r(586),t.exports.ger=r(576),t.exports.syr=r(582),t.exports.spr=r(579),t.exports.syr2=r(583),t.exports.spr2=r(580),t.exports.trmv_lower=function(e,r){return console.warn("trmv_lower is deprecated. Please use the 'isLower' flag with trmv."),t.exports.trmv(e,r,!0)},t.exports.trsv_lower=function(e,r){return console.warn("trsv_lower is deprecated. Please use the 'isLower' flag with trsv."),t.exports.trsv(e,r,!0)}},function(t,e,r){var n=r(22),o=r(8)("toStringTag"),i="Arguments"==n(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=a(e=Object(t),o))?r:i?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,r){var n=r(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){function n(t){if("string"==typeof t||o(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}var o=r(85),i=1/0;t.exports=n},function(t,e){function r(t){return null!=t&&"object"==typeof t}t.exports=r},function(t,e,r){function n(t){return null==t?"":o(t)}var o=r(480);t.exports=n},function(t,e,r){"use strict";function n(t){return Array.isArray(t)?[t.length,t[0].length]:t.shape}function o(t,e,r){var o=n(t),i=n(e),a=n(r);if(o[0]!==i[0]||o[1]!==a[1]||i[1]!==a[0])throw new Error("Mismatched array shapes for matrix product")}function i(t){if(Array.isArray(t)){if(Array.isArray(t))return["r","native"]}else if(t.shape&&2===t.shape.length)return t.order[0]?["r",t.dtype]:["c",t.dtype];throw new Error("Unrecognized data type")}function a(t,e,r,n,a){void 0===n&&(n=1),void 0===a&&(a=0);var c=1!==n,l=0!==a,f=i(t),p=i(e),h=i(r);o(t,e,r);var d=[f,p,h,c,l].join(":"),v=u[d];return v||(v=u[d]=s(f,p,h,c,l)),v(t,e,r,n,a)}t.exports=a;var s=r(590),u={}},function(t,e,r){function n(t,e){return t[0]-e[0]}function o(){var t,e=this.stride,r=new Array(e.length);for(t=0;t<r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(n);var o=new Array(r.length);for(t=0;t<o.length;++t)o[t]=r[t][1];return o}function i(t,e){var r=["View",e,"d",t].join("");e<0&&(r="View_Nil"+t);var n="generic"===t;if(e===-1){var i="function "+r+"(a){this.data=a;};var proto="+r+".prototype;proto.dtype='"+t+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+r+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+r+"(a){return new "+r+"(a);}",a=new Function(i);return a()}if(0===e){var i="function "+r+"(a,d) {this.data = a;this.offset = d};var proto="+r+".prototype;proto.dtype='"+t+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+r+"_copy() {return new "+r+"(this.data,this.offset)};proto.pick=function "+r+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+r+"_get(){return "+(n?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+r+"_set(v){return "+(n?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+r+"(a,b,c,d){return new "+r+"(a,d)}",a=new Function("TrivialArray",i);return a(f[t][0])}var i=["'use strict'"],s=u(e),c=s.map(function(t){return"i"+t}),l="this.offset+"+s.map(function(t){return"this.stride["+t+"]*i"+t}).join("+"),p=s.map(function(t){return"b"+t}).join(","),h=s.map(function(t){return"c"+t}).join(",");i.push("function "+r+"(a,"+p+","+h+",d){this.data=a","this.shape=["+p+"]","this.stride=["+h+"]","this.offset=d|0}","var proto="+r+".prototype","proto.dtype='"+t+"'","proto.dimension="+e),i.push("Object.defineProperty(proto,'size',{get:function "+r+"_size(){return "+s.map(function(t){return"this.shape["+t+"]"}).join("*"),"}})"),1===e?i.push("proto.order=[0]"):(i.push("Object.defineProperty(proto,'order',{get:"),e<4?(i.push("function "+r+"_order(){"),2===e?i.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+r+"_set("+c.join(",")+",v){"),n?i.push("return this.data.set("+l+",v)}"):i.push("return this.data["+l+"]=v}"),i.push("proto.get=function "+r+"_get("+c.join(",")+"){"),n?i.push("return this.data.get("+l+")}"):i.push("return this.data["+l+"]}"),i.push("proto.index=function "+r+"_index(",c.join(),"){return "+l+"}"),i.push("proto.hi=function "+r+"_hi("+c.join(",")+"){return new "+r+"(this.data,"+s.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+s.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var d=s.map(function(t){return"a"+t+"=this.shape["+t+"]"}),v=s.map(function(t){return"c"+t+"=this.stride["+t+"]"});i.push("proto.lo=function "+r+"_lo("+c.join(",")+"){var b=this.offset,d=0,"+d.join(",")+","+v.join(","));for(var y=0;y<e;++y)i.push("if(typeof i"+y+"==='number'&&i"+y+">=0){d=i"+y+"|0;b+=c"+y+"*d;a"+y+"-=d}");i.push("return new "+r+"(this.data,"+s.map(function(t){return"a"+t}).join(",")+","+s.map(function(t){return"c"+t}).join(",")+",b)}"),i.push("proto.step=function "+r+"_step("+c.join(",")+"){var "+s.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+s.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var y=0;y<e;++y)i.push("if(typeof i"+y+"==='number'){d=i"+y+"|0;if(d<0){c+=b"+y+"*(a"+y+"-1);a"+y+"=ceil(-a"+y+"/d)}else{a"+y+"=ceil(a"+y+"/d)}b"+y+"*=d}");i.push("return new "+r+"(this.data,"+s.map(function(t){return"a"+t}).join(",")+","+s.map(function(t){return"b"+t}).join(",")+",c)}");for(var g=new Array(e),_=new Array(e),y=0;y<e;++y)g[y]="a[i"+y+"]",_[y]="b[i"+y+"]";i.push("proto.transpose=function "+r+"_transpose("+c+"){"+c.map(function(t,e){return t+"=("+t+"===undefined?"+e+":"+t+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+r+"(this.data,"+g.join(",")+","+_.join(",")+",this.offset)}"),i.push("proto.pick=function "+r+"_pick("+c+"){var a=[],b=[],c=this.offset");for(var y=0;y<e;++y)i.push("if(typeof i"+y+"==='number'&&i"+y+">=0){c=(c+this.stride["+y+"]*i"+y+")|0}else{a.push(this.shape["+y+"]);b.push(this.stride["+y+"])}");i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+s.map(function(t){return"shape["+t+"]"}).join(",")+","+s.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var a=new Function("CTOR_LIST","ORDER",i.join("\n"));return a(f[t],o)}function a(t){if(c(t))return"buffer";if(l)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}function s(t,e,r,n){if(void 0===t){var o=f.array[0];return o([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var s=e.length;if(void 0===r){r=new Array(s);for(var u=s-1,c=1;u>=0;--u)r[u]=c,c*=e[u]}if(void 0===n){n=0;for(var u=0;u<s;++u)r[u]<0&&(n-=(e[u]-1)*r[u])}for(var l=a(t),p=f[l];p.length<=s+1;)p.push(i(l,p.length-1));var o=p[s+1];return o(t,e,r,n)}var u=r(437),c=r(438),l="undefined"!=typeof Float64Array,f={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=s},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),l=function t(e,r,n){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,r);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,r,n)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(n)},f=r(19),p=o(f),h=r(3),d=n(h),v=r(1),y=n(v),g=r(4),_=n(g),b=r(63),m=n(b),w=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Convolution2D";var n=t.nbFilter,o=void 0===n?1:n,s=t.nbRow,u=void 0===s?3:s,c=t.nbCol,l=void 0===c?3:c,f=t.activation,h=void 0===f?"linear":f,d=t.borderMode,v=void 0===d?"valid":d,y=t.subsample,g=void 0===y?[1,1]:y,_=t.dimOrdering,b=void 0===_?"tf":_,m=t.bias,w=void 0===m||m;if(r.kernelShape=[o,u,l],r.activation=p[h],"valid"!==v&&"same"!==v)throw new Error(r.name+" [Convolution2D layer] Invalid borderMode.");if(r.borderMode=v,r.subsample=g,"tf"!==b&&"th"!==b)throw new Error(r.name+" [Convolution2D layer] Only tf and th dim ordering are allowed.");return r.dimOrdering=b,r.bias=w,r.params=r.bias?["W","b"]:["W"],r}return s(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,1,0)),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t),this._w2row(),this._useWeblas&&(this._wRowsMat.createWeblasTensor(),this._wRowsMat.weblasTensor=this._wRowsMat.weblasTensor.transpose(),this.bias?this.weights.b.createWeblasTensor():(this._zerosVec=new d.default([],[this.weights.W.tensor.shape[3]]),this._zerosVec.createWeblasTensor()))}},{key:"_calcOutputShape",value:function(t){var e=t.tensor.shape[0],r=t.tensor.shape[1],n=u(this.kernelShape,3),o=n[0],i=n[1],a=n[2],s="same"===this.borderMode?Math.floor((e+this.subsample[0]-1)/this.subsample[0]):Math.floor((e-i+this.subsample[0])/this.subsample[0]),c="same"===this.borderMode?Math.floor((r+this.subsample[1]-1)/this.subsample[1]):Math.floor((r-a+this.subsample[1])/this.subsample[1]),l=o,f="same"===this.borderMode?Math.max(0,Math.floor((s-1)*this.subsample[0]+i-e)):0,p="same"===this.borderMode?Math.max(0,Math.floor((c-1)*this.subsample[1]+a-r)):0,h=Math.floor(f/2),d=f-h,v=Math.floor(p/2),y=p-v;this.outputShape=[s,c,l],this.inputPadding=[h,d,v,y]}},{key:"_padInput",value:function(t){if("same"===this.borderMode){var e=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=u(this.inputPadding,4),a=i[0],s=i[1],c=i[2],l=i[3],f=r+a+s,p=n+c+l,h=new d.default([],[f,p,o]);_.default.assign(h.tensor.hi(r+a,n+c,o).lo(a,c,0),t.tensor),t.tensor=h.tensor}return t}},{key:"_im2col",value:function(t){var e=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=this.kernelShape[1],a=this.kernelShape[2],s=this.outputShape[0],c=this.outputShape[1],l=s*c,f=i*a*o;if(this._imColsMat||(this._imColsMat=new d.default([],[l,f])),1===i&&1===a&&1===this.subsample[0]&&1===this.subsample[1])return this._imColsMat.replaceTensorData(t.tensor.data),this._useWeblas&&this._imColsMat.createWeblasTensor(),this._imColsMat;for(var p=new d.default([],[i,a,o]),h=0,v=0,y=r-i;v<=y;v+=this.subsample[0])for(var g=0,b=n-a;g<=b;g+=this.subsample[1])_.default.assign(p.tensor,t.tensor.hi(v+i,g+a,o).lo(v,g,0)),this._imColsMat.tensor.data.set(p.tensor.data,h),h+=f;return this._useWeblas&&this._imColsMat.createWeblasTensor(),this._imColsMat}},{key:"_w2row",value:function(){var t=this.weights.W.tensor.shape[2],e=u(this.kernelShape,3),r=e[0],n=e[1],o=e[2],i=n*o*t;this._wRowsMat=new d.default([],[i,r]);for(var a=new d.default([],[n,o,t]),s=new d.default([],[i]),c=0;c<r;c++)_.default.assign(a.tensor,this.weights.W.tensor.pick(null,null,null,c)),s.replaceTensorData(a.tensor.data),_.default.assign(this._wRowsMat.tensor.pick(null,c),s.tensor);return this._wRowsMat}},{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0)),this._calcOutputShape(t),this._padInput(t),this._im2col(t);var e=this.kernelShape[0],r=this.outputShape[0],n=this.outputShape[1],o=r*n,i=new d.default([],[o,e]);if(!this._useWeblas||this._imColsMat._gpuMaxSizeExceeded||this._wRowsMat._gpuMaxSizeExceeded){if(this.bias)for(var a=0;a<e;a++)_.default.assigns(i.tensor.pick(null,a),this.weights.b.tensor.get(a));(0,m.default)(i.tensor,this._imColsMat.tensor,this._wRowsMat.tensor,1,1)}else{var s=this.bias?this.weights.b.weblasTensor:this._zerosVec.weblasTensor;i.tensor.data=weblas.pipeline.sgemm(1,this._imColsMat.weblasTensor,this._wRowsMat.weblasTensor,1,s).transfer()}for(var u=new d.default([],this.outputShape),c=new d.default([],[r*n]),l=new d.default([],[r,n]),f=0;f<e;f++)_.default.assign(c.tensor,i.tensor.pick(null,f)),l.replaceTensorData(c.tensor.data),_.default.assign(u.tensor.pick(null,null,f),l.tensor);return t.tensor=u.tensor,this.activation(t),"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(2,0,1)),t}}]),e}(y.default);e.default=w},function(t,e,r){var n=r(18),o=r(11),i=r(45);t.exports=function(t){return function(e,r,a){var s,u=n(e),c=o(u.length),l=i(a,c);if(t&&r!=r){for(;c>l;)if(s=u[l++],s!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===r)return t||l||0;return!t&&-1}}},function(t,e,r){"use strict";var n=r(5),o=r(0),i=r(16),a=r(43),s=r(35),u=r(51),c=r(38),l=r(7),f=r(6),p=r(72),h=r(53),d=r(94);t.exports=function(t,e,r,v,y,g){var _=n[t],b=_,m=y?"set":"add",w=b&&b.prototype,x={},O=function(t){var e=w[t];i(w,t,"delete"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,r){return e.call(this,0===t?0:t,r),this})};if("function"==typeof b&&(g||w.forEach&&!f(function(){(new b).entries().next()}))){var j=new b,E=j[m](g?{}:-0,1)!=j,S=f(function(){j.has(1)}),k=p(function(t){new b(t)}),P=!g&&f(function(){for(var t=new b,e=5;e--;)t[m](e,e);return!t.has(-0)});k||(b=e(function(e,r){c(e,b,t);var n=d(new _,e,b);return void 0!=r&&u(r,y,n[m],n),n}),b.prototype=w,w.constructor=b),(S||P)&&(O("delete"),O("has"),y&&O("get")),(P||E)&&O(m),g&&w.clear&&delete w.clear}else b=v.getConstructor(e,t,y,m),a(b.prototype,r),s.NEED=!0;return h(b,t),x[t]=b,o(o.G+o.W+o.F*(b!=_),x),g||v.setStrong(b,t,y),b}},function(t,e,r){"use strict";var n=r(15),o=r(16),i=r(6),a=r(23),s=r(8);t.exports=function(t,e,r){var u=s(t),c=r(a,u,""[t]),l=c[0],f=c[1];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,l),n(RegExp.prototype,u,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e,r){"use strict";var n=r(2);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){var n=r(7),o=r(22),i=r(8)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,r){var n=r(8)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},t(i)}catch(t){}return r}},function(t,e,r){t.exports=r(39)||!r(6)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(5)[t]})},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(5),o="__core-js_shared__",i=n[o]||(n[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,r){for(var n,o=r(5),i=r(15),a=r(46),s=a("typed_array"),u=a("view"),c=!(!o.ArrayBuffer||!o.DataView),l=c,f=0,p=9,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<p;)(n=o[h[f++]])?(i(n.prototype,s,!0),i(n.prototype,u,!0)):l=!1;t.exports={ABV:c,CONSTR:l,TYPED:s,VIEW:u}},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(510),i=r(511),a=r(512),s=r(513),u=r(514);n.prototype.clear=o,n.prototype.delete=i,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}t.exports=r},function(t,e,r){function n(t,e){for(var r=t.length;r--;)if(o(t[r][0],e))return r;return-1}var o=r(119);t.exports=n},function(t,e,r){function n(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?s(t)?i(t[0],t[1]):o(t):u(t)}var o=r(467),i=r(468),a=r(120),s=r(34),u=r(555);t.exports=n},function(t,e,r){function n(t,e){var r=t.__data__;return o(e)?r["string"==typeof e?"string":"hash"]:r.map}var o=r(507);t.exports=n},function(t,e,r){function n(t,e){if(o(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(s.test(t)||!a.test(t)||null!=e&&t in Object(e))}var o=r(34),i=r(85),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=n},function(t,e,r){var n=r(47),o=n(Object,"create");t.exports=o},function(t,e,r){function n(t){return null!=t&&i(t.length)&&!o(t)}var o=r(182),i=r(123);t.exports=n},function(t,e,r){function n(t){return"symbol"==typeof t||o(t)&&s.call(t)==i}var o=r(61),i="[object Symbol]",a=Object.prototype,s=a.toString;t.exports=n},function(t,e,r){"use strict";t.exports.swap=r(573),t.exports.scal=r(572),t.exports.copy=r(566),t.exports.axpy=r(565),t.exports.dot=r(568),t.exports.cpsc=r(567),t.exports.nrm2=r(570),t.exports.asum=r(564),t.exports.iamax=r(569),t.exports.rotg=r(571)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,configurable:!1,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,configurable:!1,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var n=r(12),o=r(45),i=r(11);t.exports=function(t){for(var e=n(this),r=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,r),u=a>2?arguments[2]:void 0,c=void 0===u?r:o(u,r);c>s;)e[s++]=t;return e}},function(t,e,r){"use strict";var n=r(10),o=r(36);t.exports=function(t,e,r){e in t?n.f(t,e,o(0,r)):t[e]=r}},function(t,e,r){var n=r(7),o=r(5).document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,r){var n=r(8)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,r){t.exports=r(5).document&&document.documentElement},function(t,e,r){var n=r(7),o=r(102).set;t.exports=function(t,e,r){var i,a=e.constructor;return a!==r&&"function"==typeof a&&(i=a.prototype)!==r.prototype&&n(i)&&o&&o(t,i),t}},function(t,e,r){var n=r(52),o=r(8)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||i[o]===t)}},function(t,e,r){var n=r(22);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){"use strict";var n=r(40),o=r(36),i=r(53),a={};r(15)(a,r(8)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(a,{next:o(1,r)}),i(t,e+" Iterator")}},function(t,e,r){"use strict";var n=r(39),o=r(0),i=r(16),a=r(15),s=r(13),u=r(52),c=r(97),l=r(53),f=r(21),p=r(8)("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",y="values",g=function(){return this};t.exports=function(t,e,r,_,b,m,w){c(r,e,_);var x,O,j,E=function(t){if(!h&&t in A)return A[t];switch(t){case v:return function(){return new r(this,t)};case y:return function(){return new r(this,t)}}return function(){return new r(this,t)}},S=e+" Iterator",k=b==y,P=!1,A=t.prototype,M=A[p]||A[d]||b&&A[b],C=M||E(b),T=b?k?E("entries"):C:void 0,R="Array"==e?A.entries||M:M;if(R&&(j=f(R.call(new t)),j!==Object.prototype&&(l(j,S,!0),n||s(j,p)||a(j,p,g))),k&&M&&M.name!==y&&(P=!0,C=function(){return M.call(this)}),n&&!w||!h&&!P&&A[p]||a(A,p,C),u[e]=C,u[S]=g,b)if(x={values:k?C:E(y),keys:m?C:E(v),entries:T},w)for(O in x)O in A||i(A,O,x[O]);else o(o.P+o.F*(h||P),e,x);return x}},function(t,e){var r=Math.expm1;t.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||r(-2e-17)!=-2e-17?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:r},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,r){var n=r(5),o=r(109).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,u="process"==r(22)(a);t.exports=function(){var t,e,r,c=function(){var n,o;for(u&&(n=a.domain)&&n.exit();t;){o=t.fn,t=t.next;try{o()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(u)r=function(){a.nextTick(c)};else if(i){var l=!0,f=document.createTextNode("");new i(c).observe(f,{characterData:!0}),r=function(){f.data=l=!l}}else if(s&&s.resolve){var p=s.resolve();r=function(){p.then(c)}}else r=function(){o.call(n,c)};return function(n){var o={fn:n,next:void 0};e&&(e.next=o),t||(t=o,r()),e=o}}},function(t,e,r){var n=r(7),o=r(2),i=function(t,e){if(o(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{n=r(31)(Function.call,r(20).f(Object.prototype,"__proto__").set,2),n(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,r){return i(t,r),e?t.__proto__=r:n(t,r),t}}({},!1):void 0),check:i}},function(t,e,r){var n=r(75)("keys"),o=r(46);t.exports=function(t){return n[t]||(n[t]=o(t))}},function(t,e,r){var n=r(2),o=r(14),i=r(8)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||void 0==(r=n(a)[i])?e:o(r)}},function(t,e,r){var n=r(37),o=r(23);t.exports=function(t){return function(e,r){var i,a,s=String(o(e)),u=n(r),c=s.length;return u<0||u>=c?t?"":void 0:(i=s.charCodeAt(u),i<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):i:t?s.slice(u,u+2):(i-55296<<10)+(a-56320)+65536)}}},function(t,e,r){var n=r(71),o=r(23);t.exports=function(t,e,r){if(n(e))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(t))}},function(t,e,r){"use strict";var n=r(37),o=r(23);t.exports=function(t){var e=String(o(this)),r="",i=n(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(r+=e);return r}},function(t,e){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},function(t,e,r){var n,o,i,a=r(31),s=r(70),u=r(93),c=r(90),l=r(5),f=l.process,p=l.setImmediate,h=l.clearImmediate,d=l.MessageChannel,v=0,y={},g="onreadystatechange",_=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},b=function(t){_.call(t.data)};p&&h||(p=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return y[++v]=function(){s("function"==typeof t?t:Function(t),e)},n(v),v},h=function(t){delete y[t]},"process"==r(22)(f)?n=function(t){f.nextTick(a(_,t,1))}:d?(o=new d,i=o.port2,o.port1.onmessage=b,n=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):n=g in c("script")?function(t){u.appendChild(c("script"))[g]=function(){u.removeChild(this),_.call(t)}}:function(t){setTimeout(a(_,t,1),0)}),t.exports={set:p,clear:h}},function(t,e,r){"use strict";var n=r(5),o=r(9),i=r(39),a=r(76),s=r(15),u=r(43),c=r(6),l=r(38),f=r(37),p=r(11),h=r(41).f,d=r(10).f,v=r(88),y=r(53),g="ArrayBuffer",_="DataView",b="prototype",m="Wrong length!",w="Wrong index!",x=n[g],O=n[_],j=n.Math,E=n.RangeError,S=n.Infinity,k=x,P=j.abs,A=j.pow,M=j.floor,C=j.log,T=j.LN2,R="buffer",F="byteLength",I="byteOffset",D=o?"_b":R,L=o?"_l":F,N=o?"_o":I,U=function(t,e,r){var n,o,i,a=Array(r),s=8*r-e-1,u=(1<<s)-1,c=u>>1,l=23===e?A(2,-24)-A(2,-77):0,f=0,p=t<0||0===t&&1/t<0?1:0;for(t=P(t),t!=t||t===S?(o=t!=t?1:0,n=u):(n=M(C(t)/T),t*(i=A(2,-n))<1&&(n--,i*=2),t+=n+c>=1?l/i:l*A(2,1-c),t*i>=2&&(n++,i/=2),n+c>=u?(o=0,n=u):n+c>=1?(o=(t*i-1)*A(2,e),n+=c):(o=t*A(2,c-1)*A(2,e),n=0));e>=8;a[f++]=255&o,o/=256,e-=8);for(n=n<<e|o,s+=e;s>0;a[f++]=255&n,n/=256,s-=8);return a[--f]|=128*p,a},B=function(t,e,r){var n,o=8*r-e-1,i=(1<<o)-1,a=i>>1,s=o-7,u=r-1,c=t[u--],l=127&c;for(c>>=7;s>0;l=256*l+t[u],u--,s-=8);for(n=l&(1<<-s)-1,l>>=-s,s+=e;s>0;n=256*n+t[u],u--,s-=8);if(0===l)l=1-a;else{if(l===i)return n?NaN:c?-S:S;n+=A(2,e),l-=a}return(c?-1:1)*n*A(2,l-e)},V=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},W=function(t){return[255&t]},z=function(t){return[255&t,t>>8&255]},q=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},G=function(t){return U(t,52,8)},H=function(t){return U(t,23,4)},Y=function(t,e,r){d(t[b],e,{get:function(){return this[r]}})},$=function(t,e,r,n){var o=+r,i=f(o);if(o!=i||i<0||i+e>t[L])throw E(w);var a=t[D]._b,s=i+t[N],u=a.slice(s,s+e);return n?u:u.reverse()},K=function(t,e,r,n,o,i){var a=+r,s=f(a);if(a!=s||s<0||s+e>t[L])throw E(w);for(var u=t[D]._b,c=s+t[N],l=n(+o),p=0;p<e;p++)u[c+p]=l[i?p:e-p-1]},X=function(t,e){l(t,x,g);var r=+e,n=p(r);if(r!=n)throw E(m);return n};if(a.ABV){if(!c(function(){new x})||!c(function(){new x(.5)})){x=function(t){return new k(X(this,t))};for(var Z,Q=x[b]=k[b],J=h(k),tt=0;J.length>tt;)(Z=J[tt++])in x||s(x,Z,k[Z]);i||(Q.constructor=x)}var et=new O(new x(2)),rt=O[b].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||u(O[b],{setInt8:function(t,e){rt.call(this,t,e<<24>>24)},setUint8:function(t,e){rt.call(this,t,e<<24>>24)}},!0)}else x=function(t){var e=X(this,t);this._b=v.call(Array(e),0),this[L]=e},O=function(t,e,r){l(this,O,_),l(t,x,_);var n=t[L],o=f(e);if(o<0||o>n)throw E("Wrong offset!");if(r=void 0===r?n-o:p(r),o+r>n)throw E(m);this[D]=t,this[N]=o,this[L]=r},o&&(Y(x,F,"_l"),Y(O,R,"_b"),Y(O,F,"_l"),Y(O,I,"_o")),u(O[b],{getInt8:function(t){return $(this,1,t)[0]<<24>>24},getUint8:function(t){return $(this,1,t)[0]},getInt16:function(t){var e=$(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=$(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return V($(this,4,t,arguments[1]))},getUint32:function(t){return V($(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return B($(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return B($(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){K(this,1,t,W,e)},setUint8:function(t,e){K(this,1,t,W,e)},setInt16:function(t,e){K(this,2,t,z,e,arguments[2])},setUint16:function(t,e){K(this,2,t,z,e,arguments[2])},setInt32:function(t,e){K(this,4,t,q,e,arguments[2])},setUint32:function(t,e){K(this,4,t,q,e,arguments[2])},setFloat32:function(t,e){K(this,4,t,H,e,arguments[2])},setFloat64:function(t,e){K(this,8,t,G,e,arguments[2])}});y(x,g),y(O,_),s(O[b],a.VIEW,!0),e[g]=x,e[_]=O},function(t,e,r){var n=r(5),o=r(30),i=r(39),a=r(157),s=r(10).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,r){var n=r(57),o=r(8)("iterator"),i=r(52);t.exports=r(30).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[n(t)]}},function(t,e,r){"use strict";var n=r(50),o=r(145),i=r(52),a=r(18);t.exports=r(98)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,r):"values"==e?o(0,t[r]):o(0,[r,t[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(t,e,r){var n=r(47),o=r(29),i=n(o,"Map");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(515),i=r(516),a=r(517),s=r(518),u=r(519);n.prototype.clear=o,n.prototype.delete=i,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){var n=r(29),o=n.Symbol;t.exports=o},function(t,e,r){function n(t,e,r,s,u){return t===e||(null==t||null==e||!i(t)&&!a(e)?t!==t&&e!==e:o(t,e,n,r,s,u))}var o=r(462),i=r(55),a=r(61);t.exports=n},function(t,e){function r(t,e){return e=null==e?n:e,!!e&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<e}var n=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e){function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e){function r(t){return t}t.exports=r},function(t,e,r){var n=r(461),o=r(61),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,r){function n(t,e){return o(t,e)}var o=r(117);t.exports=n},function(t,e){function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}var n=9007199254740991;t.exports=r},function(t,e,r){"use strict";function n(t,e){var r,n=[],i=[];if(void 0!==e&&!Array.isArray(e))throw new Error("axes must be an Array list of dimensions to squeeze");for(r=0;r<t.shape.length;r++)(1!==t.shape[r]||void 0!==e&&e.indexOf(r)===-1)&&(n.push(t.shape[r]),i.push(t.stride[r]));return o(t.data,n,i,t.offset)}var o=r(64);t.exports=n},function(t,e,r){"use strict";function n(t,e){var r,n;if(void 0!==e&&(!Number.isFinite(e)||e%1!==e))throw new Error("axis of dimension to unsqueeze must be an integer");return e=void 0===e?t.shape.length:e,r=t.shape.slice(0),n=t.stride.slice(0),r.splice(e||0,0,1),n.splice(e||0,0,(n[e]||1)*(r[e+1]||1)),o(t.data,r,n,t.offset)}var o=r(64);t.exports=n},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===n||!f)&&clearTimeout)return f=clearTimeout,
clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?d=h.concat(d):y=-1,d.length&&s())}function s(){if(!v){var t=o(a);v=!0;for(var e=d.length;e;){for(h=d,d=[];++y<e;)h&&h[y].run();y=-1,e=d.length}h=null,v=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var l,f,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(t){f=n}}();var h,d=[],v=!1,y=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||v||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e,r){(function(t,n){function o(t,e){this._id=t,this._clearFn=e}var i=r(126).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},c=0;e.setTimeout=function(){return new o(a.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new o(a.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=c++,n=!(arguments.length<2)&&s.call(arguments,1);return u[r]=!0,i(function(){u[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete u[t]}}).call(e,r(127).setImmediate,r(127).clearImmediate)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.InputLayer=void 0;var o=r(200);Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var i=r(225);Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})});var a=r(212);Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})});var s=r(240);Object.keys(s).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})});var u=r(229);Object.keys(u).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}})});var c=r(227);Object.keys(c).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var l=r(132);Object.keys(l).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})});var f=r(246);Object.keys(f).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}})});var p=r(193),h=n(p);e.InputLayer=h.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="_Pooling1D";var n=t.poolLength,a=void 0===n?2:n,s=t.stride,u=void 0===s?null:s,c=t.borderMode,l=void 0===c?"valid":c;return r.poolLength=a,r.stride=null===u?a:u,r.borderMode=l,r.poolingFunc="max",r}return a(e,t),s(e,[{key:"call",value:function(t){if("max"!==this.poolingFunc&&"average"!==this.poolingFunc)throw new Error("[pooling._Pooling1D] pooling function must be max or average.");for(var e="valid"===this.borderMode?Math.floor((t.tensor.shape[0]-this.poolLength+this.stride)/this.stride):Math.floor((t.tensor.shape[0]+this.stride-1)/this.stride),r=new f.default([],[e,t.tensor.shape[1]]),n=new f.default([],[t.tensor.shape[1]]),o="valid"===this.borderMode?0:Math.min(0,Math.ceil((t.tensor.shape[0]-(e-1)*this.stride-this.poolLength)/2)),i=0;i<e;i++){var a=Math.max(0,o),s=this.poolLength+Math.min(0,o);h.default.assign(n.tensor,t.tensor.pick(a,null));for(var u=1,c=1;c<s&&!(a+c>t.tensor.shape[0]-1);c++)"max"===this.poolingFunc?h.default.maxeq(n.tensor,t.tensor.pick(a+c,null)):"average"===this.poolingFunc&&h.default.addeq(n.tensor,t.tensor.pick(a+c,null)),u+=1;"average"===this.poolingFunc&&h.default.divseq(n.tensor,u),h.default.assign(r.tensor.pick(i,null),n.tensor),o+=this.stride}return t.tensor=r.tensor,t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(1),l=n(c),f=r(3),p=n(f),h=r(4),d=n(h),v=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="_Pooling2D";var n=t.poolSize,a=void 0===n?[2,2]:n,s=t.strides,u=void 0===s?null:s,c=t.borderMode,l=void 0===c?"valid":c,f=t.dimOrdering,p=void 0===f?"tf":f;return r.poolSize=a,r.strides=null===u?a:u,r.borderMode=l,r.dimOrdering=p,r.poolingFunc="max",r}return a(e,t),u(e,[{key:"_calcOutputShape",value:function(t){var e=s(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=s(this.poolSize,2),a=i[0],u=i[1],c="same"===this.borderMode?Math.floor((r+this.strides[0]-1)/this.strides[0]):Math.floor((r-a+this.strides[0])/this.strides[0]),l="same"===this.borderMode?Math.floor((n+this.strides[1]-1)/this.strides[1]):Math.floor((n-u+this.strides[1])/this.strides[1]),f="same"===this.borderMode?Math.max(0,Math.floor((c-1)*this.strides[0]+a-r)):0,p="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.strides[1]+u-n)):0,h=Math.floor(f/2),d=f-h,v=Math.floor(p/2),y=p-v;this.outputShape=[c,l,o],this.inputPadding=[h,d,v,y]}},{key:"_padInput",value:function(t){if("same"===this.borderMode){var e=s(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=s(this.inputPadding,4),a=i[0],u=i[1],c=i[2],l=i[3],f=r+a+u,h=n+c+l,v=new p.default([],[f,h,o]);"max"===this.poolingFunc&&d.default.assigns(v.tensor,Number.NEGATIVE_INFINITY),d.default.assign(v.tensor.hi(r+a,n+c,o).lo(a,c,0),t.tensor),t.tensor=v.tensor}return t}},{key:"call",value:function(t){if("max"!==this.poolingFunc&&"average"!==this.poolingFunc)throw new Error("[pooling._Pooling2D] pooling function must be max or average.");"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0)),this._calcOutputShape(t),this._padInput(t);for(var e=s(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=s(this.poolSize,2),a=i[0],u=i[1],c=new p.default([],this.outputShape),l=new p.default([],[a,u,o]),f=s(this.inputPadding,4),h=f[0],v=f[1],y=f[2],g=f[3],_=0,b=0;_<=r-a;_+=this.strides[0],b++){var m=0;_<h?m=h-_:_+a>r-v&&(m=_+a-(r-v));for(var w=0,x=0;w<=n-u;w+=this.strides[1],x++){var O=0;w<y?O=y-w:w+u>n-g&&(O=w+u-(n-g)),d.default.assign(l.tensor,t.tensor.hi(_+a,w+u,o).lo(_,w,0));for(var j=0;j<o;j++)if("max"===this.poolingFunc)c.tensor.set(b,x,j,d.default.sup(l.tensor.pick(null,null,j)));else if("average"===this.poolingFunc){var E=(a-m)*(u-O);c.tensor.set(b,x,j,d.default.sum(l.tensor.pick(null,null,j))/E)}}}return t.tensor=c.tensor,"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(2,0,1)),t}}]),e}(l.default);e.default=v},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(1),l=n(c),f=r(3),p=n(f),h=r(4),d=n(h),v=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="_Pooling3D";var n=t.poolSize,a=void 0===n?[2,2,2]:n,s=t.strides,u=void 0===s?null:s,c=t.borderMode,l=void 0===c?"valid":c,f=t.dimOrdering,p=void 0===f?"tf":f;return r.poolSize=a,r.strides=null===u?a:u,r.borderMode=l,r.dimOrdering=p,r.poolingFunc="max",r}return a(e,t),u(e,[{key:"_calcOutputShape",value:function(t){var e=s(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=s(this.poolSize,3),u=a[0],c=a[1],l=a[2],f="same"===this.borderMode?Math.floor((r+this.strides[0]-1)/this.strides[0]):Math.floor((r-u+this.strides[0])/this.strides[0]),p="same"===this.borderMode?Math.floor((n+this.strides[1]-1)/this.strides[1]):Math.floor((n-c+this.strides[1])/this.strides[1]),h="same"===this.borderMode?Math.floor((o+this.strides[2]-1)/this.strides[2]):Math.floor((o-l+this.strides[2])/this.strides[2]),d="same"===this.borderMode?Math.max(0,Math.floor((f-1)*this.strides[0]+u-r)):0,v="same"===this.borderMode?Math.max(0,Math.floor((p-1)*this.strides[1]+c-n)):0,y="same"===this.borderMode?Math.max(0,Math.floor((h-1)*this.strides[2]+l-o)):0,g=Math.floor(d/2),_=d-g,b=Math.floor(v/2),m=v-b,w=Math.floor(y/2),x=y-w;this.outputShape=[f,p,h,i],this.inputPadding=[g,_,b,m,w,x]}},{key:"_padInput",value:function(t){if("same"===this.borderMode){var e=s(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=s(this.inputPadding,6),u=a[0],c=a[1],l=a[2],f=a[3],h=a[4],v=a[5],y=r+u+c,g=n+l+f,_=o+h+v,b=new p.default([],[y,g,_,i]);"max"===this.poolingFunc&&d.default.assigns(b.tensor,Number.NEGATIVE_INFINITY),d.default.assign(b.tensor.hi(r+u,n+l,o+h,i).lo(u,l,h,0),t.tensor),t.tensor=b.tensor}return t}},{key:"call",value:function(t){if("max"!==this.poolingFunc&&"average"!==this.poolingFunc)throw new Error("[pooling._Pooling3D] pooling function must be max or average.");"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,3,0)),this._calcOutputShape(t),this._padInput(t);for(var e=s(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=s(this.poolSize,3),u=a[0],c=a[1],l=a[2],f=new p.default([],this.outputShape),h=new p.default([],[u,c,l,i]),v=s(this.inputPadding,6),y=v[0],g=v[1],_=v[2],b=v[3],m=v[4],w=v[5],x=0,O=0;x<=r-u;x+=this.strides[0],O++){var j=0;x<y?j=y-x:x+u>r-g&&(j=x+u-(r-g));for(var E=0,S=0;E<=n-c;E+=this.strides[1],S++){var k=0;E<_?k=_-E:E+c>n-b&&(k=E+c-(n-b));for(var P=0,A=0;P<=o-l;P+=this.strides[2],A++){var M=0;P<m?M=m-P:P+l>o-w&&(M=P+l-(o-w)),d.default.assign(h.tensor,t.tensor.hi(x+u,E+c,P+l,i).lo(x,E,P,0));for(var C=0;C<i;C++)if("max"===this.poolingFunc)f.tensor.set(O,S,A,C,d.default.sup(h.tensor.pick(null,null,null,C)));else if("average"===this.poolingFunc){var T=(u-j)*(c-k)*(l-M);f.tensor.set(O,S,A,C,d.default.sum(h.tensor.pick(null,null,null,C))/T)}}}}return t.tensor=f.tensor,"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(3,0,1,2)),t}}]),e}(l.default);e.default=v},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GRU=e.LSTM=e.SimpleRNN=void 0;var o=r(243),i=n(o),a=r(242),s=n(a),u=r(241),c=n(u);e.SimpleRNN=i.default,e.LSTM=s.default,e.GRU=c.default},function(t,e,r){"use strict";(function(t,n){function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function i(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,r){if(i()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return s(this,e,r,n)}function s(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?h(t,e,r,n):"string"==typeof e?f(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}function l(e,r){if(u(r),e=a(e,r<0?0:0|v(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function f(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var o=0|g(r,n);e=a(e,o);var i=e.write(r,n);return i!==o&&(e=e.slice(0,i)),e}function p(t,e){var r=e.length<0?0:0|v(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(e,r,n,o){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(o||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===o?new Uint8Array(r):void 0===o?new Uint8Array(r,n):new Uint8Array(r,n,o),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=p(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|v(r.length);return e=a(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||X(r.length)?a(e,0):p(e,r);if("Buffer"===r.type&&J(r.data))return p(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function y(e){return+e!=e&&(e=0),t.alloc(+e)}function g(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(o)return G(e).length;r=(""+r).toLowerCase(),o=!0}}function _(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(e,r,n,o,i){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=t.from(r,o)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,o,i);if("number"==typeof r)return r=255&r,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,o,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){function i(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}var c;if(o){var l=-1;for(c=r;c<s;c++)if(i(t,c)===i(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===u)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(r+u>s&&(r=s-u),c=r;c>=0;c--){for(var f=!0,p=0;p<u;p++)if(i(t,c+p)!==i(e,p)){f=!1;break}if(f)return c}return-1}function x(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function O(t,e,r,n){return K(G(e,t.length-r),t,r,n)}function j(t,e,r,n){return K(H(e),t,r,n)}function E(t,e,r,n){return j(t,e,r,n)}function S(t,e,r,n){return K($(e),t,r,n)}function k(t,e,r,n){return K(Y(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?Z.fromByteArray(t):Z.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(o+s<=r){var u,c,l,f;switch(s){case 1:i<128&&(a=i);break;case 2:u=t[o+1],128===(192&u)&&(f=(31&i)<<6|63&u,f>127&&(a=f));break;case 3:u=t[o+1],c=t[o+2],128===(192&u)&&128===(192&c)&&(f=(15&i)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:u=t[o+1],c=t[o+2],l=t[o+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&i)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=s}return M(n)}function M(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function T(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=q(t[i]);return o}function F(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,r,n,o,i,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<a)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function L(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function U(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return o||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(t,e,r,n,23,4),r+4}function V(t,e,r,n,o){return o||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(t,e,r,n,52,8),r+8}function W(t){if(t=z(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function q(t){return t<16?"0"+t.toString(16):t.toString(16)}function G(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function Y(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function $(t){return Z.toByteArray(W(t))}function K(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function X(t){return t!==t}var Z=r(248),Q=r(436),J=r(439);e.Buffer=t,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=i(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return s(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return c(null,t,e,r)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,a=Math.min(n,o);i<a;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!J(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var o=t.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!t.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,i),i+=a.length}return o},t.byteLength=g,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):_.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,o,i){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var a=i-o,s=n-r,u=Math.min(a,s),c=this.slice(o,i),l=e.slice(r,n),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return O(this,t,e,r);case"ascii":return j(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var o;if(t.TYPED_ARRAY_SUPPORT)o=this.subarray(e,r),o.__proto__=t.prototype;else{var i=r-e;o=new t(i,void 0);for(var a=0;a<i;++a)o[a]=this[a+e]}return o},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},t.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},t.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),Q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),Q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),Q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),Q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var o=Math.pow(2,8*r)-1;D(this,t,e,r,o,0)}var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var o=Math.pow(2,8*r)-1;D(this,t,e,r,o,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):L(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):L(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):N(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var o=Math.pow(2,8*r-1);D(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var o=Math.pow(2,8*r-1);D(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),
this[e+i]=(t/a>>0)-s&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):L(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):L(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):N(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||D(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return V(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return V(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,o){if(n||(n=0),o||0===o||(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var i,a=o-n;if(this===e&&n<r&&r<o)for(i=a-1;i>=0;--i)e[i+r]=this[i+n];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+r]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),r);return a},t.prototype.fill=function(e,r,n,o){if("string"==typeof e){if("string"==typeof r?(o=r,r=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!t.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else"number"==typeof e&&(e=255&e);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=r;a<n;++a)this[a]=e;else{var s=t.isBuffer(e)?e:G(new t(e,o).toString()),u=s.length;for(a=0;a<n-r;++a)this[a+r]=s[a%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(133).Buffer,r(49))},function(t,e,r){var n=r(22);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=n(t))throw TypeError(e);return+t}},function(t,e,r){"use strict";var n=r(12),o=r(45),i=r(11);t.exports=[].copyWithin||function(t,e){var r=n(this),a=i(r.length),s=o(t,a),u=o(e,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:o(c,a))-u,a-s),f=1;for(u<s&&s<u+l&&(f=-1,u+=l-1,s+=l-1);l-- >0;)u in r?r[s]=r[u]:delete r[s],s+=f,u+=f;return r}},function(t,e,r){var n=r(51);t.exports=function(t,e){var r=[];return n(t,!1,r.push,r,e),r}},function(t,e,r){var n=r(14),o=r(12),i=r(58),a=r(11);t.exports=function(t,e,r,s,u){n(e);var c=o(t),l=i(c),f=a(c.length),p=u?f-1:0,h=u?-1:1;if(r<2)for(;;){if(p in l){s=l[p],p+=h;break}if(p+=h,u?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;u?p>=0:f>p;p+=h)p in l&&(s=e(s,l[p],p,c));return s}},function(t,e,r){"use strict";var n=r(14),o=r(7),i=r(70),a=[].slice,s={},u=function(t,e,r){if(!(e in s)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";s[e]=Function("F,a","return new F("+n.join(",")+")")}return s[e](t,r)};t.exports=Function.bind||function(t){var e=n(this),r=a.call(arguments,1),s=function(){var n=r.concat(a.call(arguments));return this instanceof s?u(e,n.length,n):i(e,n,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e,r){"use strict";var n=r(10).f,o=r(40),i=r(43),a=r(31),s=r(38),u=r(23),c=r(51),l=r(98),f=r(145),p=r(44),h=r(9),d=r(35).fastKey,v=h?"_s":"size",y=function(t,e){var r,n=d(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r};t.exports={getConstructor:function(t,e,r,l){var f=t(function(t,n){s(t,f,e,"_i"),t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=n&&c(n,r,t[l],t)});return i(f.prototype,{clear:function(){for(var t=this,e=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete e[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var e=this,r=y(e,t);if(r){var n=r.n,o=r.p;delete e._i[r.i],r.r=!0,o&&(o.n=n),n&&(n.p=o),e._f==r&&(e._f=n),e._l==r&&(e._l=o),e[v]--}return!!r},forEach:function(t){s(this,f,"forEach");for(var e,r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(this,t)}}),h&&n(f.prototype,"size",{get:function(){return u(this[v])}}),f},def:function(t,e,r){var n,o,i=y(t,e);return i?i.v=r:(t._l=i={i:o=d(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=i),n&&(n.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:y,setStrong:function(t,e,r){l(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,r=t._l;r&&r.r;)r=r.p;return t._t&&(t._l=r=r?r.n:t._t._f)?"keys"==e?f(0,r.k):"values"==e?f(0,r.v):f(0,[r.k,r.v]):(t._t=void 0,f(1))},r?"entries":"values",!r,!0),p(e)}}},function(t,e,r){var n=r(57),o=r(136);t.exports=function(t){return function(){if(n(this)!=t)throw TypeError(t+"#toJSON isn't generic");return o(this)}}},function(t,e,r){"use strict";var n=r(43),o=r(35).getWeak,i=r(2),a=r(7),s=r(38),u=r(51),c=r(26),l=r(13),f=c(5),p=c(6),h=0,d=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},y=function(t,e){return f(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var r=y(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,r,i){var c=t(function(t,n){s(t,c,e,"_i"),t._i=h++,t._l=void 0,void 0!=n&&u(n,r,t[i],t)});return n(c.prototype,{delete:function(t){if(!a(t))return!1;var e=o(t);return e===!0?d(this).delete(t):e&&l(e,this._i)&&delete e[this._i]},has:function(t){if(!a(t))return!1;var e=o(t);return e===!0?d(this).has(t):e&&l(e,this._i)}}),c},def:function(t,e,r){var n=o(i(e),!0);return n===!0?d(t).set(e,r):n[t._i]=r,t},ufstore:d}},function(t,e,r){t.exports=!r(9)&&!r(6)(function(){return 7!=Object.defineProperty(r(90)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(7),o=Math.floor;t.exports=function(t){return!n(t)&&isFinite(t)&&o(t)===t}},function(t,e,r){var n=r(2);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&n(i.call(t)),e}}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,r){"use strict";var n=r(42),o=r(74),i=r(59),a=r(12),s=r(58),u=Object.assign;t.exports=!u||r(6)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=u({},t)[r]||Object.keys(u({},e)).join("")!=n})?function(t,e){for(var r=a(t),u=arguments.length,c=1,l=o.f,f=i.f;u>c;)for(var p,h=s(arguments[c++]),d=l?n(h).concat(l(h)):n(h),v=d.length,y=0;v>y;)f.call(h,p=d[y++])&&(r[p]=h[p]);return r}:u},function(t,e,r){var n=r(10),o=r(2),i=r(42);t.exports=r(9)?Object.defineProperties:function(t,e){o(t);for(var r,a=i(e),s=a.length,u=0;s>u;)n.f(t,r=a[u++],e[r]);return t}},function(t,e,r){var n=r(18),o=r(41).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?s(t):o(n(t))}},function(t,e,r){var n=r(13),o=r(18),i=r(66)(!1),a=r(103)("IE_PROTO");t.exports=function(t,e){var r,s=o(t),u=0,c=[];for(r in s)r!=a&&n(s,r)&&c.push(r);for(;e.length>u;)n(s,r=e[u++])&&(~i(c,r)||c.push(r));return c}},function(t,e,r){var n=r(42),o=r(18),i=r(59).f;t.exports=function(t){return function(e){for(var r,a=o(e),s=n(a),u=s.length,c=0,l=[];u>c;)i.call(a,r=s[c++])&&l.push(t?[r,a[r]]:a[r]);return l}}},function(t,e,r){var n=r(41),o=r(74),i=r(2),a=r(5).Reflect;t.exports=a&&a.ownKeys||function(t){var e=n.f(i(t)),r=o.f;return r?e.concat(r(t)):e}},function(t,e,r){var n=r(5).parseFloat,o=r(54).trim;t.exports=1/n(r(108)+"-0")!==-(1/0)?function(t){var e=o(String(t),3),r=n(e);return 0===r&&"-"==e.charAt(0)?-0:r}:n},function(t,e,r){var n=r(5).parseInt,o=r(54).trim,i=r(108),a=/^[\-+]?0[xX]/;t.exports=8!==n(i+"08")||22!==n(i+"0x16")?function(t,e){var r=o(String(t),3);return n(r,e>>>0||(a.test(r)?16:10))}:n},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,r){var n=r(11),o=r(107),i=r(23);t.exports=function(t,e,r,a){var s=String(i(t)),u=s.length,c=void 0===r?" ":String(r),l=n(e);if(l<=u||""==c)return s;var f=l-u,p=o.call(c,Math.ceil(f/c.length));return p.length>f&&(p=p.slice(0,f)),a?p+s:s+p}},function(t,e,r){e.f=r(8)},function(t,e,r){"use strict";var n=r(139);t.exports=r(67)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=n.getEntry(this,t);return e&&e.v},set:function(t,e){return n.def(this,0===t?0:t,e)}},n,!0)},function(t,e,r){r(9)&&"g"!=/./g.flags&&r(10).f(RegExp.prototype,"flags",{configurable:!0,get:r(69)})},function(t,e,r){"use strict";var n=r(139);t.exports=r(67)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(this,t=0===t?0:t,t)}},n)},function(t,e,r){"use strict";var n,o=r(26)(0),i=r(16),a=r(35),s=r(147),u=r(141),c=r(7),l=a.getWeak,f=Object.isExtensible,p=u.ufstore,h={},d=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(t){if(c(t)){var e=l(t);return e===!0?p(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(this,t,e)}},y=t.exports=r(67)("WeakMap",d,v,u,!0,!0);7!=(new y).set((Object.freeze||Object)(h),7).get(h)&&(n=u.getConstructor(d),s(n.prototype,v),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=y.prototype,r=e[t];i(e,t,function(e,o){if(c(e)&&!f(e)){this._f||(this._f=new n);var i=this._f[t](e,o);return"set"==t?this:i}return r.call(this,e,o)})}))},function(t,e,r){"use strict";function n(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function o(t){var e=new n;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var o=0;o<r.length;++o){var a=r[o];if("array"===a||"object"==typeof a&&a.blockIndices){if(e.argTypes[o]="array",e.arrayArgs.push(o),e.arrayBlockIndices.push(a.blockIndices?a.blockIndices:0),e.shimArgs.push("array"+o),o<e.pre.args.length&&e.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array args");if(o<e.post.args.length&&e.post.args[o].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===a)e.scalarArgs.push(o),e.shimArgs.push("scalar"+o);else if("index"===a){if(e.indexArgs.push(o),o<e.pre.args.length&&e.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array index");if(o<e.body.args.length&&e.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array index");if(o<e.post.args.length&&e.post.args[o].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(e.shapeArgs.push(o),o<e.pre.args.length&&e.pre.args[o].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(o<e.body.args.length&&e.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array shape");if(o<e.post.args.length&&e.post.args[o].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof a||!a.offset)throw new Error("cwise: Unknown argument type "+r[o]);e.argTypes[o]="offset",e.offsetArgs.push({array:a.array,offset:a.offset}),e.offsetArgIndex.push(o)}}if(e.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(e.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,i(e)}var i=r(433);t.exports=o},function(t,e){"use strict";function r(t,e,n){var o=0|t[n];if(o<=0)return[];var i,a=new Array(o);if(n===t.length-1)for(i=0;i<o;++i)a[i]=e;else for(i=0;i<o;++i)a[i]=r(t,e,n+1);return a}function n(t,e){var r,n;for(r=new Array(t),n=0;n<t;++n)r[n]=e;return r}function o(t,e){switch("undefined"==typeof e&&(e=0),typeof t){case"number":if(t>0)return n(0|t,e);break;case"object":if("number"==typeof t.length)return r(t,e,0)}return[]}t.exports=o},function(t,e,r){function n(t){var e=this.__data__=new o(t);this.size=e.size}var o=r(77),i=r(531),a=r(532),s=r(533),u=r(534),c=r(535);n.prototype.clear=i,n.prototype.delete=a,n.prototype.get=s,n.prototype.has=u,n.prototype.set=c,t.exports=n},function(t,e,r){function n(t,e,r){"__proto__"==e&&o?o(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var o=r(170);t.exports=n},function(t,e,r){function n(t,e,r,a,s){var u=-1,c=t.length;for(r||(r=i),s||(s=[]);++u<c;){var l=t[u];e>0&&r(l)?e>1?n(l,e-1,r,a,s):o(s,l):a||(s[s.length]=l)}return s}var o=r(450),i=r(506);t.exports=n},function(t,e,r){function n(t,e){return t&&o(t,e,i)}var o=r(458),i=r(48);t.exports=n},function(t,e,r){function n(t,e){e=i(e,t)?[e]:o(e);for(var r=0,n=e.length;null!=t&&r<n;)t=t[a(e[r++])];return r&&r==n?t:void 0}var o=r(169),i=r(82),a=r(60);t.exports=n},function(t,e,r){function n(t){return o(t)?t:i(t)}var o=r(34),i=r(537);t.exports=n},function(t,e,r){var n=r(47),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,r){function n(t,e,r,n,c,l){var f=c&u,p=t.length,h=e.length;if(p!=h&&!(f&&h>p))return!1;var d=l.get(t);if(d&&l.get(e))return d==e;var v=-1,y=!0,g=c&s?new o:void 0;for(l.set(t,e),l.set(e,t);++v<p;){var _=t[v],b=e[v];if(n)var m=f?n(b,_,v,e,t,l):n(_,b,v,t,e,l);if(void 0!==m){if(m)continue;y=!1;break}if(g){if(!i(e,function(t,e){if(!a(g,e)&&(_===t||r(_,t,n,c,l)))return g.push(e)})){y=!1;break}}else if(_!==b&&!r(_,b,n,c,l)){y=!1;break}}return l.delete(t),l.delete(e),y}var o=r(444),i=r(452),a=r(483),s=1,u=2;t.exports=n},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(e,r(49))},function(t,e,r){var n=r(440),o=r(114),i=r(442),a=r(443),s=r(446),u=r(459),c=r(179),l="[object Map]",f="[object Object]",p="[object Promise]",h="[object Set]",d="[object WeakMap]",v="[object DataView]",y=Object.prototype,g=y.toString,_=c(n),b=c(o),m=c(i),w=c(a),x=c(s),O=u;(n&&O(new n(new ArrayBuffer(1)))!=v||o&&O(new o)!=l||i&&O(i.resolve())!=p||a&&O(new a)!=h||s&&O(new s)!=d)&&(O=function(t){var e=g.call(t),r=e==f?t.constructor:void 0,n=r?c(r):void 0;if(n)switch(n){case _:return v;case b:return l;case m:return p;case w:return h;case x:return d}return e}),t.exports=O},function(t,e){function r(t){return u.test(t)}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",i="\\u20d0-\\u20f0",a="\\ufe0e\\ufe0f",s="\\u200d",u=RegExp("["+s+n+o+i+a+"]");t.exports=r},function(t,e,r){function n(t,e,r){if(!s(r))return!1;var n=typeof e;return!!("number"==n?i(r)&&a(e,r.length):"string"==n&&e in r)&&o(r[e],t)}var o=r(119),i=r(84),a=r(118),s=r(55);t.exports=n},function(t,e,r){function n(t){return t===t&&!o(t)}var o=r(55);t.exports=n},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}t.exports=r},function(t,e){function r(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}t.exports=r},function(t,e){function r(t){if(null!=t){try{return o.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var n=Function.prototype,o=n.toString;t.exports=r},function(t,e,r){function n(t){var e=t?t.length:0;return e?o(t,i):[]}var o=r(166),i=1/0;t.exports=n},function(t,e,r){(function(t){var n=r(29),o=r(557),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?n.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||o;t.exports=l}).call(e,r(87)(t))},function(t,e,r){function n(t){var e=o(t)?c.call(t):"";return e==i||e==a||e==s}var o=r(55),i="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]",u=Object.prototype,c=u.toString;t.exports=n},function(t,e,r){var n=r(465),o=r(481),i=r(522),a=i&&i.isTypedArray,s=a?o(a):n;t.exports=s},function(t,e,r){function n(t){if(!t)return 0===t?t:0;if(t=o(t),t===i||t===-i){var e=t<0?-1:1;return e*a}return t===t?t:0}var o=r(559),i=1/0,a=1.7976931348623157e308;t.exports=n},function(t,e,r){function n(t){var e=o(t),r=e%1;return e===e?r?e-r:e:0}var o=r(184);t.exports=n},function(t,e,r){"use strict";function n(t){var e=t.dtype;"generic"!==e&&"array"!==e||(e="double");var r=f.malloc(t.size,e),n=c(r,t.shape);return l.assign(n,t),n}function o(t,e){e||(e="double");for(var r=1,n=new Array(t.length),o=t.length-1;o>=0;--o)n[o]=r,r*=t[o];return c(f.malloc(r,e),t,n,0)}function i(t){"generic"!==t.dtype&&"array"!==t.dtype&&f.free(t.data)}function a(t,e){e||(e="double");for(var r=1,n=new Array(t.length),o=t.length-1;o>=0;--o)n[o]=r,r*=t[o];for(var i=f.malloc(r,e),o=0;o<r;++o)i[o]=0;return c(i,t,n,0)}function s(t,e){e||(e="double");for(var r=1,n=new Array(t.length),o=t.length-1;o>=0;--o)n[o]=r,r*=t[o];for(var i=f.malloc(r,e),o=0;o<r;++o)i[o]=1;return c(i,t,n,0)}function u(t,e){var r,n;e||(e="double");var o=1,i=new Array(t.length);for(r=t.length-1;r>=0;--r)i[r]=o,o*=t[r];var a=f.malloc(o,e);for(r=0;r<o;++r)a[r]=0;var s=1/0,u=0;for(r=t.length-1;r>=0;r--)u+=i[r],s=Math.min(s,t[r]);for(r=0,n=0;r<s;r++,n+=u)a[n]=1;return c(a,t,i,0)}var c=r(64),l=r(4),f=r(593);e.clone=n,e.malloc=o,e.free=i,e.zeros=a,e.ones=s,e.eye=u},function(t,e,r){"use strict";var n=r(163),o=r(25),i=o({args:["array","scalar","index"],body:function(t,e,r){var n,o=e;for(n=0;n<r.length-1;++n)o=o[r[n]];o[r[r.length-1]]=t}});t.exports=function(t){var e=n(t.shape);return i(t,e),e}},function(t,e){"use strict";function r(t,e){for(var r=1,n=t.length,o=t[0],i=t[0],a=1;a<n;++a)if(i=o,o=t[a],e(o,i)){if(a===r){r++;continue}t[r++]=o}return t.length=r,t}function n(t){for(var e=1,r=t.length,n=t[0],o=t[0],i=1;i<r;++i,o=n)if(o=n,n=t[i],n!==o){if(i===e){e++;continue}t[e++]=n}return t.length=e,t}function o(t,e,o){return 0===t.length?t:e?(o||t.sort(e),r(t,e)):(o||t.sort(),n(t))}t.exports=o},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.testUtils=e.layers=e.activations=e.Tensor=e.Model=void 0;var i=r(191),a=o(i),s=r(3),u=o(s),c=r(19),l=n(c),f=r(128),p=n(f),h=r(247),d=n(h);e.Model=a.default,e.Tensor=u.default,e.activations=l,e.layers=p,e.testUtils=d},function(t,e,r){"use strict";(function(t){function e(t,e,r){t[e]||Object[n](t,e,{writable:!0,configurable:!0,value:r})}if(r(431),r(592),r(251),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var n="defineProperty";e(String.prototype,"padLeft","".padStart),e(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&e(Array,t,Function.call.bind([][t]))})}).call(e,r(49))},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=r(250),s=o(a),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),f=r(560),p=o(f),h=r(552),d=o(h),v=r(540),y=o(v),g=r(545),_=o(g),b=r(48),m=o(b),w=r(562),x=o(w),O=r(558),j=o(O),E=r(122),S=o(E),k=r(544),P=o(k),A=r(128),M=n(A),C=r(3),T=o(C),R=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var r=e.filepaths,n=void 0===r?{}:r,o=e.headers,a=void 0===o?{}:o,s=e.gpu,u=void 0!==s&&s,c=e.layerCallPauses,l=void 0!==c&&c;if(!n.model||!n.weights||!n.metadata)throw new Error("File paths must be declared for model, weights, and metadata.");this.filepaths=n,this.filetypes={model:"json",weights:"arraybuffer",metadata:"json"},this.headers=a,this.gpu=u,this.layerCallPauses=l,this.data={model:{},weights:null,metadata:[]},this.xhrs={model:null,weights:null,metadata:null},this.xhrProgress={model:0,weights:0,metadata:0},this.modelLayersMap=new Map,this.layersWithResults=[],this.modelDAG={},this.inputTensors={},this._ready=this.initialize(),this.isRunning=!1}return l(t,[{key:"ready",value:function(){return this._ready}},{key:"interrupt",value:function(){var t=this,e=["model","weights","metdata"];e.forEach(function(e){t.xhrs[e]&&(t.xhrs[e].abort(),t.xhrs[e]=null)})}},{key:"initialize",value:function(){var t=this,e=["model","weights","metadata"];return s.default.all(e.map(function(e){return t.dataRequest(e,t.headers)})).then(function(){return t.createLayers(),s.default.resolve()}).catch(function(e){console.log(e),t.interrupt()})}},{key:"dataRequest",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new s.default(function(n,o){var i=new XMLHttpRequest;i.open("GET",e.filepaths[t],!0),i.responseType=e.filetypes[t];var a=!0,s=!1,u=void 0;try{for(var l,f=(0,p.default)(r)[Symbol.iterator]();!(a=(l=f.next()).done);a=!0){var h=c(l.value,2),d=h[0],v=h[1];i.setRequestHeader(d,v)}}catch(t){s=!0,u=t}finally{try{!a&&f.return&&f.return()}finally{if(s)throw u}}i.onload=function(r){e.data[t]=i.response,e.xhrs[t]=null,e.xhrProgress[t]=100,n()},i.onprogress=function(r){if(r.lengthComputable){var n=Math.round(100*r.loaded/r.total);e.xhrProgress[t]=n}},i.onerror=function(t){return o(t)},i.send(null),e.xhrs[t]=i})}},{key:"getLoadingProgress",value:function(){var t=(0,x.default)(this.xhrProgress);return Math.round((0,j.default)(t)/t.length)}},{key:"createLayers",value:function(){var t=this,e=this.data.model.class_name,r=[];"Sequential"===e?r=this.data.model.config:"Model"===e&&(r=this.data.model.config.layers),r.forEach(function(n,o){var i=n.class_name,a=n.config;if(!(i in M))throw new Error("Layer "+i+" specified in model configuration is not implemented!");if("Sequential"===e&&0===o){var s="input",u=a.batch_input_shape.slice(1),c=new M.InputLayer({name:s,shape:u});t.modelLayersMap.set(s,c),t.modelDAG[s]={layerClass:"InputLayer",name:s,inbound:[],outbound:[]},t.inputTensors[s]=new T.default([],u)}else if("Model"===e&&"InputLayer"===i){var l=a.batch_input_shape.slice(1);t.inputTensors[a.name]=new T.default([],l)}var f=void 0;if("Bidirectional"===i||"TimeDistributed"===i){var p=(0,d.default)(a,function(t,e){return(0,y.default)(e)}),h=a.layer.config,v=a.layer.class_name,g=(0,d.default)(h,function(t,e){return(0,y.default)(e)});"activation"in g&&(g.activation=(0,y.default)(g.activation)),"innerActivation"in g&&(g.innerActivation=(0,y.default)(g.innerActivation)),g.gpu=t.gpu,f=new M[i](Object.assign(p,{layer:new M[v](g)}))}else{var b=(0,d.default)(a,function(t,e){return(0,y.default)(e)});"activation"in b&&(b.activation=(0,y.default)(b.activation)),"innerActivation"in b&&(b.innerActivation=(0,y.default)(b.innerActivation)),b.gpu=t.gpu,f=new M[i](b)}var m=[];if("Bidirectional"===i?!function(){var t=a.layer.config.name,e=t.replace(/forward/,"backward"),r=f.forwardLayer.params.map(function(e){return t+"_"+e}),n=f.backwardLayer.params.map(function(t){return e+"_"+t});m=r.concat(n)}():m="TimeDistributed"===i?f.layer.params.map(function(t){return a.layer.config.name+"_"+t}):f.params.map(function(t){return a.name+"_"+t}),m&&m.length){var w=m.map(function(e){var r=(0,_.default)(t.data.metadata,function(t){var r=new RegExp("^"+e);return t.layer_name===a.name&&r.test(t.weight_name)});if(!r)throw new Error("[Model] error loading weights.");var n=r.offset,o=r.length,i=r.shape;return new T.default(new Float32Array(t.data.weights,n,o),i)});f.setWeights(w)}if(t.modelLayersMap.set(a.name,f),t.modelDAG[a.name]={layerClass:i,name:a.name,inbound:[],outbound:[]},"Sequential"===e)if(0===o){var x="input";t.modelDAG[x].outbound.push(a.name),t.modelDAG[a.name].inbound.push(x)}else{var O=r[o-1].config;t.modelDAG[a.name].inbound.push(O.name),t.modelDAG[O.name].outbound.push(a.name)}else"Model"===e&&n.inbound_nodes&&n.inbound_nodes.length&&n.inbound_nodes[0].forEach(function(e){var r=e[0];t.modelDAG[a.name].inbound.push(r),t.modelDAG[r].outbound.push(a.name)})})}},{key:"toggleGpu",value:function(t){"undefined"==typeof t?this.gpu=!this.gpu:this.gpu=t;var e=!0,r=!1,n=void 0;try{for(var o,i=this.modelLayersMap.values()[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;a.toggleGpu(this.gpu)}}catch(t){r=!0,n=t}finally{try{!e&&i.return&&i.return()}finally{if(r)throw n}}}},{key:"traverseDAG",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,a.coroutine)(regeneratorRuntime.mark(function t(e){var r,n,o,i,a,u,c,l,f=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==e.length){t.next=4;break}return t.abrupt("return",!0);case 4:if(1!==e.length){t.next=35;break}if(r=e[0],n=this.modelDAG[r],o=n.layerClass,i=n.inbound,a=n.outbound,"InputLayer"===o){t.next=31;break}if(u=this.modelLayersMap.get(r),!u.visited){t.next=14;break}return t.abrupt("return",!1);case 14:if(c=i.map(function(t){return f.modelLayersMap.get(t)}),(0,P.default)(c.map(function(t){return t.hasResult}))){t.next=17;break}return t.abrupt("return",!1);case 17:if("Merge"!==o){t.next=21;break}u.result=u.call(c.map(function(t){return new T.default(t.result.tensor.data,t.result.tensor.shape)})),t.next=25;break;case 21:if(1===c.length){t.next=23;break}throw new Error("Layer name "+u.name+" has "+c.length+" inbound nodes, but is not a Merge layer.");case 23:l=c[0].result,u.result=u.call(new T.default(l.tensor.data,l.tensor.shape));case 25:if(u.hasResult=!0,u.visited=!0,this.layersWithResults.push(u.name),!this.layerCallPauses){t.next=31;break}return t.next=31,s.default.delay(0);case 31:return t.next=33,this.traverseDAG(a);case 33:t.next=37;break;case 35:return t.next=37,s.default.all(e.map(function(t){return f.traverseDAG([t])}));case 37:case"end":return t.stop()}},t,this)}));return t}()},{key:"predict",value:function(){function t(t){return e.apply(this,arguments)}var e=(0,a.coroutine)(regeneratorRuntime.mark(function t(e){var r,n,o,i,a,s,c,l,f,p,h,d,v,y=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isRunning=!0,r=(0,m.default)(this.inputTensors),(0,S.default)((0,m.default)(e),r)){t.next=5;break}throw this.isRunning=!1,new Error("predict() must take an object where the keys are the named inputs of the model: "+r+".");case 5:if((0,P.default)(r,function(t){return e[t]instanceof Float32Array})){t.next=8;break}throw this.isRunning=!1,new Error("predict() must take an object where the values are the flattened data as Float32Array.");case 8:for(this.layersWithResults=[],n=!0,o=!1,i=void 0,t.prev=12,a=this.modelLayersMap.values()[Symbol.iterator]();!(n=(s=a.next()).done);n=!0)c=s.value,c.hasResult=!1,c.visited=!1;t.next=20;break;case 16:t.prev=16,t.t0=t.catch(12),o=!0,i=t.t0;case 20:t.prev=20,t.prev=21,!n&&a.return&&a.return();case 23:if(t.prev=23,!o){t.next=26;break}throw i;case 26:return t.finish(23);case 27:return t.finish(20);case 28:return r.forEach(function(t){var r=y.modelLayersMap.get(t);y.inputTensors[t].replaceTensorData(e[t]),r.result=r.call(y.inputTensors[t]),r.hasResult=!0,r.visited=!0}),t.next=31,this.traverseDAG(r);case 31:if(l=this.data.model.class_name,"Sequential"!==l){t.next=41;break}return f=(0,_.default)((0,x.default)(this.modelDAG),function(t){return!t.outbound.length}),p=this.modelLayersMap.get(f.name),h=p.result,d={output:h.tensor.data},this.isRunning=!1,t.abrupt("return",d);case 41:if("Model"!==l){t.next=45;break}if(v=function(){var t=(0,x.default)(y.modelDAG).filter(function(t){return!t.outbound.length}),e={};return t.forEach(function(t){var r=y.modelLayersMap.get(t.name),n=r.result;e[t.name]=n.tensor.data}),y.isRunning=!1,{v:e}}(),"object"!==("undefined"==typeof v?"undefined":u(v))){t.next=45;break}return t.abrupt("return",v.v);case 45:case"end":return t.stop()}},t,this,[[12,16,20,28],[21,,23,27]])}));return t}()}]),t}();e.default=R},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=document.createElement("canvas"),n=r.getContext("webgl")||r.getContext("experimental-webgl");if(!n)throw new Error("Unable to initialize WebGL. Your browser may not support it.");e.MAX_TEXTURE_SIZE=n.getParameter(n.MAX_TEXTURE_SIZE)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(122),f=n(l),p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="InputLayer";var n=t.shape,a=void 0===n?[]:n;return r.shape=t.batchInputShape&&t.batchInputShape.length?t.batchInputShape.slice(1):a,r}return a(e,t),s(e,[{key:"call",value:function(t){if(!(0,f.default)(t.tensor.shape,this.shape))throw new Error("[InputLayer] input tensor shape "+t.tensor.shape+" does not match specified shape "+this.shape+".");return t}}]),e}(c.default);e.default=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");
}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(25),f=n(l),p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));h.call(r),r.layerClass="ELU";var n=t.alpha,a=void 0===n?1:n;return r.alpha=a,r}return a(e,t),s(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.alpha),t}}]),e}(c.default),h=function(){this._compute=(0,f.default)({args:["array","scalar"],body:function(t,e){t=Math.max(t,0)+e*(Math.exp(Math.min(t,0))-1)}})};e.default=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(19),f=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="LeakyReLU";var n=t.alpha,a=void 0===n?.3:n;return r.alpha=a,r}return a(e,t),s(e,[{key:"call",value:function(t){return(0,l.relu)(t,{alpha:this.alpha}),t}}]),e}(c.default);e.default=f},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(25),f=n(l),p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._compute=(0,f.default)({args:["array","array"],body:function(t,e){t=Math.max(t,0)+e*Math.min(t,0)}}),r.layerClass="PReLU",r.params=["alphas"],r}return a(e,t),s(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.weights.alphas.tensor),t}}]),e}(c.default);e.default=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(25),f=n(l),p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._compute=(0,f.default)({args:["array","array","array"],body:function(t,e,r){t=e*Math.log(1+Math.exp(r*t))}}),r.layerClass="ParametricSoftplus",r.params=["alphas","betas"],r}return a(e,t),s(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.weights.alphas.tensor,this.weights.betas.tensor),t}}]),e}(c.default);e.default=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(25),f=n(l),p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._compute=(0,f.default)({args:["array","array","array","array","array"],body:function(t,e,r,n,o){t=e+Math.min(Math.max(t-e,0),Math.abs(n))+r*Math.min(t-e,0)+Math.max(t-(e+Math.abs(n)),0)*o}}),r.layerClass="SReLU",r.params=["t_left","a_left","t_right","a_right"],r}return a(e,t),s(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.weights.t_left.tensor,this.weights.a_left.tensor,this.weights.t_right.tensor,this.weights.a_right.tensor),t}}]),e}(c.default);e.default=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(25),f=n(l),p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));h.call(r),r.layerClass="ThresholdedReLU";var n=t.theta,a=void 0===n?1:n;return r.theta=a,r}return a(e,t),s(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.theta),t}}]),e}(c.default),h=function(){this._compute=(0,f.default)({args:["array","scalar"],body:function(t,e){t*=Number(t>e)}})};e.default=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.SReLU=e.ThresholdedReLU=e.ParametricSoftplus=e.ELU=e.PReLU=e.LeakyReLU=void 0;var o=r(195),i=n(o),a=r(196),s=n(a),u=r(194),c=n(u),l=r(197),f=n(l),p=r(199),h=n(p),d=r(198),v=n(d);e.LeakyReLU=i.default,e.PReLU=s.default,e.ELU=c.default,e.ParametricSoftplus=f.default,e.ThresholdedReLU=h.default,e.SReLU=v.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(3),l=n(c),f=r(65),p=n(f),h=r(4),d=n(h),v=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="AtrousConvolution2D";var n=t.atrousRate,a=void 0===n?[1,1]:n;return r.atrousRate=a,r}return a(e,t),u(e,[{key:"_calcOutputShape",value:function(t){var e=t.tensor.shape[0],r=t.tensor.shape[1],n=s(this.kernelShape,3),o=n[0],i=n[1],a=n[2],u=i+(i-1)*(this.atrousRate[0]-1),c=a+(a-1)*(this.atrousRate[1]-1),l="same"===this.borderMode?Math.floor((e+this.subsample[0]-1)/this.subsample[0]):Math.floor((e-u+this.subsample[0])/this.subsample[0]),f="same"===this.borderMode?Math.floor((r+this.subsample[1]-1)/this.subsample[1]):Math.floor((r-c+this.subsample[1])/this.subsample[1]),p=o,h="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.subsample[0]+u-e)):0,d="same"===this.borderMode?Math.max(0,Math.floor((f-1)*this.subsample[1]+c-r)):0,v=Math.floor(h/2),y=h-v,g=Math.floor(d/2),_=d-g;this.outputShape=[l,f,p],this.inputPadding=[v,y,g,_]}},{key:"_im2col",value:function(t){var e=s(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=this.kernelShape[1],a=this.kernelShape[2],u=this.outputShape[0],c=this.outputShape[1],f=u*c,p=i*a*o,h=i+(i-1)*(this.atrousRate[0]-1),v=a+(a-1)*(this.atrousRate[1]-1);this._imColsMat||(this._imColsMat=new l.default([],[f,p]));for(var y=new l.default([],[i,a,o]),g=0,_=0,b=r-h;_<=b;_+=this.subsample[0])for(var m=0,w=n-v;m<=w;m+=this.subsample[1])d.default.assign(y.tensor,t.tensor.hi(_+h,m+v,o).lo(_,m,0).step(this.atrousRate[0],this.atrousRate[1],1)),this._imColsMat.tensor.data.set(y.tensor.data,g),g+=p;return this._useWeblas&&this._imColsMat.createWeblasTensor(),this._imColsMat}}]),e}(p.default);e.default=v},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(65),f=n(l),p=r(124),h=n(p),d=r(125),v=n(d),y=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Convolution1D";var n=t.nbFilter,a=void 0===n?1:n,s=t.filterLength,u=void 0===s?1:s,c=t.activation,l=void 0===c?"linear":c,p=t.borderMode,h=void 0===p?"valid":p,d=t.subsampleLength,v=void 0===d?1:d,y=t.bias,g=void 0===y||y;if("valid"!==h&&"same"!==h)throw new Error(r.name+" [Convolution1D layer] Invalid borderMode.");r.params=r.bias?["W","b"]:["W"];var _={nbFilter:a,nbRow:u,nbCol:1,activation:l,borderMode:h,subsample:[v,1],dimOrdering:"th",bias:g};return r._conv2d=new f.default(Object.assign(_,{gpu:t.gpu})),r}return a(e,t),s(e,[{key:"setWeights",value:function(t){this._conv2d.setWeights(t)}},{key:"call",value:function(t){t.tensor=(0,v.default)(t.tensor).transpose(1,0,2);var e=this._conv2d.call(t);return t.tensor=(0,h.default)(e.tensor).transpose(1,0,2),t}}]),e}(c.default);e.default=y},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),l=function t(e,r,n){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,r);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,r,n)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(n)},f=r(19),p=o(f),h=r(3),d=n(h),v=r(1),y=n(v),g=r(4),_=n(g),b=r(63),m=n(b),w=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Convolution3D";var n=t.nbFilter,o=void 0===n?1:n,s=t.kernelDim1,u=void 0===s?1:s,c=t.kernelDim2,l=void 0===c?1:c,f=t.kernelDim3,h=void 0===f?1:f,d=t.activation,v=void 0===d?"linear":d,y=t.borderMode,g=void 0===y?"valid":y,_=t.subsample,b=void 0===_?[1,1,1]:_,m=t.dimOrdering,w=void 0===m?"tf":m,x=t.bias,O=void 0===x||x;if(r.kernelShape=[o,u,l,h],r.activation=p[v],"valid"!==g&&"same"!==g)throw new Error(r.name+" [Convolution3D layer] Invalid borderMode.");if(r.borderMode=g,r.subsample=b,"tf"!==w&&"th"!==w)throw new Error(r.name+" [Convolution3D layer] Only tf and th dim ordering are allowed.");return r.dimOrdering=w,r.bias=O,r.params=r.bias?["W","b"]:["W"],r}return s(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,4,1,0)),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t),this._wRowsMat=this._w2row(),this._useWeblas&&(this._wRowsMat.createWeblasTensor(),this._wRowsMat.weblasTensor=this._wRowsMat.weblasTensor.transpose(),this.bias?this.weights.b.createWeblasTensor():(this._zerosVec=new d.default([],[this.weights.W.tensor.shape[4]]),this._zerosVec.createWeblasTensor()))}},{key:"_calcOutputShape",value:function(t){var e=t.tensor.shape[0],r=t.tensor.shape[1],n=t.tensor.shape[2],o=u(this.kernelShape,4),i=o[0],a=o[1],s=o[2],c=o[3],l="same"===this.borderMode?Math.floor((e+this.subsample[0]-1)/this.subsample[0]):Math.floor((e-a+this.subsample[0])/this.subsample[0]),f="same"===this.borderMode?Math.floor((r+this.subsample[1]-1)/this.subsample[1]):Math.floor((r-s+this.subsample[1])/this.subsample[1]),p="same"===this.borderMode?Math.floor((n+this.subsample[2]-1)/this.subsample[2]):Math.floor((n-c+this.subsample[2])/this.subsample[2]),h=i,d="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.subsample[0]+a-e)):0,v="same"===this.borderMode?Math.max(0,Math.floor((f-1)*this.subsample[1]+s-r)):0,y="same"===this.borderMode?Math.max(0,Math.floor((p-1)*this.subsample[2]+c-n)):0,g=Math.floor(d/2),_=d-g,b=Math.floor(v/2),m=v-b,w=Math.floor(y/2),x=y-w;this.outputShape=[l,f,p,h],this.inputPadding=[g,_,b,m,w,x]}},{key:"_padInput",value:function(t){if("same"===this.borderMode){var e=u(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=u(this.inputPadding,6),s=a[0],c=a[1],l=a[2],f=a[3],p=a[4],h=a[5],v=r+s+c,y=n+l+f,g=o+p+h,b=new d.default([],[v,y,g,i]);_.default.assign(b.tensor.hi(r+s,n+l,o+p,i).lo(s,l,p,0),t.tensor),t.tensor=b.tensor}return t}},{key:"_vol2col",value:function(t){var e=u(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=this.kernelShape[1],s=this.kernelShape[2],c=this.kernelShape[3],l=this.outputShape[0],f=this.outputShape[1],p=this.outputShape[2],h=l*f*p,v=a*s*c*i;if(this._volColsMat||(this._volColsMat=new d.default([],[h,v])),1===a&&1===s&&1===c&&1===this.subsample[0]&&1===this.subsample[1]&&1===this.subsample[2])return this._volColsMat.replaceTensorData(t.tensor.data),this._useWeblas&&this._volColsMat.createWeblasTensor(),this._volColsMat;for(var y=new d.default([],[a,s,c,i]),g=0,b=0,m=r-a;b<=m;b+=this.subsample[0])for(var w=0,x=n-s;w<=x;w+=this.subsample[1])for(var O=0,j=o-c;O<=j;O+=this.subsample[2])_.default.assign(y.tensor,t.tensor.hi(b+a,w+s,O+c,i).lo(b,w,O,0)),this._volColsMat.tensor.data.set(y.tensor.data,g),g+=v;return this._useWeblas&&this._volColsMat.createWeblasTensor(),this._volColsMat}},{key:"_w2row",value:function(){for(var t=this.weights.W.tensor.shape[3],e=u(this.kernelShape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=n*o*i*t,s=new d.default([],[a,r]),c=new d.default([],[n,o,i,t]),l=new d.default([],[a]),f=0;f<r;f++)_.default.assign(c.tensor,this.weights.W.tensor.pick(null,null,null,null,f)),l.replaceTensorData(c.tensor.data),_.default.assign(s.tensor.pick(null,f),l.tensor);return s}},{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,3,0)),this._calcOutputShape(t),this._padInput(t),this._vol2col(t);var e=this.kernelShape[0],r=this.outputShape[0],n=this.outputShape[1],o=this.outputShape[2],i=r*n*o,a=new d.default([],[i,e]);if(!this._useWeblas||this._volColsMat._gpuMaxSizeExceeded||this._wRowsMat._gpuMaxSizeExceeded){if(this.bias)for(var s=0;s<e;s++)_.default.assigns(a.tensor.pick(null,s),this.weights.b.tensor.get(s));(0,m.default)(a.tensor,this._volColsMat.tensor,this._wRowsMat.tensor,1,1)}else{var u=this.bias?this.weights.b.weblasTensor:this._zerosVec.weblasTensor;a.tensor.data=weblas.pipeline.sgemm(1,this._volColsMat.weblasTensor,this._wRowsMat.weblasTensor,1,u).transfer()}for(var c=new d.default([],this.outputShape),l=new d.default([],[r*n*o]),f=new d.default([],[r,n,o]),p=0;p<e;p++)_.default.assign(l.tensor,a.tensor.pick(null,p)),f.replaceTensorData(l.tensor.data),_.default.assign(c.tensor.pick(null,null,null,p),f.tensor);return t.tensor=c.tensor,this.activation(t),"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(3,0,1,2)),t}}]),e}(y.default);e.default=w},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),l=function t(e,r,n){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,r);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,r,n)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(n)},f=r(19),p=o(f),h=r(3),d=n(h),v=r(1),y=n(v),g=r(4),_=n(g),b=r(63),m=n(b),w=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Deconvolution2D";var n=t.nbFilter,o=void 0===n?1:n,s=t.nbRow,u=void 0===s?1:s,c=t.nbCol,l=void 0===c?1:c,f=t.outputShape,h=void 0===f?[]:f,d=t.activation,v=void 0===d?"linear":d,y=t.borderMode,g=void 0===y?"valid":y,_=t.subsample,b=void 0===_?[1,1]:_,m=t.dimOrdering,w=void 0===m?"tf":m,x=t.bias,O=void 0===x||x;if(r.kernelShape=[o,u,l],null==h[0]?r.outputShape=h.slice(1):r.outputShape=h,r.activation=p[v],"valid"!==g&&"same"!==g)throw new Error(r.name+" [Deconvolution2D layer] Invalid borderMode.");if(r.borderMode=g,r.subsample=b,"tf"!==w&&"th"!==w)throw new Error(r.name+" [Deconvolution2D layer] Only tf and th dim ordering are allowed.");return r.dimOrdering=w,r.bias=O,r.params=r.bias?["W","b"]:["W"],r}return s(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,1,0)),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t),this._wRowsMat=this._w2row(),this._useWeblas&&(this._wRowsMat.createWeblasTensor(),this._wRowsMat.weblasTensor=this._wRowsMat.weblasTensor.transpose())}},{key:"_calcOutputPadding",value:function(t){var e=t.tensor.shape[0],r=t.tensor.shape[1],n=this.kernelShape[1],o=this.kernelShape[2],i=this.outputShape[0],a=this.outputShape[1],s="same"===this.borderMode?Math.max(0,Math.floor((e-1)*this.subsample[0]+n-i)):0,u="same"===this.borderMode?Math.max(0,Math.floor((r-1)*this.subsample[1]+o-a)):0,c=Math.floor(s/2),l=s-c,f=Math.floor(u/2),p=u-f;this.outputPadding=[c,l,f,p]}},{key:"_im2col",value:function(t){for(var e=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=new d.default([],[r*n,o]),a=new d.default([],[r*n]),s=new d.default([],[r,n]),c=0;c<o;c++)_.default.assign(s.tensor,t.tensor.pick(null,null,c)),a.replaceTensorData(s.tensor.data),_.default.assign(i.tensor.pick(null,c),a.tensor);return i}},{key:"_w2row",value:function(){for(var t=u(this.weights.W.tensor.shape,4),e=t[0],r=t[1],n=t[2],o=t[3],i=new d.default([],[n,e*r*o]),a=new d.default([],[e*r*o]),s=new d.default([],[e,r,o]),c=0;c<n;c++)_.default.assign(s.tensor,this.weights.W.tensor.pick(null,null,c,null)),a.replaceTensorData(s.tensor.data),_.default.assign(i.tensor.pick(c,null),a.tensor);return i}},{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0));var e=this._im2col(t);this._useWeblas&&e.createWeblasTensor();var r=t.tensor.shape[0],n=t.tensor.shape[1],o=u(this.kernelShape,3),i=o[0],a=o[1],s=o[2],c=new d.default([],[r*n,a*s*i]);if(!this._useWeblas||e._gpuMaxSizeExceeded||this._wRowsMat._gpuMaxSizeExceeded)(0,m.default)(c.tensor,e.tensor,this._wRowsMat.tensor,1,1);else{var l=new d.default([],[this.weights.W.tensor.shape[3]]);l.createWeblasTensor(),c.tensor.data=weblas.pipeline.sgemm(1,e.weblasTensor,this._wRowsMat.weblasTensor,0,l).transfer(),e.weblasTensor.delete(),delete e.weblasTensor}this._calcOutputPadding(t);var f=u(this.outputPadding,4),p=f[0],h=f[1],v=f[2],y=f[3],g=new d.default([],this.outputShape),b=new d.default([],[this.outputShape[0]+p+h,this.outputShape[1]+v+y,this.outputShape[2]]);if(this.bias)for(var w=0;w<i;w++)_.default.assigns(b.tensor.pick(null,null,w),this.weights.b.tensor.get(w));for(var x=[a,s,i],O=new d.default([],x),j=new d.default([],[a*s*i]),E=0,S=0;S<r;S++)for(var k=0;k<n;k++){_.default.assign(j.tensor,c.tensor.pick(E,null)),O.replaceTensorData(j.tensor.data);var P=S*this.subsample[0],A=k*this.subsample[1];_.default.addeq(b.tensor.hi(P+a,A+s,this.outputShape[2]).lo(P,A,0),O.tensor),E+=1}return _.default.assign(g.tensor,b.tensor.hi(this.outputShape[0]+p,this.outputShape[1]+v,this.outputShape[2]).lo(p,v,0)),t.tensor=g.tensor,this.activation(t),"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(2,0,1)),t}}]),e}(y.default);e.default=w},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),l=r(19),f=o(l),p=r(3),h=n(p),d=r(1),v=n(d),y=r(65),g=n(y),_=r(4),b=n(_),m=r(63),w=n(m),x=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return s(e,t),c(e,[{key:"_im2col",value:function(t){var e=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=this.kernelShape[1],a=this.kernelShape[2],s=this.outputShape[0],c=this.outputShape[1],l=s*c,f=i*a;this._imColsMat||(this._imColsMat=new h.default([],[l*o,f]));for(var p=new h.default([],[i,a,1]),d=0,v=0;v<o;v++)for(var y=0,g=r-i;y<=g;y+=this.subsample[0])for(var _=0,m=n-a;_<=m;_+=this.subsample[1])b.default.assign(p.tensor,t.tensor.hi(y+i,_+a,v+1).lo(y,_,v)),this._imColsMat.tensor.data.set(p.tensor.data,d),d+=f;return this._useWeblas&&this._imColsMat.createWeblasTensor(),this._imColsMat}},{key:"_w2row",value:function(){var t=this.weights.W.tensor.shape[2],e=u(this.kernelShape,3),r=e[0],n=e[1],o=e[2],i=n*o;this._wRowsMat=new h.default([],[i,r*t]);for(var a=new h.default([],[n,o]),s=new h.default([],[i]),c=0,l=0;l<t;l++)for(var f=0;f<r;f++)b.default.assign(a.tensor,this.weights.W.tensor.pick(null,null,l,f)),s.replaceTensorData(a.tensor.data),b.default.assign(this._wRowsMat.tensor.pick(null,c),s.tensor),c+=1;return this._wRowsMat}},{key:"call",value:function(t){this._calcOutputShape(t),this._padInput(t),this._im2col(t);var e=this.kernelShape[0],r=this.outputShape[0],n=this.outputShape[1],o=r*n,i=new h.default([],[o*t.tensor.shape[2],e*t.tensor.shape[2]]);!this._useWeblas||this._imColsMat._gpuMaxSizeExceeded||this._wRowsMat._gpuMaxSizeExceeded?(0,w.default)(i.tensor,this._imColsMat.tensor,this._wRowsMat.tensor,1,1):i.tensor.data=weblas.pipeline.sgemm(1,this._imColsMat.weblasTensor,this._wRowsMat.weblasTensor,1,this._zerosVec.weblasTensor).transfer();for(var a=new h.default([],[r,n,t.tensor.shape[2]*e]),s=r*n*t.tensor.shape[2]*e,u=new Float32Array(s),c=0;c<t.tensor.shape[2];c++)for(var l=0,f=c*s+c*e,p=(c+1)*s;f<p;l++,f+=e*t.tensor.shape[2])for(var d=0;d<e;d++)u[f+d-c*s]=i.tensor.data[f+d];return a.replaceTensorData(u),t.tensor=a.tensor,t}}]),e}(g.default),O=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="SeparableConvolution2D";var n=t.nbFilter,o=void 0===n?1:n,s=t.nbRow,u=void 0===s?1:s,c=t.nbCol,l=void 0===c?1:c,p=t.activation,h=void 0===p?"linear":p,d=t.borderMode,v=void 0===d?"valid":d,y=t.subsample,g=void 0===y?[1,1]:y,_=t.depthMultiplier,b=void 0===_?1:_,m=t.dimOrdering,w=void 0===m?"tf":m,x=t.bias,O=void 0===x||x;if(r.activation=f[h],"valid"!==v&&"same"!==v)throw new Error(r.name+" [SeparableConvolution2D layer] Invalid borderMode.");if(r.borderMode=v,r.subsample=g,r.depthMultiplier=b,"tf"!==w&&"th"!==w)throw new Error(r.name+" [SeparableConvolution2D layer] Only tf and th dim ordering are allowed.");return r.dimOrdering=w,r.bias=O,r.params=r.bias?["depthwise_kernel","pointwise_kernel","b"]:["depthwise_kernel","pointwise_kernel"],r.depthwiseConvAttrs={nbFilter:r.depthMultiplier,nbRow:u,nbCol:l,activation:"linear",borderMode:v,subsample:g,dimOrdering:w,bias:!1,gpu:t.gpu},r.pointwiseConvAttrs={nbFilter:o,nbRow:1,nbCol:1,activation:"linear",borderMode:v,subsample:[1,1],dimOrdering:w,bias:r.bias,gpu:t.gpu},r}return s(e,t),c(e,[{key:"setWeights",value:function(t){this._depthwiseConv=new x(this.depthwiseConvAttrs),this._depthwiseConv.setWeights(t.slice(0,1)),this._pointwiseConv=new g.default(this.pointwiseConvAttrs),
this._pointwiseConv.setWeights(t.slice(1,3))}},{key:"call",value:function(t){var e=this._depthwiseConv.call(t),r=this._pointwiseConv.call(e);return t.tensor=r.tensor,this.activation(t),t}}]),e}(v.default);e.default=O},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="UpSampling1D";var n=t.length,a=void 0===n?2:n;return r.length=a,r}return a(e,t),s(e,[{key:"call",value:function(t){for(var e=t.tensor.shape,r=[e[0]*this.length,e[1]],n=new f.default([],r),o=0;o<this.length;o++)h.default.assign(n.tensor.lo(o,0).step(this.length,1),t.tensor);return t.tensor=n.tensor,t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="UpSampling2D";var n=t.size,a=void 0===n?[2,2]:n,s=t.dimOrdering,u=void 0===s?"tf":s;return r.size=a,r.dimOrdering=u,r}return a(e,t),s(e,[{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0));for(var e=t.tensor.shape,r=[e[0]*this.size[0],e[1]*this.size[1],e[2]],n=new f.default([],r),o=0;o<this.size[0];o++)for(var i=0;i<this.size[1];i++)h.default.assign(n.tensor.lo(o,i,0).step(this.size[0],this.size[1],1),t.tensor);return t.tensor=n.tensor,"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(2,0,1)),t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="UpSampling3D";var n=t.size,a=void 0===n?[2,2,2]:n,s=t.dimOrdering,u=void 0===s?"tf":s;return r.size=a,r.dimOrdering=u,r}return a(e,t),s(e,[{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,3,0));for(var e=t.tensor.shape,r=[e[0]*this.size[0],e[1]*this.size[1],e[2]*this.size[2],e[3]],n=new f.default([],r),o=0;o<this.size[0];o++)for(var i=0;i<this.size[1];i++)for(var a=0;a<this.size[2];a++)h.default.assign(n.tensor.lo(o,i,a,0).step(this.size[0],this.size[1],this.size[2],1),t.tensor);return t.tensor=n.tensor,"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(3,0,1,2)),t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="ZeroPadding1D";var n=t.padding,a=void 0===n?1:n;return r.padding=a,r}return a(e,t),s(e,[{key:"call",value:function(t){var e=t.tensor.shape,r=[e[0]+2*this.padding,e[1]],n=new f.default([],r);return h.default.assign(n.tensor.hi(e[0]+this.padding,e[1]).lo(this.padding,0),t.tensor),t.tensor=n.tensor,t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="ZeroPadding2D";var n=t.padding,a=void 0===n?[1,1]:n,s=t.dimOrdering,u=void 0===s?"tf":s;return r.padding=a,r.dimOrdering=u,r}return a(e,t),s(e,[{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0));var e=t.tensor.shape,r=[e[0]+2*this.padding[0],e[1]+2*this.padding[1],e[2]],n=new f.default([],r);return h.default.assign(n.tensor.hi(e[0]+this.padding[0],e[1]+this.padding[1],e[2]).lo(this.padding[0],this.padding[1],0),t.tensor),t.tensor=n.tensor,"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(2,0,1)),t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="ZeroPadding3D";var n=t.padding,a=void 0===n?[1,1,1]:n,s=t.dimOrdering,u=void 0===s?"tf":s;return r.padding=a,r.dimOrdering=u,r}return a(e,t),s(e,[{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,3,0));var e=t.tensor.shape,r=[e[0]+2*this.padding[0],e[1]+2*this.padding[1],e[2]+2*this.padding[2],e[3]],n=new f.default([],r);return h.default.assign(n.tensor.hi(e[0]+this.padding[0],e[1]+this.padding[1],e[2]+this.padding[2],e[3]).lo(this.padding[0],this.padding[1],this.padding[2],0),t.tensor),t.tensor=n.tensor,"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(3,0,1,2)),t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.ZeroPadding3D=e.ZeroPadding2D=e.ZeroPadding1D=e.UpSampling3D=e.UpSampling2D=e.UpSampling1D=e.Convolution3D=e.Deconvolution2D=e.SeparableConvolution2D=e.AtrousConvolution2D=e.Convolution2D=e.Convolution1D=void 0;var o=r(202),i=n(o),a=r(65),s=n(a),u=r(201),c=n(u),l=r(205),f=n(l),p=r(204),h=n(p),d=r(203),v=n(d),y=r(206),g=n(y),_=r(207),b=n(_),m=r(208),w=n(m),x=r(209),O=n(x),j=r(210),E=n(j),S=r(211),k=n(S);e.Convolution1D=i.default,e.Convolution2D=s.default,e.AtrousConvolution2D=c.default,e.SeparableConvolution2D=f.default,e.Deconvolution2D=h.default,e.Convolution3D=v.default,e.UpSampling1D=g.default,e.UpSampling2D=b.default,e.UpSampling3D=w.default,e.ZeroPadding1D=O.default,e.ZeroPadding2D=E.default,e.ZeroPadding3D=k.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(19),l=o(c),f=r(1),p=n(f),h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Activation";var n=t.activation,o=void 0===n?"linear":n;return r.activation=l[o],r}return s(e,t),u(e,[{key:"call",value:function(t){return this.activation(t),t}}]),e}(p.default);e.default=h},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=function t(e,r,n){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,r);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,r,n)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(n)},l=r(19),f=o(l),p=r(3),h=n(p),d=r(1),v=n(d),y=r(56),g=r(4),_=n(g),b=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Dense";var n=t.outputDim,o=void 0===n?1:n,s=t.activation,u=void 0===s?"linear":s,c=t.inputDim,l=void 0===c?null:c,p=t.bias,h=void 0===p||p;return r.activation=f[u],r.outputDim=o,r.inputDim=l,r.bias=h,r.params=r.bias?["W","b"]:["W"],r.inputDim&&(r.inputShape=[r.inputDim]),r}return s(e,t),u(e,[{key:"setWeights",value:function(t){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t),this._useWeblas&&(this.weights.W.createWeblasTensor(),this.weights.W.weblasTensor=this.weights.W.weblasTensor.transpose(),this.bias?this.weights.b.createWeblasTensor():(this._zerosVec=new h.default([],[this.weights.W.tensor.shape[1]]),this._zerosVec.createWeblasTensor()))}},{key:"call",value:function(t){var e=new h.default([],[this.outputDim]);if(this._useWeblas&&t.createWeblasTensor(),!this._useWeblas||t._gpuMaxSizeExceeded||this.weights.W._gpuMaxSizeExceeded)this.bias&&_.default.assign(e.tensor,this.weights.b.tensor),(0,y.gemv)(1,this.weights.W.tensor.transpose(1,0),t.tensor,1,e.tensor);else{var r=this.bias?this.weights.b.weblasTensor:this._zerosVec.weblasTensor;e.tensor.data=weblas.pipeline.sgemm(1,t.weblasTensor,this.weights.W.weblasTensor,1,r).transfer(),t.weblasTensor.delete(),delete t.weblasTensor}return t.tensor=e.tensor,this.activation(t),t}}]),e}(v.default);e.default=b},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Dropout";var n=t.p,a=void 0===n?.5:n;return r.p=Math.min(Math.max(0,a),1),r}return a(e,t),s(e,[{key:"call",value:function(t){return t}}]),e}(c.default);e.default=l},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(3),c=n(u),l=r(1),f=n(l),p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="Flatten",r}return a(e,t),s(e,[{key:"call",value:function(t){if(t.tensor.shape.length>1){var e=new c.default([],[t.tensor.shape.reduce(function(t,e){return t*e},1)]);e.replaceTensorData(t.tensor.data),t.tensor=e.tensor}return t}}]),e}(f.default);e.default=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(19),l=o(c),f=r(3),p=n(f),h=r(1),d=n(h),v=r(56),y=r(4),g=n(y),_=r(25),b=n(_),m=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._computeOutput=(0,b.default)({args:["array","array","array"],body:function(t,e,r){t=e*r+(1-r)*t}}),r.layerClass="Highway";var n=t.transformBias,o=void 0===n?-2:n,s=t.activation,u=void 0===s?"linear":s,c=t.bias,f=void 0===c||c;return r.transformBias=o,r.activation=l[u],r.bias=f,r.params=r.bias?["W","b","W_carry","b_carry"]:["W","W_carry"],r}return s(e,t),u(e,[{key:"call",value:function(t){var e=new p.default([],[this.weights.W.tensor.shape[1]]);this.bias&&g.default.assign(e.tensor,this.weights.b.tensor),(0,v.gemv)(1,this.weights.W.tensor.transpose(1,0),t.tensor,1,e.tensor),this.activation(e);var r=new p.default([],[this.weights.W_carry.tensor.shape[1]]);return this.bias&&g.default.assign(r.tensor,this.weights.b_carry.tensor),(0,v.gemv)(1,this.weights.W_carry.tensor.transpose(1,0),t.tensor,1,r.tensor),l.sigmoid(r),this._computeOutput(t.tensor,e.tensor,r.tensor),t}}]),e}(d.default);e.default=m},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(3),c=n(u),l=r(1),f=n(l),p=r(56),h=r(4),d=n(h),v=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="MaxoutDense";var n=t.outputDim,a=void 0===n?1:n,s=t.inputDim,u=void 0===s?null:s,c=t.bias,l=void 0===c||c;return r.outputDim=a,r.inputDim=u,r.bias=l,r.params=r.bias?["W","b"]:["W"],r}return a(e,t),s(e,[{key:"call",value:function(t){for(var e=this.weights.W.tensor.shape[0],r=new c.default([],[this.outputDim]),n=0;n<e;n++){var o=new c.default([],[this.outputDim]);this.bias&&d.default.assign(o.tensor,this.weights.b.tensor.pick(n,null)),(0,p.gemv)(1,this.weights.W.tensor.pick(n,null,null).transpose(1,0),t.tensor,1,o.tensor),d.default.maxeq(r.tensor,o.tensor)}return t.tensor=r.tensor,t}}]),e}(f.default);e.default=v},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(3),c=n(u),l=r(1),f=n(l),p=r(63),h=n(p),d=r(4),v=n(d),y=r(125),g=n(y),_=r(589),b=n(_),m=r(122),w=n(m),x=r(551),O=n(x),j=r(556),E=n(j),S=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Merge";var n=t.mode,a=void 0===n?"sum":n,s=t.concatAxis,u=void 0===s?-1:s,c=t.dotAxes,l=void 0===c?-1:c,f=t.outputShape,p=void 0===f?null:f,h=t.outputMask,d=void 0===h?null:h,v=["sum","mul","concat","ave","cos","dot","max"];if(!(v.indexOf(a)>-1))throw new Error(r.name+" [Merge layer] "+a+" not available.");return r.mode=a,r.concatAxis=u<=0?u:u-1,r.dotAxes=l<=0?l:l-1,r.outputShape=p,r.outputMask=d,r}return a(e,t),s(e,[{key:"_validateInputs",value:function(t){var e=this,r=t.map(function(t){return t.tensor.shape.slice()});if(["sum","mul","ave","cos","max"].indexOf(this.mode)>-1&&!r.every(function(t){return(0,w.default)(t,r[0])}))throw new Error(this.name+" [Merge layer] All input shapes must be the same for mode "+this.mode+".");if(["cos","dot"].indexOf(this.mode)>-1){if(2!==t.length)throw new Error(this.name+" [Merge layer] Exactly 2 inputs required for mode "+this.mode+".");if((0,O.default)(this.dotAxes)&&(this.dotAxes<0?this.dotAxes=[r[0].length+this.dotAxes,r[1].length+this.dotAxes]:this.dotAxes=[this.dotAxes,this.dotAxes]),r[0][this.dotAxes[0]]!==r[1][this.dotAxes[1]])throw new Error(this.name+" [Merge layer] Dimensions incompatibility using dot mode.")}else"concat"===this.mode&&!function(){var t=r.slice(),n=e.concatAxis<0?t[0].length+e.concatAxis:e.concatAxis;if(0===e.concatAxis&&(n=0),(0,E.default)(t.length).forEach(function(e){t[e].splice(n,1)}),!t.every(function(e){return(0,w.default)(e,t[0])}))throw new Error(e.name+" [Merge layer] In concat mode, all shapes must be the same except along the concat axis.")}();return!0}},{key:"call",value:function(t){var e=this,r=this._validateInputs(t);if(!r)throw new Error(this.name+" [Merge layer] Invalid inputs to call method.");var n=void 0,o=void 0;if(["sum","mul","ave","max"].indexOf(this.mode)>-1)o=t[0].tensor.shape.slice(),n=new c.default([],o);else if("concat"===this.mode)!function(){o=t[0].tensor.shape.slice();var r=e.concatAxis<0?o.length+e.concatAxis:e.concatAxis;0===e.concatAxis&&(r=0),t.slice(1,t.length).forEach(function(t){var e=t.tensor.shape.slice()[r];o[r]+=e}),n=new c.default([],o)}();else if(["cos","dot"].indexOf(this.mode)>-1){var i=t[0].tensor.shape.slice(),a=t[1].tensor.shape.slice();i.splice(this.dotAxes[0],1),a.splice(this.dotAxes[1],1),o=i.concat(a),1===o.length&&o.push(1),n=new c.default([],o)}if("sum"===this.mode)for(var s=0;s<t.length;s++)v.default.addeq(n.tensor,t[s].tensor);else if("mul"===this.mode){v.default.assigns(n.tensor,1);for(var u=0;u<t.length;u++)v.default.muleq(n.tensor,t[u].tensor)}else if("ave"===this.mode){for(var l=0;l<t.length;l++)v.default.addeq(n.tensor,t[l].tensor);v.default.divseq(n.tensor,t.length)}else if("max"===this.mode){v.default.assign(n.tensor,t[0].tensor);for(var f=1;f<t.length;f++)v.default.maxeq(n.tensor,t[f].tensor)}else if("concat"===this.mode){var p=this.concatAxis<0?t[0].tensor.shape.length+this.concatAxis:this.concatAxis;0===this.concatAxis&&(p=0),0===p?(0,b.default)(n.tensor,t.map(function(t){return t.tensor})):!function(){for(var e,r=[p],o=0;o<t[0].tensor.shape.length;o++)o!==p&&r.push(o);(0,b.default)((e=n.tensor).transpose.apply(e,r),t.map(function(t){var e;return(e=t.tensor).transpose.apply(e,r)}))}()}else if("dot"===this.mode){if(2!==t[0].tensor.shape.length||2!==t[1].tensor.shape.length)throw new Error(this.name+" [Merge layer] dot mode for 3+ dim tensors not yet implemented.");0===this.dotAxes[0]&&0===this.dotAxes[1]?(0,h.default)(n.tensor,t[0].tensor.transpose(1,0),t[1].tensor):1===this.dotAxes[0]&&1===this.dotAxes[1]&&(0,h.default)(n.tensor,t[0].tensor,t[1].tensor.transpose(1,0))}else if("cos"===this.mode){if(2!==t[0].tensor.shape.length||2!==t[1].tensor.shape.length)throw new Error(this.name+" [Merge layer] cos mode for 3+ dim tensors not yet implemented.");var d=new c.default([],n.tensor.shape),y=new c.default([],n.tensor.shape);0===this.dotAxes[0]&&0===this.dotAxes[1]?((0,h.default)(d.tensor,t[0].tensor.transpose(1,0),t[0].tensor),(0,h.default)(y.tensor,t[1].tensor.transpose(1,0),t[1].tensor),(0,h.default)(n.tensor,t[0].tensor.transpose(1,0),t[1].tensor)):1===this.dotAxes[0]&&1===this.dotAxes[1]&&((0,h.default)(d.tensor,t[0].tensor,t[0].tensor.transpose(1,0)),(0,h.default)(y.tensor,t[1].tensor,t[1].tensor.transpose(1,0)),(0,h.default)(n.tensor,t[0].tensor,t[1].tensor.transpose(1,0))),v.default.muleq(d.tensor,y.tensor),v.default.sqrteq(d.tensor),v.default.diveq(n.tensor,d.tensor),n.tensor=(0,g.default)(n.tensor,0)}return n}}]),e}(f.default);e.default=S},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(1),l=n(c),f=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Permute";var n=t.dims,o=void 0===n?[]:n;return r.dims=o.map(function(t){return t-1}),r}return s(e,t),u(e,[{key:"call",value:function(t){var e;if(this.dims.length!==t.tensor.shape.length)throw new Error(this.name+" [Permute layer] The specified dims permutation must match the number of dimensions.");return t.tensor=(e=t.tensor).transpose.apply(e,o(this.dims)),t}}]),e}(l.default);e.default=f},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(125),f=n(l),p=r(591),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="RepeatVector";var n=t.n,a=void 0===n?1:n;return r.n=a,r}return a(e,t),s(e,[{key:"call",value:function(t){if(1!==t.tensor.shape.length)throw new Error(this.name+" [RepeatVector layer] Only 1D tensor inputs allowed.");return t.tensor=(0,h.default)((0,f.default)(t.tensor,0),[this.n,1]),t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{
value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(3),c=n(u),l=r(1),f=n(l),p=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Reshape";var n=t.targetShape,a=void 0===n?[]:n;return r.targetShape=a,r}return a(e,t),s(e,[{key:"call",value:function(t){if(this.targetShape.reduce(function(t,e){return t*e},1)!==t.tensor.size)throw new Error(this.name+" [Reshape layer] The total size of new array must be unchanged in reshape layer.");var e=new c.default([],this.targetShape);return e.replaceTensorData(t.tensor.data),t.tensor=e.tensor,t}}]),e}(f.default);e.default=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="SpatialDropout2D";var n=t.p,a=void 0===n?.5:n,s=t.dimOrdering,u=void 0===s?"tf":s;return r.p=Math.min(Math.max(0,a),1),r.dimOrdering=u,r}return a(e,t),s(e,[{key:"call",value:function(t){return t}}]),e}(c.default);e.default=l},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="SpatialDropout3D";var n=t.p,a=void 0===n?.5:n,s=t.dimOrdering,u=void 0===s?"tf":s;return r.p=Math.min(Math.max(0,a),1),r.dimOrdering=u,r}return a(e,t),s(e,[{key:"call",value:function(t){return t}}]),e}(c.default);e.default=l},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.MaxoutDense=e.Highway=e.Merge=e.RepeatVector=e.Permute=e.Reshape=e.Flatten=e.SpatialDropout3D=e.SpatialDropout2D=e.Dropout=e.Activation=e.Dense=void 0;var o=r(214),i=n(o),a=r(213),s=n(a),u=r(215),c=n(u),l=r(223),f=n(l),p=r(224),h=n(p),d=r(216),v=n(d),y=r(222),g=n(y),_=r(220),b=n(_),m=r(221),w=n(m),x=r(219),O=n(x),j=r(217),E=n(j),S=r(218),k=n(S);e.Dense=i.default,e.Activation=s.default,e.Dropout=c.default,e.SpatialDropout2D=f.default,e.SpatialDropout3D=h.default,e.Flatten=v.default,e.Reshape=g.default,e.Permute=b.default,e.RepeatVector=w.default,e.Merge=O.default,e.Highway=E.default,e.MaxoutDense=k.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Embedding";var n=t.inputDim,a=void 0===n?1:n,s=t.outputDim,u=void 0===s?1:s,c=t.inputLength,l=void 0===c?0:c,f=t.maskZero,p=void 0!==f&&f,h=t.dropout,d=void 0===h?0:h;return r.inputDim=a,r.outputDim=u,r.inputLength=l,r.maskZero=p,r.dropout=d,r.params=["W"],r}return a(e,t),s(e,[{key:"call",value:function(t){for(var e=new f.default([],[t.tensor.shape[0],this.weights.W.tensor.shape[1]]),r=0,n=t.tensor.shape[0];r<n;r++)h.default.assign(e.tensor.pick(r,null),this.weights.W.tensor.pick(t.tensor.get(r),null));return t.tensor=e.tensor,t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Embedding=void 0;var o=r(226),i=n(o);e.Embedding=i.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=r(187),v=n(d),y=r(180),g=n(y),_=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="BatchNormalization";var n=t.epsilon,a=void 0===n?1e-5:n,s=t.mode,u=void 0===s?0:s,c=t.axis,l=void 0===c?-1:c;return r.epsilon=a,r.mode=u,r.axis=l,r.axisNormalized=!1,r.params=0===r.mode?["gamma","beta","running_mean","running_std"]:["gamma","beta"],r}return a(e,t),s(e,[{key:"call",value:function(t){var e=this;this.axisNormalized||(this.axis=this.axis<0?t.tensor.shape.length+this.axis:this.axis-1,this.axisNormalized=!0);for(var r=[],n=0;n<t.tensor.shape.length;n++)n===this.axis?r.push(1):r.push(null);for(var o=new f.default([],t.tensor.shape),i=new f.default([],t.tensor.shape),a=0;a<t.tensor.shape[this.axis];a++){var s,u;r[this.axis]=a,h.default.assigns((s=o.tensor).pick.apply(s,r),this.weights.gamma.tensor.get(a)),h.default.assigns((u=i.tensor).pick.apply(u,r),this.weights.beta.tensor.get(a))}var c=new f.default([],t.tensor.shape),l=new f.default([],t.tensor.shape);if(0===this.mode){for(var p=0;p<t.tensor.shape[this.axis];p++){var d,y;r[this.axis]=p,h.default.assigns((d=c.tensor).pick.apply(d,r),this.weights.running_mean.tensor.get(p)),h.default.assigns((y=l.tensor).pick.apply(y,r),this.weights.running_std.tensor.get(p)+this.epsilon)}h.default.sqrteq(l.tensor)}else if(1===this.mode){var _=t.tensor.shape.slice();_.splice(this.axis,1);for(var b=new f.default([],_),m=0;m<t.tensor.shape[this.axis];m++){var w;r[this.axis]=m,h.default.addeq(b.tensor,(w=t.tensor).pick.apply(w,r))}h.default.divseq(b.tensor,t.tensor.shape[this.axis]);for(var x=new f.default([],_),O=new f.default([],_),j=0;j<t.tensor.shape[this.axis];j++){var E;r[this.axis]=j,h.default.sub(O.tensor,(E=t.tensor).pick.apply(E,r),b.tensor),h.default.powseq(O.tensor,2),h.default.addeq(x.tensor,O.tensor)}h.default.divseq(x.tensor,t.tensor.shape[this.axis]),h.default.addseq(x.tensor,this.epsilon),h.default.sqrteq(x.tensor),h.default.addseq(x.tensor,this.epsilon);for(var S=0;S<t.tensor.shape[this.axis];S++){var k,P;r[this.axis]=S,h.default.assign((k=c.tensor).pick.apply(k,r),b.tensor),h.default.assign((P=l.tensor).pick.apply(P,r),x.tensor)}}else{if(2!==this.mode)throw new Error("[normalization.BatchNormalization] Invalid mode "+this.mode+".");for(var A=function(n){var o,i,a;r[e.axis]=n;var s=(0,g.default)((0,v.default)((o=t.tensor).pick.apply(o,r))),u=s.reduce(function(t,e){return t+e},0)/s.length,f=s.map(function(t){return(t-u)*(t-u)}).reduce(function(t,e){return t+e},0)/s.length;h.default.assigns((i=c.tensor).pick.apply(i,r),u),h.default.assigns((a=l.tensor).pick.apply(a,r),f+e.epsilon)},M=0;M<t.tensor.shape[this.axis];M++)A(M);h.default.sqrteq(l.tensor)}return h.default.subeq(t.tensor,c.tensor),h.default.diveq(t.tensor,l.tensor),h.default.muleq(t.tensor,o.tensor),h.default.addeq(t.tensor,i.tensor),t}}]),e}(c.default);e.default=_},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.BatchNormalization=void 0;var o=r(228),i=n(o);e.BatchNormalization=i.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=r(129),u=n(s),c=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="AveragePooling1D",r.poolingFunc="average",r}return a(e,t),e}(u.default);e.default=c},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=r(130),u=n(s),c=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="AveragePooling2D",r.poolingFunc="average",r}return a(e,t),e}(u.default);e.default=c},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=r(131),u=n(s),c=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="AveragePooling3D",r.poolingFunc="average",r}return a(e,t),e}(u.default);e.default=c},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(1),l=n(c),f=r(3),p=n(f),h=r(4),d=n(h),v=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="GlobalAveragePooling1D",r}return a(e,t),u(e,[{key:"call",value:function(t){for(var e=s(t.tensor.shape,2),r=e[0],n=e[1],o=new p.default([],[n]),i=0,a=n;i<a;i++)o.tensor.set(i,d.default.sum(t.tensor.pick(null,i))/r);return t.tensor=o.tensor,t}}]),e}(l.default);e.default=v},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(1),l=n(c),f=r(3),p=n(f),h=r(4),d=n(h),v=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="GlobalAveragePooling2D";var n=t.dimOrdering,a=void 0===n?"tf":n;return r.dimOrdering=a,r}return a(e,t),u(e,[{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0));for(var e=s(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=new p.default([],[o]),a=0,u=o;a<u;a++)i.tensor.set(a,d.default.sum(t.tensor.pick(null,null,a))/(r*n));return t.tensor=i.tensor,t}}]),e}(l.default);e.default=v},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="GlobalMaxPooling1D",r}return a(e,t),s(e,[{key:"call",value:function(t){for(var e=t.tensor.shape[1],r=new f.default([],[e]),n=0,o=e;n<o;n++)r.tensor.set(n,h.default.sup(t.tensor.pick(null,n)));return t.tensor=r.tensor,t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(1),c=n(u),l=r(3),f=n(l),p=r(4),h=n(p),d=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="GlobalMaxPooling2D";var n=t.dimOrdering,a=void 0===n?"tf":n;return r.dimOrdering=a,r}return a(e,t),s(e,[{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0));for(var e=t.tensor.shape[2],r=new f.default([],[e]),n=0,o=e;n<o;n++)r.tensor.set(n,h.default.sup(t.tensor.pick(null,null,n)));return t.tensor=r.tensor,t}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=r(129),u=n(s),c=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="MaxPooling1D",r.poolingFunc="max",r}return a(e,t),e}(u.default);e.default=c},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=r(130),u=n(s),c=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="MaxPooling2D",r.poolingFunc="max",r}return a(e,t),e}(u.default);e.default=c},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=r(131),u=n(s),c=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.layerClass="MaxPooling3D",r.poolingFunc="max",r}return a(e,t),e}(u.default);e.default=c},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalAveragePooling2D=e.GlobalMaxPooling2D=e.GlobalAveragePooling1D=e.GlobalMaxPooling1D=e.AveragePooling3D=e.AveragePooling2D=e.AveragePooling1D=e.MaxPooling3D=e.MaxPooling2D=e.MaxPooling1D=void 0;var o=r(237),i=n(o),a=r(238),s=n(a),u=r(239),c=n(u),l=r(230),f=n(l),p=r(231),h=n(p),d=r(232),v=n(d),y=r(235),g=n(y),_=r(233),b=n(_),m=r(236),w=n(m),x=r(234),O=n(x);e.MaxPooling1D=i.default,e.MaxPooling2D=s.default,e.MaxPooling3D=c.default,e.AveragePooling1D=f.default,e.AveragePooling2D=h.default,e.AveragePooling3D=v.default,e.GlobalMaxPooling1D=g.default,e.GlobalAveragePooling1D=b.default,e.GlobalMaxPooling2D=w.default,e.GlobalAveragePooling2D=O.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(19),l=o(c),f=r(3),p=n(f),h=r(1),d=n(h),v=r(56),y=r(4),g=n(y),_=r(25),b=n(_),m=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,b.default)({args:["array","array","array","array"],body:function(t,e,r,n){t=e+r+n}}),r._update=(0,b.default)({args:["array","array","array"],body:function(t,e,r){t=t*(1-r)+e*r}}),r.layerClass="GRU";var n=t.outputDim,o=void 0===n?1:n,s=t.activation,u=void 0===s?"tanh":s,c=t.innerActivation,f=void 0===c?"hardSigmoid":c,p=t.returnSequences,h=void 0!==p&&p,d=t.goBackwards,v=void 0!==d&&d,y=t.stateful,g=void 0!==y&&y;return r.outputDim=o,r.activation=u,r.innerActivation=f,r.activationFunc=l[u],r.innerActivationFunc=l[f],r.returnSequences=h,r.goBackwards=v,r.stateful=g,r.params=["W_z","U_z","b_z","W_r","U_r","b_r","W_h","U_h","b_h"],r}return s(e,t),u(e,[{key:"call",value:function(t){var e=this,r=new p.default([],[t.tensor.shape[1]]),n=this.weights.b_z.tensor.shape[0],o=this.weights.b_r.tensor.shape[0],i=this.weights.b_h.tensor.shape[0],a=new p.default([],[n]),s=new p.default([],[n]),u=new p.default([],[n]),c=new p.default([],[o]),l=new p.default([],[o]),f=new p.default([],[o]),h=this.stateful&&this.currentHiddenState?this.currentHiddenState:new p.default([],[i]),d=new p.default([],[i]),y=new p.default([],[i]),_=new p.default([],[i]);this.hiddenStateSequence=new p.default([],[t.tensor.shape[0],i]);for(var b=function(){var t=[s,u,l,f,d,y];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},m=function(){g.default.assign(_.tensor,h.tensor),(0,v.gemv)(1,e.weights.W_z.tensor.transpose(1,0),r.tensor,1,s.tensor),(0,v.gemv)(1,e.weights.U_z.tensor.transpose(1,0),_.tensor,1,u.tensor),e._combine(a.tensor,s.tensor,u.tensor,e.weights.b_z.tensor),e.innerActivationFunc(a),(0,v.gemv)(1,e.weights.W_r.tensor.transpose(1,0),r.tensor,1,l.tensor),(0,v.gemv)(1,e.weights.U_r.tensor.transpose(1,0),_.tensor,1,f.tensor),e._combine(c.tensor,l.tensor,f.tensor,e.weights.b_r.tensor),e.innerActivationFunc(c),g.default.muleq(c.tensor,_.tensor),(0,v.gemv)(1,e.weights.W_h.tensor.transpose(1,0),r.tensor,1,d.tensor),(0,v.gemv)(1,e.weights.U_h.tensor.transpose(1,0),c.tensor,1,y.tensor),e._combine(h.tensor,d.tensor,y.tensor,e.weights.b_h.tensor),e.activationFunc(h),e._update(h.tensor,_.tensor,a.tensor)},w=0,x=t.tensor.shape[0];w<x;w++){var O=this.goBackwards?x-w-1:w;g.default.assign(r.tensor,t.tensor.pick(O,null)),b(),m(),this.returnSequences&&g.default.assign(this.hiddenStateSequence.tensor.pick(w,null),h.tensor)}return this.returnSequences?t.tensor=this.hiddenStateSequence.tensor:t.tensor=h.tensor,this.stateful&&(this.currentHiddenState=h),t}}]),e}(d.default);e.default=m},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(19),l=o(c),f=r(3),p=n(f),h=r(1),d=n(h),v=r(56),y=r(4),g=n(y),_=r(25),b=n(_),m=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,b.default)({args:["array","array","array","array"],body:function(t,e,r,n){t=e+r+n}}),r._update=(0,b.default)({args:["array","array","array","array"],body:function(t,e,r,n){t=t*r+e*n}}),r.layerClass="LSTM";var n=t.outputDim,o=void 0===n?1:n,s=t.activation,u=void 0===s?"tanh":s,c=t.innerActivation,f=void 0===c?"hardSigmoid":c,p=t.returnSequences,h=void 0!==p&&p,d=t.goBackwards,v=void 0!==d&&d,y=t.stateful,g=void 0!==y&&y;return r.outputDim=o,r.activation=u,r.innerActivation=f,r.activationFunc=l[u],r.innerActivationFunc=l[f],r.returnSequences=h,r.goBackwards=v,r.stateful=g,r.params=["W_i","U_i","b_i","W_c","U_c","b_c","W_f","U_f","b_f","W_o","U_o","b_o"],r}return s(e,t),u(e,[{key:"call",value:function(t){var e=this,r=new p.default([],[t.tensor.shape[1]]),n=this.weights.b_i.tensor.shape[0],o=this.weights.b_c.tensor.shape[0],i=this.weights.b_f.tensor.shape[0],a=this.weights.b_o.tensor.shape[0],s=new p.default([],[n]),u=new p.default([],[n]),c=new p.default([],[n]),l=new p.default([],[i]),f=new p.default([],[i]),h=new p.default([],[i]),d=new p.default([],[a]),y=new p.default([],[a]),_=new p.default([],[a]),b=new p.default([],[o]),m=new p.default([],[o]),w=new p.default([],[o]),x=this.stateful&&this.previousCandidate?this.previousCandidate:new p.default([],[o]),O=this.stateful&&this.currentHiddenState?this.currentHiddenState:new p.default([],[o]),j=new p.default([],[o]);this.hiddenStateSequence=new p.default([],[t.tensor.shape[0],o]);for(var E=function(){var t=[u,c,f,h,y,_,m,w];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},S=function(){g.default.assign(j.tensor,O.tensor),(0,v.gemv)(1,e.weights.W_i.tensor.transpose(1,0),r.tensor,1,u.tensor),(0,v.gemv)(1,e.weights.U_i.tensor.transpose(1,0),j.tensor,1,c.tensor),e._combine(s.tensor,u.tensor,c.tensor,e.weights.b_i.tensor),e.innerActivationFunc(s),(0,v.gemv)(1,e.weights.W_f.tensor.transpose(1,0),r.tensor,1,f.tensor),(0,v.gemv)(1,e.weights.U_f.tensor.transpose(1,0),j.tensor,1,h.tensor),e._combine(l.tensor,f.tensor,h.tensor,e.weights.b_f.tensor),e.innerActivationFunc(l),(0,v.gemv)(1,e.weights.W_o.tensor.transpose(1,0),r.tensor,1,y.tensor),(0,v.gemv)(1,e.weights.U_o.tensor.transpose(1,0),j.tensor,1,_.tensor),e._combine(d.tensor,y.tensor,_.tensor,e.weights.b_o.tensor),e.innerActivationFunc(d),(0,v.gemv)(1,e.weights.W_c.tensor.transpose(1,0),r.tensor,1,m.tensor),(0,v.gemv)(1,e.weights.U_c.tensor.transpose(1,0),j.tensor,1,w.tensor),e._combine(b.tensor,m.tensor,w.tensor,e.weights.b_c.tensor),e.activationFunc(b),e._update(b.tensor,x.tensor,s.tensor,l.tensor),g.default.assign(x.tensor,b.tensor),e.activationFunc(b),g.default.mul(O.tensor,d.tensor,b.tensor)},k=0,P=t.tensor.shape[0];k<P;k++){var A=this.goBackwards?P-k-1:k;
g.default.assign(r.tensor,t.tensor.pick(A,null)),E(),S(),g.default.assign(this.hiddenStateSequence.tensor.pick(k,null),O.tensor)}return this.returnSequences?t.tensor=this.hiddenStateSequence.tensor:t.tensor=O.tensor,this.stateful&&(this.previousCandidate=x,this.currentHiddenState=O),t}}]),e}(d.default);e.default=m},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(19),l=o(c),f=r(3),p=n(f),h=r(1),d=n(h),v=r(56),y=r(4),g=n(y),_=r(25),b=n(_),m=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,b.default)({args:["array","array","array","array"],body:function(t,e,r,n){t=e+r+n}}),r.layerClass="SimpleRNN";var n=t.outputDim,o=void 0===n?1:n,s=t.activation,u=void 0===s?"tanh":s,c=t.returnSequences,f=void 0!==c&&c,p=t.goBackwards,h=void 0!==p&&p,d=t.stateful,v=void 0!==d&&d;return r.outputDim=o,r.activation=u,r.activationFunc=l[u],r.returnSequences=f,r.goBackwards=h,r.stateful=v,r.params=["W","U","b"],r}return s(e,t),u(e,[{key:"call",value:function(t){var e=this,r=new p.default([],[t.tensor.shape[1]]),n=this.weights.b.tensor.shape[0],o=this.stateful&&this.currentHiddenState?this.currentHiddenState:new p.default([],[n]),i=new p.default([],[n]),a=new p.default([],[n]),s=new p.default([],[n]);this.hiddenStateSequence=new p.default([],[t.tensor.shape[0],n]);for(var u=function(){var t=[i,a];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},c=function(){g.default.assign(s.tensor,o.tensor),(0,v.gemv)(1,e.weights.W.tensor.transpose(1,0),r.tensor,1,i.tensor),(0,v.gemv)(1,e.weights.U.tensor.transpose(1,0),s.tensor,1,a.tensor),e._combine(o.tensor,i.tensor,a.tensor,e.weights.b.tensor),e.activationFunc(o)},l=0,f=t.tensor.shape[0];l<f;l++){var h=this.goBackwards?f-l-1:l;g.default.assign(r.tensor,t.tensor.pick(h,null)),u(),c(),this.returnSequences&&g.default.assign(this.hiddenStateSequence.tensor.pick(l,null),o.tensor)}return this.returnSequences?t.tensor=this.hiddenStateSequence.tensor:t.tensor=o.tensor,this.stateful&&(this.currentHiddenState=o),t}}]),e}(d.default);e.default=m},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(1),l=o(c),f=r(3),p=o(f),h=r(4),d=o(h),v=r(554),y=o(v),g=r(132),_=n(g),b=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Bidirectional";var n=t.layer,o=t.mergeMode,s=void 0===o?"concat":o;if(!n)throw new Error("[Bidirectional] wrapped layer is undefined.");r.forwardLayer=n;var u=(0,y.default)(n,["outputDim","activation","innerActivation","returnSequences","goBackwards","stateful"]);return u.goBackwards=!u.goBackwards,r.backwardLayer=new _[n.layerClass](u),r.mergeMode=s,r}return s(e,t),u(e,[{key:"setWeights",value:function(t){this.forwardLayer.setWeights(t.slice(0,t.length/2)),this.backwardLayer.setWeights(t.slice(t.length/2))}},{key:"call",value:function(t){var e=new p.default(t.tensor.data,t.tensor.shape),r=new p.default(t.tensor.data,t.tensor.shape),n=this.forwardLayer.call(e),o=this.backwardLayer.call(r);if("concat"===this.mergeMode){var i=n.tensor.shape.slice();i[i.length-1]+=o.tensor.shape[i.length-1];var a=new p.default([],i);this.forwardLayer.returnSequences?(d.default.assign(a.tensor.hi(i[0],n.tensor.shape[1]).lo(0,0),n.tensor),d.default.assign(a.tensor.hi(i[0],i[1]).lo(0,n.tensor.shape[1]),o.tensor.step(-1))):(d.default.assign(a.tensor.hi(n.tensor.shape[0]).lo(0),n.tensor),d.default.assign(a.tensor.hi(i[0]).lo(n.tensor.shape[0]),o.tensor)),t.tensor=a.tensor}else if("sum"===this.mergeMode){var s=n.tensor.shape.slice(),u=new p.default([],s);d.default.addeq(u.tensor,n.tensor),d.default.addeq(u.tensor,o.tensor),t.tensor=u.tensor}else if("mul"===this.mergeMode){var c=n.tensor.shape.slice(),l=new p.default([],c);d.default.assigns(l.tensor,1),d.default.muleq(l.tensor,n.tensor),d.default.muleq(l.tensor,o.tensor),t.tensor=l.tensor}else if("ave"===this.mergeMode){var f=n.tensor.shape.slice(),h=new p.default([],f);d.default.addeq(h.tensor,n.tensor),d.default.addeq(h.tensor,o.tensor),d.default.divseq(h.tensor,2),t.tensor=h.tensor}return t}}]),e}(l.default);e.default=b},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(1),l=n(c),f=r(3),p=n(f),h=r(4),d=n(h),v=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="TimeDistributed";var n=t.layer;if(!n)throw new Error("[TimeDistributed] wrapped layer is undefined.");return r.layer=n,r}return s(e,t),u(e,[{key:"setWeights",value:function(t){this.layer.setWeights(t)}},{key:"call",value:function(t){var e,r,n=[].concat(o(t.tensor.shape.slice(1))),i=new p.default([],n);d.default.assign(i.tensor,(e=t.tensor).pick.apply(e,[0].concat(o(n.map(function(t){return null})))));var a=this.layer.call(i),s=a.tensor.shape.slice(),u=new p.default([],[t.tensor.shape[0]].concat(o(s)));d.default.assign((r=u.tensor).pick.apply(r,[0].concat(o(s.map(function(t){return null})))),a.tensor);for(var c=1,l=t.tensor.shape[0];c<l;c++){var f,h,v=new p.default([],n);d.default.assign(v.tensor,(f=t.tensor).pick.apply(f,[c].concat(o(n.map(function(t){return null}))))),a=this.layer.call(v),d.default.assign((h=u.tensor).pick.apply(h,[c].concat(o(s.map(function(t){return null})))),a.tensor)}return t.tensor=u.tensor,t}}]),e}(l.default);e.default=v},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Bidirectional=e.TimeDistributed=void 0;var o=r(245),i=n(o),a=r(244),s=n(a);e.TimeDistributed=i.default,e.Bidirectional=s.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-5,n=(0,u.default)((0,a.default)(t)),o=e;if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++){if(!(0,l.default)(n[i]))return!1;if(n[i]<o[i]-r||n[i]>o[i]+r)return!1}return!0}Object.defineProperty(e,"__esModule",{value:!0}),e.approxEquals=o;var i=r(187),a=n(i),s=r(180),u=n(s),c=r(550),l=n(c)},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function o(t){var e,n,o,i,a,s,u=t.length;a=r(t),s=new l(3*u/4-a),o=a>0?u-4:u;var f=0;for(e=0,n=0;e<o;e+=4,n+=3)i=c[t.charCodeAt(e)]<<18|c[t.charCodeAt(e+1)]<<12|c[t.charCodeAt(e+2)]<<6|c[t.charCodeAt(e+3)],s[f++]=i>>16&255,s[f++]=i>>8&255,s[f++]=255&i;return 2===a?(i=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[f++]=255&i):1===a&&(i=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[f++]=i>>8&255,s[f++]=255&i),s}function i(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function a(t,e,r){for(var n,o=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(i(n));return o.join("")}function s(t){for(var e,r=t.length,n=r%3,o="",i=[],s=16383,c=0,l=r-n;c<l;c+=s)i.push(a(t,c,c+s>l?l:c+s));return 1===n?(e=t[r-1],o+=u[e>>2],o+=u[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=u[e>>10],o+=u[e>>4&63],o+=u[e<<2&63],o+="="),i.push(o),i.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=s;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=f.length;p<h;++p)u[p]=f[p],c[f.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(t,e){"use strict";"use restrict";function r(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}var n=32;e.INT_BITS=n,e.INT_MAX=2147483647,e.INT_MIN=-1<<n-1,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>n-1;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,r;return e=(t>65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,e|=r,e|t>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,t&=15,27030>>>t&1};var o=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,o=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--o;t[e]=n<<o&255}}(o),e.reverse=function(t){return o[255&t]<<24|o[t>>>8&255]<<16|o[t>>>16&255]<<8|o[t>>>24&255]},e.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},e.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),t=65535&(t|t>>>16),t<<16>>16},e.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},e.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),t=1023&(t|t>>>16),t<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},function(t,e,r){(function(e,r,n){/* @preserve
* The MIT License (MIT)
*
* Copyright (c) 2013-2015 Petka Antonov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
!function(e){t.exports=e()}(function(){var t,o,i;return function t(e,r,n){function o(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof _dereq_&&_dereq_;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){var r=e[a][1][t];return o(r?r:t)},l,l.exports,t,e,r,n)}return r[a].exports}for(var i="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(t,e,r){"use strict";e.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,r,n){"use strict";function o(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function i(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function a(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var u;try{throw new Error}catch(t){u=t}var c=t("./schedule"),l=t("./queue"),f=t("./util");o.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},o.prototype.hasCustomScheduler=function(){return this._customScheduler},o.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},o.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},o.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},o.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},o.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(o.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?i.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},o.prototype.invoke=function(t,e,r){this._trampolineEnabled?a.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},o.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(o.prototype.invokeLater=i,o.prototype.invoke=a,o.prototype.settlePromises=s),o.prototype.invokeFirst=function(t,e,r){this._normalQueue.unshift(t,e,r),this._queueTick()},o.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},o.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},o.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},o.prototype._reset=function(){this._isTickUsed=!1},r.exports=o,r.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var o=!1,i=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(i,i,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(i){o||(o=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=r(i),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var p={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,a,void 0,l,p),c._then(s,u,void 0,l,p),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){"use strict";function n(){try{Promise===i&&(Promise=o)}catch(t){}return i}var o;"undefined"!=typeof Promise&&(o=Promise);var i=t("./promise")();i.noConflict=n,e.exports=i},{"./promise":22}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var o=n(null),i=n(null);o[" size"]=i[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var o="Object "+s.classString(t)+" has no method '"+s.toString(r)+"'";throw new e.TypeError(o)}return n}function n(t){var e=this.pop(),n=r(t,e);return n.apply(t,this)}function o(t){return t[this]}function i(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var a,s=t("./util"),u=s.canEvaluate;s.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(n,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=i;else if(u){var n=a(t);e=null!==n?n:o}else e=o;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){"use strict";e.exports=function(e,r,n,o){var i=t("./util"),a=i.tryCatch,s=i.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(i.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=a(t).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,r){"use strict";e.exports=function(e){function r(t,r,s){return function(u){var c=s._boundValue();t:for(var l=0;l<t.length;++l){var f=t[l];if(f===Error||null!=f&&f.prototype instanceof Error){if(u instanceof f)return i(r).call(c,u)}else if("function"==typeof f){var p=i(f).call(c,u);if(p===a)return p;if(p)return i(r).call(c,u)}else if(n.isObject(u)){for(var h=o(f),d=0;d<h.length;++d){var v=h[d];if(f[v]!=u[v])continue t}return i(r).call(c,u)}}return e}}var n=t("./util"),o=t("./es5").keys,i=n.tryCatch,a=n.errorObj;return r}},{"./es5":13,"./util":36}],8:[function(t,e,r){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(n())}function r(){if(o)return new e}function n(){var t=i.length-1;if(t>=0)return i[t]}var o=!1,i=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,i.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=i.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=r,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var r=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,o=!1},o=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=n,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){function o(t,e){return{promise:e}}function i(){return!1}function a(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+U.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?U.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!==(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t}function d(){this._trace=new T(this._peekContext())}function v(t,e){if(B(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=j(t);U.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),U.notEnumerableProp(t,"__stackCleaned__",!0)}}}function y(t,e,r,n,o){if(void 0===t&&null!==e&&X){if(void 0!==o&&o._returnedNonUndefined())return;if(0===(65535&n._bitField))return;r&&(r+=" ");var i="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=x(s),c=u.length-1;c>=0;--c){var l=u[c];if(!W.test(l)){var f=l.match(z);f&&(i="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0)for(var p=u[0],c=0;c<s.length;++c)if(s[c]===p){c>0&&(a="\n"+s[c-1]);break}}var h="a promise was created in a "+r+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(h,!0,e)}}function g(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),_(r)}function _(t,e,n){if(at.warnings){var o,i=new N(t);if(e)n._attachExtraTrace(i);else if(at.longStackTraces&&(o=r._peekContext()))o.attachExtraTrace(i);else{var a=j(i);i.stack=a.message+"\n"+a.stack.join("\n")}et("warning",i)||E(i,"",!0)}}function b(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}function m(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],o=e.length-1,i=e[o],a=-1,s=n.length-1;s>=0;--s)if(n[s]===i){a=s;break}for(var s=a;s>=0;--s){var u=n[s];if(e[o]!==u)break;e.pop(),o--}e=n}}function x(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],o=" (No stack trace)"===n||q.test(n),i=o&&nt(n);o&&!i&&(H&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function O(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||q.test(n))break}return r>0&&(e=e.slice(r)),e}function j(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?O(t):[" (No stack trace)"],{message:r,stack:x(e)}}function E(t,e,r){if("undefined"!=typeof console){var n;if(U.isObject(t)){var o=t.stack;n=e+G(o,t)}else n=e+String(t);"function"==typeof I?I(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function S(t,e,r,n){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){L.throwLater(t)}"unhandledRejection"===t?et(t,r,n)||o||E(r,"Unhandled rejection "):et(t,n)}function k(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():U.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+P(e)+">, no stack trace)"}function P(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function A(){return"function"==typeof it}function M(t){var e=t.match(ot);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function C(t,e){if(A()){for(var r,n,o=t.stack.split("\n"),i=e.stack.split("\n"),a=-1,s=-1,u=0;u<o.length;++u){var c=M(o[u]);if(c){r=c.fileName,a=c.line;break}}for(var u=0;u<i.length;++u){var c=M(i[u]);if(c){n=c.fileName,s=c.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(nt=function(t){if(V.test(t))return!0;var e=M(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}}function T(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,T),e>32&&this.uncycle()}var R,F,I,D=r._getDomain,L=r._async,N=t("./errors").Warning,U=t("./util"),B=U.canAttachTrace,V=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,W=/\((?:timers\.js):\d+:\d+\)/,z=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,G=null,H=!1,Y=!(0==U.env("BLUEBIRD_DEBUG")),$=!(0==U.env("BLUEBIRD_WARNINGS")||!Y&&!U.env("BLUEBIRD_WARNINGS")),K=!(0==U.env("BLUEBIRD_LONG_STACK_TRACES")||!Y&&!U.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=U.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&($||!!U.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},r.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),L.invokeLater(this._notifyUnhandledRejection,this,void 0))},r.prototype._notifyUnhandledRejectionIsHandled=function(){S("rejectionHandled",R,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),S("unhandledRejection",F,t,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(t,e,r){return _(t,e,r||this)},r.onPossiblyUnhandledRejection=function(t){var e=D();F="function"==typeof t?null===e?t:U.domainBind(e,t):void 0},r.onUnhandledRejectionHandled=function(t){var e=D();R="function"==typeof t?null===e?t:U.domainBind(e,t):void 0};var Z=function(){};r.longStackTraces=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&A()){var t=r.prototype._captureStackTrace,e=r.prototype._attachExtraTrace;at.longStackTraces=!0,Z=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=t,r.prototype._attachExtraTrace=e,n.deactivateLongStackTraces(),L.enableTrampoline(),at.longStackTraces=!1},r.prototype._captureStackTrace=d,r.prototype._attachExtraTrace=v,n.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return at.longStackTraces&&A()};var Q=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return U.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!U.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return U.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!U.global.dispatchEvent(r)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),U.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!U.global.dispatchEvent(r)}}catch(t){}return function(){return!1}}(),J=function(){return U.isNode?function(){return e.emit.apply(e,arguments)}:U.global?function(t){var e="on"+t.toLowerCase(),r=U.global[e];return!!r&&(r.apply(U.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={promiseCreated:o,promiseFulfilled:o,promiseRejected:o,promiseResolved:o,promiseCancelled:o,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:o},et=function(t){var e=!1;try{e=J.apply(null,arguments)}catch(t){L.throwLater(t),e=!0}var r=!1;try{r=Q(t,tt[t].apply(null,arguments))}catch(t){L.throwLater(t),r=!0}return r||e};r.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?r.longStackTraces():!t.longStackTraces&&r.hasLongStackTraces()&&Z()),"warnings"in t){var e=t.warnings;at.warnings=!!e,X=at.warnings,U.isObject(e)&&"wForgottenReturn"in e&&(X=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=l,r.prototype._propagateFrom=f,r.prototype._onCancel=u,r.prototype._setOnCancel=c,r.prototype._attachCancellationCallback=s,r.prototype._execute=a,rt=f,at.cancellation=!0}"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,r.prototype._fireEvent=et):!t.monitoring&&at.monitoring&&(at.monitoring=!1,r.prototype._fireEvent=i))},r.prototype._fireEvent=i,r.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(t){},r.prototype._attachCancellationCallback=function(t){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(t,e){};var rt=p,nt=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;U.inherits(T,Error),n.CapturedTrace=T,T.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,o=this;void 0!==o;++n)e.push(o),o=o._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var i=e[n].stack;void 0===r[i]&&(r[i]=n)}for(var n=0;n<t;++n){var a=e[n].stack,s=r[a];if(void 0!==s&&s!==n){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;s<t-1?(u._parent=e[s+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var c=u._length+1,l=n-2;l>=0;--l)e[l]._length=c,c++;return}}}},T.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),r=e.message,n=[e.stack],o=this;void 0!==o;)n.push(x(o.stack.split("\n"))),o=o._parent;w(n),m(n),U.notEnumerableProp(t,"stack",b(r,n)),U.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():k(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,G=e;var r=Error.captureStackTrace;return nt=function(t){return V.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,G=e,H=!0,function(t){t.stack=(new Error).stack};var o;try{throw new Error}catch(t){o="stack"in t}return"stack"in n||!o||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?k(e):e.toString()},null):(q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(I=function(t){console.warn(t)},U.isNode&&e.stderr.isTTY?I=function(t,e){var r=e?"":"";console.warn(r+t+"\n")}:U.isNode||"string"!=typeof(new Error).stack||(I=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:$,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&r.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return h},checkForgottenReturns:y,setBounds:C,warn:_,deprecated:g,CapturedTrace:T,fireDomEvent:Q,fireGlobalEvent:J}}},{"./errors":12,"./util":36}],10:[function(t,e,r){"use strict";e.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1],n=function(){throw e};return this.caught(t,n)},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var o=function(){return n};return this.caught(r,o)}}},{}],11:[function(t,e,r){"use strict";e.exports=function(t,e){function r(){return i(this)}function n(t,r){return o(t,r,e,e)}var o=t.reduce,i=t.all;t.prototype.each=function(t){return o(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return o(this,t,e,e)},t.each=function(t,n){return o(t,n,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=n}},{}],12:[function(t,e,r){"use strict";function n(t,e){function r(n){return this instanceof r?(f(this,"message","string"==typeof n?n:e),f(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new r(n)}return l(r,Error),r}function o(t){return this instanceof o?(f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new o(t)}var i,a,s=t("./es5"),u=s.freeze,c=t("./util"),l=c.inherits,f=c.notEnumerableProp,p=n("Warning","warning"),h=n("CancellationError","cancellation error"),d=n("TimeoutError","timeout error"),v=n("AggregateError","aggregate error");try{i=TypeError,a=RangeError}catch(t){i=n("TypeError","type error"),a=n("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<y.length;++g)"function"==typeof Array.prototype[y[g]]&&(v.prototype[y[g]]=Array.prototype[y[g]]);s.defineProperty(v.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),v.prototype.isOperational=!0;var _=0;v.prototype.toString=function(){var t=Array(4*_+1).join(" "),e="\n"+t+"AggregateError of:\n";_++,t=Array(4*_+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",o=n.split("\n"),i=0;i<o.length;++i)o[i]=t+o[i];n=o.join("\n"),e+=n+"\n"}return _--,e},l(o,Error);var b=Error.__BluebirdErrorTypes__;b||(b=u({CancellationError:h,TimeoutError:d,OperationalError:o,RejectionError:o,AggregateError:v}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:i,RangeError:a,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:p}},{"./es5":13,"./util":36}],13:[function(t,e,r){var n=function(){"use strict";return void 0===this}();if(n)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var o={}.hasOwnProperty,i={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var r in t)o.call(t,r)&&e.push(r);return e},u=function(t,e){return{value:t[e]}},c=function(t,e,r){return t[e]=r.value,t},l=function(t){return t},f=function(t){try{return Object(t).constructor.prototype}catch(t){return a}},p=function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}};e.exports={isArray:p,keys:s,names:s,defineProperty:c,getDescriptor:u,freeze:l,getPrototypeOf:f,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,o){return r(t,n,o,e)}}},{}],15:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function i(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return u.call(this,this.promise._target()._settledValue())}function s(t){if(!i(this,t))return f.e=t,f}function u(t){var n=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(n._boundValue()):u.call(n._boundValue(),t);if(void 0!==c){n._setReturnedNonUndefined();var p=r(c,n);if(p instanceof e){if(null!=this.cancelPromise){if(p._isCancelled()){var h=new l("late cancellation observer");return n._attachExtraTrace(h),f.e=h,f}p.isPending()&&p._attachCancellationCallback(new o(this))}return p._then(a,s,void 0,this,void 0)}}}return n.isRejected()?(i(this),f.e=t,f):(i(this),t)}var c=t("./util"),l=e.CancellationError,f=c.errorObj;return n.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){i(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,o){return"function"!=typeof t?this.then():this._then(r,o,void 0,new n(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},n}},{"./util":36}],16:[function(t,e,r){"use strict";e.exports=function(e,r,n,o,i,a){function s(t,r,n){for(var i=0;i<r.length;++i){n._pushContext();var a=h(r[i])(t);if(n._popContext(),a===p){n._pushContext();var s=e.reject(p.e);return n._popContext(),s}var u=o(a,n);if(u instanceof e)return u}return null}function u(t,r,o,i){if(a.cancellation()){var s=new e(n),u=this._finallyPromise=new e(n);this._promise=s.lastly(function(){return u}),s._captureStackTrace(),s._setOnCancel(this)}else{var c=this._promise=new e(n);c._captureStackTrace()}this._stack=i,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof o?[o].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}var c=t("./errors"),l=c.TypeError,f=t("./util"),p=f.errorObj,h=f.tryCatch,d=[];f.inherits(u,i),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,r="undefined"!=typeof this._generator.return;if(r)this._promise._pushContext(),t=h(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),t=h(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=h(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=h(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(t){var r=this._promise;if(t===p)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var i=o(n,this._promise);if(!(i instanceof e)&&(i=s(i,this._yieldHandlers,this._promise),null===i))return void this._promiseRejected(new l("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));i=i._target();var a=i._bitField;0===(50397184&a)?(this._yieldedPromise=i,i._proxy(this,null)):0!==(33554432&a)?e._async.invoke(this._promiseFulfilled,this,i._value()):0!==(16777216&a)?e._async.invoke(this._promiseRejected,this,i._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=u,o=(new Error).stack;return function(){var e=t.apply(this,arguments),i=new n(void 0,void 0,r,o),a=i.promise();return i._generator=e,i._promiseFulfilled(void 0),a}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new l("expecting a function but got "+f.classString(t));d.push(t)},e.spawn=function(t){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new u(t,this),o=n.promise();
return n._run(e.spawn),o}}},{"./errors":12,"./util":36}],17:[function(t,e,r){"use strict";e.exports=function(e,r,n,o,i,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var n}var o=[].slice.call(arguments);t&&o.pop();var n=new r(o).promise();return void 0!==t?n.spread(t):n}}},{"./util":36}],18:[function(t,e,r){"use strict";e.exports=function(e,r,n,o,i,a){function s(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var o=c();this._callback=null===o?e:l.domainBind(o,e),this._preservedValues=n===i?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0)}function u(t,r,o,i){if("function"!=typeof r)return n("expecting a function but got "+l.classString(r));var a=0;if(void 0!==o){if("object"!=typeof o||null===o)return e.reject(new TypeError("options argument must be an object but it is "+l.classString(o)));if("number"!=typeof o.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(o.concurrency)));a=o.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(t,r,a,i).promise()}var c=e._getDomain,l=t("./util"),f=l.tryCatch,p=l.errorObj,h=e._async;l.inherits(s,r),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,r){var n=this._values,i=this.length(),s=this._preservedValues,u=this._limit;if(r<0){if(r=r*-1-1,n[r]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var c=this._promise,l=this._callback,h=c._boundValue();c._pushContext();var d=f(l).call(h,t,r,i),v=c._popContext();if(a.checkForgottenReturns(d,v,null!==s?"Promise.filter":"Promise.map",c),d===p)return this._reject(d.e),!0;var y=o(d,this._promise);if(y instanceof e){y=y._target();var g=y._bitField;if(0===(50397184&g))return u>=1&&this._inFlight++,n[r]=y,y._proxy(this,(r+1)*-1),!1;if(0===(33554432&g))return 0!==(16777216&g)?(this._reject(y._reason()),!0):(this._cancel(),!0);d=y._value()}n[r]=d}var _=++this._totalResolved;return _>=i&&(null!==s?this._filter(n,s):this._resolve(n),!0)},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},s.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),o=0,i=0;i<r;++i)t[i]&&(n[o++]=e[i]);n.length=o,this._resolve(n)},s.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return u(this,t,e,null)},e.map=function(t,e,r,n){return u(t,e,r,n)}}},{"./util":36}],19:[function(t,e,r){"use strict";e.exports=function(e,r,n,o,i){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var o=s(t).apply(this,arguments),a=n._popContext();return i.checkForgottenReturns(o,a,"Promise.method",n),n._resolveFromSyncValue(o),n}},e.attempt=e.try=function(t){if("function"!=typeof t)return o("expecting a function but got "+a.classString(t));var n=new e(r);n._captureStackTrace(),n._pushContext();var u;if(arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=a.isArray(c)?s(t).apply(l,c):s(t).call(l,c)}else u=s(t)();var f=n._popContext();return i.checkForgottenReturns(u,f,"Promise.try",n),n._resolveFromSyncValue(u),n},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){"use strict";function n(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function o(t){var e;if(n(t)){e=new c(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=l.keys(t),o=0;o<r.length;++o){var i=r[o];f.test(i)||(e[i]=t[i])}return e}return a.markAsOriginatingFromRejection(t),t}function i(t,e){return function(r,n){if(null!==t){if(r){var i=o(s(r));t._attachExtraTrace(i),t._reject(i)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(n);t=null}}}var a=t("./util"),s=a.maybeWrapAsError,u=t("./errors"),c=u.OperationalError,l=t("./es5"),f=/^(?:name|message|stack|cause)$/;e.exports=i},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,r){"use strict";e.exports=function(e){function r(t,e){var r=this;if(!i.isArray(t))return n.call(r,t,e);var o=s(e).apply(r._boundValue(),[null].concat(t));o===u&&a.throwLater(o.e)}function n(t,e){var r=this,n=r._boundValue(),o=void 0===t?s(e).call(n,null):s(e).call(n,null,t);o===u&&a.throwLater(o.e)}function o(t,e){var r=this;if(!t){var n=new Error(t+"");n.cause=t,t=n}var o=s(e).call(r._boundValue(),t);o===u&&a.throwLater(o.e)}var i=t("./util"),a=e._async,s=i.tryCatch,u=i.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var i=n;void 0!==e&&Object(e).spread&&(i=r),this._then(i,o,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,r,n){"use strict";r.exports=function(){function n(){}function o(t,e){if("function"!=typeof e)throw new b("expecting a function but got "+d.classString(e));if(t.constructor!==i)throw new b("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function i(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==w&&(o(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function a(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new i(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new b("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},f=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new b(t))},h={},d=t("./util");c=d.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},d.notEnumerableProp(i,"_getDomain",c);var v=t("./es5"),y=t("./async"),g=new y;v.defineProperty(i,"_async",{value:g});var _=t("./errors"),b=i.TypeError=_.TypeError;i.RangeError=_.RangeError;var m=i.CancellationError=_.CancellationError;i.TimeoutError=_.TimeoutError,i.OperationalError=_.OperationalError,i.RejectionError=_.OperationalError,i.AggregateError=_.AggregateError;var w=function(){},x={},O={},j=t("./thenables")(i,w),E=t("./promise_array")(i,w,j,p,n),S=t("./context")(i),k=S.create,P=t("./debuggability")(i,S),A=(P.CapturedTrace,t("./finally")(i,j)),M=t("./catch_filter")(O),C=t("./nodeback"),T=d.errorObj,R=d.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),o=0;for(r=0;r<e-1;++r){var i=arguments[r];if(!d.isObject(i))return p("expecting an object but got A catch statement predicate "+d.classString(i));n[o++]=i}return n.length=o,t=arguments[r],this.then(void 0,M(n,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(f,f,void 0,this,void 0)},i.prototype.then=function(t,e){if(P.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+d.classString(t);arguments.length>1&&(r+=", "+d.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var r=this._then(t,e,void 0,void 0,void 0);r._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+d.classString(t)):this.all()._then(t,void 0,void 0,x,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(d.originatesFromRejection,t)},i.getNewLibraryCopy=r.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(w);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=R(t)(C(e,r));return n===T&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new b("expecting a function but got "+d.classString(t));return g.setScheduler(t)},i.prototype._then=function(t,e,r,n,o){var a=void 0!==o,s=a?o:new i(w),u=this._target(),l=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!==(2097152&this._bitField)&&(n=0!==(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=c();if(0!==(50397184&l)){var p,h,v=u._settlePromiseCtx;0!==(33554432&l)?(h=u._rejectionHandler0,p=t):0!==(16777216&l)?(h=u._fulfillmentHandler0,p=e,u._unsetRejectionIsUnhandled()):(v=u._settlePromiseLateCancellationObserver,h=new m("late cancellation observer"),u._attachExtraTrace(h),p=e),g.invoke(v,u,{handler:null===f?p:"function"==typeof p&&d.domainBind(f,p),promise:s,receiver:n,value:h})}else u._addCallbacks(t,e,s,n,f);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==h)return void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),r=t._rejectionHandler0,n=t._promise0,o=t._receiverAt(0);void 0===o&&(o=h),this._addCallbacks(e,r,n,o,null)},i.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),o=t._promiseAt(e),i=t._receiverAt(e);void 0===i&&(i=h),this._addCallbacks(r,n,o,i,null)},i.prototype._addCallbacks=function(t,e,r,n,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===o?t:d.domainBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:d.domainBind(o,e));else{var a=4*i-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=null===o?t:d.domainBind(o,t)),"function"==typeof e&&(this[a+1]=null===o?e:d.domainBind(o,e))}return this._setLength(i+1),i},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var r=j(t,this);if(!(r instanceof i))return this._fulfill(t);e&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(l());var o=n._bitField;if(0===(50397184&o)){var a=this._length();a>0&&n._migrateCallback0(this);for(var s=1;s<a;++s)n._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&o))this._fulfill(n._value());else if(0!==(16777216&o))this._reject(n._reason());else{var u=new m("late cancellation observer");n._attachExtraTrace(u),this._reject(u)}}},i.prototype._rejectCallback=function(t,e,r){var n=d.ensureErrorObject(t),o=n===t;if(!o&&!r&&P.warnings()){var i="a promise was rejected with a non-error: "+d.classString(t);this._warn(i,!0)}this._attachExtraTrace(n,!!e&&o),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)},i.prototype._settlePromiseFromHandler=function(t,e,r,n){var o=n._bitField;if(0===(65536&o)){n._pushContext();var i;e===x?r&&"number"==typeof r.length?i=R(t).apply(this._boundValue(),r):(i=T,i.e=new b("cannot .spread() a non-array: "+d.classString(r))):i=R(t).call(e,r);var a=n._popContext();o=n._bitField,0===(65536&o)&&(i===O?n._reject(r):i===T?n._rejectCallback(i.e,!1):(P.checkForgottenReturns(i,a,"",n,this),n._resolveCallback(i)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,u=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof A&&r.isFinallyHandler()?(r.cancelPromise=t,R(e).call(r,o)===T&&t._reject(T.e)):e===f?t._fulfill(f.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?a?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(u&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,o=t.value;"function"==typeof e?r instanceof i?this._settlePromiseFromHandler(e,n,o,r):e.call(n,o,r):r instanceof i&&r._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,r){var n=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,o,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=l();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():g.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?g.fatalError(t,d.isNode):void((65535&e)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),o=this._promiseAt(r),i=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(o,n,i,e)}},i.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),o=this._promiseAt(r),i=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(o,n,i,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){P.deprecated("Promise.defer","new Promise");var t=new i(w);return{promise:t,resolve:a,reject:s}},d.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,w,j,p,P),t("./bind")(i,w,j,P),t("./cancel")(i,E,p,P),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,w,g,c),i.Promise=i,i.version="3.4.6",t("./map.js")(i,E,p,j,w,P),t("./call_get.js")(i),t("./using.js")(i,p,j,k,w,P),t("./timers.js")(i,w,P),t("./generators.js")(i,p,w,j,n,P),t("./nodeify.js")(i),t("./promisify.js")(i,w),t("./props.js")(i,E,j,p),t("./race.js")(i,w,j,p),t("./reduce.js")(i,E,p,j,w,P),t("./settle.js")(i,E,P),t("./some.js")(i,E,p),t("./filter.js")(i,w),t("./each.js")(i,w),t("./any.js")(i),d.toFastProperties(i),d.toFastProperties(i.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new i(w)),P.setBounds(y.firstLineError,d.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,r){"use strict";e.exports=function(e,r,n,o,i){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var n=this._promise=new e(r);t instanceof e&&n._propagateFrom(t,3),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=t("./util");u.isArray;return u.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(r,i){var s=n(this._values,this._promise);if(s instanceof e){s=s._target();var c=s._bitField;if(this._values=s,0===(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,i);if(0===(33554432&c))return 0!==(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(s=u.asArray(s),null===s){var l=o("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(l,!1)}return 0===s.length?void(i===-5?this._resolveEmptyArray():this._resolve(a(i))):void this._iterate(s)},s.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var o=this._promise,i=!1,a=null,s=0;s<r;++s){var u=n(t[s],o);u instanceof e?(u=u._target(),a=u._bitField):a=null,i?null!==a&&u.suppressUnhandledRejections():null!==a?0===(50397184&a)?(u._proxy(this,s),this._values[s]=u):i=0!==(33554432&a)?this._promiseFulfilled(u._value(),s):0!==(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):i=this._promiseFulfilled(u,s)}i||o._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var r=0;r<t.length;++r)t[r]instanceof e&&t[r].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":36}],24:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){return!x.test(t)}function o(t){try{return t.__isPromisified__===!0}catch(t){return!1}}function i(t,e,r){var n=h.getDataPropertyOrDefault(t,e+r,m);return!!n&&o(n)}function a(t,e,r){for(var n=0;n<t.length;n+=2){var o=t[n];if(r.test(o))for(var i=o.replace(r,""),a=0;a<t.length;a+=2)if(t[a]===i)throw new _("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function s(t,e,r,n){for(var s=h.inheritedDataKeys(t),u=[],c=0;c<s.length;++c){var l=s[c],f=t[l],p=n===O||O(l,f,t);"function"!=typeof f||o(f)||i(t,l,e)||!n(l,f,t,p)||u.push(l,f)}return a(u,e,r),u}function u(t,n,o,i,a,s){function u(){var o=n;n===p&&(o=this);var i=new e(r);i._captureStackTrace();var a="string"==typeof l&&this!==c?this[l]:t,u=d(i,s);try{a.apply(o,v(arguments,u))}catch(t){i._rejectCallback(y(t),!0,!0)}return i._isFateSealed()||i._setAsyncGuaranteed(),i}var c=function(){return this}(),l=t;return"string"==typeof l&&(t=i),h.notEnumerableProp(u,"__isPromisified__",!0),u}function c(t,e,r,n,o){for(var i=new RegExp(j(e)+"$"),a=s(t,e,i,r),u=0,c=a.length;u<c;u+=2){var l=a[u],f=a[u+1],d=l+e;if(n===E)t[d]=E(l,p,l,f,e,o);else{var v=n(f,function(){return E(l,p,l,f,e,o)});h.notEnumerableProp(v,"__isPromisified__",!0),t[d]=v}}return h.toFastProperties(t),t}function l(t,e,r){return E(t,e,void 0,t,null,r)}var f,p={},h=t("./util"),d=t("./nodeback"),v=h.withAppended,y=h.maybeWrapAsError,g=h.canEvaluate,_=t("./errors").TypeError,b="Async",m={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],x=new RegExp("^(?:"+w.join("|")+")$"),O=function(t){return h.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},j=function(t){return t.replace(/([$])/,"\\$")},E=g?f:u;e.promisify=function(t,e){if("function"!=typeof t)throw new _("expecting a function but got "+h.classString(t));if(o(t))return t;e=Object(e);var r=void 0===e.context?p:e.context,i=!!e.multiArgs,a=l(t,r,i);return h.copyDescriptors(t,a,n),a},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new _("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var r=!!e.multiArgs,n=e.suffix;"string"!=typeof n&&(n=b);var o=e.filter;"function"!=typeof o&&(o=O);var i=e.promisifier;if("function"!=typeof i&&(i=E),!h.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=h.inheritedDataKeys(t),s=0;s<a.length;++s){var u=t[a[s]];"constructor"!==a[s]&&h.isClass(u)&&(c(u.prototype,n,o,i,r),c(u,n,o,i,r))}return c(t,n,o,i,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,r){"use strict";e.exports=function(e,r,n,o){function i(t){var e,r=!1;if(void 0!==s&&t instanceof s)e=f(t),r=!0;else{var n=l.keys(t),o=n.length;e=new Array(2*o);for(var i=0;i<o;++i){var a=n[i];e[i]=t[a],e[i+o]=a}}this.constructor$(e),this._isMap=r,this._init$(void 0,-3)}function a(t){var r,a=n(t);return c(a)?(r=a instanceof e?a._then(e.props,void 0,void 0,void 0,void 0):new i(a).promise(),a instanceof e&&r._propagateFrom(a,2),r):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var s,u=t("./util"),c=u.isObject,l=t("./es5");"function"==typeof Map&&(s=Map);var f=function(){function t(t,n){this[e]=t,this[e+r]=n,e++}var e=0,r=0;return function(n){r=n.size,e=0;var o=new Array(2*n.size);return n.forEach(t,o),o}}(),p=function(t){for(var e=new s,r=t.length/2|0,n=0;n<r;++n){var o=t[r+n],i=t[n];e.set(o,i)}return e};u.inherits(i,r),i.prototype._init=function(){},i.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;if(r>=this._length){var n;if(this._isMap)n=p(this._values);else{n={};for(var o=this.length(),i=0,a=this.length();i<a;++i)n[this._values[i+o]]=this._values[i]}return this._resolve(n),!0}return!1},i.prototype.shouldCopyValues=function(){return!1},i.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return a(this)},e.props=function(t){return a(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){"use strict";function n(t,e,r,n,o){for(var i=0;i<o;++i)r[i+n]=t[i+e],t[i+e]=void 0}function o(t){this._capacity=t,this._length=0,this._front=0}o.prototype._willBeOverCapacity=function(t){return this._capacity<t},o.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var r=this._front+e&this._capacity-1;this[r]=t,this._length=e+1},o.prototype._unshiftOne=function(t){var e=this._capacity;this._checkCapacity(this.length()+1);var r=this._front,n=(r-1&e-1^e)-e;this[n]=t,this._front=n,this._length=this.length()+1},o.prototype.unshift=function(t,e,r){this._unshiftOne(r),this._unshiftOne(e),this._unshiftOne(t)},o.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var o=this._front+n-3;this._checkCapacity(n);var i=this._capacity-1;this[o+0&i]=t,this[o+1&i]=e,this[o+2&i]=r,this._length=n},o.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},o.prototype.length=function(){return this._length},o.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},o.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var r=this._front,o=this._length,i=r+o&e-1;n(this,0,this,e,i)},e.exports=o},{}],27:[function(t,e,r){"use strict";e.exports=function(e,r,n,o){function i(t,i){var u=n(t);if(u instanceof e)return s(u);if(t=a.asArray(t),null===t)return o("expecting an array or an iterable object but got "+a.classString(t));var c=new e(r);void 0!==i&&c._propagateFrom(i,3);for(var l=c._fulfill,f=c._reject,p=0,h=t.length;p<h;++p){var d=t[p];(void 0!==d||p in t)&&e.cast(d)._then(l,f,void 0,c,null)}return c}var a=t("./util"),s=function(t){return t.then(function(e){return i(e,t)})};e.race=function(t){return i(t,void 0)},e.prototype.race=function(){return i(this,void 0)}}},{"./util":36}],28:[function(t,e,r){"use strict";e.exports=function(e,r,n,o,i,a){function s(t,r,n,o){this.constructor$(t);var a=p();this._fn=null===a?r:h.domainBind(a,r),void 0!==n&&(n=e.resolve(n),n._attachCancellationCallback(this)),this._initialValue=n,this._currentCancellable=null,o===i?this._eachValues=Array(this._length):0===o?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function c(t,e,r,o){if("function"!=typeof e)return n("expecting a function but got "+h.classString(e));var i=new s(t,e,r,o);return i.promise()}function l(t){this.accum=t,this.array._gotAccum(t);var r=o(this.value,this.array._promise);return r instanceof e?(this.array._currentCancellable=r,r._then(f,void 0,void 0,this,void 0)):f.call(this,r)}function f(t){var r=this.array,n=r._promise,o=d(r._fn);n._pushContext();var i;i=void 0!==r._eachValues?o.call(n._boundValue(),t,this.index,this.length):o.call(n._boundValue(),this.accum,t,this.index,this.length),i instanceof e&&(r._currentCancellable=i);var s=n._popContext();return a.checkForgottenReturns(i,s,void 0!==r._eachValues?"Promise.each":"Promise.reduce",n),i}var p=e._getDomain,h=t("./util"),d=h.tryCatch;h.inherits(s,r),s.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==i&&this._eachValues.push(t)},s.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},s.prototype.shouldCopyValues=function(){return!1},s.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},s.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},s.prototype._iterate=function(t){this._values=t;var r,n,o=t.length;if(void 0!==this._initialValue?(r=this._initialValue,n=0):(r=e.resolve(t[0]),n=1),this._currentCancellable=r,!r.isRejected())for(;n<o;++n){var i={accum:null,value:t[n],index:n,length:o,array:this};r=r._then(l,void 0,void 0,i,void 0)}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(u,u,void 0,r,this)},e.prototype.reduce=function(t,e){return c(this,t,e,null)},e.reduce=function(t,e,r,n){return c(t,e,r,n)}}},{"./util":36}],29:[function(t,o,i){"use strict";var a,s=t("./util"),u=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},c=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var l=r.setImmediate,f=e.nextTick;a=s.isRecentNode?function(t){l.call(r,t)}:function(t){f.call(e,t)}}else if("function"==typeof c&&"function"==typeof c.resolve){var p=c.resolve();a=function(t){p.then(t)}}else a="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof n?function(t){n(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:u:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div"),o=new MutationObserver(function(){t.classList.toggle("foo"),r=!1});o.observe(n,e);var i=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver(function(){n.disconnect(),r()});n.observe(t,e),i()}}();o.exports=a},{"./util":36}],30:[function(t,e,r){"use strict";e.exports=function(e,r,n){function o(t){this.constructor$(t)}var i=e.PromiseInspection,a=t("./util");a.inherits(o,r),o.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){"use strict";e.exports=function(e,r,n){function o(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function i(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new o(t),i=r.promise();return r.setHowMany(e),r.init(),i}var a=t("./util"),s=t("./errors").RangeError,u=t("./errors").AggregateError,c=a.isArray,l={};a.inherits(o,r),o.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()));
}},o.prototype.init=function(){this._initialized=!0,this._init()},o.prototype.setUnwrap=function(){this._unwrap=!0},o.prototype.howMany=function(){return this._howMany},o.prototype.setHowMany=function(t){this._howMany=t},o.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},o.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},o.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},o.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e<this._values.length;++e)this._values[e]!==l&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},o.prototype._fulfilled=function(){return this._totalResolved},o.prototype._rejected=function(){return this._values.length-this.length()},o.prototype._addRejected=function(t){this._values.push(t)},o.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},o.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},o.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)},o.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return i(t,e)},e.prototype.some=function(t){return i(this,t)},e._SomePromiseArray=o}},{"./errors":12,"./util":36}],32:[function(t,e,r){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},o=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},i=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return i.call(this._target())},t.prototype.isFulfilled=function(){return o.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,n){if(l(t)){if(t instanceof e)return t;var o=i(t);if(o===c){n&&n._pushContext();var u=e.reject(o.e);return n&&n._popContext(),u}if("function"==typeof o){if(a(t)){var u=new e(r);return t._then(u._fulfill,u._reject,void 0,u,null),u}return s(t,o,n)}}return t}function o(t){return t.then}function i(t){try{return o(t)}catch(t){return c.e=t,c}}function a(t){try{return f.call(t,"_promise0")}catch(t){return!1}}function s(t,n,o){function i(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,f,!0),s=null)}var s=new e(r),l=s;o&&o._pushContext(),s._captureStackTrace(),o&&o._popContext();var f=!0,p=u.tryCatch(n).call(t,i,a);return f=!1,s&&p===c&&(s._rejectCallback(p.e,!0,!0),s=null),l}var u=t("./util"),c=u.errorObj,l=u.isObject,f={}.hasOwnProperty;return n}},{"./util":36}],34:[function(t,e,r){"use strict";e.exports=function(e,r,n){function o(t){this.handle=t}function i(t){return clearTimeout(this.handle),t}function a(t){throw clearTimeout(this.handle),t}var s=t("./util"),u=e.TimeoutError;o.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,i){var a,s;return void 0!==i?(a=e.resolve(i)._then(c,null,null,t,void 0),n.cancellation()&&i instanceof e&&a._setOnCancel(i)):(a=new e(r),s=setTimeout(function(){a._fulfill()},+t),n.cancellation()&&a._setOnCancel(new o(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};e.prototype.delay=function(t){return l(t,this)};var f=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),s.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};e.prototype.timeout=function(t,e){t=+t;var r,s,u=new o(setTimeout(function(){r.isPending()&&f(r,e,s)},t));return n.cancellation()?(s=this.then(),r=s._then(i,a,void 0,u,void 0),r._setOnCancel(u)):r=this._then(i,a,void 0,u,void 0),r}}},{"./util":36}],35:[function(t,e,r){"use strict";e.exports=function(e,r,n,o,i,a){function s(t){setTimeout(function(){throw t},0)}function u(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(t,r){function o(){if(a>=c)return l._fulfill();var i=u(t[a++]);if(i instanceof e&&i._isDisposable()){try{i=n(i._getDisposer().tryDispose(r),t.promise)}catch(t){return s(t)}if(i instanceof e)return i._then(o,s,null,null,null)}o()}var a=0,c=t.length,l=new e(i);return o(),l}function l(t,e,r){this._data=t,this._promise=e,this._context=r}function f(t,e,r){this.constructor$(t,e,r)}function p(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function h(t){this.length=t,this.promise=null,this[t-1]=null}var d=t("./util"),v=t("./errors").TypeError,y=t("./util").inherits,g=d.errorObj,_=d.tryCatch,b={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():b},l.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==b?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},y(f,l),f.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},h.prototype._resultCancelled=function(){for(var t=this.length,r=0;r<t;++r){var n=this[r];n instanceof e&&n.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return r("you must pass at least 2 arguments to Promise.using");var o=arguments[t-1];if("function"!=typeof o)return r("expecting a function but got "+d.classString(o));var i,s=!0;2===t&&Array.isArray(arguments[0])?(i=arguments[0],t=i.length,s=!1):(i=arguments,t--);for(var u=new h(t),f=0;f<t;++f){var v=i[f];if(l.isDisposer(v)){var y=v;v=v.promise(),v._setDisposable(y)}else{var b=n(v);b instanceof e&&(v=b._then(p,null,null,{resources:u,index:f},void 0))}u[f]=v}for(var m=new Array(u.length),f=0;f<m.length;++f)m[f]=e.resolve(u[f]).reflect();var w=e.all(m).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return g.e=r.error(),g;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}x._pushContext(),o=_(o);var n=s?o.apply(void 0,t):o(t),i=x._popContext();return a.checkForgottenReturns(n,i,"Promise.using",x),n}),x=w.lastly(function(){var t=new e.PromiseInspection(w);return c(u,t)});return u.promise=x,x._setOnCancel(u),x},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new f(t,this,o());throw new v}}},{"./errors":12,"./util":36}],36:[function(t,n,o){"use strict";function i(){try{var t=C;return C=null,t.apply(this,arguments)}catch(t){return M.e=t,M}}function a(t){return C=t,i}function s(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function u(t){return"function"==typeof t||"object"==typeof t&&null!==t}function c(t){return s(t)?new Error(_(t)):t}function l(t,e){var r,n=t.length,o=new Array(n+1);for(r=0;r<n;++r)o[r]=t[r];return o[r]=e,o}function f(t,e,r){if(!P.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function p(t,e,r){if(s(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return P.defineProperty(t,e,n),t}function h(t){throw t}function d(t){try{if("function"==typeof t){var e=P.names(t.prototype),r=P.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=I.test(t+"")&&P.names(t).length>0;if(r||n||o)return!0}return!1}catch(t){return!1}}function v(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function y(t){return D.test(t)}function g(t,e,r){for(var n=new Array(t),o=0;o<t;++o)n[o]=e+o+r;return n}function _(t){try{return t+""}catch(t){return"[no string representation]"}}function b(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{p(t,"isOperational",!0)}catch(t){}}function w(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0)}function x(t){return b(t)&&P.propertyIsWritable(t,"stack")}function O(t){return{}.toString.call(t)}function j(t,e,r){for(var n=P.names(t),o=0;o<n.length;++o){var i=n[o];if(r(i))try{P.defineProperty(e,i,P.getDescriptor(t,i))}catch(t){}}}function E(t,e){return B?{NODE_ENV:"production"}[t]:e}function S(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function k(t,e){return t.bind(e)}var P=t("./es5"),A="undefined"==typeof navigator,M={e:{}},C,T="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof r?r:void 0!==this?this:null,R=function(t,e){function r(){this.constructor=t,this.constructor$=e;for(var r in e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}var n={}.hasOwnProperty;return r.prototype=e.prototype,t.prototype=new r,t.prototype},F=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(P.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],o=Object.create(null);null!=t&&!e(t);){var i;try{i=r(t)}catch(t){return n}for(var a=0;a<i.length;++a){var s=i[a];if(!o[s]){o[s]=!0;var u=Object.getOwnPropertyDescriptor(t,s);null!=u&&null==u.get&&null==u.set&&n.push(s)}}t=P.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var o=[];t:for(var i in r)if(n.call(r,i))o.push(i);else{for(var a=0;a<t.length;++a)if(n.call(t[a],i))continue t;o.push(i)}return o}}(),I=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,L=function(){return"stack"in new Error?function(t){return x(t)?t:new Error(_(t))}:function(t){if(x(t))return t;try{throw new Error(_(t))}catch(t){return t}}}(),N=function(t){return P.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var U="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};N=function(t){return P.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?U(t):null}}var B="undefined"!=typeof e&&"[object process]"===O(e).toLowerCase(),V={isClass:d,isIdentifier:y,inheritedDataKeys:F,getDataPropertyOrDefault:f,thrower:h,isArray:P.isArray,asArray:N,notEnumerableProp:p,isPrimitive:s,isObject:u,isError:b,canEvaluate:A,errorObj:M,tryCatch:a,inherits:R,withAppended:l,maybeWrapAsError:c,toFastProperties:v,filledRange:g,toString:_,canAttachTrace:x,ensureErrorObject:L,originatesFromRejection:w,markAsOriginatingFromRejection:m,classString:O,copyDescriptors:j,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:B,env:E,global:T,getNativePromise:S,domainBind:k};V.isRecentNode=V.isNode&&function(){var t=e.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),V.isNode&&V.toFastProperties(e);try{throw new Error}catch(t){V.lastLineError=t}n.exports=V},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(e,r(126),r(49),r(127).setImmediate)},function(t,e,r){r(260),t.exports=r(30).RegExp.escape},function(t,e,r){var n=r(7),o=r(96),i=r(8)("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),n(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},function(t,e,r){var n=r(252);t.exports=function(t,e){return new(n(t))(e)}},function(t,e,r){"use strict";var n=r(2),o=r(28),i="number";t.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(n(this),t!=i)}},function(t,e,r){var n=r(42),o=r(74),i=r(59);t.exports=function(t){var e=n(t),r=o.f;if(r)for(var a,s=r(t),u=i.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,r){var n=r(42),o=r(18);t.exports=function(t,e){for(var r,i=o(t),a=n(i),s=a.length,u=0;s>u;)if(i[r=a[u++]]===e)return r}},function(t,e,r){"use strict";var n=r(258),o=r(70),i=r(14);t.exports=function(){for(var t=i(this),e=arguments.length,r=Array(e),a=0,s=n._,u=!1;e>a;)(r[a]=arguments[a++])===s&&(u=!0);return function(){var n,i=this,a=arguments.length,c=0,l=0;if(!u&&!a)return o(t,r,i);if(n=r.slice(),u)for(;e>c;c++)n[c]===s&&(n[c]=arguments[l++]);for(;a>l;)n.push(arguments[l++]);return o(t,n,i)}}},function(t,e,r){t.exports=r(5)},function(t,e){t.exports=function(t,e){var r=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,r)}}},function(t,e,r){var n=r(0),o=r(259)(/[\\^$*+?.()|[\]{}]/g,"\\$&");n(n.S,"RegExp",{escape:function(t){return o(t)}})},function(t,e,r){var n=r(0);n(n.P,"Array",{copyWithin:r(135)}),r(50)("copyWithin")},function(t,e,r){"use strict";var n=r(0),o=r(26)(4);n(n.P+n.F*!r(24)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},function(t,e,r){var n=r(0);n(n.P,"Array",{fill:r(88)}),r(50)("fill")},function(t,e,r){"use strict";var n=r(0),o=r(26)(2);n(n.P+n.F*!r(24)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(0),o=r(26)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),n(n.P+n.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r(50)(i)},function(t,e,r){"use strict";var n=r(0),o=r(26)(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),n(n.P+n.F*a,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r(50)(i)},function(t,e,r){"use strict";var n=r(0),o=r(26)(0),i=r(24)([].forEach,!0);n(n.P+n.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(31),o=r(0),i=r(12),a=r(144),s=r(95),u=r(11),c=r(89),l=r(112);o(o.S+o.F*!r(72)(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,o,f,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,g=0,_=l(p);if(y&&(v=n(v,d>2?arguments[2]:void 0,2)),void 0==_||h==Array&&s(_))for(e=u(p.length),r=new h(e);e>g;g++)c(r,g,y?v(p[g],g):p[g]);else for(f=_.call(p),r=new h;!(o=f.next()).done;g++)c(r,g,y?a(f,v,[o.value,g],!0):o.value);return r.length=g,r}})},function(t,e,r){"use strict";var n=r(0),o=r(66)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;n(n.P+n.F*(a||!r(24)(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,e,r){var n=r(0);n(n.S,"Array",{isArray:r(96)})},function(t,e,r){"use strict";var n=r(0),o=r(18),i=[].join;n(n.P+n.F*(r(58)!=Object||!r(24)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,e,r){"use strict";var n=r(0),o=r(18),i=r(37),a=r(11),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(u||!r(24)(s)),"Array",{lastIndexOf:function(t){if(u)return s.apply(this,arguments)||0;var e=o(this),r=a(e.length),n=r-1;for(arguments.length>1&&(n=Math.min(n,i(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in e&&e[n]===t)return n||0;return-1}})},function(t,e,r){"use strict";var n=r(0),o=r(26)(1);n(n.P+n.F*!r(24)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(0),o=r(89);n(n.S+n.F*r(6)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,r=new("function"==typeof this?this:Array)(e);e>t;)o(r,t,arguments[t++]);return r.length=e,r}})},function(t,e,r){"use strict";var n=r(0),o=r(137);n(n.P+n.F*!r(24)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},function(t,e,r){"use strict";var n=r(0),o=r(137);n(n.P+n.F*!r(24)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},function(t,e,r){"use strict";var n=r(0),o=r(93),i=r(22),a=r(45),s=r(11),u=[].slice;n(n.P+n.F*r(6)(function(){o&&u.call(o)}),"Array",{slice:function(t,e){var r=s(this.length),n=i(this);if(e=void 0===e?r:e,"Array"==n)return u.call(this,t,e);for(var o=a(t,r),c=a(e,r),l=s(c-o),f=Array(l),p=0;p<l;p++)f[p]="String"==n?this.charAt(o+p):this[o+p];return f}})},function(t,e,r){"use strict";var n=r(0),o=r(26)(3);n(n.P+n.F*!r(24)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(0),o=r(14),i=r(12),a=r(6),s=[].sort,u=[1,2,3];n(n.P+n.F*(a(function(){u.sort(void 0)})||!a(function(){u.sort(null)})||!r(24)(s)),"Array",{sort:function(t){return void 0===t?s.call(i(this)):s.call(i(this),o(t))}})},function(t,e,r){r(44)("Array")},function(t,e,r){var n=r(0);n(n.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,r){"use strict";var n=r(0),o=r(6),i=Date.prototype.getTime,a=function(t){return t>9?t:"0"+t};n(n.P+n.F*(o(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!o(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),r=t.getUTCMilliseconds(),n=e<0?"-":e>9999?"+":"";return n+("00000"+Math.abs(e)).slice(n?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(r>99?r:"0"+a(r))+"Z"}})},function(t,e,r){"use strict";var n=r(0),o=r(12),i=r(28);n(n.P+n.F*r(6)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),r=i(e);return"number"!=typeof r||isFinite(r)?e.toISOString():null}})},function(t,e,r){var n=r(8)("toPrimitive"),o=Date.prototype;n in o||r(15)(o,n,r(254))},function(t,e,r){var n=Date.prototype,o="Invalid Date",i="toString",a=n[i],s=n.getTime;new Date(NaN)+""!=o&&r(16)(n,i,function(){var t=s.call(this);return t===t?a.call(this):o})},function(t,e,r){var n=r(0);n(n.P,"Function",{bind:r(138)})},function(t,e,r){"use strict";var n=r(7),o=r(21),i=r(8)("hasInstance"),a=Function.prototype;i in a||r(10).f(a,i,{value:function(t){if("function"!=typeof this||!n(t))return!1;if(!n(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,r){var n=r(10).f,o=r(36),i=r(13),a=Function.prototype,s=/^\s*function ([^ (]*)/,u="name",c=Object.isExtensible||function(){return!0};u in a||r(9)&&n(a,u,{configurable:!0,get:function(){try{var t=this,e=(""+t).match(s)[1];return i(t,u)||!c(t)||n(t,u,o(5,e)),e}catch(t){return""}}})},function(t,e,r){var n=r(0),o=r(146),i=Math.sqrt,a=Math.acosh;n(n.S+n.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,e,r){function n(t){return isFinite(t=+t)&&0!=t?t<0?-n(-t):Math.log(t+Math.sqrt(t*t+1)):t}var o=r(0),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:n})},function(t,e,r){var n=r(0),o=Math.atanh;n(n.S+n.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,r){var n=r(0),o=r(100);n(n.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,r){var n=r(0);n(n.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,r){var n=r(0),o=Math.exp;n(n.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,r){var n=r(0),o=r(99);n(n.S+n.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e,r){var n=r(0),o=r(100),i=Math.pow,a=i(2,-52),s=i(2,-23),u=i(2,127)*(2-s),c=i(2,-126),l=function(t){return t+1/a-1/a};n(n.S,"Math",{fround:function(t){var e,r,n=Math.abs(t),i=o(t);return n<c?i*l(n/c/s)*c*s:(e=(1+s/a)*n,r=e-(e-n),r>u||r!=r?i*(1/0):i*r)}})},function(t,e,r){var n=r(0),o=Math.abs;n(n.S,"Math",{hypot:function(t,e){for(var r,n,i=0,a=0,s=arguments.length,u=0;a<s;)r=o(arguments[a++]),u<r?(n=u/r,i=i*n*n+1,u=r):r>0?(n=r/u,i+=n*n):i+=r;return u===1/0?1/0:u*Math.sqrt(i)}})},function(t,e,r){var n=r(0),o=Math.imul;n(n.S+n.F*r(6)(function(){return o(4294967295,5)!=-5||2!=o.length}),"Math",{imul:function(t,e){var r=65535,n=+t,o=+e,i=r&n,a=r&o;return 0|i*a+((r&n>>>16)*a+i*(r&o>>>16)<<16>>>0)}})},function(t,e,r){var n=r(0);n(n.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,r){var n=r(0);n(n.S,"Math",{log1p:r(146)})},function(t,e,r){var n=r(0);n(n.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,r){var n=r(0);n(n.S,"Math",{sign:r(100)})},function(t,e,r){var n=r(0),o=r(99),i=Math.exp;n(n.S+n.F*r(6)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,r){var n=r(0),o=r(99),i=Math.exp;n(n.S,"Math",{tanh:function(t){var e=o(t=+t),r=o(-t);return e==1/0?1:r==1/0?-1:(e-r)/(i(t)+i(-t))}})},function(t,e,r){var n=r(0);n(n.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,r){"use strict";var n=r(5),o=r(13),i=r(22),a=r(94),s=r(28),u=r(6),c=r(41).f,l=r(20).f,f=r(10).f,p=r(54).trim,h="Number",d=n[h],v=d,y=d.prototype,g=i(r(40)(y))==h,_="trim"in String.prototype,b=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=_?e.trim():p(e,3);var r,n,o,i=e.charCodeAt(0);if(43===i||45===i){if(r=e.charCodeAt(2),88===r||120===r)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+e}for(var a,u=e.slice(2),c=0,l=u.length;c<l;c++)if(a=u.charCodeAt(c),a<48||a>o)return NaN;return parseInt(u,n)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof d&&(g?u(function(){y.valueOf.call(r)}):i(r)!=h)?a(new v(b(e)),r,d):b(e)};for(var m,w=r(9)?c(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(v,m=w[x])&&!o(d,m)&&f(d,m,l(v,m));d.prototype=y,y.constructor=d,r(16)(n,h,d)}},function(t,e,r){var n=r(0);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,r){var n=r(0),o=r(5).isFinite;n(n.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,r){var n=r(0);n(n.S,"Number",{isInteger:r(143)})},function(t,e,r){var n=r(0);n(n.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,r){var n=r(0),o=r(143),i=Math.abs;n(n.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,r){var n=r(0);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(0);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(0),o=r(153);n(n.S+n.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,r){var n=r(0),o=r(154);n(n.S+n.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,r){"use strict";var n=r(0),o=r(37),i=r(134),a=r(107),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f="0",p=function(t,e){for(var r=-1,n=e;++r<6;)n+=t*c[r],c[r]=n%1e7,n=u(n/1e7)},h=function(t){for(var e=6,r=0;--e>=0;)r+=c[e],c[e]=u(r/t),r=r%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var r=String(c[t]);e=""===e?r:e+a.call(f,7-r.length)+r}return e},v=function(t,e,r){return 0===e?r:e%2===1?v(t,e-1,r*t):v(t*t,e/2,r)},y=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e};n(n.P+n.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(6)(function(){s.call({})})),"Number",{toFixed:function(t){var e,r,n,s,u=i(this,l),c=o(t),g="",_=f;if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(g="-",u=-u),u>1e-21)if(e=y(u*v(2,69,1))-69,r=e<0?u*v(2,-e,1):u/v(2,e,1),r*=4503599627370496,e=52-e,e>0){for(p(0,r),n=c;n>=7;)p(1e7,0),n-=7;for(p(v(10,n,1),0),n=e-1;n>=23;)h(1<<23),n-=23;h(1<<n),p(1,1),h(2),_=d()}else p(0,r),p(1<<-e,0),_=d()+a.call(f,c);return c>0?(s=_.length,_=g+(s<=c?"0."+a.call(f,c-s)+_:_.slice(0,s-c)+"."+_.slice(s-c))):_=g+_,_}})},function(t,e,r){"use strict";var n=r(0),o=r(6),i=r(134),a=1..toPrecision;n(n.P+n.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,r){var n=r(0);n(n.S+n.F,"Object",{assign:r(147)})},function(t,e,r){var n=r(0);n(n.S,"Object",{create:r(40)})},function(t,e,r){var n=r(0);n(n.S+n.F*!r(9),"Object",{defineProperties:r(148)})},function(t,e,r){var n=r(0);n(n.S+n.F*!r(9),"Object",{defineProperty:r(10).f})},function(t,e,r){var n=r(7),o=r(35).onFreeze;r(27)("freeze",function(t){return function(e){return t&&n(e)?t(o(e)):e}})},function(t,e,r){var n=r(18),o=r(20).f;r(27)("getOwnPropertyDescriptor",function(){return function(t,e){return o(n(t),e)}})},function(t,e,r){r(27)("getOwnPropertyNames",function(){return r(149).f})},function(t,e,r){var n=r(12),o=r(21);r(27)("getPrototypeOf",function(){return function(t){return o(n(t))}})},function(t,e,r){var n=r(7);r(27)("isExtensible",function(t){return function(e){return!!n(e)&&(!t||t(e))}})},function(t,e,r){var n=r(7);r(27)("isFrozen",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(7);r(27)("isSealed",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(0);n(n.S,"Object",{is:r(155)})},function(t,e,r){var n=r(12),o=r(42);r(27)("keys",function(){return function(t){return o(n(t))}})},function(t,e,r){var n=r(7),o=r(35).onFreeze;r(27)("preventExtensions",function(t){return function(e){return t&&n(e)?t(o(e)):e}})},function(t,e,r){var n=r(7),o=r(35).onFreeze;r(27)("seal",function(t){return function(e){return t&&n(e)?t(o(e)):e}})},function(t,e,r){var n=r(0);n(n.S,"Object",{setPrototypeOf:r(102).set})},function(t,e,r){"use strict";var n=r(57),o={};o[r(8)("toStringTag")]="z",o+""!="[object z]"&&r(16)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},function(t,e,r){var n=r(0),o=r(153);n(n.G+n.F*(parseFloat!=o),{parseFloat:o})},function(t,e,r){var n=r(0),o=r(154);n(n.G+n.F*(parseInt!=o),{parseInt:o})},function(t,e,r){"use strict";var n,o,i,a=r(39),s=r(5),u=r(31),c=r(57),l=r(0),f=r(7),p=r(14),h=r(38),d=r(51),v=r(104),y=r(109).set,g=r(101)(),_="Promise",b=s.TypeError,m=s.process,w=s[_],m=s.process,x="process"==c(m),O=function(){},j=!!function(){try{var t=w.resolve(1),e=(t.constructor={})[r(8)("species")]=function(t){t(O,O)};return(x||"function"==typeof PromiseRejectionEvent)&&t.then(O)instanceof e}catch(t){}}(),E=function(t,e){return t===e||t===w&&e===i},S=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},k=function(t){return E(w,t)?new P(t):new o(t)},P=o=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw b("Bad Promise constructor");e=t,r=n}),this.resolve=p(e),this.reject=p(r)},A=function(t){try{t()}catch(t){return{error:t}}},M=function(t,e){if(!t._n){t._n=!0;var r=t._c;g(function(){for(var n=t._v,o=1==t._s,i=0,a=function(e){var r,i,a=o?e.ok:e.fail,s=e.resolve,u=e.reject,c=e.domain;try{a?(o||(2==t._h&&R(t),t._h=1),a===!0?r=n:(c&&c.enter(),r=a(n),c&&c.exit()),r===e.promise?u(b("Promise-chain cycle")):(i=S(r))?i.call(r,s,u):s(r)):u(n)}catch(t){u(t)}};r.length>i;)a(r[i++]);t._c=[],t._n=!1,e&&!t._h&&C(t)})}},C=function(t){y.call(s,function(){var e,r,n,o=t._v;if(T(t)&&(e=A(function(){x?m.emit("unhandledRejection",o,t):(r=s.onunhandledrejection)?r({promise:t,reason:o}):(n=s.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=x||T(t)?2:1),t._a=void 0,e)throw e.error})},T=function(t){if(1==t._h)return!1;for(var e,r=t._a||t._c,n=0;r.length>n;)if(e=r[n++],e.fail||!T(e.promise))return!1;return!0},R=function(t){y.call(s,function(){var e;x?m.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),M(e,!0))},I=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw b("Promise can't be resolved itself");(e=S(t))?g(function(){var n={_w:r,_d:!1};try{e.call(t,u(I,n,1),u(F,n,1))}catch(t){F.call(n,t)}}):(r._v=t,r._s=1,M(r,!1))}catch(t){F.call({_w:r,_d:!1},t)}}};j||(w=function(t){h(this,w,_,"_h"),p(t),n.call(this);try{t(u(I,this,1),u(F,this,1))}catch(t){F.call(this,t)}},n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},n.prototype=r(43)(w.prototype,{then:function(t,e){var r=k(v(this,w));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=x?m.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&M(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),P=function(){var t=new n;this.promise=t,this.resolve=u(I,t,1),this.reject=u(F,t,1)}),l(l.G+l.W+l.F*!j,{Promise:w}),r(53)(w,_),r(44)(_),i=r(30)[_],l(l.S+l.F*!j,_,{reject:function(t){var e=k(this),r=e.reject;return r(t),e.promise}}),l(l.S+l.F*(a||!j),_,{resolve:function(t){if(t instanceof w&&E(t.constructor,this))return t;var e=k(this),r=e.resolve;return r(t),e.promise}}),l(l.S+l.F*!(j&&r(72)(function(t){w.all(t).catch(O)})),_,{all:function(t){var e=this,r=k(e),n=r.resolve,o=r.reject,i=A(function(){var r=[],i=0,a=1;d(t,!1,function(t){var s=i++,u=!1;r.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,r[s]=t,--a||n(r))},o)}),--a||n(r)});return i&&o(i.error),r.promise},race:function(t){var e=this,r=k(e),n=r.reject,o=A(function(){d(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return o&&n(o.error),r.promise}})},function(t,e,r){var n=r(0),o=r(14),i=r(2),a=(r(5).Reflect||{}).apply,s=Function.apply;n(n.S+n.F*!r(6)(function(){a(function(){})}),"Reflect",{apply:function(t,e,r){var n=o(t),u=i(r);return a?a(n,e,u):s.call(n,e,u);
}})},function(t,e,r){var n=r(0),o=r(40),i=r(14),a=r(2),s=r(7),u=r(6),c=r(138),l=(r(5).Reflect||{}).construct,f=u(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),p=!u(function(){l(function(){})});n(n.S+n.F*(f||p),"Reflect",{construct:function(t,e){i(t),a(e);var r=arguments.length<3?t:i(arguments[2]);if(p&&!f)return l(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(c.apply(t,n))}var u=r.prototype,h=o(s(u)?u:Object.prototype),d=Function.apply.call(t,h,e);return s(d)?d:h}})},function(t,e,r){var n=r(10),o=r(0),i=r(2),a=r(28);o(o.S+o.F*r(6)(function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,r){i(t),e=a(e,!0),i(r);try{return n.f(t,e,r),!0}catch(t){return!1}}})},function(t,e,r){var n=r(0),o=r(20).f,i=r(2);n(n.S,"Reflect",{deleteProperty:function(t,e){var r=o(i(t),e);return!(r&&!r.configurable)&&delete t[e]}})},function(t,e,r){"use strict";var n=r(0),o=r(2),i=function(t){this._t=o(t),this._i=0;var e,r=this._k=[];for(e in t)r.push(e)};r(97)(i,"Object",function(){var t,e=this,r=e._k;do if(e._i>=r.length)return{value:void 0,done:!0};while(!((t=r[e._i++])in e._t));return{value:t,done:!1}}),n(n.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,r){var n=r(20),o=r(0),i=r(2);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return n.f(i(t),e)}})},function(t,e,r){var n=r(0),o=r(21),i=r(2);n(n.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,r){function n(t,e){var r,s,l=arguments.length<3?t:arguments[2];return c(t)===l?t[e]:(r=o.f(t,e))?a(r,"value")?r.value:void 0!==r.get?r.get.call(l):void 0:u(s=i(t))?n(s,e,l):void 0}var o=r(20),i=r(21),a=r(13),s=r(0),u=r(7),c=r(2);s(s.S,"Reflect",{get:n})},function(t,e,r){var n=r(0);n(n.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,r){var n=r(0),o=r(2),i=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,r){var n=r(0);n(n.S,"Reflect",{ownKeys:r(152)})},function(t,e,r){var n=r(0),o=r(2),i=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,r){var n=r(0),o=r(102);o&&n(n.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,r){function n(t,e,r){var u,p,h=arguments.length<4?t:arguments[3],d=i.f(l(t),e);if(!d){if(f(p=a(t)))return n(p,e,r,h);d=c(0)}return s(d,"value")?!(d.writable===!1||!f(h))&&(u=i.f(h,e)||c(0),u.value=r,o.f(h,e,u),!0):void 0!==d.set&&(d.set.call(h,r),!0)}var o=r(10),i=r(20),a=r(21),s=r(13),u=r(0),c=r(36),l=r(2),f=r(7);u(u.S,"Reflect",{set:n})},function(t,e,r){var n=r(5),o=r(94),i=r(10).f,a=r(41).f,s=r(71),u=r(69),c=n.RegExp,l=c,f=c.prototype,p=/a/g,h=/a/g,d=new c(p)!==p;if(r(9)&&(!d||r(6)(function(){return h[r(8)("match")]=!1,c(p)!=p||c(h)==h||"/a/i"!=c(p,"i")}))){c=function(t,e){var r=this instanceof c,n=s(t),i=void 0===e;return!r&&n&&t.constructor===c&&i?t:o(d?new l(n&&!i?t.source:t,e):l((n=t instanceof c)?t.source:t,n&&i?u.call(t):e),r?this:f,c)};for(var v=(function(t){t in c||i(c,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})}),y=a(l),g=0;y.length>g;)v(y[g++]);f.constructor=c,c.prototype=f,r(16)(n,"RegExp",c)}r(44)("RegExp")},function(t,e,r){r(68)("match",1,function(t,e,r){return[function(r){"use strict";var n=t(this),o=void 0==r?void 0:r[e];return void 0!==o?o.call(r,n):new RegExp(r)[e](String(n))},r]})},function(t,e,r){r(68)("replace",2,function(t,e,r){return[function(n,o){"use strict";var i=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},function(t,e,r){r(68)("search",1,function(t,e,r){return[function(r){"use strict";var n=t(this),o=void 0==r?void 0:r[e];return void 0!==o?o.call(r,n):new RegExp(r)[e](String(n))},r]})},function(t,e,r){r(68)("split",2,function(t,e,n){"use strict";var o=r(71),i=n,a=[].push,s="split",u="length",c="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];n=function(t,e){var r=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(r,t,e);var n,s,f,p,h,d=[],v=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),y=0,g=void 0===e?4294967295:e>>>0,_=new RegExp(t.source,v+"g");for(l||(n=new RegExp("^"+_.source+"$(?!\\s)",v));(s=_.exec(r))&&(f=s.index+s[0][u],!(f>y&&(d.push(r.slice(y,s.index)),!l&&s[u]>1&&s[0].replace(n,function(){for(h=1;h<arguments[u]-2;h++)void 0===arguments[h]&&(s[h]=void 0)}),s[u]>1&&s.index<r[u]&&a.apply(d,s.slice(1)),p=s[0][u],y=f,d[u]>=g)));)_[c]===s.index&&_[c]++;return y===r[u]?!p&&_.test("")||d.push(""):d.push(r.slice(y)),d[u]>g?d.slice(0,g):d}}else"0"[s](void 0,0)[u]&&(n=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(r,o){var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},function(t,e,r){"use strict";r(159);var n=r(2),o=r(69),i=r(9),a="toString",s=/./[a],u=function(t){r(16)(RegExp.prototype,a,t,!0)};r(6)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var t=n(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):s.name!=a&&u(function(){return s.call(this)})},function(t,e,r){"use strict";r(17)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,r){"use strict";r(17)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,r){"use strict";r(17)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,r){"use strict";r(17)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,r){"use strict";var n=r(0),o=r(105)(!1);n(n.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,r){"use strict";var n=r(0),o=r(11),i=r(106),a="endsWith",s=""[a];n(n.P+n.F*r(92)(a),"String",{endsWith:function(t){var e=i(this,t,a),r=arguments.length>1?arguments[1]:void 0,n=o(e.length),u=void 0===r?n:Math.min(o(r),n),c=String(t);return s?s.call(e,c,u):e.slice(u-c.length,u)===c}})},function(t,e,r){"use strict";r(17)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,r){"use strict";r(17)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,r){"use strict";r(17)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,r){var n=r(0),o=r(45),i=String.fromCharCode,a=String.fromCodePoint;n(n.S+n.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,a=0;n>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");r.push(e<65536?i(e):i(((e-=65536)>>10)+55296,e%1024+56320))}return r.join("")}})},function(t,e,r){"use strict";var n=r(0),o=r(106),i="includes";n(n.P+n.F*r(92)(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";r(17)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,r){"use strict";var n=r(105)(!0);r(98)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e,r){"use strict";r(17)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,r){var n=r(0),o=r(18),i=r(11);n(n.S,"String",{raw:function(t){for(var e=o(t.raw),r=i(e.length),n=arguments.length,a=[],s=0;r>s;)a.push(String(e[s++])),s<n&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,r){var n=r(0);n(n.P,"String",{repeat:r(107)})},function(t,e,r){"use strict";r(17)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,r){"use strict";var n=r(0),o=r(11),i=r(106),a="startsWith",s=""[a];n(n.P+n.F*r(92)(a),"String",{startsWith:function(t){var e=i(this,t,a),r=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return s?s.call(e,n,r):e.slice(r,r+n.length)===n}})},function(t,e,r){"use strict";r(17)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,r){"use strict";r(17)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,r){"use strict";r(17)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,r){"use strict";r(54)("trim",function(t){return function(){return t(this,3)}})},function(t,e,r){"use strict";var n=r(5),o=r(13),i=r(9),a=r(0),s=r(16),u=r(35).KEY,c=r(6),l=r(75),f=r(53),p=r(46),h=r(8),d=r(157),v=r(111),y=r(256),g=r(255),_=r(96),b=r(2),m=r(18),w=r(28),x=r(36),O=r(40),j=r(149),E=r(20),S=r(10),k=r(42),P=E.f,A=S.f,M=j.f,C=n.Symbol,T=n.JSON,R=T&&T.stringify,F="prototype",I=h("_hidden"),D=h("toPrimitive"),L={}.propertyIsEnumerable,N=l("symbol-registry"),U=l("symbols"),B=l("op-symbols"),V=Object[F],W="function"==typeof C,z=n.QObject,q=!z||!z[F]||!z[F].findChild,G=i&&c(function(){return 7!=O(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=P(V,e);n&&delete V[e],A(t,e,r),n&&t!==V&&A(V,e,n)}:A,H=function(t){var e=U[t]=O(C[F]);return e._k=t,e},Y=W&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof C},$=function(t,e,r){return t===V&&$(B,e,r),b(t),e=w(e,!0),b(r),o(U,e)?(r.enumerable?(o(t,I)&&t[I][e]&&(t[I][e]=!1),r=O(r,{enumerable:x(0,!1)})):(o(t,I)||A(t,I,x(1,{})),t[I][e]=!0),G(t,e,r)):A(t,e,r)},K=function(t,e){b(t);for(var r,n=g(e=m(e)),o=0,i=n.length;i>o;)$(t,r=n[o++],e[r]);return t},X=function(t,e){return void 0===e?O(t):K(O(t),e)},Z=function(t){var e=L.call(this,t=w(t,!0));return!(this===V&&o(U,t)&&!o(B,t))&&(!(e||!o(this,t)||!o(U,t)||o(this,I)&&this[I][t])||e)},Q=function(t,e){if(t=m(t),e=w(e,!0),t!==V||!o(U,e)||o(B,e)){var r=P(t,e);return!r||!o(U,e)||o(t,I)&&t[I][e]||(r.enumerable=!0),r}},J=function(t){for(var e,r=M(m(t)),n=[],i=0;r.length>i;)o(U,e=r[i++])||e==I||e==u||n.push(e);return n},tt=function(t){for(var e,r=t===V,n=M(r?B:m(t)),i=[],a=0;n.length>a;)!o(U,e=n[a++])||r&&!o(V,e)||i.push(U[e]);return i};W||(C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(r){this===V&&e.call(B,r),o(this,I)&&o(this[I],t)&&(this[I][t]=!1),G(this,t,x(1,r))};return i&&q&&G(V,t,{configurable:!0,set:e}),H(t)},s(C[F],"toString",function(){return this._k}),E.f=Q,S.f=$,r(41).f=j.f=J,r(59).f=Z,r(74).f=tt,i&&!r(39)&&s(V,"propertyIsEnumerable",Z,!0),d.f=function(t){return H(h(t))}),a(a.G+a.W+a.F*!W,{Symbol:C});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;et.length>rt;)h(et[rt++]);for(var et=k(h.store),rt=0;et.length>rt;)v(et[rt++]);a(a.S+a.F*!W,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=C(t)},keyFor:function(t){if(Y(t))return y(N,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!W,"Object",{create:X,defineProperty:$,defineProperties:K,getOwnPropertyDescriptor:Q,getOwnPropertyNames:J,getOwnPropertySymbols:tt}),T&&a(a.S+a.F*(!W||c(function(){var t=C();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!Y(t)){for(var e,r,n=[t],o=1;arguments.length>o;)n.push(arguments[o++]);return e=n[1],"function"==typeof e&&(r=e),!r&&_(e)||(e=function(t,e){if(r&&(e=r.call(this,t,e)),!Y(e))return e}),n[1]=e,R.apply(T,n)}}}),C[F][D]||r(15)(C[F],D,C[F].valueOf),f(C,"Symbol"),f(Math,"Math",!0),f(n.JSON,"JSON",!0)},function(t,e,r){"use strict";var n=r(0),o=r(76),i=r(110),a=r(2),s=r(45),u=r(11),c=r(7),l=r(5).ArrayBuffer,f=r(104),p=i.ArrayBuffer,h=i.DataView,d=o.ABV&&l.isView,v=p.prototype.slice,y=o.VIEW,g="ArrayBuffer";n(n.G+n.W+n.F*(l!==p),{ArrayBuffer:p}),n(n.S+n.F*!o.CONSTR,g,{isView:function(t){return d&&d(t)||c(t)&&y in t}}),n(n.P+n.U+n.F*r(6)(function(){return!new p(2).slice(1,void 0).byteLength}),g,{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var r=a(this).byteLength,n=s(t,r),o=s(void 0===e?r:e,r),i=new(f(this,p))(u(o-n)),c=new h(this),l=new h(i),d=0;n<o;)l.setUint8(d++,c.getUint8(n++));return i}}),r(44)(g)},function(t,e,r){var n=r(0);n(n.G+n.W+n.F*!r(76).ABV,{DataView:r(110).DataView})},function(t,e,r){r(33)("Float32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(33)("Float64",8,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(33)("Int16",2,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(33)("Int32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(33)("Int8",1,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(33)("Uint16",2,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(33)("Uint32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(33)("Uint8",1,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(33)("Uint8",1,function(t){return function(e,r,n){return t(this,e,r,n)}},!0)},function(t,e,r){"use strict";var n=r(141);r(67)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(this,t,!0)}},n,!1,!0)},function(t,e,r){"use strict";var n=r(0),o=r(66)(!0);n(n.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r(50)("includes")},function(t,e,r){var n=r(0),o=r(101)(),i=r(5).process,a="process"==r(22)(i);n(n.G,{asap:function(t){var e=a&&i.domain;o(e?e.bind(t):t)}})},function(t,e,r){var n=r(0),o=r(22);n(n.S,"Error",{isError:function(t){return"Error"===o(t)}})},function(t,e,r){var n=r(0);n(n.P+n.R,"Map",{toJSON:r(140)("Map")})},function(t,e,r){var n=r(0);n(n.S,"Math",{iaddh:function(t,e,r,n){var o=t>>>0,i=e>>>0,a=r>>>0;return i+(n>>>0)+((o&a|(o|a)&~(o+a>>>0))>>>31)|0}})},function(t,e,r){var n=r(0);n(n.S,"Math",{imulh:function(t,e){var r=65535,n=+t,o=+e,i=n&r,a=o&r,s=n>>16,u=o>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>16)+((i*u>>>0)+(c&r)>>16)}})},function(t,e,r){var n=r(0);n(n.S,"Math",{isubh:function(t,e,r,n){var o=t>>>0,i=e>>>0,a=r>>>0;return i-(n>>>0)-((~o&a|~(o^a)&o-a>>>0)>>>31)|0}})},function(t,e,r){var n=r(0);n(n.S,"Math",{umulh:function(t,e){var r=65535,n=+t,o=+e,i=n&r,a=o&r,s=n>>>16,u=o>>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>>16)+((i*u>>>0)+(c&r)>>>16)}})},function(t,e,r){"use strict";var n=r(0),o=r(12),i=r(14),a=r(10);r(9)&&n(n.P+r(73),"Object",{__defineGetter__:function(t,e){a.f(o(this),t,{get:i(e),enumerable:!0,configurable:!0})}})},function(t,e,r){"use strict";var n=r(0),o=r(12),i=r(14),a=r(10);r(9)&&n(n.P+r(73),"Object",{__defineSetter__:function(t,e){a.f(o(this),t,{set:i(e),enumerable:!0,configurable:!0})}})},function(t,e,r){var n=r(0),o=r(151)(!0);n(n.S,"Object",{entries:function(t){return o(t)}})},function(t,e,r){var n=r(0),o=r(152),i=r(18),a=r(20),s=r(89);n(n.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,r=i(t),n=a.f,u=o(r),c={},l=0;u.length>l;)s(c,e=u[l++],n(r,e));return c}})},function(t,e,r){"use strict";var n=r(0),o=r(12),i=r(28),a=r(21),s=r(20).f;r(9)&&n(n.P+r(73),"Object",{__lookupGetter__:function(t){var e,r=o(this),n=i(t,!0);do if(e=s(r,n))return e.get;while(r=a(r))}})},function(t,e,r){"use strict";var n=r(0),o=r(12),i=r(28),a=r(21),s=r(20).f;r(9)&&n(n.P+r(73),"Object",{__lookupSetter__:function(t){var e,r=o(this),n=i(t,!0);do if(e=s(r,n))return e.set;while(r=a(r))}})},function(t,e,r){var n=r(0),o=r(151)(!1);n(n.S,"Object",{values:function(t){return o(t)}})},function(t,e,r){"use strict";var n=r(0),o=r(5),i=r(30),a=r(101)(),s=r(8)("observable"),u=r(14),c=r(2),l=r(38),f=r(43),p=r(15),h=r(51),d=h.RETURN,v=function(t){return null==t?void 0:u(t)},y=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},_=function(t){g(t)||(t._o=void 0,y(t))},b=function(t,e){c(t),this._c=void 0,this._o=t,t=new m(this);try{var r=e(t),n=r;null!=r&&("function"==typeof r.unsubscribe?r=function(){n.unsubscribe()}:u(r),this._c=r)}catch(e){return void t.error(e)}g(this)&&y(this)};b.prototype=f({},{unsubscribe:function(){_(this)}});var m=function(t){this._s=t};m.prototype=f({},{next:function(t){var e=this._s;if(!g(e)){var r=e._o;try{var n=v(r.next);if(n)return n.call(r,t)}catch(t){try{_(e)}finally{throw t}}}},error:function(t){var e=this._s;if(g(e))throw t;var r=e._o;e._o=void 0;try{var n=v(r.error);if(!n)throw t;t=n.call(r,t)}catch(t){try{y(e)}finally{throw t}}return y(e),t},complete:function(t){var e=this._s;if(!g(e)){var r=e._o;e._o=void 0;try{var n=v(r.complete);t=n?n.call(r,t):void 0}catch(t){try{y(e)}finally{throw t}}return y(e),t}}});var w=function(t){l(this,w,"Observable","_f")._f=u(t)};f(w.prototype,{subscribe:function(t){return new b(t,this._f)},forEach:function(t){var e=this;return new(i.Promise||o.Promise)(function(r,n){u(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(t){n(t),o.unsubscribe()}},error:n,complete:r})})}}),f(w,{from:function(t){var e="function"==typeof this?this:w,r=v(c(t)[s]);if(r){var n=c(r.call(t));return n.constructor===e?n:new e(function(t){return n.subscribe(t)})}return new e(function(e){var r=!1;return a(function(){if(!r){try{if(h(t,!1,function(t){if(e.next(t),r)return d})===d)return}catch(t){if(r)throw t;return void e.error(t)}e.complete()}}),function(){r=!0}})},of:function(){for(var t=0,e=arguments.length,r=Array(e);t<e;)r[t]=arguments[t++];return new("function"==typeof this?this:w)(function(t){var e=!1;return a(function(){if(!e){for(var n=0;n<r.length;++n)if(t.next(r[n]),e)return;t.complete()}}),function(){e=!0}})}}),p(w.prototype,s,function(){return this}),n(n.G,{Observable:w}),r(44)("Observable")},function(t,e,r){var n=r(32),o=r(2),i=n.key,a=n.set;n.exp({defineMetadata:function(t,e,r,n){a(t,e,o(r),i(n))}})},function(t,e,r){var n=r(32),o=r(2),i=n.key,a=n.map,s=n.store;n.exp({deleteMetadata:function(t,e){var r=arguments.length<3?void 0:i(arguments[2]),n=a(o(e),r,!1);if(void 0===n||!n.delete(t))return!1;if(n.size)return!0;var u=s.get(e);return u.delete(r),!!u.size||s.delete(e)}})},function(t,e,r){var n=r(160),o=r(136),i=r(32),a=r(2),s=r(21),u=i.keys,c=i.key,l=function(t,e){var r=u(t,e),i=s(t);if(null===i)return r;var a=l(i,e);return a.length?r.length?o(new n(r.concat(a))):a:r};i.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,r){var n=r(32),o=r(2),i=r(21),a=n.has,s=n.get,u=n.key,c=function(t,e,r){var n=a(t,e,r);if(n)return s(t,e,r);var o=i(e);return null!==o?c(t,o,r):void 0};n.exp({getMetadata:function(t,e){return c(t,o(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,r){var n=r(32),o=r(2),i=n.keys,a=n.key;n.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,r){var n=r(32),o=r(2),i=n.get,a=n.key;n.exp({getOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,r){var n=r(32),o=r(2),i=r(21),a=n.has,s=n.key,u=function(t,e,r){var n=a(t,e,r);if(n)return!0;var o=i(e);return null!==o&&u(t,o,r)};n.exp({hasMetadata:function(t,e){return u(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,r){var n=r(32),o=r(2),i=n.has,a=n.key;n.exp({hasOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,r){var n=r(32),o=r(2),i=r(14),a=n.key,s=n.set;n.exp({metadata:function(t,e){return function(r,n){s(t,e,(void 0!==n?o:i)(r),a(n))}}})},function(t,e,r){var n=r(0);n(n.P+n.R,"Set",{toJSON:r(140)("Set")})},function(t,e,r){"use strict";var n=r(0),o=r(105)(!0);n(n.P,"String",{at:function(t){return o(this,t)}})},function(t,e,r){"use strict";var n=r(0),o=r(23),i=r(11),a=r(71),s=r(69),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};r(97)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),n(n.P,"String",{matchAll:function(t){if(o(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),r="flags"in u?String(t.flags):s.call(t),n=new RegExp(t.source,~r.indexOf("g")?r:"g"+r);return n.lastIndex=i(t.lastIndex),new c(n,e)}})},function(t,e,r){"use strict";var n=r(0),o=r(156);n(n.P,"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,r){"use strict";var n=r(0),o=r(156);n(n.P,"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,r){"use strict";r(54)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,r){"use strict";r(54)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,r){r(111)("asyncIterator")},function(t,e,r){r(111)("observable")},function(t,e,r){var n=r(0);n(n.S,"System",{global:r(5)})},function(t,e,r){for(var n=r(113),o=r(16),i=r(5),a=r(15),s=r(52),u=r(8),c=u("iterator"),l=u("toStringTag"),f=s.Array,p=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d,v=p[h],y=i[v],g=y&&y.prototype;if(g){g[c]||a(g,c,f),g[l]||a(g,l,v),s[v]=f;for(d in n)g[d]||o(g,d,n[d],!0)}}},function(t,e,r){var n=r(0),o=r(109);n(n.G+n.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,r){var n=r(5),o=r(0),i=r(70),a=r(257),s=n.navigator,u=!!s&&/MSIE .\./.test(s.userAgent),c=function(t){return u?function(e,r){return t(i(a,[].slice.call(arguments,2),"function"==typeof e?e:Function(e)),r)}:t};o(o.G+o.B+o.F*u,{setTimeout:c(n.setTimeout),setInterval:c(n.setInterval)})},function(t,e,r){r(380),r(319),r(321),r(320),r(323),r(325),r(330),r(324),r(322),r(332),r(331),r(327),r(328),r(326),r(318),r(329),r(333),r(334),r(286),r(288),r(287),r(336),r(335),r(306),r(316),r(317),r(307),r(308),r(309),r(310),r(311),r(312),r(313),r(314),r(315),r(289),r(290),r(291),r(292),r(293),r(294),r(295),r(296),r(297),r(298),r(299),r(300),r(301),r(302),r(303),r(304),r(305),r(367),r(372),r(379),r(370),r(362),r(363),r(368),r(373),r(375),r(358),r(359),r(360),r(361),r(364),r(365),r(366),r(369),r(371),r(374),r(376),r(377),r(378),r(281),r(283),r(282),r(285),r(284),r(270),r(268),r(274),r(271),r(277),r(279),r(267),r(273),r(264),r(278),r(262),r(276),r(275),r(269),r(272),r(261),r(263),r(266),r(265),r(280),r(113),r(352),r(357),r(159),r(353),r(354),r(355),r(356),r(337),r(158),r(160),r(161),r(392),r(381),r(382),r(387),r(390),r(391),r(385),r(388),r(386),r(389),r(383),r(384),r(338),r(339),r(340),r(341),r(342),r(345),r(343),r(344),r(346),r(347),r(348),r(349),r(351),r(350),r(393),r(419),r(422),r(421),r(423),r(424),r(420),r(425),r(426),r(404),r(407),r(403),r(401),r(402),r(405),r(406),r(396),r(418),r(427),r(395),r(397),r(399),r(398),r(400),r(409),r(410),r(412),r(411),r(414),r(413),r(415),r(416),r(417),r(394),r(408),r(430),r(429),r(428),t.exports=r(30)},function(t,e,r){"use strict";function n(t,e,r){var n,o,i=t.length,a=e.arrayArgs.length,s=e.indexArgs.length>0,u=[],c=[],l=0,f=0;for(n=0;n<i;++n)c.push(["i",n,"=0"].join(""));for(o=0;o<a;++o)for(n=0;n<i;++n)f=l,l=t[n],0===n?c.push(["d",o,"s",n,"=t",o,"p",l].join("")):c.push(["d",o,"s",n,"=(t",o,"p",l,"-s",f,"*t",o,"p",f,")"].join(""));for(u.push("var "+c.join(",")),n=i-1;n>=0;--n)l=t[n],u.push(["for(i",n,"=0;i",n,"<s",l,";++i",n,"){"].join(""));for(u.push(r),n=0;n<i;++n){for(f=l,l=t[n],o=0;o<a;++o)u.push(["p",o,"+=d",o,"s",n].join(""));s&&(n>0&&u.push(["index[",f,"]-=s",f].join("")),u.push(["++index[",l,"]"].join(""))),u.push("}")}return u.join("\n")}function o(t,e,r,o){for(var i=e.length,a=r.arrayArgs.length,s=r.blockSize,u=r.indexArgs.length>0,c=[],l=0;l<a;++l)c.push(["var offset",l,"=p",l].join(""));for(var l=t;l<i;++l)c.push(["for(var j"+l+"=SS[",e[l],"]|0;j",l,">0;){"].join("")),c.push(["if(j",l,"<",s,"){"].join("")),c.push(["s",e[l],"=j",l].join("")),c.push(["j",l,"=0"].join("")),c.push(["}else{s",e[l],"=",s].join("")),c.push(["j",l,"-=",s,"}"].join("")),u&&c.push(["index[",e[l],"]=j",l].join(""));for(var l=0;l<a;++l){for(var f=["offset"+l],p=t;p<i;++p)f.push(["j",p,"*t",l,"p",e[p]].join(""));c.push(["p",l,"=(",f.join("+"),")"].join(""))}c.push(n(e,r,o));for(var l=t;l<i;++l)c.push("}");return c.join("\n")}function i(t){for(var e=0,r=t[0].length;e<r;){for(var n=1;n<t.length;++n)if(t[n][e]!==t[0][e])return e;++e}return e}function a(t,e,r){for(var n=t.body,o=[],i=[],a=0;a<t.args.length;++a){var s=t.args[a];if(!(s.count<=0)){var u=new RegExp(s.name,"g"),c="",l=e.arrayArgs.indexOf(a);switch(e.argTypes[a]){case"offset":var f=e.offsetArgIndex.indexOf(a),p=e.offsetArgs[f];l=p.array,c="+q"+f;case"array":c="p"+l+c;var h="l"+a,d="a"+l;if(0===e.arrayBlockIndices[l])1===s.count?"generic"===r[l]?s.lvalue?(o.push(["var ",h,"=",d,".get(",c,")"].join("")),n=n.replace(u,h),i.push([d,".set(",c,",",h,")"].join(""))):n=n.replace(u,[d,".get(",c,")"].join("")):n=n.replace(u,[d,"[",c,"]"].join("")):"generic"===r[l]?(o.push(["var ",h,"=",d,".get(",c,")"].join("")),n=n.replace(u,h),s.lvalue&&i.push([d,".set(",c,",",h,")"].join(""))):(o.push(["var ",h,"=",d,"[",c,"]"].join("")),n=n.replace(u,h),s.lvalue&&i.push([d,"[",c,"]=",h].join("")));else{for(var v=[s.name],y=[c],g=0;g<Math.abs(e.arrayBlockIndices[l]);g++)v.push("\\s*\\[([^\\]]+)\\]"),y.push("$"+(g+1)+"*t"+l+"b"+g);if(u=new RegExp(v.join(""),"g"),c=y.join("+"),"generic"===r[l])throw new Error("cwise: Generic arrays not supported in combination with blocks!");n=n.replace(u,[d,"[",c,"]"].join(""))}break;case"scalar":n=n.replace(u,"Y"+e.scalarArgs.indexOf(a));break;case"index":n=n.replace(u,"index");break;case"shape":n=n.replace(u,"shape")}}}return[o.join("\n"),n,i.join("\n")].join("\n").trim()}function s(t){for(var e=new Array(t.length),r=!0,n=0;n<t.length;++n){var o=t[n],i=o.match(/\d+/);i=i?i[0]:"",0===o.charAt(0)?e[n]="u"+o.charAt(1)+i:e[n]=o.charAt(0)+i,n>0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function u(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,u=new Array(t.arrayArgs.length),l=new Array(t.arrayArgs.length),f=0;f<t.arrayArgs.length;++f)l[f]=e[2*f],u[f]=e[2*f+1];for(var p=[],h=[],d=[],v=[],y=[],f=0;f<t.arrayArgs.length;++f){t.arrayBlockIndices[f]<0?(d.push(0),v.push(r),p.push(r),h.push(r+t.arrayBlockIndices[f])):(d.push(t.arrayBlockIndices[f]),v.push(t.arrayBlockIndices[f]+r),p.push(0),h.push(t.arrayBlockIndices[f]));for(var g=[],_=0;_<u[f].length;_++)d[f]<=u[f][_]&&u[f][_]<v[f]&&g.push(u[f][_]-d[f]);y.push(g)}for(var b=["SS"],m=["'use strict'"],w=[],_=0;_<r;++_)w.push(["s",_,"=SS[",_,"]"].join(""));for(var f=0;f<t.arrayArgs.length;++f){b.push("a"+f),b.push("t"+f),b.push("p"+f);for(var _=0;_<r;++_)w.push(["t",f,"p",_,"=t",f,"[",d[f]+_,"]"].join(""));for(var _=0;_<Math.abs(t.arrayBlockIndices[f]);++_)w.push(["t",f,"b",_,"=t",f,"[",p[f]+_,"]"].join(""))}for(var f=0;f<t.scalarArgs.length;++f)b.push("Y"+f);if(t.shapeArgs.length>0&&w.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var x=new Array(r),f=0;f<r;++f)x[f]="0";w.push(["index=[",x.join(","),"]"].join(""))}for(var f=0;f<t.offsetArgs.length;++f){for(var O=t.offsetArgs[f],j=[],_=0;_<O.offset.length;++_)0!==O.offset[_]&&(1===O.offset[_]?j.push(["t",O.array,"p",_].join("")):j.push([O.offset[_],"*t",O.array,"p",_].join("")));0===j.length?w.push("q"+f+"=0"):w.push(["q",f,"=",j.join("+")].join(""))}var E=c([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));w=w.concat(E),m.push("var "+w.join(","));for(var f=0;f<t.arrayArgs.length;++f)m.push("p"+f+"|=0");t.pre.body.length>3&&m.push(a(t.pre,t,l));var S=a(t.body,t,l),k=i(y);k<r?m.push(o(k,y[0],t,S)):m.push(n(y[0],t,S)),t.post.body.length>3&&m.push(a(t.post,t,l)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+m.join("\n")+"\n----------");var P=[t.funcName||"unnamed","_cwise_loop_",u[0].join("s"),"m",k,s(l)].join(""),A=new Function(["function ",P,"(",b.join(","),"){",m.join("\n"),"} return ",P].join(""));return A()}var c=r(188);t.exports=u},function(t,e,r){"use strict";function n(t){var e=["'use strict'","var CACHED={}"],r=[],n=t.funcName+"_cwise_thunk";e.push(["return function ",n,"(",t.shimArgs.join(","),"){"].join(""));for(var i=[],a=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],u=[],c=[],l=0;l<t.arrayArgs.length;++l){var f=t.arrayArgs[l];r.push(["t",f,"=array",f,".dtype,","r",f,"=array",f,".order"].join("")),i.push("t"+f),i.push("r"+f),a.push("t"+f),a.push("r"+f+".join()"),s.push("array"+f+".data"),s.push("array"+f+".stride"),s.push("array"+f+".offset|0"),l>0&&(u.push("array"+t.arrayArgs[0]+".shape.length===array"+f+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[l]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+f+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[l])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var l=0;l<t.scalarArgs.length;++l)s.push("scalar"+t.scalarArgs[l]);r.push(["type=[",a.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),e.push("var "+r.join(",")),e.push(["if(!proc){","CACHED[type]=proc=compile([",i.join(","),"])}","return proc(",s.join(","),")}"].join("")),t.debug&&console.log("-----Generated thunk:\n"+e.join("\n")+"\n----------");var p=new Function("compile",e.join("\n"));return p(o.bind(void 0,t))}var o=r(432);t.exports=n},function(t,e,r){"use strict";(function(e){function n(t,e,r){this.name=t,this.lvalue=e,this.rvalue=r,this.count=0}function o(t,e,r,n){this.body=t,this.args=e,this.thisVars=r,this.localVars=n}function i(t){if("eval"===t)throw new Error("cwise-parser: eval() not allowed");return"undefined"!=typeof window?t in window:"undefined"!=typeof e?t in e:"undefined"!=typeof self&&t in self}function a(t){for(var e=t.body[0].expression.callee.params,r=new Array(e.length),n=0;n<e.length;++n)r[n]=e[n].name;return r}function s(t){function e(t){var e=y+t.replace(/\_/g,"__");return x.push(e),e}function r(t){var e="this_"+t.replace(/\_/g,"__");return O.push(e),e}function s(t,e){for(var r=t.range[0],n=t.range[1],o=r+1;o<n;++o)m[o]="";m[r]=e}function f(t){return"'"+t.replace(/\_/g,"\\_").replace(/\'/g,"'")+"'"}function p(t){return m.slice(t.range[0],t.range[1]).join("")}function h(t){return"AssignmentExpression"===t.parent.type&&t.parent.left===t?"="===t.parent.operator?j:j|E:"UpdateExpression"===t.parent.type?j|E:E}for(var d=["(",t,")()"].join(""),v=u.parse(d,{range:!0}),y="_inline_"+l++ +"_",g=a(v),_=new Array(g.length),b=0;b<g.length;++b)_[b]=new n([y,"arg",b,"_"].join(""),!1,!1);for(var m=new Array(d.length),b=0,w=d.length;b<w;++b)m[b]=d.charAt(b);var x=[],O=[],j=1,E=2;!function t(n,o){if(n.parent=o,"MemberExpression"===n.type)n.computed?(t(n.object,n),t(n.property,n)):"ThisExpression"===n.object.type?s(n,r(n.property.name)):t(n.object,n);else{if("ThisExpression"===n.type)throw new Error("cwise-parser: Computed this is not allowed");if("Identifier"===n.type){var a=n.name,u=g.indexOf(a);if(u>=0){var c=_[u],l=h(n);l&j&&(c.lvalue=!0),l&E&&(c.rvalue=!0),++c.count,s(n,c.name)}else i(a)||s(n,e(a))}else if("Literal"===n.type)"string"==typeof n.value&&s(n,f(n.value));else{if("WithStatement"===n.type)throw new Error("cwise-parser: with() statements not allowed");for(var p=Object.keys(n),d=0,v=p.length;d<v;++d)if("parent"!==p[d]){var y=n[p[d]];if(y)if(y instanceof Array)for(var b=0;b<y.length;++b)y[b]&&"string"==typeof y[b].type&&t(y[b],n);else"string"==typeof y.type&&t(y,n)}}}}(v.body[0].expression.callee.body,void 0),
c(x),c(O);var S=new o(p(v.body[0].expression.callee.body),_,O,x);return S}var u=r(435),c=r(188),l=0;t.exports=s}).call(e,r(49))},function(t,e,r){var n,o,i;!function(r,a){"use strict";o=[e],n=a,i="function"==typeof n?n.apply(e,o):n,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";function e(t,e){if(!t)throw new Error("ASSERT: "+e)}function r(t){return t>=48&&t<=57}function n(t){return"0123456789abcdefABCDEF".indexOf(t)>=0}function o(t){return"01234567".indexOf(t)>=0}function i(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0}function a(t){return 10===t||13===t||8232===t||8233===t}function s(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&ie.NonAsciiIdentifierStart.test(String.fromCharCode(t))}function u(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&ie.NonAsciiIdentifierPart.test(String.fromCharCode(t))}function c(t){switch(t){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function l(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function f(t){return"eval"===t||"arguments"===t}function p(t){if(ue&&l(t))return!0;switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}}function h(t,r,n,o,i){var a;e("number"==typeof n,"Comment must have valid position"),ve.lastCommentStart>=n||(ve.lastCommentStart=n,a={type:t,value:r},ye.range&&(a.range=[n,o]),ye.loc&&(a.loc=i),ye.comments.push(a),ye.attachComment&&(ye.leadingComments.push(a),ye.trailingComments.push(a)))}function d(t){var e,r,n,o;for(e=ce-t,r={start:{line:le,column:ce-fe-t}};ce<pe;)if(n=se.charCodeAt(ce),++ce,a(n))return ye.comments&&(o=se.slice(e+t,ce-1),r.end={line:le,column:ce-fe-1},h("Line",o,e,ce-1,r)),13===n&&10===se.charCodeAt(ce)&&++ce,++le,void(fe=ce);ye.comments&&(o=se.slice(e+t,ce),r.end={line:le,column:ce-fe},h("Line",o,e,ce,r))}function v(){var t,e,r,n;for(ye.comments&&(t=ce-2,e={start:{line:le,column:ce-fe-2}});ce<pe;)if(r=se.charCodeAt(ce),a(r))13===r&&10===se.charCodeAt(ce+1)&&++ce,++le,++ce,fe=ce,ce>=pe&&V({},oe.UnexpectedToken,"ILLEGAL");else if(42===r){if(47===se.charCodeAt(ce+1))return++ce,++ce,void(ye.comments&&(n=se.slice(t+2,ce-2),e.end={line:le,column:ce-fe},h("Block",n,t,ce,e)));++ce}else++ce;V({},oe.UnexpectedToken,"ILLEGAL")}function y(){var t,e;for(e=0===ce;ce<pe;)if(t=se.charCodeAt(ce),i(t))++ce;else if(a(t))++ce,13===t&&10===se.charCodeAt(ce)&&++ce,++le,fe=ce,e=!0;else if(47===t)if(t=se.charCodeAt(ce+1),47===t)++ce,++ce,d(2),e=!0;else{if(42!==t)break;++ce,++ce,v()}else if(e&&45===t){if(45!==se.charCodeAt(ce+1)||62!==se.charCodeAt(ce+2))break;ce+=3,d(3)}else{if(60!==t)break;if("!--"!==se.slice(ce+1,ce+4))break;++ce,++ce,++ce,++ce,d(4)}}function g(t){var e,r,o,i=0;for(r="u"===t?4:2,e=0;e<r;++e){if(!(ce<pe&&n(se[ce])))return"";o=se[ce++],i=16*i+"0123456789abcdef".indexOf(o.toLowerCase())}return String.fromCharCode(i)}function _(){var t,e;for(t=se.charCodeAt(ce++),e=String.fromCharCode(t),92===t&&(117!==se.charCodeAt(ce)&&V({},oe.UnexpectedToken,"ILLEGAL"),++ce,t=g("u"),t&&"\\"!==t&&s(t.charCodeAt(0))||V({},oe.UnexpectedToken,"ILLEGAL"),e=t);ce<pe&&(t=se.charCodeAt(ce),u(t));)++ce,e+=String.fromCharCode(t),92===t&&(e=e.substr(0,e.length-1),117!==se.charCodeAt(ce)&&V({},oe.UnexpectedToken,"ILLEGAL"),++ce,t=g("u"),t&&"\\"!==t&&u(t.charCodeAt(0))||V({},oe.UnexpectedToken,"ILLEGAL"),e+=t);return e}function b(){var t,e;for(t=ce++;ce<pe;){if(e=se.charCodeAt(ce),92===e)return ce=t,_();if(!u(e))break;++ce}return se.slice(t,ce)}function m(){var t,e,r;return t=ce,e=92===se.charCodeAt(ce)?_():b(),r=1===e.length?Jt.Identifier:p(e)?Jt.Keyword:"null"===e?Jt.NullLiteral:"true"===e||"false"===e?Jt.BooleanLiteral:Jt.Identifier,{type:r,value:e,lineNumber:le,lineStart:fe,start:t,end:ce}}function w(){var t,e,r,n,o=ce,i=se.charCodeAt(ce),a=se[ce];switch(i){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++ce,ye.tokenize&&(40===i?ye.openParenToken=ye.tokens.length:123===i&&(ye.openCurlyToken=ye.tokens.length)),{type:Jt.Punctuator,value:String.fromCharCode(i),lineNumber:le,lineStart:fe,start:o,end:ce};default:if(t=se.charCodeAt(ce+1),61===t)switch(i){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return ce+=2,{type:Jt.Punctuator,value:String.fromCharCode(i)+String.fromCharCode(t),lineNumber:le,lineStart:fe,start:o,end:ce};case 33:case 61:return ce+=2,61===se.charCodeAt(ce)&&++ce,{type:Jt.Punctuator,value:se.slice(o,ce),lineNumber:le,lineStart:fe,start:o,end:ce}}}return n=se.substr(ce,4),">>>="===n?(ce+=4,{type:Jt.Punctuator,value:n,lineNumber:le,lineStart:fe,start:o,end:ce}):(r=n.substr(0,3),">>>"===r||"<<="===r||">>="===r?(ce+=3,{type:Jt.Punctuator,value:r,lineNumber:le,lineStart:fe,start:o,end:ce}):(e=r.substr(0,2),a===e[1]&&"+-<>&|".indexOf(a)>=0||"=>"===e?(ce+=2,{type:Jt.Punctuator,value:e,lineNumber:le,lineStart:fe,start:o,end:ce}):"<>=!+-*%&|^/".indexOf(a)>=0?(++ce,{type:Jt.Punctuator,value:a,lineNumber:le,lineStart:fe,start:o,end:ce}):void V({},oe.UnexpectedToken,"ILLEGAL")))}function x(t){for(var e="";ce<pe&&n(se[ce]);)e+=se[ce++];return 0===e.length&&V({},oe.UnexpectedToken,"ILLEGAL"),s(se.charCodeAt(ce))&&V({},oe.UnexpectedToken,"ILLEGAL"),{type:Jt.NumericLiteral,value:parseInt("0x"+e,16),lineNumber:le,lineStart:fe,start:t,end:ce}}function O(t){for(var e="0"+se[ce++];ce<pe&&o(se[ce]);)e+=se[ce++];return(s(se.charCodeAt(ce))||r(se.charCodeAt(ce)))&&V({},oe.UnexpectedToken,"ILLEGAL"),{type:Jt.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:le,lineStart:fe,start:t,end:ce}}function j(){var t,e;for(t=ce+1;t<pe;++t){if(e=se[t],"8"===e||"9"===e)return!1;if(!o(e))return!0}return!0}function E(){var t,n,i;if(i=se[ce],e(r(i.charCodeAt(0))||"."===i,"Numeric literal must start with a decimal digit or a decimal point"),n=ce,t="","."!==i){if(t=se[ce++],i=se[ce],"0"===t){if("x"===i||"X"===i)return++ce,x(n);if(o(i)&&j())return O(n)}for(;r(se.charCodeAt(ce));)t+=se[ce++];i=se[ce]}if("."===i){for(t+=se[ce++];r(se.charCodeAt(ce));)t+=se[ce++];i=se[ce]}if("e"===i||"E"===i)if(t+=se[ce++],i=se[ce],"+"!==i&&"-"!==i||(t+=se[ce++]),r(se.charCodeAt(ce)))for(;r(se.charCodeAt(ce));)t+=se[ce++];else V({},oe.UnexpectedToken,"ILLEGAL");return s(se.charCodeAt(ce))&&V({},oe.UnexpectedToken,"ILLEGAL"),{type:Jt.NumericLiteral,value:parseFloat(t),lineNumber:le,lineStart:fe,start:n,end:ce}}function S(){var t,r,n,i,s,u,c,l,f="",p=!1;for(c=le,l=fe,t=se[ce],e("'"===t||'"'===t,"String literal must starts with a quote"),r=ce,++ce;ce<pe;){if(n=se[ce++],n===t){t="";break}if("\\"===n)if(n=se[ce++],n&&a(n.charCodeAt(0)))++le,"\r"===n&&"\n"===se[ce]&&++ce,fe=ce;else switch(n){case"u":case"x":u=ce,s=g(n),s?f+=s:(ce=u,f+=n);break;case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+="\t";break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+="\v";break;default:o(n)?(i="01234567".indexOf(n),0!==i&&(p=!0),ce<pe&&o(se[ce])&&(p=!0,i=8*i+"01234567".indexOf(se[ce++]),"0123".indexOf(n)>=0&&ce<pe&&o(se[ce])&&(i=8*i+"01234567".indexOf(se[ce++]))),f+=String.fromCharCode(i)):f+=n}else{if(a(n.charCodeAt(0)))break;f+=n}}return""!==t&&V({},oe.UnexpectedToken,"ILLEGAL"),{type:Jt.StringLiteral,value:f,octal:p,startLineNumber:c,startLineStart:l,lineNumber:le,lineStart:fe,start:r,end:ce}}function k(t,e){var r;try{r=new RegExp(t,e)}catch(t){V({},oe.InvalidRegExp)}return r}function P(){var t,r,n,o,i;for(t=se[ce],e("/"===t,"Regular expression literal must start with a slash"),r=se[ce++],n=!1,o=!1;ce<pe;)if(t=se[ce++],r+=t,"\\"===t)t=se[ce++],a(t.charCodeAt(0))&&V({},oe.UnterminatedRegExp),r+=t;else if(a(t.charCodeAt(0)))V({},oe.UnterminatedRegExp);else if(n)"]"===t&&(n=!1);else{if("/"===t){o=!0;break}"["===t&&(n=!0)}return o||V({},oe.UnterminatedRegExp),i=r.substr(1,r.length-2),{value:i,literal:r}}function A(){var t,e,r,n;for(e="",r="";ce<pe&&(t=se[ce],u(t.charCodeAt(0)));)if(++ce,"\\"===t&&ce<pe)if(t=se[ce],"u"===t){if(++ce,n=ce,t=g("u"))for(r+=t,e+="\\u";n<ce;++n)e+=se[n];else ce=n,r+="u",e+="\\u";W({},oe.UnexpectedToken,"ILLEGAL")}else e+="\\",W({},oe.UnexpectedToken,"ILLEGAL");else r+=t,e+=t;return{value:r,literal:e}}function M(){var t,e,r,n;return de=null,y(),t=ce,e=P(),r=A(),n=k(e.value,r.value),ye.tokenize?{type:Jt.RegularExpression,value:n,lineNumber:le,lineStart:fe,start:t,end:ce}:{literal:e.literal+r.literal,value:n,start:t,end:ce}}function C(){var t,e,r,n;return y(),t=ce,e={start:{line:le,column:ce-fe}},r=M(),e.end={line:le,column:ce-fe},ye.tokenize||(ye.tokens.length>0&&(n=ye.tokens[ye.tokens.length-1],n.range[0]===t&&"Punctuator"===n.type&&("/"!==n.value&&"/="!==n.value||ye.tokens.pop())),ye.tokens.push({type:"RegularExpression",value:r.literal,range:[t,ce],loc:e})),r}function T(t){return t.type===Jt.Identifier||t.type===Jt.Keyword||t.type===Jt.BooleanLiteral||t.type===Jt.NullLiteral}function R(){var t,e;if(t=ye.tokens[ye.tokens.length-1],!t)return C();if("Punctuator"===t.type){if("]"===t.value)return w();if(")"===t.value)return e=ye.tokens[ye.openParenToken-1],!e||"Keyword"!==e.type||"if"!==e.value&&"while"!==e.value&&"for"!==e.value&&"with"!==e.value?w():C();if("}"===t.value){if(ye.tokens[ye.openCurlyToken-3]&&"Keyword"===ye.tokens[ye.openCurlyToken-3].type){if(e=ye.tokens[ye.openCurlyToken-4],!e)return w()}else{if(!ye.tokens[ye.openCurlyToken-4]||"Keyword"!==ye.tokens[ye.openCurlyToken-4].type)return w();if(e=ye.tokens[ye.openCurlyToken-5],!e)return C()}return ee.indexOf(e.value)>=0?w():C()}return C()}return"Keyword"===t.type&&"this"!==t.value?C():w()}function F(){var t;return y(),ce>=pe?{type:Jt.EOF,lineNumber:le,lineStart:fe,start:ce,end:ce}:(t=se.charCodeAt(ce),s(t)?m():40===t||41===t||59===t?w():39===t||34===t?S():46===t?r(se.charCodeAt(ce+1))?E():w():r(t)?E():ye.tokenize&&47===t?R():w())}function I(){var t,e,r;return y(),t={start:{line:le,column:ce-fe}},e=F(),t.end={line:le,column:ce-fe},e.type!==Jt.EOF&&(r=se.slice(e.start,e.end),ye.tokens.push({type:te[e.type],value:r,range:[e.start,e.end],loc:t})),e}function D(){var t;return t=de,ce=t.end,le=t.lineNumber,fe=t.lineStart,de="undefined"!=typeof ye.tokens?I():F(),ce=t.end,le=t.lineNumber,fe=t.lineStart,t}function L(){var t,e,r;t=ce,e=le,r=fe,de="undefined"!=typeof ye.tokens?I():F(),ce=t,le=e,fe=r}function N(t,e){this.line=t,this.column=e}function U(t,e,r,n){this.start=new N(t,e),this.end=new N(r,n)}function B(){var t,e,r,n;return t=ce,e=le,r=fe,y(),n=le!==e,ce=t,le=e,fe=r,n}function V(t,r){var n,o=Array.prototype.slice.call(arguments,2),i=r.replace(/%(\d)/g,function(t,r){return e(r<o.length,"Message reference must be in range"),o[r]});throw"number"==typeof t.lineNumber?(n=new Error("Line "+t.lineNumber+": "+i),n.index=t.start,n.lineNumber=t.lineNumber,n.column=t.start-fe+1):(n=new Error("Line "+le+": "+i),n.index=ce,n.lineNumber=le,n.column=ce-fe+1),n.description=i,n}function W(){try{V.apply(null,arguments)}catch(t){if(!ye.errors)throw t;ye.errors.push(t)}}function z(t){if(t.type===Jt.EOF&&V(t,oe.UnexpectedEOS),t.type===Jt.NumericLiteral&&V(t,oe.UnexpectedNumber),t.type===Jt.StringLiteral&&V(t,oe.UnexpectedString),t.type===Jt.Identifier&&V(t,oe.UnexpectedIdentifier),t.type===Jt.Keyword){if(c(t.value))V(t,oe.UnexpectedReserved);else if(ue&&l(t.value))return void W(t,oe.StrictReservedWord);V(t,oe.UnexpectedToken,t.value)}V(t,oe.UnexpectedToken,t.value)}function q(t){var e=D();e.type===Jt.Punctuator&&e.value===t||z(e)}function G(t){var e=D();e.type===Jt.Keyword&&e.value===t||z(e)}function H(t){return de.type===Jt.Punctuator&&de.value===t}function Y(t){return de.type===Jt.Keyword&&de.value===t}function $(){var t;return de.type===Jt.Punctuator&&(t=de.value,"="===t||"*="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t)}function K(){var t,e=ce,r=le,n=fe,o=de;return 59===se.charCodeAt(ce)||H(";")?void D():(t=le,y(),le!==t?(ce=e,le=r,fe=n,void(de=o)):void(de.type===Jt.EOF||H("}")||z(de)))}function X(t){return t.type===re.Identifier||t.type===re.MemberExpression}function Z(){var t,e=[];for(t=de,q("[");!H("]");)H(",")?(D(),e.push(null)):(e.push(yt()),H("]")||q(","));return D(),he.markEnd(he.createArrayExpression(e),t)}function Q(t,e){var r,n,o;return r=ue,o=de,n=zt(),e&&ue&&f(t[0].name)&&W(e,oe.StrictParamName),ue=r,he.markEnd(he.createFunctionExpression(null,t,[],n),o)}function J(){var t,e;return e=de,t=D(),t.type===Jt.StringLiteral||t.type===Jt.NumericLiteral?(ue&&t.octal&&W(t,oe.StrictOctalLiteral),he.markEnd(he.createLiteral(t),e)):he.markEnd(he.createIdentifier(t.value),e)}function tt(){var t,e,r,n,o,i;return t=de,i=de,t.type===Jt.Identifier?(r=J(),"get"!==t.value||H(":")?"set"!==t.value||H(":")?(q(":"),n=yt(),he.markEnd(he.createProperty("init",r,n),i)):(e=J(),q("("),t=de,t.type!==Jt.Identifier?(q(")"),W(t,oe.UnexpectedToken,t.value),n=Q([])):(o=[mt()],q(")"),n=Q(o,t)),he.markEnd(he.createProperty("set",e,n),i)):(e=J(),q("("),q(")"),n=Q([]),he.markEnd(he.createProperty("get",e,n),i))):t.type!==Jt.EOF&&t.type!==Jt.Punctuator?(e=J(),q(":"),n=yt(),he.markEnd(he.createProperty("init",e,n),i)):void z(t)}function et(){var t,e,r,n,o,i=[],a={},s=String;for(o=de,q("{");!H("}");)t=tt(),e=t.key.type===re.Identifier?t.key.name:s(t.key.value),n="init"===t.kind?ne.Data:"get"===t.kind?ne.Get:ne.Set,r="$"+e,Object.prototype.hasOwnProperty.call(a,r)?(a[r]===ne.Data?ue&&n===ne.Data?W({},oe.StrictDuplicateProperty):n!==ne.Data&&W({},oe.AccessorDataProperty):n===ne.Data?W({},oe.AccessorDataProperty):a[r]&n&&W({},oe.AccessorGetSet),a[r]|=n):a[r]=n,i.push(t),H("}")||q(",");return q("}"),he.markEnd(he.createObjectExpression(i),o)}function rt(){var t;return q("("),t=gt(),q(")"),t}function nt(){var t,e,r,n;if(H("("))return rt();if(H("["))return Z();if(H("{"))return et();if(t=de.type,n=de,t===Jt.Identifier)r=he.createIdentifier(D().value);else if(t===Jt.StringLiteral||t===Jt.NumericLiteral)ue&&de.octal&&W(de,oe.StrictOctalLiteral),r=he.createLiteral(D());else if(t===Jt.Keyword){if(Y("function"))return Ht();Y("this")?(D(),r=he.createThisExpression()):z(D())}else t===Jt.BooleanLiteral?(e=D(),e.value="true"===e.value,r=he.createLiteral(e)):t===Jt.NullLiteral?(e=D(),e.value=null,r=he.createLiteral(e)):H("/")||H("/=")?(r="undefined"!=typeof ye.tokens?he.createLiteral(C()):he.createLiteral(M()),L()):z(D());return he.markEnd(r,n)}function ot(){var t=[];if(q("("),!H(")"))for(;ce<pe&&(t.push(yt()),!H(")"));)q(",");return q(")"),t}function it(){var t,e;return e=de,t=D(),T(t)||z(t),he.markEnd(he.createIdentifier(t.value),e)}function at(){return q("."),it()}function st(){var t;return q("["),t=gt(),q("]"),t}function ut(){var t,e,r;return r=de,G("new"),t=lt(),e=H("(")?ot():[],he.markEnd(he.createNewExpression(t,e),r)}function ct(){var t,e,r,n,o=ve.allowIn;for(n=de,ve.allowIn=!0,t=Y("new")?ut():nt();;){if(H("."))r=at(),t=he.createMemberExpression(".",t,r);else if(H("("))e=ot(),t=he.createCallExpression(t,e);else{if(!H("["))break;r=st(),t=he.createMemberExpression("[",t,r)}he.markEnd(t,n)}return ve.allowIn=o,t}function lt(){var t,r,n;for(e(ve.allowIn,"callee of new expression always allow in keyword."),n=de,t=Y("new")?ut():nt();H(".")||H("[");)H("[")?(r=st(),t=he.createMemberExpression("[",t,r)):(r=at(),t=he.createMemberExpression(".",t,r)),he.markEnd(t,n);return t}function ft(){var t,e,r=de;return t=ct(),de.type===Jt.Punctuator&&(!H("++")&&!H("--")||B()||(ue&&t.type===re.Identifier&&f(t.name)&&W({},oe.StrictLHSPostfix),X(t)||W({},oe.InvalidLHSInAssignment),e=D(),t=he.markEnd(he.createPostfixExpression(e.value,t),r))),t}function pt(){var t,e,r;return de.type!==Jt.Punctuator&&de.type!==Jt.Keyword?e=ft():H("++")||H("--")?(r=de,t=D(),e=pt(),ue&&e.type===re.Identifier&&f(e.name)&&W({},oe.StrictLHSPrefix),X(e)||W({},oe.InvalidLHSInAssignment),e=he.createUnaryExpression(t.value,e),e=he.markEnd(e,r)):H("+")||H("-")||H("~")||H("!")?(r=de,t=D(),e=pt(),e=he.createUnaryExpression(t.value,e),e=he.markEnd(e,r)):Y("delete")||Y("void")||Y("typeof")?(r=de,t=D(),e=pt(),e=he.createUnaryExpression(t.value,e),e=he.markEnd(e,r),ue&&"delete"===e.operator&&e.argument.type===re.Identifier&&W({},oe.StrictDelete)):e=ft(),e}function ht(t,e){var r=0;if(t.type!==Jt.Punctuator&&t.type!==Jt.Keyword)return 0;switch(t.value){case"||":r=1;break;case"&&":r=2;break;case"|":r=3;break;case"^":r=4;break;case"&":r=5;break;case"==":case"!=":case"===":case"!==":r=6;break;case"<":case">":case"<=":case">=":case"instanceof":r=7;break;case"in":r=e?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11}return r}function dt(){var t,e,r,n,o,i,a,s,u,c;if(t=de,u=pt(),n=de,o=ht(n,ve.allowIn),0===o)return u;for(n.prec=o,D(),e=[t,de],a=pt(),i=[u,n,a];(o=ht(de,ve.allowIn))>0;){for(;i.length>2&&o<=i[i.length-2].prec;)a=i.pop(),s=i.pop().value,u=i.pop(),r=he.createBinaryExpression(s,u,a),e.pop(),t=e[e.length-1],he.markEnd(r,t),i.push(r);n=D(),n.prec=o,i.push(n),e.push(de),r=pt(),i.push(r)}for(c=i.length-1,r=i[c],e.pop();c>1;)r=he.createBinaryExpression(i[c-1].value,i[c-2],r),c-=2,t=e.pop(),he.markEnd(r,t);return r}function vt(){var t,e,r,n,o;return o=de,t=dt(),H("?")&&(D(),e=ve.allowIn,ve.allowIn=!0,r=yt(),ve.allowIn=e,q(":"),n=yt(),t=he.createConditionalExpression(t,r,n),he.markEnd(t,o)),t}function yt(){var t,e,r,n,o;return t=de,o=de,n=e=vt(),$()&&(X(e)||W({},oe.InvalidLHSInAssignment),ue&&e.type===re.Identifier&&f(e.name)&&W(t,oe.StrictLHSAssignment),t=D(),r=yt(),n=he.markEnd(he.createAssignmentExpression(t.value,e,r),o)),n}function gt(){var t,e=de;if(t=yt(),H(",")){for(t=he.createSequenceExpression([t]);ce<pe&&H(",");)D(),t.expressions.push(yt());he.markEnd(t,e)}return t}function _t(){for(var t,e=[];ce<pe&&!H("}")&&(t=Yt(),"undefined"!=typeof t);)e.push(t);return e}function bt(){var t,e;return e=de,q("{"),t=_t(),q("}"),he.markEnd(he.createBlockStatement(t),e)}function mt(){var t,e;return e=de,t=D(),t.type!==Jt.Identifier&&z(t),he.markEnd(he.createIdentifier(t.value),e)}function wt(t){var e,r,n=null;return r=de,e=mt(),ue&&f(e.name)&&W({},oe.StrictVarName),"const"===t?(q("="),n=yt()):H("=")&&(D(),n=yt()),he.markEnd(he.createVariableDeclarator(e,n),r)}function xt(t){var e=[];do{if(e.push(wt(t)),!H(","))break;D()}while(ce<pe);return e}function Ot(){var t;return G("var"),t=xt(),K(),he.createVariableDeclaration(t,"var")}function jt(t){var e,r;return r=de,G(t),e=xt(t),K(),he.markEnd(he.createVariableDeclaration(e,t),r)}function Et(){return q(";"),he.createEmptyStatement()}function St(){var t=gt();return K(),he.createExpressionStatement(t)}function kt(){var t,e,r;return G("if"),q("("),t=gt(),q(")"),e=Wt(),Y("else")?(D(),r=Wt()):r=null,he.createIfStatement(t,e,r)}function Pt(){var t,e,r;return G("do"),r=ve.inIteration,ve.inIteration=!0,t=Wt(),ve.inIteration=r,G("while"),q("("),e=gt(),q(")"),H(";")&&D(),he.createDoWhileStatement(t,e)}function At(){var t,e,r;return G("while"),q("("),t=gt(),q(")"),r=ve.inIteration,ve.inIteration=!0,e=Wt(),ve.inIteration=r,he.createWhileStatement(t,e)}function Mt(){var t,e,r;return r=de,t=D(),e=xt(),he.markEnd(he.createVariableDeclaration(e,t.value),r)}function Ct(){var t,e,r,n,o,i,a,s=ve.allowIn;return t=e=r=null,G("for"),q("("),H(";")?D():(Y("var")||Y("let")?(ve.allowIn=!1,t=Mt(),ve.allowIn=s,1===t.declarations.length&&Y("in")&&(D(),n=t,o=gt(),t=null)):(ve.allowIn=!1,t=gt(),ve.allowIn=s,Y("in")&&(X(t)||W({},oe.InvalidLHSInForIn),D(),n=t,o=gt(),t=null)),"undefined"==typeof n&&q(";")),"undefined"==typeof n&&(H(";")||(e=gt()),q(";"),H(")")||(r=gt())),q(")"),a=ve.inIteration,ve.inIteration=!0,i=Wt(),ve.inIteration=a,"undefined"==typeof n?he.createForStatement(t,e,r,i):he.createForInStatement(n,o,i)}function Tt(){var t,e=null;return G("continue"),59===se.charCodeAt(ce)?(D(),ve.inIteration||V({},oe.IllegalContinue),he.createContinueStatement(null)):B()?(ve.inIteration||V({},oe.IllegalContinue),he.createContinueStatement(null)):(de.type===Jt.Identifier&&(e=mt(),t="$"+e.name,Object.prototype.hasOwnProperty.call(ve.labelSet,t)||V({},oe.UnknownLabel,e.name)),K(),null!==e||ve.inIteration||V({},oe.IllegalContinue),he.createContinueStatement(e))}function Rt(){var t,e=null;return G("break"),59===se.charCodeAt(ce)?(D(),ve.inIteration||ve.inSwitch||V({},oe.IllegalBreak),he.createBreakStatement(null)):B()?(ve.inIteration||ve.inSwitch||V({},oe.IllegalBreak),he.createBreakStatement(null)):(de.type===Jt.Identifier&&(e=mt(),t="$"+e.name,Object.prototype.hasOwnProperty.call(ve.labelSet,t)||V({},oe.UnknownLabel,e.name)),K(),null!==e||ve.inIteration||ve.inSwitch||V({},oe.IllegalBreak),he.createBreakStatement(e))}function Ft(){var t=null;return G("return"),ve.inFunctionBody||W({},oe.IllegalReturn),32===se.charCodeAt(ce)&&s(se.charCodeAt(ce+1))?(t=gt(),K(),he.createReturnStatement(t)):B()?he.createReturnStatement(null):(H(";")||H("}")||de.type===Jt.EOF||(t=gt()),K(),he.createReturnStatement(t))}function It(){var t,e;return ue&&(y(),W({},oe.StrictModeWith)),G("with"),q("("),t=gt(),q(")"),e=Wt(),he.createWithStatement(t,e)}function Dt(){var t,e,r,n=[];for(r=de,Y("default")?(D(),t=null):(G("case"),t=gt()),q(":");ce<pe&&!(H("}")||Y("default")||Y("case"));)e=Wt(),n.push(e);return he.markEnd(he.createSwitchCase(t,n),r)}function Lt(){var t,e,r,n,o;if(G("switch"),q("("),t=gt(),q(")"),q("{"),e=[],H("}"))return D(),he.createSwitchStatement(t,e);for(n=ve.inSwitch,ve.inSwitch=!0,o=!1;ce<pe&&!H("}");)r=Dt(),null===r.test&&(o&&V({},oe.MultipleDefaultsInSwitch),o=!0),e.push(r);return ve.inSwitch=n,q("}"),he.createSwitchStatement(t,e)}function Nt(){var t;return G("throw"),B()&&V({},oe.NewlineAfterThrow),t=gt(),K(),he.createThrowStatement(t)}function Ut(){var t,e,r;return r=de,G("catch"),q("("),H(")")&&z(de),t=mt(),ue&&f(t.name)&&W({},oe.StrictCatchVariable),q(")"),e=bt(),he.markEnd(he.createCatchClause(t,e),r)}function Bt(){var t,e=[],r=null;return G("try"),t=bt(),Y("catch")&&e.push(Ut()),Y("finally")&&(D(),r=bt()),0!==e.length||r||V({},oe.NoCatchOrFinally),he.createTryStatement(t,[],e,r)}function Vt(){return G("debugger"),K(),he.createDebuggerStatement()}function Wt(){var t,e,r,n,o=de.type;if(o===Jt.EOF&&z(de),o===Jt.Punctuator&&"{"===de.value)return bt();if(n=de,o===Jt.Punctuator)switch(de.value){case";":return he.markEnd(Et(),n);case"(":return he.markEnd(St(),n)}if(o===Jt.Keyword)switch(de.value){case"break":return he.markEnd(Rt(),n);case"continue":return he.markEnd(Tt(),n);case"debugger":return he.markEnd(Vt(),n);case"do":return he.markEnd(Pt(),n);case"for":return he.markEnd(Ct(),n);case"function":return he.markEnd(Gt(),n);case"if":return he.markEnd(kt(),n);case"return":return he.markEnd(Ft(),n);case"switch":return he.markEnd(Lt(),n);case"throw":return he.markEnd(Nt(),n);case"try":return he.markEnd(Bt(),n);case"var":return he.markEnd(Ot(),n);case"while":return he.markEnd(At(),n);case"with":return he.markEnd(It(),n)}return t=gt(),t.type===re.Identifier&&H(":")?(D(),r="$"+t.name,Object.prototype.hasOwnProperty.call(ve.labelSet,r)&&V({},oe.Redeclaration,"Label",t.name),ve.labelSet[r]=!0,e=Wt(),delete ve.labelSet[r],he.markEnd(he.createLabeledStatement(t,e),n)):(K(),he.markEnd(he.createExpressionStatement(t),n))}function zt(){var t,e,r,n,o,i,a,s,u,c=[];for(u=de,q("{");ce<pe&&de.type===Jt.StringLiteral&&(e=de,t=Yt(),c.push(t),t.expression.type===re.Literal);)r=se.slice(e.start+1,e.end-1),"use strict"===r?(ue=!0,n&&W(n,oe.StrictOctalLiteral)):!n&&e.octal&&(n=e);for(o=ve.labelSet,i=ve.inIteration,a=ve.inSwitch,s=ve.inFunctionBody,ve.labelSet={},ve.inIteration=!1,ve.inSwitch=!1,ve.inFunctionBody=!0;ce<pe&&!H("}")&&(t=Yt(),"undefined"!=typeof t);)c.push(t);return q("}"),ve.labelSet=o,ve.inIteration=i,ve.inSwitch=a,ve.inFunctionBody=s,he.markEnd(he.createBlockStatement(c),u)}function qt(t){var e,r,n,o,i,a,s=[];if(q("("),!H(")"))for(o={};ce<pe&&(r=de,e=mt(),i="$"+r.value,ue?(f(r.value)&&(n=r,a=oe.StrictParamName),Object.prototype.hasOwnProperty.call(o,i)&&(n=r,a=oe.StrictParamDupe)):t||(f(r.value)?(t=r,a=oe.StrictParamName):l(r.value)?(t=r,a=oe.StrictReservedWord):Object.prototype.hasOwnProperty.call(o,i)&&(t=r,a=oe.StrictParamDupe)),s.push(e),o[i]=!0,!H(")"));)q(",");return q(")"),{params:s,stricted:n,firstRestricted:t,message:a}}function Gt(){var t,e,r,n,o,i,a,s,u,c=[];return u=de,G("function"),r=de,t=mt(),ue?f(r.value)&&W(r,oe.StrictFunctionName):f(r.value)?(i=r,a=oe.StrictFunctionName):l(r.value)&&(i=r,a=oe.StrictReservedWord),o=qt(i),c=o.params,n=o.stricted,i=o.firstRestricted,o.message&&(a=o.message),s=ue,e=zt(),ue&&i&&V(i,a),ue&&n&&W(n,a),ue=s,he.markEnd(he.createFunctionDeclaration(t,c,[],e),u)}function Ht(){var t,e,r,n,o,i,a,s,u=null,c=[];return s=de,G("function"),H("(")||(t=de,u=mt(),ue?f(t.value)&&W(t,oe.StrictFunctionName):f(t.value)?(r=t,n=oe.StrictFunctionName):l(t.value)&&(r=t,n=oe.StrictReservedWord)),o=qt(r),c=o.params,e=o.stricted,r=o.firstRestricted,o.message&&(n=o.message),a=ue,i=zt(),ue&&r&&V(r,n),ue&&e&&W(e,n),ue=a,he.markEnd(he.createFunctionExpression(u,c,[],i),s)}function Yt(){if(de.type===Jt.Keyword)switch(de.value){case"const":case"let":return jt(de.value);case"function":return Gt();default:return Wt()}if(de.type!==Jt.EOF)return Wt()}function $t(){for(var t,e,r,n,o=[];ce<pe&&(e=de,e.type===Jt.StringLiteral)&&(t=Yt(),o.push(t),t.expression.type===re.Literal);)r=se.slice(e.start+1,e.end-1),"use strict"===r?(ue=!0,n&&W(n,oe.StrictOctalLiteral)):!n&&e.octal&&(n=e);for(;ce<pe&&(t=Yt(),"undefined"!=typeof t);)o.push(t);return o}function Kt(){var t,e;return y(),L(),e=de,ue=!1,t=$t(),he.markEnd(he.createProgram(t),e)}function Xt(){var t,e,r,n=[];for(t=0;t<ye.tokens.length;++t)e=ye.tokens[t],r={type:e.type,value:e.value},ye.range&&(r.range=e.range),ye.loc&&(r.loc=e.loc),n.push(r);ye.tokens=n}function Zt(t,e){var r,n,o;r=String,"string"==typeof t||t instanceof String||(t=r(t)),he=ae,se=t,ce=0,le=se.length>0?1:0,fe=0,pe=se.length,de=null,ve={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},ye={},e=e||{},e.tokens=!0,ye.tokens=[],ye.tokenize=!0,ye.openParenToken=-1,ye.openCurlyToken=-1,ye.range="boolean"==typeof e.range&&e.range,ye.loc="boolean"==typeof e.loc&&e.loc,"boolean"==typeof e.comment&&e.comment&&(ye.comments=[]),"boolean"==typeof e.tolerant&&e.tolerant&&(ye.errors=[]);try{if(L(),de.type===Jt.EOF)return ye.tokens;for(n=D();de.type!==Jt.EOF;)try{n=D()}catch(t){if(n=de,ye.errors){ye.errors.push(t);break}throw t}Xt(),o=ye.tokens,"undefined"!=typeof ye.comments&&(o.comments=ye.comments),"undefined"!=typeof ye.errors&&(o.errors=ye.errors)}catch(t){throw t}finally{ye={}}return o}function Qt(t,e){var r,n;n=String,"string"==typeof t||t instanceof String||(t=n(t)),he=ae,se=t,ce=0,le=se.length>0?1:0,fe=0,pe=se.length,de=null,ve={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},ye={},"undefined"!=typeof e&&(ye.range="boolean"==typeof e.range&&e.range,ye.loc="boolean"==typeof e.loc&&e.loc,ye.attachComment="boolean"==typeof e.attachComment&&e.attachComment,ye.loc&&null!==e.source&&void 0!==e.source&&(ye.source=n(e.source)),"boolean"==typeof e.tokens&&e.tokens&&(ye.tokens=[]),"boolean"==typeof e.comment&&e.comment&&(ye.comments=[]),"boolean"==typeof e.tolerant&&e.tolerant&&(ye.errors=[]),ye.attachComment&&(ye.range=!0,ye.comments=[],ye.bottomRightStack=[],ye.trailingComments=[],ye.leadingComments=[]));try{r=Kt(),"undefined"!=typeof ye.comments&&(r.comments=ye.comments),"undefined"!=typeof ye.tokens&&(Xt(),r.tokens=ye.tokens),"undefined"!=typeof ye.errors&&(r.errors=ye.errors)}catch(t){throw t}finally{ye={}}return r}var Jt,te,ee,re,ne,oe,ie,ae,se,ue,ce,le,fe,pe,he,de,ve,ye;Jt={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},te={},te[Jt.BooleanLiteral]="Boolean",te[Jt.EOF]="<end>",te[Jt.Identifier]="Identifier",te[Jt.Keyword]="Keyword",te[Jt.NullLiteral]="Null",te[Jt.NumericLiteral]="Numeric",te[Jt.Punctuator]="Punctuator",te[Jt.StringLiteral]="String",te[Jt.RegularExpression]="RegularExpression",ee=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],re={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},ne={Data:1,Get:2,Set:4},oe={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",
StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},ie={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},ae={name:"SyntaxTree",processComment:function(t){var e,r;if(!(t.type===re.Program&&t.body.length>0)){for(ye.trailingComments.length>0?ye.trailingComments[0].range[0]>=t.range[1]?(r=ye.trailingComments,ye.trailingComments=[]):ye.trailingComments.length=0:ye.bottomRightStack.length>0&&ye.bottomRightStack[ye.bottomRightStack.length-1].trailingComments&&ye.bottomRightStack[ye.bottomRightStack.length-1].trailingComments[0].range[0]>=t.range[1]&&(r=ye.bottomRightStack[ye.bottomRightStack.length-1].trailingComments,delete ye.bottomRightStack[ye.bottomRightStack.length-1].trailingComments);ye.bottomRightStack.length>0&&ye.bottomRightStack[ye.bottomRightStack.length-1].range[0]>=t.range[0];)e=ye.bottomRightStack.pop();e?e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=t.range[0]&&(t.leadingComments=e.leadingComments,delete e.leadingComments):ye.leadingComments.length>0&&ye.leadingComments[ye.leadingComments.length-1].range[1]<=t.range[0]&&(t.leadingComments=ye.leadingComments,ye.leadingComments=[]),r&&(t.trailingComments=r),ye.bottomRightStack.push(t)}},markEnd:function(t,e){return ye.range&&(t.range=[e.start,ce]),ye.loc&&(t.loc=new U(void 0===e.startLineNumber?e.lineNumber:e.startLineNumber,e.start-(void 0===e.startLineStart?e.lineStart:e.startLineStart),le,ce-fe),this.postProcess(t)),ye.attachComment&&this.processComment(t),t},postProcess:function(t){return ye.source&&(t.loc.source=ye.source),t},createArrayExpression:function(t){return{type:re.ArrayExpression,elements:t}},createAssignmentExpression:function(t,e,r){return{type:re.AssignmentExpression,operator:t,left:e,right:r}},createBinaryExpression:function(t,e,r){var n="||"===t||"&&"===t?re.LogicalExpression:re.BinaryExpression;return{type:n,operator:t,left:e,right:r}},createBlockStatement:function(t){return{type:re.BlockStatement,body:t}},createBreakStatement:function(t){return{type:re.BreakStatement,label:t}},createCallExpression:function(t,e){return{type:re.CallExpression,callee:t,arguments:e}},createCatchClause:function(t,e){return{type:re.CatchClause,param:t,body:e}},createConditionalExpression:function(t,e,r){return{type:re.ConditionalExpression,test:t,consequent:e,alternate:r}},createContinueStatement:function(t){return{type:re.ContinueStatement,label:t}},createDebuggerStatement:function(){return{type:re.DebuggerStatement}},createDoWhileStatement:function(t,e){return{type:re.DoWhileStatement,body:t,test:e}},createEmptyStatement:function(){return{type:re.EmptyStatement}},createExpressionStatement:function(t){return{type:re.ExpressionStatement,expression:t}},createForStatement:function(t,e,r,n){return{type:re.ForStatement,init:t,test:e,update:r,body:n}},createForInStatement:function(t,e,r){return{type:re.ForInStatement,left:t,right:e,body:r,each:!1}},createFunctionDeclaration:function(t,e,r,n){return{type:re.FunctionDeclaration,id:t,params:e,defaults:r,body:n,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(t,e,r,n){return{type:re.FunctionExpression,id:t,params:e,defaults:r,body:n,rest:null,generator:!1,expression:!1}},createIdentifier:function(t){return{type:re.Identifier,name:t}},createIfStatement:function(t,e,r){return{type:re.IfStatement,test:t,consequent:e,alternate:r}},createLabeledStatement:function(t,e){return{type:re.LabeledStatement,label:t,body:e}},createLiteral:function(t){return{type:re.Literal,value:t.value,raw:se.slice(t.start,t.end)}},createMemberExpression:function(t,e,r){return{type:re.MemberExpression,computed:"["===t,object:e,property:r}},createNewExpression:function(t,e){return{type:re.NewExpression,callee:t,arguments:e}},createObjectExpression:function(t){return{type:re.ObjectExpression,properties:t}},createPostfixExpression:function(t,e){return{type:re.UpdateExpression,operator:t,argument:e,prefix:!1}},createProgram:function(t){return{type:re.Program,body:t}},createProperty:function(t,e,r){return{type:re.Property,key:e,value:r,kind:t}},createReturnStatement:function(t){return{type:re.ReturnStatement,argument:t}},createSequenceExpression:function(t){return{type:re.SequenceExpression,expressions:t}},createSwitchCase:function(t,e){return{type:re.SwitchCase,test:t,consequent:e}},createSwitchStatement:function(t,e){return{type:re.SwitchStatement,discriminant:t,cases:e}},createThisExpression:function(){return{type:re.ThisExpression}},createThrowStatement:function(t){return{type:re.ThrowStatement,argument:t}},createTryStatement:function(t,e,r,n){return{type:re.TryStatement,block:t,guardedHandlers:e,handlers:r,finalizer:n}},createUnaryExpression:function(t,e){return"++"===t||"--"===t?{type:re.UpdateExpression,operator:t,argument:e,prefix:!0}:{type:re.UnaryExpression,operator:t,argument:e,prefix:!0}},createVariableDeclaration:function(t,e){return{type:re.VariableDeclaration,declarations:t,kind:e}},createVariableDeclarator:function(t,e){return{type:re.VariableDeclarator,id:t,init:e}},createWhileStatement:function(t,e){return{type:re.WhileStatement,test:t,body:e}},createWithStatement:function(t,e){return{type:re.WithStatement,object:t,body:e}}},t.version="1.2.5",t.tokenize=Zt,t.parse=Qt,t.Syntax=function(){var t,e={};"function"==typeof Object.create&&(e=Object.create(null));for(t in re)re.hasOwnProperty(t)&&(e[t]=re[t]);return"function"==typeof Object.freeze&&Object.freeze(e),e}()})},function(t,e){e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=t[e+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+t[e+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+f>=1?p/u:p*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[r+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+h]=255&a,h+=d,a/=256,c-=8);t[r+h-d]|=128*v}},function(t,e){"use strict";function r(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=r;return e}t.exports=r},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function n(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
t.exports=function(t){return null!=t&&(r(t)||n(t)||!!t._isBuffer)}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){var n=r(47),o=r(29),i=n(o,"DataView");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(501),i=r(502),a=r(503),s=r(504),u=r(505);n.prototype.clear=o,n.prototype.delete=i,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){var n=r(47),o=r(29),i=n(o,"Promise");t.exports=i},function(t,e,r){var n=r(47),o=r(29),i=n(o,"Set");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.__data__=new o;++e<r;)this.add(t[e])}var o=r(115),i=r(525),a=r(526);n.prototype.add=n.prototype.push=i,n.prototype.has=a,t.exports=n},function(t,e,r){var n=r(29),o=n.Uint8Array;t.exports=o},function(t,e,r){var n=r(47),o=r(29),i=n(o,"WeakMap");t.exports=i},function(t,e){function r(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}t.exports=r},function(t,e){function r(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(!e(t[r],r,t))return!1;return!0}t.exports=r},function(t,e,r){function n(t,e){var r=a(t),n=!r&&i(t),l=!r&&!n&&s(t),p=!r&&!n&&!l&&c(t),h=r||n||l||p,d=h?o(t.length,String):[],v=d.length;for(var y in t)!e&&!f.call(t,y)||h&&("length"==y||l&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,v))||d.push(y);return d}var o=r(478),i=r(121),a=r(34),s=r(181),u=r(118),c=r(183),l=Object.prototype,f=l.hasOwnProperty;t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}t.exports=r},function(t,e){function r(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}t.exports=r},function(t,e){function r(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(e(t[r],r,t))return!0;return!1}t.exports=r},function(t,e){function r(t){return t.split("")}t.exports=r},function(t,e){function r(t){return t.match(n)||[]}var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=r},function(t,e,r){var n=r(167),o=r(486),i=o(n);t.exports=i},function(t,e,r){function n(t,e){var r=!0;return o(t,function(t,n,o){return r=!!e(t,n,o)}),r}var o=r(455);t.exports=n},function(t,e){function r(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}t.exports=r},function(t,e,r){var n=r(487),o=n();t.exports=o},function(t,e){function r(t){return o.call(t)}var n=Object.prototype,o=n.toString;t.exports=r},function(t,e){function r(t,e){return null!=t&&e in Object(t)}t.exports=r},function(t,e,r){function n(t){return o(t)&&s.call(t)==i}var o=r(61),i="[object Arguments]",a=Object.prototype,s=a.toString;t.exports=n},function(t,e,r){function n(t,e,r,n,y,_){var b=c(t),m=c(e),w=d,x=d;b||(w=u(t),w=w==h?v:w),m||(x=u(e),x=x==h?v:x);var O=w==v,j=x==v,E=w==x;if(E&&l(t)){if(!l(e))return!1;b=!0,O=!1}if(E&&!O)return _||(_=new o),b||f(t)?i(t,e,r,n,y,_):a(t,e,w,r,n,y,_);if(!(y&p)){var S=O&&g.call(t,"__wrapped__"),k=j&&g.call(e,"__wrapped__");if(S||k){var P=S?t.value():t,A=k?e.value():e;return _||(_=new o),r(P,A,n,y,_)}}return!!E&&(_||(_=new o),s(t,e,r,n,y,_))}var o=r(164),i=r(171),a=r(494),s=r(495),u=r(173),c=r(34),l=r(181),f=r(183),p=2,h="[object Arguments]",d="[object Array]",v="[object Object]",y=Object.prototype,g=y.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e,r,n){var u=r.length,c=u,l=!n;if(null==t)return!c;for(t=Object(t);u--;){var f=r[u];if(l&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return!1}for(;++u<c;){f=r[u];var p=f[0],h=t[p],d=f[1];if(l&&f[2]){if(void 0===h&&!(p in t))return!1}else{var v=new o;if(n)var y=n(h,d,p,t,e,v);if(!(void 0===y?i(d,h,n,a|s,v):y))return!1}}return!0}var o=r(164),i=r(117),a=1,s=2;t.exports=n},function(t,e,r){function n(t){if(!a(t)||i(t))return!1;var e=o(t)?d:c;return e.test(s(t))}var o=r(182),i=r(508),a=r(55),s=r(179),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,h=f.hasOwnProperty,d=RegExp("^"+p.call(h).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},function(t,e,r){function n(t){return i(t)&&o(t.length)&&!!M[T.call(t)]}var o=r(123),i=r(61),a="[object Arguments]",s="[object Array]",u="[object Boolean]",c="[object Date]",l="[object Error]",f="[object Function]",p="[object Map]",h="[object Number]",d="[object Object]",v="[object RegExp]",y="[object Set]",g="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",m="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",O="[object Int8Array]",j="[object Int16Array]",E="[object Int32Array]",S="[object Uint8Array]",k="[object Uint8ClampedArray]",P="[object Uint16Array]",A="[object Uint32Array]",M={};M[w]=M[x]=M[O]=M[j]=M[E]=M[S]=M[k]=M[P]=M[A]=!0,M[a]=M[s]=M[b]=M[u]=M[m]=M[c]=M[l]=M[f]=M[p]=M[h]=M[d]=M[v]=M[y]=M[g]=M[_]=!1;var C=Object.prototype,T=C.toString;t.exports=n},function(t,e,r){function n(t){if(!o(t))return i(t);var e=[];for(var r in Object(t))s.call(t,r)&&"constructor"!=r&&e.push(r);return e}var o=r(509),i=r(521),a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(r){return r===t||o(r,t,e)}}var o=r(463),i=r(497),a=r(178);t.exports=n},function(t,e,r){function n(t,e){return s(t)&&u(e)?c(l(t),e):function(r){var n=i(r,t);return void 0===n&&n===e?a(r,t):o(e,n,void 0,f|p)}}var o=r(117),i=r(548),a=r(549),s=r(82),u=r(176),c=r(178),l=r(60),f=1,p=2;t.exports=n},function(t,e,r){function n(t,e){return t=Object(t),o(t,e,function(e,r){return r in t})}var o=r(470);t.exports=n},function(t,e,r){function n(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var s=e[n],u=t[s];r(u,s)&&o(a,s,u)}return a}var o=r(165);t.exports=n},function(t,e){function r(t){return function(e){return null==e?void 0:e[t]}}t.exports=r},function(t,e,r){function n(t){return function(e){return o(e,t)}}var o=r(168);t.exports=n},function(t,e){function r(t){return function(e){return null==t?void 0:t[e]}}t.exports=r},function(t,e){function r(t,e,r,i){for(var a=-1,s=o(n((e-t)/(r||1)),0),u=Array(s);s--;)u[i?s:++a]=t,t+=r;return u}var n=Math.ceil,o=Math.max;t.exports=r},function(t,e,r){var n=r(542),o=r(170),i=r(120),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=a},function(t,e){function r(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}t.exports=r},function(t,e){function r(t,e){for(var r,n=-1,o=t.length;++n<o;){var i=e(t[n]);void 0!==i&&(r=void 0===r?i:r+i)}return r}t.exports=r},function(t,e){function r(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}t.exports=r},function(t,e,r){function n(t,e){return o(e,function(e){return[e,t[e]]})}var o=r(78);t.exports=n},function(t,e,r){function n(t){if("string"==typeof t)return t;if(a(t))return i(t,n)+"";if(s(t))return l?l.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}var o=r(116),i=r(78),a=r(34),s=r(85),u=1/0,c=o?o.prototype:void 0,l=c?c.toString:void 0;t.exports=n},function(t,e){function r(t){return function(e){return t(e)}}t.exports=r},function(t,e,r){function n(t,e){return o(e,function(e){return t[e]})}var o=r(78);t.exports=n},function(t,e){function r(t,e){return t.has(e)}t.exports=r},function(t,e,r){function n(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:o(t,e,r)}var o=r(476);t.exports=n},function(t,e,r){var n=r(29),o=n["__core-js_shared__"];t.exports=o},function(t,e,r){function n(t,e){return function(r,n){if(null==r)return r;if(!o(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a<i)&&n(s[a],a,s)!==!1;);return r}}var o=r(84);t.exports=n},function(t,e){function r(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++o];if(r(i[u],u,i)===!1)break}return e}}t.exports=r},function(t,e,r){function n(t){return function(e){e=s(e);var r=i(e)?a(e):void 0,n=r?r[0]:e.charAt(0),u=r?o(r,1).join(""):e.slice(1);return n[t]()+u}}var o=r(484),i=r(174),a=r(536),s=r(62);t.exports=n},function(t,e,r){function n(t){return function(e){return o(a(i(e).replace(u,"")),t,"")}}var o=r(451),i=r(543),a=r(563),s="[']",u=RegExp(s,"g");t.exports=n},function(t,e,r){function n(t){return function(e,r,n){var s=Object(e);if(!i(e)){var u=o(r,3);e=a(e),r=function(t){return u(s[t],t,s)}}var c=t(e,r,n);return c>-1?s[u?e[c]:c]:void 0}}var o=r(80),i=r(84),a=r(48);t.exports=n},function(t,e,r){function n(t){return function(e,r,n){return n&&"number"!=typeof n&&i(e,r,n)&&(r=n=void 0),e=a(e),void 0===r?(r=e,e=0):r=a(r),n=void 0===n?e<r?1:-1:a(n),o(e,r,n,t)}}var o=r(474),i=r(175),a=r(184);t.exports=n},function(t,e,r){function n(t){return function(e){var r=i(e);return r==u?a(e):r==c?s(e):o(e,t(e))}}var o=r(479),i=r(173),a=r(177),s=r(528),u="[object Map]",c="[object Set]";t.exports=n},function(t,e,r){var n=r(473),o={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},i=n(o);t.exports=i},function(t,e,r){function n(t,e,r,n,o,O,E){switch(r){case x:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case w:return!(t.byteLength!=e.byteLength||!n(new i(t),new i(e)));case p:case h:case y:return a(+t,+e);case d:return t.name==e.name&&t.message==e.message;case g:case b:return t==e+"";case v:var S=u;case _:var k=O&f;if(S||(S=c),t.size!=e.size&&!k)return!1;var P=E.get(t);if(P)return P==e;O|=l,E.set(t,e);var A=s(S(t),S(e),n,o,O,E);return E.delete(t),A;case m:if(j)return j.call(t)==j.call(e)}return!1}var o=r(116),i=r(445),a=r(119),s=r(171),u=r(177),c=r(527),l=1,f=2,p="[object Boolean]",h="[object Date]",d="[object Error]",v="[object Map]",y="[object Number]",g="[object RegExp]",_="[object Set]",b="[object String]",m="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",O=o?o.prototype:void 0,j=O?O.valueOf:void 0;t.exports=n},function(t,e,r){function n(t,e,r,n,a,u){var c=a&i,l=o(t),f=l.length,p=o(e),h=p.length;if(f!=h&&!c)return!1;for(var d=f;d--;){var v=l[d];if(!(c?v in e:s.call(e,v)))return!1}var y=u.get(t);if(y&&u.get(e))return y==e;var g=!0;u.set(t,e),u.set(e,t);for(var _=c;++d<f;){v=l[d];var b=t[v],m=e[v];if(n)var w=c?n(m,b,v,e,t,u):n(b,m,v,t,e,u);if(!(void 0===w?b===m||r(b,m,n,a,u):w)){g=!1;break}_||(_="constructor"==v)}if(g&&!_){var x=t.constructor,O=e.constructor;x!=O&&"constructor"in t&&"constructor"in e&&!("function"==typeof x&&x instanceof x&&"function"==typeof O&&O instanceof O)&&(g=!1)}return u.delete(t),u.delete(e),g}var o=r(48),i=2,a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){return a(i(t,void 0,o),t+"")}var o=r(547),i=r(524),a=r(529);t.exports=n},function(t,e,r){function n(t){for(var e=i(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,o(a)]}return e}var o=r(176),i=r(48);t.exports=n},function(t,e){function r(t,e){return null==t?void 0:t[e]}t.exports=r},function(t,e,r){function n(t,e,r){e=u(e,t)?[e]:o(e);for(var n=-1,f=e.length,p=!1;++n<f;){var h=l(e[n]);if(!(p=null!=t&&r(t,h)))break;t=t[h]}return p||++n!=f?p:(f=t?t.length:0,!!f&&c(f)&&s(h,f)&&(a(t)||i(t)))}var o=r(169),i=r(121),a=r(34),s=r(118),u=r(82),c=r(123),l=r(60);t.exports=n},function(t,e){function r(t){return n.test(t)}var n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=r},function(t,e,r){function n(){this.__data__=o?o(null):{},this.size=0}var o=r(83);t.exports=n},function(t,e){function r(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=r},function(t,e,r){function n(t){var e=this.__data__;if(o){var r=e[t];return r===i?void 0:r}return s.call(e,t)?e[t]:void 0}var o=r(83),i="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){var e=this.__data__;return o?void 0!==e[t]:a.call(e,t)}var o=r(83),i=Object.prototype,a=i.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=o&&void 0===e?i:e,this}var o=r(83),i="__lodash_hash_undefined__";t.exports=n},function(t,e,r){function n(t){return a(t)||i(t)||!!(s&&t&&t[s])}var o=r(116),i=r(121),a=r(34),s=o?o.isConcatSpreadable:void 0;t.exports=n},function(t,e){function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=r},function(t,e,r){function n(t){return!!i&&i in t}var o=r(485),i=function(){var t=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=n},function(t,e){function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e){function r(){this.__data__=[],this.size=0}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=o(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():a.call(e,r,1),--this.size,!0}var o=r(79),i=Array.prototype,a=i.splice;t.exports=n},function(t,e,r){function n(t){var e=this.__data__,r=o(e,t);return r<0?void 0:e[r][1]}var o=r(79);t.exports=n},function(t,e,r){function n(t){return o(this.__data__,t)>-1}var o=r(79);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=o(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var o=r(79);t.exports=n},function(t,e,r){function n(){this.size=0,this.__data__={hash:new o,map:new(a||i),string:new o}}var o=r(441),i=r(77),a=r(114);t.exports=n},function(t,e,r){function n(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}var o=r(81);t.exports=n},function(t,e,r){function n(t){return o(this,t).get(t)}var o=r(81);t.exports=n},function(t,e,r){function n(t){return o(this,t).has(t)}var o=r(81);t.exports=n},function(t,e,r){function n(t,e){var r=o(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var o=r(81);t.exports=n},function(t,e,r){function n(t){var e=o(t,function(t){return r.size===i&&r.clear(),t}),r=e.cache;return e}var o=r(553),i=500;t.exports=n},function(t,e,r){var n=r(523),o=n(Object.keys,Object);t.exports=o},function(t,e,r){(function(t){var n=r(172),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&n.process,u=function(){try{return s&&s.binding("util")}catch(t){}}();t.exports=u}).call(e,r(87)(t))},function(t,e){function r(t,e){return function(r){return t(e(r))}}t.exports=r},function(t,e,r){function n(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var n=arguments,a=-1,s=i(n.length-e,0),u=Array(s);++a<s;)u[a]=n[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=n[a];return c[e]=r(u),o(t,this,c)}}var o=r(447),i=Math.max;t.exports=n},function(t,e){function r(t){return this.__data__.set(t,n),this}var n="__lodash_hash_undefined__";t.exports=r},function(t,e){function r(t){return this.__data__.has(t)}t.exports=r},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}t.exports=r},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=[t,t]}),r}t.exports=r},function(t,e,r){var n=r(475),o=r(530),i=o(n);t.exports=i},function(t,e){function r(t){var e=0,r=0;return function(){var a=i(),s=o-(a-r);if(r=a,s>0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var n=500,o=16,i=Date.now;t.exports=r},function(t,e,r){function n(){this.__data__=new o,this.size=0}var o=r(77);t.exports=n},function(t,e){function r(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}t.exports=r},function(t,e){function r(t){return this.__data__.get(t)}t.exports=r},function(t,e){function r(t){return this.__data__.has(t)}t.exports=r},function(t,e,r){function n(t,e){var r=this.__data__;if(r instanceof o){var n=r.__data__;if(!i||n.length<s-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new a(n)}return r.set(t,e),this.size=r.size,this}var o=r(77),i=r(114),a=r(115),s=200;t.exports=n},function(t,e,r){function n(t){return i(t)?a(t):o(t)}var o=r(453),i=r(174),a=r(538);t.exports=n},function(t,e,r){var n=r(520),o=r(62),i=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,u=n(function(t){t=o(t);var e=[];return i.test(t)&&e.push(""),t.replace(a,function(t,r,n,o){e.push(n?o.replace(s,"$1"):r||t)}),e});t.exports=u},function(t,e){function r(t){return t.match(m)||[]}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",i="\\u20d0-\\u20f0",a="\\ufe0e\\ufe0f",s="["+n+"]",u="["+o+i+"]",c="\\ud83c[\\udffb-\\udfff]",l="(?:"+u+"|"+c+")",f="[^"+n+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",v=l+"?",y="["+a+"]?",g="(?:"+d+"(?:"+[f,p,h].join("|")+")"+y+v+")*",_=y+v+g,b="(?:"+[f+u+"?",u,p,h,s].join("|")+")",m=RegExp(c+"(?="+c+")|"+b+_,"g");t.exports=r},function(t,e){function r(t){return t.match(N)||[]}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",i="\\u20d0-\\u20f0",a="\\u2700-\\u27bf",s="a-z\\xdf-\\xf6\\xf8-\\xff",u="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",l="\\u2000-\\u206f",f=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="A-Z\\xc0-\\xd6\\xd8-\\xde",h="\\ufe0e\\ufe0f",d=u+c+l+f,v="[']",y="["+d+"]",g="["+o+i+"]",_="\\d+",b="["+a+"]",m="["+s+"]",w="[^"+n+d+_+a+s+p+"]",x="\\ud83c[\\udffb-\\udfff]",O="(?:"+g+"|"+x+")",j="[^"+n+"]",E="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",k="["+p+"]",P="\\u200d",A="(?:"+m+"|"+w+")",M="(?:"+k+"|"+w+")",C="(?:"+v+"(?:d|ll|m|re|s|t|ve))?",T="(?:"+v+"(?:D|LL|M|RE|S|T|VE))?",R=O+"?",F="["+h+"]?",I="(?:"+P+"(?:"+[j,E,S].join("|")+")"+F+R+")*",D=F+R+I,L="(?:"+[b,E,S].join("|")+")"+D,N=RegExp([k+"?"+m+"+"+C+"(?="+[y,k,"$"].join("|")+")",M+"+"+T+"(?="+[y,k+A,"$"].join("|")+")",k+"?"+A+"+"+C,k+"+"+T,_,L].join("|"),"g");t.exports=r},function(t,e,r){var n=r(541),o=r(489),i=o(function(t,e,r){return e=e.toLowerCase(),t+(r?n(e):e)});t.exports=i},function(t,e,r){function n(t){return i(o(t).toLowerCase())}var o=r(62),i=r(561);t.exports=n},function(t,e){function r(t){return function(){return t}}t.exports=r},function(t,e,r){function n(t){return t=i(t),t&&t.replace(a,o).replace(l,"")}var o=r(493),i=r(62),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s="\\u0300-\\u036f\\ufe20-\\ufe23",u="\\u20d0-\\u20f0",c="["+s+u+"]",l=RegExp(c,"g");t.exports=n},function(t,e,r){function n(t,e,r){var n=s(t)?o:i;return r&&u(t,e,r)&&(e=void 0),n(t,a(e,3))}var o=r(448),i=r(456),a=r(80),s=r(34),u=r(175);t.exports=n},function(t,e,r){var n=r(490),o=r(546),i=n(o);t.exports=i},function(t,e,r){function n(t,e,r){var n=t?t.length:0;if(!n)return-1;var u=null==r?0:a(r);return u<0&&(u=s(n+u,0)),o(t,i(e,3),u)}var o=r(457),i=r(80),a=r(185),s=Math.max;t.exports=n},function(t,e,r){function n(t){var e=t?t.length:0;return e?o(t,1):[]}var o=r(166);t.exports=n},function(t,e,r){function n(t,e,r){var n=null==t?void 0:o(t,e);return void 0===n?r:n}var o=r(168);t.exports=n},function(t,e,r){function n(t,e){return null!=t&&i(t,e,o)}var o=r(460),i=r(499);t.exports=n},function(t,e,r){function n(t){return"number"==typeof t&&i(t)}var o=r(29),i=o.isFinite;t.exports=n},function(t,e,r){function n(t){return"number"==typeof t&&t==o(t)}var o=r(185);t.exports=n},function(t,e,r){function n(t,e){var r={};return e=a(e,3),i(t,function(t,n,i){o(r,e(t,n,i),t)}),r}var o=r(165),i=r(167),a=r(80);t.exports=n},function(t,e,r){function n(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(i);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(n.Cache||o),r}var o=r(115),i="Expected a function";n.Cache=o,t.exports=n},function(t,e,r){var n=r(78),o=r(469),i=r(496),a=r(60),s=i(function(t,e){return null==t?{}:o(t,n(e,a))});t.exports=s},function(t,e,r){function n(t){return a(t)?o(s(t)):i(t)}var o=r(471),i=r(472),a=r(82),s=r(60);t.exports=n},function(t,e,r){var n=r(491),o=n();t.exports=o},function(t,e){function r(){return!1}t.exports=r},function(t,e,r){function n(t){return t&&t.length?o(t,i):0}var o=r(477),i=r(120);t.exports=n},function(t,e,r){function n(t){if("number"==typeof t)return t;if(i(t))return a;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(s,"");var r=c.test(t);return r||l.test(t)?f(t.slice(2),r?2:8):u.test(t)?a:+t}var o=r(55),i=r(85),a=NaN,s=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,f=parseInt;t.exports=n},function(t,e,r){var n=r(492),o=r(48),i=n(o);t.exports=i},function(t,e,r){var n=r(488),o=n("toUpperCase");t.exports=o},function(t,e,r){function n(t){return t?o(t,i(t)):[]}var o=r(482),i=r(48);t.exports=n},function(t,e,r){function n(t,e,r){return t=a(t),e=r?void 0:e,void 0===e?i(t)?s(t):o(t):t.match(e)||[]}var o=r(454),i=r(500),a=r(62),s=r(539);t.exports=n},function(t,e){"use strict";t.exports=function(t){var e,r=t.data,n=t.stride[0],o=t.offset,i=0;for(e=t.shape[0]-1;e>=0;e--,o+=n)i+=Math.abs(r[o]);return i}},function(t,e){"use strict";t.exports=function(t,e,r){var n,o=e.data,i=r.data,a=e.stride[0],s=r.stride[0],u=e.offset,c=r.offset;for(n=e.shape[0]-1;n>=0;n--,u+=a,c+=s)i[c]+=t*o[u]}},function(t,e){"use strict";t.exports=function(t,e){var r,n=t.data,o=e.data,i=t.stride[0],a=e.stride[0],s=t.offset,u=e.offset;for(r=t.shape[0]-1;r>=0;r--,s+=i,u+=a)o[u]=n[s]}},function(t,e){"use strict";t.exports=function(t,e,r){var n,o=e.data,i=r.data,a=e.stride[0],s=r.stride[0],u=e.offset,c=r.offset;for(n=e.shape[0]-1;n>=0;n--,u+=a,c+=s)i[c]=t*o[u]}},function(t,e){"use strict";t.exports=function(t,e){var r,n,o=t.data,i=t.stride[0],a=t.offset,s=0;if(t===e)for(r=t.shape[0]-1;r>=0;r--,a+=i)n=o[a],s+=n*n;else{var u=e.data,c=e.stride[0],l=e.offset;for(r=t.shape[0]-1;r>=0;r--,a+=i,l+=c)s+=u[l]*o[a]}return s}},function(t,e){"use strict";t.exports=function(t){var e,r,n,o=-(1/0),i=t.data,a=t.stride[0],s=t.offset,u=t.shape[0];for(e=0;e<u;e++,s+=a)r=Math.abs(i[s]),r>o&&(o=r,n=e);return n}},function(t,e){"use strict";var r=function(t,e){if(0===t&&0===e)return 0;var r=Math.abs(t),n=Math.abs(e),o=Math.min(r,n),i=Math.max(r,n);return o/=i,i*Math.sqrt(1+o*o)};t.exports=function(t){var e,n,o=t.data,i=t.stride[0],a=t.offset,s=0;for(e=t.shape[0]-1;e>=0;e--,a+=i)n=o[a],s=r(s,n);return s}},function(t,e){"use strict";Math.sign=Math.sign||function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},t.exports=function(t,e,r){var n=0,o=0,i=0,a=0,s=0;return 0===e?(n=Math.sign(t),o=0,i=Math.abs(t)):0===t?(n=0,o=Math.sign(e),i=Math.abs(e)):Math.abs(t)>Math.abs(e)?(a=e/t,s=Math.sign(t)*Math.sqrt(1+a*a),n=1/s,o=a*n,i=t*s):(a=t/e,s=Math.sign(t)*Math.sqrt(1+a*a),o=1/s,n=a*o,i=e*s),void 0!==r&&r.length>2?(r[0]=n,r[1]=o,r[2]=i,void 0):[n,o,i]}},function(t,e){"use strict";t.exports=function(t,e){var r,n=e.data,o=e.stride[0],i=e.offset;for(r=e.shape[0]-1;r>=0;r--,i+=o)n[i]*=t}},function(t,e){"use strict";t.exports=function(t,e){var r,n,o=t.data,i=e.data,a=t.stride[0],s=e.stride[0],u=t.offset,c=e.offset;for(r=t.shape[0]-1;r>=0;r--,u+=a,c+=s)n=o[u],o[u]=i[c],i[c]=n}},function(t,e){"use strict";function r(t,e,r,n,o,i,a){for(var s=0,u=0,c=0,l=0,f=0,p=t.shape[0],h=t.shape[1],d=Math.min(e,p-1),v=Math.min(r,h-1),y=void 0===i?1:i,g=void 0===a?0:a;s<=d;){l=0;var _=Math.min(s+v,h-1);for(c=0;c<=_;c++)l+=t.get(s,c)*n.get(c);o.set(s,l*y+g*o.get(s)),s++}if(s<p)for(u=0;s+v<h;){for(l=0,c=0;c<=d+v;c++)f=u+c+1,l+=t.get(s,f)*n.get(f);if(o.set(s,l*y+g*o.get(s)),s++,u++,s===p)break}if(s<p)for(u++;s-d<h;){for(l=0,c=u;c<h;c++)l+=t.get(s,c)*n.get(c);if(o.set(s,l*y+g*o.get(s)),s++,u++,s===p)break}return!0}t.exports=r},function(t,e,r){"use strict";function n(t,e,r,n,i){for(var a=o.dot,s=e.shape[0]-1;s>=0;s--)i.set(s,i.get(s)*n+t*a(e.pick(s,null),r));return!0}var o=r(86);t.exports=n},function(t,e){"use strict";function r(){console.error("GER (rank 1 operation A := alpha*x*y' + A) not yet implemented")}t.exports=r},function(t,e){"use strict";function r(){console.error("SBMV (symmetric banded matrix vector multiply) not yet implemented")}t.exports=r},function(t,e,r){"use strict";(function(t){function e(){console.error("SPMV (symmetric packed matrix vector multiply) not yet implemented")}t.exporst=e}).call(e,r(87)(t))},function(t,e){"use strict";function r(){console.error("SPR (symmetric packed rank 1 operation A := alpha*x*y' + A) not yet implemented")}t.exports=r},function(t,e){"use strict";function r(){console.error("SPR (symmetric packed rank 2 operation A := alpha*x*y' + alpha*y*x' + A) not yet implemented")}t.exports=r},function(t,e,r){"use strict";function n(t,e,r,n,i,a){var s=t.shape[0],u=n||!0,c=void 0===i?1:i,l=void 0===a?0:a,f=0,p=0,h=0,d=0;if(0===l)for(f=0;f<r.shape[0];++f)r.set(f,0);else 1!==l&&o.scal(l,r);if(0===c)return!0;if(1===c)if(u)for(p=0;p<s;++p){for(h=e.get(p),d=0,r.set(p,r.get(p)+h*t.get(p,p)),f=p+1;f<s;++f)r.set(f,r.get(f)+h*t.get(f,p)),d+=t.get(f,p)*e.get(f);r.set(p,r.get(p)+d)}else for(p=0;p<s;++p){for(h=e.get(p),d=0,f=0;f<=p-1;++f)r.set(f,r.get(f)+h*t.get(f,p)),d+=t.get(f,p)*e.get(f);r.set(p,r.get(p)+h*t.get(p,p)+d)}else if(u)for(p=0;p<s;++p){for(h=c*e.get(p),d=0,r.set(p,r.get(p)+h*t.get(p,p)),f=p+1;f<s;++f)r.set(f,r.get(f)+h*t.get(f,p)),d+=t.get(f,p)*e.get(f);r.set(p,r.get(p)+c*d)}else for(p=0;p<s;++p){for(h=c*e.get(p),d=0,f=0;f<=p-1;++f)r.set(f,r.get(f)+h*t.get(f,p)),d+=t.get(f,p)*e.get(f);r.set(p,r.get(p)+h*t.get(p,p)+c*d)}return!0}var o=r(86);t.exports=n},function(t,e){"use strict";function r(){console.error("SYR (symmetric rank 1 operation A := alpha*x*y' + A) not yet implemented")}t.exports=r},function(t,e){"use strict";function r(){console.error("SYR (symmetric rank 2 operation A := alpha*x*y' + alpha*y*x' + A) not yet implemented")}t.exports=r},function(t,e){"use strict";function r(){console.error("TBMV (triangular banded matrix vector multiply) not yet implemented")}t.exports=r},function(t,e,r){"use strict";(function(t){function e(){console.error("TBSV (triangular banded matrix solver) not yet implemented")}t.exporst=e}).call(e,r(87)(t))},function(t,e){"use strict";function r(){console.error("TPSV (triangular packed matrix solver) not yet implemented")}t.exports=r},function(t,e,r){"use strict";function n(t,e,r){var n=o.dot,i=t.shape[1],a=0;if(r)for(a=i-1;a>=0;a--)e.set(a,n(t.pick(a,null).hi(a+1),e.hi(a+1)));else for(a=0;a<i;a++)e.set(a,n(t.pick(a,null).lo(a),e.lo(a)));return!0}var o=r(86);t.exports=n},function(t,e,r){"use strict";function n(t,e,r){var n=o.dot,i=t.shape[1],a=0;if(r)for(e.set(0,e.get(0)/t.get(0,0)),a=1;a<i;a++)e.set(a,(e.get(a)-n(t.pick(a,null).hi(a),e.hi(a)))/t.get(a,a));else for(e.set(i-1,e.get(i-1)/t.get(i-1,i-1)),a=i-2;a>=0;a--)e.set(a,(e.get(a)-n(t.pick(a,null).lo(a+1),e.lo(a+1)))/t.get(a,a));return!0}var o=r(86);t.exports=n},function(t,e,r){"use strict";function n(){var t,e,r,n,u,c,l,f,p,h;if(n=o({},s),0===arguments.length)throw new Error("Array of ndarrays to concatenate must not be empty");if(Array.isArray(arguments[0])?(r=arguments[0],o(n,arguments[1]||{})):2===arguments.length&&(r=arguments[1],t=arguments[0],o(n,arguments[2]||{})),0===r.length)throw new Error("Array of ndarrays to concatenate must not be empty");for(u=0;u<r.length;u++)if(l){if(r[u].dimension!==l.length)throw new Error("all arrays must have the same dimensionality");for(c=1;c<r[u].shape.length;c++)if(r[u].shape[c]!==l[c])throw new Error("last n-1 dimensions of concatenated rows must have the same size");l[0]+=r[u].shape[0]}else l=r[u].shape.slice(0);if(t){if(l[0]!==t.shape[0])throw new Error("first dimension of output array must match the total number of concatenated rows")}else t=a.zeros(l,n.dtype);for(c=0,f=0;c<r.length;c++)e=r[c],p=e.shape[0],h=t.lo(f).hi(p),i.assign(h,e),f+=p;return t}t.exports=n;var o=r(594),i=r(4),a=r(186),s={dtype:"double"}},function(t,e){"use strict";function r(t,e){return"native"===e[1]?[t,"d0=",t,".length,",t,"d1=",t,"[0].length,"].join(""):[t,"d0=",t,".shape[0],",t,"d1=",t,".shape[1],",t,"s0=",t,".stride[0],",t,"s1=",t,".stride[1],",t,"o=",t,".offset,",t,"d=",t,".data,"].join("")}function n(t,e,r,n,o,i){var a=[];return"native"===r[1]?t[0]&&(n?a.push("var ",e,"p=",e,"[",n,"];"):a.push("var ",e,"p=",e,"[0];")):n&&o?i?a.push("var ",e,"t0=",e,"s",t[0],",",e,"t1=",e,"s",t[1],"-",e,"s",t[0],"*",i,",",e,"p=",e,"o+",n,"*",e,"s0+",o,"*",e,"s1;"):a.push("var ",e,"t0=",e,"s",t[0],",",e,"p=",e,"o+",n,"*",e,"s0+",o,"*",e,"s1;"):n?a.push("var ",e,"t0=",e,"s",t[0],",",e,"p=",e,"o+",n,"*",e,"s0;"):o?a.push("var ",e,"t0=",e,"s",t[0],",",e,"p=",e,"o+",o,"*",e,"s1;"):a.push("var ",e,"t0=",e,"s",t[0],",",e,"t1=",e,"s",t[1],"-",e,"s",t[0],"*",e,"d",t[0],",",e,"p=",e,"o;"),a}function o(t,e,r,n,o){var i=[];return"native"===r[1]?t[0]&&1===n&&i.push(e,"p=",e,"[",o,"+1]"):i.push(e,"p+=",e,"t",n,";"),i}function i(t,e,r,n,o,i){var a=[];return"native"===r[1]?t[0]?a.push(e,"p[",o,"]=",i,";"):a.push(e,"[",n,"][",o,"]=",i,";"):"generic"===r[1]?a.push(e,"d.set(",e,"p,",i,");"):a.push(e,"d[",e,"p]=",i,";"),a}function a(t,e,r,n,o){var i=[];return"native"===r[1]?t[0]?i.push(e,"p[",o,"]"):i.push(e,"[",n,"][",o,"]"):"generic"===r[1]?i.push(e,"d.get(",e,"p)"):i.push(e,"d[",e,"p]"),i.join("")}function s(t,e,r,s,u){var c=[],l="r"===t[0]?[1,0]:[0,1],f=[1,0],p=[0,1],h=["i","j"];return c.push.apply(c,n(l,"o",t)),l[1]?(c.push("for(j=0;j<od1;++j){"),c.push("for(i=0;i<od0;++i){")):(c.push("for(i=0;i<od0;++i){"),c.push("for(j=0;j<od1;++j){")),c.push.apply(c,n(f,"a",e,"i")),c.push.apply(c,n(p,"b",r,void 0,"j")),c.push("var r=0.0;","for(k=0;k<ad1;++k){","r+=",a(f,"a",e,"i","k"),"*",a(p,"b",r,"k","j"),";"),c.push.apply(c,o(f,"a",e,0,"k")),c.push.apply(c,o(p,"b",r,0,"k")),c.push("}"),s&&c.push("r*=A;"),u&&c.push("r+=B*",a(l,"o",t,"i","j"),";"),c.push.apply(c,i(l,"o",t,"i","j","r")),c.push.apply(c,o(l,"o",t,0,h[1])),c.push("}"),c.push.apply(c,o(l,"o",t,1,h[0])),c.push("}"),c}function u(t,e){var r,s=[],u="r"===t[0]?[1,0]:[0,1];return e&&s.push("if(B!==1.0){"),s.push.apply(s,n(u,"o",t)),u[0]?(s.push("for(i=0;i<od0;++i){for(j=0;j<od1;++j){"),r=["i","j"]):(s.push("for(j=0;j<od1;++j){for(i=0;i<od0;++i){"),r=["j","i"]),e?s.push.apply(s,i(u,"o",t,"i","j","B*"+a(u,"o",t,"i","j"))):s.push.apply(s,i(u,"o",t,"i","j","0")),s.push.apply(s,o(u,"o",t,0,r[1])),s.push("}"),s.push.apply(s,o(u,"o",t,1,r[0])),s.push("}"),e&&s.push("}"),s}function c(t,e,r,s,c){var l=[],p=["od0","od1","ad1"],h=[1,0],d=[1,0],v=[0,1];l.push.apply(l,u(t,c));for(var y=0;y<3;++y)l.push("for(var i",y,"=",p[y],";i",y,">0;){","var w",y,"=",f,";","if(i",y,"<",f,"){","w",y,"=i",y,";","i",y,"=0;","}else{","i",y,"-=",f,";","}");
l.push.apply(l,n(h,"o",t,"i0","i1","w1")),l.push("for(i=0;i<w0;++i){for(j=0;j<w1;++j){var r=0.0;"),l.push.apply(l,n(d,"a",e,"(i0+i)","i2")),l.push.apply(l,n(v,"b",r,"i2","(i1+j)")),l.push("for(k=0;k<w2;++k){"),l.push("r+=",a(d,"a",e,"(i0+i)","(i2+k)"),"*",a(v,"b",r,"(i2+k)","(i1+j)"),";"),l.push.apply(l,o(d,"a",e,0,"(i2+k)")),l.push.apply(l,o(v,"b",r,0,"(i2+k)")),l.push("}");var g="r";return s&&(g="A*r"),l.push.apply(l,i(h,"o",t,"(i0+i)","(i1+j)",g+"+"+a(h,"o",t,"(i0+i)","(i1+j)"))),l.push.apply(l,o(h,"o",t,0,"(i1+j)")),l.push("}"),l.push.apply(l,o(h,"o",t,1,"(i0+i)")),l.push("}}}}"),l}function l(t,e,n,o,i){var a=["gemm",t[0],t[1],"a",e[0],e[1],"b",n[0],n[1],o?"alpha":"",i?"beta":""].join(""),u=["function ",a,"(o,a,b,A,B){","var ",r("o",t),r("a",e),r("b",n),"i,j,k;"];"r"===e[0]&&"c"===n[0]?u.push.apply(u,s(t,e,n,o,i)):u.push.apply(u,c(t,e,n,o,i)),u.push("}return ",a);var l=new Function(u.join(""));return l()}t.exports=l;var f=32},function(t,e,r){"use strict";function n(){var t,e,r,n;if(2===arguments.length?(e=arguments[0],n=arguments[1]):3===arguments.length&&(r=arguments[0],e=arguments[1],n=arguments[2]),!Array.isArray(n))throw new Error("second argument of tile must be an array of repetition counts for each dimension");var a=e.shape.slice(0),s=a.slice(0),u=Math.max(s.length,n.length);for(t=0;t<u;t++)if(a[t]=void 0===a[t]?1:a[t],n[t]=void 0===n[t]?1:n[t],s[t]=(void 0===s[t]?1:s[t])*n[t],0===s[t])throw new Error("Number of tiles must be greater than zero");r||(r=o.zeros(s,e.dtype));var c=1;for(t=0;t<n.length;t++)c*=n[t];var l=new Array(n.length);for(t=0;t<n.length;t++)l[t]=0;var f=s.slice(0);for(h=0;h<s.length;h++)f[h]=h<e.dimension?null:0;for(t=0;t<c;t++){for(h=e.dimension;h<s.length;h++)f[h]=l[h];var p=r.pick.apply(r,f);if(p=p.lo.apply(p,l),p=p.hi.apply(p,e.shape),i.assign(p,e),t===c-1)break;for(var h=u-1;h>=0&&(l[h]+=a[h],l[h]===s[h]);)l[h]=0,h--}return r}var o=r(186),i=r(4);t.exports=n},function(t,e,r){(function(e,r){!function(e){"use strict";function n(t,e,r,n){var o=Object.create((e||i).prototype),a=new d(n||[]);return o._invoke=f(t,r,a),o}function o(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function i(){}function a(){}function s(){}function u(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function c(t){this.arg=t}function l(t){function e(r,n,i,a){var s=o(t[r],t,n);if("throw"!==s.type){var u=s.arg,l=u.value;return l instanceof c?Promise.resolve(l.arg).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(l).then(function(t){u.value=t,i(u)},a)}a(s.arg)}function n(t,r){function n(){return new Promise(function(n,o){e(t,r,n,o)})}return i=i?i.then(n,n):n()}"object"==typeof r&&r.domain&&(e=r.domain.bind(e));var i;this._invoke=n}function f(t,e,r){var n=j;return function(i,a){if(n===S)throw new Error("Generator is already running");if(n===k){if("throw"===i)throw a;return y()}for(;;){var s=r.delegate;if(s){if("return"===i||"throw"===i&&s.iterator[i]===g){r.delegate=null;var u=s.iterator.return;if(u){var c=o(u,s.iterator,a);if("throw"===c.type){i="throw",a=c.arg;continue}}if("return"===i)continue}var c=o(s.iterator[i],s.iterator,a);if("throw"===c.type){r.delegate=null,i="throw",a=c.arg;continue}i="next",a=g;var l=c.arg;if(!l.done)return n=E,l;r[s.resultName]=l.value,r.next=s.nextLoc,r.delegate=null}if("next"===i)r.sent=r._sent=a;else if("throw"===i){if(n===j)throw n=k,a;r.dispatchException(a)&&(i="next",a=g)}else"return"===i&&r.abrupt("return",a);n=S;var c=o(t,e,r);if("normal"===c.type){n=r.done?k:E;var l={value:c.arg,done:r.done};if(c.arg!==P)return l;r.delegate&&"next"===i&&(a=g)}else"throw"===c.type&&(n=k,i="throw",a=c.arg)}}}function p(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function h(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(p,this),this.reset(!0)}function v(t){if(t){var e=t[m];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(_.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=g,e.done=!0,e};return n.next=n}}return{next:y}}function y(){return{value:g,done:!0}}var g,_=Object.prototype.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},m=b.iterator||"@@iterator",w=b.toStringTag||"@@toStringTag",x="object"==typeof t,O=e.regeneratorRuntime;if(O)return void(x&&(t.exports=O));O=e.regeneratorRuntime=x?t.exports:{},O.wrap=n;var j="suspendedStart",E="suspendedYield",S="executing",k="completed",P={},A=s.prototype=i.prototype;a.prototype=A.constructor=s,s.constructor=a,s[w]=a.displayName="GeneratorFunction",O.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},O.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,w in t||(t[w]="GeneratorFunction")),t.prototype=Object.create(A),t},O.awrap=function(t){return new c(t)},u(l.prototype),O.async=function(t,e,r,o){var i=new l(n(t,e,r,o));return O.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},u(A),A[m]=function(){return this},A[w]="Generator",A.toString=function(){return"[object Generator]"},O.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},O.values=v,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.tryEntries.forEach(h),!t)for(var e in this)"t"===e.charAt(0)&&_.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=g)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,n){return i.type="throw",i.arg=t,r.next=e,!!n}if(this.done)throw t;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=_.call(o,"catchLoc"),s=_.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&_.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?this.next=o.finallyLoc:this.complete(i),P},complete:function(t,e){if("throw"===t.type)throw t.arg;"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=t.arg,this.next="end"):"normal"===t.type&&e&&(this.next=e)},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),h(r),P}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;h(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:v(t),resultName:e,nextLoc:r},P}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,r(49),r(126))},function(t,e,r){"use strict";(function(t,n){function o(t){if(t){var e=t.length||t.byteLength,r=_.log2(e);x[r].push(t)}}function i(t){o(t.buffer)}function a(t){var t=_.nextPow2(t),e=_.log2(t),r=x[e];return r.length>0?r.pop():new ArrayBuffer(t)}function s(t){return new Uint8Array(a(t),0,t)}function u(t){return new Uint16Array(a(2*t),0,t)}function c(t){return new Uint32Array(a(4*t),0,t)}function l(t){return new Int8Array(a(t),0,t)}function f(t){return new Int16Array(a(2*t),0,t)}function p(t){return new Int32Array(a(4*t),0,t)}function h(t){return new Float32Array(a(4*t),0,t)}function d(t){return new Float64Array(a(8*t),0,t)}function v(t){return m?new Uint8ClampedArray(a(t),0,t):s(t)}function y(t){return new DataView(a(t),0,t)}function g(t){t=_.nextPow2(t);var e=_.log2(t),r=O[e];return r.length>0?r.pop():new n(t)}var _=r(249),b=r(163);t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:b([32,0]),UINT16:b([32,0]),UINT32:b([32,0]),INT8:b([32,0]),INT16:b([32,0]),INT32:b([32,0]),FLOAT:b([32,0]),DOUBLE:b([32,0]),DATA:b([32,0]),UINT8C:b([32,0]),BUFFER:b([32,0])});var m="undefined"!=typeof Uint8ClampedArray,w=t.__TYPEDARRAY_POOL;w.UINT8C||(w.UINT8C=b([32,0])),w.BUFFER||(w.BUFFER=b([32,0]));var x=w.DATA,O=w.BUFFER;e.free=function(t){if(n.isBuffer(t))O[_.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|_.log2(e);x[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeInt8=e.freeInt16=e.freeInt32=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=i,e.freeArrayBuffer=o,e.freeBuffer=function(t){O[_.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return a(t);switch(e){case"uint8":return s(t);case"uint16":return u(t);case"uint32":return c(t);case"int8":return l(t);case"int16":return f(t);case"int32":return p(t);case"float":case"float32":return h(t);case"double":case"float64":return d(t);case"uint8_clamped":return v(t);case"buffer":return g(t);case"data":case"dataview":return y(t);default:return null}return null},e.mallocArrayBuffer=a,e.mallocUint8=s,e.mallocUint16=u,e.mallocUint32=c,e.mallocInt8=l,e.mallocInt16=f,e.mallocInt32=p,e.mallocFloat32=e.mallocFloat=h,e.mallocFloat64=e.mallocDouble=d,e.mallocUint8Clamped=v,e.mallocDataView=y,e.mallocBuffer=g,e.clearCache=function(){for(var t=0;t<32;++t)w.UINT8[t].length=0,w.UINT16[t].length=0,w.UINT32[t].length=0,w.INT8[t].length=0,w.INT16[t].length=0,w.INT32[t].length=0,w.FLOAT[t].length=0,w.DOUBLE[t].length=0,w.UINT8C[t].length=0,x[t].length=0,O[t].length=0}}).call(e,r(49),r(133).Buffer)},function(t,e){function r(t,e){if(!e||"object"!=typeof e)return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}t.exports=r},function(t,e,r){r(190),t.exports=r(189)}])});