From c49b74dde28a1b4f90c028b6041dda63e9cfd313 Mon Sep 17 00:00:00 2001 From: Leon Chen Date: Wed, 5 Oct 2016 22:31:46 -0400 Subject: [PATCH] update webpack builds --- demos/dist/bundle.min.js | 6 +++--- dist/keras.min.js | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/demos/dist/bundle.min.js b/demos/dist/bundle.min.js index bbdb789..9f35699 100644 --- a/demos/dist/bundle.min.js +++ b/demos/dist/bundle.min.js @@ -1,3 +1,3 @@ -!function(e){function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,n,t){Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=54)}([function(e,n){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],n=0;n=0&&v.splice(n,1)}function o(e){var n=document.createElement("style");return n.type="text/css",a(e,n),n}function s(e){var n=document.createElement("link");return n.rel="stylesheet",a(e,n),n}function c(e,n){var t,r,a;if(n.singleton){var c=y++;t=g||(g=o(n)),r=l.bind(null,t,c,!1),a=l.bind(null,t,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=s(n),r=p.bind(null,t),a=function(){i(t),t.href&&URL.revokeObjectURL(t.href)}):(t=o(n),r=u.bind(null,t),a=function(){i(t)});return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else a()}}function l(e,n,t,r){var a=t?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(n,a);else{var i=document.createTextNode(a),o=e.childNodes;o[n]&&e.removeChild(o[n]),o.length?e.insertBefore(i,o[n]):e.appendChild(i)}}function u(e,n){var t=n.css,r=n.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}function p(e,n){var t=n.css,r=n.sourceMap;r&&(t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([t],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(a),i&&URL.revokeObjectURL(i)}var d={},f=function(e){var n;return function(){return"undefined"==typeof n&&(n=e.apply(this,arguments)),n}},m=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=f(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,y=0,v=[];e.exports=function(e,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");n=n||{},"undefined"==typeof n.singleton&&(n.singleton=m()),"undefined"==typeof n.insertAt&&(n.insertAt="bottom");var a=r(e);return t(a,n),function(e){for(var i=[],o=0;o-1?s.currentView=t:s.currentView="home"}t(51);var a=t(11),i=t(10),o=t(12);Vue.component("menu",a.Menu),Vue.component("home",i.Home),Vue.component("mnist-cnn",o.MnistCnn),Vue.use(VueMdl.default);var s=new Vue({el:"#app",data:{currentView:"home"}});window.addEventListener("load",r),window.addEventListener("hashchange",r)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Home=void 0,t(50);n.Home=Vue.extend({template:'\n
\n
Home
\n
\n '})},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Menu=void 0,t(52);n.Menu=Vue.extend({template:'\n \n '})},function(e,n,t){"use strict";function r(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}function a(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n\n
Basic Convnet - MNIST
\n
\n Loading...{{ loadingProgress }}%\n
\n
\n
\n
\n
Draw any digit (0-9) here
\n
\n \n \n \n
\n
\n clearCLEAR\n
\n
\n
\n
\n Use GPU\n
\n
\n
\n
\n
{{ i }}
\n
\n
\n
\n
\n
\n
\n
\n \n
\n {{ layerResult.layerClass }}\n {{ layerDisplayConfig[layerResult.name].heading }}\n
\n
\n \n \n
\n
\n \n \n ',data:function(){return{model:new KerasJS.Model(f),modelLoading:!0,input:new Float32Array(784),output:new Float32Array(10),outputClasses:(0,u.default)(10),layerResultImages:[],layerDisplayConfig:m,drawing:!1,strokes:[],useGpu:f.gpu}},computed:{loadingProgress:function(){return this.model.getLoadingProgress()},predictedClass:function(){var e=this;return 0===this.output.reduce(function(e,n){return e+n},0)?-1:this.output.reduce(function(n,t,r){return t>e.output[n]?r:n},0)}},created:function(){var e=this;this.model.initialize(),this.model.ready().then(function(){e.modelLoading=!1,e.getIntermediateResults()})},methods:{clear:function(e){this.clearIntermediateResults();var n=document.getElementById("input-canvas").getContext("2d");n.clearRect(0,0,n.canvas.width,n.canvas.height);var t=document.getElementById("input-canvas-centercrop").getContext("2d");t.clearRect(0,0,t.canvas.width,t.canvas.height);var r=document.getElementById("input-canvas-scaled").getContext("2d");r.clearRect(0,0,r.canvas.width,r.canvas.height),this.output=new Float32Array(10),this.drawing=!1,this.strokes=[]},activateDraw:function(e){this.drawing=!0,this.strokes.push([]);var n=this.strokes[this.strokes.length-1];n.push(d.getCoordinates(e))},draw:function(e){if(this.drawing){var n=document.getElementById("input-canvas").getContext("2d");n.lineWidth=20,n.lineJoin=n.lineCap="round",n.strokeStyle="#393E46",n.clearRect(0,0,n.canvas.width,n.canvas.height);var t=this.strokes[this.strokes.length-1];t.push(d.getCoordinates(e));for(var r=0,a=this.strokes.length;r0&&(co&&(o=c),ls&&(s=l))}a-=20,o+=20,i-=20,s+=20;var p=o-a+1,d=s-i+1;if(pd){var h=Math.floor((p-d)/2),g=p-d-h;s+=g,i-=h}p=o-a+1,d=s-i+1;for(var y=new Uint8ClampedArray(p*d*4),v=a;v<=o;v++)for(var b=i;b<=s;b++)if(v>=0&&v=0&&b0)throw new Error("cwise: pre() block may not reference array args");if(a0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)n.scalarArgs.push(a),n.shimArgs.push("scalar"+a);else if("index"===o){if(n.indexArgs.push(a),a0)throw new Error("cwise: pre() block may not reference array index");if(a0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(n.shapeArgs.push(a),at.length)throw new Error("cwise: Too many arguments in pre() block");if(n.body.args.length>t.length)throw new Error("cwise: Too many arguments in body() block");if(n.post.args.length>t.length)throw new Error("cwise: Too many arguments in post() block");return n.debug=!!e.printCode||!!e.debug,n.funcName=e.funcName||"cwise",n.blockSize=e.blockSize||64,i(n)}var i=t(20);e.exports=a},function(e,n,t){"use strict";function r(e,n,t){var r,a,i=e.length,o=n.arrayArgs.length,s=n.indexArgs.length>0,c=[],l=[],u=0,p=0;for(r=0;r=0;--r)u=e[r],c.push(["for(i",r,"=0;i",r,"0&&c.push(["index[",p,"]-=s",p].join("")),c.push(["++index[",u,"]"].join(""))),c.push("}")}return c.join("\n")}function a(e,n,t,a){for(var i=n.length,o=t.arrayArgs.length,s=t.blockSize,c=t.indexArgs.length>0,l=[],u=0;u0;){"].join("")),l.push(["if(j",u,"<",s,"){"].join("")),l.push(["s",n[u],"=j",u].join("")),l.push(["j",u,"=0"].join("")),l.push(["}else{s",n[u],"=",s].join("")),l.push(["j",u,"-=",s,"}"].join("")),c&&l.push(["index[",n[u],"]=j",u].join(""));for(var u=0;u0&&(t=t&&n[r]===n[r-1])}return t?n[0]:n.join("")}function c(e,n){for(var t=n[1].length-Math.abs(e.arrayBlockIndices[0])|0,c=new Array(e.arrayArgs.length),u=new Array(e.arrayArgs.length),p=0;p0&&w.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var k=new Array(t),p=0;p3&&x.push(o(e.pre,e,u));var I=o(e.body,e,u),A=i(g);A3&&x.push(o(e.post,e,u)),e.debug&&console.log("-----Generated cwise routine for ",n,":\n"+x.join("\n")+"\n----------");var j=[e.funcName||"unnamed","_cwise_loop_",c[0].join("s"),"m",A,s(u)].join(""),L=new Function(["function ",j,"(",b.join(","),"){",x.join("\n"),"} return ",j].join(""));return L()}var l=t(7);e.exports=c},function(e,n,t){"use strict";function r(e){var n=["'use strict'","var CACHED={}"],t=[],r=e.funcName+"_cwise_thunk";n.push(["return function ",r,"(",e.shimArgs.join(","),"){"].join(""));for(var i=[],o=[],s=[["array",e.arrayArgs[0],".shape.slice(",Math.max(0,e.arrayBlockIndices[0]),e.arrayBlockIndices[0]<0?","+e.arrayBlockIndices[0]+")":")"].join("")],c=[],l=[],u=0;u0&&(c.push("array"+e.arrayArgs[0]+".shape.length===array"+p+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[u]))),l.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+p+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[u])+"]"))}e.arrayArgs.length>1&&(n.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),n.push("for(var shapeIndex=array"+e.arrayArgs[0]+".shape.length-"+Math.abs(e.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),n.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),n.push("}"));for(var u=0;u=0){var l=v[c],u=f(r);u&E&&(l.lvalue=!0),u&C&&(l.rvalue=!0),++l.count,s(r,l.name)}else i(o)||s(r,n(o))}else if("Literal"===r.type)"string"==typeof r.value&&s(r,p(r.value));else{if("WithStatement"===r.type)throw new Error("cwise-parser: with() statements not allowed");for(var d=Object.keys(r),m=0,h=d.length;m0)return r(0|e,n);break;case"object":if("number"==typeof e.length)return t(e,n,0)}return[]}e.exports=a},function(e,n,t){var r,a,i;!function(t,o){"use strict";a=[n],r=o,i="function"==typeof r?r.apply(n,a):r,!(void 0!==i&&(e.exports=i))}(this,function(e){"use strict";function n(e,n){if(!e)throw new Error("ASSERT: "+n)}function t(e){return e>=48&&e<=57}function r(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function a(e){return"01234567".indexOf(e)>=0}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function s(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&on.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function c(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&on.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function l(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function u(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function p(e){return"eval"===e||"arguments"===e}function d(e){if(ln&&u(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function f(e,t,r,a,i){var o;n("number"==typeof r,"Comment must have valid position"),gn.lastCommentStart>=r||(gn.lastCommentStart=r,o={type:e,value:t},yn.range&&(o.range=[r,a]),yn.loc&&(o.loc=i),yn.comments.push(o),yn.attachComment&&(yn.leadingComments.push(o),yn.trailingComments.push(o)))}function m(e){var n,t,r,a;for(n=un-e,t={start:{line:pn,column:un-dn-e}};un=fn&&V({},an.UnexpectedToken,"ILLEGAL");else if(42===t){if(47===cn.charCodeAt(un+1))return++un,++un,void(yn.comments&&(r=cn.slice(e+2,un-2),n.end={line:pn,column:un-dn},f("Block",r,e,un,n)));++un}else++un;V({},an.UnexpectedToken,"ILLEGAL")}function g(){var e,n;for(n=0===un;un>>="===r?(un+=4,{type:Ze.Punctuator,value:r,lineNumber:pn,lineStart:dn,start:a,end:un}):(t=r.substr(0,3),">>>"===t||"<<="===t||">>="===t?(un+=3,{type:Ze.Punctuator,value:t,lineNumber:pn,lineStart:dn,start:a,end:un}):(n=t.substr(0,2),o===n[1]&&"+-<>&|".indexOf(o)>=0||"=>"===n?(un+=2,{type:Ze.Punctuator,value:n,lineNumber:pn,lineStart:dn,start:a,end:un}):"<>=!+-*%&|^/".indexOf(o)>=0?(++un,{type:Ze.Punctuator,value:o,lineNumber:pn,lineStart:dn,start:a,end:un}):void V({},an.UnexpectedToken,"ILLEGAL")))}function k(e){for(var n="";un=0&&un0&&(r=yn.tokens[yn.tokens.length-1],r.range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||yn.tokens.pop())),yn.tokens.push({type:"RegularExpression",value:t.literal,range:[e,un],loc:n})),t}function R(e){return e.type===Ze.Identifier||e.type===Ze.Keyword||e.type===Ze.BooleanLiteral||e.type===Ze.NullLiteral}function O(){var e,n;if(e=yn.tokens[yn.tokens.length-1],!e)return D();if("Punctuator"===e.type){if("]"===e.value)return w();if(")"===e.value)return n=yn.tokens[yn.openParenToken-1],!n||"Keyword"!==n.type||"if"!==n.value&&"while"!==n.value&&"for"!==n.value&&"with"!==n.value?w():D();if("}"===e.value){if(yn.tokens[yn.openCurlyToken-3]&&"Keyword"===yn.tokens[yn.openCurlyToken-3].type){if(n=yn.tokens[yn.openCurlyToken-4],!n)return w()}else{if(!yn.tokens[yn.openCurlyToken-4]||"Keyword"!==yn.tokens[yn.openCurlyToken-4].type)return w();if(n=yn.tokens[yn.openCurlyToken-5],!n)return D()}return nn.indexOf(n.value)>=0?w():D()}return D()}return"Keyword"===e.type&&"this"!==e.value?D():w()}function N(){var e;return g(),un>=fn?{type:Ze.EOF,lineNumber:pn,lineStart:dn,start:un,end:un}:(e=cn.charCodeAt(un),s(e)?x():40===e||41===e||59===e?w():39===e||34===e?I():46===e?t(cn.charCodeAt(un+1))?C():w():t(e)?C():yn.tokenize&&47===e?O():w())}function P(){var e,n,t;return g(),e={start:{line:pn,column:un-dn}},n=N(),e.end={line:pn,column:un-dn},n.type!==Ze.EOF&&(t=cn.slice(n.start,n.end),yn.tokens.push({type:en[n.type],value:t,range:[n.start,n.end],loc:e})),n}function U(){var e;return e=hn,un=e.end,pn=e.lineNumber,dn=e.lineStart,hn="undefined"!=typeof yn.tokens?P():N(),un=e.end,pn=e.lineNumber,dn=e.lineStart,e}function F(){var e,n,t;e=un,n=pn,t=dn,hn="undefined"!=typeof yn.tokens?P():N(),un=e,pn=n,dn=t}function T(e,n){this.line=e,this.column=n}function M(e,n,t,r){this.start=new T(e,n),this.end=new T(t,r)}function _(){var e,n,t,r;return e=un,n=pn,t=dn,g(),r=pn!==n,un=e,pn=n,dn=t,r}function V(e,t){var r,a=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return n(t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function Y(){var e,n=un,t=pn,r=dn,a=hn;return 59===cn.charCodeAt(un)||K(";")?void U():(e=pn,g(),pn!==e?(un=n,pn=t,dn=r,void(hn=a)):void(hn.type===Ze.EOF||K("}")||G(hn)))}function J(e){return e.type===tn.Identifier||e.type===tn.MemberExpression}function X(){var e,n=[];for(e=hn,W("[");!K("]");)K(",")?(U(),n.push(null)):(n.push(ge()),K("]")||W(","));return U(),mn.markEnd(mn.createArrayExpression(n),e)}function Q(e,n){var t,r,a;return t=ln,a=hn,r=Ge(),n&&ln&&p(e[0].name)&&z(n,an.StrictParamName),ln=t,mn.markEnd(mn.createFunctionExpression(null,e,[],r),a)}function Z(){var e,n;return n=hn,e=U(),e.type===Ze.StringLiteral||e.type===Ze.NumericLiteral?(ln&&e.octal&&z(e,an.StrictOctalLiteral),mn.markEnd(mn.createLiteral(e),n)):mn.markEnd(mn.createIdentifier(e.value),n)}function ee(){var e,n,t,r,a,i;return e=hn,i=hn,e.type===Ze.Identifier?(t=Z(),"get"!==e.value||K(":")?"set"!==e.value||K(":")?(W(":"),r=ge(),mn.markEnd(mn.createProperty("init",t,r),i)):(n=Z(),W("("),e=hn,e.type!==Ze.Identifier?(W(")"),z(e,an.UnexpectedToken,e.value),r=Q([])):(a=[xe()],W(")"),r=Q(a,e)),mn.markEnd(mn.createProperty("set",n,r),i)):(n=Z(),W("("),W(")"),r=Q([]),mn.markEnd(mn.createProperty("get",n,r),i))):e.type!==Ze.EOF&&e.type!==Ze.Punctuator?(n=Z(),W(":"),r=ge(),mn.markEnd(mn.createProperty("init",n,r),i)):void G(e)}function ne(){var e,n,t,r,a,i=[],o={},s=String;for(a=hn,W("{");!K("}");)e=ee(),n=e.key.type===tn.Identifier?e.key.name:s(e.key.value),r="init"===e.kind?rn.Data:"get"===e.kind?rn.Get:rn.Set,t="$"+n,Object.prototype.hasOwnProperty.call(o,t)?(o[t]===rn.Data?ln&&r===rn.Data?z({},an.StrictDuplicateProperty):r!==rn.Data&&z({},an.AccessorDataProperty):r===rn.Data?z({},an.AccessorDataProperty):o[t]&r&&z({},an.AccessorGetSet),o[t]|=r):o[t]=r,i.push(e),K("}")||W(",");return W("}"),mn.markEnd(mn.createObjectExpression(i),a)}function te(){var e;return W("("),e=ye(),W(")"),e}function re(){var e,n,t,r;if(K("("))return te();if(K("["))return X();if(K("{"))return ne();if(e=hn.type,r=hn,e===Ze.Identifier)t=mn.createIdentifier(U().value);else if(e===Ze.StringLiteral||e===Ze.NumericLiteral)ln&&hn.octal&&z(hn,an.StrictOctalLiteral),t=mn.createLiteral(U());else if(e===Ze.Keyword){if($("function"))return Ke();$("this")?(U(),t=mn.createThisExpression()):G(U())}else e===Ze.BooleanLiteral?(n=U(),n.value="true"===n.value,t=mn.createLiteral(n)):e===Ze.NullLiteral?(n=U(),n.value=null,t=mn.createLiteral(n)):K("/")||K("/=")?(t="undefined"!=typeof yn.tokens?mn.createLiteral(D()):mn.createLiteral(B()),F()):G(U());return mn.markEnd(t,r)}function ae(){var e=[];if(W("("),!K(")"))for(;un":case"<=":case">=":case"instanceof":t=7;break;case"in":t=n?7:0;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function me(){var e,n,t,r,a,i,o,s,c,l;if(e=hn,c=de(),r=hn,a=fe(r,gn.allowIn),0===a)return c;for(r.prec=a,U(),n=[e,hn],o=de(),i=[c,r,o];(a=fe(hn,gn.allowIn))>0;){for(;i.length>2&&a<=i[i.length-2].prec;)o=i.pop(),s=i.pop().value,c=i.pop(),t=mn.createBinaryExpression(s,c,o),n.pop(),e=n[n.length-1],mn.markEnd(t,e),i.push(t);r=U(),r.prec=a,i.push(r),n.push(hn),t=de(),i.push(t)}for(l=i.length-1,t=i[l],n.pop();l>1;)t=mn.createBinaryExpression(i[l-1].value,i[l-2],t),l-=2,e=n.pop(),mn.markEnd(t,e);return t}function he(){var e,n,t,r,a;return a=hn,e=me(),K("?")&&(U(),n=gn.allowIn,gn.allowIn=!0,t=ge(),gn.allowIn=n,W(":"),r=ge(),e=mn.createConditionalExpression(e,t,r),mn.markEnd(e,a)),e}function ge(){var e,n,t,r,a;return e=hn,a=hn,r=n=he(),q()&&(J(n)||z({},an.InvalidLHSInAssignment),ln&&n.type===tn.Identifier&&p(n.name)&&z(e,an.StrictLHSAssignment),e=U(),t=ge(),r=mn.markEnd(mn.createAssignmentExpression(e.value,n,t),a)),r}function ye(){var e,n=hn;if(e=ge(),K(",")){for(e=mn.createSequenceExpression([e]);un0?1:0,dn=0,fn=cn.length,hn=null,gn={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},yn={},n=n||{},n.tokens=!0,yn.tokens=[],yn.tokenize=!0,yn.openParenToken=-1,yn.openCurlyToken=-1,yn.range="boolean"==typeof n.range&&n.range,yn.loc="boolean"==typeof n.loc&&n.loc,"boolean"==typeof n.comment&&n.comment&&(yn.comments=[]),"boolean"==typeof n.tolerant&&n.tolerant&&(yn.errors=[]);try{if(F(),hn.type===Ze.EOF)return yn.tokens;for(r=U();hn.type!==Ze.EOF;)try{r=U()}catch(e){if(r=hn,yn.errors){yn.errors.push(e);break}throw e}Je(),a=yn.tokens,"undefined"!=typeof yn.comments&&(a.comments=yn.comments),"undefined"!=typeof yn.errors&&(a.errors=yn.errors)}catch(e){throw e}finally{yn={}}return a}function Qe(e,n){var t,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),mn=sn,cn=e,un=0,pn=cn.length>0?1:0,dn=0,fn=cn.length,hn=null,gn={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},yn={},"undefined"!=typeof n&&(yn.range="boolean"==typeof n.range&&n.range,yn.loc="boolean"==typeof n.loc&&n.loc,yn.attachComment="boolean"==typeof n.attachComment&&n.attachComment,yn.loc&&null!==n.source&&void 0!==n.source&&(yn.source=r(n.source)),"boolean"==typeof n.tokens&&n.tokens&&(yn.tokens=[]),"boolean"==typeof n.comment&&n.comment&&(yn.comments=[]),"boolean"==typeof n.tolerant&&n.tolerant&&(yn.errors=[]),yn.attachComment&&(yn.range=!0,yn.comments=[],yn.bottomRightStack=[],yn.trailingComments=[],yn.leadingComments=[]));try{t=Ye(),"undefined"!=typeof yn.comments&&(t.comments=yn.comments),"undefined"!=typeof yn.tokens&&(Je(),t.tokens=yn.tokens),"undefined"!=typeof yn.errors&&(t.errors=yn.errors)}catch(e){throw e}finally{yn={}}return t}var Ze,en,nn,tn,rn,an,on,sn,cn,ln,un,pn,dn,fn,mn,hn,gn,yn;Ze={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},en={},en[Ze.BooleanLiteral]="Boolean",en[Ze.EOF]="",en[Ze.Identifier]="Identifier",en[Ze.Keyword]="Keyword",en[Ze.NullLiteral]="Null",en[Ze.NumericLiteral]="Numeric",en[Ze.Punctuator]="Punctuator",en[Ze.StringLiteral]="String",en[Ze.RegularExpression]="RegularExpression",nn=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],tn={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"},rn={Data:1,Get:2,Set:4},an={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"},on={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},sn={name:"SyntaxTree",processComment:function(e){var n,t;if(!(e.type===tn.Program&&e.body.length>0)){for(yn.trailingComments.length>0?yn.trailingComments[0].range[0]>=e.range[1]?(t=yn.trailingComments,yn.trailingComments=[]):yn.trailingComments.length=0:yn.bottomRightStack.length>0&&yn.bottomRightStack[yn.bottomRightStack.length-1].trailingComments&&yn.bottomRightStack[yn.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(t=yn.bottomRightStack[yn.bottomRightStack.length-1].trailingComments,delete yn.bottomRightStack[yn.bottomRightStack.length-1].trailingComments);yn.bottomRightStack.length>0&&yn.bottomRightStack[yn.bottomRightStack.length-1].range[0]>=e.range[0];)n=yn.bottomRightStack.pop();n?n.leadingComments&&n.leadingComments[n.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=n.leadingComments,delete n.leadingComments):yn.leadingComments.length>0&&yn.leadingComments[yn.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=yn.leadingComments,yn.leadingComments=[]),t&&(e.trailingComments=t),yn.bottomRightStack.push(e)}},markEnd:function(e,n){return yn.range&&(e.range=[n.start,un]),yn.loc&&(e.loc=new M(void 0===n.startLineNumber?n.lineNumber:n.startLineNumber,n.start-(void 0===n.startLineStart?n.lineStart:n.startLineStart),pn,un-dn),this.postProcess(e)),yn.attachComment&&this.processComment(e),e},postProcess:function(e){return yn.source&&(e.loc.source=yn.source),e},createArrayExpression:function(e){return{type:tn.ArrayExpression,elements:e}},createAssignmentExpression:function(e,n,t){return{type:tn.AssignmentExpression,operator:e,left:n,right:t}},createBinaryExpression:function(e,n,t){var r="||"===e||"&&"===e?tn.LogicalExpression:tn.BinaryExpression;return{type:r,operator:e,left:n,right:t}},createBlockStatement:function(e){return{type:tn.BlockStatement,body:e}},createBreakStatement:function(e){return{type:tn.BreakStatement,label:e}},createCallExpression:function(e,n){return{type:tn.CallExpression,callee:e,arguments:n}},createCatchClause:function(e,n){return{type:tn.CatchClause,param:e,body:n}},createConditionalExpression:function(e,n,t){return{type:tn.ConditionalExpression,test:e,consequent:n,alternate:t}},createContinueStatement:function(e){return{type:tn.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:tn.DebuggerStatement}},createDoWhileStatement:function(e,n){return{type:tn.DoWhileStatement,body:e,test:n}},createEmptyStatement:function(){return{type:tn.EmptyStatement}},createExpressionStatement:function(e){return{type:tn.ExpressionStatement,expression:e}},createForStatement:function(e,n,t,r){return{type:tn.ForStatement,init:e,test:n,update:t,body:r}},createForInStatement:function(e,n,t){return{type:tn.ForInStatement,left:e,right:n,body:t,each:!1}},createFunctionDeclaration:function(e,n,t,r){return{type:tn.FunctionDeclaration,id:e,params:n,defaults:t,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,n,t,r){return{type:tn.FunctionExpression,id:e,params:n,defaults:t,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:tn.Identifier,name:e}},createIfStatement:function(e,n,t){return{type:tn.IfStatement,test:e,consequent:n,alternate:t}},createLabeledStatement:function(e,n){return{type:tn.LabeledStatement,label:e,body:n}},createLiteral:function(e){return{type:tn.Literal,value:e.value,raw:cn.slice(e.start,e.end)}},createMemberExpression:function(e,n,t){return{type:tn.MemberExpression,computed:"["===e,object:n,property:t}},createNewExpression:function(e,n){return{type:tn.NewExpression,callee:e,arguments:n}},createObjectExpression:function(e){return{type:tn.ObjectExpression,properties:e}},createPostfixExpression:function(e,n){return{type:tn.UpdateExpression,operator:e,argument:n,prefix:!1}},createProgram:function(e){return{type:tn.Program,body:e}},createProperty:function(e,n,t){return{type:tn.Property,key:n,value:t,kind:e}},createReturnStatement:function(e){return{type:tn.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:tn.SequenceExpression,expressions:e}},createSwitchCase:function(e,n){return{type:tn.SwitchCase,test:e,consequent:n}},createSwitchStatement:function(e,n){return{type:tn.SwitchStatement,discriminant:e,cases:n}},createThisExpression:function(){return{type:tn.ThisExpression}},createThrowStatement:function(e){return{type:tn.ThrowStatement,argument:e}},createTryStatement:function(e,n,t,r){return{type:tn.TryStatement,block:e,guardedHandlers:n,handlers:t,finalizer:r}},createUnaryExpression:function(e,n){return"++"===e||"--"===e?{type:tn.UpdateExpression,operator:e,argument:n,prefix:!0}:{type:tn.UnaryExpression,operator:e,argument:n,prefix:!0}},createVariableDeclaration:function(e,n){return{type:tn.VariableDeclaration,declarations:e,kind:n}},createVariableDeclarator:function(e,n){return{type:tn.VariableDeclarator,id:e,init:n}},createWhileStatement:function(e,n){return{type:tn.WhileStatement,test:e,body:n}},createWithStatement:function(e,n){return{type:tn.WithStatement,object:e,body:n}}},e.version="1.2.5",e.tokenize=Xe,e.parse=Qe,e.Syntax=function(){var e,n={};"function"==typeof Object.create&&(n=Object.create(null));for(e in tn)tn.hasOwnProperty(e)&&(n[e]=tn[e]);return"function"==typeof Object.freeze&&Object.freeze(n),n}()})},function(e,n,t){var r=t(3),a=r.Symbol;e.exports=a},function(e,n){function t(e,n){for(var t=-1,r=n.length,a=e.length;++t0&&t(u)?n>1?r(u,n-1,t,o,s):a(s,u):o||(s[s.length]=u)}return s}var a=t(26),i=t(32);e.exports=r},function(e,n){function t(e,n,t,i){for(var o=-1,s=a(r((n-e)/(t||1)),0),c=Array(s);s--;)c[i?s:++o]=e,e+=t;return c}var r=Math.ceil,a=Math.max;e.exports=t},function(e,n){function t(e,n){for(var t,r=-1,a=e.length;++r-1&&e%1==0&&e=n||t<0||I&&r>=x}function f(){var e=i();return d(e)?m(e):void(k=setTimeout(f,p(e)))}function m(e){return k=void 0,A&&v?r(e):(v=b=void 0,w)}function h(){void 0!==k&&clearTimeout(k),E=0,v=S=b=k=void 0}function g(){return void 0===k?w:m(i())}function y(){var e=i(),t=d(e);if(v=arguments,b=this,S=e,t){if(void 0===k)return u(S);if(I)return k=setTimeout(f,n),r(S)}return void 0===k&&(k=setTimeout(f,n)),w}var v,b,x,w,k,S,E=0,C=!1,I=!1,A=!0;if("function"!=typeof e)throw new TypeError(s);return n=o(n)||0,a(t)&&(C=!!t.leading,I="maxWait"in t,x=I?c(o(t.maxWait)||0,n):x,A="trailing"in t?!!t.trailing:A),y.cancel=h,y.flush=g,y}var a=t(1),i=t(45),o=t(6),s="Expected a function",c=Math.max,l=Math.min;e.exports=r},function(e,n){function t(e,n){return e===n||e!==e&&n!==n}e.exports=t},function(e,n,t){function r(e){var n=e?e.length:0;return n?a(e,1):[]}var a=t(27);e.exports=r},function(e,n){function t(e){return e}e.exports=t},function(e,n,t){function r(e){return a(e)&&s.call(e,"callee")&&(!l.call(e,"callee")||c.call(e)==i)}var a=t(41),i="[object Arguments]",o=Object.prototype,s=o.hasOwnProperty,c=o.toString,l=o.propertyIsEnumerable;e.exports=r},function(e,n){var t=Array.isArray;e.exports=t},function(e,n,t){function r(e){return i(e)&&a(e)}var a=t(4),i=t(5);e.exports=r},function(e,n,t){function r(e){var n=a(e)?c.call(e):"";return n==i||n==o}var a=t(1),i="[object Function]",o="[object GeneratorFunction]",s=Object.prototype,c=s.toString;e.exports=r},function(e,n){function t(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=t},function(e,n,t){function r(e){return"symbol"==typeof e||a(e)&&s.call(e)==i}var a=t(5),i="[object Symbol]",o=Object.prototype,s=o.toString;e.exports=r},function(e,n,t){var r=t(3),a=function(){return r.Date.now()};e.exports=a},function(e,n,t){var r=t(30),a=r();e.exports=a},function(e,n,t){function r(e){return e&&e.length?a(e,i):0}var a=t(29),i=t(38);e.exports=r},function(e,n,t){function r(e){if(!e)return 0===e?e:0;if(e=a(e),e===i||e===-i){var n=e<0?-1:1;return n*o}return e===e?e:0}var a=t(6),i=1/0,o=1.7976931348623157e308;e.exports=r},function(e,n,t){"use strict";var r=t(23),a=t(22),i=a({args:["array","scalar","index"],body:function(e,n,t){var r,a=n;for(r=0;r=0&&y.splice(n,1)}function o(e){var n=document.createElement("style");return n.type="text/css",a(e,n),n}function s(e){var n=document.createElement("link");return n.rel="stylesheet",a(e,n),n}function c(e,n){var t,r,a;if(n.singleton){var c=v++;t=g||(g=o(n)),r=l.bind(null,t,c,!1),a=l.bind(null,t,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=s(n),r=d.bind(null,t),a=function(){i(t),t.href&&URL.revokeObjectURL(t.href)}):(t=o(n),r=u.bind(null,t),a=function(){i(t)});return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else a()}}function l(e,n,t,r){var a=t?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(n,a);else{var i=document.createTextNode(a),o=e.childNodes;o[n]&&e.removeChild(o[n]),o.length?e.insertBefore(i,o[n]):e.appendChild(i)}}function u(e,n){var t=n.css,r=n.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}function d(e,n){var t=n.css,r=n.sourceMap;r&&(t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([t],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(a),i&&URL.revokeObjectURL(i)}var p={},f=function(e){var n;return function(){return"undefined"==typeof n&&(n=e.apply(this,arguments)),n}},m=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=f(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,v=0,y=[];e.exports=function(e,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");n=n||{},"undefined"==typeof n.singleton&&(n.singleton=m()),"undefined"==typeof n.insertAt&&(n.insertAt="bottom");var a=r(e);return t(a,n),function(e){for(var i=[],o=0;o0&&(co&&(o=c),ls&&(s=l))}a-=20,o+=20,i-=20,s+=20;var d=o-a+1,p=s-i+1;if(dp){var h=Math.floor((d-p)/2),g=d-p-h;s+=g,i-=h}d=o-a+1,p=s-i+1;for(var v=new Uint8ClampedArray(d*p*4),y=a;y<=o;y++)for(var x=i;x<=s;x++)if(y>=0&&y=0&&x3&&void 0!==arguments[3]?arguments[3]:[0,0,0],a=n*t*4,i=new Uint8ClampedArray(a),o=0;o-1?c.currentView=t:c.currentView="home"}t(53);var a=t(12),i=t(11),o=t(13),s=t(14);Vue.component("menu",a.Menu),Vue.component("home",i.Home),Vue.component("mnist-cnn",o.MnistCnn),Vue.component("mnist-vae",s.MnistVae),Vue.use(VueMdl.default);var c=new Vue({el:"#app",data:{currentView:"home"}});window.addEventListener("load",r),window.addEventListener("hashchange",r)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Home=void 0,t(52);n.Home=Vue.extend({template:'\n
\n
Home
\n
\n '})},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Menu=void 0,t(54);n.Menu=Vue.extend({template:'\n \n '})},function(e,n,t){"use strict";function r(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}function a(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n\n
Basic Convnet for MNIST
\n
\n Loading...{{ loadingProgress }}%\n
\n
\n
\n
\n
Draw any digit (0-9) here
\n
\n \n \n \n
\n
\n clearCLEAR\n
\n
\n
\n
\n Use GPU\n
\n
\n
\n
\n
{{ i }}
\n
\n
\n
\n
\n
\n
\n
\n \n
\n {{ layerResult.layerClass }}\n {{ layerDisplayConfig[layerResult.name].heading }}\n
\n
\n \n \n
\n
\n \n \n ',data:function(){return{model:new KerasJS.Model(f),modelLoading:!0,input:new Float32Array(784),output:new Float32Array(10),outputClasses:(0,u.default)(10),layerResultImages:[],layerDisplayConfig:m,drawing:!1,strokes:[],useGpu:f.gpu}},computed:{loadingProgress:function(){return this.model.getLoadingProgress()},predictedClass:function(){var e=this;return 0===this.output.reduce(function(e,n){return e+n},0)?-1:this.output.reduce(function(n,t,r){return t>e.output[n]?r:n},0)}},created:function(){var e=this;this.model.initialize(),this.model.ready().then(function(){e.modelLoading=!1,e.getIntermediateResults()})},methods:{toggleGpu:function(){this.model.gpu=!this.useGpu},clear:function(e){this.clearIntermediateResults();var n=document.getElementById("input-canvas").getContext("2d");n.clearRect(0,0,n.canvas.width,n.canvas.height);var t=document.getElementById("input-canvas-centercrop").getContext("2d");t.clearRect(0,0,t.canvas.width,t.canvas.height);var r=document.getElementById("input-canvas-scaled").getContext("2d");r.clearRect(0,0,r.canvas.width,r.canvas.height),this.output=new Float32Array(10),this.drawing=!1,this.strokes=[]},activateDraw:function(e){this.drawing=!0,this.strokes.push([]);var n=this.strokes[this.strokes.length-1];n.push(p.getCoordinates(e))},draw:function(e){if(this.drawing){var n=document.getElementById("input-canvas").getContext("2d");n.lineWidth=20,n.lineJoin=n.lineCap="round",n.strokeStyle="#393E46",n.clearRect(0,0,n.canvas.width,n.canvas.height);var t=this.strokes[this.strokes.length-1];t.push(p.getCoordinates(e));for(var r=0,a=this.strokes.length;r\n
Convolutional Variational Autoencoder, trained on MNIST
\n
\n Loading...{{ loadingProgress }}%\n
\n
\n
\n
\n
Click around the latent space
\n
\n \n
\n -1.5\n x\n 1.5\n
\n
\n -1.5\n y\n 1.5\n
\n
\n
\n
\n
\n Use GPU\n
\n
x: {{ inputCoordinates[0] < 0 ? inputCoordinates[0].toFixed(2) : inputCoordinates[0].toFixed(3) }}
\n
y: {{ inputCoordinates[1] < 0 ? inputCoordinates[1].toFixed(2) : inputCoordinates[1].toFixed(3) }}
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n \n
\n {{ layerResult.layerClass }}\n {{ layerDisplayConfig[layerResult.name].heading }}\n
\n
\n \n \n
\n
\n \n \n ',data:function(){return{model:new KerasJS.Model(c),modelLoading:!0,output:new Float32Array(729),crosshairsActivated:!1,inputCoordinates:[-.6,-1.2],position:[60,20],layerResultImages:[],layerDisplayConfig:l,useGpu:c.gpu}},computed:{loadingProgress:function(){return this.model.getLoadingProgress()}},created:function(){var e=this;this.model.initialize(),this.model.ready().then(function(){e.modelLoading=!1,e.getIntermediateResults(),e.runModel()})},ready:function(){this.drawPosition()},methods:{toggleGpu:function(){this.model.gpu=!this.useGpu},activateCrosshairs:function(e){this.crosshairsActivated=!0},deactivateCrosshairs:function(e){this.crosshairsActivated=!1,this.draw(e)},draw:function(e){var n=this.getEventCanvasCoordinates(e),t=i(n,2),r=t[0],a=t[1],o=document.getElementById("input-canvas").getContext("2d");o.clearRect(0,0,200,200),this.drawPosition(),this.crosshairsActivated&&(o.strokeStyle="#1BBC9B",o.beginPath(),o.moveTo(r,0),o.lineTo(r,200),o.stroke(),o.beginPath(),o.moveTo(0,a),o.lineTo(200,a),o.stroke())},drawPosition:function(){var e=document.getElementById("input-canvas").getContext("2d");e.clearRect(0,0,200,200),e.fillStyle="#674172",e.beginPath(),e.arc.apply(e,a(this.position).concat([5,0,2*Math.PI,!0])),e.closePath(),e.fill()},getEventCanvasCoordinates:function(e){var n=e.clientX,t=e.clientY;e.touches&&e.touches.length&&(n=e.touches[0].clientX,t=e.touches[0].clientY);var r=document.getElementById("input-canvas"),a=r.getBoundingClientRect(),i=a.left,o=a.top,s=n-i,c=t-o;return[s,c]},selectCoordinates:function(e){var n=this.getEventCanvasCoordinates(e),t=i(n,2),r=t[0],a=t[1];this.model.isRunning||(this.position=[r,a],this.inputCoordinates=[3*r/200-1.5,3*a/200-1.5],this.draw(e),this.runModel())},runModel:function(){var e={input_4:new Float32Array(this.inputCoordinates)},n=this.model.predict(e);this.output=n.convolution2d_8,this.drawOutput(),this.getIntermediateResults()},drawOutput:function(){var e=document.getElementById("output-canvas").getContext("2d"),n=s.image2Darray(this.output,27,27,[27,188,155]);e.putImageData(n,0,0);var t=document.getElementById("output-canvas-scaled").getContext("2d");t.save(),t.scale(150/27,150/27),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.drawImage(document.getElementById("output-canvas"),0,0),t.restore()},getIntermediateResults:function(){var e=this,n=[],t=!0,r=!1,a=void 0;try{for(var o,c=this.model.modelLayersMap.entries()[Symbol.iterator]();!(t=(o=c.next()).done);t=!0){var l=i(o.value,2),u=l[0],d=l[1],p=d.layerClass||"";if("InputLayer"!==p){var f=[];d.result&&3===d.result.tensor.shape.length?f=s.unroll3Dtensor(d.result.tensor):d.result&&2===d.result.tensor.shape.length?f=[s.image2Dtensor(d.result.tensor)]:d.result&&1===d.result.tensor.shape.length&&(f=[s.image1Dtensor(d.result.tensor)]),n.push({name:u,layerClass:p,images:f})}}}catch(e){r=!0,a=e}finally{try{!t&&c.return&&c.return()}finally{if(r)throw a}}this.layerResultImages=n,setTimeout(function(){e.showIntermediateResults()},0)},showIntermediateResults:function(){var e=this;this.layerResultImages.forEach(function(n,t){var r=e.layerDisplayConfig[n.name].scalingFactor;n.images.forEach(function(e,n){var a=document.getElementById("intermediate-result-"+t+"-"+n).getContext("2d");a.putImageData(e,0,0);var i=document.getElementById("intermediate-result-"+t+"-"+n+"-scaled").getContext("2d");i.save(),i.scale(r,r),i.clearRect(0,0,i.canvas.width,i.canvas.height),i.drawImage(document.getElementById("intermediate-result-"+t+"-"+n),0,0),i.restore()})})},clearIntermediateResults:function(){var e=this;this.layerResultImages.forEach(function(n,t){var r=e.layerDisplayConfig[n.name].scalingFactor;n.images.forEach(function(e,n){var a=document.getElementById("intermediate-result-"+t+"-"+n+"-scaled").getContext("2d");a.save(),a.scale(r,r),a.clearRect(0,0,a.canvas.width,a.canvas.height),a.restore()})})}}})},function(e,n,t){n=e.exports=t(0)(),n.push([e.i,"\n",""])},function(e,n,t){n=e.exports=t(0)(),n.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Inconsolata);",""]),n.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Fira+Sans);",""]),n.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Nothing+You+Could+Do);",""]),n.push([e.i,"body {\n background: -webkit-linear-gradient(bottom, #CCCCCC, #F0F0F0);\n background: linear-gradient(0deg, #CCCCCC, #F0F0F0);\n color: #393E46;\n min-height: 100vh;\n font-family: 'Fira Sans',sans-serif;\n}\n\n.title {\n width: 100%;\n color: #1BBC9B;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.subtitle {\n color: #393E46;\n}\n\n.demo {\n padding: 50px 30px;\n}\n\n.demo .loading-progress {\n position: absolute;\n top: 0;\n right: 0;\n padding: 30px;\n color: #1BBC9B;\n font-size: 18px;\n font-family: 'Inconsolata',sans-serif;\n padding: 20px 50px;\n margin: 30px;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 10px;\n}\n\n/* MDL overrides */\n\n.demo .mdl-switch__label {\n font-size: 14px !important;\n color: #69707a;\n}\n\n/****************************************************************/\n\n.demo .mdl-switch.is-checked .mdl-switch__thumb {\n background: rgba(27, 188, 155, 0.6);\n}\n\n.demo .mdl-switch.is-checked .mdl-switch__track {\n background: rgba(27, 188, 155, 0.3);\n}\n",""])},function(e,n,t){n=e.exports=t(0)(),n.push([e.i,".menu {\n padding: 50px;\n margin: 20px;\n background: white;\n border-radius: 10px;\n box-shadow: 6px 6px #CCCCCC;\n}\n.menu h1 {\n color: #CCCCCC;\n font-family: 'Fira Sans',sans-serif;\n font-size: 1.5rem;\n}\n.menu .menu-list li {\n color: #69707a;\n}\n.menu .menu-list a {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center\n}\n.menu .menu-list a:hover {\n color: #1BBC9B;\n background-color: whitesmoke;\n}\n.menu .menu-list a:hover .github-logo {\n fill: #1BBC9B;\n}\n.menu .menu-list .github-logo {\n fill: #69707a;\n margin: 3px 8px 3px 0;\n}\n.menu .menu-list.contact li {\n padding: 5px 10px;\n}\n.menu .menu-list.contact a {\n color: #AAAAAA;\n padding: 0;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n background-color: none;\n -webkit-transition: color 0.2s ease-in;\n transition: color 0.2s ease-in\n}\n.menu .menu-list.contact ahover {\n color: #1BBC9B;\n background: none;\n}\n",""])},function(e,n,t){n=e.exports=t(0)(),n.push([e.i,".demo.mnist-cnn .column {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.demo.mnist-cnn .column.input-column {\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.demo.mnist-cnn .column.input-column .input-container {\n text-align: right;\n margin: 20px;\n position: relative;\n}\n.demo.mnist-cnn .column.input-column .input-container .input-label {\n font-family: 'Nothing You Could Do',cursive;\n font-size: 18px;\n color: #69707a;\n text-align: right;\n}\n.demo.mnist-cnn .column.input-column .input-container .input-label span.arrow {\n font-size: 36px;\n color: #CCCCCC;\n position: absolute;\n right: -32px;\n top: 8px;\n}\n.demo.mnist-cnn .column.input-column .input-container .canvas-container {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n margin: 10px 0;\n border: 15px solid rgba(27, 188, 155, 0.3);\n -webkit-transition: border-color 0.2s ease-in;\n transition: border-color 0.2s ease-in;\n}\n.demo.mnist-cnn .column.input-column .input-container .canvas-container canvas {\n background: white\n}\n.demo.mnist-cnn .column.input-column .input-container .canvas-container canvas:hover {\n cursor: crosshair;\n}\n.demo.mnist-cnn .column.input-column .input-container .canvas-container:hover {\n border-color: rgba(27, 188, 155, 0.6);\n}\n.demo.mnist-cnn .column.input-column .input-container .input-clear {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n color: #69707a;\n -webkit-transition: color 0.2s ease-in;\n transition: color 0.2s ease-in\n}\n.demo.mnist-cnn .column.input-column .input-container .input-clear:hover {\n color: rgba(27, 188, 155, 0.3);\n cursor: pointer;\n}\n.demo.mnist-cnn .column.controls-column {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n padding-top: 80px;\n}\n.demo.mnist-cnn .column.output-column {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.demo.mnist-cnn .column.output-column .output {\n height: 160px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.demo.mnist-cnn .column.output-column .output .output-class {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n padding: 0 6px;\n border-bottom: 2px solid rgba(27, 188, 155, 0.3);\n}\n.demo.mnist-cnn .column.output-column .output .output-class .output-label {\n font-family: 'Inconsolata', sans-serif;\n font-size: 1.5rem;\n color: #69707a;\n}\n.demo.mnist-cnn .column.output-column .output .output-class .output-bar {\n width: 8px;\n background: #EEEEEE;\n -webkit-transition: height 0.2s ease-out;\n transition: height 0.2s ease-out;\n}\n.demo.mnist-cnn .column.output-column .output .output-class.predicted {\n border-bottom-color: #1BBC9B;\n}\n.demo.mnist-cnn .column.output-column .output .output-class.predicted .output-label {\n color: #1BBC9B;\n}\n.demo.mnist-cnn .layer-results-container {\n position: relative;\n}\n.demo.mnist-cnn .layer-results-container .bg-line {\n position: absolute;\n z-index: 0;\n top: 0;\n left: 50%;\n background: white;\n width: 15px;\n height: 100%;\n}\n.demo.mnist-cnn .layer-results-container .layer-result {\n position: relative;\n z-index: 1;\n margin: 30px 20px;\n background: white;\n border-radius: 10px;\n padding: 20px;\n overflow-x: auto;\n}\n.demo.mnist-cnn .layer-results-container .layer-result .layer-result-heading {\n font-size: 1rem;\n color: #999999;\n margin-bottom: 10px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n font-size: 12px;\n}\n.demo.mnist-cnn .layer-results-container .layer-result .layer-result-heading span.layer-class {\n color: #1BBC9B;\n font-size: 14px;\n font-weight: bold;\n}\n.demo.mnist-cnn .layer-results-container .layer-result .layer-result-canvas-container {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n background: white;\n}\n.demo.mnist-cnn .layer-results-container .layer-result .layer-result-canvas-container canvas {\n border: 1px solid lightgray;\n margin: 1px;\n}\n",""]); +},function(e,n,t){n=e.exports=t(0)(),n.push([e.i,".demo.mnist-vae .column {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.demo.mnist-vae .column.input-column {\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.demo.mnist-vae .column.input-column .input-container {\n text-align: right;\n margin: 20px;\n position: relative;\n}\n.demo.mnist-vae .column.input-column .input-container .input-label {\n font-family: 'Nothing You Could Do',cursive;\n font-size: 18px;\n color: #69707a;\n text-align: right;\n}\n.demo.mnist-vae .column.input-column .input-container .input-label span.arrow {\n font-size: 36px;\n color: #CCCCCC;\n position: absolute;\n right: -32px;\n top: 8px;\n}\n.demo.mnist-vae .column.input-column .input-container .canvas-container {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n margin: 10px 0;\n border: 15px solid rgba(27, 188, 155, 0.3);\n -webkit-transition: border-color 0.2s ease-in;\n transition: border-color 0.2s ease-in;\n}\n.demo.mnist-vae .column.input-column .input-container .canvas-container canvas {\n background: white\n}\n.demo.mnist-vae .column.input-column .input-container .canvas-container canvas:hover {\n cursor: crosshair;\n}\n.demo.mnist-vae .column.input-column .input-container .canvas-container .axis {\n position: absolute;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n font-family: 'Inconsolata',sans-serif;\n font-size: 14px;\n color: #1BBC9B;\n}\n.demo.mnist-vae .column.input-column .input-container .canvas-container .axis.x-axis {\n right: 0;\n bottom: -45px;\n width: 200px;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.demo.mnist-vae .column.input-column .input-container .canvas-container .axis.y-axis {\n top: 0;\n left: -55px;\n height: 200px;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.demo.mnist-vae .column.input-column .input-container .canvas-container:hover {\n border-color: rgba(27, 188, 155, 0.6);\n}\n.demo.mnist-vae .column.controls-column {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n padding-top: 80px;\n}\n.demo.mnist-vae .column.controls-column .coordinates {\n margin-left: 5px;\n margin-top: 45px;\n font-family: 'Inconsolata',sans-serif;\n font-size: 20px;\n color: #69707a;\n}\n.demo.mnist-vae .column.output-column {\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n.demo.mnist-vae .column.output-column .output {\n border-radius: 10px;\n overflow: hidden;\n}\n.demo.mnist-vae .column.output-column .output canvas {\n background: white;\n}\n.demo.mnist-vae .layer-results-container {\n position: relative;\n}\n.demo.mnist-vae .layer-results-container .bg-line {\n position: absolute;\n z-index: 0;\n top: 0;\n left: 50%;\n background: white;\n width: 15px;\n height: 100%;\n}\n.demo.mnist-vae .layer-results-container .layer-result {\n position: relative;\n z-index: 1;\n margin: 30px 20px;\n background: white;\n border-radius: 10px;\n padding: 20px;\n overflow-x: auto;\n}\n.demo.mnist-vae .layer-results-container .layer-result .layer-result-heading {\n font-size: 1rem;\n color: #999999;\n margin-bottom: 10px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n font-size: 12px;\n}\n.demo.mnist-vae .layer-results-container .layer-result .layer-result-heading span.layer-class {\n color: #1BBC9B;\n font-size: 14px;\n font-weight: bold;\n}\n.demo.mnist-vae .layer-results-container .layer-result .layer-result-canvas-container {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n background: white;\n}\n.demo.mnist-vae .layer-results-container .layer-result .layer-result-canvas-container canvas {\n border: 1px solid lightgray;\n margin: 1px;\n}\n",""])},function(e,n,t){"use strict";function r(){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 a(e){var n=new r;n.pre=e.pre,n.body=e.body,n.post=e.post;var t=e.args.slice(0);n.argTypes=t;for(var a=0;a0)throw new Error("cwise: pre() block may not reference array args");if(a0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)n.scalarArgs.push(a),n.shimArgs.push("scalar"+a);else if("index"===o){if(n.indexArgs.push(a),a0)throw new Error("cwise: pre() block may not reference array index");if(a0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(n.shapeArgs.push(a),at.length)throw new Error("cwise: Too many arguments in pre() block");if(n.body.args.length>t.length)throw new Error("cwise: Too many arguments in body() block");if(n.post.args.length>t.length)throw new Error("cwise: Too many arguments in post() block");return n.debug=!!e.printCode||!!e.debug,n.funcName=e.funcName||"cwise",n.blockSize=e.blockSize||64,i(n)}var i=t(22);e.exports=a},function(e,n,t){"use strict";function r(e,n,t){var r,a,i=e.length,o=n.arrayArgs.length,s=n.indexArgs.length>0,c=[],l=[],u=0,d=0;for(r=0;r=0;--r)u=e[r],c.push(["for(i",r,"=0;i",r,"0&&c.push(["index[",d,"]-=s",d].join("")),c.push(["++index[",u,"]"].join(""))),c.push("}")}return c.join("\n")}function a(e,n,t,a){for(var i=n.length,o=t.arrayArgs.length,s=t.blockSize,c=t.indexArgs.length>0,l=[],u=0;u0;){"].join("")),l.push(["if(j",u,"<",s,"){"].join("")),l.push(["s",n[u],"=j",u].join("")),l.push(["j",u,"=0"].join("")),l.push(["}else{s",n[u],"=",s].join("")),l.push(["j",u,"-=",s,"}"].join("")),c&&l.push(["index[",n[u],"]=j",u].join(""));for(var u=0;u0&&(t=t&&n[r]===n[r-1])}return t?n[0]:n.join("")}function c(e,n){for(var t=n[1].length-Math.abs(e.arrayBlockIndices[0])|0,c=new Array(e.arrayArgs.length),u=new Array(e.arrayArgs.length),d=0;d0&&w.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var k=new Array(t),d=0;d3&&b.push(o(e.pre,e,u));var I=o(e.body,e,u),A=i(g);A3&&b.push(o(e.post,e,u)),e.debug&&console.log("-----Generated cwise routine for ",n,":\n"+b.join("\n")+"\n----------");var j=[e.funcName||"unnamed","_cwise_loop_",c[0].join("s"),"m",A,s(u)].join(""),L=new Function(["function ",j,"(",x.join(","),"){",b.join("\n"),"} return ",j].join(""));return L()}var l=t(8);e.exports=c},function(e,n,t){"use strict";function r(e){var n=["'use strict'","var CACHED={}"],t=[],r=e.funcName+"_cwise_thunk";n.push(["return function ",r,"(",e.shimArgs.join(","),"){"].join(""));for(var i=[],o=[],s=[["array",e.arrayArgs[0],".shape.slice(",Math.max(0,e.arrayBlockIndices[0]),e.arrayBlockIndices[0]<0?","+e.arrayBlockIndices[0]+")":")"].join("")],c=[],l=[],u=0;u0&&(c.push("array"+e.arrayArgs[0]+".shape.length===array"+d+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[u]))),l.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+d+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[u])+"]"))}e.arrayArgs.length>1&&(n.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),n.push("for(var shapeIndex=array"+e.arrayArgs[0]+".shape.length-"+Math.abs(e.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),n.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),n.push("}"));for(var u=0;u=0){var l=y[c],u=f(r);u&C&&(l.lvalue=!0),u&E&&(l.rvalue=!0),++l.count,s(r,l.name)}else i(o)||s(r,n(o))}else if("Literal"===r.type)"string"==typeof r.value&&s(r,d(r.value));else{if("WithStatement"===r.type)throw new Error("cwise-parser: with() statements not allowed");for(var p=Object.keys(r),m=0,h=p.length;m0)return r(0|e,n);break;case"object":if("number"==typeof e.length)return t(e,n,0)}return[]}e.exports=a},function(e,n,t){var r,a,i;!function(t,o){"use strict";a=[n],r=o,i="function"==typeof r?r.apply(n,a):r,!(void 0!==i&&(e.exports=i))}(this,function(e){"use strict";function n(e,n){if(!e)throw new Error("ASSERT: "+n)}function t(e){return e>=48&&e<=57}function r(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function a(e){return"01234567".indexOf(e)>=0}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function s(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&on.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function c(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&on.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function l(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function u(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function p(e){if(ln&&u(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function f(e,t,r,a,i){var o;n("number"==typeof r,"Comment must have valid position"),gn.lastCommentStart>=r||(gn.lastCommentStart=r,o={type:e,value:t},vn.range&&(o.range=[r,a]),vn.loc&&(o.loc=i),vn.comments.push(o),vn.attachComment&&(vn.leadingComments.push(o),vn.trailingComments.push(o)))}function m(e){var n,t,r,a;for(n=un-e,t={start:{line:dn,column:un-pn-e}};un=fn&&z({},an.UnexpectedToken,"ILLEGAL");else if(42===t){if(47===cn.charCodeAt(un+1))return++un,++un,void(vn.comments&&(r=cn.slice(e+2,un-2),n.end={line:dn,column:un-pn},f("Block",r,e,un,n)));++un}else++un;z({},an.UnexpectedToken,"ILLEGAL")}function g(){var e,n;for(n=0===un;un>>="===r?(un+=4,{type:Ze.Punctuator,value:r,lineNumber:dn,lineStart:pn,start:a,end:un}):(t=r.substr(0,3),">>>"===t||"<<="===t||">>="===t?(un+=3,{type:Ze.Punctuator,value:t,lineNumber:dn,lineStart:pn,start:a,end:un}):(n=t.substr(0,2),o===n[1]&&"+-<>&|".indexOf(o)>=0||"=>"===n?(un+=2,{type:Ze.Punctuator,value:n,lineNumber:dn,lineStart:pn,start:a,end:un}):"<>=!+-*%&|^/".indexOf(o)>=0?(++un,{type:Ze.Punctuator,value:o,lineNumber:dn,lineStart:pn,start:a,end:un}):void z({},an.UnexpectedToken,"ILLEGAL")))}function k(e){for(var n="";un=0&&un0&&(r=vn.tokens[vn.tokens.length-1],r.range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||vn.tokens.pop())),vn.tokens.push({type:"RegularExpression",value:t.literal,range:[e,un],loc:n})),t}function F(e){return e.type===Ze.Identifier||e.type===Ze.Keyword||e.type===Ze.BooleanLiteral||e.type===Ze.NullLiteral}function P(){var e,n;if(e=vn.tokens[vn.tokens.length-1],!e)return B();if("Punctuator"===e.type){if("]"===e.value)return w();if(")"===e.value)return n=vn.tokens[vn.openParenToken-1],!n||"Keyword"!==n.type||"if"!==n.value&&"while"!==n.value&&"for"!==n.value&&"with"!==n.value?w():B();if("}"===e.value){if(vn.tokens[vn.openCurlyToken-3]&&"Keyword"===vn.tokens[vn.openCurlyToken-3].type){if(n=vn.tokens[vn.openCurlyToken-4],!n)return w()}else{if(!vn.tokens[vn.openCurlyToken-4]||"Keyword"!==vn.tokens[vn.openCurlyToken-4].type)return w();if(n=vn.tokens[vn.openCurlyToken-5],!n)return B()}return nn.indexOf(n.value)>=0?w():B()}return B()}return"Keyword"===e.type&&"this"!==e.value?B():w()}function D(){var e;return g(),un>=fn?{type:Ze.EOF,lineNumber:dn,lineStart:pn,start:un,end:un}:(e=cn.charCodeAt(un),s(e)?b():40===e||41===e||59===e?w():39===e||34===e?I():46===e?t(cn.charCodeAt(un+1))?E():w():t(e)?E():vn.tokenize&&47===e?P():w())}function O(){var e,n,t;return g(),e={start:{line:dn,column:un-pn}},n=D(),e.end={line:dn,column:un-pn},n.type!==Ze.EOF&&(t=cn.slice(n.start,n.end),vn.tokens.push({type:en[n.type],value:t,range:[n.start,n.end],loc:e})),n}function _(){var e;return e=hn,un=e.end,dn=e.lineNumber,pn=e.lineStart,hn="undefined"!=typeof vn.tokens?O():D(),un=e.end,dn=e.lineNumber,pn=e.lineStart,e}function N(){var e,n,t;e=un,n=dn,t=pn,hn="undefined"!=typeof vn.tokens?O():D(),un=e,dn=n,pn=t}function U(e,n){this.line=e,this.column=n}function T(e,n,t,r){this.start=new U(e,n),this.end=new U(t,r)}function M(){var e,n,t,r;return e=un,n=dn,t=pn,g(),r=dn!==n,un=e,dn=n,pn=t,r}function z(e,t){var r,a=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return n(t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function Y(){var e,n=un,t=dn,r=pn,a=hn;return 59===cn.charCodeAt(un)||H(";")?void _():(e=dn,g(),dn!==e?(un=n,dn=t,pn=r,void(hn=a)):void(hn.type===Ze.EOF||H("}")||G(hn)))}function X(e){return e.type===tn.Identifier||e.type===tn.MemberExpression}function J(){var e,n=[];for(e=hn,W("[");!H("]");)H(",")?(_(),n.push(null)):(n.push(ge()),H("]")||W(","));return _(),mn.markEnd(mn.createArrayExpression(n),e)}function Q(e,n){var t,r,a;return t=ln,a=hn,r=Ge(),n&&ln&&d(e[0].name)&&V(n,an.StrictParamName),ln=t,mn.markEnd(mn.createFunctionExpression(null,e,[],r),a)}function Z(){var e,n;return n=hn,e=_(),e.type===Ze.StringLiteral||e.type===Ze.NumericLiteral?(ln&&e.octal&&V(e,an.StrictOctalLiteral),mn.markEnd(mn.createLiteral(e),n)):mn.markEnd(mn.createIdentifier(e.value),n)}function ee(){var e,n,t,r,a,i;return e=hn,i=hn,e.type===Ze.Identifier?(t=Z(),"get"!==e.value||H(":")?"set"!==e.value||H(":")?(W(":"),r=ge(),mn.markEnd(mn.createProperty("init",t,r),i)):(n=Z(),W("("),e=hn,e.type!==Ze.Identifier?(W(")"),V(e,an.UnexpectedToken,e.value),r=Q([])):(a=[be()],W(")"),r=Q(a,e)),mn.markEnd(mn.createProperty("set",n,r),i)):(n=Z(),W("("),W(")"),r=Q([]),mn.markEnd(mn.createProperty("get",n,r),i))):e.type!==Ze.EOF&&e.type!==Ze.Punctuator?(n=Z(),W(":"),r=ge(),mn.markEnd(mn.createProperty("init",n,r),i)):void G(e)}function ne(){var e,n,t,r,a,i=[],o={},s=String;for(a=hn,W("{");!H("}");)e=ee(),n=e.key.type===tn.Identifier?e.key.name:s(e.key.value),r="init"===e.kind?rn.Data:"get"===e.kind?rn.Get:rn.Set,t="$"+n,Object.prototype.hasOwnProperty.call(o,t)?(o[t]===rn.Data?ln&&r===rn.Data?V({},an.StrictDuplicateProperty):r!==rn.Data&&V({},an.AccessorDataProperty):r===rn.Data?V({},an.AccessorDataProperty):o[t]&r&&V({},an.AccessorGetSet),o[t]|=r):o[t]=r,i.push(e),H("}")||W(",");return W("}"),mn.markEnd(mn.createObjectExpression(i),a)}function te(){var e;return W("("),e=ve(),W(")"), +e}function re(){var e,n,t,r;if(H("("))return te();if(H("["))return J();if(H("{"))return ne();if(e=hn.type,r=hn,e===Ze.Identifier)t=mn.createIdentifier(_().value);else if(e===Ze.StringLiteral||e===Ze.NumericLiteral)ln&&hn.octal&&V(hn,an.StrictOctalLiteral),t=mn.createLiteral(_());else if(e===Ze.Keyword){if(K("function"))return He();K("this")?(_(),t=mn.createThisExpression()):G(_())}else e===Ze.BooleanLiteral?(n=_(),n.value="true"===n.value,t=mn.createLiteral(n)):e===Ze.NullLiteral?(n=_(),n.value=null,t=mn.createLiteral(n)):H("/")||H("/=")?(t="undefined"!=typeof vn.tokens?mn.createLiteral(B()):mn.createLiteral(R()),N()):G(_());return mn.markEnd(t,r)}function ae(){var e=[];if(W("("),!H(")"))for(;un":case"<=":case">=":case"instanceof":t=7;break;case"in":t=n?7:0;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function me(){var e,n,t,r,a,i,o,s,c,l;if(e=hn,c=pe(),r=hn,a=fe(r,gn.allowIn),0===a)return c;for(r.prec=a,_(),n=[e,hn],o=pe(),i=[c,r,o];(a=fe(hn,gn.allowIn))>0;){for(;i.length>2&&a<=i[i.length-2].prec;)o=i.pop(),s=i.pop().value,c=i.pop(),t=mn.createBinaryExpression(s,c,o),n.pop(),e=n[n.length-1],mn.markEnd(t,e),i.push(t);r=_(),r.prec=a,i.push(r),n.push(hn),t=pe(),i.push(t)}for(l=i.length-1,t=i[l],n.pop();l>1;)t=mn.createBinaryExpression(i[l-1].value,i[l-2],t),l-=2,e=n.pop(),mn.markEnd(t,e);return t}function he(){var e,n,t,r,a;return a=hn,e=me(),H("?")&&(_(),n=gn.allowIn,gn.allowIn=!0,t=ge(),gn.allowIn=n,W(":"),r=ge(),e=mn.createConditionalExpression(e,t,r),mn.markEnd(e,a)),e}function ge(){var e,n,t,r,a;return e=hn,a=hn,r=n=he(),q()&&(X(n)||V({},an.InvalidLHSInAssignment),ln&&n.type===tn.Identifier&&d(n.name)&&V(e,an.StrictLHSAssignment),e=_(),t=ge(),r=mn.markEnd(mn.createAssignmentExpression(e.value,n,t),a)),r}function ve(){var e,n=hn;if(e=ge(),H(",")){for(e=mn.createSequenceExpression([e]);un0?1:0,pn=0,fn=cn.length,hn=null,gn={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},vn={},n=n||{},n.tokens=!0,vn.tokens=[],vn.tokenize=!0,vn.openParenToken=-1,vn.openCurlyToken=-1,vn.range="boolean"==typeof n.range&&n.range,vn.loc="boolean"==typeof n.loc&&n.loc,"boolean"==typeof n.comment&&n.comment&&(vn.comments=[]),"boolean"==typeof n.tolerant&&n.tolerant&&(vn.errors=[]);try{if(N(),hn.type===Ze.EOF)return vn.tokens;for(r=_();hn.type!==Ze.EOF;)try{r=_()}catch(e){if(r=hn,vn.errors){vn.errors.push(e);break}throw e}Xe(),a=vn.tokens,"undefined"!=typeof vn.comments&&(a.comments=vn.comments),"undefined"!=typeof vn.errors&&(a.errors=vn.errors)}catch(e){throw e}finally{vn={}}return a}function Qe(e,n){var t,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),mn=sn,cn=e,un=0,dn=cn.length>0?1:0,pn=0,fn=cn.length,hn=null,gn={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},vn={},"undefined"!=typeof n&&(vn.range="boolean"==typeof n.range&&n.range,vn.loc="boolean"==typeof n.loc&&n.loc,vn.attachComment="boolean"==typeof n.attachComment&&n.attachComment,vn.loc&&null!==n.source&&void 0!==n.source&&(vn.source=r(n.source)),"boolean"==typeof n.tokens&&n.tokens&&(vn.tokens=[]),"boolean"==typeof n.comment&&n.comment&&(vn.comments=[]),"boolean"==typeof n.tolerant&&n.tolerant&&(vn.errors=[]),vn.attachComment&&(vn.range=!0,vn.comments=[],vn.bottomRightStack=[],vn.trailingComments=[],vn.leadingComments=[]));try{t=Ye(),"undefined"!=typeof vn.comments&&(t.comments=vn.comments),"undefined"!=typeof vn.tokens&&(Xe(),t.tokens=vn.tokens),"undefined"!=typeof vn.errors&&(t.errors=vn.errors)}catch(e){throw e}finally{vn={}}return t}var Ze,en,nn,tn,rn,an,on,sn,cn,ln,un,dn,pn,fn,mn,hn,gn,vn;Ze={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},en={},en[Ze.BooleanLiteral]="Boolean",en[Ze.EOF]="",en[Ze.Identifier]="Identifier",en[Ze.Keyword]="Keyword",en[Ze.NullLiteral]="Null",en[Ze.NumericLiteral]="Numeric",en[Ze.Punctuator]="Punctuator",en[Ze.StringLiteral]="String",en[Ze.RegularExpression]="RegularExpression",nn=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],tn={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"},rn={Data:1,Get:2,Set:4},an={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"},on={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},sn={name:"SyntaxTree",processComment:function(e){var n,t;if(!(e.type===tn.Program&&e.body.length>0)){for(vn.trailingComments.length>0?vn.trailingComments[0].range[0]>=e.range[1]?(t=vn.trailingComments,vn.trailingComments=[]):vn.trailingComments.length=0:vn.bottomRightStack.length>0&&vn.bottomRightStack[vn.bottomRightStack.length-1].trailingComments&&vn.bottomRightStack[vn.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(t=vn.bottomRightStack[vn.bottomRightStack.length-1].trailingComments,delete vn.bottomRightStack[vn.bottomRightStack.length-1].trailingComments);vn.bottomRightStack.length>0&&vn.bottomRightStack[vn.bottomRightStack.length-1].range[0]>=e.range[0];)n=vn.bottomRightStack.pop();n?n.leadingComments&&n.leadingComments[n.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=n.leadingComments,delete n.leadingComments):vn.leadingComments.length>0&&vn.leadingComments[vn.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=vn.leadingComments,vn.leadingComments=[]),t&&(e.trailingComments=t),vn.bottomRightStack.push(e)}},markEnd:function(e,n){return vn.range&&(e.range=[n.start,un]),vn.loc&&(e.loc=new T(void 0===n.startLineNumber?n.lineNumber:n.startLineNumber,n.start-(void 0===n.startLineStart?n.lineStart:n.startLineStart),dn,un-pn),this.postProcess(e)),vn.attachComment&&this.processComment(e),e},postProcess:function(e){return vn.source&&(e.loc.source=vn.source),e},createArrayExpression:function(e){return{type:tn.ArrayExpression,elements:e}},createAssignmentExpression:function(e,n,t){return{type:tn.AssignmentExpression,operator:e,left:n,right:t}},createBinaryExpression:function(e,n,t){var r="||"===e||"&&"===e?tn.LogicalExpression:tn.BinaryExpression;return{type:r,operator:e,left:n,right:t}},createBlockStatement:function(e){return{type:tn.BlockStatement,body:e}},createBreakStatement:function(e){return{type:tn.BreakStatement,label:e}},createCallExpression:function(e,n){return{type:tn.CallExpression,callee:e,arguments:n}},createCatchClause:function(e,n){return{type:tn.CatchClause,param:e,body:n}},createConditionalExpression:function(e,n,t){return{type:tn.ConditionalExpression,test:e,consequent:n,alternate:t}},createContinueStatement:function(e){return{type:tn.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:tn.DebuggerStatement}},createDoWhileStatement:function(e,n){return{type:tn.DoWhileStatement,body:e,test:n}},createEmptyStatement:function(){return{type:tn.EmptyStatement}},createExpressionStatement:function(e){return{type:tn.ExpressionStatement,expression:e}},createForStatement:function(e,n,t,r){return{type:tn.ForStatement,init:e,test:n,update:t,body:r}},createForInStatement:function(e,n,t){return{type:tn.ForInStatement,left:e,right:n,body:t,each:!1}},createFunctionDeclaration:function(e,n,t,r){return{type:tn.FunctionDeclaration,id:e,params:n,defaults:t,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,n,t,r){return{type:tn.FunctionExpression,id:e,params:n,defaults:t,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:tn.Identifier,name:e}},createIfStatement:function(e,n,t){return{type:tn.IfStatement,test:e,consequent:n,alternate:t}},createLabeledStatement:function(e,n){return{type:tn.LabeledStatement,label:e,body:n}},createLiteral:function(e){return{type:tn.Literal,value:e.value,raw:cn.slice(e.start,e.end)}},createMemberExpression:function(e,n,t){return{type:tn.MemberExpression,computed:"["===e,object:n,property:t}},createNewExpression:function(e,n){return{type:tn.NewExpression,callee:e,arguments:n}},createObjectExpression:function(e){return{type:tn.ObjectExpression,properties:e}},createPostfixExpression:function(e,n){return{type:tn.UpdateExpression,operator:e,argument:n,prefix:!1}},createProgram:function(e){return{type:tn.Program,body:e}},createProperty:function(e,n,t){return{type:tn.Property,key:n,value:t,kind:e}},createReturnStatement:function(e){return{type:tn.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:tn.SequenceExpression,expressions:e}},createSwitchCase:function(e,n){return{type:tn.SwitchCase,test:e,consequent:n}},createSwitchStatement:function(e,n){return{type:tn.SwitchStatement,discriminant:e,cases:n}},createThisExpression:function(){return{type:tn.ThisExpression}},createThrowStatement:function(e){return{type:tn.ThrowStatement,argument:e}},createTryStatement:function(e,n,t,r){return{type:tn.TryStatement,block:e,guardedHandlers:n,handlers:t,finalizer:r}},createUnaryExpression:function(e,n){return"++"===e||"--"===e?{type:tn.UpdateExpression,operator:e,argument:n,prefix:!0}:{type:tn.UnaryExpression,operator:e,argument:n,prefix:!0}},createVariableDeclaration:function(e,n){return{type:tn.VariableDeclaration,declarations:e,kind:n}},createVariableDeclarator:function(e,n){return{type:tn.VariableDeclarator,id:e,init:n}},createWhileStatement:function(e,n){return{type:tn.WhileStatement,test:e,body:n}},createWithStatement:function(e,n){return{type:tn.WithStatement,object:e,body:n}}},e.version="1.2.5",e.tokenize=Je,e.parse=Qe,e.Syntax=function(){var e,n={};"function"==typeof Object.create&&(n=Object.create(null));for(e in tn)tn.hasOwnProperty(e)&&(n[e]=tn[e]);return"function"==typeof Object.freeze&&Object.freeze(n),n}()})},function(e,n,t){var r=t(4),a=r.Symbol;e.exports=a},function(e,n){function t(e,n){for(var t=-1,r=n.length,a=e.length;++t0&&t(u)?n>1?r(u,n-1,t,o,s):a(s,u):o||(s[s.length]=u)}return s}var a=t(28),i=t(34);e.exports=r},function(e,n){function t(e,n,t,i){for(var o=-1,s=a(r((n-e)/(t||1)),0),c=Array(s);s--;)c[i?s:++o]=e,e+=t;return c}var r=Math.ceil,a=Math.max;e.exports=t},function(e,n){function t(e,n){for(var t,r=-1,a=e.length;++r-1&&e%1==0&&e=n||t<0||I&&r>=b}function f(){var e=i();return p(e)?m(e):void(k=setTimeout(f,d(e)))}function m(e){return k=void 0,A&&y?r(e):(y=x=void 0,w)}function h(){void 0!==k&&clearTimeout(k),C=0,y=S=x=k=void 0}function g(){return void 0===k?w:m(i())}function v(){var e=i(),t=p(e);if(y=arguments,x=this,S=e,t){if(void 0===k)return u(S);if(I)return k=setTimeout(f,n),r(S)}return void 0===k&&(k=setTimeout(f,n)),w}var y,x,b,w,k,S,C=0,E=!1,I=!1,A=!0;if("function"!=typeof e)throw new TypeError(s);return n=o(n)||0,a(t)&&(E=!!t.leading,I="maxWait"in t,b=I?c(o(t.maxWait)||0,n):b,A="trailing"in t?!!t.trailing:A),v.cancel=h,v.flush=g,v}var a=t(2),i=t(47),o=t(7),s="Expected a function",c=Math.max,l=Math.min;e.exports=r},function(e,n){function t(e,n){return e===n||e!==e&&n!==n}e.exports=t},function(e,n,t){function r(e){var n=e?e.length:0;return n?a(e,1):[]}var a=t(29);e.exports=r},function(e,n){function t(e){return e}e.exports=t},function(e,n,t){function r(e){return a(e)&&s.call(e,"callee")&&(!l.call(e,"callee")||c.call(e)==i)}var a=t(43),i="[object Arguments]",o=Object.prototype,s=o.hasOwnProperty,c=o.toString,l=o.propertyIsEnumerable;e.exports=r},function(e,n){var t=Array.isArray;e.exports=t},function(e,n,t){function r(e){return i(e)&&a(e)}var a=t(5),i=t(6);e.exports=r},function(e,n,t){function r(e){var n=a(e)?l.call(e):"";return n==i||n==o||n==s}var a=t(2),i="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]",c=Object.prototype,l=c.toString;e.exports=r},function(e,n){function t(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=t},function(e,n,t){function r(e){return"symbol"==typeof e||a(e)&&s.call(e)==i}var a=t(6),i="[object Symbol]",o=Object.prototype,s=o.toString;e.exports=r},function(e,n,t){var r=t(4),a=function(){return r.Date.now()};e.exports=a},function(e,n,t){var r=t(32),a=r();e.exports=a},function(e,n,t){function r(e){return e&&e.length?a(e,i):0}var a=t(31),i=t(40);e.exports=r},function(e,n,t){function r(e){if(!e)return 0===e?e:0;if(e=a(e),e===i||e===-i){var n=e<0?-1:1;return n*o}return e===e?e:0}var a=t(7),i=1/0,o=1.7976931348623157e308;e.exports=r},function(e,n,t){"use strict";var r=t(25),a=t(24),i=a({args:["array","scalar","index"],body:function(e,n,t){var r,a=n;for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.layerClass="Layer",this.name=e.name,this.params=[],this.weights={}}return i(t,[{key:"setWeights",value:function(t){var e=this;this.params.forEach(function(r,n){e.weights[r]=t[n]})}},{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,u.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=f},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){if(!t)return u;for(var e=0;e>",rrshift:">>>"};!function(){for(var t in s){var r=s[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 f={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in f){var r=f[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 l=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_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_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:u,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,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;r2&&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,u.default)(e,r),this.tensor=(0,u.default)(new this._type(e),r)):!e.length&&r.length?this.tensor=(0,u.default)(new this._type(r.reduce(function(t,e){return t*e},1)),r):this.tensor=(0,u.default)(new this._type([]),[]),n.gpu&&weblas?(this._useWeblas=!0,this.createWeblasTensor()):this._useWeblas=!1}return i(t,[{key:"createWeblasTensor",value:function(){if(1===this.tensor.shape.length){var t=[1,this.tensor.shape[0]];this.weblasTensor=new weblas.pipeline.Tensor(t,this.tensor.data)}else if(2===this.tensor.shape.length){var e=this.tensor.shape;this.weblasTensor=new weblas.pipeline.Tensor(e,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,u.default)(e,t))}}},{key:"deleteWeblasTensor",value:function(){this.weblasTensor&&(this.weblasTensor.delete(),delete this.weblasTensor)}},{key:"replaceTensorData",value:function(t){t&&t.length&&t instanceof this._type?this.tensor.data=t:t&&t.length&&t instanceof Array?this.tensor.data=new this._type(t):this.tensor=new this._type([])}}]),t}();e.default=l},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(76)("wks"),o=r(46),i=r(5).Symbol,a="function"==typeof i,u=t.exports=function(t){return n[t]||(n[t]=a&&i[t]||(a?i:o)("Symbol."+t))};u.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(35),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(34);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"),u="toString",s=Function[u],c=(""+s).split(u);r(29).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,r,u){var s="function"==typeof r;s&&(i(r,"name")||o(r,"name",e)),t[e]!==r&&(s&&(i(r,a)||o(r,a,t[e]?""+t[e]:c.join(String(e)))),t===n?t[e]=r:u?t[e]?t[e]=r:o(t,e,r):(delete t[e],o(t,e,r)))})(Function.prototype,u,function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,r){var n=r(0),o=r(6),i=r(23),a=/"/g,u=function(t,e,r,n){var o=String(i(t)),u="<"+e;return""!==r&&(u+=" "+r+'="'+String(n).replace(a,""")+'"'),u+">"+o+""};t.exports=function(t,e){var r={};r[t]=e(u),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(61),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){h.default.expeq(t.tensor);var e=h.default.sum(t.tensor);h.default.divseq(t.tensor,e)}else{if(2!==t.tensor.shape.length)throw new Error("[activations.softmax] tensor shape "+t.tensor.shape+" not supported.");for(var r=0;r1&&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 s(t){return _(t.tensor),this}function c(t){return w(t.tensor),this}function f(t){return x(t.tensor),this}function l(t){return this}Object.defineProperty(e,"__esModule",{value:!0}),e.softmax=o,e.softplus=i,e.softsign=a,e.relu=u,e.tanh=s,e.sigmoid=c,e.hardSigmoid=f,e.linear=l;var p=r(3),h=n(p),d=r(25),v=n(d),y=r(4),g=n(y),b=(0,v.default)({args:["array"],body:function(t){t=Math.log(Math.exp(t)+1)}}),m=(0,v.default)({args:["array"],body:function(t){t/=1+Math.abs(t)}}),_=(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(62),o=r(34),i=r(18),a=r(28),u=r(13),s=r(142),c=Object.getOwnPropertyDescriptor;e.f=r(9)?c:function(t,e){if(t=i(t),e=a(e,!0),s)try{return c(t,e)}catch(t){}if(u(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&&u.indexOf(e)<0&&console.warn("cwise: Unknown argument '"+e+"' passed to expression compiler");for(var r=0;rw;w++)if((p||w in b)&&(v=b[w],y=m(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(f)return!1;return l?-1:c||f?f:x}}},function(t,e,r){var n=r(0),o=r(29),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){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(76)("metadata"),a=i.store||(i.store=new(r(161))),u=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},s=function(t,e,r){var n=u(e,r,!1);return void 0!==n&&n.has(t)},c=function(t,e,r){var n=u(e,r,!1);return void 0===n?void 0:n.get(t)},f=function(t,e,r,n){u(r,n,!0).set(t,e)},l=function(t,e){var r=u(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:u,has:s,get:c,set:f,keys:l,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),u=r(77),s=r(110),c=r(30),f=r(38),l=r(34),p=r(15),h=r(43),d=r(35),v=r(11),y=r(45),g=r(28),b=r(13),m=r(155),_=r(60),w=r(7),x=r(12),O=r(95),j=r(40),S=r(21),E=r(41).f,P=r(112),k=r(46),A=r(8),M=r(26),T=r(67),C=r(104),I=r(113),R=r(54),D=r(73),L=r(44),F=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,Y="ArrayBuffer",H="Shared"+Y,K="BYTES_PER_ELEMENT",$="prototype",Z=Array[$],J=s.ArrayBuffer,X=s.DataView,Q=M(0),tt=M(2),et=M(3),rt=M(4),nt=M(5),ot=M(6),it=T(!0),at=T(!1),ut=I.values,st=I.keys,ct=I.entries,ft=Z.lastIndexOf,lt=Z.reduce,pt=Z.reduceRight,ht=Z.join,dt=Z.sort,vt=Z.slice,yt=Z.toString,gt=Z.toLocaleString,bt=A("iterator"),mt=A("toStringTag"),_t=k("typed_constructor"),wt=k("def_constructor"),xt=u.CONSTR,Ot=u.TYPED,jt=u.VIEW,St="Wrong length!",Et=M(1,function(t,e){return Ct(C(t,t[wt]),e)}),Pt=i(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),kt=!!G&&!!G[$].set&&i(function(){new G(1).set({})}),At=function(t,e){if(void 0===t)throw q(St);var r=+t,n=v(t);if(e&&!m(r,n))throw z(St);return n},Mt=function(t,e){var r=d(t);if(r<0||r%e)throw z("Wrong offset!");return r},Tt=function(t){if(w(t)&&Ot in t)return t;throw q(t+" is not a typed array!")},Ct=function(t,e){if(!(w(t)&&_t in t))throw q("It is not a typed array constructor!");return new t(e)},It=function(t,e){return Rt(C(t,t[wt]),e)},Rt=function(t,e){for(var r=0,n=e.length,o=Ct(t,n);n>r;)o[r]=e[r++];return o},Dt=function(t,e,r){V(t,e,{get:function(){return this._d[r]}})},Lt=function(t){var e,r,n,o,i,a,u=x(t),s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,p=P(u);if(void 0!=p&&!O(p)){for(a=p.call(u),n=[],e=0;!(i=a.next()).done;e++)n.push(i.value);u=n}for(l&&s>2&&(f=c(f,arguments[2],2)),e=0,r=v(u.length),o=Ct(this,r);r>e;e++)o[e]=l?f(u[e],e):u[e];return o},Ft=function(){for(var t=0,e=arguments.length,r=Ct(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(Tt(this)):Tt(this),arguments)},Bt={copyWithin:function(t,e){return N.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return rt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return F.apply(Tt(this),arguments)},filter:function(t){return It(this,tt(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Tt(this),arguments)},lastIndexOf:function(t){return ft.apply(Tt(this),arguments)},map:function(t){return Et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(Tt(this),arguments)},reduceRight:function(t){return pt.apply(Tt(this),arguments)},reverse:function(){for(var t,e=this,r=Tt(e).length,n=Math.floor(r/2),o=0;o1?arguments[1]:void 0)},sort:function(t){return dt.call(Tt(this),t)},subarray:function(t,e){var r=Tt(this),n=r.length,o=y(t,n);return new(C(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 It(this,vt.call(Tt(this),t,e))},Wt=function(t){Tt(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(St);for(;i255?255:255&n),o.v[d](r*e+o.o,n,Pt)},A=function(t,e){V(t,e,{get:function(){return P(this,e)},set:function(t){return k(this,e,t)},enumerable:!0})};m?(y=r(function(t,r,n,o){f(t,y,c,"_d");var i,a,u,s,l=0,h=0;if(w(r)){if(!(r instanceof J||(s=_(r))==Y||s==H))return Ot in r?Rt(y,r):Lt.call(y,r);i=r,h=Mt(n,e);var d=r.byteLength;if(void 0===o){if(d%e)throw z(St);if(a=d-h,a<0)throw z(St)}else if(a=v(o)*e,a+h>d)throw z(St);u=a/e}else u=At(r,!0),a=u*e,i=new J(a);for(p(t,"_d",{b:i,o:h,l:a,e:u,v:new X(i)});l0?n:r)(t)}},function(t,e,r){var n=r(171),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},function(t,e){var r=Array.isArray;t.exports=r},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"),u=function(){},s="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[s][i[n]];return c()};t.exports=Object.create||function(t,e){var r;return null!==t?(u[s]=n(t),r=new u,u[s]=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(35),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(453),i=r(485);t.exports=n},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 n(t){return a(t)?o(t):i(t)}var o=r(439),i=r(455),a=r(64);t.exports=n},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;nMath.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("+f+",v)}"):i.push("return this.data["+f+"]=v}"),i.push("proto.get=function "+r+"_get("+c.join(",")+"){"),n?i.push("return this.data.get("+f+")}"):i.push("return this.data["+f+"]}"),i.push("proto.index=function "+r+"_index(",c.join(),"){return "+f+"}"),i.push("proto.hi=function "+r+"_hi("+c.join(",")+"){return new "+r+"(this.data,"+u.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+u.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var d=u.map(function(t){return"a"+t+"=this.shape["+t+"]"}),v=u.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=0){d=i"+y+"|0;b+=c"+y+"*d;a"+y+"-=d}");i.push("return new "+r+"(this.data,"+u.map(function(t){return"a"+t}).join(",")+","+u.map(function(t){return"c"+t}).join(",")+",b)}"),i.push("proto.step=function "+r+"_step("+c.join(",")+"){var "+u.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+u.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var y=0;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,"+u.map(function(t){return"shape["+t+"]"}).join(",")+","+u.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var a=new Function("CTOR_LIST","ORDER",i.join("\n"));return a(l[t],o)}function a(t){if(c(t))return"buffer";if(f)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 u(t,e,r,n){if(void 0===t){var o=l.array[0];return o([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var u=e.length;if(void 0===r){r=new Array(u);for(var s=u-1,c=1;s>=0;--s)r[s]=c,c*=e[s]}if(void 0===n){n=0;for(var s=0;sm;m++)if(y=e?b(a(d=t[m])[0],d[1]):b(t[m]),y===c||y===f)return y}else for(v=g.call(t);!(d=v.next()).done;)if(y=o(v,b,d.value,e),y===c||y===f)return y};e.BREAK=c,e.RETURN=f},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),u="["+a+"]",s="​…",c=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t,e,r){var o={},u=i(function(){return!!a[t]()||s[t]()!=s}),c=o[t]=u?e(p):a[t];r&&(o[r]=c),n(n.P+n.F*u,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},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(564),t.exports.gbmv=r(563),t.exports.symv=r(570),t.exports.sbmv=r(566),t.exports.spmv=r(567),t.exports.trmv=r(576),t.exports.tbmv=r(573),t.exports.trsv=r(577),t.exports.tbsv=r(574),t.exports.tpsv=r(575),t.exports.ger=r(565),t.exports.syr=r(571),t.exports.spr=r(568),t.exports.syr2=r(572),t.exports.spr2=r(569),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){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(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,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=a(e=Object(t),o))?r:i?n(e):"Object"==(u=n(e))&&"function"==typeof e.callee?"Arguments":u}},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,r){function n(t){return null!=t&&i(t.length)&&!o(t)}var o=r(178),i=r(124);t.exports=n},function(t,e,r){function n(t){return null==t?"":o(t)}var o=r(468);t.exports=n},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 u(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,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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;r0&&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,u=t.nbRow,s=void 0===u?3:u,c=t.nbCol,f=void 0===c?3:c,l=t.activation,h=void 0===l?"linear":l,d=t.borderMode,v=void 0===d?"valid":d,y=t.subsample,g=void 0===y?[1,1]:y,b=t.dimOrdering,m=void 0===b?"tf":b,_=t.bias,w=void 0===_||_;if(r.kernelShape=[o,s,f],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"!==m&&"th"!==m)throw new Error(r.name+" [Convolution2D layer] Only tf and th dim ordering are allowed.");return r.dimOrdering=m,r.bias=w,r.params=r.bias?["W","b"]:["W"],r}return u(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,1,0)),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t)}},{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="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]),f=o,l="same"===this.borderMode?Math.max(0,Math.floor((u-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(l/2),d=l-h,v=Math.floor(p/2),y=p-v;this.outputShape=[u,c,f],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],f=i[3],l=r+a+u,p=n+c+f,h=new d.default([],[l,p,o]);b.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){for(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,l=i*a*o,p=new d.default([],[f,l]),h=new d.default([],[l]),v=0,y=0,g=r-i;y<=g;y+=this.subsample[0])for(var m=0,_=n-a;m<=_;m+=this.subsample[1]){var w=(0,j.default)((0,x.default)(t.tensor.hi(y+i,m+a,o).lo(y,m,0)));h.replaceTensorData(w),b.default.assign(p.tensor.pick(v,null),h.tensor),v+=1}return p}},{key:"_w2row",value:function(t){for(var e=t.tensor.shape[2],r=s(this.kernelShape,3),n=r[0],o=r[1],i=r[2],a=o*i*e,u=new d.default([],[a,n]),c=new d.default([],[a]),f=0;ff;)if(u=s[f++],u!=u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}}},function(t,e,r){"use strict";var n=r(5),o=r(0),i=r(16),a=r(43),u=r(33),s=r(53),c=r(38),f=r(7),l=r(6),p=r(73),h=r(55),d=r(94);t.exports=function(t,e,r,v,y,g){var b=n[t],m=b,_=y?"set":"add",w=m&&m.prototype,x={},O=function(t){var e=w[t];i(w,t,"delete"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!f(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 m&&(g||w.forEach&&!l(function(){(new m).entries().next()}))){var j=new m,S=j[_](g?{}:-0,1)!=j,E=l(function(){j.has(1)}),P=p(function(t){new m(t)}),k=!g&&l(function(){for(var t=new m,e=5;e--;)t[_](e,e);return!t.has(-0)});P||(m=e(function(e,r){c(e,m,t);var n=d(new b,e,m);return void 0!=r&&s(r,y,n[_],n),n}),m.prototype=w,w.constructor=m),(E||k)&&(O("delete"),O("has"),y&&O("get")),(k||S)&&O(_),g&&w.clear&&delete w.clear}else m=v.getConstructor(e,t,y,_),a(m.prototype,r),u.NEED=!0;return h(m,t),x[t]=m,o(o.G+o.W+o.F*(m!=b),x),g||v.setStrong(m,t,y),m}},function(t,e,r){"use strict";var n=r(15),o=r(16),i=r(6),a=r(23),u=r(8);t.exports=function(t,e,r){var s=u(t),c=r(a,s,""[t]),f=c[0],l=c[1];i(function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,f),n(RegExp.prototype,s,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.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),u=a("typed_array"),s=a("view"),c=!(!o.ArrayBuffer||!o.DataView),f=c,l=0,p=9,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l1?arguments[1]:void 0,r),s=a>2?arguments[2]:void 0,c=void 0===s?r:o(s,r);c>u;)e[u++]=t;return e}},function(t,e,r){"use strict";var n=r(10),o=r(34);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(54),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(34),i=r(55),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),u=r(13),s=r(54),c=r(97),f=r(55),l=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,b);var x,O,j,S=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)}},E=e+" Iterator",P=m==y,k=!1,A=t.prototype,M=A[p]||A[d]||m&&A[m],T=M||S(m),C=m?P?S("entries"):T:void 0,I="Array"==e?A.entries||M:M;if(I&&(j=l(I.call(new t)),j!==Object.prototype&&(f(j,E,!0),n||u(j,p)||a(j,p,g))),P&&M&&M.name!==y&&(k=!0,T=function(){return M.call(this)}),n&&!w||!h&&!k&&A[p]||a(A,p,T),s[e]=T,s[E]=g,m)if(x={values:P?T:S(y),keys:_?T:S(v),entries:C},w)for(O in x)O in A||i(A,O,x[O]);else o(o.P+o.F*(h||k),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,u=n.Promise,s="process"==r(22)(a);t.exports=function(){var t,e,r,c=function(){var n,o;for(s&&(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(s)r=function(){a.nextTick(c)};else if(i){var f=!0,l=document.createTextNode("");new i(c).observe(l,{characterData:!0}),r=function(){l.data=f=!f}}else if(u&&u.resolve){var p=u.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(30)(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(76)("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(35),o=r(23);t.exports=function(t){return function(e,r){var i,a,u=String(o(e)),s=n(r),c=u.length;return s<0||s>=c?t?"":void 0:(i=u.charCodeAt(s),i<55296||i>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?t?u.charAt(s):i:t?u.slice(s,s+2):(i-55296<<10)+(a-56320)+65536)}}},function(t,e,r){var n=r(72),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(35),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(30),u=r(71),s=r(93),c=r(90),f=r(5),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=0,y={},g="onreadystatechange",b=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},m=function(t){b.call(t.data)};p&&h||(p=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return y[++v]=function(){u("function"==typeof t?t:Function(t),e)},n(v),v},h=function(t){delete y[t]},"process"==r(22)(l)?n=function(t){l.nextTick(a(b,t,1))}:d?(o=new d,i=o.port2,o.port1.onmessage=m,n=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",m,!1)):n=g in c("script")?function(t){s.appendChild(c("script"))[g]=function(){s.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,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(77),u=r(15),s=r(43),c=r(6),f=r(38),l=r(35),p=r(11),h=r(41).f,d=r(10).f,v=r(88),y=r(55),g="ArrayBuffer",b="DataView",m="prototype",_="Wrong length!",w="Wrong index!",x=n[g],O=n[b],j=n.Math,S=n.RangeError,E=n.Infinity,P=x,k=j.abs,A=j.pow,M=j.floor,T=j.log,C=j.LN2,I="buffer",R="byteLength",D="byteOffset",L=o?"_b":I,F=o?"_l":R,N=o?"_o":D,U=function(t,e,r){var n,o,i,a=Array(r),u=8*r-e-1,s=(1<>1,f=23===e?A(2,-24)-A(2,-77):0,l=0,p=t<0||0===t&&1/t<0?1:0;for(t=k(t),t!=t||t===E?(o=t!=t?1:0,n=s):(n=M(T(t)/C),t*(i=A(2,-n))<1&&(n--,i*=2),t+=n+c>=1?f/i:f*A(2,1-c),t*i>=2&&(n++,i/=2),n+c>=s?(o=0,n=s):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[l++]=255&o,o/=256,e-=8);for(n=n<0;a[l++]=255&n,n/=256,u-=8);return a[--l]|=128*p,a},B=function(t,e,r){var n,o=8*r-e-1,i=(1<>1,u=o-7,s=r-1,c=t[s--],f=127&c;for(c>>=7;u>0;f=256*f+t[s],s--,u-=8);for(n=f&(1<<-u)-1,f>>=-u,u+=e;u>0;n=256*n+t[s],s--,u-=8);if(0===f)f=1-a;else{if(f===i)return n?NaN:c?-E:E;n+=A(2,e),f-=a}return(c?-1:1)*n*A(2,f-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)},Y=function(t){return U(t,23,4)},H=function(t,e,r){d(t[m],e,{get:function(){return this[r]}})},K=function(t,e,r,n){var o=+r,i=l(o);if(o!=i||i<0||i+e>t[F])throw S(w);var a=t[L]._b,u=i+t[N],s=a.slice(u,u+e);return n?s:s.reverse()},$=function(t,e,r,n,o,i){var a=+r,u=l(a);if(a!=u||u<0||u+e>t[F])throw S(w);for(var s=t[L]._b,c=u+t[N],f=n(+o),p=0;ptt;)(J=Q[tt++])in x||u(x,J,P[J]);i||(X.constructor=x)}var et=new O(new x(2)),rt=O[m].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||s(O[m],{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=Z(this,t);this._b=v.call(Array(e),0),this[F]=e},O=function(t,e,r){f(this,O,b),f(t,x,b);var n=t[F],o=l(e);if(o<0||o>n)throw S("Wrong offset!");if(r=void 0===r?n-o:p(r),o+r>n)throw S(_);this[L]=t,this[N]=o,this[F]=r},o&&(H(x,R,"_l"),H(O,I,"_b"),H(O,R,"_l"),H(O,D,"_o")),s(O[m],{getInt8:function(t){return K(this,1,t)[0]<<24>>24},getUint8:function(t){return K(this,1,t)[0]},getInt16:function(t){var e=K(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=K(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return V(K(this,4,t,arguments[1]))},getUint32:function(t){return V(K(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return B(K(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return B(K(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){$(this,1,t,W,e)},setUint8:function(t,e){$(this,1,t,W,e)},setInt16:function(t,e){$(this,2,t,z,e,arguments[2])},setUint16:function(t,e){$(this,2,t,z,e,arguments[2])},setInt32:function(t,e){$(this,4,t,q,e,arguments[2])},setUint32:function(t,e){$(this,4,t,q,e,arguments[2])},setFloat32:function(t,e){$(this,4,t,Y,e,arguments[2])},setFloat64:function(t,e){$(this,8,t,G,e,arguments[2])}});y(x,g),y(O,b),u(O[m],a.VIEW,!0),e[g]=x,e[b]=O},function(t,e,r){var n=r(5),o=r(29),i=r(39),a=r(157),u=r(10).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},function(t,e,r){var n=r(60),o=r(8)("iterator"),i=r(54);t.exports=r(29).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[n(t)]}},function(t,e,r){"use strict";var n=r(52),o=r(145),i=r(54),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(36),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-1&&t%1==0&&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;r0&&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,u=t.stride,s=void 0===u?null:u,c=t.borderMode,f=void 0===c?"valid":c;return r.poolLength=a,r.stride=null===s?a:s,r.borderMode=f,r.poolingFunc="max",r}return a(e,t),u(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 l.default([],[e,t.tensor.shape[1]]),n=new l.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;it.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)),s+=1;"average"===this.poolingFunc&&h.default.divseq(n.tensor,s),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 u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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")}}(),s=function(){function t(t,e){for(var r=0;r0&&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,u=t.strides,s=void 0===u?null:u,c=t.borderMode,f=void 0===c?"valid":c,l=t.dimOrdering,p=void 0===l?"tf":l;return r.poolSize=a,r.strides=null===s?a:s,r.borderMode=f,r.dimOrdering=p,r.poolingFunc="max",r}return a(e,t),s(e,[{key:"_calcOutputShape",value:function(t){var e=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=u(this.poolSize,2),a=i[0],s=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]),f="same"===this.borderMode?Math.floor((n+this.strides[1]-1)/this.strides[1]):Math.floor((n-s+this.strides[1])/this.strides[1]),l="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((f-1)*this.strides[1]+s-n)):0,h=Math.floor(l/2),d=l-h,v=Math.floor(p/2),y=p-v;this.outputShape=[c,f,o],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],f=i[3],l=r+a+s,h=n+c+f,v=new p.default([],[l,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=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=u(this.poolSize,2),a=i[0],s=i[1],c=new p.default([],this.outputShape),f=new p.default([],[a,s,o]),l=u(this.inputPadding,4),h=l[0],v=l[1],y=l[2],g=l[3],b=0,m=0;b<=r-a;b+=this.strides[0],m++){var _=0;br-v&&(_=b+a-(r-v));for(var w=0,x=0;w<=n-s;w+=this.strides[1],x++){var O=0;wn-g&&(O=w+s-(n-g)),d.default.assign(f.tensor,t.tensor.hi(b+a,w+s,o).lo(b,w,0));for(var j=0;j0&&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,u=t.strides,s=void 0===u?null:u,c=t.borderMode,f=void 0===c?"valid":c,l=t.dimOrdering,p=void 0===l?"tf":l;return r.poolSize=a,r.strides=null===s?a:s,r.borderMode=f,r.dimOrdering=p,r.poolingFunc="max",r}return a(e,t),s(e,[{key:"_calcOutputShape",value:function(t){var e=u(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=u(this.poolSize,3),s=a[0],c=a[1],f=a[2],l="same"===this.borderMode?Math.floor((r+this.strides[0]-1)/this.strides[0]):Math.floor((r-s+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-f+this.strides[2])/this.strides[2]),d="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.strides[0]+s-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]+f-o)):0,g=Math.floor(d/2),b=d-g,m=Math.floor(v/2),_=v-m,w=Math.floor(y/2),x=y-w;this.outputShape=[l,p,h,i],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],f=a[2],l=a[3],h=a[4],v=a[5],y=r+s+c,g=n+f+l,b=o+h+v,m=new p.default([],[y,g,b,i]);"max"===this.poolingFunc&&d.default.assigns(m.tensor,Number.NEGATIVE_INFINITY),d.default.assign(m.tensor.hi(r+s,n+f,o+h,i).lo(s,f,h,0),t.tensor),t.tensor=m.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=u(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=u(this.poolSize,3),s=a[0],c=a[1],f=a[2],l=new p.default([],this.outputShape),h=new p.default([],[s,c,f,i]),v=u(this.inputPadding,6),y=v[0],g=v[1],b=v[2],m=v[3],_=v[4],w=v[5],x=0,O=0;x<=r-s;x+=this.strides[0],O++){var j=0;xr-g&&(j=x+s-(r-g));for(var S=0,E=0;S<=n-c;S+=this.strides[1],E++){var P=0;Sn-m&&(P=S+c-(n-m));for(var k=0,A=0;k<=o-f;k+=this.strides[2],A++){var M=0;k<_?M=_-k:k+f>o-w&&(M=k+f-(o-w)),d.default.assign(h.tensor,t.tensor.hi(x+s,S+c,k+f,i).lo(x,S,k,0));for(var T=0;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 K(e).length;default:if(o)return G(e).length;r=(""+r).toLowerCase(),o=!0}}function b(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 I(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(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,u=t.length,s=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,u/=2,s/=2,r/=2}var c;if(o){var f=-1;for(c=r;cu&&(r=u-s),c=r;c>=0;c--){for(var l=!0,p=0;po&&(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;a239?4:i>223?3:i>191?2:1;if(o+u<=r){var s,c,f,l;switch(u){case 1:i<128&&(a=i);break;case 2:s=t[o+1],128===(192&s)&&(l=(31&i)<<6|63&s,l>127&&(a=l));break;case 3:s=t[o+1],c=t[o+2],128===(192&s)&&128===(192&c)&&(l=(15&i)<<12|(63&s)<<6|63&c,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:s=t[o+1],c=t[o+2],f=t[o+3],128===(192&s)&&128===(192&c)&&128===(192&f)&&(l=(15&i)<<18|(63&s)<<12|(63&c)<<6|63&f,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,u=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=u}return M(n)}function M(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function L(e,r,n,o,i,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||re.length)throw new RangeError("Index out of range")}function F(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);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>>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),X.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),X.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;a55295&&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 Y(t){for(var e=[],r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function K(t){return J.toByteArray(W(t))}function $(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Z(t){return t!==t}var J=r(239),X=r(427),Q=r(241);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 u(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 f(null,t)},t.allocUnsafeSlow=function(t){return f(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);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(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,u=n-r,s=Math.min(a,u),c=this.slice(o,i),f=e.slice(r,n),l=0;lo)&&(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 S(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(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),r0&&(o*=256);)n+=this[t+--e]*o;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(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||D(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||D(t,e,this.length);for(var n=this[t],o=1,i=0;++i=o&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(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||D(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||D(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||D(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||D(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||D(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||D(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),X.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;L(this,t,e,r,o,0)}var i=1,a=0;for(this[e]=255&t;++a=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||L(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||L(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):F(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):F(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||L(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||L(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);L(this,t,e,r,o-1,-o)}var i=0,a=1,u=0;for(this[e]=255&t;++i>0)-u&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);L(this,t,e,r,o-1,-o)}var i=r-1,a=1,u=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/a>>0)-u&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||L(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||L(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):F(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):F(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||L(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||L(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=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=0;--i)e[i+r]=this[i+n];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=r;a2?arguments[2]:void 0,f=Math.min((void 0===c?a:o(c,a))-s,a-u),l=1;for(s0;)s in r?r[u]=r[s]:delete r[u],u+=l,s+=l;return r}},function(t,e,r){var n=r(53);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(61),a=r(11);t.exports=function(t,e,r,u,s){n(e);var c=o(t),f=i(c),l=a(c.length),p=s?l-1:0,h=s?-1:1;if(r<2)for(;;){if(p in f){u=f[p],p+=h;break}if(p+=h,s?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;s?p>=0:l>p;p+=h)p in f&&(u=e(u,f[p],p,c));return u}},function(t,e,r){"use strict";var n=r(14),o=r(7),i=r(71),a=[].slice,u={},s=function(t,e,r){if(!(e in u)){for(var n=[],o=0;o1?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(l.prototype,"size",{get:function(){return s(this[v])}}),l},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){f(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?l(0,r.k):"values"==e?l(0,r.v):l(0,[r.k,r.v]):(t._t=void 0,l(1))},r?"entries":"values",!r,!0),p(e)}}},function(t,e,r){var n=r(60),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(33).getWeak,i=r(2),a=r(7),u=r(38),s=r(53),c=r(26),f=r(13),l=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 l(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){u(t,c,e,"_i"),t._i=h++,t._l=void 0,void 0!=n&&s(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&&f(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&&f(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(75),i=r(62),a=r(12),u=r(61),s=Object.assign;t.exports=!s||r(6)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=s({},t)[r]||Object.keys(s({},e)).join("")!=n})?function(t,e){for(var r=a(t),s=arguments.length,c=1,f=o.f,l=i.f;s>c;)for(var p,h=u(arguments[c++]),d=f?n(h).concat(f(h)):n(h),v=d.length,y=0;v>y;)l.call(h,p=d[y++])&&(r[p]=h[p]);return r}:s},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),u=a.length,s=0;u>s;)n.f(t,r=a[s++],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):[],u=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?u(t):o(n(t))}},function(t,e,r){var n=r(13),o=r(18),i=r(67)(!1),a=r(103)("IE_PROTO");t.exports=function(t,e){var r,u=o(t),s=0,c=[];for(r in u)r!=a&&n(u,r)&&c.push(r);for(;e.length>s;)n(u,r=e[s++])&&(~i(c,r)||c.push(r));return c}},function(t,e,r){var n=r(42),o=r(18),i=r(62).f;t.exports=function(t){return function(e){for(var r,a=o(e),u=n(a),s=u.length,c=0,f=[];s>c;)i.call(a,r=u[c++])&&f.push(t?[r,a[r]]:a[r]);return f}}},function(t,e,r){var n=r(41),o=r(75),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(56).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(56).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 u=String(i(t)),s=u.length,c=void 0===r?" ":String(r),f=n(e);if(f<=s||""==c)return u;var l=f-s,p=o.call(c,Math.ceil(l/c.length));return p.length>l&&(p=p.slice(0,l)),a?p+u:u+p}},function(t,e,r){e.f=r(8)},function(t,e,r){"use strict";var n=r(139);t.exports=r(68)("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(70)})},function(t,e,r){"use strict";var n=r(139);t.exports=r(68)("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(33),u=r(147),s=r(141),c=r(7),f=a.getWeak,l=Object.isExtensible,p=s.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=f(t);return e===!0?p(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return s.def(this,t,e)}},y=t.exports=r(68)("WeakMap",d,v,s,!0,!0);7!=(new y).set((Object.freeze||Object)(h),7).get(h)&&(n=s.getConstructor(d),u(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)&&!l(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;o0)throw new Error("cwise: pre() block may not reference array args");if(o0)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),o0)throw new Error("cwise: pre() block may not reference array index");if(o0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(e.shapeArgs.push(o),or.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(424);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;i0)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(78),i=r(520),a=r(521),u=r(522),s=r(523),c=r(524);n.prototype.clear=i,n.prototype.delete=a,n.prototype.get=u,n.prototype.has=s,n.prototype.set=c,t.exports=n},function(t,e){function r(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var n=Object.defineProperty;t.exports=r},function(t,e,r){function n(t,e,r,a,u){var s=-1,c=t.length;for(r||(r=i),u||(u=[]);++s0&&r(f)?e>1?n(f,e-1,r,a,u):o(u,f):a||(u[u.length]=f)}return u}var o=r(440),i=r(493);t.exports=n},function(t,e,r){function n(t,e){return t&&o(t,e,i)}var o=r(448),i=r(49);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&&rp))return!1;var d=f.get(t);if(d&&f.get(e))return d==e;var v=-1,y=!0,g=c&u?new o:void 0;for(f.set(t,e),f.set(e,t);++v=0;--o)n[o]=r,r*=t[o];return c(l.malloc(r,e),t,n,0)}function i(t){"generic"!==t.dtype&&"array"!==t.dtype&&l.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=l.malloc(r,e),o=0;o=0;--o)n[o]=r,r*=t[o];for(var i=l.malloc(r,e),o=0;o=0;--r)i[r]=o,o*=t[r];var a=l.malloc(o,e);for(r=0;r=0;r--)s+=i[r],u=Math.min(u,t[r]);for(r=0,n=0;r0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.layerClass="Input";var n=t.shape,a=void 0===n?[]:n;return r.shape=a,r}return a(e,t),u(e,[{key:"call",value:function(t){if(!(0,l.default)(t.tensor.shape,this.shape))throw new Error("[Input] 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){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=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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;r0&&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,u=e.gpu,s=void 0!==u&&u;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=s,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.modelDAG={},this.inputTensors={},this._ready=this.initialize()}return u(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 Promise.all(e.map(function(e){return t.dataRequest(e,t.headers)})).then(function(){return t.createLayers(),Promise.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 Promise(function(n,o){var i=new XMLHttpRequest;i.open("GET",e.filepaths[t],!0),i.responseType=e.filetypes[t];var u=!0,s=!1,f=void 0;try{for(var l,p=(0,c.default)(r)[Symbol.iterator]();!(u=(l=p.next()).done);u=!0){var h=a(l.value,2),d=h[0],v=h[1];i.setRequestHeader(d,v)}}catch(t){s=!0,f=t}finally{try{!u&&p.return&&p.return()}finally{if(s)throw f}}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,m.default)(this.xhrProgress);return Math.round((0,w.default)(t)/t.length)}},{key:"createLayers",value:function(){var t=this,e=this.data.model.class_name;"Sequential"===e&&!function(){var e=t.data.model.config,r="input";e.forEach(function(n,o){var i=n.class_name,a=n.config;if(0===o){var u=a.batch_input_shape.slice(1),s=new A.default({name:r,shape:u});t.modelLayersMap.set(r,s),t.modelDAG[r]={layerClass:"Input",name:r,inbound:[],outbound:[]},t.inputTensors[r]=new T.default([],u,{gpu:t.gpu})}if(!(i in P))throw new Error("Layer "+i+" specified in model configuration is not implemented!");var c=(0,l.default)(a,function(t,e){return(0,h.default)(e)});"activation"in c&&(c.activation=(0,h.default)(c.activation));var f=new P[i](c);if(f.params&&f.params.length){var p=f.params.map(function(e){var r=(0,v.default)(t.data.metadata,function(t){var r=new RegExp("^"+a.name+"_"+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(p)}if(t.modelLayersMap.set(a.name,f),t.modelDAG[a.name]={layerClass:i,name:a.name,inbound:[],outbound:[]},0===o)t.modelDAG[r].outbound.push(a.name),t.modelDAG[a.name].inbound.push(r);else{var d=e[o-1].config;t.modelDAG[a.name].inbound.push(d.name),t.modelDAG[d.name].outbound.push(a.name)}})}()}},{key:"traverseDAG",value:regeneratorRuntime.mark(function t(e){var r,n,o,i,a,u,s,c,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=30;break}if(r=e[0],n=this.modelDAG[r],o=n.layerClass,i=n.inbound,a=n.outbound,"Input"===o){t.next=27;break}u=this.modelLayersMap.get(r),s=i.map(function(t){return f.modelLayersMap.get(t)});case 13:if((0,S.default)(s.map(function(t){return t.hasResult}))){t.next=18;break}return void(t.next=16);case 16:t.next=13;break;case 18:if("Merge"!==o){t.next=22;break}u.result=u.call(s.map(function(t){return new T.default(t.result.tensor.data,t.result.tensor.shape,{gpu:f.gpu})})),t.next=26;break;case 22:if(1===s.length){t.next=24;break}throw new Error("Layer name "+u.name+" has "+s.length+" inbound nodes, but is not a Merge layer.");case 24:c=s[0].result,u.result=u.call(new T.default(c.tensor.data,c.tensor.shape,{gpu:this.gpu}));case 26:u.hasResult=!0;case 27:return t.delegateYield(this.traverseDAG(a),"t0",28);case 28:t.next=31;break;case 30:return t.delegateYield(e.map(function(t){return f.traverseDAG([t])}),"t1",31);case 31:case"end":return t.stop()}},t,this)})},{key:"predict",value:function(t){var e=this,r=(0,g.default)(this.inputTensors);if(!(0,O.default)((0,g.default)(t),r))throw new Error("predict() must take an object where the keys are the named inputs of the model.");if(!(0,S.default)(r,function(e){return t[e]instanceof Float32Array}))throw new Error("predict() must take an object where the values are the flattened data as Float32Array.");var n=!0,o=!1,i=void 0;try{for(var a,u=this.modelLayersMap.values()[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var s=a.value;s.hasResult=!1}}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}r.forEach(function(r){var n=e.modelLayersMap.get(r);e.inputTensors[r]=new T.default(t[r],n.shape,{gpu:e.gpu}),n.result=n.call(e.inputTensors[r]),n.hasResult=!0});for(var c=this.traverseDAG(r);!c.next().done;);var f=this.data.model.class_name;if("Sequential"===f){var l=(0,v.default)((0,m.default)(this.modelDAG),function(t){return!t.outbound.length}),p=this.modelLayersMap.get(l.name),h=p.result;return{output:h.tensor.data}}}}]),t}();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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.alpha),t}}]),e}(c.default),h=function(){this._compute=(0,l.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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){return(0,f.relu)(t,{alpha:this.alpha}),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 u=function(){function t(t,e){for(var r=0;r0&&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,l.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),u(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 u=function(){function t(t,e){for(var r=0;r0&&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,l.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),u(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 u=function(){function t(t,e){for(var r=0;r0&&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,l.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),u(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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.theta),t}}]),e}(c.default),h=function(){this._compute=(0,l.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(187),i=n(o),a=r(188),u=n(a),s=r(186),c=n(s),f=r(189),l=n(f),p=r(191),h=n(p),d=r(190),v=n(d);e.LeakyReLU=i.default,e.PReLU=u.default,e.ELU=c.default,e.ParametricSoftplus=l.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 u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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")}}(),s=function(){function t(t,e){for(var r=0;r0&&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),s(e,[{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=i+(i-1)*(this.atrousRate[0]-1),c=a+(a-1)*(this.atrousRate[1]-1),f="same"===this.borderMode?Math.floor((e+this.subsample[0]-1)/this.subsample[0]):Math.floor((e-s+this.subsample[0])/this.subsample[0]),l="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((f-1)*this.subsample[0]+s-e)):0,d="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.subsample[1]+c-r)):0,v=Math.floor(h/2),y=h-v,g=Math.floor(d/2),b=d-g;this.outputShape=[f,l,p],this.inputPadding=[v,y,g,b]}},{key:"_im2col",value:function(t){for(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,p=i*a*o,h=i+(i-1)*(this.atrousRate[0]-1),v=a+(a-1)*(this.atrousRate[1]-1),g=new f.default([],[l,p]),m=new f.default([],[p]),_=0,w=0,x=r-h;w<=x;w+=this.subsample[0])for(var O=0,j=n-v;O<=j;O+=this.subsample[1]){var S=(0,b.default)((0,y.default)(t.tensor.hi(w+h,O+v,o).lo(w,O,0).step(this.atrousRate[0],this.atrousRate[1],1)));m.replaceTensorData(S),d.default.assign(g.tensor.pick(_,null),m.tensor),_+=1}return g}}]),e}(p.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.filterLength,s=void 0===u?1:u,c=t.activation,f=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.");return r.params=r.bias?["W","b"]:["W"],r._conv2d=new l.default({nbFilter:a,nbRow:s,nbCol:1,activation:f,borderMode:h,subsample:[v,1],dimOrdering:"th",bias:g}),r}return a(e,t),u(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 u(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,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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;r0&&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,u=t.kernelDim1,s=void 0===u?1:u,c=t.kernelDim2,f=void 0===c?1:c,l=t.kernelDim3,h=void 0===l?1:l,d=t.activation,v=void 0===d?"linear":d,y=t.borderMode,g=void 0===y?"valid":y,b=t.subsample,m=void 0===b?[1,1,1]:b,_=t.dimOrdering,w=void 0===_?"tf":_,x=t.bias,O=void 0===x||x;if(r.kernelShape=[o,s,f,h],r.activation=p[v],"valid"!==g&&"same"!==g)throw new Error(r.name+" [Convolution3D layer] Invalid borderMode.");if(r.borderMode=g,r.subsample=m,"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 u(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,4,1,0)),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t)}},{key:"_calcOutputShape",value:function(t){var e=t.tensor.shape[0],r=t.tensor.shape[1],n=t.tensor.shape[2],o=s(this.kernelShape,4),i=o[0],a=o[1],u=o[2],c=o[3],f="same"===this.borderMode?Math.floor((e+this.subsample[0]-1)/this.subsample[0]):Math.floor((e-a+this.subsample[0])/this.subsample[0]),l="same"===this.borderMode?Math.floor((r+this.subsample[1]-1)/this.subsample[1]):Math.floor((r-u+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((f-1)*this.subsample[0]+a-e)):0,v="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.subsample[1]+u-r)):0,y="same"===this.borderMode?Math.max(0,Math.floor((p-1)*this.subsample[2]+c-n)):0,g=Math.floor(d/2),b=d-g,m=Math.floor(v/2),_=v-m,w=Math.floor(y/2),x=y-w;this.outputShape=[f,l,p,h],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],f=a[2],l=a[3],p=a[4],h=a[5],v=r+u+c,y=n+f+l,g=o+p+h,m=new d.default([],[v,y,g,i]);b.default.assign(m.tensor.hi(r+u,n+f,o+p,i).lo(u,f,p,0),t.tensor),t.tensor=m.tensor}return t}},{key:"_vol2col",value:function(t){for(var e=s(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=this.kernelShape[1],u=this.kernelShape[2],c=this.kernelShape[3],f=this.outputShape[0],l=this.outputShape[1],p=this.outputShape[2],h=f*l*p,v=a*u*c*i,y=new d.default([],[h,v]),g=new d.default([],[v]),m=0,_=0,w=r-a;_<=w;_+=this.subsample[0])for(var O=0,S=n-u;O<=S;O+=this.subsample[1])for(var E=0,P=o-c;E<=P;E+=this.subsample[2]){var k=(0,j.default)((0,x.default)(t.tensor.hi(_+a,O+u,E+c,i).lo(_,O,E,0)));g.replaceTensorData(k),b.default.assign(y.tensor.pick(m,null),g.tensor),m+=1}return y}},{key:"_w2row",value:function(t){for(var e=t.tensor.shape[3],r=s(this.kernelShape,4),n=r[0],o=r[1],i=r[2],a=r[3],u=o*i*a*e,c=new d.default([],[u,n]),f=new d.default([],[u]),l=0;l0&&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,u=t.nbRow,s=void 0===u?1:u,c=t.nbCol,f=void 0===c?1:c,l=t.outputShape,h=void 0===l?[]:l,d=t.activation,v=void 0===d?"linear":d,y=t.borderMode,g=void 0===y?"valid":y,b=t.subsample,m=void 0===b?[1,1]:b,_=t.dimOrdering,w=void 0===_?"tf":_,x=t.bias,O=void 0===x||x;if(r.kernelShape=[o,s,f],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=m,"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 u(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,1,0)),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t)}},{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],u="same"===this.borderMode?Math.max(0,Math.floor((e-1)*this.subsample[0]+n-i)):0,s="same"===this.borderMode?Math.max(0,Math.floor((r-1)*this.subsample[1]+o-a)):0,c=Math.floor(u/2),f=u-c,l=Math.floor(s/2),p=s-l;this.outputPadding=[c,f,l,p]}},{key:"_im2col",value:function(t){for(var e=s(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]),u=0;u0&&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,u=t.nbRow,s=void 0===u?1:u,c=t.nbCol,f=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,b=void 0===y?[1,1]:y,m=t.depthMultiplier,_=void 0===m?1:m,w=t.dimOrdering,x=void 0===w?"tf":w,O=t.bias,j=void 0===O||O;if(r.activation=l[h],"valid"!==v&&"same"!==v)throw new Error(r.name+" [SeparableConvolution2D layer] Invalid borderMode.");if(r.borderMode=v,r.subsample=b,r.depthMultiplier=_,"tf"!==x&&"th"!==x)throw new Error(r.name+" [SeparableConvolution2D layer] Only tf and th dim ordering are allowed.");r.dimOrdering=x,r.bias=j,r.params=r.bias?["depthwise_kernel","pointwise_kernel","b"]:["depthwise_kernel","pointwise_kernel"];var S={nbFilter:r.depthMultiplier,nbRow:s,nbCol:f,activation:"linear",borderMode:v,subsample:b,dimOrdering:x,bias:!1},E={nbFilter:o,nbRow:1,nbCol:1,activation:"linear",borderMode:v,subsample:[1,1],dimOrdering:x,bias:!1};return r._depthwiseConv=new g.default(S),r._pointwiseConv=new g.default(E),r}return u(e,t),c(e,[{key:"call",value:function(t){this._depthwiseConv._calcOutputShape(t);var e=this._depthwiseConv.outputShape[0],r=this._depthwiseConv.outputShape[1],n=new h.default([],[e,r,this.depthMultiplier]),o=s(t.tensor.shape,3),i=o[0],a=o[1],u=o[2],c=new h.default([],[i,a,1]),f=this.weights.depthwise_kernel.tensor.shape.slice();f[2]=1;for(var l=new h.default([],f),p=new h.default([],[this._depthwiseConv.outputShape[0],this._depthwiseConv.outputShape[1],u*this.depthMultiplier]),d=0;d0&&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),u(e,[{key:"call",value:function(t){for(var e=t.tensor.shape,r=[e[0]*this.length,e[1]],n=new l.default([],r),o=0;o0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.size=a,r.dimOrdering=s,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=t.tensor.shape,r=[e[0]*this.size[0],e[1]*this.size[1],e[2]],n=new l.default([],r),o=0;o0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.size=a,r.dimOrdering=s,r}return a(e,t),u(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 l.default([],r),o=0;o0&&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),u(e,[{key:"call",value:function(t){var e=t.tensor.shape,r=[e[0]+2*this.padding,e[1]],n=new l.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.padding=a,r.dimOrdering=s,r}return a(e,t),u(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 l.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.padding=a,r.dimOrdering=s,r}return a(e,t),u(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 l.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(194),i=n(o),a=r(66),u=n(a),s=r(193),c=n(s),f=r(197),l=n(f),p=r(196),h=n(p),d=r(195),v=n(d),y=r(198),g=n(y),b=r(199),m=n(b),_=r(200),w=n(_),x=r(201),O=n(x),j=r(202),S=n(j),E=r(203),P=n(E);e.Convolution1D=i.default,e.Convolution2D=u.default,e.AtrousConvolution2D=c.default,e.SeparableConvolution2D=l.default,e.Deconvolution2D=h.default,e.Convolution3D=v.default,e.UpSampling1D=g.default, -e.UpSampling2D=m.default,e.UpSampling3D=w.default,e.ZeroPadding1D=O.default,e.ZeroPadding2D=S.default,e.ZeroPadding3D=P.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 u(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;r0&&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=f[o],r}return u(e,t),s(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 u(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;r0&&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,u=t.activation,s=void 0===u?"linear":u,c=t.inputDim,l=void 0===c?null:c,p=t.bias,h=void 0===p||p;return r.activation=f[s],r.outputDim=o,r.inputDim=l,r.bias=h,r.params=r.bias?["W","b"]:["W"],r.inputDim&&(r.inputShape=[r.inputDim]),r}return u(e,t),s(e,[{key:"call",value:function(t){var e=new p.default([],[this.outputDim]);if(this.bias&&g.default.assign(e.tensor,this.weights.b.tensor),t._useWeblas){var r=this.bias?this.weights.b.tensor.data:new Float32Array(this.outputDim);e.tensor.data=weblas.sgemm(1,this.weights.W.tensor.shape[1],t.tensor.shape[0],1,t.tensor.data,this.weights.W.tensor.data,1,r)}else(0,v.gemv)(1,this.weights.W.tensor.transpose(1,0),t.tensor,1,e.tensor);return t.tensor=e.tensor,this.activation(t),t}}]),e}(d.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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){return 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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){if(t.tensor.shape.length>1){var e=[t.tensor.shape.reduce(function(t,e){return t*e},1)];t.tensor=(0,l.default)(new t._type((0,v.default)((0,h.default)(t.tensor))),e)}return 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 u(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;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._computeOutput=(0,m.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,u=t.activation,s=void 0===u?"linear":u,c=t.bias,l=void 0===c||c;return r.transformBias=o,r.activation=f[s],r.bias=l,r.params=r.bias?["W","b","W_carry","b_carry"]:["W","W_carry"],r}return u(e,t),s(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),f.sigmoid(r),this._computeOutput(t.tensor,e.tensor,r.tensor),t}}]),e}(d.default);e.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.inputDim,s=void 0===u?null:u,c=t.bias,f=void 0===c||c;return r.outputDim=a,r.inputDim=s,r.bias=f,r.params=r.bias?["W","b"]:["W"],r}return a(e,t),u(e,[{key:"call",value:function(t){for(var e=this.weights.W.tensor.shape[0],r=new c.default([],[this.outputDim]),n=0;n0&&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,u=t.concatAxis,s=void 0===u?-1:u,c=t.dotAxes,f=void 0===c?-1:c,l=t.outputShape,p=void 0===l?null:l,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=s,r.dotAxes=f,r.outputShape=p,r.outputMask=d,r}return a(e,t),u(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-1,this.dotAxes-1]),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();if(t.forEach(function(t){return t.splice(e.concatAxis,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-1;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 u=0;u0&&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 u(e,t),s(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}(f.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 u=function(){function t(t,e){for(var r=0;r0&&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),u(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,l.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 u=function(){function t(t,e){for(var r=0;r0&&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.shape,a=void 0===n?[]:n;return r.shape=a,r}return a(e,t),u(e,[{key:"call",value:function(t){if(this.shape.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.");return t.tensor=(0,l.default)(new t._type((0,v.default)((0,h.default)(t.tensor))),this.shape),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,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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.p=Math.min(Math.max(0,a),1),r.dimOrdering=s,r}return a(e,t),u(e,[{key:"call",value:function(t){return 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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.p=Math.min(Math.max(0,a),1),r.dimOrdering=s,r}return a(e,t),u(e,[{key:"call",value:function(t){return t}}]),e}(c.default);e.default=f},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(206),i=n(o),a=r(205),u=n(a),s=r(207),c=n(s),f=r(215),l=n(f),p=r(216),h=n(p),d=r(208),v=n(d),y=r(214),g=n(y),b=r(212),m=n(b),_=r(213),w=n(_),x=r(211),O=n(x),j=r(209),S=n(j),E=r(210),P=n(E);e.Dense=i.default,e.Activation=u.default,e.Dropout=c.default,e.SpatialDropout2D=l.default,e.SpatialDropout3D=h.default,e.Flatten=v.default,e.Reshape=g.default,e.Permute=m.default,e.RepeatVector=w.default,e.Merge=O.default,e.Highway=S.default,e.MaxoutDense=P.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.outputDim,s=void 0===u?1:u,c=t.inputLength,f=void 0===c?0:c,l=t.maskZero,p=void 0!==l&&l,h=t.dropout,d=void 0===h?0:h;return r.inputDim=a,r.outputDim=s,r.inputLength=f,r.maskZero=p,r.dropout=d,r.params=["W"],r}return a(e,t),u(e,[{key:"call",value:function(t){for(var e=new l.default([],[t.tensor.shape[0],this.weights.W.tensor.shape[1]]),r=0,n=t.tensor.shape[0];r0&&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,u=t.mode,s=void 0===u?0:u,c=t.axis,f=void 0===c?-1:c;return r.epsilon=a,r.mode=s,r.axis=f,r.params=0===r.mode?["gamma","beta","running_mean","running_std"]:["gamma","beta"],r}return a(e,t),u(e,[{key:"call",value:function(t){var e=this;this.axis=this.axis<0?t.tensor.shape.length+this.axis:this.axis-1;for(var r=[],n=0;n0&&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}(s.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 u=r(130),s=n(u),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}(s.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 u=r(131),s=n(u),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}(s.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 u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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")}}(),s=function(){function t(t,e){for(var r=0;r0&&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),s(e,[{key:"call",value:function(t){for(var e=u(t.tensor.shape,2),r=e[0],n=e[1],o=new p.default([],[n]),i=0,a=n;i0&&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),s(e,[{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0));for(var e=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=new p.default([],[o]),a=0,s=o;a0&&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),u(e,[{key:"call",value:function(t){for(var e=t.tensor.shape[1],r=new l.default([],[e]),n=0,o=e;n0&&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),u(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 l.default([],[e]),n=0,o=e;n0&&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}(s.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 u=r(130),s=n(u),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}(s.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 u=r(131),s=n(u),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}(s.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(229),i=n(o),a=r(230),u=n(a),s=r(231),c=n(s),f=r(222),l=n(f),p=r(223),h=n(p),d=r(224),v=n(d),y=r(227),g=n(y),b=r(225),m=n(b),_=r(228),w=n(_),x=r(226),O=n(x);e.MaxPooling1D=i.default,e.MaxPooling2D=u.default,e.MaxPooling3D=c.default,e.AveragePooling1D=l.default,e.AveragePooling2D=h.default,e.AveragePooling3D=v.default,e.GlobalMaxPooling1D=g.default,e.GlobalAveragePooling1D=m.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 u(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;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,m.default)({args:["array","array","array","array"],body:function(t,e,r,n){t=e+r+n}}),r._update=(0,m.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,u=t.activation,s=void 0===u?"tanh":u,c=t.innerActivation,l=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=s,r.innerActivation=l,r.activationFunc=f[s],r.innerActivationFunc=f[l],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 u(e,t),s(e,[{key:"call",value:function(t){for(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]),u=new p.default([],[n]),s=new p.default([],[n]),c=new p.default([],[o]),f=new p.default([],[o]),l=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]),b=new p.default([],[i]),m=new p.default([],[t.tensor.shape[0],i]),_=function(){var t=[u,s,f,l,d,y];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},w=function(){g.default.assign(b.tensor,h.tensor),(0,v.gemv)(1,e.weights.W_z.tensor.transpose(1,0),r.tensor,1,u.tensor),(0,v.gemv)(1,e.weights.U_z.tensor.transpose(1,0),b.tensor,1,s.tensor),e._combine(a.tensor,u.tensor,s.tensor,e.weights.b_z.tensor),e.innerActivationFunc(a),(0,v.gemv)(1,e.weights.W_r.tensor.transpose(1,0),r.tensor,1,f.tensor),(0,v.gemv)(1,e.weights.U_r.tensor.transpose(1,0),b.tensor,1,l.tensor),e._combine(c.tensor,f.tensor,l.tensor,e.weights.b_r.tensor),e.innerActivationFunc(c),g.default.muleq(c.tensor,b.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,b.tensor,a.tensor)},x=0,O=t.tensor.shape[0];x0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,m.default)({args:["array","array","array","array"],body:function(t,e,r,n){t=e+r+n}}),r._update=(0,m.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,u=t.activation,s=void 0===u?"tanh":u,c=t.innerActivation,l=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=s,r.innerActivation=l,r.activationFunc=f[s],r.innerActivationFunc=f[l],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 u(e,t),s(e,[{key:"call",value:function(t){for(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],u=new p.default([],[n]),s=new p.default([],[n]),c=new p.default([],[n]),f=new p.default([],[i]),l=new p.default([],[i]),h=new p.default([],[i]),d=new p.default([],[a]),y=new p.default([],[a]),b=new p.default([],[a]),m=new p.default([],[o]),_=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]),S=new p.default([],[t.tensor.shape[0],o]),E=function(){var t=[s,c,l,h,y,b,_,w];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},P=function(){g.default.assign(j.tensor,O.tensor),(0,v.gemv)(1,e.weights.W_i.tensor.transpose(1,0),r.tensor,1,s.tensor),(0,v.gemv)(1,e.weights.U_i.tensor.transpose(1,0),j.tensor,1,c.tensor),e._combine(u.tensor,s.tensor,c.tensor,e.weights.b_i.tensor),e.innerActivationFunc(u),(0,v.gemv)(1,e.weights.W_f.tensor.transpose(1,0),r.tensor,1,l.tensor),(0,v.gemv)(1,e.weights.U_f.tensor.transpose(1,0),j.tensor,1,h.tensor),e._combine(f.tensor,l.tensor,h.tensor,e.weights.b_f.tensor),e.innerActivationFunc(f),(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,b.tensor),e._combine(d.tensor,y.tensor,b.tensor,e.weights.b_o.tensor),e.innerActivationFunc(d),(0,v.gemv)(1,e.weights.W_c.tensor.transpose(1,0),r.tensor,1,_.tensor),(0,v.gemv)(1,e.weights.U_c.tensor.transpose(1,0),j.tensor,1,w.tensor),e._combine(m.tensor,_.tensor,w.tensor,e.weights.b_c.tensor),e.activationFunc(m),e._update(m.tensor,x.tensor,u.tensor,f.tensor),g.default.assign(x.tensor,m.tensor),e.activationFunc(m),g.default.mul(O.tensor,d.tensor,m.tensor)},k=0,A=t.tensor.shape[0];k0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,m.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,u=t.activation,s=void 0===u?"tanh":u,c=t.returnSequences,l=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=s,r.activationFunc=f[s],r.returnSequences=l,r.goBackwards=h,r.stateful=v,r.params=["W","U","b"],r}return u(e,t),s(e,[{key:"call",value:function(t){for(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]),u=new p.default([],[n]),s=new p.default([],[t.tensor.shape[0],n]),c=function(){var t=[i,a];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},f=function(){g.default.assign(u.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),u.tensor,1,a.tensor),e._combine(o.tensor,i.tensor,a.tensor,e.weights.b.tensor),e.activationFunc(o)},l=0,h=t.tensor.shape[0];l0&&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,u=void 0===o?"concat":o;if(!n)throw new Error("[Bidirectional] wrapped layer is undefined.");r.forwardLayer=n;var s=(0,y.default)(n,["outputDim","activation","innerActivation","returnSequences","goBackwards","stateful"]);return s.goBackwards=!s.goBackwards,r.backwardLayer=new b[n.layerClass](s),r.mergeMode=u,r}return u(e,t),s(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 u=n.tensor.shape.slice(),s=new p.default([],u);d.default.addeq(s.tensor,n.tensor),d.default.addeq(s.tensor,o.tensor),t.tensor=s.tensor}else if("mul"===this.mergeMode){var c=n.tensor.shape.slice(),f=new p.default([],c);d.default.assigns(f.tensor,1),d.default.muleq(f.tensor,n.tensor),d.default.muleq(f.tensor,o.tensor),t.tensor=f.tensor}else if("ave"===this.mergeMode){var l=n.tensor.shape.slice(),h=new p.default([],l);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}(f.default);e.default=m},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);e0&&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 u(e,t),s(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),u=a.tensor.shape.slice(),s=new p.default([],[t.tensor.shape[0]].concat(o(u)));d.default.assign((r=s.tensor).pick.apply(r,[0].concat(o(u.map(function(t){return null})))),a.tensor);for(var c=1,f=t.tensor.shape[0];c0)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,u,s=t.length;a=r(t),u=new f(3*s/4-a),o=a>0?s-4:s;var l=0;for(e=0,n=0;e>16&255,u[l++]=i>>8&255,u[l++]=255&i;return 2===a?(i=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,u[l++]=255&i):1===a&&(i=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,u[l++]=i>>8&255,u[l++]=255&i),u}function i(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function a(t,e,r){for(var n,o=[],a=e;af?f:c+u));return 1===n?(e=t[r-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),i.push(o),i.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=u;for(var s=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=l.length;p0)-(t<0)},e.abs=function(t){var e=t>>n-1;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<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<>>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){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){r(251),t.exports=r(29).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(243);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(75),i=r(62);t.exports=function(t){var e=n(t),r=o.f;if(r)for(var a,u=r(t),s=i.f,c=0;u.length>c;)s.call(t,a=u[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),u=a.length,s=0;u>s;)if(i[r=a[s++]]===e)return r}},function(t,e,r){"use strict";var n=r(249),o=r(71),i=r(14);t.exports=function(){for(var t=i(this),e=arguments.length,r=Array(e),a=0,u=n._,s=!1;e>a;)(r[a]=arguments[a++])===u&&(s=!0);return function(){var n,i=this,a=arguments.length,c=0,f=0;if(!s&&!a)return o(t,r,i);if(n=r.slice(),s)for(;e>c;c++)n[c]===u&&(n[c]=arguments[f++]);for(;a>f;)n.push(arguments[f++]);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(250)(/[\\^$*+?.()|[\]{}]/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(52)("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(52)("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(52)(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(52)(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(30),o=r(0),i=r(12),a=r(144),u=r(95),s=r(11),c=r(89),f=r(112);o(o.S+o.F*!r(73)(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,o,l,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,b=f(p);if(y&&(v=n(v,d>2?arguments[2]:void 0,2)),void 0==b||h==Array&&u(b))for(e=s(p.length),r=new h(e);e>g;g++)c(r,g,y?v(p[g],g):p[g]);else for(l=b.call(p),r=new h;!(o=l.next()).done;g++)c(r,g,y?a(l,v,[o.value,g],!0):o.value);return r.length=g,r}})},function(t,e,r){"use strict";var n=r(0),o=r(67)(!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(61)!=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(35),a=r(11),u=[].lastIndexOf,s=!!u&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(s||!r(24)(u)),"Array",{lastIndexOf:function(t){if(s)return u.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),u=r(11),s=[].slice;n(n.P+n.F*r(6)(function(){o&&s.call(o)}),"Array",{slice:function(t,e){var r=u(this.length),n=i(this);if(e=void 0===e?r:e,"Array"==n)return s.call(this,t,e);for(var o=a(t,r),c=a(e,r),f=u(c-o),l=Array(f),p=0;p9?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(245))},function(t,e,r){var n=Date.prototype,o="Invalid Date",i="toString",a=n[i],u=n.getTime;new Date(NaN)+""!=o&&r(16)(n,i,function(){var t=u.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(34),i=r(13),a=Function.prototype,u=/^\s*function ([^ (]*)/,s="name",c=Object.isExtensible||function(){return!0};s in a||r(9)&&n(a,s,{configurable:!0,get:function(){try{var t=this,e=(""+t).match(u)[1];return i(t,s)||!c(t)||n(t,s,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),u=i(2,-23),s=i(2,127)*(2-u),c=i(2,-126),f=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 ns||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,u=arguments.length,s=0;a0?(n=r/s,i+=n*n):i+=r;return s===1/0?1/0:s*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),u=r(28),s=r(6),c=r(41).f,f=r(20).f,l=r(10).f,p=r(56).trim,h="Number",d=n[h],v=d,y=d.prototype,g=i(r(40)(y))==h,b="trim"in String.prototype,m=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){e=b?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,s=e.slice(2),c=0,f=s.length;co)return NaN;return parseInt(s,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?s(function(){y.valueOf.call(r)}):i(r)!=h)?a(new v(m(e)),r,d):m(e)};for(var _,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,_=w[x])&&!o(d,_)&&l(d,_,f(v,_));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(35),i=r(134),a=r(107),u=1..toFixed,s=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l="0",p=function(t,e){for(var r=-1,n=e;++r<6;)n+=t*c[r],c[r]=n%1e7,n=s(n/1e7)},h=function(t){for(var e=6,r=0;--e>=0;)r+=c[e],c[e]=s(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(l,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*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(6)(function(){u.call({})})),"Number",{toFixed:function(t){var e,r,n,u,s=i(this,f),c=o(t),g="",b=l;if(c<0||c>20)throw RangeError(f);if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(g="-",s=-s),s>1e-21)if(e=y(s*v(2,69,1))-69,r=e<0?s*v(2,-e,1):s/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<0?(u=b.length,b=g+(u<=c?"0."+a.call(l,c-u)+b:b.slice(0,u-c)+"."+b.slice(u-c))):b=g+b,b}})},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(33).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(33).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(33).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(60),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),u=r(5),s=r(30),c=r(60),f=r(0),l=r(7),p=r(14),h=r(38),d=r(53),v=r(104),y=r(109).set,g=r(101)(),b="Promise",m=u.TypeError,_=u.process,w=u[b],_=u.process,x="process"==c(_),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){}}(),S=function(t,e){return t===e||t===w&&e===i},E=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},P=function(t){return S(w,t)?new k(t):new o(t)},k=o=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw m("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,u=e.resolve,s=e.reject,c=e.domain;try{a?(o||(2==t._h&&I(t),t._h=1),a===!0?r=n:(c&&c.enter(),r=a(n),c&&c.exit()),r===e.promise?s(m("Promise-chain cycle")):(i=E(r))?i.call(r,u,s):u(r)):s(n)}catch(t){s(t)}};r.length>i;)a(r[i++]);t._c=[],t._n=!1,e&&!t._h&&T(t)})}},T=function(t){y.call(u,function(){var e,r,n,o=t._v;if(C(t)&&(e=A(function(){x?_.emit("unhandledRejection",o,t):(r=u.onunhandledrejection)?r({promise:t,reason:o}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=x||C(t)?2:1),t._a=void 0,e)throw e.error})},C=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||!C(e.promise))return!1;return!0},I=function(t){y.call(u,function(){var e;x?_.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},R=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))},D=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw m("Promise can't be resolved itself");(e=E(t))?g(function(){var n={_w:r,_d:!1};try{e.call(t,s(D,n,1),s(R,n,1))}catch(t){R.call(n,t)}}):(r._v=t,r._s=1,M(r,!1))}catch(t){R.call({_w:r,_d:!1},t)}}};j||(w=function(t){h(this,w,b,"_h"),p(t),n.call(this);try{t(s(D,this,1),s(R,this,1))}catch(t){R.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=P(v(this,w));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=x?_.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)}}),k=function(){var t=new n;this.promise=t,this.resolve=s(D,t,1),this.reject=s(R,t,1)}),f(f.G+f.W+f.F*!j,{Promise:w}),r(55)(w,b),r(44)(b),i=r(29)[b],f(f.S+f.F*!j,b,{reject:function(t){var e=P(this),r=e.reject;return r(t),e.promise}}),f(f.S+f.F*(a||!j),b,{resolve:function(t){if(t instanceof w&&S(t.constructor,this))return t;var e=P(this),r=e.resolve;return r(t),e.promise}}),f(f.S+f.F*!(j&&r(73)(function(t){w.all(t).catch(O)})),b,{all:function(t){var e=this,r=P(e),n=r.resolve,o=r.reject,i=A(function(){var r=[],i=0,a=1;d(t,!1,function(t){var u=i++,s=!1;r.push(void 0),a++,e.resolve(t).then(function(t){s||(s=!0,r[u]=t,--a||n(r))},o)}),--a||n(r)});return i&&o(i.error),r.promise},race:function(t){var e=this,r=P(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,u=Function.apply;n(n.S+n.F*!r(6)(function(){a(function(){})}),"Reflect",{apply:function(t,e,r){var n=o(t),s=i(r);return a?a(n,e,s):u.call(n,e,s)}})},function(t,e,r){var n=r(0),o=r(40),i=r(14),a=r(2),u=r(7),s=r(6),c=r(138),f=(r(5).Reflect||{}).construct,l=s(function(){function t(){}return!(f(function(){},[],t)instanceof t)}),p=!s(function(){f(function(){})});n(n.S+n.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var r=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(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 s=r.prototype,h=o(u(s)?s:Object.prototype),d=Function.apply.call(t,h,e);return u(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,u,f=arguments.length<3?t:arguments[2];return c(t)===f?t[e]:(r=o.f(t,e))?a(r,"value")?r.value:void 0!==r.get?r.get.call(f):void 0:s(u=i(t))?n(u,e,f):void 0}var o=r(20),i=r(21),a=r(13),u=r(0),s=r(7),c=r(2);u(u.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 s,p,h=arguments.length<4?t:arguments[3],d=i.f(f(t),e);if(!d){if(l(p=a(t)))return n(p,e,r,h);d=c(0)}return u(d,"value")?!(d.writable===!1||!l(h))&&(s=i.f(h,e)||c(0),s.value=r,o.f(h,e,s),!0):void 0!==d.set&&(d.set.call(h,r),!0)}var o=r(10),i=r(20),a=r(21),u=r(13),s=r(0),c=r(34),f=r(2),l=r(7);s(s.S,"Reflect",{set:n})},function(t,e,r){var n=r(5),o=r(94),i=r(10).f,a=r(41).f,u=r(72),s=r(70),c=n.RegExp,f=c,l=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=u(t),i=void 0===e;return!r&&n&&t.constructor===c&&i?t:o(d?new f(n&&!i?t.source:t,e):f((n=t instanceof c)?t.source:t,n&&i?s.call(t):e),r?this:l,c)};for(var v=(function(t){t in c||i(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})}),y=a(f),g=0;y.length>g;)v(y[g++]);l.constructor=c,c.prototype=l,r(16)(n,"RegExp",c)}r(44)("RegExp")},function(t,e,r){r(69)("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(69)("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(69)("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(69)("split",2,function(t,e,n){"use strict";var o=r(72),i=n,a=[].push,u="split",s="length",c="lastIndex";if("c"=="abbc"[u](/(b)*/)[1]||4!="test"[u](/(?:)/,-1)[s]||2!="ab"[u](/(?:ab)*/)[s]||4!="."[u](/(.?)(.?)/)[s]||"."[u](/()()/)[s]>1||""[u](/.?/)[s]){var f=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,u,l,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,b=new RegExp(t.source,v+"g");for(f||(n=new RegExp("^"+b.source+"$(?!\\s)",v));(u=b.exec(r))&&(l=u.index+u[0][s],!(l>y&&(d.push(r.slice(y,u.index)),!f&&u[s]>1&&u[0].replace(n,function(){for(h=1;h1&&u.index=g)));)b[c]===u.index&&b[c]++;return y===r[s]?!p&&b.test("")||d.push(""):d.push(r.slice(y)),d[s]>g?d.slice(0,g):d}}else"0"[u](void 0,0)[s]&&(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(70),i=r(9),a="toString",u=/./[a],s=function(t){r(16)(RegExp.prototype,a,t,!0)};r(6)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?s(function(){var t=n(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):u.name!=a&&s(function(){return u.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",u=""[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),s=void 0===r?n:Math.min(o(r),n),c=String(t);return u?u.call(e,c,s):e.slice(s-c.length,s)===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=[],u=0;r>u;)a.push(String(e[u++])),u1?arguments[1]:void 0,e.length)),n=String(t);return u?u.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(56)("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),u=r(16),s=r(33).KEY,c=r(6),f=r(76),l=r(55),p=r(46),h=r(8),d=r(157),v=r(111),y=r(247),g=r(246),b=r(96),m=r(2),_=r(18),w=r(28),x=r(34),O=r(40),j=r(149),S=r(20),E=r(10),P=r(42),k=S.f,A=E.f,M=j.f,T=n.Symbol,C=n.JSON,I=C&&C.stringify,R="prototype",D=h("_hidden"),L=h("toPrimitive"),F={}.propertyIsEnumerable,N=f("symbol-registry"),U=f("symbols"),B=f("op-symbols"),V=Object[R],W="function"==typeof T,z=n.QObject,q=!z||!z[R]||!z[R].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=k(V,e);n&&delete V[e],A(t,e,r),n&&t!==V&&A(V,e,n)}:A,Y=function(t){var e=U[t]=O(T[R]);return e._k=t,e},H=W&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},K=function(t,e,r){return t===V&&K(B,e,r),m(t),e=w(e,!0),m(r),o(U,e)?(r.enumerable?(o(t,D)&&t[D][e]&&(t[D][e]=!1),r=O(r,{enumerable:x(0,!1)})):(o(t,D)||A(t,D,x(1,{})),t[D][e]=!0),G(t,e,r)):A(t,e,r)},$=function(t,e){m(t);for(var r,n=g(e=_(e)),o=0,i=n.length;i>o;)K(t,r=n[o++],e[r]);return t},Z=function(t,e){return void 0===e?O(t):$(O(t),e)},J=function(t){var e=F.call(this,t=w(t,!0));return!(this===V&&o(U,t)&&!o(B,t))&&(!(e||!o(this,t)||!o(U,t)||o(this,D)&&this[D][t])||e)},X=function(t,e){if(t=_(t),e=w(e,!0),t!==V||!o(U,e)||o(B,e)){var r=k(t,e);return!r||!o(U,e)||o(t,D)&&t[D][e]||(r.enumerable=!0),r}},Q=function(t){for(var e,r=M(_(t)),n=[],i=0;r.length>i;)o(U,e=r[i++])||e==D||e==s||n.push(e);return n},tt=function(t){for(var e,r=t===V,n=M(r?B:_(t)),i=[],a=0;n.length>a;)!o(U,e=n[a++])||r&&!o(V,e)||i.push(U[e]);return i};W||(T=function(){if(this instanceof T)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,D)&&o(this[D],t)&&(this[D][t]=!1),G(this,t,x(1,r))};return i&&q&&G(V,t,{configurable:!0,set:e}),Y(t)},u(T[R],"toString",function(){return this._k}),S.f=X,E.f=K,r(41).f=j.f=Q,r(62).f=J,r(75).f=tt,i&&!r(39)&&u(V,"propertyIsEnumerable",J,!0),d.f=function(t){return Y(h(t))}),a(a.G+a.W+a.F*!W,{Symbol:T});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=P(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]=T(t)},keyFor:function(t){if(H(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:Z,defineProperty:K,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),C&&a(a.S+a.F*(!W||c(function(){var t=T();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!H(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&&b(e)||(e=function(t,e){if(r&&(e=r.call(this,t,e)),!H(e))return e}),n[1]=e,I.apply(C,n)}}}),T[R][L]||r(15)(T[R],L,T[R].valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},function(t,e,r){"use strict";var n=r(0),o=r(77),i=r(110),a=r(2),u=r(45),s=r(11),c=r(7),f=r(5).ArrayBuffer,l=r(104),p=i.ArrayBuffer,h=i.DataView,d=o.ABV&&f.isView,v=p.prototype.slice,y=o.VIEW,g="ArrayBuffer";n(n.G+n.W+n.F*(f!==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=u(t,r),o=u(void 0===e?r:e,r),i=new(l(this,p))(s(o-n)),c=new h(this),f=new h(i),d=0;n0?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(67)(!0);n(n.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r(52)("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,u=n>>16,s=o>>16,c=(u*a>>>0)+(i*a>>>16);return u*s+(c>>16)+((i*s>>>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,u=n>>>16,s=o>>>16,c=(u*a>>>0)+(i*a>>>16);return u*s+(c>>>16)+((i*s>>>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(74),"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(74),"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),u=r(89);n(n.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,r=i(t),n=a.f,s=o(r),c={},f=0;s.length>f;)u(c,e=s[f++],n(r,e));return c}})},function(t,e,r){"use strict";var n=r(0),o=r(12),i=r(28),a=r(21),u=r(20).f;r(9)&&n(n.P+r(74),"Object",{__lookupGetter__:function(t){var e,r=o(this),n=i(t,!0);do if(e=u(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),u=r(20).f;r(9)&&n(n.P+r(74),"Object",{__lookupSetter__:function(t){var e,r=o(this),n=i(t,!0);do if(e=u(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(29),a=r(101)(),u=r(8)("observable"),s=r(14),c=r(2),f=r(38),l=r(43),p=r(15),h=r(53),d=h.RETURN,v=function(t){return null==t?void 0:s(t)},y=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},b=function(t){g(t)||(t._o=void 0,y(t))},m=function(t,e){c(t),this._c=void 0,this._o=t,t=new _(this);try{var r=e(t),n=r;null!=r&&("function"==typeof r.unsubscribe?r=function(){n.unsubscribe()}:s(r),this._c=r)}catch(e){return void t.error(e)}g(this)&&y(this)};m.prototype=l({},{unsubscribe:function(){b(this)}});var _=function(t){this._s=t};_.prototype=l({},{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{b(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){f(this,w,"Observable","_f")._f=s(t)};l(w.prototype,{subscribe:function(t){return new m(t,this._f)},forEach:function(t){var e=this;return new(i.Promise||o.Promise)(function(r,n){s(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(t){n(t),o.unsubscribe()}},error:n,complete:r})})}}),l(w,{from:function(t){var e="function"==typeof this?this:w,r=v(c(t)[u]);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);t1?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(56)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,r){"use strict";r(56)("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),u=r(54),s=r(8),c=s("iterator"),f=s("toStringTag"),l=u.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,l),g[f]||a(g,f,v),u[v]=l;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(71),a=r(248),u=n.navigator,s=!!u&&/MSIE .\./.test(u.userAgent),c=function(t){return s?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*s,{setTimeout:c(n.setTimeout),setInterval:c(n.setInterval)})},function(t,e,r){r(371),r(310),r(312),r(311),r(314),r(316),r(321),r(315),r(313),r(323),r(322),r(318),r(319),r(317),r(309),r(320),r(324),r(325),r(277),r(279),r(278),r(327),r(326),r(297),r(307),r(308),r(298),r(299),r(300),r(301),r(302),r(303),r(304),r(305),r(306),r(280),r(281),r(282),r(283),r(284),r(285),r(286),r(287),r(288),r(289),r(290),r(291),r(292),r(293),r(294),r(295),r(296),r(358),r(363),r(370),r(361),r(353),r(354),r(359),r(364),r(366),r(349),r(350),r(351),r(352),r(355),r(356),r(357),r(360),r(362),r(365),r(367),r(368),r(369),r(272),r(274),r(273),r(276),r(275),r(261),r(259),r(265),r(262),r(268),r(270),r(258),r(264),r(255),r(269),r(253),r(267),r(266),r(260),r(263),r(252),r(254),r(257),r(256),r(271),r(113),r(343),r(348),r(159),r(344),r(345),r(346),r(347),r(328),r(158),r(160),r(161),r(383),r(372),r(373),r(378),r(381),r(382),r(376),r(379),r(377),r(380),r(374),r(375),r(329),r(330),r(331),r(332),r(333),r(336),r(334),r(335),r(337),r(338),r(339),r(340),r(342),r(341),r(384),r(410),r(413),r(412),r(414),r(415),r(411),r(416),r(417),r(395),r(398),r(394),r(392),r(393),r(396),r(397),r(387),r(409),r(418),r(386),r(388),r(390),r(389),r(391),r(400),r(401),r(403),r(402),r(405),r(404),r(406),r(407),r(408),r(385),r(399),r(421),r(420),r(419),t.exports=r(29)},function(t,e,r){"use strict";function n(t,e,r){var n,o,i=t.length,a=e.arrayArgs.length,u=e.indexArgs.length>0,s=[],c=[],f=0,l=0;for(n=0;n=0;--n)f=t[n],s.push(["for(i",n,"=0;i",n,"0&&s.push(["index[",l,"]-=s",l].join("")),s.push(["++index[",f,"]"].join(""))),s.push("}")}return s.join("\n")}function o(t,e,r,o){for(var i=e.length,a=r.arrayArgs.length,u=r.blockSize,s=r.indexArgs.length>0,c=[],f=0;f0;){"].join("")),c.push(["if(j",f,"<",u,"){"].join("")),c.push(["s",e[f],"=j",f].join("")),c.push(["j",f,"=0"].join("")),c.push(["}else{s",e[f],"=",u].join("")),c.push(["j",f,"-=",u,"}"].join("")),s&&c.push(["index[",e[f],"]=j",f].join(""));for(var f=0;f0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function s(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,s=new Array(t.arrayArgs.length),f=new Array(t.arrayArgs.length),l=0;l0&&w.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var x=new Array(r),l=0;l3&&_.push(a(t.pre,t,f));var E=a(t.body,t,f),P=i(y);P3&&_.push(a(t.post,t,f)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+_.join("\n")+"\n----------");var k=[t.funcName||"unnamed","_cwise_loop_",s[0].join("s"),"m",P,u(f)].join(""),A=new Function(["function ",k,"(",m.join(","),"){",_.join("\n"),"} return ",k].join(""));return A()}var c=r(181);t.exports=s},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=[],u=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],s=[],c=[],f=0;f0&&(s.push("array"+t.arrayArgs[0]+".shape.length===array"+l+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[f]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+l+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[f])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+s.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 f=0;f=0){var c=b[s],f=h(n);f&j&&(c.lvalue=!0),f&S&&(c.rvalue=!0),++c.count,u(n,c.name)}else i(a)||u(n,e(a))}else if("Literal"===n.type)"string"==typeof n.value&&u(n,l(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=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 u(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 s(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 f(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 l(t){return"eval"===t||"arguments"===t}function p(t){if(se&&f(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:fe,column:ce-le-t}};ce=pe&&V({},oe.UnexpectedToken,"ILLEGAL");else if(42===r){if(47===ue.charCodeAt(ce+1))return++ce,++ce,void(ye.comments&&(n=ue.slice(t+2,ce-2),e.end={line:fe,column:ce-le},h("Block",n,t,ce,e)));++ce}else++ce;V({},oe.UnexpectedToken,"ILLEGAL")}function y(){var t,e;for(e=0===ce;ce>>="===n?(ce+=4,{type:Qt.Punctuator,value:n,lineNumber:fe,lineStart:le,start:o,end:ce}):(r=n.substr(0,3),">>>"===r||"<<="===r||">>="===r?(ce+=3,{type:Qt.Punctuator,value:r,lineNumber:fe,lineStart:le,start:o,end:ce}):(e=r.substr(0,2),a===e[1]&&"+-<>&|".indexOf(a)>=0||"=>"===e?(ce+=2,{type:Qt.Punctuator,value:e,lineNumber:fe,lineStart:le,start:o,end:ce}):"<>=!+-*%&|^/".indexOf(a)>=0?(++ce,{type:Qt.Punctuator,value:a,lineNumber:fe,lineStart:le,start:o,end:ce}):void V({},oe.UnexpectedToken,"ILLEGAL")))}function x(t){for(var e="";ce=0&&ce0&&(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 C(t){return t.type===Qt.Identifier||t.type===Qt.Keyword||t.type===Qt.BooleanLiteral||t.type===Qt.NullLiteral}function I(){var t,e;if(t=ye.tokens[ye.tokens.length-1],!t)return T();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():T();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 T()}return ee.indexOf(e.value)>=0?w():T()}return T()}return"Keyword"===t.type&&"this"!==t.value?T():w()}function R(){var t;return y(),ce>=pe?{type:Qt.EOF,lineNumber:fe,lineStart:le,start:ce,end:ce}:(t=ue.charCodeAt(ce),u(t)?_():40===t||41===t||59===t?w():39===t||34===t?E():46===t?r(ue.charCodeAt(ce+1))?S():w():r(t)?S():ye.tokenize&&47===t?I():w())}function D(){var t,e,r;return y(),t={start:{line:fe,column:ce-le}},e=R(),t.end={line:fe,column:ce-le},e.type!==Qt.EOF&&(r=ue.slice(e.start,e.end),ye.tokens.push({type:te[e.type],value:r,range:[e.start,e.end],loc:t})),e}function L(){var t;return t=de,ce=t.end,fe=t.lineNumber,le=t.lineStart,de="undefined"!=typeof ye.tokens?D():R(),ce=t.end,fe=t.lineNumber,le=t.lineStart,t}function F(){var t,e,r;t=ce,e=fe,r=le,de="undefined"!=typeof ye.tokens?D():R(),ce=t,fe=e,le=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=fe,r=le,y(),n=fe!==e,ce=t,fe=e,le=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>="===t||">>>="===t||"&="===t||"^="===t||"|="===t)}function $(){var t,e=ce,r=fe,n=le,o=de;return 59===ue.charCodeAt(ce)||Y(";")?void L():(t=fe,y(),fe!==t?(ce=e,fe=r,le=n,void(de=o)):void(de.type===Qt.EOF||Y("}")||z(de)))}function Z(t){return t.type===re.Identifier||t.type===re.MemberExpression}function J(){var t,e=[];for(t=de,q("[");!Y("]");)Y(",")?(L(),e.push(null)):(e.push(yt()),Y("]")||q(","));return L(),he.markEnd(he.createArrayExpression(e),t)}function X(t,e){var r,n,o;return r=se,o=de,n=zt(),e&&se&&l(t[0].name)&&W(e,oe.StrictParamName),se=r,he.markEnd(he.createFunctionExpression(null,t,[],n),o)}function Q(){var t,e;return e=de, -t=L(),t.type===Qt.StringLiteral||t.type===Qt.NumericLiteral?(se&&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===Qt.Identifier?(r=Q(),"get"!==t.value||Y(":")?"set"!==t.value||Y(":")?(q(":"),n=yt(),he.markEnd(he.createProperty("init",r,n),i)):(e=Q(),q("("),t=de,t.type!==Qt.Identifier?(q(")"),W(t,oe.UnexpectedToken,t.value),n=X([])):(o=[_t()],q(")"),n=X(o,t)),he.markEnd(he.createProperty("set",e,n),i)):(e=Q(),q("("),q(")"),n=X([]),he.markEnd(he.createProperty("get",e,n),i))):t.type!==Qt.EOF&&t.type!==Qt.Punctuator?(e=Q(),q(":"),n=yt(),he.markEnd(he.createProperty("init",e,n),i)):void z(t)}function et(){var t,e,r,n,o,i=[],a={},u=String;for(o=de,q("{");!Y("}");)t=tt(),e=t.key.type===re.Identifier?t.key.name:u(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?se&&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),Y("}")||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(Y("("))return rt();if(Y("["))return J();if(Y("{"))return et();if(t=de.type,n=de,t===Qt.Identifier)r=he.createIdentifier(L().value);else if(t===Qt.StringLiteral||t===Qt.NumericLiteral)se&&de.octal&&W(de,oe.StrictOctalLiteral),r=he.createLiteral(L());else if(t===Qt.Keyword){if(H("function"))return Yt();H("this")?(L(),r=he.createThisExpression()):z(L())}else t===Qt.BooleanLiteral?(e=L(),e.value="true"===e.value,r=he.createLiteral(e)):t===Qt.NullLiteral?(e=L(),e.value=null,r=he.createLiteral(e)):Y("/")||Y("/=")?(r="undefined"!=typeof ye.tokens?he.createLiteral(T()):he.createLiteral(M()),F()):z(L());return he.markEnd(r,n)}function ot(){var t=[];if(q("("),!Y(")"))for(;ce":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,u,s,c;if(t=de,s=pt(),n=de,o=ht(n,ve.allowIn),0===o)return s;for(n.prec=o,L(),e=[t,de],a=pt(),i=[s,n,a];(o=ht(de,ve.allowIn))>0;){for(;i.length>2&&o<=i[i.length-2].prec;)a=i.pop(),u=i.pop().value,s=i.pop(),r=he.createBinaryExpression(u,s,a),e.pop(),t=e[e.length-1],he.markEnd(r,t),i.push(r);n=L(),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(),Y("?")&&(L(),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(),K()&&(Z(e)||W({},oe.InvalidLHSInAssignment),se&&e.type===re.Identifier&&l(e.name)&&W(t,oe.StrictLHSAssignment),t=L(),r=yt(),n=he.markEnd(he.createAssignmentExpression(t.value,e,r),o)),n}function gt(){var t,e=de;if(t=yt(),Y(",")){for(t=he.createSequenceExpression([t]);ce0?1:0,le=0,pe=ue.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(F(),de.type===Qt.EOF)return ye.tokens;for(n=L();de.type!==Qt.EOF;)try{n=L()}catch(t){if(n=de,ye.errors){ye.errors.push(t);break}throw t}Zt(),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 Xt(t,e){var r,n;n=String,"string"==typeof t||t instanceof String||(t=n(t)),he=ae,ue=t,ce=0,fe=ue.length>0?1:0,le=0,pe=ue.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=$t(),"undefined"!=typeof ye.comments&&(r.comments=ye.comments),"undefined"!=typeof ye.tokens&&(Zt(),r.tokens=ye.tokens),"undefined"!=typeof ye.errors&&(r.errors=ye.errors)}catch(t){throw t}finally{ye={}}return r}var Qt,te,ee,re,ne,oe,ie,ae,ue,se,ce,fe,le,pe,he,de,ve,ye;Qt={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},te={},te[Qt.BooleanLiteral]="Boolean",te[Qt.EOF]="",te[Qt.Identifier]="Identifier",te[Qt.Keyword]="Keyword",te[Qt.NullLiteral]="Null",te[Qt.NumericLiteral]="Numeric",te[Qt.Punctuator]="Punctuator",te[Qt.StringLiteral]="String",te[Qt.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),fe,ce-le),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:ue.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=Jt,t.parse=Xt,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,u=8*o-n-1,s=(1<>1,f=-7,l=r?o-1:0,p=r?-1:1,h=t[e+l];for(l+=p,i=h&(1<<-f)-1,h>>=-f,f+=u;f>0;i=256*i+t[e+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===i)i=1-c;else{if(i===s)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,u,s,c=8*i-o-1,f=(1<>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?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),e+=a+l>=1?p/s:p*Math.pow(2,1-l),e*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,o),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+h]=255&u,h+=d,u/=256,o-=8);for(a=a<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;r0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.layerClass="Layer",this.name=e.name,this.params=[],this.weights={}}return i(t,[{key:"setWeights",value:function(t){var e=this;this.params.forEach(function(r,n){e.weights[r]=t[n]})}},{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,u.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=f},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){if(!t)return u;for(var e=0;e>",rrshift:">>>"};!function(){for(var t in s){var r=s[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 f={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in f){var r=f[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 l=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_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_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:u,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,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;r2&&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,u.default)(e,r),this.tensor=(0,u.default)(new this._type(e),r)):!e.length&&r.length?this.tensor=(0,u.default)(new this._type(r.reduce(function(t,e){return t*e},1)),r):this.tensor=(0,u.default)(new this._type([]),[]),n.gpu&&weblas?(this._useWeblas=!0,this.createWeblasTensor()):this._useWeblas=!1}return i(t,[{key:"createWeblasTensor",value:function(){if(1===this.tensor.shape.length){var t=[1,this.tensor.shape[0]];this.weblasTensor=new weblas.pipeline.Tensor(t,this.tensor.data)}else if(2===this.tensor.shape.length){var e=this.tensor.shape;this.weblasTensor=new weblas.pipeline.Tensor(e,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,u.default)(e,t))}}},{key:"deleteWeblasTensor",value:function(){this.weblasTensor&&(this.weblasTensor.delete(),delete this.weblasTensor)}},{key:"replaceTensorData",value:function(t){t&&t.length&&t instanceof this._type?this.tensor.data=t:t&&t.length&&t instanceof Array?this.tensor.data=new this._type(t):this.tensor=new this._type([])}}]),t}();e.default=l},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(76)("wks"),o=r(46),i=r(5).Symbol,a="function"==typeof i,u=t.exports=function(t){return n[t]||(n[t]=a&&i[t]||(a?i:o)("Symbol."+t))};u.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(36),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(35);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"),u="toString",s=Function[u],c=(""+s).split(u);r(29).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,r,u){var s="function"==typeof r;s&&(i(r,"name")||o(r,"name",e)),t[e]!==r&&(s&&(i(r,a)||o(r,a,t[e]?""+t[e]:c.join(String(e)))),t===n?t[e]=r:u?t[e]?t[e]=r:o(t,e,r):(delete t[e],o(t,e,r)))})(Function.prototype,u,function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,r){var n=r(0),o=r(6),i=r(23),a=/"/g,u=function(t,e,r,n){var o=String(i(t)),u="<"+e;return""!==r&&(u+=" "+r+'="'+String(n).replace(a,""")+'"'),u+">"+o+""};t.exports=function(t,e){var r={};r[t]=e(u),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(61),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){h.default.expeq(t.tensor);var e=h.default.sum(t.tensor);h.default.divseq(t.tensor,e)}else{if(2!==t.tensor.shape.length)throw new Error("[activations.softmax] tensor shape "+t.tensor.shape+" not supported.");for(var r=0;r1&&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 s(t){return _(t.tensor),this}function c(t){return w(t.tensor),this}function f(t){return x(t.tensor),this}function l(t){return this}Object.defineProperty(e,"__esModule",{value:!0}),e.softmax=o,e.softplus=i,e.softsign=a,e.relu=u,e.tanh=s,e.sigmoid=c,e.hardSigmoid=f,e.linear=l;var p=r(3),h=n(p),d=r(25),v=n(d),y=r(4),g=n(y),b=(0,v.default)({args:["array"],body:function(t){t=Math.log(Math.exp(t)+1)}}),m=(0,v.default)({args:["array"],body:function(t){t/=1+Math.abs(t)}}),_=(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(62),o=r(35),i=r(18),a=r(28),u=r(13),s=r(142),c=Object.getOwnPropertyDescriptor;e.f=r(9)?c:function(t,e){if(t=i(t),e=a(e,!0),s)try{return c(t,e)}catch(t){}if(u(t,e))return o(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(13),o=r(12),i=r(104)("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&&u.indexOf(e)<0&&console.warn("cwise: Unknown argument '"+e+"' passed to expression compiler");for(var r=0;rw;w++)if((p||w in b)&&(v=b[w],y=m(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(f)return!1;return l?-1:c||f?f:x}}},function(t,e,r){var n=r(0),o=r(29),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){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(76)("metadata"),a=i.store||(i.store=new(r(161))),u=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},s=function(t,e,r){var n=u(e,r,!1);return void 0!==n&&n.has(t)},c=function(t,e,r){var n=u(e,r,!1);return void 0===n?void 0:n.get(t)},f=function(t,e,r,n){u(r,n,!0).set(t,e)},l=function(t,e){var r=u(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:u,has:s,get:c,set:f,keys:l,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),u=r(77),s=r(111),c=r(30),f=r(38),l=r(35),p=r(15),h=r(43),d=r(36),v=r(11),y=r(45),g=r(28),b=r(13),m=r(155),_=r(60),w=r(7),x=r(12),O=r(96),j=r(40),S=r(21),E=r(41).f,P=r(113),k=r(46),A=r(8),M=r(26),T=r(67),C=r(105),I=r(114),R=r(54),L=r(73),D=r(44),F=r(89),N=r(135),U=r(10),B=r(20),V=U.f,W=B.f,z=o.RangeError,q=o.TypeError,G=o.Uint8Array,Y="ArrayBuffer",H="Shared"+Y,K="BYTES_PER_ELEMENT",$="prototype",Z=Array[$],J=s.ArrayBuffer,X=s.DataView,Q=M(0),tt=M(2),et=M(3),rt=M(4),nt=M(5),ot=M(6),it=T(!0),at=T(!1),ut=I.values,st=I.keys,ct=I.entries,ft=Z.lastIndexOf,lt=Z.reduce,pt=Z.reduceRight,ht=Z.join,dt=Z.sort,vt=Z.slice,yt=Z.toString,gt=Z.toLocaleString,bt=A("iterator"),mt=A("toStringTag"),_t=k("typed_constructor"),wt=k("def_constructor"),xt=u.CONSTR,Ot=u.TYPED,jt=u.VIEW,St="Wrong length!",Et=M(1,function(t,e){return Ct(C(t,t[wt]),e)}),Pt=i(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),kt=!!G&&!!G[$].set&&i(function(){new G(1).set({})}),At=function(t,e){if(void 0===t)throw q(St);var r=+t,n=v(t);if(e&&!m(r,n))throw z(St);return n},Mt=function(t,e){var r=d(t);if(r<0||r%e)throw z("Wrong offset!");return r},Tt=function(t){if(w(t)&&Ot in t)return t;throw q(t+" is not a typed array!")},Ct=function(t,e){if(!(w(t)&&_t in t))throw q("It is not a typed array constructor!");return new t(e)},It=function(t,e){return Rt(C(t,t[wt]),e)},Rt=function(t,e){for(var r=0,n=e.length,o=Ct(t,n);n>r;)o[r]=e[r++];return o},Lt=function(t,e,r){V(t,e,{get:function(){return this._d[r]}})},Dt=function(t){var e,r,n,o,i,a,u=x(t),s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,p=P(u);if(void 0!=p&&!O(p)){for(a=p.call(u),n=[],e=0;!(i=a.next()).done;e++)n.push(i.value);u=n}for(l&&s>2&&(f=c(f,arguments[2],2)),e=0,r=v(u.length),o=Ct(this,r);r>e;e++)o[e]=l?f(u[e],e):u[e];return o},Ft=function(){for(var t=0,e=arguments.length,r=Ct(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(Tt(this)):Tt(this),arguments)},Bt={copyWithin:function(t,e){return N.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return rt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return F.apply(Tt(this),arguments)},filter:function(t){return It(this,tt(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Tt(this),arguments)},lastIndexOf:function(t){return ft.apply(Tt(this),arguments)},map:function(t){return Et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(Tt(this),arguments)},reduceRight:function(t){return pt.apply(Tt(this),arguments)},reverse:function(){for(var t,e=this,r=Tt(e).length,n=Math.floor(r/2),o=0;o1?arguments[1]:void 0)},sort:function(t){return dt.call(Tt(this),t)},subarray:function(t,e){var r=Tt(this),n=r.length,o=y(t,n);return new(C(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 It(this,vt.call(Tt(this),t,e))},Wt=function(t){Tt(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(St);for(;i255?255:255&n),o.v[d](r*e+o.o,n,Pt)},A=function(t,e){V(t,e,{get:function(){return P(this,e)},set:function(t){return k(this,e,t)},enumerable:!0})};m?(y=r(function(t,r,n,o){f(t,y,c,"_d");var i,a,u,s,l=0,h=0;if(w(r)){if(!(r instanceof J||(s=_(r))==Y||s==H))return Ot in r?Rt(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(St);if(a=d-h,a<0)throw z(St)}else if(a=v(o)*e,a+h>d)throw z(St);u=a/e}else u=At(r,!0),a=u*e,i=new J(a);for(p(t,"_d",{b:i,o:h,l:a,e:u,v:new X(i)});l0?n:r)(t)}},function(t,e){var r=Array.isArray;t.exports=r},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(92),a=r(104)("IE_PROTO"),u=function(){},s="prototype",c=function(){var t,e=r(91)("iframe"),n=i.length,o="<",a=">";for(e.style.display="none",r(94).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[s][i[n]];return c()};t.exports=Object.create||function(t,e){var r;return null!==t?(u[s]=n(t),r=new u,u[s]=null,r[a]=t):r=c(),void 0===e?r:o(r,e)}},function(t,e,r){var n=r(150),o=r(92).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(150),o=r(92);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(36),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(454),i=r(486);t.exports=n},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 n(t){return a(t)?o(t):i(t)}var o=r(440),i=r(456),a=r(64);t.exports=n},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;nMath.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("+f+",v)}"):i.push("return this.data["+f+"]=v}"),i.push("proto.get=function "+r+"_get("+c.join(",")+"){"),n?i.push("return this.data.get("+f+")}"):i.push("return this.data["+f+"]}"),i.push("proto.index=function "+r+"_index(",c.join(),"){return "+f+"}"),i.push("proto.hi=function "+r+"_hi("+c.join(",")+"){return new "+r+"(this.data,"+u.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+u.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var d=u.map(function(t){return"a"+t+"=this.shape["+t+"]"}),v=u.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=0){d=i"+y+"|0;b+=c"+y+"*d;a"+y+"-=d}");i.push("return new "+r+"(this.data,"+u.map(function(t){return"a"+t}).join(",")+","+u.map(function(t){return"c"+t}).join(",")+",b)}"),i.push("proto.step=function "+r+"_step("+c.join(",")+"){var "+u.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+u.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var y=0;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,"+u.map(function(t){return"shape["+t+"]"}).join(",")+","+u.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var a=new Function("CTOR_LIST","ORDER",i.join("\n"));return a(l[t],o)}function a(t){if(c(t))return"buffer";if(f)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 u(t,e,r,n){if(void 0===t){var o=l.array[0];return o([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var u=e.length;if(void 0===r){r=new Array(u);for(var s=u-1,c=1;s>=0;--s)r[s]=c,c*=e[s]}if(void 0===n){n=0;for(var s=0;sm;m++)if(y=e?b(a(d=t[m])[0],d[1]):b(t[m]),y===c||y===f)return y}else for(v=g.call(t);!(d=v.next()).done;)if(y=o(v,b,d.value,e),y===c||y===f)return y};e.BREAK=c,e.RETURN=f},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(109),u="["+a+"]",s="​…",c=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t,e,r){var o={},u=i(function(){return!!a[t]()||s[t]()!=s}),c=o[t]=u?e(p):a[t];r&&(o[r]=c),n(n.P+n.F*u,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},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(566),t.exports.gbmv=r(565),t.exports.symv=r(572),t.exports.sbmv=r(568),t.exports.spmv=r(569),t.exports.trmv=r(578),t.exports.tbmv=r(575),t.exports.trsv=r(579),t.exports.tbsv=r(576),t.exports.tpsv=r(577),t.exports.ger=r(567),t.exports.syr=r(573),t.exports.spr=r(570),t.exports.syr2=r(574),t.exports.spr2=r(571),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){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(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,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=a(e=Object(t),o))?r:i?n(e):"Object"==(u=n(e))&&"function"==typeof e.callee?"Arguments":u}},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,r){function n(t){return null!=t&&i(t.length)&&!o(t)}var o=r(179),i=r(125);t.exports=n},function(t,e,r){function n(t){return null==t?"":o(t)}var o=r(469);t.exports=n},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 u(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,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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;r0&&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,u=t.nbRow,s=void 0===u?3:u,c=t.nbCol,f=void 0===c?3:c,l=t.activation,h=void 0===l?"linear":l,d=t.borderMode,v=void 0===d?"valid":d,y=t.subsample,g=void 0===y?[1,1]:y,b=t.dimOrdering,m=void 0===b?"tf":b,_=t.bias,w=void 0===_||_;if(r.kernelShape=[o,s,f],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"!==m&&"th"!==m)throw new Error(r.name+" [Convolution2D layer] Only tf and th dim ordering are allowed.");return r.dimOrdering=m,r.bias=w,r.params=r.bias?["W","b"]:["W"],r}return u(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,1,0)),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t)}},{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="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]),f=o,l="same"===this.borderMode?Math.max(0,Math.floor((u-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(l/2),d=l-h,v=Math.floor(p/2),y=p-v;this.outputShape=[u,c,f],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],f=i[3],l=r+a+u,p=n+c+f,h=new d.default([],[l,p,o]);b.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){for(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,l=i*a*o,p=new d.default([],[f,l]),h=new d.default([],[l]),v=0,y=0,g=r-i;y<=g;y+=this.subsample[0])for(var m=0,_=n-a;m<=_;m+=this.subsample[1]){var w=(0,j.default)((0,x.default)(t.tensor.hi(y+i,m+a,o).lo(y,m,0)));h.replaceTensorData(w),b.default.assign(p.tensor.pick(v,null),h.tensor),v+=1}return p}},{key:"_w2row",value:function(t){for(var e=t.tensor.shape[2],r=s(this.kernelShape,3),n=r[0],o=r[1],i=r[2],a=o*i*e,u=new d.default([],[a,n]),c=new d.default([],[a]),f=0;ff;)if(u=s[f++],u!=u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}}},function(t,e,r){"use strict";var n=r(5),o=r(0),i=r(16),a=r(43),u=r(34),s=r(53),c=r(38),f=r(7),l=r(6),p=r(73),h=r(55),d=r(95);t.exports=function(t,e,r,v,y,g){var b=n[t],m=b,_=y?"set":"add",w=m&&m.prototype,x={},O=function(t){var e=w[t];i(w,t,"delete"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!f(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 m&&(g||w.forEach&&!l(function(){(new m).entries().next()}))){var j=new m,S=j[_](g?{}:-0,1)!=j,E=l(function(){j.has(1)}),P=p(function(t){new m(t)}),k=!g&&l(function(){for(var t=new m,e=5;e--;)t[_](e,e);return!t.has(-0)});P||(m=e(function(e,r){c(e,m,t);var n=d(new b,e,m);return void 0!=r&&s(r,y,n[_],n),n}),m.prototype=w,w.constructor=m),(E||k)&&(O("delete"),O("has"),y&&O("get")),(k||S)&&O(_),g&&w.clear&&delete w.clear}else m=v.getConstructor(e,t,y,_),a(m.prototype,r),u.NEED=!0;return h(m,t),x[t]=m,o(o.G+o.W+o.F*(m!=b),x),g||v.setStrong(m,t,y),m}},function(t,e,r){"use strict";var n=r(15),o=r(16),i=r(6),a=r(23),u=r(8);t.exports=function(t,e,r){var s=u(t),c=r(a,s,""[t]),f=c[0],l=c[1];i(function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,f),n(RegExp.prototype,s,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.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),u=a("typed_array"),s=a("view"),c=!(!o.ArrayBuffer||!o.DataView),f=c,l=0,p=9,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l1?arguments[1]:void 0,r),s=a>2?arguments[2]:void 0,c=void 0===s?r:o(s,r);c>u;)e[u++]=t;return e}},function(t,e,r){"use strict";var n=r(10),o=r(35);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(103).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(54),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(35),i=r(55),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),u=r(13),s=r(54),c=r(98),f=r(55),l=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,b);var x,O,j,S=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)}},E=e+" Iterator",P=m==y,k=!1,A=t.prototype,M=A[p]||A[d]||m&&A[m],T=M||S(m),C=m?P?S("entries"):T:void 0,I="Array"==e?A.entries||M:M;if(I&&(j=l(I.call(new t)),j!==Object.prototype&&(f(j,E,!0),n||u(j,p)||a(j,p,g))),P&&M&&M.name!==y&&(k=!0,T=function(){return M.call(this)}),n&&!w||!h&&!k&&A[p]||a(A,p,T),s[e]=T,s[E]=g,m)if(x={values:P?T:S(y),keys:_?T:S(v),entries:C},w)for(O in x)O in A||i(A,O,x[O]);else o(o.P+o.F*(h||k),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(110).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,u=n.Promise,s="process"==r(22)(a);t.exports=function(){var t,e,r,c=function(){var n,o;for(s&&(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(s)r=function(){a.nextTick(c)};else if(i){var f=!0,l=document.createTextNode("");new i(c).observe(l,{characterData:!0}),r=function(){l.data=f=!f}}else if(u&&u.resolve){var p=u.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(30)(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(76)("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(36),o=r(23);t.exports=function(t){return function(e,r){var i,a,u=String(o(e)),s=n(r),c=u.length;return s<0||s>=c?t?"":void 0:(i=u.charCodeAt(s),i<55296||i>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?t?u.charAt(s):i:t?u.slice(s,s+2):(i-55296<<10)+(a-56320)+65536)}}},function(t,e,r){var n=r(72),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(36),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(30),u=r(71),s=r(94),c=r(91),f=r(5),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=0,y={},g="onreadystatechange",b=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},m=function(t){b.call(t.data)};p&&h||(p=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return y[++v]=function(){u("function"==typeof t?t:Function(t),e)},n(v),v},h=function(t){delete y[t]},"process"==r(22)(l)?n=function(t){l.nextTick(a(b,t,1))}:d?(o=new d,i=o.port2,o.port1.onmessage=m,n=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",m,!1)):n=g in c("script")?function(t){s.appendChild(c("script"))[g]=function(){s.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,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(77),u=r(15),s=r(43),c=r(6),f=r(38),l=r(36),p=r(11),h=r(41).f,d=r(10).f,v=r(89),y=r(55),g="ArrayBuffer",b="DataView",m="prototype",_="Wrong length!",w="Wrong index!",x=n[g],O=n[b],j=n.Math,S=n.RangeError,E=n.Infinity,P=x,k=j.abs,A=j.pow,M=j.floor,T=j.log,C=j.LN2,I="buffer",R="byteLength",L="byteOffset",D=o?"_b":I,F=o?"_l":R,N=o?"_o":L,U=function(t,e,r){var n,o,i,a=Array(r),u=8*r-e-1,s=(1<>1,f=23===e?A(2,-24)-A(2,-77):0,l=0,p=t<0||0===t&&1/t<0?1:0;for(t=k(t),t!=t||t===E?(o=t!=t?1:0,n=s):(n=M(T(t)/C),t*(i=A(2,-n))<1&&(n--,i*=2),t+=n+c>=1?f/i:f*A(2,1-c),t*i>=2&&(n++,i/=2),n+c>=s?(o=0,n=s):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[l++]=255&o,o/=256,e-=8);for(n=n<0;a[l++]=255&n,n/=256,u-=8);return a[--l]|=128*p,a},B=function(t,e,r){var n,o=8*r-e-1,i=(1<>1,u=o-7,s=r-1,c=t[s--],f=127&c;for(c>>=7;u>0;f=256*f+t[s],s--,u-=8);for(n=f&(1<<-u)-1,f>>=-u,u+=e;u>0;n=256*n+t[s],s--,u-=8);if(0===f)f=1-a;else{if(f===i)return n?NaN:c?-E:E;n+=A(2,e),f-=a}return(c?-1:1)*n*A(2,f-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)},Y=function(t){return U(t,23,4)},H=function(t,e,r){d(t[m],e,{get:function(){return this[r]}})},K=function(t,e,r,n){var o=+r,i=l(o);if(o!=i||i<0||i+e>t[F])throw S(w);var a=t[D]._b,u=i+t[N],s=a.slice(u,u+e);return n?s:s.reverse()},$=function(t,e,r,n,o,i){var a=+r,u=l(a);if(a!=u||u<0||u+e>t[F])throw S(w);for(var s=t[D]._b,c=u+t[N],f=n(+o),p=0;ptt;)(J=Q[tt++])in x||u(x,J,P[J]);i||(X.constructor=x)}var et=new O(new x(2)),rt=O[m].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||s(O[m],{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=Z(this,t);this._b=v.call(Array(e),0),this[F]=e},O=function(t,e,r){f(this,O,b),f(t,x,b);var n=t[F],o=l(e);if(o<0||o>n)throw S("Wrong offset!");if(r=void 0===r?n-o:p(r),o+r>n)throw S(_);this[D]=t,this[N]=o,this[F]=r},o&&(H(x,R,"_l"),H(O,I,"_b"),H(O,R,"_l"),H(O,L,"_o")),s(O[m],{getInt8:function(t){return K(this,1,t)[0]<<24>>24},getUint8:function(t){return K(this,1,t)[0]},getInt16:function(t){var e=K(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=K(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return V(K(this,4,t,arguments[1]))},getUint32:function(t){return V(K(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return B(K(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return B(K(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){$(this,1,t,W,e)},setUint8:function(t,e){$(this,1,t,W,e)},setInt16:function(t,e){$(this,2,t,z,e,arguments[2])},setUint16:function(t,e){$(this,2,t,z,e,arguments[2])},setInt32:function(t,e){$(this,4,t,q,e,arguments[2])},setUint32:function(t,e){$(this,4,t,q,e,arguments[2])},setFloat32:function(t,e){$(this,4,t,Y,e,arguments[2])},setFloat64:function(t,e){$(this,8,t,G,e,arguments[2])}});y(x,g),y(O,b),u(O[m],a.VIEW,!0),e[g]=x,e[b]=O},function(t,e,r){var n=r(5),o=r(29),i=r(39),a=r(157),u=r(10).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},function(t,e,r){var n=r(60),o=r(8)("iterator"),i=r(54);t.exports=r(29).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[n(t)]}},function(t,e,r){"use strict";var n=r(52),o=r(145),i=r(54),a=r(18);t.exports=r(99)(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(33),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-1&&t%1==0&&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;r0&&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,u=t.stride,s=void 0===u?null:u,c=t.borderMode,f=void 0===c?"valid":c;return r.poolLength=a,r.stride=null===s?a:s,r.borderMode=f,r.poolingFunc="max",r}return a(e,t),u(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 l.default([],[e,t.tensor.shape[1]]),n=new l.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;it.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)),s+=1;"average"===this.poolingFunc&&h.default.divseq(n.tensor,s),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 u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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")}}(),s=function(){function t(t,e){for(var r=0;r0&&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,u=t.strides,s=void 0===u?null:u,c=t.borderMode,f=void 0===c?"valid":c,l=t.dimOrdering,p=void 0===l?"tf":l;return r.poolSize=a,r.strides=null===s?a:s,r.borderMode=f,r.dimOrdering=p,r.poolingFunc="max",r}return a(e,t),s(e,[{key:"_calcOutputShape",value:function(t){var e=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=u(this.poolSize,2),a=i[0],s=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]),f="same"===this.borderMode?Math.floor((n+this.strides[1]-1)/this.strides[1]):Math.floor((n-s+this.strides[1])/this.strides[1]),l="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((f-1)*this.strides[1]+s-n)):0,h=Math.floor(l/2),d=l-h,v=Math.floor(p/2),y=p-v;this.outputShape=[c,f,o],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],f=i[3],l=r+a+s,h=n+c+f,v=new p.default([],[l,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=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=u(this.poolSize,2),a=i[0],s=i[1],c=new p.default([],this.outputShape),f=new p.default([],[a,s,o]),l=u(this.inputPadding,4),h=l[0],v=l[1],y=l[2],g=l[3],b=0,m=0;b<=r-a;b+=this.strides[0],m++){var _=0;br-v&&(_=b+a-(r-v));for(var w=0,x=0;w<=n-s;w+=this.strides[1],x++){var O=0;wn-g&&(O=w+s-(n-g)),d.default.assign(f.tensor,t.tensor.hi(b+a,w+s,o).lo(b,w,0));for(var j=0;j0&&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,u=t.strides,s=void 0===u?null:u,c=t.borderMode,f=void 0===c?"valid":c,l=t.dimOrdering,p=void 0===l?"tf":l;return r.poolSize=a,r.strides=null===s?a:s,r.borderMode=f,r.dimOrdering=p,r.poolingFunc="max",r}return a(e,t),s(e,[{key:"_calcOutputShape",value:function(t){var e=u(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=u(this.poolSize,3),s=a[0],c=a[1],f=a[2],l="same"===this.borderMode?Math.floor((r+this.strides[0]-1)/this.strides[0]):Math.floor((r-s+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-f+this.strides[2])/this.strides[2]),d="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.strides[0]+s-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]+f-o)):0,g=Math.floor(d/2),b=d-g,m=Math.floor(v/2),_=v-m,w=Math.floor(y/2),x=y-w;this.outputShape=[l,p,h,i],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],f=a[2],l=a[3],h=a[4],v=a[5],y=r+s+c,g=n+f+l,b=o+h+v,m=new p.default([],[y,g,b,i]);"max"===this.poolingFunc&&d.default.assigns(m.tensor,Number.NEGATIVE_INFINITY),d.default.assign(m.tensor.hi(r+s,n+f,o+h,i).lo(s,f,h,0),t.tensor),t.tensor=m.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=u(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=u(this.poolSize,3),s=a[0],c=a[1],f=a[2],l=new p.default([],this.outputShape),h=new p.default([],[s,c,f,i]),v=u(this.inputPadding,6),y=v[0],g=v[1],b=v[2],m=v[3],_=v[4],w=v[5],x=0,O=0;x<=r-s;x+=this.strides[0],O++){var j=0;xr-g&&(j=x+s-(r-g));for(var S=0,E=0;S<=n-c;S+=this.strides[1],E++){var P=0;Sn-m&&(P=S+c-(n-m));for(var k=0,A=0;k<=o-f;k+=this.strides[2],A++){var M=0;k<_?M=_-k:k+f>o-w&&(M=k+f-(o-w)),d.default.assign(h.tensor,t.tensor.hi(x+s,S+c,k+f,i).lo(x,S,k,0));for(var T=0;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 K(e).length;default:if(o)return G(e).length;r=(""+r).toLowerCase(),o=!0}}function b(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 I(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(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,u=t.length,s=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,u/=2,s/=2,r/=2}var c;if(o){var f=-1;for(c=r;cu&&(r=u-s),c=r;c>=0;c--){for(var l=!0,p=0;po&&(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;a239?4:i>223?3:i>191?2:1;if(o+u<=r){var s,c,f,l;switch(u){case 1:i<128&&(a=i);break;case 2:s=t[o+1],128===(192&s)&&(l=(31&i)<<6|63&s,l>127&&(a=l));break;case 3:s=t[o+1],c=t[o+2],128===(192&s)&&128===(192&c)&&(l=(15&i)<<12|(63&s)<<6|63&c,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:s=t[o+1],c=t[o+2],f=t[o+3],128===(192&s)&&128===(192&c)&&128===(192&f)&&(l=(15&i)<<18|(63&s)<<12|(63&c)<<6|63&f,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,u=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=u}return M(n)}function M(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var o="",i=e;ir)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||re.length)throw new RangeError("Index out of range")}function F(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);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>>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),X.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),X.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;a55295&&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 Y(t){for(var e=[],r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function K(t){return J.toByteArray(W(t))}function $(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Z(t){return t!==t}var J=r(240),X=r(428),Q=r(242);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 u(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 f(null,t)},t.allocUnsafeSlow=function(t){return f(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);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(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,u=n-r,s=Math.min(a,u),c=this.slice(o,i),f=e.slice(r,n),l=0;lo)&&(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 S(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(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),r0&&(o*=256);)n+=this[t+--e]*o;return n},t.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||L(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||L(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||L(t,e,this.length);for(var n=this[t],o=1,i=0;++i=o&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||L(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||L(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||L(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||L(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||L(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||L(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||L(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),X.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=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):F(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):F(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,u=0;for(this[e]=255&t;++i>0)-u&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,u=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/a>>0)-u&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):F(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):F(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=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=0;--i)e[i+r]=this[i+n];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=r;a2?arguments[2]:void 0,f=Math.min((void 0===c?a:o(c,a))-s,a-u),l=1;for(s0;)s in r?r[u]=r[s]:delete r[u],u+=l,s+=l;return r}},function(t,e,r){var n=r(53);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(61),a=r(11);t.exports=function(t,e,r,u,s){n(e);var c=o(t),f=i(c),l=a(c.length),p=s?l-1:0,h=s?-1:1;if(r<2)for(;;){if(p in f){u=f[p],p+=h;break}if(p+=h,s?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;s?p>=0:l>p;p+=h)p in f&&(u=e(u,f[p],p,c));return u}},function(t,e,r){"use strict";var n=r(14),o=r(7),i=r(71),a=[].slice,u={},s=function(t,e,r){if(!(e in u)){for(var n=[],o=0;o1?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(l.prototype,"size",{get:function(){return s(this[v])}}),l},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){f(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?l(0,r.k):"values"==e?l(0,r.v):l(0,[r.k,r.v]):(t._t=void 0,l(1))},r?"entries":"values",!r,!0),p(e)}}},function(t,e,r){var n=r(60),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(34).getWeak,i=r(2),a=r(7),u=r(38),s=r(53),c=r(26),f=r(13),l=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 l(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){u(t,c,e,"_i"),t._i=h++,t._l=void 0,void 0!=n&&s(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&&f(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&&f(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(91)("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(75),i=r(62),a=r(12),u=r(61),s=Object.assign;t.exports=!s||r(6)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=s({},t)[r]||Object.keys(s({},e)).join("")!=n})?function(t,e){for(var r=a(t),s=arguments.length,c=1,f=o.f,l=i.f;s>c;)for(var p,h=u(arguments[c++]),d=f?n(h).concat(f(h)):n(h),v=d.length,y=0;v>y;)l.call(h,p=d[y++])&&(r[p]=h[p]);return r}:s},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),u=a.length,s=0;u>s;)n.f(t,r=a[s++],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):[],u=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?u(t):o(n(t))}},function(t,e,r){var n=r(13),o=r(18),i=r(67)(!1),a=r(104)("IE_PROTO");t.exports=function(t,e){var r,u=o(t),s=0,c=[];for(r in u)r!=a&&n(u,r)&&c.push(r);for(;e.length>s;)n(u,r=e[s++])&&(~i(c,r)||c.push(r));return c}},function(t,e,r){var n=r(42),o=r(18),i=r(62).f;t.exports=function(t){return function(e){for(var r,a=o(e),u=n(a),s=u.length,c=0,f=[];s>c;)i.call(a,r=u[c++])&&f.push(t?[r,a[r]]:a[r]);return f}}},function(t,e,r){var n=r(41),o=r(75),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(56).trim;t.exports=1/n(r(109)+"-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(56).trim,i=r(109),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(108),i=r(23);t.exports=function(t,e,r,a){var u=String(i(t)),s=u.length,c=void 0===r?" ":String(r),f=n(e);if(f<=s||""==c)return u;var l=f-s,p=o.call(c,Math.ceil(l/c.length));return p.length>l&&(p=p.slice(0,l)),a?p+u:u+p}},function(t,e,r){e.f=r(8)},function(t,e,r){"use strict";var n=r(139);t.exports=r(68)("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(70)})},function(t,e,r){"use strict";var n=r(139);t.exports=r(68)("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(34),u=r(147),s=r(141),c=r(7),f=a.getWeak,l=Object.isExtensible,p=s.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=f(t);return e===!0?p(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return s.def(this,t,e)}},y=t.exports=r(68)("WeakMap",d,v,s,!0,!0);7!=(new y).set((Object.freeze||Object)(h),7).get(h)&&(n=s.getConstructor(d),u(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)&&!l(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;o0)throw new Error("cwise: pre() block may not reference array args");if(o0)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),o0)throw new Error("cwise: pre() block may not reference array index");if(o0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(e.shapeArgs.push(o),or.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(425);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;i0)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(78),i=r(520),a=r(521),u=r(522),s=r(523),c=r(524);n.prototype.clear=i,n.prototype.delete=a,n.prototype.get=u,n.prototype.has=s,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,u){var s=-1,c=t.length;for(r||(r=i),u||(u=[]);++s0&&r(f)?e>1?n(f,e-1,r,a,u):o(u,f):a||(u[u.length]=f)}return u}var o=r(441),i=r(494);t.exports=n},function(t,e,r){function n(t,e){return t&&o(t,e,i)}var o=r(449),i=r(49);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&&rp))return!1;var d=f.get(t);if(d&&f.get(e))return d==e;var v=-1,y=!0,g=c&u?new o:void 0;for(f.set(t,e),f.set(e,t);++v=0;--o)n[o]=r,r*=t[o];return c(l.malloc(r,e),t,n,0)}function i(t){"generic"!==t.dtype&&"array"!==t.dtype&&l.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=l.malloc(r,e),o=0;o=0;--o)n[o]=r,r*=t[o];for(var i=l.malloc(r,e),o=0;o=0;--r)i[r]=o,o*=t[r];var a=l.malloc(o,e);for(r=0;r=0;r--)s+=i[r],u=Math.min(u,t[r]);for(r=0,n=0;r0&&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,u=e.gpu,s=void 0!==u&&u;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=s,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.modelDAG={},this.inputTensors={},this._ready=this.initialize(),this.isRunning=!1}return s(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 Promise.all(e.map(function(e){return t.dataRequest(e,t.headers)})).then(function(){return t.createLayers(),Promise.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 Promise(function(n,o){var i=new XMLHttpRequest;i.open("GET",e.filepaths[t],!0),i.responseType=e.filetypes[t];var a=!0,s=!1,c=void 0;try{for(var l,p=(0,f.default)(r)[Symbol.iterator]();!(a=(l=p.next()).done);a=!0){var h=u(l.value,2),d=h[0],v=h[1];i.setRequestHeader(d,v)}}catch(t){s=!0,c=t}finally{try{!a&&p.return&&p.return()}finally{if(s)throw c}}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,_.default)(this.xhrProgress);return Math.round((0,x.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 k))throw new Error("Layer "+i+" specified in model configuration is not implemented!");if("Sequential"===e&&0===o){var u="input",s=a.batch_input_shape.slice(1),c=new k.InputLayer({name:u,shape:s});t.modelLayersMap.set(u,c),t.modelDAG[u]={layerClass:"InputLayer",name:u,inbound:[],outbound:[]},t.inputTensors[u]=new M.default([],s,{gpu:t.gpu})}else if("Model"===e&&"InputLayer"===i){var f=a.batch_input_shape.slice(1);t.inputTensors[a.name]=new M.default([],f,{gpu:t.gpu})}var l=(0,p.default)(a,function(t,e){return(0,d.default)(e)});"activation"in l&&(l.activation=(0,d.default)(l.activation));var h=new k[i](l);if(h.params&&h.params.length){var v=h.params.map(function(e){var r=(0,y.default)(t.data.metadata,function(t){var r=new RegExp("^"+a.name+"_"+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 M.default(new Float32Array(t.data.weights,n,o),i)});h.setWeights(v)}if(t.modelLayersMap.set(a.name,h),t.modelDAG[a.name]={layerClass:i,name:a.name,inbound:[],outbound:[]},"Sequential"===e)if(0===o){var g="input";t.modelDAG[g].outbound.push(a.name),t.modelDAG[a.name].inbound.push(g)}else{var b=r[o-1].config;t.modelDAG[a.name].inbound.push(b.name),t.modelDAG[b.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:"traverseDAG",value:regeneratorRuntime.mark(function t(e){var r,n,o,i,a,u,s,c,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=30;break}if(r=e[0],n=this.modelDAG[r],o=n.layerClass,i=n.inbound,a=n.outbound,"InputLayer"===o){t.next=27;break}u=this.modelLayersMap.get(r),s=i.map(function(t){return f.modelLayersMap.get(t)});case 13:if((0,E.default)(s.map(function(t){return t.hasResult}))){t.next=18;break}return void(t.next=16);case 16:t.next=13;break;case 18:if("Merge"!==o){t.next=22;break}u.result=u.call(s.map(function(t){return new M.default(t.result.tensor.data,t.result.tensor.shape,{gpu:f.gpu})})),t.next=26;break;case 22:if(1===s.length){t.next=24;break}throw new Error("Layer name "+u.name+" has "+s.length+" inbound nodes, but is not a Merge layer.");case 24:c=s[0].result,u.result=u.call(new M.default(c.tensor.data,c.tensor.shape,{gpu:this.gpu}));case 26:u.hasResult=!0;case 27:return t.delegateYield(this.traverseDAG(a),"t0",28);case 28:t.next=31;break;case 30:return t.delegateYield(e.map(function(t){return f.traverseDAG([t])}),"t1",31);case 31:case"end":return t.stop()}},t,this)})},{key:"predict",value:function(t){var e=this;this.isRunning=!0;var r=(0,b.default)(this.inputTensors);if(!(0,j.default)((0,b.default)(t),r))throw this.isRunning=!1,new Error("predict() must take an object where the keys are the named inputs of the model: "+r+".");if(!(0,E.default)(r,function(e){return t[e]instanceof Float32Array}))throw this.isRunning=!1,new Error("predict() must take an object where the values are the flattened data as Float32Array.");var n=!0,o=!1,i=void 0;try{for(var u,s=this.modelLayersMap.values()[Symbol.iterator]();!(n=(u=s.next()).done);n=!0){var c=u.value;c.hasResult=!1}}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}r.forEach(function(r){var n=e.modelLayersMap.get(r);e.inputTensors[r]=new M.default(t[r],n.shape,{gpu:e.gpu}),n.result=n.call(e.inputTensors[r]),n.hasResult=!0});for(var f=this.traverseDAG(r);!f.next().done;);var l=this.data.model.class_name;if("Sequential"===l){var p=(0,y.default)((0,_.default)(this.modelDAG),function(t){return!t.outbound.length}),h=this.modelLayersMap.get(p.name),d=h.result,v={output:d.tensor.data};return this.isRunning=!1,v}if("Model"===l){var g=function(){var t=(0,_.default)(e.modelDAG).filter(function(t){return!t.outbound.length}),r={};return t.forEach(function(t){var n=e.modelLayersMap.get(t.name),o=n.result;r[t.name]=o.tensor.data}),e.isRunning=!1,{v:r}}();if("object"===("undefined"==typeof g?"undefined":a(g)))return g.v}}}]),t}();e.default=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")}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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){if(!(0,l.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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.alpha),t}}]),e}(c.default),h=function(){this._compute=(0,l.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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){return(0,f.relu)(t,{alpha:this.alpha}),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 u=function(){function t(t,e){for(var r=0;r0&&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,l.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),u(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 u=function(){function t(t,e){for(var r=0;r0&&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,l.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),u(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 u=function(){function t(t,e){for(var r=0;r0&&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,l.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),u(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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){return this._compute(t.tensor,this.theta),t}}]),e}(c.default),h=function(){this._compute=(0,l.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(188),i=n(o),a=r(189),u=n(a),s=r(187),c=n(s),f=r(190),l=n(f),p=r(192),h=n(p),d=r(191),v=n(d);e.LeakyReLU=i.default,e.PReLU=u.default,e.ELU=c.default,e.ParametricSoftplus=l.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 u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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")}}(),s=function(){function t(t,e){for(var r=0;r0&&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),s(e,[{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=i+(i-1)*(this.atrousRate[0]-1),c=a+(a-1)*(this.atrousRate[1]-1),f="same"===this.borderMode?Math.floor((e+this.subsample[0]-1)/this.subsample[0]):Math.floor((e-s+this.subsample[0])/this.subsample[0]),l="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((f-1)*this.subsample[0]+s-e)):0,d="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.subsample[1]+c-r)):0,v=Math.floor(h/2),y=h-v,g=Math.floor(d/2),b=d-g;this.outputShape=[f,l,p],this.inputPadding=[v,y,g,b]}},{key:"_im2col",value:function(t){for(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,p=i*a*o,h=i+(i-1)*(this.atrousRate[0]-1),v=a+(a-1)*(this.atrousRate[1]-1),g=new f.default([],[l,p]),m=new f.default([],[p]),_=0,w=0,x=r-h;w<=x;w+=this.subsample[0])for(var O=0,j=n-v;O<=j;O+=this.subsample[1]){var S=(0,b.default)((0,y.default)(t.tensor.hi(w+h,O+v,o).lo(w,O,0).step(this.atrousRate[0],this.atrousRate[1],1)));m.replaceTensorData(S),d.default.assign(g.tensor.pick(_,null),m.tensor),_+=1}return g}}]),e}(p.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.filterLength,s=void 0===u?1:u,c=t.activation,f=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.");return r.params=r.bias?["W","b"]:["W"],r._conv2d=new l.default({nbFilter:a,nbRow:s,nbCol:1,activation:f,borderMode:h,subsample:[v,1],dimOrdering:"th",bias:g}),r}return a(e,t),u(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 u(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,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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;r0&&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,u=t.kernelDim1,s=void 0===u?1:u,c=t.kernelDim2,f=void 0===c?1:c,l=t.kernelDim3,h=void 0===l?1:l,d=t.activation,v=void 0===d?"linear":d,y=t.borderMode,g=void 0===y?"valid":y,b=t.subsample,m=void 0===b?[1,1,1]:b,_=t.dimOrdering,w=void 0===_?"tf":_,x=t.bias,O=void 0===x||x;if(r.kernelShape=[o,s,f,h],r.activation=p[v],"valid"!==g&&"same"!==g)throw new Error(r.name+" [Convolution3D layer] Invalid borderMode.");if(r.borderMode=g,r.subsample=m,"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 u(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,4,1,0)),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t)}},{key:"_calcOutputShape",value:function(t){var e=t.tensor.shape[0],r=t.tensor.shape[1],n=t.tensor.shape[2],o=s(this.kernelShape,4),i=o[0],a=o[1],u=o[2],c=o[3],f="same"===this.borderMode?Math.floor((e+this.subsample[0]-1)/this.subsample[0]):Math.floor((e-a+this.subsample[0])/this.subsample[0]),l="same"===this.borderMode?Math.floor((r+this.subsample[1]-1)/this.subsample[1]):Math.floor((r-u+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((f-1)*this.subsample[0]+a-e)):0,v="same"===this.borderMode?Math.max(0,Math.floor((l-1)*this.subsample[1]+u-r)):0,y="same"===this.borderMode?Math.max(0,Math.floor((p-1)*this.subsample[2]+c-n)):0,g=Math.floor(d/2),b=d-g,m=Math.floor(v/2),_=v-m,w=Math.floor(y/2),x=y-w;this.outputShape=[f,l,p,h],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],f=a[2],l=a[3],p=a[4],h=a[5],v=r+u+c,y=n+f+l,g=o+p+h,m=new d.default([],[v,y,g,i]);b.default.assign(m.tensor.hi(r+u,n+f,o+p,i).lo(u,f,p,0),t.tensor),t.tensor=m.tensor}return t}},{key:"_vol2col",value:function(t){for(var e=s(t.tensor.shape,4),r=e[0],n=e[1],o=e[2],i=e[3],a=this.kernelShape[1],u=this.kernelShape[2],c=this.kernelShape[3],f=this.outputShape[0],l=this.outputShape[1],p=this.outputShape[2],h=f*l*p,v=a*u*c*i,y=new d.default([],[h,v]),g=new d.default([],[v]),m=0,_=0,w=r-a;_<=w;_+=this.subsample[0])for(var O=0,S=n-u;O<=S;O+=this.subsample[1])for(var E=0,P=o-c;E<=P;E+=this.subsample[2]){var k=(0,j.default)((0,x.default)(t.tensor.hi(_+a,O+u,E+c,i).lo(_,O,E,0)));g.replaceTensorData(k),b.default.assign(y.tensor.pick(m,null),g.tensor),m+=1}return y}},{key:"_w2row",value:function(t){for(var e=t.tensor.shape[3],r=s(this.kernelShape,4),n=r[0],o=r[1],i=r[2],a=r[3],u=o*i*a*e,c=new d.default([],[u,n]),f=new d.default([],[u]),l=0;l0&&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,u=t.nbRow,s=void 0===u?1:u,c=t.nbCol,f=void 0===c?1:c,l=t.outputShape,h=void 0===l?[]:l,d=t.activation,v=void 0===d?"linear":d,y=t.borderMode,g=void 0===y?"valid":y,b=t.subsample,m=void 0===b?[1,1]:b,_=t.dimOrdering,w=void 0===_?"tf":_,x=t.bias,O=void 0===x||x;if(r.kernelShape=[o,s,f],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=m,"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 u(e,t),c(e,[{key:"setWeights",value:function(t){"th"===this.dimOrdering&&(t[0].tensor=t[0].tensor.transpose(2,3,1,0)),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setWeights",this).call(this,t)}},{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],u="same"===this.borderMode?Math.max(0,Math.floor((e-1)*this.subsample[0]+n-i)):0,s="same"===this.borderMode?Math.max(0,Math.floor((r-1)*this.subsample[1]+o-a)):0,c=Math.floor(u/2),f=u-c,l=Math.floor(s/2),p=s-l;this.outputPadding=[c,f,l,p]}},{key:"_im2col",value:function(t){for(var e=s(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]),u=0;u0&&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,u=t.nbRow,s=void 0===u?1:u,c=t.nbCol,f=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,b=void 0===y?[1,1]:y,m=t.depthMultiplier,_=void 0===m?1:m,w=t.dimOrdering,x=void 0===w?"tf":w,O=t.bias,j=void 0===O||O;if(r.activation=l[h],"valid"!==v&&"same"!==v)throw new Error(r.name+" [SeparableConvolution2D layer] Invalid borderMode.");if(r.borderMode=v,r.subsample=b,r.depthMultiplier=_,"tf"!==x&&"th"!==x)throw new Error(r.name+" [SeparableConvolution2D layer] Only tf and th dim ordering are allowed.");r.dimOrdering=x,r.bias=j,r.params=r.bias?["depthwise_kernel","pointwise_kernel","b"]:["depthwise_kernel","pointwise_kernel"];var S={nbFilter:r.depthMultiplier,nbRow:s,nbCol:f,activation:"linear",borderMode:v,subsample:b,dimOrdering:x,bias:!1},E={nbFilter:o,nbRow:1,nbCol:1,activation:"linear",borderMode:v,subsample:[1,1],dimOrdering:x,bias:!1};return r._depthwiseConv=new g.default(S),r._pointwiseConv=new g.default(E),r}return u(e,t),c(e,[{key:"call",value:function(t){this._depthwiseConv._calcOutputShape(t);var e=this._depthwiseConv.outputShape[0],r=this._depthwiseConv.outputShape[1],n=new h.default([],[e,r,this.depthMultiplier]),o=s(t.tensor.shape,3),i=o[0],a=o[1],u=o[2],c=new h.default([],[i,a,1]),f=this.weights.depthwise_kernel.tensor.shape.slice();f[2]=1;for(var l=new h.default([],f),p=new h.default([],[this._depthwiseConv.outputShape[0],this._depthwiseConv.outputShape[1],u*this.depthMultiplier]),d=0;d0&&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),u(e,[{key:"call",value:function(t){for(var e=t.tensor.shape,r=[e[0]*this.length,e[1]],n=new l.default([],r),o=0;o0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.size=a,r.dimOrdering=s,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=t.tensor.shape,r=[e[0]*this.size[0],e[1]*this.size[1],e[2]],n=new l.default([],r),o=0;o0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.size=a,r.dimOrdering=s,r}return a(e,t),u(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 l.default([],r),o=0;o0&&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),u(e,[{key:"call",value:function(t){var e=t.tensor.shape,r=[e[0]+2*this.padding,e[1]],n=new l.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.padding=a,r.dimOrdering=s,r}return a(e,t),u(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 l.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.padding=a,r.dimOrdering=s,r}return a(e,t),u(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 l.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(195),i=n(o),a=r(66),u=n(a),s=r(194),c=n(s),f=r(198),l=n(f),p=r(197),h=n(p),d=r(196),v=n(d),y=r(199),g=n(y),b=r(200),m=n(b),_=r(201),w=n(_),x=r(202),O=n(x),j=r(203),S=n(j),E=r(204),P=n(E);e.Convolution1D=i.default,e.Convolution2D=u.default,e.AtrousConvolution2D=c.default,e.SeparableConvolution2D=l.default,e.Deconvolution2D=h.default,e.Convolution3D=v.default,e.UpSampling1D=g.default,e.UpSampling2D=m.default,e.UpSampling3D=w.default,e.ZeroPadding1D=O.default,e.ZeroPadding2D=S.default,e.ZeroPadding3D=P.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 u(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;r0&&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=f[o],r}return u(e,t),s(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 u(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;r0&&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,u=t.activation,s=void 0===u?"linear":u,c=t.inputDim,l=void 0===c?null:c,p=t.bias,h=void 0===p||p;return r.activation=f[s],r.outputDim=o,r.inputDim=l,r.bias=h,r.params=r.bias?["W","b"]:["W"],r.inputDim&&(r.inputShape=[r.inputDim]),r}return u(e,t),s(e,[{key:"call",value:function(t){var e=new p.default([],[this.outputDim]);if(this.bias&&g.default.assign(e.tensor,this.weights.b.tensor),t._useWeblas){var r=this.bias?this.weights.b.tensor.data:new Float32Array(this.outputDim);e.tensor.data=weblas.sgemm(1,this.weights.W.tensor.shape[1],t.tensor.shape[0],1,t.tensor.data,this.weights.W.tensor.data,1,r)}else(0,v.gemv)(1,this.weights.W.tensor.transpose(1,0),t.tensor,1,e.tensor);return t.tensor=e.tensor,this.activation(t),t}}]),e}(d.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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){return 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 u=function(){function t(t,e){for(var r=0;r0&&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),u(e,[{key:"call",value:function(t){if(t.tensor.shape.length>1){var e=[t.tensor.shape.reduce(function(t,e){return t*e},1)];t.tensor=(0,l.default)(new t._type((0,v.default)((0,h.default)(t.tensor))),e)}return 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 u(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;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._computeOutput=(0,m.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,u=t.activation,s=void 0===u?"linear":u,c=t.bias,l=void 0===c||c;return r.transformBias=o,r.activation=f[s],r.bias=l,r.params=r.bias?["W","b","W_carry","b_carry"]:["W","W_carry"],r}return u(e,t),s(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),f.sigmoid(r),this._computeOutput(t.tensor,e.tensor,r.tensor),t}}]),e}(d.default);e.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.inputDim,s=void 0===u?null:u,c=t.bias,f=void 0===c||c;return r.outputDim=a,r.inputDim=s,r.bias=f,r.params=r.bias?["W","b"]:["W"],r}return a(e,t),u(e,[{key:"call",value:function(t){for(var e=this.weights.W.tensor.shape[0],r=new c.default([],[this.outputDim]),n=0;n0&&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,u=t.concatAxis,s=void 0===u?-1:u,c=t.dotAxes,f=void 0===c?-1:c,l=t.outputShape,p=void 0===l?null:l,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=s,r.dotAxes=f,r.outputShape=p,r.outputMask=d,r}return a(e,t),u(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-1,this.dotAxes-1]),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();if(t.forEach(function(t){return t.splice(e.concatAxis,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-1;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 u=0;u0&&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 u(e,t),s(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}(f.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 u=function(){function t(t,e){for(var r=0;r0&&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),u(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,l.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 u=function(){function t(t,e){for(var r=0;r0&&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),u(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.");return t.tensor=(0,l.default)(new t._type((0,v.default)((0,h.default)(t.tensor))),this.targetShape),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,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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.p=Math.min(Math.max(0,a),1),r.dimOrdering=s,r}return a(e,t),u(e,[{key:"call",value:function(t){return 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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.dimOrdering,s=void 0===u?"tf":u;return r.p=Math.min(Math.max(0,a),1),r.dimOrdering=s,r}return a(e,t),u(e,[{key:"call",value:function(t){return t}}]),e}(c.default);e.default=f},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(207),i=n(o),a=r(206),u=n(a),s=r(208),c=n(s),f=r(216),l=n(f),p=r(217),h=n(p),d=r(209),v=n(d),y=r(215),g=n(y),b=r(213),m=n(b),_=r(214),w=n(_),x=r(212),O=n(x),j=r(210),S=n(j),E=r(211),P=n(E);e.Dense=i.default,e.Activation=u.default,e.Dropout=c.default,e.SpatialDropout2D=l.default,e.SpatialDropout3D=h.default,e.Flatten=v.default,e.Reshape=g.default,e.Permute=m.default,e.RepeatVector=w.default,e.Merge=O.default,e.Highway=S.default,e.MaxoutDense=P.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 u=function(){function t(t,e){for(var r=0;r0&&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,u=t.outputDim,s=void 0===u?1:u,c=t.inputLength,f=void 0===c?0:c,l=t.maskZero,p=void 0!==l&&l,h=t.dropout,d=void 0===h?0:h;return r.inputDim=a,r.outputDim=s,r.inputLength=f,r.maskZero=p,r.dropout=d,r.params=["W"],r}return a(e,t),u(e,[{key:"call",value:function(t){for(var e=new l.default([],[t.tensor.shape[0],this.weights.W.tensor.shape[1]]),r=0,n=t.tensor.shape[0];r0&&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,u=t.mode,s=void 0===u?0:u,c=t.axis,f=void 0===c?-1:c;return r.epsilon=a,r.mode=s,r.axis=f,r.params=0===r.mode?["gamma","beta","running_mean","running_std"]:["gamma","beta"],r}return a(e,t),u(e,[{key:"call",value:function(t){var e=this;this.axis=this.axis<0?t.tensor.shape.length+this.axis:this.axis-1;for(var r=[],n=0;n0&&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}(s.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 u=r(130),s=n(u),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}(s.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 u=r(131),s=n(u),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}(s.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 u=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&u.return&&u.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")}}(),s=function(){function t(t,e){for(var r=0;r0&&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),s(e,[{key:"call",value:function(t){for(var e=u(t.tensor.shape,2),r=e[0],n=e[1],o=new p.default([],[n]),i=0,a=n;i0&&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),s(e,[{key:"call",value:function(t){"th"===this.dimOrdering&&(t.tensor=t.tensor.transpose(1,2,0));for(var e=u(t.tensor.shape,3),r=e[0],n=e[1],o=e[2],i=new p.default([],[o]),a=0,s=o;a0&&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),u(e,[{key:"call",value:function(t){for(var e=t.tensor.shape[1],r=new l.default([],[e]),n=0,o=e;n0&&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),u(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 l.default([],[e]),n=0,o=e;n0&&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}(s.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 u=r(130),s=n(u),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}(s.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 u=r(131),s=n(u),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}(s.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(230),i=n(o),a=r(231),u=n(a),s=r(232),c=n(s),f=r(223),l=n(f),p=r(224),h=n(p),d=r(225),v=n(d),y=r(228),g=n(y),b=r(226),m=n(b),_=r(229),w=n(_),x=r(227),O=n(x);e.MaxPooling1D=i.default,e.MaxPooling2D=u.default,e.MaxPooling3D=c.default,e.AveragePooling1D=l.default,e.AveragePooling2D=h.default,e.AveragePooling3D=v.default,e.GlobalMaxPooling1D=g.default,e.GlobalAveragePooling1D=m.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 u(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;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,m.default)({args:["array","array","array","array"],body:function(t,e,r,n){t=e+r+n}}),r._update=(0,m.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,u=t.activation,s=void 0===u?"tanh":u,c=t.innerActivation,l=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=s,r.innerActivation=l,r.activationFunc=f[s],r.innerActivationFunc=f[l],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 u(e,t),s(e,[{key:"call",value:function(t){for(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]),u=new p.default([],[n]),s=new p.default([],[n]),c=new p.default([],[o]),f=new p.default([],[o]),l=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]),b=new p.default([],[i]),m=new p.default([],[t.tensor.shape[0],i]),_=function(){var t=[u,s,f,l,d,y];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},w=function(){g.default.assign(b.tensor,h.tensor),(0,v.gemv)(1,e.weights.W_z.tensor.transpose(1,0),r.tensor,1,u.tensor),(0,v.gemv)(1,e.weights.U_z.tensor.transpose(1,0),b.tensor,1,s.tensor),e._combine(a.tensor,u.tensor,s.tensor,e.weights.b_z.tensor),e.innerActivationFunc(a),(0,v.gemv)(1,e.weights.W_r.tensor.transpose(1,0),r.tensor,1,f.tensor),(0,v.gemv)(1,e.weights.U_r.tensor.transpose(1,0),b.tensor,1,l.tensor),e._combine(c.tensor,f.tensor,l.tensor,e.weights.b_r.tensor),e.innerActivationFunc(c),g.default.muleq(c.tensor,b.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,b.tensor,a.tensor)},x=0,O=t.tensor.shape[0];x0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,m.default)({args:["array","array","array","array"],body:function(t,e,r,n){t=e+r+n}}),r._update=(0,m.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,u=t.activation,s=void 0===u?"tanh":u,c=t.innerActivation,l=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=s,r.innerActivation=l,r.activationFunc=f[s],r.innerActivationFunc=f[l],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 u(e,t),s(e,[{key:"call",value:function(t){for(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],u=new p.default([],[n]),s=new p.default([],[n]),c=new p.default([],[n]),f=new p.default([],[i]),l=new p.default([],[i]),h=new p.default([],[i]),d=new p.default([],[a]),y=new p.default([],[a]),b=new p.default([],[a]),m=new p.default([],[o]),_=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]),S=new p.default([],[t.tensor.shape[0],o]),E=function(){var t=[s,c,l,h,y,b,_,w];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},P=function(){g.default.assign(j.tensor,O.tensor),(0,v.gemv)(1,e.weights.W_i.tensor.transpose(1,0),r.tensor,1,s.tensor),(0,v.gemv)(1,e.weights.U_i.tensor.transpose(1,0),j.tensor,1,c.tensor),e._combine(u.tensor,s.tensor,c.tensor,e.weights.b_i.tensor),e.innerActivationFunc(u),(0,v.gemv)(1,e.weights.W_f.tensor.transpose(1,0),r.tensor,1,l.tensor),(0,v.gemv)(1,e.weights.U_f.tensor.transpose(1,0),j.tensor,1,h.tensor),e._combine(f.tensor,l.tensor,h.tensor,e.weights.b_f.tensor),e.innerActivationFunc(f),(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,b.tensor),e._combine(d.tensor,y.tensor,b.tensor,e.weights.b_o.tensor),e.innerActivationFunc(d),(0,v.gemv)(1,e.weights.W_c.tensor.transpose(1,0),r.tensor,1,_.tensor),(0,v.gemv)(1,e.weights.U_c.tensor.transpose(1,0),j.tensor,1,w.tensor),e._combine(m.tensor,_.tensor,w.tensor,e.weights.b_c.tensor),e.activationFunc(m),e._update(m.tensor,x.tensor,u.tensor,f.tensor),g.default.assign(x.tensor,m.tensor),e.activationFunc(m),g.default.mul(O.tensor,d.tensor,m.tensor)},k=0,A=t.tensor.shape[0];k0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r._combine=(0,m.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,u=t.activation,s=void 0===u?"tanh":u,c=t.returnSequences,l=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=s,r.activationFunc=f[s],r.returnSequences=l,r.goBackwards=h,r.stateful=v,r.params=["W","U","b"],r}return u(e,t),s(e,[{key:"call",value:function(t){for(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]),u=new p.default([],[n]),s=new p.default([],[t.tensor.shape[0],n]),c=function(){var t=[i,a];t.forEach(function(t){return g.default.assigns(t.tensor,0)})},f=function(){g.default.assign(u.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),u.tensor,1,a.tensor),e._combine(o.tensor,i.tensor,a.tensor,e.weights.b.tensor),e.activationFunc(o)},l=0,h=t.tensor.shape[0];l0&&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,u=void 0===o?"concat":o;if(!n)throw new Error("[Bidirectional] wrapped layer is undefined.");r.forwardLayer=n;var s=(0,y.default)(n,["outputDim","activation","innerActivation","returnSequences","goBackwards","stateful"]);return s.goBackwards=!s.goBackwards,r.backwardLayer=new b[n.layerClass](s),r.mergeMode=u,r}return u(e,t),s(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 u=n.tensor.shape.slice(),s=new p.default([],u);d.default.addeq(s.tensor,n.tensor),d.default.addeq(s.tensor,o.tensor),t.tensor=s.tensor}else if("mul"===this.mergeMode){var c=n.tensor.shape.slice(),f=new p.default([],c);d.default.assigns(f.tensor,1),d.default.muleq(f.tensor,n.tensor),d.default.muleq(f.tensor,o.tensor),t.tensor=f.tensor}else if("ave"===this.mergeMode){var l=n.tensor.shape.slice(),h=new p.default([],l);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}(f.default);e.default=m},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);e0&&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 u(e,t),s(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),u=a.tensor.shape.slice(),s=new p.default([],[t.tensor.shape[0]].concat(o(u)));d.default.assign((r=s.tensor).pick.apply(r,[0].concat(o(u.map(function(t){return null})))),a.tensor);for(var c=1,f=t.tensor.shape[0];c0)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,u,s=t.length;a=r(t),u=new f(3*s/4-a),o=a>0?s-4:s;var l=0;for(e=0,n=0;e>16&255,u[l++]=i>>8&255,u[l++]=255&i;return 2===a?(i=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,u[l++]=255&i):1===a&&(i=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,u[l++]=i>>8&255,u[l++]=255&i),u}function i(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function a(t,e,r){for(var n,o=[],a=e;af?f:c+u));return 1===n?(e=t[r-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),i.push(o),i.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=u;for(var s=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=l.length;p0)-(t<0)},e.abs=function(t){var e=t>>n-1;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<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<>>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){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){r(252),t.exports=r(29).RegExp.escape},function(t,e,r){var n=r(7),o=r(97),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(244);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(75),i=r(62);t.exports=function(t){var e=n(t),r=o.f;if(r)for(var a,u=r(t),s=i.f,c=0;u.length>c;)s.call(t,a=u[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),u=a.length,s=0;u>s;)if(i[r=a[s++]]===e)return r}},function(t,e,r){"use strict";var n=r(250),o=r(71),i=r(14);t.exports=function(){for(var t=i(this),e=arguments.length,r=Array(e),a=0,u=n._,s=!1;e>a;)(r[a]=arguments[a++])===u&&(s=!0);return function(){var n,i=this,a=arguments.length,c=0,f=0;if(!s&&!a)return o(t,r,i);if(n=r.slice(),s)for(;e>c;c++)n[c]===u&&(n[c]=arguments[f++]);for(;a>f;)n.push(arguments[f++]);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(251)(/[\\^$*+?.()|[\]{}]/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(52)("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(89)}),r(52)("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(52)(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(52)(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(30),o=r(0),i=r(12),a=r(144),u=r(96),s=r(11),c=r(90),f=r(113);o(o.S+o.F*!r(73)(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,o,l,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,b=f(p);if(y&&(v=n(v,d>2?arguments[2]:void 0,2)),void 0==b||h==Array&&u(b))for(e=s(p.length),r=new h(e);e>g;g++)c(r,g,y?v(p[g],g):p[g]);else for(l=b.call(p),r=new h;!(o=l.next()).done;g++)c(r,g,y?a(l,v,[o.value,g],!0):o.value);return r.length=g,r}})},function(t,e,r){"use strict";var n=r(0),o=r(67)(!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(97)})},function(t,e,r){"use strict";var n=r(0),o=r(18),i=[].join;n(n.P+n.F*(r(61)!=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(36),a=r(11),u=[].lastIndexOf,s=!!u&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(s||!r(24)(u)),"Array",{lastIndexOf:function(t){if(s)return u.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(90);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(94),i=r(22),a=r(45),u=r(11),s=[].slice;n(n.P+n.F*r(6)(function(){o&&s.call(o)}),"Array",{slice:function(t,e){var r=u(this.length),n=i(this);if(e=void 0===e?r:e,"Array"==n)return s.call(this,t,e);for(var o=a(t,r),c=a(e,r),f=u(c-o),l=Array(f),p=0;p9?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(246))},function(t,e,r){var n=Date.prototype,o="Invalid Date",i="toString",a=n[i],u=n.getTime;new Date(NaN)+""!=o&&r(16)(n,i,function(){var t=u.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(35),i=r(13),a=Function.prototype,u=/^\s*function ([^ (]*)/,s="name",c=Object.isExtensible||function(){return!0};s in a||r(9)&&n(a,s,{configurable:!0,get:function(){try{var t=this,e=(""+t).match(u)[1];return i(t,s)||!c(t)||n(t,s,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(101);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(100);n(n.S+n.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e,r){var n=r(0),o=r(101),i=Math.pow,a=i(2,-52),u=i(2,-23),s=i(2,127)*(2-u),c=i(2,-126),f=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 ns||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,u=arguments.length,s=0;a0?(n=r/s,i+=n*n):i+=r;return s===1/0?1/0:s*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(101)})},function(t,e,r){var n=r(0),o=r(100),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(100),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(95),u=r(28),s=r(6),c=r(41).f,f=r(20).f,l=r(10).f,p=r(56).trim,h="Number",d=n[h],v=d,y=d.prototype,g=i(r(40)(y))==h,b="trim"in String.prototype,m=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){e=b?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,s=e.slice(2),c=0,f=s.length;co)return NaN;return parseInt(s,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?s(function(){y.valueOf.call(r)}):i(r)!=h)?a(new v(m(e)),r,d):m(e)};for(var _,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,_=w[x])&&!o(d,_)&&l(d,_,f(v,_));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(36),i=r(134),a=r(108),u=1..toFixed,s=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l="0",p=function(t,e){for(var r=-1,n=e;++r<6;)n+=t*c[r],c[r]=n%1e7,n=s(n/1e7)},h=function(t){for(var e=6,r=0;--e>=0;)r+=c[e],c[e]=s(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(l,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*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(6)(function(){u.call({})})),"Number",{toFixed:function(t){var e,r,n,u,s=i(this,f),c=o(t),g="",b=l;if(c<0||c>20)throw RangeError(f);if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(g="-",s=-s),s>1e-21)if(e=y(s*v(2,69,1))-69,r=e<0?s*v(2,-e,1):s/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<0?(u=b.length,b=g+(u<=c?"0."+a.call(l,c-u)+b:b.slice(0,u-c)+"."+b.slice(u-c))):b=g+b,b}})},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(34).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(34).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(34).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(103).set})},function(t,e,r){"use strict";var n=r(60),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),u=r(5),s=r(30),c=r(60),f=r(0),l=r(7),p=r(14),h=r(38),d=r(53),v=r(105),y=r(110).set,g=r(102)(),b="Promise",m=u.TypeError,_=u.process,w=u[b],_=u.process,x="process"==c(_),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){}}(),S=function(t,e){return t===e||t===w&&e===i},E=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},P=function(t){return S(w,t)?new k(t):new o(t)},k=o=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw m("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,u=e.resolve,s=e.reject,c=e.domain;try{a?(o||(2==t._h&&I(t),t._h=1),a===!0?r=n:(c&&c.enter(),r=a(n),c&&c.exit()),r===e.promise?s(m("Promise-chain cycle")):(i=E(r))?i.call(r,u,s):u(r)):s(n)}catch(t){s(t)}};r.length>i;)a(r[i++]);t._c=[],t._n=!1,e&&!t._h&&T(t)})}},T=function(t){y.call(u,function(){var e,r,n,o=t._v;if(C(t)&&(e=A(function(){x?_.emit("unhandledRejection",o,t):(r=u.onunhandledrejection)?r({promise:t,reason:o}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=x||C(t)?2:1),t._a=void 0,e)throw e.error})},C=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||!C(e.promise))return!1;return!0},I=function(t){y.call(u,function(){var e;x?_.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},R=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))},L=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw m("Promise can't be resolved itself");(e=E(t))?g(function(){var n={_w:r,_d:!1};try{e.call(t,s(L,n,1),s(R,n,1))}catch(t){R.call(n,t)}}):(r._v=t,r._s=1,M(r,!1))}catch(t){R.call({_w:r,_d:!1},t)}}};j||(w=function(t){h(this,w,b,"_h"),p(t),n.call(this);try{t(s(L,this,1),s(R,this,1))}catch(t){R.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=P(v(this,w));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=x?_.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)}}),k=function(){var t=new n;this.promise=t,this.resolve=s(L,t,1),this.reject=s(R,t,1)}),f(f.G+f.W+f.F*!j,{Promise:w}),r(55)(w,b),r(44)(b),i=r(29)[b],f(f.S+f.F*!j,b,{reject:function(t){var e=P(this),r=e.reject;return r(t),e.promise}}),f(f.S+f.F*(a||!j),b,{resolve:function(t){if(t instanceof w&&S(t.constructor,this))return t;var e=P(this),r=e.resolve;return r(t),e.promise}}),f(f.S+f.F*!(j&&r(73)(function(t){w.all(t).catch(O)})),b,{all:function(t){var e=this,r=P(e),n=r.resolve,o=r.reject,i=A(function(){var r=[],i=0,a=1;d(t,!1,function(t){var u=i++,s=!1;r.push(void 0),a++,e.resolve(t).then(function(t){s||(s=!0,r[u]=t,--a||n(r))},o)}),--a||n(r)});return i&&o(i.error),r.promise},race:function(t){var e=this,r=P(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,u=Function.apply;n(n.S+n.F*!r(6)(function(){a(function(){})}),"Reflect",{apply:function(t,e,r){var n=o(t),s=i(r);return a?a(n,e,s):u.call(n,e,s)}})},function(t,e,r){var n=r(0),o=r(40),i=r(14),a=r(2),u=r(7),s=r(6),c=r(138),f=(r(5).Reflect||{}).construct,l=s(function(){function t(){}return!(f(function(){},[],t)instanceof t)}),p=!s(function(){f(function(){})});n(n.S+n.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var r=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(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 s=r.prototype,h=o(u(s)?s:Object.prototype),d=Function.apply.call(t,h,e);return u(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(98)(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,u,f=arguments.length<3?t:arguments[2];return c(t)===f?t[e]:(r=o.f(t,e))?a(r,"value")?r.value:void 0!==r.get?r.get.call(f):void 0:s(u=i(t))?n(u,e,f):void 0}var o=r(20),i=r(21),a=r(13),u=r(0),s=r(7),c=r(2);u(u.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(103);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 s,p,h=arguments.length<4?t:arguments[3],d=i.f(f(t),e);if(!d){if(l(p=a(t)))return n(p,e,r,h);d=c(0)}return u(d,"value")?!(d.writable===!1||!l(h))&&(s=i.f(h,e)||c(0),s.value=r,o.f(h,e,s),!0):void 0!==d.set&&(d.set.call(h,r),!0)}var o=r(10),i=r(20),a=r(21),u=r(13),s=r(0),c=r(35),f=r(2),l=r(7);s(s.S,"Reflect",{set:n})},function(t,e,r){var n=r(5),o=r(95),i=r(10).f,a=r(41).f,u=r(72),s=r(70),c=n.RegExp,f=c,l=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=u(t),i=void 0===e;return!r&&n&&t.constructor===c&&i?t:o(d?new f(n&&!i?t.source:t,e):f((n=t instanceof c)?t.source:t,n&&i?s.call(t):e),r?this:l,c)};for(var v=(function(t){t in c||i(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})}),y=a(f),g=0;y.length>g;)v(y[g++]);l.constructor=c,c.prototype=l,r(16)(n,"RegExp",c)}r(44)("RegExp")},function(t,e,r){r(69)("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(69)("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(69)("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(69)("split",2,function(t,e,n){"use strict";var o=r(72),i=n,a=[].push,u="split",s="length",c="lastIndex";if("c"=="abbc"[u](/(b)*/)[1]||4!="test"[u](/(?:)/,-1)[s]||2!="ab"[u](/(?:ab)*/)[s]||4!="."[u](/(.?)(.?)/)[s]||"."[u](/()()/)[s]>1||""[u](/.?/)[s]){var f=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,u,l,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,b=new RegExp(t.source,v+"g");for(f||(n=new RegExp("^"+b.source+"$(?!\\s)",v));(u=b.exec(r))&&(l=u.index+u[0][s],!(l>y&&(d.push(r.slice(y,u.index)),!f&&u[s]>1&&u[0].replace(n,function(){for(h=1;h1&&u.index=g)));)b[c]===u.index&&b[c]++;return y===r[s]?!p&&b.test("")||d.push(""):d.push(r.slice(y)),d[s]>g?d.slice(0,g):d}}else"0"[u](void 0,0)[s]&&(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(70),i=r(9),a="toString",u=/./[a],s=function(t){r(16)(RegExp.prototype,a,t,!0)};r(6)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?s(function(){var t=n(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):u.name!=a&&s(function(){return u.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(106)(!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(107),a="endsWith",u=""[a];n(n.P+n.F*r(93)(a),"String",{endsWith:function(t){var e=i(this,t,a),r=arguments.length>1?arguments[1]:void 0,n=o(e.length),s=void 0===r?n:Math.min(o(r),n),c=String(t);return u?u.call(e,c,s):e.slice(s-c.length,s)===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(107),i="includes";n(n.P+n.F*r(93)(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(106)(!0);r(99)(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=[],u=0;r>u;)a.push(String(e[u++])),u1?arguments[1]:void 0,e.length)),n=String(t);return u?u.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(56)("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),u=r(16),s=r(34).KEY,c=r(6),f=r(76),l=r(55),p=r(46),h=r(8),d=r(157),v=r(112),y=r(248),g=r(247),b=r(97),m=r(2),_=r(18),w=r(28),x=r(35),O=r(40),j=r(149),S=r(20),E=r(10),P=r(42),k=S.f,A=E.f,M=j.f,T=n.Symbol,C=n.JSON,I=C&&C.stringify,R="prototype",L=h("_hidden"),D=h("toPrimitive"),F={}.propertyIsEnumerable,N=f("symbol-registry"),U=f("symbols"),B=f("op-symbols"),V=Object[R],W="function"==typeof T,z=n.QObject,q=!z||!z[R]||!z[R].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=k(V,e);n&&delete V[e],A(t,e,r),n&&t!==V&&A(V,e,n)}:A,Y=function(t){var e=U[t]=O(T[R]);return e._k=t,e},H=W&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},K=function(t,e,r){return t===V&&K(B,e,r),m(t),e=w(e,!0),m(r),o(U,e)?(r.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),r=O(r,{enumerable:x(0,!1)})):(o(t,L)||A(t,L,x(1,{})),t[L][e]=!0),G(t,e,r)):A(t,e,r)},$=function(t,e){m(t);for(var r,n=g(e=_(e)),o=0,i=n.length;i>o;)K(t,r=n[o++],e[r]);return t},Z=function(t,e){return void 0===e?O(t):$(O(t),e)},J=function(t){var e=F.call(this,t=w(t,!0));return!(this===V&&o(U,t)&&!o(B,t))&&(!(e||!o(this,t)||!o(U,t)||o(this,L)&&this[L][t])||e)},X=function(t,e){if(t=_(t),e=w(e,!0),t!==V||!o(U,e)||o(B,e)){var r=k(t,e);return!r||!o(U,e)||o(t,L)&&t[L][e]||(r.enumerable=!0),r}},Q=function(t){for(var e,r=M(_(t)),n=[],i=0;r.length>i;)o(U,e=r[i++])||e==L||e==s||n.push(e);return n},tt=function(t){for(var e,r=t===V,n=M(r?B:_(t)),i=[],a=0;n.length>a;)!o(U,e=n[a++])||r&&!o(V,e)||i.push(U[e]);return i};W||(T=function(){if(this instanceof T)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,L)&&o(this[L],t)&&(this[L][t]=!1),G(this,t,x(1,r))};return i&&q&&G(V,t,{configurable:!0,set:e}),Y(t)},u(T[R],"toString",function(){return this._k}),S.f=X,E.f=K,r(41).f=j.f=Q,r(62).f=J,r(75).f=tt,i&&!r(39)&&u(V,"propertyIsEnumerable",J,!0),d.f=function(t){return Y(h(t))}),a(a.G+a.W+a.F*!W,{Symbol:T});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=P(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]=T(t)},keyFor:function(t){if(H(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:Z,defineProperty:K,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),C&&a(a.S+a.F*(!W||c(function(){var t=T();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{ +stringify:function(t){if(void 0!==t&&!H(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&&b(e)||(e=function(t,e){if(r&&(e=r.call(this,t,e)),!H(e))return e}),n[1]=e,I.apply(C,n)}}}),T[R][D]||r(15)(T[R],D,T[R].valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},function(t,e,r){"use strict";var n=r(0),o=r(77),i=r(111),a=r(2),u=r(45),s=r(11),c=r(7),f=r(5).ArrayBuffer,l=r(105),p=i.ArrayBuffer,h=i.DataView,d=o.ABV&&f.isView,v=p.prototype.slice,y=o.VIEW,g="ArrayBuffer";n(n.G+n.W+n.F*(f!==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=u(t,r),o=u(void 0===e?r:e,r),i=new(l(this,p))(s(o-n)),c=new h(this),f=new h(i),d=0;n0?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(67)(!0);n(n.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r(52)("includes")},function(t,e,r){var n=r(0),o=r(102)(),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,u=n>>16,s=o>>16,c=(u*a>>>0)+(i*a>>>16);return u*s+(c>>16)+((i*s>>>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,u=n>>>16,s=o>>>16,c=(u*a>>>0)+(i*a>>>16);return u*s+(c>>>16)+((i*s>>>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(74),"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(74),"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),u=r(90);n(n.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,r=i(t),n=a.f,s=o(r),c={},f=0;s.length>f;)u(c,e=s[f++],n(r,e));return c}})},function(t,e,r){"use strict";var n=r(0),o=r(12),i=r(28),a=r(21),u=r(20).f;r(9)&&n(n.P+r(74),"Object",{__lookupGetter__:function(t){var e,r=o(this),n=i(t,!0);do if(e=u(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),u=r(20).f;r(9)&&n(n.P+r(74),"Object",{__lookupSetter__:function(t){var e,r=o(this),n=i(t,!0);do if(e=u(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(29),a=r(102)(),u=r(8)("observable"),s=r(14),c=r(2),f=r(38),l=r(43),p=r(15),h=r(53),d=h.RETURN,v=function(t){return null==t?void 0:s(t)},y=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},b=function(t){g(t)||(t._o=void 0,y(t))},m=function(t,e){c(t),this._c=void 0,this._o=t,t=new _(this);try{var r=e(t),n=r;null!=r&&("function"==typeof r.unsubscribe?r=function(){n.unsubscribe()}:s(r),this._c=r)}catch(e){return void t.error(e)}g(this)&&y(this)};m.prototype=l({},{unsubscribe:function(){b(this)}});var _=function(t){this._s=t};_.prototype=l({},{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{b(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){f(this,w,"Observable","_f")._f=s(t)};l(w.prototype,{subscribe:function(t){return new m(t,this._f)},forEach:function(t){var e=this;return new(i.Promise||o.Promise)(function(r,n){s(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(t){n(t),o.unsubscribe()}},error:n,complete:r})})}}),l(w,{from:function(t){var e="function"==typeof this?this:w,r=v(c(t)[u]);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);t1?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(56)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,r){"use strict";r(56)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,r){r(112)("asyncIterator")},function(t,e,r){r(112)("observable")},function(t,e,r){var n=r(0);n(n.S,"System",{global:r(5)})},function(t,e,r){for(var n=r(114),o=r(16),i=r(5),a=r(15),u=r(54),s=r(8),c=s("iterator"),f=s("toStringTag"),l=u.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,l),g[f]||a(g,f,v),u[v]=l;for(d in n)g[d]||o(g,d,n[d],!0)}}},function(t,e,r){var n=r(0),o=r(110);n(n.G+n.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,r){var n=r(5),o=r(0),i=r(71),a=r(249),u=n.navigator,s=!!u&&/MSIE .\./.test(u.userAgent),c=function(t){return s?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*s,{setTimeout:c(n.setTimeout),setInterval:c(n.setInterval)})},function(t,e,r){r(372),r(311),r(313),r(312),r(315),r(317),r(322),r(316),r(314),r(324),r(323),r(319),r(320),r(318),r(310),r(321),r(325),r(326),r(278),r(280),r(279),r(328),r(327),r(298),r(308),r(309),r(299),r(300),r(301),r(302),r(303),r(304),r(305),r(306),r(307),r(281),r(282),r(283),r(284),r(285),r(286),r(287),r(288),r(289),r(290),r(291),r(292),r(293),r(294),r(295),r(296),r(297),r(359),r(364),r(371),r(362),r(354),r(355),r(360),r(365),r(367),r(350),r(351),r(352),r(353),r(356),r(357),r(358),r(361),r(363),r(366),r(368),r(369),r(370),r(273),r(275),r(274),r(277),r(276),r(262),r(260),r(266),r(263),r(269),r(271),r(259),r(265),r(256),r(270),r(254),r(268),r(267),r(261),r(264),r(253),r(255),r(258),r(257),r(272),r(114),r(344),r(349),r(159),r(345),r(346),r(347),r(348),r(329),r(158),r(160),r(161),r(384),r(373),r(374),r(379),r(382),r(383),r(377),r(380),r(378),r(381),r(375),r(376),r(330),r(331),r(332),r(333),r(334),r(337),r(335),r(336),r(338),r(339),r(340),r(341),r(343),r(342),r(385),r(411),r(414),r(413),r(415),r(416),r(412),r(417),r(418),r(396),r(399),r(395),r(393),r(394),r(397),r(398),r(388),r(410),r(419),r(387),r(389),r(391),r(390),r(392),r(401),r(402),r(404),r(403),r(406),r(405),r(407),r(408),r(409),r(386),r(400),r(422),r(421),r(420),t.exports=r(29)},function(t,e,r){"use strict";function n(t,e,r){var n,o,i=t.length,a=e.arrayArgs.length,u=e.indexArgs.length>0,s=[],c=[],f=0,l=0;for(n=0;n=0;--n)f=t[n],s.push(["for(i",n,"=0;i",n,"0&&s.push(["index[",l,"]-=s",l].join("")),s.push(["++index[",f,"]"].join(""))),s.push("}")}return s.join("\n")}function o(t,e,r,o){for(var i=e.length,a=r.arrayArgs.length,u=r.blockSize,s=r.indexArgs.length>0,c=[],f=0;f0;){"].join("")),c.push(["if(j",f,"<",u,"){"].join("")),c.push(["s",e[f],"=j",f].join("")),c.push(["j",f,"=0"].join("")),c.push(["}else{s",e[f],"=",u].join("")),c.push(["j",f,"-=",u,"}"].join("")),s&&c.push(["index[",e[f],"]=j",f].join(""));for(var f=0;f0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}function s(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,s=new Array(t.arrayArgs.length),f=new Array(t.arrayArgs.length),l=0;l0&&w.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var x=new Array(r),l=0;l3&&_.push(a(t.pre,t,f));var E=a(t.body,t,f),P=i(y);P3&&_.push(a(t.post,t,f)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+_.join("\n")+"\n----------");var k=[t.funcName||"unnamed","_cwise_loop_",s[0].join("s"),"m",P,u(f)].join(""),A=new Function(["function ",k,"(",m.join(","),"){",_.join("\n"),"} return ",k].join(""));return A()}var c=r(182);t.exports=s},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=[],u=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],s=[],c=[],f=0;f0&&(s.push("array"+t.arrayArgs[0]+".shape.length===array"+l+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[f]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+l+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[f])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+s.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 f=0;f=0){var c=b[s],f=h(n);f&j&&(c.lvalue=!0),f&S&&(c.rvalue=!0),++c.count,u(n,c.name)}else i(a)||u(n,e(a))}else if("Literal"===n.type)"string"==typeof n.value&&u(n,l(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=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 u(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 s(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 f(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 l(t){return"eval"===t||"arguments"===t}function p(t){if(se&&f(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:fe,column:ce-le-t}};ce=pe&&V({},oe.UnexpectedToken,"ILLEGAL");else if(42===r){if(47===ue.charCodeAt(ce+1))return++ce,++ce,void(ye.comments&&(n=ue.slice(t+2,ce-2),e.end={line:fe,column:ce-le},h("Block",n,t,ce,e)));++ce}else++ce;V({},oe.UnexpectedToken,"ILLEGAL")}function y(){var t,e;for(e=0===ce;ce>>="===n?(ce+=4,{type:Qt.Punctuator,value:n,lineNumber:fe,lineStart:le,start:o,end:ce}):(r=n.substr(0,3),">>>"===r||"<<="===r||">>="===r?(ce+=3,{type:Qt.Punctuator,value:r,lineNumber:fe,lineStart:le,start:o,end:ce}):(e=r.substr(0,2),a===e[1]&&"+-<>&|".indexOf(a)>=0||"=>"===e?(ce+=2,{type:Qt.Punctuator,value:e,lineNumber:fe,lineStart:le,start:o,end:ce}):"<>=!+-*%&|^/".indexOf(a)>=0?(++ce,{type:Qt.Punctuator,value:a,lineNumber:fe,lineStart:le,start:o,end:ce}):void V({},oe.UnexpectedToken,"ILLEGAL")))}function x(t){for(var e="";ce=0&&ce0&&(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 C(t){return t.type===Qt.Identifier||t.type===Qt.Keyword||t.type===Qt.BooleanLiteral||t.type===Qt.NullLiteral}function I(){var t,e;if(t=ye.tokens[ye.tokens.length-1],!t)return T();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():T();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 T()}return ee.indexOf(e.value)>=0?w():T()}return T()}return"Keyword"===t.type&&"this"!==t.value?T():w()}function R(){var t;return y(),ce>=pe?{type:Qt.EOF,lineNumber:fe,lineStart:le,start:ce,end:ce}:(t=ue.charCodeAt(ce),u(t)?_():40===t||41===t||59===t?w():39===t||34===t?E():46===t?r(ue.charCodeAt(ce+1))?S():w():r(t)?S():ye.tokenize&&47===t?I():w())}function L(){var t,e,r;return y(),t={start:{line:fe,column:ce-le}},e=R(),t.end={line:fe,column:ce-le},e.type!==Qt.EOF&&(r=ue.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,fe=t.lineNumber,le=t.lineStart,de="undefined"!=typeof ye.tokens?L():R(),ce=t.end,fe=t.lineNumber,le=t.lineStart,t}function F(){var t,e,r;t=ce,e=fe,r=le,de="undefined"!=typeof ye.tokens?L():R(),ce=t,fe=e,le=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=fe,r=le,y(),n=fe!==e,ce=t,fe=e,le=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>="===t||">>>="===t||"&="===t||"^="===t||"|="===t)}function $(){var t,e=ce,r=fe,n=le,o=de;return 59===ue.charCodeAt(ce)||Y(";")?void D():(t=fe,y(),fe!==t?(ce=e,fe=r,le=n,void(de=o)):void(de.type===Qt.EOF||Y("}")||z(de)))}function Z(t){return t.type===re.Identifier||t.type===re.MemberExpression}function J(){var t,e=[];for(t=de,q("[");!Y("]");)Y(",")?(D(),e.push(null)):(e.push(yt()),Y("]")||q(","));return D(),he.markEnd(he.createArrayExpression(e),t)}function X(t,e){var r,n,o;return r=se,o=de,n=zt(),e&&se&&l(t[0].name)&&W(e,oe.StrictParamName),se=r,he.markEnd(he.createFunctionExpression(null,t,[],n),o)}function Q(){var t,e;return e=de,t=D(),t.type===Qt.StringLiteral||t.type===Qt.NumericLiteral?(se&&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===Qt.Identifier?(r=Q(),"get"!==t.value||Y(":")?"set"!==t.value||Y(":")?(q(":"),n=yt(),he.markEnd(he.createProperty("init",r,n),i)):(e=Q(),q("("),t=de,t.type!==Qt.Identifier?(q(")"),W(t,oe.UnexpectedToken,t.value),n=X([])):(o=[_t()],q(")"),n=X(o,t)),he.markEnd(he.createProperty("set",e,n),i)):(e=Q(),q("("),q(")"),n=X([]),he.markEnd(he.createProperty("get",e,n),i))):t.type!==Qt.EOF&&t.type!==Qt.Punctuator?(e=Q(),q(":"),n=yt(),he.markEnd(he.createProperty("init",e,n),i)):void z(t)}function et(){var t,e,r,n,o,i=[],a={},u=String;for(o=de,q("{");!Y("}");)t=tt(),e=t.key.type===re.Identifier?t.key.name:u(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?se&&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),Y("}")||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(Y("("))return rt();if(Y("["))return J();if(Y("{"))return et();if(t=de.type,n=de,t===Qt.Identifier)r=he.createIdentifier(D().value);else if(t===Qt.StringLiteral||t===Qt.NumericLiteral)se&&de.octal&&W(de,oe.StrictOctalLiteral),r=he.createLiteral(D());else if(t===Qt.Keyword){if(H("function"))return Yt();H("this")?(D(),r=he.createThisExpression()):z(D())}else t===Qt.BooleanLiteral?(e=D(),e.value="true"===e.value,r=he.createLiteral(e)):t===Qt.NullLiteral?(e=D(),e.value=null,r=he.createLiteral(e)):Y("/")||Y("/=")?(r="undefined"!=typeof ye.tokens?he.createLiteral(T()):he.createLiteral(M()),F()):z(D());return he.markEnd(r,n)}function ot(){var t=[];if(q("("),!Y(")"))for(;ce":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,u,s,c;if(t=de,s=pt(),n=de,o=ht(n,ve.allowIn),0===o)return s;for(n.prec=o,D(),e=[t,de],a=pt(),i=[s,n,a];(o=ht(de,ve.allowIn))>0;){for(;i.length>2&&o<=i[i.length-2].prec;)a=i.pop(),u=i.pop().value,s=i.pop(),r=he.createBinaryExpression(u,s,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(),Y("?")&&(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(),K()&&(Z(e)||W({},oe.InvalidLHSInAssignment),se&&e.type===re.Identifier&&l(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(),Y(",")){for(t=he.createSequenceExpression([t]);ce0?1:0,le=0,pe=ue.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(F(),de.type===Qt.EOF)return ye.tokens;for(n=D();de.type!==Qt.EOF;)try{n=D()}catch(t){if(n=de,ye.errors){ye.errors.push(t);break}throw t}Zt(),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 Xt(t,e){var r,n;n=String,"string"==typeof t||t instanceof String||(t=n(t)),he=ae,ue=t,ce=0,fe=ue.length>0?1:0,le=0,pe=ue.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=$t(),"undefined"!=typeof ye.comments&&(r.comments=ye.comments),"undefined"!=typeof ye.tokens&&(Zt(),r.tokens=ye.tokens),"undefined"!=typeof ye.errors&&(r.errors=ye.errors)}catch(t){throw t}finally{ye={}}return r}var Qt,te,ee,re,ne,oe,ie,ae,ue,se,ce,fe,le,pe,he,de,ve,ye;Qt={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},te={},te[Qt.BooleanLiteral]="Boolean",te[Qt.EOF]="",te[Qt.Identifier]="Identifier",te[Qt.Keyword]="Keyword",te[Qt.NullLiteral]="Null",te[Qt.NumericLiteral]="Numeric",te[Qt.Punctuator]="Punctuator",te[Qt.StringLiteral]="String",te[Qt.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),fe,ce-le),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:ue.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=Jt,t.parse=Xt,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,u=8*o-n-1,s=(1<>1,f=-7,l=r?o-1:0,p=r?-1:1,h=t[e+l];for(l+=p,i=h&(1<<-f)-1,h>>=-f,f+=u;f>0;i=256*i+t[e+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===i)i=1-c;else{if(i===s)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,u,s,c=8*i-o-1,f=(1<>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?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),e+=a+l>=1?p/s:p*Math.pow(2,1-l),e*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,o),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+h]=255&u,h+=d,u/=256,o-=8);for(a=a<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 * @license MIT */ -t.exports=function(t){return null!=t&&(r(t)||n(t)||!!t._isBuffer)}},function(t,e,r){var n=r(47),o=r(36),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();++eo?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=n?t:o(t,e,r)}var o=r(464);t.exports=n},function(t,e,r){var n=r(36),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,u=Object(r);(e?a--:++a-1?u[s?e[c]:c]:void 0}}var o=r(80),i=r(64),a=r(49);t.exports=n},function(t,e,r){function n(t){return function(e){var r=i(e);return r==s?a(e):r==c?u(e):o(e,t(e))}}var o=r(467),i=r(172),a=r(175),u=r(517),s="[object Map]",c="[object Set]";t.exports=n},function(t,e,r){var n=r(462),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,S){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 m:return t==e+"";case v:var E=s;case b:var P=O&l;if(E||(E=c),t.size!=e.size&&!P)return!1;var k=S.get(t);if(k)return k==e;O|=f,S.set(t,e);var A=u(E(t),E(e),n,o,O,S);return S.delete(t),A;case _:if(j)return j.call(t)==j.call(e)}return!1}var o=r(116),i=r(435),a=r(120),u=r(170),s=r(175),c=r(516),f=1,l=2,p="[object Boolean]",h="[object Date]",d="[object Error]",v="[object Map]",y="[object Number]",g="[object RegExp]",b="[object Set]",m="[object String]",_="[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,s){var c=a&i,f=o(t),l=f.length,p=o(e),h=p.length;if(l!=h&&!c)return!1;for(var d=l;d--;){var v=f[d];if(!(c?v in e:u.call(e,v)))return!1}var y=s.get(t);if(y&&s.get(e))return y==e;var g=!0;s.set(t,e),s.set(e,t);for(var b=c;++d-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(431),i=r(78),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(543),i=500;t.exports=n},function(t,e,r){var n=r(47),o=n(Object,"defineProperty");t.exports=o},function(t,e,r){var n=r(512),o=n(Object.keys,Object);t.exports=o},function(t,e,r){(function(t){var n=r(171),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o,u=a&&n.process,s=function(){try{return u&&u.binding("util")}catch(t){}}();t.exports=s}).call(e,r(127)(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,u=i(n.length-e,0),s=Array(u);++a0){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(78);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=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],u=r.stride[0],s=e.offset,c=r.offset;for(n=e.shape[0]-1;n>=0;n--,s+=a,c+=u)i[c]+=t*o[s]}},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],u=t.offset,s=e.offset;for(r=t.shape[0]-1;r>=0;r--,u+=i,s+=a)o[s]=n[u]}},function(t,e){"use strict";t.exports=function(t,e,r){var n,o=e.data,i=r.data,a=e.stride[0],u=r.stride[0],s=e.offset,c=r.offset;for(n=e.shape[0]-1;n>=0;n--,s+=a,c+=u)i[c]=t*o[s]}},function(t,e){"use strict";t.exports=function(t,e){var r,n,o=t.data,i=t.stride[0],a=t.offset,u=0;if(t===e)for(r=t.shape[0]-1;r>=0;r--,a+=i)n=o[a],u+=n*n;else{var s=e.data,c=e.stride[0],f=e.offset;for(r=t.shape[0]-1;r>=0;r--,a+=i,f+=c)u+=s[f]*o[a]}return u}},function(t,e){"use strict";t.exports=function(t){var e,r,n,o=-(1/0),i=t.data,a=t.stride[0],u=t.offset,s=t.shape[0];for(e=0;eo&&(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,u=0;for(e=t.shape[0]-1;e>=0;e--,a+=i)n=o[a],u=r(u,n);return u}},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,u=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,u=Math.sign(t)*Math.sqrt(1+a*a),n=1/u,o=a*n,i=t*u):(a=t/e,u=Math.sign(t)*Math.sqrt(1+a*a),o=1/u,n=a*o,i=e*u),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],u=e.stride[0],s=t.offset,c=e.offset;for(r=t.shape[0]-1;r>=0;r--,s+=a,c+=u)n=o[s],o[s]=i[c],i[c]=n}},function(t,e){"use strict";function r(t,e,r,n,o,i,a){for(var u=0,s=0,c=0,f=0,l=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;u<=d;){f=0;var b=Math.min(u+v,h-1);for(c=0;c<=b;c++)f+=t.get(u,c)*n.get(c);o.set(u,f*y+g*o.get(u)),u++}if(u=0;u--)i.set(u,i.get(u)*n+t*a(e.pick(u,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(127)(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 u=t.shape[0],s=n||!0,c=void 0===i?1:i,f=void 0===a?0:a,l=0,p=0,h=0,d=0;if(0===f)for(l=0;l=0;a--)e.set(a,n(t.pick(a,null).hi(a+1),e.hi(a+1)));else for(a=0;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,s,c,f,l,p,h;if(n=o({},u),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(s=0;s0;){","var w",y,"=",l,";","if(i",y,"<",l,"){","w",y,"=i",y,";","i",y,"=0;","}else{","i",y,"-=",l,";","}");f.push.apply(f,n(h,"o",t,"i0","i1","w1")),f.push("for(i=0;i=0&&(f[h]+=a[h],f[h]===u[h]);)f[h]=0,h--}return r}var o=r(180),i=r(3);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(f===setTimeout)return setTimeout(t,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?d=h.concat(d):y=-1,d.length&&u())}function u(){if(!v){var t=o(a);v=!0;for(var e=d.length;e;){for(h=d,d=[];++y1)for(var r=1;r=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=b.call(o,"catchLoc"),u=b.call(o,"finallyLoc");if(a&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&b.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),h(r),k}},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},k}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,r(59),r(581))},function(t,e,r){"use strict";(function(t,n){function o(t){if(t){var e=t.length||t.byteLength,r=b.log2(e);x[r].push(t)}}function i(t){o(t.buffer)}function a(t){var t=b.nextPow2(t),e=b.log2(t),r=x[e];return r.length>0?r.pop():new ArrayBuffer(t)}function u(t){return new Uint8Array(a(t),0,t)}function s(t){return new Uint16Array(a(2*t),0,t)}function c(t){return new Uint32Array(a(4*t),0,t)}function f(t){return new Int8Array(a(t),0,t)}function l(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 _?new Uint8ClampedArray(a(t),0,t):u(t)}function y(t){return new DataView(a(t),0,t)}function g(t){t=b.nextPow2(t);var e=b.log2(t),r=O[e];return r.length>0?r.pop():new n(t)}var b=r(240),m=r(163);t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:m([32,0]),UINT16:m([32,0]),UINT32:m([32,0]),INT8:m([32,0]),INT16:m([32,0]),INT32:m([32,0]),FLOAT:m([32,0]),DOUBLE:m([32,0]),DATA:m([32,0]),UINT8C:m([32,0]),BUFFER:m([32,0])});var _="undefined"!=typeof Uint8ClampedArray,w=t.__TYPEDARRAY_POOL;w.UINT8C||(w.UINT8C=m([32,0])),w.BUFFER||(w.BUFFER=m([32,0]));var x=w.DATA,O=w.BUFFER;e.free=function(t){if(n.isBuffer(t))O[b.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|b.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[b.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return a(t);switch(e){case"uint8":return u(t);case"uint16":return s(t);case"uint32":return c(t);case"int8":return f(t);case"int16":return l(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=u,e.mallocUint16=s,e.mallocUint32=c,e.mallocInt8=f,e.mallocInt16=l,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(59),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(183),t.exports=r(182)}])}); \ No newline at end of file +t.exports=function(t){return null!=t&&(r(t)||n(t)||!!t._isBuffer)}},function(t,e,r){var n=r(47),o=r(33),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();++eo?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=n?t:o(t,e,r)}var o=r(465);t.exports=n},function(t,e,r){var n=r(33),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,u=Object(r);(e?a--:++a-1?u[s?e[c]:c]:void 0}}var o=r(80),i=r(64),a=r(49);t.exports=n},function(t,e,r){function n(t){return function(e){var r=i(e);return r==s?a(e):r==c?u(e):o(e,t(e))}}var o=r(468),i=r(173),a=r(176),u=r(517),s="[object Map]",c="[object Set]";t.exports=n},function(t,e,r){var n=r(463),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,S){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 m:return t==e+"";case v:var E=s;case b:var P=O&l;if(E||(E=c),t.size!=e.size&&!P)return!1;var k=S.get(t);if(k)return k==e;O|=f,S.set(t,e);var A=u(E(t),E(e),n,o,O,S);return S.delete(t),A;case _:if(j)return j.call(t)==j.call(e)}return!1}var o=r(117),i=r(436),a=r(121),u=r(171),s=r(176),c=r(516),f=1,l=2,p="[object Boolean]",h="[object Date]",d="[object Error]",v="[object Map]",y="[object Number]",g="[object RegExp]",b="[object Set]",m="[object String]",_="[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,s){var c=a&i,f=o(t),l=f.length,p=o(e),h=p.length;if(l!=h&&!c)return!1;for(var d=l;d--;){var v=f[d];if(!(c?v in e:u.call(e,v)))return!1}var y=s.get(t);if(y&&s.get(e))return y==e;var g=!0;s.set(t,e),s.set(e,t);for(var b=c;++d-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(432),i=r(78),a=r(115);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(544),i=500;t.exports=n},function(t,e,r){var n=r(512),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,u=a&&n.process,s=function(){try{return u&&u.binding("util")}catch(t){}}();t.exports=s}).call(e,r(88)(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,u=i(n.length-e,0),s=Array(u);++a0){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(78);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=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],u=r.stride[0],s=e.offset,c=r.offset;for(n=e.shape[0]-1;n>=0;n--,s+=a,c+=u)i[c]+=t*o[s]}},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],u=t.offset,s=e.offset;for(r=t.shape[0]-1;r>=0;r--,u+=i,s+=a)o[s]=n[u]}},function(t,e){"use strict";t.exports=function(t,e,r){var n,o=e.data,i=r.data,a=e.stride[0],u=r.stride[0],s=e.offset,c=r.offset;for(n=e.shape[0]-1;n>=0;n--,s+=a,c+=u)i[c]=t*o[s]}},function(t,e){"use strict";t.exports=function(t,e){var r,n,o=t.data,i=t.stride[0],a=t.offset,u=0;if(t===e)for(r=t.shape[0]-1;r>=0;r--,a+=i)n=o[a],u+=n*n;else{var s=e.data,c=e.stride[0],f=e.offset;for(r=t.shape[0]-1;r>=0;r--,a+=i,f+=c)u+=s[f]*o[a]}return u}},function(t,e){"use strict";t.exports=function(t){var e,r,n,o=-(1/0),i=t.data,a=t.stride[0],u=t.offset,s=t.shape[0];for(e=0;eo&&(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,u=0;for(e=t.shape[0]-1;e>=0;e--,a+=i)n=o[a],u=r(u,n);return u}},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,u=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,u=Math.sign(t)*Math.sqrt(1+a*a),n=1/u,o=a*n,i=t*u):(a=t/e,u=Math.sign(t)*Math.sqrt(1+a*a),o=1/u,n=a*o,i=e*u),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],u=e.stride[0],s=t.offset,c=e.offset;for(r=t.shape[0]-1;r>=0;r--,s+=a,c+=u)n=o[s],o[s]=i[c],i[c]=n}},function(t,e){"use strict";function r(t,e,r,n,o,i,a){for(var u=0,s=0,c=0,f=0,l=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;u<=d;){f=0;var b=Math.min(u+v,h-1);for(c=0;c<=b;c++)f+=t.get(u,c)*n.get(c);o.set(u,f*y+g*o.get(u)),u++}if(u=0;u--)i.set(u,i.get(u)*n+t*a(e.pick(u,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(88)(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 u=t.shape[0],s=n||!0,c=void 0===i?1:i,f=void 0===a?0:a,l=0,p=0,h=0,d=0;if(0===f)for(l=0;l=0;a--)e.set(a,n(t.pick(a,null).hi(a+1),e.hi(a+1)));else for(a=0;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,s,c,f,l,p,h;if(n=o({},u),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(s=0;s0;){","var w",y,"=",l,";","if(i",y,"<",l,"){","w",y,"=i",y,";","i",y,"=0;","}else{","i",y,"-=",l,";","}");f.push.apply(f,n(h,"o",t,"i0","i1","w1")),f.push("for(i=0;i=0&&(f[h]+=a[h],f[h]===u[h]);)f[h]=0,h--}return r}var o=r(181),i=r(3);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(f===setTimeout)return setTimeout(t,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?d=h.concat(d):y=-1,d.length&&u())}function u(){if(!v){var t=o(a);v=!0;for(var e=d.length;e;){for(h=d,d=[];++y1)for(var r=1;r=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=b.call(o,"catchLoc"),u=b.call(o,"finallyLoc");if(a&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&b.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),h(r),k}},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},k}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,r(59),r(583))},function(t,e,r){"use strict";(function(t,n){function o(t){if(t){var e=t.length||t.byteLength,r=b.log2(e);x[r].push(t)}}function i(t){o(t.buffer)}function a(t){var t=b.nextPow2(t),e=b.log2(t),r=x[e];return r.length>0?r.pop():new ArrayBuffer(t)}function u(t){return new Uint8Array(a(t),0,t)}function s(t){return new Uint16Array(a(2*t),0,t)}function c(t){return new Uint32Array(a(4*t),0,t)}function f(t){return new Int8Array(a(t),0,t)}function l(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 _?new Uint8ClampedArray(a(t),0,t):u(t)}function y(t){return new DataView(a(t),0,t)}function g(t){t=b.nextPow2(t);var e=b.log2(t),r=O[e];return r.length>0?r.pop():new n(t)}var b=r(241),m=r(163);t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:m([32,0]),UINT16:m([32,0]),UINT32:m([32,0]),INT8:m([32,0]),INT16:m([32,0]),INT32:m([32,0]),FLOAT:m([32,0]),DOUBLE:m([32,0]),DATA:m([32,0]),UINT8C:m([32,0]),BUFFER:m([32,0])});var _="undefined"!=typeof Uint8ClampedArray,w=t.__TYPEDARRAY_POOL;w.UINT8C||(w.UINT8C=m([32,0])),w.BUFFER||(w.BUFFER=m([32,0]));var x=w.DATA,O=w.BUFFER;e.free=function(t){if(n.isBuffer(t))O[b.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|b.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[b.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return a(t);switch(e){case"uint8":return u(t);case"uint16":return s(t);case"uint32":return c(t);case"int8":return f(t);case"int16":return l(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=u,e.mallocUint16=s,e.mallocUint32=c,e.mallocInt8=f,e.mallocInt16=l,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(59),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(184),t.exports=r(183)}])}); \ No newline at end of file